@graphcommerce/magento-review 8.1.0-canary.8 → 9.0.0-canary.100

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
  # Change Log
2
2
 
3
+ ## 9.0.0-canary.100
4
+
5
+ ## 9.0.0-canary.99
6
+
7
+ ## 9.0.0-canary.98
8
+
9
+ ## 9.0.0-canary.97
10
+
11
+ ## 9.0.0-canary.96
12
+
13
+ ## 9.0.0-canary.95
14
+
15
+ ## 9.0.0-canary.94
16
+
17
+ ## 9.0.0-canary.93
18
+
19
+ ## 9.0.0-canary.92
20
+
21
+ ## 9.0.0-canary.91
22
+
23
+ ## 9.0.0-canary.90
24
+
25
+ ## 9.0.0-canary.89
26
+
27
+ ## 9.0.0-canary.88
28
+
29
+ ## 9.0.0-canary.87
30
+
31
+ ## 9.0.0-canary.86
32
+
33
+ ## 9.0.0-canary.85
34
+
35
+ ## 9.0.0-canary.84
36
+
37
+ ## 9.0.0-canary.83
38
+
39
+ ## 9.0.0-canary.82
40
+
41
+ ## 9.0.0-canary.81
42
+
43
+ ## 9.0.0-canary.80
44
+
45
+ ## 9.0.0-canary.79
46
+
47
+ ## 9.0.0-canary.78
48
+
49
+ ## 9.0.0-canary.77
50
+
51
+ ### Patch Changes
52
+
53
+ - [#2355](https://github.com/graphcommerce-org/graphcommerce/pull/2355) [`82b4ed9`](https://github.com/graphcommerce-org/graphcommerce/commit/82b4ed9bf86b57f3c0bab75ee7c190777badf37e) - Add early return when there are no reviews to prevent invalid enhanced results. ([@carlocarels90](https://github.com/carlocarels90))
54
+
55
+ ## 9.0.0-canary.76
56
+
57
+ ## 9.0.0-canary.75
58
+
59
+ ## 9.0.0-canary.74
60
+
61
+ ## 9.0.0-canary.73
62
+
63
+ ## 9.0.0-canary.72
64
+
65
+ ## 9.0.0-canary.71
66
+
67
+ ## 9.0.0-canary.70
68
+
69
+ ## 9.0.0-canary.69
70
+
71
+ ## 9.0.0-canary.68
72
+
73
+ ## 9.0.0-canary.67
74
+
75
+ ## 9.0.0-canary.66
76
+
77
+ ## 9.0.0-canary.65
78
+
79
+ ## 9.0.0-canary.64
80
+
81
+ ## 9.0.0-canary.63
82
+
83
+ ## 9.0.0-canary.62
84
+
85
+ ## 9.0.0-canary.61
86
+
87
+ ## 9.0.0-canary.60
88
+
89
+ ## 9.0.0-canary.59
90
+
91
+ ## 9.0.0-canary.58
92
+
93
+ ## 9.0.0-canary.57
94
+
95
+ ## 9.0.0-canary.56
96
+
97
+ ## 9.0.0-canary.55
98
+
99
+ ## 9.0.0-canary.54
100
+
101
+ ## 8.1.0-canary.53
102
+
103
+ ## 8.1.0-canary.52
104
+
105
+ ## 8.1.0-canary.51
106
+
107
+ ## 8.1.0-canary.50
108
+
109
+ ## 8.1.0-canary.49
110
+
111
+ ## 8.1.0-canary.48
112
+
113
+ ## 8.1.0-canary.47
114
+
115
+ ## 8.1.0-canary.46
116
+
117
+ ## 8.1.0-canary.45
118
+
119
+ ## 8.1.0-canary.44
120
+
121
+ ## 8.1.0-canary.43
122
+
123
+ ## 8.1.0-canary.42
124
+
125
+ ## 8.1.0-canary.41
126
+
127
+ ## 8.1.0-canary.40
128
+
129
+ ## 8.1.0-canary.39
130
+
131
+ ## 8.1.0-canary.38
132
+
133
+ ## 8.1.0-canary.37
134
+
135
+ ## 8.1.0-canary.36
136
+
137
+ ## 8.1.0-canary.35
138
+
139
+ ## 8.1.0-canary.34
140
+
141
+ ## 8.1.0-canary.33
142
+
143
+ ## 8.1.0-canary.32
144
+
145
+ ## 8.1.0-canary.31
146
+
147
+ ## 8.1.0-canary.30
148
+
149
+ ## 8.1.0-canary.29
150
+
151
+ ## 8.1.0-canary.28
152
+
153
+ ## 8.1.0-canary.27
154
+
155
+ ## 8.1.0-canary.26
156
+
157
+ ## 8.1.0-canary.25
158
+
159
+ ## 8.1.0-canary.24
160
+
161
+ ## 8.1.0-canary.23
162
+
163
+ ## 8.1.0-canary.22
164
+
165
+ ## 8.1.0-canary.21
166
+
167
+ ## 8.1.0-canary.20
168
+
169
+ ## 8.1.0-canary.19
170
+
171
+ ## 8.1.0-canary.18
172
+
173
+ ## 8.1.0-canary.17
174
+
175
+ ## 8.1.0-canary.16
176
+
177
+ ## 8.1.0-canary.15
178
+
179
+ ## 8.1.0-canary.14
180
+
181
+ ## 8.1.0-canary.13
182
+
183
+ ## 8.1.0-canary.12
184
+
185
+ ## 8.1.0-canary.11
186
+
187
+ ## 8.1.0-canary.10
188
+
189
+ ## 8.1.0-canary.9
190
+
3
191
  ## 8.1.0-canary.8
4
192
 
5
193
  ## 8.1.0-canary.7
@@ -16,15 +204,13 @@
16
204
 
17
205
  ### Patch Changes
18
206
 
19
- - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`0767bc4`](https://github.com/graphcommerce-org/graphcommerce/commit/0767bc40f7b596209f24ca4e745ff0441f3275c9) - Upgrade input components to no longer use muiRegister, which improves INP scores
20
- ([@FrankHarland](https://github.com/FrankHarland))
207
+ - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`0767bc4`](https://github.com/graphcommerce-org/graphcommerce/commit/0767bc40f7b596209f24ca4e745ff0441f3275c9) - Upgrade input components to no longer use muiRegister, which improves INP scores ([@FrankHarland](https://github.com/FrankHarland))
21
208
 
22
209
  ## 8.0.6-canary.1
23
210
 
24
211
  ### Patch Changes
25
212
 
26
- - [#2213](https://github.com/graphcommerce-org/graphcommerce/pull/2213) [`a0d952e`](https://github.com/graphcommerce-org/graphcommerce/commit/a0d952e6b8a71a7451bfdb2bdb5150fc218169e2) - Moved product reviews to the relatedUpsells query so we do not pass the queryComplexity limit
27
- ([@paales](https://github.com/paales))
213
+ - [#2213](https://github.com/graphcommerce-org/graphcommerce/pull/2213) [`a0d952e`](https://github.com/graphcommerce-org/graphcommerce/commit/a0d952e6b8a71a7451bfdb2bdb5150fc218169e2) - Moved product reviews to the relatedUpsells query so we do not pass the queryComplexity limit ([@paales](https://github.com/paales))
28
214
 
29
215
  ## 8.0.6-canary.0
30
216
 
@@ -100,8 +286,7 @@
100
286
 
101
287
  ### Patch Changes
102
288
 
103
- - [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - Accessibility improvements for the frontend: Added skip content link. Removed empty buttons from tab flow. Gave focus to elements (such as the menu) that appear when after clicking a button. Improved aria labels where needed
104
- ([@FrankHarland](https://github.com/FrankHarland))
289
+ - [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - Accessibility improvements for the frontend: Added skip content link. Removed empty buttons from tab flow. Gave focus to elements (such as the menu) that appear when after clicking a button. Improved aria labels where needed ([@FrankHarland](https://github.com/FrankHarland))
105
290
 
106
291
  ## 8.0.0-canary.100
107
292
 
@@ -133,8 +318,7 @@
133
318
 
134
319
  ### Patch Changes
135
320
 
136
- - [#2168](https://github.com/graphcommerce-org/graphcommerce/pull/2168) [`986dc96`](https://github.com/graphcommerce-org/graphcommerce/commit/986dc96e6e88b58471dfcccf952d99bbb8a81884) - Added schema-dts as a dependency, so it isn't required in the example
137
- ([@paales](https://github.com/paales))
321
+ - [#2168](https://github.com/graphcommerce-org/graphcommerce/pull/2168) [`986dc96`](https://github.com/graphcommerce-org/graphcommerce/commit/986dc96e6e88b58471dfcccf952d99bbb8a81884) - Added schema-dts as a dependency, so it isn't required in the example ([@paales](https://github.com/paales))
138
322
 
139
323
  ## 8.0.0-canary.86
140
324
 
@@ -158,8 +342,7 @@
158
342
 
159
343
  ### Patch Changes
160
344
 
161
- - [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - a11y improvements (see https://github.com/graphcommerce-org/graphcommerce/issues/1995 for more info)
162
- ([@FrankHarland](https://github.com/FrankHarland))
345
+ - [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - a11y improvements (see https://github.com/graphcommerce-org/graphcommerce/issues/1995 for more info) ([@FrankHarland](https://github.com/FrankHarland))
163
346
 
164
347
  ## 8.0.0-canary.76
165
348
 
@@ -1390,31 +1573,31 @@
1390
1573
  All occurences of `<Trans>` and `t` need to be replaced:
1391
1574
 
1392
1575
  ```tsx
1393
- import { Trans, t } from "@lingui/macro";
1576
+ import { Trans, t } from '@lingui/macro'
1394
1577
 
1395
1578
  function MyComponent() {
1396
- const foo = "bar";
1579
+ const foo = 'bar'
1397
1580
  return (
1398
1581
  <div aria-label={t`Account ${foo}`}>
1399
1582
  <Trans>My Translation {foo}</Trans>
1400
1583
  </div>
1401
- );
1584
+ )
1402
1585
  }
1403
1586
  ```
1404
1587
 
1405
1588
  Needs to be replaced with:
1406
1589
 
1407
1590
  ```tsx
1408
- import { Trans } from "@lingui/react";
1409
- import { i18n } from "@lingui/core";
1591
+ import { Trans } from '@lingui/react'
1592
+ import { i18n } from '@lingui/core'
1410
1593
 
1411
1594
  function MyComponent() {
1412
- const foo = "bar";
1595
+ const foo = 'bar'
1413
1596
  return (
1414
1597
  <div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
1415
- <Trans key="My Translation {foo}" values={{ foo }}></Trans>
1598
+ <Trans key='My Translation {foo}' values={{ foo }}></Trans>
1416
1599
  </div>
1417
- );
1600
+ )
1418
1601
  }
1419
1602
  ```
1420
1603
 
@@ -1,10 +1,5 @@
1
1
  import { Image } from '@graphcommerce/image'
2
- import {
3
- responsiveVal,
4
- extendableComponent,
5
- useDateTimeFormat,
6
- IconSvg,
7
- } from '@graphcommerce/next-ui'
2
+ import { responsiveVal, extendableComponent, IconSvg, DateTimeFormat } from '@graphcommerce/next-ui'
8
3
  import { Box, SxProps, Theme } from '@mui/material'
9
4
  import { CustomerReviewFragment } from './CustomerReview.gql'
10
5
  import filledStar from './review_star_filled.svg'
@@ -29,8 +24,6 @@ export function CustomerReview(props: CustomerReviewProps) {
29
24
  const valuePerStar = maxAverageRating / totalStars
30
25
  const totalFilledStars = (average_rating / maxAverageRating / valuePerStar) * 100
31
26
 
32
- const dateFormatter = useDateTimeFormat({ dateStyle: 'long' })
33
-
34
27
  return (
35
28
  <Box
36
29
  className={classes.container}
@@ -98,7 +91,7 @@ export function CustomerReview(props: CustomerReviewProps) {
98
91
  color: theme.palette.text.disabled,
99
92
  })}
100
93
  >
101
- {dateFormatter.format(new Date(created_at ?? ''))}
94
+ <DateTimeFormat>{created_at}</DateTimeFormat>
102
95
  </Box>
103
96
  </Box>
104
97
  )
@@ -6,6 +6,8 @@ export function jsonLdProductReview(
6
6
  ): Pick<Product, 'aggregateRating' | 'review'> {
7
7
  const { reviews, review_count, rating_summary } = props
8
8
 
9
+ if (!review_count) return {}
10
+
9
11
  return {
10
12
  aggregateRating: {
11
13
  '@type': 'AggregateRating',
@@ -4,7 +4,7 @@ import {
4
4
  responsiveVal,
5
5
  StarRatingField,
6
6
  extendableComponent,
7
- useDateTimeFormat,
7
+ DateTimeFormat,
8
8
  } from '@graphcommerce/next-ui'
9
9
  import { Trans } from '@lingui/react'
10
10
  import { Typography, Button, Box, SxProps, Theme, Link } from '@mui/material'
@@ -52,8 +52,6 @@ export function ProductReviews(props: ProductReviewsProps) {
52
52
 
53
53
  const { current_page, total_pages } = myReviews.page_info
54
54
 
55
- const formatter = useDateTimeFormat({ dateStyle: 'long', timeStyle: 'short' })
56
-
57
55
  if (!reviews) {
58
56
  return null
59
57
  }
@@ -233,8 +231,9 @@ export function ProductReviews(props: ProductReviewsProps) {
233
231
  dateTime={review?.created_at}
234
232
  sx={{ typography: 'body2' }}
235
233
  >
236
- {review?.created_at &&
237
- formatter.format(new Date(review?.created_at.replace(/-/g, '/')))}
234
+ <DateTimeFormat dateStyle='long' timeStyle='short'>
235
+ {review?.created_at.replace(/-/g, '/')}
236
+ </DateTimeFormat>
238
237
  </Box>
239
238
  </Box>
240
239
  </Box>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-review",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "8.1.0-canary.8",
5
+ "version": "9.0.0-canary.100",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -15,21 +15,21 @@
15
15
  "schema-dts": "^1.1.2"
16
16
  },
17
17
  "devDependencies": {
18
- "typescript": "5.3.3"
18
+ "typescript": "5.5.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "@graphcommerce/ecommerce-ui": "^8.1.0-canary.8",
22
- "@graphcommerce/eslint-config-pwa": "^8.1.0-canary.8",
23
- "@graphcommerce/graphql": "^8.1.0-canary.8",
24
- "@graphcommerce/graphql-mesh": "^8.1.0-canary.8",
25
- "@graphcommerce/image": "^8.1.0-canary.8",
26
- "@graphcommerce/magento-customer": "^8.1.0-canary.8",
27
- "@graphcommerce/magento-product": "^8.1.0-canary.8",
28
- "@graphcommerce/magento-store": "^8.1.0-canary.8",
29
- "@graphcommerce/next-ui": "^8.1.0-canary.8",
30
- "@graphcommerce/prettier-config-pwa": "^8.1.0-canary.8",
31
- "@graphcommerce/react-hook-form": "^8.1.0-canary.8",
32
- "@graphcommerce/typescript-config-pwa": "^8.1.0-canary.8",
21
+ "@graphcommerce/ecommerce-ui": "^9.0.0-canary.100",
22
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.100",
23
+ "@graphcommerce/graphql": "^9.0.0-canary.100",
24
+ "@graphcommerce/graphql-mesh": "^9.0.0-canary.100",
25
+ "@graphcommerce/image": "^9.0.0-canary.100",
26
+ "@graphcommerce/magento-customer": "^9.0.0-canary.100",
27
+ "@graphcommerce/magento-product": "^9.0.0-canary.100",
28
+ "@graphcommerce/magento-store": "^9.0.0-canary.100",
29
+ "@graphcommerce/next-ui": "^9.0.0-canary.100",
30
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.100",
31
+ "@graphcommerce/react-hook-form": "^9.0.0-canary.100",
32
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.100",
33
33
  "@lingui/core": "^4.2.1",
34
34
  "@lingui/macro": "^4.2.1",
35
35
  "@lingui/react": "^4.2.1",