@graphcommerce/magento-payment-adyen 8.0.6-canary.4 → 8.0.7

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,25 +1,8 @@
1
1
  # @graphcommerce/magento-payment-adyen
2
2
 
3
- ## 8.0.6-canary.4
3
+ ## 8.0.7
4
4
 
5
- ## 8.0.6-canary.3
6
-
7
- ## 8.0.6-canary.2
8
-
9
- ### Patch Changes
10
-
11
- - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`0767bc4`](https://github.com/graphcommerce-org/graphcommerce/commit/0767bc40f7b596209f24ca4e745ff0441f3275c9) - Upgrade input components to no longer use muiRegister, which improves INP scores
12
- ([@FrankHarland](https://github.com/FrankHarland))
13
-
14
- - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`530076e`](https://github.com/graphcommerce-org/graphcommerce/commit/530076e3664703cb8b577b7fcf1998a420819f60) - Moved all usages of useFormPersist to the <FormPersist/> component to prevent rerenders.
15
- ([@FrankHarland](https://github.com/FrankHarland))
16
-
17
- - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`43bd04a`](https://github.com/graphcommerce-org/graphcommerce/commit/43bd04a777c5800cc7e01bee1e123a5aad82f194) - Prevent BillingPage query from rerunning on each mutation
18
- ([@FrankHarland](https://github.com/FrankHarland))
19
-
20
- ## 8.0.6-canary.1
21
-
22
- ## 8.0.6-canary.0
5
+ ## 8.0.6
23
6
 
24
7
  ## 8.0.5
25
8
 
@@ -1,10 +1,12 @@
1
- import { FormPersist, TextFieldElement, useFormCompose } from '@graphcommerce/ecommerce-ui'
1
+ import { useFormCompose, useFormPersist, useFormValidFields } from '@graphcommerce/ecommerce-ui'
2
2
  import { useFormGqlMutationCart } from '@graphcommerce/magento-cart'
3
3
  import {
4
4
  PaymentOptionsProps,
5
5
  usePaymentMethodContext,
6
6
  } from '@graphcommerce/magento-cart-payment-method'
7
- import { FormRow } from '@graphcommerce/next-ui'
7
+ import { FormRow, InputCheckmark } from '@graphcommerce/next-ui'
8
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
9
+ import { TextField } from '@mui/material'
8
10
  import { useRouter } from 'next/router'
9
11
  import { useAdyenCartLock } from '../../hooks/useAdyenCartLock'
10
12
  import { useAdyenPaymentMethod } from '../../hooks/useAdyenPaymentMethod'
@@ -52,11 +54,14 @@ export function HppOptions(props: PaymentOptionsProps) {
52
54
  },
53
55
  })
54
56
 
55
- const { handleSubmit, control, formState, required } = form
57
+ const { handleSubmit, muiRegister, formState, required } = form
56
58
 
57
59
  const submit = handleSubmit(() => {})
58
60
 
59
61
  const key = `PaymentMethodOptions_${code}${brandCode}`
62
+ useFormPersist({ form, name: key, persist: ['issuer'], storage: 'localStorage' })
63
+
64
+ const valid = useFormValidFields(form, required)
60
65
 
61
66
  /** To use an external Pay button we register the current form to be handled there as well. */
62
67
  useFormCompose({ form, step, submit, key })
@@ -69,16 +74,10 @@ export function HppOptions(props: PaymentOptionsProps) {
69
74
  */
70
75
  return (
71
76
  <form key={key} onSubmit={submit} noValidate>
72
- <FormPersist form={form} name={key} persist={['issuer']} storage='localStorage' />
73
77
  {conf?.issuers && (
74
78
  <FormRow>
75
- <TextFieldElement
76
- control={control}
77
- name='issuer'
79
+ <TextField
78
80
  defaultValue=''
79
- rules={{
80
- required: { value: true, message: 'Please provide an issuer' },
81
- }}
82
81
  variant='outlined'
83
82
  color='secondary'
84
83
  select
@@ -87,6 +86,10 @@ export function HppOptions(props: PaymentOptionsProps) {
87
86
  helperText={formState.isSubmitted && formState.errors.issuer?.message}
88
87
  label={brandCode === 'ideal' ? 'Select your bank' : conf?.name}
89
88
  required
89
+ {...muiRegister('issuer', {
90
+ required: { value: true, message: 'Please provide an issuer' },
91
+ })}
92
+ InputProps={{ endAdornment: <InputCheckmark show={valid.issuer} select /> }}
90
93
  >
91
94
  {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
92
95
  <option value='' />
@@ -99,7 +102,7 @@ export function HppOptions(props: PaymentOptionsProps) {
99
102
  </option>
100
103
  )
101
104
  })}
102
- </TextFieldElement>
105
+ </TextField>
103
106
  </FormRow>
104
107
  )}
105
108
  </form>
@@ -6,7 +6,8 @@ query UseAdyenPaymentMethods($cartId: String!) {
6
6
  configuration {
7
7
  currency
8
8
  amount {
9
- ...Money
9
+ currency
10
+ value
10
11
  }
11
12
  }
12
13
  icon {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-payment-adyen",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "8.0.6-canary.4",
5
+ "version": "8.0.7",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,18 +12,18 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^8.0.6-canary.4",
16
- "@graphcommerce/eslint-config-pwa": "^8.0.6-canary.4",
17
- "@graphcommerce/graphql": "^8.0.6-canary.4",
18
- "@graphcommerce/graphql-mesh": "^8.0.6-canary.4",
19
- "@graphcommerce/image": "^8.0.6-canary.4",
20
- "@graphcommerce/magento-cart": "^8.0.6-canary.4",
21
- "@graphcommerce/magento-cart-payment-method": "^8.0.6-canary.4",
22
- "@graphcommerce/magento-product": "^8.0.6-canary.4",
23
- "@graphcommerce/magento-store": "^8.0.6-canary.4",
24
- "@graphcommerce/next-ui": "^8.0.6-canary.4",
25
- "@graphcommerce/prettier-config-pwa": "^8.0.6-canary.4",
26
- "@graphcommerce/typescript-config-pwa": "^8.0.6-canary.4",
15
+ "@graphcommerce/ecommerce-ui": "^8.0.7",
16
+ "@graphcommerce/eslint-config-pwa": "^8.0.7",
17
+ "@graphcommerce/graphql": "^8.0.7",
18
+ "@graphcommerce/graphql-mesh": "^8.0.7",
19
+ "@graphcommerce/image": "^8.0.7",
20
+ "@graphcommerce/magento-cart": "^8.0.7",
21
+ "@graphcommerce/magento-cart-payment-method": "^8.0.7",
22
+ "@graphcommerce/magento-product": "^8.0.7",
23
+ "@graphcommerce/magento-store": "^8.0.7",
24
+ "@graphcommerce/next-ui": "^8.0.7",
25
+ "@graphcommerce/prettier-config-pwa": "^8.0.7",
26
+ "@graphcommerce/typescript-config-pwa": "^8.0.7",
27
27
  "@lingui/core": "^4.2.1",
28
28
  "@lingui/macro": "^4.2.1",
29
29
  "@lingui/react": "^4.2.1",