@graphcommerce/magento-cart-email 3.0.15 → 3.0.18
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 +71 -0
- package/EmailForm/EmailForm.tsx +6 -6
- package/package.json +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.0.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
|
|
9
|
+
Since we've removed @lingui/macro, all occurences need to be replaced with @lingui/core and @lingui/react.
|
|
10
|
+
|
|
11
|
+
All occurences of `<Trans>` and `t` need to be replaced:
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Trans, t } from '@lingui/macro'
|
|
15
|
+
|
|
16
|
+
function MyComponent() {
|
|
17
|
+
const foo = 'bar'
|
|
18
|
+
return (
|
|
19
|
+
<div aria-label={t`Account ${foo}`}>
|
|
20
|
+
<Trans>My Translation {foo}</Trans>
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Needs to be replaced with:
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import { Trans } from '@lingui/react'
|
|
30
|
+
import { i18n } from '@lingui/core'
|
|
31
|
+
|
|
32
|
+
function MyComponent() {
|
|
33
|
+
const foo = 'bar'
|
|
34
|
+
return (
|
|
35
|
+
<div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
|
|
36
|
+
<Trans key='My Translation {foo}' values={{ foo }}></Trans>
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[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)
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [[`50188e378`](https://github.com/graphcommerce-org/graphcommerce/commit/50188e378b4c77561ebc600958ea11cd114fa61a), [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061)]:
|
|
45
|
+
- @graphcommerce/react-hook-form@3.1.3
|
|
46
|
+
- @graphcommerce/magento-cart@4.2.13
|
|
47
|
+
- @graphcommerce/magento-customer@4.2.11
|
|
48
|
+
- @graphcommerce/magento-product@4.3.3
|
|
49
|
+
- @graphcommerce/magento-store@4.2.2
|
|
50
|
+
- @graphcommerce/next-ui@4.7.2
|
|
51
|
+
- @graphcommerce/graphql@3.1.3
|
|
52
|
+
|
|
53
|
+
## 3.0.17
|
|
54
|
+
|
|
55
|
+
### Patch Changes
|
|
56
|
+
|
|
57
|
+
- Updated dependencies []:
|
|
58
|
+
- @graphcommerce/magento-cart@4.2.12
|
|
59
|
+
- @graphcommerce/magento-customer@4.2.10
|
|
60
|
+
- @graphcommerce/magento-product@4.3.2
|
|
61
|
+
|
|
62
|
+
## 3.0.16
|
|
63
|
+
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- Updated dependencies [[`25ef6cf08`](https://github.com/graphcommerce-org/graphcommerce/commit/25ef6cf08c278105307d6f604b7135d637e9046c), [`80e30bb77`](https://github.com/graphcommerce-org/graphcommerce/commit/80e30bb77015755fbc00a7935d590f80c1c1c18c)]:
|
|
67
|
+
- @graphcommerce/graphql@3.1.2
|
|
68
|
+
- @graphcommerce/magento-customer@4.2.9
|
|
69
|
+
- @graphcommerce/magento-cart@4.2.11
|
|
70
|
+
- @graphcommerce/magento-product@4.3.1
|
|
71
|
+
- @graphcommerce/magento-store@4.2.1
|
|
72
|
+
- @graphcommerce/next-ui@4.7.1
|
|
73
|
+
|
|
3
74
|
## 3.0.15
|
|
4
75
|
|
|
5
76
|
### Patch Changes
|
package/EmailForm/EmailForm.tsx
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from '@graphcommerce/magento-customer'
|
|
12
12
|
import { AnimatedRow, extendableComponent, FormDiv, FormRow } from '@graphcommerce/next-ui'
|
|
13
13
|
import { emailPattern, useFormCompose, UseFormComposeOptions } from '@graphcommerce/react-hook-form'
|
|
14
|
-
import { Trans } from '@lingui/
|
|
14
|
+
import { Trans } from '@lingui/react'
|
|
15
15
|
import {
|
|
16
16
|
CircularProgress,
|
|
17
17
|
TextField,
|
|
@@ -67,14 +67,14 @@ export function EmailForm(props: EmailFormProps) {
|
|
|
67
67
|
if (mode === 'signin') {
|
|
68
68
|
endAdornment = (
|
|
69
69
|
<Button color='secondary' style={{ whiteSpace: 'nowrap' }} onClick={() => setExpand(!expand)}>
|
|
70
|
-
{expand ? <Trans
|
|
70
|
+
{expand ? <Trans id='Close' /> : <Trans id='Sign in' />}
|
|
71
71
|
</Button>
|
|
72
72
|
)
|
|
73
73
|
}
|
|
74
74
|
if (mode === 'signup') {
|
|
75
75
|
endAdornment = (
|
|
76
76
|
<Button color='secondary' style={{ whiteSpace: 'nowrap' }} onClick={() => setExpand(!expand)}>
|
|
77
|
-
{expand ? <Trans
|
|
77
|
+
{expand ? <Trans id='Close' /> : <Trans id='Create Account' />}
|
|
78
78
|
</Button>
|
|
79
79
|
)
|
|
80
80
|
}
|
|
@@ -87,7 +87,7 @@ export function EmailForm(props: EmailFormProps) {
|
|
|
87
87
|
<form noValidate onSubmit={submit}>
|
|
88
88
|
<FormRow>
|
|
89
89
|
<Typography variant='h5' component='h2' gutterBottom>
|
|
90
|
-
<Trans
|
|
90
|
+
<Trans id='Log in or create an account' />
|
|
91
91
|
</Typography>
|
|
92
92
|
</FormRow>
|
|
93
93
|
<FormRow className={classes.formRow} sx={{ py: 0 }}>
|
|
@@ -96,7 +96,7 @@ export function EmailForm(props: EmailFormProps) {
|
|
|
96
96
|
type='email'
|
|
97
97
|
error={formState.isSubmitted && !!formState.errors.email}
|
|
98
98
|
helperText={formState.isSubmitted && formState.errors.email?.message}
|
|
99
|
-
label={<Trans
|
|
99
|
+
label={<Trans id='Email' />}
|
|
100
100
|
required={required.email}
|
|
101
101
|
{...muiRegister('email', {
|
|
102
102
|
required: required.email,
|
|
@@ -132,7 +132,7 @@ export function EmailForm(props: EmailFormProps) {
|
|
|
132
132
|
{mode === 'session-expired' && (
|
|
133
133
|
<FormRow>
|
|
134
134
|
<Alert severity='error'>
|
|
135
|
-
<Trans
|
|
135
|
+
<Trans id='You must sign in to continue' />
|
|
136
136
|
</Alert>
|
|
137
137
|
</FormRow>
|
|
138
138
|
)}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-cart-email",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "3.0.
|
|
5
|
+
"version": "3.0.18",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,23 +12,24 @@
|
|
|
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/image": "3.1.5",
|
|
23
|
-
"@graphcommerce/magento-cart": "4.2.
|
|
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.
|
|
23
|
+
"@graphcommerce/magento-cart": "4.2.13",
|
|
24
|
+
"@graphcommerce/magento-customer": "4.2.11",
|
|
25
|
+
"@graphcommerce/magento-product": "4.3.3",
|
|
26
|
+
"@graphcommerce/magento-store": "4.2.2",
|
|
27
|
+
"@graphcommerce/next-ui": "4.7.2",
|
|
28
|
+
"@graphcommerce/react-hook-form": "3.1.3"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@lingui/
|
|
31
|
+
"@lingui/react": "^3.13.2",
|
|
32
|
+
"@lingui/core": "^3.13.2",
|
|
32
33
|
"@mui/material": "5.5.3",
|
|
33
34
|
"framer-motion": "^6.2.4",
|
|
34
35
|
"next": "12.1.2",
|