@graphcommerce/magento-cart-payment-method 3.6.3 → 3.6.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,19 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.6.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1672](https://github.com/graphcommerce-org/graphcommerce/pull/1672) [`82a0c9049`](https://github.com/graphcommerce-org/graphcommerce/commit/82a0c904992f104bc1ffc3b1be65eb17bdd0ef1d) Thanks [@FrankHarland](https://github.com/FrankHarland)! - Add translation to paymentmethod form
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`9e630670f`](https://github.com/graphcommerce-org/graphcommerce/commit/9e630670ff6c952ab7b938d890b5509804985cf3), [`cf3518499`](https://github.com/graphcommerce-org/graphcommerce/commit/cf351849999ad6fe73ce2bb258098a7dd301d517), [`81f31d1e5`](https://github.com/graphcommerce-org/graphcommerce/commit/81f31d1e54397368088a4289aaddd29facfceeef), [`2e9fa5984`](https://github.com/graphcommerce-org/graphcommerce/commit/2e9fa5984a07ff14fc1b3a4f62189a26e8e3ecdd), [`adf13069a`](https://github.com/graphcommerce-org/graphcommerce/commit/adf13069af6460c960276b402237371c12fc6dec), [`a8905d263`](https://github.com/graphcommerce-org/graphcommerce/commit/a8905d263273cb9322583d5759a5fdc66eceb8e4), [`1b1504c9b`](https://github.com/graphcommerce-org/graphcommerce/commit/1b1504c9b0e51f2787bce91e1ff1940f540411d6), [`8a34f8081`](https://github.com/graphcommerce-org/graphcommerce/commit/8a34f808186274a6fe1d4f309472f1a9c6d00efd), [`3dde492ad`](https://github.com/graphcommerce-org/graphcommerce/commit/3dde492ad3a49d96481eeb7453fb305d0017b1a5)]:
|
|
10
|
+
- @graphcommerce/next-ui@4.28.1
|
|
11
|
+
- @graphcommerce/graphql@3.5.0
|
|
12
|
+
- @graphcommerce/framer-scroller@2.1.41
|
|
13
|
+
- @graphcommerce/magento-cart@4.9.0
|
|
14
|
+
- @graphcommerce/magento-store@4.3.2
|
|
15
|
+
- @graphcommerce/image@3.1.10
|
|
16
|
+
|
|
3
17
|
## 3.6.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
UseFormComposeOptions,
|
|
13
13
|
useFormPersist,
|
|
14
14
|
} from '@graphcommerce/react-hook-form'
|
|
15
|
+
import { i18n } from '@lingui/core'
|
|
15
16
|
import { Trans } from '@lingui/react'
|
|
16
17
|
import { SxProps, Theme } from '@mui/material'
|
|
17
18
|
import { useEffect } from 'react'
|
|
@@ -112,7 +113,7 @@ export function PaymentMethodActionCardListForm(props: PaymentMethodActionCardLi
|
|
|
112
113
|
<ActionCardListForm<PaymentOptionsProps & ActionCardItemBase>
|
|
113
114
|
control={control}
|
|
114
115
|
name='paymentMethod'
|
|
115
|
-
errorMessage='Please select a payment method'
|
|
116
|
+
errorMessage={i18n._(/* i18n */ 'Please select a payment method')}
|
|
116
117
|
collapse
|
|
117
118
|
size='large'
|
|
118
119
|
color='secondary'
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { ApolloCartErrorSnackbar } from '@graphcommerce/magento-cart'
|
|
2
2
|
import { LinkOrButton, LinkOrButtonProps } from '@graphcommerce/next-ui'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ComposedSubmit,
|
|
5
|
+
ComposedSubmitProps,
|
|
6
|
+
ComposedSubmitRenderComponentProps,
|
|
7
|
+
} from '@graphcommerce/react-hook-form'
|
|
4
8
|
import { usePaymentMethodContext } from '../PaymentMethodContext/PaymentMethodContext'
|
|
5
9
|
|
|
6
|
-
export type PaymentMethodButtonProps = LinkOrButtonProps & { display?: 'inline' | 'block' }
|
|
10
|
+
export type PaymentMethodButtonProps = LinkOrButtonProps & { display?: 'inline' | 'block' } & Pick<
|
|
11
|
+
ComposedSubmitProps,
|
|
12
|
+
'onSubmitSuccessful'
|
|
13
|
+
>
|
|
7
14
|
|
|
8
15
|
function PaymentMethodButtonRenderer(
|
|
9
16
|
props: { buttonProps: LinkOrButtonProps } & ComposedSubmitRenderComponentProps,
|
|
@@ -44,10 +51,11 @@ function PaymentMethodButtonRenderer(
|
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
export function PaymentMethodButton(props: PaymentMethodButtonProps) {
|
|
47
|
-
const { display, ...buttonProps } = props
|
|
54
|
+
const { display, onSubmitSuccessful, ...buttonProps } = props
|
|
48
55
|
|
|
49
56
|
return (
|
|
50
57
|
<ComposedSubmit
|
|
58
|
+
onSubmitSuccessful={onSubmitSuccessful}
|
|
51
59
|
render={({ submit, buttonState, error }) => {
|
|
52
60
|
const errorVal = buttonState.isSubmitting ? undefined : error
|
|
53
61
|
const button = (
|
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.6.
|
|
5
|
+
"version": "3.6.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.10",
|
|
16
16
|
"@graphcommerce/prettier-config-pwa": "^4.0.6",
|
|
17
17
|
"@graphcommerce/typescript-config-pwa": "^4.0.4",
|
|
18
|
-
"@graphcommerce/magento-cart-shipping-address": "3.5.
|
|
18
|
+
"@graphcommerce/magento-cart-shipping-address": "3.5.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.
|
|
25
|
-
"@graphcommerce/image": "3.1.
|
|
26
|
-
"@graphcommerce/magento-cart": "4.
|
|
27
|
-
"@graphcommerce/magento-store": "4.3.
|
|
28
|
-
"@graphcommerce/next-ui": "4.28.
|
|
23
|
+
"@graphcommerce/framer-scroller": "2.1.41",
|
|
24
|
+
"@graphcommerce/graphql": "3.5.0",
|
|
25
|
+
"@graphcommerce/image": "3.1.10",
|
|
26
|
+
"@graphcommerce/magento-cart": "4.9.0",
|
|
27
|
+
"@graphcommerce/magento-store": "4.3.2",
|
|
28
|
+
"@graphcommerce/next-ui": "4.28.1",
|
|
29
29
|
"@graphcommerce/react-hook-form": "3.3.5"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|