@shopgate/engage 7.32.0-beta.17 → 7.32.0-beta.18
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/filter/components/FilterItem/index.js +3 -0
- package/filter/components/PriceSlider/components/Label/index.js +7 -3
- package/package.json +7 -7
- package/product/components/ProductRatingStars/ProductRatingStars.d.ts.map +1 -1
- package/product/components/ProductRatingStars/ProductRatingStars.js +2 -13
- package/product/components/Rating/index.js +2 -13
|
@@ -11,7 +11,11 @@ const {
|
|
|
11
11
|
} = appConfig;
|
|
12
12
|
const useStyles = makeStyles()(theme => ({
|
|
13
13
|
priceRange: {
|
|
14
|
-
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexWrap: 'wrap',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
columnGap: theme.spacing(0.5),
|
|
18
|
+
rowGap: theme.spacing(1)
|
|
15
19
|
},
|
|
16
20
|
editableField: {
|
|
17
21
|
color: theme.palette.text.primary,
|
|
@@ -71,7 +75,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
71
75
|
* @param {number} length Amount of characters the field has to fit.
|
|
72
76
|
* @returns {string}
|
|
73
77
|
*/
|
|
74
|
-
const fieldWidth = length => `${length +
|
|
78
|
+
const fieldWidth = length => `${length + 1}ch`;
|
|
75
79
|
|
|
76
80
|
/**
|
|
77
81
|
* The filter price range slider label component.
|
|
@@ -137,7 +141,6 @@ function Label(props) {
|
|
|
137
141
|
currency
|
|
138
142
|
}).format('0').replace('0.00', '');
|
|
139
143
|
return /*#__PURE__*/_jsxs("div", {
|
|
140
|
-
className: classes.priceRange,
|
|
141
144
|
children: [/*#__PURE__*/_jsx("span", {
|
|
142
145
|
className: classes.srOnly,
|
|
143
146
|
children: i18n.text('price.range', {
|
|
@@ -147,6 +150,7 @@ function Label(props) {
|
|
|
147
150
|
}), /*#__PURE__*/_jsxs(I18n.Text, {
|
|
148
151
|
string: "price.range",
|
|
149
152
|
"aria-hidden": true,
|
|
153
|
+
className: classes.priceRange,
|
|
150
154
|
children: [/*#__PURE__*/_jsx(I18n.Placeholder, {
|
|
151
155
|
forKey: "fromPrice",
|
|
152
156
|
children: /*#__PURE__*/_jsxs("span", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/engage",
|
|
3
|
-
"version": "7.32.0-beta.
|
|
3
|
+
"version": "7.32.0-beta.18",
|
|
4
4
|
"description": "Shopgate's ENGAGE library.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Shopgate <support@shopgate.com>",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@emotion/react": "^11.14.0",
|
|
20
20
|
"@shopgate/native-modules": "1.0.0-beta.34",
|
|
21
|
-
"@shopgate/pwa-common": "7.32.0-beta.
|
|
22
|
-
"@shopgate/pwa-common-commerce": "7.32.0-beta.
|
|
23
|
-
"@shopgate/pwa-core": "7.32.0-beta.
|
|
24
|
-
"@shopgate/pwa-ui-ios": "7.32.0-beta.
|
|
25
|
-
"@shopgate/pwa-ui-material": "7.32.0-beta.
|
|
26
|
-
"@shopgate/pwa-ui-shared": "7.32.0-beta.
|
|
21
|
+
"@shopgate/pwa-common": "7.32.0-beta.18",
|
|
22
|
+
"@shopgate/pwa-common-commerce": "7.32.0-beta.18",
|
|
23
|
+
"@shopgate/pwa-core": "7.32.0-beta.18",
|
|
24
|
+
"@shopgate/pwa-ui-ios": "7.32.0-beta.18",
|
|
25
|
+
"@shopgate/pwa-ui-material": "7.32.0-beta.18",
|
|
26
|
+
"@shopgate/pwa-ui-shared": "7.32.0-beta.18",
|
|
27
27
|
"@stripe/react-stripe-js": "^1.16.5",
|
|
28
28
|
"@stripe/stripe-js": "^1.44.1",
|
|
29
29
|
"@virtuous/conductor": "~2.5.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductRatingStars.d.ts","sourceRoot":"","sources":["../../../../product/components/ProductRatingStars/ProductRatingStars.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductRatingStars.d.ts","sourceRoot":"","sources":["../../../../product/components/ProductRatingStars/ProductRatingStars.tsx"],"names":[],"mappings":"AAeA,UAAU,WAAW;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC;CAClC;mFAQE,WAAW;AAmBd,wBAAwC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { memo
|
|
1
|
+
import { memo } from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import appConfig from '@shopgate/pwa-common/helpers/config';
|
|
4
4
|
import { getProductRating } from '@shopgate/pwa-common-commerce/product/selectors/product';
|
|
5
5
|
import { RatingStars } from '@shopgate/engage/components';
|
|
6
6
|
import useShowEmptyRatingStars from "../../hooks/useShowEmptyRatingStars";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
const {
|
|
9
|
-
hasReviews
|
|
10
|
-
} = appConfig;
|
|
11
8
|
/**
|
|
12
9
|
* The product RatingStars component.
|
|
13
10
|
*/
|
|
@@ -21,15 +18,7 @@ const ProductRatingStars = ({
|
|
|
21
18
|
productId
|
|
22
19
|
}));
|
|
23
20
|
const showEmptyRatingStars = useShowEmptyRatingStars();
|
|
24
|
-
const showRatings =
|
|
25
|
-
if (hasReviews && (rating?.average ?? 0) > 0) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
if (hasReviews && showEmptyRatingStars && rating) {
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
return false;
|
|
32
|
-
}, [rating, showEmptyRatingStars]);
|
|
21
|
+
const showRatings = appConfig.hasReviews && ((rating?.average ?? 0) > 0 || showEmptyRatingStars && Boolean(rating));
|
|
33
22
|
if (!showRatings) {
|
|
34
23
|
return null;
|
|
35
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { memo
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useSelector } from 'react-redux';
|
|
4
4
|
import appConfig from '@shopgate/pwa-common/helpers/config';
|
|
@@ -9,9 +9,6 @@ import RatingCount from '@shopgate/engage/reviews/components/Reviews/components/
|
|
|
9
9
|
import { useShowEmptyRatingStars } from '@shopgate/engage/product/hooks';
|
|
10
10
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const {
|
|
13
|
-
hasReviews
|
|
14
|
-
} = appConfig;
|
|
15
12
|
const useStyles = makeStyles()(theme => ({
|
|
16
13
|
container: {
|
|
17
14
|
display: 'flex',
|
|
@@ -47,15 +44,7 @@ const Rating = ({
|
|
|
47
44
|
productId
|
|
48
45
|
}));
|
|
49
46
|
const showEmptyRatingStars = useShowEmptyRatingStars();
|
|
50
|
-
const showRatings =
|
|
51
|
-
if (hasReviews && (rating?.average ?? 0) > 0) {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
if (hasReviews && showEmptyRatingStars && rating) {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
return false;
|
|
58
|
-
}, [rating, showEmptyRatingStars]);
|
|
47
|
+
const showRatings = appConfig.hasReviews && ((rating?.average ?? 0) > 0 || showEmptyRatingStars && Boolean(rating));
|
|
59
48
|
return /*#__PURE__*/_jsx(SurroundPortals, {
|
|
60
49
|
portalName: PRODUCT_RATING,
|
|
61
50
|
children: showRatings && /*#__PURE__*/_jsxs("div", {
|