@graphcommerce/magento-cart-payment-method 3.3.2 → 3.3.5
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,42 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.3.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1538](https://github.com/graphcommerce-org/graphcommerce/pull/1538) [`fe4baa42d`](https://github.com/graphcommerce-org/graphcommerce/commit/fe4baa42db0081ed960d62aef688bd36a7ac974f) Thanks [@paales](https://github.com/paales)! - add missing translations
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`fe4baa42d`](https://github.com/graphcommerce-org/graphcommerce/commit/fe4baa42db0081ed960d62aef688bd36a7ac974f)]:
|
|
10
|
+
- @graphcommerce/magento-cart@4.4.8
|
|
11
|
+
- @graphcommerce/next-ui@4.11.2
|
|
12
|
+
- @graphcommerce/framer-scroller@2.1.20
|
|
13
|
+
- @graphcommerce/magento-store@4.2.14
|
|
14
|
+
|
|
15
|
+
## 3.3.4
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#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.
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [[`11bca2d2f`](https://github.com/graphcommerce-org/graphcommerce/commit/11bca2d2f7dbb7c5e2827c04eb0db43d4099f2fd)]:
|
|
22
|
+
- @graphcommerce/next-ui@4.11.1
|
|
23
|
+
- @graphcommerce/framer-scroller@2.1.19
|
|
24
|
+
- @graphcommerce/magento-cart@4.4.7
|
|
25
|
+
- @graphcommerce/magento-store@4.2.13
|
|
26
|
+
|
|
27
|
+
## 3.3.3
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [#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
|
|
32
|
+
|
|
33
|
+
- 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)]:
|
|
34
|
+
- @graphcommerce/magento-cart@4.4.6
|
|
35
|
+
- @graphcommerce/next-ui@4.11.0
|
|
36
|
+
- @graphcommerce/magento-store@4.2.12
|
|
37
|
+
- @graphcommerce/graphql@3.3.0
|
|
38
|
+
- @graphcommerce/framer-scroller@2.1.18
|
|
39
|
+
|
|
3
40
|
## 3.3.2
|
|
4
41
|
|
|
5
42
|
### 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
|
}
|
|
@@ -125,7 +125,7 @@ export function PaymentMethodToggles(props: PaymentMethodTogglesProps) {
|
|
|
125
125
|
defaultValue=''
|
|
126
126
|
control={control}
|
|
127
127
|
name='paymentMethod'
|
|
128
|
-
rules={{ required: i18n._(/* i18n */
|
|
128
|
+
rules={{ required: i18n._(/* i18n */ 'Please select a payment method') }}
|
|
129
129
|
render={({ field: { onChange, value, name, onBlur } }) => (
|
|
130
130
|
<Scroller
|
|
131
131
|
className={classes.scrollerRoot}
|
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.5",
|
|
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.4",
|
|
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.20",
|
|
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.8",
|
|
27
|
+
"@graphcommerce/magento-store": "4.2.14",
|
|
28
|
+
"@graphcommerce/next-ui": "4.11.2",
|
|
29
29
|
"@graphcommerce/react-hook-form": "3.2.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|