@graphcommerce/magento-customer 10.0.1 → 10.0.2

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,36 +1,28 @@
1
1
  # Change Log
2
2
 
3
- ## 10.0.1
3
+ ## 10.0.2
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - [#2571](https://github.com/graphcommerce-org/graphcommerce/pull/2571) [`78a2a8a`](https://github.com/graphcommerce-org/graphcommerce/commit/78a2a8a919346e1f9bccddf7e52682f4adb9a4e0) - Solve issue where the @client fields could not be resolved correctly. ([@paales](https://github.com/paales))
8
-
9
- - [#2568](https://github.com/graphcommerce-org/graphcommerce/pull/2568) [`dc57da4`](https://github.com/graphcommerce-org/graphcommerce/commit/dc57da4897365ddb2b779eab3ad2b3a350ed115c) - Moved from form.watch to useWatch everywhere which works even if the fields are later initialized. ([@paales](https://github.com/paales))
10
-
11
- - [#2571](https://github.com/graphcommerce-org/graphcommerce/pull/2571) [`0146abe`](https://github.com/graphcommerce-org/graphcommerce/commit/0146abe0d8362a09b48af42db12f8a0e7670ff8d) - Created a new GuestOrCustomerMask to show information based on their loggedIn state respecting the masking of private content. ([@paales](https://github.com/paales))
12
-
13
- - [#2568](https://github.com/graphcommerce-org/graphcommerce/pull/2568) [`f1b60ac`](https://github.com/graphcommerce-org/graphcommerce/commit/f1b60accf5e8fdbcba15b7567dce7ff68f37db88) - Solve issue where the cache wasn't available from the context anymore in @apollo/client@4 now uses the operation.client.cache ([@paales](https://github.com/paales))
7
+ - [`aaa79dd`](https://github.com/graphcommerce-org/graphcommerce/commit/aaa79dd79ab39600ecf291334fac91196b9793e6) - Solve issue where the GuestOrCustomerMask would hide incorrectly ([@paales](https://github.com/paales))
14
8
 
15
- ## 10.0.1-canary.4
9
+ ## 10.0.2-canary.0
16
10
 
17
- ## 10.0.1-canary.3
11
+ ### Patch Changes
18
12
 
19
- ## 10.0.1-canary.2
13
+ - [`aaa79dd`](https://github.com/graphcommerce-org/graphcommerce/commit/aaa79dd79ab39600ecf291334fac91196b9793e6) - Solve issue where the GuestOrCustomerMask would hide incorrectly ([@paales](https://github.com/paales))
20
14
 
21
- ## 10.0.1-canary.1
15
+ ## 10.0.1
22
16
 
23
17
  ### Patch Changes
24
18
 
25
19
  - [#2571](https://github.com/graphcommerce-org/graphcommerce/pull/2571) [`78a2a8a`](https://github.com/graphcommerce-org/graphcommerce/commit/78a2a8a919346e1f9bccddf7e52682f4adb9a4e0) - Solve issue where the @client fields could not be resolved correctly. ([@paales](https://github.com/paales))
26
20
 
27
- - [#2571](https://github.com/graphcommerce-org/graphcommerce/pull/2571) [`0146abe`](https://github.com/graphcommerce-org/graphcommerce/commit/0146abe0d8362a09b48af42db12f8a0e7670ff8d) - Created a new GuestOrCustomerMask to show information based on their loggedIn state respecting the masking of private content. ([@paales](https://github.com/paales))
28
-
29
- ## 10.0.1-canary.0
21
+ - [#2568](https://github.com/graphcommerce-org/graphcommerce/pull/2568) [`dc57da4`](https://github.com/graphcommerce-org/graphcommerce/commit/dc57da4897365ddb2b779eab3ad2b3a350ed115c) - Moved from form.watch to useWatch everywhere which works even if the fields are later initialized. ([@paales](https://github.com/paales))
30
22
 
31
- ### Patch Changes
23
+ - [`5166a95`](https://github.com/graphcommerce-org/graphcommerce/commit/5166a958d7a2c8d879f56a4585b874de7625f728) - Solve issue where the GuestOrCustomerMask would hide incorrectly ([@paales](https://github.com/paales))
32
24
 
33
- - [#2568](https://github.com/graphcommerce-org/graphcommerce/pull/2568) [`dc57da4`](https://github.com/graphcommerce-org/graphcommerce/commit/dc57da4897365ddb2b779eab3ad2b3a350ed115c) - Moved from form.watch to useWatch everywhere which works even if the fields are later initialized. ([@paales](https://github.com/paales))
25
+ - [#2571](https://github.com/graphcommerce-org/graphcommerce/pull/2571) [`0146abe`](https://github.com/graphcommerce-org/graphcommerce/commit/0146abe0d8362a09b48af42db12f8a0e7670ff8d) - Created a new GuestOrCustomerMask to show information based on their loggedIn state respecting the masking of private content. ([@paales](https://github.com/paales))
34
26
 
35
27
  - [#2568](https://github.com/graphcommerce-org/graphcommerce/pull/2568) [`f1b60ac`](https://github.com/graphcommerce-org/graphcommerce/commit/f1b60accf5e8fdbcba15b7567dce7ff68f37db88) - Solve issue where the cache wasn't available from the context anymore in @apollo/client@4 now uses the operation.client.cache ([@paales](https://github.com/paales))
36
28
 
@@ -17,27 +17,18 @@ export function GuestOrCustomerMask(props: CustomerGuestMaskProps) {
17
17
  const { mask } = usePrivateQueryMask()
18
18
  const { loggedIn } = useCustomerSession()
19
19
 
20
+ // When not masking, we know the actual state - render directly without CSS hiding
21
+ if (!mask) return <>{loggedIn ? loggedInContent : loggedOutContent}</>
22
+
20
23
  return (
21
24
  <>
22
- {mask && loggedOutContent && (
23
- <Box
24
- sx={{
25
- display: 'contents',
26
- '&:empty': { display: 'none' },
27
- [cssFlag('private-query')]: { display: 'none' },
28
- }}
29
- >
25
+ {loggedOutContent && (
26
+ <Box sx={{ display: 'contents', [cssFlag('private-query')]: { display: 'none' } }}>
30
27
  {loggedOutContent}
31
28
  </Box>
32
29
  )}
33
- <Box
34
- sx={{
35
- display: 'contents',
36
- '&:empty': { display: 'none' },
37
- [cssNotFlag('private-query')]: { display: 'none' },
38
- }}
39
- >
40
- {mask ? skeleton : loggedIn ? loggedInContent : loggedOutContent}
30
+ <Box sx={{ display: 'contents', [cssNotFlag('private-query')]: { display: 'none' } }}>
31
+ {skeleton}
41
32
  </Box>
42
33
  </>
43
34
  )
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": "10.0.1",
5
+ "version": "10.0.2",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -21,20 +21,20 @@
21
21
  "./plugins/magentoCustomerPrivateQueryContext": "./plugins/magentoCustomerPrivateQueryContext.ts"
22
22
  },
23
23
  "peerDependencies": {
24
- "@graphcommerce/ecommerce-ui": "^10.0.1",
25
- "@graphcommerce/eslint-config-pwa": "^10.0.1",
26
- "@graphcommerce/framer-next-pages": "^10.0.1",
27
- "@graphcommerce/framer-utils": "^10.0.1",
28
- "@graphcommerce/graphql": "^10.0.1",
29
- "@graphcommerce/graphql-mesh": "^10.0.1",
30
- "@graphcommerce/image": "^10.0.1",
31
- "@graphcommerce/magento-graphql": "^10.0.1",
32
- "@graphcommerce/magento-store": "^10.0.1",
33
- "@graphcommerce/next-config": "^10.0.1",
34
- "@graphcommerce/next-ui": "^10.0.1",
35
- "@graphcommerce/prettier-config-pwa": "^10.0.1",
36
- "@graphcommerce/react-hook-form": "^10.0.1",
37
- "@graphcommerce/typescript-config-pwa": "^10.0.1",
24
+ "@graphcommerce/ecommerce-ui": "^10.0.2",
25
+ "@graphcommerce/eslint-config-pwa": "^10.0.2",
26
+ "@graphcommerce/framer-next-pages": "^10.0.2",
27
+ "@graphcommerce/framer-utils": "^10.0.2",
28
+ "@graphcommerce/graphql": "^10.0.2",
29
+ "@graphcommerce/graphql-mesh": "^10.0.2",
30
+ "@graphcommerce/image": "^10.0.2",
31
+ "@graphcommerce/magento-graphql": "^10.0.2",
32
+ "@graphcommerce/magento-store": "^10.0.2",
33
+ "@graphcommerce/next-config": "^10.0.2",
34
+ "@graphcommerce/next-ui": "^10.0.2",
35
+ "@graphcommerce/prettier-config-pwa": "^10.0.2",
36
+ "@graphcommerce/react-hook-form": "^10.0.2",
37
+ "@graphcommerce/typescript-config-pwa": "^10.0.2",
38
38
  "@lingui/core": "^5",
39
39
  "@lingui/macro": "^5",
40
40
  "@lingui/react": "^5",