@innovastudio/contentbox 1.6.167 → 1.6.168

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/contentbox",
3
3
  "type": "module",
4
- "version": "1.6.167",
4
+ "version": "1.6.168",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "types": "index.d.ts",
@@ -59,7 +59,7 @@
59
59
  "ws": "^8.13.0"
60
60
  },
61
61
  "dependencies": {
62
- "@innovastudio/contentbuilder": "^1.5.165",
62
+ "@innovastudio/contentbuilder": "^1.5.166",
63
63
  "js-beautify": "^1.14.0",
64
64
  "sortablejs": "^1.15.2"
65
65
  }
@@ -13812,41 +13812,43 @@ class PanelBox {
13812
13812
  </div>
13813
13813
  </div>
13814
13814
 
13815
- <div class="flex">
13816
- <div class="mr-8">
13817
- <div class="label mt-3">${out('Background Color')}:</div>
13818
- <div class="group">
13819
- <button title="${out('Color')}" class="btn-color is-btn-color"></button>
13815
+ <div class="box-bg-settings">
13816
+ <div class="flex">
13817
+ <div class="mr-8">
13818
+ <div class="label mt-3">${out('Background Color')}:</div>
13819
+ <div class="group">
13820
+ <button title="${out('Color')}" class="btn-color is-btn-color"></button>
13821
+ </div>
13820
13822
  </div>
13821
- </div>
13822
- <div>
13823
- <div class="label mt-3">${out('Gradient')}:</div>
13824
- <div class="group">
13825
- <button title="${out('Gradient')}" class="btn-gradient is-btn-color"></button>
13823
+ <div>
13824
+ <div class="label mt-3">${out('Gradient')}:</div>
13825
+ <div class="group">
13826
+ <button title="${out('Gradient')}" class="btn-gradient is-btn-color"></button>
13827
+ </div>
13826
13828
  </div>
13827
13829
  </div>
13828
- </div>
13829
13830
 
13830
- <div class="label mt-3">${out('Background Image')}:</div>
13831
+ <div class="label mt-3">${out('Background Image')}:</div>
13831
13832
 
13832
- <div class="asset-preview"></div>
13833
+ <div class="asset-preview"></div>
13833
13834
 
13834
- <div class="imagesource mt-1 mb-1">
13835
- <input type="text" class="inp-src">
13836
- </div>
13835
+ <div class="imagesource mt-1 mb-1">
13836
+ <input type="text" class="inp-src">
13837
+ </div>
13837
13838
 
13838
- <div class="group mt-2">
13839
- <input class="inp-file" type="file" accept="image/*" style="display:none"/>
13840
- <button title="${out('Upload')}" class="btn-upload"><svg><use xlink:href="#icon-upload"></use></svg></button>
13841
- <button title="${out('Select')}" class="btn-asset"><svg><use xlink:href="#icon-folder"></use></svg></button>
13842
- <button title="${out('Adjust')}" class="btn-adjust"><svg style="width:14px;height:14px;"><use xlink:href="#icon-tool"></use></svg></button>
13843
- <button title="${out('Clear')}" class="btn-clear"><svg><use xlink:href="#icon-eraser"></use></svg></button>
13844
- </div>
13839
+ <div class="group mt-2">
13840
+ <input class="inp-file" type="file" accept="image/*" style="display:none"/>
13841
+ <button title="${out('Upload')}" class="btn-upload"><svg><use xlink:href="#icon-upload"></use></svg></button>
13842
+ <button title="${out('Select')}" class="btn-asset"><svg><use xlink:href="#icon-folder"></use></svg></button>
13843
+ <button title="${out('Adjust')}" class="btn-adjust"><svg style="width:14px;height:14px;"><use xlink:href="#icon-tool"></use></svg></button>
13844
+ <button title="${out('Clear')}" class="btn-clear"><svg><use xlink:href="#icon-eraser"></use></svg></button>
13845
+ </div>
13845
13846
 
13846
- <label class="label checkbox grayscale mt-2" style="margin-bottom:16px">
13847
- <input type="checkbox" class="chk-grayscale" />
13848
- <span>${out('Grayscale')}</span>
13849
- </label>
13847
+ <label class="label checkbox grayscale mt-2" style="margin-bottom:16px">
13848
+ <input type="checkbox" class="chk-grayscale" />
13849
+ <span>${out('Grayscale')}</span>
13850
+ </label>
13851
+ </div>
13850
13852
 
13851
13853
  <div class="defaulttextcolor">
13852
13854
  <div class="label mt-3">${out('Text Color')}:</div>
@@ -13886,7 +13888,7 @@ class PanelBox {
13886
13888
 
13887
13889
  </div>
13888
13890
 
13889
- <div class="submain box-plugin-settings">
13891
+ <div class="submain box-plugin-settings panel-plugin">
13890
13892
 
13891
13893
  <hr style="width: 100%;border-bottom: #ededed 2px solid;margin-top: 20px;">
13892
13894
 
@@ -15275,7 +15277,14 @@ class PanelBox {
15275
15277
 
15276
15278
  const divPluginSettings = panel.querySelector('.box-plugin-settings');
15277
15279
  this.divPluginSettings = divPluginSettings;
15278
- const runtime = this.builder.win.builderRuntime;
15280
+ const runtime = this.builder.win.builderRuntime; // Reset (can be changed by renderPluginSettings)
15281
+
15282
+ const divBgSettings = this.panel.querySelector('.box-bg-settings');
15283
+ divBgSettings.style.display = '';
15284
+ this.divBgSettings = divBgSettings;
15285
+ const divPanelTitle = this.panel.parentNode.querySelector('.part-title');
15286
+ divPanelTitle.style.display = '';
15287
+ this.divPanelTitle = divPanelTitle;
15279
15288
 
15280
15289
  if (overlayContent && runtime) {
15281
15290
  const currentElement = overlayContent.querySelector('[data-cb-type]');
@@ -15286,6 +15295,8 @@ class PanelBox {
15286
15295
  } else {
15287
15296
  divPluginSettings.style.display = 'none';
15288
15297
  }
15298
+ } else {
15299
+ divPluginSettings.style.display = 'none';
15289
15300
  }
15290
15301
  }
15291
15302
 
@@ -15300,6 +15311,21 @@ class PanelBox {
15300
15311
  const plugin = runtime.getPlugin(pluginName);
15301
15312
  if (!plugin) return;
15302
15313
  let displayName = out(plugin.displayName || plugin.name);
15314
+
15315
+ if (plugin.contentbox) {
15316
+ if (!plugin.contentbox.bg) {
15317
+ this.divBgSettings.style.display = 'none';
15318
+ }
15319
+
15320
+ if (!plugin.contentbox.text) {
15321
+ this.divDefaultTextColor.style.display = 'none';
15322
+ }
15323
+
15324
+ if (!plugin.contentbox.title) {
15325
+ this.divPanelTitle.style.display = 'none';
15326
+ }
15327
+ }
15328
+
15303
15329
  const divTitle = document.createElement('h3');
15304
15330
  divTitle.style.cssText = 'font-family: sans-serif;font-weight: 300;font-size: 20px;margin: 0 0 12px;';
15305
15331
  divTitle.innerText = displayName;
@@ -26355,7 +26381,8 @@ class ControlPanel {
26355
26381
  this.panelRow = controlPanel.querySelector('.panel-row');
26356
26382
  this.panelContainer = controlPanel.querySelector('.panel-container');
26357
26383
  this.panelBlock = controlPanel.querySelector('.panel-block');
26358
- this.panelBox = controlPanel.querySelector('.panel-box');
26384
+ this.panelBox = controlPanel.querySelector('.panel-box'); // also has .panel-plugin inside
26385
+
26359
26386
  this.panelSection = controlPanel.querySelector('.panel-section');
26360
26387
  this.breadcrumb = controlPanel.querySelector('.part-breadcrumb');
26361
26388
  this.title = controlPanel.querySelector('.part-title');
@@ -32508,6 +32535,7 @@ class Util$1 {
32508
32535
  }
32509
32536
 
32510
32537
  hideModal(modal) {
32538
+ if (!modal) return;
32511
32539
  this.builder.doc.activeElement.blur();
32512
32540
  document.activeElement.blur();
32513
32541
  // this.builder.doc.body.focus();