@graphcommerce/magento-cart 4.8.5 → 4.8.6
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,19 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.8.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1662](https://github.com/graphcommerce-org/graphcommerce/pull/1662) [`93c8f3a3f`](https://github.com/graphcommerce-org/graphcommerce/commit/93c8f3a3f2fd2d16e5a5132652bf489858583f63) Thanks [@paales](https://github.com/paales)! - Allow passing buttonProps to the CartStartCheckout component
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`0c21c5c23`](https://github.com/graphcommerce-org/graphcommerce/commit/0c21c5c233ebab15f6629c234e3de1cc8c0452e1), [`de8925aa9`](https://github.com/graphcommerce-org/graphcommerce/commit/de8925aa910b191c62041530c68c697a58a1e52d), [`f5eae0afd`](https://github.com/graphcommerce-org/graphcommerce/commit/f5eae0afdbd474b1f81c450425ffadf2d025187a), [`9e0ca73eb`](https://github.com/graphcommerce-org/graphcommerce/commit/9e0ca73eb50ded578f4a98e40a7eb920bf8ab421)]:
|
|
10
|
+
- @graphcommerce/next-ui@4.28.0
|
|
11
|
+
- @graphcommerce/framer-scroller@2.1.40
|
|
12
|
+
- @graphcommerce/framer-next-pages@3.3.1
|
|
13
|
+
- @graphcommerce/ecommerce-ui@1.5.2
|
|
14
|
+
- @graphcommerce/magento-customer@4.11.6
|
|
15
|
+
- @graphcommerce/magento-store@4.3.1
|
|
16
|
+
|
|
3
17
|
## 4.8.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Money } from '@graphcommerce/magento-store'
|
|
2
2
|
import { iconChevronRight, IconSvg, extendableComponent } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react'
|
|
4
|
-
import { Box, Button, SxProps, Theme } from '@mui/material'
|
|
4
|
+
import { Box, Button, ButtonProps, SxProps, Theme } from '@mui/material'
|
|
5
5
|
import PageLink from 'next/link'
|
|
6
6
|
import { CartStartCheckoutFragment } from './CartStartCheckout.gql'
|
|
7
7
|
|
|
8
8
|
export type CartStartCheckoutProps = CartStartCheckoutFragment & {
|
|
9
9
|
children?: React.ReactNode
|
|
10
10
|
sx?: SxProps<Theme>
|
|
11
|
+
buttonProps?: ButtonProps<'button'>
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
const name = 'CartStartCheckout' as const
|
|
@@ -20,7 +21,7 @@ const parts = [
|
|
|
20
21
|
const { classes } = extendableComponent(name, parts)
|
|
21
22
|
|
|
22
23
|
export function CartStartCheckout(props: CartStartCheckoutProps) {
|
|
23
|
-
const { prices, children, sx = [] } = props
|
|
24
|
+
const { prices, children, sx = [], buttonProps } = props
|
|
24
25
|
|
|
25
26
|
const hasTotals = (prices?.grand_total?.value ?? 0) > 0
|
|
26
27
|
return (
|
|
@@ -29,8 +30,7 @@ export function CartStartCheckout(props: CartStartCheckoutProps) {
|
|
|
29
30
|
sx={[
|
|
30
31
|
(theme) => ({
|
|
31
32
|
textAlign: 'center',
|
|
32
|
-
|
|
33
|
-
marginBottom: theme.spacings.md,
|
|
33
|
+
my: theme.spacings.md,
|
|
34
34
|
}),
|
|
35
35
|
...(Array.isArray(sx) ? sx : [sx]),
|
|
36
36
|
]}
|
|
@@ -43,7 +43,8 @@ export function CartStartCheckout(props: CartStartCheckoutProps) {
|
|
|
43
43
|
size='large'
|
|
44
44
|
className={classes.checkoutButton}
|
|
45
45
|
endIcon={<IconSvg src={iconChevronRight} />}
|
|
46
|
-
|
|
46
|
+
{...buttonProps}
|
|
47
|
+
disabled={!hasTotals || buttonProps?.disabled}
|
|
47
48
|
>
|
|
48
49
|
<Box
|
|
49
50
|
component='span'
|
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.8.
|
|
5
|
+
"version": "4.8.6",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
"@playwright/test": "^1.21.1"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@graphcommerce/ecommerce-ui": "1.5.
|
|
21
|
+
"@graphcommerce/ecommerce-ui": "1.5.2",
|
|
22
22
|
"@graphcommerce/framer-utils": "3.2.0",
|
|
23
|
-
"@graphcommerce/framer-next-pages": "3.3.
|
|
24
|
-
"@graphcommerce/framer-scroller": "2.1.
|
|
23
|
+
"@graphcommerce/framer-next-pages": "3.3.1",
|
|
24
|
+
"@graphcommerce/framer-scroller": "2.1.40",
|
|
25
25
|
"@graphcommerce/graphql": "3.4.8",
|
|
26
26
|
"@graphcommerce/image": "3.1.9",
|
|
27
|
-
"@graphcommerce/magento-customer": "4.11.
|
|
27
|
+
"@graphcommerce/magento-customer": "4.11.6",
|
|
28
28
|
"@graphcommerce/magento-graphql": "3.1.8",
|
|
29
|
-
"@graphcommerce/magento-store": "4.3.
|
|
30
|
-
"@graphcommerce/next-ui": "4.
|
|
29
|
+
"@graphcommerce/magento-store": "4.3.1",
|
|
30
|
+
"@graphcommerce/next-ui": "4.28.0",
|
|
31
31
|
"@graphcommerce/react-hook-form": "3.3.4"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|