@innovastudio/contentbuilder 1.4.121 → 1.4.122

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.4.121",
4
+ "version": "1.4.122",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -10713,7 +10713,7 @@ class HtmlUtil {
10713
10713
  // Do not use imgUrl directly, change base to [%PATH%] instead
10714
10714
  // (to prevent auto converting back to relative path)
10715
10715
 
10716
- let urlBase = location.href.substring(0, location.href.lastIndexOf('/'));
10716
+ let urlBase = window.location.href.substring(0, window.location.href.lastIndexOf('/'));
10717
10717
  return imgUrl.replace(urlBase, '[%PATH%]');
10718
10718
 
10719
10719
  // Example:
@@ -19014,7 +19014,7 @@ function getOffset(element) {
19014
19014
  top: box.top + (window.pageYOffset - document.documentElement.clientTop)
19015
19015
  };
19016
19016
  }
19017
- var location$1 = WINDOW.location;
19017
+ var location = WINDOW.location;
19018
19018
  var REGEXP_ORIGINS = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
19019
19019
  /**
19020
19020
  * Check if the given URL is a cross origin URL.
@@ -19024,7 +19024,7 @@ var REGEXP_ORIGINS = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
19024
19024
 
19025
19025
  function isCrossOriginURL(url) {
19026
19026
  var parts = url.match(REGEXP_ORIGINS);
19027
- return parts !== null && (parts[1] !== location$1.protocol || parts[2] !== location$1.hostname || parts[3] !== location$1.port);
19027
+ return parts !== null && (parts[1] !== location.protocol || parts[2] !== location.hostname || parts[3] !== location.port);
19028
19028
  }
19029
19029
  /**
19030
19030
  * Add timestamp to the given URL.
@@ -69909,7 +69909,7 @@ class Lightbox {
69909
69909
 
69910
69910
  // in case opened in an iframe (ex. preview)
69911
69911
  if (window.frameElement && !lightbox) {
69912
- lightbox = parent.document.querySelector('.is-lightbox.lightbox-edit');
69912
+ lightbox = window.parent.document.querySelector('.is-lightbox.lightbox-edit');
69913
69913
  }
69914
69914
  if (!this.programmatically) {
69915
69915
  const list = this.getList();
@@ -69982,7 +69982,7 @@ class Lightbox {
69982
69982
 
69983
69983
  // in case opened in an iframe (ex. preview)
69984
69984
  if (window.frameElement && !lightbox) {
69985
- lightbox = parent.document.querySelector('.is-lightbox.lightbox-edit');
69985
+ lightbox = window.parent.document.querySelector('.is-lightbox.lightbox-edit');
69986
69986
  }
69987
69987
  if (!this.programmatically) {
69988
69988
  const list = this.getList();
@@ -70059,7 +70059,7 @@ class Lightbox {
70059
70059
 
70060
70060
  // in case opened in an iframe (ex. preview)
70061
70061
  if (window.frameElement && !lightbox) {
70062
- lightbox = parent.document.querySelector('.is-lightbox.lightbox-edit');
70062
+ lightbox = window.parent.document.querySelector('.is-lightbox.lightbox-edit');
70063
70063
  }
70064
70064
  if (!this.programmatically) {
70065
70065
  const list = this.getList();
@@ -74920,7 +74920,9 @@ class Dictation {
74920
74920
  let lang = this.builder.speechRecognitionLang;
74921
74921
  this.recognition.lang = lang;
74922
74922
  this.recognition.start();
74923
- this.speechTimeout;
74923
+
74924
+ // this.speechTimeout;
74925
+
74924
74926
  this.builder.commandText = '';
74925
74927
  let finalTranscripts = '';
74926
74928
  this.recognition.onresult = event => {
@@ -77679,7 +77681,7 @@ class ContentBuilder {
77679
77681
  output = output.replaceAll('[%PATH%]', options.path);
77680
77682
  } else {
77681
77683
  let urlBase;
77682
- urlBase = location.href.substring(0, location.href.lastIndexOf('/'));
77684
+ urlBase = window.location.href.substring(0, window.location.href.lastIndexOf('/'));
77683
77685
  output = output.replaceAll('[%PATH%]', urlBase);
77684
77686
  }
77685
77687