@graphcommerce/magento-product 4.8.0 → 4.8.2

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,31 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1686](https://github.com/graphcommerce-org/graphcommerce/pull/1686) [`1953c7e27`](https://github.com/graphcommerce-org/graphcommerce/commit/1953c7e27eb606a825fce1ad361393b3c781c6da) Thanks [@paales](https://github.com/paales)! - Product page markup and sticky product image when the sidebar is fairly large
8
+
9
+ - Updated dependencies [[`1953c7e27`](https://github.com/graphcommerce-org/graphcommerce/commit/1953c7e27eb606a825fce1ad361393b3c781c6da)]:
10
+ - @graphcommerce/next-ui@4.29.2
11
+ - @graphcommerce/ecommerce-ui@1.5.7
12
+ - @graphcommerce/framer-scroller@2.1.44
13
+ - @graphcommerce/magento-cart@4.9.3
14
+ - @graphcommerce/magento-store@4.3.5
15
+
16
+ ## 4.8.1
17
+
18
+ ### Patch Changes
19
+
20
+ - [#1684](https://github.com/graphcommerce-org/graphcommerce/pull/1684) [`aab6b4fa5`](https://github.com/graphcommerce-org/graphcommerce/commit/aab6b4fa5b4708003cfb5bf673a617dc5dbf3078) Thanks [@paales](https://github.com/paales)! - Make sure the images are sorted according to their position field
21
+
22
+ - Updated dependencies [[`ae28fb14c`](https://github.com/graphcommerce-org/graphcommerce/commit/ae28fb14cec298c52970260a4fc2c2551b5f175e), [`98d6a9cce`](https://github.com/graphcommerce-org/graphcommerce/commit/98d6a9cce1bb9514088be0af2736721b3edda467)]:
23
+ - @graphcommerce/magento-cart@4.9.2
24
+ - @graphcommerce/next-ui@4.29.1
25
+ - @graphcommerce/ecommerce-ui@1.5.6
26
+ - @graphcommerce/framer-scroller@2.1.43
27
+ - @graphcommerce/magento-store@4.3.4
28
+
3
29
  ## 4.8.0
4
30
 
5
31
  ### Minor Changes
@@ -14,6 +14,7 @@ export function AddProductsToCartQuantity(props: AddToCartQuantityProps) {
14
14
  <NumberFieldElement
15
15
  variant='outlined'
16
16
  size='small'
17
+ color='primary'
17
18
  {...props}
18
19
  required
19
20
  inputProps={{ min: 1 }}
@@ -26,6 +26,7 @@ const CustomizableAreaOption = React.memo<
26
26
  value={uid}
27
27
  />
28
28
  <TextFieldElement
29
+ color='primary'
29
30
  multiline
30
31
  minRows={3}
31
32
  control={control}
@@ -53,6 +54,7 @@ const CustomizableDropDownOption = React.memo<
53
54
  value={uid}
54
55
  />
55
56
  <SelectElement
57
+ color='primary'
56
58
  control={control}
57
59
  name={`cartItems.${index}.entered_options.${optionIndex}.value`}
58
60
  label={title}
@@ -1,4 +1,9 @@
1
- import { SidebarGallery, SidebarGalleryProps, TypeRenderer } from '@graphcommerce/next-ui'
1
+ import {
2
+ nonNullable,
3
+ SidebarGallery,
4
+ SidebarGalleryProps,
5
+ TypeRenderer,
6
+ } from '@graphcommerce/next-ui'
2
7
  import { PropsWithChildren } from 'react'
3
8
  import { ProductPageGalleryFragment } from './ProductPageGallery.gql'
4
9
 
@@ -23,14 +28,17 @@ export function ProductPageGallery(props: ProductPageGalleryProps) {
23
28
  sidebar={children}
24
29
  aspectRatio={[width, height]}
25
30
  images={
26
- media_gallery?.map((item) => {
27
- if (item?.__typename === 'ProductImage')
28
- return { src: item.url ?? '', alt: item.label || undefined, width, height }
29
- return {
30
- src: '',
31
- alt: `{${item?.__typename} not yet supported}`,
32
- }
33
- }) ?? []
31
+ media_gallery
32
+ ?.filter(nonNullable)
33
+ .sort((a, b) => (a.position ?? 0) - (b.position ?? 0))
34
+ .map((item) => {
35
+ if (item.__typename === 'ProductImage')
36
+ return { src: item.url ?? '', alt: item.label || undefined, width, height }
37
+ return {
38
+ src: '',
39
+ alt: `{${item.__typename} not yet supported}`,
40
+ }
41
+ }) ?? []
34
42
  }
35
43
  />
36
44
  )
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.8.0",
5
+ "version": "4.8.2",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -19,15 +19,15 @@
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/ecommerce-ui": "1.5.5",
23
- "@graphcommerce/framer-scroller": "2.1.42",
22
+ "@graphcommerce/ecommerce-ui": "1.5.7",
23
+ "@graphcommerce/framer-scroller": "2.1.44",
24
24
  "@graphcommerce/framer-next-pages": "3.3.2",
25
25
  "@graphcommerce/graphql": "3.5.0",
26
26
  "@graphcommerce/graphql-mesh": "4.2.0",
27
27
  "@graphcommerce/image": "3.1.10",
28
- "@graphcommerce/magento-cart": "4.9.1",
29
- "@graphcommerce/magento-store": "4.3.3",
30
- "@graphcommerce/next-ui": "4.29.0",
28
+ "@graphcommerce/magento-cart": "4.9.3",
29
+ "@graphcommerce/magento-store": "4.3.5",
30
+ "@graphcommerce/next-ui": "4.29.2",
31
31
  "schema-dts": "^1.1.0"
32
32
  },
33
33
  "peerDependencies": {