diy-template-components 0.2.17 → 0.2.19

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
@@ -7920,8 +7920,7 @@ const useEmailStyles = createUseStyles(theme => ({
7920
7920
  wrapper: {
7921
7921
  fontFamily: theme?.typography?.fontFamily,
7922
7922
  width: '100%',
7923
- tableLayout: 'fixed',
7924
- backgroundColor: '#cccccc'
7923
+ tableLayout: 'fixed'
7925
7924
  },
7926
7925
  email_description_para: {
7927
7926
  '& p': {
@@ -7992,7 +7991,8 @@ const useEmailStyles = createUseStyles(theme => ({
7992
7991
  function Section({
7993
7992
  nodeData,
7994
7993
  emailRef,
7995
- customHtmlData
7994
+ customHtmlData,
7995
+ renderHTML = false
7996
7996
  }) {
7997
7997
  const header = nodeData?.components[0];
7998
7998
  const body = nodeData?.components[1];
@@ -8214,7 +8214,8 @@ function Section({
8214
8214
  href: footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.text : undefined,
8215
8215
  target: "_blank",
8216
8216
  style: {
8217
- textDecoration: 'none'
8217
+ textDecoration: 'none',
8218
+ display: renderHTML && footer?.components[0]?.metadata?.text ? '' : renderHTML === false ? '' : 'none'
8218
8219
  }
8219
8220
  }, /*#__PURE__*/React.createElement("img", {
8220
8221
  src: footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.iconUrlColor : footer?.components[0]?.metadata?.iconUrl,
@@ -8229,7 +8230,8 @@ function Section({
8229
8230
  href: footer?.components[1]?.metadata?.text ? footer?.components[1]?.metadata?.text : undefined,
8230
8231
  target: "_blank",
8231
8232
  style: {
8232
- textDecoration: 'none'
8233
+ textDecoration: 'none',
8234
+ display: renderHTML && footer?.components[1]?.metadata?.text ? '' : renderHTML === false ? '' : 'none'
8233
8235
  }
8234
8236
  }, /*#__PURE__*/React.createElement("img", {
8235
8237
  src: footer?.components[1]?.metadata?.text ? footer?.components[1]?.metadata?.iconUrlColor : footer?.components[1]?.metadata?.iconUrl,
@@ -8245,7 +8247,8 @@ function Section({
8245
8247
  href: footer?.components[2]?.metadata?.text ? footer?.components[2]?.metadata?.text : undefined,
8246
8248
  target: "_blank",
8247
8249
  style: {
8248
- textDecoration: 'none'
8250
+ textDecoration: 'none',
8251
+ display: renderHTML && footer?.components[2]?.metadata?.text ? '' : renderHTML === false ? '' : 'none'
8249
8252
  }
8250
8253
  }, /*#__PURE__*/React.createElement("img", {
8251
8254
  src: footer?.components[2]?.metadata?.text ? footer?.components[2]?.metadata?.iconUrlColor : footer?.components[2]?.metadata?.iconUrl,
@@ -8260,7 +8263,8 @@ function Section({
8260
8263
  href: footer?.components[3]?.metadata?.text ? footer?.components[3]?.metadata?.text : undefined,
8261
8264
  target: "_blank",
8262
8265
  style: {
8263
- textDecoration: 'none'
8266
+ textDecoration: 'none',
8267
+ display: renderHTML && footer?.components[3]?.metadata?.text ? '' : renderHTML === false ? '' : 'none'
8264
8268
  }
8265
8269
  }, /*#__PURE__*/React.createElement("img", {
8266
8270
  src: footer?.components[3]?.metadata?.text ? footer?.components[3]?.metadata?.iconUrlColor : footer?.components[3]?.metadata?.iconUrl,
@@ -8276,7 +8280,8 @@ function Section({
8276
8280
  href: footer?.components[4]?.metadata?.text ? footer?.components[4]?.metadata?.text : undefined,
8277
8281
  target: "_blank",
8278
8282
  style: {
8279
- textDecoration: 'none'
8283
+ textDecoration: 'none',
8284
+ display: renderHTML && footer?.components[4]?.metadata?.text ? '' : renderHTML === false ? '' : 'none'
8280
8285
  }
8281
8286
  }, /*#__PURE__*/React.createElement("img", {
8282
8287
  src: footer?.components[4]?.metadata?.text ? footer?.components[4]?.metadata?.iconUrlColor : footer?.components[4]?.metadata?.iconUrl,
@@ -8312,7 +8317,7 @@ function Section({
8312
8317
  textAlign: 'center',
8313
8318
  color: '#7d8592'
8314
8319
  }
8315
- }, "Copyright \xA9 2023 |\xA0", footer?.components[5]?.metadata?.text ? footer?.components[5]?.metadata?.text : ''), /*#__PURE__*/React.createElement("p", {
8320
+ }, "Copyright \xA9 2023 |\xA0", footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.text : ''), /*#__PURE__*/React.createElement("p", {
8316
8321
  style: {
8317
8322
  // fontFamily: 'Roboto',
8318
8323
  fontStyle: 'normal',
@@ -8333,7 +8338,8 @@ function EmailDripMarket({
8333
8338
  const isInitialMount = useRef(true);
8334
8339
  const convertToHtml = sectionData => {
8335
8340
  const html = ReactDOMServer.renderToStaticMarkup( /*#__PURE__*/React.createElement(Section, {
8336
- nodeData: sectionData
8341
+ nodeData: sectionData,
8342
+ renderHTML: true
8337
8343
  }));
8338
8344
  return html;
8339
8345
  };
@@ -8349,12 +8355,11 @@ function EmailDripMarket({
8349
8355
  const emailRef = useRef(null);
8350
8356
  return /*#__PURE__*/React.createElement("section", {
8351
8357
  style: {
8352
- width: '95%',
8353
- paddingBottom: '30%'
8358
+ width: '95%'
8354
8359
  }
8355
8360
  }, /*#__PURE__*/React.createElement("div", {
8356
8361
  onClick: e => {
8357
- e.stopPropagation();
8362
+ e.stopPropagation(); // prevent the click from event Capturing, in email onClick events do not work
8358
8363
  e.preventDefault();
8359
8364
  }
8360
8365
  }, /*#__PURE__*/React.createElement(Section, {