@graphcommerce/magento-cart-shipping-address 9.0.4-canary.0 → 9.0.4-canary.10
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,30 +1,34 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 9.0.4-canary.
|
|
3
|
+
## 9.0.4-canary.10
|
|
4
4
|
|
|
5
|
-
## 9.0.
|
|
5
|
+
## 9.0.4-canary.9
|
|
6
6
|
|
|
7
|
-
## 9.0.
|
|
7
|
+
## 9.0.4-canary.8
|
|
8
8
|
|
|
9
|
-
## 9.0.
|
|
9
|
+
## 9.0.4-canary.7
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## 9.0.4-canary.6
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## 9.0.4-canary.5
|
|
14
14
|
|
|
15
|
-
## 9.0.
|
|
15
|
+
## 9.0.4-canary.4
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## 9.0.4-canary.3
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## 9.0.4-canary.2
|
|
20
20
|
|
|
21
|
-
## 9.0.1
|
|
21
|
+
## 9.0.4-canary.1
|
|
22
|
+
|
|
23
|
+
## 9.0.4-canary.0
|
|
24
|
+
|
|
25
|
+
## 9.0.2
|
|
22
26
|
|
|
23
27
|
### Patch Changes
|
|
24
28
|
|
|
25
|
-
- [
|
|
29
|
+
- [`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))
|
|
26
30
|
|
|
27
|
-
## 9.0.1
|
|
31
|
+
## 9.0.1
|
|
28
32
|
|
|
29
33
|
### Patch Changes
|
|
30
34
|
|
|
@@ -1,29 +1,20 @@
|
|
|
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, iconHome, IconSvg } 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
|
-
CustomerAddressFragment | null | undefined
|
|
11
|
-
>
|
|
9
|
+
export type CustomerAddressActionCardProps = ActionCardItemRenderProps<{
|
|
10
|
+
address?: CustomerAddressFragment | null | undefined
|
|
11
|
+
}>
|
|
12
12
|
|
|
13
13
|
export function CustomerAddressActionCard(props: CustomerAddressActionCardProps) {
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
lastname,
|
|
19
|
-
street,
|
|
20
|
-
postcode,
|
|
21
|
-
city,
|
|
22
|
-
country_code,
|
|
23
|
-
region,
|
|
24
|
-
id,
|
|
25
|
-
...cardProps
|
|
26
|
-
} = props
|
|
14
|
+
const { onReset, address, ...cardProps } = props
|
|
15
|
+
const { company, firstname, lastname, street, postcode, city, country_code, region, id } =
|
|
16
|
+
address ?? {}
|
|
17
|
+
|
|
27
18
|
const { push } = useRouter()
|
|
28
19
|
const country = useFindCountry(country_code)
|
|
29
20
|
|
|
@@ -159,7 +159,7 @@ export function CustomerAddressForm(props: CustomerAddressListProps) {
|
|
|
159
159
|
color='secondary'
|
|
160
160
|
required
|
|
161
161
|
items={[
|
|
162
|
-
...customerAddresses.map((address) => ({
|
|
162
|
+
...customerAddresses.map((address) => ({ address, value: address.id })),
|
|
163
163
|
{ value: -1 },
|
|
164
164
|
]}
|
|
165
165
|
render={CustomerAddressActionCard}
|
|
@@ -31,11 +31,14 @@ 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'
|
|
34
35
|
import { SetShippingBillingAddressDocument } from './SetShippingBillingAddress.gql'
|
|
35
36
|
|
|
36
37
|
export type ShippingAddressFormProps = Pick<UseFormComposeOptions, 'step'> & {
|
|
37
38
|
/**
|
|
38
|
-
* @deprecated This was used to make sure the form wasn't filled with a customer's address.
|
|
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.
|
|
39
42
|
*/
|
|
40
43
|
ignoreCache?: boolean
|
|
41
44
|
sx?: SxProps<Theme>
|
|
@@ -137,9 +140,9 @@ export const ShippingAddressForm = React.memo<ShippingAddressFormProps>((props)
|
|
|
137
140
|
name={['postcode', 'countryCode', 'regionId']}
|
|
138
141
|
/>
|
|
139
142
|
|
|
140
|
-
<CompanyFields form={form} />
|
|
143
|
+
<CompanyFields<SetShippingBillingAddressMutationVariables> form={form} />
|
|
141
144
|
<NameFields form={form} />
|
|
142
|
-
<AddressFields form={form} />
|
|
145
|
+
<AddressFields<SetShippingBillingAddressMutationVariables> form={form} />
|
|
143
146
|
|
|
144
147
|
<FormRow>
|
|
145
148
|
<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-canary.
|
|
5
|
+
"version": "9.0.4-canary.10",
|
|
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-canary.
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.4-canary.
|
|
17
|
-
"@graphcommerce/graphql": "^9.0.4-canary.
|
|
18
|
-
"@graphcommerce/graphql-mesh": "^9.0.4-canary.
|
|
19
|
-
"@graphcommerce/image": "^9.0.4-canary.
|
|
20
|
-
"@graphcommerce/magento-cart": "^9.0.4-canary.
|
|
21
|
-
"@graphcommerce/magento-customer": "^9.0.4-canary.
|
|
22
|
-
"@graphcommerce/magento-store": "^9.0.4-canary.
|
|
23
|
-
"@graphcommerce/next-ui": "^9.0.4-canary.
|
|
24
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.4-canary.
|
|
25
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.4-canary.
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^9.0.4-canary.10",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.4-canary.10",
|
|
17
|
+
"@graphcommerce/graphql": "^9.0.4-canary.10",
|
|
18
|
+
"@graphcommerce/graphql-mesh": "^9.0.4-canary.10",
|
|
19
|
+
"@graphcommerce/image": "^9.0.4-canary.10",
|
|
20
|
+
"@graphcommerce/magento-cart": "^9.0.4-canary.10",
|
|
21
|
+
"@graphcommerce/magento-customer": "^9.0.4-canary.10",
|
|
22
|
+
"@graphcommerce/magento-store": "^9.0.4-canary.10",
|
|
23
|
+
"@graphcommerce/next-ui": "^9.0.4-canary.10",
|
|
24
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.4-canary.10",
|
|
25
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.4-canary.10",
|
|
26
26
|
"@lingui/core": "^4.2.1",
|
|
27
27
|
"@lingui/macro": "^4.2.1",
|
|
28
28
|
"@lingui/react": "^4.2.1",
|