diy-template-components 1.0.22 → 1.0.24

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 CHANGED
@@ -1048,8 +1048,7 @@ function OptionList({
1048
1048
  const isAndroidDelisted = headerData?.isAndroidDelisted;
1049
1049
  const apkURL = headerData?.apkURL;
1050
1050
  const downloadApkURL = isAndroidDelisted && apkURL ? apkURL : null;
1051
- const downloadAppText = countryCode === "KR" ? "앱다운로드" : 'Download App';
1052
- console.log('sakshat country code options list', countryCode);
1051
+ const downloadAppText = countryCode === 'KR' ? '앱다운로드' : 'Download App';
1053
1052
  const renderDownloadAppButton = () => {
1054
1053
  return /*#__PURE__*/React.createElement(React.Fragment, null, apkURL && /*#__PURE__*/React.createElement("a", {
1055
1054
  download: true,
@@ -1058,8 +1057,8 @@ function OptionList({
1058
1057
  className: classes.socialBtnItems
1059
1058
  }, /*#__PURE__*/React.createElement("img", {
1060
1059
  style: {
1061
- width: "139px",
1062
- borderRadius: "8px"
1060
+ width: '139px',
1061
+ borderRadius: '8px'
1063
1062
  },
1064
1063
  src: downloadApkImage,
1065
1064
  alt: "download-apk"
@@ -1348,9 +1347,7 @@ function MobileHeader({
1348
1347
  let iosUrl = null;
1349
1348
  let androidUrl = null;
1350
1349
  let downloadLink = null;
1351
- const downloadAppText = countryCode === "KR" ? "앱다운로드" : 'Download App';
1352
- console.log('sakshat header mobile', header);
1353
- console.log('sakshat country code mobile', countryCode);
1350
+ const downloadAppText = countryCode === 'KR' ? '앱다운로드' : 'Download App';
1354
1351
  if (isTutorWebsite) {
1355
1352
  if (header?.iosUrl) {
1356
1353
  iosUrl = /*#__PURE__*/React.createElement(Button, {
@@ -3720,7 +3717,8 @@ function SubscribeToNewsletter({
3720
3717
  isMobile,
3721
3718
  validations,
3722
3719
  isPreview,
3723
- isEdit
3720
+ isEdit,
3721
+ isLandingPages
3724
3722
  } = useContext(PageContext);
3725
3723
  const [nodeData] = sectionData.components;
3726
3724
  const classes = useSectionStyles$4({
@@ -3740,7 +3738,10 @@ function SubscribeToNewsletter({
3740
3738
  type: 'email',
3741
3739
  value: inputVal
3742
3740
  }
3743
- }
3741
+ },
3742
+ ...(isLandingPages && {
3743
+ source: 'landing_page'
3744
+ })
3744
3745
  };
3745
3746
  if (!(isPreview || isEdit)) postApiCall(baseURLs, data);
3746
3747
  setBtnDisabled(true);
@@ -6540,7 +6541,8 @@ function FormEnquiry({
6540
6541
  isMobile,
6541
6542
  validations,
6542
6543
  isPreview,
6543
- isEdit
6544
+ isEdit,
6545
+ isLandingPages
6544
6546
  } = useContext(PageContext);
6545
6547
  const classes = useSectionStyles$1({
6546
6548
  containerWidth,
@@ -6573,7 +6575,10 @@ function FormEnquiry({
6573
6575
  let data = {
6574
6576
  sectionId: sectionData?._id || null,
6575
6577
  sectionType: sectionData?.type,
6576
- payload: inputVal
6578
+ payload: inputVal,
6579
+ ...(isLandingPages && {
6580
+ source: 'landing_page'
6581
+ })
6577
6582
  };
6578
6583
  if (!(isPreview || isEdit)) postApiCall(baseURLs, data);
6579
6584
  setBtnDisabled(true);
@@ -6977,7 +6982,8 @@ function Contact({
6977
6982
  isMobile,
6978
6983
  validations,
6979
6984
  isPreview,
6980
- isEdit
6985
+ isEdit,
6986
+ isLandingPages
6981
6987
  } = useContext(PageContext);
6982
6988
  let [btnDisabled, setBtnDisabled] = useState(false);
6983
6989
  const [nodeData] = sectionData.components;
@@ -7002,7 +7008,10 @@ function Contact({
7002
7008
  const data = {
7003
7009
  sectionId: sectionData?._id || null,
7004
7010
  sectionType: sectionData?.type,
7005
- payload: inputVal
7011
+ payload: inputVal,
7012
+ ...(isLandingPages && {
7013
+ source: 'landing_page'
7014
+ })
7006
7015
  };
7007
7016
  if (!(isPreview || isEdit)) postApiCall(baseURLs, data);
7008
7017
  setBtnDisabled(true);
@@ -8006,7 +8015,7 @@ const SingleVideoSlide = props => {
8006
8015
  const checkIfOfferIsValid = () => moment().diff(moment(props?.data?.endDate || 0)) < 0;
8007
8016
  const checkForShowDiscount = () => {
8008
8017
  if (props.data.endDate === null || checkIfOfferIsValid()) {
8009
- if (data.discount > 0 && data.offerPriceValidFor === null) {
8018
+ if (data.discount > 0 && !data?.offerPriceValidFor) {
8010
8019
  return true;
8011
8020
  } else if (data.discount > 0 && data.offerPriceValidFor !== null && data.offerPriceValidFor - conversions <= 0) {
8012
8021
  return false;