@graphcommerce/magento-product-configurable 9.1.0-canary.40 → 9.1.0-canary.41
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
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.
|
|
5
|
+
"version": "9.1.0-canary.41",
|
|
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.
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.
|
|
17
|
-
"@graphcommerce/graphql": "^9.1.0-canary.
|
|
18
|
-
"@graphcommerce/graphql-mesh": "^9.1.0-canary.
|
|
19
|
-
"@graphcommerce/image": "^9.1.0-canary.
|
|
20
|
-
"@graphcommerce/lingui-next": "9.1.0-canary.
|
|
21
|
-
"@graphcommerce/magento-cart": "^9.1.0-canary.
|
|
22
|
-
"@graphcommerce/magento-cart-items": "^9.1.0-canary.
|
|
23
|
-
"@graphcommerce/magento-category": "^9.1.0-canary.
|
|
24
|
-
"@graphcommerce/magento-customer": "^9.1.0-canary.
|
|
25
|
-
"@graphcommerce/magento-product": "^9.1.0-canary.
|
|
26
|
-
"@graphcommerce/magento-product-simple": "^9.1.0-canary.
|
|
27
|
-
"@graphcommerce/magento-store": "^9.1.0-canary.
|
|
28
|
-
"@graphcommerce/next-ui": "^9.1.0-canary.
|
|
29
|
-
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.
|
|
30
|
-
"@graphcommerce/react-hook-form": "^9.1.0-canary.
|
|
31
|
-
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^9.1.0-canary.41",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.41",
|
|
17
|
+
"@graphcommerce/graphql": "^9.1.0-canary.41",
|
|
18
|
+
"@graphcommerce/graphql-mesh": "^9.1.0-canary.41",
|
|
19
|
+
"@graphcommerce/image": "^9.1.0-canary.41",
|
|
20
|
+
"@graphcommerce/lingui-next": "9.1.0-canary.41",
|
|
21
|
+
"@graphcommerce/magento-cart": "^9.1.0-canary.41",
|
|
22
|
+
"@graphcommerce/magento-cart-items": "^9.1.0-canary.41",
|
|
23
|
+
"@graphcommerce/magento-category": "^9.1.0-canary.41",
|
|
24
|
+
"@graphcommerce/magento-customer": "^9.1.0-canary.41",
|
|
25
|
+
"@graphcommerce/magento-product": "^9.1.0-canary.41",
|
|
26
|
+
"@graphcommerce/magento-product-simple": "^9.1.0-canary.41",
|
|
27
|
+
"@graphcommerce/magento-store": "^9.1.0-canary.41",
|
|
28
|
+
"@graphcommerce/next-ui": "^9.1.0-canary.41",
|
|
29
|
+
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.41",
|
|
30
|
+
"@graphcommerce/react-hook-form": "^9.1.0-canary.41",
|
|
31
|
+
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.41",
|
|
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 {
|
|
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
|
+
}
|