@graphcommerce/magento-customer 6.2.0-canary.88 → 6.2.0-canary.89

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,7 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.2.0-canary.89
4
+
3
5
  ## 6.2.0-canary.88
4
6
 
5
7
  ## 6.2.0-canary.87
@@ -8,6 +8,7 @@ import {
8
8
  } from '@graphcommerce/next-ui'
9
9
  import { emailPattern } from '@graphcommerce/react-hook-form'
10
10
  import { Trans } from '@lingui/react'
11
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
11
12
  import { Box, CircularProgress, Link, SxProps, TextField, Theme, Typography } from '@mui/material'
12
13
  import router from 'next/router'
13
14
  import { CustomerDocument, useFormIsEmailAvailable } from '../../hooks'
@@ -21,8 +21,8 @@ export type AddressFieldValues = {
21
21
  city?: string
22
22
  }
23
23
 
24
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
24
  export type AddressFieldsProps = {
25
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
26
  form: UseFormReturn<any>
27
27
  readOnly?: boolean
28
28
  countryFirst?: boolean
@@ -1,7 +1,6 @@
1
1
  import { ApolloErrorAlert, ApolloErrorAlertProps } from '@graphcommerce/ecommerce-ui'
2
2
  import { Button } from '@graphcommerce/next-ui'
3
3
  import { Trans } from '@lingui/react'
4
- import { Link } from '@mui/material'
5
4
  import { useCustomerSession } from '../../hooks/useCustomerSession'
6
5
  import { useAuthorizationErrorMasked } from './useAuthorizationErrorMasked'
7
6
 
@@ -26,7 +26,7 @@ export function ChangePasswordForm() {
26
26
  ChangePasswordMutation,
27
27
  ChangePasswordMutationVariables & { confirmPassword?: string }
28
28
  >(ChangePasswordDocument, {}, { errorPolicy: 'all' })
29
- const { handleSubmit, required, data, formState, error, control } = form
29
+ const { handleSubmit, required, formState, error, control } = form
30
30
  const [remainingError0, authenticationError] = graphqlErrorByCategory({
31
31
  category: 'graphql-authentication',
32
32
  error,
@@ -12,6 +12,7 @@ import {
12
12
  import { phonePattern, useFormGqlMutation } from '@graphcommerce/react-hook-form'
13
13
  import { i18n } from '@lingui/core'
14
14
  import { Trans } from '@lingui/react'
15
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
15
16
  import { TextField } from '@mui/material'
16
17
  import { useRouter } from 'next/router'
17
18
  import { AddressFields } from '../AddressFields/AddressFields'
@@ -43,7 +44,7 @@ export function CreateCustomerAddressForm() {
43
44
  {},
44
45
  }
45
46
  },
46
- onComplete: (e) => {
47
+ onComplete: () => {
47
48
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
48
49
  router.push(`/account/addresses`)
49
50
  },
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line import/no-extraneous-dependencies
1
2
  import { useGo, usePageContext } from '@graphcommerce/framer-next-pages'
2
3
  import { useQuery } from '@graphcommerce/graphql'
3
4
  import { CountryRegionsDocument } from '@graphcommerce/magento-store'
@@ -12,6 +13,7 @@ import {
12
13
  import { phonePattern, useFormGqlMutation } from '@graphcommerce/react-hook-form'
13
14
  import { i18n } from '@lingui/core'
14
15
  import { Trans } from '@lingui/react'
16
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
15
17
  import { SxProps, TextField, Theme } from '@mui/material'
16
18
  import { AccountAddressFragment } from '../AccountAddress/AccountAddress.gql'
17
19
  import { AddressFields } from '../AddressFields/AddressFields'
@@ -2,6 +2,7 @@ import { Button, Form, FormActions, FormRow } from '@graphcommerce/next-ui'
2
2
  import { emailPattern, useFormGqlMutation } from '@graphcommerce/react-hook-form'
3
3
  import { i18n } from '@lingui/core'
4
4
  import { Trans } from '@lingui/react'
5
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
5
6
  import { TextField, Alert, SxProps, Theme } from '@mui/material'
6
7
  import { ApolloCustomerErrorAlert } from '../ApolloCustomerError/ApolloCustomerErrorAlert'
7
8
  import {
@@ -3,6 +3,7 @@ import { FormRow, InputCheckmark } from '@graphcommerce/next-ui'
3
3
  import { assertFormGqlOperation, Controller, UseFormReturn } from '@graphcommerce/react-hook-form'
4
4
  import { i18n } from '@lingui/core'
5
5
  import { Trans } from '@lingui/react'
6
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
6
7
  import { MenuItem, TextField } from '@mui/material'
7
8
  import React from 'react'
8
9
 
@@ -28,7 +29,7 @@ export function NameFields(props: NameFieldProps) {
28
29
  const { prefix, form, readOnly, prefixes = [mr, mrs, other] } = props
29
30
  assertFormGqlOperation<NameFieldValues>(form)
30
31
 
31
- const { control, formState, muiRegister, required, valid } = form
32
+ const { control, required, valid } = form
32
33
 
33
34
  return (
34
35
  <>
@@ -1,12 +1,12 @@
1
1
  import { Money } from '@graphcommerce/magento-store'
2
2
  import { extendableComponent, NextLink, useDateTimeFormat } from '@graphcommerce/next-ui'
3
+ import { Trans } from '@lingui/react'
3
4
  import { Box, styled, SxProps, Theme, Skeleton, ListItemButton } from '@mui/material'
4
5
  import { UseOrderCardItemImages } from '../../hooks/useOrderCardItemImages'
5
6
  import { OrderCardItemImage } from '../OrderCardItemImage/OrderCardItemImage'
6
7
  import { OrderStateLabel } from '../OrderStateLabel/OrderStateLabel'
7
8
  import { TrackingLink } from '../TrackingLink/TrackingLink'
8
9
  import { OrderCardFragment } from './OrderCard.gql'
9
- import { Trans } from '@lingui/react'
10
10
 
11
11
  type OrderCardProps = Partial<OrderCardFragment> & {
12
12
  loading?: boolean
@@ -1,6 +1,7 @@
1
+ /* eslint-disable no-console */
1
2
  import { useApolloClient } from '@graphcommerce/graphql'
2
- import { CustomerTokenDocument } from '@graphcommerce/magento-customer'
3
3
  import { Button } from '@mui/material'
4
+ import { CustomerTokenDocument } from '../../hooks/CustomerToken.gql'
4
5
 
5
6
  export function SessionDebugger() {
6
7
  const client = useApolloClient()
@@ -1,18 +1,10 @@
1
1
  import { PasswordElement } from '@graphcommerce/ecommerce-ui'
2
2
  import { useApolloClient } from '@graphcommerce/graphql'
3
3
  import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
4
- import {
5
- Button,
6
- FormRow,
7
- FormActions,
8
- iconEyeCrossed,
9
- iconEye,
10
- IconSvg,
11
- } from '@graphcommerce/next-ui'
4
+ import { Button, FormRow, FormActions } from '@graphcommerce/next-ui'
12
5
  import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
13
6
  import { Trans } from '@lingui/react'
14
- import { Box, FormControl, IconButton, InputAdornment, Link, SxProps, Theme } from '@mui/material'
15
- import { MouseEvent, useState } from 'react'
7
+ import { Box, FormControl, Link, SxProps, Theme } from '@mui/material'
16
8
  import { CustomerDocument } from '../../hooks'
17
9
  import { ApolloCustomerErrorAlert } from '../ApolloCustomerError/ApolloCustomerErrorAlert'
18
10
  import { SignInDocument } from './SignIn.gql'
@@ -1,14 +1,15 @@
1
- import { PasswordElement, PasswordRepeatElement } from '@graphcommerce/ecommerce-ui'
1
+ import { PasswordRepeatElement } from '@graphcommerce/ecommerce-ui'
2
2
  import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
3
3
  import { Button, FormActions, FormRow } from '@graphcommerce/next-ui'
4
4
  import { useFormGqlMutation, useFormPersist } from '@graphcommerce/react-hook-form'
5
5
  import { Trans } from '@lingui/react'
6
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
6
7
  import { Alert, FormControlLabel, Switch } from '@mui/material'
7
8
  import { ApolloCustomerErrorSnackbar } from '../ApolloCustomerError/ApolloCustomerErrorSnackbar'
8
9
  import { NameFields } from '../NameFields/NameFields'
10
+ import { ValidatedPasswordElement } from '../ValidatedPasswordElement/ValidatedPasswordElement'
9
11
  import { SignUpDocument, SignUpMutation, SignUpMutationVariables } from './SignUp.gql'
10
12
  import { SignUpConfirmDocument } from './SignUpConfirm.gql'
11
- import { ValidatedPasswordElement } from '../ValidatedPasswordElement/ValidatedPasswordElement'
12
13
 
13
14
  type SignUpFormProps = { email: string }
14
15
 
@@ -1,17 +1,13 @@
1
- import {
2
- ApolloErrorAlert,
3
- PasswordElement,
4
- PasswordRepeatElement,
5
- } from '@graphcommerce/ecommerce-ui'
1
+ import { ApolloErrorAlert, PasswordRepeatElement } from '@graphcommerce/ecommerce-ui'
6
2
  import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
7
3
  import { Button, extendableComponent, Form, FormRow } from '@graphcommerce/next-ui'
8
4
  import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
9
5
  import { Trans } from '@lingui/react'
10
6
  import { Alert, Box } from '@mui/material'
11
7
  import React from 'react'
8
+ import { ValidatedPasswordElement } from '../ValidatedPasswordElement/ValidatedPasswordElement'
12
9
  import { SignUpMutationVariables, SignUpMutation, SignUpDocument } from './SignUp.gql'
13
10
  import { SignUpConfirmDocument } from './SignUpConfirm.gql'
14
- import { ValidatedPasswordElement } from '../ValidatedPasswordElement/ValidatedPasswordElement'
15
11
 
16
12
  type SignUpFormInlineProps = Pick<SignUpMutationVariables, 'email'> & {
17
13
  children?: React.ReactNode
@@ -1,4 +1,5 @@
1
1
  import { PasswordElement } from '@graphcommerce/ecommerce-ui'
2
+ import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
2
3
  import {
3
4
  Button,
4
5
  Form,
@@ -10,15 +11,14 @@ import {
10
11
  import { emailPattern, useFormGqlMutation } from '@graphcommerce/react-hook-form'
11
12
  import { i18n } from '@lingui/core'
12
13
  import { Trans } from '@lingui/react'
14
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
13
15
  import { TextField } from '@mui/material'
14
- import { ApolloCustomerErrorAlert } from '../ApolloCustomerError/ApolloCustomerErrorAlert'
16
+ import { ApolloCustomerErrorSnackbar } from '../ApolloCustomerError'
15
17
  import {
16
18
  UpdateCustomerEmailDocument,
17
19
  UpdateCustomerEmailMutation,
18
20
  UpdateCustomerEmailMutationVariables,
19
21
  } from './UpdateCustomerEmail.gql'
20
- import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
21
- import { ApolloCustomerErrorSnackbar } from '../ApolloCustomerError'
22
22
 
23
23
  type UpdateCustomerEmailFormProps = {
24
24
  email: string
@@ -1,5 +1,6 @@
1
1
  import { Controller, useFormAutoSubmit, useFormGqlMutation } from '@graphcommerce/react-hook-form'
2
2
  import { Trans } from '@lingui/react'
3
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
3
4
  import { FormControl, FormControlLabel, FormHelperText, Switch } from '@mui/material'
4
5
  import React, { useEffect, useMemo } from 'react'
5
6
  import { AccountAddressFragment } from '../AccountAddress/AccountAddress.gql'
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": "6.2.0-canary.88",
5
+ "version": "6.2.0-canary.89",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,20 +12,20 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "6.2.0-canary.88",
16
- "@graphcommerce/prettier-config-pwa": "6.2.0-canary.88",
17
- "@graphcommerce/typescript-config-pwa": "6.2.0-canary.88"
15
+ "@graphcommerce/eslint-config-pwa": "6.2.0-canary.89",
16
+ "@graphcommerce/prettier-config-pwa": "6.2.0-canary.89",
17
+ "@graphcommerce/typescript-config-pwa": "6.2.0-canary.89"
18
18
  },
19
19
  "dependencies": {
20
- "@graphcommerce/ecommerce-ui": "6.2.0-canary.88",
21
- "@graphcommerce/framer-utils": "6.2.0-canary.88",
22
- "@graphcommerce/graphql": "6.2.0-canary.88",
23
- "@graphcommerce/graphql-mesh": "6.2.0-canary.88",
24
- "@graphcommerce/image": "6.2.0-canary.88",
25
- "@graphcommerce/magento-graphql": "6.2.0-canary.88",
26
- "@graphcommerce/magento-store": "6.2.0-canary.88",
27
- "@graphcommerce/next-ui": "6.2.0-canary.88",
28
- "@graphcommerce/react-hook-form": "6.2.0-canary.88"
20
+ "@graphcommerce/ecommerce-ui": "6.2.0-canary.89",
21
+ "@graphcommerce/framer-utils": "6.2.0-canary.89",
22
+ "@graphcommerce/graphql": "6.2.0-canary.89",
23
+ "@graphcommerce/graphql-mesh": "6.2.0-canary.89",
24
+ "@graphcommerce/image": "6.2.0-canary.89",
25
+ "@graphcommerce/magento-graphql": "6.2.0-canary.89",
26
+ "@graphcommerce/magento-store": "6.2.0-canary.89",
27
+ "@graphcommerce/next-ui": "6.2.0-canary.89",
28
+ "@graphcommerce/react-hook-form": "6.2.0-canary.89"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@lingui/react": "^4.2.1",
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
1
2
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
3
  import { waitForGraphQlResponse } from '@graphcommerce/graphql/test/apolloClient.fixture'
3
4
  import { SignUpDocument, SignUpMutation } from '@graphcommerce/magento-customer/components'