diy-template-components 2.0.93 → 2.0.95
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 +43 -14
- package/build/index.es.js.map +1 -1
- package/build/index.js +43 -14
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -350,7 +350,7 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
350
350
|
bottom: 0,
|
|
351
351
|
left: 0,
|
|
352
352
|
width: '100%',
|
|
353
|
-
zIndex: '
|
|
353
|
+
zIndex: '100'
|
|
354
354
|
}
|
|
355
355
|
},
|
|
356
356
|
mobileAppNameClass: {
|
|
@@ -1474,6 +1474,7 @@ function DesktopHeader({
|
|
|
1474
1474
|
return (discount / price * 100).toFixed(2);
|
|
1475
1475
|
};
|
|
1476
1476
|
const OfferDetailsJSX = () => {
|
|
1477
|
+
console.log('header', header);
|
|
1477
1478
|
if (!header?.effectivePrice) {
|
|
1478
1479
|
return null;
|
|
1479
1480
|
}
|
|
@@ -1497,13 +1498,13 @@ function DesktopHeader({
|
|
|
1497
1498
|
className: classes.offerDiscount
|
|
1498
1499
|
}, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0", /*#__PURE__*/React.createElement("span", {
|
|
1499
1500
|
className: classes.originalPrice
|
|
1500
|
-
}, header?.price), ' ') : null, /*#__PURE__*/React.createElement("div", {
|
|
1501
|
+
}, "\u20B9 ", header?.price), ' ') : null, header?.effectivePrice ? /*#__PURE__*/React.createElement("div", {
|
|
1501
1502
|
style: {
|
|
1502
1503
|
textAlign: 'end'
|
|
1503
1504
|
}
|
|
1504
1505
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1505
1506
|
className: classes.offerPrice
|
|
1506
|
-
}, header?.effectivePrice)
|
|
1507
|
+
}, "\u20B9 ", header?.effectivePrice)) : null), /*#__PURE__*/React.createElement(Button, {
|
|
1507
1508
|
data: {
|
|
1508
1509
|
// link: 'headerData?.loginCtaLink',
|
|
1509
1510
|
// isLink: 1,
|
|
@@ -1609,6 +1610,9 @@ function MobileHeader({
|
|
|
1609
1610
|
body?.setAttribute('style', 'overflow: hidden;');
|
|
1610
1611
|
} else {
|
|
1611
1612
|
body?.removeAttribute('style');
|
|
1613
|
+
if (header?.effectivePrice && body) {
|
|
1614
|
+
body?.setAttribute('style', 'margin-bottom: 130px');
|
|
1615
|
+
}
|
|
1612
1616
|
}
|
|
1613
1617
|
}, [sideMenu]);
|
|
1614
1618
|
useEffect(() => {
|
|
@@ -1674,6 +1678,7 @@ function MobileHeader({
|
|
|
1674
1678
|
}
|
|
1675
1679
|
};
|
|
1676
1680
|
const OfferDetailsJSX = () => {
|
|
1681
|
+
console.log('header', header);
|
|
1677
1682
|
let conversions = extraProps?.conversions || 0;
|
|
1678
1683
|
const currentTimestamp = new Date().getTime();
|
|
1679
1684
|
if (header?.isOfferActive && header?.endDate && header?.endDate && header?.endDate > currentTimestamp && (header?.offerPriceValidFor ? header.offerPriceValidFor - conversions > 0 : true)) {
|
|
@@ -1696,15 +1701,15 @@ function MobileHeader({
|
|
|
1696
1701
|
className: classes.BottomSheetPriceContainer
|
|
1697
1702
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1698
1703
|
className: classes.BottomSheetPrice
|
|
1699
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1704
|
+
}, /*#__PURE__*/React.createElement("div", null, header?.effectivePrice ? /*#__PURE__*/React.createElement("div", {
|
|
1700
1705
|
style: {
|
|
1701
1706
|
textAlign: 'start'
|
|
1702
1707
|
}
|
|
1703
1708
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1704
1709
|
className: classes.offerPrice
|
|
1705
|
-
}, header?.effectivePrice), ' '), header?.price && header?.discount && header?.effectivePrice && header?.price !== header?.effectivePrice ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
1710
|
+
}, "\u20B9 ", header?.effectivePrice), ' ') : null, header?.price && header?.discount && header?.effectivePrice && header?.price !== header?.effectivePrice ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
1706
1711
|
className: classes.originalPrice
|
|
1707
|
-
}, header?.price), ' ', /*#__PURE__*/React.createElement("span", {
|
|
1712
|
+
}, "\u20B9 ", header?.price), ' ', /*#__PURE__*/React.createElement("span", {
|
|
1708
1713
|
className: classes.offerDiscount
|
|
1709
1714
|
}, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0") : null)), /*#__PURE__*/React.createElement(Button, {
|
|
1710
1715
|
data: {
|
|
@@ -3164,7 +3169,8 @@ const wordBreakValue = countryCode => {
|
|
|
3164
3169
|
|
|
3165
3170
|
function Section$4({
|
|
3166
3171
|
nodeData,
|
|
3167
|
-
sectionIndex
|
|
3172
|
+
sectionIndex,
|
|
3173
|
+
extraProps
|
|
3168
3174
|
}) {
|
|
3169
3175
|
const {
|
|
3170
3176
|
layout: {
|
|
@@ -3179,6 +3185,9 @@ function Section$4({
|
|
|
3179
3185
|
isMobile,
|
|
3180
3186
|
wordBreakValue: wordBreakValue(countryCode)
|
|
3181
3187
|
});
|
|
3188
|
+
const handleButton = () => {
|
|
3189
|
+
extraProps?.courseBuyNow();
|
|
3190
|
+
};
|
|
3182
3191
|
return /*#__PURE__*/React.createElement("div", {
|
|
3183
3192
|
className: classes.centerData
|
|
3184
3193
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -3207,7 +3216,13 @@ function Section$4({
|
|
|
3207
3216
|
dangerouslySetInnerHTML: {
|
|
3208
3217
|
__html: nodeData.description.metadata.value
|
|
3209
3218
|
}
|
|
3210
|
-
}), nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : /*#__PURE__*/React.createElement(Button, {
|
|
3219
|
+
}), nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : nodeData?.cta?.metadata?.default === true ? /*#__PURE__*/React.createElement(Button, {
|
|
3220
|
+
data: nodeData.cta.metadata,
|
|
3221
|
+
ref: nodeData?.cta?.refSetter,
|
|
3222
|
+
type: nodeData?.cta?.metadata?.type,
|
|
3223
|
+
size: isMobile ? 'small' : 'medium',
|
|
3224
|
+
onClick: handleButton
|
|
3225
|
+
}) : /*#__PURE__*/React.createElement(Button, {
|
|
3211
3226
|
ref: nodeData?.cta?.refSetter,
|
|
3212
3227
|
data: nodeData.cta.metadata,
|
|
3213
3228
|
type: nodeData?.cta?.metadata?.type,
|
|
@@ -3223,7 +3238,8 @@ function Section$4({
|
|
|
3223
3238
|
}
|
|
3224
3239
|
function BannerCarouselRight({
|
|
3225
3240
|
sectionData,
|
|
3226
|
-
sectionIndex
|
|
3241
|
+
sectionIndex,
|
|
3242
|
+
extraProps
|
|
3227
3243
|
}) {
|
|
3228
3244
|
const {
|
|
3229
3245
|
isMobile,
|
|
@@ -3250,7 +3266,8 @@ function BannerCarouselRight({
|
|
|
3250
3266
|
}, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$4, {
|
|
3251
3267
|
nodeData: node,
|
|
3252
3268
|
key: idx /* or some other unique property */,
|
|
3253
|
-
sectionIndex: sectionIndex
|
|
3269
|
+
sectionIndex: sectionIndex,
|
|
3270
|
+
extraProps: extraProps
|
|
3254
3271
|
})))));
|
|
3255
3272
|
}
|
|
3256
3273
|
|
|
@@ -3930,7 +3947,8 @@ const useSectionStyles$5 = createUseStyles(theme => {
|
|
|
3930
3947
|
|
|
3931
3948
|
function Section$2({
|
|
3932
3949
|
nodeData,
|
|
3933
|
-
sectionIndex
|
|
3950
|
+
sectionIndex,
|
|
3951
|
+
extraProps
|
|
3934
3952
|
}) {
|
|
3935
3953
|
const {
|
|
3936
3954
|
layout: {
|
|
@@ -3945,6 +3963,9 @@ function Section$2({
|
|
|
3945
3963
|
isMobile,
|
|
3946
3964
|
wordBreakValue: wordBreakValue(countryCode)
|
|
3947
3965
|
});
|
|
3966
|
+
const handleButton = () => {
|
|
3967
|
+
extraProps?.courseBuyNow();
|
|
3968
|
+
};
|
|
3948
3969
|
return /*#__PURE__*/React.createElement("div", {
|
|
3949
3970
|
className: classes.centerData
|
|
3950
3971
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -3978,7 +3999,13 @@ function Section$2({
|
|
|
3978
3999
|
dangerouslySetInnerHTML: {
|
|
3979
4000
|
__html: nodeData.description.metadata.value
|
|
3980
4001
|
}
|
|
3981
|
-
}), nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : /*#__PURE__*/React.createElement(Button, {
|
|
4002
|
+
}), nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : nodeData?.cta?.metadata?.default === true ? /*#__PURE__*/React.createElement(Button, {
|
|
4003
|
+
data: nodeData.cta.metadata,
|
|
4004
|
+
ref: nodeData?.cta?.refSetter,
|
|
4005
|
+
type: nodeData?.cta?.metadata?.type,
|
|
4006
|
+
size: isMobile ? 'small' : 'medium',
|
|
4007
|
+
onClick: handleButton
|
|
4008
|
+
}) : /*#__PURE__*/React.createElement(Button, {
|
|
3982
4009
|
ref: nodeData?.cta?.refSetter,
|
|
3983
4010
|
data: nodeData.cta.metadata,
|
|
3984
4011
|
type: nodeData?.cta?.metadata?.type,
|
|
@@ -3990,7 +4017,8 @@ function BannerCarouselLeft({
|
|
|
3990
4017
|
sectionData,
|
|
3991
4018
|
isCustomWebsite,
|
|
3992
4019
|
sectionIndex,
|
|
3993
|
-
isMobile
|
|
4020
|
+
isMobile,
|
|
4021
|
+
extraProps
|
|
3994
4022
|
}) {
|
|
3995
4023
|
const {
|
|
3996
4024
|
layout: {
|
|
@@ -4011,7 +4039,8 @@ function BannerCarouselLeft({
|
|
|
4011
4039
|
}, /*#__PURE__*/React.createElement(Wrapper, null, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$2, {
|
|
4012
4040
|
nodeData: node,
|
|
4013
4041
|
key: idx /* or some other unique property */,
|
|
4014
|
-
sectionIndex: sectionIndex
|
|
4042
|
+
sectionIndex: sectionIndex,
|
|
4043
|
+
extraProps: extraProps
|
|
4015
4044
|
})))));
|
|
4016
4045
|
}
|
|
4017
4046
|
|