@graphcommerce/magento-product 8.1.0-canary.17 → 8.1.0-canary.18
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
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
CrosssellsDocument,
|
6
6
|
CrosssellsQuery,
|
7
7
|
} from '@graphcommerce/magento-cart'
|
8
|
-
import { ExtendableComponent
|
8
|
+
import { ExtendableComponent } from '@graphcommerce/next-ui'
|
9
9
|
import { Box, SxProps, Theme, useThemeProps } from '@mui/material'
|
10
10
|
import { useRouter } from 'next/router'
|
11
11
|
import { useMemo, useRef } from 'react'
|
@@ -90,7 +90,7 @@ export function AddProductsToCartForm(props: AddProductsToCartFormProps) {
|
|
90
90
|
const requestData = {
|
91
91
|
cartId,
|
92
92
|
cartItems: cartItems
|
93
|
-
.filter((cartItem) => cartItem.sku)
|
93
|
+
.filter((cartItem) => cartItem.sku && cartItem.quantity !== 0)
|
94
94
|
.map(({ customizable_options, ...cartItem }) => {
|
95
95
|
const options = Object.values(customizable_options ?? {})
|
96
96
|
.flat(1)
|
@@ -68,7 +68,8 @@ export function useAddProductsToCartAction(
|
|
68
68
|
if (process.env.NODE_ENV !== 'production') {
|
69
69
|
if (!sku) console.warn(`You must provide a 'sku' to useAddProductsToCartAction`)
|
70
70
|
}
|
71
|
-
|
71
|
+
// TODO should be removed, setting the form value on submission isn't a great idea.
|
72
|
+
if (!getValues(`cartItems.${index}.sku`)) setValue(`cartItems.${index}.sku`, sku ?? '')
|
72
73
|
startTransition(() => {
|
73
74
|
onClickIncoming?.(e)
|
74
75
|
})
|
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.1.0-canary.
|
5
|
+
"version": "8.1.0-canary.18",
|
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.1.0-canary.
|
22
|
-
"@graphcommerce/eslint-config-pwa": "^8.1.0-canary.
|
23
|
-
"@graphcommerce/framer-next-pages": "^8.1.0-canary.
|
24
|
-
"@graphcommerce/framer-scroller": "^8.1.0-canary.
|
25
|
-
"@graphcommerce/graphql": "^8.1.0-canary.
|
26
|
-
"@graphcommerce/graphql-mesh": "^8.1.0-canary.
|
27
|
-
"@graphcommerce/image": "^8.1.0-canary.
|
28
|
-
"@graphcommerce/magento-cart": "^8.1.0-canary.
|
29
|
-
"@graphcommerce/magento-store": "^8.1.0-canary.
|
30
|
-
"@graphcommerce/next-ui": "^8.1.0-canary.
|
31
|
-
"@graphcommerce/prettier-config-pwa": "^8.1.0-canary.
|
32
|
-
"@graphcommerce/typescript-config-pwa": "^8.1.0-canary.
|
21
|
+
"@graphcommerce/ecommerce-ui": "^8.1.0-canary.18",
|
22
|
+
"@graphcommerce/eslint-config-pwa": "^8.1.0-canary.18",
|
23
|
+
"@graphcommerce/framer-next-pages": "^8.1.0-canary.18",
|
24
|
+
"@graphcommerce/framer-scroller": "^8.1.0-canary.18",
|
25
|
+
"@graphcommerce/graphql": "^8.1.0-canary.18",
|
26
|
+
"@graphcommerce/graphql-mesh": "^8.1.0-canary.18",
|
27
|
+
"@graphcommerce/image": "^8.1.0-canary.18",
|
28
|
+
"@graphcommerce/magento-cart": "^8.1.0-canary.18",
|
29
|
+
"@graphcommerce/magento-store": "^8.1.0-canary.18",
|
30
|
+
"@graphcommerce/next-ui": "^8.1.0-canary.18",
|
31
|
+
"@graphcommerce/prettier-config-pwa": "^8.1.0-canary.18",
|
32
|
+
"@graphcommerce/typescript-config-pwa": "^8.1.0-canary.18",
|
33
33
|
"@lingui/core": "^4.2.1",
|
34
34
|
"@lingui/macro": "^4.2.1",
|
35
35
|
"@lingui/react": "^4.2.1",
|