@graphcommerce/mollie-magento-payment 2.106.48 → 3.0.0

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,115 +1,104 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3
+ ## 3.0.0
5
4
 
6
- ## [2.106.24](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/mollie-magento-payment@2.106.23...@graphcommerce/mollie-magento-payment@2.106.24) (2021-12-20)
5
+ ### Major Changes
7
6
 
7
+ - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
8
+ [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
9
+ Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
8
10
 
9
- ### Bug Fixes
11
+ ### Patch Changes
10
12
 
11
- * animations would run on background page, make sure animations are not running when page is not active ([2fcf4b8](https://github.com/ho-nl/m2-pwa/commit/2fcf4b8a853108147477e3a67c7ea202abb2842f))
13
+ - Updated dependencies
14
+ [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
15
+ - @graphcommerce/graphql@3.0.0
16
+ - @graphcommerce/image@3.0.0
17
+ - @graphcommerce/magento-cart@4.0.0
18
+ - @graphcommerce/magento-cart-payment-method@3.0.0
19
+ - @graphcommerce/magento-store@4.0.0
20
+ - @graphcommerce/next-ui@4.0.0
21
+ - @graphcommerce/react-hook-form@3.0.0
12
22
 
23
+ All notable changes to this project will be documented in this file. See
24
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
13
25
 
26
+ ## [2.106.24](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/mollie-magento-payment@2.106.23...@graphcommerce/mollie-magento-payment@2.106.24) (2021-12-20)
14
27
 
28
+ ### Bug Fixes
15
29
 
30
+ - animations would run on background page, make sure animations are not running when page is not
31
+ active
32
+ ([2fcf4b8](https://github.com/ho-nl/m2-pwa/commit/2fcf4b8a853108147477e3a67c7ea202abb2842f))
16
33
 
17
34
  # [2.106.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/mollie-magento-payment@2.105.32...@graphcommerce/mollie-magento-payment@2.106.0) (2021-11-12)
18
35
 
19
-
20
36
  ### Features
21
37
 
22
- * added tons of translations ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
23
-
24
-
25
-
26
-
38
+ - added tons of translations
39
+ ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
27
40
 
28
41
  ## [2.105.9](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/mollie-magento-payment@2.105.8...@graphcommerce/mollie-magento-payment@2.105.9) (2021-11-02)
29
42
 
30
-
31
43
  ### Bug Fixes
32
44
 
33
- * input labels ([ba46c9a](https://github.com/ho-nl/m2-pwa/commit/ba46c9a17b3b460daab5015df39ac9ae66858df4))
34
- * overlapping checkmark icon ([b4da61a](https://github.com/ho-nl/m2-pwa/commit/b4da61ae33ab058a56f0f32c2874a2e77d77d01d))
35
-
36
-
37
-
38
-
45
+ - input labels
46
+ ([ba46c9a](https://github.com/ho-nl/m2-pwa/commit/ba46c9a17b3b460daab5015df39ac9ae66858df4))
47
+ - overlapping checkmark icon
48
+ ([b4da61a](https://github.com/ho-nl/m2-pwa/commit/b4da61ae33ab058a56f0f32c2874a2e77d77d01d))
39
49
 
40
50
  # [2.105.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/mollie-magento-payment@2.104.33...@graphcommerce/mollie-magento-payment@2.105.0) (2021-10-27)
41
51
 
42
-
43
52
  ### Features
44
53
 
45
- * **nextjs:** upgraded to nextjs 12 ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
46
-
47
-
48
-
49
-
54
+ - **nextjs:** upgraded to nextjs 12
55
+ ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
50
56
 
51
57
  ## [2.104.13](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/mollie-magento-payment@2.104.12...@graphcommerce/mollie-magento-payment@2.104.13) (2021-10-08)
52
58
 
53
-
54
59
  ### Bug Fixes
55
60
 
56
- * **mollie:** make sure we're redirected to the success page ([316d2b2](https://github.com/ho-nl/m2-pwa/commit/316d2b2a99189f093e74db98521c27e8e7267dd4))
57
-
58
-
59
-
60
-
61
+ - **mollie:** make sure we're redirected to the success page
62
+ ([316d2b2](https://github.com/ho-nl/m2-pwa/commit/316d2b2a99189f093e74db98521c27e8e7267dd4))
61
63
 
62
64
  ## [2.104.11](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/mollie-magento-payment@2.104.10...@graphcommerce/mollie-magento-payment@2.104.11) (2021-10-07)
63
65
 
64
-
65
66
  ### Bug Fixes
66
67
 
67
- * make sure if no payment method is filled in we get an error shown ([a203e57](https://github.com/ho-nl/m2-pwa/commit/a203e570caad0732427a178e8e8b10b4a15d676b))
68
-
69
-
70
-
71
-
68
+ - make sure if no payment method is filled in we get an error shown
69
+ ([a203e57](https://github.com/ho-nl/m2-pwa/commit/a203e570caad0732427a178e8e8b10b4a15d676b))
72
70
 
73
71
  # 2.104.0 (2021-09-29)
74
72
 
75
-
76
73
  ### Bug Fixes
77
74
 
78
- * make sure mollie only gets build optionally ([e5e2347](https://github.com/ho-nl/m2-pwa/commit/e5e23475e170dc2fc0c13103dfb8fbdb9009715f))
79
- * make sure the mollie module doesn't start with magento- to prevent building from node moduels ([ed406b9](https://github.com/ho-nl/m2-pwa/commit/ed406b9f56bd8cb5df0463cc50e4b1e9a728d4ca))
80
-
75
+ - make sure mollie only gets build optionally
76
+ ([e5e2347](https://github.com/ho-nl/m2-pwa/commit/e5e23475e170dc2fc0c13103dfb8fbdb9009715f))
77
+ - make sure the mollie module doesn't start with magento- to prevent building from node moduels
78
+ ([ed406b9](https://github.com/ho-nl/m2-pwa/commit/ed406b9f56bd8cb5df0463cc50e4b1e9a728d4ca))
81
79
 
82
80
  ### Features
83
81
 
84
- * renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
85
-
86
-
87
-
88
-
82
+ - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
83
+ [@reachdigital](https://github.com/reachdigital)
84
+ ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
89
85
 
90
86
  ## [2.103.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-payment-mollie@2.103.0...@graphcommerce/magento-payment-mollie@2.103.1) (2021-09-27)
91
87
 
92
88
  **Note:** Version bump only for package @graphcommerce/magento-payment-mollie
93
89
 
94
-
95
-
96
-
97
-
98
90
  # 2.103.0 (2021-09-27)
99
91
 
100
-
101
92
  ### Bug Fixes
102
93
 
103
- * make sure mollie only gets build optionally ([e5e2347](https://github.com/ho-nl/m2-pwa/commit/e5e23475e170dc2fc0c13103dfb8fbdb9009715f))
104
-
94
+ - make sure mollie only gets build optionally
95
+ ([e5e2347](https://github.com/ho-nl/m2-pwa/commit/e5e23475e170dc2fc0c13103dfb8fbdb9009715f))
105
96
 
106
97
  ### Features
107
98
 
108
- * renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
109
-
110
-
111
-
112
-
99
+ - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
100
+ [@reachdigital](https://github.com/reachdigital)
101
+ ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
113
102
 
114
103
  # Change Log
115
104
 
@@ -1,29 +1,20 @@
1
1
  import { useFormGqlMutationCart } from '@graphcommerce/magento-cart'
2
2
  import { PaymentOptionsProps } from '@graphcommerce/magento-cart-payment-method'
3
- import { FormRow, InputCheckmark } from '@graphcommerce/next-ui'
3
+ import { extendableComponent, FormRow, InputCheckmark } from '@graphcommerce/next-ui'
4
4
  import { useFormCompose, useFormPersist, useFormValidFields } from '@graphcommerce/react-hook-form'
5
5
  import { Trans } from '@lingui/macro'
6
- import { makeStyles, TextField, Theme, Typography } from '@material-ui/core'
7
- import React from 'react'
6
+ import { Box, TextField, Typography } from '@mui/material'
8
7
  import { SetMolliePaymentMethodIssuerOnCartDocument } from './SetMolliePaymentMethodIssuerOnCart.gql'
9
8
 
10
9
  type MollieIssuerOptionsProps = PaymentOptionsProps & { label: string }
11
10
 
12
- const useStyles = makeStyles(
13
- (theme: Theme) => ({
14
- root: {
15
- ...theme.typography.body2,
16
- paddingLeft: theme.spacings.xs,
17
- margin: 0,
18
- },
19
- }),
20
- { name: 'MollieIssuerOptions' },
21
- )
11
+ const compName = 'MollieIssuerOptions' as const
12
+ const parts = ['root', 'list'] as const
13
+ const { classes } = extendableComponent(compName, parts)
22
14
 
23
15
  export default function MollieIssuerOptions(props: MollieIssuerOptionsProps) {
24
16
  const { mollie_available_issuers = [] } = props
25
- const { code, step, Container, label, title } = props
26
- const classes = useStyles()
17
+ const { code, step, Container, label, title = '' } = props
27
18
 
28
19
  const form = useFormGqlMutationCart(SetMolliePaymentMethodIssuerOnCartDocument, {
29
20
  mode: 'onChange',
@@ -40,7 +31,7 @@ export default function MollieIssuerOptions(props: MollieIssuerOptionsProps) {
40
31
  return (
41
32
  <Container>
42
33
  <Typography variant='h5' component='span'>
43
- Pay with {title}
34
+ <Trans>Pay with {title}</Trans>
44
35
  </Typography>
45
36
  <form onSubmit={submit} noValidate>
46
37
  <FormRow>
@@ -71,7 +62,7 @@ export default function MollieIssuerOptions(props: MollieIssuerOptionsProps) {
71
62
  // return (
72
63
  // <MenuItem key={issuer.code} value={issuer.code}>
73
64
  // <ListItemIcon>
74
- // <SvgImageSimple src={issuer.svg} alt={issuer.name} size='small' />
65
+ // <SvgIcon src={issuer.svg} alt={issuer.name} size='small' />
75
66
  // </ListItemIcon>
76
67
  // <Typography variant='inherit'>{issuer.name}</Typography>
77
68
  // </MenuItem>
@@ -79,7 +70,15 @@ export default function MollieIssuerOptions(props: MollieIssuerOptionsProps) {
79
70
  })}
80
71
  </TextField>
81
72
  </FormRow>
82
- <ul className={classes.root}>
73
+ <Box
74
+ component='ul'
75
+ className={classes.list}
76
+ sx={(theme) => ({
77
+ typography: 'body2',
78
+ paddingLeft: theme.spacings.xs,
79
+ margin: 0,
80
+ })}
81
+ >
83
82
  <li>
84
83
  <Trans>Choose your bank, and place your order.</Trans>
85
84
  </li>
@@ -91,7 +90,7 @@ export default function MollieIssuerOptions(props: MollieIssuerOptionsProps) {
91
90
  As soon as the payment is completed, you will automatically return to the webshop.
92
91
  </Trans>
93
92
  </li>
94
- </ul>
93
+ </Box>
95
94
  </form>
96
95
  </Container>
97
96
  )
@@ -1,11 +1,11 @@
1
- import { useQuery } from '@apollo/client'
1
+ import { useQuery } from '@graphcommerce/graphql'
2
2
  import { useFormGqlMutationCart } from '@graphcommerce/magento-cart'
3
3
  import { PaymentOptionsProps } from '@graphcommerce/magento-cart-payment-method'
4
4
  import { StoreConfigDocument } from '@graphcommerce/magento-store'
5
5
  import { FormRow } from '@graphcommerce/next-ui'
6
6
  import { useFormCompose } from '@graphcommerce/react-hook-form'
7
- import { Typography } from '@material-ui/core'
8
- import { Alert } from '@material-ui/lab'
7
+ import { Trans } from '@lingui/macro'
8
+ import { Typography, Alert } from '@mui/material'
9
9
  import Script from 'next/script'
10
10
  import React, { useEffect, useState } from 'react'
11
11
  import { Mollie } from '../../Mollie'
@@ -14,7 +14,7 @@ import { SetMolliePaymentMethodTokenOnCartDocument } from './SetMolliePaymentMet
14
14
  import { mollieContext, MollieContext } from './mollieContext'
15
15
 
16
16
  export default function MollieCreditCardOptions(props: PaymentOptionsProps) {
17
- const { code, step, Container, title } = props
17
+ const { code, step, Container, title = '' } = props
18
18
  const [loaded, setLoaded] = useState<boolean>(false)
19
19
  const [mollie, setMollie] = useState<MollieContext>(undefined)
20
20
  const conf = useQuery(StoreConfigDocument)
@@ -63,7 +63,7 @@ export default function MollieCreditCardOptions(props: PaymentOptionsProps) {
63
63
  <Script src='https://js.mollie.com/v1/mollie.js' onLoad={() => setLoaded(true)} />
64
64
  <mollieContext.Provider value={mollie}>
65
65
  <Typography variant='h5' component='span'>
66
- Pay with {title}
66
+ <Trans>Pay with {title}</Trans>
67
67
  </Typography>
68
68
  <form onSubmit={submit} noValidate>
69
69
  <FormRow>
@@ -1,10 +1,4 @@
1
- import {
2
- InputBaseComponentProps,
3
- makeStyles,
4
- TextField,
5
- TextFieldProps,
6
- Theme,
7
- } from '@material-ui/core'
1
+ import { InputBaseComponentProps, TextField, TextFieldProps } from '@mui/material'
8
2
  import React, {
9
3
  Dispatch,
10
4
  SetStateAction,
@@ -104,19 +98,9 @@ type MollieFieldProps = {
104
98
  isSubmitted?: boolean
105
99
  } & TextFieldProps
106
100
 
107
- const useStyles = makeStyles((theme: Theme) => ({
108
- label: {
109
- background:
110
- theme.palette.type === 'light'
111
- ? theme.palette.secondary.light
112
- : theme.palette.background.paper,
113
- },
114
- }))
115
-
116
101
  export default function MollieField(props: MollieFieldProps) {
117
102
  const { isSubmitted = false, label, ...fieldProps } = props
118
103
 
119
- const classes = useStyles()
120
104
  const [state, setState] = useState<ComponentFieldState>({
121
105
  dirty: false,
122
106
  touched: false,
@@ -136,8 +120,13 @@ export default function MollieField(props: MollieFieldProps) {
136
120
  inputProps: { component: IframeField },
137
121
  }}
138
122
  InputLabelProps={{
123
+ sx: (theme) => ({
124
+ background:
125
+ theme.palette.mode === 'light'
126
+ ? theme.palette.secondary.light
127
+ : theme.palette.background.paper,
128
+ }),
139
129
  shrink: true,
140
- classes: { root: classes.label },
141
130
  }}
142
131
  />
143
132
  </mollieFieldContext.Provider>
@@ -1,5 +1,5 @@
1
1
  import { ApolloCartErrorFullPage, useClearCurrentCartId } from '@graphcommerce/magento-cart'
2
- import { Button, Dialog } from '@material-ui/core'
2
+ import { Button, Dialog } from '@mui/material'
3
3
  import { useRouter } from 'next/router'
4
4
  import React from 'react'
5
5
  import { useMolliePaymentTokenHandler } from '../../hooks/useMolliePaymentTokenHandler'
@@ -1,4 +1,4 @@
1
- import { useMutation } from '@apollo/client'
1
+ import { useMutation } from '@graphcommerce/graphql'
2
2
  import { PaymentStatusEnum } from '@graphcommerce/graphql'
3
3
  import { useClearCurrentCartId, useCurrentCartId } from '@graphcommerce/magento-cart'
4
4
  import { useCartLock, usePaymentMethodContext } from '@graphcommerce/magento-cart-payment-method'
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@graphcommerce/mollie-magento-payment",
3
- "version": "2.106.48",
3
+ "version": "3.0.0",
4
4
  "sideEffects": false,
5
5
  "engines": {
6
6
  "node": "14.x"
7
7
  },
8
8
  "prettier": "@graphcommerce/prettier-config-pwa",
9
- "browserslist": [
10
- "extends @graphcommerce/browserslist-config-pwa"
11
- ],
12
9
  "eslintConfig": {
13
10
  "extends": "@graphcommerce/eslint-config-pwa",
14
11
  "parserOptions": {
@@ -16,33 +13,28 @@
16
13
  }
17
14
  },
18
15
  "devDependencies": {
19
- "@graphcommerce/browserslist-config-pwa": "^3.0.3",
20
- "@graphcommerce/eslint-config-pwa": "^3.1.10",
21
- "@graphcommerce/magento-cart-shipping-address": "^2.106.47",
22
- "@graphcommerce/magento-product": "^3.8.13",
23
- "@graphcommerce/magento-product-configurable": "^3.6.43",
24
- "@graphcommerce/prettier-config-pwa": "^3.0.5",
25
- "@graphcommerce/typescript-config-pwa": "^3.1.2",
26
- "@playwright/test": "^1.17.1"
16
+ "@graphcommerce/eslint-config-pwa": "^4.0.0",
17
+ "@graphcommerce/magento-cart-shipping-address": "^3.0.0",
18
+ "@graphcommerce/magento-product": "^4.0.0",
19
+ "@graphcommerce/magento-product-configurable": "^4.0.0",
20
+ "@graphcommerce/prettier-config-pwa": "^4.0.0",
21
+ "@graphcommerce/typescript-config-pwa": "^4.0.0",
22
+ "@playwright/test": "^1.18.1"
27
23
  },
28
24
  "dependencies": {
29
- "@apollo/client": "^3.5.6",
30
- "@graphcommerce/graphql": "^2.105.13",
31
- "@graphcommerce/image": "^2.105.13",
32
- "@graphcommerce/magento-cart": "^3.10.3",
33
- "@graphcommerce/magento-cart-payment-method": "^2.111.47",
34
- "@graphcommerce/magento-store": "^3.4.12",
35
- "@graphcommerce/next-ui": "^3.25.3",
36
- "@graphcommerce/react-hook-form": "^2.104.7",
37
- "@lingui/macro": "^3.13.0",
38
- "@material-ui/core": "^4.12.3",
39
- "@material-ui/lab": "^4.0.0-alpha.60",
40
- "clsx": "^1.1.1",
41
- "framer-motion": "^5.5.5",
42
- "next": "^12.0.7",
25
+ "@graphcommerce/graphql": "^3.0.0",
26
+ "@graphcommerce/image": "^3.0.0",
27
+ "@graphcommerce/magento-cart": "^4.0.0",
28
+ "@graphcommerce/magento-cart-payment-method": "^3.0.0",
29
+ "@graphcommerce/magento-store": "^4.0.0",
30
+ "@graphcommerce/next-ui": "^4.0.0",
31
+ "@graphcommerce/react-hook-form": "^3.0.0",
32
+ "@lingui/macro": "^3.13.2",
33
+ "@mui/material": "^5.4.1",
34
+ "framer-motion": "^6.2.4",
35
+ "next": "^12.0.10",
43
36
  "react": "^17.0.1",
44
37
  "react-dom": "^17.0.1",
45
- "type-fest": "^2.8.0"
46
- },
47
- "gitHead": "41e42c8cd6f565ab0cbba81a1954a0041dc46768"
38
+ "type-fest": "^2.11.2"
39
+ }
48
40
  }