@graphcommerce/magento-cart-payment-method 3.3.1 → 3.3.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,37 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1529](https://github.com/graphcommerce-org/graphcommerce/pull/1529) [`d5e012462`](https://github.com/graphcommerce-org/graphcommerce/commit/d5e012462dda18a61aa20eca8dc57e26cc4c7931) Thanks [@paales](https://github.com/paales)! - When a payment method had multiple childs it would select all children at once.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`11bca2d2f`](https://github.com/graphcommerce-org/graphcommerce/commit/11bca2d2f7dbb7c5e2827c04eb0db43d4099f2fd)]:
|
|
10
|
+
- @graphcommerce/next-ui@4.11.1
|
|
11
|
+
- @graphcommerce/framer-scroller@2.1.19
|
|
12
|
+
- @graphcommerce/magento-cart@4.4.7
|
|
13
|
+
- @graphcommerce/magento-store@4.2.13
|
|
14
|
+
|
|
15
|
+
## 3.3.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#1524](https://github.com/graphcommerce-org/graphcommerce/pull/1524) [`dae4551b7`](https://github.com/graphcommerce-org/graphcommerce/commit/dae4551b7b8181adc3405fb1ce88eae56495a8a9) Thanks [@paales](https://github.com/paales)! - make sure we are correctly rendering children when the payment method is a childmethod
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [[`d140fca34`](https://github.com/graphcommerce-org/graphcommerce/commit/d140fca3463b73e761e23fd1d9216305727f0c1a), [`9ec0338df`](https://github.com/graphcommerce-org/graphcommerce/commit/9ec0338dfe34d37b0f2c24e36ffa6ed13ea1145e), [`735b78672`](https://github.com/graphcommerce-org/graphcommerce/commit/735b786724d5401cbe6e88f2515e121a1a0945b2)]:
|
|
22
|
+
- @graphcommerce/magento-cart@4.4.6
|
|
23
|
+
- @graphcommerce/next-ui@4.11.0
|
|
24
|
+
- @graphcommerce/magento-store@4.2.12
|
|
25
|
+
- @graphcommerce/graphql@3.3.0
|
|
26
|
+
- @graphcommerce/framer-scroller@2.1.18
|
|
27
|
+
|
|
28
|
+
## 3.3.2
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies []:
|
|
33
|
+
- @graphcommerce/magento-cart@4.4.5
|
|
34
|
+
|
|
3
35
|
## 3.3.1
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -27,10 +27,14 @@ function PaymentMethodActionCard(
|
|
|
27
27
|
sx?: SxProps<Theme>
|
|
28
28
|
},
|
|
29
29
|
) {
|
|
30
|
-
const { onReset, code, step, Container, sx = [] } = props
|
|
30
|
+
const { onReset, code, step, child, Container, sx = [] } = props
|
|
31
31
|
const { selectedMethod, selectedModule, modules } = usePaymentMethodContext()
|
|
32
32
|
|
|
33
|
-
const selectedAndOptions =
|
|
33
|
+
const selectedAndOptions =
|
|
34
|
+
selectedMethod?.code === code &&
|
|
35
|
+
selectedMethod.child === child &&
|
|
36
|
+
selectedModule?.PaymentOptions
|
|
37
|
+
|
|
34
38
|
const Card = modules[code]?.PaymentActionCard ?? DefaultPaymentActionCard
|
|
35
39
|
|
|
36
40
|
return (
|
|
@@ -82,6 +86,7 @@ export function PaymentMethodActionCardListForm(props: PaymentMethodActionCardLi
|
|
|
82
86
|
useFormPersist({ form, name: 'PaymentMethodActionCardList' })
|
|
83
87
|
useFormCompose({ form, step: 1, submit, key: 'PaymentMethodActionCardList' })
|
|
84
88
|
|
|
89
|
+
// todo: Do not useEffect to set value, usePaymentMethodContext should calculate these values.
|
|
85
90
|
useEffect(() => {
|
|
86
91
|
const [code, child] = paymentMethod?.split('___') ?? ['']
|
|
87
92
|
if (code === selectedMethod?.code) return
|
|
@@ -103,20 +108,17 @@ export function PaymentMethodActionCardListForm(props: PaymentMethodActionCardLi
|
|
|
103
108
|
if (!methods || methods.length < 1) return null
|
|
104
109
|
|
|
105
110
|
return (
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/>
|
|
119
|
-
{/* <ApolloCartErrorAlert error={error} /> */}
|
|
120
|
-
</Form>
|
|
111
|
+
<ActionCardListForm<PaymentOptionsProps & ActionCardItemBase>
|
|
112
|
+
control={control}
|
|
113
|
+
name='paymentMethod'
|
|
114
|
+
errorMessage='Please select a payment method'
|
|
115
|
+
items={methods.map((method) => ({
|
|
116
|
+
...method,
|
|
117
|
+
value: `${method.code}___${method.child}`,
|
|
118
|
+
step,
|
|
119
|
+
Container: FormDiv,
|
|
120
|
+
}))}
|
|
121
|
+
render={PaymentMethodActionCard}
|
|
122
|
+
/>
|
|
121
123
|
)
|
|
122
124
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-cart-payment-method",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "3.3.
|
|
5
|
+
"version": "3.3.4",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
"@graphcommerce/eslint-config-pwa": "^4.1.8",
|
|
16
16
|
"@graphcommerce/prettier-config-pwa": "^4.0.6",
|
|
17
17
|
"@graphcommerce/typescript-config-pwa": "^4.0.3",
|
|
18
|
-
"@graphcommerce/magento-cart-shipping-address": "3.2.
|
|
18
|
+
"@graphcommerce/magento-cart-shipping-address": "3.2.3",
|
|
19
19
|
"@playwright/test": "^1.21.1",
|
|
20
20
|
"type-fest": "^2.12.2"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@graphcommerce/framer-scroller": "2.1.
|
|
24
|
-
"@graphcommerce/graphql": "3.
|
|
23
|
+
"@graphcommerce/framer-scroller": "2.1.19",
|
|
24
|
+
"@graphcommerce/graphql": "3.3.0",
|
|
25
25
|
"@graphcommerce/image": "3.1.7",
|
|
26
|
-
"@graphcommerce/magento-cart": "4.4.
|
|
27
|
-
"@graphcommerce/magento-store": "4.2.
|
|
28
|
-
"@graphcommerce/next-ui": "4.
|
|
26
|
+
"@graphcommerce/magento-cart": "4.4.7",
|
|
27
|
+
"@graphcommerce/magento-store": "4.2.13",
|
|
28
|
+
"@graphcommerce/next-ui": "4.11.1",
|
|
29
29
|
"@graphcommerce/react-hook-form": "3.2.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|