@graphcommerce/magento-cart-payment-method 3.0.0 β†’ 3.0.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.
@@ -1,4 +1,4 @@
1
- import { ButtonProps } from '@graphcommerce/next-ui/Button'
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: 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,99 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
8
+ Thanks [@paales](https://github.com/paales)! - made packages public
9
+
10
+ * [#1278](https://github.com/ho-nl/m2-pwa/pull/1278)
11
+ [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20)
12
+ Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Upgraded dependencies to the latest version
13
+
14
+ * Updated dependencies
15
+ [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96),
16
+ [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20),
17
+ [`3a719c88c`](https://github.com/ho-nl/m2-pwa/commit/3a719c88cad1eab58602de28c41adc0fc4827e1d),
18
+ [`5ffcb56bf`](https://github.com/ho-nl/m2-pwa/commit/5ffcb56bfcbe49ebeaf24f9341e819a145ab9a14)]:
19
+ - @graphcommerce/framer-scroller@2.0.3
20
+ - @graphcommerce/graphql@3.0.3
21
+ - @graphcommerce/image@3.1.0
22
+ - @graphcommerce/magento-cart@4.1.2
23
+ - @graphcommerce/magento-store@4.0.3
24
+ - @graphcommerce/next-ui@4.1.2
25
+ - @graphcommerce/react-hook-form@3.0.3
26
+
27
+ ## 3.0.2
28
+
29
+ ### Patch Changes
30
+
31
+ - [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
32
+ [`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7)
33
+ Thanks [@paales](https://github.com/paales)! - Moved `ApolloErrorAlert`, `ApolloErrorFullPage` and
34
+ `ApolloErrorSnackbar` to the ecommerce-ui package.
35
+
36
+ Created `ComposedSubmitButton` and `ComposedSubmitLinkOrButton` to reduce complexity from
37
+ `magento-graphcms` example.
38
+
39
+ Removed dependency an `@graphcommerce/react-hook-form` from `magento-graphcms` example.
40
+
41
+ Added dependency `@graphcommerce/ecommerce-ui` from `magento-graphcms` example.
42
+
43
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
44
+ [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
45
+ Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
46
+ `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
47
+ duplicate packages in the node_modules folders.
48
+
49
+ - [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
50
+ [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275)
51
+ Thanks [@paales](https://github.com/paales)! - Fixed extraction of translations and updated
52
+ various translations for english πŸ‡ΊπŸ‡ΈπŸ‡¬πŸ‡§ and dutch πŸ‡³πŸ‡±
53
+
54
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
55
+ [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
56
+ Thanks [@paales](https://github.com/paales)! - Upgraded to
57
+ [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
58
+ implementing
59
+ [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
60
+ soon.
61
+
62
+ This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
63
+ frontend to be able to revalidate pages manually.
64
+
65
+ * Updated dependencies
66
+ [[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7),
67
+ [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
68
+ [`e7c8e2756`](https://github.com/ho-nl/m2-pwa/commit/e7c8e2756d637cbcd2e793d62ef5721d35d9fa7b),
69
+ [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275),
70
+ [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d),
71
+ [`5a4809b1a`](https://github.com/ho-nl/m2-pwa/commit/5a4809b1a705aa32f620f520085df48ee25f9949)]:
72
+ - @graphcommerce/magento-cart@4.1.1
73
+ - @graphcommerce/next-ui@4.1.1
74
+ - @graphcommerce/react-hook-form@3.0.2
75
+ - @graphcommerce/framer-scroller@2.0.2
76
+ - @graphcommerce/graphql@3.0.2
77
+ - @graphcommerce/image@3.0.2
78
+ - @graphcommerce/magento-store@4.0.2
79
+
80
+ ## 3.0.1
81
+
82
+ ### Patch Changes
83
+
84
+ - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
85
+ Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
86
+ so that the packages link to back to the website and repository
87
+ - Updated dependencies
88
+ [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
89
+ - @graphcommerce/framer-scroller@2.0.1
90
+ - @graphcommerce/graphql@3.0.1
91
+ - @graphcommerce/image@3.0.1
92
+ - @graphcommerce/magento-cart@4.0.1
93
+ - @graphcommerce/magento-store@4.0.1
94
+ - @graphcommerce/next-ui@4.0.1
95
+ - @graphcommerce/react-hook-form@3.0.1
96
+
3
97
  ## 3.0.0
4
98
 
5
99
  ### Major 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 = ButtonProps & { display?: 'inline' | 'block' }
6
+ export type PaymentMethodButtonProps = LinkOrButtonProps & { display?: 'inline' | 'block' }
7
7
 
8
8
  export function PaymentMethodButtonRenderer(
9
- props: { buttonProps: ButtonProps } & ComposedSubmitRenderComponentProps,
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
- <Button
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
- </Button>
33
+ </LinkOrButton>
34
34
  ) : (
35
35
  <PaymentButton
36
36
  {...selectedMethod}
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-cart-payment-method",
3
- "version": "3.0.0",
3
+ "homepage": "https://www.graphcommerce.org/",
4
+ "repository": "github:graphcommerce-org/graphcommerce",
5
+ "version": "3.0.3",
4
6
  "sideEffects": false,
5
7
  "engines": {
6
8
  "node": "14.x"
@@ -13,25 +15,27 @@
13
15
  }
14
16
  },
15
17
  "devDependencies": {
16
- "@graphcommerce/eslint-config-pwa": "^4.0.0",
17
- "@graphcommerce/prettier-config-pwa": "^4.0.0",
18
- "@graphcommerce/typescript-config-pwa": "^4.0.0",
19
- "@playwright/test": "^1.18.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"
20
22
  },
21
23
  "dependencies": {
22
- "@graphcommerce/framer-scroller": "^2.0.0",
23
- "@graphcommerce/graphql": "^3.0.0",
24
- "@graphcommerce/image": "^3.0.0",
25
- "@graphcommerce/magento-cart": "^4.0.0",
26
- "@graphcommerce/magento-store": "^4.0.0",
27
- "@graphcommerce/next-ui": "^4.0.0",
28
- "@graphcommerce/react-hook-form": "^3.0.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.2",
28
+ "@graphcommerce/magento-store": "^4.0.3",
29
+ "@graphcommerce/next-ui": "^4.1.2",
30
+ "@graphcommerce/react-hook-form": "^3.0.3",
31
+ "type-fest": "^2.12.0"
32
+ },
33
+ "peerDependencies": {
29
34
  "@lingui/macro": "^3.13.2",
30
35
  "@mui/material": "^5.4.1",
31
36
  "framer-motion": "^6.2.4",
32
37
  "next": "^12.0.10",
33
38
  "react": "^17.0.1",
34
- "react-dom": "^17.0.1",
35
- "type-fest": "^2.11.2"
39
+ "react-dom": "^17.0.1"
36
40
  }
37
41
  }