@graphcommerce/magento-cart-payment-method 3.3.0 → 3.3.3
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,31 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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
|
|
8
|
+
|
|
9
|
+
- 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)]:
|
|
10
|
+
- @graphcommerce/magento-cart@4.4.6
|
|
11
|
+
- @graphcommerce/next-ui@4.11.0
|
|
12
|
+
- @graphcommerce/magento-store@4.2.12
|
|
13
|
+
- @graphcommerce/graphql@3.3.0
|
|
14
|
+
- @graphcommerce/framer-scroller@2.1.18
|
|
15
|
+
|
|
16
|
+
## 3.3.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies []:
|
|
21
|
+
- @graphcommerce/magento-cart@4.4.5
|
|
22
|
+
|
|
23
|
+
## 3.3.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- [#1519](https://github.com/graphcommerce-org/graphcommerce/pull/1519) [`64c7b6b45`](https://github.com/graphcommerce-org/graphcommerce/commit/64c7b6b4595a13110453f98680ffd69f27f2c656) Thanks [@paales](https://github.com/paales)! - mollie_meta should not be in general package
|
|
28
|
+
|
|
3
29
|
## 3.3.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -27,12 +27,15 @@ function PaymentMethodActionCard(
|
|
|
27
27
|
sx?: SxProps<Theme>
|
|
28
28
|
},
|
|
29
29
|
) {
|
|
30
|
-
const { onReset, code, step,
|
|
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
|
-
const iconSize = useIconSvgSize('large')
|
|
36
39
|
|
|
37
40
|
return (
|
|
38
41
|
<Card
|
|
@@ -43,18 +46,6 @@ function PaymentMethodActionCard(
|
|
|
43
46
|
},
|
|
44
47
|
...(Array.isArray(sx) ? sx : [sx]),
|
|
45
48
|
]}
|
|
46
|
-
image={
|
|
47
|
-
mollie_meta?.image && (
|
|
48
|
-
<Image
|
|
49
|
-
layout='fixed'
|
|
50
|
-
sx={{ width: iconSize, height: iconSize }}
|
|
51
|
-
width={0}
|
|
52
|
-
height={0}
|
|
53
|
-
unoptimized
|
|
54
|
-
src={mollie_meta?.image}
|
|
55
|
-
/>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
49
|
action={
|
|
59
50
|
<Button disableRipple variant='inline' color='secondary'>
|
|
60
51
|
<Trans id='Select' />
|
|
@@ -95,6 +86,7 @@ export function PaymentMethodActionCardListForm(props: PaymentMethodActionCardLi
|
|
|
95
86
|
useFormPersist({ form, name: 'PaymentMethodActionCardList' })
|
|
96
87
|
useFormCompose({ form, step: 1, submit, key: 'PaymentMethodActionCardList' })
|
|
97
88
|
|
|
89
|
+
// todo: Do not useEffect to set value, usePaymentMethodContext should calculate these values.
|
|
98
90
|
useEffect(() => {
|
|
99
91
|
const [code, child] = paymentMethod?.split('___') ?? ['']
|
|
100
92
|
if (code === selectedMethod?.code) return
|
|
@@ -116,20 +108,17 @@ export function PaymentMethodActionCardListForm(props: PaymentMethodActionCardLi
|
|
|
116
108
|
if (!methods || methods.length < 1) return null
|
|
117
109
|
|
|
118
110
|
return (
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
/>
|
|
132
|
-
{/* <ApolloCartErrorAlert error={error} /> */}
|
|
133
|
-
</Form>
|
|
111
|
+
<ActionCardListForm<PaymentOptionsProps & ActionCardItemBase>
|
|
112
|
+
control={control}
|
|
113
|
+
name='paymentMethod'
|
|
114
|
+
errorMessage='Please select a shipping address'
|
|
115
|
+
items={methods.map((method) => ({
|
|
116
|
+
...method,
|
|
117
|
+
value: method.code,
|
|
118
|
+
step,
|
|
119
|
+
Container: FormDiv,
|
|
120
|
+
}))}
|
|
121
|
+
render={PaymentMethodActionCard}
|
|
122
|
+
/>
|
|
134
123
|
)
|
|
135
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.3",
|
|
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.2",
|
|
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.18",
|
|
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.6",
|
|
27
|
+
"@graphcommerce/magento-store": "4.2.12",
|
|
28
|
+
"@graphcommerce/next-ui": "4.11.0",
|
|
29
29
|
"@graphcommerce/react-hook-form": "3.2.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|