diy-template-components 2.0.69 → 2.0.71
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 -28
- package/build/index.es.js.map +1 -1
- package/build/index.js +19 -28
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -342,6 +342,13 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
342
342
|
originalPrice: {
|
|
343
343
|
color: '#FFFFFF',
|
|
344
344
|
textDecoration: 'line-through'
|
|
345
|
+
},
|
|
346
|
+
BottomSheetContainer: {
|
|
347
|
+
position: 'fixed',
|
|
348
|
+
bottom: 0,
|
|
349
|
+
left: 0,
|
|
350
|
+
width: '100%',
|
|
351
|
+
zIndex: '2'
|
|
345
352
|
}
|
|
346
353
|
},
|
|
347
354
|
mobileAppNameClass: {
|
|
@@ -1389,14 +1396,6 @@ function DesktopHeader({
|
|
|
1389
1396
|
onDownloadAppTriggered,
|
|
1390
1397
|
extraProps
|
|
1391
1398
|
}) {
|
|
1392
|
-
let mockHeader = {
|
|
1393
|
-
isOfferActive: true,
|
|
1394
|
-
effectivePrice: 0.51,
|
|
1395
|
-
price: 1,
|
|
1396
|
-
discount: 0.5,
|
|
1397
|
-
endDate: Date.now() + 24 * 60 * 60 * 1000,
|
|
1398
|
-
offerPriceValidFor: 20
|
|
1399
|
-
};
|
|
1400
1399
|
const {
|
|
1401
1400
|
isFixed = true
|
|
1402
1401
|
} = header;
|
|
@@ -1441,7 +1440,7 @@ function DesktopHeader({
|
|
|
1441
1440
|
if (days === 0 && hours < 24) {
|
|
1442
1441
|
return /*#__PURE__*/React.createElement("span", null, hours, "h : ", minutes, "m : ", seconds, "s");
|
|
1443
1442
|
} else {
|
|
1444
|
-
let given = moment(
|
|
1443
|
+
let given = moment(header.endDate);
|
|
1445
1444
|
let current = moment().startOf('day');
|
|
1446
1445
|
return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), " ", 'Days');
|
|
1447
1446
|
}
|
|
@@ -1474,10 +1473,10 @@ function DesktopHeader({
|
|
|
1474
1473
|
};
|
|
1475
1474
|
const OfferDetailsJSX = () => {
|
|
1476
1475
|
let conversions = extraProps?.conversions || 0;
|
|
1477
|
-
if (checkForShowDiscount(
|
|
1476
|
+
if (checkForShowDiscount(header?.endDate, header?.offerPriceValidFor, header?.discount) && header?.endDate ? checkIfOfferIsValid(header?.endDate) : true) {
|
|
1478
1477
|
return /*#__PURE__*/React.createElement("div", {
|
|
1479
1478
|
className: classes.rightNav
|
|
1480
|
-
},
|
|
1479
|
+
}, header?.isOfferActive && (header?.offerPriceValidFor ? header.offerPriceValidFor - conversions > 0 : true) ? /*#__PURE__*/React.createElement("div", {
|
|
1481
1480
|
className: classes.offerBox
|
|
1482
1481
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1483
1482
|
className: classes.offerBoxText
|
|
@@ -1485,20 +1484,20 @@ function DesktopHeader({
|
|
|
1485
1484
|
className: classes.offerBoxCountDown
|
|
1486
1485
|
}, /*#__PURE__*/React.createElement(Countdown, {
|
|
1487
1486
|
renderer: renderer,
|
|
1488
|
-
date:
|
|
1487
|
+
date: header?.endDate
|
|
1489
1488
|
}))) : null, /*#__PURE__*/React.createElement("div", {
|
|
1490
1489
|
className: classes.priceBox
|
|
1491
1490
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
1492
1491
|
className: classes.offerDiscount
|
|
1493
|
-
}, `${getDiscount(
|
|
1492
|
+
}, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0", /*#__PURE__*/React.createElement("span", {
|
|
1494
1493
|
className: classes.originalPrice
|
|
1495
|
-
},
|
|
1494
|
+
}, header?.price), ' '), /*#__PURE__*/React.createElement("div", {
|
|
1496
1495
|
style: {
|
|
1497
1496
|
textAlign: 'end'
|
|
1498
1497
|
}
|
|
1499
1498
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1500
1499
|
className: classes.offerPrice
|
|
1501
|
-
},
|
|
1500
|
+
}, header?.effectivePrice), ' ')), /*#__PURE__*/React.createElement(Button, {
|
|
1502
1501
|
data: {
|
|
1503
1502
|
// link: 'headerData?.loginCtaLink',
|
|
1504
1503
|
// isLink: 1,
|
|
@@ -1583,14 +1582,6 @@ function MobileHeader({
|
|
|
1583
1582
|
onDownloadAppTriggered,
|
|
1584
1583
|
extraProps
|
|
1585
1584
|
}) {
|
|
1586
|
-
let mockHeader = {
|
|
1587
|
-
isOfferActive: true,
|
|
1588
|
-
effectivePrice: 0.51,
|
|
1589
|
-
price: 1,
|
|
1590
|
-
discount: 0.5,
|
|
1591
|
-
endDate: Date.now() + 24 * 60 * 60 * 1000,
|
|
1592
|
-
offerPriceValidFor: 20
|
|
1593
|
-
};
|
|
1594
1585
|
const {
|
|
1595
1586
|
isCustomWebsite,
|
|
1596
1587
|
countryCode
|
|
@@ -1654,7 +1645,7 @@ function MobileHeader({
|
|
|
1654
1645
|
className: classes.smallText
|
|
1655
1646
|
}, "Secs"))));
|
|
1656
1647
|
} else {
|
|
1657
|
-
let given = moment(
|
|
1648
|
+
let given = moment(header.endDate);
|
|
1658
1649
|
let current = moment().startOf('day');
|
|
1659
1650
|
return /*#__PURE__*/React.createElement("div", {
|
|
1660
1651
|
className: classes.offerBottom
|
|
@@ -1676,7 +1667,7 @@ function MobileHeader({
|
|
|
1676
1667
|
className: classes.BottomSheetOfferContainer
|
|
1677
1668
|
}, ' ', /*#__PURE__*/React.createElement(Countdown, {
|
|
1678
1669
|
renderer: renderer,
|
|
1679
|
-
date:
|
|
1670
|
+
date: header?.endDate
|
|
1680
1671
|
}));
|
|
1681
1672
|
};
|
|
1682
1673
|
const BottomSheetJSX = () => {
|
|
@@ -1692,11 +1683,11 @@ function MobileHeader({
|
|
|
1692
1683
|
}
|
|
1693
1684
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1694
1685
|
className: classes.offerPrice
|
|
1695
|
-
},
|
|
1686
|
+
}, header?.effectivePrice), ' '), /*#__PURE__*/React.createElement("span", {
|
|
1696
1687
|
className: classes.originalPrice
|
|
1697
|
-
},
|
|
1688
|
+
}, header?.price), ' ', /*#__PURE__*/React.createElement("span", {
|
|
1698
1689
|
className: classes.offerDiscount
|
|
1699
|
-
}, `${getDiscount(
|
|
1690
|
+
}, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0")), /*#__PURE__*/React.createElement(Button, {
|
|
1700
1691
|
data: {
|
|
1701
1692
|
// link: 'headerData?.loginCtaLink',
|
|
1702
1693
|
// isLink: 1,
|