@graphcommerce/magento-product 9.0.4-canary.1 → 9.0.4-canary.2
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
|
+
## 9.0.4-canary.2
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#2473](https://github.com/graphcommerce-org/graphcommerce/pull/2473) [`f085c89`](https://github.com/graphcommerce-org/graphcommerce/commit/f085c89416fd91cdc2729f8a6da0ec37d93e8e80) - Solve issue where the ProductListItemsBase was already wrapped in a form. ([@paales](https://github.com/paales))
|
8
|
+
|
3
9
|
## 9.0.4-canary.1
|
4
10
|
|
5
11
|
## 9.0.4-canary.0
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { extendableComponent, LazyHydrate, RenderType, responsiveVal } from '@graphcommerce/next-ui'
|
2
2
|
import type { BoxProps, Breakpoint, Theme } from '@mui/material'
|
3
3
|
import { Box, useTheme } from '@mui/material'
|
4
|
-
import
|
4
|
+
import React from 'react'
|
5
|
+
import { AddProductsToCartForm, useFormAddProductsToCart } from '../AddProductsToCart'
|
5
6
|
import type { ProductListItemProps } from '../ProductListItem/ProductListItem'
|
6
7
|
import type { ProductListItemsFragment } from './ProductListItems.gql'
|
7
8
|
import type { ProductListItemRenderer } from './renderer'
|
@@ -84,8 +85,11 @@ export function ProductListItemsBase(props: ProductItemsGridProps) {
|
|
84
85
|
|
85
86
|
const classes = withState({ size })
|
86
87
|
|
88
|
+
const context = useFormAddProductsToCart(true)
|
89
|
+
const MaybeAddProductsToCartForm = context ? React.Fragment : AddProductsToCartForm
|
90
|
+
|
87
91
|
return (
|
88
|
-
<
|
92
|
+
<MaybeAddProductsToCartForm>
|
89
93
|
<Box
|
90
94
|
ref={containerRef}
|
91
95
|
className={classes.root}
|
@@ -130,6 +134,6 @@ export function ProductListItemsBase(props: ProductItemsGridProps) {
|
|
130
134
|
)}
|
131
135
|
{children}
|
132
136
|
</Box>
|
133
|
-
</
|
137
|
+
</MaybeAddProductsToCartForm>
|
134
138
|
)
|
135
139
|
}
|
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": "9.0.4-canary.
|
5
|
+
"version": "9.0.4-canary.2",
|
6
6
|
"sideEffects": false,
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
8
8
|
"eslintConfig": {
|
@@ -18,18 +18,18 @@
|
|
18
18
|
"typescript": "5.7.2"
|
19
19
|
},
|
20
20
|
"peerDependencies": {
|
21
|
-
"@graphcommerce/ecommerce-ui": "^9.0.4-canary.
|
22
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.4-canary.
|
23
|
-
"@graphcommerce/framer-next-pages": "^9.0.4-canary.
|
24
|
-
"@graphcommerce/framer-scroller": "^9.0.4-canary.
|
25
|
-
"@graphcommerce/graphql": "^9.0.4-canary.
|
26
|
-
"@graphcommerce/graphql-mesh": "^9.0.4-canary.
|
27
|
-
"@graphcommerce/image": "^9.0.4-canary.
|
28
|
-
"@graphcommerce/magento-cart": "^9.0.4-canary.
|
29
|
-
"@graphcommerce/magento-store": "^9.0.4-canary.
|
30
|
-
"@graphcommerce/next-ui": "^9.0.4-canary.
|
31
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.4-canary.
|
32
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.4-canary.
|
21
|
+
"@graphcommerce/ecommerce-ui": "^9.0.4-canary.2",
|
22
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.4-canary.2",
|
23
|
+
"@graphcommerce/framer-next-pages": "^9.0.4-canary.2",
|
24
|
+
"@graphcommerce/framer-scroller": "^9.0.4-canary.2",
|
25
|
+
"@graphcommerce/graphql": "^9.0.4-canary.2",
|
26
|
+
"@graphcommerce/graphql-mesh": "^9.0.4-canary.2",
|
27
|
+
"@graphcommerce/image": "^9.0.4-canary.2",
|
28
|
+
"@graphcommerce/magento-cart": "^9.0.4-canary.2",
|
29
|
+
"@graphcommerce/magento-store": "^9.0.4-canary.2",
|
30
|
+
"@graphcommerce/next-ui": "^9.0.4-canary.2",
|
31
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.4-canary.2",
|
32
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.4-canary.2",
|
33
33
|
"@lingui/core": "^4.2.1",
|
34
34
|
"@lingui/macro": "^4.2.1",
|
35
35
|
"@lingui/react": "^4.2.1",
|