@graphcommerce/magento-customer 4.3.0 → 4.3.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,11 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1476](https://github.com/graphcommerce-org/graphcommerce/pull/1476) [`a12db31b9`](https://github.com/graphcommerce-org/graphcommerce/commit/a12db31b9db9d27d86f59c1bfe58a0879999b9d3) Thanks [@paales](https://github.com/paales)! - make sure the SignUp and SignIn forms can handle changes to the email field
|
|
8
|
+
|
|
3
9
|
## 4.3.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -13,13 +13,7 @@ export function SignInForm(props: SignInFormProps) {
|
|
|
13
13
|
const { email, sx } = props
|
|
14
14
|
const form = useFormGqlMutation(
|
|
15
15
|
SignInDocument,
|
|
16
|
-
{
|
|
17
|
-
defaultValues: { email },
|
|
18
|
-
onBeforeSubmit: (values) => ({
|
|
19
|
-
...values,
|
|
20
|
-
email,
|
|
21
|
-
}),
|
|
22
|
-
},
|
|
16
|
+
{ defaultValues: { email }, onBeforeSubmit: (values) => ({ ...values, email }) },
|
|
23
17
|
{ errorPolicy: 'all' },
|
|
24
18
|
)
|
|
25
19
|
|
|
@@ -14,7 +14,7 @@ export function SignInFormInline(props: PropsWithChildren<InlineSignInFormProps>
|
|
|
14
14
|
const { email, sx = [] } = props
|
|
15
15
|
const form = useFormGqlMutation(
|
|
16
16
|
SignInDocument,
|
|
17
|
-
{ defaultValues: { email } },
|
|
17
|
+
{ defaultValues: { email }, onBeforeSubmit: (values) => ({ ...values, email }) },
|
|
18
18
|
{ errorPolicy: 'all' },
|
|
19
19
|
)
|
|
20
20
|
const { muiRegister, handleSubmit, required, formState, error } = form
|
|
@@ -25,7 +25,11 @@ export function SignUpForm(props: SignUpFormProps) {
|
|
|
25
25
|
const form = useFormGqlMutation<
|
|
26
26
|
SignUpMutation,
|
|
27
27
|
SignUpMutationVariables & { confirmPassword?: string }
|
|
28
|
-
>(
|
|
28
|
+
>(
|
|
29
|
+
Mutation,
|
|
30
|
+
{ defaultValues: { email }, onBeforeSubmit: (values) => ({ ...values, email }) },
|
|
31
|
+
{ errorPolicy: 'all' },
|
|
32
|
+
)
|
|
29
33
|
|
|
30
34
|
const { muiRegister, handleSubmit, required, watch, formState, error } = form
|
|
31
35
|
const [remainingError, inputError] = graphqlErrorByCategory({ category: 'graphql-input', error })
|
|
@@ -40,7 +40,9 @@ export function SignUpFormInline({
|
|
|
40
40
|
firstname: firstname ?? '-',
|
|
41
41
|
lastname: lastname ?? '-',
|
|
42
42
|
},
|
|
43
|
+
onBeforeSubmit: (values) => ({ ...values, email }),
|
|
43
44
|
})
|
|
45
|
+
|
|
44
46
|
const { muiRegister, watch, handleSubmit, required, formState, error } = form
|
|
45
47
|
const submitHandler = handleSubmit(onSubmitted)
|
|
46
48
|
const watchPassword = watch('password')
|
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.3.
|
|
5
|
+
"version": "4.3.1",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|