@graphcommerce/magento-cart-payment-method 3.0.1 β 3.0.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/Api/PaymentMethod.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LinkOrButtonProps } from '@graphcommerce/next-ui'
|
|
2
2
|
import { UseFormComposeOptions } from '@graphcommerce/react-hook-form'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { AvailablePaymentMethodFragment } from './AvailablePaymentMethod/AvailablePaymentMethod.gql'
|
|
@@ -15,7 +15,7 @@ export type PaymentMethod = Partial<AvailablePaymentMethodFragment> &
|
|
|
15
15
|
export type PaymentMethodOptionsProps = Pick<UseFormComposeOptions, 'step'> & {
|
|
16
16
|
Container: React.FC
|
|
17
17
|
}
|
|
18
|
-
export type PaymentButtonProps = PaymentMethod & { buttonProps:
|
|
18
|
+
export type PaymentButtonProps = PaymentMethod & { buttonProps: LinkOrButtonProps }
|
|
19
19
|
export type PaymentOptionsProps = PaymentMethod & PaymentMethodOptionsProps
|
|
20
20
|
|
|
21
21
|
export type PaymentToggleProps = PaymentMethod
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,98 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1292](https://github.com/ho-nl/m2-pwa/pull/1292)
|
|
8
|
+
[`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0)
|
|
9
|
+
Thanks [@paales](https://github.com/paales)! - Renamed SvgIcon to IconSvg to prevent collisions
|
|
10
|
+
with MUI
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
[[`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0),
|
|
14
|
+
[`990df655b`](https://github.com/ho-nl/m2-pwa/commit/990df655b73b469718d6cb5837ee65dfe2ad6a1d),
|
|
15
|
+
[`63f9b56eb`](https://github.com/ho-nl/m2-pwa/commit/63f9b56eb68ba790567ff1427e599fd2c3c8f1ee)]:
|
|
16
|
+
- @graphcommerce/magento-cart@4.1.3
|
|
17
|
+
- @graphcommerce/next-ui@4.2.0
|
|
18
|
+
|
|
19
|
+
## 3.0.3
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
|
|
24
|
+
Thanks [@paales](https://github.com/paales)! - made packages public
|
|
25
|
+
|
|
26
|
+
* [#1278](https://github.com/ho-nl/m2-pwa/pull/1278)
|
|
27
|
+
[`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20)
|
|
28
|
+
Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Upgraded dependencies to the latest version
|
|
29
|
+
|
|
30
|
+
* Updated dependencies
|
|
31
|
+
[[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96),
|
|
32
|
+
[`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20),
|
|
33
|
+
[`3a719c88c`](https://github.com/ho-nl/m2-pwa/commit/3a719c88cad1eab58602de28c41adc0fc4827e1d),
|
|
34
|
+
[`5ffcb56bf`](https://github.com/ho-nl/m2-pwa/commit/5ffcb56bfcbe49ebeaf24f9341e819a145ab9a14)]:
|
|
35
|
+
- @graphcommerce/framer-scroller@2.0.3
|
|
36
|
+
- @graphcommerce/graphql@3.0.3
|
|
37
|
+
- @graphcommerce/image@3.1.0
|
|
38
|
+
- @graphcommerce/magento-cart@4.1.2
|
|
39
|
+
- @graphcommerce/magento-store@4.0.3
|
|
40
|
+
- @graphcommerce/next-ui@4.1.2
|
|
41
|
+
- @graphcommerce/react-hook-form@3.0.3
|
|
42
|
+
|
|
43
|
+
## 3.0.2
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
|
|
48
|
+
[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7)
|
|
49
|
+
Thanks [@paales](https://github.com/paales)! - Moved `ApolloErrorAlert`, `ApolloErrorFullPage` and
|
|
50
|
+
`ApolloErrorSnackbar` to the ecommerce-ui package.
|
|
51
|
+
|
|
52
|
+
Created `ComposedSubmitButton` and `ComposedSubmitLinkOrButton` to reduce complexity from
|
|
53
|
+
`magento-graphcms` example.
|
|
54
|
+
|
|
55
|
+
Removed dependency an `@graphcommerce/react-hook-form` from `magento-graphcms` example.
|
|
56
|
+
|
|
57
|
+
Added dependency `@graphcommerce/ecommerce-ui` from `magento-graphcms` example.
|
|
58
|
+
|
|
59
|
+
* [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
|
|
60
|
+
[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
|
|
61
|
+
Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
|
|
62
|
+
`dependencies` to `peerDependencies`. The result of this is that there will be significantly less
|
|
63
|
+
duplicate packages in the node_modules folders.
|
|
64
|
+
|
|
65
|
+
- [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
|
|
66
|
+
[`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275)
|
|
67
|
+
Thanks [@paales](https://github.com/paales)! - Fixed extraction of translations and updated
|
|
68
|
+
various translations for english πΊπΈπ¬π§ and dutch π³π±
|
|
69
|
+
|
|
70
|
+
* [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
|
|
71
|
+
[`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
|
|
72
|
+
Thanks [@paales](https://github.com/paales)! - Upgraded to
|
|
73
|
+
[NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
|
|
74
|
+
implementing
|
|
75
|
+
[On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
|
|
76
|
+
soon.
|
|
77
|
+
|
|
78
|
+
This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
|
|
79
|
+
frontend to be able to revalidate pages manually.
|
|
80
|
+
|
|
81
|
+
* Updated dependencies
|
|
82
|
+
[[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7),
|
|
83
|
+
[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
|
|
84
|
+
[`e7c8e2756`](https://github.com/ho-nl/m2-pwa/commit/e7c8e2756d637cbcd2e793d62ef5721d35d9fa7b),
|
|
85
|
+
[`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275),
|
|
86
|
+
[`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d),
|
|
87
|
+
[`5a4809b1a`](https://github.com/ho-nl/m2-pwa/commit/5a4809b1a705aa32f620f520085df48ee25f9949)]:
|
|
88
|
+
- @graphcommerce/magento-cart@4.1.1
|
|
89
|
+
- @graphcommerce/next-ui@4.1.1
|
|
90
|
+
- @graphcommerce/react-hook-form@3.0.2
|
|
91
|
+
- @graphcommerce/framer-scroller@2.0.2
|
|
92
|
+
- @graphcommerce/graphql@3.0.2
|
|
93
|
+
- @graphcommerce/image@3.0.2
|
|
94
|
+
- @graphcommerce/magento-store@4.0.2
|
|
95
|
+
|
|
3
96
|
## 3.0.1
|
|
4
97
|
|
|
5
98
|
### Patch Changes
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ApolloCartErrorAlert } from '@graphcommerce/magento-cart'
|
|
2
|
-
import { Button, ButtonProps } from '@graphcommerce/next-ui'
|
|
2
|
+
import { Button, ButtonProps, LinkOrButton, LinkOrButtonProps } from '@graphcommerce/next-ui'
|
|
3
3
|
import { ComposedSubmit, ComposedSubmitRenderComponentProps } from '@graphcommerce/react-hook-form'
|
|
4
4
|
import { usePaymentMethodContext } from '../PaymentMethodContext/PaymentMethodContext'
|
|
5
5
|
|
|
6
|
-
export type PaymentMethodButtonProps =
|
|
6
|
+
export type PaymentMethodButtonProps = LinkOrButtonProps & { display?: 'inline' | 'block' }
|
|
7
7
|
|
|
8
8
|
export function PaymentMethodButtonRenderer(
|
|
9
|
-
props: { buttonProps:
|
|
9
|
+
props: { buttonProps: LinkOrButtonProps } & ComposedSubmitRenderComponentProps,
|
|
10
10
|
) {
|
|
11
11
|
const { buttonProps, error, buttonState, submit } = props
|
|
12
12
|
const { selectedMethod, selectedModule } = usePaymentMethodContext()
|
|
@@ -18,7 +18,7 @@ export function PaymentMethodButtonRenderer(
|
|
|
18
18
|
return (
|
|
19
19
|
<>
|
|
20
20
|
{!PaymentButton || !selectedMethod?.code ? (
|
|
21
|
-
<
|
|
21
|
+
<LinkOrButton
|
|
22
22
|
{...btnProps}
|
|
23
23
|
onClick={submit}
|
|
24
24
|
loading={buttonState.isSubmitting || (buttonState.isSubmitSuccessful && !error)}
|
|
@@ -30,7 +30,7 @@ export function PaymentMethodButtonRenderer(
|
|
|
30
30
|
(<em>{selectedMethod?.title}</em>)
|
|
31
31
|
</>
|
|
32
32
|
)}
|
|
33
|
-
</
|
|
33
|
+
</LinkOrButton>
|
|
34
34
|
) : (
|
|
35
35
|
<PaymentButton
|
|
36
36
|
{...selectedMethod}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
iconChevronLeft,
|
|
6
6
|
iconChevronRight,
|
|
7
7
|
responsiveVal,
|
|
8
|
-
|
|
8
|
+
IconSvg,
|
|
9
9
|
ToggleButton,
|
|
10
10
|
extendableComponent,
|
|
11
11
|
} from '@graphcommerce/next-ui'
|
|
@@ -117,7 +117,7 @@ export default function PaymentMethodToggles(props: PaymentMethodTogglesProps) {
|
|
|
117
117
|
borderBottomLeftRadius: 4,
|
|
118
118
|
})}
|
|
119
119
|
>
|
|
120
|
-
<
|
|
120
|
+
<IconSvg src={iconChevronLeft} size='small' />
|
|
121
121
|
</ScrollerButton>
|
|
122
122
|
</Box>
|
|
123
123
|
|
|
@@ -209,7 +209,7 @@ export default function PaymentMethodToggles(props: PaymentMethodTogglesProps) {
|
|
|
209
209
|
borderBottomRightRadius: 4,
|
|
210
210
|
})}
|
|
211
211
|
>
|
|
212
|
-
<
|
|
212
|
+
<IconSvg src={iconChevronRight} size='small' />
|
|
213
213
|
</ScrollerButton>
|
|
214
214
|
</Box>
|
|
215
215
|
</ScrollerProvider>
|
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.0.
|
|
5
|
+
"version": "3.0.4",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": "14.x"
|
|
@@ -15,25 +15,27 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@graphcommerce/eslint-config-pwa": "^4.0.
|
|
19
|
-
"@graphcommerce/prettier-config-pwa": "^4.0.
|
|
20
|
-
"@graphcommerce/typescript-config-pwa": "^4.0.
|
|
21
|
-
"@playwright/test": "^1.
|
|
18
|
+
"@graphcommerce/eslint-config-pwa": "^4.0.3",
|
|
19
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.2",
|
|
20
|
+
"@graphcommerce/typescript-config-pwa": "^4.0.2",
|
|
21
|
+
"@playwright/test": "^1.19.1"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@graphcommerce/framer-scroller": "^2.0.
|
|
25
|
-
"@graphcommerce/graphql": "^3.0.
|
|
26
|
-
"@graphcommerce/image": "^3.0
|
|
27
|
-
"@graphcommerce/magento-cart": "^4.
|
|
28
|
-
"@graphcommerce/magento-store": "^4.0.
|
|
29
|
-
"@graphcommerce/next-ui": "^4.0
|
|
30
|
-
"@graphcommerce/react-hook-form": "^3.0.
|
|
24
|
+
"@graphcommerce/framer-scroller": "^2.0.3",
|
|
25
|
+
"@graphcommerce/graphql": "^3.0.3",
|
|
26
|
+
"@graphcommerce/image": "^3.1.0",
|
|
27
|
+
"@graphcommerce/magento-cart": "^4.1.3",
|
|
28
|
+
"@graphcommerce/magento-store": "^4.0.3",
|
|
29
|
+
"@graphcommerce/next-ui": "^4.2.0",
|
|
30
|
+
"@graphcommerce/react-hook-form": "^3.0.3",
|
|
31
|
+
"type-fest": "^2.12.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
31
34
|
"@lingui/macro": "^3.13.2",
|
|
32
35
|
"@mui/material": "^5.4.1",
|
|
33
36
|
"framer-motion": "^6.2.4",
|
|
34
37
|
"next": "^12.0.10",
|
|
35
38
|
"react": "^17.0.1",
|
|
36
|
-
"react-dom": "^17.0.1"
|
|
37
|
-
"type-fest": "^2.11.2"
|
|
39
|
+
"react-dom": "^17.0.1"
|
|
38
40
|
}
|
|
39
41
|
}
|