@graphcommerce/magento-customer 9.0.4-canary.9 → 9.0.4
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 +7 -17
- package/components/AccountAddresses/AccountAddresses.tsx +2 -2
- package/components/AccountDeleteForm/AccountDeleteForm.tsx +1 -1
- package/components/AccountMenuItem/AccountMenuItem.tsx +1 -1
- package/components/AccountOrders/AccountOrders.tsx +1 -1
- package/components/AddressFields/AddressCountryRegion.tsx +9 -11
- package/components/AddressFields/AddressHouseNumber.tsx +1 -1
- package/components/ApolloCustomerError/ApolloCustomerErrorFullPage.tsx +1 -1
- package/components/CancelOrder/CancelOrderForm.tsx +3 -3
- package/components/ConfirmCustomer/ConfirmCustomerForm.tsx +1 -1
- package/components/ContactForm/ContactForm.tsx +1 -2
- package/components/CreateCustomerAddressForm/CreateCustomerAddressForm.tsx +2 -6
- package/components/CustomerFab/CustomerFab.tsx +1 -1
- package/components/CustomerMenuFabItem/CustomerMenuFabItem.tsx +1 -1
- package/components/EditAddressForm/EditAddressForm.tsx +2 -6
- package/components/NoOrdersFound/NoOrdersFound.tsx +1 -1
- package/components/OrderCard/OrderCard.tsx +1 -1
- package/components/OrderDetails/OrderDetails.tsx +4 -4
- package/components/OrderItem/OrderItem.tsx +1 -1
- package/components/OrderItems/OrderItems.tsx +1 -1
- package/components/ReorderItems/ReorderItems.tsx +3 -7
- package/components/SignOutForm/SignOutForm.tsx +1 -1
- package/components/SignUpForm/SignUpForm.tsx +5 -8
- package/components/SignUpForm/SignUpFormInline.tsx +1 -1
- package/components/TrackingLink/TrackingLink.tsx +1 -1
- package/components/WaitForCustomer/WaitForCustomer.tsx +2 -2
- package/hooks/useAccountSignInUpForm.tsx +1 -1
- package/hooks/useSignInForm.ts +2 -1
- package/package.json +14 -14
- package/test/authentication.playwright.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 9.0.4
|
|
3
|
+
## 9.0.4
|
|
4
4
|
|
|
5
|
-
## 9.0.
|
|
5
|
+
## 9.0.3
|
|
6
6
|
|
|
7
|
-
## 9.0.
|
|
7
|
+
## 9.0.3-canary.0
|
|
8
8
|
|
|
9
|
-
## 9.0.
|
|
9
|
+
## 9.0.2
|
|
10
10
|
|
|
11
|
-
## 9.0.
|
|
11
|
+
## 9.0.2-canary.0
|
|
12
12
|
|
|
13
|
-
## 9.0.
|
|
13
|
+
## 9.0.1
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- [`5ca6fb9`](https://github.com/graphcommerce-org/graphcommerce/commit/5ca6fb94f6f275210c77493d05bad7c1620ff5a3) - When a user reorders their cart without interacting with their cart previously a new cart wouldn't be created. ([@paales](https://github.com/paales))
|
|
18
|
-
|
|
19
|
-
## 9.0.4-canary.3
|
|
20
|
-
|
|
21
|
-
## 9.0.4-canary.2
|
|
22
|
-
|
|
23
|
-
## 9.0.4-canary.1
|
|
24
|
-
|
|
25
|
-
## 9.0.4-canary.0
|
|
15
|
+
## 9.0.1-canary.1
|
|
26
16
|
|
|
27
17
|
## 9.0.0
|
|
28
18
|
|
|
@@ -2,7 +2,7 @@ import { CheckboxElement, EmailElement } from '@graphcommerce/ecommerce-ui'
|
|
|
2
2
|
import { useApolloClient, useMutation } from '@graphcommerce/graphql'
|
|
3
3
|
import { Button, FormActions, FormRow } from '@graphcommerce/next-ui'
|
|
4
4
|
import { useForm } from '@graphcommerce/react-hook-form'
|
|
5
|
-
import {
|
|
5
|
+
import { Trans, t } from '@lingui/macro'
|
|
6
6
|
import { Box, Typography } from '@mui/material'
|
|
7
7
|
import { CustomerDocument, useCustomerQuery } from '../../hooks'
|
|
8
8
|
import { signOut } from '../SignOutForm/signOut'
|
|
@@ -2,9 +2,9 @@ import type { ImageProps } from '@graphcommerce/image'
|
|
|
2
2
|
import type { ButtonProps } from '@graphcommerce/next-ui'
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
|
+
IconSvg,
|
|
5
6
|
extendableComponent,
|
|
6
7
|
iconChevronRight,
|
|
7
|
-
IconSvg,
|
|
8
8
|
responsiveVal,
|
|
9
9
|
} from '@graphcommerce/next-ui'
|
|
10
10
|
import type { SxProps, Theme } from '@mui/material'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Pagination, SectionContainer, extendableComponent } from '@graphcommerce/next-ui'
|
|
2
2
|
import { Trans } from '@lingui/react'
|
|
3
3
|
import type { SxProps, Theme } from '@mui/material'
|
|
4
4
|
import { Box, Link } from '@mui/material'
|
|
@@ -8,8 +8,12 @@ import { useMemo } from 'react'
|
|
|
8
8
|
import type { AddressFieldsOptions } from './useAddressFieldsForm'
|
|
9
9
|
import { useAddressFieldsForm } from './useAddressFieldsForm'
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/** @public */
|
|
12
|
+
export function useAddressCountryRegion<
|
|
13
|
+
TFieldValues extends FieldValues = FieldValues,
|
|
14
|
+
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
15
|
+
>(props: AddressFieldsOptions<TFieldValues, TName>) {
|
|
16
|
+
const form = useAddressFieldsForm<TFieldValues, TName>(props)
|
|
13
17
|
const { control, name } = form
|
|
14
18
|
|
|
15
19
|
const countryQuery = useQuery(CountryRegionsDocument)
|
|
@@ -37,15 +41,11 @@ function useAddressCountryRegion(props: AddressFieldsOptions) {
|
|
|
37
41
|
return { ...form, country, countryList, regionList, loading: countryQuery.loading }
|
|
38
42
|
}
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
export function AddressCountryRegion<
|
|
41
45
|
TFieldValues extends FieldValues = FieldValues,
|
|
42
46
|
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
43
|
-
>(
|
|
44
|
-
|
|
45
|
-
) => React.ReactNode
|
|
46
|
-
|
|
47
|
-
export function AddressCountryRegionBase(props: AddressFieldsOptions) {
|
|
48
|
-
const form = useAddressCountryRegion(props)
|
|
47
|
+
>(props: AddressFieldsOptions<TFieldValues, TName>) {
|
|
48
|
+
const form = useAddressCountryRegion<TFieldValues, TName>(props)
|
|
49
49
|
const { control, name, readOnly, required, countryList, regionList, loading } = form
|
|
50
50
|
|
|
51
51
|
if (loading) {
|
|
@@ -95,5 +95,3 @@ export function AddressCountryRegionBase(props: AddressFieldsOptions) {
|
|
|
95
95
|
</FormRow>
|
|
96
96
|
)
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
export const AddressCountryRegion = AddressCountryRegionBase as AddressCountryRegionComponent
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FieldPath, FieldValues } from '@graphcommerce/ecommerce-ui'
|
|
2
|
-
import {
|
|
2
|
+
import { TextFieldElement, houseNumberPattern } from '@graphcommerce/ecommerce-ui'
|
|
3
3
|
import { i18n } from '@lingui/core'
|
|
4
4
|
import { Trans } from '@lingui/react'
|
|
5
5
|
import type { AddressFieldsOptions } from './useAddressFieldsForm'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApolloErrorFullPageProps } from '@graphcommerce/ecommerce-ui'
|
|
2
2
|
import { ApolloErrorFullPage } from '@graphcommerce/ecommerce-ui'
|
|
3
|
-
import {
|
|
3
|
+
import { IconSvg, iconPerson } from '@graphcommerce/next-ui'
|
|
4
4
|
import { Trans } from '@lingui/react'
|
|
5
5
|
import { Button } from '@mui/material'
|
|
6
6
|
import type { SetOptional } from 'type-fest'
|
|
@@ -2,12 +2,12 @@ import { ApolloErrorSnackbar, CheckboxElement, SelectElement } from '@graphcomme
|
|
|
2
2
|
import { useQuery } from '@graphcommerce/graphql'
|
|
3
3
|
import { StoreConfigDocument } from '@graphcommerce/magento-store'
|
|
4
4
|
import {
|
|
5
|
-
breakpointVal,
|
|
6
5
|
Button,
|
|
7
|
-
filterNonNullableKeys,
|
|
8
6
|
FormRow,
|
|
9
|
-
iconChevronDown,
|
|
10
7
|
IconSvg,
|
|
8
|
+
breakpointVal,
|
|
9
|
+
filterNonNullableKeys,
|
|
10
|
+
iconChevronDown,
|
|
11
11
|
} from '@graphcommerce/next-ui'
|
|
12
12
|
import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
|
|
13
13
|
import { Trans } from '@lingui/macro'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmailElement, useFormGqlMutation } from '@graphcommerce/ecommerce-ui'
|
|
2
|
-
import { Button, FormRow,
|
|
2
|
+
import { Button, FormRow, LayoutTitle, iconPerson } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react'
|
|
4
4
|
import { Alert, Box, Typography } from '@mui/material'
|
|
5
5
|
import { useRouter } from 'next/router'
|
|
@@ -9,7 +9,6 @@ import { FormPersist, useFormGqlMutation } from '@graphcommerce/react-hook-form'
|
|
|
9
9
|
import { Trans } from '@lingui/macro'
|
|
10
10
|
import type { CustomerQuery } from '../../hooks'
|
|
11
11
|
import { CustomerDocument, useCustomerQuery } from '../../hooks'
|
|
12
|
-
import type { ContactUsMutationVariables } from './ContactUsMutation.gql'
|
|
13
12
|
import { ContactUsDocument } from './ContactUsMutation.gql'
|
|
14
13
|
|
|
15
14
|
function findTelephone(data: CustomerQuery): string | undefined {
|
|
@@ -130,7 +129,7 @@ export function ContactForm() {
|
|
|
130
129
|
<Trans>Submit</Trans>
|
|
131
130
|
</Button>
|
|
132
131
|
|
|
133
|
-
<FormPersist
|
|
132
|
+
<FormPersist form={form} name='ContactUs' />
|
|
134
133
|
<MessageSnackbar
|
|
135
134
|
open={submittedWithoutErrors}
|
|
136
135
|
variant='pill'
|
|
@@ -9,7 +9,6 @@ import { useRouter } from 'next/router'
|
|
|
9
9
|
import { AddressFields } from '../AddressFields/AddressFields'
|
|
10
10
|
import { CompanyFields } from '../CompanyFields'
|
|
11
11
|
import { NameFields } from '../NameFields/NameFields'
|
|
12
|
-
import type { CreateCustomerAddressMutationVariables } from './CreateCustomerAddress.gql'
|
|
13
12
|
import { CreateCustomerAddressDocument } from './CreateCustomerAddress.gql'
|
|
14
13
|
|
|
15
14
|
export function CreateCustomerAddressForm() {
|
|
@@ -62,12 +61,9 @@ export function CreateCustomerAddressForm() {
|
|
|
62
61
|
return (
|
|
63
62
|
<>
|
|
64
63
|
<Form onSubmit={submitHandler} noValidate>
|
|
65
|
-
<CompanyFields
|
|
64
|
+
<CompanyFields form={form} />
|
|
66
65
|
<NameFields form={form} prefix />
|
|
67
|
-
<AddressFields
|
|
68
|
-
form={form}
|
|
69
|
-
name={{ regionId: 'region.region_id' }}
|
|
70
|
-
/>
|
|
66
|
+
<AddressFields form={form} name={{ regionId: 'region.region_id' }} />
|
|
71
67
|
|
|
72
68
|
<FormRow>
|
|
73
69
|
<TelephoneElement
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconSvg, MenuFabSecondaryItem, iconPerson } from '@graphcommerce/next-ui'
|
|
2
2
|
import type { SxProps, Theme } from '@mui/material'
|
|
3
3
|
import { Badge, NoSsr } from '@mui/material'
|
|
4
4
|
import type { MouseEventHandler } from 'react'
|
|
@@ -10,7 +10,6 @@ import type { AccountAddressFragment } from '../AccountAddress/AccountAddress.gq
|
|
|
10
10
|
import { AddressFields } from '../AddressFields/AddressFields'
|
|
11
11
|
import { CompanyFields } from '../CompanyFields'
|
|
12
12
|
import { NameFields } from '../NameFields/NameFields'
|
|
13
|
-
import type { UpdateCustomerAddressMutationVariables } from './UpdateCustomerAddress.gql'
|
|
14
13
|
import { UpdateCustomerAddressDocument } from './UpdateCustomerAddress.gql'
|
|
15
14
|
|
|
16
15
|
export type EditAddressFormProps = {
|
|
@@ -80,12 +79,9 @@ export function EditAddressForm(props: EditAddressFormProps) {
|
|
|
80
79
|
return (
|
|
81
80
|
<>
|
|
82
81
|
<Form onSubmit={submitHandler} noValidate sx={sx}>
|
|
83
|
-
<CompanyFields
|
|
82
|
+
<CompanyFields form={form} />
|
|
84
83
|
<NameFields form={form} prefix />
|
|
85
|
-
<AddressFields
|
|
86
|
-
form={form}
|
|
87
|
-
name={{ regionId: 'region.region_id' }}
|
|
88
|
-
/>
|
|
84
|
+
<AddressFields form={form} name={{ regionId: 'region.region_id' }} />
|
|
89
85
|
<FormRow>
|
|
90
86
|
<TelephoneElement
|
|
91
87
|
variant='outlined'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extendableComponent, iconBox
|
|
1
|
+
import { IconHeader, extendableComponent, iconBox } from '@graphcommerce/next-ui'
|
|
2
2
|
import { Trans } from '@lingui/react'
|
|
3
3
|
import type { SxProps, Theme } from '@mui/material'
|
|
4
4
|
import { Box } from '@mui/material'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Money } from '@graphcommerce/magento-store'
|
|
2
|
-
import { DateTimeFormat,
|
|
2
|
+
import { DateTimeFormat, NextLink, extendableComponent } from '@graphcommerce/next-ui'
|
|
3
3
|
import type { SxProps, Theme } from '@mui/material'
|
|
4
4
|
import { Box, ListItemButton, Skeleton, styled } from '@mui/material'
|
|
5
5
|
import type { UseOrderCardItemImages } from '../../hooks/useOrderCardItemImages'
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
breakpointVal,
|
|
3
2
|
DateTimeFormat,
|
|
4
|
-
extendableComponent,
|
|
5
|
-
iconInvoice,
|
|
6
3
|
IconSvg,
|
|
7
4
|
SectionContainer,
|
|
5
|
+
breakpointVal,
|
|
6
|
+
extendableComponent,
|
|
7
|
+
iconInvoice,
|
|
8
8
|
} from '@graphcommerce/next-ui'
|
|
9
9
|
import { Trans } from '@lingui/macro'
|
|
10
10
|
import type { SxProps, Theme } from '@mui/material'
|
|
11
|
-
import { Box,
|
|
11
|
+
import { Box, Typography, lighten } from '@mui/material'
|
|
12
12
|
import { AddressMultiLine } from '../AddressMultiLine/AddressMultiLine'
|
|
13
13
|
import { TrackingLink } from '../TrackingLink/TrackingLink'
|
|
14
14
|
import type { OrderDetailsFragment } from './OrderDetails.gql'
|
|
@@ -2,7 +2,7 @@ import { Image } from '@graphcommerce/image'
|
|
|
2
2
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
3
3
|
import { useProductLink } from '@graphcommerce/magento-product/hooks/useProductLink'
|
|
4
4
|
import { Money } from '@graphcommerce/magento-store'
|
|
5
|
-
import {
|
|
5
|
+
import { NextLink, extendableComponent, responsiveVal } from '@graphcommerce/next-ui'
|
|
6
6
|
import { Box } from '@mui/material'
|
|
7
7
|
import type { OrderCardItemImageFragment } from '../../hooks/OrderCardItemImage.gql'
|
|
8
8
|
import type { OrderItemFragment } from './OrderItem.gql'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SectionContainer, extendableComponent } from '@graphcommerce/next-ui'
|
|
2
2
|
import { Trans } from '@lingui/react'
|
|
3
3
|
import type { SxProps, Theme } from '@mui/material'
|
|
4
4
|
import { Box, Button } from '@mui/material'
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
|
-
import { useFormGqlMutationCart } from '@graphcommerce/magento-cart'
|
|
3
2
|
import { AddProductsToCartSnackbarMessage } from '@graphcommerce/magento-product/components/AddProductsToCart/AddProductsToCartSnackbarMessage'
|
|
4
|
-
import {
|
|
3
|
+
import { IconSvg, LinkOrButton, iconChevronRight, nonNullable } from '@graphcommerce/next-ui'
|
|
4
|
+
import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
|
|
5
5
|
import { Trans } from '@lingui/macro'
|
|
6
6
|
import { Box } from '@mui/material'
|
|
7
7
|
import type { OrderItemsFragment } from '../OrderItems/OrderItems.gql'
|
|
8
|
-
import type { ReorderItemsMutation, ReorderItemsMutationVariables } from './ReorderItems.gql'
|
|
9
8
|
import { ReorderItemsDocument } from './ReorderItems.gql'
|
|
10
9
|
|
|
11
10
|
export type ReorderItemsProps = { order: OrderItemsFragment }
|
|
@@ -13,10 +12,7 @@ export type ReorderItemsProps = { order: OrderItemsFragment }
|
|
|
13
12
|
export function ReorderItems(props: ReorderItemsProps) {
|
|
14
13
|
const { order } = props
|
|
15
14
|
|
|
16
|
-
const form =
|
|
17
|
-
ReorderItemsMutation,
|
|
18
|
-
ReorderItemsMutationVariables & { cartId: string }
|
|
19
|
-
>(ReorderItemsDocument, {
|
|
15
|
+
const form = useFormGqlMutation(ReorderItemsDocument, {
|
|
20
16
|
defaultValues: { orderNumber: order.number },
|
|
21
17
|
})
|
|
22
18
|
const { formState, handleSubmit, error, data: cartData } = form
|
|
@@ -4,8 +4,8 @@ import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
|
|
|
4
4
|
import { useRouter } from 'next/router'
|
|
5
5
|
import React from 'react'
|
|
6
6
|
import { ApolloCustomerErrorAlert } from '../ApolloCustomerError/ApolloCustomerErrorAlert'
|
|
7
|
-
import { signOut } from './signOut'
|
|
8
7
|
import { SignOutFormDocument } from './SignOutForm.gql'
|
|
8
|
+
import { signOut } from './signOut'
|
|
9
9
|
|
|
10
10
|
export type SignOutFormProps = {
|
|
11
11
|
button: (props: { formState: FormState<Record<string, unknown>> }) => React.ReactNode
|
|
@@ -21,14 +21,15 @@ type SignUpFormProps = {
|
|
|
21
21
|
clearErrors: UseFormClearErrors<{ email?: string; requestedMode?: 'signin' | 'signup' }>
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
type SignUpFormValues = SignUpMutationVariables & { confirmPassword?: string }
|
|
25
|
-
|
|
26
24
|
export function SignUpForm(props: SignUpFormProps) {
|
|
27
25
|
const { email, setError, clearErrors } = props
|
|
28
26
|
|
|
29
27
|
const storeConfig = useQuery(StoreConfigDocument)
|
|
30
28
|
const signIn = useSignInForm({ email })
|
|
31
|
-
const form = useFormGqlMutation<
|
|
29
|
+
const form = useFormGqlMutation<
|
|
30
|
+
SignUpMutation,
|
|
31
|
+
SignUpMutationVariables & { confirmPassword?: string }
|
|
32
|
+
>(
|
|
32
33
|
SignUpDocument,
|
|
33
34
|
{
|
|
34
35
|
defaultValues: { email },
|
|
@@ -124,11 +125,7 @@ export function SignUpForm(props: SignUpFormProps) {
|
|
|
124
125
|
<Trans id='Create Account' />
|
|
125
126
|
</Button>
|
|
126
127
|
</FormActions>
|
|
127
|
-
<FormPersist
|
|
128
|
-
form={form}
|
|
129
|
-
name='SignUp'
|
|
130
|
-
exclude={['password', 'confirmPassword']}
|
|
131
|
-
/>
|
|
128
|
+
<FormPersist form={form} name='SignUp' exclude={['password', 'confirmPassword']} />
|
|
132
129
|
</form>
|
|
133
130
|
)
|
|
134
131
|
}
|
|
@@ -2,7 +2,7 @@ import { ApolloErrorAlert, PasswordRepeatElement } from '@graphcommerce/ecommerc
|
|
|
2
2
|
import { useQuery } from '@graphcommerce/graphql'
|
|
3
3
|
import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
|
|
4
4
|
import { StoreConfigDocument } from '@graphcommerce/magento-store'
|
|
5
|
-
import { Button,
|
|
5
|
+
import { Button, Form, FormRow, extendableComponent } from '@graphcommerce/next-ui'
|
|
6
6
|
import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
|
|
7
7
|
import { Trans } from '@lingui/react'
|
|
8
8
|
import { Alert, Box } from '@mui/material'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconSvg, iconLocation } from '@graphcommerce/next-ui'
|
|
2
2
|
import { Trans } from '@lingui/react'
|
|
3
3
|
import type { SxProps, Theme } from '@mui/material'
|
|
4
4
|
import { Box, Link, Typography } from '@mui/material'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WaitForQueriesProps } from '@graphcommerce/ecommerce-ui'
|
|
2
|
-
import {
|
|
2
|
+
import { WaitForQueries, mergeErrors } from '@graphcommerce/ecommerce-ui'
|
|
3
3
|
import type { FullPageMessageProps } from '@graphcommerce/next-ui'
|
|
4
|
-
import { FullPageMessage,
|
|
4
|
+
import { FullPageMessage, IconSvg, iconPerson } from '@graphcommerce/next-ui'
|
|
5
5
|
import { Trans } from '@lingui/react'
|
|
6
6
|
import { Button, CircularProgress } from '@mui/material'
|
|
7
7
|
import React from 'react'
|
|
@@ -5,9 +5,9 @@ import { useFormGqlQuery } from '@graphcommerce/react-hook-form'
|
|
|
5
5
|
import { useEffect } from 'react'
|
|
6
6
|
import type { IsEmailAvailableQuery, IsEmailAvailableQueryVariables } from './IsEmailAvailable.gql'
|
|
7
7
|
import { IsEmailAvailableDocument } from './IsEmailAvailable.gql'
|
|
8
|
+
import { UseCustomerValidateTokenDocument } from './UseCustomerValidateToken.gql'
|
|
8
9
|
import { useCustomerAccountCanSignUp } from './useCustomerPermissions'
|
|
9
10
|
import { useCustomerSession } from './useCustomerSession'
|
|
10
|
-
import { UseCustomerValidateTokenDocument } from './UseCustomerValidateToken.gql'
|
|
11
11
|
|
|
12
12
|
export type UseFormIsEmailAvailableProps = {
|
|
13
13
|
onSubmitted?: (data: { email: string }) => void
|
package/hooks/useSignInForm.ts
CHANGED
|
@@ -15,7 +15,8 @@ type UseSignInFormProps = {
|
|
|
15
15
|
* To extend the actions that happen after a successful sign in, you can use the `onComplete`
|
|
16
16
|
* option.
|
|
17
17
|
*
|
|
18
|
-
* @
|
|
18
|
+
* @example
|
|
19
|
+
* @graphcommerce/magento-cart/plugins/useSignInFormMergeCart
|
|
19
20
|
*/
|
|
20
21
|
export function useSignInForm({ email, ...options }: UseSignInFormProps) {
|
|
21
22
|
const client = useApolloClient()
|
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": "9.0.4
|
|
5
|
+
"version": "9.0.4",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/ecommerce-ui": "^9.0.4
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.4
|
|
17
|
-
"@graphcommerce/framer-next-pages": "^9.0.4
|
|
18
|
-
"@graphcommerce/framer-utils": "^9.0.4
|
|
19
|
-
"@graphcommerce/graphql": "^9.0.4
|
|
20
|
-
"@graphcommerce/graphql-mesh": "^9.0.4
|
|
21
|
-
"@graphcommerce/image": "^9.0.4
|
|
22
|
-
"@graphcommerce/magento-graphql": "^9.0.4
|
|
23
|
-
"@graphcommerce/magento-store": "^9.0.4
|
|
24
|
-
"@graphcommerce/next-ui": "^9.0.4
|
|
25
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.4
|
|
26
|
-
"@graphcommerce/react-hook-form": "^9.0.4
|
|
27
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.4
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^9.0.4",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.4",
|
|
17
|
+
"@graphcommerce/framer-next-pages": "^9.0.4",
|
|
18
|
+
"@graphcommerce/framer-utils": "^9.0.4",
|
|
19
|
+
"@graphcommerce/graphql": "^9.0.4",
|
|
20
|
+
"@graphcommerce/graphql-mesh": "^9.0.4",
|
|
21
|
+
"@graphcommerce/image": "^9.0.4",
|
|
22
|
+
"@graphcommerce/magento-graphql": "^9.0.4",
|
|
23
|
+
"@graphcommerce/magento-store": "^9.0.4",
|
|
24
|
+
"@graphcommerce/next-ui": "^9.0.4",
|
|
25
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.4",
|
|
26
|
+
"@graphcommerce/react-hook-form": "^9.0.4",
|
|
27
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.4",
|
|
28
28
|
"@lingui/core": "^4.2.1",
|
|
29
29
|
"@lingui/macro": "^4.2.1",
|
|
30
30
|
"@lingui/react": "^4.2.1",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
|
|
1
3
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
2
|
-
import { waitForGraphQlResponse } from '@graphcommerce/graphql/
|
|
4
|
+
import { waitForGraphQlResponse } from '@graphcommerce/graphql/test/apolloClient.fixture'
|
|
3
5
|
import type { SignUpMutation } from '@graphcommerce/magento-customer/components'
|
|
4
6
|
import { SignUpDocument } from '@graphcommerce/magento-customer/components'
|
|
5
7
|
import type { SignUpConfirmMutation } from '@graphcommerce/magento-customer/components/SignUpForm/SignUpConfirm.gql'
|