@graphcommerce/magento-review 2.110.1 → 2.111.2
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 +11 -0
- package/components/AccountReviews/index.tsx +1 -1
- package/components/CreateProductReviewForm/index.tsx +2 -3
- package/components/CustomerReview/index.tsx +2 -1
- package/components/ProductReviewChip/index.tsx +3 -3
- package/components/ProductReviewSummary/index.tsx +2 -2
- package/components/ProductReviews/index.tsx +0 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.111.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-review@2.110.2...@graphcommerce/magento-review@2.111.0) (2021-12-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* borderRadius based on theme.shape.borderRadius ([7c34937](https://github.com/ho-nl/m2-pwa/commit/7c349376cd41a131c628324c299106fdb7e60484))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [2.110.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-review@2.109.1...@graphcommerce/magento-review@2.110.0) (2021-11-22)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -55,7 +55,7 @@ export default function AccountReviews(props: AccountReviewsProps) {
|
|
|
55
55
|
classes={{ sectionContainer: classes.olderReviewsContainer }}
|
|
56
56
|
>
|
|
57
57
|
{olderReviews?.map(
|
|
58
|
-
(review
|
|
58
|
+
(review) => review && <CustomerReview key={review.created_at} {...review} />,
|
|
59
59
|
)}
|
|
60
60
|
</SectionContainer>
|
|
61
61
|
)}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
StarRatingField,
|
|
12
12
|
} from '@graphcommerce/next-ui'
|
|
13
13
|
import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
|
|
14
|
-
import {
|
|
14
|
+
import { Trans } from '@lingui/macro'
|
|
15
15
|
import { Box, makeStyles, TextField, Theme, Typography } from '@material-ui/core'
|
|
16
16
|
import { Alert } from '@material-ui/lab'
|
|
17
17
|
import { useRouter } from 'next/router'
|
|
@@ -36,7 +36,6 @@ const useStyles = makeStyles(
|
|
|
36
36
|
submitButton: {
|
|
37
37
|
width: responsiveVal(200, 250),
|
|
38
38
|
height: responsiveVal(40, 50),
|
|
39
|
-
borderRadius: responsiveVal(20, 25),
|
|
40
39
|
},
|
|
41
40
|
cancelButton: {
|
|
42
41
|
display: 'block',
|
|
@@ -95,7 +94,7 @@ export default function CreateProductReviewForm(props: CreateProductReviewFormPr
|
|
|
95
94
|
}
|
|
96
95
|
}, [loading, data, ratings.length])
|
|
97
96
|
|
|
98
|
-
if (!data) return
|
|
97
|
+
if (!data) return null
|
|
99
98
|
|
|
100
99
|
if (formState.isSubmitSuccessful && data) {
|
|
101
100
|
return (
|
|
@@ -88,7 +88,8 @@ export default function CustomerReview(props: CustomerReviewProps) {
|
|
|
88
88
|
</div>
|
|
89
89
|
<div className={classes.stars}>
|
|
90
90
|
{[...new Array(totalStars)].map((value, index) => (
|
|
91
|
-
|
|
91
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
92
|
+
<Image key={index} src={index < totalFilledStars ? filledStar : outlinedStar} />
|
|
92
93
|
))}
|
|
93
94
|
</div>
|
|
94
95
|
<div className={classes.title}>{product?.name}</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvgImageSimple, iconStar } from '@graphcommerce/next-ui'
|
|
2
|
-
import { Chip, ChipProps, makeStyles
|
|
2
|
+
import { Chip, ChipProps, makeStyles } from '@material-ui/core'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
|
|
5
5
|
export type ProductReviewChipProps = {
|
|
@@ -9,12 +9,12 @@ export type ProductReviewChipProps = {
|
|
|
9
9
|
} & ChipProps
|
|
10
10
|
|
|
11
11
|
const useStyles = makeStyles(
|
|
12
|
-
|
|
12
|
+
{
|
|
13
13
|
iconStar: {
|
|
14
14
|
stroke: '#FFDA1C',
|
|
15
15
|
fill: '#FFDA1C',
|
|
16
16
|
},
|
|
17
|
-
}
|
|
17
|
+
},
|
|
18
18
|
{ name: 'ProductListReviews' },
|
|
19
19
|
)
|
|
20
20
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SvgImageSimple, iconStar,
|
|
1
|
+
import { SvgImageSimple, iconStar, UseStyles } from '@graphcommerce/next-ui'
|
|
2
2
|
import { makeStyles, Theme } from '@material-ui/core'
|
|
3
|
-
import { ProductReviewSummaryFragment } from './ProductReviewSummary.gql'
|
|
4
3
|
import React from 'react'
|
|
4
|
+
import { ProductReviewSummaryFragment } from './ProductReviewSummary.gql'
|
|
5
5
|
|
|
6
6
|
export type ProductReviewSummaryProps = ProductReviewSummaryFragment & UseStyles<typeof useStyles>
|
|
7
7
|
|
|
@@ -172,7 +172,6 @@ export default function ProductReviews(props: ProductReviewsProps) {
|
|
|
172
172
|
<div key={`rating-${ratingBreakdown?.value}`} className={classes.rating}>
|
|
173
173
|
<span>{ratingBreakdown?.name}</span>
|
|
174
174
|
<StarRatingField
|
|
175
|
-
iconSize={16}
|
|
176
175
|
readOnly
|
|
177
176
|
size='small'
|
|
178
177
|
defaultValue={Number(ratingBreakdown?.value ?? 0)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/magento-review",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.111.2",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
6
6
|
"browserslist": [
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@graphcommerce/browserslist-config-pwa": "^3.0.2",
|
|
17
|
-
"@graphcommerce/eslint-config-pwa": "^3.1.
|
|
17
|
+
"@graphcommerce/eslint-config-pwa": "^3.1.6",
|
|
18
18
|
"@graphcommerce/prettier-config-pwa": "^3.0.4",
|
|
19
19
|
"@graphcommerce/typescript-config-pwa": "^3.1.1",
|
|
20
20
|
"@playwright/test": "^1.16.2"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@apollo/client": "^3.4.16",
|
|
24
|
-
"@graphcommerce/graphql": "^2.105.
|
|
25
|
-
"@graphcommerce/image": "^2.105.
|
|
26
|
-
"@graphcommerce/magento-customer": "^3.6.
|
|
27
|
-
"@graphcommerce/magento-product": "^3.
|
|
28
|
-
"@graphcommerce/magento-store": "^3.3.
|
|
29
|
-
"@graphcommerce/next-ui": "^3.
|
|
30
|
-
"@graphcommerce/react-hook-form": "^2.104.
|
|
24
|
+
"@graphcommerce/graphql": "^2.105.6",
|
|
25
|
+
"@graphcommerce/image": "^2.105.5",
|
|
26
|
+
"@graphcommerce/magento-customer": "^3.6.7",
|
|
27
|
+
"@graphcommerce/magento-product": "^3.7.2",
|
|
28
|
+
"@graphcommerce/magento-store": "^3.3.7",
|
|
29
|
+
"@graphcommerce/next-ui": "^3.20.0",
|
|
30
|
+
"@graphcommerce/react-hook-form": "^2.104.1",
|
|
31
31
|
"@lingui/macro": "^3.12.1",
|
|
32
32
|
"@material-ui/core": "^4.12.3",
|
|
33
33
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"react-dom": "^17.0.2",
|
|
38
38
|
"schema-dts": "^1.0.0"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "8f156415c7f5a963e363f0d6d18fe5d6bbd5dba2"
|
|
41
41
|
}
|