@graphcommerce/react-hook-form 9.0.0-canary.101 → 9.0.0-canary.104

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,26 +1,12 @@
1
1
  # Change Log
2
2
 
3
- ## 9.0.0-canary.101
3
+ ## 9.0.0-canary.104
4
4
 
5
- ## 9.0.0-canary.100
5
+ ## 9.0.0-canary.103
6
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
7
+ ### Patch Changes
22
8
 
23
- ## 9.0.0-canary.91
9
+ - [#2421](https://github.com/graphcommerce-org/graphcommerce/pull/2421) [`d500643`](https://github.com/graphcommerce-org/graphcommerce/commit/d500643138799b6db1610cb10a1d065d6219d8ea) - Resolve peer dependency issues so we get a clean install ([@paales](https://github.com/paales))
24
10
 
25
11
  ## 9.0.0-canary.90
26
12
 
@@ -28,24 +14,6 @@
28
14
 
29
15
  - [#2391](https://github.com/graphcommerce-org/graphcommerce/pull/2391) [`c1fa10f`](https://github.com/graphcommerce-org/graphcommerce/commit/c1fa10f995f562741b7574d465580e5405982a70) - Prevent overwriting custom context in useFormGqlMutation by merging operationOptions before execution. ([@wimvdputten](https://github.com/wimvdputten))
30
16
 
31
- ## 9.0.0-canary.89
32
-
33
- ## 9.0.0-canary.88
34
-
35
- ## 9.0.0-canary.87
36
-
37
- ## 9.0.0-canary.86
38
-
39
- ## 9.0.0-canary.85
40
-
41
- ## 9.0.0-canary.84
42
-
43
- ## 9.0.0-canary.83
44
-
45
- ## 9.0.0-canary.82
46
-
47
- ## 9.0.0-canary.81
48
-
49
17
  ## 9.0.0-canary.80
50
18
 
51
19
  ### Minor Changes
@@ -58,172 +26,24 @@
58
26
 
59
27
  - [#2341](https://github.com/graphcommerce-org/graphcommerce/pull/2341) [`af45239`](https://github.com/graphcommerce-org/graphcommerce/commit/af452399eaab59ee4e13484fdc9cb0a7660da531) - When a useFormGql throws an error in the onBeforeSubmit method or onComplete method it will setError('root.thrown') with the message, allowing it to be displayed somewhere. PaymentMethodButton will now render this as an ErrorSnackbar. ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
60
28
 
61
- ## 9.0.0-canary.79
62
-
63
- ## 9.0.0-canary.78
64
-
65
- ## 9.0.0-canary.77
66
-
67
- ## 9.0.0-canary.76
68
-
69
- ## 9.0.0-canary.75
70
-
71
- ## 9.0.0-canary.74
72
-
73
- ## 9.0.0-canary.73
74
-
75
- ## 9.0.0-canary.72
76
-
77
- ## 9.0.0-canary.71
78
-
79
- ## 9.0.0-canary.70
80
-
81
- ## 9.0.0-canary.69
82
-
83
- ## 9.0.0-canary.68
84
-
85
- ## 9.0.0-canary.67
86
-
87
- ## 9.0.0-canary.66
88
-
89
- ## 9.0.0-canary.65
90
-
91
- ## 9.0.0-canary.64
92
-
93
- ## 9.0.0-canary.63
94
-
95
- ## 9.0.0-canary.62
96
-
97
- ## 9.0.0-canary.61
98
-
99
- ## 9.0.0-canary.60
100
-
101
- ## 9.0.0-canary.59
102
-
103
- ## 9.0.0-canary.58
104
-
105
- ## 9.0.0-canary.57
106
-
107
- ## 9.0.0-canary.56
108
-
109
- ## 9.0.0-canary.55
110
-
111
- ## 9.0.0-canary.54
112
-
113
29
  ## 8.1.0-canary.53
114
30
 
115
31
  ### Minor Changes
116
32
 
117
33
  - [#2325](https://github.com/graphcommerce-org/graphcommerce/pull/2325) [`058fb17`](https://github.com/graphcommerce-org/graphcommerce/commit/058fb1777bdaa51ded6d37529e59a3cc5f0eac06) - Solve an issue where onBeforeSubmit and onComplete would become an 'stale closure' where variables inside wouldn't be updated. By wrapping onBeforeSubmit and onComplete in useEventCallback these functions are updated when outside values get changed. ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
118
34
 
119
- ## 8.1.0-canary.52
120
-
121
- ## 8.1.0-canary.51
122
-
123
- ## 8.1.0-canary.50
124
-
125
- ## 8.1.0-canary.49
126
-
127
- ## 8.1.0-canary.48
128
-
129
- ## 8.1.0-canary.47
130
-
131
35
  ## 8.1.0-canary.46
132
36
 
133
37
  ### Patch Changes
134
38
 
135
39
  - [#2314](https://github.com/graphcommerce-org/graphcommerce/pull/2314) [`490bbfb`](https://github.com/graphcommerce-org/graphcommerce/commit/490bbfb5d88a7f58e83fa9c8b7f475c277a0eda3) - Added missing dependencies of lodash and @types/lodash ([@paales](https://github.com/paales))
136
40
 
137
- ## 8.1.0-canary.45
138
-
139
- ## 8.1.0-canary.44
140
-
141
- ## 8.1.0-canary.43
142
-
143
- ## 8.1.0-canary.42
144
-
145
- ## 8.1.0-canary.41
146
-
147
- ## 8.1.0-canary.40
148
-
149
- ## 8.1.0-canary.39
150
-
151
41
  ## 8.1.0-canary.38
152
42
 
153
43
  ### Patch Changes
154
44
 
155
45
  - [#2305](https://github.com/graphcommerce-org/graphcommerce/pull/2305) [`77e8297`](https://github.com/graphcommerce-org/graphcommerce/commit/77e82976816994336c616208a651cb18ce9ea270) - Fix bug with persist not applying saved changes by moving <FromPersist/> below the form components ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
156
46
 
157
- ## 8.1.0-canary.37
158
-
159
- ## 8.1.0-canary.36
160
-
161
- ## 8.1.0-canary.35
162
-
163
- ## 8.1.0-canary.34
164
-
165
- ## 8.1.0-canary.33
166
-
167
- ## 8.1.0-canary.32
168
-
169
- ## 8.1.0-canary.31
170
-
171
- ## 8.1.0-canary.30
172
-
173
- ## 8.1.0-canary.29
174
-
175
- ## 8.1.0-canary.28
176
-
177
- ## 8.1.0-canary.27
178
-
179
- ## 8.1.0-canary.26
180
-
181
- ## 8.1.0-canary.25
182
-
183
- ## 8.1.0-canary.24
184
-
185
- ## 8.1.0-canary.23
186
-
187
- ## 8.1.0-canary.22
188
-
189
- ## 8.1.0-canary.21
190
-
191
- ## 8.1.0-canary.20
192
-
193
- ## 8.1.0-canary.19
194
-
195
- ## 8.1.0-canary.18
196
-
197
- ## 8.1.0-canary.17
198
-
199
- ## 8.1.0-canary.16
200
-
201
- ## 8.1.0-canary.15
202
-
203
- ## 8.1.0-canary.14
204
-
205
- ## 8.1.0-canary.13
206
-
207
- ## 8.1.0-canary.12
208
-
209
- ## 8.1.0-canary.11
210
-
211
- ## 8.1.0-canary.10
212
-
213
- ## 8.1.0-canary.9
214
-
215
- ## 8.1.0-canary.8
216
-
217
- ## 8.1.0-canary.7
218
-
219
- ## 8.1.0-canary.6
220
-
221
- ## 8.1.0-canary.5
222
-
223
- ## 8.0.6-canary.4
224
-
225
- ## 8.0.6-canary.3
226
-
227
47
  ## 8.0.6-canary.2
228
48
 
229
49
  ### Patch Changes
@@ -238,48 +58,12 @@
238
58
 
239
59
  - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`1a6d0c4`](https://github.com/graphcommerce-org/graphcommerce/commit/1a6d0c4a3584b1e404b444f1ca44c68eaad56cb7) - Mark useFormValidFields as deprecated: Please use TextInputElement, SelectElement, etc. with the showValid prop ([@FrankHarland](https://github.com/FrankHarland))
240
60
 
241
- ## 8.0.6-canary.1
242
-
243
- ## 8.0.6-canary.0
244
-
245
61
  ## 8.0.5
246
62
 
247
63
  ### Patch Changes
248
64
 
249
65
  - [#2237](https://github.com/graphcommerce-org/graphcommerce/pull/2237) [`60f387d`](https://github.com/graphcommerce-org/graphcommerce/commit/60f387d4a037736aa8105fa45728ee481bdaf887) - Solve an issue where the checkout address form wouldn't be automatically submitted on change. ([@bramvanderholst](https://github.com/bramvanderholst))
250
66
 
251
- ## 8.0.5-canary.10
252
-
253
- ## 8.0.5-canary.9
254
-
255
- ## 8.0.5-canary.8
256
-
257
- ## 8.0.5-canary.7
258
-
259
- ## 8.0.5-canary.6
260
-
261
- ## 8.0.5-canary.5
262
-
263
- ## 8.0.5-canary.4
264
-
265
- ### Patch Changes
266
-
267
- - [#2237](https://github.com/graphcommerce-org/graphcommerce/pull/2237) [`60f387d`](https://github.com/graphcommerce-org/graphcommerce/commit/60f387d4a037736aa8105fa45728ee481bdaf887) - Solve an issue where the checkout address form wouldn't be automatically submitted on change. ([@bramvanderholst](https://github.com/bramvanderholst))
268
-
269
- ## 8.0.5-canary.3
270
-
271
- ## 8.0.5-canary.2
272
-
273
- ## 8.0.5-canary.1
274
-
275
- ## 8.0.5-canary.0
276
-
277
- ## 8.0.4
278
-
279
- ## 8.0.4-canary.1
280
-
281
- ## 8.0.4-canary.0
282
-
283
67
  ## 8.0.3
284
68
 
285
69
  ### Patch Changes
@@ -288,50 +72,6 @@
288
72
 
289
73
  - [#2212](https://github.com/graphcommerce-org/graphcommerce/pull/2212) [`7c9f5da`](https://github.com/graphcommerce-org/graphcommerce/commit/7c9f5da1d458a19b0316c556c75415ff28bc5b2d) - Added noValidate prop so we can use the FormAutoSubmit component to submit partial forms ([@paales](https://github.com/paales))
290
74
 
291
- ## 8.0.3-canary.6
292
-
293
- ## 8.0.3-canary.5
294
-
295
- ### Patch Changes
296
-
297
- - [#2212](https://github.com/graphcommerce-org/graphcommerce/pull/2212) [`7c9f5da`](https://github.com/graphcommerce-org/graphcommerce/commit/7c9f5da1d458a19b0316c556c75415ff28bc5b2d) - Added noValidate prop so we can use the FormAutoSubmit component to submit partial forms ([@paales](https://github.com/paales))
298
-
299
- ## 8.0.3-canary.4
300
-
301
- ## 8.0.3-canary.3
302
-
303
- ### Patch Changes
304
-
305
- - [#2206](https://github.com/graphcommerce-org/graphcommerce/pull/2206) [`855ab09`](https://github.com/graphcommerce-org/graphcommerce/commit/855ab097b9ea204a7c73c6550b7a5e9e2290f378) - Cleanup `<FormAutoSubmit/>` and remove internal hook. ([@paales](https://github.com/paales))
306
-
307
- ## 8.0.3-canary.2
308
-
309
- ## 8.0.3-canary.1
310
-
311
- ## 8.0.3-canary.0
312
-
313
- ## 8.0.2
314
-
315
- ## 8.0.2-canary.3
316
-
317
- ## 8.0.2-canary.2
318
-
319
- ## 8.0.2-canary.1
320
-
321
- ## 8.0.2-canary.0
322
-
323
- ## 8.0.1
324
-
325
- ## 8.0.1-canary.4
326
-
327
- ## 8.0.1-canary.3
328
-
329
- ## 8.0.1-canary.2
330
-
331
- ## 8.0.1-canary.1
332
-
333
- ## 8.0.1-canary.0
334
-
335
75
  ## 8.0.0
336
76
 
337
77
  ### Patch Changes
@@ -340,240 +80,12 @@
340
80
 
341
81
  - [#2007](https://github.com/graphcommerce-org/graphcommerce/pull/2007) [`f59c276`](https://github.com/graphcommerce-org/graphcommerce/commit/f59c276605f9ed649d1197a9ba0e3f12d7c6d026) - Crosssell behavior now properly shows for the latest added product. Added latest submitted variables to be retrieved when using the useFormGql hook. ([@JoshuaS98](https://github.com/JoshuaS98))
342
82
 
343
- ## 8.0.0-canary.100
344
-
345
- ## 8.0.0-canary.99
346
-
347
- ## 8.0.0-canary.98
348
-
349
- ## 8.0.0-canary.97
350
-
351
- ## 8.0.0-canary.96
352
-
353
- ## 8.0.0-canary.95
354
-
355
- ## 8.0.0-canary.94
356
-
357
- ## 8.0.0-canary.93
358
-
359
- ## 8.0.0-canary.92
360
-
361
- ## 8.0.0-canary.91
362
-
363
- ## 8.0.0-canary.90
364
-
365
- ## 8.0.0-canary.89
366
-
367
- ## 8.0.0-canary.88
368
-
369
- ## 8.0.0-canary.87
370
-
371
- ## 8.0.0-canary.86
372
-
373
- ## 8.0.0-canary.85
374
-
375
- ## 8.0.0-canary.84
376
-
377
- ## 8.0.0-canary.83
378
-
379
- ## 8.0.0-canary.82
380
-
381
- ## 8.0.0-canary.81
382
-
383
- ## 8.0.0-canary.80
384
-
385
- ## 8.0.0-canary.79
386
-
387
- ## 8.0.0-canary.78
388
-
389
- ## 8.0.0-canary.77
390
-
391
- ## 8.0.0-canary.76
392
-
393
- ## 8.0.0-canary.75
394
-
395
- ## 8.0.0-canary.74
396
-
397
- ## 8.0.0-canary.73
398
-
399
- ## 8.0.0-canary.72
400
-
401
- ## 8.0.0-canary.71
402
-
403
- ## 8.0.0-canary.70
404
-
405
- ## 8.0.0-canary.69
406
-
407
- ## 7.1.0-canary.68
408
-
409
- ## 7.1.0-canary.67
410
-
411
- ## 7.1.0-canary.66
412
-
413
- ## 7.1.0-canary.65
414
-
415
- ## 7.1.0-canary.64
416
-
417
- ## 7.1.0-canary.63
418
-
419
- ## 7.1.0-canary.62
420
-
421
- ## 7.1.0-canary.61
422
-
423
- ## 7.1.0-canary.60
424
-
425
- ## 7.1.0-canary.59
426
-
427
- ## 7.1.0-canary.58
428
-
429
- ## 7.1.0-canary.57
430
-
431
- ## 7.1.0-canary.56
432
-
433
- ## 7.1.0-canary.55
434
-
435
- ## 7.1.0-canary.54
436
-
437
- ## 7.1.0-canary.53
438
-
439
- ## 7.1.0-canary.52
440
-
441
- ## 7.1.0-canary.51
442
-
443
- ## 7.1.0-canary.50
444
-
445
- ## 7.1.0-canary.49
446
-
447
- ## 7.1.0-canary.48
448
-
449
- ## 7.1.0-canary.47
450
-
451
- ## 7.1.0-canary.46
452
-
453
- ## 7.1.0-canary.45
454
-
455
- ## 7.1.0-canary.38
456
-
457
- ## 7.1.0-canary.37
458
-
459
- ## 7.1.0-canary.36
460
-
461
- ## 7.1.0-canary.35
462
-
463
- ## 7.1.0-canary.34
464
-
465
- ## 7.1.0-canary.33
466
-
467
- ## 7.1.0-canary.32
468
-
469
- ## 7.1.0-canary.31
470
-
471
- ## 7.1.0-canary.30
472
-
473
- ## 7.1.0-canary.29
474
-
475
- ## 7.1.0-canary.28
476
-
477
- ## 7.1.0-canary.27
478
-
479
- ## 7.1.0-canary.26
480
-
481
- ## 7.1.0-canary.25
482
-
483
- ## 7.1.0-canary.24
484
-
485
- ## 7.1.0-canary.23
486
-
487
- ## 7.1.0-canary.22
488
-
489
- ### Patch Changes
490
-
491
- - [#2097](https://github.com/graphcommerce-org/graphcommerce/pull/2097) [`cdc89cedb`](https://github.com/graphcommerce-org/graphcommerce/commit/cdc89cedb9eb4d37a2c37497689e74ff6df21bf6) - Set default value of `experimental_v2` to false in `useFormGql`, since we don't want an experimental feature as default ([@mikekeehnen](https://github.com/mikekeehnen))
492
-
493
- ## 7.1.0-canary.21
494
-
495
- ### Patch Changes
496
-
497
- - [#2093](https://github.com/graphcommerce-org/graphcommerce/pull/2093) [`112b041f0`](https://github.com/graphcommerce-org/graphcommerce/commit/112b041f01a33fbd521ce3eb3955844f96b29917) - Created a new experimental mutation abort feature inside `useFormGql`. This will allow redundant mutations to be canceled. This feature can be enabled via the `experimental_useV2` prop on the `useFormGql` component ([@mikekeehnen](https://github.com/mikekeehnen))
498
-
499
- ## 7.1.0-canary.20
500
-
501
- ## 7.1.0-canary.19
502
-
503
- ## 7.1.0-canary.18
504
-
505
- ## 7.1.0-canary.17
506
-
507
- ## 7.1.0-canary.16
508
-
509
- ## 7.1.0-canary.15
510
-
511
- ## 7.1.0-canary.14
512
-
513
- ## 7.1.0-canary.13
514
-
515
- ## 7.1.0-canary.12
516
-
517
- ## 7.1.0-canary.11
518
-
519
- ## 7.1.0-canary.10
520
-
521
- ## 7.1.0-canary.9
522
-
523
- ### Patch Changes
524
-
525
- - [#2007](https://github.com/graphcommerce-org/graphcommerce/pull/2007) [`f59c27660`](https://github.com/graphcommerce-org/graphcommerce/commit/f59c276605f9ed649d1197a9ba0e3f12d7c6d026) - Reconstruct crosssells behaviour. Add submitted variables & showSuccess to RHF ([@JoshuaS98](https://github.com/JoshuaS98))
526
-
527
- ## 7.1.0-canary.8
528
-
529
- ## 7.0.2-canary.7
530
-
531
- ## 7.0.2-canary.6
532
-
533
- ## 7.0.2-canary.5
534
-
535
83
  ## 7.0.1
536
84
 
537
85
  ### Patch Changes
538
86
 
539
87
  - [#2047](https://github.com/graphcommerce-org/graphcommerce/pull/2047) [`136580b39`](https://github.com/graphcommerce-org/graphcommerce/commit/136580b39e3cffdd07e3fa087e049bd532c3e8f1) - Updated all dependencies to the latest version where possible. ([@paales](https://github.com/paales))
540
88
 
541
- ## 7.0.1-canary.15
542
-
543
- ## 7.0.1-canary.14
544
-
545
- ## 7.0.1-canary.13
546
-
547
- ## 7.0.1-canary.12
548
-
549
- ## 7.0.1-canary.11
550
-
551
- ## 7.0.1-canary.10
552
-
553
- ## 7.0.1-canary.9
554
-
555
- ## 7.0.1-canary.8
556
-
557
- ## 7.0.1-canary.7
558
-
559
- ## 7.0.1-canary.6
560
-
561
- ## 7.0.1-canary.5
562
-
563
- ## 7.0.1-canary.4
564
-
565
- ## 7.0.1-canary.3
566
-
567
- ## 7.0.1-canary.2
568
-
569
- ## 7.0.1-canary.1
570
-
571
- ## 7.0.1-canary.0
572
-
573
- ### Patch Changes
574
-
575
- - [#2047](https://github.com/graphcommerce-org/graphcommerce/pull/2047) [`136580b39`](https://github.com/graphcommerce-org/graphcommerce/commit/136580b39e3cffdd07e3fa087e049bd532c3e8f1) - Updated all dependencies to the latest version where possible. ([@paales](https://github.com/paales))
576
-
577
89
  ## 7.0.0
578
90
 
579
91
  ### Major Changes
@@ -586,412 +98,12 @@
586
98
 
587
99
  - [#2012](https://github.com/graphcommerce-org/graphcommerce/pull/2012) [`1dbb3ae13`](https://github.com/graphcommerce-org/graphcommerce/commit/1dbb3ae13553992ee1ed77f375375560f28c418c) - Upgrade graphql to 16.7.1, add graphql as peer dependency ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
588
100
 
589
- ## 6.2.0-canary.98
590
-
591
- ## 6.2.0-canary.97
592
-
593
- ## 6.2.0-canary.96
594
-
595
- ## 6.2.0-canary.95
596
-
597
- ## 6.2.0-canary.94
598
-
599
- ## 6.2.0-canary.93
600
-
601
- ## 6.2.0-canary.92
602
-
603
- ## 6.2.0-canary.91
604
-
605
- ## 6.2.0-canary.90
606
-
607
- ## 6.2.0-canary.89
608
-
609
- ## 6.2.0-canary.88
610
-
611
- ## 6.2.0-canary.87
612
-
613
- ## 6.2.0-canary.86
614
-
615
- ## 6.2.0-canary.85
616
-
617
- ## 6.2.0-canary.84
618
-
619
- ## 6.2.0-canary.83
620
-
621
- ## 6.2.0-canary.82
622
-
623
- ## 6.2.0-canary.81
624
-
625
- ## 6.2.0-canary.80
626
-
627
- ## 6.2.0-canary.79
628
-
629
- ## 6.2.0-canary.78
630
-
631
- ## 6.2.0-canary.77
632
-
633
- ## 6.2.0-canary.76
634
-
635
- ## 6.2.0-canary.75
636
-
637
- ## 6.2.0-canary.74
638
-
639
- ## 6.2.0-canary.73
640
-
641
- ## 6.2.0-canary.72
642
-
643
- ## 6.2.0-canary.71
644
-
645
- ## 6.2.0-canary.70
646
-
647
- ## 6.2.0-canary.69
648
-
649
- ### Patch Changes
650
-
651
- - [#2012](https://github.com/graphcommerce-org/graphcommerce/pull/2012) [`1dbb3ae13`](https://github.com/graphcommerce-org/graphcommerce/commit/1dbb3ae13553992ee1ed77f375375560f28c418c) - Upgrade graphql to 16.7.1, add graphql as peer dependency ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
652
-
653
- ## 6.2.0-canary.68
654
-
655
- ## 6.2.0-canary.67
656
-
657
- ### Patch Changes
658
-
659
- - [#2002](https://github.com/graphcommerce-org/graphcommerce/pull/2002) [`1234bb61f`](https://github.com/graphcommerce-org/graphcommerce/commit/1234bb61f8332da8a9e4dd7262b0c70beaed8c91) - Updated next and apollo/client ([@paales](https://github.com/paales))
660
-
661
- ## 6.2.0-canary.66
662
-
663
- ## 6.2.0-canary.65
664
-
665
- ## 6.2.0-canary.64
666
-
667
- ## 6.2.0-canary.63
668
-
669
- ## 6.2.0-canary.62
670
-
671
- ## 6.2.0-canary.61
672
-
673
- ## 6.2.0-canary.60
674
-
675
- ## 6.2.0-canary.59
676
-
677
- ## 6.2.0-canary.58
678
-
679
- ## 6.2.0-canary.57
680
-
681
- ## 6.2.0-canary.56
682
-
683
- ## 6.2.0-canary.55
684
-
685
- ## 6.2.0-canary.54
686
-
687
- ## 6.2.0-canary.53
688
-
689
- ## 6.2.0-canary.52
690
-
691
- ## 6.2.0-canary.51
692
-
693
- ## 6.2.0-canary.50
694
-
695
- ### Minor Changes
696
-
697
- - [`e55d8c390`](https://github.com/graphcommerce-org/graphcommerce/commit/e55d8c390d90b4bb7bab11c6a99027ac72bd7e3e) - Created a new sidebar layout system, can be configured with productFiltersLayout in the graphcommerce.config.js ([@paales](https://github.com/paales))
698
-
699
- ## 6.2.0-canary.49
700
-
701
- ## 6.2.0-canary.48
702
-
703
- ## 6.2.0-canary.47
704
-
705
- ## 6.2.0-canary.46
706
-
707
- ## 6.2.0-canary.45
708
-
709
- ## 6.2.0-canary.44
710
-
711
- ## 6.2.0-canary.43
712
-
713
- ## 6.2.0-canary.42
714
-
715
- ## 6.2.0-canary.41
716
-
717
- ### Patch Changes
718
-
719
- - [#1960](https://github.com/graphcommerce-org/graphcommerce/pull/1960) [`f78caf5a8`](https://github.com/graphcommerce-org/graphcommerce/commit/f78caf5a83683f1ae4b901fb94bd22d50943fa2f) - Updated packages @apollo/client, react-hook-form, @emotion/\*, @lingui/\*, @mui/\* and various others. ([@paales](https://github.com/paales))
720
-
721
- ## 6.2.0-canary.40
722
-
723
- ## 6.2.0-canary.39
724
-
725
- ## 6.2.0-canary.38
726
-
727
- ## 6.2.0-canary.37
728
-
729
- ## 6.2.0-canary.36
730
-
731
- ## 6.2.0-canary.35
732
-
733
- ## 6.2.0-canary.34
734
-
735
- ## 6.2.0-canary.33
736
-
737
- ## 6.2.0-canary.32
738
-
739
- ## 6.2.0-canary.31
740
-
741
- ## 6.2.0-canary.30
742
-
743
- ## 6.2.0-canary.29
744
-
745
- ## 6.2.0-canary.28
746
-
747
- ## 6.2.0-canary.27
748
-
749
- ## 6.2.0-canary.26
750
-
751
- ## 6.2.0-canary.25
752
-
753
- ## 6.2.0-canary.24
754
-
755
- ## 6.2.0-canary.23
756
-
757
- ## 6.2.0-canary.22
758
-
759
- ## 6.2.0-canary.21
760
-
761
- ## 6.2.0-canary.20
762
-
763
- ## 6.2.0-canary.19
764
-
765
- ## 6.2.0-canary.18
766
-
767
- ## 6.2.0-canary.17
768
-
769
- ## 6.2.0-canary.16
770
-
771
- ## 6.2.0-canary.15
772
-
773
- ## 6.2.0-canary.14
774
-
775
- ## 6.2.0-canary.13
776
-
777
- ## 6.2.0-canary.12
778
-
779
- ## 6.2.0-canary.11
780
-
781
- ## 6.2.0-canary.10
782
-
783
- ## 6.2.0-canary.9
784
-
785
- ## 6.2.0-canary.8
786
-
787
- ## 6.2.0-canary.7
788
-
789
- ## 6.2.0-canary.6
790
-
791
- ## 6.1.1-canary.5
792
-
793
- ## 6.1.1-canary.4
794
-
795
- ## 6.1.1-canary.3
796
-
797
- ## 6.1.1-canary.2
798
-
799
- ## 6.1.1-canary.1
800
-
801
- ## 6.1.1-canary.0
802
-
803
- ## 6.1.0
804
-
805
- ## 6.0.2-canary.22
806
-
807
- ## 6.0.2-canary.21
808
-
809
- ## 6.0.2-canary.20
810
-
811
- ## 6.0.2-canary.19
812
-
813
- ## 6.0.2-canary.18
814
-
815
- ## 6.0.2-canary.17
816
-
817
- ## 6.0.2-canary.16
818
-
819
- ## 6.0.2-canary.15
820
-
821
- ## 6.0.2-canary.14
822
-
823
- ## 6.0.2-canary.13
824
-
825
- ## 6.0.2-canary.12
826
-
827
- ## 6.0.2-canary.11
828
-
829
- ## 6.0.2-canary.10
830
-
831
- ## 6.0.2-canary.9
832
-
833
- ## 6.0.2-canary.8
834
-
835
- ## 6.0.2-canary.7
836
-
837
- ## 6.0.2-canary.6
838
-
839
- ## 6.0.2-canary.5
840
-
841
- ## 6.0.2-canary.4
842
-
843
- ## 6.0.2-canary.3
844
-
845
- ## 6.0.2-canary.2
846
-
847
- ## 6.0.2-canary.1
848
-
849
- ## 6.0.2-canary.0
850
-
851
101
  ## 6.0.1
852
102
 
853
103
  ### Patch Changes
854
104
 
855
105
  - [#1859](https://github.com/graphcommerce-org/graphcommerce/pull/1859) [`08ea612a1`](https://github.com/graphcommerce-org/graphcommerce/commit/08ea612a1d26166b8e55f20525c1004642cc85aa) - Resolved multiple onSubmitSuccessful callbacks in ComposedForm, when we have multiple ComposedForm Components on a page ([@mikekeehnen](https://github.com/mikekeehnen))
856
106
 
857
- ## 6.0.1-canary.7
858
-
859
- ## 6.0.1-canary.6
860
-
861
- ## 6.0.1-canary.5
862
-
863
- ## 6.0.1-canary.4
864
-
865
- ## 6.0.1-canary.3
866
-
867
- ## 6.0.1-canary.2
868
-
869
- ### Patch Changes
870
-
871
- - [#1859](https://github.com/graphcommerce-org/graphcommerce/pull/1859) [`08ea612a1`](https://github.com/graphcommerce-org/graphcommerce/commit/08ea612a1d26166b8e55f20525c1004642cc85aa) - Resolved multiple onSubmitSuccessful callbacks in ComposedForm, when we have multiple ComposedForm Components on a page ([@mikekeehnen](https://github.com/mikekeehnen))
872
-
873
- ## 6.0.1-canary.1
874
-
875
- ## 6.0.1-canary.0
876
-
877
- ## 6.0.0
878
-
879
- ## 6.0.0-canary.54
880
-
881
- ## 6.0.0-canary.53
882
-
883
- ## 6.0.0-canary.52
884
-
885
- ## 6.0.0-canary.51
886
-
887
- ## 6.0.0-canary.50
888
-
889
- ## 6.0.0-canary.49
890
-
891
- ## 6.0.0-canary.48
892
-
893
- ## 6.0.0-canary.47
894
-
895
- ## 6.0.0-canary.46
896
-
897
- ## 6.0.0-canary.45
898
-
899
- ## 6.0.0-canary.44
900
-
901
- ## 6.0.0-canary.43
902
-
903
- ## 6.0.0-canary.42
904
-
905
- ## 6.0.0-canary.41
906
-
907
- ## 6.0.0-canary.40
908
-
909
- ## 6.0.0-canary.39
910
-
911
- ## 6.0.0-canary.38
912
-
913
- ## 6.0.0-canary.37
914
-
915
- ## 6.0.0-canary.36
916
-
917
- ## 6.0.0-canary.35
918
-
919
- ## 6.0.0-canary.34
920
-
921
- ## 6.0.0-canary.33
922
-
923
- ## 6.0.0-canary.32
924
-
925
- ## 6.0.0-canary.31
926
-
927
- ## 6.0.0-canary.30
928
-
929
- ## 6.0.0-canary.29
930
-
931
- ## 6.0.0-canary.28
932
-
933
- ## 6.0.0-canary.27
934
-
935
- ## 6.0.0-canary.26
936
-
937
- ## 6.0.0-canary.25
938
-
939
- ## 6.0.0-canary.24
940
-
941
- ## 6.0.0-canary.23
942
-
943
- ## 6.0.0-canary.22
944
-
945
- ## 6.0.0-canary.21
946
-
947
- ## 6.0.0-canary.20
948
-
949
- ## 5.2.0-canary.19
950
-
951
- ## 5.2.0-canary.18
952
-
953
- ## 5.2.0-canary.17
954
-
955
- ## 5.2.0-canary.16
956
-
957
- ## 5.2.0-canary.15
958
-
959
- ## 5.2.0-canary.14
960
-
961
- ## 5.2.0-canary.13
962
-
963
- ## 5.2.0-canary.12
964
-
965
- ## 5.2.0-canary.11
966
-
967
- ## 5.2.0-canary.10
968
-
969
- ## 5.2.0-canary.9
970
-
971
- ## 5.2.0-canary.8
972
-
973
- ## 5.2.0-canary.7
974
-
975
- ## 5.2.0-canary.6
976
-
977
- ## 5.2.0-canary.5
978
-
979
- ## 5.2.0-canary.4
980
-
981
- ## 5.2.0-canary.3
982
-
983
- ## 5.2.0-canary.2
984
-
985
- ## 5.2.0-canary.1
986
-
987
- ## 5.2.0-canary.0
988
-
989
- ## 5.1.1
990
-
991
- ## 5.1.1-canary.1
992
-
993
- ## 5.1.1-canary.0
994
-
995
107
  ## 5.1.0
996
108
 
997
109
  ### Patch Changes
@@ -1003,89 +115,18 @@
1003
115
  - Upgraded dependencies including type-fest and graphql-mesh
1004
116
  - Solved peer dependency issues ([@paales](https://github.com/paales))
1005
117
 
1006
- ## 5.1.0-canary.11
1007
-
1008
- ## 5.1.0-canary.10
1009
-
1010
- ## 5.1.0-canary.9
1011
-
1012
- ## 5.1.0-canary.8
1013
-
1014
- ## 5.1.0-canary.7
1015
-
1016
- ## 5.1.0-canary.6
1017
-
1018
- ## 5.1.0-canary.5
1019
-
1020
- ## 5.1.0-canary.4
1021
-
1022
- ## 5.1.0-canary.3
1023
-
1024
- ### Patch Changes
1025
-
1026
- - [#1752](https://github.com/graphcommerce-org/graphcommerce/pull/1752) [`2a6a4d9ec`](https://github.com/graphcommerce-org/graphcommerce/commit/2a6a4d9ecfa1b58a66ba9b9d00016d6feda9aa95) - Updated dependencies to latest versions, except for nextjs; Solve tons of peer dependency issues.
1027
-
1028
- - Updated the @mui/material package
1029
- - Removed dependencies on react-hook-form-mui and @playwright/test
1030
- - Upgraded dependencies including type-fest and graphql-mesh
1031
- - Solved peer dependency issues ([@paales](https://github.com/paales))
1032
-
1033
- ## 5.1.0-canary.2
1034
-
1035
- ## 5.1.0-canary.1
1036
-
1037
- ## 5.1.0-canary.0
1038
-
1039
118
  ## 5.0.0
1040
119
 
1041
120
  ### Major Changes
1042
121
 
1043
122
  - [#1734](https://github.com/graphcommerce-org/graphcommerce/pull/1734) [`e4c7fe17e`](https://github.com/graphcommerce-org/graphcommerce/commit/e4c7fe17e413e37362ceae92e67f1b3a5f62d398) - Bump major version of all packages ([@github-actions](https://github.com/apps/github-actions))
1044
123
 
1045
- ## 5.0.0-canary.14
1046
-
1047
- ## 5.0.0-canary.9
1048
-
1049
- ### Major Changes
1050
-
1051
- - [`e4c7fe17e`](https://github.com/graphcommerce-org/graphcommerce/commit/e4c7fe17e413e37362ceae92e67f1b3a5f62d398) - Bump major version of all packages ([@paales](https://github.com/paales))
1052
-
1053
- ## 4.31.0-canary.8
1054
-
1055
- ## 4.31.0-canary.7
1056
-
1057
- ## 4.31.0-canary.6
1058
-
1059
- ## 4.31.0-canary.5
1060
-
1061
- ## 4.31.0-canary.4
1062
-
1063
- ## 4.31.0-canary.3
1064
-
1065
- ## 4.31.0-canary.2
1066
-
1067
- ## 4.31.0-canary.1
1068
-
1069
- ## 4.31.0-canary.0
1070
-
1071
- ## 4.30.2
1072
-
1073
- ## 4.30.1
1074
-
1075
124
  ## 4.30.0
1076
125
 
1077
126
  ### Patch Changes
1078
127
 
1079
128
  - [#1702](https://github.com/graphcommerce-org/graphcommerce/pull/1702) [`abb15ef4a`](https://github.com/graphcommerce-org/graphcommerce/commit/abb15ef4a79b12eddb32cc006e5d1d31dd06ac2d) Thanks [@paales](https://github.com/paales)! - Added canary releases to GraphCommerce
1080
129
 
1081
- ## 4.30.0-canary.1
1082
-
1083
- ### Patch Changes
1084
-
1085
- - [`abb15ef4a`](https://github.com/graphcommerce-org/graphcommerce/commit/abb15ef4a79b12eddb32cc006e5d1d31dd06ac2d) Thanks [@paales](https://github.com/paales)! - Added canary releases to GraphCommerce
1086
-
1087
- ## 4.30.0-canary.0
1088
-
1089
130
  ## 3.3.5
1090
131
 
1091
132
  ### Patch Changes
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/react-hook-form",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.0-canary.101",
5
+ "version": "9.0.0-canary.104",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -11,15 +11,13 @@
11
11
  "project": "./tsconfig.json"
12
12
  }
13
13
  },
14
- "devDependencies": {
15
- "@testing-library/react": "^14.3.1"
16
- },
17
14
  "peerDependencies": {
18
15
  "@apollo/client": "^3",
19
- "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.101",
20
- "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.101",
21
- "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.101",
16
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.104",
17
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.104",
18
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.104",
22
19
  "@mui/utils": "^5",
20
+ "@testing-library/react": "^14.3.1",
23
21
  "graphql": "^16.6.0",
24
22
  "react": "^18.2.0",
25
23
  "react-dom": "^18.2.0",
@@ -1,9 +1,8 @@
1
1
  import { ApolloError } from '@apollo/client'
2
2
  import React, { useContext, useEffect, useRef } from 'react'
3
- import { GlobalError } from 'react-hook-form'
4
3
  import { isFormGqlOperation } from '../useFormGqlMutation'
5
4
  import { composedFormContext } from './context'
6
- import { ComposedSubmitRenderComponentProps } from './types'
5
+ import type { ComposedSubmitRenderComponentProps } from './types'
7
6
 
8
7
  export type ComposedSubmitProps = {
9
8
  onSubmitSuccessful?: () => void
@@ -1,4 +1,4 @@
1
1
  import React from 'react'
2
- import { ComposedFormContext } from './types'
2
+ import type { ComposedFormContext } from './types'
3
3
 
4
4
  export const composedFormContext = React.createContext(undefined as unknown as ComposedFormContext)
@@ -1,5 +1,5 @@
1
1
  import { isFormGqlOperation } from '../useFormGqlMutation'
2
- import { ComposedFormReducer, ComposedFormState } from './types'
2
+ import type { ComposedFormReducer, ComposedFormState } from './types'
3
3
 
4
4
  function updateFormStateIfNecessary(state: ComposedFormState): ComposedFormState {
5
5
  const formEntries = Object.entries(state.forms)
@@ -1,5 +1,5 @@
1
- import { ApolloError } from '@apollo/client'
2
- import type { FieldValues, FormState, GlobalError, UseFormReturn } from 'react-hook-form'
1
+ import type { ApolloError } from '@apollo/client'
2
+ import type { FieldValues, FormState, UseFormReturn } from 'react-hook-form'
3
3
  import type { SetOptional } from 'type-fest'
4
4
 
5
5
  export type UseFormComposeOptions<V extends FieldValues = FieldValues> = {
@@ -1,8 +1,8 @@
1
1
  import { useContext, useEffect } from 'react'
2
- import { FieldValues, UseFormReturn } from 'react-hook-form'
2
+ import type { FieldValues, UseFormReturn } from 'react-hook-form'
3
3
  import { isFormGqlOperation } from '../useFormGqlMutation'
4
4
  import { composedFormContext } from './context'
5
- import { UseFormComposeOptions } from './types'
5
+ import type { UseFormComposeOptions } from './types'
6
6
 
7
7
  export function useFormCompose<V extends Record<string, unknown>>(
8
8
  fields: UseFormComposeOptions<V>,
@@ -1,20 +1,20 @@
1
1
  /* eslint-disable react/no-unused-prop-types */
2
- import { cloneDeep } from '@apollo/client/utilities'
3
2
  // eslint-disable-next-line import/no-extraneous-dependencies
4
3
  import { useMemoObject } from '@graphcommerce/next-ui/hooks/useMemoObject'
4
+ import { cloneDeep } from '@apollo/client/utilities'
5
5
  // eslint-disable-next-line import/no-extraneous-dependencies
6
6
  import { debounce } from '@mui/material'
7
7
  import React, { useCallback, useEffect, useRef, useState } from 'react'
8
- import {
8
+ import type {
9
9
  DeepPartialSkipArrayKey,
10
10
  FieldPath,
11
11
  FieldValues,
12
12
  UseFormReturn,
13
13
  UseWatchProps,
14
- useFormState,
15
- useWatch,
16
14
  } from 'react-hook-form'
17
- import { DebounceSettings, useDebounce } from './utils/useDebounce'
15
+ import { useFormState, useWatch } from 'react-hook-form'
16
+ import type { DebounceSettings } from './utils/useDebounce'
17
+ import { useDebounce } from './utils/useDebounce'
18
18
 
19
19
  export type UseFormAutoSubmitOptions<TForm extends UseFormReturn<V>, V extends FieldValues> = {
20
20
  /** Instance of current form */
@@ -1,19 +1,20 @@
1
- import {
1
+ import type {
2
2
  ApolloError,
3
3
  FetchResult,
4
+ LazyQueryHookOptions,
4
5
  LazyQueryResultTuple,
6
+ MutationHookOptions,
5
7
  MutationTuple,
6
8
  TypedDocumentNode,
7
- isApolloError,
8
- MutationHookOptions,
9
- LazyQueryHookOptions,
10
9
  } from '@apollo/client'
10
+ import { isApolloError } from '@apollo/client'
11
11
  import { getOperationName } from '@apollo/client/utilities'
12
12
  import useEventCallback from '@mui/utils/useEventCallback'
13
13
  import { useEffect, useRef } from 'react'
14
- import { DefaultValues, FieldValues, UseFormProps, UseFormReturn } from 'react-hook-form'
14
+ import type { DefaultValues, FieldValues, UseFormProps, UseFormReturn } from 'react-hook-form'
15
15
  import diff from './diff'
16
- import { useGqlDocumentHandler, UseGqlDocumentHandler } from './useGqlDocumentHandler'
16
+ import type { UseGqlDocumentHandler } from './useGqlDocumentHandler'
17
+ import { useGqlDocumentHandler } from './useGqlDocumentHandler'
17
18
  import { tryAsync } from './utils/tryTuple'
18
19
 
19
20
  export type OnCompleteFn<Q, V> = (data: FetchResult<Q>, variables: V) => void | Promise<void>
@@ -154,7 +155,7 @@ export function useFormGql<Q, V extends FieldValues>(
154
155
  : true
155
156
 
156
157
  if (skipUnchanged && !hasDirtyFields) {
157
- console.log(
158
+ console.info(
158
159
  `[useFormGql ${getOperationName(document)}] skipped submission, no dirty fields`,
159
160
  )
160
161
  await onValid(formValues, event)
@@ -173,7 +174,7 @@ export function useFormGql<Q, V extends FieldValues>(
173
174
  if (isApolloError(onBeforeSubmitError)) {
174
175
  returnedError.current = onBeforeSubmitError
175
176
  } else {
176
- console.log(
177
+ console.info(
177
178
  'A non ApolloError was thrown during the onBeforeSubmit handler.',
178
179
  onBeforeSubmitError,
179
180
  )
@@ -209,7 +210,7 @@ export function useFormGql<Q, V extends FieldValues>(
209
210
  if (isApolloError(onCompleteError)) {
210
211
  returnedError.current = onCompleteError
211
212
  } else {
212
- console.log(
213
+ console.info(
213
214
  'A non ApolloError was thrown during the onComplete handler.',
214
215
  onCompleteError,
215
216
  )
@@ -1,8 +1,12 @@
1
- import { MutationHookOptions, TypedDocumentNode, useMutation } from '@apollo/client'
2
- import { FieldValues, useForm, UseFormReturn } from 'react-hook-form'
3
- import { useFormGql, UseFormGqlMethods, UseFormGraphQlOptions } from './useFormGql'
4
- import { useFormMuiRegister, UseMuiFormRegister } from './useFormMuiRegister'
5
- import { UseFormValidReturn } from './useFormValidFields'
1
+ import type { MutationHookOptions, TypedDocumentNode } from '@apollo/client'
2
+ import { useMutation } from '@apollo/client'
3
+ import type { FieldValues, UseFormReturn } from 'react-hook-form'
4
+ import { useForm } from 'react-hook-form'
5
+ import type { UseFormGqlMethods, UseFormGraphQlOptions } from './useFormGql'
6
+ import { useFormGql } from './useFormGql'
7
+ import type { UseMuiFormRegister } from './useFormMuiRegister'
8
+ import { useFormMuiRegister } from './useFormMuiRegister'
9
+ import type { UseFormValidReturn } from './useFormValidFields'
6
10
 
7
11
  export type UseFormGqlMutationReturn<
8
12
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -33,7 +37,7 @@ export function assertFormGqlOperation<
33
37
  Q extends Record<string, unknown> = Record<string, unknown>,
34
38
  >(form: UseFormReturn<V>): asserts form is UseFormGqlMutationReturn<Q, V> {
35
39
  if (typeof (form as UseFormGqlMutationReturn<Q, V>).muiRegister !== 'function') {
36
- throw Error(`form must be one of 'useFromGqlMutation' or 'useFormGqlQuery'`)
40
+ throw Error("form must be one of 'useFromGqlMutation' or 'useFormGqlQuery'")
37
41
  }
38
42
  }
39
43
 
@@ -1,7 +1,10 @@
1
- import { LazyQueryHookOptions, TypedDocumentNode, useLazyQuery } from '@apollo/client'
2
- import { FieldValues, useForm } from 'react-hook-form'
3
- import { useFormGql, UseFormGraphQlOptions } from './useFormGql'
4
- import { UseFormGqlMutationReturn } from './useFormGqlMutation'
1
+ import type { LazyQueryHookOptions, TypedDocumentNode } from '@apollo/client'
2
+ import { useLazyQuery } from '@apollo/client'
3
+ import type { FieldValues } from 'react-hook-form'
4
+ import { useForm } from 'react-hook-form'
5
+ import type { UseFormGraphQlOptions } from './useFormGql'
6
+ import { useFormGql } from './useFormGql'
7
+ import type { UseFormGqlMutationReturn } from './useFormGqlMutation'
5
8
  import { useFormMuiRegister } from './useFormMuiRegister'
6
9
 
7
10
  export type UseFormGqlQueryReturn<
@@ -1,6 +1,6 @@
1
- import {
2
- FieldValues,
1
+ import type {
3
2
  FieldPath,
3
+ FieldValues,
4
4
  RegisterOptions,
5
5
  UseFormRegisterReturn,
6
6
  UseFormReturn,
@@ -1,14 +1,7 @@
1
- import { useMemoObject } from '@graphcommerce/next-ui/hooks/useMemoObject'
1
+ /* eslint-disable react/no-unused-prop-types */
2
2
  import { useEffect } from 'react'
3
- import {
4
- FieldValues,
5
- UseFormReturn,
6
- Path,
7
- FieldPath,
8
- PathValue,
9
- useWatch,
10
- useFormState,
11
- } from 'react-hook-form'
3
+ import type { FieldPath, FieldValues, Path, PathValue, UseFormReturn } from 'react-hook-form'
4
+ import { useFormState, useWatch } from 'react-hook-form'
12
5
 
13
6
  export type UseFormPersistOptions<
14
7
  TFieldValues extends FieldValues = FieldValues,
@@ -1,5 +1,5 @@
1
- import { FieldValues, Path, UseFormReturn } from 'react-hook-form'
2
- import { IsRequired } from './useGqlDocumentHandler'
1
+ import type { FieldValues, Path, UseFormReturn } from 'react-hook-form'
2
+ import type { IsRequired } from './useGqlDocumentHandler'
3
3
 
4
4
  export type UseFormValidReturn<TFieldValues> = Partial<Record<Path<TFieldValues>, boolean>>
5
5
 
@@ -1,15 +1,16 @@
1
1
  import type { TypedDocumentNode } from '@apollo/client'
2
- import type {
3
- DefinitionNode,
4
- OperationDefinitionNode,
5
- ValueNode,
6
- NullValueNode,
7
- ObjectValueNode,
8
- ListValueNode,
9
- VariableNode,
10
- VariableDefinitionNode,
11
- TypeNode,
12
- OperationTypeNode,
2
+ import {
3
+ type DefinitionNode,
4
+ Kind,
5
+ type ListValueNode,
6
+ type NullValueNode,
7
+ type ObjectValueNode,
8
+ type OperationDefinitionNode,
9
+ type OperationTypeNode,
10
+ type TypeNode,
11
+ type ValueNode,
12
+ type VariableDefinitionNode,
13
+ type VariableNode,
13
14
  } from 'graphql'
14
15
  import { useMemo } from 'react'
15
16
  import type { FieldValues } from 'react-hook-form'
@@ -64,10 +65,10 @@ type DeepStringify<V> = {
64
65
  type FieldTypes = LiteralUnion<keyof Scalars, string> | FieldTypes[]
65
66
 
66
67
  function variableType<T extends TypeNode>(type: T): FieldTypes {
67
- if (type.kind === 'ListType') {
68
+ if (type.kind === Kind.LIST_TYPE) {
68
69
  return [variableType(type.type)]
69
70
  }
70
- if (type.kind === 'NonNullType') {
71
+ if (type.kind === Kind.NON_NULL_TYPE) {
71
72
  return variableType(type.type)
72
73
  }
73
74
 
@@ -103,7 +104,7 @@ export function handlerFactory<Q, V extends FieldValues>(
103
104
  definition.variableDefinitions.forEach((variable: VariableDefinitionNode) => {
104
105
  const name = variable.variable.name.value as keyof V
105
106
 
106
- requiredPartial = { ...requiredPartial, [name]: variable.type.kind === 'NonNullType' }
107
+ requiredPartial = { ...requiredPartial, [name]: variable.type.kind === Kind.NON_NULL_TYPE }
107
108
  encodingPartial = { ...encodingPartial, [name]: variableType(variable.type) }
108
109
 
109
110
  if (variable.defaultValue && isWithValueNode(variable.defaultValue)) {
@@ -50,7 +50,7 @@ export default function debounce<T extends (...args: unknown[]) => unknown>({
50
50
  console.warn(`debounce: ${invalidParams.join(', ')} should not be negative.`)
51
51
 
52
52
  if (maxWait < wait)
53
- console.warn(`debounce: maxWait should not be less than wait. This does nothing`)
53
+ console.warn('debounce: maxWait should not be less than wait. This does nothing')
54
54
  }
55
55
 
56
56
  const clear = () => {
@@ -1,7 +1,9 @@
1
1
  import useEventCallback from '@mui/utils/useEventCallback'
2
2
  import { useMemo } from 'react'
3
- import debounce, { DebounceOptions } from './debounce'
3
+ import type { DebounceOptions } from './debounce'
4
+ import debounce from './debounce'
4
5
 
6
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
7
  export function useDebouncedCallback<T extends (...args: any[]) => unknown>(
6
8
  callback: T,
7
9
  { initialWait, maxWait, wait }: DebounceOptions = {},