@jetshop/core 5.17.0-alpha.a973fcfb → 5.17.0-alpha.aa534f7a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) 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 +12 -8
  12. package/boot/apollo.js.map +1 -1
  13. package/boot/client/startClient.js +14 -5
  14. package/boot/client/startClient.js.map +1 -1
  15. package/boot/server/IntervalQuery.d.ts +1 -1
  16. package/boot/server/IntervalQuery.js +2 -2
  17. package/boot/server/IntervalQuery.js.map +1 -1
  18. package/boot/server/IntervalQuery.test.js +9 -13
  19. package/boot/server/PersistedApolloClient.test.js +8 -7
  20. package/boot/server/createApolloServer.d.ts +2 -1
  21. package/boot/server/createApolloServer.js +5 -5
  22. package/boot/server/createApolloServer.js.map +1 -1
  23. package/boot/server/createRenderer.js +4 -2
  24. package/boot/server/createRenderer.js.map +1 -1
  25. package/boot/server/entrypoint.js +7 -4
  26. package/boot/server/entrypoint.js.map +1 -1
  27. package/boot/server/persistedQueries/__tests__/getPersistedQueriesForRequest.test.js +1 -1
  28. package/boot/utils/queryLoggingMiddleware.d.ts +1 -1
  29. package/boot/utils/queryLoggingMiddleware.js +2 -2
  30. package/boot/utils/queryLoggingMiddleware.js.map +1 -1
  31. package/cart/AddToCartFormik.d.ts +2 -2
  32. package/cart/AddToCartFormik.js +2 -2
  33. package/cart/AddToCartFormik.js.map +1 -1
  34. package/cart/useAddToCart.d.ts +1 -1
  35. package/components/Auth/ForgotPasswordProvider.d.ts +4 -6
  36. package/components/Auth/ForgotPasswordProvider.js +18 -18
  37. package/components/Auth/ForgotPasswordProvider.js.map +1 -1
  38. package/components/Auth/ResetPasswordProvider.d.ts +5 -3
  39. package/components/Auth/ResetPasswordProvider.js +1 -1
  40. package/components/Auth/ResetPasswordProvider.js.map +1 -1
  41. package/components/Auth/SSN.js +4 -4
  42. package/components/Auth/SSN.js.map +1 -1
  43. package/components/Auth/SignupFormContainer.d.ts +2 -5
  44. package/components/Auth/SignupFormContainer.js.map +1 -1
  45. package/components/Auth/UpdatePasswordForm.js +6 -6
  46. package/components/Auth/UpdatePasswordForm.js.map +1 -1
  47. package/components/Auth/signup-context.d.ts +2 -2
  48. package/components/Auth/signup-context.js +2 -3
  49. package/components/Auth/signup-context.js.map +1 -1
  50. package/components/Auth/signupSubmit.js +4 -4
  51. package/components/Auth/signupSubmit.js.map +1 -1
  52. package/components/Auth/useAddressFields.js +3 -3
  53. package/components/Auth/useAddressFields.js.map +1 -1
  54. package/components/Auth/useAddressFields.test.js +10 -8
  55. package/components/Auth/useCustomer.d.ts +2 -2
  56. package/components/Auth/useCustomer.js +1 -1
  57. package/components/Auth/useCustomer.js.map +1 -1
  58. package/components/AuthContext/AuthProvider.js +2 -2
  59. package/components/AuthContext/AuthProvider.js.map +1 -1
  60. package/components/AuthContext/AuthProvider.test.js +1 -1
  61. package/components/AuthContext/LogOut.d.ts +2 -2
  62. package/components/ChannelContext/ChannelProvider.d.ts +1 -1
  63. package/components/ChannelContext/useCountrySettings.d.ts +1 -1
  64. package/components/ChannelContext/useCountrySettings.js +1 -1
  65. package/components/ChannelContext/useCountrySettings.js.map +1 -1
  66. package/components/DynamicRoute/ActiveFiltersQuery.gql +4 -4
  67. package/components/DynamicRoute/CategoryRoute.d.ts +3 -3
  68. package/components/DynamicRoute/CategoryRoute.js +6 -3
  69. package/components/DynamicRoute/CategoryRoute.js.map +1 -1
  70. package/components/DynamicRoute/ContentRoute.d.ts +1 -1
  71. package/components/DynamicRoute/GenericError.d.ts +18 -0
  72. package/components/DynamicRoute/GenericError.js +61 -0
  73. package/components/DynamicRoute/GenericError.js.map +1 -0
  74. package/components/DynamicRoute/PreviewRoute.d.ts +1 -1
  75. package/components/DynamicRoute/PreviewRoute.js +1 -1
  76. package/components/DynamicRoute/PreviewRoute.js.map +1 -1
  77. package/components/DynamicRoute/ProductByArticlenumber.d.ts +2 -2
  78. package/components/DynamicRoute/ProductByArticlenumber.js +2 -2
  79. package/components/DynamicRoute/ProductByArticlenumber.js.map +1 -1
  80. package/components/DynamicRoute/ProductRoute.d.ts +3 -3
  81. package/components/DynamicRoute/RouteResolver.d.ts +2 -2
  82. package/components/DynamicRoute/RouteResolver.js +1 -1
  83. package/components/DynamicRoute/RouteResolver.js.map +1 -1
  84. package/components/DynamicRoute/Status.d.ts +4 -3
  85. package/components/DynamicRoute/Status.js.map +1 -1
  86. package/components/DynamicRoute/index.d.ts +4 -4
  87. package/components/DynamicRoute/index.js +46 -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/Fonts/injectFont.js +2 -2
  92. package/components/Fonts/injectFont.js.map +1 -1
  93. package/components/Mutation/AddToCartFormik.d.ts +1 -1
  94. package/components/Mutation/AddToCartFormik.js +2 -2
  95. package/components/Mutation/AddToCartFormik.js.map +1 -1
  96. package/components/Mutation/DecrementQuantity.d.ts +2 -2
  97. package/components/Mutation/DecrementQuantity.js +1 -1
  98. package/components/Mutation/DecrementQuantity.js.map +1 -1
  99. package/components/Mutation/IncrementQuantity.d.ts +2 -2
  100. package/components/Mutation/IncrementQuantity.js +1 -1
  101. package/components/Mutation/IncrementQuantity.js.map +1 -1
  102. package/components/Mutation/RemoveFromCart.d.ts +2 -2
  103. package/components/Mutation/RemoveFromCart.js +1 -1
  104. package/components/Mutation/RemoveFromCart.js.map +1 -1
  105. package/components/Mutation/SetQuantity.d.ts +2 -2
  106. package/components/Mutation/SetQuantity.js +1 -1
  107. package/components/Mutation/SetQuantity.js.map +1 -1
  108. package/components/Mutation/SubscribeToNewsletter.d.ts +1 -1
  109. package/components/Mutation/SubscribeToNewsletter.js +1 -1
  110. package/components/Mutation/SubscribeToNewsletter.js.map +1 -1
  111. package/components/Mutation/SubscribeToStockNotifications.d.ts +1 -1
  112. package/components/Mutation/SubscribeToStockNotifications.js +6 -2
  113. package/components/Mutation/SubscribeToStockNotifications.js.map +1 -1
  114. package/components/Mutation/cartMutationUtils.d.ts +1 -2
  115. package/components/Mutation/cartMutationUtils.js.map +1 -1
  116. package/components/Mutation/useDecrementQuantity.d.ts +1 -1
  117. package/components/Mutation/useDecrementQuantity.js +1 -1
  118. package/components/Mutation/useDecrementQuantity.js.map +1 -1
  119. package/components/Mutation/useIncrementQuantity.d.ts +1 -1
  120. package/components/Mutation/useIncrementQuantity.js +1 -1
  121. package/components/Mutation/useIncrementQuantity.js.map +1 -1
  122. package/components/Mutation/useRemoveFromCart.d.ts +1 -1
  123. package/components/Mutation/useRemoveFromCart.js +1 -1
  124. package/components/Mutation/useRemoveFromCart.js.map +1 -1
  125. package/components/Mutation/useSetQuantity.d.ts +1 -1
  126. package/components/Mutation/useSetQuantity.js +1 -1
  127. package/components/Mutation/useSetQuantity.js.map +1 -1
  128. package/components/Notifications/Notifications.d.ts +3 -3
  129. package/components/Notifications/Notifications.js +2 -3
  130. package/components/Notifications/Notifications.js.map +1 -1
  131. package/components/ProductConfigurationProvider/ProductConfigurationProvider.js +6 -6
  132. package/components/ProductConfigurationProvider/ProductConfigurationProvider.js.map +1 -1
  133. package/components/Query/CartProvider.d.ts +1 -1
  134. package/components/Query/CartProvider.js +1 -1
  135. package/components/Query/CartProvider.js.map +1 -1
  136. package/components/SortOrder/SortOrderContainer.d.ts +1 -1
  137. package/components/StructuredData/StructuredBreadcrumbData.d.ts +2 -2
  138. package/data/cache.d.ts +1 -1
  139. package/data/cache.js +26 -13
  140. package/data/cache.js.map +1 -1
  141. package/data/fragments/StockStatusFragment.gql +0 -1
  142. package/global.d.ts +55 -1
  143. package/helpers/getErrorDetail.d.ts +1 -1
  144. package/helpers/getErrorDetail.js +2 -2
  145. package/helpers/getErrorDetail.js.map +1 -1
  146. package/hooks/Filters/useBooleanFilter.d.ts +1 -1
  147. package/hooks/Filters/useBooleanFilter.js +1 -2
  148. package/hooks/Filters/useBooleanFilter.js.map +1 -1
  149. package/hooks/Filters/useFilters.d.ts +1 -1
  150. package/hooks/Filters/useFilters.js +1 -2
  151. package/hooks/Filters/useFilters.js.map +1 -1
  152. package/hooks/Filters/useListFilter.d.ts +2 -2
  153. package/hooks/Filters/useListFilter.js +1 -2
  154. package/hooks/Filters/useListFilter.js.map +1 -1
  155. package/hooks/Filters/useMultiFilter.d.ts +3 -3
  156. package/hooks/Filters/useMultiFilter.js +1 -2
  157. package/hooks/Filters/useMultiFilter.js.map +1 -1
  158. package/hooks/Filters/useRangeFilter.d.ts +2 -2
  159. package/hooks/Filters/useRangeFilter.js +1 -2
  160. package/hooks/Filters/useRangeFilter.js.map +1 -1
  161. package/hooks/Filters/useSortOrder.d.ts +6 -1
  162. package/hooks/Filters/useSortOrder.js +4 -3
  163. package/hooks/Filters/useSortOrder.js.map +1 -1
  164. package/hooks/PackageProducts/usePackageProductItem.d.ts +1 -1
  165. package/hooks/PackageProducts/usePackageProductItem.js +1 -1
  166. package/hooks/PackageProducts/usePackageProductItem.js.map +1 -1
  167. package/hooks/PackageProducts/usePackageProducts.js +17 -17
  168. package/hooks/PackageProducts/usePackageProducts.js.map +1 -1
  169. package/hooks/PackageProducts/usePackageProducts.test.js +1 -1
  170. package/hooks/ProductList/ProductListContext.js +1 -1
  171. package/hooks/ProductList/ProductListContext.js.map +1 -1
  172. package/hooks/ProductList/action-creators.d.ts +1 -1
  173. package/hooks/ProductList/index.d.ts +1 -1
  174. package/hooks/ProductList/list-transforms.js +1 -1
  175. package/hooks/ProductList/list-transforms.js.map +1 -1
  176. package/hooks/ProductList/product-list-reducer.js +1 -1
  177. package/hooks/ProductList/product-list-reducer.js.map +1 -1
  178. package/hooks/ProductList/useProductList.js +1 -1
  179. package/hooks/ProductList/useProductList.js.map +1 -1
  180. package/hooks/ProductList/useProductListItems.js +1 -1
  181. package/hooks/ProductList/useProductListItems.js.map +1 -1
  182. package/hooks/Subscriptions/useNewsletterSubscription.js +3 -3
  183. package/hooks/Subscriptions/useNewsletterSubscription.js.map +1 -1
  184. package/hooks/Subscriptions/useStockNotifications.d.ts +1 -1
  185. package/hooks/Subscriptions/useStockNotifications.js +3 -3
  186. package/hooks/Subscriptions/useStockNotifications.js.map +1 -1
  187. package/hooks/Subscriptions/useStoreSubscriptions.d.ts +1 -1
  188. package/hooks/Subscriptions/useStoreSubscriptions.js +3 -6
  189. package/hooks/Subscriptions/useStoreSubscriptions.js.map +1 -1
  190. package/hooks/Subscriptions/useStoresubscriptions.test.js +5 -7
  191. package/hooks/useAddMultipleToCart.d.ts +1 -1
  192. package/hooks/useAddMultipleToCart.js +1 -1
  193. package/hooks/useAddMultipleToCart.js.map +1 -1
  194. package/hooks/useAddMultipleToCart.test.js +1 -1
  195. package/hooks/useCustomerOrders.test.js +7 -5
  196. package/hooks/useCustomerOrdersQuery.d.ts +2 -2
  197. package/hooks/useCustomerOrdersQuery.js +1 -1
  198. package/hooks/useCustomerOrdersQuery.js.map +1 -1
  199. package/hooks/useDeleteAccountMutation.js +3 -3
  200. package/hooks/useDeleteAccountMutation.js.map +1 -1
  201. package/hooks/useInfinitePagination.d.ts +1 -1
  202. package/hooks/useInfinitePagination.js +4 -1
  203. package/hooks/useInfinitePagination.js.map +1 -1
  204. package/hooks/useLoginMutation.d.ts +3 -3
  205. package/hooks/useLoginMutation.js +2 -2
  206. package/hooks/useLoginMutation.js.map +1 -1
  207. package/hooks/useLoginRedirect.js +2 -2
  208. package/hooks/useLoginRedirect.js.map +1 -1
  209. package/hooks/useOrderDetailQuery.d.ts +3 -3
  210. package/hooks/useOrderDetailQuery.js +1 -1
  211. package/hooks/useOrderDetailQuery.js.map +1 -1
  212. package/hooks/useRoutePreload.js +1 -1
  213. package/hooks/useRoutePreload.js.map +1 -1
  214. package/hooks/useStockStatus.d.ts +8 -0
  215. package/hooks/useStockStatus.js +26 -0
  216. package/hooks/useStockStatus.js.map +1 -0
  217. package/integrations/addwishSchemaExtension.js +3 -3
  218. package/integrations/addwishSchemaExtension.js.map +1 -1
  219. package/integrations/nostoSchemaExtension.js +2 -2
  220. package/integrations/nostoSchemaExtension.js.map +1 -1
  221. package/integrations/sluggishSchemaExtension.js +1 -1
  222. package/integrations/sluggishSchemaExtension.js.map +1 -1
  223. package/package.json +10 -25
  224. package/polyfills.js +0 -2
  225. package/polyfills.js.map +1 -1
  226. package/resolvers/filters/boolFilter.js +24 -27
  227. package/resolvers/filters/boolFilter.js.map +1 -1
  228. package/resolvers/filters/filterParams.js +8 -8
  229. package/resolvers/filters/filterParams.js.map +1 -1
  230. package/resolvers/filters/filters.js +5 -5
  231. package/resolvers/filters/filters.js.map +1 -1
  232. package/resolvers/filters/index.d.ts +0 -4
  233. package/resolvers/filters/listFilter.js +24 -29
  234. package/resolvers/filters/listFilter.js.map +1 -1
  235. package/resolvers/filters/listFilterItem.js +31 -36
  236. package/resolvers/filters/listFilterItem.js.map +1 -1
  237. package/resolvers/filters/multiListFilter.js +41 -42
  238. package/resolvers/filters/multiListFilter.js.map +1 -1
  239. package/resolvers/filters/multiListFilterList.js +1 -1
  240. package/resolvers/filters/multiListFilterList.js.map +1 -1
  241. package/resolvers/filters/rangeFilter.js +27 -43
  242. package/resolvers/filters/rangeFilter.js.map +1 -1
  243. package/test-utils/ProviderPyramid.js +1 -1
  244. package/types.d.ts +1820 -1955
@@ -1 +1 @@
1
- {"version":3,"file":"AuthProvider.js","sourceRoot":"","sources":["AuthProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM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,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/react-testing';
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';
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  declare function LogOut({ logOutRedirectPath }: {
3
3
  logOutRedirectPath: string;
4
- }): JSX.Element;
4
+ }): React.JSX.Element;
5
5
  export default LogOut;
@@ -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("graphql").DocumentNode;
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,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,GAA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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,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I,CAAC,CAAA,MAAA,OAAO,CAAC,QAAQ,CAAC,KAAK,0CAAE,IAAI,CAAA,EAAE;YAC9D,OAAO,CAAC,OAAO,CACb,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBACvB,OAAO,CAAC,QAAQ,CAAC,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"}
@@ -1,5 +1,5 @@
1
1
  import React, { ComponentType } from 'react';
2
- import { 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,"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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,C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B,gBAAgB,EAAE,SAAS;gBAC3B,MAAM;gBACN,KAAK,EAAE,OAAO;aACf,IAEA,CAAC,MAAmB,EAAE,EAAE,CAAC,CACxB,oBAAC,aAAa,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,GAAI,CAC3D,CACK,CACT,CACkB,CACtB,CAC0B,CAC9B,CAAC;KACH;SAAM,IAAI,MAAM,EAAE;QACjB,OAAO,CACL,oBAAC,KAAK,IACJ,WAAW,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EACpC,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE;gBACT,EAAE,EAAE,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;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
- /// <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,qCAAqC,CAAC;AAGtE,MAAM,sBAAsB,GAAG,CAAC,EAC9B,aAAa,EAGd,EAAE,EAAE;;IACH,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,2BAA2B,EAAE;QAC9D,SAAS,EAAE,EAAE,aAAa,EAAE;QAC5B,WAAW,EAAE,KAAK;KACnB,CAAC,CAAC;IAEH,IAAI,OAAO,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,MAAM,OAAO,GAAY,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC;IAEvC,MAAM,OAAO,GACX,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW;QACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAC1B,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,aAAa,KAAK,aAAa,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AC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAC1B,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,KAAK,aAAa,CACrD,CAAC;IAEJ,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE7D,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,EAAC,CAAC,CAAC,CACrB,oBAAC,QAAQ,IAAC,EAAE,EAAE,GAAG,CAAA,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,0CAAE,YAAY,0CAAE,IAAI,IAAG,QAAQ,EAAE,GAAI,CACpE,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 'react-apollo';
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,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,mCAAmC,CAAC;AAEjE,MAAM,WAAW,GAAG,CAAC,KAAU,EAAE,MAAmB,EAAE,IAAY,EAAE,EAAE;;IACpE,IAAI,MAAM,CAAC,KAAK,EAAE;QAChB,OAAO,KAAK,CAAC;KACd;IACD,MAAM,SAAS,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC;IAC9B,MAAM,SAAS,GAAG,MAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,0CAAE,KAAK,0CAAE,MAAM,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K,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-client';
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;AAO3B,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"}
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.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,56 @@ 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
+ });
50
+ const route = (_b = (result.previousData || result.data)) === null || _b === void 0 ? void 0 : _b.route;
51
+ const data = (_d = (_c = (result.previousData || result.data)) === null || _c === void 0 ? void 0 : _c.route) === null || _d === void 0 ? void 0 : _d.object;
52
+ const resultWithFallbackData = Object.assign(Object.assign({}, result), {
53
+ // We want to show the previous data to avoid unnecessary loading states
54
+ data: result.data || result.previousData });
55
+ return (React.createElement(GenericError
56
+ // Catch routing exceptions and log the graphql result
57
+ , {
58
+ // Catch routing exceptions and log the graphql result
59
+ extraInfo: {
60
+ variables: result.variables,
61
+ data: result.data
62
+ } },
63
+ data && React.createElement(Head, { data: data, route: route }),
64
+ 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 })));
65
+ };
26
66
  const DynamicRoute = (props) => {
27
67
  throwErrorInDev(!props.routeQuery, `You forgot to pass 'routeQuery' to DynamicRoute`);
28
68
  const pagination = usePagination();
@@ -56,41 +96,5 @@ const DynamicRoute = (props) => {
56
96
  })))));
57
97
  }
58
98
  };
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
99
  export default DynamicRoute;
96
100
  //# 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,CAAC;AAE7D,OAAO,EAAiB,OAAO,IAAI,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc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/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,OAAO,SAAS,CAAC,UAAU,CAAC,CAAC;KAC9B;IAED,OAAO,WAAW,CAAC;QACjB,OAAO;QACP,QAAQ;QACR,IAAI;QACJ,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,IAAI;QACf,SAAS;KACV,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"replaceInSearch.js","sourceRoot":"","sources":["replaceInSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAEnF,OAAO,EAAE,MAAM,IAAI,CAAC;AAkBpB,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,OAAO,SAAS,CAAC,UAAU,CAAC,CAAC;KAC9B;IAED,OAAO,WAAW,CAAC;QACjB,OAAO;QACP,QAAQ;QACR,IAAI;QACJ,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,IAAI;QACf,SAAS;KACV,CAAC,CAAC;AACL,CAAC"}
@@ -10,8 +10,8 @@ export function injectFont(primaryFont, secondaryFonts) {
10
10
  primaryFontObserver.load().then(() => {
11
11
  const fontClass = createFontClass(primaryFont);
12
12
  document && document.documentElement.classList.add(fontClass);
13
- }, (err) => {
14
- console.log(`Font ${primaryFont} not available with reason: \n${err}`);
13
+ }, () => {
14
+ console.log(`Font ${primaryFont} not available`);
15
15
  });
16
16
  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KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAC1C,UAAU,CAAC;YACT,CAAC,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE;gBACjB,MAAM,SAAS,GAAG,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBAC9C,QAAQ,IAAI,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;QACL,CAAC,EACD,GAAG,EAAE;YACH,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC/C,CAAC,CACF,CAAC;KACH;AACH,CAAC"}
@@ -49,5 +49,5 @@ export interface 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;