@graphcommerce/magento-review 2.110.2 → 2.111.3

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
@@ -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, i) => review && <CustomerReview key={review.created_at} {...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 { t, Trans } from '@lingui/macro'
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
- <Image src={index < totalFilledStars ? filledStar : outlinedStar} />
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, Theme } from '@material-ui/core'
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
- (theme: Theme) => ({
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, responsiveVal, UseStyles } from '@graphcommerce/next-ui'
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.110.2",
3
+ "version": "2.111.3",
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.5",
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.5",
25
- "@graphcommerce/image": "^2.105.4",
26
- "@graphcommerce/magento-customer": "^3.6.4",
27
- "@graphcommerce/magento-product": "^3.6.4",
28
- "@graphcommerce/magento-store": "^3.3.4",
29
- "@graphcommerce/next-ui": "^3.18.2",
30
- "@graphcommerce/react-hook-form": "^2.104.0",
24
+ "@graphcommerce/graphql": "^2.105.6",
25
+ "@graphcommerce/image": "^2.105.5",
26
+ "@graphcommerce/magento-customer": "^3.6.8",
27
+ "@graphcommerce/magento-product": "^3.7.3",
28
+ "@graphcommerce/magento-store": "^3.3.8",
29
+ "@graphcommerce/next-ui": "^3.20.1",
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": "4d36627aeb43cba320c249b9a876384627064f18"
40
+ "gitHead": "b4bdc1cd365ebdd0bad8e1ed6afd374123bb2908"
41
41
  }