@graphcommerce/magento-customer 4.4.0 → 4.4.1
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,5 +1,16 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1487](https://github.com/graphcommerce-org/graphcommerce/pull/1487) [`238aa4d34`](https://github.com/graphcommerce-org/graphcommerce/commit/238aa4d3478773b8cb0973f4112c9829e59e16d6) Thanks [@paales](https://github.com/paales)! - When @injecting mandatory fields into the CustomerTokenFragment it would throw a typescript error.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`afc67103d`](https://github.com/graphcommerce-org/graphcommerce/commit/afc67103d0e00583e274465036fd287537f95e79)]:
|
|
10
|
+
- @graphcommerce/next-ui@4.8.3
|
|
11
|
+
- @graphcommerce/ecommerce-ui@1.0.15
|
|
12
|
+
- @graphcommerce/magento-store@4.2.7
|
|
13
|
+
|
|
3
14
|
## 4.4.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
|
@@ -4,10 +4,7 @@ import { CustomerTokenDocument, CustomerTokenQuery } from './CustomerToken.gql'
|
|
|
4
4
|
type TokenResponse = Omit<NonNullable<CustomerTokenQuery['customerToken']>, '__typename'>
|
|
5
5
|
|
|
6
6
|
export type UseCustomerSessionReturn =
|
|
7
|
-
| TokenResponse & {
|
|
8
|
-
loggedIn: boolean
|
|
9
|
-
requireAuth: boolean
|
|
10
|
-
}
|
|
7
|
+
| Partial<TokenResponse> & { loggedIn: boolean; requireAuth: boolean }
|
|
11
8
|
|
|
12
9
|
export function useCustomerSession(): UseCustomerSessionReturn {
|
|
13
10
|
const token = useQuery(CustomerTokenDocument, { ssr: false, fetchPolicy: 'cache-only' }).data
|
|
@@ -18,14 +18,15 @@ export function useFormIsEmailAvailable(props: UseFormIsEmailAvailableProps) {
|
|
|
18
18
|
const form = useFormGqlQuery(
|
|
19
19
|
IsEmailAvailableDocument,
|
|
20
20
|
{ mode: 'onChange', defaultValues: { email: email ?? '' } },
|
|
21
|
-
{ fetchPolicy: 'cache-and-network' },
|
|
21
|
+
// { fetchPolicy: 'cache-and-network' },
|
|
22
22
|
)
|
|
23
23
|
const { formState, data, handleSubmit } = form
|
|
24
24
|
|
|
25
25
|
const submit = handleSubmit(onSubmitted || (() => {}))
|
|
26
|
-
const autoSubmitting = useFormAutoSubmit({ form, submit })
|
|
26
|
+
const autoSubmitting = useFormAutoSubmit({ form, submit, forceInitialSubmit: true })
|
|
27
27
|
|
|
28
28
|
const hasAccount = data?.isEmailAvailable?.is_email_available === false
|
|
29
|
+
|
|
29
30
|
const { isDirty, isSubmitSuccessful, isSubmitted, isSubmitting, isValid } = formState
|
|
30
31
|
|
|
31
32
|
const [mode, setMode] = useState<'email' | 'signin' | 'signup' | 'signedin' | 'session-expired'>(
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-customer",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "4.4.
|
|
5
|
+
"version": "4.4.1",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"@playwright/test": "^1.21.1"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@graphcommerce/ecommerce-ui": "1.0.
|
|
21
|
+
"@graphcommerce/ecommerce-ui": "1.0.15",
|
|
22
22
|
"@graphcommerce/graphql": "3.1.3",
|
|
23
23
|
"@graphcommerce/graphql-mesh": "4.1.3",
|
|
24
24
|
"@graphcommerce/image": "3.1.6",
|
|
25
25
|
"@graphcommerce/magento-graphql": "3.0.12",
|
|
26
|
-
"@graphcommerce/magento-store": "4.2.
|
|
27
|
-
"@graphcommerce/next-ui": "4.8.
|
|
26
|
+
"@graphcommerce/magento-store": "4.2.7",
|
|
27
|
+
"@graphcommerce/next-ui": "4.8.3",
|
|
28
28
|
"@graphcommerce/react-hook-form": "3.1.3"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|