@graphcommerce/magento-product-configurable 9.1.0-canary.53 → 9.1.0-canary.55

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,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.55
4
+
5
+ ## 9.1.0-canary.54
6
+
7
+ ### Patch Changes
8
+
9
+ - [#2544](https://github.com/graphcommerce-org/graphcommerce/pull/2544) [`09a79c0`](https://github.com/graphcommerce-org/graphcommerce/commit/09a79c061c874dd9b5896d37edb2fc1031c7678c) - Solve issue whre Configurable Options would not respect the option position. ([@ThisIsRuddy](https://github.com/ThisIsRuddy))
10
+
3
11
  ## 9.1.0-canary.53
4
12
 
5
13
  ## 9.1.0-canary.52
@@ -65,21 +65,23 @@ export function ConfigurableProductOptions(props: ConfigurableProductOptionsProp
65
65
 
66
66
  return (
67
67
  <Box sx={(theme) => ({ display: 'grid', rowGap: theme.spacings.sm })}>
68
- {options.map((option, optionIndex) => (
69
- <ConfigurableProductOption
70
- {...option}
71
- key={option.uid}
72
- render={render}
73
- optionStartLabels={optionStartLabels}
74
- optionEndLabels={optionEndLabels}
75
- index={index}
76
- optionIndex={optionIndex}
77
- sx={sx}
78
- __typename={product.__typename}
79
- url_key={product.url_key}
80
- {...other}
81
- />
82
- ))}
68
+ {options
69
+ .sort((a, b) => (a?.position ?? 0) - (b?.position ?? 0))
70
+ .map((option, optionIndex) => (
71
+ <ConfigurableProductOption
72
+ {...option}
73
+ key={option.uid}
74
+ render={render}
75
+ optionStartLabels={optionStartLabels}
76
+ optionEndLabels={optionEndLabels}
77
+ index={index}
78
+ optionIndex={optionIndex}
79
+ sx={sx}
80
+ __typename={product.__typename}
81
+ url_key={product.url_key}
82
+ {...other}
83
+ />
84
+ ))}
83
85
  </Box>
84
86
  )
85
87
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-product-configurable",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.1.0-canary.53",
5
+ "version": "9.1.0-canary.55",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,23 +12,23 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^9.1.0-canary.53",
16
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.53",
17
- "@graphcommerce/graphql": "^9.1.0-canary.53",
18
- "@graphcommerce/graphql-mesh": "^9.1.0-canary.53",
19
- "@graphcommerce/image": "^9.1.0-canary.53",
20
- "@graphcommerce/lingui-next": "9.1.0-canary.53",
21
- "@graphcommerce/magento-cart": "^9.1.0-canary.53",
22
- "@graphcommerce/magento-cart-items": "^9.1.0-canary.53",
23
- "@graphcommerce/magento-category": "^9.1.0-canary.53",
24
- "@graphcommerce/magento-customer": "^9.1.0-canary.53",
25
- "@graphcommerce/magento-product": "^9.1.0-canary.53",
26
- "@graphcommerce/magento-product-simple": "^9.1.0-canary.53",
27
- "@graphcommerce/magento-store": "^9.1.0-canary.53",
28
- "@graphcommerce/next-ui": "^9.1.0-canary.53",
29
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.53",
30
- "@graphcommerce/react-hook-form": "^9.1.0-canary.53",
31
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.53",
15
+ "@graphcommerce/ecommerce-ui": "^9.1.0-canary.55",
16
+ "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.55",
17
+ "@graphcommerce/graphql": "^9.1.0-canary.55",
18
+ "@graphcommerce/graphql-mesh": "^9.1.0-canary.55",
19
+ "@graphcommerce/image": "^9.1.0-canary.55",
20
+ "@graphcommerce/lingui-next": "9.1.0-canary.55",
21
+ "@graphcommerce/magento-cart": "^9.1.0-canary.55",
22
+ "@graphcommerce/magento-cart-items": "^9.1.0-canary.55",
23
+ "@graphcommerce/magento-category": "^9.1.0-canary.55",
24
+ "@graphcommerce/magento-customer": "^9.1.0-canary.55",
25
+ "@graphcommerce/magento-product": "^9.1.0-canary.55",
26
+ "@graphcommerce/magento-product-simple": "^9.1.0-canary.55",
27
+ "@graphcommerce/magento-store": "^9.1.0-canary.55",
28
+ "@graphcommerce/next-ui": "^9.1.0-canary.55",
29
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.55",
30
+ "@graphcommerce/react-hook-form": "^9.1.0-canary.55",
31
+ "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.55",
32
32
  "@lingui/core": "^4.2.1",
33
33
  "@lingui/macro": "^4.2.1",
34
34
  "@lingui/react": "^4.2.1",