@graphcommerce/magento-cart 4.0.1 β 4.1.2
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 +108 -0
- package/components/ApolloCartError/ApolloCartErrorAlert.tsx +1 -2
- package/components/ApolloCartError/ApolloCartErrorFullPage.tsx +2 -6
- package/components/ApolloCartError/ApolloCartErrorSnackbar.tsx +1 -1
- package/components/CartFab/CartFab.tsx +7 -3
- package/components/CartSummary/index.tsx +1 -1
- package/components/CartTotals/CartTotals.tsx +5 -4
- package/package.json +17 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,113 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
|
|
8
|
+
Thanks [@paales](https://github.com/paales)! - made packages public
|
|
9
|
+
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
[[`4bb963d75`](https://github.com/ho-nl/m2-pwa/commit/4bb963d7595b5ce6e3a4924cc2e3e8b0210cdcd6),
|
|
12
|
+
[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96),
|
|
13
|
+
[`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20),
|
|
14
|
+
[`3a719c88c`](https://github.com/ho-nl/m2-pwa/commit/3a719c88cad1eab58602de28c41adc0fc4827e1d),
|
|
15
|
+
[`5ffcb56bf`](https://github.com/ho-nl/m2-pwa/commit/5ffcb56bfcbe49ebeaf24f9341e819a145ab9a14)]:
|
|
16
|
+
- @graphcommerce/framer-next-pages@3.1.0
|
|
17
|
+
- @graphcommerce/ecommerce-ui@1.0.1
|
|
18
|
+
- @graphcommerce/framer-scroller@2.0.3
|
|
19
|
+
- @graphcommerce/graphql@3.0.3
|
|
20
|
+
- @graphcommerce/image@3.1.0
|
|
21
|
+
- @graphcommerce/magento-customer@4.1.2
|
|
22
|
+
- @graphcommerce/magento-graphql@3.0.3
|
|
23
|
+
- @graphcommerce/magento-store@4.0.3
|
|
24
|
+
- @graphcommerce/next-ui@4.1.2
|
|
25
|
+
- @graphcommerce/react-hook-form@3.0.3
|
|
26
|
+
|
|
27
|
+
## 4.1.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
|
|
32
|
+
[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7)
|
|
33
|
+
Thanks [@paales](https://github.com/paales)! - Moved `ApolloErrorAlert`, `ApolloErrorFullPage` and
|
|
34
|
+
`ApolloErrorSnackbar` to the ecommerce-ui package.
|
|
35
|
+
|
|
36
|
+
Created `ComposedSubmitButton` and `ComposedSubmitLinkOrButton` to reduce complexity from
|
|
37
|
+
`magento-graphcms` example.
|
|
38
|
+
|
|
39
|
+
Removed dependency an `@graphcommerce/react-hook-form` from `magento-graphcms` example.
|
|
40
|
+
|
|
41
|
+
Added dependency `@graphcommerce/ecommerce-ui` from `magento-graphcms` example.
|
|
42
|
+
|
|
43
|
+
* [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
|
|
44
|
+
[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
|
|
45
|
+
Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
|
|
46
|
+
`dependencies` to `peerDependencies`. The result of this is that there will be significantly less
|
|
47
|
+
duplicate packages in the node_modules folders.
|
|
48
|
+
|
|
49
|
+
- [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
|
|
50
|
+
[`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275)
|
|
51
|
+
Thanks [@paales](https://github.com/paales)! - Fixed extraction of translations and updated
|
|
52
|
+
various translations for english πΊπΈπ¬π§ and dutch π³π±
|
|
53
|
+
|
|
54
|
+
* [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
|
|
55
|
+
[`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
|
|
56
|
+
Thanks [@paales](https://github.com/paales)! - Upgraded to
|
|
57
|
+
[NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
|
|
58
|
+
implementing
|
|
59
|
+
[On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
|
|
60
|
+
soon.
|
|
61
|
+
|
|
62
|
+
This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
|
|
63
|
+
frontend to be able to revalidate pages manually.
|
|
64
|
+
|
|
65
|
+
- [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
|
|
66
|
+
[`5a4809b1a`](https://github.com/ho-nl/m2-pwa/commit/5a4809b1a705aa32f620f520085df48ee25f9949)
|
|
67
|
+
Thanks [@paales](https://github.com/paales)! - make sure the discount is rendered side-by-side
|
|
68
|
+
|
|
69
|
+
- Updated dependencies
|
|
70
|
+
[[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7),
|
|
71
|
+
[`351347afe`](https://github.com/ho-nl/m2-pwa/commit/351347afeae5bd837408d46c7593bcf5473dc621),
|
|
72
|
+
[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
|
|
73
|
+
[`e7c8e2756`](https://github.com/ho-nl/m2-pwa/commit/e7c8e2756d637cbcd2e793d62ef5721d35d9fa7b),
|
|
74
|
+
[`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275),
|
|
75
|
+
[`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]:
|
|
76
|
+
- @graphcommerce/ecommerce-ui@1.0.0
|
|
77
|
+
- @graphcommerce/framer-next-pages@3.0.2
|
|
78
|
+
- @graphcommerce/magento-customer@4.1.1
|
|
79
|
+
- @graphcommerce/next-ui@4.1.1
|
|
80
|
+
- @graphcommerce/react-hook-form@3.0.2
|
|
81
|
+
- @graphcommerce/framer-scroller@2.0.2
|
|
82
|
+
- @graphcommerce/graphql@3.0.2
|
|
83
|
+
- @graphcommerce/image@3.0.2
|
|
84
|
+
- @graphcommerce/magento-graphql@3.0.2
|
|
85
|
+
- @graphcommerce/magento-store@4.0.2
|
|
86
|
+
|
|
87
|
+
## 4.1.0
|
|
88
|
+
|
|
89
|
+
### Minor Changes
|
|
90
|
+
|
|
91
|
+
- [#1273](https://github.com/ho-nl/m2-pwa/pull/1273)
|
|
92
|
+
[`8c4e4f7cd`](https://github.com/ho-nl/m2-pwa/commit/8c4e4f7cdd2fa4252788fbc9889d0803bba20eef)
|
|
93
|
+
Thanks [@paales](https://github.com/paales)! - Added darkmode support! βοΈπ, adds a toggle to the
|
|
94
|
+
hamburger menu.
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- [#1271](https://github.com/ho-nl/m2-pwa/pull/1271)
|
|
99
|
+
[`e0008d60d`](https://github.com/ho-nl/m2-pwa/commit/e0008d60d712603219129dd411d1985bf1ebbed1)
|
|
100
|
+
Thanks [@paales](https://github.com/paales)! - make sure the CartFab and MenuFab are stylable with
|
|
101
|
+
sx
|
|
102
|
+
|
|
103
|
+
- Updated dependencies
|
|
104
|
+
[[`e0008d60d`](https://github.com/ho-nl/m2-pwa/commit/e0008d60d712603219129dd411d1985bf1ebbed1),
|
|
105
|
+
[`5d9f8320f`](https://github.com/ho-nl/m2-pwa/commit/5d9f8320ff9621d7357fbe01319ab0cafdf9095d),
|
|
106
|
+
[`8c4e4f7cd`](https://github.com/ho-nl/m2-pwa/commit/8c4e4f7cdd2fa4252788fbc9889d0803bba20eef),
|
|
107
|
+
[`5082b8c81`](https://github.com/ho-nl/m2-pwa/commit/5082b8c8191cc3e0b4627678bf837af093513d57)]:
|
|
108
|
+
- @graphcommerce/next-ui@4.1.0
|
|
109
|
+
- @graphcommerce/magento-customer@4.1.0
|
|
110
|
+
|
|
3
111
|
## 4.0.1
|
|
4
112
|
|
|
5
113
|
### Patch Changes
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import { ApolloErrorAlert, ApolloErrorAlertProps } from '@graphcommerce/ecommerce-ui'
|
|
1
2
|
import { useQuery } from '@graphcommerce/graphql'
|
|
2
3
|
import { CustomerTokenDocument } from '@graphcommerce/magento-customer'
|
|
3
4
|
import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
|
|
4
|
-
import { ApolloErrorAlert, ApolloErrorAlertProps } from '@graphcommerce/next-ui'
|
|
5
5
|
import { t } from '@lingui/macro'
|
|
6
6
|
import { Button } from '@mui/material'
|
|
7
7
|
import Link from 'next/link'
|
|
8
|
-
import React from 'react'
|
|
9
8
|
import { useClearCurrentCartId } from '../../hooks/useClearCurrentCartId'
|
|
10
9
|
|
|
11
10
|
export type ApolloCartErrorAlertProps = ApolloErrorAlertProps
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
+
import { ApolloErrorFullPage, ApolloErrorFullPageProps } from '@graphcommerce/ecommerce-ui'
|
|
1
2
|
import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
|
|
2
|
-
import {
|
|
3
|
-
ApolloErrorFullPage,
|
|
4
|
-
ApolloErrorFullPageProps,
|
|
5
|
-
iconSadFace,
|
|
6
|
-
SvgIcon,
|
|
7
|
-
} from '@graphcommerce/next-ui'
|
|
3
|
+
import { iconSadFace, SvgIcon } from '@graphcommerce/next-ui'
|
|
8
4
|
import { Button } from '@mui/material'
|
|
9
5
|
import { useClearCurrentCartId } from '../../hooks/useClearCurrentCartId'
|
|
10
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ApolloErrorSnackbarProps, ApolloErrorSnackbar } from '@graphcommerce/ecommerce-ui'
|
|
1
2
|
import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
|
|
2
|
-
import { ApolloErrorSnackbarProps, ApolloErrorSnackbar } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Button } from '@mui/material'
|
|
4
4
|
import React from 'react'
|
|
5
5
|
import { useClearCurrentCartId } from '../../hooks/useClearCurrentCartId'
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
useScrollY,
|
|
8
8
|
} from '@graphcommerce/next-ui'
|
|
9
9
|
import { t } from '@lingui/macro'
|
|
10
|
-
import { alpha, Fab, FabProps, NoSsr, styled, useTheme, Box } from '@mui/material'
|
|
10
|
+
import { alpha, Fab, FabProps, NoSsr, styled, useTheme, Box, SxProps, Theme } from '@mui/material'
|
|
11
11
|
import { m, useTransform } from 'framer-motion'
|
|
12
12
|
import PageLink from 'next/link'
|
|
13
13
|
import React from 'react'
|
|
@@ -17,6 +17,7 @@ import { CartTotalQuantityFragment } from './CartTotalQuantity.gql'
|
|
|
17
17
|
|
|
18
18
|
export type CartFabProps = {
|
|
19
19
|
icon?: React.ReactNode
|
|
20
|
+
sx?: SxProps<Theme>
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
type CartFabContentProps = CartFabProps & CartTotalQuantityFragment
|
|
@@ -32,7 +33,7 @@ const MotionFab = m(
|
|
|
32
33
|
const { classes } = extendableComponent('CartFab', ['root', 'cart', 'shadow'] as const)
|
|
33
34
|
|
|
34
35
|
function CartFabContent(props: CartFabContentProps) {
|
|
35
|
-
const { total_quantity, icon, ...fabProps } = props
|
|
36
|
+
const { total_quantity, icon, sx = [], ...fabProps } = props
|
|
36
37
|
|
|
37
38
|
const theme2 = useTheme()
|
|
38
39
|
const scrollY = useScrollY()
|
|
@@ -48,7 +49,10 @@ function CartFabContent(props: CartFabContentProps) {
|
|
|
48
49
|
return (
|
|
49
50
|
<Box
|
|
50
51
|
className={classes.root}
|
|
51
|
-
sx={
|
|
52
|
+
sx={[
|
|
53
|
+
{ position: 'relative', width: fabIconSize, height: fabIconSize },
|
|
54
|
+
...(Array.isArray(sx) ? sx : [sx]),
|
|
55
|
+
]}
|
|
52
56
|
>
|
|
53
57
|
<PageLink href='/cart' passHref>
|
|
54
58
|
<MotionFab
|
|
@@ -102,7 +102,7 @@ export default function CartSummary(props: CartSummaryProps) {
|
|
|
102
102
|
<Box>
|
|
103
103
|
<SectionContainer
|
|
104
104
|
variantLeft='h5'
|
|
105
|
-
labelLeft={t`Billing
|
|
105
|
+
labelLeft={t`Billing address`}
|
|
106
106
|
sx={{ '& .SectionHeader': { marginTop: 0, paddingBottom: '8px' } }}
|
|
107
107
|
labelRight={
|
|
108
108
|
editable ? (
|
|
@@ -94,10 +94,12 @@ export default function CartTotals(props: CartTotalsProps) {
|
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
96
|
<AnimatedRow
|
|
97
|
+
key={discount?.label}
|
|
97
98
|
sx={(theme) => ({
|
|
98
|
-
|
|
99
|
+
display: 'flex',
|
|
100
|
+
justifyContent: 'space-between',
|
|
101
|
+
typography: 'subtitle1',
|
|
99
102
|
})}
|
|
100
|
-
key={discount?.label}
|
|
101
103
|
>
|
|
102
104
|
<Box>{discount?.label}</Box>
|
|
103
105
|
<Box className={classes.money} sx={{ whiteSpace: 'nowrap' }}>
|
|
@@ -154,7 +156,6 @@ export default function CartTotals(props: CartTotalsProps) {
|
|
|
154
156
|
display: 'flex',
|
|
155
157
|
justifyContent: 'space-between',
|
|
156
158
|
typography: 'subtitle1',
|
|
157
|
-
fontWeight: theme.typography.fontWeightBold,
|
|
158
159
|
color: theme.palette.primary.main,
|
|
159
160
|
})}
|
|
160
161
|
>
|
|
@@ -175,7 +176,7 @@ export default function CartTotals(props: CartTotalsProps) {
|
|
|
175
176
|
sx={{
|
|
176
177
|
display: 'flex',
|
|
177
178
|
justifyContent: 'space-between',
|
|
178
|
-
typography: '
|
|
179
|
+
typography: 'body1',
|
|
179
180
|
color: 'text.disabled',
|
|
180
181
|
paddingTop: 0,
|
|
181
182
|
}}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-cart",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.1.2",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,21 +12,24 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "^4.0.
|
|
16
|
-
"@graphcommerce/prettier-config-pwa": "^4.0.
|
|
17
|
-
"@graphcommerce/typescript-config-pwa": "^4.0.
|
|
18
|
-
"@playwright/test": "^1.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^4.0.3",
|
|
16
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.2",
|
|
17
|
+
"@graphcommerce/typescript-config-pwa": "^4.0.2",
|
|
18
|
+
"@playwright/test": "^1.19.1"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@graphcommerce/
|
|
22
|
-
"@graphcommerce/framer-
|
|
23
|
-
"@graphcommerce/
|
|
24
|
-
"@graphcommerce/
|
|
25
|
-
"@graphcommerce/
|
|
26
|
-
"@graphcommerce/magento-
|
|
27
|
-
"@graphcommerce/magento-
|
|
28
|
-
"@graphcommerce/
|
|
29
|
-
"@graphcommerce/
|
|
21
|
+
"@graphcommerce/ecommerce-ui": "^1.0.1",
|
|
22
|
+
"@graphcommerce/framer-next-pages": "^3.1.0",
|
|
23
|
+
"@graphcommerce/framer-scroller": "^2.0.3",
|
|
24
|
+
"@graphcommerce/graphql": "^3.0.3",
|
|
25
|
+
"@graphcommerce/image": "^3.1.0",
|
|
26
|
+
"@graphcommerce/magento-customer": "^4.1.2",
|
|
27
|
+
"@graphcommerce/magento-graphql": "^3.0.3",
|
|
28
|
+
"@graphcommerce/magento-store": "^4.0.3",
|
|
29
|
+
"@graphcommerce/next-ui": "^4.1.2",
|
|
30
|
+
"@graphcommerce/react-hook-form": "^3.0.3"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
30
33
|
"@lingui/macro": "^3.13.2",
|
|
31
34
|
"@mui/material": "^5.4.1",
|
|
32
35
|
"framer-motion": "^6.2.4",
|