@graphcommerce/magento-product 4.1.11 → 4.2.0

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.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1416](https://github.com/graphcommerce-org/graphcommerce/pull/1416) [`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - SEO audit
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04)]:
12
+ - @graphcommerce/magento-store@4.2.0
13
+ - @graphcommerce/next-ui@4.7.0
14
+ - @graphcommerce/magento-cart@4.2.10
15
+ - @graphcommerce/framer-scroller@2.1.8
16
+
3
17
  ## 4.1.11
4
18
 
5
19
  ### Patch Changes
@@ -43,7 +43,10 @@ type BaseProps = PropsWithChildren<
43
43
  Pick<ImageProps, 'loading' | 'sizes' | 'dontReportWronglySizedImages'>
44
44
  >
45
45
 
46
- export type ProductListItemProps = BaseProps & { sx?: SxProps<Theme> }
46
+ export type ProductListItemProps = BaseProps & {
47
+ sx?: SxProps<Theme>
48
+ titleComponent?: React.ElementType
49
+ }
47
50
 
48
51
  const StyledImage = styled(Image)({})
49
52
 
@@ -63,6 +66,7 @@ export function ProductListItem(props: ProductListItemProps) {
63
66
  sizes,
64
67
  dontReportWronglySizedImages,
65
68
  aspectRatio = [4, 3],
69
+ titleComponent = 'h2',
66
70
  sx = [],
67
71
  } = props
68
72
 
@@ -218,7 +222,7 @@ export function ProductListItem(props: ProductListItemProps) {
218
222
  })}
219
223
  >
220
224
  <Typography
221
- component='h2'
225
+ component={titleComponent}
222
226
  variant='subtitle1'
223
227
  sx={{
224
228
  display: 'inline',
@@ -12,11 +12,12 @@ export type ProductItemsGridProps = {
12
12
  renderers: ProductListItemRenderer
13
13
  loadingEager?: number
14
14
  size?: 'normal' | 'small'
15
+ titleComponent?: React.ElementType
15
16
  sx?: BoxProps['sx']
16
17
  }
17
18
 
18
19
  export function ProductListItemsBase(props: ProductItemsGridProps) {
19
- const { items, sx = [], renderers, loadingEager = 0, size = 'normal' } = props
20
+ const { items, sx = [], renderers, loadingEager = 0, size = 'normal', titleComponent } = props
20
21
 
21
22
  return (
22
23
  <Box
@@ -47,6 +48,7 @@ export function ProductListItemsBase(props: ProductItemsGridProps) {
47
48
  ? { 0: '100vw', 354: '50vw', 675: '30vw', 1255: '23vw', 1500: '337px' }
48
49
  : { 0: '100vw', 367: '48vw', 994: '30vw', 1590: '23vw', 1920: '443px' }
49
50
  }
51
+ titleComponent={titleComponent}
50
52
  noReport
51
53
  />
52
54
  ) : null,
@@ -13,5 +13,5 @@ export function productPageCategory(product?: ProductPageCategoryFragment | null
13
13
  const carryL = carry?.url_path?.split('/')?.length ?? 0
14
14
  const valueL = value?.url_path?.split('/')?.length ?? 0
15
15
  return carryL >= valueL ? carry : value
16
- })
16
+ }, null)
17
17
  }
@@ -27,7 +27,7 @@ export function ProductPageDescription(props: ProductPageDescriptionProps) {
27
27
  className={classes.root}
28
28
  sx={sx}
29
29
  top={
30
- <Typography variant='h1' component='h2'>
30
+ <Typography variant='h1' component='h1'>
31
31
  {name}
32
32
  </Typography>
33
33
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-product",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "4.1.11",
5
+ "version": "4.2.0",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -19,13 +19,13 @@
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/framer-scroller": "2.1.7",
22
+ "@graphcommerce/framer-scroller": "2.1.8",
23
23
  "@graphcommerce/graphql": "3.1.1",
24
24
  "@graphcommerce/graphql-mesh": "4.1.2",
25
25
  "@graphcommerce/image": "3.1.5",
26
- "@graphcommerce/magento-cart": "4.2.9",
27
- "@graphcommerce/magento-store": "4.1.9",
28
- "@graphcommerce/next-ui": "4.6.2",
26
+ "@graphcommerce/magento-cart": "4.2.10",
27
+ "@graphcommerce/magento-store": "4.2.0",
28
+ "@graphcommerce/next-ui": "4.7.0",
29
29
  "schema-dts": "^1.1.0"
30
30
  },
31
31
  "peerDependencies": {