@graphcommerce/magento-recently-viewed-products 8.1.0-canary.3 → 8.1.0-canary.6
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 +54 -2
- package/package.json +11 -11
- package/plugins/RegisterProductAsRecentlyViewed.tsx +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,60 @@
|
|
|
1
1
|
# @graphcommerce/magento-recently-viewed-products
|
|
2
2
|
|
|
3
|
-
## 8.1.0-canary.
|
|
3
|
+
## 8.1.0-canary.6
|
|
4
4
|
|
|
5
|
-
## 8.1.0-canary.
|
|
5
|
+
## 8.1.0-canary.5
|
|
6
|
+
|
|
7
|
+
## 8.0.6-canary.4
|
|
8
|
+
|
|
9
|
+
## 8.0.6-canary.3
|
|
10
|
+
|
|
11
|
+
## 8.0.6-canary.2
|
|
12
|
+
|
|
13
|
+
## 8.0.6-canary.1
|
|
14
|
+
|
|
15
|
+
## 8.0.6-canary.0
|
|
16
|
+
|
|
17
|
+
## 8.0.5
|
|
18
|
+
|
|
19
|
+
## 8.0.5-canary.10
|
|
20
|
+
|
|
21
|
+
## 8.0.5-canary.9
|
|
22
|
+
|
|
23
|
+
## 8.0.5-canary.8
|
|
24
|
+
|
|
25
|
+
## 8.0.5-canary.7
|
|
26
|
+
|
|
27
|
+
## 8.0.5-canary.6
|
|
28
|
+
|
|
29
|
+
## 8.0.5-canary.5
|
|
30
|
+
|
|
31
|
+
## 8.0.5-canary.4
|
|
32
|
+
|
|
33
|
+
## 8.0.5-canary.3
|
|
34
|
+
|
|
35
|
+
## 8.0.5-canary.2
|
|
36
|
+
|
|
37
|
+
## 8.0.5-canary.1
|
|
38
|
+
|
|
39
|
+
## 8.0.5-canary.0
|
|
40
|
+
|
|
41
|
+
## 8.0.4
|
|
42
|
+
|
|
43
|
+
## 8.0.4-canary.1
|
|
44
|
+
|
|
45
|
+
## 8.0.4-canary.0
|
|
46
|
+
|
|
47
|
+
## 8.0.3
|
|
48
|
+
|
|
49
|
+
## 8.0.3-canary.6
|
|
50
|
+
|
|
51
|
+
## 8.0.3-canary.5
|
|
52
|
+
|
|
53
|
+
## 8.0.3-canary.4
|
|
54
|
+
|
|
55
|
+
## 8.0.3-canary.3
|
|
56
|
+
|
|
57
|
+
## 8.0.3-canary.2
|
|
6
58
|
|
|
7
59
|
## 8.0.3-canary.1
|
|
8
60
|
|
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": "8.1.0-canary.
|
|
5
|
+
"version": "8.1.0-canary.6",
|
|
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": "^8.1.0-canary.
|
|
16
|
-
"@graphcommerce/graphql": "^8.1.0-canary.
|
|
17
|
-
"@graphcommerce/graphql-mesh": "^8.1.0-canary.
|
|
18
|
-
"@graphcommerce/magento-cart": "^8.1.0-canary.
|
|
19
|
-
"@graphcommerce/magento-product": "^8.1.0-canary.
|
|
20
|
-
"@graphcommerce/magento-product-configurable": "^8.1.0-canary.
|
|
21
|
-
"@graphcommerce/next-config": "^8.1.0-canary.
|
|
22
|
-
"@graphcommerce/next-ui": "^8.1.0-canary.
|
|
23
|
-
"@graphcommerce/prettier-config-pwa": "^8.1.0-canary.
|
|
24
|
-
"@graphcommerce/typescript-config-pwa": "^8.1.0-canary.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^8.1.0-canary.6",
|
|
16
|
+
"@graphcommerce/graphql": "^8.1.0-canary.6",
|
|
17
|
+
"@graphcommerce/graphql-mesh": "^8.1.0-canary.6",
|
|
18
|
+
"@graphcommerce/magento-cart": "^8.1.0-canary.6",
|
|
19
|
+
"@graphcommerce/magento-product": "^8.1.0-canary.6",
|
|
20
|
+
"@graphcommerce/magento-product-configurable": "^8.1.0-canary.6",
|
|
21
|
+
"@graphcommerce/next-config": "^8.1.0-canary.6",
|
|
22
|
+
"@graphcommerce/next-ui": "^8.1.0-canary.6",
|
|
23
|
+
"@graphcommerce/prettier-config-pwa": "^8.1.0-canary.6",
|
|
24
|
+
"@graphcommerce/typescript-config-pwa": "^8.1.0-canary.6",
|
|
25
25
|
"@mui/material": "^5.10.16",
|
|
26
26
|
"framer-motion": "^10.0.0",
|
|
27
27
|
"next": "*",
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { useApolloClient } from '@graphcommerce/graphql'
|
|
2
2
|
import {
|
|
3
3
|
type AddToCartItemSelector,
|
|
4
|
-
type ProductPageMeta,
|
|
5
4
|
ProductPageMetaFragment,
|
|
5
|
+
ProductPageMetaProps,
|
|
6
6
|
} from '@graphcommerce/magento-product'
|
|
7
7
|
import { useConfigurableSelectedVariant } from '@graphcommerce/magento-product-configurable/hooks'
|
|
8
|
-
import type { IfConfig,
|
|
8
|
+
import type { IfConfig, 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
14
|
export const component = 'ProductPageMeta'
|
|
15
|
-
export const exported = '@graphcommerce/magento-product
|
|
15
|
+
export const exported = '@graphcommerce/magento-product'
|
|
16
16
|
export const ifConfig: IfConfig = 'recentlyViewedProducts.enabled'
|
|
17
17
|
|
|
18
|
-
type PluginType = ReactPlugin<typeof ProductPageMeta, AddToCartItemSelector>
|
|
19
|
-
|
|
20
18
|
function ViewHandling(props: { product: ProductPageMetaFragment }) {
|
|
21
19
|
const { product } = props
|
|
22
20
|
const client = useApolloClient()
|
|
@@ -71,7 +69,9 @@ function ViewHandling(props: { product: ProductPageMetaFragment }) {
|
|
|
71
69
|
return null
|
|
72
70
|
}
|
|
73
71
|
|
|
74
|
-
const RegisterProductAsRecentlyViewed
|
|
72
|
+
const RegisterProductAsRecentlyViewed = (
|
|
73
|
+
props: PluginProps<ProductPageMetaProps> & AddToCartItemSelector,
|
|
74
|
+
) => {
|
|
75
75
|
const { Prev, product } = props
|
|
76
76
|
|
|
77
77
|
return (
|