diy-template-components 0.1.3 → 0.1.4
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 +32 -19
- package/build/index.es.js.map +1 -1
- package/build/index.js +32 -19
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -463,6 +463,10 @@ function useLinkBuilder(data) {
|
|
|
463
463
|
return data.link;
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
+
if (data?.isExternal) {
|
|
467
|
+
return data.link;
|
|
468
|
+
}
|
|
469
|
+
|
|
466
470
|
if (!isPreview) {
|
|
467
471
|
const link = data.link === '/' ? '' : '/' + data.link;
|
|
468
472
|
return basePath ? `//${basePath}${link}` : null;
|
|
@@ -501,8 +505,8 @@ const Button = /*#__PURE__*/React.forwardRef(function Button({
|
|
|
501
505
|
return data?.isLink ? /*#__PURE__*/React__default["default"].createElement("a", _extends({
|
|
502
506
|
ref: ref,
|
|
503
507
|
href: link,
|
|
504
|
-
target: data?.
|
|
505
|
-
rel: data?.
|
|
508
|
+
target: data?.isExternal ? '_blank' : null,
|
|
509
|
+
rel: data?.isExternal ? 'nofollow noopener' : null,
|
|
506
510
|
className: (active ? classes.active : '') + ' ' + classes[type] + ' ' + classes[size] + ' ' + classes.anchorClass,
|
|
507
511
|
style: styling
|
|
508
512
|
}, elementProps), data?.value) : /*#__PURE__*/React__default["default"].createElement("button", _extends({
|
|
@@ -1001,7 +1005,7 @@ function Dropdown(props) {
|
|
|
1001
1005
|
link: dt.slug,
|
|
1002
1006
|
isLink: true,
|
|
1003
1007
|
value: dt.title,
|
|
1004
|
-
isExternal:
|
|
1008
|
+
isExternal: 0
|
|
1005
1009
|
},
|
|
1006
1010
|
fluid: true,
|
|
1007
1011
|
active: dt.active,
|
|
@@ -1033,7 +1037,7 @@ function OptionList({
|
|
|
1033
1037
|
link: dt.slug,
|
|
1034
1038
|
active: dt.active,
|
|
1035
1039
|
isLink: true,
|
|
1036
|
-
|
|
1040
|
+
isExternal: 0
|
|
1037
1041
|
};
|
|
1038
1042
|
});
|
|
1039
1043
|
};
|
|
@@ -1084,7 +1088,7 @@ function OptionList({
|
|
|
1084
1088
|
link: headerData?.appLink,
|
|
1085
1089
|
isLink: 1,
|
|
1086
1090
|
value: 'Download App',
|
|
1087
|
-
|
|
1091
|
+
isExternal: 1
|
|
1088
1092
|
},
|
|
1089
1093
|
type: 'primary',
|
|
1090
1094
|
size: 'small',
|
|
@@ -1098,7 +1102,7 @@ function OptionList({
|
|
|
1098
1102
|
link: headerData?.loginCtaLink,
|
|
1099
1103
|
isLink: 1,
|
|
1100
1104
|
value: 'Login',
|
|
1101
|
-
|
|
1105
|
+
isExternal: 1
|
|
1102
1106
|
},
|
|
1103
1107
|
type: 'primary',
|
|
1104
1108
|
size: isMobile ? 'small' : 'medium',
|
|
@@ -1225,7 +1229,7 @@ function MobileHeader({
|
|
|
1225
1229
|
src: phoneIos,
|
|
1226
1230
|
alt: "iosUrl"
|
|
1227
1231
|
}),
|
|
1228
|
-
|
|
1232
|
+
isExternal: 1
|
|
1229
1233
|
},
|
|
1230
1234
|
type: '',
|
|
1231
1235
|
size: 'small',
|
|
@@ -1247,7 +1251,7 @@ function MobileHeader({
|
|
|
1247
1251
|
src: phoneAndroid,
|
|
1248
1252
|
alt: "iosUrl"
|
|
1249
1253
|
}),
|
|
1250
|
-
|
|
1254
|
+
isExternal: 1
|
|
1251
1255
|
},
|
|
1252
1256
|
type: '',
|
|
1253
1257
|
size: 'small',
|
|
@@ -1267,7 +1271,7 @@ function MobileHeader({
|
|
|
1267
1271
|
link: header?.iosUrl,
|
|
1268
1272
|
isLink: 1,
|
|
1269
1273
|
value: 'Download App',
|
|
1270
|
-
|
|
1274
|
+
isExternal: 1
|
|
1271
1275
|
},
|
|
1272
1276
|
type: 'primary',
|
|
1273
1277
|
size: 'small',
|
|
@@ -1280,7 +1284,7 @@ function MobileHeader({
|
|
|
1280
1284
|
link: header?.androidURL,
|
|
1281
1285
|
isLink: 1,
|
|
1282
1286
|
value: 'Download App',
|
|
1283
|
-
|
|
1287
|
+
isExternal: 1
|
|
1284
1288
|
},
|
|
1285
1289
|
type: 'primary',
|
|
1286
1290
|
size: 'small',
|
|
@@ -1297,7 +1301,7 @@ function MobileHeader({
|
|
|
1297
1301
|
link: header?.appLink,
|
|
1298
1302
|
isLink: 1,
|
|
1299
1303
|
value: 'Download App',
|
|
1300
|
-
|
|
1304
|
+
isExternal: 1
|
|
1301
1305
|
},
|
|
1302
1306
|
type: 'primary',
|
|
1303
1307
|
size: 'small',
|
|
@@ -6631,7 +6635,9 @@ const useWebinarPromotionPage = createUseStyles(theme => {
|
|
|
6631
6635
|
width: '645px',
|
|
6632
6636
|
backgroundColor: '#f4f9ff',
|
|
6633
6637
|
display: 'flex',
|
|
6634
|
-
flexDirection: 'column'
|
|
6638
|
+
flexDirection: 'column',
|
|
6639
|
+
justifyContent: 'center',
|
|
6640
|
+
paddingTop: '20px'
|
|
6635
6641
|
},
|
|
6636
6642
|
bannerContainer: {
|
|
6637
6643
|
background: '#EB5757',
|
|
@@ -6759,6 +6765,14 @@ const SingleVideoSlide$1 = props => {
|
|
|
6759
6765
|
}
|
|
6760
6766
|
};
|
|
6761
6767
|
|
|
6768
|
+
const discount = ({
|
|
6769
|
+
price,
|
|
6770
|
+
discount
|
|
6771
|
+
}) => {
|
|
6772
|
+
console.log('discountxx', props.data.price, props.data.discount);
|
|
6773
|
+
return (price - discount) / price * 100;
|
|
6774
|
+
};
|
|
6775
|
+
|
|
6762
6776
|
const classes = useWebinarPromotionPage();
|
|
6763
6777
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6764
6778
|
className: classes.videoCarouselContainer
|
|
@@ -6800,14 +6814,14 @@ const SingleVideoSlide$1 = props => {
|
|
|
6800
6814
|
}
|
|
6801
6815
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6802
6816
|
className: classes.courseViewContainer
|
|
6803
|
-
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
6817
|
+
}, data.isPaid ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
6804
6818
|
className: classes.offerText
|
|
6805
6819
|
}, "Offer Ends in", ' ', /*#__PURE__*/React__default["default"].createElement("span", {
|
|
6806
6820
|
className: classes.courseDetailTime
|
|
6807
6821
|
}, /*#__PURE__*/React__default["default"].createElement(Countdown__default["default"], {
|
|
6808
6822
|
renderer: renderer,
|
|
6809
|
-
date: data.
|
|
6810
|
-
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6823
|
+
date: data.offerPriceEndDate
|
|
6824
|
+
}))) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6811
6825
|
ref: data?.videoFrame?.refSetter,
|
|
6812
6826
|
className: classes.iframeContainer
|
|
6813
6827
|
}, /*#__PURE__*/React__default["default"].createElement(VideoPlayer, {
|
|
@@ -6820,15 +6834,15 @@ const SingleVideoSlide$1 = props => {
|
|
|
6820
6834
|
className: classes.priceContainer
|
|
6821
6835
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6822
6836
|
className: classes.offerPrice
|
|
6823
|
-
}, data
|
|
6837
|
+
}, data?.discount), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
6824
6838
|
style: {
|
|
6825
6839
|
fontSize: '20px'
|
|
6826
6840
|
}
|
|
6827
6841
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
6828
6842
|
className: classes.originalPrice
|
|
6829
|
-
}, data
|
|
6843
|
+
}, data?.price), ' ', /*#__PURE__*/React__default["default"].createElement("span", {
|
|
6830
6844
|
className: classes.offerDiscount
|
|
6831
|
-
},
|
|
6845
|
+
}, `${data && discount(data)}%`))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6832
6846
|
className: classes.webinarButtonContainer
|
|
6833
6847
|
}, /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
6834
6848
|
style: {
|
|
@@ -6861,7 +6875,6 @@ function CoursePromotionPage$1({
|
|
|
6861
6875
|
const classes = useWebinarPromotionPage({
|
|
6862
6876
|
containerWidth
|
|
6863
6877
|
});
|
|
6864
|
-
console.log(sectionData);
|
|
6865
6878
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6866
6879
|
className: classes.webinarSuperContainer
|
|
6867
6880
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|