@graphcommerce/magento-review 8.1.0-canary.9 → 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,191 @@
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
+
3
189
  ## 8.1.0-canary.9
4
190
 
5
191
  ## 8.1.0-canary.8
@@ -18,15 +204,13 @@
18
204
 
19
205
  ### Patch Changes
20
206
 
21
- - [#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
22
- ([@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))
23
208
 
24
209
  ## 8.0.6-canary.1
25
210
 
26
211
  ### Patch Changes
27
212
 
28
- - [#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
29
- ([@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))
30
214
 
31
215
  ## 8.0.6-canary.0
32
216
 
@@ -102,8 +286,7 @@
102
286
 
103
287
  ### Patch Changes
104
288
 
105
- - [`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
106
- ([@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))
107
290
 
108
291
  ## 8.0.0-canary.100
109
292
 
@@ -135,8 +318,7 @@
135
318
 
136
319
  ### Patch Changes
137
320
 
138
- - [#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
139
- ([@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))
140
322
 
141
323
  ## 8.0.0-canary.86
142
324
 
@@ -160,8 +342,7 @@
160
342
 
161
343
  ### Patch Changes
162
344
 
163
- - [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - a11y improvements (see https://github.com/graphcommerce-org/graphcommerce/issues/1995 for more info)
164
- ([@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))
165
346
 
166
347
  ## 8.0.0-canary.76
167
348
 
@@ -1392,31 +1573,31 @@
1392
1573
  All occurences of `<Trans>` and `t` need to be replaced:
1393
1574
 
1394
1575
  ```tsx
1395
- import { Trans, t } from "@lingui/macro";
1576
+ import { Trans, t } from '@lingui/macro'
1396
1577
 
1397
1578
  function MyComponent() {
1398
- const foo = "bar";
1579
+ const foo = 'bar'
1399
1580
  return (
1400
1581
  <div aria-label={t`Account ${foo}`}>
1401
1582
  <Trans>My Translation {foo}</Trans>
1402
1583
  </div>
1403
- );
1584
+ )
1404
1585
  }
1405
1586
  ```
1406
1587
 
1407
1588
  Needs to be replaced with:
1408
1589
 
1409
1590
  ```tsx
1410
- import { Trans } from "@lingui/react";
1411
- import { i18n } from "@lingui/core";
1591
+ import { Trans } from '@lingui/react'
1592
+ import { i18n } from '@lingui/core'
1412
1593
 
1413
1594
  function MyComponent() {
1414
- const foo = "bar";
1595
+ const foo = 'bar'
1415
1596
  return (
1416
1597
  <div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
1417
- <Trans key="My Translation {foo}" values={{ foo }}></Trans>
1598
+ <Trans key='My Translation {foo}' values={{ foo }}></Trans>
1418
1599
  </div>
1419
- );
1600
+ )
1420
1601
  }
1421
1602
  ```
1422
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.9",
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.9",
22
- "@graphcommerce/eslint-config-pwa": "^8.1.0-canary.9",
23
- "@graphcommerce/graphql": "^8.1.0-canary.9",
24
- "@graphcommerce/graphql-mesh": "^8.1.0-canary.9",
25
- "@graphcommerce/image": "^8.1.0-canary.9",
26
- "@graphcommerce/magento-customer": "^8.1.0-canary.9",
27
- "@graphcommerce/magento-product": "^8.1.0-canary.9",
28
- "@graphcommerce/magento-store": "^8.1.0-canary.9",
29
- "@graphcommerce/next-ui": "^8.1.0-canary.9",
30
- "@graphcommerce/prettier-config-pwa": "^8.1.0-canary.9",
31
- "@graphcommerce/react-hook-form": "^8.1.0-canary.9",
32
- "@graphcommerce/typescript-config-pwa": "^8.1.0-canary.9",
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",