@graphcommerce/magento-cart-shipping-address 3.5.7 → 3.5.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,5 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.5.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1688](https://github.com/graphcommerce-org/graphcommerce/pull/1688) [`e0be98a26`](https://github.com/graphcommerce-org/graphcommerce/commit/e0be98a260882039a59a785f41e26517797307fd) Thanks [@paales](https://github.com/paales)! - After switching locales the countries aren’t reloaded while they are dependent on the storeview
8
+
9
+ - Updated dependencies [[`8393cb266`](https://github.com/graphcommerce-org/graphcommerce/commit/8393cb2662860be0c2aa5df432447bb73c427d8e), [`f544401c7`](https://github.com/graphcommerce-org/graphcommerce/commit/f544401c7b653fda39c7c260ad0dcfb3bf543b65), [`f105d4223`](https://github.com/graphcommerce-org/graphcommerce/commit/f105d4223aa68df30970149e51ae72897e489bf9), [`e0be98a26`](https://github.com/graphcommerce-org/graphcommerce/commit/e0be98a260882039a59a785f41e26517797307fd)]:
10
+ - @graphcommerce/next-ui@4.29.3
11
+ - @graphcommerce/ecommerce-ui@1.5.8
12
+ - @graphcommerce/magento-customer@4.12.4
13
+ - @graphcommerce/magento-cart@4.9.4
14
+ - @graphcommerce/magento-store@4.3.6
15
+
3
16
  ## 3.5.7
4
17
 
5
18
  ### Patch Changes
@@ -40,7 +40,8 @@ export const ShippingAddressForm = React.memo<ShippingAddressFormProps>((props)
40
40
  const { step, sx, ignoreCache = false } = props
41
41
  const { data: cartQuery } = useCartQuery(GetAddressesDocument)
42
42
  const { data: config } = useQuery(StoreConfigDocument)
43
- const { data: countriesData } = useQuery(CountryRegionsDocument)
43
+ const countryQuery = useQuery(CountryRegionsDocument, { fetchPolicy: 'cache-and-network' })
44
+ const countries = countryQuery.data?.countries ?? countryQuery.previousData?.countries
44
45
  const { data: customerQuery } = useCustomerQuery(CustomerDocument)
45
46
 
46
47
  const shopCountry = config?.storeConfig?.locale?.split('_')?.[1].toUpperCase()
@@ -97,7 +98,7 @@ export const ShippingAddressForm = React.memo<ShippingAddressFormProps>((props)
97
98
  },
98
99
  mode: 'onChange',
99
100
  onBeforeSubmit: (variables) => {
100
- const regionId = countriesData?.countries
101
+ const regionId = countries
101
102
  ?.find((country) => country?.two_letter_abbreviation === variables.countryCode)
102
103
  ?.available_regions?.find((region) => region?.id === variables.regionId)?.id
103
104
 
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": "3.5.7",
5
+ "version": "3.5.8",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -18,13 +18,13 @@
18
18
  "@playwright/test": "^1.21.1"
19
19
  },
20
20
  "dependencies": {
21
- "@graphcommerce/ecommerce-ui": "1.5.7",
21
+ "@graphcommerce/ecommerce-ui": "1.5.8",
22
22
  "@graphcommerce/graphql": "3.5.0",
23
23
  "@graphcommerce/image": "3.1.10",
24
- "@graphcommerce/magento-cart": "4.9.3",
25
- "@graphcommerce/magento-customer": "4.12.3",
26
- "@graphcommerce/magento-store": "4.3.5",
27
- "@graphcommerce/next-ui": "4.29.2"
24
+ "@graphcommerce/magento-cart": "4.9.4",
25
+ "@graphcommerce/magento-customer": "4.12.4",
26
+ "@graphcommerce/magento-store": "4.3.6",
27
+ "@graphcommerce/next-ui": "4.29.3"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@lingui/react": "^3.13.2",