@graphcommerce/magento-cart 4.0.0 β†’ 4.1.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
@@ -1,5 +1,108 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
8
+ [`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7)
9
+ Thanks [@paales](https://github.com/paales)! - Moved `ApolloErrorAlert`, `ApolloErrorFullPage` and
10
+ `ApolloErrorSnackbar` to the ecommerce-ui package.
11
+
12
+ Created `ComposedSubmitButton` and `ComposedSubmitLinkOrButton` to reduce complexity from
13
+ `magento-graphcms` example.
14
+
15
+ Removed dependency an `@graphcommerce/react-hook-form` from `magento-graphcms` example.
16
+
17
+ Added dependency `@graphcommerce/ecommerce-ui` from `magento-graphcms` example.
18
+
19
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
20
+ [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
21
+ Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
22
+ `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
23
+ duplicate packages in the node_modules folders.
24
+
25
+ - [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
26
+ [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275)
27
+ Thanks [@paales](https://github.com/paales)! - Fixed extraction of translations and updated
28
+ various translations for english πŸ‡ΊπŸ‡ΈπŸ‡¬πŸ‡§ and dutch πŸ‡³πŸ‡±
29
+
30
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
31
+ [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
32
+ Thanks [@paales](https://github.com/paales)! - Upgraded to
33
+ [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
34
+ implementing
35
+ [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
36
+ soon.
37
+
38
+ This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
39
+ frontend to be able to revalidate pages manually.
40
+
41
+ - [#1274](https://github.com/ho-nl/m2-pwa/pull/1274)
42
+ [`5a4809b1a`](https://github.com/ho-nl/m2-pwa/commit/5a4809b1a705aa32f620f520085df48ee25f9949)
43
+ Thanks [@paales](https://github.com/paales)! - make sure the discount is rendered side-by-side
44
+
45
+ - Updated dependencies
46
+ [[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7),
47
+ [`351347afe`](https://github.com/ho-nl/m2-pwa/commit/351347afeae5bd837408d46c7593bcf5473dc621),
48
+ [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
49
+ [`e7c8e2756`](https://github.com/ho-nl/m2-pwa/commit/e7c8e2756d637cbcd2e793d62ef5721d35d9fa7b),
50
+ [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275),
51
+ [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]:
52
+ - @graphcommerce/ecommerce-ui@1.0.0
53
+ - @graphcommerce/framer-next-pages@3.0.2
54
+ - @graphcommerce/magento-customer@4.1.1
55
+ - @graphcommerce/next-ui@4.1.1
56
+ - @graphcommerce/react-hook-form@3.0.2
57
+ - @graphcommerce/framer-scroller@2.0.2
58
+ - @graphcommerce/graphql@3.0.2
59
+ - @graphcommerce/image@3.0.2
60
+ - @graphcommerce/magento-graphql@3.0.2
61
+ - @graphcommerce/magento-store@4.0.2
62
+
63
+ ## 4.1.0
64
+
65
+ ### Minor Changes
66
+
67
+ - [#1273](https://github.com/ho-nl/m2-pwa/pull/1273)
68
+ [`8c4e4f7cd`](https://github.com/ho-nl/m2-pwa/commit/8c4e4f7cdd2fa4252788fbc9889d0803bba20eef)
69
+ Thanks [@paales](https://github.com/paales)! - Added darkmode support! β˜€οΈπŸŒ‘, adds a toggle to the
70
+ hamburger menu.
71
+
72
+ ### Patch Changes
73
+
74
+ - [#1271](https://github.com/ho-nl/m2-pwa/pull/1271)
75
+ [`e0008d60d`](https://github.com/ho-nl/m2-pwa/commit/e0008d60d712603219129dd411d1985bf1ebbed1)
76
+ Thanks [@paales](https://github.com/paales)! - make sure the CartFab and MenuFab are stylable with
77
+ sx
78
+
79
+ - Updated dependencies
80
+ [[`e0008d60d`](https://github.com/ho-nl/m2-pwa/commit/e0008d60d712603219129dd411d1985bf1ebbed1),
81
+ [`5d9f8320f`](https://github.com/ho-nl/m2-pwa/commit/5d9f8320ff9621d7357fbe01319ab0cafdf9095d),
82
+ [`8c4e4f7cd`](https://github.com/ho-nl/m2-pwa/commit/8c4e4f7cdd2fa4252788fbc9889d0803bba20eef),
83
+ [`5082b8c81`](https://github.com/ho-nl/m2-pwa/commit/5082b8c8191cc3e0b4627678bf837af093513d57)]:
84
+ - @graphcommerce/next-ui@4.1.0
85
+ - @graphcommerce/magento-customer@4.1.0
86
+
87
+ ## 4.0.1
88
+
89
+ ### Patch Changes
90
+
91
+ - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
92
+ Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
93
+ so that the packages link to back to the website and repository
94
+ - Updated dependencies
95
+ [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
96
+ - @graphcommerce/framer-next-pages@3.0.1
97
+ - @graphcommerce/framer-scroller@2.0.1
98
+ - @graphcommerce/graphql@3.0.1
99
+ - @graphcommerce/image@3.0.1
100
+ - @graphcommerce/magento-customer@4.0.1
101
+ - @graphcommerce/magento-graphql@3.0.1
102
+ - @graphcommerce/magento-store@4.0.1
103
+ - @graphcommerce/next-ui@4.0.1
104
+ - @graphcommerce/react-hook-form@3.0.1
105
+
3
106
  ## 4.0.0
4
107
 
5
108
  ### Major 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={{ position: 'relative', width: fabIconSize, height: fabIconSize }}
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 Address`}
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
- fontWeight: theme.typography.fontWeightBold,
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: 'subtitle1',
179
+ typography: 'body1',
179
180
  color: 'text.disabled',
180
181
  paddingTop: 0,
181
182
  }}
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-cart",
3
- "version": "4.0.0",
3
+ "homepage": "https://www.graphcommerce.org/",
4
+ "repository": "github:graphcommerce-org/graphcommerce",
5
+ "version": "4.1.1",
4
6
  "sideEffects": false,
5
7
  "prettier": "@graphcommerce/prettier-config-pwa",
6
8
  "eslintConfig": {
@@ -10,21 +12,24 @@
10
12
  }
11
13
  },
12
14
  "devDependencies": {
13
- "@graphcommerce/eslint-config-pwa": "^4.0.0",
14
- "@graphcommerce/prettier-config-pwa": "^4.0.0",
15
- "@graphcommerce/typescript-config-pwa": "^4.0.0",
16
- "@playwright/test": "^1.18.1"
15
+ "@graphcommerce/eslint-config-pwa": "^4.0.2",
16
+ "@graphcommerce/prettier-config-pwa": "^4.0.1",
17
+ "@graphcommerce/typescript-config-pwa": "^4.0.1",
18
+ "@playwright/test": "^1.19.1"
17
19
  },
18
20
  "dependencies": {
19
- "@graphcommerce/framer-next-pages": "^3.0.0",
20
- "@graphcommerce/framer-scroller": "^2.0.0",
21
- "@graphcommerce/graphql": "^3.0.0",
22
- "@graphcommerce/image": "^3.0.0",
23
- "@graphcommerce/magento-customer": "^4.0.0",
24
- "@graphcommerce/magento-graphql": "^3.0.0",
25
- "@graphcommerce/magento-store": "^4.0.0",
26
- "@graphcommerce/next-ui": "^4.0.0",
27
- "@graphcommerce/react-hook-form": "^3.0.0",
21
+ "@graphcommerce/ecommerce-ui": "^1.0.0",
22
+ "@graphcommerce/framer-next-pages": "^3.0.2",
23
+ "@graphcommerce/framer-scroller": "^2.0.2",
24
+ "@graphcommerce/graphql": "^3.0.2",
25
+ "@graphcommerce/image": "^3.0.2",
26
+ "@graphcommerce/magento-customer": "^4.1.1",
27
+ "@graphcommerce/magento-graphql": "^3.0.2",
28
+ "@graphcommerce/magento-store": "^4.0.2",
29
+ "@graphcommerce/next-ui": "^4.1.1",
30
+ "@graphcommerce/react-hook-form": "^3.0.2"
31
+ },
32
+ "peerDependencies": {
28
33
  "@lingui/macro": "^3.13.2",
29
34
  "@mui/material": "^5.4.1",
30
35
  "framer-motion": "^6.2.4",