@graphcommerce/magento-product-configurable 4.0.15 → 4.1.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,40 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1256](https://github.com/graphcommerce-org/graphcommerce/pull/1256) [`669a17a97`](https://github.com/graphcommerce-org/graphcommerce/commit/669a17a973c47c00fed4a649a9da0bfc5670c5da) Thanks [@timhofman](https://github.com/timhofman)! - Wishlist
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`669a17a97`](https://github.com/graphcommerce-org/graphcommerce/commit/669a17a973c47c00fed4a649a9da0bfc5670c5da)]:
|
|
12
|
+
- @graphcommerce/magento-product@4.3.0
|
|
13
|
+
- @graphcommerce/magento-cart-items@3.0.16
|
|
14
|
+
- @graphcommerce/magento-category@4.1.1
|
|
15
|
+
- @graphcommerce/magento-product-simple@4.0.15
|
|
16
|
+
|
|
17
|
+
## 4.0.17
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [[`3c1c9ce2a`](https://github.com/graphcommerce-org/graphcommerce/commit/3c1c9ce2a947386515df019c31d697114a87dc07)]:
|
|
22
|
+
- @graphcommerce/magento-category@4.1.0
|
|
23
|
+
|
|
24
|
+
## 4.0.16
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [[`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04)]:
|
|
29
|
+
- @graphcommerce/magento-product@4.2.0
|
|
30
|
+
- @graphcommerce/magento-store@4.2.0
|
|
31
|
+
- @graphcommerce/next-ui@4.7.0
|
|
32
|
+
- @graphcommerce/magento-cart@4.2.10
|
|
33
|
+
- @graphcommerce/magento-cart-items@3.0.15
|
|
34
|
+
- @graphcommerce/magento-category@4.0.15
|
|
35
|
+
- @graphcommerce/magento-product-simple@4.0.14
|
|
36
|
+
- @graphcommerce/magento-customer@4.2.8
|
|
37
|
+
|
|
3
38
|
## 4.0.15
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -30,6 +30,7 @@ type ConfigurableProductAddToCartProps = {
|
|
|
30
30
|
name: string
|
|
31
31
|
optionEndLabels?: Record<string, React.ReactNode>
|
|
32
32
|
children?: React.ReactNode
|
|
33
|
+
additionalButtons?: React.ReactNode
|
|
33
34
|
optionsProps?: Omit<
|
|
34
35
|
ConfigurableOptionsInputProps,
|
|
35
36
|
'name' | 'sku' | 'control' | 'rules' | 'errors' | 'optionEndLabels'
|
|
@@ -37,11 +38,19 @@ type ConfigurableProductAddToCartProps = {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
const compName = 'ConfigurableOptionsInput' as const
|
|
40
|
-
const parts = ['form', 'button', 'finalPrice', 'quantity', 'divider'] as const
|
|
41
|
+
const parts = ['form', 'button', 'finalPrice', 'quantity', 'divider', 'buttonWrapper'] as const
|
|
41
42
|
const { classes } = extendableComponent(compName, parts)
|
|
42
43
|
|
|
43
44
|
export function ConfigurableProductAddToCart(props: ConfigurableProductAddToCartProps) {
|
|
44
|
-
const {
|
|
45
|
+
const {
|
|
46
|
+
name,
|
|
47
|
+
children,
|
|
48
|
+
variables,
|
|
49
|
+
optionEndLabels,
|
|
50
|
+
optionsProps,
|
|
51
|
+
additionalButtons,
|
|
52
|
+
...buttonProps
|
|
53
|
+
} = props
|
|
45
54
|
const { getUids, getVariants, selection } = useConfigurableContext(variables.sku)
|
|
46
55
|
|
|
47
56
|
const form = useFormGqlMutationCart(ConfigurableProductAddToCartDocument, {
|
|
@@ -100,22 +109,32 @@ export function ConfigurableProductAddToCart(props: ConfigurableProductAddToCart
|
|
|
100
109
|
/>
|
|
101
110
|
</Typography>
|
|
102
111
|
{children}
|
|
103
|
-
<
|
|
104
|
-
type='submit'
|
|
105
|
-
loading={formState.isSubmitting}
|
|
106
|
-
color='primary'
|
|
107
|
-
variant='pill'
|
|
108
|
-
size='large'
|
|
109
|
-
className={classes.button}
|
|
110
|
-
{...buttonProps}
|
|
112
|
+
<Box
|
|
111
113
|
sx={(theme) => ({
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
display: 'flex',
|
|
115
|
+
alignItems: 'center',
|
|
116
|
+
columnGap: theme.spacings.xs,
|
|
115
117
|
})}
|
|
118
|
+
className={classes.buttonWrapper}
|
|
116
119
|
>
|
|
117
|
-
<
|
|
118
|
-
|
|
120
|
+
<Button
|
|
121
|
+
type='submit'
|
|
122
|
+
loading={formState.isSubmitting}
|
|
123
|
+
color='primary'
|
|
124
|
+
variant='pill'
|
|
125
|
+
size='large'
|
|
126
|
+
className={classes.button}
|
|
127
|
+
{...buttonProps}
|
|
128
|
+
sx={(theme) => ({
|
|
129
|
+
marginTop: theme.spacings.sm,
|
|
130
|
+
marginBottom: theme.spacings.sm,
|
|
131
|
+
width: '100%',
|
|
132
|
+
})}
|
|
133
|
+
>
|
|
134
|
+
<Trans>Add to Cart</Trans>
|
|
135
|
+
</Button>
|
|
136
|
+
{additionalButtons}
|
|
137
|
+
</Box>
|
|
119
138
|
|
|
120
139
|
<ApolloCartErrorAlert error={error} />
|
|
121
140
|
|
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": "4.0
|
|
5
|
+
"version": "4.1.0",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"@graphcommerce/graphql": "3.1.1",
|
|
23
23
|
"@graphcommerce/graphql-mesh": "4.1.2",
|
|
24
24
|
"@graphcommerce/image": "3.1.5",
|
|
25
|
-
"@graphcommerce/magento-cart": "4.2.
|
|
26
|
-
"@graphcommerce/magento-cart-items": "3.0.
|
|
27
|
-
"@graphcommerce/magento-category": "4.
|
|
28
|
-
"@graphcommerce/magento-customer": "4.2.
|
|
29
|
-
"@graphcommerce/magento-product": "4.
|
|
30
|
-
"@graphcommerce/magento-product-simple": "4.0.
|
|
31
|
-
"@graphcommerce/magento-store": "4.
|
|
32
|
-
"@graphcommerce/next-ui": "4.
|
|
25
|
+
"@graphcommerce/magento-cart": "4.2.10",
|
|
26
|
+
"@graphcommerce/magento-cart-items": "3.0.16",
|
|
27
|
+
"@graphcommerce/magento-category": "4.1.1",
|
|
28
|
+
"@graphcommerce/magento-customer": "4.2.8",
|
|
29
|
+
"@graphcommerce/magento-product": "4.3.0",
|
|
30
|
+
"@graphcommerce/magento-product-simple": "4.0.15",
|
|
31
|
+
"@graphcommerce/magento-store": "4.2.0",
|
|
32
|
+
"@graphcommerce/next-ui": "4.7.0",
|
|
33
33
|
"@graphcommerce/react-hook-form": "3.1.2"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|