@innovastudio/contentbox 1.0.39 → 1.0.40

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "",
5
5
  "main": "public/contentbox/contentbox.esm.js",
6
6
  "files": [
@@ -311,7 +311,7 @@ class SideBar {
311
311
  this.builderStuff = builderStuff;
312
312
 
313
313
  if (this.builder.useSidebar) {
314
- html += '<div class="is-sidebar active" style="transform: translate3d(0,0,0);display: flex;flex-direction: column;opacity:opacity: 0.0001;">';
314
+ html += '<div class="is-sidebar active" style="transform: translate3d(0,0,0);display: flex;flex-direction: column;opacity: 0.0001;">';
315
315
  var sideIndex = 0;
316
316
  this.builder.sidebarData.buttons.map(button => {
317
317
  if (button.name == 'section') {
@@ -1723,8 +1723,8 @@ class SideBar {
1723
1723
  function applyParentStyles() {
1724
1724
  var cssString = '' +
1725
1725
  'body {' +
1726
- 'background: ${parent._cb.styleSnippetBackground};' +
1727
- 'color: ${parent._cb.styleSnippetColor};' +
1726
+ 'background: ' + parent._cb.styleSnippetBackground + ';' +
1727
+ 'color: ' + parent._cb.styleSnippetColor + ';' +
1728
1728
  'margin: 0;' +
1729
1729
  '}' +
1730
1730
 
@@ -1793,7 +1793,7 @@ class SideBar {
1793
1793
  '}' +
1794
1794
 
1795
1795
  'svg {' +
1796
- 'fill: ${parent._cb.styleSnippetColor};' +
1796
+ 'fill: ' + parent._cb.styleSnippetColor + ';' +
1797
1797
  '}' +
1798
1798
 
1799
1799
  '.dark .is-design-list>div .is-overlay:after {' +
@@ -1806,45 +1806,45 @@ class SideBar {
1806
1806
  '}' +
1807
1807
 
1808
1808
  '.is-category-list>div {' +
1809
- 'background: ${parent._cb.styleSnippetTabsBackground};' +
1809
+ 'background: ' + parent._cb.styleSnippetTabsBackground + ';' +
1810
1810
  '}' +
1811
1811
  '.is-category-list>div:last-child {' +
1812
1812
  'width:100%;' +
1813
1813
  '}' +
1814
1814
 
1815
1815
  '.is-category-list a {' +
1816
- 'background: ${parent._cb.styleSnippetTabItemBackground};' +
1817
- 'color: ${parent._cb.styleSnippetTabItemColor};' +
1816
+ 'background: ' + parent._cb.styleSnippetTabItemBackground + ';' +
1817
+ 'color: ' + parent._cb.styleSnippetTabItemColor + ';' +
1818
1818
  'transition: box-shadow ease 0.3s;' +
1819
1819
  '}' +
1820
1820
 
1821
1821
  '.is-category-list a:hover {' +
1822
- 'background: ${parent._cb.styleSnippetTabItemBackgroundHover};' +
1822
+ 'background: ' + parent._cb.styleSnippetTabItemBackgroundHover + ';' +
1823
1823
  'box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);' +
1824
- 'color: ${parent._cb.styleSnippetTabItemColor};' +
1824
+ 'color: ' + parent._cb.styleSnippetTabItemColor + ';' +
1825
1825
  '}' +
1826
1826
 
1827
1827
  '.is-category-list a.active {' +
1828
- 'background: ${parent._cb.styleSnippetTabItemBackgroundActive};' +
1829
- 'color: ${parent._cb.styleSnippetTabItemColor};' +
1828
+ 'background: ' + parent._cb.styleSnippetTabItemBackgroundActive + ';' +
1829
+ 'color: ' + parent._cb.styleSnippetTabItemColor + ';' +
1830
1830
  'cursor: default;' +
1831
1831
  '}' +
1832
1832
 
1833
1833
  '.is-more-categories {' +
1834
- 'background: ${parent._cb.styleSnippetMoreItemBackground};' +
1834
+ 'background: ' + parent._cb.styleSnippetMoreItemBackground + ';' +
1835
1835
  '}' +
1836
1836
 
1837
1837
  '.is-more-categories a {' +
1838
- 'background: ${parent._cb.styleSnippetMoreItemBackground};' +
1839
- 'color: ${parent._cb.styleSnippetMoreItemColor};' +
1838
+ 'background: ' + parent._cb.styleSnippetMoreItemBackground + ';' +
1839
+ 'color: ' + parent._cb.styleSnippetMoreItemColor + ';' +
1840
1840
  '}' +
1841
1841
 
1842
1842
  '.is-more-categories a:hover {' +
1843
- 'background: ${parent._cb.styleSnippetMoreItemBackgroundHover};' +
1843
+ 'background: ' + parent._cb.styleSnippetMoreItemBackgroundHover + ';' +
1844
1844
  '}' +
1845
1845
 
1846
1846
  '.is-more-categories a.active {' +
1847
- ' background: ${parent._cb.styleSnippetMoreItemBackgroundActive};' +
1847
+ ' background: ' + parent._cb.styleSnippetMoreItemBackgroundActive + ';' +
1848
1848
  '}';
1849
1849
 
1850
1850
  let themestyle = document.querySelector('[data-theme-style]');
@@ -1854,7 +1854,7 @@ class SideBar {
1854
1854
  style.setAttribute('data-theme-style','');
1855
1855
  style.type = "text/css";
1856
1856
  style.innerHTML = cssString;
1857
- document.getElementsByTagName("head")[0].appendChild(style);
1857
+ document.head.appendChild(style);
1858
1858
 
1859
1859
  if(parent._cb.styleDark) {
1860
1860
  document.body.setAttribute('class', 'dark');
@@ -1869,7 +1869,7 @@ class SideBar {
1869
1869
  }
1870
1870
  }
1871
1871
 
1872
- applyParentStyles();
1872
+ // applyParentStyles();
1873
1873
 
1874
1874
 
1875
1875
  /*!
@@ -1884,6 +1884,8 @@ class SideBar {
1884
1884
 
1885
1885
  document.querySelector('.is-category-list').style.opacity = 1;
1886
1886
  document.querySelector('.is-design-list').style.opacity = 1;
1887
+
1888
+ applyParentStyles();
1887
1889
  });
1888
1890
  </script>
1889
1891
  </body>
@@ -2304,7 +2306,8 @@ class EditSection {
2304
2306
  activeSection.removeAttribute('data-bottom-top');
2305
2307
  activeSection.removeAttribute('data-300-bottom');
2306
2308
  activeSection.removeAttribute('data-400-bottom');
2307
- activeSection.removeAttribute('data-anim-start'); // activeSection.style.transform = '';
2309
+ activeSection.removeAttribute('data-anim-start');
2310
+ activeSection.style.transform = '';
2308
2311
 
2309
2312
  if (s === 'zoom-in') {
2310
2313
  activeSection.setAttribute('data-bottom-top', 'transform:translateX(0%) translateY(0%) scale(0.7)');
@@ -2338,7 +2341,8 @@ class EditSection {
2338
2341
  const activeSection = this.builder.activeSection;
2339
2342
  activeSection.removeAttribute('data-top-bottom');
2340
2343
  activeSection.removeAttribute('data-center');
2341
- activeSection.removeAttribute('data-anim-end'); // activeSection.style.transform = '';
2344
+ activeSection.removeAttribute('data-anim-end');
2345
+ activeSection.style.transform = '';
2342
2346
 
2343
2347
  if (s === 'zoom-in') {
2344
2348
  activeSection.setAttribute('data-center', 'transform:translateX(0%) translateY(0%) scale(1)');
@@ -74051,34 +74055,32 @@ class ContentBox {
74051
74055
  }
74052
74056
  }); // Hide tool on scrolling
74053
74057
 
74058
+ /*
74054
74059
  let timeoutId;
74055
- window.addEventListener('scroll', this.doWindowScroll = () => {
74056
- if (this.controlHiddenOnScroll) {
74057
- let builderActive = document.querySelector('.builder-active');
74058
-
74059
- if (builderActive) {
74060
- this.editor.util.clearActiveCell();
74061
- this.editor.util.clearControls();
74062
- this.controlHiddenOnScroll = false;
74063
- }
74064
- }
74065
-
74066
- clearTimeout(timeoutId);
74067
- timeoutId = setTimeout(() => {
74068
- let hover = false;
74069
-
74070
- if (this.activeSection) {
74071
- if (this.activeSection.matches(':hover')) {
74072
- hover = true;
74073
- }
74074
- }
74075
-
74076
- if (!hover) {
74077
- let boxTool = document.querySelector('#divBoxTool');
74078
- boxTool.style.display = 'none';
74060
+ window.addEventListener('scroll', this.doWindowScroll = () =>{
74061
+ if(this.controlHiddenOnScroll) {
74062
+ let builderActive = document.querySelector('.builder-active');
74063
+ if(builderActive) {
74064
+ this.editor.util.clearActiveCell();
74065
+ this.editor.util.clearControls();
74066
+ this.controlHiddenOnScroll = false;
74067
+ }
74079
74068
  }
74080
- }, 30);
74081
- });
74069
+ clearTimeout(timeoutId);
74070
+ timeoutId = setTimeout( ()=> {
74071
+ let hover=false;
74072
+ if(this.activeSection) {
74073
+ if(this.activeSection.matches(':hover')) {
74074
+ hover=true;
74075
+ }
74076
+ }
74077
+ if(!hover) {
74078
+ let boxTool = document.querySelector('#divBoxTool');
74079
+ boxTool.style.display = 'none';
74080
+ }
74081
+ }, 30);
74082
+ });
74083
+ */
74082
74084
  } // init
74083
74085
 
74084
74086
 
@@ -74399,7 +74401,10 @@ class ContentBox {
74399
74401
  btn.style.color = this.editor.styleModalColor;
74400
74402
  });
74401
74403
  const sectionIframe = document.querySelector('#ifrIdeasPanel');
74402
- if (sectionIframe.contentWindow.applyParentStyles) sectionIframe.contentWindow.applyParentStyles();
74404
+
74405
+ if (sectionIframe.contentWindow.applyParentStyles) {
74406
+ sectionIframe.contentWindow.applyParentStyles();
74407
+ }
74403
74408
  }
74404
74409
 
74405
74410
  rePositionTool() {