diy-template-components 0.2.67 → 0.2.69

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
@@ -2803,7 +2803,7 @@ var index$k = /*#__PURE__*/Object.freeze({
2803
2803
  const useSectionStyles$6 = createUseStyles(theme => ({
2804
2804
  bannerCarouselCenterSection: {
2805
2805
  width: '100%',
2806
- height: '100%',
2806
+ // height: '100%',
2807
2807
  textAlign: 'center',
2808
2808
  position: 'relative',
2809
2809
  '&, & *, & *:before, & *:after': {
@@ -2837,7 +2837,7 @@ const useSectionStyles$6 = createUseStyles(theme => ({
2837
2837
  // height: '100%',
2838
2838
  // display: 'flex',
2839
2839
  // alignItems: 'center'
2840
- height: '100%',
2840
+ // height: '100%',
2841
2841
  display: 'flex',
2842
2842
  /* padding: 100px 0; */
2843
2843
  alignItems: 'center'
@@ -2908,9 +2908,10 @@ const useSectionStyles$6 = createUseStyles(theme => ({
2908
2908
  textContainer: {
2909
2909
  padding: '20px 20px',
2910
2910
  height: '100%',
2911
- width: '100%',
2912
- backgroundColor: theme?.palette?.background?.primary
2911
+ width: '100%'
2912
+ // backgroundColor: theme?.palette?.background?.primary
2913
2913
  },
2914
+
2914
2915
  subTitleHeading: {
2915
2916
  color: theme?.palette?.font?.tertiary
2916
2917
  },
@@ -2964,34 +2965,34 @@ const Section$3 = ({
2964
2965
  className: classes.contentContainer
2965
2966
  }, /*#__PURE__*/React.createElement("div", {
2966
2967
  className: classes.sectionContainer
2967
- }, /*#__PURE__*/React.createElement("div", {
2968
+ }, !(nodeData.cardHeading.metadata.value === '<br>' && nodeData.title.metadata.value === '<br>' && nodeData.description.metadata.value === '<br>' && nodeData?.cta?.metadata?.value === '') ? /*#__PURE__*/React.createElement("div", {
2968
2969
  className: classes.textContainer
2969
- }, /*#__PURE__*/React.createElement("div", {
2970
+ }, nodeData.cardHeading.metadata.value !== '<br>' ? /*#__PURE__*/React.createElement("div", {
2970
2971
  className: classes.subTitleHeading
2971
2972
  }, /*#__PURE__*/React.createElement("span", {
2972
2973
  ref: nodeData?.cardHeading?.refSetter,
2973
2974
  dangerouslySetInnerHTML: {
2974
2975
  __html: nodeData.cardHeading.metadata.value
2975
2976
  }
2976
- })), /*#__PURE__*/React.createElement("h2", {
2977
+ })) : null, nodeData.title.metadata.value !== '<br>' ? /*#__PURE__*/React.createElement("h2", {
2977
2978
  className: classes.heading
2978
2979
  }, /*#__PURE__*/React.createElement("span", {
2979
2980
  ref: nodeData?.title?.refSetter,
2980
2981
  dangerouslySetInnerHTML: {
2981
2982
  __html: nodeData.title.metadata.value
2982
2983
  }
2983
- })), /*#__PURE__*/React.createElement("p", {
2984
+ })) : null, nodeData.description.metadata.value !== '<br>' ? /*#__PURE__*/React.createElement("p", {
2984
2985
  ref: nodeData?.description?.refSetter,
2985
2986
  className: classes.description,
2986
2987
  dangerouslySetInnerHTML: {
2987
2988
  __html: nodeData.description.metadata.value
2988
2989
  }
2989
- }), nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : /*#__PURE__*/React.createElement(Button, {
2990
+ }) : null, nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : /*#__PURE__*/React.createElement(Button, {
2990
2991
  ref: nodeData?.cta?.refSetter,
2991
2992
  data: nodeData.cta.metadata,
2992
2993
  type: nodeData?.cta?.metadata?.type,
2993
2994
  size: isMobile ? 'small' : 'medium'
2994
- }))), /*#__PURE__*/React.createElement("div", {
2995
+ })) : null), /*#__PURE__*/React.createElement("div", {
2995
2996
  className: classes?.centerBgImageContainer
2996
2997
  }, /*#__PURE__*/React.createElement(NextImageRenderer, {
2997
2998
  src: nodeData.image.metadata.value,
@@ -5460,7 +5461,11 @@ const useCourseStyles = createUseStyles(theme => {
5460
5461
  },
5461
5462
  courseCardImgThumbnail: {
5462
5463
  borderTopLeftRadius: theme?.shape?.borderRadius?.regular,
5463
- borderTopRightRadius: theme?.shape?.borderRadius?.regular
5464
+ borderTopRightRadius: theme?.shape?.borderRadius?.regular,
5465
+ maxWidth: '100%',
5466
+ minHeight: '100%',
5467
+ maxHeight: '100%',
5468
+ minWidth: '100%'
5464
5469
  },
5465
5470
  courseCardData: {
5466
5471
  padding: '20px',
@@ -7103,16 +7108,13 @@ const SingleVideoSlide$1 = props => {
7103
7108
  };
7104
7109
  const checkIfOfferIsValid = () => moment().diff(moment(props.data.offerPriceEndDate)) < 0;
7105
7110
  const checkForShowDiscount = () => {
7106
- if (checkIfOfferIsValid() && data?.discount) {
7107
- return true;
7108
- }
7109
7111
  if (props.data.endDate === null || checkIfOfferIsValid()) {
7110
- if (data.discount > 0 && data.offerPriceValidFor === 0) {
7112
+ if (data.discount > 0 && data.offerPriceValidFor === null) {
7111
7113
  return true;
7112
- } else if (data.discount > 0 && data.offerPriceValidFor !== 0 && data.offerPriceValidFor - conversions <= 0) {
7114
+ } else if (data.discount > 0 && data.offerPriceValidFor !== null && data.offerPriceValidFor - conversions <= 0) {
7113
7115
  return false;
7114
7116
  }
7115
- } else if (data.offerPriceValidFor >= 0 && data.discount) {
7117
+ } else if (data.offerPriceValidFor >= null && data.discount) {
7116
7118
  if (data.offerPriceValidFor <= conversions) {
7117
7119
  return false;
7118
7120
  }
@@ -7141,11 +7143,11 @@ const SingleVideoSlide$1 = props => {
7141
7143
  className: classes.iframeSuperContainer
7142
7144
  }, /*#__PURE__*/React.createElement("div", {
7143
7145
  className: classes.videoDetails
7144
- }, data?.isPaid !== 0 && (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && /*#__PURE__*/React.createElement("div", null, data.offerPriceValidFor - conversions > 0 && data.discount && (data.offerPriceEndDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React.createElement("div", {
7146
+ }, data?.isPaid !== 0 && (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && /*#__PURE__*/React.createElement("div", null, data.offerPriceValidFor > conversions && (data.discount && data.offerPriceEndDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React.createElement("div", {
7145
7147
  className: classes.bannerContainer
7146
7148
  }, /*#__PURE__*/React.createElement("div", {
7147
7149
  className: classes.bannerContainerText
7148
- }, "Hurry up! Offer left for", ' ', data.offerPriceValidFor - conversions, ' ', data.offerPriceValidFor - conversions > 1 ? 'users now' : 'user only')) : checkIfOfferIsValid() && /*#__PURE__*/React.createElement("div", {
7150
+ }, "Hurry up! Offer left for", ' ', data.offerPriceValidFor - conversions, ' ', data.offerPriceValidFor - conversions > 1 ? 'users now' : 'user only')) : checkIfOfferIsValid() && data.offerPriceValidFor !== null ? data.offerPriceValidFor - conversions > 0 : /*#__PURE__*/React.createElement("div", {
7149
7151
  className: classes.bannerContainer
7150
7152
  }, /*#__PURE__*/React.createElement("div", {
7151
7153
  className: classes.bannerContainerText
@@ -7189,7 +7191,7 @@ const SingleVideoSlide$1 = props => {
7189
7191
  }
7190
7192
  }))), /*#__PURE__*/React.createElement("div", {
7191
7193
  className: classes.courseViewContainer
7192
- }, data.isPaid !== 0 && checkIfOfferIsValid() && (data.offerPriceValidFor === 0 ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React.createElement("p", {
7194
+ }, data.isPaid !== 0 && checkIfOfferIsValid() && (data.offerPriceValidFor !== null ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React.createElement("p", {
7193
7195
  className: classes.offerText
7194
7196
  }, "Offer Ends in", ' ', /*#__PURE__*/React.createElement("span", {
7195
7197
  className: classes.courseDetailTime
@@ -7595,12 +7597,12 @@ const SingleVideoSlide = props => {
7595
7597
  const checkIfOfferIsValid = () => moment().diff(moment(props?.data?.endDate || 0)) < 0;
7596
7598
  const checkForShowDiscount = () => {
7597
7599
  if (props.data.endDate === null || checkIfOfferIsValid()) {
7598
- if (data.discount > 0 && data.offerPriceValidFor === 0) {
7600
+ if (data.discount > 0 && data.offerPriceValidFor === null) {
7599
7601
  return true;
7600
- } else if (data.discount > 0 && data.offerPriceValidFor !== 0 && data.offerPriceValidFor - conversions <= 0) {
7602
+ } else if (data.discount > 0 && data.offerPriceValidFor !== null && data.offerPriceValidFor - conversions <= 0) {
7601
7603
  return false;
7602
7604
  }
7603
- } else if (data.offerPriceValidFor >= 0 && data.discount) {
7605
+ } else if (data.offerPriceValidFor >= null && data.discount) {
7604
7606
  if (data.offerPriceValidFor <= conversions) {
7605
7607
  return false;
7606
7608
  }
@@ -7629,7 +7631,7 @@ const SingleVideoSlide = props => {
7629
7631
  className: classes.iframeSuperContainer
7630
7632
  }, /*#__PURE__*/React.createElement("div", {
7631
7633
  className: classes.videoDetails
7632
- }, (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("div", {
7634
+ }, (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && (data.offerPriceValidFor > conversions || data.offerPriceValidFor === null) && /*#__PURE__*/React.createElement("div", null, data.offerPriceValidFor - conversions > 0 && data.discount && (data.endDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React.createElement("div", {
7633
7635
  className: classes.bannerContainer
7634
7636
  }, /*#__PURE__*/React.createElement("div", {
7635
7637
  className: classes.bannerContainerText
@@ -7702,7 +7704,7 @@ const SingleVideoSlide = props => {
7702
7704
  }
7703
7705
  }, /*#__PURE__*/React.createElement("div", {
7704
7706
  className: classes.courseViewContainer
7705
- }, checkIfOfferIsValid() && (data.offerPriceValidFor !== 0 ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React.createElement("p", {
7707
+ }, checkIfOfferIsValid() && (data.offerPriceValidFor !== null ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React.createElement("p", {
7706
7708
  className: classes.offerText
7707
7709
  }, "Offer Ends in", ' ', /*#__PURE__*/React.createElement("span", {
7708
7710
  className: classes.courseDetailTime