@graphcommerce/magento-review 3.2.16 → 3.2.19
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,36 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.2.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`11bca2d2f`](https://github.com/graphcommerce-org/graphcommerce/commit/11bca2d2f7dbb7c5e2827c04eb0db43d4099f2fd)]:
|
|
8
|
+
- @graphcommerce/next-ui@4.11.1
|
|
9
|
+
- @graphcommerce/magento-customer@4.6.2
|
|
10
|
+
- @graphcommerce/magento-product@4.4.11
|
|
11
|
+
- @graphcommerce/magento-store@4.2.13
|
|
12
|
+
|
|
13
|
+
## 3.2.18
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#1524](https://github.com/graphcommerce-org/graphcommerce/pull/1524) [`9ec0338df`](https://github.com/graphcommerce-org/graphcommerce/commit/9ec0338dfe34d37b0f2c24e36ffa6ed13ea1145e) Thanks [@paales](https://github.com/paales)! - feat: Added useDateTimeFormat and useNumberFormat which automatically use the locales from nextjs.
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`9ec0338df`](https://github.com/graphcommerce-org/graphcommerce/commit/9ec0338dfe34d37b0f2c24e36ffa6ed13ea1145e), [`735b78672`](https://github.com/graphcommerce-org/graphcommerce/commit/735b786724d5401cbe6e88f2515e121a1a0945b2)]:
|
|
20
|
+
- @graphcommerce/next-ui@4.11.0
|
|
21
|
+
- @graphcommerce/magento-product@4.4.10
|
|
22
|
+
- @graphcommerce/magento-store@4.2.12
|
|
23
|
+
- @graphcommerce/graphql@3.3.0
|
|
24
|
+
- @graphcommerce/magento-customer@4.6.1
|
|
25
|
+
|
|
26
|
+
## 3.2.17
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [[`98ff2334d`](https://github.com/graphcommerce-org/graphcommerce/commit/98ff2334d1b7dedb8bc56ebe6abb50836eefedd3)]:
|
|
31
|
+
- @graphcommerce/magento-customer@4.6.0
|
|
32
|
+
- @graphcommerce/magento-product@4.4.9
|
|
33
|
+
|
|
3
34
|
## 3.2.16
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { useQuery } from '@graphcommerce/graphql'
|
|
2
1
|
import { Image } from '@graphcommerce/image'
|
|
3
|
-
import {
|
|
4
|
-
import { responsiveVal, extendableComponent } from '@graphcommerce/next-ui'
|
|
2
|
+
import { responsiveVal, extendableComponent, useDateTimeFormat } from '@graphcommerce/next-ui'
|
|
5
3
|
import { Box, SxProps, Theme } from '@mui/material'
|
|
6
|
-
import { useMemo } from 'react'
|
|
7
4
|
import { CustomerReviewFragment } from './CustomerReview.gql'
|
|
8
5
|
import filledStar from './review_star_filled.svg'
|
|
9
6
|
import outlinedStar from './review_star_outlined.svg'
|
|
@@ -27,13 +24,7 @@ export function CustomerReview(props: CustomerReviewProps) {
|
|
|
27
24
|
const valuePerStar = maxAverageRating / totalStars
|
|
28
25
|
const totalFilledStars = (average_rating / maxAverageRating / valuePerStar) * 100
|
|
29
26
|
|
|
30
|
-
const {
|
|
31
|
-
const locale = config?.storeConfig?.locale?.replace('_', '-')
|
|
32
|
-
|
|
33
|
-
const dateFormatter = useMemo(
|
|
34
|
-
() => new Intl.DateTimeFormat(locale, { year: 'numeric', month: 'long', day: 'numeric' }),
|
|
35
|
-
[locale],
|
|
36
|
-
)
|
|
27
|
+
const dateFormatter = useDateTimeFormat({ year: 'numeric', month: 'long', day: 'numeric' })
|
|
37
28
|
|
|
38
29
|
return (
|
|
39
30
|
<Box
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
responsiveVal,
|
|
5
5
|
StarRatingField,
|
|
6
6
|
extendableComponent,
|
|
7
|
+
useDateTimeFormat,
|
|
7
8
|
} from '@graphcommerce/next-ui'
|
|
8
9
|
import { Trans } from '@lingui/react'
|
|
9
10
|
import { Typography, Button, Box, SxProps, Theme, Link } from '@mui/material'
|
|
@@ -34,8 +35,6 @@ const { classes } = extendableComponent(name, parts)
|
|
|
34
35
|
|
|
35
36
|
export function ProductReviews(props: ProductReviewsProps) {
|
|
36
37
|
const { reviews, url_key, sx = [] } = props
|
|
37
|
-
const config = 'en_US'
|
|
38
|
-
const locale = config.replace('_', '-')
|
|
39
38
|
const router = useRouter()
|
|
40
39
|
|
|
41
40
|
const [reviewPage, setPage] = useState<number>(1)
|
|
@@ -53,7 +52,7 @@ export function ProductReviews(props: ProductReviewsProps) {
|
|
|
53
52
|
|
|
54
53
|
const { current_page, total_pages } = myReviews.page_info
|
|
55
54
|
|
|
56
|
-
const formatter =
|
|
55
|
+
const formatter = useDateTimeFormat({
|
|
57
56
|
year: 'numeric',
|
|
58
57
|
month: 'long',
|
|
59
58
|
day: 'numeric',
|
package/next-env.d.ts
ADDED
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": "3.2.
|
|
5
|
+
"version": "3.2.19",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"@playwright/test": "^1.21.1"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@graphcommerce/graphql": "3.
|
|
21
|
+
"@graphcommerce/graphql": "3.3.0",
|
|
22
22
|
"@graphcommerce/graphql-mesh": "4.1.4",
|
|
23
23
|
"@graphcommerce/image": "3.1.7",
|
|
24
|
-
"@graphcommerce/magento-customer": "4.
|
|
25
|
-
"@graphcommerce/magento-product": "4.4.
|
|
26
|
-
"@graphcommerce/magento-store": "4.2.
|
|
27
|
-
"@graphcommerce/next-ui": "4.
|
|
24
|
+
"@graphcommerce/magento-customer": "4.6.2",
|
|
25
|
+
"@graphcommerce/magento-product": "4.4.11",
|
|
26
|
+
"@graphcommerce/magento-store": "4.2.13",
|
|
27
|
+
"@graphcommerce/next-ui": "4.11.1",
|
|
28
28
|
"@graphcommerce/react-hook-form": "3.2.2",
|
|
29
29
|
"schema-dts": "^1.1.0"
|
|
30
30
|
},
|