@graphcommerce/magento-product-configurable 8.0.6-canary.4 → 8.0.7
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 +25 -61
- package/ConfigurableProductAddToCart/ConfigurableProductAddToCart.tsx +4 -6
- package/components/ConfigurableProductOptions/ConfigurableProductOptions.tsx +3 -8
- package/graphql/GetConfigurableOptionsSelection.graphql +6 -1
- package/package.json +18 -18
- package/utils/defaultConfigurableOptionsSelection.ts +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,36 +1,14 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 8.0.
|
|
3
|
+
## 8.0.7
|
|
4
4
|
|
|
5
|
-
## 8.0.6
|
|
6
|
-
|
|
7
|
-
## 8.0.6-canary.2
|
|
8
|
-
|
|
9
|
-
### Patch Changes
|
|
10
|
-
|
|
11
|
-
- [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`0767bc4`](https://github.com/graphcommerce-org/graphcommerce/commit/0767bc40f7b596209f24ca4e745ff0441f3275c9) - Upgrade input components to no longer use muiRegister, which improves INP scores
|
|
12
|
-
([@FrankHarland](https://github.com/FrankHarland))
|
|
13
|
-
|
|
14
|
-
## 8.0.6-canary.1
|
|
15
|
-
|
|
16
|
-
### Patch Changes
|
|
17
|
-
|
|
18
|
-
- [#2213](https://github.com/graphcommerce-org/graphcommerce/pull/2213) [`a0d952e`](https://github.com/graphcommerce-org/graphcommerce/commit/a0d952e6b8a71a7451bfdb2bdb5150fc218169e2) - Moved product reviews to the relatedUpsells query so we do not pass the queryComplexity limit
|
|
19
|
-
([@paales](https://github.com/paales))
|
|
20
|
-
|
|
21
|
-
## 8.0.6-canary.0
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- [#2196](https://github.com/graphcommerce-org/graphcommerce/pull/2196) [`84c50e4`](https://github.com/graphcommerce-org/graphcommerce/commit/84c50e49a1a7f154d4a8f4045c37e773e20283ad) - Allow Lingui to use linguiLocale with country identifiers like `en-us`, it would always load `en` in this case. Introced a new `useLocale` hook to use the correct locale string to use in Intl methods.
|
|
26
|
-
([@paales](https://github.com/paales))
|
|
5
|
+
## 8.0.6
|
|
27
6
|
|
|
28
7
|
## 8.0.5
|
|
29
8
|
|
|
30
9
|
### Patch Changes
|
|
31
10
|
|
|
32
|
-
- [#2239](https://github.com/graphcommerce-org/graphcommerce/pull/2239) [`a2a6e78`](https://github.com/graphcommerce-org/graphcommerce/commit/a2a6e78291ab978f4ef1236a4476b4d54555af7f) - Prices of products are now updated when customizable options are selected
|
|
33
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
11
|
+
- [#2239](https://github.com/graphcommerce-org/graphcommerce/pull/2239) [`a2a6e78`](https://github.com/graphcommerce-org/graphcommerce/commit/a2a6e78291ab978f4ef1236a4476b4d54555af7f) - Prices of products are now updated when customizable options are selected ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
34
12
|
|
|
35
13
|
## 8.0.5-canary.10
|
|
36
14
|
|
|
@@ -40,8 +18,7 @@
|
|
|
40
18
|
|
|
41
19
|
### Patch Changes
|
|
42
20
|
|
|
43
|
-
- [#2239](https://github.com/graphcommerce-org/graphcommerce/pull/2239) [`a2a6e78`](https://github.com/graphcommerce-org/graphcommerce/commit/a2a6e78291ab978f4ef1236a4476b4d54555af7f) - Prices of products are now updated when customizable options are selected
|
|
44
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
21
|
+
- [#2239](https://github.com/graphcommerce-org/graphcommerce/pull/2239) [`a2a6e78`](https://github.com/graphcommerce-org/graphcommerce/commit/a2a6e78291ab978f4ef1236a4476b4d54555af7f) - Prices of products are now updated when customizable options are selected ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
45
22
|
|
|
46
23
|
## 8.0.5-canary.7
|
|
47
24
|
|
|
@@ -95,8 +72,7 @@
|
|
|
95
72
|
|
|
96
73
|
### Patch Changes
|
|
97
74
|
|
|
98
|
-
- [#2190](https://github.com/graphcommerce-org/graphcommerce/pull/2190) [`770a309`](https://github.com/graphcommerce-org/graphcommerce/commit/770a309cdf0586aaaed5defd345e451dee8d89c8) - Fixed a bug concerning customizable options. Customizable options of configurable products are shown again in the cart.
|
|
99
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
75
|
+
- [#2190](https://github.com/graphcommerce-org/graphcommerce/pull/2190) [`770a309`](https://github.com/graphcommerce-org/graphcommerce/commit/770a309cdf0586aaaed5defd345e451dee8d89c8) - Fixed a bug concerning customizable options. Customizable options of configurable products are shown again in the cart. ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
100
76
|
|
|
101
77
|
## 8.0.1-canary.4
|
|
102
78
|
|
|
@@ -104,8 +80,7 @@
|
|
|
104
80
|
|
|
105
81
|
### Patch Changes
|
|
106
82
|
|
|
107
|
-
- [#2190](https://github.com/graphcommerce-org/graphcommerce/pull/2190) [`770a309`](https://github.com/graphcommerce-org/graphcommerce/commit/770a309cdf0586aaaed5defd345e451dee8d89c8) - Fixed a bug concerning customizable options. Customizable options of configurable products are shown again in the cart.
|
|
108
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
83
|
+
- [#2190](https://github.com/graphcommerce-org/graphcommerce/pull/2190) [`770a309`](https://github.com/graphcommerce-org/graphcommerce/commit/770a309cdf0586aaaed5defd345e451dee8d89c8) - Fixed a bug concerning customizable options. Customizable options of configurable products are shown again in the cart. ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
109
84
|
|
|
110
85
|
## 8.0.1-canary.2
|
|
111
86
|
|
|
@@ -117,28 +92,21 @@
|
|
|
117
92
|
|
|
118
93
|
### Minor Changes
|
|
119
94
|
|
|
120
|
-
- [#2099](https://github.com/graphcommerce-org/graphcommerce/pull/2099) [`ff796b8`](https://github.com/graphcommerce-org/graphcommerce/commit/ff796b838fae6cb5e35b101500133b0235a8677d) - Support for all customizable product options (except file upload) on the product pages and in the cart.
|
|
121
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
95
|
+
- [#2099](https://github.com/graphcommerce-org/graphcommerce/pull/2099) [`ff796b8`](https://github.com/graphcommerce-org/graphcommerce/commit/ff796b838fae6cb5e35b101500133b0235a8677d) - Support for all customizable product options (except file upload) on the product pages and in the cart. ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
122
96
|
|
|
123
|
-
- [#2048](https://github.com/graphcommerce-org/graphcommerce/pull/2048) [`13e23e4`](https://github.com/graphcommerce-org/graphcommerce/commit/13e23e4265bac70fb4d0830e4661019e71ce299f) - Wishlist will now support configurable products and uses the `<ActionCardLayout/>`
|
|
124
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
97
|
+
- [#2048](https://github.com/graphcommerce-org/graphcommerce/pull/2048) [`13e23e4`](https://github.com/graphcommerce-org/graphcommerce/commit/13e23e4265bac70fb4d0830e4661019e71ce299f) - Wishlist will now support configurable products and uses the `<ActionCardLayout/>` ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
125
98
|
|
|
126
99
|
### Patch Changes
|
|
127
100
|
|
|
128
|
-
- [#2048](https://github.com/graphcommerce-org/graphcommerce/pull/2048) [`bc90852`](https://github.com/graphcommerce-org/graphcommerce/commit/bc90852755479e48d25a370deccce0ca74e1e48f) - When selecting a non-existing option on a configurable product page, the price would be updated.
|
|
129
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
101
|
+
- [#2048](https://github.com/graphcommerce-org/graphcommerce/pull/2048) [`bc90852`](https://github.com/graphcommerce-org/graphcommerce/commit/bc90852755479e48d25a370deccce0ca74e1e48f) - When selecting a non-existing option on a configurable product page, the price would be updated. ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
130
102
|
|
|
131
|
-
- [#2058](https://github.com/graphcommerce-org/graphcommerce/pull/2058) [`16dc488`](https://github.com/graphcommerce-org/graphcommerce/commit/16dc4889543106238b1a87694e75586e4c1a787c) - Provide instant feedback on availble attribute options when making a selection on a configurable product
|
|
132
|
-
([@FrankHarland](https://github.com/FrankHarland))
|
|
103
|
+
- [#2058](https://github.com/graphcommerce-org/graphcommerce/pull/2058) [`16dc488`](https://github.com/graphcommerce-org/graphcommerce/commit/16dc4889543106238b1a87694e75586e4c1a787c) - Provide instant feedback on availble attribute options when making a selection on a configurable product ([@FrankHarland](https://github.com/FrankHarland))
|
|
133
104
|
|
|
134
|
-
- [#2146](https://github.com/graphcommerce-org/graphcommerce/pull/2146) [`3c19305`](https://github.com/graphcommerce-org/graphcommerce/commit/3c19305a7107d250bd898a9f4dfef38e362c2cbf) - Display the details of configurable products in the cart.
|
|
135
|
-
([@mikekeehnen](https://github.com/mikekeehnen))
|
|
105
|
+
- [#2146](https://github.com/graphcommerce-org/graphcommerce/pull/2146) [`3c19305`](https://github.com/graphcommerce-org/graphcommerce/commit/3c19305a7107d250bd898a9f4dfef38e362c2cbf) - Display the details of configurable products in the cart. ([@mikekeehnen](https://github.com/mikekeehnen))
|
|
136
106
|
|
|
137
|
-
- [#2137](https://github.com/graphcommerce-org/graphcommerce/pull/2137) [`df507b1`](https://github.com/graphcommerce-org/graphcommerce/commit/df507b194c67eef7b02df858c07938bb308b5397) - Don't render pseudo-locale in HTML lang attribute
|
|
138
|
-
([@hnsr](https://github.com/hnsr))
|
|
107
|
+
- [#2137](https://github.com/graphcommerce-org/graphcommerce/pull/2137) [`df507b1`](https://github.com/graphcommerce-org/graphcommerce/commit/df507b194c67eef7b02df858c07938bb308b5397) - Don't render pseudo-locale in HTML lang attribute ([@hnsr](https://github.com/hnsr))
|
|
139
108
|
|
|
140
|
-
- [#2159](https://github.com/graphcommerce-org/graphcommerce/pull/2159) [`17a5304`](https://github.com/graphcommerce-org/graphcommerce/commit/17a5304cbe297d29ddddce0d88f2c1bff220b59d) - Prevent aggregations from being excluded when executing the `defaultConfigurableOptionsSelection`
|
|
141
|
-
([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
109
|
+
- [#2159](https://github.com/graphcommerce-org/graphcommerce/pull/2159) [`17a5304`](https://github.com/graphcommerce-org/graphcommerce/commit/17a5304cbe297d29ddddce0d88f2c1bff220b59d) - Prevent aggregations from being excluded when executing the `defaultConfigurableOptionsSelection` ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
142
110
|
|
|
143
111
|
## 8.0.0-canary.100
|
|
144
112
|
|
|
@@ -154,8 +122,7 @@
|
|
|
154
122
|
|
|
155
123
|
### Patch Changes
|
|
156
124
|
|
|
157
|
-
- [#2146](https://github.com/graphcommerce-org/graphcommerce/pull/2146) [`3c19305`](https://github.com/graphcommerce-org/graphcommerce/commit/3c19305a7107d250bd898a9f4dfef38e362c2cbf) - Display the details of configurable products in the cart.
|
|
158
|
-
([@mikekeehnen](https://github.com/mikekeehnen))
|
|
125
|
+
- [#2146](https://github.com/graphcommerce-org/graphcommerce/pull/2146) [`3c19305`](https://github.com/graphcommerce-org/graphcommerce/commit/3c19305a7107d250bd898a9f4dfef38e362c2cbf) - Display the details of configurable products in the cart. ([@mikekeehnen](https://github.com/mikekeehnen))
|
|
159
126
|
|
|
160
127
|
## 8.0.0-canary.94
|
|
161
128
|
|
|
@@ -191,8 +158,7 @@
|
|
|
191
158
|
|
|
192
159
|
### Patch Changes
|
|
193
160
|
|
|
194
|
-
- [#2137](https://github.com/graphcommerce-org/graphcommerce/pull/2137) [`df507b1`](https://github.com/graphcommerce-org/graphcommerce/commit/df507b194c67eef7b02df858c07938bb308b5397) - Don't render pseudo-locale in HTML lang attribute
|
|
195
|
-
([@hnsr](https://github.com/hnsr))
|
|
161
|
+
- [#2137](https://github.com/graphcommerce-org/graphcommerce/pull/2137) [`df507b1`](https://github.com/graphcommerce-org/graphcommerce/commit/df507b194c67eef7b02df858c07938bb308b5397) - Don't render pseudo-locale in HTML lang attribute ([@hnsr](https://github.com/hnsr))
|
|
196
162
|
|
|
197
163
|
## 8.0.0-canary.78
|
|
198
164
|
|
|
@@ -210,15 +176,13 @@
|
|
|
210
176
|
|
|
211
177
|
### Patch Changes
|
|
212
178
|
|
|
213
|
-
- [#2159](https://github.com/graphcommerce-org/graphcommerce/pull/2159) [`17a5304`](https://github.com/graphcommerce-org/graphcommerce/commit/17a5304cbe297d29ddddce0d88f2c1bff220b59d) - Spread product back into products instead of only adding items
|
|
214
|
-
([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
179
|
+
- [#2159](https://github.com/graphcommerce-org/graphcommerce/pull/2159) [`17a5304`](https://github.com/graphcommerce-org/graphcommerce/commit/17a5304cbe297d29ddddce0d88f2c1bff220b59d) - Spread product back into products instead of only adding items ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
215
180
|
|
|
216
181
|
## 8.0.0-canary.71
|
|
217
182
|
|
|
218
183
|
### Minor Changes
|
|
219
184
|
|
|
220
|
-
- [#2099](https://github.com/graphcommerce-org/graphcommerce/pull/2099) [`ff796b8`](https://github.com/graphcommerce-org/graphcommerce/commit/ff796b838fae6cb5e35b101500133b0235a8677d) - Created UI for all customizable options except for the file upload customizable option
|
|
221
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
185
|
+
- [#2099](https://github.com/graphcommerce-org/graphcommerce/pull/2099) [`ff796b8`](https://github.com/graphcommerce-org/graphcommerce/commit/ff796b838fae6cb5e35b101500133b0235a8677d) - Created UI for all customizable options except for the file upload customizable option ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
222
186
|
|
|
223
187
|
## 8.0.0-canary.70
|
|
224
188
|
|
|
@@ -1763,31 +1727,31 @@
|
|
|
1763
1727
|
All occurences of `<Trans>` and `t` need to be replaced:
|
|
1764
1728
|
|
|
1765
1729
|
```tsx
|
|
1766
|
-
import { Trans, t } from
|
|
1730
|
+
import { Trans, t } from '@lingui/macro'
|
|
1767
1731
|
|
|
1768
1732
|
function MyComponent() {
|
|
1769
|
-
const foo =
|
|
1733
|
+
const foo = 'bar'
|
|
1770
1734
|
return (
|
|
1771
1735
|
<div aria-label={t`Account ${foo}`}>
|
|
1772
1736
|
<Trans>My Translation {foo}</Trans>
|
|
1773
1737
|
</div>
|
|
1774
|
-
)
|
|
1738
|
+
)
|
|
1775
1739
|
}
|
|
1776
1740
|
```
|
|
1777
1741
|
|
|
1778
1742
|
Needs to be replaced with:
|
|
1779
1743
|
|
|
1780
1744
|
```tsx
|
|
1781
|
-
import { Trans } from
|
|
1782
|
-
import { i18n } from
|
|
1745
|
+
import { Trans } from '@lingui/react'
|
|
1746
|
+
import { i18n } from '@lingui/core'
|
|
1783
1747
|
|
|
1784
1748
|
function MyComponent() {
|
|
1785
|
-
const foo =
|
|
1749
|
+
const foo = 'bar'
|
|
1786
1750
|
return (
|
|
1787
1751
|
<div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
|
|
1788
|
-
<Trans key=
|
|
1752
|
+
<Trans key='My Translation {foo}' values={{ foo }}></Trans>
|
|
1789
1753
|
</div>
|
|
1790
|
-
)
|
|
1754
|
+
)
|
|
1791
1755
|
}
|
|
1792
1756
|
```
|
|
1793
1757
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NumberFieldElement } from '@graphcommerce/ecommerce-ui'
|
|
2
1
|
import { ApolloCartErrorAlert, useFormGqlMutationCart } from '@graphcommerce/magento-cart'
|
|
3
2
|
import { Money } from '@graphcommerce/magento-store'
|
|
4
3
|
import {
|
|
@@ -7,6 +6,7 @@ import {
|
|
|
7
6
|
iconChevronRight,
|
|
8
7
|
MessageSnackbar,
|
|
9
8
|
IconSvg,
|
|
9
|
+
TextInputNumber,
|
|
10
10
|
} from '@graphcommerce/next-ui'
|
|
11
11
|
import { Trans } from '@lingui/react'
|
|
12
12
|
import { Divider, Typography, Alert, Box, SxProps, Theme } from '@mui/material'
|
|
@@ -64,7 +64,7 @@ export function ConfigurableProductAddToCart(props: ConfigurableProductAddToCart
|
|
|
64
64
|
}),
|
|
65
65
|
})
|
|
66
66
|
|
|
67
|
-
const { handleSubmit, formState, required, control, error, data } = form
|
|
67
|
+
const { handleSubmit, formState, muiRegister, required, control, error, data } = form
|
|
68
68
|
const submitHandler = handleSubmit(() => {})
|
|
69
69
|
|
|
70
70
|
return (
|
|
@@ -91,14 +91,12 @@ export function ConfigurableProductAddToCart(props: ConfigurableProductAddToCart
|
|
|
91
91
|
{...optionsProps}
|
|
92
92
|
/>
|
|
93
93
|
|
|
94
|
-
<
|
|
94
|
+
<TextInputNumber
|
|
95
95
|
variant='outlined'
|
|
96
96
|
error={formState.isSubmitted && !!formState.errors.quantity}
|
|
97
97
|
required={required.quantity}
|
|
98
98
|
inputProps={{ min: 1 }}
|
|
99
|
-
|
|
100
|
-
rules={{ required: required.quantity }}
|
|
101
|
-
control={control}
|
|
99
|
+
{...muiRegister('quantity', { required: required.quantity })}
|
|
102
100
|
helperText={formState.isSubmitted && formState.errors.quantity?.message}
|
|
103
101
|
// disabled={loading}
|
|
104
102
|
size='small'
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { normalizeLocale } from '@graphcommerce/lingui-next'
|
|
2
2
|
import { AddToCartItemSelector, useFormAddProductsToCart } from '@graphcommerce/magento-product'
|
|
3
|
-
import {
|
|
4
|
-
filterNonNullableKeys,
|
|
5
|
-
ActionCardListProps,
|
|
6
|
-
useStorefrontConfig,
|
|
7
|
-
useLocale,
|
|
8
|
-
} from '@graphcommerce/next-ui'
|
|
3
|
+
import { filterNonNullableKeys, ActionCardListProps } from '@graphcommerce/next-ui'
|
|
9
4
|
import { i18n } from '@lingui/core'
|
|
10
5
|
import { Box, SxProps, Theme } from '@mui/material'
|
|
11
6
|
import { useRouter } from 'next/router'
|
|
@@ -32,6 +27,7 @@ export function ConfigurableProductOptions(props: ConfigurableProductOptionsProp
|
|
|
32
27
|
...other
|
|
33
28
|
} = props
|
|
34
29
|
const { setError, clearErrors } = useFormAddProductsToCart()
|
|
30
|
+
const { locale } = useRouter()
|
|
35
31
|
|
|
36
32
|
const options = filterNonNullableKeys(product.configurable_options, [
|
|
37
33
|
'attribute_code',
|
|
@@ -45,9 +41,8 @@ export function ConfigurableProductOptions(props: ConfigurableProductOptionsProp
|
|
|
45
41
|
(configured?.configurable_product_options_selection?.options_available_for_selection ?? [])
|
|
46
42
|
.length === 0
|
|
47
43
|
|
|
48
|
-
const locale = useLocale()
|
|
49
44
|
const allLabels = useMemo(() => {
|
|
50
|
-
const formatter = new Intl.ListFormat(locale, {
|
|
45
|
+
const formatter = new Intl.ListFormat(normalizeLocale(locale), {
|
|
51
46
|
style: 'long',
|
|
52
47
|
type: 'conjunction',
|
|
53
48
|
})
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
query GetConfigurableOptionsSelection(
|
|
1
|
+
query GetConfigurableOptionsSelection(
|
|
2
|
+
$urlKey: String!
|
|
3
|
+
$selectedOptions: [ID!] = []
|
|
4
|
+
$reviewPageSize: Int = 3
|
|
5
|
+
$reviewPage: Int = 1
|
|
6
|
+
) {
|
|
2
7
|
products(filter: { url_key: { eq: $urlKey } }) {
|
|
3
8
|
__typename
|
|
4
9
|
items {
|
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": "8.0.
|
|
5
|
+
"version": "8.0.7",
|
|
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": "^8.0.
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^8.0.
|
|
17
|
-
"@graphcommerce/graphql": "^8.0.
|
|
18
|
-
"@graphcommerce/graphql-mesh": "^8.0.
|
|
19
|
-
"@graphcommerce/image": "^8.0.
|
|
20
|
-
"@graphcommerce/lingui-next": "8.0.
|
|
21
|
-
"@graphcommerce/magento-cart": "^8.0.
|
|
22
|
-
"@graphcommerce/magento-cart-items": "^8.0.
|
|
23
|
-
"@graphcommerce/magento-category": "^8.0.
|
|
24
|
-
"@graphcommerce/magento-customer": "^8.0.
|
|
25
|
-
"@graphcommerce/magento-product": "^8.0.
|
|
26
|
-
"@graphcommerce/magento-product-simple": "^8.0.
|
|
27
|
-
"@graphcommerce/magento-store": "^8.0.
|
|
28
|
-
"@graphcommerce/next-ui": "^8.0.
|
|
29
|
-
"@graphcommerce/prettier-config-pwa": "^8.0.
|
|
30
|
-
"@graphcommerce/react-hook-form": "^8.0.
|
|
31
|
-
"@graphcommerce/typescript-config-pwa": "^8.0.
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^8.0.7",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^8.0.7",
|
|
17
|
+
"@graphcommerce/graphql": "^8.0.7",
|
|
18
|
+
"@graphcommerce/graphql-mesh": "^8.0.7",
|
|
19
|
+
"@graphcommerce/image": "^8.0.7",
|
|
20
|
+
"@graphcommerce/lingui-next": "8.0.7",
|
|
21
|
+
"@graphcommerce/magento-cart": "^8.0.7",
|
|
22
|
+
"@graphcommerce/magento-cart-items": "^8.0.7",
|
|
23
|
+
"@graphcommerce/magento-category": "^8.0.7",
|
|
24
|
+
"@graphcommerce/magento-customer": "^8.0.7",
|
|
25
|
+
"@graphcommerce/magento-product": "^8.0.7",
|
|
26
|
+
"@graphcommerce/magento-product-simple": "^8.0.7",
|
|
27
|
+
"@graphcommerce/magento-store": "^8.0.7",
|
|
28
|
+
"@graphcommerce/next-ui": "^8.0.7",
|
|
29
|
+
"@graphcommerce/prettier-config-pwa": "^8.0.7",
|
|
30
|
+
"@graphcommerce/react-hook-form": "^8.0.7",
|
|
31
|
+
"@graphcommerce/typescript-config-pwa": "^8.0.7",
|
|
32
32
|
"@lingui/core": "^4.2.1",
|
|
33
33
|
"@lingui/macro": "^4.2.1",
|
|
34
34
|
"@lingui/react": "^4.2.1",
|
|
@@ -40,9 +40,8 @@ export function defaultConfigurableOptionsSelection<Q extends BaseQuery = BaseQu
|
|
|
40
40
|
return { ...query, defaultValues: {} }
|
|
41
41
|
|
|
42
42
|
// Find the requested simple product on the configurable variants and get the attributes.
|
|
43
|
-
const attributes = configurable?.variants?.find(
|
|
44
|
-
|
|
45
|
-
)?.attributes
|
|
43
|
+
const attributes = configurable?.variants?.find((v) => v?.product?.uid === simple?.uid)
|
|
44
|
+
?.attributes
|
|
46
45
|
|
|
47
46
|
const selectedOptions = (attributes ?? []).filter(nonNullable).map((a) => a.uid)
|
|
48
47
|
if (!selectedOptions.length)
|
|
@@ -73,7 +72,7 @@ export function defaultConfigurableOptionsSelection<Q extends BaseQuery = BaseQu
|
|
|
73
72
|
|
|
74
73
|
client.cache.writeQuery({
|
|
75
74
|
query: GetConfigurableOptionsSelectionDocument,
|
|
76
|
-
variables: { urlKey: configurable.url_key, selectedOptions },
|
|
75
|
+
variables: { urlKey: configurable.url_key, selectedOptions, reviewPage: 1, reviewPageSize: 3 },
|
|
77
76
|
data: {
|
|
78
77
|
products: {
|
|
79
78
|
...query?.products,
|