@graphcommerce/magento-cart-shipping-address 9.0.4-canary.9 → 9.0.4
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,32 +1,30 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 9.0.4
|
|
3
|
+
## 9.0.4
|
|
4
4
|
|
|
5
|
-
## 9.0.
|
|
5
|
+
## 9.0.3
|
|
6
6
|
|
|
7
|
-
## 9.0.
|
|
7
|
+
## 9.0.3-canary.0
|
|
8
8
|
|
|
9
|
-
## 9.0.
|
|
10
|
-
|
|
11
|
-
## 9.0.4-canary.5
|
|
9
|
+
## 9.0.2
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
### Patch Changes
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
- [`30d769e`](https://github.com/graphcommerce-org/graphcommerce/commit/30d769eacb3b5a2b6f48b1da291d9154b32948b4) - Make sure we are toggling the selected shipping method when a user selects a previously selected shipping method ([@paales](https://github.com/paales))
|
|
16
14
|
|
|
17
|
-
## 9.0.
|
|
15
|
+
## 9.0.2-canary.0
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
### Patch Changes
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
- [`30d769e`](https://github.com/graphcommerce-org/graphcommerce/commit/30d769eacb3b5a2b6f48b1da291d9154b32948b4) - Make sure we are toggling the selected shipping method when a user selects a previously selected shipping method ([@paales](https://github.com/paales))
|
|
22
20
|
|
|
23
|
-
## 9.0.
|
|
21
|
+
## 9.0.1
|
|
24
22
|
|
|
25
23
|
### Patch Changes
|
|
26
24
|
|
|
27
|
-
- [`
|
|
25
|
+
- [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`3066a2f`](https://github.com/graphcommerce-org/graphcommerce/commit/3066a2fea83b40ca2ab96987adf1261f63d24e77) - When a Customer deselected their shipping address, but had a shipping note filled in it would try to submit the form causing an error. By making the customer_address_id field required we prevent this. ([@paales](https://github.com/paales))
|
|
28
26
|
|
|
29
|
-
## 9.0.1
|
|
27
|
+
## 9.0.1-canary.1
|
|
30
28
|
|
|
31
29
|
### Patch Changes
|
|
32
30
|
|
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
import type { ActionCardItemRenderProps } from '@graphcommerce/ecommerce-ui'
|
|
2
2
|
import type { CustomerAddressFragment } from '@graphcommerce/magento-customer/components/CreateCustomerAddressForm/CustomerAddress.gql'
|
|
3
3
|
import { useFindCountry } from '@graphcommerce/magento-store'
|
|
4
|
-
import { ActionCard,
|
|
4
|
+
import { ActionCard, IconSvg, iconHome } from '@graphcommerce/next-ui'
|
|
5
5
|
import { Trans } from '@lingui/react'
|
|
6
6
|
import { Button } from '@mui/material'
|
|
7
7
|
import { useRouter } from 'next/router'
|
|
8
8
|
|
|
9
|
-
export type CustomerAddressActionCardProps = ActionCardItemRenderProps<
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
export type CustomerAddressActionCardProps = ActionCardItemRenderProps<
|
|
10
|
+
CustomerAddressFragment | null | undefined
|
|
11
|
+
>
|
|
12
12
|
|
|
13
13
|
export function CustomerAddressActionCard(props: CustomerAddressActionCardProps) {
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const {
|
|
15
|
+
onReset,
|
|
16
|
+
company,
|
|
17
|
+
firstname,
|
|
18
|
+
lastname,
|
|
19
|
+
street,
|
|
20
|
+
postcode,
|
|
21
|
+
city,
|
|
22
|
+
country_code,
|
|
23
|
+
region,
|
|
24
|
+
id,
|
|
25
|
+
...cardProps
|
|
26
|
+
} = props
|
|
18
27
|
const { push } = useRouter()
|
|
19
28
|
const country = useFindCountry(country_code)
|
|
20
29
|
|
|
@@ -159,7 +159,7 @@ export function CustomerAddressForm(props: CustomerAddressListProps) {
|
|
|
159
159
|
color='secondary'
|
|
160
160
|
required
|
|
161
161
|
items={[
|
|
162
|
-
...customerAddresses.map((address) => ({ address, value: address.id })),
|
|
162
|
+
...customerAddresses.map((address) => ({ ...address, value: address.id })),
|
|
163
163
|
{ value: -1 },
|
|
164
164
|
]}
|
|
165
165
|
render={CustomerAddressActionCard}
|
|
@@ -31,14 +31,11 @@ import { isSameAddress } from '../../utils/isSameAddress'
|
|
|
31
31
|
import { GetAddressesDocument } from './GetAddresses.gql'
|
|
32
32
|
import { SetBillingAddressDocument } from './SetBillingAddress.gql'
|
|
33
33
|
import { SetShippingAddressDocument } from './SetShippingAddress.gql'
|
|
34
|
-
import type { SetShippingBillingAddressMutationVariables } from './SetShippingBillingAddress.gql'
|
|
35
34
|
import { SetShippingBillingAddressDocument } from './SetShippingBillingAddress.gql'
|
|
36
35
|
|
|
37
36
|
export type ShippingAddressFormProps = Pick<UseFormComposeOptions, 'step'> & {
|
|
38
37
|
/**
|
|
39
|
-
* @deprecated This was used to make sure the form wasn't filled with a customer's address.
|
|
40
|
-
* However this also broke the checkout when navigating back from the checkout. This is now
|
|
41
|
-
* automatically handled.
|
|
38
|
+
* @deprecated This was used to make sure the form wasn't filled with a customer's address. However this also broke the checkout when navigating back from the checkout. This is now automatically handled.
|
|
42
39
|
*/
|
|
43
40
|
ignoreCache?: boolean
|
|
44
41
|
sx?: SxProps<Theme>
|
|
@@ -140,9 +137,9 @@ export const ShippingAddressForm = React.memo<ShippingAddressFormProps>((props)
|
|
|
140
137
|
name={['postcode', 'countryCode', 'regionId']}
|
|
141
138
|
/>
|
|
142
139
|
|
|
143
|
-
<CompanyFields
|
|
140
|
+
<CompanyFields form={form} />
|
|
144
141
|
<NameFields form={form} />
|
|
145
|
-
<AddressFields
|
|
142
|
+
<AddressFields form={form} />
|
|
146
143
|
|
|
147
144
|
<FormRow>
|
|
148
145
|
<TelephoneElement
|
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": "9.0.4
|
|
5
|
+
"version": "9.0.4",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/ecommerce-ui": "^9.0.4
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.4
|
|
17
|
-
"@graphcommerce/graphql": "^9.0.4
|
|
18
|
-
"@graphcommerce/graphql-mesh": "^9.0.4
|
|
19
|
-
"@graphcommerce/image": "^9.0.4
|
|
20
|
-
"@graphcommerce/magento-cart": "^9.0.4
|
|
21
|
-
"@graphcommerce/magento-customer": "^9.0.4
|
|
22
|
-
"@graphcommerce/magento-store": "^9.0.4
|
|
23
|
-
"@graphcommerce/next-ui": "^9.0.4
|
|
24
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.4
|
|
25
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.4
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^9.0.4",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.4",
|
|
17
|
+
"@graphcommerce/graphql": "^9.0.4",
|
|
18
|
+
"@graphcommerce/graphql-mesh": "^9.0.4",
|
|
19
|
+
"@graphcommerce/image": "^9.0.4",
|
|
20
|
+
"@graphcommerce/magento-cart": "^9.0.4",
|
|
21
|
+
"@graphcommerce/magento-customer": "^9.0.4",
|
|
22
|
+
"@graphcommerce/magento-store": "^9.0.4",
|
|
23
|
+
"@graphcommerce/next-ui": "^9.0.4",
|
|
24
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.4",
|
|
25
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.4",
|
|
26
26
|
"@lingui/core": "^4.2.1",
|
|
27
27
|
"@lingui/macro": "^4.2.1",
|
|
28
28
|
"@lingui/react": "^4.2.1",
|