@graphcommerce/magento-product 3.8.13 → 4.0.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 +422 -315
- package/components/ProductAddToCart/ProductAddToCart.tsx +32 -30
- package/components/ProductListCount/ProductListCount.tsx +46 -0
- package/components/ProductListFilters/FilterCheckboxType.tsx +6 -13
- package/components/ProductListFilters/FilterEqualType.tsx +107 -102
- package/components/ProductListFilters/FilterRangeType.tsx +32 -40
- package/components/ProductListFilters/ProductListFilters.graphql +2 -0
- package/components/ProductListFilters/{index.tsx → ProductListFilters.tsx} +0 -1
- package/components/ProductListFiltersContainer/index.tsx +104 -91
- package/components/ProductListItem/index.tsx +186 -146
- package/components/ProductListItems/ProductListItemsBase.tsx +22 -32
- package/components/ProductListItems/getFilterTypes.ts +1 -1
- package/components/ProductListLink/ProductListLink.tsx +2 -2
- package/components/ProductListPagination/index.tsx +2 -2
- package/components/ProductListPrice/index.tsx +21 -21
- package/components/ProductListSort/index.tsx +15 -13
- package/components/ProductPageDescription/index.tsx +38 -37
- package/components/ProductShortDescription/index.tsx +7 -17
- package/components/ProductSidebarDelivery/index.tsx +48 -44
- package/components/ProductSpecs/index.tsx +32 -41
- package/components/ProductStaticPaths/getProductStaticPaths.ts +1 -1
- package/components/ProductWeight/index.tsx +1 -1
- package/components/index.ts +16 -26
- package/package.json +22 -26
- package/components/ProductListCount/index.tsx +0 -55
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/magento-product",
|
|
3
|
-
"
|
|
3
|
+
"homepage": "https://www.graphcommerce.org/",
|
|
4
|
+
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
+
"version": "4.0.2",
|
|
4
6
|
"sideEffects": false,
|
|
5
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
6
|
-
"browserslist": [
|
|
7
|
-
"extends @graphcommerce/browserslist-config-pwa"
|
|
8
|
-
],
|
|
9
8
|
"eslintConfig": {
|
|
10
9
|
"extends": "@graphcommerce/eslint-config-pwa",
|
|
11
10
|
"parserOptions": {
|
|
@@ -13,30 +12,27 @@
|
|
|
13
12
|
}
|
|
14
13
|
},
|
|
15
14
|
"devDependencies": {
|
|
16
|
-
"@graphcommerce/
|
|
17
|
-
"@graphcommerce/
|
|
18
|
-
"@graphcommerce/
|
|
19
|
-
"@
|
|
20
|
-
"@playwright/test": "^1.17.1"
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^4.0.2",
|
|
16
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.1",
|
|
17
|
+
"@graphcommerce/typescript-config-pwa": "^4.0.1",
|
|
18
|
+
"@playwright/test": "^1.19.1"
|
|
21
19
|
},
|
|
22
20
|
"dependencies": {
|
|
23
|
-
"@
|
|
24
|
-
"@graphcommerce/
|
|
25
|
-
"@graphcommerce/
|
|
26
|
-
"@graphcommerce/
|
|
27
|
-
"@graphcommerce/magento-
|
|
28
|
-
"@graphcommerce/
|
|
29
|
-
"@graphcommerce/next-ui": "^3.25.3",
|
|
30
|
-
"@lingui/macro": "^3.13.0",
|
|
31
|
-
"@material-ui/core": "^4.12.3",
|
|
32
|
-
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
33
|
-
"clsx": "^1.1.1",
|
|
34
|
-
"framer-motion": "^5.5.5",
|
|
35
|
-
"next": "^12.0.7",
|
|
36
|
-
"react": "^17.0.2",
|
|
37
|
-
"react-dom": "^17.0.2",
|
|
21
|
+
"@graphcommerce/framer-scroller": "^2.0.2",
|
|
22
|
+
"@graphcommerce/graphql": "^3.0.2",
|
|
23
|
+
"@graphcommerce/image": "^3.0.2",
|
|
24
|
+
"@graphcommerce/magento-cart": "^4.1.1",
|
|
25
|
+
"@graphcommerce/magento-store": "^4.0.2",
|
|
26
|
+
"@graphcommerce/next-ui": "^4.1.1",
|
|
38
27
|
"schema-dts": "^1.0.0",
|
|
39
|
-
"type-fest": "^2.
|
|
28
|
+
"type-fest": "^2.11.2"
|
|
40
29
|
},
|
|
41
|
-
"
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@lingui/macro": "^3.13.2",
|
|
32
|
+
"@mui/material": "^5.4.1",
|
|
33
|
+
"framer-motion": "^6.2.4",
|
|
34
|
+
"next": "^12.0.10",
|
|
35
|
+
"react": "^17.0.2",
|
|
36
|
+
"react-dom": "^17.0.2"
|
|
37
|
+
}
|
|
42
38
|
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { UseStyles, responsiveVal } from '@graphcommerce/next-ui'
|
|
2
|
-
import { makeStyles, Theme } from '@material-ui/core'
|
|
3
|
-
|
|
4
|
-
import { ProductListCountFragment } from './ProductListCount.gql'
|
|
5
|
-
|
|
6
|
-
const useStyles = makeStyles(
|
|
7
|
-
(theme: Theme) => ({
|
|
8
|
-
productListCount: {
|
|
9
|
-
display: 'grid',
|
|
10
|
-
gridAutoFlow: 'column',
|
|
11
|
-
gridTemplateColumns: '1fr max-content 1fr',
|
|
12
|
-
maxWidth: '100%',
|
|
13
|
-
width: responsiveVal(280, 650),
|
|
14
|
-
margin: '0 auto',
|
|
15
|
-
textAlign: 'center',
|
|
16
|
-
gridArea: 'count',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
marginTop: theme.spacings.md,
|
|
19
|
-
marginBottom: theme.spacings.md,
|
|
20
|
-
},
|
|
21
|
-
line: {
|
|
22
|
-
background: theme.palette.divider,
|
|
23
|
-
width: '100%',
|
|
24
|
-
height: 1,
|
|
25
|
-
lineHeight: 20,
|
|
26
|
-
},
|
|
27
|
-
count: {
|
|
28
|
-
...theme.typography.body2,
|
|
29
|
-
margin: '0 auto',
|
|
30
|
-
display: 'inline-block',
|
|
31
|
-
padding: `0 ${theme.spacings.xs} 0 ${theme.spacings.xs}`,
|
|
32
|
-
color: theme.palette.text.disabled,
|
|
33
|
-
},
|
|
34
|
-
}),
|
|
35
|
-
{
|
|
36
|
-
name: 'ProductListCount',
|
|
37
|
-
},
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
export type ProductCountProps = ProductListCountFragment & UseStyles<typeof useStyles>
|
|
41
|
-
|
|
42
|
-
export default function ProductListCount(props: ProductCountProps) {
|
|
43
|
-
const { total_count } = props
|
|
44
|
-
const classes = useStyles(props)
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<div className={classes.productListCount}>
|
|
48
|
-
<div className={classes.line} />
|
|
49
|
-
<div className={classes.count}>
|
|
50
|
-
{total_count} product{(total_count ?? 0) > 1 ? 's' : ''}
|
|
51
|
-
</div>
|
|
52
|
-
<div className={classes.line} />
|
|
53
|
-
</div>
|
|
54
|
-
)
|
|
55
|
-
}
|