@graphcommerce/magento-product-virtual 9.1.0-canary.18 → 9.1.0-canary.19
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.1.0-canary.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2499](https://github.com/graphcommerce-org/graphcommerce/pull/2499) [`6b2b44c`](https://github.com/graphcommerce-org/graphcommerce/commit/6b2b44ca853279144d7768067f3462d4d4bf0af1) - Implement the Cart options as priceModifiers so the logic can be somewhat re-used for multiple locations ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
3
9
|
## 9.1.0-canary.18
|
|
4
10
|
|
|
5
11
|
## 9.1.0-canary.17
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-product-virtual",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "9.1.0-canary.
|
|
5
|
+
"version": "9.1.0-canary.19",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.
|
|
16
|
-
"@graphcommerce/graphql": "^9.1.0-canary.
|
|
17
|
-
"@graphcommerce/magento-cart": "^9.1.0-canary.
|
|
18
|
-
"@graphcommerce/magento-cart-items": "^9.1.0-canary.
|
|
19
|
-
"@graphcommerce/magento-product": "^9.1.0-canary.
|
|
20
|
-
"@graphcommerce/next-ui": "^9.1.0-canary.
|
|
21
|
-
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.
|
|
22
|
-
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.19",
|
|
16
|
+
"@graphcommerce/graphql": "^9.1.0-canary.19",
|
|
17
|
+
"@graphcommerce/magento-cart": "^9.1.0-canary.19",
|
|
18
|
+
"@graphcommerce/magento-cart-items": "^9.1.0-canary.19",
|
|
19
|
+
"@graphcommerce/magento-product": "^9.1.0-canary.19",
|
|
20
|
+
"@graphcommerce/next-ui": "^9.1.0-canary.19",
|
|
21
|
+
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.19",
|
|
22
|
+
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.19",
|
|
23
23
|
"@lingui/core": "^4.2.1",
|
|
24
24
|
"@lingui/macro": "^4.2.1",
|
|
25
25
|
"@lingui/react": "^4.2.1",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { CartItemActionCardProps } from '@graphcommerce/magento-cart-items'
|
|
2
|
-
import {
|
|
2
|
+
import { selectedCustomizableOptionsModifiers } from '@graphcommerce/magento-cart-items'
|
|
3
3
|
import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
|
|
4
|
-
import { isTypename } from '@graphcommerce/next-ui'
|
|
5
4
|
|
|
6
5
|
export const config: PluginConfig = {
|
|
7
6
|
type: 'component',
|
|
@@ -11,17 +10,15 @@ export const config: PluginConfig = {
|
|
|
11
10
|
export function CartItemActionCard(props: PluginProps<CartItemActionCardProps>) {
|
|
12
11
|
const { Prev, ...rest } = props
|
|
13
12
|
|
|
14
|
-
if (
|
|
13
|
+
if (rest.cartItem.__typename !== 'VirtualCartItem') return <Prev {...rest} />
|
|
15
14
|
|
|
16
15
|
return (
|
|
17
16
|
<Prev
|
|
18
17
|
{...rest}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</>
|
|
24
|
-
}
|
|
18
|
+
priceModifiers={[
|
|
19
|
+
...(rest.priceModifiers ?? []),
|
|
20
|
+
...selectedCustomizableOptionsModifiers(rest.cartItem),
|
|
21
|
+
]}
|
|
25
22
|
/>
|
|
26
23
|
)
|
|
27
24
|
}
|