@graphcommerce/magento-customer 4.12.3 → 4.12.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,5 +1,16 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.12.4
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)]:
10
+ - @graphcommerce/next-ui@4.29.3
11
+ - @graphcommerce/ecommerce-ui@1.5.8
12
+ - @graphcommerce/magento-store@4.3.6
13
+
3
14
  ## 4.12.3
4
15
 
5
16
  ### Patch Changes
@@ -27,7 +27,9 @@ type AddressFieldsProps = { form: UseFormReturn<any>; readOnly?: boolean }
27
27
  export function AddressFields(props: AddressFieldsProps) {
28
28
  const { form, readOnly } = props
29
29
 
30
- const countries = useQuery(CountryRegionsDocument).data?.countries
30
+ const countryQuery = useQuery(CountryRegionsDocument, { fetchPolicy: 'cache-and-network' })
31
+ const countries = countryQuery.data?.countries ?? countryQuery.previousData?.countries
32
+
31
33
  assertFormGqlOperation<AddressFieldValues>(form)
32
34
  const { watch, required, valid, control } = form
33
35
 
@@ -19,7 +19,8 @@ import { NameFields } from '../NameFields/NameFields'
19
19
  import { CreateCustomerAddressDocument } from './CreateCustomerAddress.gql'
20
20
 
21
21
  export function CreateCustomerAddressForm() {
22
- const countries = useQuery(CountryRegionsDocument).data?.countries
22
+ const countryQuery = useQuery(CountryRegionsDocument, { fetchPolicy: 'cache-and-network' })
23
+ const countries = countryQuery.data?.countries ?? countryQuery.previousData?.countries
23
24
  const router = useRouter()
24
25
 
25
26
  const form = useFormGqlMutation(
@@ -26,7 +26,8 @@ type EditAddressFormProps = {
26
26
  }
27
27
 
28
28
  export function EditAddressForm(props: EditAddressFormProps) {
29
- const countries = useQuery(CountryRegionsDocument).data?.countries
29
+ const countryQuery = useQuery(CountryRegionsDocument, { fetchPolicy: 'cache-and-network' })
30
+ const countries = countryQuery.data?.countries ?? countryQuery.previousData?.countries
30
31
  const { address, sx } = props
31
32
 
32
33
  const { closeSteps } = usePageContext()
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": "4.12.3",
5
+ "version": "4.12.4",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -19,14 +19,14 @@
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/ecommerce-ui": "1.5.7",
22
+ "@graphcommerce/ecommerce-ui": "1.5.8",
23
23
  "@graphcommerce/framer-utils": "3.2.1",
24
24
  "@graphcommerce/graphql": "3.5.0",
25
25
  "@graphcommerce/graphql-mesh": "4.2.0",
26
26
  "@graphcommerce/image": "3.1.10",
27
27
  "@graphcommerce/magento-graphql": "3.1.9",
28
- "@graphcommerce/magento-store": "4.3.5",
29
- "@graphcommerce/next-ui": "4.29.2",
28
+ "@graphcommerce/magento-store": "4.3.6",
29
+ "@graphcommerce/next-ui": "4.29.3",
30
30
  "@graphcommerce/react-hook-form": "3.3.5"
31
31
  },
32
32
  "peerDependencies": {