@innovastudio/contentbox 1.5.31 → 1.5.33

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/contentbox",
3
3
  "type": "module",
4
- "version": "1.5.31",
4
+ "version": "1.5.33",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "files": [
@@ -46,7 +46,7 @@
46
46
  "webpack-dev-server": "^4.0.0"
47
47
  },
48
48
  "dependencies": {
49
- "@innovastudio/contentbuilder": "^1.4.23",
49
+ "@innovastudio/contentbuilder": "^1.4.24",
50
50
  "js-beautify": "^1.14.0"
51
51
  }
52
52
  }
@@ -10900,7 +10900,7 @@ class EditBox {
10900
10900
 
10901
10901
  ` ) + '<div style="padding:0;width:100%;">' + '<div class="is-tabs clearfix" style="padding-top:37px;" data-group="boxsettings">' + '<a id="tabBoxGeneral" href="" data-content="divBoxGeneral" class="active">' + out('General') + '</a>' + '<a id="tabBoxContentContainer" href="" data-content="divBoxContentContainer">' + out('Content') + '</a>' + '<a id="tabBoxContentText" href="" data-content="divBoxContentText">' + out('Text') + '</a>' + '<a id="tabBoxImage" href="" data-content="divBoxImage">' + out('Image') + '</a>' + '<a id="tabBoxAnimate" href="" data-content="divBoxAnimate">' + out('Animation') + '</a>' + '<a id="tabBoxClick" href="" data-content="divBoxClick">' + out('On Click') + '</a>' + '</div>' + '<div id="divBoxGeneral" class="is-tab-content active" data-group="boxsettings" style="display:flex;padding-top:0">' + '<div style="display:flex">' + '<div id="divBoxSize" style="margin-right: 50px;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Box Size') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Decrease') + '" class="cmd-box-smaller" style="width:40px;">-</button>' + '<button title="' + out('Increase') + '" class="cmd-box-larger" style="width:40px;border-left:none">+</button>' + '<br style="clear:both">' + '</div>' + '</div>' + '<div id="divBoxMove">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Move') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Left') + '" class="cmd-box-left" style="width:40px;">←</button>' + '<button title="' + out('Right') + '" class="cmd-box-right" style="width:40px;border-left:none">→</button>' + '<br style="clear:both">' + '</div>' + '</div>' + '</div>';
10902
10902
  html += '<div id="divContentSize">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Content Size') + ': &nbsp;<span class="val-box-size" style="font-size:12px"></span></div>' + '<div style="display: flex;flex-direction: row;flex-wrap: wrap;">' + '<input class="inp-box-size" type="text" style="display:none;width:80px;height:35px;text-align:center;font-size:12px;" />' + '<button class="cmd-box-size" data-value="500" style="width:40px;border-left:none">500</button>' + '<button class="cmd-box-size" data-value="600" style="width:40px;border-left:none">600</button>' + '<button class="cmd-box-size" data-value="700" style="width:40px;border-left:none">700</button>' + '<button class="cmd-box-size" data-value="800" style="width:40px;border-top:none">800</button>' + '<button class="cmd-box-size" data-value="900" style="width:40px;border-top:none">900</button>' + '<button class="cmd-box-size" data-value="1000" style="width:40px;border-top:none;border-left:none">1000</button>' + '<button class="cmd-box-size" data-value="1100" style="width:40px;border-top:none;border-left:none">1100</button>' + '<button class="cmd-box-size" data-value="1200" style="width:40px;border-top:none;border-left:none">1200</button>' + '<button class="cmd-box-size" data-value="1300" style="width:40px;border-top:none;border-left:none">1300</button>' + '<button class="cmd-box-size" data-value="1400" style="width:40px;border-top:none;border-left:none">1400</button>' + '<button class="cmd-box-size" data-value="1500" style="width:40px;border-top:none;border-left:none">1500</button>' + '<button class="cmd-box-size" data-value="1600" style="width:40px;border-top:none;border-left:none">1600</button>' + '<button class="cmd-box-size" data-value="1800" style="width:40px;border-top:none;border-left:none">1800</button>' + '<button title="' + out('Clear') + '" class="cmd-box-size" data-value=""><svg class="is-icon-flex" style="width:10px;height:10px;"><use xlink:href="#icon-clean"></use></svg></button>' + '<button title="' + out('Decrease') + '" class="cmd-box-size" data-value="-" style="width:40px;border-top:none;border-left:none">-</button>' + '<button title="' + out('Increase') + '"class="cmd-box-size" data-value="+" style="width:40px;border-top:none;border-left:none">+</button>' + '<br style="clear:both">' + '</div>' + '</div>';
10903
- html += '<div id="divBoxBackgroundColor">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Background Color') + ':</div>' + '<div style="display:flex;">' + '<button title="' + out('Background Color') + '" class="input-box-bgcolor is-btn-color" style="margin-right:15px"></button>' + '<button title="' + out('Gradient') + '" class="input-box-gradient classic" data-value="+">' + out('Gradient') + '</button>' + '</div>' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Background Image') + ':</div>' + '<div style="height:auto">' + '<div style="display:flex;align-items:flex-end;">' + '<div class="box-bgimage-preview"></div>' + '<label class="label-box-bgimage-grayscale label-checkbox" for="chkBoxBgImageGrayscale" style="margin:0;margin-left:8px;margin-bottom:5px;"><input id="chkBoxBgImageGrayscale" class="chk-box-bgimage-grayscale" type="checkbox" /> ' + out('Grayscale') + '</label>' + '</div>' + '<div style="display:flex;align-items: flex-end;">' + '<button title="' + out('Image') + '" class="input-box-bgimage">' + '<svg class="is-icon-flex"><use xlink:href="#ion-image"></use></svg>' + '<span>' + out('Image') + '</span>' + '</button>' + '<button title="' + out('Select') + '" class="input-select">' + this.builder.selectIcon + '</button>' + '<button title="' + out('Remove') + '" class="input-box-bgremove"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>' + '<button title="' + out('Adjust') + '" class="input-box-bgimageadjust"><svg class="is-icon-flex"><use xlink:href="#ion-wrench"></use></svg></button>' + '</div>' + '</div>' + '</div>' + '<div id="divBoxPickPhoto" class="is-settings" style="padding-top:20px">' + '<button class="cmd-box-pickphoto" data-value="" style="width:100%"><svg class="is-icon-flex" style=""><use xlink:href="#ion-image"></use></svg></button>' + '</div>' + '<div style="display:flex;padding-top:20px;">' + '<div style="display:flex;align-items: center;margin-right:30px">' + '<label for="chkAutofitContent" style="margin:0;display:flex;align-items: center;"><input id="chkAutofitContent" type="checkbox" /> <span style="margin-left:3px">' + out('Autofit on Mobile') + '</span></label>' + '</div>' + '<div style="display:flex;align-items: center;">' + '<label for="inpBoxMinHeight" style="margin:0 4px 0 0;">' + out('Min Height') + ':</label>' + '<select id="inpBoxMinHeight">' + '<option value="">' + out('Not Set') + '</option>' + '<option value="20">20%</option>' + '<option value="25">25%</option>' + '<option value="30">30%</option>' + '<option value="40">40%</option>' + '<option value="50">50%</option>' + '<option value="60">60%</option>' + '<option value="70">70%</option>' + '<option value="75">75%</option>' + '<option value="80">80%</option>' + '<option value="90">90%</option>' + '<option value="100">100%</option>' + '</select>' + '</div>' + '</div>' + '<div style="display:flex;justify-content:flex-end;">' + '<button title="' + out('Add Text') + '" class="cmd-box-addtext" style="display:none;margin-top:20px;"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#ion-android-add"></use></svg> <span>' + out('Add Text') + '</span></button>' + '<button title="' + out('Remove Text') + '" class="cmd-box-removetext" style="display:none;margin-top:20px;"><svg class="is-icon-flex" style="width:9px;height:9px;"><use xlink:href="#icon-clean"></use></svg> <span>' + out('Remove Text') + '</span></button>' + '<button title="' + out('Add Code') + '" class="cmd-box-addcode" style="display:none;margin-top:20px;"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#ion-android-add"></use></svg> <span>' + out('Add Code') + '</span></button>' + '<button title="' + out('Remove Code') + '" class="cmd-box-removecode" style="display:none;margin-top:20px;"><svg class="is-icon-flex" style="width:9px;height:9px;"><use xlink:href="#icon-clean"></use></svg> <span>' + out('Remove Code') + '</span></button>' + '</div>' + '<p id="divNoBoxSettings" style="text-align: center;display:none;">' + out('This box has no available settings.') + '</p>' + '</div>';
10903
+ html += '<div id="divBoxBackgroundColor">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Background Color') + ':</div>' + '<div style="display:flex;">' + '<button title="' + out('Background Color') + '" class="input-box-bgcolor is-btn-color" style="margin-right:15px"></button>' + '<button title="' + out('Gradient') + '" class="input-box-gradient classic" data-value="+">' + out('Gradient') + '</button>' + '</div>' + '</div>' + '<div id="divBoxBackgroundImage">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Background Image') + ':</div>' + '<div style="height:auto">' + '<div style="display:flex;align-items:flex-end;">' + '<div class="box-bgimage-preview"></div>' + '<label class="label-box-bgimage-grayscale label-checkbox" for="chkBoxBgImageGrayscale" style="margin:0;margin-left:8px;margin-bottom:5px;"><input id="chkBoxBgImageGrayscale" class="chk-box-bgimage-grayscale" type="checkbox" /> ' + out('Grayscale') + '</label>' + '</div>' + '<div style="display:flex;align-items: flex-end;">' + '<button title="' + out('Image') + '" class="input-box-bgimage">' + '<svg class="is-icon-flex"><use xlink:href="#ion-image"></use></svg>' + '<span>' + out('Image') + '</span>' + '</button>' + '<button title="' + out('Select') + '" class="input-select">' + this.builder.selectIcon + '</button>' + '<button title="' + out('Remove') + '" class="input-box-bgremove"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>' + '<button title="' + out('Adjust') + '" class="input-box-bgimageadjust"><svg class="is-icon-flex"><use xlink:href="#ion-wrench"></use></svg></button>' + '</div>' + '</div>' + '</div>' + '<div id="divBoxPickPhoto" class="is-settings" style="padding-top:20px">' + '<button class="cmd-box-pickphoto" data-value="" style="width:100%"><svg class="is-icon-flex" style=""><use xlink:href="#ion-image"></use></svg></button>' + '</div>' + '<div style="display:flex;padding-top:20px;">' + '<div style="display:flex;align-items: center;margin-right:30px">' + '<label for="chkAutofitContent" style="margin:0;display:flex;align-items: center;"><input id="chkAutofitContent" type="checkbox" /> <span style="margin-left:3px">' + out('Autofit on Mobile') + '</span></label>' + '</div>' + '<div style="display:flex;align-items: center;">' + '<label for="inpBoxMinHeight" style="margin:0 4px 0 0;">' + out('Min Height') + ':</label>' + '<select id="inpBoxMinHeight">' + '<option value="">' + out('Not Set') + '</option>' + '<option value="20">20%</option>' + '<option value="25">25%</option>' + '<option value="30">30%</option>' + '<option value="40">40%</option>' + '<option value="50">50%</option>' + '<option value="60">60%</option>' + '<option value="70">70%</option>' + '<option value="75">75%</option>' + '<option value="80">80%</option>' + '<option value="90">90%</option>' + '<option value="100">100%</option>' + '</select>' + '</div>' + '</div>' + '<div style="display:flex;justify-content:flex-end;">' + '<button title="' + out('Add Text') + '" class="cmd-box-addtext" style="display:none;margin-top:20px;"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#ion-android-add"></use></svg> <span>' + out('Add Text') + '</span></button>' + '<button title="' + out('Remove Text') + '" class="cmd-box-removetext" style="display:none;margin-top:20px;"><svg class="is-icon-flex" style="width:9px;height:9px;"><use xlink:href="#icon-clean"></use></svg> <span>' + out('Remove Text') + '</span></button>' + '<button title="' + out('Add Code') + '" class="cmd-box-addcode" style="display:none;margin-top:20px;"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#ion-android-add"></use></svg> <span>' + out('Add Code') + '</span></button>' + '<button title="' + out('Remove Code') + '" class="cmd-box-removecode" style="display:none;margin-top:20px;"><svg class="is-icon-flex" style="width:9px;height:9px;"><use xlink:href="#icon-clean"></use></svg> <span>' + out('Remove Code') + '</span></button>' + '</div>' + '<p id="divNoBoxSettings" style="text-align: center;display:none;">' + out('This box has no available settings.') + '</p>' + '</div>';
10904
10904
  html += '<div id="divBoxClick" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + '<label for="inpBoxLinkSource" style="display:block;padding-top:20px;">' + out('Open') + ':</label>' + '<div class="image-src" style="display:flex">' + '<input id="inpBoxLinkSource" class="input-src" type="text" style="height:38px">' + '<button title="' + out('Select') + '" class="input-select" style="flex:none;width:40px;height:38px;background:transparent;">' + this.builder.selectIcon + '</button>' + `<button title="${out(this.builder.otherSelectCaption)}" class="input-select-other" style="display:none;flex:none;width:40px;height:38px;background:transparent;">
10905
10905
  ${this.builder.otherSelectIcon}
10906
10906
  </button>` + '<div class="image-larger5" style="position: relative; flex: 0 0 auto; width: 40px; height: 38px; box-shadow: rgba(0, 0, 0, 0.32) 0px 3px 6px -6px;">' + '<form class="form-upload-larger" target="frameTargetBoxLinkUpload" method="post" action="' + this.builder.largerImageHandler + '" enctype="multipart/form-data" style="position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;">' + '<input id="hidRefId5_box" name="hidRefId" type="hidden" value="">' + '<svg class="is-icon-flex" style="width:18px;height:18px;"><use xlink:href="#ion-ios-cloud-upload-outline"></use></svg>' + '<input onclick="blur()" title="' + out('Select') + '" id="fileImage5" name="fileImage" type="file" accept="image/*,video/mp4" style="position:absolute;top:-30px;left:0;width:100%;height:80px;opacity: 0;cursor: pointer;">' + '</form>' + '<iframe id="frameTargetBoxLinkUpload" tabindex="-1" name="frameTargetBoxLinkUpload" src="about:blank" style="width:1px;height:1px;position:absolute;top:0;right:-100000px"></iframe>' + '</div>' + '</div>' + '<div style="padding-top:20px">' + '<button class="cmd-box-testclick">' + out('Test') + '</button>' + '</div>' + '</div>';
@@ -11652,6 +11652,8 @@ class EditBox {
11652
11652
  dom$l.removeClass(activeBox.querySelector('.edge-y-3'), 'edge-y-3');
11653
11653
  dom$l.removeClass(activeBox.querySelector('.edge-y-4'), 'edge-y-4');
11654
11654
  dom$l.removeClass(activeBox.querySelector('.edge-y-5'), 'edge-y-5');
11655
+ dom$l.removeClass(activeBox.querySelector('.edge-y-6'), 'edge-y-6');
11656
+ dom$l.removeClass(activeBox.querySelector('.edge-y-7'), 'edge-y-7');
11655
11657
  dom$l.removeClass(activeBox.querySelector('.edge-y-8'), 'edge-y-8'); // old (backward compatible)
11656
11658
 
11657
11659
  dom$l.removeClass(activeBox.querySelector('.edge-x--1'), 'edge-x--1');
@@ -11667,6 +11669,7 @@ class EditBox {
11667
11669
  dom$l.removeClass(activeBox.querySelector('.edge-x-3'), 'edge-x-3');
11668
11670
  dom$l.removeClass(activeBox.querySelector('.edge-x-4'), 'edge-x-4');
11669
11671
  dom$l.removeClass(activeBox.querySelector('.edge-x-5'), 'edge-x-5');
11672
+ dom$l.removeClass(activeBox.querySelector('.edge-x-6'), 'edge-x-6');
11670
11673
  dom$l.removeClass(activeBox.querySelector('.is-box-centered'), 'is-content-top');
11671
11674
  dom$l.removeClass(activeBox.querySelector('.is-box-centered'), 'is-content-bottom');
11672
11675
  dom$l.removeClass(activeBox, 'is-content-top'); //simplified
@@ -12778,11 +12781,13 @@ class EditBox {
12778
12781
 
12779
12782
  activeModule.setAttribute('data-html', encodeURIComponent(hidModuleCode.value)); //Save Settings (original)
12780
12783
 
12781
- activeModule.setAttribute('data-settings', encodeURIComponent(hidModuleSettings.value)); //Render (programmatically)
12784
+ activeModule.setAttribute('data-settings', encodeURIComponent(hidModuleSettings.value));
12785
+ let html = hidModuleCode.value;
12786
+ html = html.replace(/{id}/g, dom$l.uniqueId()); //Render (programmatically)
12782
12787
 
12783
12788
  let range = document.createRange();
12784
12789
  activeModule.innerHTML = '';
12785
- activeModule.appendChild(range.createContextualFragment(hidModuleCode.value)); // We use createContextualFragment so that embedded javascript code (code block) will be executed
12790
+ activeModule.appendChild(range.createContextualFragment(html)); // We use createContextualFragment so that embedded javascript code (code block) will be executed
12786
12791
  //Trigger Render event
12787
12792
 
12788
12793
  this.builder.settings.onRender(); //Trigger Change event
@@ -12925,13 +12930,13 @@ class EditBox {
12925
12930
  }
12926
12931
 
12927
12932
  if (overlayVideo) {
12928
- modalEditBox.querySelector('#divBoxBackgroundColor').style.display = 'none';
12933
+ modalEditBox.querySelector('#divBoxBackgroundImage').style.display = 'none';
12929
12934
  } else {
12930
- modalEditBox.querySelector('#divBoxBackgroundColor').style.display = '';
12935
+ modalEditBox.querySelector('#divBoxBackgroundImage').style.display = '';
12931
12936
 
12932
12937
  if (overlayBgHasContent) {
12933
12938
  //There is content within background overlay
12934
- modalEditBox.querySelector('#divBoxBackgroundColor').style.display = 'none';
12939
+ modalEditBox.querySelector('#divBoxBackgroundImage').style.display = 'none';
12935
12940
  }
12936
12941
  }
12937
12942
 
@@ -13249,7 +13254,7 @@ class EditBox {
13249
13254
  url = activeBox.getAttribute('data-modal-url');
13250
13255
  if (url !== '') inpClickSrc.value = url;else inpClickSrc.value = '';
13251
13256
 
13252
- if (modalEditBox.querySelector('#divBoxSize').style.display === 'none' && modalEditBox.querySelector('#divBoxBackgroundColor').style.display === 'none' && modalEditBox.querySelector('#tabBoxContentText').style.display === 'none' && modalEditBox.querySelector('#tabBoxContentContainer').style.display === 'none' && modalEditBox.querySelector('#tabBoxImage').style.display === 'none' && modalEditBox.querySelector('#tabBoxAnimate').style.display === 'none' && modalEditBox.querySelector('#tabBoxCustomHtml').style.display === 'none') {
13257
+ if (modalEditBox.querySelector('#divBoxSize').style.display === 'none' && modalEditBox.querySelector('#divBoxBackgroundColor').style.display === 'none' && modalEditBox.querySelector('#divBoxBackgroundImage').style.display === 'none' && modalEditBox.querySelector('#tabBoxContentText').style.display === 'none' && modalEditBox.querySelector('#tabBoxContentContainer').style.display === 'none' && modalEditBox.querySelector('#tabBoxImage').style.display === 'none' && modalEditBox.querySelector('#tabBoxAnimate').style.display === 'none' && modalEditBox.querySelector('#tabBoxCustomHtml').style.display === 'none') {
13253
13258
  modalEditBox.querySelector('#divNoBoxSettings').style.display = 'block'; //Show info: This box has no available settings
13254
13259
  } else {
13255
13260
  modalEditBox.querySelector('#divNoBoxSettings').style.display = 'none';
@@ -13679,6 +13684,12 @@ class EditBox {
13679
13684
  h = '780px';
13680
13685
  }
13681
13686
 
13687
+ if (moduleName === 'video-bg') {
13688
+ // div.style.width = '1600px';
13689
+ w = '600px';
13690
+ h = '635px';
13691
+ }
13692
+
13682
13693
  div.style.maxWidth = w;
13683
13694
  div.style.height = h;
13684
13695
  }
@@ -14327,6 +14338,7 @@ class EditBox {
14327
14338
  overlay.style.filter = '';
14328
14339
  const chkBoxBgImageGrayscale = modalEditBox.querySelector('.chk-box-bgimage-grayscale');
14329
14340
  chkBoxBgImageGrayscale.checked = false;
14341
+ overlayBg.style.backgroundSize = '';
14330
14342
  overlayBg.style.backgroundPosition = '50% 60%';
14331
14343
  overlayBg.removeAttribute('data-scale');
14332
14344
  overlayBg.removeAttribute('data-x');
@@ -91574,7 +91586,89 @@ class LivePreview {
91574
91586
  }
91575
91587
  }
91576
91588
  } else {
91577
- iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
91589
+ // ContentBox
91590
+ // iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
91591
+ let iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
91592
+
91593
+ if (iframeDocument) {
91594
+ if (iframeDocument.body.innerHTML === '') {
91595
+ iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
91596
+ } else {
91597
+ // sync. html
91598
+ let html = localStorage.getItem('preview-html');
91599
+ let wrapper = iframeDocument.querySelector('.is-wrapper');
91600
+ wrapper.innerHTML = html; // sync. styles
91601
+ // let mainCss = localStorage.getItem('preview-maincss');
91602
+ // let sectionCss = localStorage.getItem('preview-sectioncss');
91603
+
91604
+ let elms = iframeDocument.querySelectorAll('link');
91605
+ let links = this.builder.doc.getElementsByTagName('link');
91606
+ Array.from(links).map(link => {
91607
+ let href = link.href.toLowerCase();
91608
+
91609
+ if (href.indexOf('/basetype-') !== -1 || href.indexOf('/type-') !== -1) {
91610
+ // check
91611
+ let exist = false;
91612
+ elms.forEach(elm => {
91613
+ let elmHref = elm.href.toLowerCase();
91614
+
91615
+ if (elmHref) {
91616
+ if (elmHref.indexOf('/basetype-') !== -1 || elmHref.indexOf('/type-') !== -1) {
91617
+ if (href === elmHref) {
91618
+ exist = true;
91619
+ }
91620
+ }
91621
+ }
91622
+ });
91623
+
91624
+ if (!exist) {
91625
+ // clone is needed, otherwise, parent resource may dissapear when loading on iframe
91626
+ const clone = link.cloneNode(true);
91627
+ iframeDocument.head.appendChild(clone); // ADD
91628
+ }
91629
+ }
91630
+ });
91631
+ elms.forEach(elm => {
91632
+ let href = elm.href.toLowerCase();
91633
+
91634
+ if (href.indexOf('/basetype-') !== -1 || href.indexOf('/type-') !== -1) {
91635
+ // check
91636
+ let exist = false;
91637
+ Array.from(links).map(link => {
91638
+ let elmHref = link.href.toLowerCase();
91639
+
91640
+ if (elmHref) {
91641
+ if (elmHref.indexOf('/basetype-') !== -1 || elmHref.indexOf('/type-') !== -1) {
91642
+ if (href === elmHref) {
91643
+ exist = true;
91644
+ }
91645
+ }
91646
+ }
91647
+ });
91648
+
91649
+ if (!exist) {
91650
+ iframeDocument.head.removeChild(elm); // REMOVE
91651
+ }
91652
+ }
91653
+ }); // reload box js
91654
+
91655
+ elms = iframeDocument.querySelectorAll('script');
91656
+ elms.forEach(elm => {
91657
+ let src = elm.getAttribute('src');
91658
+
91659
+ if (src) {
91660
+ if (src.indexOf('box-flex.js') !== -1 || src.indexOf('box.js') !== -1) {
91661
+ elm.parentElement.removeChild(elm);
91662
+ let scriptElm = document.createElement('script');
91663
+ scriptElm.setAttribute('src', src);
91664
+ iframeDocument.body.appendChild(scriptElm);
91665
+ }
91666
+ }
91667
+ });
91668
+ }
91669
+ } else {
91670
+ iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
91671
+ }
91578
91672
  }
91579
91673
 
91580
91674
  iframe.onload = () => {
@@ -99813,14 +99907,12 @@ class AnimateScroll {
99813
99907
  this.clickContent();
99814
99908
  }, 30);
99815
99909
  }; //Extend onChange
99910
+ // let old2 = this.builder.settings.onChange;
99911
+ // this.builder.settings.onChange = ()=>{
99912
+ // old2.call(this);
99913
+ // this.builder.editor.livePreview.previewRefresh();
99914
+ // };
99816
99915
 
99817
-
99818
- let old2 = this.builder.settings.onChange;
99819
-
99820
- this.builder.settings.onChange = () => {
99821
- old2.call(this);
99822
- this.builder.editor.livePreview.previewRefresh();
99823
- };
99824
99916
  }
99825
99917
 
99826
99918
  openPreview() {