@graphcommerce/magento-customer 9.0.0-canary.73 → 9.0.0-canary.75

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,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.0-canary.75
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2352](https://github.com/graphcommerce-org/graphcommerce/pull/2352) [`8ace660`](https://github.com/graphcommerce-org/graphcommerce/commit/8ace660addf25eacb49376eceb5e3bfc351a2c57) - Add disableMargin prop to WaitForCustomer component ([@JoshuaS98](https://github.com/JoshuaS98))
8
+
9
+ ## 9.0.0-canary.74
10
+
3
11
  ## 9.0.0-canary.73
4
12
 
5
13
  ## 9.0.0-canary.72
@@ -1,16 +1,17 @@
1
1
  import { mergeErrors, WaitForQueries, WaitForQueriesProps } from '@graphcommerce/ecommerce-ui'
2
- import { FullPageMessage, IconSvg, iconPerson } from '@graphcommerce/next-ui'
2
+ import { FullPageMessage, FullPageMessageProps, IconSvg, iconPerson } from '@graphcommerce/next-ui'
3
3
  import { Trans } from '@lingui/react'
4
4
  import { Button, CircularProgress } from '@mui/material'
5
5
  import React from 'react'
6
6
  import { useCustomerSession } from '../../hooks/useCustomerSession'
7
7
  import { ApolloCustomerErrorFullPage } from '../ApolloCustomerError/ApolloCustomerErrorFullPage'
8
8
 
9
- type WaitForCustomerProps = Omit<WaitForQueriesProps, 'fallback' | 'waitFor'> & {
10
- waitFor?: WaitForQueriesProps['waitFor']
11
- fallback?: React.ReactNode
12
- unauthenticated?: React.ReactNode
13
- }
9
+ type WaitForCustomerProps = Omit<WaitForQueriesProps, 'fallback' | 'waitFor'> &
10
+ Pick<FullPageMessageProps, 'disableMargin'> & {
11
+ waitFor?: WaitForQueriesProps['waitFor']
12
+ fallback?: React.ReactNode
13
+ unauthenticated?: React.ReactNode
14
+ }
14
15
 
15
16
  export function nonNullable<T>(value: T): value is NonNullable<T> {
16
17
  return value !== null && value !== undefined
@@ -39,7 +40,7 @@ export function nonNullable<T>(value: T): value is NonNullable<T> {
39
40
  * ```
40
41
  */
41
42
  export function WaitForCustomer(props: WaitForCustomerProps) {
42
- const { waitFor = [], children, fallback, unauthenticated } = props
43
+ const { waitFor = [], children, fallback, unauthenticated, disableMargin } = props
43
44
 
44
45
  const session = useCustomerSession()
45
46
  const queries = Array.isArray(waitFor) ? waitFor : [waitFor]
@@ -52,7 +53,11 @@ export function WaitForCustomer(props: WaitForCustomerProps) {
52
53
  waitFor={!session.loggedIn ? session.query : queries}
53
54
  fallback={
54
55
  fallback ?? (
55
- <FullPageMessage icon={<CircularProgress />} title={<Trans id='Loading your data' />}>
56
+ <FullPageMessage
57
+ icon={<CircularProgress />}
58
+ title={<Trans id='Loading your data' />}
59
+ disableMargin={disableMargin}
60
+ >
56
61
  <Trans id='This may take a second' />
57
62
  </FullPageMessage>
58
63
  )
@@ -72,6 +77,7 @@ export function WaitForCustomer(props: WaitForCustomerProps) {
72
77
  )}
73
78
  </Button>
74
79
  }
80
+ disableMargin={disableMargin}
75
81
  />
76
82
  ))}
77
83
  {session.loggedIn && error && <ApolloCustomerErrorFullPage error={error} />}
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": "9.0.0-canary.73",
5
+ "version": "9.0.0-canary.75",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,19 +12,19 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^9.0.0-canary.73",
16
- "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.73",
17
- "@graphcommerce/framer-next-pages": "^9.0.0-canary.73",
18
- "@graphcommerce/framer-utils": "^9.0.0-canary.73",
19
- "@graphcommerce/graphql": "^9.0.0-canary.73",
20
- "@graphcommerce/graphql-mesh": "^9.0.0-canary.73",
21
- "@graphcommerce/image": "^9.0.0-canary.73",
22
- "@graphcommerce/magento-graphql": "^9.0.0-canary.73",
23
- "@graphcommerce/magento-store": "^9.0.0-canary.73",
24
- "@graphcommerce/next-ui": "^9.0.0-canary.73",
25
- "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.73",
26
- "@graphcommerce/react-hook-form": "^9.0.0-canary.73",
27
- "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.73",
15
+ "@graphcommerce/ecommerce-ui": "^9.0.0-canary.75",
16
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.75",
17
+ "@graphcommerce/framer-next-pages": "^9.0.0-canary.75",
18
+ "@graphcommerce/framer-utils": "^9.0.0-canary.75",
19
+ "@graphcommerce/graphql": "^9.0.0-canary.75",
20
+ "@graphcommerce/graphql-mesh": "^9.0.0-canary.75",
21
+ "@graphcommerce/image": "^9.0.0-canary.75",
22
+ "@graphcommerce/magento-graphql": "^9.0.0-canary.75",
23
+ "@graphcommerce/magento-store": "^9.0.0-canary.75",
24
+ "@graphcommerce/next-ui": "^9.0.0-canary.75",
25
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.75",
26
+ "@graphcommerce/react-hook-form": "^9.0.0-canary.75",
27
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.75",
28
28
  "@lingui/core": "^4.2.1",
29
29
  "@lingui/macro": "^4.2.1",
30
30
  "@lingui/react": "^4.2.1",