@graphcommerce/magento-review 3.2.3 → 3.2.6

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,73 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`0363b9671`](https://github.com/graphcommerce-org/graphcommerce/commit/0363b9671db7c2932321d97faf6f1eb385238397), [`c6a62a338`](https://github.com/graphcommerce-org/graphcommerce/commit/c6a62a338abf8af83d3a6eb7ed796586009910ca), [`3ac90b57c`](https://github.com/graphcommerce-org/graphcommerce/commit/3ac90b57c68b96f9d81771d6664ed9435a28fc1d), [`00f6167ff`](https://github.com/graphcommerce-org/graphcommerce/commit/00f6167ff4096bf7432f3d8e8e739ecbf6ab0dd2), [`7159d3ab3`](https://github.com/graphcommerce-org/graphcommerce/commit/7159d3ab31e937c9c921023c46e80db5813e789c), [`32370574b`](https://github.com/graphcommerce-org/graphcommerce/commit/32370574bef6345b857ae911049ca27a64bc7e08), [`ed2b67a06`](https://github.com/graphcommerce-org/graphcommerce/commit/ed2b67a0618d9db97e79ed2a8226e0ae12403943), [`4c146c682`](https://github.com/graphcommerce-org/graphcommerce/commit/4c146c68242e6edc616807fb73173cc959c26034)]:
8
+ - @graphcommerce/next-ui@4.8.0
9
+ - @graphcommerce/magento-product@4.3.5
10
+ - @graphcommerce/magento-customer@4.3.0
11
+ - @graphcommerce/magento-store@4.2.4
12
+
13
+ ## 3.2.5
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [[`c30893857`](https://github.com/graphcommerce-org/graphcommerce/commit/c3089385791291e812a48c2691a39a2325ee0439)]:
18
+ - @graphcommerce/magento-store@4.2.3
19
+ - @graphcommerce/magento-customer@4.2.12
20
+ - @graphcommerce/magento-product@4.3.4
21
+
22
+ ## 3.2.4
23
+
24
+ ### Patch Changes
25
+
26
+ - [#1451](https://github.com/graphcommerce-org/graphcommerce/pull/1451) [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061) Thanks [@paales](https://github.com/paales)! - Removed all occurences of @lingui/macro and moved to @lingui/macro / @lingui/core in preparation to move to swc.
27
+
28
+ Since we've removed @lingui/macro, all occurences need to be replaced with @lingui/core and @lingui/react.
29
+
30
+ All occurences of `<Trans>` and `t` need to be replaced:
31
+
32
+ ```tsx
33
+ import { Trans, t } from '@lingui/macro'
34
+
35
+ function MyComponent() {
36
+ const foo = 'bar'
37
+ return (
38
+ <div aria-label={t`Account ${foo}`}>
39
+ <Trans>My Translation {foo}</Trans>
40
+ </div>
41
+ )
42
+ }
43
+ ```
44
+
45
+ Needs to be replaced with:
46
+
47
+ ```tsx
48
+ import { Trans } from '@lingui/react'
49
+ import { i18n } from '@lingui/core'
50
+
51
+ function MyComponent() {
52
+ const foo = 'bar'
53
+ return (
54
+ <div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
55
+ <Trans key='My Translation {foo}' values={{ foo }}></Trans>
56
+ </div>
57
+ )
58
+ }
59
+ ```
60
+
61
+ [More examples for Trans](https://lingui.js.org/ref/macro.html#examples-of-jsx-macros) and [more examples for `t`](https://lingui.js.org/ref/macro.html#examples-of-js-macros)
62
+
63
+ - Updated dependencies [[`50188e378`](https://github.com/graphcommerce-org/graphcommerce/commit/50188e378b4c77561ebc600958ea11cd114fa61a), [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061)]:
64
+ - @graphcommerce/react-hook-form@3.1.3
65
+ - @graphcommerce/magento-customer@4.2.11
66
+ - @graphcommerce/magento-product@4.3.3
67
+ - @graphcommerce/magento-store@4.2.2
68
+ - @graphcommerce/next-ui@4.7.2
69
+ - @graphcommerce/graphql@3.1.3
70
+
3
71
  ## 3.2.3
4
72
 
5
73
  ### Patch Changes
@@ -10,7 +10,7 @@ import {
10
10
  extendableComponent,
11
11
  } from '@graphcommerce/next-ui'
12
12
  import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
13
- import { Trans } from '@lingui/macro'
13
+ import { Trans } from '@lingui/react'
14
14
  import { Box, TextField, Typography, Alert, Button, SxProps, Theme } from '@mui/material'
15
15
  import { useRouter } from 'next/router'
16
16
  import { useEffect, useState } from 'react'
@@ -76,11 +76,11 @@ export function CreateProductReviewForm(props: CreateProductReviewFormProps) {
76
76
  return (
77
77
  <>
78
78
  <Alert severity='success' variant='standard'>
79
- <Trans>Thank you! Your review was successfully submitted for approval</Trans>
79
+ <Trans id='Thank you! Your review was successfully submitted for approval' />
80
80
  </Alert>
81
81
  <Box mt={6}>
82
82
  <Button variant='pill' color='secondary' size='large' onClick={() => router.back()}>
83
- <Trans>Continue shopping</Trans>
83
+ <Trans id='Continue shopping' />
84
84
  </Button>
85
85
  </Box>
86
86
  </>
@@ -94,7 +94,7 @@ export function CreateProductReviewForm(props: CreateProductReviewFormProps) {
94
94
  variant='outlined'
95
95
  type='text'
96
96
  error={!!formState.errors.nickname || !!error}
97
- label={<Trans>Name</Trans>}
97
+ label={<Trans id='Name' />}
98
98
  required={required.nickname}
99
99
  {...muiRegister('nickname', { required: required.nickname })}
100
100
  helperText={formState.errors.nickname?.message}
@@ -214,7 +214,7 @@ export function CreateProductReviewForm(props: CreateProductReviewFormProps) {
214
214
  height: responsiveVal(40, 50),
215
215
  }}
216
216
  >
217
- <Trans>Submit review</Trans>
217
+ <Trans id='Submit review' />
218
218
  </Button>
219
219
  <Button
220
220
  variant='text'
@@ -227,7 +227,7 @@ export function CreateProductReviewForm(props: CreateProductReviewFormProps) {
227
227
  margin: '0 auto',
228
228
  }}
229
229
  >
230
- <Trans>Cancel</Trans>
230
+ <Trans id='Cancel' />
231
231
  </Button>
232
232
  </FormActions>
233
233
 
@@ -5,7 +5,7 @@ import {
5
5
  StarRatingField,
6
6
  extendableComponent,
7
7
  } from '@graphcommerce/next-ui'
8
- import { Trans } from '@lingui/macro'
8
+ import { Trans } from '@lingui/react'
9
9
  import { Typography, Button, Box, SxProps, Theme, Link } from '@mui/material'
10
10
  import { useRouter } from 'next/router'
11
11
  import React, { useState } from 'react'
@@ -87,7 +87,7 @@ export function ProductReviews(props: ProductReviewsProps) {
87
87
  },
88
88
  })}
89
89
  >
90
- <Trans>Write a review</Trans>
90
+ <Trans id='Write a review' />
91
91
  </Button>
92
92
 
93
93
  {!!total_pages && total_pages > 1 && (
@@ -138,7 +138,7 @@ export function ProductReviews(props: ProductReviewsProps) {
138
138
  })}
139
139
  >
140
140
  <Typography variant='subtitle1'>
141
- <Trans>Be the first to write a review!</Trans>
141
+ <Trans id='Be the first to write a review!' />
142
142
  </Typography>
143
143
  </Box>
144
144
  </Box>
@@ -232,7 +232,7 @@ export function ProductReviews(props: ProductReviewsProps) {
232
232
  })}
233
233
  >
234
234
  <Box className={classes.nickname} sx={{ typography: 'body2' }}>
235
- <Trans>Written by</Trans> {review?.nickname}
235
+ <Trans id='Written by {nickname}' values={{ nickname: review?.nickname }} />
236
236
  </Box>
237
237
  <Box
238
238
  component='time'
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.3",
5
+ "version": "3.2.6",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,24 +12,25 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.1.6",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.7",
16
16
  "@graphcommerce/prettier-config-pwa": "^4.0.6",
17
- "@graphcommerce/typescript-config-pwa": "^4.0.2",
17
+ "@graphcommerce/typescript-config-pwa": "^4.0.3",
18
18
  "@playwright/test": "^1.21.1"
19
19
  },
20
20
  "dependencies": {
21
- "@graphcommerce/graphql": "3.1.2",
21
+ "@graphcommerce/graphql": "3.1.3",
22
22
  "@graphcommerce/graphql-mesh": "4.1.3",
23
23
  "@graphcommerce/image": "3.1.5",
24
- "@graphcommerce/magento-customer": "4.2.10",
25
- "@graphcommerce/magento-product": "4.3.2",
26
- "@graphcommerce/magento-store": "4.2.1",
27
- "@graphcommerce/next-ui": "4.7.1",
28
- "@graphcommerce/react-hook-form": "3.1.2",
24
+ "@graphcommerce/magento-customer": "4.3.0",
25
+ "@graphcommerce/magento-product": "4.3.5",
26
+ "@graphcommerce/magento-store": "4.2.4",
27
+ "@graphcommerce/next-ui": "4.8.0",
28
+ "@graphcommerce/react-hook-form": "3.1.3",
29
29
  "schema-dts": "^1.1.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "@lingui/macro": "^3.13.2",
32
+ "@lingui/react": "^3.13.2",
33
+ "@lingui/core": "^3.13.2",
33
34
  "@mui/material": "5.5.3",
34
35
  "next": "12.1.2",
35
36
  "react": "^17.0.2",