diy-template-components 0.2.68 → 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.js CHANGED
@@ -2818,7 +2818,7 @@ var index$k = /*#__PURE__*/Object.freeze({
2818
2818
  const useSectionStyles$6 = createUseStyles(theme => ({
2819
2819
  bannerCarouselCenterSection: {
2820
2820
  width: '100%',
2821
- height: '100%',
2821
+ // height: '100%',
2822
2822
  textAlign: 'center',
2823
2823
  position: 'relative',
2824
2824
  '&, & *, & *:before, & *:after': {
@@ -2852,7 +2852,7 @@ const useSectionStyles$6 = createUseStyles(theme => ({
2852
2852
  // height: '100%',
2853
2853
  // display: 'flex',
2854
2854
  // alignItems: 'center'
2855
- height: '100%',
2855
+ // height: '100%',
2856
2856
  display: 'flex',
2857
2857
  /* padding: 100px 0; */
2858
2858
  alignItems: 'center'
@@ -2923,9 +2923,10 @@ const useSectionStyles$6 = createUseStyles(theme => ({
2923
2923
  textContainer: {
2924
2924
  padding: '20px 20px',
2925
2925
  height: '100%',
2926
- width: '100%',
2927
- backgroundColor: theme?.palette?.background?.primary
2926
+ width: '100%'
2927
+ // backgroundColor: theme?.palette?.background?.primary
2928
2928
  },
2929
+
2929
2930
  subTitleHeading: {
2930
2931
  color: theme?.palette?.font?.tertiary
2931
2932
  },
@@ -2979,34 +2980,34 @@ const Section$3 = ({
2979
2980
  className: classes.contentContainer
2980
2981
  }, /*#__PURE__*/React__default["default"].createElement("div", {
2981
2982
  className: classes.sectionContainer
2982
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2983
+ }, !(nodeData.cardHeading.metadata.value === '<br>' && nodeData.title.metadata.value === '<br>' && nodeData.description.metadata.value === '<br>' && nodeData?.cta?.metadata?.value === '') ? /*#__PURE__*/React__default["default"].createElement("div", {
2983
2984
  className: classes.textContainer
2984
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2985
+ }, nodeData.cardHeading.metadata.value !== '<br>' ? /*#__PURE__*/React__default["default"].createElement("div", {
2985
2986
  className: classes.subTitleHeading
2986
2987
  }, /*#__PURE__*/React__default["default"].createElement("span", {
2987
2988
  ref: nodeData?.cardHeading?.refSetter,
2988
2989
  dangerouslySetInnerHTML: {
2989
2990
  __html: nodeData.cardHeading.metadata.value
2990
2991
  }
2991
- })), /*#__PURE__*/React__default["default"].createElement("h2", {
2992
+ })) : null, nodeData.title.metadata.value !== '<br>' ? /*#__PURE__*/React__default["default"].createElement("h2", {
2992
2993
  className: classes.heading
2993
2994
  }, /*#__PURE__*/React__default["default"].createElement("span", {
2994
2995
  ref: nodeData?.title?.refSetter,
2995
2996
  dangerouslySetInnerHTML: {
2996
2997
  __html: nodeData.title.metadata.value
2997
2998
  }
2998
- })), /*#__PURE__*/React__default["default"].createElement("p", {
2999
+ })) : null, nodeData.description.metadata.value !== '<br>' ? /*#__PURE__*/React__default["default"].createElement("p", {
2999
3000
  ref: nodeData?.description?.refSetter,
3000
3001
  className: classes.description,
3001
3002
  dangerouslySetInnerHTML: {
3002
3003
  __html: nodeData.description.metadata.value
3003
3004
  }
3004
- }), nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : /*#__PURE__*/React__default["default"].createElement(Button, {
3005
+ }) : null, nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : /*#__PURE__*/React__default["default"].createElement(Button, {
3005
3006
  ref: nodeData?.cta?.refSetter,
3006
3007
  data: nodeData.cta.metadata,
3007
3008
  type: nodeData?.cta?.metadata?.type,
3008
3009
  size: isMobile ? 'small' : 'medium'
3009
- }))), /*#__PURE__*/React__default["default"].createElement("div", {
3010
+ })) : null), /*#__PURE__*/React__default["default"].createElement("div", {
3010
3011
  className: classes?.centerBgImageContainer
3011
3012
  }, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
3012
3013
  src: nodeData.image.metadata.value,
@@ -5475,7 +5476,11 @@ const useCourseStyles = createUseStyles(theme => {
5475
5476
  },
5476
5477
  courseCardImgThumbnail: {
5477
5478
  borderTopLeftRadius: theme?.shape?.borderRadius?.regular,
5478
- borderTopRightRadius: theme?.shape?.borderRadius?.regular
5479
+ borderTopRightRadius: theme?.shape?.borderRadius?.regular,
5480
+ maxWidth: '100%',
5481
+ minHeight: '100%',
5482
+ maxHeight: '100%',
5483
+ minWidth: '100%'
5479
5484
  },
5480
5485
  courseCardData: {
5481
5486
  padding: '20px',
@@ -7118,16 +7123,13 @@ const SingleVideoSlide$1 = props => {
7118
7123
  };
7119
7124
  const checkIfOfferIsValid = () => moment__default["default"]().diff(moment__default["default"](props.data.offerPriceEndDate)) < 0;
7120
7125
  const checkForShowDiscount = () => {
7121
- if (checkIfOfferIsValid() && data?.discount) {
7122
- return true;
7123
- }
7124
7126
  if (props.data.endDate === null || checkIfOfferIsValid()) {
7125
- if (data.discount > 0 && data.offerPriceValidFor === 0) {
7127
+ if (data.discount > 0 && data.offerPriceValidFor === null) {
7126
7128
  return true;
7127
- } else if (data.discount > 0 && data.offerPriceValidFor !== 0 && data.offerPriceValidFor - conversions <= 0) {
7129
+ } else if (data.discount > 0 && data.offerPriceValidFor !== null && data.offerPriceValidFor - conversions <= 0) {
7128
7130
  return false;
7129
7131
  }
7130
- } else if (data.offerPriceValidFor >= 0 && data.discount) {
7132
+ } else if (data.offerPriceValidFor >= null && data.discount) {
7131
7133
  if (data.offerPriceValidFor <= conversions) {
7132
7134
  return false;
7133
7135
  }
@@ -7156,11 +7158,11 @@ const SingleVideoSlide$1 = props => {
7156
7158
  className: classes.iframeSuperContainer
7157
7159
  }, /*#__PURE__*/React__default["default"].createElement("div", {
7158
7160
  className: classes.videoDetails
7159
- }, data?.isPaid !== 0 && (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && /*#__PURE__*/React__default["default"].createElement("div", null, data.offerPriceValidFor - conversions > 0 && (data.offerPriceEndDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React__default["default"].createElement("div", {
7161
+ }, data?.isPaid !== 0 && (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && /*#__PURE__*/React__default["default"].createElement("div", null, data.offerPriceValidFor > conversions && (data.discount && data.offerPriceEndDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React__default["default"].createElement("div", {
7160
7162
  className: classes.bannerContainer
7161
7163
  }, /*#__PURE__*/React__default["default"].createElement("div", {
7162
7164
  className: classes.bannerContainerText
7163
- }, "Hurry up! Offer left for", ' ', data.offerPriceValidFor - conversions, ' ', data.offerPriceValidFor - conversions > 1 ? 'users now' : 'user only')) : checkIfOfferIsValid() && /*#__PURE__*/React__default["default"].createElement("div", {
7165
+ }, "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__default["default"].createElement("div", {
7164
7166
  className: classes.bannerContainer
7165
7167
  }, /*#__PURE__*/React__default["default"].createElement("div", {
7166
7168
  className: classes.bannerContainerText
@@ -7204,7 +7206,7 @@ const SingleVideoSlide$1 = props => {
7204
7206
  }
7205
7207
  }))), /*#__PURE__*/React__default["default"].createElement("div", {
7206
7208
  className: classes.courseViewContainer
7207
- }, data.isPaid !== 0 && checkIfOfferIsValid() && (data.offerPriceValidFor === 0 ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React__default["default"].createElement("p", {
7209
+ }, data.isPaid !== 0 && checkIfOfferIsValid() && (data.offerPriceValidFor !== null ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React__default["default"].createElement("p", {
7208
7210
  className: classes.offerText
7209
7211
  }, "Offer Ends in", ' ', /*#__PURE__*/React__default["default"].createElement("span", {
7210
7212
  className: classes.courseDetailTime
@@ -7610,12 +7612,12 @@ const SingleVideoSlide = props => {
7610
7612
  const checkIfOfferIsValid = () => moment__default["default"]().diff(moment__default["default"](props?.data?.endDate || 0)) < 0;
7611
7613
  const checkForShowDiscount = () => {
7612
7614
  if (props.data.endDate === null || checkIfOfferIsValid()) {
7613
- if (data.discount > 0 && data.offerPriceValidFor === 0) {
7615
+ if (data.discount > 0 && data.offerPriceValidFor === null) {
7614
7616
  return true;
7615
- } else if (data.discount > 0 && data.offerPriceValidFor !== 0 && data.offerPriceValidFor - conversions <= 0) {
7617
+ } else if (data.discount > 0 && data.offerPriceValidFor !== null && data.offerPriceValidFor - conversions <= 0) {
7616
7618
  return false;
7617
7619
  }
7618
- } else if (data.offerPriceValidFor >= 0 && data.discount) {
7620
+ } else if (data.offerPriceValidFor >= null && data.discount) {
7619
7621
  if (data.offerPriceValidFor <= conversions) {
7620
7622
  return false;
7621
7623
  }
@@ -7644,7 +7646,7 @@ const SingleVideoSlide = props => {
7644
7646
  className: classes.iframeSuperContainer
7645
7647
  }, /*#__PURE__*/React__default["default"].createElement("div", {
7646
7648
  className: classes.videoDetails
7647
- }, (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && data.offerPriceValidFor > conversions && /*#__PURE__*/React__default["default"].createElement("div", null, data.offerPriceValidFor - conversions > 0 && data.discount && (data.endDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React__default["default"].createElement("div", {
7649
+ }, (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && (data.offerPriceValidFor > conversions || data.offerPriceValidFor === null) && /*#__PURE__*/React__default["default"].createElement("div", null, data.offerPriceValidFor - conversions > 0 && data.discount && (data.endDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React__default["default"].createElement("div", {
7648
7650
  className: classes.bannerContainer
7649
7651
  }, /*#__PURE__*/React__default["default"].createElement("div", {
7650
7652
  className: classes.bannerContainerText
@@ -7717,7 +7719,7 @@ const SingleVideoSlide = props => {
7717
7719
  }
7718
7720
  }, /*#__PURE__*/React__default["default"].createElement("div", {
7719
7721
  className: classes.courseViewContainer
7720
- }, checkIfOfferIsValid() && (data.offerPriceValidFor !== 0 ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React__default["default"].createElement("p", {
7722
+ }, checkIfOfferIsValid() && (data.offerPriceValidFor !== null ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React__default["default"].createElement("p", {
7721
7723
  className: classes.offerText
7722
7724
  }, "Offer Ends in", ' ', /*#__PURE__*/React__default["default"].createElement("span", {
7723
7725
  className: classes.courseDetailTime