diy-template-components 0.1.17 → 0.1.20
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 +68 -12
- package/build/index.es.js.map +1 -1
- package/build/index.js +68 -12
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -6766,7 +6766,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
6766
6766
|
const {
|
|
6767
6767
|
data,
|
|
6768
6768
|
webinarCtaClick,
|
|
6769
|
-
conversions
|
|
6769
|
+
conversions = 0
|
|
6770
6770
|
} = props;
|
|
6771
6771
|
|
|
6772
6772
|
const renderer = ({
|
|
@@ -6787,7 +6787,29 @@ const SingleVideoSlide$1 = props => {
|
|
|
6787
6787
|
|
|
6788
6788
|
const checkIfOfferIsValid = () => moment().diff(moment(props.data.offerPriceEndDate)) < 0;
|
|
6789
6789
|
|
|
6790
|
-
|
|
6790
|
+
const checkForShowDiscount = () => {
|
|
6791
|
+
if (props.data.endDate === null || checkIfOfferIsValid()) {
|
|
6792
|
+
if (data.discount > 0 && data.offerPriceValidFor === 0) {
|
|
6793
|
+
return true;
|
|
6794
|
+
} else if (data.discount > 0 && data.offerPriceValidFor !== 0 && data.offerPriceValidFor - conversions <= 0) {
|
|
6795
|
+
return false;
|
|
6796
|
+
}
|
|
6797
|
+
} else if (data.offerPriceValidFor >= 0 && data.discount) {
|
|
6798
|
+
if (data.offerPriceValidFor <= conversions) {
|
|
6799
|
+
return false;
|
|
6800
|
+
}
|
|
6801
|
+
|
|
6802
|
+
if (data.offerPriceValidFor - conversions < 0) {
|
|
6803
|
+
return false;
|
|
6804
|
+
} else {
|
|
6805
|
+
return true;
|
|
6806
|
+
}
|
|
6807
|
+
}
|
|
6808
|
+
|
|
6809
|
+
if (data.discount > 0) {
|
|
6810
|
+
return true;
|
|
6811
|
+
}
|
|
6812
|
+
};
|
|
6791
6813
|
|
|
6792
6814
|
const discount = ({
|
|
6793
6815
|
price,
|
|
@@ -6806,9 +6828,11 @@ const SingleVideoSlide$1 = props => {
|
|
|
6806
6828
|
className: classes.iframeSuperContainer
|
|
6807
6829
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6808
6830
|
className: classes.videoDetails
|
|
6809
|
-
}, data?.isPaid && checkIfOfferIsValid() ? /*#__PURE__*/React.createElement("h3", {
|
|
6831
|
+
}, data?.isPaid && (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && data.offerPriceValidFor > conversions && /*#__PURE__*/React.createElement("div", null, data.offerPriceValidFor - conversions > 0 && data.discount && (data.offerPriceEndDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React.createElement("h3", {
|
|
6810
6832
|
className: classes.bannerContainer
|
|
6811
|
-
},
|
|
6833
|
+
}, "Hurry up! Offer is left for", ' ', data.offerPriceValidFor - conversions, " users now") : checkIfOfferIsValid() && /*#__PURE__*/React.createElement("h3", {
|
|
6834
|
+
className: classes.bannerContainer
|
|
6835
|
+
}, "Hurry up! Offer for limited period only")), /*#__PURE__*/React.createElement("h3", {
|
|
6812
6836
|
ref: data?.videoTextHeading?.refSetter,
|
|
6813
6837
|
className: classes.videoDetailsHeading,
|
|
6814
6838
|
dangerouslySetInnerHTML: {
|
|
@@ -6839,14 +6863,14 @@ const SingleVideoSlide$1 = props => {
|
|
|
6839
6863
|
}
|
|
6840
6864
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
6841
6865
|
className: classes.courseViewContainer
|
|
6842
|
-
}, data.isPaid && checkIfOfferIsValid() ? /*#__PURE__*/React.createElement("p", {
|
|
6866
|
+
}, data.isPaid && checkIfOfferIsValid() && (data.offerPriceValidFor !== 0 ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React.createElement("p", {
|
|
6843
6867
|
className: classes.offerText
|
|
6844
6868
|
}, "Offer Ends in", ' ', /*#__PURE__*/React.createElement("span", {
|
|
6845
6869
|
className: classes.courseDetailTime
|
|
6846
6870
|
}, /*#__PURE__*/React.createElement(Countdown, {
|
|
6847
6871
|
renderer: renderer,
|
|
6848
6872
|
date: data.offerPriceEndDate
|
|
6849
|
-
})))
|
|
6873
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
6850
6874
|
ref: data?.videoFrame?.refSetter,
|
|
6851
6875
|
className: classes.iframeContainer
|
|
6852
6876
|
}, /*#__PURE__*/React.createElement(VideoPlayer, {
|
|
@@ -6859,7 +6883,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
6859
6883
|
className: classes.priceContainer
|
|
6860
6884
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6861
6885
|
className: classes.offerPrice
|
|
6862
|
-
}, "\u20B9", data?.effectivePrice),
|
|
6886
|
+
}, "\u20B9", data?.effectivePrice), checkForShowDiscount() && (data.offerPriceEndDate ? checkIfOfferIsValid() : true) && /*#__PURE__*/React.createElement("p", {
|
|
6863
6887
|
style: {
|
|
6864
6888
|
fontSize: '20px',
|
|
6865
6889
|
marginTop: '0px'
|
|
@@ -6972,6 +6996,12 @@ const useCoursePromotionPage = createUseStyles(theme => {
|
|
|
6972
6996
|
justifyContent: 'flex-start',
|
|
6973
6997
|
gap: '20px'
|
|
6974
6998
|
},
|
|
6999
|
+
'@media screen and (max-width: 767px)': {
|
|
7000
|
+
coursePageCarousel: {
|
|
7001
|
+
display: 'flex',
|
|
7002
|
+
flexDirection: 'column-reverse'
|
|
7003
|
+
}
|
|
7004
|
+
},
|
|
6975
7005
|
iframeSuperContainer: {
|
|
6976
7006
|
height: '100%',
|
|
6977
7007
|
width: '100%',
|
|
@@ -7180,11 +7210,35 @@ const SingleVideoSlide = props => {
|
|
|
7180
7210
|
const {
|
|
7181
7211
|
data,
|
|
7182
7212
|
courseBuyNow,
|
|
7183
|
-
conversions
|
|
7213
|
+
conversions = 20
|
|
7184
7214
|
} = props;
|
|
7185
7215
|
|
|
7186
7216
|
const checkIfOfferIsValid = () => moment().diff(moment(props?.data?.endDate || 0)) < 0;
|
|
7187
7217
|
|
|
7218
|
+
const checkForShowDiscount = () => {
|
|
7219
|
+
if (props.data.endDate === null || checkIfOfferIsValid()) {
|
|
7220
|
+
if (data.discount > 0 && data.offerPriceValidFor === 0) {
|
|
7221
|
+
return true;
|
|
7222
|
+
} else if (data.discount > 0 && data.offerPriceValidFor !== 0 && data.offerPriceValidFor - conversions <= 0) {
|
|
7223
|
+
return false;
|
|
7224
|
+
}
|
|
7225
|
+
} else if (data.offerPriceValidFor >= 0 && data.discount) {
|
|
7226
|
+
if (data.offerPriceValidFor <= conversions) {
|
|
7227
|
+
return false;
|
|
7228
|
+
}
|
|
7229
|
+
|
|
7230
|
+
if (data.offerPriceValidFor - conversions < 0) {
|
|
7231
|
+
return false;
|
|
7232
|
+
} else {
|
|
7233
|
+
return true;
|
|
7234
|
+
}
|
|
7235
|
+
}
|
|
7236
|
+
|
|
7237
|
+
if (data.discount > 0) {
|
|
7238
|
+
return true;
|
|
7239
|
+
}
|
|
7240
|
+
};
|
|
7241
|
+
|
|
7188
7242
|
const classes = useCoursePromotionPage();
|
|
7189
7243
|
|
|
7190
7244
|
const discount = ({
|
|
@@ -7202,9 +7256,11 @@ const SingleVideoSlide = props => {
|
|
|
7202
7256
|
className: classes.iframeSuperContainer
|
|
7203
7257
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7204
7258
|
className: classes.videoDetails
|
|
7205
|
-
}, (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && /*#__PURE__*/React.createElement("h3", {
|
|
7259
|
+
}, (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && data.offerPriceValidFor > conversions && /*#__PURE__*/React.createElement("div", null, data.offerPriceValidFor - conversions > 0 && data.discount && (data.endDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React.createElement("h3", {
|
|
7260
|
+
className: classes.bannerContainer
|
|
7261
|
+
}, "Hurry up! Offer is left for", ' ', data.offerPriceValidFor - conversions, " users now") : checkIfOfferIsValid() && /*#__PURE__*/React.createElement("h3", {
|
|
7206
7262
|
className: classes.bannerContainer
|
|
7207
|
-
},
|
|
7263
|
+
}, "Hurry up! Offer for limited period only")), /*#__PURE__*/React.createElement("div", {
|
|
7208
7264
|
className: classes.emblemContainer
|
|
7209
7265
|
}, data?.courseOverviewData?.courseTagList.length && data?.courseOverviewData?.courseTagList?.map(data => {
|
|
7210
7266
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -7248,7 +7304,7 @@ const SingleVideoSlide = props => {
|
|
|
7248
7304
|
}
|
|
7249
7305
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
7250
7306
|
className: classes.courseViewContainer
|
|
7251
|
-
}, checkIfOfferIsValid() && /*#__PURE__*/React.createElement("p", {
|
|
7307
|
+
}, checkIfOfferIsValid() && (data.offerPriceValidFor !== 0 ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React.createElement("p", {
|
|
7252
7308
|
className: classes.offerText
|
|
7253
7309
|
}, "Offer Ends in", ' ', /*#__PURE__*/React.createElement("span", {
|
|
7254
7310
|
className: classes.courseDetailTime
|
|
@@ -7268,7 +7324,7 @@ const SingleVideoSlide = props => {
|
|
|
7268
7324
|
className: classes.priceContainer
|
|
7269
7325
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7270
7326
|
className: classes.offerPrice
|
|
7271
|
-
}, "\u20B9 ", data.effectivePrice), data.
|
|
7327
|
+
}, "\u20B9 ", data.effectivePrice), checkForShowDiscount() && (data.endDate ? checkIfOfferIsValid() : true) && /*#__PURE__*/React.createElement("p", {
|
|
7272
7328
|
style: {
|
|
7273
7329
|
fontSize: '20px',
|
|
7274
7330
|
marginTop: '0px'
|