@graphcommerce/magento-cart-shipping-address 8.0.6 → 8.0.8
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,13 +1,22 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 8.0.8
|
|
4
|
+
|
|
5
|
+
## 8.0.7
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#2343](https://github.com/graphcommerce-org/graphcommerce/pull/2343) [`c527bb7`](https://github.com/graphcommerce-org/graphcommerce/commit/c527bb7e8d0f15f546bcc347969f365657410baa) - Fixed shipping address not getting set for logged-in customers with default address ([@paales](https://github.com/paales))
|
|
10
|
+
|
|
11
|
+
- [#2343](https://github.com/graphcommerce-org/graphcommerce/pull/2343) [`c527bb7`](https://github.com/graphcommerce-org/graphcommerce/commit/c527bb7e8d0f15f546bcc347969f365657410baa) - Fixed CustomerAddressForm resetting to a saved address when trying to use a new address ([@paales](https://github.com/paales))
|
|
12
|
+
|
|
3
13
|
## 8.0.6
|
|
4
14
|
|
|
5
15
|
## 8.0.5
|
|
6
16
|
|
|
7
17
|
### Patch Changes
|
|
8
18
|
|
|
9
|
-
- [#2237](https://github.com/graphcommerce-org/graphcommerce/pull/2237) [`8d385fb`](https://github.com/graphcommerce-org/graphcommerce/commit/8d385fb83751c97ea62621a163989eddfd1a2f22) - When the checkout address is saved, the billing address would diverge from the shipping address in some cases. In other cases it wouldn't be set at all or would be set to the shipping address.
|
|
10
|
-
([@bramvanderholst](https://github.com/bramvanderholst))
|
|
19
|
+
- [#2237](https://github.com/graphcommerce-org/graphcommerce/pull/2237) [`8d385fb`](https://github.com/graphcommerce-org/graphcommerce/commit/8d385fb83751c97ea62621a163989eddfd1a2f22) - When the checkout address is saved, the billing address would diverge from the shipping address in some cases. In other cases it wouldn't be set at all or would be set to the shipping address. ([@bramvanderholst](https://github.com/bramvanderholst))
|
|
11
20
|
|
|
12
21
|
## 8.0.5-canary.10
|
|
13
22
|
|
|
@@ -25,8 +34,7 @@
|
|
|
25
34
|
|
|
26
35
|
### Patch Changes
|
|
27
36
|
|
|
28
|
-
- [#2237](https://github.com/graphcommerce-org/graphcommerce/pull/2237) [`8d385fb`](https://github.com/graphcommerce-org/graphcommerce/commit/8d385fb83751c97ea62621a163989eddfd1a2f22) - When the checkout address is saved, the billing address would diverge from the shipping address in some cases. In other cases it wouldn't be set at all or would be set to the shipping address.
|
|
29
|
-
([@bramvanderholst](https://github.com/bramvanderholst))
|
|
37
|
+
- [#2237](https://github.com/graphcommerce-org/graphcommerce/pull/2237) [`8d385fb`](https://github.com/graphcommerce-org/graphcommerce/commit/8d385fb83751c97ea62621a163989eddfd1a2f22) - When the checkout address is saved, the billing address would diverge from the shipping address in some cases. In other cases it wouldn't be set at all or would be set to the shipping address. ([@bramvanderholst](https://github.com/bramvanderholst))
|
|
30
38
|
|
|
31
39
|
## 8.0.5-canary.3
|
|
32
40
|
|
|
@@ -46,11 +54,9 @@
|
|
|
46
54
|
|
|
47
55
|
### Patch Changes
|
|
48
56
|
|
|
49
|
-
- [#2205](https://github.com/graphcommerce-org/graphcommerce/pull/2205) [`d67c89d`](https://github.com/graphcommerce-org/graphcommerce/commit/d67c89d464a60f0e2618dab670b63a39f6291341) - Deprecate the allowUrl option for useCartQuery, it was already enabled by default and should never be set to false.
|
|
50
|
-
([@paales](https://github.com/paales))
|
|
57
|
+
- [#2205](https://github.com/graphcommerce-org/graphcommerce/pull/2205) [`d67c89d`](https://github.com/graphcommerce-org/graphcommerce/commit/d67c89d464a60f0e2618dab670b63a39f6291341) - Deprecate the allowUrl option for useCartQuery, it was already enabled by default and should never be set to false. ([@paales](https://github.com/paales))
|
|
51
58
|
|
|
52
|
-
- [#2206](https://github.com/graphcommerce-org/graphcommerce/pull/2206) [`646db64`](https://github.com/graphcommerce-org/graphcommerce/commit/646db640ec09c1c82584f5543ab487a44ab8d260) - Solves an issue where the billing address of a logged in customer would not set set when a shipping address was already set
|
|
53
|
-
([@paales](https://github.com/paales))
|
|
59
|
+
- [#2206](https://github.com/graphcommerce-org/graphcommerce/pull/2206) [`646db64`](https://github.com/graphcommerce-org/graphcommerce/commit/646db640ec09c1c82584f5543ab487a44ab8d260) - Solves an issue where the billing address of a logged in customer would not set set when a shipping address was already set ([@paales](https://github.com/paales))
|
|
54
60
|
|
|
55
61
|
## 8.0.3-canary.6
|
|
56
62
|
|
|
@@ -62,15 +68,13 @@
|
|
|
62
68
|
|
|
63
69
|
### Patch Changes
|
|
64
70
|
|
|
65
|
-
- [#2206](https://github.com/graphcommerce-org/graphcommerce/pull/2206) [`646db64`](https://github.com/graphcommerce-org/graphcommerce/commit/646db640ec09c1c82584f5543ab487a44ab8d260) - Solves an issue where the billing address of a logged in customer would not set set when a shipping address was already set
|
|
66
|
-
([@paales](https://github.com/paales))
|
|
71
|
+
- [#2206](https://github.com/graphcommerce-org/graphcommerce/pull/2206) [`646db64`](https://github.com/graphcommerce-org/graphcommerce/commit/646db640ec09c1c82584f5543ab487a44ab8d260) - Solves an issue where the billing address of a logged in customer would not set set when a shipping address was already set ([@paales](https://github.com/paales))
|
|
67
72
|
|
|
68
73
|
## 8.0.3-canary.2
|
|
69
74
|
|
|
70
75
|
### Patch Changes
|
|
71
76
|
|
|
72
|
-
- [#2205](https://github.com/graphcommerce-org/graphcommerce/pull/2205) [`d67c89d`](https://github.com/graphcommerce-org/graphcommerce/commit/d67c89d464a60f0e2618dab670b63a39f6291341) - Deprecate the allowUrl option for useCartQuery, it was already enabled by default and should never be set to false.
|
|
73
|
-
([@paales](https://github.com/paales))
|
|
77
|
+
- [#2205](https://github.com/graphcommerce-org/graphcommerce/pull/2205) [`d67c89d`](https://github.com/graphcommerce-org/graphcommerce/commit/d67c89d464a60f0e2618dab670b63a39f6291341) - Deprecate the allowUrl option for useCartQuery, it was already enabled by default and should never be set to false. ([@paales](https://github.com/paales))
|
|
74
78
|
|
|
75
79
|
## 8.0.3-canary.1
|
|
76
80
|
|
|
@@ -102,11 +106,9 @@
|
|
|
102
106
|
|
|
103
107
|
### Patch Changes
|
|
104
108
|
|
|
105
|
-
- [#2115](https://github.com/graphcommerce-org/graphcommerce/pull/2115) [`105a1af`](https://github.com/graphcommerce-org/graphcommerce/commit/105a1af8b820de8873e430ae398f1922d39a9110) - Disabled ripple animations on all ActionCard ‘Select’ and ‘Change’ so the rendering is more subtle during checkout.
|
|
106
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
109
|
+
- [#2115](https://github.com/graphcommerce-org/graphcommerce/pull/2115) [`105a1af`](https://github.com/graphcommerce-org/graphcommerce/commit/105a1af8b820de8873e430ae398f1922d39a9110) - Disabled ripple animations on all ActionCard ‘Select’ and ‘Change’ so the rendering is more subtle during checkout. ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
107
110
|
|
|
108
|
-
- [#2118](https://github.com/graphcommerce-org/graphcommerce/pull/2118) [`0cdaad2`](https://github.com/graphcommerce-org/graphcommerce/commit/0cdaad28fb9a20fb5b0b1d339f197b938aa3595a) - Fixed bug where if the customer created a new address during checkout it would not be persisted when navigating back from the payment step.
|
|
109
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
111
|
+
- [#2118](https://github.com/graphcommerce-org/graphcommerce/pull/2118) [`0cdaad2`](https://github.com/graphcommerce-org/graphcommerce/commit/0cdaad28fb9a20fb5b0b1d339f197b938aa3595a) - Fixed bug where if the customer created a new address during checkout it would not be persisted when navigating back from the payment step. ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
110
112
|
|
|
111
113
|
## 8.0.0-canary.100
|
|
112
114
|
|
|
@@ -1422,31 +1424,31 @@
|
|
|
1422
1424
|
All occurences of `<Trans>` and `t` need to be replaced:
|
|
1423
1425
|
|
|
1424
1426
|
```tsx
|
|
1425
|
-
import { Trans, t } from
|
|
1427
|
+
import { Trans, t } from '@lingui/macro'
|
|
1426
1428
|
|
|
1427
1429
|
function MyComponent() {
|
|
1428
|
-
const foo =
|
|
1430
|
+
const foo = 'bar'
|
|
1429
1431
|
return (
|
|
1430
1432
|
<div aria-label={t`Account ${foo}`}>
|
|
1431
1433
|
<Trans>My Translation {foo}</Trans>
|
|
1432
1434
|
</div>
|
|
1433
|
-
)
|
|
1435
|
+
)
|
|
1434
1436
|
}
|
|
1435
1437
|
```
|
|
1436
1438
|
|
|
1437
1439
|
Needs to be replaced with:
|
|
1438
1440
|
|
|
1439
1441
|
```tsx
|
|
1440
|
-
import { Trans } from
|
|
1441
|
-
import { i18n } from
|
|
1442
|
+
import { Trans } from '@lingui/react'
|
|
1443
|
+
import { i18n } from '@lingui/core'
|
|
1442
1444
|
|
|
1443
1445
|
function MyComponent() {
|
|
1444
|
-
const foo =
|
|
1446
|
+
const foo = 'bar'
|
|
1445
1447
|
return (
|
|
1446
1448
|
<div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
|
|
1447
|
-
<Trans key=
|
|
1449
|
+
<Trans key='My Translation {foo}' values={{ foo }}></Trans>
|
|
1448
1450
|
</div>
|
|
1449
|
-
)
|
|
1451
|
+
)
|
|
1450
1452
|
}
|
|
1451
1453
|
```
|
|
1452
1454
|
|
|
@@ -14,7 +14,7 @@ import { CustomerDocument } from '@graphcommerce/magento-customer'
|
|
|
14
14
|
import { ActionCardListForm, filterNonNullableKeys } from '@graphcommerce/next-ui'
|
|
15
15
|
import { i18n } from '@lingui/core'
|
|
16
16
|
import { Box, SxProps, Theme } from '@mui/material'
|
|
17
|
-
import React, {
|
|
17
|
+
import React, { useEffect } from 'react'
|
|
18
18
|
import { findCustomerAddressFromCartAddress } from '../../utils/findCustomerAddressFromCartAddress'
|
|
19
19
|
import { GetAddressesDocument } from '../ShippingAddressForm/GetAddresses.gql'
|
|
20
20
|
import { CustomerAddressActionCard } from './CustomerAddressActionCard'
|
|
@@ -105,20 +105,26 @@ export function CustomerAddressForm(props: CustomerAddressListProps) {
|
|
|
105
105
|
const { handleSubmit, error, control, setValue, watch } = form
|
|
106
106
|
const formAddressId = watch('customer_address_id')
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
useEffect(() => {
|
|
109
109
|
if (mode === 'both' || mode === 'shipping') {
|
|
110
|
-
if (!cartAddressId && defaultShippingId) {
|
|
111
|
-
// console.log('shippingAddress.customer_address_id', defaultShippingId)
|
|
110
|
+
if (!cartAddressId && !cartShipping && defaultShippingId) {
|
|
112
111
|
setValue('customer_address_id', defaultShippingId, { shouldValidate: true })
|
|
113
112
|
}
|
|
114
113
|
}
|
|
115
114
|
if (mode === 'billing') {
|
|
116
|
-
if (!cartAddressId && defaultBillingId) {
|
|
117
|
-
// console.log('billingAddress.customer_address_id', defaultBillingId)
|
|
115
|
+
if (!cartAddressId && !cartBilling && defaultBillingId) {
|
|
118
116
|
setValue('customer_address_id', defaultBillingId, { shouldValidate: true })
|
|
119
117
|
}
|
|
120
118
|
}
|
|
121
|
-
}, [
|
|
119
|
+
}, [
|
|
120
|
+
cartAddressId,
|
|
121
|
+
cartBilling,
|
|
122
|
+
cartShipping,
|
|
123
|
+
defaultBillingId,
|
|
124
|
+
defaultShippingId,
|
|
125
|
+
mode,
|
|
126
|
+
setValue,
|
|
127
|
+
])
|
|
122
128
|
|
|
123
129
|
const submit = handleSubmit(() => {})
|
|
124
130
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-cart-shipping-address",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "8.0.
|
|
5
|
+
"version": "8.0.8",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/ecommerce-ui": "^8.0.
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^8.0.
|
|
17
|
-
"@graphcommerce/graphql": "^8.0.
|
|
18
|
-
"@graphcommerce/image": "^8.0.
|
|
19
|
-
"@graphcommerce/magento-cart": "^8.0.
|
|
20
|
-
"@graphcommerce/magento-customer": "^8.0.
|
|
21
|
-
"@graphcommerce/magento-store": "^8.0.
|
|
22
|
-
"@graphcommerce/next-ui": "^8.0.
|
|
23
|
-
"@graphcommerce/prettier-config-pwa": "^8.0.
|
|
24
|
-
"@graphcommerce/typescript-config-pwa": "^8.0.
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^8.0.8",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^8.0.8",
|
|
17
|
+
"@graphcommerce/graphql": "^8.0.8",
|
|
18
|
+
"@graphcommerce/image": "^8.0.8",
|
|
19
|
+
"@graphcommerce/magento-cart": "^8.0.8",
|
|
20
|
+
"@graphcommerce/magento-customer": "^8.0.8",
|
|
21
|
+
"@graphcommerce/magento-store": "^8.0.8",
|
|
22
|
+
"@graphcommerce/next-ui": "^8.0.8",
|
|
23
|
+
"@graphcommerce/prettier-config-pwa": "^8.0.8",
|
|
24
|
+
"@graphcommerce/typescript-config-pwa": "^8.0.8",
|
|
25
25
|
"@lingui/core": "^4.2.1",
|
|
26
26
|
"@lingui/macro": "^4.2.1",
|
|
27
27
|
"@lingui/react": "^4.2.1",
|