@graphcommerce/magento-cart-payment-method 3.0.1 β†’ 3.0.2

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,58 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
8
+ [`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7)
9
+ Thanks [@paales](https://github.com/paales)! - Moved `ApolloErrorAlert`, `ApolloErrorFullPage` and
10
+ `ApolloErrorSnackbar` to the ecommerce-ui package.
11
+
12
+ Created `ComposedSubmitButton` and `ComposedSubmitLinkOrButton` to reduce complexity from
13
+ `magento-graphcms` example.
14
+
15
+ Removed dependency an `@graphcommerce/react-hook-form` from `magento-graphcms` example.
16
+
17
+ Added dependency `@graphcommerce/ecommerce-ui` from `magento-graphcms` example.
18
+
19
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
20
+ [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
21
+ Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
22
+ `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
23
+ duplicate packages in the node_modules folders.
24
+
25
+ - [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
26
+ [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275)
27
+ Thanks [@paales](https://github.com/paales)! - Fixed extraction of translations and updated
28
+ various translations for english πŸ‡ΊπŸ‡ΈπŸ‡¬πŸ‡§ and dutch πŸ‡³πŸ‡±
29
+
30
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
31
+ [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
32
+ Thanks [@paales](https://github.com/paales)! - Upgraded to
33
+ [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
34
+ implementing
35
+ [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
36
+ soon.
37
+
38
+ This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
39
+ frontend to be able to revalidate pages manually.
40
+
41
+ * Updated dependencies
42
+ [[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7),
43
+ [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
44
+ [`e7c8e2756`](https://github.com/ho-nl/m2-pwa/commit/e7c8e2756d637cbcd2e793d62ef5721d35d9fa7b),
45
+ [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275),
46
+ [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d),
47
+ [`5a4809b1a`](https://github.com/ho-nl/m2-pwa/commit/5a4809b1a705aa32f620f520085df48ee25f9949)]:
48
+ - @graphcommerce/magento-cart@4.1.1
49
+ - @graphcommerce/next-ui@4.1.1
50
+ - @graphcommerce/react-hook-form@3.0.2
51
+ - @graphcommerce/framer-scroller@2.0.2
52
+ - @graphcommerce/graphql@3.0.2
53
+ - @graphcommerce/image@3.0.2
54
+ - @graphcommerce/magento-store@4.0.2
55
+
3
56
  ## 3.0.1
4
57
 
5
58
  ### 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 = 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
@@ -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.1",
5
+ "version": "3.0.2",
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.1",
18
+ "@graphcommerce/eslint-config-pwa": "^4.0.2",
19
19
  "@graphcommerce/prettier-config-pwa": "^4.0.1",
20
20
  "@graphcommerce/typescript-config-pwa": "^4.0.1",
21
- "@playwright/test": "^1.18.1"
21
+ "@playwright/test": "^1.19.1"
22
22
  },
23
23
  "dependencies": {
24
- "@graphcommerce/framer-scroller": "^2.0.1",
25
- "@graphcommerce/graphql": "^3.0.1",
26
- "@graphcommerce/image": "^3.0.1",
27
- "@graphcommerce/magento-cart": "^4.0.1",
28
- "@graphcommerce/magento-store": "^4.0.1",
29
- "@graphcommerce/next-ui": "^4.0.1",
30
- "@graphcommerce/react-hook-form": "^3.0.1",
24
+ "@graphcommerce/framer-scroller": "^2.0.2",
25
+ "@graphcommerce/graphql": "^3.0.2",
26
+ "@graphcommerce/image": "^3.0.2",
27
+ "@graphcommerce/magento-cart": "^4.1.1",
28
+ "@graphcommerce/magento-store": "^4.0.2",
29
+ "@graphcommerce/next-ui": "^4.1.1",
30
+ "@graphcommerce/react-hook-form": "^3.0.2",
31
+ "type-fest": "^2.11.2"
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
  }