@graphcommerce/magento-product 8.0.6-canary.1 → 8.0.6-canary.3
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,17 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 8.0.6-canary.3
|
4
|
+
|
5
|
+
## 8.0.6-canary.2
|
6
|
+
|
7
|
+
### Patch Changes
|
8
|
+
|
9
|
+
- [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`0767bc4`](https://github.com/graphcommerce-org/graphcommerce/commit/0767bc40f7b596209f24ca4e745ff0441f3275c9) - Upgrade input components to no longer use muiRegister, which improves INP scores
|
10
|
+
([@FrankHarland](https://github.com/FrankHarland))
|
11
|
+
|
12
|
+
- [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`43bd04a`](https://github.com/graphcommerce-org/graphcommerce/commit/43bd04a777c5800cc7e01bee1e123a5aad82f194) - Prevent BillingPage query from rerunning on each mutation
|
13
|
+
([@FrankHarland](https://github.com/FrankHarland))
|
14
|
+
|
3
15
|
## 8.0.6-canary.1
|
4
16
|
|
5
17
|
## 8.0.6-canary.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useFormState } from '@graphcommerce/ecommerce-ui'
|
2
2
|
import { useEventCallback } from '@mui/material'
|
3
|
-
import { useEffect, useState } from 'react'
|
3
|
+
import { startTransition, useEffect, useState } from 'react'
|
4
4
|
import { UseAddProductsToCartActionFragment } from './UseAddProductsToCartAction.gql'
|
5
5
|
import { toUserErrors } from './toUserErrors'
|
6
6
|
import { AddToCartItemSelector, useFormAddProductsToCart } from './useFormAddProductsToCart'
|
@@ -69,7 +69,9 @@ export function useAddProductsToCartAction(
|
|
69
69
|
if (!sku) console.warn(`You must provide a 'sku' to useAddProductsToCartAction`)
|
70
70
|
}
|
71
71
|
setValue(`cartItems.${index}.sku`, sku ?? '')
|
72
|
-
|
72
|
+
startTransition(() => {
|
73
|
+
onClickIncoming?.(e)
|
74
|
+
})
|
73
75
|
}),
|
74
76
|
onMouseDown: useEventCallback((e) => e.stopPropagation()),
|
75
77
|
showSuccess,
|
@@ -1,10 +1,10 @@
|
|
1
|
+
import { NumberFieldElement } from '@graphcommerce/ecommerce-ui'
|
1
2
|
import type { ProductInterface } from '@graphcommerce/graphql-mesh'
|
2
3
|
import { ApolloCartErrorAlert, useFormGqlMutationCart } from '@graphcommerce/magento-cart'
|
3
4
|
import { Money, MoneyProps } from '@graphcommerce/magento-store'
|
4
5
|
import {
|
5
6
|
Button,
|
6
7
|
MessageSnackbar,
|
7
|
-
TextInputNumber,
|
8
8
|
iconChevronRight,
|
9
9
|
IconSvg,
|
10
10
|
extendableComponent,
|
@@ -40,7 +40,7 @@ export function ProductAddToCart(
|
|
40
40
|
defaultValues: { ...variables },
|
41
41
|
})
|
42
42
|
|
43
|
-
const { handleSubmit, formState, error,
|
43
|
+
const { handleSubmit, formState, error, control, required, data } = form
|
44
44
|
const submitHandler = handleSubmit(() => {})
|
45
45
|
|
46
46
|
return (
|
@@ -58,15 +58,17 @@ export function ProductAddToCart(
|
|
58
58
|
<Money {...price} />
|
59
59
|
</Typography>
|
60
60
|
|
61
|
-
<
|
61
|
+
<NumberFieldElement
|
62
62
|
variant='outlined'
|
63
63
|
error={formState.isSubmitted && !!formState.errors.quantity}
|
64
64
|
required={required.quantity}
|
65
65
|
inputProps={{ min: 1 }}
|
66
|
-
|
66
|
+
name='quantity'
|
67
|
+
rules={{ required: required.quantity }}
|
67
68
|
helperText={formState.isSubmitted && formState.errors.quantity?.message}
|
68
69
|
disabled={formState.isSubmitting}
|
69
70
|
size='small'
|
71
|
+
control={control}
|
70
72
|
/>
|
71
73
|
{children}
|
72
74
|
<Box
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@graphcommerce/magento-product",
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
5
|
-
"version": "8.0.6-canary.
|
5
|
+
"version": "8.0.6-canary.3",
|
6
6
|
"sideEffects": false,
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
8
8
|
"eslintConfig": {
|
@@ -18,18 +18,18 @@
|
|
18
18
|
"typescript": "5.3.3"
|
19
19
|
},
|
20
20
|
"peerDependencies": {
|
21
|
-
"@graphcommerce/ecommerce-ui": "^8.0.6-canary.
|
22
|
-
"@graphcommerce/eslint-config-pwa": "^8.0.6-canary.
|
23
|
-
"@graphcommerce/framer-next-pages": "^8.0.6-canary.
|
24
|
-
"@graphcommerce/framer-scroller": "^8.0.6-canary.
|
25
|
-
"@graphcommerce/graphql": "^8.0.6-canary.
|
26
|
-
"@graphcommerce/graphql-mesh": "^8.0.6-canary.
|
27
|
-
"@graphcommerce/image": "^8.0.6-canary.
|
28
|
-
"@graphcommerce/magento-cart": "^8.0.6-canary.
|
29
|
-
"@graphcommerce/magento-store": "^8.0.6-canary.
|
30
|
-
"@graphcommerce/next-ui": "^8.0.6-canary.
|
31
|
-
"@graphcommerce/prettier-config-pwa": "^8.0.6-canary.
|
32
|
-
"@graphcommerce/typescript-config-pwa": "^8.0.6-canary.
|
21
|
+
"@graphcommerce/ecommerce-ui": "^8.0.6-canary.3",
|
22
|
+
"@graphcommerce/eslint-config-pwa": "^8.0.6-canary.3",
|
23
|
+
"@graphcommerce/framer-next-pages": "^8.0.6-canary.3",
|
24
|
+
"@graphcommerce/framer-scroller": "^8.0.6-canary.3",
|
25
|
+
"@graphcommerce/graphql": "^8.0.6-canary.3",
|
26
|
+
"@graphcommerce/graphql-mesh": "^8.0.6-canary.3",
|
27
|
+
"@graphcommerce/image": "^8.0.6-canary.3",
|
28
|
+
"@graphcommerce/magento-cart": "^8.0.6-canary.3",
|
29
|
+
"@graphcommerce/magento-store": "^8.0.6-canary.3",
|
30
|
+
"@graphcommerce/next-ui": "^8.0.6-canary.3",
|
31
|
+
"@graphcommerce/prettier-config-pwa": "^8.0.6-canary.3",
|
32
|
+
"@graphcommerce/typescript-config-pwa": "^8.0.6-canary.3",
|
33
33
|
"@lingui/core": "^4.2.1",
|
34
34
|
"@lingui/macro": "^4.2.1",
|
35
35
|
"@lingui/react": "^4.2.1",
|