diy-template-components 0.2.7 → 0.2.8

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
@@ -7994,7 +7994,10 @@ function Section({
7994
7994
  emailRef,
7995
7995
  customHtmlData
7996
7996
  }) {
7997
- console.log('customHtmlData', customHtmlData);
7997
+ const {
7998
+ isEdit
7999
+ } = useContext(PageContext);
8000
+ console.log('customHtmlData', isEdit);
7998
8001
  const header = nodeData?.components[0];
7999
8002
  const body = nodeData?.components[1];
8000
8003
  const landing = nodeData?.components[2];
@@ -8149,13 +8152,7 @@ function Section({
8149
8152
  textAlign: 'left'
8150
8153
  },
8151
8154
  ref: landing?.components[1]?.refSetter
8152
- }, landing?.components[1]?.metadata?.text), /*#__PURE__*/React.createElement("a", {
8153
- href: landing?.components[3]?.metadata?.text,
8154
- target: "_blank",
8155
- style: {
8156
- textDecoration: 'none'
8157
- }
8158
- }, /*#__PURE__*/React.createElement("p", {
8155
+ }, landing?.components[1]?.metadata?.text), /*#__PURE__*/React.createElement("p", {
8159
8156
  style: {
8160
8157
  background: '#009ae0',
8161
8158
  borderRadius: '7.18333px',
@@ -8163,15 +8160,19 @@ function Section({
8163
8160
  textDecoration: 'none',
8164
8161
  padding: '12px 0px',
8165
8162
  // fontFamily: 'Roboto',
8163
+ cursor: 'pointer',
8166
8164
  fontStyle: 'normal',
8167
- fontWeight: '600',
8165
+ fontWeight: '600 ',
8168
8166
  fontSize: '20.55px',
8169
8167
  lineHeight: '32px',
8170
8168
  textTransform: 'uppercase',
8171
8169
  color: '#fafafa'
8172
8170
  },
8171
+ onClick: () => {
8172
+ !isEdit ? window.open(landing?.components[3]?.metadata?.text, '_blank') : null;
8173
+ },
8173
8174
  ref: landing?.components[2]?.refSetter
8174
- }, landing?.components[2]?.metadata?.text)))))))))) : null, footer?.isActive ? /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("table", {
8175
+ }, landing?.components[2]?.metadata?.text))))))))) : null, footer?.isActive ? /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("table", {
8175
8176
  style: {
8176
8177
  width: '100%',
8177
8178
  background: '#e3f0ff',
@@ -8194,79 +8195,69 @@ function Section({
8194
8195
  marginTop: '8px',
8195
8196
  marginBottom: '16px'
8196
8197
  }
8197
- }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
8198
- href: footer?.components[0]?.metadata?.text,
8199
- target: "_blank",
8200
- style: {
8201
- textDecoration: 'none'
8202
- }
8203
- }, /*#__PURE__*/React.createElement("img", {
8198
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("img", {
8204
8199
  src: footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.iconUrlColor : footer?.components[0]?.metadata?.iconUrl,
8205
8200
  alt: "",
8206
8201
  style: {
8207
8202
  width: '36px',
8208
- height: '36px'
8203
+ height: '36px',
8204
+ cursor: 'pointer'
8209
8205
  },
8210
- ref: footer?.components[0]?.refSetter
8211
- })), /*#__PURE__*/React.createElement("a", {
8212
- href: footer?.components[1]?.metadata?.text,
8213
- target: "_blank",
8214
- style: {
8215
- textDecoration: 'none'
8206
+ ref: footer?.components[0]?.refSetter,
8207
+ onClick: () => {
8208
+ !isEdit ? window.open(footer?.components[0]?.metadata?.text, '_blank') : null;
8216
8209
  }
8217
- }, /*#__PURE__*/React.createElement("img", {
8210
+ }), /*#__PURE__*/React.createElement("img", {
8218
8211
  src: footer?.components[1]?.metadata?.text ? footer?.components[1]?.metadata?.iconUrlColor : footer?.components[1]?.metadata?.iconUrl,
8219
8212
  alt: "",
8220
8213
  style: {
8221
8214
  width: '36px',
8222
8215
  height: '36px',
8223
- margin: '0px 12px'
8216
+ margin: '0px 12px',
8217
+ cursor: 'pointer'
8218
+ },
8219
+ onClick: () => {
8220
+ !isEdit ? window.open(footer?.components[1]?.metadata?.text, '_blank') : null;
8224
8221
  },
8225
8222
  ref: footer?.components[1]?.refSetter
8226
- })), /*#__PURE__*/React.createElement("a", {
8227
- href: footer?.components[2]?.metadata?.text,
8228
- target: "_blank",
8229
- style: {
8230
- textDecoration: 'none'
8231
- }
8232
- }, /*#__PURE__*/React.createElement("img", {
8223
+ }), /*#__PURE__*/React.createElement("img", {
8233
8224
  src: footer?.components[2]?.metadata?.text ? footer?.components[2]?.metadata?.iconUrlColor : footer?.components[2]?.metadata?.iconUrl,
8234
8225
  alt: "",
8235
8226
  style: {
8236
8227
  width: '36px',
8237
- height: '36px'
8228
+ height: '36px',
8229
+ cursor: 'pointer'
8230
+ },
8231
+ onClick: () => {
8232
+ !isEdit ? window.open(footer?.components[2]?.metadata?.text, '_blank') : null;
8238
8233
  },
8239
8234
  ref: footer?.components[2]?.refSetter
8240
- })), /*#__PURE__*/React.createElement("a", {
8241
- href: footer?.components[3]?.metadata?.text,
8242
- target: "_blank",
8243
- style: {
8244
- textDecoration: 'none'
8245
- }
8246
- }, /*#__PURE__*/React.createElement("img", {
8235
+ }), /*#__PURE__*/React.createElement("img", {
8247
8236
  src: footer?.components[3]?.metadata?.text ? footer?.components[3]?.metadata?.iconUrlColor : footer?.components[3]?.metadata?.iconUrl,
8248
8237
  alt: "",
8249
8238
  style: {
8250
8239
  width: '36px',
8251
8240
  height: '36px',
8252
- margin: '0px 12px'
8241
+ margin: '0px 12px',
8242
+ cursor: 'pointer'
8253
8243
  },
8254
- ref: footer?.components[3]?.refSetter
8255
- })), /*#__PURE__*/React.createElement("a", {
8256
- href: footer?.components[4]?.metadata?.text,
8257
- target: "_blank",
8258
- style: {
8259
- textDecoration: 'none'
8244
+ ref: footer?.components[3]?.refSetter,
8245
+ onClick: () => {
8246
+ !isEdit ? window.open(footer?.components[3]?.metadata?.text, '_blank') : null;
8260
8247
  }
8261
- }, /*#__PURE__*/React.createElement("img", {
8248
+ }), /*#__PURE__*/React.createElement("img", {
8262
8249
  src: footer?.components[4]?.metadata?.text ? footer?.components[4]?.metadata?.iconUrlColor : footer?.components[4]?.metadata?.iconUrl,
8263
8250
  alt: "",
8264
8251
  style: {
8265
8252
  width: '36px',
8266
- height: '36px'
8253
+ height: '36px',
8254
+ cursor: 'pointer'
8267
8255
  },
8268
- ref: footer?.components[4]?.refSetter
8269
- })), /*#__PURE__*/React.createElement("table", {
8256
+ ref: footer?.components[4]?.refSetter,
8257
+ onClick: () => {
8258
+ !isEdit ? window.open(footer?.components[4]?.metadata?.text, '_blank') : null;
8259
+ }
8260
+ }), /*#__PURE__*/React.createElement("table", {
8270
8261
  style: {
8271
8262
  width: '100%',
8272
8263
  marginTop: '13px'
@@ -8281,7 +8272,7 @@ function Section({
8281
8272
  textAlign: 'center',
8282
8273
  color: '#7d8592'
8283
8274
  }
8284
- }, "For any concerns, mail us at", ' ' + footer?.components[5]?.metadata?.text ? footer?.components[5]?.metadata?.text : ''), /*#__PURE__*/React.createElement("p", {
8275
+ }, "For any concerns, mail us at\xA0", footer?.components[5]?.metadata?.text ? footer?.components[5]?.metadata?.text : ''), /*#__PURE__*/React.createElement("p", {
8285
8276
  style: {
8286
8277
  // fontFamily: 'Roboto',
8287
8278
  fontStyle: 'normal',
@@ -8291,7 +8282,7 @@ function Section({
8291
8282
  textAlign: 'center',
8292
8283
  color: '#7d8592'
8293
8284
  }
8294
- }, "Copyright \xA9 2023 |", ' ' + footer?.components[5]?.metadata?.text ? footer?.components[5]?.metadata?.text : ''), /*#__PURE__*/React.createElement("p", {
8285
+ }, "Copyright \xA9 2023 |\xA0", footer?.components[5]?.metadata?.text ? footer?.components[5]?.metadata?.text : ''), /*#__PURE__*/React.createElement("p", {
8295
8286
  style: {
8296
8287
  // fontFamily: 'Roboto',
8297
8288
  fontStyle: 'normal',