diy-template-components 2.0.70 → 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 CHANGED
@@ -1396,14 +1396,6 @@ function DesktopHeader({
1396
1396
  onDownloadAppTriggered,
1397
1397
  extraProps
1398
1398
  }) {
1399
- let mockHeader = {
1400
- isOfferActive: true,
1401
- effectivePrice: 0.51,
1402
- price: 1,
1403
- discount: 0.5,
1404
- endDate: Date.now() + 24 * 60 * 60 * 1000,
1405
- offerPriceValidFor: 20
1406
- };
1407
1399
  const {
1408
1400
  isFixed = true
1409
1401
  } = header;
@@ -1448,7 +1440,7 @@ function DesktopHeader({
1448
1440
  if (days === 0 && hours < 24) {
1449
1441
  return /*#__PURE__*/React.createElement("span", null, hours, "h : ", minutes, "m : ", seconds, "s");
1450
1442
  } else {
1451
- let given = moment(mockHeader.endDate);
1443
+ let given = moment(header.endDate);
1452
1444
  let current = moment().startOf('day');
1453
1445
  return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), " ", 'Days');
1454
1446
  }
@@ -1481,10 +1473,10 @@ function DesktopHeader({
1481
1473
  };
1482
1474
  const OfferDetailsJSX = () => {
1483
1475
  let conversions = extraProps?.conversions || 0;
1484
- if (checkForShowDiscount(mockHeader?.endDate, mockHeader?.offerPriceValidFor, mockHeader?.discount) && mockHeader?.endDate ? checkIfOfferIsValid(mockHeader?.endDate) : true) {
1476
+ if (checkForShowDiscount(header?.endDate, header?.offerPriceValidFor, header?.discount) && header?.endDate ? checkIfOfferIsValid(header?.endDate) : true) {
1485
1477
  return /*#__PURE__*/React.createElement("div", {
1486
1478
  className: classes.rightNav
1487
- }, mockHeader?.isOfferActive && (mockHeader?.offerPriceValidFor ? mockHeader.offerPriceValidFor - conversions > 0 : true) ? /*#__PURE__*/React.createElement("div", {
1479
+ }, header?.isOfferActive && (header?.offerPriceValidFor ? header.offerPriceValidFor - conversions > 0 : true) ? /*#__PURE__*/React.createElement("div", {
1488
1480
  className: classes.offerBox
1489
1481
  }, /*#__PURE__*/React.createElement("div", {
1490
1482
  className: classes.offerBoxText
@@ -1492,20 +1484,20 @@ function DesktopHeader({
1492
1484
  className: classes.offerBoxCountDown
1493
1485
  }, /*#__PURE__*/React.createElement(Countdown, {
1494
1486
  renderer: renderer,
1495
- date: mockHeader?.endDate
1487
+ date: header?.endDate
1496
1488
  }))) : null, /*#__PURE__*/React.createElement("div", {
1497
1489
  className: classes.priceBox
1498
1490
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
1499
1491
  className: classes.offerDiscount
1500
- }, `${getDiscount(mockHeader?.price, mockHeader?.discount)}%`, "\xA0OFF"), "\xA0\xA0", /*#__PURE__*/React.createElement("span", {
1492
+ }, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0", /*#__PURE__*/React.createElement("span", {
1501
1493
  className: classes.originalPrice
1502
- }, mockHeader?.price), ' '), /*#__PURE__*/React.createElement("div", {
1494
+ }, header?.price), ' '), /*#__PURE__*/React.createElement("div", {
1503
1495
  style: {
1504
1496
  textAlign: 'end'
1505
1497
  }
1506
1498
  }, /*#__PURE__*/React.createElement("span", {
1507
1499
  className: classes.offerPrice
1508
- }, mockHeader?.effectivePrice), ' ')), /*#__PURE__*/React.createElement(Button, {
1500
+ }, header?.effectivePrice), ' ')), /*#__PURE__*/React.createElement(Button, {
1509
1501
  data: {
1510
1502
  // link: 'headerData?.loginCtaLink',
1511
1503
  // isLink: 1,
@@ -1590,14 +1582,6 @@ function MobileHeader({
1590
1582
  onDownloadAppTriggered,
1591
1583
  extraProps
1592
1584
  }) {
1593
- let mockHeader = {
1594
- isOfferActive: true,
1595
- effectivePrice: 0.51,
1596
- price: 1,
1597
- discount: 0.5,
1598
- endDate: Date.now() + 24 * 60 * 60 * 1000,
1599
- offerPriceValidFor: 20
1600
- };
1601
1585
  const {
1602
1586
  isCustomWebsite,
1603
1587
  countryCode
@@ -1661,7 +1645,7 @@ function MobileHeader({
1661
1645
  className: classes.smallText
1662
1646
  }, "Secs"))));
1663
1647
  } else {
1664
- let given = moment(mockHeader.endDate);
1648
+ let given = moment(header.endDate);
1665
1649
  let current = moment().startOf('day');
1666
1650
  return /*#__PURE__*/React.createElement("div", {
1667
1651
  className: classes.offerBottom
@@ -1683,7 +1667,7 @@ function MobileHeader({
1683
1667
  className: classes.BottomSheetOfferContainer
1684
1668
  }, ' ', /*#__PURE__*/React.createElement(Countdown, {
1685
1669
  renderer: renderer,
1686
- date: mockHeader?.endDate
1670
+ date: header?.endDate
1687
1671
  }));
1688
1672
  };
1689
1673
  const BottomSheetJSX = () => {
@@ -1699,11 +1683,11 @@ function MobileHeader({
1699
1683
  }
1700
1684
  }, /*#__PURE__*/React.createElement("span", {
1701
1685
  className: classes.offerPrice
1702
- }, mockHeader?.effectivePrice), ' '), /*#__PURE__*/React.createElement("span", {
1686
+ }, header?.effectivePrice), ' '), /*#__PURE__*/React.createElement("span", {
1703
1687
  className: classes.originalPrice
1704
- }, mockHeader?.price), ' ', /*#__PURE__*/React.createElement("span", {
1688
+ }, header?.price), ' ', /*#__PURE__*/React.createElement("span", {
1705
1689
  className: classes.offerDiscount
1706
- }, `${getDiscount(mockHeader?.price, mockHeader?.discount)}%`, "\xA0OFF"), "\xA0\xA0")), /*#__PURE__*/React.createElement(Button, {
1690
+ }, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0")), /*#__PURE__*/React.createElement(Button, {
1707
1691
  data: {
1708
1692
  // link: 'headerData?.loginCtaLink',
1709
1693
  // isLink: 1,