@jetshop/core 5.17.0-alpha.3b695f5e → 5.17.0-alpha.3d8a8c39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (250) 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/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 +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/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 +63 -12
  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 +13 -29
  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
  245. package/components/Fonts/GoogleFont.d.ts +0 -10
  246. package/components/Fonts/GoogleFont.js +0 -35
  247. package/components/Fonts/GoogleFont.js.map +0 -1
  248. package/components/Fonts/TypekitFont.d.ts +0 -16
  249. package/components/Fonts/TypekitFont.js +0 -25
  250. package/components/Fonts/TypekitFont.js.map +0 -1
@@ -10,9 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import React from 'react';
11
11
  import { useAddToCart } from './useAddToCart';
12
12
  import { FormikProvider } from 'formik';
13
- import { useApolloClient, useMutation } from '@apollo/react-hooks';
13
+ import { useApolloClient, useMutation } from '@apollo/client';
14
14
  import { addToCartError, addToCartSuccess, useTrackProductAdd } from '../components/Mutation/AddToCart/addToCartUtils';
15
- import { uniqueId } from 'lodash';
15
+ import uniqueId from '@jetshop/core/helpers/uniqueId';
16
16
  import { getAddToCartOptimisticResponse } from '../components/Mutation/cartMutationUtils';
17
17
  import { useCartId } from '../components/Cart/CartIdContext';
18
18
  export function AddToCartFormik({ product, variant, commentValidators = {}, getMissingOptions, initialValues,
@@ -1 +1 @@
1
- {"version":3,"file":"AddToCartFormik.js","sourceRoot":"","sources":["AddToCartFormik.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAmB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAe,MAAM,QAAQ,CAAC;AAWrD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AA6C7D,MAAM,UAAU,eAAe,CAAC,EAC9B,OAAO,EACP,OAAO,EACP,iBAAiB,GAAG,EAAE,EACtB,iBAAiB,EACjB,aAAa;AACb,wBAAwB;AACxB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,YAAY;AACZ,4CAA4C;AAC5C,QAAQ,EACa;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AAe,eAAe,CAAC"}
@@ -70,7 +70,7 @@ export declare function useAddToCart({ product, variant, submit, commentValidato
70
70
  dirty: boolean;
71
71
  unregisterField: (name: string) => void;
72
72
  registerField: (name: string, { validate }: any) => void;
73
- getFieldProps: (nameOrOptions: any) => import("formik").FieldInputProps<any>;
73
+ getFieldProps: (nameOrOptions: string | import("formik").FieldConfig<any>) => import("formik").FieldInputProps<any>;
74
74
  getFieldMeta: (name: string) => import("formik").FieldMetaProps<any>;
75
75
  getFieldHelpers: (name: string) => import("formik").FieldHelperProps<any>;
76
76
  validateOnBlur: boolean;
@@ -3,11 +3,8 @@ import { FormikProps } from 'formik';
3
3
  import React from 'react';
4
4
  type ForgotPasswordFormik = FormikProps<MutationRequestPasswordResetArgs>;
5
5
  interface ForgotPasswordProps {
6
- children(args: {
7
- formik: ForgotPasswordFormik;
8
- }): React.ReactChild;
6
+ children: any;
9
7
  }
10
- export declare function ForgotPasswordProvider(props: ForgotPasswordProps): JSX.Element;
11
8
  export declare const ForgotPasswordContext: React.Context<{
12
9
  formik: ForgotPasswordFormik;
13
10
  }>;
@@ -29,7 +26,7 @@ export declare function useForgotPasswordData(): {
29
26
  setSubmitting: (isSubmitting: boolean) => void;
30
27
  setTouched: (touched: import("formik").FormikTouched<MutationRequestPasswordResetArgs>, shouldValidate?: boolean) => void;
31
28
  setValues: (values: React.SetStateAction<MutationRequestPasswordResetArgs>, shouldValidate?: boolean) => void;
32
- setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void;
29
+ setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | import("formik").FormikErrors<MutationRequestPasswordResetArgs>>;
33
30
  setFieldError: (field: string, message: string) => void;
34
31
  setFieldTouched: (field: string, isTouched?: boolean, shouldValidate?: boolean) => void;
35
32
  validateForm: (values?: any) => Promise<import("formik").FormikErrors<MutationRequestPasswordResetArgs>>;
@@ -47,7 +44,7 @@ export declare function useForgotPasswordData(): {
47
44
  (e: React.ChangeEvent<any>): void;
48
45
  <T_1 = string | React.ChangeEvent<any>>(field: T_1): T_1 extends React.ChangeEvent<any> ? void : (e: string | React.ChangeEvent<any>) => void;
49
46
  };
50
- getFieldProps: <Value = any>(props: any) => import("formik").FieldInputProps<Value>;
47
+ getFieldProps: <Value = any>(props: string | import("formik").FieldConfig<Value>) => import("formik").FieldInputProps<Value>;
51
48
  getFieldMeta: <Value_1>(name: string) => import("formik").FieldMetaProps<Value_1>;
52
49
  getFieldHelpers: <Value_2 = any>(name: string) => import("formik").FieldHelperProps<Value_2>;
53
50
  dirty: boolean;
@@ -68,4 +65,5 @@ export declare function useForgotPasswordData(): {
68
65
  required: boolean;
69
66
  };
70
67
  };
68
+ export declare function ForgotPasswordProvider(props: ForgotPasswordProps): React.JSX.Element;
71
69
  export {};
@@ -2,9 +2,24 @@ import { resetRequest } from '@jetshop/core/data/mutations/accountMutations.gql'
2
2
  import t from '@jetshop/intl';
3
3
  import { Form, Formik } from 'formik';
4
4
  import React from 'react';
5
- import { useMutation } from '@apollo/react-hooks';
5
+ import { useMutation } from '@apollo/client';
6
+ export const ForgotPasswordContext = React.createContext(undefined);
7
+ export function useForgotPasswordData() {
8
+ var _a, _b;
9
+ const { formik } = React.useContext(ForgotPasswordContext);
10
+ const submitted = (_a = formik === null || formik === void 0 ? void 0 : formik.status) === null || _a === void 0 ? void 0 : _a.success;
11
+ const globalError = (_b = formik === null || formik === void 0 ? void 0 : formik.status) === null || _b === void 0 ? void 0 : _b.globalError;
12
+ const emailInputProps = {
13
+ type: 'email',
14
+ name: 'email',
15
+ required: true
16
+ };
17
+ return Object.assign({ submitted,
18
+ globalError,
19
+ emailInputProps }, formik);
20
+ }
6
21
  function validate(values) {
7
- let errors = {};
22
+ const errors = {};
8
23
  if (!values.email) {
9
24
  errors['email'] = t('This field is required');
10
25
  }
@@ -15,7 +30,7 @@ function validate(values) {
15
30
  }
16
31
  function handleMutationError(actions) {
17
32
  actions.setStatus({
18
- globalError: t('Something went wrong. Please check your input, or try again later.'),
33
+ globalError: t('Something went wrong. Please check your input, or try again later.')
19
34
  });
20
35
  actions.setSubmitting(false);
21
36
  }
@@ -39,19 +54,4 @@ export function ForgotPasswordProvider(props) {
39
54
  } }, (formik) => (React.createElement(Form, null,
40
55
  React.createElement(ForgotPasswordContext.Provider, Object.assign({ value: { formik } }, props))))));
41
56
  }
42
- export const ForgotPasswordContext = React.createContext(undefined);
43
- export function useForgotPasswordData() {
44
- var _a, _b;
45
- const { formik } = React.useContext(ForgotPasswordContext);
46
- const submitted = (_a = formik === null || formik === void 0 ? void 0 : formik.status) === null || _a === void 0 ? void 0 : _a.success;
47
- const globalError = (_b = formik === null || formik === void 0 ? void 0 : formik.status) === null || _b === void 0 ? void 0 : _b.globalError;
48
- const emailInputProps = {
49
- type: 'email',
50
- name: 'email',
51
- required: true,
52
- };
53
- return Object.assign({ submitted,
54
- globalError,
55
- emailInputProps }, formik);
56
- }
57
57
  //# sourceMappingURL=ForgotPasswordProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ForgotPasswordProvider.js","sourceRoot":"","sources":["ForgotPasswordProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AAKjF,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,EAA8B,MAAM,QAAQ,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAQlD,SAAS,QAAQ,CAAC,MAAyB;IACzC,IAAI,MAAM,GAAuB,EAAE,CAAC;IAEpC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;QACjB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,wBAAwB,CAAC,CAAC;KAC/C;IAED,IAAI,CAAC,2CAA2C,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QACnE,MAAM,CAAC,OAAO,CAAC,GAAG,C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E,EAAE;gBACb,IAAI,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE;oBAC1C,OAAO,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;oBACrC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;iBAC9B;qBAAM;oBACL,mBAAmB,CAAC,OAAO,CAAC,CAAC;iBAC9B;YACH,CAAC,CAAC;iBACD,KAAK,CAAC,GAAG,EAAE;gBACV,mBAAmB,CAAC,OAAO,CAAC,CAAC;YAC/B,CAAC,CAAC,CAAC;QACP,CAAC,IAEA,CAAC,MAAM,EAAE,EAAE,CAAC,CACX,oBAAC,IAAI;QACH,oBAAC,qBAAqB,CAAC,QAAQ,kBAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAM,KAAK,EAAI,CAC3D,CACR,CACM,CACV,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const ResetPasswordProvider: React.ComponentClass<Pick<import("react-router").RouteComponentProps<any, import("react-router").StaticContext, H.LocationState>, never>, any> & import("react-router").WithRouterStatics<(props: React.PropsWithChildren<import("react-router").RouteComponentProps<any, import("react-router").StaticContext, H.LocationState>>) => JSX.Element>;
2
+ export declare const ResetPasswordProvider: React.ComponentClass<Pick<any, string | number | symbol>, any> & import("react-router").WithRouterStatics<(props: any) => React.JSX.Element>;
3
3
  export declare function useResetPasswordForm(): {
4
4
  passwordInputProps: {
5
5
  required: boolean;
@@ -38,7 +38,9 @@ export declare function useResetPasswordForm(): {
38
38
  setValues: (values: React.SetStateAction<{
39
39
  newPassword: string;
40
40
  }>, shouldValidate?: boolean) => void;
41
- setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void;
41
+ setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | import("formik").FormikErrors<{
42
+ newPassword: string;
43
+ }>>;
42
44
  setFieldError: (field: string, message: string) => void;
43
45
  setFieldTouched: (field: string, isTouched?: boolean, shouldValidate?: boolean) => void;
44
46
  validateForm: (values?: any) => Promise<import("formik").FormikErrors<{
@@ -66,7 +68,7 @@ export declare function useResetPasswordForm(): {
66
68
  (e: React.ChangeEvent<any>): void;
67
69
  <T_1 = string | React.ChangeEvent<any>>(field: T_1): T_1 extends React.ChangeEvent<any> ? void : (e: string | React.ChangeEvent<any>) => void;
68
70
  };
69
- getFieldProps: <Value = any>(props: any) => import("formik").FieldInputProps<Value>;
71
+ getFieldProps: <Value = any>(props: string | import("formik").FieldConfig<Value>) => import("formik").FieldInputProps<Value>;
70
72
  getFieldMeta: <Value_1>(name: string) => import("formik").FieldMetaProps<Value_1>;
71
73
  getFieldHelpers: <Value_2 = any>(name: string) => import("formik").FieldHelperProps<Value_2>;
72
74
  dirty: boolean;
@@ -2,7 +2,7 @@ import { resetPassword } from '@jetshop/core/data/mutations/accountMutations.gql
2
2
  import t from '@jetshop/intl';
3
3
  import { Form, Formik } from 'formik';
4
4
  import React, { useContext } from 'react';
5
- import { useMutation } from '@apollo/react-hooks';
5
+ import { useMutation } from '@apollo/client';
6
6
  import { Redirect, withRouter } from 'react-router';
7
7
  import getErrorDetail from '../../helpers/getErrorDetail';
8
8
  import throwErrorInDev from '../../helpers/throwErrorInDev';
@@ -1 +1 @@
1
- {"version":3,"file":"ResetPasswordProvider.js","sourceRoot":"","sources":["ResetPasswordProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAClF,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AACnD,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,cAAc,MAAM,8BAA8B,CAAC;A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getErrorDetail from '@jetshop/core/helpers/getErrorDetail';
2
2
  import t from '@jetshop/intl';
3
3
  import { Formik } from 'formik';
4
4
  import React, { useContext } from 'react';
5
- import { ApolloConsumer } from 'react-apollo';
5
+ import { ApolloConsumer } from '@apollo/client';
6
6
  import { LookupDispatch } from './SSNLookupContainer';
7
7
  import PersonLookupQuery from '@jetshop/core/data/queries/PersonLookupQuery.gql';
8
8
  const SSNField = function SSNField(props) {
9
9
  const dispatch = useContext(LookupDispatch);
10
- return (React.createElement(ApolloConsumer, null, client => {
10
+ return (React.createElement(ApolloConsumer, null, (client) => {
11
11
  return (React.createElement(Formik, { onSubmit: (values, formik) => {
12
12
  client
13
13
  .query({
@@ -20,7 +20,7 @@ const SSNField = function SSNField(props) {
20
20
  formik.setSubmitting(false);
21
21
  props.onSuccess();
22
22
  dispatch({ type: 'set', payload: resp.data.personLookup });
23
- }, error => {
23
+ }, (error) => {
24
24
  const errorMessage = getErrorDetail(error).codes[0].includes('PersonLookupFailed')
25
25
  ? t('Person lookup failed.')
26
26
  : t('Something went wrong, please try again!');
@@ -28,7 +28,7 @@ const SSNField = function SSNField(props) {
28
28
  dispatch({ type: 'reset' });
29
29
  formik.setErrors({ ssn: errorMessage });
30
30
  });
31
- }, initialValues: { ssn: '' } }, formik => props.children({ formik })));
31
+ }, initialValues: { ssn: '' } }, (formik) => props.children({ formik })));
32
32
  }));
33
33
  };
34
34
  export default SSNField;
@@ -1 +1 @@
1
- {"version":3,"file":"SSN.js","sourceRoot":"","sources":["SSN.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,sCAAsC,CAAC;AAClE,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM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cAAc,CACjC,KAAK,CACN,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;wBACvC,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC;wBAC5B,CAAC,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC;oBAEjD,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;oBAC5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;oBAC5B,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAC;gBAC1C,CAAC,CACF,CAAC;YACN,CAAC,EACD,aAAa,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAEzB,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,CAChC,CACV,CAAC;IACJ,CAAC,CACc,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,19 +1,16 @@
1
1
  import { SignUpInput, MaskedProperty } from '@jetshop/core/types';
2
- import { FormikProps } from 'formik';
3
2
  import React from 'react';
4
3
  import { SignUpFormInput } from './formatSignupInput';
5
4
  type LookupData = {
6
5
  [key: string]: MaskedProperty;
7
6
  };
8
7
  interface SignupFormProps {
9
- children(args: {
10
- formik: FormikProps<SignUpInput>;
11
- }): React.ReactChild;
8
+ children: any;
12
9
  lookupData: LookupData;
13
10
  additionalFormatter?: (values: SignUpFormInput) => SignUpInput;
14
11
  additionalInitialValues?: Partial<SignUpFormInput>;
15
12
  }
16
13
  declare function SignupFormProvider({ LoadingComponent, ...props }: SignupFormProps & {
17
14
  LoadingComponent?: JSX.Element;
18
- }): JSX.Element;
15
+ }): React.JSX.Element;
19
16
  export default SignupFormProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"SignupFormContainer.js","sourceRoot":"","sources":["SignupFormContainer.tsx"],"names":[],"mappings":";;;;;;;;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,UAAU,oBAAK,KAAK,GAClB,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CACf,oBAAC,IAAI;YACH,oBAAC,mBAAmB,CAAC,QAAQ,kBAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAM,KAAK,EAAI,CACzD,CACR,CACU,CACE,CAClB,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC"}
@@ -3,7 +3,7 @@ import logError from '@jetshop/core/helpers/logError';
3
3
  import t from '@jetshop/intl';
4
4
  import { Form, Formik } from 'formik';
5
5
  import React from 'react';
6
- import { useMutation } from '@apollo/react-hooks';
6
+ import { useMutation } from '@apollo/client';
7
7
  import { createValidatorForFields } from './formFieldsFromSettings';
8
8
  import { useCustomerQuery } from './useCustomer';
9
9
  import GetCustomerCountryCode from '@jetshop/core/data/queries/GetCustomerCountryCode.gql';
@@ -35,14 +35,14 @@ export const UpdatePasswordProvider = ({ render, onSubmitSuccess }) => {
35
35
  query: GetCustomerCountryCode
36
36
  });
37
37
  const passwordField = countrySettings &&
38
- countrySettings.privateCustomerFields.find(field => field.name === 'password');
38
+ countrySettings.privateCustomerFields.find((field) => field.name === 'password');
39
39
  // Combine validation from the API with our own validation
40
40
  const validator = createValidatorForFields([
41
41
  passwordField,
42
42
  { id: 'oldPassword', name: 'oldPassword', required: true },
43
43
  { id: 'newPasswordRepeat', name: 'newPasswordRepeat', required: true }
44
44
  ], {
45
- getFieldName: name => {
45
+ getFieldName: (name) => {
46
46
  if (name === 'password') {
47
47
  return 'newPassword';
48
48
  }
@@ -68,14 +68,14 @@ export const UpdatePasswordProvider = ({ render, onSubmitSuccess }) => {
68
68
  typeof onSubmitSuccess === 'function' && onSubmitSuccess();
69
69
  actions.setStatus({ success: true });
70
70
  })
71
- .catch(err => {
71
+ .catch((err) => {
72
72
  logError(true, err);
73
73
  actions.setSubmitting(false);
74
74
  actions.setStatus({
75
75
  globalError: t('Something went wrong updating password. Is your old password correct?')
76
76
  });
77
77
  });
78
- }, render: props => {
78
+ }, render: (props) => {
79
79
  var _a, _b;
80
80
  return (React.createElement(Form, null, render(Object.assign(Object.assign({}, props), { inputProps, submitted: (_a = props === null || props === void 0 ? void 0 : props.status) === null || _a === void 0 ? void 0 : _a.success, globalError: (_b = props === null || props === void 0 ? void 0 : props.status) === null || _b === void 0 ? void 0 : _b.globalError }))));
81
81
  } }));
@@ -87,7 +87,7 @@ export function useUpdatePasswordMutation() {
87
87
  .then(() => mutate({
88
88
  variables
89
89
  }))
90
- .then(res => {
90
+ .then((res) => {
91
91
  if (!res.data.updatePassword.success) {
92
92
  // This should never happen as mutation itself fails
93
93
  throw new Error('Something went wrong');
@@ -1 +1 @@
1
- {"version":3,"file":"UpdatePasswordForm.js","sourceRoot":"","sources":["UpdatePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AACrF,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AAEtD,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AACnD,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,sBAAsB,MAAM,uDAAuD,CAAC;AAc3F,MAAM,UAAU,GAAG;IACjB,WAAW,EAAE;QACX,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,kBAAkB;KACjC;IACD,WAAW,EAAE;QACX,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,cAAc;KAC7B;IACD,cAAc,EAAE;QACd,IAAI,EAAE,UAAU;QAChB,IAAI,E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aACA,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;gBACpC,oDAAoD;gBACpD,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACJ,CAAC"}
@@ -6,7 +6,7 @@ export interface EnhancedCustomerField extends CustomerField {
6
6
  label: string;
7
7
  placeholder?: string;
8
8
  }
9
- type SignupContext = {
9
+ type ISignupContext = {
10
10
  isUserTypeBusiness: boolean;
11
11
  billingAddressFields: EnhancedCustomerField[];
12
12
  loginFields: EnhancedCustomerField[];
@@ -27,7 +27,7 @@ export declare const SignupContext: React.Context<{
27
27
  loading: boolean;
28
28
  }>;
29
29
  declare const SignupProvider: React.FC<{
30
- value?: SignupContext;
30
+ value?: ISignupContext;
31
31
  LoadingComponent?: JSX.Element;
32
32
  }>;
33
33
  export declare const SignupFormikContext: React.Context<{
@@ -30,7 +30,7 @@ const SignupProvider = function SignupContextProvider(_a) {
30
30
  const [country, setCountry] = React.useState(selectedChannel.country);
31
31
  const { countrySettings, loading } = useCountrySettings();
32
32
  const selectedCountrySettings = countrySettings &&
33
- countrySettings.find(c => c.countryCode === country.code);
33
+ countrySettings.find((c) => c.countryCode === country.code);
34
34
  // Get all the billing address fields from the country settings
35
35
  const { allFields, billingAddressFields, loginFields } = !loading
36
36
  ? formFieldsFromSettings(selectedCountrySettings, isUserTypeBusiness)
@@ -63,8 +63,7 @@ const SignupProvider = function SignupContextProvider(_a) {
63
63
  if (loading) {
64
64
  return LoadingComponent || null;
65
65
  }
66
- else
67
- return React.createElement(SignupContext.Provider, Object.assign({ value: value }, props));
66
+ return React.createElement(SignupContext.Provider, Object.assign({ value: value }, props));
68
67
  };
69
68
  // Holds formik state
70
69
  export const SignupFormikContext = React.createContext(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"signup-context.js","sourceRoot":"","sources":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EAAE;QACD,oBAAoB;QACpB,WAAW;QACX,SAAS;QACT,OAAO;QACP,eAAe,CAAC,SAAS;QACzB,OAAO;QACP,kBAAkB;KACnB,CAAC,CAAC;IAEH,IAAI,OAAO,EAAE;QACX,OAAO,gBAAgB,IAAI,IAAI,CAAC;KACjC;IACD,OAAO,oBAAC,aAAa,CAAC,QAAQ,kBAAC,KAAK,EAAE,KAAK,IAAM,KAAK,EAAI,CAAC;AAC7D,CAAC,CAAC;AAEF,qBAAqB;AACrB,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAEnD,SAAS,CAAC,CAAC;AAEd,eAAe,cAAc,CAAC"}
@@ -2,7 +2,7 @@ import { formatSignupInput } from '@jetshop/core/components/Auth/formatSignupInp
2
2
  import useAuth from '@jetshop/core/components/AuthContext/useAuth';
3
3
  import SignupMutation from '@jetshop/core/data/mutations/signup.gql';
4
4
  import getErrorDetail from '@jetshop/core/helpers/getErrorDetail';
5
- import { useApolloClient, useMutation } from '@apollo/react-hooks';
5
+ import { useApolloClient, useMutation } from '@apollo/client';
6
6
  import { useContext } from 'react';
7
7
  import { SignupContext } from './signup-context';
8
8
  import { trackRegisterEvent } from '../../analytics/tracking';
@@ -23,7 +23,7 @@ export function useSignupSubmit() {
23
23
  })
24
24
  }
25
25
  })
26
- .then(resp => {
26
+ .then((resp) => {
27
27
  // Submitting is done
28
28
  actions.setSubmitting(false);
29
29
  // Track user register in GTAG
@@ -33,7 +33,7 @@ export function useSignupSubmit() {
33
33
  // Log the user in with the token from signup
34
34
  logIn(resp.data.signUp.token.value);
35
35
  });
36
- }, error => {
36
+ }, (error) => {
37
37
  const errorDetail = getErrorDetail(error);
38
38
  const validationDetails = getvalidationDetails(errorDetail);
39
39
  // Submitting is done
@@ -43,7 +43,7 @@ export function useSignupSubmit() {
43
43
  isSignupError: true
44
44
  });
45
45
  })
46
- .catch(err => {
46
+ .catch((err) => {
47
47
  console.log(err);
48
48
  actions.setSubmitting(false);
49
49
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CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACL,CAAC,EACD,CAAC,KAAK,EAAE,EAAE;YACR,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;YAC1C,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;YAE5D,qBAAqB;YACrB,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAE7B,OAAO,CAAC,SAAS,CAAC;gBAChB,iBAAiB;gBACjB,aAAa,EAAE,IAAI;aACpB,CAAC,CAAC;QACL,CAAC,CACF;aACA,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,WAAwB;IACpD,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,MAAM,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACzB,CAAC"}
@@ -10,7 +10,7 @@ export default function useAddressFields() {
10
10
  // Change the selected country by country code
11
11
  // This will change the fields and validations based on that country's settings
12
12
  const setCountryByCode = React.useCallback((countryCode) => {
13
- const country = countries.find(c => c.code === countryCode);
13
+ const country = countries.find((c) => c.code === countryCode);
14
14
  if (!country)
15
15
  return;
16
16
  setCountry(country);
@@ -18,8 +18,8 @@ export default function useAddressFields() {
18
18
  // Filter out the country field from the billing address fields, as it is handled separately
19
19
  // See: Countries.tsx
20
20
  const fields = billingAddressFields
21
- .filter(f => f.name !== 'country')
22
- .map(field => {
21
+ .filter((f) => f.name !== 'country')
22
+ .map((field) => {
23
23
  return Object.assign(Object.assign({}, field), { inputProps: {
24
24
  key: field.id,
25
25
  type: field.type,
@@ -1 +1 @@
1
- {"version":3,"file":"useAddressFields.js","sourceRoot":"","sources":["useAddressFields.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,OAAO,UAAU,gBAAgB;IACtC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEhD,2EAA2E;IAC3E,iCAAiC;IACjC,eAAe,CACb,OAAO,OAAO,KAAK,WAAW,EAC9B,qEAAqE,CACtE,CAAC;IAEF,MAAM,EAAE,oBAAoB,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAEhE,8CAA8C;IAC9C,+EAA+E;IAC/E,MAAM,gBAAgB,GAAG,KAAK,CAAC,WAAW,CACxC,CAAC,WAAmB,EAAE,EAAE;QACtB,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;QAE5D,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,UAAU,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC,EACD,CAAC,SAAS,EAAE,UAAU,CAAC,CACxB,CAAC;IAEF,4FAA4F;IAC5F,qBAAqB;IACrB,MAAM,MAAM,GAAG,oBAAoB;SAChC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC;SACjC,GAAG,CAAC,KAAK,CAAC,EAAE;QACX,uCACK,KAAK,KACR,UAAU,EAAE;gBACV,GAAG,EAAE,KAAK,CAAC,EAAE;gBACb,IAAI,EAA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ACnC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,uCACK,KAAK,KACR,UAAU,EAAE;gBACV,GAAG,EAAE,KAAK,CAAC,EAAE;gBACb,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;aACzB,IACD;IACJ,CAAC,CAAC,CAAC;IAEL,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AACjD,CAAC"}
@@ -3,11 +3,13 @@ import { render, fireEvent, waitForElement } from '@testing-library/react';
3
3
  import useAddressFields from './useAddressFields';
4
4
  import ChannelContext from '@jetshop/core/components/ChannelContext';
5
5
  import SignupProvider from './signup-context';
6
- import { ApolloClient } from 'apollo-client';
7
- import { MockLink } from 'apollo-link-mock';
8
- import { ApolloProvider } from 'react-apollo';
9
- import { InMemoryCache } from 'apollo-cache-inmemory';
10
- import gql from 'graphql-tag';
6
+ import {
7
+ ApolloClient,
8
+ ApolloProvider,
9
+ InMemoryCache,
10
+ gql
11
+ } from '@apollo/client';
12
+ import { MockLink } from '@apollo/client';
11
13
 
12
14
  const fields = [
13
15
  {
@@ -69,7 +71,7 @@ describe('useAddressFields', () => {
69
71
  const testFields = await waitForElement(() => getAllByTestId('field'));
70
72
 
71
73
  expect(testFields).toHaveLength(2);
72
- testFields.map(field => expect(field.id).not.toBe('country'));
74
+ testFields.map((field) => expect(field.id).not.toBe('country'));
73
75
  });
74
76
 
75
77
  it('changes the form fields based on selected country', async () => {
@@ -270,7 +272,7 @@ function Wrapper() {
270
272
  return (
271
273
  <>
272
274
  <div>
273
- {fields.map(field => (
275
+ {fields.map((field) => (
274
276
  <span data-testid="field" key={field.name}>
275
277
  {field.name}
276
278
  </span>
@@ -284,7 +286,7 @@ function Wrapper() {
284
286
  Set country from form
285
287
  </button>
286
288
 
287
- {countries.map(country => (
289
+ {countries.map((country) => (
288
290
  <span data-testid="country" key={country.id}>
289
291
  {country.code}
290
292
  </span>
@@ -77,13 +77,13 @@ export declare function useCustomerQuery({ query, deliveryAddressId }: {
77
77
  query: DocumentNode;
78
78
  deliveryAddressId?: number;
79
79
  }): {
80
- refetch: (variables?: import("react-apollo").OperationVariables) => Promise<import("apollo-client").ApolloQueryResult<{
80
+ refetch: (variables?: Partial<import("@apollo/client").OperationVariables>) => Promise<import("@apollo/client").ApolloQueryResult<{
81
81
  customer: Query['customer'] & {
82
82
  __typename: 'BusinessCustomer' | 'PrivateCustomer';
83
83
  };
84
84
  }>>;
85
85
  loading: boolean;
86
- error: import("apollo-client").ApolloError;
86
+ error: import("@apollo/client").ApolloError;
87
87
  customer: Customer & {
88
88
  __typename: 'BusinessCustomer' | 'PrivateCustomer';
89
89
  };
@@ -13,7 +13,7 @@ import ChannelContext from '@jetshop/core/components/ChannelContext';
13
13
  import UpdateCustomerMutation from '@jetshop/core/data/mutations/updateCustomer.gql';
14
14
  import logError from '@jetshop/core/helpers/logError';
15
15
  import { useCallback, useContext, useEffect, useMemo, useState } from 'react';
16
- import { useMutation, useQuery } from '@apollo/react-hooks';
16
+ import { useMutation, useQuery } from '@apollo/client';
17
17
  import { translations } from './signup-field-translations';
18
18
  import { useCountrySettings } from '../ChannelContext/useCountrySettings';
19
19
  export function customerAddressToCustomerUpdateAddressInput({ address, isDeleteId = false, countryCode }) {
@@ -1 +1 @@
1
- {"version":3,"file":"useCustomer.js","sourceRoot":"","sources":["useCustomer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,cAAc,MAAM,yCAAyC,CAAC;AACrE,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AACrF,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AAiBtD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,QAAQ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AAC,CAAC;IACtB,CAAC,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { useApolloClient } from 'react-apollo';
1
+ import { useApolloClient } from '@apollo/client';
2
2
  import React, { useContext, useEffect } from 'react';
3
3
  import AuthContext from './AuthContext';
4
4
  import { withCookies } from 'react-cookie';
@@ -7,7 +7,7 @@ import ChannelContext from '@jetshop/core/components/ChannelContext';
7
7
  import { useShopConfig } from '../../hooks/useShopConfig';
8
8
  import { trackUserEvent } from '../../analytics/tracking';
9
9
  import { useTracker } from '../../analytics/Analytics';
10
- import { useQuery } from '@apollo/react-hooks';
10
+ import { useQuery } from '@apollo/client';
11
11
  import googleUserIdQuery from './googleUserIdQuery.gql';
12
12
  const AuthProvider = function AuthProvider(props) {
13
13
  var _a, _b;