@graphcommerce/react-hook-form 2.104.5 → 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,109 +1,134 @@
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.
5
-
6
- ## [2.104.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/react-hook-form@2.104.0...@graphcommerce/react-hook-form@2.104.1) (2021-12-03)
3
+ ## 3.0.0
7
4
 
5
+ ### Major Changes
8
6
 
9
- ### Bug Fixes
10
-
11
- * make the headerHeight properly configurable ([c39c942](https://github.com/ho-nl/m2-pwa/commit/c39c942a62a9bb9687ea553be28e37fb49a6b065))
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
12
10
 
11
+ All notable changes to this project will be documented in this file. See
12
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
13
13
 
14
+ ## [2.104.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/react-hook-form@2.104.0...@graphcommerce/react-hook-form@2.104.1) (2021-12-03)
14
15
 
16
+ ### Bug Fixes
15
17
 
18
+ - make the headerHeight properly configurable
19
+ ([c39c942](https://github.com/ho-nl/m2-pwa/commit/c39c942a62a9bb9687ea553be28e37fb49a6b065))
16
20
 
17
21
  # [2.104.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/react-hook-form@2.103.1...@graphcommerce/react-hook-form@2.104.0) (2021-11-12)
18
22
 
19
-
20
23
  ### Features
21
24
 
22
- * added tons of translations ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
23
-
24
-
25
-
26
-
25
+ - added tons of translations
26
+ ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
27
27
 
28
28
  # [2.103.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/react-hook-form@2.102.14...@graphcommerce/react-hook-form@2.103.0) (2021-11-03)
29
29
 
30
-
31
30
  ### Bug Fixes
32
31
 
33
- * add x-recaptcha header to apollo link context when using mutations ([380fe52](https://github.com/ho-nl/m2-pwa/commit/380fe52ebd283df034d8a2c6a4f6a3713955bdd3))
34
- * **use-form-gql:** context type ([f355495](https://github.com/ho-nl/m2-pwa/commit/f3554951697fe394a76dd75ecf119f038f8d9bbc))
35
-
32
+ - add x-recaptcha header to apollo link context when using mutations
33
+ ([380fe52](https://github.com/ho-nl/m2-pwa/commit/380fe52ebd283df034d8a2c6a4f6a3713955bdd3))
34
+ - **use-form-gql:** context type
35
+ ([f355495](https://github.com/ho-nl/m2-pwa/commit/f3554951697fe394a76dd75ecf119f038f8d9bbc))
36
36
 
37
37
  ### Features
38
38
 
39
- * google recaptcha v3 integration ([a9fcc16](https://github.com/ho-nl/m2-pwa/commit/a9fcc16f93951e61378c99a2e183e2d754da1d50))
40
-
41
-
42
-
43
-
39
+ - google recaptcha v3 integration
40
+ ([a9fcc16](https://github.com/ho-nl/m2-pwa/commit/a9fcc16f93951e61378c99a2e183e2d754da1d50))
44
41
 
45
42
  ## [2.102.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/react-hook-form@2.102.0...@graphcommerce/react-hook-form@2.102.1) (2021-09-27)
46
43
 
47
44
  **Note:** Version bump only for package @graphcommerce/react-hook-form
48
45
 
49
-
50
-
51
-
52
-
53
46
  # 2.102.0 (2021-09-27)
54
47
 
55
-
56
48
  ### Bug Fixes
57
49
 
58
- * disable isValid form checkout on submit ([b20110d](https://github.com/ho-nl/m2-pwa/commit/b20110d93327ff2678296acc47b1075b4fb3a85a))
59
- * ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
60
- * input checkmarks ([279c1c1](https://github.com/ho-nl/m2-pwa/commit/279c1c112ada46fdea102024298e8293d1a23293))
61
- * make sure ComposedForm actually submits correctly ([c6499d9](https://github.com/ho-nl/m2-pwa/commit/c6499d9d36f874cd65b310cbf7f63f5a88fa86cd))
62
- * make sure the checkout address fields are working as expected ([e88aae9](https://github.com/ho-nl/m2-pwa/commit/e88aae9afa3c60457b8e8c87ba52e8ae2dec4a3e))
63
- * make sure useFormGqlQuery uses the new useLazyQueryPromise ([f0cf831](https://github.com/ho-nl/m2-pwa/commit/f0cf83191dbbc2da222682b053db8b8c374add69))
64
- * **react-hook-form:** assertFormGqlOperation ([ce09fa5](https://github.com/ho-nl/m2-pwa/commit/ce09fa50f73f6d06b2caa15b1223ba7470a7ea96))
65
- * **react-hook-form:** form autosubmit is stuck in a loop if the request fails ([c74e3e0](https://github.com/ho-nl/m2-pwa/commit/c74e3e0cbf146887c3ef5447dcbba46746971e2a))
66
- * **react-hook-form:** handle ComposedForm network errors ([e028ae0](https://github.com/ho-nl/m2-pwa/commit/e028ae06f49fea5d4e4dbdf58f803b365c902404))
67
- * **react-hook-form:** make sure we don’t overuse useFormPersist ([b28efde](https://github.com/ho-nl/m2-pwa/commit/b28efde79dad1fb9bf9e8d7f9cc5cf32648acdf1))
68
- * **react-hook-form:** not not always submit ComposedForm ([642833f](https://github.com/ho-nl/m2-pwa/commit/642833fe8b311b20db2ccdd57f0492b8429c0e81))
69
- * **react-hook-form:** Object(…) is not a function ([ebc32e4](https://github.com/ho-nl/m2-pwa/commit/ebc32e402c1db185785f1e29c21a705d38a6743d))
70
- * **react-hook-form:** solve issue where form would oversubmit/not-submit ([89f0619](https://github.com/ho-nl/m2-pwa/commit/89f0619051228c08a61aafeeddb67b95e99727ff))
71
- * **react-hook-form:** the wrong form would submit if the component didn’t rerender ([32d4cf1](https://github.com/ho-nl/m2-pwa/commit/32d4cf13ffc2967cc41e50a14ad872d289d4eb43))
72
- * **react-hook-form:** validate if the previous request succeeds before moving on to the next request ([1985d09](https://github.com/ho-nl/m2-pwa/commit/1985d0938cd509532fa3b6bc801a3399c2baae09))
73
- * remove cyclic dependencies ([8a59389](https://github.com/ho-nl/m2-pwa/commit/8a5938943a97634cce57c68bb369c6e77e7a0288))
74
- * show form checkmarks when field is valid ([7df8cad](https://github.com/ho-nl/m2-pwa/commit/7df8cadd5292c7d8a1d1e4c981d51adf7b5b8119))
75
- * use form auto submit should submit with prefilled data ([9957ef6](https://github.com/ho-nl/m2-pwa/commit/9957ef67ee39e30873f528ffae4da7c0dcfbb6fa))
76
- * useformautosubmit initial submit ([a06cb60](https://github.com/ho-nl/m2-pwa/commit/a06cb60996f83788a95bcd3995407539b2acfd46))
77
- * useFormAutoSubmit modes ([9180bf2](https://github.com/ho-nl/m2-pwa/commit/9180bf21a140f5741078007c42972ded433c277c))
78
-
50
+ - disable isValid form checkout on submit
51
+ ([b20110d](https://github.com/ho-nl/m2-pwa/commit/b20110d93327ff2678296acc47b1075b4fb3a85a))
52
+ - ignore md files from triggering version updates
53
+ ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
54
+ - input checkmarks
55
+ ([279c1c1](https://github.com/ho-nl/m2-pwa/commit/279c1c112ada46fdea102024298e8293d1a23293))
56
+ - make sure ComposedForm actually submits correctly
57
+ ([c6499d9](https://github.com/ho-nl/m2-pwa/commit/c6499d9d36f874cd65b310cbf7f63f5a88fa86cd))
58
+ - make sure the checkout address fields are working as expected
59
+ ([e88aae9](https://github.com/ho-nl/m2-pwa/commit/e88aae9afa3c60457b8e8c87ba52e8ae2dec4a3e))
60
+ - make sure useFormGqlQuery uses the new useLazyQueryPromise
61
+ ([f0cf831](https://github.com/ho-nl/m2-pwa/commit/f0cf83191dbbc2da222682b053db8b8c374add69))
62
+ - **react-hook-form:** assertFormGqlOperation
63
+ ([ce09fa5](https://github.com/ho-nl/m2-pwa/commit/ce09fa50f73f6d06b2caa15b1223ba7470a7ea96))
64
+ - **react-hook-form:** form autosubmit is stuck in a loop if the request fails
65
+ ([c74e3e0](https://github.com/ho-nl/m2-pwa/commit/c74e3e0cbf146887c3ef5447dcbba46746971e2a))
66
+ - **react-hook-form:** handle ComposedForm network errors
67
+ ([e028ae0](https://github.com/ho-nl/m2-pwa/commit/e028ae06f49fea5d4e4dbdf58f803b365c902404))
68
+ - **react-hook-form:** make sure we don’t overuse useFormPersist
69
+ ([b28efde](https://github.com/ho-nl/m2-pwa/commit/b28efde79dad1fb9bf9e8d7f9cc5cf32648acdf1))
70
+ - **react-hook-form:** not not always submit ComposedForm
71
+ ([642833f](https://github.com/ho-nl/m2-pwa/commit/642833fe8b311b20db2ccdd57f0492b8429c0e81))
72
+ - **react-hook-form:** Object(…) is not a function
73
+ ([ebc32e4](https://github.com/ho-nl/m2-pwa/commit/ebc32e402c1db185785f1e29c21a705d38a6743d))
74
+ - **react-hook-form:** solve issue where form would oversubmit/not-submit
75
+ ([89f0619](https://github.com/ho-nl/m2-pwa/commit/89f0619051228c08a61aafeeddb67b95e99727ff))
76
+ - **react-hook-form:** the wrong form would submit if the component didn’t rerender
77
+ ([32d4cf1](https://github.com/ho-nl/m2-pwa/commit/32d4cf13ffc2967cc41e50a14ad872d289d4eb43))
78
+ - **react-hook-form:** validate if the previous request succeeds before moving on to the next
79
+ request
80
+ ([1985d09](https://github.com/ho-nl/m2-pwa/commit/1985d0938cd509532fa3b6bc801a3399c2baae09))
81
+ - remove cyclic dependencies
82
+ ([8a59389](https://github.com/ho-nl/m2-pwa/commit/8a5938943a97634cce57c68bb369c6e77e7a0288))
83
+ - show form checkmarks when field is valid
84
+ ([7df8cad](https://github.com/ho-nl/m2-pwa/commit/7df8cadd5292c7d8a1d1e4c981d51adf7b5b8119))
85
+ - use form auto submit should submit with prefilled data
86
+ ([9957ef6](https://github.com/ho-nl/m2-pwa/commit/9957ef67ee39e30873f528ffae4da7c0dcfbb6fa))
87
+ - useformautosubmit initial submit
88
+ ([a06cb60](https://github.com/ho-nl/m2-pwa/commit/a06cb60996f83788a95bcd3995407539b2acfd46))
89
+ - useFormAutoSubmit modes
90
+ ([9180bf2](https://github.com/ho-nl/m2-pwa/commit/9180bf21a140f5741078007c42972ded433c277c))
79
91
 
80
92
  ### Features
81
93
 
82
- * created stacked-pages package ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
83
- * implemented checkmo payment method ([18525b2](https://github.com/ho-nl/m2-pwa/commit/18525b2f4efe9bd0eea12a7a992d284f341e0c68))
84
- * implemented purchase order ([3a40033](https://github.com/ho-nl/m2-pwa/commit/3a40033cd4d6712a17bb9c41a8841ebf7aa2f025))
85
- * introduced SheetShell as a shared layout component ([eb64f28](https://github.com/ho-nl/m2-pwa/commit/eb64f28fd05b69efbf14fa850c70b0f1da5c4237))
86
- * next.js 11 ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
87
- * **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
88
- * **react-hook-form:** added buttonState to ComposedSubmit ([57e77c2](https://github.com/ho-nl/m2-pwa/commit/57e77c29f17720f7f3ee3b63be82779c0e5d8714))
89
- * **react-hook-form:** added ComposedForm component to handle the submission of multiple forms ([1172ec5](https://github.com/ho-nl/m2-pwa/commit/1172ec5abcb0e1b72bb362b977bf0c22997bac9a))
90
- * **react-hook-form:** pass useFormGql operation options ([ddb6f75](https://github.com/ho-nl/m2-pwa/commit/ddb6f750432c0a6ed8468ae08e522a774c261f8f))
91
- * **react-hook-form:** updated readme ([aede77a](https://github.com/ho-nl/m2-pwa/commit/aede77ab6d30fe5ca47b9d08bbdadca9b371713c))
92
- * 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))
93
- * search result page wip ([4ecaf34](https://github.com/ho-nl/m2-pwa/commit/4ecaf34deaa0ff6d24e03d72e74fd045bb7ee269))
94
- * solve issue where the order couldn’t be submitted ([ec0d357](https://github.com/ho-nl/m2-pwa/commit/ec0d3579a1277976e2dc515f420996cf716f83a6))
95
- * submit composed form sequentially ([890d839](https://github.com/ho-nl/m2-pwa/commit/890d8393d635c3777aa17cfa8d4dafc13c2e6cdc))
96
- * upgrade to node 14 ([d079a75](https://github.com/ho-nl/m2-pwa/commit/d079a751e9bfd8dc7f5009d2c9f31c336a0c96ab))
97
- * useFormMutationCart and simpler imports ([012f090](https://github.com/ho-nl/m2-pwa/commit/012f090e8f54d09f35d393c61ad1e2319f5a90ff))
98
-
94
+ - created stacked-pages package
95
+ ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
96
+ - implemented checkmo payment method
97
+ ([18525b2](https://github.com/ho-nl/m2-pwa/commit/18525b2f4efe9bd0eea12a7a992d284f341e0c68))
98
+ - implemented purchase order
99
+ ([3a40033](https://github.com/ho-nl/m2-pwa/commit/3a40033cd4d6712a17bb9c41a8841ebf7aa2f025))
100
+ - introduced SheetShell as a shared layout component
101
+ ([eb64f28](https://github.com/ho-nl/m2-pwa/commit/eb64f28fd05b69efbf14fa850c70b0f1da5c4237))
102
+ - next.js 11
103
+ ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
104
+ - **playwright:** added new playwright package to enable browser testing
105
+ ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
106
+ - **react-hook-form:** added buttonState to ComposedSubmit
107
+ ([57e77c2](https://github.com/ho-nl/m2-pwa/commit/57e77c29f17720f7f3ee3b63be82779c0e5d8714))
108
+ - **react-hook-form:** added ComposedForm component to handle the submission of multiple forms
109
+ ([1172ec5](https://github.com/ho-nl/m2-pwa/commit/1172ec5abcb0e1b72bb362b977bf0c22997bac9a))
110
+ - **react-hook-form:** pass useFormGql operation options
111
+ ([ddb6f75](https://github.com/ho-nl/m2-pwa/commit/ddb6f750432c0a6ed8468ae08e522a774c261f8f))
112
+ - **react-hook-form:** updated readme
113
+ ([aede77a](https://github.com/ho-nl/m2-pwa/commit/aede77ab6d30fe5ca47b9d08bbdadca9b371713c))
114
+ - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
115
+ [@reachdigital](https://github.com/reachdigital)
116
+ ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
117
+ - search result page wip
118
+ ([4ecaf34](https://github.com/ho-nl/m2-pwa/commit/4ecaf34deaa0ff6d24e03d72e74fd045bb7ee269))
119
+ - solve issue where the order couldn’t be submitted
120
+ ([ec0d357](https://github.com/ho-nl/m2-pwa/commit/ec0d3579a1277976e2dc515f420996cf716f83a6))
121
+ - submit composed form sequentially
122
+ ([890d839](https://github.com/ho-nl/m2-pwa/commit/890d8393d635c3777aa17cfa8d4dafc13c2e6cdc))
123
+ - upgrade to node 14
124
+ ([d079a75](https://github.com/ho-nl/m2-pwa/commit/d079a751e9bfd8dc7f5009d2c9f31c336a0c96ab))
125
+ - useFormMutationCart and simpler imports
126
+ ([012f090](https://github.com/ho-nl/m2-pwa/commit/012f090e8f54d09f35d393c61ad1e2319f5a90ff))
99
127
 
100
128
  ### Reverts
101
129
 
102
- * Revert "chore: upgrade @apollo/client" ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
103
-
104
-
105
-
106
-
130
+ - Revert "chore: upgrade @apollo/client"
131
+ ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
107
132
 
108
133
  # Change Log
109
134
 
@@ -121,8 +146,8 @@ All notable changes to this project will be documented in this file. See
121
146
 
122
147
  ### Bug Fixes
123
148
 
124
- - **react-hook-form:** validate if the previous request succeeds before moving
125
- on to the next request
149
+ - **react-hook-form:** validate if the previous request succeeds before moving on to the next
150
+ request
126
151
  ([1985d09](https://github.com/ho-nl/m2-pwa/commit/1985d0938cd509532fa3b6bc801a3399c2baae09))
127
152
 
128
153
  # [2.101.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/react-hook-form@2.100.10...@graphcommerce/react-hook-form@2.101.0) (2021-07-26)
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@graphcommerce/react-hook-form",
3
- "version": "2.104.5",
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,19 +13,16 @@
16
13
  }
17
14
  },
18
15
  "devDependencies": {
19
- "@graphcommerce/browserslist-config-pwa": "^3.0.3",
20
- "@graphcommerce/eslint-config-pwa": "^3.1.9",
21
- "@graphcommerce/prettier-config-pwa": "^3.0.5",
22
- "@graphcommerce/typescript-config-pwa": "^3.1.2",
23
- "@playwright/test": "^1.17.1"
16
+ "@graphcommerce/eslint-config-pwa": "^4.0.0",
17
+ "@graphcommerce/prettier-config-pwa": "^4.0.0",
18
+ "@graphcommerce/typescript-config-pwa": "^4.0.0",
19
+ "@playwright/test": "^1.18.1"
24
20
  },
25
21
  "dependencies": {
26
- "@apollo/client": "^3.5.6",
27
- "graphql": "^16.1.0",
22
+ "graphql": "^16.3.0",
28
23
  "react": "^17.0.2",
29
24
  "react-dom": "^17.0.2",
30
- "react-hook-form": "7.22.1",
31
- "type-fest": "^2.8.0"
32
- },
33
- "gitHead": "06b4426d199de9ec2a9d2ac86d42ab047e59e7e7"
25
+ "react-hook-form": "7.26.1",
26
+ "type-fest": "^2.11.2"
27
+ }
34
28
  }
@@ -1,4 +1,4 @@
1
- import { ApolloError } from '@apollo/client'
1
+ import { ApolloError } from '@graphcommerce/graphql'
2
2
  import React, { useContext, useEffect } from 'react'
3
3
  import { isFormGqlOperation } from '../useFormGqlMutation'
4
4
  import { composedFormContext } from './context'
@@ -1,4 +1,4 @@
1
- import { ApolloError } from '@apollo/client'
1
+ import { ApolloError } from '@graphcommerce/graphql'
2
2
  import { FieldValues, FormState, UseFormReturn } from 'react-hook-form'
3
3
  import { SetOptional } from 'type-fest'
4
4
 
@@ -1,4 +1,4 @@
1
- import { debounce } from '@material-ui/core'
1
+ import { debounce } from '@mui/material'
2
2
  import { useCallback, useEffect, useState } from 'react'
3
3
  import { FieldPath, FieldValues, UseFormReturn } from 'react-hook-form'
4
4
 
@@ -5,7 +5,7 @@ import {
5
5
  useApolloClient,
6
6
  MutationTuple,
7
7
  ApolloError,
8
- } from '@apollo/client'
8
+ } from '@graphcommerce/graphql'
9
9
  import { UseFormProps, UseFormReturn, UnpackNestedValue, DeepPartial } from 'react-hook-form'
10
10
  import diff from './diff'
11
11
  import { useGqlDocumentHandler, UseGqlDocumentHandler } from './useGqlDocumentHandler'
@@ -65,7 +65,6 @@ export function useFormGql<Q, V>(
65
65
  if (typeof diff(form.getValues(), formValues) === 'undefined')
66
66
  form.reset(formValues as UnpackNestedValue<DeepPartial<V>>)
67
67
 
68
- // @ts-expect-error For some reason it is not accepting the value here
69
68
  await onValid(formValues, event)
70
69
  }, onInvalid)
71
70
 
@@ -1,4 +1,4 @@
1
- import { MutationHookOptions, TypedDocumentNode, useMutation } from '@apollo/client'
1
+ import { MutationHookOptions, TypedDocumentNode, useMutation } from '@graphcommerce/graphql'
2
2
  import { useForm, UseFormReturn } from 'react-hook-form'
3
3
  import { useFormGql, UseFormGqlMethods, UseFormGraphQlOptions } from './useFormGql'
4
4
  import { useFormMuiRegister, UseMuiFormRegister } from './useFormMuiRegister'
@@ -1,4 +1,4 @@
1
- import { LazyQueryHookOptions, TypedDocumentNode } from '@apollo/client'
1
+ import { LazyQueryHookOptions, TypedDocumentNode } from '@graphcommerce/graphql'
2
2
  import { useForm } from 'react-hook-form'
3
3
  import { useFormGql, UseFormGraphQlOptions } from './useFormGql'
4
4
  import { UseFormGqlMutationReturn } from './useFormGqlMutation'
@@ -1,4 +1,4 @@
1
- import { TypedDocumentNode } from '@apollo/client'
1
+ import { TypedDocumentNode } from '@graphcommerce/graphql'
2
2
  import {
3
3
  DefinitionNode,
4
4
  OperationDefinitionNode,
@@ -5,7 +5,7 @@ import {
5
5
  QueryLazyOptions,
6
6
  TypedDocumentNode,
7
7
  useLazyQuery,
8
- } from '@apollo/client'
8
+ } from '@graphcommerce/graphql'
9
9
  import { useEffect, useRef } from 'react'
10
10
  import { Promisable } from 'type-fest'
11
11
 
@@ -1,14 +0,0 @@
1
- /* eslint-disable */
2
- import * as Types from '@graphcommerce/graphql';
3
-
4
- import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
5
-
6
- export const TestShippingAddressFormDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"TestShippingAddressForm"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cartId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"address"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CartAddressInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"customerNote"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"defaultValue":{"kind":"StringValue","value":"joi","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setShippingAddressesOnCart"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"cart_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cartId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"shipping_addresses"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"address"},"value":{"kind":"Variable","name":{"kind":"Name","value":"address"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"customer_notes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"customerNote"}}}]}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cart"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]} as unknown as DocumentNode<TestShippingAddressFormMutation, TestShippingAddressFormMutationVariables>;
7
- export type TestShippingAddressFormMutationVariables = Types.Exact<{
8
- cartId: Types.Scalars['String'];
9
- address: Types.CartAddressInput;
10
- customerNote?: Types.InputMaybe<Types.Scalars['String']>;
11
- }>;
12
-
13
-
14
- export type TestShippingAddressFormMutation = { setShippingAddressesOnCart?: { cart: { id: string } } | null | undefined };