@graphcommerce/magento-recently-viewed-products 8.1.0-canary.9 → 9.0.0-canary.101
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,193 @@
|
|
|
1
1
|
# @graphcommerce/magento-recently-viewed-products
|
|
2
2
|
|
|
3
|
+
## 9.0.0-canary.101
|
|
4
|
+
|
|
5
|
+
## 9.0.0-canary.100
|
|
6
|
+
|
|
7
|
+
## 9.0.0-canary.99
|
|
8
|
+
|
|
9
|
+
## 9.0.0-canary.98
|
|
10
|
+
|
|
11
|
+
## 9.0.0-canary.97
|
|
12
|
+
|
|
13
|
+
## 9.0.0-canary.96
|
|
14
|
+
|
|
15
|
+
## 9.0.0-canary.95
|
|
16
|
+
|
|
17
|
+
## 9.0.0-canary.94
|
|
18
|
+
|
|
19
|
+
## 9.0.0-canary.93
|
|
20
|
+
|
|
21
|
+
## 9.0.0-canary.92
|
|
22
|
+
|
|
23
|
+
## 9.0.0-canary.91
|
|
24
|
+
|
|
25
|
+
## 9.0.0-canary.90
|
|
26
|
+
|
|
27
|
+
## 9.0.0-canary.89
|
|
28
|
+
|
|
29
|
+
## 9.0.0-canary.88
|
|
30
|
+
|
|
31
|
+
## 9.0.0-canary.87
|
|
32
|
+
|
|
33
|
+
## 9.0.0-canary.86
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- [#2379](https://github.com/graphcommerce-org/graphcommerce/pull/2379) [`5832c9d`](https://github.com/graphcommerce-org/graphcommerce/commit/5832c9d891e288f47e3b181f4a2f5529847dee2b) - Solved issue where Recently Viewed Products would execute a query even if there were no products to display. ([@paales](https://github.com/paales))
|
|
38
|
+
|
|
39
|
+
## 9.0.0-canary.85
|
|
40
|
+
|
|
41
|
+
## 9.0.0-canary.84
|
|
42
|
+
|
|
43
|
+
## 9.0.0-canary.83
|
|
44
|
+
|
|
45
|
+
## 9.0.0-canary.82
|
|
46
|
+
|
|
47
|
+
## 9.0.0-canary.81
|
|
48
|
+
|
|
49
|
+
## 9.0.0-canary.80
|
|
50
|
+
|
|
51
|
+
## 9.0.0-canary.79
|
|
52
|
+
|
|
53
|
+
## 9.0.0-canary.78
|
|
54
|
+
|
|
55
|
+
## 9.0.0-canary.77
|
|
56
|
+
|
|
57
|
+
## 9.0.0-canary.76
|
|
58
|
+
|
|
59
|
+
## 9.0.0-canary.75
|
|
60
|
+
|
|
61
|
+
## 9.0.0-canary.74
|
|
62
|
+
|
|
63
|
+
## 9.0.0-canary.73
|
|
64
|
+
|
|
65
|
+
## 9.0.0-canary.72
|
|
66
|
+
|
|
67
|
+
## 9.0.0-canary.71
|
|
68
|
+
|
|
69
|
+
## 9.0.0-canary.70
|
|
70
|
+
|
|
71
|
+
## 9.0.0-canary.69
|
|
72
|
+
|
|
73
|
+
## 9.0.0-canary.68
|
|
74
|
+
|
|
75
|
+
## 9.0.0-canary.67
|
|
76
|
+
|
|
77
|
+
## 9.0.0-canary.66
|
|
78
|
+
|
|
79
|
+
## 9.0.0-canary.65
|
|
80
|
+
|
|
81
|
+
## 9.0.0-canary.64
|
|
82
|
+
|
|
83
|
+
## 9.0.0-canary.63
|
|
84
|
+
|
|
85
|
+
## 9.0.0-canary.62
|
|
86
|
+
|
|
87
|
+
## 9.0.0-canary.61
|
|
88
|
+
|
|
89
|
+
## 9.0.0-canary.60
|
|
90
|
+
|
|
91
|
+
## 9.0.0-canary.59
|
|
92
|
+
|
|
93
|
+
## 9.0.0-canary.58
|
|
94
|
+
|
|
95
|
+
## 9.0.0-canary.57
|
|
96
|
+
|
|
97
|
+
## 9.0.0-canary.56
|
|
98
|
+
|
|
99
|
+
## 9.0.0-canary.55
|
|
100
|
+
|
|
101
|
+
## 9.0.0-canary.54
|
|
102
|
+
|
|
103
|
+
## 8.1.0-canary.53
|
|
104
|
+
|
|
105
|
+
## 8.1.0-canary.52
|
|
106
|
+
|
|
107
|
+
## 8.1.0-canary.51
|
|
108
|
+
|
|
109
|
+
## 8.1.0-canary.50
|
|
110
|
+
|
|
111
|
+
## 8.1.0-canary.49
|
|
112
|
+
|
|
113
|
+
## 8.1.0-canary.48
|
|
114
|
+
|
|
115
|
+
## 8.1.0-canary.47
|
|
116
|
+
|
|
117
|
+
## 8.1.0-canary.46
|
|
118
|
+
|
|
119
|
+
## 8.1.0-canary.45
|
|
120
|
+
|
|
121
|
+
## 8.1.0-canary.44
|
|
122
|
+
|
|
123
|
+
## 8.1.0-canary.43
|
|
124
|
+
|
|
125
|
+
## 8.1.0-canary.42
|
|
126
|
+
|
|
127
|
+
## 8.1.0-canary.41
|
|
128
|
+
|
|
129
|
+
## 8.1.0-canary.40
|
|
130
|
+
|
|
131
|
+
## 8.1.0-canary.39
|
|
132
|
+
|
|
133
|
+
## 8.1.0-canary.38
|
|
134
|
+
|
|
135
|
+
## 8.1.0-canary.37
|
|
136
|
+
|
|
137
|
+
## 8.1.0-canary.36
|
|
138
|
+
|
|
139
|
+
## 8.1.0-canary.35
|
|
140
|
+
|
|
141
|
+
## 8.1.0-canary.34
|
|
142
|
+
|
|
143
|
+
## 8.1.0-canary.33
|
|
144
|
+
|
|
145
|
+
## 8.1.0-canary.32
|
|
146
|
+
|
|
147
|
+
## 8.1.0-canary.31
|
|
148
|
+
|
|
149
|
+
## 8.1.0-canary.30
|
|
150
|
+
|
|
151
|
+
## 8.1.0-canary.29
|
|
152
|
+
|
|
153
|
+
## 8.1.0-canary.28
|
|
154
|
+
|
|
155
|
+
## 8.1.0-canary.27
|
|
156
|
+
|
|
157
|
+
## 8.1.0-canary.26
|
|
158
|
+
|
|
159
|
+
## 8.1.0-canary.25
|
|
160
|
+
|
|
161
|
+
## 8.1.0-canary.24
|
|
162
|
+
|
|
163
|
+
## 8.1.0-canary.23
|
|
164
|
+
|
|
165
|
+
## 8.1.0-canary.22
|
|
166
|
+
|
|
167
|
+
## 8.1.0-canary.21
|
|
168
|
+
|
|
169
|
+
## 8.1.0-canary.20
|
|
170
|
+
|
|
171
|
+
## 8.1.0-canary.19
|
|
172
|
+
|
|
173
|
+
## 8.1.0-canary.18
|
|
174
|
+
|
|
175
|
+
## 8.1.0-canary.17
|
|
176
|
+
|
|
177
|
+
## 8.1.0-canary.16
|
|
178
|
+
|
|
179
|
+
## 8.1.0-canary.15
|
|
180
|
+
|
|
181
|
+
## 8.1.0-canary.14
|
|
182
|
+
|
|
183
|
+
## 8.1.0-canary.13
|
|
184
|
+
|
|
185
|
+
## 8.1.0-canary.12
|
|
186
|
+
|
|
187
|
+
## 8.1.0-canary.11
|
|
188
|
+
|
|
189
|
+
## 8.1.0-canary.10
|
|
190
|
+
|
|
3
191
|
## 8.1.0-canary.9
|
|
4
192
|
|
|
5
193
|
## 8.1.0-canary.8
|
|
@@ -92,8 +280,7 @@
|
|
|
92
280
|
|
|
93
281
|
### Minor Changes
|
|
94
282
|
|
|
95
|
-
- [#2077](https://github.com/graphcommerce-org/graphcommerce/pull/2077) [`e661106`](https://github.com/graphcommerce-org/graphcommerce/commit/e661106d45e51c617533f19b397a812e22b6fc82) - Created a new `<RecentlyViewedProducts/>` component and render it on product pages.
|
|
96
|
-
([@bramvanderholst](https://github.com/bramvanderholst))
|
|
283
|
+
- [#2077](https://github.com/graphcommerce-org/graphcommerce/pull/2077) [`e661106`](https://github.com/graphcommerce-org/graphcommerce/commit/e661106d45e51c617533f19b397a812e22b6fc82) - Created a new `<RecentlyViewedProducts/>` component and render it on product pages. ([@bramvanderholst](https://github.com/bramvanderholst))
|
|
97
284
|
|
|
98
285
|
## 8.0.0-canary.100
|
|
99
286
|
|
|
@@ -117,8 +304,7 @@
|
|
|
117
304
|
|
|
118
305
|
### Patch Changes
|
|
119
306
|
|
|
120
|
-
- [#2172](https://github.com/graphcommerce-org/graphcommerce/pull/2172) [`871e07a`](https://github.com/graphcommerce-org/graphcommerce/commit/871e07ac8bbb7e6c392a740a8244f69992b42b76) - Recently viewed products would show skeleton items even after loading succeeded
|
|
121
|
-
([@paales](https://github.com/paales))
|
|
307
|
+
- [#2172](https://github.com/graphcommerce-org/graphcommerce/pull/2172) [`871e07a`](https://github.com/graphcommerce-org/graphcommerce/commit/871e07ac8bbb7e6c392a740a8244f69992b42b76) - Recently viewed products would show skeleton items even after loading succeeded ([@paales](https://github.com/paales))
|
|
122
308
|
|
|
123
309
|
## 8.0.0-canary.90
|
|
124
310
|
|
|
@@ -170,11 +356,9 @@
|
|
|
170
356
|
|
|
171
357
|
### Patch Changes
|
|
172
358
|
|
|
173
|
-
- [#2108](https://github.com/graphcommerce-org/graphcommerce/pull/2108) [`c4a64d8`](https://github.com/graphcommerce-org/graphcommerce/commit/c4a64d8c5e38232d31f84b68acdf0032af5eeffd) - When multiple variations of a single configurable product were viewed the RecentlyViewedProducts component it would keep showing a loading state.
|
|
174
|
-
([@StefanAngenent](https://github.com/StefanAngenent))
|
|
359
|
+
- [#2108](https://github.com/graphcommerce-org/graphcommerce/pull/2108) [`c4a64d8`](https://github.com/graphcommerce-org/graphcommerce/commit/c4a64d8c5e38232d31f84b68acdf0032af5eeffd) - When multiple variations of a single configurable product were viewed the RecentlyViewedProducts component it would keep showing a loading state. ([@StefanAngenent](https://github.com/StefanAngenent))
|
|
175
360
|
|
|
176
|
-
- [#2108](https://github.com/graphcommerce-org/graphcommerce/pull/2108) [`6f214fb`](https://github.com/graphcommerce-org/graphcommerce/commit/6f214fbfd8ef24cc6dcba72f403bdcb1d8a5ed8a) - Remove marginBottom from ProductScroller by default and let implementor set the margin
|
|
177
|
-
([@StefanAngenent](https://github.com/StefanAngenent))
|
|
361
|
+
- [#2108](https://github.com/graphcommerce-org/graphcommerce/pull/2108) [`6f214fb`](https://github.com/graphcommerce-org/graphcommerce/commit/6f214fbfd8ef24cc6dcba72f403bdcb1d8a5ed8a) - Remove marginBottom from ProductScroller by default and let implementor set the margin ([@StefanAngenent](https://github.com/StefanAngenent))
|
|
178
362
|
|
|
179
363
|
## 7.1.0-canary.66
|
|
180
364
|
|
|
@@ -16,7 +16,10 @@ export function RecentlyViewedProducts(props: RecentlyViewedProductsProps) {
|
|
|
16
16
|
const ref = useRef<HTMLDivElement>(null)
|
|
17
17
|
const isInView = useInView(ref, { margin: '300px', once: true })
|
|
18
18
|
const { skus } = useRecentlyViewedSkus({ exclude })
|
|
19
|
-
const productList = useRecentlyViewedProducts({
|
|
19
|
+
const productList = useRecentlyViewedProducts({
|
|
20
|
+
exclude,
|
|
21
|
+
skip: skus.length === 0 || (!isInView && loading === 'lazy'),
|
|
22
|
+
})
|
|
20
23
|
|
|
21
24
|
if (
|
|
22
25
|
!import.meta.graphCommerce.recentlyViewedProducts?.enabled ||
|
|
@@ -9,13 +9,7 @@ export function useRecentlyViewedProducts(props: UseRecentlyViewedProductsProps)
|
|
|
9
9
|
let { skus, loading } = useRecentlyViewedSkus()
|
|
10
10
|
|
|
11
11
|
const productList = useQuery(ProductListDocument, {
|
|
12
|
-
variables: {
|
|
13
|
-
filters: {
|
|
14
|
-
sku: {
|
|
15
|
-
in: skus.map((p) => p.sku).sort(),
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
12
|
+
variables: { onlyItems: true, filters: { sku: { in: skus.map((p) => p.sku).sort() } } },
|
|
19
13
|
skip: loading || !skus.length || skip,
|
|
20
14
|
})
|
|
21
15
|
|
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": "
|
|
5
|
+
"version": "9.0.0-canary.101",
|
|
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": "^
|
|
16
|
-
"@graphcommerce/graphql": "^
|
|
17
|
-
"@graphcommerce/graphql-mesh": "^
|
|
18
|
-
"@graphcommerce/magento-cart": "^
|
|
19
|
-
"@graphcommerce/magento-product": "^
|
|
20
|
-
"@graphcommerce/magento-product-configurable": "^
|
|
21
|
-
"@graphcommerce/next-config": "^
|
|
22
|
-
"@graphcommerce/next-ui": "^
|
|
23
|
-
"@graphcommerce/prettier-config-pwa": "^
|
|
24
|
-
"@graphcommerce/typescript-config-pwa": "^
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.101",
|
|
16
|
+
"@graphcommerce/graphql": "^9.0.0-canary.101",
|
|
17
|
+
"@graphcommerce/graphql-mesh": "^9.0.0-canary.101",
|
|
18
|
+
"@graphcommerce/magento-cart": "^9.0.0-canary.101",
|
|
19
|
+
"@graphcommerce/magento-product": "^9.0.0-canary.101",
|
|
20
|
+
"@graphcommerce/magento-product-configurable": "^9.0.0-canary.101",
|
|
21
|
+
"@graphcommerce/next-config": "^9.0.0-canary.101",
|
|
22
|
+
"@graphcommerce/next-ui": "^9.0.0-canary.101",
|
|
23
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.101",
|
|
24
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.101",
|
|
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 {
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
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
|
|
File without changes
|