diy-template-components 2.0.68 → 2.0.70
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 +146 -4
- package/build/index.es.js.map +1 -1
- package/build/index.js +146 -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,24 @@ 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'
|
|
345
|
+
},
|
|
346
|
+
BottomSheetContainer: {
|
|
347
|
+
position: 'fixed',
|
|
348
|
+
bottom: 0,
|
|
349
|
+
left: 0,
|
|
350
|
+
width: '100%',
|
|
351
|
+
zIndex: '2'
|
|
309
352
|
}
|
|
310
353
|
},
|
|
311
354
|
mobileAppNameClass: {
|
|
@@ -1537,13 +1580,24 @@ function DesktopHeader({
|
|
|
1537
1580
|
}));
|
|
1538
1581
|
}
|
|
1539
1582
|
|
|
1583
|
+
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";
|
|
1584
|
+
|
|
1540
1585
|
function MobileHeader({
|
|
1541
1586
|
header,
|
|
1542
1587
|
navData,
|
|
1543
1588
|
isTutorWebsite,
|
|
1544
1589
|
isLandingPage = false,
|
|
1545
|
-
onDownloadAppTriggered
|
|
1590
|
+
onDownloadAppTriggered,
|
|
1591
|
+
extraProps
|
|
1546
1592
|
}) {
|
|
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
|
+
};
|
|
1547
1601
|
const {
|
|
1548
1602
|
isCustomWebsite,
|
|
1549
1603
|
countryCode
|
|
@@ -1579,6 +1633,94 @@ function MobileHeader({
|
|
|
1579
1633
|
|
|
1580
1634
|
// console.log(header, 'sakshat header mobile');
|
|
1581
1635
|
|
|
1636
|
+
const getDiscount = (price, discount) => {
|
|
1637
|
+
return (discount / price * 100).toFixed(2);
|
|
1638
|
+
};
|
|
1639
|
+
const renderer = ({
|
|
1640
|
+
days,
|
|
1641
|
+
hours,
|
|
1642
|
+
minutes,
|
|
1643
|
+
seconds
|
|
1644
|
+
}) => {
|
|
1645
|
+
if (days === 0 && hours < 24) {
|
|
1646
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1647
|
+
className: classes.offerBottom
|
|
1648
|
+
}, /*#__PURE__*/React.createElement("div", null, "Offer ends in"), /*#__PURE__*/React.createElement("div", {
|
|
1649
|
+
style: {
|
|
1650
|
+
display: 'flex',
|
|
1651
|
+
gap: '5px'
|
|
1652
|
+
}
|
|
1653
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1654
|
+
src: timer,
|
|
1655
|
+
alt: ""
|
|
1656
|
+
}), ' ', /*#__PURE__*/React.createElement("div", null, hours, " ", /*#__PURE__*/React.createElement("span", {
|
|
1657
|
+
className: classes.smallText
|
|
1658
|
+
}, "hrs"), " : ", minutes, ' ', /*#__PURE__*/React.createElement("span", {
|
|
1659
|
+
className: classes.smallText
|
|
1660
|
+
}, "Mins"), " : ", seconds, ' ', /*#__PURE__*/React.createElement("span", {
|
|
1661
|
+
className: classes.smallText
|
|
1662
|
+
}, "Secs"))));
|
|
1663
|
+
} else {
|
|
1664
|
+
let given = moment(mockHeader.endDate);
|
|
1665
|
+
let current = moment().startOf('day');
|
|
1666
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1667
|
+
className: classes.offerBottom
|
|
1668
|
+
}, /*#__PURE__*/React.createElement("div", null, "This offer is only valid for"), /*#__PURE__*/React.createElement("div", {
|
|
1669
|
+
style: {
|
|
1670
|
+
display: 'flex',
|
|
1671
|
+
gap: '5px'
|
|
1672
|
+
}
|
|
1673
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1674
|
+
src: timer,
|
|
1675
|
+
alt: ""
|
|
1676
|
+
}), ' ', /*#__PURE__*/React.createElement("div", null, Math.floor(moment.duration(given.diff(current)).asDays()), /*#__PURE__*/React.createElement("span", {
|
|
1677
|
+
className: classes.smallText
|
|
1678
|
+
}, "\xA0\xA0Days"))));
|
|
1679
|
+
}
|
|
1680
|
+
};
|
|
1681
|
+
const OfferDetailsJSX = () => {
|
|
1682
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1683
|
+
className: classes.BottomSheetOfferContainer
|
|
1684
|
+
}, ' ', /*#__PURE__*/React.createElement(Countdown, {
|
|
1685
|
+
renderer: renderer,
|
|
1686
|
+
date: mockHeader?.endDate
|
|
1687
|
+
}));
|
|
1688
|
+
};
|
|
1689
|
+
const BottomSheetJSX = () => {
|
|
1690
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1691
|
+
className: classes.BottomSheetContainer
|
|
1692
|
+
}, OfferDetailsJSX(), /*#__PURE__*/React.createElement("div", {
|
|
1693
|
+
className: classes.BottomSheetPriceContainer
|
|
1694
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1695
|
+
className: classes.BottomSheetPrice
|
|
1696
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1697
|
+
style: {
|
|
1698
|
+
textAlign: 'start'
|
|
1699
|
+
}
|
|
1700
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1701
|
+
className: classes.offerPrice
|
|
1702
|
+
}, mockHeader?.effectivePrice), ' '), /*#__PURE__*/React.createElement("span", {
|
|
1703
|
+
className: classes.originalPrice
|
|
1704
|
+
}, mockHeader?.price), ' ', /*#__PURE__*/React.createElement("span", {
|
|
1705
|
+
className: classes.offerDiscount
|
|
1706
|
+
}, `${getDiscount(mockHeader?.price, mockHeader?.discount)}%`, "\xA0OFF"), "\xA0\xA0")), /*#__PURE__*/React.createElement(Button, {
|
|
1707
|
+
data: {
|
|
1708
|
+
// link: 'headerData?.loginCtaLink',
|
|
1709
|
+
// isLink: 1,
|
|
1710
|
+
value: 'BUY NOW'
|
|
1711
|
+
// isExternal: 1
|
|
1712
|
+
},
|
|
1713
|
+
|
|
1714
|
+
onClick: extraProps?.courseBuyNow,
|
|
1715
|
+
type: 'primary',
|
|
1716
|
+
size: 'medium',
|
|
1717
|
+
target: null,
|
|
1718
|
+
name: "button",
|
|
1719
|
+
rel: null
|
|
1720
|
+
// styling={isMobile ? { margin: '0 40px' } : {}}
|
|
1721
|
+
}))));
|
|
1722
|
+
};
|
|
1723
|
+
|
|
1582
1724
|
if (isTutorWebsite) {
|
|
1583
1725
|
if (isAndroidDelisted && apkURL) {
|
|
1584
1726
|
downloadLink = /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1651,7 +1793,7 @@ function MobileHeader({
|
|
|
1651
1793
|
downloadLink = null;
|
|
1652
1794
|
}
|
|
1653
1795
|
}
|
|
1654
|
-
return /*#__PURE__*/React.createElement("nav", {
|
|
1796
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("nav", {
|
|
1655
1797
|
ref: navEl,
|
|
1656
1798
|
className: classes.section
|
|
1657
1799
|
}, !(header?.websiteLogo === DEFAULT_HEADER_IMAGE_LP && isCustomWebsite) ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -1684,7 +1826,7 @@ function MobileHeader({
|
|
|
1684
1826
|
order: 1
|
|
1685
1827
|
}))) : null, isTutorWebsite && header?.appName ? /*#__PURE__*/React.createElement("p", {
|
|
1686
1828
|
className: classes.mobileAppNameClass
|
|
1687
|
-
},
|
|
1829
|
+
}, ' ', header?.appName) : null), downloadLink), sideMenu ? /*#__PURE__*/React.createElement("div", {
|
|
1688
1830
|
className: classes.mobileMenu
|
|
1689
1831
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1690
1832
|
className: classes.backdrop,
|
|
@@ -1704,7 +1846,7 @@ function MobileHeader({
|
|
|
1704
1846
|
style: {
|
|
1705
1847
|
paddingTop: '30px'
|
|
1706
1848
|
}
|
|
1707
|
-
}));
|
|
1849
|
+
})), /*#__PURE__*/React.createElement(BottomSheetJSX, null));
|
|
1708
1850
|
}
|
|
1709
1851
|
|
|
1710
1852
|
function Header({
|