@graphcommerce/magento-payment-braintree 8.1.0-canary.9 → 9.0.0-canary.101

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,201 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.0-canary.101
4
+
5
+ ## 9.0.0-canary.100
6
+
7
+ ## 9.0.0-canary.99
8
+
9
+ ## 9.0.0-canary.98
10
+
11
+ ## 9.0.0-canary.97
12
+
13
+ ## 9.0.0-canary.96
14
+
15
+ ## 9.0.0-canary.95
16
+
17
+ ## 9.0.0-canary.94
18
+
19
+ ## 9.0.0-canary.93
20
+
21
+ ## 9.0.0-canary.92
22
+
23
+ ## 9.0.0-canary.91
24
+
25
+ ## 9.0.0-canary.90
26
+
27
+ ## 9.0.0-canary.89
28
+
29
+ ## 9.0.0-canary.88
30
+
31
+ ## 9.0.0-canary.87
32
+
33
+ ## 9.0.0-canary.86
34
+
35
+ ## 9.0.0-canary.85
36
+
37
+ ## 9.0.0-canary.84
38
+
39
+ ## 9.0.0-canary.83
40
+
41
+ ## 9.0.0-canary.82
42
+
43
+ ## 9.0.0-canary.81
44
+
45
+ ## 9.0.0-canary.80
46
+
47
+ ### Minor Changes
48
+
49
+ - [#2341](https://github.com/graphcommerce-org/graphcommerce/pull/2341) [`1d6512d`](https://github.com/graphcommerce-org/graphcommerce/commit/1d6512d4118cfb46602aa1f2432c3566fdb3261d) - Rename experimental_useV2 prop to deprecated_useV1 in useFromGql and enable it by default ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
50
+
51
+ ## 9.0.0-canary.79
52
+
53
+ ## 9.0.0-canary.78
54
+
55
+ ## 9.0.0-canary.77
56
+
57
+ ## 9.0.0-canary.76
58
+
59
+ ## 9.0.0-canary.75
60
+
61
+ ## 9.0.0-canary.74
62
+
63
+ ## 9.0.0-canary.73
64
+
65
+ ## 9.0.0-canary.72
66
+
67
+ ## 9.0.0-canary.71
68
+
69
+ ## 9.0.0-canary.70
70
+
71
+ ## 9.0.0-canary.69
72
+
73
+ ## 9.0.0-canary.68
74
+
75
+ ## 9.0.0-canary.67
76
+
77
+ ## 9.0.0-canary.66
78
+
79
+ ## 9.0.0-canary.65
80
+
81
+ ## 9.0.0-canary.64
82
+
83
+ ## 9.0.0-canary.63
84
+
85
+ ## 9.0.0-canary.62
86
+
87
+ ## 9.0.0-canary.61
88
+
89
+ ## 9.0.0-canary.60
90
+
91
+ ### Patch Changes
92
+
93
+ - [#2331](https://github.com/graphcommerce-org/graphcommerce/pull/2331) [`702bfc9`](https://github.com/graphcommerce-org/graphcommerce/commit/702bfc93566c9745546988e57988431d5d4d8cb0) - Moved plugins to new format ([@paales](https://github.com/paales))
94
+
95
+ ## 9.0.0-canary.59
96
+
97
+ ## 9.0.0-canary.58
98
+
99
+ ## 9.0.0-canary.57
100
+
101
+ ## 9.0.0-canary.56
102
+
103
+ ## 9.0.0-canary.55
104
+
105
+ ## 9.0.0-canary.54
106
+
107
+ ## 8.1.0-canary.53
108
+
109
+ ## 8.1.0-canary.52
110
+
111
+ ## 8.1.0-canary.51
112
+
113
+ ## 8.1.0-canary.50
114
+
115
+ ## 8.1.0-canary.49
116
+
117
+ ## 8.1.0-canary.48
118
+
119
+ ## 8.1.0-canary.47
120
+
121
+ ## 8.1.0-canary.46
122
+
123
+ ## 8.1.0-canary.45
124
+
125
+ ## 8.1.0-canary.44
126
+
127
+ ## 8.1.0-canary.43
128
+
129
+ ## 8.1.0-canary.42
130
+
131
+ ## 8.1.0-canary.41
132
+
133
+ ## 8.1.0-canary.40
134
+
135
+ ## 8.1.0-canary.39
136
+
137
+ ## 8.1.0-canary.38
138
+
139
+ ## 8.1.0-canary.37
140
+
141
+ ## 8.1.0-canary.36
142
+
143
+ ## 8.1.0-canary.35
144
+
145
+ ## 8.1.0-canary.34
146
+
147
+ ## 8.1.0-canary.33
148
+
149
+ ## 8.1.0-canary.32
150
+
151
+ ## 8.1.0-canary.31
152
+
153
+ ## 8.1.0-canary.30
154
+
155
+ ## 8.1.0-canary.29
156
+
157
+ ## 8.1.0-canary.28
158
+
159
+ ## 8.1.0-canary.27
160
+
161
+ ## 8.1.0-canary.26
162
+
163
+ ## 8.1.0-canary.25
164
+
165
+ ## 8.1.0-canary.24
166
+
167
+ ## 8.1.0-canary.23
168
+
169
+ ## 8.1.0-canary.22
170
+
171
+ ## 8.1.0-canary.21
172
+
173
+ ## 8.1.0-canary.20
174
+
175
+ ## 8.1.0-canary.19
176
+
177
+ ## 8.1.0-canary.18
178
+
179
+ ### Patch Changes
180
+
181
+ - [#2277](https://github.com/graphcommerce-org/graphcommerce/pull/2277) [`f9199f7`](https://github.com/graphcommerce-org/graphcommerce/commit/f9199f798583138a68dd641ea6637375c487f29b) - Solve issue where Braintree wouldn't place the order after successfully validating a Credit Card. ([@paales](https://github.com/paales))
182
+
183
+ ## 8.1.0-canary.17
184
+
185
+ ## 8.1.0-canary.16
186
+
187
+ ## 8.1.0-canary.15
188
+
189
+ ## 8.1.0-canary.14
190
+
191
+ ## 8.1.0-canary.13
192
+
193
+ ## 8.1.0-canary.12
194
+
195
+ ## 8.1.0-canary.11
196
+
197
+ ## 8.1.0-canary.10
198
+
3
199
  ## 8.1.0-canary.9
4
200
 
5
201
  ## 8.1.0-canary.8
@@ -18,8 +214,7 @@
18
214
 
19
215
  ### Patch Changes
20
216
 
21
- - [#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
22
- ([@FrankHarland](https://github.com/FrankHarland))
217
+ - [#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 ([@FrankHarland](https://github.com/FrankHarland))
23
218
 
24
219
  ## 8.0.6-canary.1
25
220
 
@@ -29,8 +224,7 @@
29
224
 
30
225
  ### Patch Changes
31
226
 
32
- - [#2188](https://github.com/graphcommerce-org/graphcommerce/pull/2188) [`eec7498`](https://github.com/graphcommerce-org/graphcommerce/commit/eec7498213f34f0f850123b577b77bf678e3c80b) - Braintree Credit Card: Hosted payment fields now have proper styling and all focus/blur and error states are correctly handled.
33
- ([@paales](https://github.com/paales))
227
+ - [#2188](https://github.com/graphcommerce-org/graphcommerce/pull/2188) [`eec7498`](https://github.com/graphcommerce-org/graphcommerce/commit/eec7498213f34f0f850123b577b77bf678e3c80b) - Braintree Credit Card: Hosted payment fields now have proper styling and all focus/blur and error states are correctly handled. ([@paales](https://github.com/paales))
34
228
 
35
229
  ## 8.0.5-canary.10
36
230
 
@@ -46,8 +240,7 @@
46
240
 
47
241
  ### Patch Changes
48
242
 
49
- - [#2188](https://github.com/graphcommerce-org/graphcommerce/pull/2188) [`eec7498`](https://github.com/graphcommerce-org/graphcommerce/commit/eec7498213f34f0f850123b577b77bf678e3c80b) - Braintree Credit Card: Hosted payment fields now have proper styling and all focus/blur and error states are correctly handled.
50
- ([@paales](https://github.com/paales))
243
+ - [#2188](https://github.com/graphcommerce-org/graphcommerce/pull/2188) [`eec7498`](https://github.com/graphcommerce-org/graphcommerce/commit/eec7498213f34f0f850123b577b77bf678e3c80b) - Braintree Credit Card: Hosted payment fields now have proper styling and all focus/blur and error states are correctly handled. ([@paales](https://github.com/paales))
51
244
 
52
245
  ## 8.0.5-canary.4
53
246
 
@@ -1411,31 +1604,31 @@
1411
1604
  All occurences of `<Trans>` and `t` need to be replaced:
1412
1605
 
1413
1606
  ```tsx
1414
- import { Trans, t } from "@lingui/macro";
1607
+ import { Trans, t } from '@lingui/macro'
1415
1608
 
1416
1609
  function MyComponent() {
1417
- const foo = "bar";
1610
+ const foo = 'bar'
1418
1611
  return (
1419
1612
  <div aria-label={t`Account ${foo}`}>
1420
1613
  <Trans>My Translation {foo}</Trans>
1421
1614
  </div>
1422
- );
1615
+ )
1423
1616
  }
1424
1617
  ```
1425
1618
 
1426
1619
  Needs to be replaced with:
1427
1620
 
1428
1621
  ```tsx
1429
- import { Trans } from "@lingui/react";
1430
- import { i18n } from "@lingui/core";
1622
+ import { Trans } from '@lingui/react'
1623
+ import { i18n } from '@lingui/core'
1431
1624
 
1432
1625
  function MyComponent() {
1433
- const foo = "bar";
1626
+ const foo = 'bar'
1434
1627
  return (
1435
1628
  <div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
1436
- <Trans key="My Translation {foo}" values={{ foo }}></Trans>
1629
+ <Trans key='My Translation {foo}' values={{ foo }}></Trans>
1437
1630
  </div>
1438
- );
1631
+ )
1439
1632
  }
1440
1633
  ```
1441
1634
 
@@ -159,7 +159,6 @@ export function PaymentMethodOptions(props: PaymentOptionsProps) {
159
159
  }
160
160
  >(BraintreePaymentMethodOptionsDocument, {
161
161
  defaultValues: { code },
162
- experimental_useV2: true,
163
162
  onBeforeSubmit: async (variables) => {
164
163
  if (!hostedFields) throw new Error('Hosted fields not available')
165
164
  if (!threeDSecure) throw new Error('3D Secure not available')
@@ -1,7 +1,5 @@
1
- import {
2
- PaymentMethodPlaceOrderNoop,
3
- PaymentModule,
4
- } from '@graphcommerce/magento-cart-payment-method'
1
+ import type { PaymentModule } from '@graphcommerce/magento-cart-payment-method'
2
+ import { PaymentMethodPlaceOrderNoop } from '@graphcommerce/magento-cart-payment-method/PaymentMethodPlaceOrderNoop/PaymentMethodPlaceOrderNoop'
5
3
  import { PaymentMethodOptions } from './PaymentMethodOptions'
6
4
 
7
5
  export const braintree: PaymentModule = {
@@ -8,7 +8,6 @@ import { useFormCompose } from '@graphcommerce/react-hook-form'
8
8
  import type { FlowType, Intent } from 'paypal-checkout-components'
9
9
  import { useEffect } from 'react'
10
10
  import { BraintreePaymentMethodOptionsDocument } from '../../BraintreePaymentMethodOptions.gql'
11
- import { StartPaymentOptions } from '../../hooks/useBraintree'
12
11
  import { useBraintreeCartLock } from '../../hooks/useBraintreeCartLock'
13
12
  import { useBraintreePaypal } from '../../hooks/useBraintreePaypal'
14
13
  import { isBraintreeError } from '../../utils/isBraintreeError'
@@ -44,8 +43,6 @@ export function PaymentMethodOptions(props: PaymentOptionsProps) {
44
43
 
45
44
  const address = cartData.cart.shipping_addresses?.[0]
46
45
 
47
- console.log('hoi')
48
-
49
46
  const nonce = await paypal.createPayment({
50
47
  flow: 'checkout' as FlowType, // Required
51
48
  amount: cartData.cart.prices.grand_total.value,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-payment-braintree",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "8.1.0-canary.9",
5
+ "version": "9.0.0-canary.101",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,25 +12,25 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@types/braintree-web": "^3.96.10"
15
+ "@types/braintree-web": "^3.96.15"
16
16
  },
17
17
  "dependencies": {
18
- "braintree-web": "^3.99.0"
18
+ "braintree-web": "^3.109.0"
19
19
  },
20
20
  "peerDependencies": {
21
- "@graphcommerce/eslint-config-pwa": "^8.1.0-canary.9",
22
- "@graphcommerce/graphql": "^8.1.0-canary.9",
23
- "@graphcommerce/image": "^8.1.0-canary.9",
24
- "@graphcommerce/magento-cart": "^8.1.0-canary.9",
25
- "@graphcommerce/magento-cart-payment-method": "^8.1.0-canary.9",
26
- "@graphcommerce/magento-cart-shipping-address": "^8.1.0-canary.9",
27
- "@graphcommerce/magento-product": "^8.1.0-canary.9",
28
- "@graphcommerce/magento-product-configurable": "^8.1.0-canary.9",
29
- "@graphcommerce/magento-store": "^8.1.0-canary.9",
30
- "@graphcommerce/next-ui": "^8.1.0-canary.9",
31
- "@graphcommerce/prettier-config-pwa": "^8.1.0-canary.9",
32
- "@graphcommerce/react-hook-form": "^8.1.0-canary.9",
33
- "@graphcommerce/typescript-config-pwa": "^8.1.0-canary.9",
21
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.101",
22
+ "@graphcommerce/graphql": "^9.0.0-canary.101",
23
+ "@graphcommerce/image": "^9.0.0-canary.101",
24
+ "@graphcommerce/magento-cart": "^9.0.0-canary.101",
25
+ "@graphcommerce/magento-cart-payment-method": "^9.0.0-canary.101",
26
+ "@graphcommerce/magento-cart-shipping-address": "^9.0.0-canary.101",
27
+ "@graphcommerce/magento-product": "^9.0.0-canary.101",
28
+ "@graphcommerce/magento-product-configurable": "^9.0.0-canary.101",
29
+ "@graphcommerce/magento-store": "^9.0.0-canary.101",
30
+ "@graphcommerce/next-ui": "^9.0.0-canary.101",
31
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.101",
32
+ "@graphcommerce/react-hook-form": "^9.0.0-canary.101",
33
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.101",
34
34
  "@lingui/core": "^4.2.1",
35
35
  "@lingui/macro": "^4.2.1",
36
36
  "@lingui/react": "^4.2.1",
@@ -1,13 +1,17 @@
1
1
  import { PaymentMethodContextProviderProps } from '@graphcommerce/magento-cart-payment-method'
2
- import type { PluginProps } from '@graphcommerce/next-config'
2
+ import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
3
3
  import { braintree } from '../methods/braintree'
4
4
  import { braintree_local_payment } from '../methods/braintree_local_payments'
5
5
  import { braintree_paypal } from '../methods/braintree_paypal'
6
6
 
7
- export const component = 'PaymentMethodContextProvider'
8
- export const exported = '@graphcommerce/magento-cart-payment-method'
7
+ export const config: PluginConfig = {
8
+ type: 'component',
9
+ module: '@graphcommerce/magento-cart-payment-method',
10
+ }
9
11
 
10
- function AddBrainTreeMethods(props: PluginProps<PaymentMethodContextProviderProps>) {
12
+ export function PaymentMethodContextProvider(
13
+ props: PluginProps<PaymentMethodContextProviderProps>,
14
+ ) {
11
15
  const { modules, Prev, ...rest } = props
12
16
  return (
13
17
  <Prev
@@ -21,5 +25,3 @@ function AddBrainTreeMethods(props: PluginProps<PaymentMethodContextProviderProp
21
25
  />
22
26
  )
23
27
  }
24
-
25
- export const Plugin = AddBrainTreeMethods