diy-template-components 2.0.68 → 2.0.69
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 +139 -4
- package/build/index.es.js.map +1 -1
- package/build/index.js +139 -4
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -271,6 +271,31 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
271
271
|
fontWeight: '700',
|
|
272
272
|
padding: '6px 16px'
|
|
273
273
|
},
|
|
274
|
+
BottomSheetContainer: {
|
|
275
|
+
display: 'flex',
|
|
276
|
+
flexDirection: 'column',
|
|
277
|
+
borderTop: '1px solid #e5e5e5',
|
|
278
|
+
background: '#021927',
|
|
279
|
+
color: '#FFFFFF'
|
|
280
|
+
},
|
|
281
|
+
BottomSheetPriceContainer: {
|
|
282
|
+
display: 'flex',
|
|
283
|
+
justifyContent: 'space-between',
|
|
284
|
+
padding: '16px 16px 24px'
|
|
285
|
+
},
|
|
286
|
+
BottomSheetOfferContainer: {
|
|
287
|
+
padding: '12px 0 ',
|
|
288
|
+
padding: '16px 16px 24px',
|
|
289
|
+
border: '1px solid rgba(0, 0, 0, 1)'
|
|
290
|
+
},
|
|
291
|
+
offerBottom: {
|
|
292
|
+
display: 'flex',
|
|
293
|
+
justifyContent: 'space-between'
|
|
294
|
+
},
|
|
295
|
+
smallText: {
|
|
296
|
+
fontWeight: '400',
|
|
297
|
+
fontSize: '8px'
|
|
298
|
+
},
|
|
274
299
|
'@media screen and (max-width: 767px)': {
|
|
275
300
|
optionsContainer: {
|
|
276
301
|
flexDirection: 'column',
|
|
@@ -306,6 +331,17 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
306
331
|
borderBottom: '1px solid #F3F3F3',
|
|
307
332
|
width: '100%'
|
|
308
333
|
}
|
|
334
|
+
},
|
|
335
|
+
offerPrice: {
|
|
336
|
+
color: '#FFFFFF',
|
|
337
|
+
fontSize: '18px'
|
|
338
|
+
},
|
|
339
|
+
offerDiscount: {
|
|
340
|
+
color: 'rgba(8, 189, 128, 1)'
|
|
341
|
+
},
|
|
342
|
+
originalPrice: {
|
|
343
|
+
color: '#FFFFFF',
|
|
344
|
+
textDecoration: 'line-through'
|
|
309
345
|
}
|
|
310
346
|
},
|
|
311
347
|
mobileAppNameClass: {
|
|
@@ -1537,13 +1573,24 @@ function DesktopHeader({
|
|
|
1537
1573
|
}));
|
|
1538
1574
|
}
|
|
1539
1575
|
|
|
1576
|
+
var timer = "data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7.99996%2015.1667C4.50663%2015.1667%201.66663%2012.3267%201.66663%208.83333C1.66663%205.34%204.50663%202.5%207.99996%202.5C11.4933%202.5%2014.3333%205.34%2014.3333%208.83333C14.3333%2012.3267%2011.4933%2015.1667%207.99996%2015.1667ZM7.99996%203.5C5.05996%203.5%202.66663%205.89333%202.66663%208.83333C2.66663%2011.7733%205.05996%2014.1667%207.99996%2014.1667C10.94%2014.1667%2013.3333%2011.7733%2013.3333%208.83333C13.3333%205.89333%2010.94%203.5%207.99996%203.5Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M8%209.16671C7.72667%209.16671%207.5%208.94004%207.5%208.66671V5.33337C7.5%205.06004%207.72667%204.83337%208%204.83337C8.27333%204.83337%208.5%205.06004%208.5%205.33337V8.66671C8.5%208.94004%208.27333%209.16671%208%209.16671Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M10%201.83337H6C5.72667%201.83337%205.5%201.60671%205.5%201.33337C5.5%201.06004%205.72667%200.833374%206%200.833374H10C10.2733%200.833374%2010.5%201.06004%2010.5%201.33337C10.5%201.60671%2010.2733%201.83337%2010%201.83337Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E";
|
|
1577
|
+
|
|
1540
1578
|
function MobileHeader({
|
|
1541
1579
|
header,
|
|
1542
1580
|
navData,
|
|
1543
1581
|
isTutorWebsite,
|
|
1544
1582
|
isLandingPage = false,
|
|
1545
|
-
onDownloadAppTriggered
|
|
1583
|
+
onDownloadAppTriggered,
|
|
1584
|
+
extraProps
|
|
1546
1585
|
}) {
|
|
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
|
+
};
|
|
1547
1594
|
const {
|
|
1548
1595
|
isCustomWebsite,
|
|
1549
1596
|
countryCode
|
|
@@ -1579,6 +1626,94 @@ function MobileHeader({
|
|
|
1579
1626
|
|
|
1580
1627
|
// console.log(header, 'sakshat header mobile');
|
|
1581
1628
|
|
|
1629
|
+
const getDiscount = (price, discount) => {
|
|
1630
|
+
return (discount / price * 100).toFixed(2);
|
|
1631
|
+
};
|
|
1632
|
+
const renderer = ({
|
|
1633
|
+
days,
|
|
1634
|
+
hours,
|
|
1635
|
+
minutes,
|
|
1636
|
+
seconds
|
|
1637
|
+
}) => {
|
|
1638
|
+
if (days === 0 && hours < 24) {
|
|
1639
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1640
|
+
className: classes.offerBottom
|
|
1641
|
+
}, /*#__PURE__*/React.createElement("div", null, "Offer ends in"), /*#__PURE__*/React.createElement("div", {
|
|
1642
|
+
style: {
|
|
1643
|
+
display: 'flex',
|
|
1644
|
+
gap: '5px'
|
|
1645
|
+
}
|
|
1646
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1647
|
+
src: timer,
|
|
1648
|
+
alt: ""
|
|
1649
|
+
}), ' ', /*#__PURE__*/React.createElement("div", null, hours, " ", /*#__PURE__*/React.createElement("span", {
|
|
1650
|
+
className: classes.smallText
|
|
1651
|
+
}, "hrs"), " : ", minutes, ' ', /*#__PURE__*/React.createElement("span", {
|
|
1652
|
+
className: classes.smallText
|
|
1653
|
+
}, "Mins"), " : ", seconds, ' ', /*#__PURE__*/React.createElement("span", {
|
|
1654
|
+
className: classes.smallText
|
|
1655
|
+
}, "Secs"))));
|
|
1656
|
+
} else {
|
|
1657
|
+
let given = moment(mockHeader.endDate);
|
|
1658
|
+
let current = moment().startOf('day');
|
|
1659
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1660
|
+
className: classes.offerBottom
|
|
1661
|
+
}, /*#__PURE__*/React.createElement("div", null, "This offer is only valid for"), /*#__PURE__*/React.createElement("div", {
|
|
1662
|
+
style: {
|
|
1663
|
+
display: 'flex',
|
|
1664
|
+
gap: '5px'
|
|
1665
|
+
}
|
|
1666
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1667
|
+
src: timer,
|
|
1668
|
+
alt: ""
|
|
1669
|
+
}), ' ', /*#__PURE__*/React.createElement("div", null, Math.floor(moment.duration(given.diff(current)).asDays()), /*#__PURE__*/React.createElement("span", {
|
|
1670
|
+
className: classes.smallText
|
|
1671
|
+
}, "\xA0\xA0Days"))));
|
|
1672
|
+
}
|
|
1673
|
+
};
|
|
1674
|
+
const OfferDetailsJSX = () => {
|
|
1675
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1676
|
+
className: classes.BottomSheetOfferContainer
|
|
1677
|
+
}, ' ', /*#__PURE__*/React.createElement(Countdown, {
|
|
1678
|
+
renderer: renderer,
|
|
1679
|
+
date: mockHeader?.endDate
|
|
1680
|
+
}));
|
|
1681
|
+
};
|
|
1682
|
+
const BottomSheetJSX = () => {
|
|
1683
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1684
|
+
className: classes.BottomSheetContainer
|
|
1685
|
+
}, OfferDetailsJSX(), /*#__PURE__*/React.createElement("div", {
|
|
1686
|
+
className: classes.BottomSheetPriceContainer
|
|
1687
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1688
|
+
className: classes.BottomSheetPrice
|
|
1689
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1690
|
+
style: {
|
|
1691
|
+
textAlign: 'start'
|
|
1692
|
+
}
|
|
1693
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1694
|
+
className: classes.offerPrice
|
|
1695
|
+
}, mockHeader?.effectivePrice), ' '), /*#__PURE__*/React.createElement("span", {
|
|
1696
|
+
className: classes.originalPrice
|
|
1697
|
+
}, mockHeader?.price), ' ', /*#__PURE__*/React.createElement("span", {
|
|
1698
|
+
className: classes.offerDiscount
|
|
1699
|
+
}, `${getDiscount(mockHeader?.price, mockHeader?.discount)}%`, "\xA0OFF"), "\xA0\xA0")), /*#__PURE__*/React.createElement(Button, {
|
|
1700
|
+
data: {
|
|
1701
|
+
// link: 'headerData?.loginCtaLink',
|
|
1702
|
+
// isLink: 1,
|
|
1703
|
+
value: 'BUY NOW'
|
|
1704
|
+
// isExternal: 1
|
|
1705
|
+
},
|
|
1706
|
+
|
|
1707
|
+
onClick: extraProps?.courseBuyNow,
|
|
1708
|
+
type: 'primary',
|
|
1709
|
+
size: 'medium',
|
|
1710
|
+
target: null,
|
|
1711
|
+
name: "button",
|
|
1712
|
+
rel: null
|
|
1713
|
+
// styling={isMobile ? { margin: '0 40px' } : {}}
|
|
1714
|
+
}))));
|
|
1715
|
+
};
|
|
1716
|
+
|
|
1582
1717
|
if (isTutorWebsite) {
|
|
1583
1718
|
if (isAndroidDelisted && apkURL) {
|
|
1584
1719
|
downloadLink = /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1651,7 +1786,7 @@ function MobileHeader({
|
|
|
1651
1786
|
downloadLink = null;
|
|
1652
1787
|
}
|
|
1653
1788
|
}
|
|
1654
|
-
return /*#__PURE__*/React.createElement("nav", {
|
|
1789
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("nav", {
|
|
1655
1790
|
ref: navEl,
|
|
1656
1791
|
className: classes.section
|
|
1657
1792
|
}, !(header?.websiteLogo === DEFAULT_HEADER_IMAGE_LP && isCustomWebsite) ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -1684,7 +1819,7 @@ function MobileHeader({
|
|
|
1684
1819
|
order: 1
|
|
1685
1820
|
}))) : null, isTutorWebsite && header?.appName ? /*#__PURE__*/React.createElement("p", {
|
|
1686
1821
|
className: classes.mobileAppNameClass
|
|
1687
|
-
},
|
|
1822
|
+
}, ' ', header?.appName) : null), downloadLink), sideMenu ? /*#__PURE__*/React.createElement("div", {
|
|
1688
1823
|
className: classes.mobileMenu
|
|
1689
1824
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1690
1825
|
className: classes.backdrop,
|
|
@@ -1704,7 +1839,7 @@ function MobileHeader({
|
|
|
1704
1839
|
style: {
|
|
1705
1840
|
paddingTop: '30px'
|
|
1706
1841
|
}
|
|
1707
|
-
}));
|
|
1842
|
+
})), /*#__PURE__*/React.createElement(BottomSheetJSX, null));
|
|
1708
1843
|
}
|
|
1709
1844
|
|
|
1710
1845
|
function Header({
|