@graphcommerce/magento-product-bundle 4.1.4 → 4.1.5
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 +18 -0
- package/{BundleCartItem → components/BundleCartItem}/BundleCartItem.graphql +3 -0
- package/components/BundleCartItem/BundleCartItem.tsx +32 -0
- package/components/BundleProductOptions/BundleOption.tsx +1 -1
- package/components/BundleProductOptions/BundleProductOptions.graphql +1 -4
- package/index.ts +1 -1
- package/package.json +11 -11
- package/BundleCartItem/BundleCartItem.tsx +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1675](https://github.com/graphcommerce-org/graphcommerce/pull/1675) [`1b1504c9b`](https://github.com/graphcommerce-org/graphcommerce/commit/1b1504c9b0e51f2787bce91e1ff1940f540411d6) Thanks [@paales](https://github.com/paales)! - Added crosssel functionality
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`9e630670f`](https://github.com/graphcommerce-org/graphcommerce/commit/9e630670ff6c952ab7b938d890b5509804985cf3), [`cf3518499`](https://github.com/graphcommerce-org/graphcommerce/commit/cf351849999ad6fe73ce2bb258098a7dd301d517), [`2e9fa5984`](https://github.com/graphcommerce-org/graphcommerce/commit/2e9fa5984a07ff14fc1b3a4f62189a26e8e3ecdd), [`adf13069a`](https://github.com/graphcommerce-org/graphcommerce/commit/adf13069af6460c960276b402237371c12fc6dec), [`1b1504c9b`](https://github.com/graphcommerce-org/graphcommerce/commit/1b1504c9b0e51f2787bce91e1ff1940f540411d6), [`8a34f8081`](https://github.com/graphcommerce-org/graphcommerce/commit/8a34f808186274a6fe1d4f309472f1a9c6d00efd), [`3dde492ad`](https://github.com/graphcommerce-org/graphcommerce/commit/3dde492ad3a49d96481eeb7453fb305d0017b1a5)]:
|
|
10
|
+
- @graphcommerce/next-ui@4.28.1
|
|
11
|
+
- @graphcommerce/graphql@3.5.0
|
|
12
|
+
- @graphcommerce/magento-cart@4.9.0
|
|
13
|
+
- @graphcommerce/magento-cart-items@3.1.16
|
|
14
|
+
- @graphcommerce/magento-product@4.7.3
|
|
15
|
+
- @graphcommerce/ecommerce-ui@1.5.4
|
|
16
|
+
- @graphcommerce/magento-store@4.3.2
|
|
17
|
+
- @graphcommerce/magento-product-simple@4.1.5
|
|
18
|
+
- @graphcommerce/magento-product-virtual@4.1.5
|
|
19
|
+
- @graphcommerce/image@3.1.10
|
|
20
|
+
|
|
3
21
|
## 4.1.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SelectedCustomizableOptions } from '@graphcommerce/magento-cart-items'
|
|
2
|
+
import { Money } from '@graphcommerce/magento-store'
|
|
3
|
+
import { Typography } from '@mui/material'
|
|
4
|
+
import { BundleCartItemFragment } from './BundleCartItem.gql'
|
|
5
|
+
|
|
6
|
+
export function BundleCartItem(props: BundleCartItemFragment) {
|
|
7
|
+
const { bundle_options, bundle_customizable } = props
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
{bundle_options.map((option) => {
|
|
11
|
+
if (!option?.uid) return null
|
|
12
|
+
return (
|
|
13
|
+
<div key={option.uid}>
|
|
14
|
+
{option.values.map((value) => {
|
|
15
|
+
if (!value?.uid) return null
|
|
16
|
+
return (
|
|
17
|
+
<Typography variant='body2' component='div' key={value.uid}>
|
|
18
|
+
{value.quantity > 1 && <>{value.quantity} × </>}
|
|
19
|
+
<Typography variant='subtitle2' component='span'>
|
|
20
|
+
{value.label}
|
|
21
|
+
</Typography>{' '}
|
|
22
|
+
{value.price > 0 && <Money value={value.price} />}
|
|
23
|
+
</Typography>
|
|
24
|
+
)
|
|
25
|
+
})}
|
|
26
|
+
</div>
|
|
27
|
+
)
|
|
28
|
+
})}
|
|
29
|
+
<SelectedCustomizableOptions customizable_options={bundle_customizable} />
|
|
30
|
+
</>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
@@ -38,7 +38,7 @@ export const BundleOption = React.memo<BundleOptionProps>((props) => {
|
|
|
38
38
|
? `cartItems.${index}.entered_options.${idx}.uid`
|
|
39
39
|
: `cartItems.${index}.selected_options.${idx}`
|
|
40
40
|
}
|
|
41
|
-
collapse={can_change_quantity}
|
|
41
|
+
// collapse={can_change_quantity}
|
|
42
42
|
render={BundleOptionValue}
|
|
43
43
|
items={useMemo(
|
|
44
44
|
() =>
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './ProductListItemBundle'
|
|
2
2
|
export * from './BundleItemsForm/BundleItemsForm'
|
|
3
|
-
export * from './BundleCartItem/BundleCartItem'
|
|
3
|
+
export * from './components/BundleCartItem/BundleCartItem'
|
|
4
4
|
export * from './BundleProductPage.gql'
|
|
5
5
|
export * from './components/BundleProductOptions'
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-product-bundle",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "4.1.
|
|
5
|
+
"version": "4.1.5",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
"@playwright/test": "^1.21.1"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@graphcommerce/ecommerce-ui": "1.5.
|
|
22
|
-
"@graphcommerce/graphql": "3.
|
|
23
|
-
"@graphcommerce/image": "3.1.
|
|
24
|
-
"@graphcommerce/magento-cart": "4.
|
|
25
|
-
"@graphcommerce/magento-cart-items": "3.1.
|
|
26
|
-
"@graphcommerce/magento-product": "4.7.
|
|
27
|
-
"@graphcommerce/magento-product-simple": "4.1.
|
|
28
|
-
"@graphcommerce/magento-product-virtual": "4.1.
|
|
29
|
-
"@graphcommerce/magento-store": "4.3.
|
|
30
|
-
"@graphcommerce/next-ui": "4.28.
|
|
21
|
+
"@graphcommerce/ecommerce-ui": "1.5.4",
|
|
22
|
+
"@graphcommerce/graphql": "3.5.0",
|
|
23
|
+
"@graphcommerce/image": "3.1.10",
|
|
24
|
+
"@graphcommerce/magento-cart": "4.9.0",
|
|
25
|
+
"@graphcommerce/magento-cart-items": "3.1.16",
|
|
26
|
+
"@graphcommerce/magento-product": "4.7.3",
|
|
27
|
+
"@graphcommerce/magento-product-simple": "4.1.5",
|
|
28
|
+
"@graphcommerce/magento-product-virtual": "4.1.5",
|
|
29
|
+
"@graphcommerce/magento-store": "4.3.2",
|
|
30
|
+
"@graphcommerce/next-ui": "4.28.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@lingui/react": "^3.13.2",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CartItem, CartItemProps } from '@graphcommerce/magento-cart-items'
|
|
2
|
-
import { BundleCartItemFragment } from './BundleCartItem.gql'
|
|
3
|
-
|
|
4
|
-
export function BundleCartItem(props: BundleCartItemFragment & CartItemProps) {
|
|
5
|
-
const { bundle_options, ...cartItemProps } = props
|
|
6
|
-
return (
|
|
7
|
-
<CartItem {...cartItemProps} withOptions>
|
|
8
|
-
{bundle_options.map((option) => {
|
|
9
|
-
if (!option?.uid) return null
|
|
10
|
-
return (
|
|
11
|
-
<div key={option.uid}>
|
|
12
|
-
{option.values.map((value) => {
|
|
13
|
-
if (!value?.uid) return null
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<div key={value.uid}>
|
|
17
|
-
{value.label} {value.quantity} {value.price}
|
|
18
|
-
</div>
|
|
19
|
-
)
|
|
20
|
-
})}
|
|
21
|
-
</div>
|
|
22
|
-
)
|
|
23
|
-
})}
|
|
24
|
-
</CartItem>
|
|
25
|
-
)
|
|
26
|
-
}
|