@graphcommerce/magento-cart-shipping-method 3.3.1 → 3.4.0

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,21 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1548](https://github.com/graphcommerce-org/graphcommerce/pull/1548) [`4b8c0a3ef`](https://github.com/graphcommerce-org/graphcommerce/commit/4b8c0a3efa163bc7e4e590f1c251a2a78e000a81) Thanks [@mikekeehnen](https://github.com/mikekeehnen)! - Fix for empty shipping methods in checkout
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`18054c441`](https://github.com/graphcommerce-org/graphcommerce/commit/18054c441962ba750bed3acc39ab46c8d3a341ce), [`c5c539c44`](https://github.com/graphcommerce-org/graphcommerce/commit/c5c539c44eeac524cd62ce649e132d2e00333794), [`6f69bc54c`](https://github.com/graphcommerce-org/graphcommerce/commit/6f69bc54c6e0224452817c532ae58d9c332b61ea), [`21886d6fa`](https://github.com/graphcommerce-org/graphcommerce/commit/21886d6fa64a48d9e932bfaf8d138c9b13c36e43), [`b4936e961`](https://github.com/graphcommerce-org/graphcommerce/commit/b4936e96175fe80717895822e245274db05638bd)]:
12
+ - @graphcommerce/graphql@3.4.1
13
+ - @graphcommerce/next-ui@4.13.1
14
+ - @graphcommerce/framer-scroller@2.1.23
15
+ - @graphcommerce/magento-cart@4.5.2
16
+ - @graphcommerce/magento-cart-shipping-address@3.2.7
17
+ - @graphcommerce/magento-store@4.2.17
18
+
3
19
  ## 3.3.1
4
20
 
5
21
  ### Patch Changes
@@ -46,20 +46,11 @@ export function ShippingMethodForm(props: ShippingMethodFormProps) {
46
46
  [currentAddress?.available_shipping_methods],
47
47
  )
48
48
 
49
- console.log(
50
- 'sortedAvailableShippingMethods',
51
- sortedAvailableShippingMethods.filter(Boolean).map((sortedMethod) => ({
52
- ...sortedMethod,
53
- disabled: !sortedMethod?.available,
54
- value: `${sortedMethod?.carrier_code}-${sortedMethod?.method_code}`,
55
- })),
56
- )
57
-
58
49
  const form = useFormGqlMutationCart<
59
50
  ShippingMethodFormMutation,
60
51
  ShippingMethodFormMutationVariables & { carrierMethod?: string }
61
52
  >(ShippingMethodFormDocument, {
62
- defaultValues: { carrierMethod, carrier, method },
53
+ defaultValues: { carrier, method },
63
54
  onBeforeSubmit: (variables) => {
64
55
  const splitCarrierMethod = variables?.carrierMethod?.split('-')
65
56
  return {
@@ -79,10 +70,7 @@ export function ShippingMethodForm(props: ShippingMethodFormProps) {
79
70
  useEffect(() => {
80
71
  const availableMethods = sortedAvailableShippingMethods.filter((m) => m?.available)
81
72
  if (availableMethods.length === 1) {
82
- setValue(
83
- 'carrierMethod',
84
- `${availableMethods[0]?.carrier_code}-${availableMethods[0]?.method_code}`,
85
- )
73
+ setValue('carrierMethod', `${carrier}-${method}`)
86
74
  }
87
75
  }, [
88
76
  carrier,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-cart-shipping-method",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.3.1",
5
+ "version": "3.4.0",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,20 +12,20 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.1.8",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.9",
16
16
  "@graphcommerce/prettier-config-pwa": "^4.0.6",
17
- "@graphcommerce/typescript-config-pwa": "^4.0.3",
17
+ "@graphcommerce/typescript-config-pwa": "^4.0.4",
18
18
  "@playwright/test": "^1.21.1",
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/framer-scroller": "2.1.22",
23
- "@graphcommerce/graphql": "3.4.0",
22
+ "@graphcommerce/framer-scroller": "2.1.23",
23
+ "@graphcommerce/graphql": "3.4.1",
24
24
  "@graphcommerce/image": "3.1.7",
25
- "@graphcommerce/magento-cart": "4.5.1",
26
- "@graphcommerce/magento-cart-shipping-address": "3.2.6",
27
- "@graphcommerce/magento-store": "4.2.16",
28
- "@graphcommerce/next-ui": "4.13.0",
25
+ "@graphcommerce/magento-cart": "4.5.2",
26
+ "@graphcommerce/magento-cart-shipping-address": "3.2.7",
27
+ "@graphcommerce/magento-store": "4.2.17",
28
+ "@graphcommerce/next-ui": "4.13.1",
29
29
  "@graphcommerce/react-hook-form": "3.3.0"
30
30
  },
31
31
  "peerDependencies": {