@graphcommerce/magento-cart 3.5.13 → 3.6.1
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
|
+
# [3.6.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart@3.5.15...@graphcommerce/magento-cart@3.6.0) (2021-11-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* added dutch translations ([59a4fd9](https://github.com/ho-nl/m2-pwa/commit/59a4fd9d170d9454c443b4723fdf5da0196cec7d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.5.9](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart@3.5.8...@graphcommerce/magento-cart@3.5.9) (2021-11-04)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -70,61 +70,52 @@ export default function CartAgreementsForm(props: CartAgreementsFormProps) {
|
|
|
70
70
|
<form noValidate onSubmit={submit} name='cartAgreements'>
|
|
71
71
|
<div className={classes.formInner}>
|
|
72
72
|
{data?.checkoutAgreements &&
|
|
73
|
-
sortedAgreements?.map(
|
|
74
|
-
(agreement)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
>
|
|
92
|
-
<FormControlLabel
|
|
93
|
-
control={<Checkbox color='secondary' required={true} />}
|
|
94
|
-
label={
|
|
95
|
-
<PageLink
|
|
96
|
-
href={`/legal/view/${agreement.name
|
|
97
|
-
?.toLowerCase()
|
|
98
|
-
.replaceAll(' ', '-')}`}
|
|
99
|
-
passHref
|
|
100
|
-
>
|
|
101
|
-
<Link color='secondary'>{agreement.checkbox_text}</Link>
|
|
102
|
-
</PageLink>
|
|
103
|
-
}
|
|
104
|
-
checked={!!value}
|
|
105
|
-
inputRef={ref}
|
|
106
|
-
onBlur={onBlur}
|
|
107
|
-
name={name}
|
|
108
|
-
onChange={(e) => onChange(e as React.ChangeEvent<HTMLInputElement>)}
|
|
109
|
-
/>
|
|
110
|
-
{error?.message && <FormHelperText>{error.message}</FormHelperText>}
|
|
111
|
-
</FormControl>
|
|
112
|
-
)}
|
|
113
|
-
/>
|
|
114
|
-
</>
|
|
115
|
-
) : (
|
|
116
|
-
<div className={classes.manualCheck}>
|
|
117
|
-
<PageLink
|
|
118
|
-
href={`/legal/view/${agreement.name?.toLowerCase().replaceAll(' ', '-')}`}
|
|
119
|
-
passHref
|
|
73
|
+
sortedAgreements?.map((agreement) => {
|
|
74
|
+
if (!agreement) return null
|
|
75
|
+
const href = `/checkout/terms/${agreement.name?.toLowerCase().replace(/\s+/g, '-')}`
|
|
76
|
+
return (
|
|
77
|
+
<React.Fragment key={agreement.agreement_id}>
|
|
78
|
+
{agreement.mode === 'MANUAL' ? (
|
|
79
|
+
<Controller
|
|
80
|
+
defaultValue={''}
|
|
81
|
+
name={String(agreement.agreement_id)}
|
|
82
|
+
control={control}
|
|
83
|
+
rules={{ required: 'You have to agree in order to proceed' }}
|
|
84
|
+
render={({
|
|
85
|
+
field: { onChange, value, name, ref, onBlur },
|
|
86
|
+
fieldState: { error },
|
|
87
|
+
}) => (
|
|
88
|
+
<FormControl
|
|
89
|
+
error={!!formState.errors[String(agreement.agreement_id)]}
|
|
90
|
+
classes={{ root: classes.formControlRoot }}
|
|
120
91
|
>
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
92
|
+
<FormControlLabel
|
|
93
|
+
control={<Checkbox color='secondary' required={true} />}
|
|
94
|
+
label={
|
|
95
|
+
<PageLink href={href} passHref>
|
|
96
|
+
<Link color='secondary'>{agreement.checkbox_text}</Link>
|
|
97
|
+
</PageLink>
|
|
98
|
+
}
|
|
99
|
+
checked={!!value}
|
|
100
|
+
inputRef={ref}
|
|
101
|
+
onBlur={onBlur}
|
|
102
|
+
name={name}
|
|
103
|
+
onChange={(e) => onChange(e as React.ChangeEvent<HTMLInputElement>)}
|
|
104
|
+
/>
|
|
105
|
+
{error?.message && <FormHelperText>{error.message}</FormHelperText>}
|
|
106
|
+
</FormControl>
|
|
107
|
+
)}
|
|
108
|
+
/>
|
|
109
|
+
) : (
|
|
110
|
+
<div className={classes.manualCheck}>
|
|
111
|
+
<PageLink href={href} passHref>
|
|
112
|
+
<Link color='secondary'>{agreement.checkbox_text}</Link>
|
|
113
|
+
</PageLink>
|
|
114
|
+
</div>
|
|
115
|
+
)}
|
|
116
|
+
</React.Fragment>
|
|
117
|
+
)
|
|
118
|
+
})}
|
|
128
119
|
</div>
|
|
129
120
|
</form>
|
|
130
121
|
</FormDiv>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FullPageMessage, SvgImageSimple, iconSadFace } from '@graphcommerce/next-ui'
|
|
2
|
+
import { t, Trans } from '@lingui/macro'
|
|
2
3
|
import { Button } from '@material-ui/core'
|
|
3
4
|
import Link from 'next/link'
|
|
4
5
|
import React from 'react'
|
|
@@ -9,17 +10,17 @@ export default function EmptyCart(props: EmptyCartProps) {
|
|
|
9
10
|
|
|
10
11
|
return (
|
|
11
12
|
<FullPageMessage
|
|
12
|
-
title=
|
|
13
|
+
title={t`Your cart is empty`}
|
|
13
14
|
icon={<SvgImageSimple src={iconSadFace} size='xxl' />}
|
|
14
15
|
button={
|
|
15
16
|
<Link href='/' passHref>
|
|
16
17
|
<Button variant='contained' color='primary' size='large'>
|
|
17
|
-
Continue shopping
|
|
18
|
+
<Trans>Continue shopping</Trans>
|
|
18
19
|
</Button>
|
|
19
20
|
</Link>
|
|
20
21
|
}
|
|
21
22
|
>
|
|
22
|
-
{children ??
|
|
23
|
+
{children ?? <Trans>Discover our collection and add items to your basket!</Trans>}
|
|
23
24
|
</FullPageMessage>
|
|
24
25
|
)
|
|
25
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/magento-cart",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
6
6
|
"browserslist": [
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"@graphcommerce/framer-scroller": "^1.0.3",
|
|
25
25
|
"@graphcommerce/graphql": "^2.105.4",
|
|
26
26
|
"@graphcommerce/image": "^2.105.3",
|
|
27
|
-
"@graphcommerce/magento-customer": "^3.
|
|
27
|
+
"@graphcommerce/magento-customer": "^3.5.1",
|
|
28
28
|
"@graphcommerce/magento-graphql": "^2.104.4",
|
|
29
|
-
"@graphcommerce/magento-store": "^3.2.
|
|
30
|
-
"@graphcommerce/next-ui": "^3.14.
|
|
29
|
+
"@graphcommerce/magento-store": "^3.2.16",
|
|
30
|
+
"@graphcommerce/next-ui": "^3.14.8",
|
|
31
31
|
"@graphcommerce/react-hook-form": "^2.103.1",
|
|
32
32
|
"@graphql-typed-document-node/core": "^3.1.0",
|
|
33
33
|
"@material-ui/core": "^4.12.3",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"react": "^17.0.2",
|
|
39
39
|
"react-dom": "^17.0.2"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "4e309955dd02ff7c4da55483871edb689f2a6aa3"
|
|
42
42
|
}
|