@graphcommerce/magento-cart 4.7.0 → 4.7.3

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,35 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`396b5de5d`](https://github.com/graphcommerce-org/graphcommerce/commit/396b5de5d50c7b8f59bf636807e7a4b50f14e0b2)]:
8
+ - @graphcommerce/graphql@3.4.8
9
+ - @graphcommerce/magento-graphql@3.1.8
10
+ - @graphcommerce/ecommerce-ui@1.2.2
11
+ - @graphcommerce/magento-customer@4.10.3
12
+ - @graphcommerce/magento-store@4.2.31
13
+
14
+ ## 4.7.2
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`755d2cf83`](https://github.com/graphcommerce-org/graphcommerce/commit/755d2cf83343a5ad3d61063eff595d821de360aa), [`dc7f2dda4`](https://github.com/graphcommerce-org/graphcommerce/commit/dc7f2dda40ff8572fc11161de6eb62ca13e720dd)]:
19
+ - @graphcommerce/next-ui@4.23.0
20
+ - @graphcommerce/ecommerce-ui@1.2.1
21
+ - @graphcommerce/framer-scroller@2.1.34
22
+ - @graphcommerce/magento-customer@4.10.2
23
+ - @graphcommerce/magento-store@4.2.30
24
+
25
+ ## 4.7.1
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies []:
30
+ - @graphcommerce/magento-customer@4.10.1
31
+ - @graphcommerce/magento-store@4.2.29
32
+
3
33
  ## 4.7.0
4
34
 
5
35
  ### Minor Changes
@@ -2,10 +2,6 @@ import {
2
2
  ApolloCustomerErrorSnackbar,
3
3
  ApolloCustomerErrorSnackbarProps,
4
4
  } from '@graphcommerce/magento-customer'
5
- import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
6
- import { Trans } from '@lingui/react'
7
- import { Button } from '@mui/material'
8
- import { useClearCurrentCartId } from '../../hooks/useClearCurrentCartId'
9
5
 
10
6
  export type ApolloCartErrorSnackbarProps = ApolloCustomerErrorSnackbarProps
11
7
 
@@ -14,9 +14,11 @@ export function CartDebugger() {
14
14
  onClick={() => {
15
15
  const currentCardId = client.readQuery({ query: CurrentCartIdDocument })
16
16
  if (!currentCardId?.currentCartId) {
17
+ // eslint-disable-next-line no-console
17
18
  console.log('No customerToken available, nothing to break')
18
19
  } else {
19
- console.log(`Changing current token to a random one)`)
20
+ // eslint-disable-next-line no-console
21
+ console.log(`Changing current token to a random one`)
20
22
 
21
23
  client.writeQuery({
22
24
  query: CurrentCartIdDocument,
@@ -8,7 +8,7 @@ import {
8
8
  useFabSize,
9
9
  } from '@graphcommerce/next-ui'
10
10
  import { i18n } from '@lingui/core'
11
- import { alpha, Fab, FabProps, NoSsr, styled, useTheme, Box, SxProps, Theme } from '@mui/material'
11
+ import { alpha, Fab, FabProps, styled, useTheme, Box, SxProps, Theme } from '@mui/material'
12
12
  import { m, useTransform } from 'framer-motion'
13
13
  import PageLink from 'next/link'
14
14
  import React from 'react'
@@ -68,12 +68,7 @@ export function CartItemSummary(props: OrderSummaryProps) {
68
68
  // }
69
69
  variantLeft='h6'
70
70
  >
71
- <Box
72
- className={classes.imageScrollerContainer}
73
- sx={(theme) => ({
74
- position: 'relative',
75
- })}
76
- >
71
+ <Box className={classes.imageScrollerContainer} sx={{ position: 'relative' }}>
77
72
  <ScrollerProvider scrollSnapAlign='start'>
78
73
  <ScrollerButton
79
74
  direction='left'
@@ -138,12 +133,7 @@ export function CartItemSummary(props: OrderSummaryProps) {
138
133
  margin: `${theme.spacings.xs} 0 ${theme.spacings.xs} 0`,
139
134
  })}
140
135
  />
141
- <CartTotals
142
- sx={(theme) => ({
143
- background: 'none',
144
- padding: 0,
145
- })}
146
- />
136
+ <CartTotals sx={{ background: 'none', padding: 0 }} />
147
137
  </SectionContainer>
148
138
  </Box>
149
139
  )
@@ -2,7 +2,6 @@ import { Money } from '@graphcommerce/magento-store'
2
2
  import { extendableComponent, breakpointVal } from '@graphcommerce/next-ui'
3
3
  import { Trans } from '@lingui/react'
4
4
  import { Box, Divider, lighten, SxProps, Theme } from '@mui/material'
5
- import { useRouter } from 'next/router'
6
5
  import { useCartQuery, useDisplayInclTax } from '../../hooks'
7
6
  import { GetCartTotalsDocument } from './GetCartTotals.gql'
8
7
 
@@ -30,8 +29,6 @@ const { withState } = extendableComponent<OwnerProps, typeof name, typeof parts>
30
29
  export function CartTotals(props: CartTotalsProps) {
31
30
  const { data } = useCartQuery(GetCartTotalsDocument, { allowUrl: true })
32
31
  const { containerMargin, sx = [] } = props
33
- const { asPath } = useRouter()
34
- const animateLayout = asPath === '/checkout/payment' ? undefined : true
35
32
 
36
33
  const classes = withState({ containerMargin })
37
34
  const inclTax = useDisplayInclTax()
@@ -1,16 +1,13 @@
1
1
  import {
2
2
  ApolloClient,
3
- FetchResult,
4
3
  fromPromise,
5
- InMemoryCache,
6
4
  NormalizedCacheObject,
7
5
  onError,
8
6
  Operation,
9
7
  } from '@graphcommerce/graphql'
10
8
  import { RefObject } from 'react'
11
- import { useAssignCurrentCartId, writeCartId } from '../hooks'
9
+ import { writeCartId } from '../hooks'
12
10
  import { CreateEmptyCartDocument } from '../hooks/CreateEmptyCart.gql'
13
- import { CurrentCartIdDocument } from '../hooks/CurrentCartId.gql'
14
11
 
15
12
  type CartOperation = Operation & { variables: { cartId: string } }
16
13
  function isCartOperation(operation: Operation): operation is CartOperation {
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.7.0",
5
+ "version": "4.7.3",
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.2.0",
21
+ "@graphcommerce/ecommerce-ui": "1.2.2",
22
22
  "@graphcommerce/framer-utils": "3.2.0",
23
23
  "@graphcommerce/framer-next-pages": "3.3.0",
24
- "@graphcommerce/framer-scroller": "2.1.33",
25
- "@graphcommerce/graphql": "3.4.7",
24
+ "@graphcommerce/framer-scroller": "2.1.34",
25
+ "@graphcommerce/graphql": "3.4.8",
26
26
  "@graphcommerce/image": "3.1.9",
27
- "@graphcommerce/magento-customer": "4.10.0",
28
- "@graphcommerce/magento-graphql": "3.1.7",
29
- "@graphcommerce/magento-store": "4.2.28",
30
- "@graphcommerce/next-ui": "4.22.0",
27
+ "@graphcommerce/magento-customer": "4.10.3",
28
+ "@graphcommerce/magento-graphql": "3.1.8",
29
+ "@graphcommerce/magento-store": "4.2.31",
30
+ "@graphcommerce/next-ui": "4.23.0",
31
31
  "@graphcommerce/react-hook-form": "3.3.2"
32
32
  },
33
33
  "peerDependencies": {