@graphcommerce/magento-cart 9.0.4-canary.9 → 9.0.4
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 +7 -17
- package/components/ApolloCartError/ApolloCartErrorFullPage.tsx +1 -1
- package/components/CartAgreementsForm/CartAgreementsForm.tsx +1 -2
- package/components/CartFab/CartFab.tsx +2 -2
- package/components/CartItemSummary/CartItemSummary.tsx +1 -1
- package/components/CartStartCheckout/CartStartCheckout.tsx +2 -2
- package/components/CartStartCheckout/CartStartCheckoutLinkOrButton.tsx +2 -2
- package/components/CartSummary/CartSummary.tsx +2 -2
- package/components/EmptyCart/EmptyCart.tsx +1 -1
- package/components/InlineAccount/InlineAccount.tsx +1 -1
- package/hooks/useClearCurrentCartId.ts +1 -3
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 9.0.4
|
|
3
|
+
## 9.0.4
|
|
4
4
|
|
|
5
|
-
## 9.0.
|
|
5
|
+
## 9.0.3
|
|
6
6
|
|
|
7
|
-
## 9.0.
|
|
7
|
+
## 9.0.3-canary.0
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- [#2479](https://github.com/graphcommerce-org/graphcommerce/pull/2479) [`ae5e72c`](https://github.com/graphcommerce-org/graphcommerce/commit/ae5e72ccf1c8218ace3cca1c4e52ec8d46821a27) - Solve issue where the total of the cart was zero due to discount or store credit the user couldn't proceed to the checkout. We now check for items and errors instead of the total. ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
12
|
-
|
|
13
|
-
## 9.0.4-canary.6
|
|
14
|
-
|
|
15
|
-
## 9.0.4-canary.5
|
|
16
|
-
|
|
17
|
-
## 9.0.4-canary.4
|
|
18
|
-
|
|
19
|
-
## 9.0.4-canary.3
|
|
9
|
+
## 9.0.2
|
|
20
10
|
|
|
21
|
-
## 9.0.
|
|
11
|
+
## 9.0.2-canary.0
|
|
22
12
|
|
|
23
|
-
## 9.0.
|
|
13
|
+
## 9.0.1
|
|
24
14
|
|
|
25
|
-
## 9.0.
|
|
15
|
+
## 9.0.1-canary.1
|
|
26
16
|
|
|
27
17
|
## 9.0.0
|
|
28
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApolloCustomerErrorFullPageProps } from '@graphcommerce/magento-customer'
|
|
2
2
|
import { ApolloCustomerErrorFullPage } from '@graphcommerce/magento-customer'
|
|
3
|
-
import {
|
|
3
|
+
import { IconSvg, iconShoppingBag } from '@graphcommerce/next-ui'
|
|
4
4
|
|
|
5
5
|
export type ApolloCartErrorFullPageProps = Omit<ApolloCustomerErrorFullPageProps, 'icon'>
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CheckboxElement } from '@graphcommerce/ecommerce-ui'
|
|
2
2
|
import { useQuery } from '@graphcommerce/graphql'
|
|
3
|
-
import {
|
|
3
|
+
import { FormDiv, extendableComponent } from '@graphcommerce/next-ui'
|
|
4
4
|
import type { UseFormComposeOptions } from '@graphcommerce/react-hook-form'
|
|
5
5
|
import { FormPersist, useForm, useFormCompose } from '@graphcommerce/react-hook-form'
|
|
6
6
|
import { i18n } from '@lingui/core'
|
|
@@ -17,7 +17,6 @@ const { classes } = extendableComponent(componentName, parts)
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Checks if a string contains an anchor tag (<a> ... </a>).
|
|
20
|
-
*
|
|
21
20
|
* @param {string} str - The string to check.
|
|
22
21
|
* @returns {boolean} - True if the string contains an anchor tag, otherwise false.
|
|
23
22
|
*/
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { WaitForQueries } from '@graphcommerce/ecommerce-ui'
|
|
2
2
|
import {
|
|
3
3
|
DesktopHeaderBadge,
|
|
4
|
+
IconSvg,
|
|
4
5
|
extendableComponent,
|
|
5
6
|
iconShoppingBag,
|
|
6
|
-
IconSvg,
|
|
7
7
|
useFabSize,
|
|
8
8
|
useScrollY,
|
|
9
9
|
} from '@graphcommerce/next-ui'
|
|
10
10
|
import { i18n } from '@lingui/core'
|
|
11
11
|
import type { BadgeProps, FabProps, SxProps, Theme } from '@mui/material'
|
|
12
|
-
import {
|
|
12
|
+
import { Box, Fab, alpha, styled, useTheme } from '@mui/material'
|
|
13
13
|
import { m, useTransform } from 'framer-motion'
|
|
14
14
|
import React from 'react'
|
|
15
15
|
import { useCartEnabled, useCartShouldLoginToContinue } from '../../hooks'
|
|
@@ -3,10 +3,10 @@ import { CartItemActionCard } from '@graphcommerce/magento-cart-items'
|
|
|
3
3
|
import type { ActionCardLayoutProps } from '@graphcommerce/next-ui'
|
|
4
4
|
import {
|
|
5
5
|
ActionCardLayout,
|
|
6
|
+
SectionContainer,
|
|
6
7
|
breakpointVal,
|
|
7
8
|
extendableComponent,
|
|
8
9
|
nonNullable,
|
|
9
|
-
SectionContainer,
|
|
10
10
|
} from '@graphcommerce/next-ui'
|
|
11
11
|
import { Trans } from '@lingui/react'
|
|
12
12
|
import type { SxProps, Theme } from '@mui/material'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Money } from '@graphcommerce/magento-store'
|
|
2
|
-
import { extendableComponent, iconChevronRight
|
|
2
|
+
import { IconSvg, extendableComponent, iconChevronRight } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/macro'
|
|
4
4
|
import type { ButtonProps, SxProps, Theme } from '@mui/material'
|
|
5
5
|
import { Box, Button, Link } from '@mui/material'
|
|
@@ -40,7 +40,7 @@ export function CartStartCheckout(props: CartStartCheckoutProps) {
|
|
|
40
40
|
} = props
|
|
41
41
|
|
|
42
42
|
const shouldLoginToContinue = useCheckoutShouldLoginToContinue()
|
|
43
|
-
const hasTotals = (cart?.prices?.grand_total?.value ?? 0) > 0
|
|
43
|
+
const hasTotals = (cart?.prices?.grand_total?.value ?? 0) > 0
|
|
44
44
|
const hasErrors = cart?.items?.some((item) => (item?.errors?.length ?? 0) > 0)
|
|
45
45
|
|
|
46
46
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LinkOrButtonProps } from '@graphcommerce/next-ui'
|
|
2
|
-
import {
|
|
2
|
+
import { IconSvg, LinkOrButton, iconChevronRight } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react'
|
|
4
4
|
import type { SxProps, Theme } from '@mui/material'
|
|
5
5
|
import React from 'react'
|
|
@@ -28,7 +28,7 @@ export function CartStartCheckoutLinkOrButton(props: CartStartCheckoutLinkOrButt
|
|
|
28
28
|
|
|
29
29
|
const shouldLoginToContinue = useCheckoutShouldLoginToContinue()
|
|
30
30
|
|
|
31
|
-
const hasTotals = (cart?.prices?.grand_total?.value ?? 0) > 0
|
|
31
|
+
const hasTotals = (cart?.prices?.grand_total?.value ?? 0) > 0
|
|
32
32
|
const hasErrors = cart?.items?.some((item) => (item?.errors?.length ?? 0) > 0)
|
|
33
33
|
|
|
34
34
|
return (
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useHistoryLink } from '@graphcommerce/framer-next-pages'
|
|
2
|
-
import { breakpointVal, extendableComponent
|
|
2
|
+
import { SectionContainer, breakpointVal, extendableComponent } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react'
|
|
4
4
|
import type { SxProps, Theme } from '@mui/material'
|
|
5
|
-
import { Box,
|
|
5
|
+
import { Box, Link, Typography, lighten } from '@mui/material'
|
|
6
6
|
import React from 'react'
|
|
7
7
|
import { useCartQuery } from '../../hooks'
|
|
8
8
|
import { CartAddressMultiLine } from '../CartAddressMultiLine/CartAddressMultiLine'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FullPageMessageProps } from '@graphcommerce/next-ui'
|
|
2
|
-
import { FullPageMessage,
|
|
2
|
+
import { FullPageMessage, IconSvg, iconShoppingBag } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react'
|
|
4
4
|
import type { SxProps, Theme } from '@mui/material'
|
|
5
5
|
import { Button } from '@mui/material'
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
useCustomerSession,
|
|
6
6
|
useGuestQuery,
|
|
7
7
|
} from '@graphcommerce/magento-customer'
|
|
8
|
-
import { Button,
|
|
8
|
+
import { Button, FormRow, extendableComponent } from '@graphcommerce/next-ui'
|
|
9
9
|
import { Trans } from '@lingui/react'
|
|
10
10
|
import type { SxProps, Theme } from '@mui/material'
|
|
11
11
|
import { Box, TextField, Typography } from '@mui/material'
|
|
@@ -6,9 +6,7 @@ export function useClearCurrentCartId() {
|
|
|
6
6
|
const { cache } = useApolloClient()
|
|
7
7
|
|
|
8
8
|
return () => {
|
|
9
|
-
cache.evict({ fieldName: 'currentCartId' })
|
|
10
|
-
cache.evict({ fieldName: 'customerCart' })
|
|
11
|
-
cache.gc()
|
|
9
|
+
cache.evict({ fieldName: 'currentCartId', broadcast: true })
|
|
12
10
|
cookie(CART_ID_COOKIE, null)
|
|
13
11
|
}
|
|
14
12
|
}
|
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": "9.0.4
|
|
5
|
+
"version": "9.0.4",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/ecommerce-ui": "^9.0.4
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.4
|
|
17
|
-
"@graphcommerce/framer-next-pages": "^9.0.4
|
|
18
|
-
"@graphcommerce/framer-scroller": "^9.0.4
|
|
19
|
-
"@graphcommerce/framer-utils": "^9.0.4
|
|
20
|
-
"@graphcommerce/graphql": "^9.0.4
|
|
21
|
-
"@graphcommerce/image": "^9.0.4
|
|
22
|
-
"@graphcommerce/magento-customer": "^9.0.4
|
|
23
|
-
"@graphcommerce/magento-graphql": "^9.0.4
|
|
24
|
-
"@graphcommerce/magento-store": "^9.0.4
|
|
25
|
-
"@graphcommerce/next-ui": "^9.0.4
|
|
26
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.4
|
|
27
|
-
"@graphcommerce/react-hook-form": "^9.0.4
|
|
28
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.4
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^9.0.4",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.4",
|
|
17
|
+
"@graphcommerce/framer-next-pages": "^9.0.4",
|
|
18
|
+
"@graphcommerce/framer-scroller": "^9.0.4",
|
|
19
|
+
"@graphcommerce/framer-utils": "^9.0.4",
|
|
20
|
+
"@graphcommerce/graphql": "^9.0.4",
|
|
21
|
+
"@graphcommerce/image": "^9.0.4",
|
|
22
|
+
"@graphcommerce/magento-customer": "^9.0.4",
|
|
23
|
+
"@graphcommerce/magento-graphql": "^9.0.4",
|
|
24
|
+
"@graphcommerce/magento-store": "^9.0.4",
|
|
25
|
+
"@graphcommerce/next-ui": "^9.0.4",
|
|
26
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.4",
|
|
27
|
+
"@graphcommerce/react-hook-form": "^9.0.4",
|
|
28
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.4",
|
|
29
29
|
"@lingui/core": "^4.2.1",
|
|
30
30
|
"@lingui/macro": "^4.2.1",
|
|
31
31
|
"@lingui/react": "^4.2.1",
|