diy-template-components 0.2.29 → 0.2.31

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
@@ -1519,6 +1519,7 @@ function Footer({
1519
1519
  }) {
1520
1520
  const theme = useTheme();
1521
1521
  const classes = useSectionStyles$9();
1522
+ console.log(data, 'this is data');
1522
1523
  return /*#__PURE__*/React.createElement("footer", {
1523
1524
  className: data.metadata.isCpBranding ? `${classes.section}` : `${classes.section} ${classes.sectionNoBranding}`
1524
1525
  }, /*#__PURE__*/React.createElement("div", {
@@ -2298,7 +2299,7 @@ function Section$4({
2298
2299
  dangerouslySetInnerHTML: {
2299
2300
  __html: nodeData.description.metadata.value
2300
2301
  }
2301
- }), /*#__PURE__*/React.createElement(Button, {
2302
+ }), nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : /*#__PURE__*/React.createElement(Button, {
2302
2303
  ref: nodeData?.cta?.refSetter,
2303
2304
  data: nodeData.cta.metadata,
2304
2305
  type: nodeData?.cta?.metadata?.type,
@@ -2728,7 +2729,7 @@ const Section$3 = ({
2728
2729
  dangerouslySetInnerHTML: {
2729
2730
  __html: nodeData.description.metadata.value
2730
2731
  }
2731
- }), /*#__PURE__*/React.createElement(Button, {
2732
+ }), nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : /*#__PURE__*/React.createElement(Button, {
2732
2733
  ref: nodeData?.cta?.refSetter,
2733
2734
  data: nodeData.cta.metadata,
2734
2735
  type: nodeData?.cta?.metadata?.type,
@@ -2911,7 +2912,7 @@ function Section$2({
2911
2912
  dangerouslySetInnerHTML: {
2912
2913
  __html: nodeData.description.metadata.value
2913
2914
  }
2914
- }), /*#__PURE__*/React.createElement(Button, {
2915
+ }), nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : /*#__PURE__*/React.createElement(Button, {
2915
2916
  ref: nodeData?.cta?.refSetter,
2916
2917
  data: nodeData.cta.metadata,
2917
2918
  type: nodeData?.cta?.metadata?.type,
@@ -3308,7 +3309,7 @@ function SubscribeToNewsletter({
3308
3309
  onFocus: () => {
3309
3310
  setIsValid(true);
3310
3311
  }
3311
- })), /*#__PURE__*/React.createElement("div", {
3312
+ })), nodeData.cta.metadata.value !== '' && /*#__PURE__*/React.createElement("div", {
3312
3313
  className: classes.btnContainer
3313
3314
  }, /*#__PURE__*/React.createElement(Button, {
3314
3315
  ref: nodeData?.cta?.refSetter,
@@ -6082,7 +6083,7 @@ function FormEnquiry({
6082
6083
  messageValid: 1
6083
6084
  });
6084
6085
  }
6085
- })), nodeData?.cta?.metadata?.value !== '' && /*#__PURE__*/React.createElement(Button, {
6086
+ })), nodeData.cta.metadata.value !== '' && /*#__PURE__*/React.createElement(Button, {
6086
6087
  ref: nodeData?.cta?.refSetter,
6087
6088
  data: btnDisabled && validData?.messageValid && validData?.emailValid && validData?.nameValid && validData?.phoneValid ? {
6088
6089
  value: 'Submitted'
@@ -6463,7 +6464,7 @@ function Contact({
6463
6464
  messageValid: 1
6464
6465
  });
6465
6466
  }
6466
- })), /*#__PURE__*/React.createElement(Button, {
6467
+ })), nodeData.cta.metadata.value !== '' && /*#__PURE__*/React.createElement(Button, {
6467
6468
  ref: nodeData?.cta?.refSetter,
6468
6469
  data: btnDisabled && validData?.messageValid && validData?.emailValid && validData?.nameValid && validData?.phoneValid ? {
6469
6470
  value: 'Submitted'