@graphcommerce/magento-cart 4.6.5 → 4.6.8
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 +35 -0
- package/components/CartTotals/CartTotals.tsx +11 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.6.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`43822fd61`](https://github.com/graphcommerce-org/graphcommerce/commit/43822fd61c949215b8ddce9fb37d09f29b638426), [`3a619b70d`](https://github.com/graphcommerce-org/graphcommerce/commit/3a619b70d082804b8de46a8e8232f9431479a8b7), [`3a619b70d`](https://github.com/graphcommerce-org/graphcommerce/commit/3a619b70d082804b8de46a8e8232f9431479a8b7)]:
|
|
8
|
+
- @graphcommerce/next-ui@4.20.0
|
|
9
|
+
- @graphcommerce/magento-customer@4.9.4
|
|
10
|
+
- @graphcommerce/ecommerce-ui@1.1.11
|
|
11
|
+
- @graphcommerce/framer-scroller@2.1.31
|
|
12
|
+
- @graphcommerce/magento-store@4.2.26
|
|
13
|
+
|
|
14
|
+
## 4.6.7
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`b6d3a3c13`](https://github.com/graphcommerce-org/graphcommerce/commit/b6d3a3c13ea63ef0f691f497507f07c0e094de5b), [`1be392e42`](https://github.com/graphcommerce-org/graphcommerce/commit/1be392e42241d38b0ce1862e8ba184d2b5ec23c3)]:
|
|
19
|
+
- @graphcommerce/next-ui@4.19.0
|
|
20
|
+
- @graphcommerce/magento-customer@4.9.3
|
|
21
|
+
- @graphcommerce/ecommerce-ui@1.1.10
|
|
22
|
+
- @graphcommerce/framer-scroller@2.1.30
|
|
23
|
+
- @graphcommerce/magento-store@4.2.25
|
|
24
|
+
|
|
25
|
+
## 4.6.6
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6), [`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6)]:
|
|
30
|
+
- @graphcommerce/graphql@3.4.5
|
|
31
|
+
- @graphcommerce/next-ui@4.18.0
|
|
32
|
+
- @graphcommerce/ecommerce-ui@1.1.9
|
|
33
|
+
- @graphcommerce/magento-customer@4.9.2
|
|
34
|
+
- @graphcommerce/magento-graphql@3.1.5
|
|
35
|
+
- @graphcommerce/magento-store@4.2.24
|
|
36
|
+
- @graphcommerce/framer-scroller@2.1.29
|
|
37
|
+
|
|
3
38
|
## 4.6.5
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -3,6 +3,7 @@ import { AnimatedRow, extendableComponent, responsiveVal } from '@graphcommerce/
|
|
|
3
3
|
import { Trans } from '@lingui/react'
|
|
4
4
|
import { Box, Divider, lighten, SxProps, Theme } from '@mui/material'
|
|
5
5
|
import { AnimatePresence } from 'framer-motion'
|
|
6
|
+
import { useRouter } from 'next/router'
|
|
6
7
|
import { useCartQuery, useDisplayInclTax } from '../../hooks'
|
|
7
8
|
import { GetCartTotalsDocument } from './GetCartTotals.gql'
|
|
8
9
|
|
|
@@ -30,6 +31,8 @@ const { withState } = extendableComponent<OwnerProps, typeof name, typeof parts>
|
|
|
30
31
|
export function CartTotals(props: CartTotalsProps) {
|
|
31
32
|
const { data } = useCartQuery(GetCartTotalsDocument, { allowUrl: true })
|
|
32
33
|
const { containerMargin, sx = [] } = props
|
|
34
|
+
const { asPath } = useRouter()
|
|
35
|
+
const animateLayout = asPath === '/checkout/payment' ? undefined : true
|
|
33
36
|
|
|
34
37
|
const classes = withState({ containerMargin })
|
|
35
38
|
const inclTax = useDisplayInclTax()
|
|
@@ -48,6 +51,7 @@ export function CartTotals(props: CartTotalsProps) {
|
|
|
48
51
|
|
|
49
52
|
return (
|
|
50
53
|
<AnimatedRow
|
|
54
|
+
layout={animateLayout}
|
|
51
55
|
className={classes.root}
|
|
52
56
|
sx={[
|
|
53
57
|
(theme) => ({
|
|
@@ -69,6 +73,7 @@ export function CartTotals(props: CartTotalsProps) {
|
|
|
69
73
|
<AnimatePresence initial={false}>
|
|
70
74
|
{prices?.subtotal_including_tax && (
|
|
71
75
|
<AnimatedRow
|
|
76
|
+
layout={animateLayout}
|
|
72
77
|
className={classes.costsRow}
|
|
73
78
|
key='subtotal'
|
|
74
79
|
sx={{ display: 'flex', justifyContent: 'space-between', typography: 'subtitle1' }}
|
|
@@ -94,6 +99,7 @@ export function CartTotals(props: CartTotalsProps) {
|
|
|
94
99
|
|
|
95
100
|
return (
|
|
96
101
|
<AnimatedRow
|
|
102
|
+
layout={animateLayout}
|
|
97
103
|
key={discount?.label}
|
|
98
104
|
sx={{
|
|
99
105
|
display: 'flex',
|
|
@@ -111,6 +117,7 @@ export function CartTotals(props: CartTotalsProps) {
|
|
|
111
117
|
|
|
112
118
|
{shippingMethod && (
|
|
113
119
|
<AnimatedRow
|
|
120
|
+
layout={animateLayout}
|
|
114
121
|
className={classes.costsRow}
|
|
115
122
|
key='shippingMethod'
|
|
116
123
|
sx={{ display: 'flex', justifyContent: 'space-between', typography: 'subtitle1' }}
|
|
@@ -134,6 +141,7 @@ export function CartTotals(props: CartTotalsProps) {
|
|
|
134
141
|
{!inclTax &&
|
|
135
142
|
prices?.applied_taxes?.map((tax) => (
|
|
136
143
|
<AnimatedRow
|
|
144
|
+
layout={animateLayout}
|
|
137
145
|
className={classes.costsRow}
|
|
138
146
|
key={`excl${tax?.label}`}
|
|
139
147
|
sx={{ display: 'flex', justifyContent: 'space-between', typography: 'subtitle1' }}
|
|
@@ -145,12 +153,13 @@ export function CartTotals(props: CartTotalsProps) {
|
|
|
145
153
|
</AnimatedRow>
|
|
146
154
|
))}
|
|
147
155
|
|
|
148
|
-
<AnimatedRow key='divider'>
|
|
156
|
+
<AnimatedRow layout key='divider'>
|
|
149
157
|
<Divider className={classes.costsDivider} sx={{ margin: `1em 0` }} />
|
|
150
158
|
</AnimatedRow>
|
|
151
159
|
|
|
152
160
|
{prices?.grand_total && (
|
|
153
161
|
<AnimatedRow
|
|
162
|
+
layout={animateLayout}
|
|
154
163
|
className={`${classes.costsRow} ${classes.costsGrandTotal}`}
|
|
155
164
|
key='grand_total'
|
|
156
165
|
sx={(theme) => ({
|
|
@@ -172,6 +181,7 @@ export function CartTotals(props: CartTotalsProps) {
|
|
|
172
181
|
{inclTax &&
|
|
173
182
|
prices?.applied_taxes?.map((tax) => (
|
|
174
183
|
<AnimatedRow
|
|
184
|
+
layout={animateLayout}
|
|
175
185
|
className={`${classes.costsRow} ${classes.costsTax}`}
|
|
176
186
|
key={`incl${tax?.label}`}
|
|
177
187
|
sx={{
|
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.6.
|
|
5
|
+
"version": "4.6.8",
|
|
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.1.
|
|
21
|
+
"@graphcommerce/ecommerce-ui": "1.1.11",
|
|
22
22
|
"@graphcommerce/framer-utils": "3.1.4",
|
|
23
23
|
"@graphcommerce/framer-next-pages": "3.2.4",
|
|
24
|
-
"@graphcommerce/framer-scroller": "2.1.
|
|
25
|
-
"@graphcommerce/graphql": "3.4.
|
|
24
|
+
"@graphcommerce/framer-scroller": "2.1.31",
|
|
25
|
+
"@graphcommerce/graphql": "3.4.5",
|
|
26
26
|
"@graphcommerce/image": "3.1.7",
|
|
27
|
-
"@graphcommerce/magento-customer": "4.9.
|
|
28
|
-
"@graphcommerce/magento-graphql": "3.1.
|
|
29
|
-
"@graphcommerce/magento-store": "4.2.
|
|
30
|
-
"@graphcommerce/next-ui": "4.
|
|
27
|
+
"@graphcommerce/magento-customer": "4.9.4",
|
|
28
|
+
"@graphcommerce/magento-graphql": "3.1.5",
|
|
29
|
+
"@graphcommerce/magento-store": "4.2.26",
|
|
30
|
+
"@graphcommerce/next-ui": "4.20.0",
|
|
31
31
|
"@graphcommerce/react-hook-form": "3.3.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|