@graphcommerce/magento-recently-viewed-products 9.0.0-canary.58 → 9.0.0-canary.60

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
  # @graphcommerce/magento-recently-viewed-products
2
2
 
3
+ ## 9.0.0-canary.60
4
+
5
+ ## 9.0.0-canary.59
6
+
3
7
  ## 9.0.0-canary.58
4
8
 
5
9
  ## 9.0.0-canary.57
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-recently-viewed-products",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.0-canary.58",
5
+ "version": "9.0.0-canary.60",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,16 +12,16 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.58",
16
- "@graphcommerce/graphql": "^9.0.0-canary.58",
17
- "@graphcommerce/graphql-mesh": "^9.0.0-canary.58",
18
- "@graphcommerce/magento-cart": "^9.0.0-canary.58",
19
- "@graphcommerce/magento-product": "^9.0.0-canary.58",
20
- "@graphcommerce/magento-product-configurable": "^9.0.0-canary.58",
21
- "@graphcommerce/next-config": "^9.0.0-canary.58",
22
- "@graphcommerce/next-ui": "^9.0.0-canary.58",
23
- "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.58",
24
- "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.58",
15
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.60",
16
+ "@graphcommerce/graphql": "^9.0.0-canary.60",
17
+ "@graphcommerce/graphql-mesh": "^9.0.0-canary.60",
18
+ "@graphcommerce/magento-cart": "^9.0.0-canary.60",
19
+ "@graphcommerce/magento-product": "^9.0.0-canary.60",
20
+ "@graphcommerce/magento-product-configurable": "^9.0.0-canary.60",
21
+ "@graphcommerce/next-config": "^9.0.0-canary.60",
22
+ "@graphcommerce/next-ui": "^9.0.0-canary.60",
23
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.60",
24
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.60",
25
25
  "@mui/material": "^5.10.16",
26
26
  "framer-motion": "^10.0.0",
27
27
  "next": "*",
@@ -5,15 +5,17 @@ import {
5
5
  ProductPageMetaProps,
6
6
  } from '@graphcommerce/magento-product'
7
7
  import { useConfigurableSelectedVariant } from '@graphcommerce/magento-product-configurable/hooks'
8
- import type { IfConfig, PluginProps } from '@graphcommerce/next-config'
8
+ import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
9
9
  import { useEventCallback } from '@mui/material'
10
10
  import { useRouter } from 'next/router'
11
11
  import { useEffect } from 'react'
12
12
  import { RecentlyViewedProductsDocument } from '../graphql/RecentlyViewedProducts.gql'
13
13
 
14
- export const component = 'ProductPageMeta'
15
- export const exported = '@graphcommerce/magento-product'
16
- export const ifConfig: IfConfig = 'recentlyViewedProducts.enabled'
14
+ export const config: PluginConfig = {
15
+ type: 'component',
16
+ module: '@graphcommerce/magento-product',
17
+ ifConfig: 'recentlyViewedProducts.enabled',
18
+ }
17
19
 
18
20
  function ViewHandling(props: { product: ProductPageMetaFragment }) {
19
21
  const { product } = props
@@ -69,9 +71,7 @@ function ViewHandling(props: { product: ProductPageMetaFragment }) {
69
71
  return null
70
72
  }
71
73
 
72
- const RegisterProductAsRecentlyViewed = (
73
- props: PluginProps<ProductPageMetaProps> & AddToCartItemSelector,
74
- ) => {
74
+ export function ProductPageMeta(props: PluginProps<ProductPageMetaProps> & AddToCartItemSelector) {
75
75
  const { Prev, product } = props
76
76
 
77
77
  return (
@@ -81,5 +81,3 @@ const RegisterProductAsRecentlyViewed = (
81
81
  </>
82
82
  )
83
83
  }
84
-
85
- export const Plugin = RegisterProductAsRecentlyViewed