@graphcommerce/magento-customer 4.5.2 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1526](https://github.com/graphcommerce-org/graphcommerce/pull/1526) [`98ff2334d`](https://github.com/graphcommerce-org/graphcommerce/commit/98ff2334d1b7dedb8bc56ebe6abb50836eefedd3) Thanks [@mikekeehnen](https://github.com/mikekeehnen)! - Removed form persistance for isEmailAvailableForm that prevented the user from logging in after sign up
8
+
9
+ ## 4.5.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [#1517](https://github.com/graphcommerce-org/graphcommerce/pull/1517) [`c877e438a`](https://github.com/graphcommerce-org/graphcommerce/commit/c877e438a48f30204fa3e36b611906a546e1cf5c) Thanks [@NickdeK](https://github.com/NickdeK)! - Fixed graphql error display
14
+
15
+ - Updated dependencies [[`371e6cf52`](https://github.com/graphcommerce-org/graphcommerce/commit/371e6cf52916a3b6c44192bd40cc8271bd608832), [`4143483f3`](https://github.com/graphcommerce-org/graphcommerce/commit/4143483f37c038d2bbf218be2685e27a31a35745)]:
16
+ - @graphcommerce/next-ui@4.10.0
17
+ - @graphcommerce/ecommerce-ui@1.0.20
18
+ - @graphcommerce/magento-store@4.2.11
19
+
20
+ ## 4.5.3
21
+
22
+ ### Patch Changes
23
+
24
+ - [#1511](https://github.com/graphcommerce-org/graphcommerce/pull/1511) [`8a626ecf7`](https://github.com/graphcommerce-org/graphcommerce/commit/8a626ecf7ed00c46a28088e0b9bae00a4e1ae019) Thanks [@paales](https://github.com/paales)! - make sure useCustomerQuery only runs when the user is actually logged instead of only a token
25
+
26
+ * [#1490](https://github.com/graphcommerce-org/graphcommerce/pull/1490) [`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb) Thanks [@paales](https://github.com/paales)! - upgraded packages
27
+
28
+ * Updated dependencies [[`a9213f1f5`](https://github.com/graphcommerce-org/graphcommerce/commit/a9213f1f5a410d217768386ccb6d9b5ce7bd5782), [`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb)]:
29
+ - @graphcommerce/next-ui@4.9.0
30
+ - @graphcommerce/ecommerce-ui@1.0.19
31
+ - @graphcommerce/graphql@3.2.1
32
+ - @graphcommerce/graphql-mesh@4.1.4
33
+ - @graphcommerce/image@3.1.7
34
+ - @graphcommerce/magento-graphql@3.0.14
35
+ - @graphcommerce/magento-store@4.2.10
36
+ - @graphcommerce/react-hook-form@3.2.2
37
+
3
38
  ## 4.5.2
4
39
 
5
40
  ### Patch Changes
@@ -16,14 +16,14 @@ export type ApolloCustomerErrorFullPageProps = {
16
16
 
17
17
  export function ApolloCustomerErrorFullPage(props: ApolloCustomerErrorFullPageProps) {
18
18
  const { error, icon, altButton, button, ...alertProps } = props
19
- const [, unauthorized] = useAuthorizationErrorMasked()
19
+ const [newError, unauthorized] = useAuthorizationErrorMasked()
20
20
  const { token } = useCustomerSession()
21
21
 
22
22
  return (
23
23
  <ApolloErrorFullPage
24
24
  icon={<IconSvg src={iconPerson} size='xxl' />}
25
25
  {...props}
26
- error={error}
26
+ error={newError}
27
27
  button={
28
28
  unauthorized ? (
29
29
  <PageLink href='/account/signin' passHref>
@@ -1,6 +1,6 @@
1
1
  import { ApolloErrorSnackbar, ApolloErrorSnackbarProps } from '@graphcommerce/ecommerce-ui'
2
2
  import { Trans } from '@lingui/react'
3
- import { Button, Link } from '@mui/material'
3
+ import { Button } from '@mui/material'
4
4
  import NextLink from 'next/link'
5
5
  import { useCustomerSession } from '../../hooks/useCustomerSession'
6
6
  import { useAuthorizationErrorMasked } from './useAuthorizationErrorMasked'
@@ -15,6 +15,7 @@ export function ApolloCustomerErrorSnackbar(props: ApolloCustomerErrorSnackbarPr
15
15
  return (
16
16
  <ApolloErrorSnackbar
17
17
  {...props}
18
+ error={newError}
18
19
  action={
19
20
  unauthorized ? (
20
21
  <NextLink href='/account/signin' passHref>
@@ -12,5 +12,6 @@ export function useAuthorizationErrorMasked(error?: ApolloError) {
12
12
  mask: token
13
13
  ? i18n._(/* i18n */ `Please reauthenticate and try again`)
14
14
  : i18n._(/* i18n */ `You must sign in to continue`),
15
+ extract: false,
15
16
  })
16
17
  }
@@ -6,6 +6,6 @@ export function useCustomerQuery<Q, V>(
6
6
  document: TypedDocumentNode<Q, V>,
7
7
  queryOptions: QueryHookOptions<Q, V> = {},
8
8
  ) {
9
- const { token } = useCustomerSession()
10
- return useQuery(document, { ...queryOptions, ssr: false, skip: !token })
9
+ const { loggedIn } = useCustomerSession()
10
+ return useQuery(document, { ...queryOptions, ssr: false, skip: !loggedIn })
11
11
  }
@@ -33,8 +33,6 @@ export function useFormIsEmailAvailable(props: UseFormIsEmailAvailableProps) {
33
33
  loggedIn ? 'signedin' : 'email',
34
34
  )
35
35
 
36
- useFormPersist({ form, name: 'IsEmailAvailable' })
37
-
38
36
  useEffect(() => {
39
37
  if (loggedIn) {
40
38
  setMode('signedin')
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-customer",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "4.5.2",
5
+ "version": "4.6.0",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,29 +12,29 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.1.7",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.8",
16
16
  "@graphcommerce/prettier-config-pwa": "^4.0.6",
17
17
  "@graphcommerce/typescript-config-pwa": "^4.0.3",
18
18
  "@playwright/test": "^1.21.1",
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/ecommerce-ui": "1.0.18",
23
- "@graphcommerce/graphql": "3.2.0",
24
- "@graphcommerce/graphql-mesh": "4.1.3",
25
- "@graphcommerce/image": "3.1.6",
26
- "@graphcommerce/magento-graphql": "3.0.13",
27
- "@graphcommerce/magento-store": "4.2.9",
28
- "@graphcommerce/next-ui": "4.8.4",
29
- "@graphcommerce/react-hook-form": "3.2.1"
22
+ "@graphcommerce/ecommerce-ui": "1.0.20",
23
+ "@graphcommerce/graphql": "3.2.1",
24
+ "@graphcommerce/graphql-mesh": "4.1.4",
25
+ "@graphcommerce/image": "3.1.7",
26
+ "@graphcommerce/magento-graphql": "3.0.14",
27
+ "@graphcommerce/magento-store": "4.2.11",
28
+ "@graphcommerce/next-ui": "4.10.0",
29
+ "@graphcommerce/react-hook-form": "3.2.2"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@lingui/react": "^3.13.2",
33
33
  "@lingui/core": "^3.13.2",
34
34
  "@mui/material": "5.5.3",
35
35
  "framer-motion": "^6.2.4",
36
- "next": "12.1.2",
37
- "react": "^17.0.2",
38
- "react-dom": "^17.0.2"
36
+ "next": "^12.1.2",
37
+ "react": "^18.0.0",
38
+ "react-dom": "^18.0.0"
39
39
  }
40
40
  }