diy-template-components 0.1.12 → 0.1.15
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 +61 -21
- package/build/index.es.js.map +1 -1
- package/build/index.js +61 -21
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -6805,7 +6805,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
6805
6805
|
className: classes.iframeSuperContainer
|
|
6806
6806
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6807
6807
|
className: classes.videoDetails
|
|
6808
|
-
}, data?.isPaid ? /*#__PURE__*/React.createElement("h3", {
|
|
6808
|
+
}, data?.isPaid && checkIfOfferIsValid() ? /*#__PURE__*/React.createElement("h3", {
|
|
6809
6809
|
className: classes.bannerContainer
|
|
6810
6810
|
}, data.offerPriceValidFor <= 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, "Hurry up! Offer for limited period only") : /*#__PURE__*/React.createElement(React.Fragment, null, "Hurry up! Offer is left for ", data.offerPriceValidFor, " users now")) : null, /*#__PURE__*/React.createElement("h3", {
|
|
6811
6811
|
ref: data?.videoTextHeading?.refSetter,
|
|
@@ -6819,11 +6819,12 @@ const SingleVideoSlide$1 = props => {
|
|
|
6819
6819
|
className: classes.courseDetailTag
|
|
6820
6820
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
6821
6821
|
name: 'Calendar'
|
|
6822
|
-
}), /*#__PURE__*/React.createElement("div", null, moment(data.
|
|
6822
|
+
}), /*#__PURE__*/React.createElement("div", null, moment(data.startTime).format('Do MMM YY, h:mm A'), /*#__PURE__*/React.createElement("span", null, " - "), moment(data.endTime).format('h:mm A'))), /*#__PURE__*/React.createElement("div", {
|
|
6823
6823
|
className: classes.courseDetailTag
|
|
6824
6824
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
6825
|
-
|
|
6826
|
-
|
|
6825
|
+
width: "20px",
|
|
6826
|
+
name: `${data.webinarLocation === 'Location' ? 'Location' : 'Video'}`
|
|
6827
|
+
}), /*#__PURE__*/React.createElement("div", null, data.webinarLocation === 'Location' ? data.webinarLink : data.webinarLocation))), /*#__PURE__*/React.createElement("p", {
|
|
6827
6828
|
ref: data?.videoTextContent?.refSetter,
|
|
6828
6829
|
className: classes.courseDetailContent,
|
|
6829
6830
|
dangerouslySetInnerHTML: {
|
|
@@ -6857,7 +6858,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
6857
6858
|
className: classes.priceContainer
|
|
6858
6859
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6859
6860
|
className: classes.offerPrice
|
|
6860
|
-
}, "\u20B9", data?.effectivePrice), /*#__PURE__*/React.createElement("p", {
|
|
6861
|
+
}, "\u20B9", data?.effectivePrice), data?.discount > 0 && checkIfOfferIsValid() && /*#__PURE__*/React.createElement("p", {
|
|
6861
6862
|
style: {
|
|
6862
6863
|
fontSize: '20px',
|
|
6863
6864
|
marginTop: '0px'
|
|
@@ -7033,7 +7034,9 @@ const useCoursePromotionPage = createUseStyles(theme => {
|
|
|
7033
7034
|
backgroundColor: '#f4f9ff',
|
|
7034
7035
|
display: 'flex',
|
|
7035
7036
|
flexDirection: 'column',
|
|
7036
|
-
borderRadius: '10px'
|
|
7037
|
+
borderRadius: '10px',
|
|
7038
|
+
paddingBottom: '10px',
|
|
7039
|
+
paddingTop: '10px'
|
|
7037
7040
|
},
|
|
7038
7041
|
bannerContainer: {
|
|
7039
7042
|
background: '#EB5757',
|
|
@@ -7063,6 +7066,21 @@ const useCoursePromotionPage = createUseStyles(theme => {
|
|
|
7063
7066
|
top: '-10.5px'
|
|
7064
7067
|
}
|
|
7065
7068
|
},
|
|
7069
|
+
emblemContainer: {
|
|
7070
|
+
display: 'flex',
|
|
7071
|
+
justifyContent: 'space-between',
|
|
7072
|
+
gap: '10px'
|
|
7073
|
+
},
|
|
7074
|
+
courseEmblem: {
|
|
7075
|
+
background: '#F0F4F8',
|
|
7076
|
+
borderRadius: '2.00337px',
|
|
7077
|
+
padding: '8px',
|
|
7078
|
+
display: 'flex',
|
|
7079
|
+
alignItems: 'center',
|
|
7080
|
+
justifyContent: 'center',
|
|
7081
|
+
marginTop: '20px',
|
|
7082
|
+
marginBottom: '20px'
|
|
7083
|
+
},
|
|
7066
7084
|
courseDetailsTags: {
|
|
7067
7085
|
marginTop: '16px',
|
|
7068
7086
|
display: 'flex'
|
|
@@ -7098,7 +7116,8 @@ const useCoursePromotionPage = createUseStyles(theme => {
|
|
|
7098
7116
|
},
|
|
7099
7117
|
'@media (max-width: 767px)': {
|
|
7100
7118
|
courseViewContainer: {
|
|
7101
|
-
width: '100%'
|
|
7119
|
+
width: '100%',
|
|
7120
|
+
paddingBottom: '10px'
|
|
7102
7121
|
},
|
|
7103
7122
|
courseSuperContainer: {
|
|
7104
7123
|
padding: '20px 10px 60px 20px'
|
|
@@ -7141,17 +7160,18 @@ const SingleVideoSlide = props => {
|
|
|
7141
7160
|
}, []);
|
|
7142
7161
|
|
|
7143
7162
|
const renderer = ({
|
|
7163
|
+
days,
|
|
7144
7164
|
hours,
|
|
7145
7165
|
minutes,
|
|
7146
7166
|
seconds,
|
|
7147
7167
|
completed
|
|
7148
7168
|
}) => {
|
|
7149
|
-
if (hours < 24) {
|
|
7150
|
-
return /*#__PURE__*/React.createElement("span", null, hours, "
|
|
7169
|
+
if (days === 0 && hours < 24) {
|
|
7170
|
+
return /*#__PURE__*/React.createElement("span", null, hours, "h ", minutes, "m ", seconds, "s");
|
|
7151
7171
|
} else {
|
|
7152
|
-
let given = moment(props.data.
|
|
7172
|
+
let given = moment(props.data.endDate);
|
|
7153
7173
|
let current = moment().startOf('day');
|
|
7154
|
-
return /*#__PURE__*/React.createElement("span", null, moment.duration(given.diff(current)).asDays());
|
|
7174
|
+
return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), " days");
|
|
7155
7175
|
}
|
|
7156
7176
|
};
|
|
7157
7177
|
|
|
@@ -7159,8 +7179,18 @@ const SingleVideoSlide = props => {
|
|
|
7159
7179
|
data,
|
|
7160
7180
|
courseBuyNow
|
|
7161
7181
|
} = props;
|
|
7182
|
+
|
|
7183
|
+
const checkIfOfferIsValid = () => moment().diff(moment(props?.data?.endDate || 0)) < 0;
|
|
7184
|
+
|
|
7162
7185
|
const classes = useCoursePromotionPage();
|
|
7163
|
-
|
|
7186
|
+
|
|
7187
|
+
const discount = ({
|
|
7188
|
+
price,
|
|
7189
|
+
discount
|
|
7190
|
+
}) => {
|
|
7191
|
+
return (discount / price * 100).toFixed(2);
|
|
7192
|
+
};
|
|
7193
|
+
|
|
7164
7194
|
return /*#__PURE__*/React.createElement("div", {
|
|
7165
7195
|
className: classes.videoCarouselContainer
|
|
7166
7196
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -7169,9 +7199,15 @@ const SingleVideoSlide = props => {
|
|
|
7169
7199
|
className: classes.iframeSuperContainer
|
|
7170
7200
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7171
7201
|
className: classes.videoDetails
|
|
7172
|
-
}, /*#__PURE__*/React.createElement("h3", {
|
|
7202
|
+
}, (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && /*#__PURE__*/React.createElement("h3", {
|
|
7173
7203
|
className: classes.bannerContainer
|
|
7174
|
-
}, data.offerPriceValidFor <= 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, "Hurry up! Offer for limited period only") : /*#__PURE__*/React.createElement(React.Fragment, null, "Hurry up! Offer is left for ", data.offerPriceValidFor, " users now")), /*#__PURE__*/React.createElement("
|
|
7204
|
+
}, data.offerPriceValidFor <= 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, "Hurry up! Offer for limited period only") : /*#__PURE__*/React.createElement(React.Fragment, null, "Hurry up! Offer is left for ", data.offerPriceValidFor, " users now")), /*#__PURE__*/React.createElement("div", {
|
|
7205
|
+
className: classes.emblemContainer
|
|
7206
|
+
}, data?.courseOverviewData?.courseTagList.length && data?.courseOverviewData?.courseTagList?.map(data => {
|
|
7207
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7208
|
+
className: classes.courseEmblem
|
|
7209
|
+
}, data?.text);
|
|
7210
|
+
})), /*#__PURE__*/React.createElement("h3", {
|
|
7175
7211
|
ref: data?.videoTextHeading?.refSetter,
|
|
7176
7212
|
className: classes.videoDetailsHeading,
|
|
7177
7213
|
dangerouslySetInnerHTML: {
|
|
@@ -7179,19 +7215,23 @@ const SingleVideoSlide = props => {
|
|
|
7179
7215
|
}
|
|
7180
7216
|
}), /*#__PURE__*/React.createElement("div", {
|
|
7181
7217
|
className: classes.courseDetailsTags
|
|
7182
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7218
|
+
}, data?.courseOverviewData?.courseDuration?.text ? /*#__PURE__*/React.createElement("div", {
|
|
7183
7219
|
className: classes.courseDetailTag
|
|
7184
7220
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
7185
7221
|
name: 'Clock'
|
|
7186
|
-
}), /*#__PURE__*/React.createElement("div", null, data
|
|
7222
|
+
}), /*#__PURE__*/React.createElement("div", null, data?.courseOverviewData?.courseDuration?.text)) : null, data?.courseOverviewData?.metaData?.isPhysicalDeliveryEnabled ? /*#__PURE__*/React.createElement("div", {
|
|
7187
7223
|
className: classes.courseDetailTag
|
|
7188
7224
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
7189
7225
|
name: 'Book Saved'
|
|
7190
|
-
}), /*#__PURE__*/React.createElement("div", null, data
|
|
7226
|
+
}), /*#__PURE__*/React.createElement("div", null, data?.courseOverviewData?.metaData?.isPhysicalDeliveryEnabled ? 'Physical Books' : null)) : null, data?.courseOverviewData?.metaData?.isCertificateEnabled ? /*#__PURE__*/React.createElement("div", {
|
|
7191
7227
|
className: classes.courseDetailTag
|
|
7192
7228
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
7193
7229
|
name: 'Certificate'
|
|
7194
|
-
}), /*#__PURE__*/React.createElement("div", null, data
|
|
7230
|
+
}), /*#__PURE__*/React.createElement("div", null, data?.courseOverviewData?.metaData?.isCertificateEnabled ? 'Course Cerficate' : null)) : null, data?.courseOverviewData?.resourseDataText.heading ? /*#__PURE__*/React.createElement("div", {
|
|
7231
|
+
className: classes.courseDetailTag
|
|
7232
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
7233
|
+
name: 'Certificate'
|
|
7234
|
+
}), /*#__PURE__*/React.createElement("div", null, data?.courseOverviewData?.resourseDataText?.heading)) : null), /*#__PURE__*/React.createElement("p", {
|
|
7195
7235
|
ref: data?.videoTextContent?.refSetter,
|
|
7196
7236
|
className: classes.courseDetailContent,
|
|
7197
7237
|
dangerouslySetInnerHTML: {
|
|
@@ -7205,7 +7245,7 @@ const SingleVideoSlide = props => {
|
|
|
7205
7245
|
}
|
|
7206
7246
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
7207
7247
|
className: classes.courseViewContainer
|
|
7208
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
7248
|
+
}, checkIfOfferIsValid() && /*#__PURE__*/React.createElement("p", {
|
|
7209
7249
|
className: classes.offerText
|
|
7210
7250
|
}, "Offer Ends in", ' ', /*#__PURE__*/React.createElement("span", {
|
|
7211
7251
|
className: classes.courseDetailTime
|
|
@@ -7225,7 +7265,7 @@ const SingleVideoSlide = props => {
|
|
|
7225
7265
|
className: classes.priceContainer
|
|
7226
7266
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7227
7267
|
className: classes.offerPrice
|
|
7228
|
-
}, "\u20B9 ", data.effectivePrice), /*#__PURE__*/React.createElement("p", {
|
|
7268
|
+
}, "\u20B9 ", data.effectivePrice), data.discount > 0 && checkIfOfferIsValid() && /*#__PURE__*/React.createElement("p", {
|
|
7229
7269
|
style: {
|
|
7230
7270
|
fontSize: '20px',
|
|
7231
7271
|
marginTop: '0px'
|
|
@@ -7234,7 +7274,7 @@ const SingleVideoSlide = props => {
|
|
|
7234
7274
|
className: classes.originalPrice
|
|
7235
7275
|
}, "\u20B9 ", data.price), ' ', /*#__PURE__*/React.createElement("span", {
|
|
7236
7276
|
className: classes.offerDiscount
|
|
7237
|
-
},
|
|
7277
|
+
}, `${data && discount(data)}%`))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
7238
7278
|
style: {
|
|
7239
7279
|
width: '150px'
|
|
7240
7280
|
},
|