@innovastudio/contentbuilder 1.5.107 → 1.5.109

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.5.107",
4
+ "version": "1.5.109",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -50229,8 +50229,23 @@ class Module {
50229
50229
  setTimeout(() => {
50230
50230
  iframe.style.opacity = '';
50231
50231
  }, 1);
50232
+
50233
+ /*
50234
+ // import myText from './myfile.txt?raw';
50235
+ // Replace assets path
50236
+ let moduleContent = '';
50237
+ if(modulename==='form-builder') {
50238
+ moduleContent = TXT_FormBuilder;
50239
+ }
50240
+ moduleContent = moduleContent.replace(/="assets\//g, '="' + this.builder.settings.assetPath);
50241
+ iframe.srcdoc = moduleContent;
50242
+ setTimeout(()=>{
50243
+ iframe.style.opacity = '';
50244
+ }, 1);
50245
+ */
50232
50246
  }
50233
50247
  }
50248
+
50234
50249
  click(col) {
50235
50250
  let custommodule = false;
50236
50251
  if (col.hasAttribute('data-module')) {
@@ -86913,13 +86928,15 @@ ${answer}
86913
86928
  if (this.builder.sendCommand) {
86914
86929
  data = await this.builder.sendCommand(messages);
86915
86930
  } else {
86931
+ let headers = {
86932
+ ...this.builder.headers,
86933
+ ...this.builder.defaultHeaders
86934
+ };
86916
86935
  const response = await fetch(this.builder.sendCommandUrl, {
86917
86936
  signal: this.signal,
86918
86937
  // Abort
86919
86938
  method: 'POST',
86920
- headers: {
86921
- 'Content-Type': 'application/json'
86922
- },
86939
+ headers,
86923
86940
  body: JSON.stringify(messages)
86924
86941
  });
86925
86942
  data = await response.json();
@@ -86983,11 +87000,13 @@ ${answer}
86983
87000
  if (this.builder.consoleLog) {
86984
87001
  if (!(error + '').includes('Failed to fetch')) {
86985
87002
  // Only if not CORS error
87003
+ let headers = {
87004
+ ...this.builder.headers,
87005
+ ...this.builder.defaultHeaders
87006
+ };
86986
87007
  const response = await fetch(this.builder.sendCommandUrl, {
86987
87008
  method: 'POST',
86988
- headers: {
86989
- 'Content-Type': 'application/json'
86990
- },
87009
+ headers,
86991
87010
  body: JSON.stringify(messages)
86992
87011
  });
86993
87012
  const data = await response.text();
@@ -93492,6 +93511,10 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
93492
93511
  }
93493
93512
  this.settings = this.opts; // Backward compatible
93494
93513
 
93514
+ if (this.isContentBox) {
93515
+ this.settings.snippetModal = false;
93516
+ }
93517
+
93495
93518
  // freeform
93496
93519
  if (this.canvas && !this.isContentBox) {
93497
93520
  /*