@graphcommerce/magento-product 9.1.0-canary.44 → 9.1.0-canary.45
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.45
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [`7d59e59`](https://github.com/graphcommerce-org/graphcommerce/commit/7d59e592b4bc87cb0e05b6128820de2762297f7f) - Make sure you are able to set the defaultValue for the ProductPagePrice when running in total mode, so it works for GroupedProducts that might start with a default quantity of zero. ([@paales](https://github.com/paales))
|
8
|
+
|
9
|
+
- [`7d59e59`](https://github.com/graphcommerce-org/graphcommerce/commit/7d59e592b4bc87cb0e05b6128820de2762297f7f) - Forward inputProps for AddProductToCartQuantity ([@paales](https://github.com/paales))
|
10
|
+
|
3
11
|
## 9.1.0-canary.44
|
4
12
|
|
5
13
|
## 9.1.0-canary.43
|
@@ -357,7 +365,6 @@
|
|
357
365
|
- [#1749](https://github.com/graphcommerce-org/graphcommerce/pull/1749) [`0cc472915`](https://github.com/graphcommerce-org/graphcommerce/commit/0cc4729154d316227a41712b5f0adf514768e91f) - Introducing the new ProductFiltersPro component set with completely new filter and UI behavior. Filters will appear as a popper on the md and up breakpoints and as an overlay on sm and below breakpoints. Filters now have an Apply button instead of applying directly. ([@paales](https://github.com/paales))
|
358
366
|
|
359
367
|
- [#1786](https://github.com/graphcommerce-org/graphcommerce/pull/1786) [`b76679204`](https://github.com/graphcommerce-org/graphcommerce/commit/b766792049e1e6ebe45671c0b36e78746ef159e2) - Created a completely new [GraphCommerce config system](https://www.graphcommerce.org/docs/framework/config) to allow for greater confiugration options and rely less on a .env file to configuration.
|
360
|
-
|
361
368
|
- GraphCommerce can be configured in the graphcommerce.config.js
|
362
369
|
- The configuration is automatically validated on startup.
|
363
370
|
- All configuration values can be overwritten by environment variables. ([@paales](https://github.com/paales))
|
@@ -365,7 +372,6 @@
|
|
365
372
|
### Minor Changes
|
366
373
|
|
367
374
|
- [#1822](https://github.com/graphcommerce-org/graphcommerce/pull/1822) [`cc02c46e3`](https://github.com/graphcommerce-org/graphcommerce/commit/cc02c46e32c9a44a90789591f43d91ae234dac84) - Added Facebook Open Graph tags to product pages:
|
368
|
-
|
369
375
|
- og:title
|
370
376
|
- og:image
|
371
377
|
- og:url
|
@@ -399,7 +405,6 @@
|
|
399
405
|
- [#1757](https://github.com/graphcommerce-org/graphcommerce/pull/1757) [`ca2e2ab59`](https://github.com/graphcommerce-org/graphcommerce/commit/ca2e2ab594ab1cc0fedf908869829811e1f4009f) - Handle stock_status OUT_OF_STOCK properly and show only_x_left_in_stock if feature is enabled ([@paales](https://github.com/paales))
|
400
406
|
|
401
407
|
- [#1756](https://github.com/graphcommerce-org/graphcommerce/pull/1756) [`1abaaedde`](https://github.com/graphcommerce-org/graphcommerce/commit/1abaaedde4062d3b19696e333d0016972681afaf) - Show cart item error messages when running Magento >= 2.4.5 or this [patch is applied](https://raw.githubusercontent.com/graphcommerce-org/graphcommerce/main/packages/magento-cart/243-244-magento-module-quote-graphql-cart-item-errors.patch)
|
402
|
-
|
403
408
|
- Fixes an issue where the cart can get into a broken state, if items contain errors.
|
404
409
|
- AddToCartForm now shows a success message if there is an error but the error is related to another item in the cart.
|
405
410
|
- Disable checkout buttons when there are cart item errors and show a message. ([@paales](https://github.com/paales))
|
@@ -409,7 +414,6 @@
|
|
409
414
|
### Patch Changes
|
410
415
|
|
411
416
|
- [#1752](https://github.com/graphcommerce-org/graphcommerce/pull/1752) [`2a6a4d9ec`](https://github.com/graphcommerce-org/graphcommerce/commit/2a6a4d9ecfa1b58a66ba9b9d00016d6feda9aa95) - Updated dependencies to latest versions, except for nextjs; Solve tons of peer dependency issues.
|
412
|
-
|
413
417
|
- Updated the @mui/material package
|
414
418
|
- Removed dependencies on react-hook-form-mui and @playwright/test
|
415
419
|
- Upgraded dependencies including type-fest and graphql-mesh
|
@@ -685,7 +689,6 @@
|
|
685
689
|
### Minor Changes
|
686
690
|
|
687
691
|
- [#1602](https://github.com/graphcommerce-org/graphcommerce/pull/1602) [`5f781a217`](https://github.com/graphcommerce-org/graphcommerce/commit/5f781a217ce63ed56bc1a9983487b04400a8a315) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Default styles and layout fixes
|
688
|
-
|
689
692
|
- Scaled icons and fonts down. Size in typography is now more gradual: https://graphcommerce.vercel.app/test/typography
|
690
693
|
- Multiple accessibility fixes. Missing button/input labels, and fixed spacing issues resulting in high % appropriately sized tap targets
|
691
694
|
- Replaced responsiveVal usage with better performaning breakpointVal where possible
|
@@ -7,12 +7,12 @@ import { useFormAddProductsToCart } from './useFormAddProductsToCart'
|
|
7
7
|
|
8
8
|
export type AddToCartQuantityProps = Omit<
|
9
9
|
NumberFieldElementProps<AddProductsToCartMutationVariables>,
|
10
|
-
'error' | 'required' | '
|
10
|
+
'error' | 'required' | 'helperText' | 'name' | 'control' | 'rules'
|
11
11
|
> &
|
12
12
|
AddToCartItemSelector
|
13
13
|
|
14
14
|
export function AddProductsToCartQuantity(props: AddToCartQuantityProps) {
|
15
|
-
const { index = 0 } = props
|
15
|
+
const { index = 0, inputProps, ...rest } = props
|
16
16
|
const { control } = useFormAddProductsToCart()
|
17
17
|
|
18
18
|
return (
|
@@ -21,12 +21,16 @@ export function AddProductsToCartQuantity(props: AddToCartQuantityProps) {
|
|
21
21
|
size='small'
|
22
22
|
color='primary'
|
23
23
|
required
|
24
|
-
inputProps={{
|
24
|
+
inputProps={{
|
25
|
+
min: 1,
|
26
|
+
'aria-label': i18n._(/* i18n */ 'Add to cart quantity'),
|
27
|
+
...inputProps,
|
28
|
+
}}
|
25
29
|
defaultValue={1}
|
26
30
|
control={control}
|
27
31
|
aria-label={i18n._(/* i18n */ 'Add to cart quantity')}
|
28
32
|
name={`cartItems.${index}.quantity`}
|
29
|
-
{...
|
33
|
+
{...rest}
|
30
34
|
/>
|
31
35
|
)
|
32
36
|
}
|
@@ -17,6 +17,7 @@ export type ProductPagePriceProps = {
|
|
17
17
|
sx?: SxProps<Theme>
|
18
18
|
variant?: 'item' | 'total'
|
19
19
|
asNumber?: boolean
|
20
|
+
defaultValue?: number
|
20
21
|
} & AddToCartItemSelector &
|
21
22
|
UseCustomizableOptionPriceProps
|
22
23
|
|
@@ -28,10 +29,19 @@ const { classes } = extendableComponent('ProductPagePrice', [
|
|
28
29
|
] as const)
|
29
30
|
|
30
31
|
export function ProductPagePrice(props: ProductPagePriceProps) {
|
31
|
-
const {
|
32
|
+
const {
|
33
|
+
product,
|
34
|
+
index = 0,
|
35
|
+
prefix,
|
36
|
+
suffix,
|
37
|
+
sx,
|
38
|
+
variant = 'item',
|
39
|
+
asNumber,
|
40
|
+
defaultValue = 1,
|
41
|
+
} = props
|
32
42
|
|
33
43
|
const { control } = useFormAddProductsToCart()
|
34
|
-
const quantity = useWatch({ control, name: `cartItems.${index}.quantity
|
44
|
+
const quantity = useWatch({ control, name: `cartItems.${index}.quantity`, defaultValue })
|
35
45
|
const price =
|
36
46
|
getProductTierPrice(product, quantity) ?? product.price_range.minimum_price.final_price
|
37
47
|
|
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": "9.1.0-canary.
|
5
|
+
"version": "9.1.0-canary.45",
|
6
6
|
"sideEffects": false,
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
8
8
|
"eslintConfig": {
|
@@ -18,18 +18,18 @@
|
|
18
18
|
"typescript": "5.7.2"
|
19
19
|
},
|
20
20
|
"peerDependencies": {
|
21
|
-
"@graphcommerce/ecommerce-ui": "^9.1.0-canary.
|
22
|
-
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.
|
23
|
-
"@graphcommerce/framer-next-pages": "^9.1.0-canary.
|
24
|
-
"@graphcommerce/framer-scroller": "^9.1.0-canary.
|
25
|
-
"@graphcommerce/graphql": "^9.1.0-canary.
|
26
|
-
"@graphcommerce/graphql-mesh": "^9.1.0-canary.
|
27
|
-
"@graphcommerce/image": "^9.1.0-canary.
|
28
|
-
"@graphcommerce/magento-cart": "^9.1.0-canary.
|
29
|
-
"@graphcommerce/magento-store": "^9.1.0-canary.
|
30
|
-
"@graphcommerce/next-ui": "^9.1.0-canary.
|
31
|
-
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.
|
32
|
-
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.
|
21
|
+
"@graphcommerce/ecommerce-ui": "^9.1.0-canary.45",
|
22
|
+
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.45",
|
23
|
+
"@graphcommerce/framer-next-pages": "^9.1.0-canary.45",
|
24
|
+
"@graphcommerce/framer-scroller": "^9.1.0-canary.45",
|
25
|
+
"@graphcommerce/graphql": "^9.1.0-canary.45",
|
26
|
+
"@graphcommerce/graphql-mesh": "^9.1.0-canary.45",
|
27
|
+
"@graphcommerce/image": "^9.1.0-canary.45",
|
28
|
+
"@graphcommerce/magento-cart": "^9.1.0-canary.45",
|
29
|
+
"@graphcommerce/magento-store": "^9.1.0-canary.45",
|
30
|
+
"@graphcommerce/next-ui": "^9.1.0-canary.45",
|
31
|
+
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.45",
|
32
|
+
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.45",
|
33
33
|
"@lingui/core": "^4.2.1",
|
34
34
|
"@lingui/macro": "^4.2.1",
|
35
35
|
"@lingui/react": "^4.2.1",
|