@graphcommerce/magento-cart-payment-method 10.0.0-canary.72 → 10.0.1-canary.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,42 +1,12 @@
1
1
  # Change Log
2
2
 
3
- ## 10.0.0-canary.72
3
+ ## 10.0.1-canary.0
4
4
 
5
- ## 10.0.0-canary.71
6
-
7
- ## 10.0.0-canary.70
8
-
9
- ### Major Changes
10
-
11
- - [#2565](https://github.com/graphcommerce-org/graphcommerce/pull/2565) [`c96dfcd`](https://github.com/graphcommerce-org/graphcommerce/commit/c96dfcdca981baca387c270ad9e2b9515cdd00cc) - Updated to Apollo Client 4 ([@paales](https://github.com/paales))
12
-
13
- ## 10.0.0-canary.69
14
-
15
- ## 10.0.0-canary.68
16
-
17
- ## 10.0.0-canary.67
18
-
19
- ## 10.0.0-canary.66
20
-
21
- ## 10.0.0-canary.65
22
-
23
- ## 10.0.0-canary.64
24
-
25
- ## 10.0.0-canary.63
26
-
27
- ## 10.0.0-canary.62
28
-
29
- ## 10.0.0-canary.61
30
-
31
- ## 10.0.0-canary.60
32
-
33
- ## 10.0.0-canary.59
34
-
35
- ## 10.0.0-canary.58
5
+ ### Patch Changes
36
6
 
37
- ## 10.0.0-canary.57
7
+ - [#2568](https://github.com/graphcommerce-org/graphcommerce/pull/2568) [`dc57da4`](https://github.com/graphcommerce-org/graphcommerce/commit/dc57da4897365ddb2b779eab3ad2b3a350ed115c) - Moved from form.watch to useWatch everywhere which works even if the fields are later initialized. ([@paales](https://github.com/paales))
38
8
 
39
- ## 10.0.0-canary.56
9
+ ## 10.0.0
40
10
 
41
11
  ### Major Changes
42
12
 
@@ -116,122 +86,12 @@
116
86
  - `@mui/*` modern alias rewrites
117
87
  - Debug plugins (`CircularDependencyPlugin`, `DuplicatesPlugin`) ([@paales](https://github.com/paales))
118
88
 
119
- ## 9.1.0-canary.55
89
+ - [#2565](https://github.com/graphcommerce-org/graphcommerce/pull/2565) [`c96dfcd`](https://github.com/graphcommerce-org/graphcommerce/commit/c96dfcdca981baca387c270ad9e2b9515cdd00cc) - Updated to Apollo Client 4 ([@paales](https://github.com/paales))
120
90
 
121
91
  ### Patch Changes
122
92
 
123
93
  - [#2539](https://github.com/graphcommerce-org/graphcommerce/pull/2539) [`59d91cc`](https://github.com/graphcommerce-org/graphcommerce/commit/59d91cc4b04b6d37e5fb6b09401c079de488bc29) - Solve issue where the Place order button would remain in a loading state because the back/forward cache of chrome started working for the checkout and thus React's state would not be reset, thinking we were still exiting the page. ([@paales](https://github.com/paales))
124
94
 
125
- ## 9.1.0-canary.54
126
-
127
- ## 9.1.0-canary.53
128
-
129
- ## 9.1.0-canary.52
130
-
131
- ## 9.1.0-canary.51
132
-
133
- ## 9.1.0-canary.50
134
-
135
- ## 9.1.0-canary.49
136
-
137
- ## 9.1.0-canary.48
138
-
139
- ## 9.1.0-canary.47
140
-
141
- ## 9.1.0-canary.46
142
-
143
- ## 9.1.0-canary.45
144
-
145
- ## 9.1.0-canary.44
146
-
147
- ## 9.1.0-canary.43
148
-
149
- ## 9.1.0-canary.42
150
-
151
- ## 9.1.0-canary.41
152
-
153
- ## 9.1.0-canary.40
154
-
155
- ## 9.1.0-canary.39
156
-
157
- ## 9.1.0-canary.38
158
-
159
- ## 9.1.0-canary.37
160
-
161
- ## 9.1.0-canary.36
162
-
163
- ## 9.1.0-canary.35
164
-
165
- ## 9.1.0-canary.34
166
-
167
- ## 9.1.0-canary.33
168
-
169
- ## 9.1.0-canary.32
170
-
171
- ## 9.1.0-canary.31
172
-
173
- ## 9.1.0-canary.30
174
-
175
- ## 9.1.0-canary.29
176
-
177
- ## 9.1.0-canary.28
178
-
179
- ## 9.1.0-canary.27
180
-
181
- ## 9.1.0-canary.26
182
-
183
- ## 9.1.0-canary.25
184
-
185
- ## 9.1.0-canary.24
186
-
187
- ## 9.1.0-canary.23
188
-
189
- ## 9.1.0-canary.22
190
-
191
- ## 9.1.0-canary.21
192
-
193
- ## 9.1.0-canary.20
194
-
195
- ## 9.1.0-canary.19
196
-
197
- ## 9.1.0-canary.18
198
-
199
- ## 9.1.0-canary.17
200
-
201
- ## 9.1.0-canary.16
202
-
203
- ## 9.1.0-canary.15
204
-
205
- ## 9.0.4-canary.14
206
-
207
- ## 9.0.4-canary.13
208
-
209
- ## 9.0.4-canary.12
210
-
211
- ## 9.0.4-canary.11
212
-
213
- ## 9.0.4-canary.10
214
-
215
- ## 9.0.4-canary.9
216
-
217
- ## 9.0.4-canary.8
218
-
219
- ## 9.0.4-canary.7
220
-
221
- ## 9.0.4-canary.6
222
-
223
- ## 9.0.4-canary.5
224
-
225
- ## 9.0.4-canary.4
226
-
227
- ## 9.0.4-canary.3
228
-
229
- ## 9.0.4-canary.2
230
-
231
- ## 9.0.4-canary.1
232
-
233
- ## 9.0.4-canary.0
234
-
235
95
  ## 9.0.2
236
96
 
237
97
  ### Patch Changes
@@ -3,7 +3,7 @@ import { ActionCardListForm } from '@graphcommerce/ecommerce-ui'
3
3
  import type { ActionCardProps } from '@graphcommerce/next-ui'
4
4
  import { ActionCard, Button, FormDiv, sxx } from '@graphcommerce/next-ui'
5
5
  import type { UseFormComposeOptions } from '@graphcommerce/react-hook-form'
6
- import { FormPersist, useForm, useFormCompose } from '@graphcommerce/react-hook-form'
6
+ import { FormPersist, useForm, useFormCompose, useWatch } from '@graphcommerce/react-hook-form'
7
7
  import { t } from '@lingui/core/macro'
8
8
  import { Trans } from '@lingui/react/macro'
9
9
  import type { SxProps, Theme } from '@mui/material'
@@ -71,10 +71,10 @@ export function PaymentMethodActionCardListForm(props: PaymentMethodActionCardLi
71
71
  type FormFields = { code: string | null; paymentMethod?: string }
72
72
  const form = useForm<FormFields>({})
73
73
 
74
- const { control, handleSubmit, watch, setValue } = form
74
+ const { control, handleSubmit, setValue } = form
75
75
  const submit = handleSubmit(() => {})
76
76
 
77
- const paymentMethod = watch('paymentMethod')
77
+ const paymentMethod = useWatch({ control, name: 'paymentMethod' })
78
78
 
79
79
  useEffect(() => {
80
80
  if (lockState.method) setValue('code', lockState.method)
@@ -11,7 +11,13 @@ import {
11
11
  ToggleButton,
12
12
  } from '@graphcommerce/next-ui'
13
13
  import type { UseFormComposeOptions } from '@graphcommerce/react-hook-form'
14
- import { Controller, FormPersist, useForm, useFormCompose } from '@graphcommerce/react-hook-form'
14
+ import {
15
+ Controller,
16
+ FormPersist,
17
+ useForm,
18
+ useFormCompose,
19
+ useWatch,
20
+ } from '@graphcommerce/react-hook-form'
15
21
  import { t } from '@lingui/core/macro'
16
22
  import type { SxProps, Theme } from '@mui/material'
17
23
  import { Box, FormControl, FormHelperText } from '@mui/material'
@@ -52,7 +58,7 @@ export function PaymentMethodToggles(props: PaymentMethodTogglesProps) {
52
58
  defaultValues: { code: lockState.method },
53
59
  })
54
60
 
55
- const { control, handleSubmit, watch, register, setValue, formState } = form
61
+ const { control, handleSubmit, register, setValue, formState } = form
56
62
 
57
63
  const submitHandler = handleSubmit(() => {})
58
64
 
@@ -62,7 +68,7 @@ export function PaymentMethodToggles(props: PaymentMethodTogglesProps) {
62
68
  if (selectedMethod?.code) setValue('code', selectedMethod.code)
63
69
  }, [selectedMethod?.code, setValue])
64
70
 
65
- const paymentMethod = watch('paymentMethod')
71
+ const paymentMethod = useWatch({ control, name: 'paymentMethod' })
66
72
  useEffect(() => {
67
73
  const [code, child] = paymentMethod?.split('___') ?? ['']
68
74
  if (code === selectedMethod?.code) return
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": "10.0.0-canary.72",
5
+ "version": "10.0.1-canary.0",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -18,18 +18,18 @@
18
18
  "./PaymentMethodPlaceOrderNoop/PaymentMethodPlaceOrderNoop": "./PaymentMethodPlaceOrderNoop/PaymentMethodPlaceOrderNoop.tsx"
19
19
  },
20
20
  "peerDependencies": {
21
- "@graphcommerce/ecommerce-ui": "^10.0.0-canary.72",
22
- "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.72",
23
- "@graphcommerce/framer-scroller": "^10.0.0-canary.72",
24
- "@graphcommerce/graphql": "^10.0.0-canary.72",
25
- "@graphcommerce/image": "^10.0.0-canary.72",
26
- "@graphcommerce/magento-cart": "^10.0.0-canary.72",
27
- "@graphcommerce/magento-cart-shipping-address": "^10.0.0-canary.72",
28
- "@graphcommerce/magento-store": "^10.0.0-canary.72",
29
- "@graphcommerce/next-ui": "^10.0.0-canary.72",
30
- "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.72",
31
- "@graphcommerce/react-hook-form": "^10.0.0-canary.72",
32
- "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.72",
21
+ "@graphcommerce/ecommerce-ui": "^10.0.1-canary.0",
22
+ "@graphcommerce/eslint-config-pwa": "^10.0.1-canary.0",
23
+ "@graphcommerce/framer-scroller": "^10.0.1-canary.0",
24
+ "@graphcommerce/graphql": "^10.0.1-canary.0",
25
+ "@graphcommerce/image": "^10.0.1-canary.0",
26
+ "@graphcommerce/magento-cart": "^10.0.1-canary.0",
27
+ "@graphcommerce/magento-cart-shipping-address": "^10.0.1-canary.0",
28
+ "@graphcommerce/magento-store": "^10.0.1-canary.0",
29
+ "@graphcommerce/next-ui": "^10.0.1-canary.0",
30
+ "@graphcommerce/prettier-config-pwa": "^10.0.1-canary.0",
31
+ "@graphcommerce/react-hook-form": "^10.0.1-canary.0",
32
+ "@graphcommerce/typescript-config-pwa": "^10.0.1-canary.0",
33
33
  "@lingui/core": "^5",
34
34
  "@lingui/macro": "^5",
35
35
  "@lingui/react": "^5",