@graphcommerce/magento-customer 4.13.3 → 4.14.0-canary.11

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,8 +1,42 @@
1
1
  # Change Log
2
2
 
3
- ## 4.13.3
3
+ ## 4.14.0-canary.11
4
4
 
5
- ## 4.13.2
5
+ ## 4.14.0-canary.10
6
+
7
+ ## 4.14.0-canary.9
8
+
9
+ ## 4.14.0-canary.8
10
+
11
+ ## 4.14.0-canary.7
12
+
13
+ ### Patch Changes
14
+
15
+ - [#1738](https://github.com/graphcommerce-org/graphcommerce/pull/1738) [`52882a63e`](https://github.com/graphcommerce-org/graphcommerce/commit/52882a63e96c0d3ba9641c3714d288fa4f420c82) - Do not forward the Prev prop in plugins ([@paales](https://github.com/paales))
16
+
17
+ ## 4.14.0-canary.6
18
+
19
+ ## 4.14.0-canary.5
20
+
21
+ ## 4.14.0-canary.4
22
+
23
+ ### Minor Changes
24
+
25
+ - [#1733](https://github.com/graphcommerce-org/graphcommerce/pull/1733) [`761bd2832`](https://github.com/graphcommerce-org/graphcommerce/commit/761bd2832f115afc8b95bedbf479266309dd5acc) - ApolloLinks, typePolicies and migration scripts are now handled with plugins on the new library component `<GraphQLProvider/>`. Hygraph's, Magento Cart, Customer, Store, Wishlist and Magento GraphQL are all migrated to be using plugins.
26
+
27
+ If you are using custom `links` / `policies` / `migrations` you can pass them as props to the `<GraphQLProvider/>` or create your own local plugin. ([@paales](https://github.com/paales))
28
+
29
+ ## 4.14.0-canary.3
30
+
31
+ ## 4.14.0-canary.2
32
+
33
+ ### Patch Changes
34
+
35
+ - [#1718](https://github.com/graphcommerce-org/graphcommerce/pull/1718) [`37e86cdc8`](https://github.com/graphcommerce-org/graphcommerce/commit/37e86cdc86ccca3db77d6c59b1e14c8112bb7893) - Remove usage of PropsWithChildren ([@paales](https://github.com/paales))
36
+
37
+ ## 4.13.2-canary.1
38
+
39
+ ## 4.13.2-canary.0
6
40
 
7
41
  ## 4.13.1
8
42
 
@@ -3,14 +3,16 @@ import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
3
3
  import { Trans } from '@lingui/react'
4
4
  import { Box, SxProps, TextField, Theme } from '@mui/material'
5
5
  import PageLink from 'next/link'
6
- import { PropsWithChildren } from 'react'
7
6
  import { SignInDocument, SignInMutationVariables } from './SignIn.gql'
8
7
 
9
- type InlineSignInFormProps = Omit<SignInMutationVariables, 'password'> & { sx?: SxProps<Theme> }
8
+ type InlineSignInFormProps = Omit<SignInMutationVariables, 'password'> & {
9
+ sx?: SxProps<Theme>
10
+ children?: React.ReactNode
11
+ }
10
12
 
11
13
  const { classes } = extendableComponent('SignInFormInline', ['form', 'button'] as const)
12
14
 
13
- export function SignInFormInline(props: PropsWithChildren<InlineSignInFormProps>) {
15
+ export function SignInFormInline(props: InlineSignInFormProps) {
14
16
  const { email, sx = [] } = props
15
17
  const form = useFormGqlMutation(
16
18
  SignInDocument,
@@ -5,7 +5,7 @@ import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
5
5
  import { i18n } from '@lingui/core'
6
6
  import { Trans } from '@lingui/react'
7
7
  import { Box, TextField } from '@mui/material'
8
- import React, { PropsWithChildren } from 'react'
8
+ import React from 'react'
9
9
  import { SignUpMutationVariables, SignUpMutation, SignUpDocument } from './SignUp.gql'
10
10
 
11
11
  type SignUpFormInlineProps = Pick<SignUpMutationVariables, 'email'> & {
@@ -28,7 +28,7 @@ export function SignUpFormInline({
28
28
  firstname,
29
29
  lastname,
30
30
  onSubmitted = () => {},
31
- }: PropsWithChildren<SignUpFormInlineProps>) {
31
+ }: SignUpFormInlineProps) {
32
32
  const form = useFormGqlMutation<
33
33
  SignUpMutation,
34
34
  SignUpMutationVariables & { confirmPassword?: string }
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.13.3",
5
+ "version": "4.14.0-canary.11",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -19,15 +19,15 @@
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/ecommerce-ui": "4.30.2",
23
- "@graphcommerce/framer-utils": "4.30.2",
24
- "@graphcommerce/graphql": "4.30.2",
25
- "@graphcommerce/graphql-mesh": "4.30.2",
26
- "@graphcommerce/image": "4.30.2",
27
- "@graphcommerce/magento-graphql": "4.13.3",
28
- "@graphcommerce/magento-store": "4.13.3",
29
- "@graphcommerce/next-ui": "4.30.2",
30
- "@graphcommerce/react-hook-form": "4.30.2"
22
+ "@graphcommerce/ecommerce-ui": "4.31.0-canary.7",
23
+ "@graphcommerce/framer-utils": "4.31.0-canary.7",
24
+ "@graphcommerce/graphql": "4.31.0-canary.7",
25
+ "@graphcommerce/graphql-mesh": "4.31.0-canary.7",
26
+ "@graphcommerce/image": "4.31.0-canary.7",
27
+ "@graphcommerce/magento-graphql": "4.14.0-canary.11",
28
+ "@graphcommerce/magento-store": "4.14.0-canary.11",
29
+ "@graphcommerce/next-ui": "4.31.0-canary.7",
30
+ "@graphcommerce/react-hook-form": "4.31.0-canary.7"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@lingui/react": "^3.13.2",
@@ -0,0 +1,21 @@
1
+ import { GraphQLProviderProps } from '@graphcommerce/graphql'
2
+ import type { PluginProps } from '@graphcommerce/next-config'
3
+ import { customerTokenLink } from '../link/createCustomerTokenLink'
4
+ import { customerTypePolicies, migrateCustomer } from '../typePolicies'
5
+
6
+ export const component = 'GraphQLProvider'
7
+ export const exported = '@graphcommerce/graphql'
8
+
9
+ function MagentoCustomerGraphqlProvider(props: PluginProps<GraphQLProviderProps>) {
10
+ const { Prev, links = [], policies = [], migrations = [], ...rest } = props
11
+ return (
12
+ <Prev
13
+ {...rest}
14
+ links={[...links, customerTokenLink]}
15
+ policies={[...policies, customerTypePolicies]}
16
+ migrations={[...migrations, migrateCustomer]}
17
+ />
18
+ )
19
+ }
20
+
21
+ export const Plugin = MagentoCustomerGraphqlProvider