@graphcommerce/magento-review 3.2.2 → 3.2.5
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,71 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c30893857`](https://github.com/graphcommerce-org/graphcommerce/commit/c3089385791291e812a48c2691a39a2325ee0439)]:
|
|
8
|
+
- @graphcommerce/magento-store@4.2.3
|
|
9
|
+
- @graphcommerce/magento-customer@4.2.12
|
|
10
|
+
- @graphcommerce/magento-product@4.3.4
|
|
11
|
+
|
|
12
|
+
## 3.2.4
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#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.
|
|
17
|
+
|
|
18
|
+
Since we've removed @lingui/macro, all occurences need to be replaced with @lingui/core and @lingui/react.
|
|
19
|
+
|
|
20
|
+
All occurences of `<Trans>` and `t` need to be replaced:
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { Trans, t } from '@lingui/macro'
|
|
24
|
+
|
|
25
|
+
function MyComponent() {
|
|
26
|
+
const foo = 'bar'
|
|
27
|
+
return (
|
|
28
|
+
<div aria-label={t`Account ${foo}`}>
|
|
29
|
+
<Trans>My Translation {foo}</Trans>
|
|
30
|
+
</div>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Needs to be replaced with:
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { Trans } from '@lingui/react'
|
|
39
|
+
import { i18n } from '@lingui/core'
|
|
40
|
+
|
|
41
|
+
function MyComponent() {
|
|
42
|
+
const foo = 'bar'
|
|
43
|
+
return (
|
|
44
|
+
<div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
|
|
45
|
+
<Trans key='My Translation {foo}' values={{ foo }}></Trans>
|
|
46
|
+
</div>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
[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)
|
|
52
|
+
|
|
53
|
+
- Updated dependencies [[`50188e378`](https://github.com/graphcommerce-org/graphcommerce/commit/50188e378b4c77561ebc600958ea11cd114fa61a), [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061)]:
|
|
54
|
+
- @graphcommerce/react-hook-form@3.1.3
|
|
55
|
+
- @graphcommerce/magento-customer@4.2.11
|
|
56
|
+
- @graphcommerce/magento-product@4.3.3
|
|
57
|
+
- @graphcommerce/magento-store@4.2.2
|
|
58
|
+
- @graphcommerce/next-ui@4.7.2
|
|
59
|
+
- @graphcommerce/graphql@3.1.3
|
|
60
|
+
|
|
61
|
+
## 3.2.3
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- Updated dependencies []:
|
|
66
|
+
- @graphcommerce/magento-customer@4.2.10
|
|
67
|
+
- @graphcommerce/magento-product@4.3.2
|
|
68
|
+
|
|
3
69
|
## 3.2.2
|
|
4
70
|
|
|
5
71
|
### 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/
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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/
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
5
|
+
"version": "3.2.5",
|
|
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.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^4.1.7",
|
|
16
16
|
"@graphcommerce/prettier-config-pwa": "^4.0.6",
|
|
17
|
-
"@graphcommerce/typescript-config-pwa": "^4.0.
|
|
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.
|
|
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.
|
|
25
|
-
"@graphcommerce/magento-product": "4.3.
|
|
26
|
-
"@graphcommerce/magento-store": "4.2.
|
|
27
|
-
"@graphcommerce/next-ui": "4.7.
|
|
28
|
-
"@graphcommerce/react-hook-form": "3.1.
|
|
24
|
+
"@graphcommerce/magento-customer": "4.2.12",
|
|
25
|
+
"@graphcommerce/magento-product": "4.3.4",
|
|
26
|
+
"@graphcommerce/magento-store": "4.2.3",
|
|
27
|
+
"@graphcommerce/next-ui": "4.7.2",
|
|
28
|
+
"@graphcommerce/react-hook-form": "3.1.3",
|
|
29
29
|
"schema-dts": "^1.1.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@lingui/
|
|
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",
|