diy-template-components 2.0.71 → 2.0.73
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.es.js +19 -13
- package/build/index.es.js.map +1 -1
- package/build/index.js +19 -13
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -1473,10 +1473,11 @@ function DesktopHeader({
|
|
|
1473
1473
|
};
|
|
1474
1474
|
const OfferDetailsJSX = () => {
|
|
1475
1475
|
let conversions = extraProps?.conversions || 0;
|
|
1476
|
+
const currentTimestamp = new Date().getTime();
|
|
1476
1477
|
if (checkForShowDiscount(header?.endDate, header?.offerPriceValidFor, header?.discount) && header?.endDate ? checkIfOfferIsValid(header?.endDate) : true) {
|
|
1477
1478
|
return /*#__PURE__*/React.createElement("div", {
|
|
1478
1479
|
className: classes.rightNav
|
|
1479
|
-
}, header?.isOfferActive && (header?.offerPriceValidFor ? header.offerPriceValidFor - conversions > 0 : true) ? /*#__PURE__*/React.createElement("div", {
|
|
1480
|
+
}, header?.isOfferActive && header?.endDate && header?.endDate && header?.endDate > currentTimestamp && (header?.offerPriceValidFor ? header.offerPriceValidFor - conversions > 0 : true) ? /*#__PURE__*/React.createElement("div", {
|
|
1480
1481
|
className: classes.offerBox
|
|
1481
1482
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1482
1483
|
className: classes.offerBoxText
|
|
@@ -1487,11 +1488,11 @@ function DesktopHeader({
|
|
|
1487
1488
|
date: header?.endDate
|
|
1488
1489
|
}))) : null, /*#__PURE__*/React.createElement("div", {
|
|
1489
1490
|
className: classes.priceBox
|
|
1490
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
1491
|
+
}, header?.price && header?.discount && header?.effectivePrice && header?.price !== header?.effectivePrice ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
1491
1492
|
className: classes.offerDiscount
|
|
1492
1493
|
}, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0", /*#__PURE__*/React.createElement("span", {
|
|
1493
1494
|
className: classes.originalPrice
|
|
1494
|
-
}, header?.price), ' '), /*#__PURE__*/React.createElement("div", {
|
|
1495
|
+
}, header?.price), ' ') : null, /*#__PURE__*/React.createElement("div", {
|
|
1495
1496
|
style: {
|
|
1496
1497
|
textAlign: 'end'
|
|
1497
1498
|
}
|
|
@@ -1537,7 +1538,7 @@ function DesktopHeader({
|
|
|
1537
1538
|
className: classes.headerSection
|
|
1538
1539
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1539
1540
|
className: classes.headerContainer
|
|
1540
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
1541
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1541
1542
|
className: classes.imageDiv
|
|
1542
1543
|
}, header?.websiteLogo ? /*#__PURE__*/React.createElement("a", {
|
|
1543
1544
|
href: logoUrl,
|
|
@@ -1565,7 +1566,7 @@ function DesktopHeader({
|
|
|
1565
1566
|
moreContent: moreContentFn(),
|
|
1566
1567
|
isTutorWebsite: isTutorWebsite,
|
|
1567
1568
|
onDownloadAppTriggered: onDownloadAppTriggered
|
|
1568
|
-
})
|
|
1569
|
+
}), OfferDetailsJSX())) : /*#__PURE__*/React.createElement("div", {
|
|
1569
1570
|
style: {
|
|
1570
1571
|
paddingTop: '30px'
|
|
1571
1572
|
}
|
|
@@ -1663,12 +1664,17 @@ function MobileHeader({
|
|
|
1663
1664
|
}
|
|
1664
1665
|
};
|
|
1665
1666
|
const OfferDetailsJSX = () => {
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1667
|
+
let conversions = extraProps?.conversions || 0;
|
|
1668
|
+
const currentTimestamp = new Date().getTime();
|
|
1669
|
+
if (header?.isOfferActive && header?.endDate && header?.endDate && header?.endDate > currentTimestamp && (header?.offerPriceValidFor ? header.offerPriceValidFor - conversions > 0 : true)) {
|
|
1670
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1671
|
+
className: classes.BottomSheetOfferContainer
|
|
1672
|
+
}, ' ', /*#__PURE__*/React.createElement(Countdown, {
|
|
1673
|
+
renderer: renderer,
|
|
1674
|
+
date: header?.endDate
|
|
1675
|
+
}));
|
|
1676
|
+
}
|
|
1677
|
+
return null;
|
|
1672
1678
|
};
|
|
1673
1679
|
const BottomSheetJSX = () => {
|
|
1674
1680
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1683,11 +1689,11 @@ function MobileHeader({
|
|
|
1683
1689
|
}
|
|
1684
1690
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1685
1691
|
className: classes.offerPrice
|
|
1686
|
-
}, header?.effectivePrice), ' '), /*#__PURE__*/React.createElement("span", {
|
|
1692
|
+
}, header?.effectivePrice), ' '), header?.price && header?.discount && header?.effectivePrice && header?.price !== header?.effectivePrice ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
1687
1693
|
className: classes.originalPrice
|
|
1688
1694
|
}, header?.price), ' ', /*#__PURE__*/React.createElement("span", {
|
|
1689
1695
|
className: classes.offerDiscount
|
|
1690
|
-
}, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0")), /*#__PURE__*/React.createElement(Button, {
|
|
1696
|
+
}, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0") : null)), /*#__PURE__*/React.createElement(Button, {
|
|
1691
1697
|
data: {
|
|
1692
1698
|
// link: 'headerData?.loginCtaLink',
|
|
1693
1699
|
// isLink: 1,
|