@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.
Files changed (258) hide show
  1. package/ChannelHandler/ChannelHandler.js.map +1 -1
  2. package/ChannelHandler/PreserveRedirectRouteQuery.gql +4 -4
  3. package/ChannelHandler/redirectUtils.d.ts +1 -1
  4. package/ChannelHandler/redirectUtils.js +5 -3
  5. package/ChannelHandler/redirectUtils.js.map +1 -1
  6. package/ChannelHandler/redirectUtils.test.js +5 -5
  7. package/ChannelHandler/redirectUtilsGroupedChannels.test.js +5 -5
  8. package/analytics/webVitals.js +5 -5
  9. package/analytics/webVitals.js.map +1 -1
  10. package/boot/NetworkStatusNotifier.d.ts +2 -0
  11. package/boot/NetworkStatusNotifier.js +4 -0
  12. package/boot/NetworkStatusNotifier.js.map +1 -0
  13. package/boot/SharedTree.d.ts +1 -1
  14. package/boot/SharedTree.js +1 -1
  15. package/boot/SharedTree.js.map +1 -1
  16. package/boot/apollo.d.ts +1 -2
  17. package/boot/apollo.js +13 -8
  18. package/boot/apollo.js.map +1 -1
  19. package/boot/client/startClient.js +18 -5
  20. package/boot/client/startClient.js.map +1 -1
  21. package/boot/server/IntervalQuery.d.ts +1 -1
  22. package/boot/server/IntervalQuery.js +2 -2
  23. package/boot/server/IntervalQuery.js.map +1 -1
  24. package/boot/server/IntervalQuery.test.js +9 -13
  25. package/boot/server/PersistedApolloClient.test.js +8 -7
  26. package/boot/server/createApolloServer.d.ts +2 -1
  27. package/boot/server/createApolloServer.js +5 -5
  28. package/boot/server/createApolloServer.js.map +1 -1
  29. package/boot/server/createRenderer.js +4 -2
  30. package/boot/server/createRenderer.js.map +1 -1
  31. package/boot/server/entrypoint.js +7 -4
  32. package/boot/server/entrypoint.js.map +1 -1
  33. package/boot/server/persistedQueries/__tests__/getPersistedQueriesForRequest.test.js +1 -1
  34. package/boot/utils/queryLoggingMiddleware.d.ts +1 -1
  35. package/boot/utils/queryLoggingMiddleware.js +2 -2
  36. package/boot/utils/queryLoggingMiddleware.js.map +1 -1
  37. package/cart/AddToCartFormik.d.ts +2 -2
  38. package/cart/AddToCartFormik.js +2 -2
  39. package/cart/AddToCartFormik.js.map +1 -1
  40. package/cart/useAddToCart.d.ts +1 -1
  41. package/components/Auth/ForgotPasswordProvider.d.ts +4 -6
  42. package/components/Auth/ForgotPasswordProvider.js +18 -18
  43. package/components/Auth/ForgotPasswordProvider.js.map +1 -1
  44. package/components/Auth/ResetPasswordProvider.d.ts +5 -3
  45. package/components/Auth/ResetPasswordProvider.js +1 -1
  46. package/components/Auth/ResetPasswordProvider.js.map +1 -1
  47. package/components/Auth/SSN.js +4 -4
  48. package/components/Auth/SSN.js.map +1 -1
  49. package/components/Auth/SignupFormContainer.d.ts +2 -5
  50. package/components/Auth/SignupFormContainer.js.map +1 -1
  51. package/components/Auth/UpdatePasswordForm.js +6 -6
  52. package/components/Auth/UpdatePasswordForm.js.map +1 -1
  53. package/components/Auth/signup-context.d.ts +2 -2
  54. package/components/Auth/signup-context.js +2 -3
  55. package/components/Auth/signup-context.js.map +1 -1
  56. package/components/Auth/signupSubmit.js +4 -4
  57. package/components/Auth/signupSubmit.js.map +1 -1
  58. package/components/Auth/useAddressFields.js +3 -3
  59. package/components/Auth/useAddressFields.js.map +1 -1
  60. package/components/Auth/useAddressFields.test.js +10 -8
  61. package/components/Auth/useCustomer.d.ts +2 -2
  62. package/components/Auth/useCustomer.js +1 -1
  63. package/components/Auth/useCustomer.js.map +1 -1
  64. package/components/AuthContext/AuthProvider.js +2 -2
  65. package/components/AuthContext/AuthProvider.js.map +1 -1
  66. package/components/AuthContext/AuthProvider.test.js +1 -1
  67. package/components/AuthContext/LogOut.d.ts +2 -2
  68. package/components/ChannelContext/ChannelProvider.d.ts +1 -1
  69. package/components/ChannelContext/useCountrySettings.d.ts +1 -1
  70. package/components/ChannelContext/useCountrySettings.js +1 -1
  71. package/components/ChannelContext/useCountrySettings.js.map +1 -1
  72. package/components/DynamicRoute/ActiveFiltersQuery.gql +4 -4
  73. package/components/DynamicRoute/CategoryRoute.d.ts +3 -3
  74. package/components/DynamicRoute/CategoryRoute.js +6 -3
  75. package/components/DynamicRoute/CategoryRoute.js.map +1 -1
  76. package/components/DynamicRoute/ContentRoute.d.ts +1 -1
  77. package/components/DynamicRoute/GenericError.d.ts +18 -0
  78. package/components/DynamicRoute/GenericError.js +61 -0
  79. package/components/DynamicRoute/GenericError.js.map +1 -0
  80. package/components/DynamicRoute/PreviewRoute.d.ts +1 -1
  81. package/components/DynamicRoute/PreviewRoute.js +1 -1
  82. package/components/DynamicRoute/PreviewRoute.js.map +1 -1
  83. package/components/DynamicRoute/ProductByArticlenumber.d.ts +2 -2
  84. package/components/DynamicRoute/ProductByArticlenumber.js +2 -2
  85. package/components/DynamicRoute/ProductByArticlenumber.js.map +1 -1
  86. package/components/DynamicRoute/ProductRoute.d.ts +3 -3
  87. package/components/DynamicRoute/RouteResolver.d.ts +2 -2
  88. package/components/DynamicRoute/RouteResolver.js +2 -1
  89. package/components/DynamicRoute/RouteResolver.js.map +1 -1
  90. package/components/DynamicRoute/Status.d.ts +4 -3
  91. package/components/DynamicRoute/Status.js.map +1 -1
  92. package/components/DynamicRoute/index.d.ts +4 -4
  93. package/components/DynamicRoute/index.js +47 -42
  94. package/components/DynamicRoute/index.js.map +1 -1
  95. package/components/Filters/utils/replaceInSearch.d.ts +1 -1
  96. package/components/Filters/utils/replaceInSearch.js.map +1 -1
  97. package/components/Fonts/injectFont.js +2 -2
  98. package/components/Fonts/injectFont.js.map +1 -1
  99. package/components/Mutation/AddToCartFormik.d.ts +1 -1
  100. package/components/Mutation/AddToCartFormik.js +2 -2
  101. package/components/Mutation/AddToCartFormik.js.map +1 -1
  102. package/components/Mutation/DecrementQuantity.d.ts +2 -2
  103. package/components/Mutation/DecrementQuantity.js +1 -1
  104. package/components/Mutation/DecrementQuantity.js.map +1 -1
  105. package/components/Mutation/IncrementQuantity.d.ts +2 -2
  106. package/components/Mutation/IncrementQuantity.js +1 -1
  107. package/components/Mutation/IncrementQuantity.js.map +1 -1
  108. package/components/Mutation/RemoveFromCart.d.ts +2 -2
  109. package/components/Mutation/RemoveFromCart.js +1 -1
  110. package/components/Mutation/RemoveFromCart.js.map +1 -1
  111. package/components/Mutation/SetQuantity.d.ts +2 -2
  112. package/components/Mutation/SetQuantity.js +1 -1
  113. package/components/Mutation/SetQuantity.js.map +1 -1
  114. package/components/Mutation/SubscribeToNewsletter.d.ts +1 -1
  115. package/components/Mutation/SubscribeToNewsletter.js +1 -1
  116. package/components/Mutation/SubscribeToNewsletter.js.map +1 -1
  117. package/components/Mutation/SubscribeToStockNotifications.d.ts +1 -1
  118. package/components/Mutation/SubscribeToStockNotifications.js +6 -2
  119. package/components/Mutation/SubscribeToStockNotifications.js.map +1 -1
  120. package/components/Mutation/cartMutationUtils.d.ts +1 -2
  121. package/components/Mutation/cartMutationUtils.js.map +1 -1
  122. package/components/Mutation/useDecrementQuantity.d.ts +1 -1
  123. package/components/Mutation/useDecrementQuantity.js +1 -1
  124. package/components/Mutation/useDecrementQuantity.js.map +1 -1
  125. package/components/Mutation/useIncrementQuantity.d.ts +1 -1
  126. package/components/Mutation/useIncrementQuantity.js +1 -1
  127. package/components/Mutation/useIncrementQuantity.js.map +1 -1
  128. package/components/Mutation/useRemoveFromCart.d.ts +1 -1
  129. package/components/Mutation/useRemoveFromCart.js +1 -1
  130. package/components/Mutation/useRemoveFromCart.js.map +1 -1
  131. package/components/Mutation/useSetQuantity.d.ts +1 -1
  132. package/components/Mutation/useSetQuantity.js +1 -1
  133. package/components/Mutation/useSetQuantity.js.map +1 -1
  134. package/components/Notifications/Notifications.d.ts +3 -3
  135. package/components/Notifications/Notifications.js +2 -3
  136. package/components/Notifications/Notifications.js.map +1 -1
  137. package/components/ProductConfigurationProvider/ProductConfigurationProvider.js +6 -6
  138. package/components/ProductConfigurationProvider/ProductConfigurationProvider.js.map +1 -1
  139. package/components/Query/CartProvider.d.ts +1 -1
  140. package/components/Query/CartProvider.js +1 -1
  141. package/components/Query/CartProvider.js.map +1 -1
  142. package/components/SortOrder/SortOrderContainer.d.ts +1 -1
  143. package/components/StructuredData/StructuredBreadcrumbData.d.ts +2 -2
  144. package/data/cache.d.ts +1 -1
  145. package/data/cache.js +62 -12
  146. package/data/cache.js.map +1 -1
  147. package/data/fragments/ProductListsFragments.gql +8 -8
  148. package/global.d.ts +55 -1
  149. package/helpers/getErrorDetail.d.ts +1 -1
  150. package/helpers/getErrorDetail.js +2 -2
  151. package/helpers/getErrorDetail.js.map +1 -1
  152. package/hooks/Filters/useBooleanFilter.d.ts +1 -1
  153. package/hooks/Filters/useBooleanFilter.js +1 -2
  154. package/hooks/Filters/useBooleanFilter.js.map +1 -1
  155. package/hooks/Filters/useFilters.d.ts +1 -1
  156. package/hooks/Filters/useFilters.js +1 -2
  157. package/hooks/Filters/useFilters.js.map +1 -1
  158. package/hooks/Filters/useListFilter.d.ts +2 -2
  159. package/hooks/Filters/useListFilter.js +1 -2
  160. package/hooks/Filters/useListFilter.js.map +1 -1
  161. package/hooks/Filters/useMultiFilter.d.ts +3 -3
  162. package/hooks/Filters/useMultiFilter.js +1 -2
  163. package/hooks/Filters/useMultiFilter.js.map +1 -1
  164. package/hooks/Filters/useRangeFilter.d.ts +2 -2
  165. package/hooks/Filters/useRangeFilter.js +1 -2
  166. package/hooks/Filters/useRangeFilter.js.map +1 -1
  167. package/hooks/Filters/useSortOrder.d.ts +6 -1
  168. package/hooks/Filters/useSortOrder.js +4 -3
  169. package/hooks/Filters/useSortOrder.js.map +1 -1
  170. package/hooks/PackageProducts/usePackageProductItem.d.ts +1 -1
  171. package/hooks/PackageProducts/usePackageProductItem.js +1 -1
  172. package/hooks/PackageProducts/usePackageProductItem.js.map +1 -1
  173. package/hooks/PackageProducts/usePackageProducts.js +17 -17
  174. package/hooks/PackageProducts/usePackageProducts.js.map +1 -1
  175. package/hooks/PackageProducts/usePackageProducts.test.js +1 -1
  176. package/hooks/ProductList/ProductListContext.js +1 -1
  177. package/hooks/ProductList/ProductListContext.js.map +1 -1
  178. package/hooks/ProductList/action-creators.d.ts +1 -1
  179. package/hooks/ProductList/index.d.ts +1 -1
  180. package/hooks/ProductList/list-transforms.js +1 -1
  181. package/hooks/ProductList/list-transforms.js.map +1 -1
  182. package/hooks/ProductList/product-list-reducer.js +1 -1
  183. package/hooks/ProductList/product-list-reducer.js.map +1 -1
  184. package/hooks/ProductList/useProductList.js +1 -1
  185. package/hooks/ProductList/useProductList.js.map +1 -1
  186. package/hooks/ProductList/useProductListItems.js +1 -1
  187. package/hooks/ProductList/useProductListItems.js.map +1 -1
  188. package/hooks/Subscriptions/useNewsletterSubscription.js +3 -3
  189. package/hooks/Subscriptions/useNewsletterSubscription.js.map +1 -1
  190. package/hooks/Subscriptions/useStockNotifications.d.ts +1 -1
  191. package/hooks/Subscriptions/useStockNotifications.js +3 -3
  192. package/hooks/Subscriptions/useStockNotifications.js.map +1 -1
  193. package/hooks/Subscriptions/useStoreSubscriptions.d.ts +1 -1
  194. package/hooks/Subscriptions/useStoreSubscriptions.js +3 -6
  195. package/hooks/Subscriptions/useStoreSubscriptions.js.map +1 -1
  196. package/hooks/Subscriptions/useStoresubscriptions.test.js +5 -7
  197. package/hooks/useAddMultipleToCart.d.ts +1 -1
  198. package/hooks/useAddMultipleToCart.js +1 -1
  199. package/hooks/useAddMultipleToCart.js.map +1 -1
  200. package/hooks/useAddMultipleToCart.test.js +1 -1
  201. package/hooks/useCustomerOrders.test.js +7 -5
  202. package/hooks/useCustomerOrdersQuery.d.ts +2 -2
  203. package/hooks/useCustomerOrdersQuery.js +1 -1
  204. package/hooks/useCustomerOrdersQuery.js.map +1 -1
  205. package/hooks/useDeleteAccountMutation.js +3 -3
  206. package/hooks/useDeleteAccountMutation.js.map +1 -1
  207. package/hooks/useInfinitePagination.d.ts +1 -1
  208. package/hooks/useInfinitePagination.js +4 -1
  209. package/hooks/useInfinitePagination.js.map +1 -1
  210. package/hooks/useLoginMutation.d.ts +3 -3
  211. package/hooks/useLoginMutation.js +2 -2
  212. package/hooks/useLoginMutation.js.map +1 -1
  213. package/hooks/useLoginRedirect.js +2 -2
  214. package/hooks/useLoginRedirect.js.map +1 -1
  215. package/hooks/useOrderDetailQuery.d.ts +3 -3
  216. package/hooks/useOrderDetailQuery.js +1 -1
  217. package/hooks/useOrderDetailQuery.js.map +1 -1
  218. package/hooks/useRoutePreload.js +1 -1
  219. package/hooks/useRoutePreload.js.map +1 -1
  220. package/hooks/useStockStatus.d.ts +8 -0
  221. package/hooks/useStockStatus.js +26 -0
  222. package/hooks/useStockStatus.js.map +1 -0
  223. package/integrations/sluggishSchemaExtension.js +1 -1
  224. package/integrations/sluggishSchemaExtension.js.map +1 -1
  225. package/package.json +23 -41
  226. package/polyfills.js +0 -2
  227. package/polyfills.js.map +1 -1
  228. package/resolvers/filters/boolFilter.js +24 -27
  229. package/resolvers/filters/boolFilter.js.map +1 -1
  230. package/resolvers/filters/filterParams.js +8 -8
  231. package/resolvers/filters/filterParams.js.map +1 -1
  232. package/resolvers/filters/filters.js +5 -5
  233. package/resolvers/filters/filters.js.map +1 -1
  234. package/resolvers/filters/index.d.ts +0 -4
  235. package/resolvers/filters/listFilter.js +24 -29
  236. package/resolvers/filters/listFilter.js.map +1 -1
  237. package/resolvers/filters/listFilterItem.js +31 -36
  238. package/resolvers/filters/listFilterItem.js.map +1 -1
  239. package/resolvers/filters/multiListFilter.js +41 -42
  240. package/resolvers/filters/multiListFilter.js.map +1 -1
  241. package/resolvers/filters/multiListFilterList.js +1 -1
  242. package/resolvers/filters/multiListFilterList.js.map +1 -1
  243. package/resolvers/filters/rangeFilter.js +27 -43
  244. package/resolvers/filters/rangeFilter.js.map +1 -1
  245. package/test-utils/ProviderPyramid.js +1 -1
  246. package/types.d.ts +1820 -1955
  247. package/components/Fonts/GoogleFont.d.ts +0 -10
  248. package/components/Fonts/GoogleFont.js +0 -35
  249. package/components/Fonts/GoogleFont.js.map +0 -1
  250. package/components/Fonts/TypekitFont.d.ts +0 -16
  251. package/components/Fonts/TypekitFont.js +0 -25
  252. package/components/Fonts/TypekitFont.js.map +0 -1
  253. package/integrations/addwishSchemaExtension.d.ts +0 -35
  254. package/integrations/addwishSchemaExtension.js +0 -141
  255. package/integrations/addwishSchemaExtension.js.map +0 -1
  256. package/integrations/nostoSchemaExtension.d.ts +0 -5
  257. package/integrations/nostoSchemaExtension.js +0 -77
  258. package/integrations/nostoSchemaExtension.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ChannelHandler.js","sourceRoot":"","sources":["ChannelHandler.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,OAAO,EAAE,MAAM,IAAI,CAAC;AAGpB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,OAAO,EACR,MAAM,gBAAgB,CAAC;AAGxB,MAAM,OAAO,cAAc;IAOzB,YACE,OAMI;QACF,eAAe,EAAE,SAAS;QAC1B,kBAAkB,EAAE,SAAS;QAC7B,QAAQ,EAAE,SAAS;QACnB,mBAAmB,EAAE,SAAS;QAC9B,oBAAoB,EAAE,SAAS;KAChC;QAgBH,2BAAsB,GAAG,CAAC,mBAAwC,EAAE,EAAE,CACpE,CAAC,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC,CAAC;QAEnD,uBAAkB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC;QAEhD,uBAAkB,GAAG,CAAC,eAAgC,EAAE,EAAE;YACxD,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACzC,CAAC,CAAC;QAEF,0BAAqB,GAAG,CAAC,kBAAmC,EAAE,EAAE;YAC9D,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC/C,CAAC,CAAC;QAEF,0BAAqB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC;QAEtD,gBAAW,GAAG,CAAC,QAAmB,EAAE,EAAE;YACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC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GAAG,IAAI,CAAC;QACT,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACnD,CAAC;IAsIO,sBAAsB,CAAC,GAAW;QACxC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC3C,MAAM,aAAa,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAC,GAAG,CAAC,KAAI,EAAE,CAAC;QACjD,aAAa,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC9B,aAAa,CAAC,OAAO,CACnB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAC7D,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -3,16 +3,16 @@ query preserveRedirectRouteQuery($path: String!) {
3
3
  id
4
4
  object {
5
5
  ... on Category {
6
- id
6
+ _id: id
7
7
  }
8
8
  ... on Product {
9
- id
9
+ _id: id
10
10
  }
11
11
  ... on Page {
12
- id
12
+ _id: id
13
13
  }
14
14
  ... on StartPage {
15
- id
15
+ _id: id
16
16
  }
17
17
  }
18
18
  }
@@ -1,4 +1,4 @@
1
- import ApolloClient from 'apollo-client';
1
+ import { ApolloClient } from '@apollo/client';
2
2
  import { SelectedChannel } from '../components/ChannelContext/ChannelContext';
3
3
  export type GetPrimaryRoutePath = (path: string, newChannel: SelectedChannel, setSelectedChannel: (selectedChannel: SelectedChannel) => void) => Promise<string>;
4
4
  export declare function primaryRouteForPathFetcher(client: ApolloClient<any>): GetPrimaryRoutePath;
@@ -28,10 +28,11 @@ export function primaryRouteForPathFetcher(client) {
28
28
  query: preserveRedirectRouteQuery,
29
29
  variables: {
30
30
  path
31
- }
31
+ },
32
+ fetchPolicy: 'network-only'
32
33
  });
33
- const { id, __typename, pageId } = routeQueryResult.data.route.object;
34
- const idUesdForRedirect = id || pageId;
34
+ const { _id, __typename, pageId } = routeQueryResult.data.route.object;
35
+ const idUesdForRedirect = _id || pageId;
35
36
  setSelectedChannel(newChannel);
36
37
  const pathnameQueryResult = yield client.query({
37
38
  fetchPolicy: 'network-only',
@@ -43,6 +44,7 @@ export function primaryRouteForPathFetcher(client) {
43
44
  return pathnameQueryResult.data[__typename].primaryRoute.path;
44
45
  }
45
46
  catch (e) {
47
+ console.log('Error in PrimaryRouteForPathFetcher: ', e);
46
48
  return '/';
47
49
  }
48
50
  });
@@ -1 +1 @@
1
- {"version":3,"file":"redirectUtils.js","sourceRoot":"","sources":["redirectUtils.ts"],"names":[],"mappings":";;;;;;;;;AASA,OAAO,0BAA0B,MAAM,kCAAkC,CAAC;AAC1E,OAAO,4BAA4B,MAAM,oCAAoC,CAAC;AAC9E,OAAO,6BAA6B,MAAM,qCAAqC,CAAC;AAChF,OAAO,8BAA8B,MAAM,sCAAsC,CAAC;AAClF,OAAO,yBAAyB,MAAM,iCAAiC,CAAC;AAGxE,MAAM,wBAAwB,GAAG;IAC/B,OAAO,EAAE,4BAA4B;IACrC,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,8BAA8B;IACzC,IAAI,EAAE,yBAAyB;CAChC,CAAC;AASF,MAAM,UAAU,0BAA0B,CACxC,MAAyB;IAEzB,OAAO,CAAO,IAAI,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE;QACpD,IAAI;YACF,IAAI,CAAC,IAAI,EAAE;gBACT,MAAM,IAAI,KAAK,CAAC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,IAAI,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE;QACpD,IAAI;YACF,IAAI,CAAC,IAAI,EAAE;gBACT,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;aACzC;YAED,MAAM,gBAAgB,GAAG,MAAM,MAAM,CAAC,KAAK,CAQxC;gBACD,KAAK,EAAE,0BAA0B;gBACjC,SAAS,EAAE;oBACT,IAAI;iBACL;gBACD,WAAW,EAAE,cAAc;aAC5B,CAAC,CAAC;YAEH,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;YACvE,MAAM,iBAAiB,GAAG,GAAG,IAAI,MAAM,CAAC;YACxC,kBAAkB,CAAC,UAAU,CAAC,CAAC;YAE/B,MAAM,mBAAmB,GAAG,MAAM,MAAM,CAAC,KAAK,CAK3C;gBACD,WAAW,EAAE,cAAc;gBAC3B,KAAK,EAAE,wBAAwB,CAAC,UAAU,CAAC;gBAC3C,SAAS,EAAE;oBACT,EAAE,EAAE,iBAAiB;iBACtB;aACF,CAAC,CAAC;YACH,OAAO,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC;SAC/D;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,uCAAuC,EAAE,CAAC,CAAC,CAAC;YACxD,OAAO,GAAG,CAAC;SACZ;IACH,CAAC,CAAA,CAAC;AACJ,CAAC"}
@@ -2,13 +2,13 @@ import {
2
2
  createSelectedChannel,
3
3
  getSelectedAndRecommendedChannel
4
4
  } from './channelUtils';
5
- import { MockLink } from 'apollo-link-mock';
5
+ import { MockLink } from '@apollo/client';
6
6
  import {
7
+ ApolloClient,
7
8
  InMemoryCache,
8
- IntrospectionFragmentMatcher
9
- } from 'apollo-cache-inmemory';
10
- import ApolloClient from 'apollo-client';
11
- import gql from 'graphql-tag';
9
+ IntrospectionFragmentMatcher,
10
+ gql
11
+ } from '@apollo/client';
12
12
  import { ChannelHandler } from './ChannelHandler';
13
13
  import { channels, singleDomainChannels } from '../test-utils/variables';
14
14
  import { Cookies } from 'react-cookie';
@@ -2,13 +2,13 @@ import {
2
2
  createSelectedChannel,
3
3
  getSelectedAndRecommendedChannel
4
4
  } from './channelUtils';
5
- import { MockLink } from 'apollo-link-mock';
5
+ import { MockLink } from '@apollo/client';
6
6
  import {
7
+ ApolloClient,
7
8
  InMemoryCache,
8
- IntrospectionFragmentMatcher
9
- } from 'apollo-cache-inmemory';
10
- import ApolloClient from 'apollo-client';
11
- import gql from 'graphql-tag';
9
+ IntrospectionFragmentMatcher,
10
+ gql
11
+ } from '@apollo/client';
12
12
  import { ChannelHandler } from './ChannelHandler';
13
13
  import {
14
14
  groupedChannels as channels,
@@ -1,4 +1,4 @@
1
- import { getCLS, getFID, getLCP } from 'web-vitals';
1
+ import { onCLS, onLCP, onFID } from 'web-vitals';
2
2
  import { createApiReporter, getDeviceInfo } from 'web-vitals-reporter';
3
3
  import { routeList } from '../boot/addMissingConfig';
4
4
  let globalPageType = undefined;
@@ -11,7 +11,7 @@ export function webVitals({ shopId, apiUrl }) {
11
11
  var _a;
12
12
  // Init report callback with information about the browser.
13
13
  const deviceInfo = getDeviceInfo();
14
- Object.keys(routeList).forEach(route => {
14
+ Object.keys(routeList).forEach((route) => {
15
15
  var _a;
16
16
  if ((_a = deviceInfo === null || deviceInfo === void 0 ? void 0 : deviceInfo.url) === null || _a === void 0 ? void 0 : _a.includes(routeList[route])) {
17
17
  globalPageType = route;
@@ -32,8 +32,8 @@ export function webVitals({ shopId, apiUrl }) {
32
32
  }
33
33
  });
34
34
  // Setup web-vitals
35
- getLCP(sendToAnalytics);
36
- getFID(sendToAnalytics);
37
- getCLS(sendToAnalytics);
35
+ onLCP(sendToAnalytics);
36
+ onFID(sendToAnalytics);
37
+ onCLS(sendToAnalytics);
38
38
  }
39
39
  //# sourceMappingURL=webVitals.js.map
@@ -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M,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM;YAC1B,IAAI,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI;YACtB,UAAU,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,0CAAE,aAAa;SAClD;QACD,UAAU,EAAE,GAAG,EAAE;YACf,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;QACtC,CAAC;KACF,CAAC,CAAC;IAEH,mBAAmB;IACnB,KAAK,CAAC,eAAe,CAAC,CAAC;IACvB,KAAK,CAAC,eAAe,CAAC,CAAC;IACvB,KAAK,CAAC,eAAe,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const link: any, useApolloNetworkStatus: any;
2
+ export { link, useApolloNetworkStatus };
@@ -0,0 +1,4 @@
1
+ import { createNetworkStatusNotifier } from 'react-apollo-network-status';
2
+ const { link, useApolloNetworkStatus } = createNetworkStatusNotifier();
3
+ export { link, useApolloNetworkStatus };
4
+ //# sourceMappingURL=NetworkStatusNotifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NetworkStatusNotifier.js","sourceRoot":"","sources":["NetworkStatusNotifier.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE,GAAG,2BAA2B,EAAE,CAAC;AAEvE,OAAO,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { AnalyticsConfig } from '@jetshop/core/analytics/AnalyticsProvider';
2
- import ApolloClient from 'apollo-client';
2
+ import { ApolloClient } from '@apollo/client';
3
3
  import React, { ReactElement } from 'react';
4
4
  import { Cookies } from 'react-cookie';
5
5
  import { StaticRouterProps } from 'react-router';
@@ -1,6 +1,6 @@
1
1
  import AnalyticsProvider from '@jetshop/core/analytics/AnalyticsProvider';
2
2
  import React from 'react';
3
- import { ApolloProvider } from 'react-apollo';
3
+ import { ApolloProvider } from '@apollo/client';
4
4
  // Cookies
5
5
  import { CookiesProvider } from 'react-cookie';
6
6
  // Metadata
@@ -1 +1 @@
1
- {"version":3,"file":"SharedTree.js","sourceRoot":"","sources":["SharedTree.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAEN,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,UAAU;AACV,OAAO,EAAW,eAAe,EAAE,MAAM,cAAc,CAAC;AACxD,WAAW;AACX,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAe,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG3E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAgBpE,MAAM,UAAU,GAAG,CAAC,EAClB,gBAAgB,EAChB,OAAO,EACP,aAAa,EACb,QAAQ,EACR,MAAM,EACN,MAAM,EACN,WAAW,EACX,MAAM,EACN,WAAW,EACX,QAAQ,EACR,cAAc,EACd,cAAc,EACE,EAAgB,EAAE;IAClC,OAAO,CACL,oBAAC,cAAc,IAAC,MAAM,EAAE,MAAM;QAC5B,oBAAC,qBAAqB;YACpB,oBAAC,eAAe,IAAC,OAAO,EAAE,OAAO;gBAC/B,oBAAC,cAAc,IAAC,OAAO,EAAE,aAAa;oBACpC,oBAAC,kBAAkB,IAAC,KAAK,EAAE,gBAAgB;wBACzC,oBAAC,cAAc,IAAC,MAAM,EAAE,MAAM;4BAC5B,oB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,cAAc,EACE,EAAgB,EAAE;IAClC,OAAO,CACL,oBAAC,cAAc,IAAC,MAAM,EAAE,MAAM;QAC5B,oBAAC,qBAAqB;YACpB,oBAAC,eAAe,IAAC,OAAO,EAAE,OAAO;gBAC/B,oBAAC,cAAc,IAAC,OAAO,EAAE,aAAa;oBACpC,oBAAC,kBAAkB,IAAC,KAAK,EAAE,gBAAgB;wBACzC,oBAAC,cAAc,IAAC,MAAM,EAAE,MAAM;4BAC5B,oBAAC,eAAe,IACd,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc;gCAE9B,oBAAC,iBAAiB,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO;oCACrD,oBAAC,eAAe,IAAC,cAAc,EAAE,cAAc;wCAC7C,oBAAC,MAAM,kBACL,QAAQ,EACN,cAAc,CAAC,kBAAkB,EAAE,IAAI,SAAS,IAE9C,WAAW;4CAEf,oBAAC,YAAY,IAAC,IAAI,EAAE,WAAW,IAC5B,QAAQ,CACI,CACR,CACO,CACA,CACJ,CACH,CACE,CACN,CACD,CACI,CACT,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
package/boot/apollo.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { NormalizedCacheObject } from 'apollo-cache-inmemory';
2
- import { ApolloClient } from 'apollo-client';
1
+ import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
3
2
  import { Request } from 'express';
4
3
  import { GraphQLSchema } from 'graphql';
5
4
  import { ApolloConfig } from '../components/ConfigProvider';
package/boot/apollo.js CHANGED
@@ -9,19 +9,17 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import { ApolloClient } from 'apollo-client';
13
- import { ApolloLink } from 'apollo-link';
14
- import { onError } from 'apollo-link-error';
15
- import { createHttpLink } from 'apollo-link-http';
16
- import { createPersistedQueryLink } from 'apollo-link-persisted-queries';
17
- import { SchemaLink } from 'apollo-link-schema';
12
+ import { ApolloClient, ApolloLink, createHttpLink } from '@apollo/client';
13
+ import { onError } from '@apollo/client/link/error';
14
+ import { createPersistedQueryLink } from '@apollo/client/link/persisted-queries';
15
+ import { SchemaLink } from '@apollo/client/link/schema';
18
16
  import qs from 'qs';
19
17
  import createCache from '../data/cache';
20
18
  import report from '../errorReporting';
21
19
  import { resolvers } from '../resolvers';
22
20
  import typeDefs from './client-schema.gql';
23
21
  import { logOperationTime } from './utils/queryLoggingMiddleware';
24
- import { link as networkStatusLink } from '@jetshop/ui/Loading/NetworkStatusNotifier';
22
+ import { link as networkStatusLink } from '@jetshop/core/boot/NetworkStatusNotifier';
25
23
  export const createClient = ({ apolloConfig: { token, shopid, enableGateway, graphQLURI, useGraphQLProxyServer }, schema, authHandler, previewHandler, req, channelHandler }) => {
26
24
  if (!token || !shopid) {
27
25
  throw new Error(`Missing ${!token && `token`} ${!shopid && `shopid`}`);
@@ -151,6 +149,7 @@ export const createClient = ({ apolloConfig: { token, shopid, enableGateway, gra
151
149
  }
152
150
  // 503
153
151
  if (networkError) {
152
+ // This is a hack, does it work? Todo eli5
154
153
  const errors = (_b = networkError === null || networkError === void 0 ? void 0 : networkError.result) === null || _b === void 0 ? void 0 : _b.Errors;
155
154
  if (errors) {
156
155
  errors.forEach((error) => {
@@ -179,12 +178,18 @@ export const createClient = ({ apolloConfig: { token, shopid, enableGateway, gra
179
178
  links.unshift(logOperationTime);
180
179
  }
181
180
  if (enableGateway) {
182
- links.unshift(createPersistedQueryLink({ useGETForHashedQueries: true }));
181
+ links.unshift(createPersistedQueryLink({
182
+ useGETForHashedQueries: true,
183
+ generateHash: () => {
184
+ return '';
185
+ }
186
+ }));
183
187
  }
184
188
  const link = ApolloLink.from(links);
185
189
  const cache = createCache();
186
190
  const client = new ApolloClient({
187
191
  link,
192
+ connectToDevTools: process.env.NODE_ENV !== 'production',
188
193
  assumeImmutableResults: true,
189
194
  cache: __IN_SERVER__
190
195
  ? cache
@@ -1 +1 @@
1
- {"version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OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC,CAAC"}
@@ -11,7 +11,7 @@ import { setupIntl } from '@jetshop/intl/config';
11
11
  import * as Sentry from '../../sentry/client';
12
12
  import React from 'react';
13
13
  import { Cookies } from 'react-cookie';
14
- import { hydrate as renderToDOM } from 'react-dom';
14
+ import { hydrateRoot } from 'react-dom/client';
15
15
  import { loadableReady } from '@loadable/component';
16
16
  import { BrowserRouter } from 'react-router-dom';
17
17
  import { ChannelHandler } from '../../ChannelHandler/ChannelHandler';
@@ -28,15 +28,18 @@ import createIntlOptions from '../utils/createIntOptions';
28
28
  import { setUID } from '../utils/uid';
29
29
  import { webVitals } from '../../analytics/webVitals';
30
30
  import { primaryRouteForPathFetcher } from '../../../core/ChannelHandler/redirectUtils';
31
+ import ActiveFiltersQuery from '@jetshop/core/components/DynamicRoute/ActiveFiltersQuery.gql';
31
32
  // Instantiate this here, since we need to read cookies outside of React.
32
33
  const cookies = new Cookies();
33
34
  function getInitialCacheData() {
34
35
  return {
36
+ query: ActiveFiltersQuery,
35
37
  data: {
36
38
  activeFilters: getActiveFiltersFromSearch(document.location.search)
37
39
  }
38
40
  };
39
41
  }
42
+ let root;
40
43
  const startClient = (tree, config) => {
41
44
  if (!config.apolloConfig.channelsQuery) {
42
45
  logWarningInDev(true, `No channelsQuery was provided in the apolloConfig, which is a
@@ -71,9 +74,9 @@ const startClient = (tree, config) => {
71
74
  channelHandler.setGetPrimaryRoutePath(primaryRouteForPathFetcher(client));
72
75
  const initialCacheData = getInitialCacheData();
73
76
  // Initialise cache with active filters from the search params
74
- client.cache.writeData(initialCacheData);
77
+ client.cache.writeQuery(initialCacheData);
75
78
  // If cache is reseted, we reset the initial cache data
76
- client.onResetStore(() => __awaiter(void 0, void 0, void 0, function* () { return client.cache.writeData(initialCacheData); }));
79
+ client.onResetStore(() => __awaiter(void 0, void 0, void 0, function* () { return client.cache.writeQuery(initialCacheData); }));
77
80
  client
78
81
  .query({
79
82
  query: config.apolloConfig.channelsQuery || channelsQuery
@@ -125,9 +128,19 @@ const startClient = (tree, config) => {
125
128
  })
126
129
  .then((tree) => {
127
130
  return loadableReady(() => {
128
- const root = document.getElementById('root');
129
- renderToDOM(tree, root, () => void (client.disableNetworkFetches = false));
131
+ if (root) {
132
+ // If the root is already set,
133
+ // we know that we are in a hot reload and we want to render the new tree into the existing root.
134
+ root.render(tree);
135
+ }
136
+ else {
137
+ // client.disableNetworkFetches = false;
138
+ root = hydrateRoot(document.getElementById('root'), tree);
139
+ }
130
140
  });
141
+ })
142
+ .finally(() => {
143
+ client.disableNetworkFetches = false;
131
144
  });
132
145
  };
133
146
  const main = (tree, config) => {
@@ -1 +1 @@
1
- {"version":3,"file":"startClient.js","sourceRoot":"","sources":["startClient.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD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,CAAC,CAAC;KAClC;SAAM;QACL,2KAA2K;QAC1K,MAAc,CAAC,QAAQ,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KAC5D;AACH,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,5 +1,5 @@
1
+ import { OperationVariables } from '@apollo/client';
1
2
  import { DocumentNode } from 'graphql';
2
- import { OperationVariables } from 'react-apollo';
3
3
  import { CreateClientOpts } from '../apollo';
4
4
  import { ChannelHeaders } from './persistedQueries/PersistedClient';
5
5
  export type ErrorCallback = (err: Error) => void;
@@ -42,7 +42,7 @@ export class IntervalQuery {
42
42
  headers: this.channelHeaders
43
43
  }
44
44
  })
45
- .then(resp => {
45
+ .then((resp) => {
46
46
  const { data } = resp;
47
47
  if (pendingResponse !== this.pendingResponse) {
48
48
  // response expired
@@ -56,7 +56,7 @@ export class IntervalQuery {
56
56
  this.client = client;
57
57
  return data;
58
58
  });
59
- pendingResponse.catch(err => {
59
+ pendingResponse.catch((err) => {
60
60
  if (pendingResponse !== this.pendingResponse) {
61
61
  // response expired
62
62
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"IntervalQuery.js","sourceRoot":"","sources":["IntervalQuery.ts"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EAAE,YAAY,EAAoB,MAAM,WAAW,CAAC;AAa3D,MAAM,OAAO,aAAa;IAYxB,YAAY,EACV,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,OAAO,EAC6C;QACpD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC;QACpD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,YAA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AI,CAAC;aACb;YACD,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;YACjC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YACzB,gFAAgF;YAChF,mCAAmC;YACnC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YAErB,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QACL,eAAe,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YAC5B,IAAI,eAAe,KAAK,IAAI,CAAC,eAAe,EAAE;gBAC5C,mBAAmB;gBACnB,OAAO;aACR;YACD,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;YACjC,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;aACnB;QACH,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAEK,OAAO;;YACX,IAAI,IAAI,CAAC,YAAY,EAAE;gBACrB,OAAO,IAAI,CAAC,YAAY,CAAC;aAC1B;YACD,IAAI,IAAI,CAAC,eAAe,EAAE;gBACxB,OAAO,IAAI,CAAC,eAAe,CAAC;aAC7B;YACD,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;QAC7B,CAAC;KAAA;IAEK,kBAAkB;;YACtB,OAAO,IAAI,CAAC,eAAe,CAAC;QAC9B,CAAC;KAAA;IAED,YAAY;QACV,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IAC/B,CAAC;CACF"}
@@ -1,14 +1,12 @@
1
- // TODO
2
- // File reverted from TypeScript, should be reverted when pipeline supports it
3
- // https://gitlab.jetshop.se/jetshop/flight/merge_requests/409/diffs?commit_id=d30490f833ec2d2eec94e5a75ed99de71e666377
4
- // https://gitlab.jetshop.se/jetshop/flight/blob/94b6108017f6205e7d31f6bedb19c14f278d227a/packages/core/boot/server/IntervalQuery.test.ts
5
-
6
- import { InMemoryCache } from 'apollo-cache-inmemory';
7
- import { HttpLink } from 'apollo-link-http';
8
- import ApolloClient, { ApolloError } from 'apollo-client';
1
+ import {
2
+ ApolloClient,
3
+ ApolloError,
4
+ InMemoryCache,
5
+ HttpLink,
6
+ gql
7
+ } from '@apollo/client';
9
8
  import { IntervalQuery } from './IntervalQuery';
10
9
  import nock from 'nock';
11
- import gql from 'graphql-tag';
12
10
  beforeAll(() => {
13
11
  jest.useFakeTimers();
14
12
  nock.disableNetConnect();
@@ -46,16 +44,14 @@ function mockResponse({ channels = null, statusCode = 200, errors }) {
46
44
  errors,
47
45
  data: {
48
46
  channels: Array.isArray(channels)
49
- ? channels.map(channel =>
47
+ ? channels.map((channel) =>
50
48
  Object.assign({ __typename: 'Channel' }, channel)
51
49
  )
52
50
  : null
53
51
  }
54
52
  };
55
53
  const res = jest.fn(() => data);
56
- nock('http://localhost')
57
- .post('/graphql')
58
- .reply(statusCode, res);
54
+ nock('http://localhost').post('/graphql').reply(statusCode, res);
59
55
  return res;
60
56
  }
61
57
  test('does request on init', async () => {
@@ -3,11 +3,14 @@
3
3
  // https://gitlab.jetshop.se/jetshop/flight/merge_requests/409/diffs?commit_id=d30490f833ec2d2eec94e5a75ed99de71e666377
4
4
  // https://gitlab.jetshop.se/jetshop/flight/blob/94b6108017f6205e7d31f6bedb19c14f278d227a/packages/core/boot/server/PersistedApolloClient.test.ts
5
5
 
6
- import ApolloClient, { ApolloError } from 'apollo-client';
6
+ import {
7
+ ApolloClient,
8
+ ApolloError,
9
+ InMemoryCache,
10
+ HttpLink
11
+ } from '@apollo/client';
7
12
  import { PersistedApolloClient } from './PersistedApolloClient';
8
13
  import nock from 'nock';
9
- import { HttpLink } from 'apollo-link-http';
10
- import { InMemoryCache } from 'apollo-cache-inmemory';
11
14
  import channelsQuery from '../ChannelsQuery.gql';
12
15
 
13
16
  global.__IN_SERVER__ = true;
@@ -41,7 +44,7 @@ function mockResponse({ channels = null, statusCode = 200, errors }) {
41
44
  errors,
42
45
  data: {
43
46
  channels: Array.isArray(channels)
44
- ? channels.map(channel =>
47
+ ? channels.map((channel) =>
45
48
  Object.assign(
46
49
  {
47
50
  __typename: 'Channel',
@@ -66,9 +69,7 @@ function mockResponse({ channels = null, statusCode = 200, errors }) {
66
69
  }
67
70
  };
68
71
  const res = jest.fn(() => data);
69
- nock('http://localhost')
70
- .post('/graphql')
71
- .reply(statusCode, res);
72
+ nock('http://localhost').post('/graphql').reply(statusCode, res);
72
73
  return res;
73
74
  }
74
75
  test('does request on init', async () => {
@@ -1,4 +1,5 @@
1
- import { ApolloServer, IResolversParameter } from 'apollo-server-express';
1
+ import { ApolloServer } from 'apollo-server-express';
2
+ import { IResolversParameter } from 'graphql-tools';
2
3
  import { GraphQLSchema } from 'graphql';
3
4
  import { ApolloConfig } from '../../components/ConfigProvider';
4
5
  import { PluginDefinition } from 'apollo-server-core';
@@ -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 { ApolloServer, introspectSchema, makeRemoteExecutableSchema, mergeSchemas } from 'apollo-server-express';
11
- import { HttpLink } from 'apollo-link-http';
12
- import { setContext } from 'apollo-link-context';
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,EACL,YAAY,EACZ,gBAAgB,EAChB,0BAA0B,EAC1B,YAAY,EAEb,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,4CAA4C;AAC5C,wGAAwG;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAY,UAAU,EAAa,MAAM,aAAa,CAAC;AAG9D,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,eAAe;IACf,WAAW;IACX,SAAS;IACT,SAAS;IACT,UAAU;CACX,CAAC;AA6BF,S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AAI,MAAM,CAAC,SAAS,EAAE;gBACpB,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;aACpC;SACF;QAED,MAAM,MAAM,GAAG,YAAY,CAAC;YAC1B,OAAO;YACP,SAAS;SACV,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,YAAY,CAAC,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-ssr';
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.writeData({
164
+ client.cache.writeQuery({
165
+ query: ActiveFiltersQuery,
164
166
  data: {
165
167
  activeFilters: getActiveFiltersFromSearch(req.query)
166
168
  }