@graphcommerce/magento-product-configurable 9.1.0-canary.40 → 9.1.0-canary.42

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,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.42
4
+
5
+ ## 9.1.0-canary.41
6
+
3
7
  ## 9.1.0-canary.40
4
8
 
5
9
  ## 9.1.0-canary.39
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-product-configurable",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.1.0-canary.40",
5
+ "version": "9.1.0-canary.42",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,23 +12,23 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^9.1.0-canary.40",
16
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.40",
17
- "@graphcommerce/graphql": "^9.1.0-canary.40",
18
- "@graphcommerce/graphql-mesh": "^9.1.0-canary.40",
19
- "@graphcommerce/image": "^9.1.0-canary.40",
20
- "@graphcommerce/lingui-next": "9.1.0-canary.40",
21
- "@graphcommerce/magento-cart": "^9.1.0-canary.40",
22
- "@graphcommerce/magento-cart-items": "^9.1.0-canary.40",
23
- "@graphcommerce/magento-category": "^9.1.0-canary.40",
24
- "@graphcommerce/magento-customer": "^9.1.0-canary.40",
25
- "@graphcommerce/magento-product": "^9.1.0-canary.40",
26
- "@graphcommerce/magento-product-simple": "^9.1.0-canary.40",
27
- "@graphcommerce/magento-store": "^9.1.0-canary.40",
28
- "@graphcommerce/next-ui": "^9.1.0-canary.40",
29
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.40",
30
- "@graphcommerce/react-hook-form": "^9.1.0-canary.40",
31
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.40",
15
+ "@graphcommerce/ecommerce-ui": "^9.1.0-canary.42",
16
+ "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.42",
17
+ "@graphcommerce/graphql": "^9.1.0-canary.42",
18
+ "@graphcommerce/graphql-mesh": "^9.1.0-canary.42",
19
+ "@graphcommerce/image": "^9.1.0-canary.42",
20
+ "@graphcommerce/lingui-next": "9.1.0-canary.42",
21
+ "@graphcommerce/magento-cart": "^9.1.0-canary.42",
22
+ "@graphcommerce/magento-cart-items": "^9.1.0-canary.42",
23
+ "@graphcommerce/magento-category": "^9.1.0-canary.42",
24
+ "@graphcommerce/magento-customer": "^9.1.0-canary.42",
25
+ "@graphcommerce/magento-product": "^9.1.0-canary.42",
26
+ "@graphcommerce/magento-product-simple": "^9.1.0-canary.42",
27
+ "@graphcommerce/magento-store": "^9.1.0-canary.42",
28
+ "@graphcommerce/next-ui": "^9.1.0-canary.42",
29
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.42",
30
+ "@graphcommerce/react-hook-form": "^9.1.0-canary.42",
31
+ "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.42",
32
32
  "@lingui/core": "^4.2.1",
33
33
  "@lingui/macro": "^4.2.1",
34
34
  "@lingui/react": "^4.2.1",
@@ -1,4 +1,4 @@
1
- import type { AddToCartItemSelector, ProductPagePriceProps } from '@graphcommerce/magento-product'
1
+ import type { ProductPagePriceProps } from '@graphcommerce/magento-product'
2
2
  import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
3
3
  import { useConfigurableSelectedVariant } from '../../hooks'
4
4
 
@@ -7,9 +7,7 @@ export const config: PluginConfig = {
7
7
  module: '@graphcommerce/magento-product',
8
8
  }
9
9
 
10
- export function ProductPagePrice(
11
- props: PluginProps<ProductPagePriceProps> & AddToCartItemSelector,
12
- ) {
10
+ export function ProductPagePrice(props: PluginProps<ProductPagePriceProps>) {
13
11
  const { Prev, product, index, ...rest } = props
14
12
  const variant = useConfigurableSelectedVariant({ ...product, index })
15
13
 
@@ -0,0 +1,23 @@
1
+ import type { ProductPagePriceLowestProps } from '@graphcommerce/magento-product'
2
+ import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
3
+ import { useConfigurableSelectedVariant } from '../../hooks'
4
+
5
+ export const config: PluginConfig = {
6
+ type: 'component',
7
+ module: '@graphcommerce/magento-product',
8
+ }
9
+
10
+ export function ProductPagePriceLowest(props: PluginProps<ProductPagePriceLowestProps>) {
11
+ const { Prev, product, index, ...rest } = props
12
+ const variant = useConfigurableSelectedVariant({ ...product, index })
13
+
14
+ if (product.__typename !== 'ConfigurableProduct') return <Prev {...props} />
15
+
16
+ return (
17
+ <Prev
18
+ product={variant ? { ...variant, options: product.options } : product}
19
+ index={index}
20
+ {...rest}
21
+ />
22
+ )
23
+ }