@trafilea/afrodita-components 6.59.0 → 6.59.1
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/build/index.d.ts +2 -1
- package/build/index.esm.js +11 -9
- package/build/index.esm.js.map +1 -1
- package/build/index.js +11 -9
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -7650,11 +7650,11 @@ var templateObject_1$1G, templateObject_2$1k, templateObject_3$16, templateObjec
|
|
|
7650
7650
|
|
|
7651
7651
|
var ProductItemMobile = function (_a) {
|
|
7652
7652
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
7653
|
-
var title = _a.title, image = _a.image, imageHover = _a.imageHover, price = _a.price, rating = _a.rating, size = _a.size,
|
|
7653
|
+
var title = _a.title, image = _a.image, imageHover = _a.imageHover, price = _a.price, rating = _a.rating, _o = _a.hideRating, hideRating = _o === void 0 ? false : _o, size = _a.size, _p = _a.alignName, alignName = _p === void 0 ? 'center' : _p, url = _a.url, className = _a.className, topTag = _a.topTag, bottomTag = _a.bottomTag, onClick = _a.onClick, _q = _a.priceDisplayType, priceDisplayType = _q === void 0 ? 'default' : _q, priceAtBottom = _a.priceAtBottom, ratingOnTop = _a.ratingOnTop, priceLoading = _a.priceLoading, _r = _a.noFollow, noFollow = _r === void 0 ? false : _r, _s = _a.colorPicker, colorPicker = _s === void 0 ? {
|
|
7654
7654
|
display: false,
|
|
7655
7655
|
position: 'top',
|
|
7656
7656
|
component: undefined,
|
|
7657
|
-
} :
|
|
7657
|
+
} : _s, _t = _a.isBNPL, isBNPL = _t === void 0 ? {
|
|
7658
7658
|
displayBNPL: false,
|
|
7659
7659
|
installments: 4,
|
|
7660
7660
|
installmentPrice: '',
|
|
@@ -7663,10 +7663,10 @@ var ProductItemMobile = function (_a) {
|
|
|
7663
7663
|
showLogo: true,
|
|
7664
7664
|
iconColor: '#292929',
|
|
7665
7665
|
fontSize: '12px',
|
|
7666
|
-
} :
|
|
7666
|
+
} : _t, _u = _a.hasStrength, hasStrength = _u === void 0 ? {
|
|
7667
7667
|
strength: -1,
|
|
7668
7668
|
description: '',
|
|
7669
|
-
} :
|
|
7669
|
+
} : _u, _v = _a.clubPrice, clubPrice = _v === void 0 ? '' : _v, _w = _a.showClubPriceLabel, showClubPriceLabel = _w === void 0 ? false : _w, isRatingLoading = _a.isRatingLoading, _x = _a.version, version = _x === void 0 ? 1 : _x, _y = _a.showDiscountPercentageTag, showDiscountPercentageTag = _y === void 0 ? false : _y, discountTagLoading = _a.discountTagLoading, discountTag = _a.discountTag, _z = _a.isOnViewport, isOnViewport = _z === void 0 ? false : _z, _0 = _a.hasDefaultSize, hasDefaultSize = _0 === void 0 ? false : _0, clubOffer = _a.clubOffer, likeBtn = _a.likeBtn, onClickBottomButton = _a.onClickBottomButton, _1 = _a.showDecimals, showDecimals = _1 === void 0 ? true : _1, _2 = _a.showDivider, showDivider = _2 === void 0 ? false : _2, _3 = _a.invertPriceDirection, invertPriceDirection = _3 === void 0 ? false : _3, _4 = _a.priceAndReviewInOneLine, priceAndReviewInOneLine = _4 === void 0 ? false : _4;
|
|
7670
7670
|
var theme = useTheme();
|
|
7671
7671
|
var styles = getStylesBySize$b(size);
|
|
7672
7672
|
var isMobile = useWindowDimensions().isMobile;
|
|
@@ -7681,6 +7681,8 @@ var ProductItemMobile = function (_a) {
|
|
|
7681
7681
|
var PriceLabelDisplay = function (labelVersion) {
|
|
7682
7682
|
var _a, _b, _c, _d, _e, _f;
|
|
7683
7683
|
if (labelVersion === void 0) { labelVersion = version; }
|
|
7684
|
+
if (priceDisplayType === 'hidden')
|
|
7685
|
+
return null;
|
|
7684
7686
|
switch (labelVersion) {
|
|
7685
7687
|
case 4:
|
|
7686
7688
|
return priceDisplayType === 'styled' ? (jsx(PriceLabelV4, { finalPrice: price.finalPrice, originalPrice: price.originalPrice, finalPriceStyled: false, color: price.color, size: exports.ComponentSize.Medium, testId: "volume-discount-v4", clubStyle: showClubPriceLabel, clubPrice: clubPrice, styledPrice: true, finalPriceStyle: showClubPriceLabel
|
|
@@ -7719,16 +7721,16 @@ var ProductItemMobile = function (_a) {
|
|
|
7719
7721
|
}
|
|
7720
7722
|
};
|
|
7721
7723
|
var RatingDisplay = function () {
|
|
7724
|
+
if (hideRating || (!rating.reviews && !rating.rating)) {
|
|
7725
|
+
return jsx(Fragment, {}, void 0);
|
|
7726
|
+
}
|
|
7722
7727
|
if (isRatingLoading) {
|
|
7723
7728
|
return jsx(SkeletonBox, { height: "20px", width: "80px" }, void 0);
|
|
7724
7729
|
}
|
|
7725
|
-
if (!rating.reviews && !rating.rating) {
|
|
7726
|
-
return jsx(Fragment, {}, void 0);
|
|
7727
|
-
}
|
|
7728
7730
|
return (jsx(Rating, { size: size === exports.ComponentSize.Large ? exports.ComponentSize.Small : exports.ComponentSize.XSmall, rating: rating.rating, reviews: rating === null || rating === void 0 ? void 0 : rating.reviews, reviewsText: "", wrapWithParenthesis: true }, void 0));
|
|
7729
7731
|
};
|
|
7730
|
-
var
|
|
7731
|
-
var
|
|
7732
|
+
var _5 = React$2.useState((_b = likeBtn === null || likeBtn === void 0 ? void 0 : likeBtn.isLiked) !== null && _b !== void 0 ? _b : false), isLiked = _5[0], setIsLiked = _5[1];
|
|
7733
|
+
var _6 = React$2.useState((_c = likeBtn === null || likeBtn === void 0 ? void 0 : likeBtn.likes) !== null && _c !== void 0 ? _c : 0), likesCount = _6[0], setLikesCount = _6[1];
|
|
7732
7734
|
var handleLikeClick = function (e) {
|
|
7733
7735
|
e.stopPropagation();
|
|
7734
7736
|
if (isLiked) {
|