@graphcommerce/magento-wishlist 5.2.0-canary.2 → 5.2.0-canary.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,7 @@
1
1
  # @graphcommerce/magento-wishlist
2
2
 
3
+ ## 5.2.0-canary.3
4
+
3
5
  ## 5.2.0-canary.2
4
6
 
5
7
  ## 5.2.0-canary.1
@@ -17,7 +17,6 @@ import {
17
17
  import { i18n } from '@lingui/core'
18
18
  import { Trans } from '@lingui/react'
19
19
  import { SxProps, Theme, IconButton, Box, IconButtonProps } from '@mui/material'
20
- import PageLink from 'next/link'
21
20
  import { useState, useEffect } from 'react'
22
21
  import { useWishlistEnabled } from '../../hooks'
23
22
  import { AddProductToWishlistDocument } from '../../queries/AddProductToWishlist.gql'
@@ -210,17 +209,16 @@ export function ProductWishlistChipBase(props: ProductWishlistChipProps) {
210
209
  onClose={() => setDisplayMessageBar(false)}
211
210
  variant='pill'
212
211
  action={
213
- <PageLink href='/wishlist' passHref>
214
- <Button
215
- id='view-wishlist-button'
216
- size='medium'
217
- variant='pill'
218
- color='secondary'
219
- endIcon={<IconSvg src={iconChevronRight} />}
220
- >
221
- <Trans id='View wishlist' />
222
- </Button>
223
- </PageLink>
212
+ <Button
213
+ href='/wishlist'
214
+ id='view-wishlist-button'
215
+ size='medium'
216
+ variant='pill'
217
+ color='secondary'
218
+ endIcon={<IconSvg src={iconChevronRight} />}
219
+ >
220
+ <Trans id='View wishlist' />
221
+ </Button>
224
222
  }
225
223
  >
226
224
  <Trans
@@ -6,7 +6,6 @@ import {
6
6
  import { iconHeart, DesktopHeaderBadge, IconSvg, extendableComponent } from '@graphcommerce/next-ui'
7
7
  import { i18n } from '@lingui/core'
8
8
  import { Fab, FabProps as FabPropsType, NoSsr, SxProps, Theme } from '@mui/material'
9
- import PageLink from 'next/link'
10
9
  import React from 'react'
11
10
  import { useWishlistEnabled } from '../../hooks'
12
11
  import { GetIsInWishlistsDocument } from '../../queries/GetIsInWishlists.gql'
@@ -31,27 +30,26 @@ function WishlistFabContent(props: WishlistFabContentProps) {
31
30
  const wishlistIcon = icon ?? <IconSvg src={iconHeart} size='large' />
32
31
 
33
32
  return (
34
- <PageLink href='/wishlist' passHref>
35
- <Fab
36
- color='inherit'
37
- data-test-id='wishlist-fab'
38
- aria-label={i18n._(/* i18n */ 'Wishlist')}
39
- size='large'
40
- className={classes.root}
41
- {...FabProps}
42
- sx={sx}
43
- >
44
- <NoSsr fallback={wishlistIcon}>
45
- {activeWishlist ? (
46
- <DesktopHeaderBadge color='primary' variant='dot' overlap='circular'>
47
- {wishlistIcon}
48
- </DesktopHeaderBadge>
49
- ) : (
50
- wishlistIcon
51
- )}
52
- </NoSsr>
53
- </Fab>
54
- </PageLink>
33
+ <Fab
34
+ href='/wishlist'
35
+ color='inherit'
36
+ data-test-id='wishlist-fab'
37
+ aria-label={i18n._(/* i18n */ 'Wishlist')}
38
+ size='large'
39
+ className={classes.root}
40
+ {...FabProps}
41
+ sx={sx}
42
+ >
43
+ <NoSsr fallback={wishlistIcon}>
44
+ {activeWishlist ? (
45
+ <DesktopHeaderBadge color='primary' variant='dot' overlap='circular'>
46
+ {wishlistIcon}
47
+ </DesktopHeaderBadge>
48
+ ) : (
49
+ wishlistIcon
50
+ )}
51
+ </NoSsr>
52
+ </Fab>
55
53
  )
56
54
  }
57
55
 
@@ -15,7 +15,6 @@ import {
15
15
  } from '@graphcommerce/next-ui'
16
16
  import { Trans } from '@lingui/react'
17
17
  import { ButtonProps, Box, Alert } from '@mui/material'
18
- import PageLink from 'next/link'
19
18
  import React from 'react'
20
19
 
21
20
  const { classes, selectors } = extendableComponent('ProductAddToCart', [
@@ -109,17 +108,16 @@ export function ProductAddToCart(
109
108
  variant='pill'
110
109
  autoHide
111
110
  action={
112
- <PageLink href='/cart' passHref>
113
- <Button
114
- id='view-shopping-cart-button'
115
- size='medium'
116
- variant='pill'
117
- color='secondary'
118
- endIcon={<IconSvg src={iconChevronRight} />}
119
- >
120
- <Trans id='View shopping cart' />
121
- </Button>
122
- </PageLink>
111
+ <Button
112
+ href='/cart'
113
+ id='view-shopping-cart-button'
114
+ size='medium'
115
+ variant='pill'
116
+ color='secondary'
117
+ endIcon={<IconSvg src={iconChevronRight} />}
118
+ >
119
+ <Trans id='View shopping cart' />
120
+ </Button>
123
121
  }
124
122
  >
125
123
  <Trans
@@ -9,7 +9,6 @@ import { Badge, Box, Link, SxProps, Theme, Typography } from '@mui/material'
9
9
  import IconButton from '@mui/material/IconButton'
10
10
  import Menu from '@mui/material/Menu'
11
11
  import MenuItem from '@mui/material/MenuItem'
12
- import PageLink from 'next/link'
13
12
  import { useState } from 'react'
14
13
  import { GetIsInWishlistsDocument } from '../../queries/GetIsInWishlists.gql'
15
14
  import { RemoveProductFromWishlistDocument } from '../../queries/RemoveProductFromWishlist.gql'
@@ -176,56 +175,54 @@ export function WishlistItemBase(props: WishlistItemBaseProps) {
176
175
  alignSelf: 'flex-start',
177
176
  })}
178
177
  >
179
- <PageLink href={productLink} passHref>
180
- <Box
181
- component='a'
182
- className={classes.productLink}
183
- sx={{ display: 'block', width: '100%', overflow: 'hidden' }}
184
- >
185
- {small_image?.url && (
186
- <Image
187
- src={small_image.url ?? ''}
188
- layout='fill'
189
- alt={small_image.label ?? name ?? ''}
190
- sizes={responsiveVal(70, 125)}
191
- className={classes.image}
192
- sx={(theme) => ({
193
- gridColumn: 1,
194
- backgroundColor: theme.palette.background.image,
195
- objectFit: 'cover',
196
- display: 'block',
197
- width: '110% !important',
198
- height: '110% !important',
199
- marginLeft: '-5%',
200
- marginTop: '-5%',
201
- })}
202
- />
203
- )}
204
- </Box>
205
- </PageLink>
178
+ <Box
179
+ href={productLink}
180
+ component='a'
181
+ className={classes.productLink}
182
+ sx={{ display: 'block', width: '100%', overflow: 'hidden' }}
183
+ >
184
+ {small_image?.url && (
185
+ <Image
186
+ src={small_image.url ?? ''}
187
+ layout='fill'
188
+ alt={small_image.label ?? name ?? ''}
189
+ sizes={responsiveVal(70, 125)}
190
+ className={classes.image}
191
+ sx={(theme) => ({
192
+ gridColumn: 1,
193
+ backgroundColor: theme.palette.background.image,
194
+ objectFit: 'cover',
195
+ display: 'block',
196
+ width: '110% !important',
197
+ height: '110% !important',
198
+ marginLeft: '-5%',
199
+ marginTop: '-5%',
200
+ })}
201
+ />
202
+ )}
203
+ </Box>
206
204
  </Badge>
207
205
 
208
- <PageLink href={productLink} passHref>
209
- <Link
210
- variant='body1'
211
- className={classes.itemName}
212
- underline='hover'
213
- sx={(theme) => ({
214
- typgrapht: 'subtitle1',
215
- fontWeight: theme.typography.fontWeightBold,
216
- gridArea: 'itemName',
217
- color: theme.palette.text.primary,
218
- textDecoration: 'none',
219
- flexWrap: 'nowrap',
220
- maxWidth: 'max-content',
221
- '&:not(.withOptions)': {
222
- alignSelf: 'flex-start',
223
- },
224
- })}
225
- >
226
- {name}
227
- </Link>
228
- </PageLink>
206
+ <Link
207
+ href={productLink}
208
+ variant='body1'
209
+ className={classes.itemName}
210
+ underline='hover'
211
+ sx={(theme) => ({
212
+ typgrapht: 'subtitle1',
213
+ fontWeight: theme.typography.fontWeightBold,
214
+ gridArea: 'itemName',
215
+ color: theme.palette.text.primary,
216
+ textDecoration: 'none',
217
+ flexWrap: 'nowrap',
218
+ maxWidth: 'max-content',
219
+ '&:not(.withOptions)': {
220
+ alignSelf: 'flex-start',
221
+ },
222
+ })}
223
+ >
224
+ {name}
225
+ </Link>
229
226
 
230
227
  <Typography
231
228
  component='div'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-wishlist",
3
- "version": "5.2.0-canary.2",
3
+ "version": "5.2.0-canary.3",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -13,27 +13,27 @@
13
13
  }
14
14
  },
15
15
  "devDependencies": {
16
- "@graphcommerce/eslint-config-pwa": "5.2.0-canary.2",
17
- "@graphcommerce/prettier-config-pwa": "5.2.0-canary.2",
18
- "@graphcommerce/typescript-config-pwa": "5.2.0-canary.2"
16
+ "@graphcommerce/eslint-config-pwa": "5.2.0-canary.3",
17
+ "@graphcommerce/prettier-config-pwa": "5.2.0-canary.3",
18
+ "@graphcommerce/typescript-config-pwa": "5.2.0-canary.3"
19
19
  },
20
20
  "dependencies": {
21
- "@graphcommerce/graphql": "5.2.0-canary.2",
22
- "@graphcommerce/graphql-mesh": "5.2.0-canary.2",
23
- "@graphcommerce/image": "5.2.0-canary.2",
24
- "@graphcommerce/magento-cart": "5.2.0-canary.2",
25
- "@graphcommerce/magento-customer": "5.2.0-canary.2",
26
- "@graphcommerce/magento-product": "5.2.0-canary.2",
27
- "@graphcommerce/magento-product-configurable": "5.2.0-canary.2",
28
- "@graphcommerce/magento-store": "5.2.0-canary.2",
29
- "@graphcommerce/next-ui": "5.2.0-canary.2"
21
+ "@graphcommerce/graphql": "5.2.0-canary.3",
22
+ "@graphcommerce/graphql-mesh": "5.2.0-canary.3",
23
+ "@graphcommerce/image": "5.2.0-canary.3",
24
+ "@graphcommerce/magento-cart": "5.2.0-canary.3",
25
+ "@graphcommerce/magento-customer": "5.2.0-canary.3",
26
+ "@graphcommerce/magento-product": "5.2.0-canary.3",
27
+ "@graphcommerce/magento-product-configurable": "5.2.0-canary.3",
28
+ "@graphcommerce/magento-store": "5.2.0-canary.3",
29
+ "@graphcommerce/next-ui": "5.2.0-canary.3"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@lingui/react": "^3.13.2",
33
33
  "@lingui/core": "^3.13.2",
34
34
  "@mui/material": "^5.10.16",
35
35
  "framer-motion": "^7.0.0",
36
- "next": "^12.1.2",
36
+ "next": "^13.1.1",
37
37
  "react": "^18.2.0",
38
38
  "react-dom": "^18.2.0"
39
39
  }