@innovastudio/contentbox 1.6.76 → 1.6.77

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.76",
4
+ "version": "1.6.77",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "files": [
@@ -52,7 +52,7 @@
52
52
  "ws": "^8.13.0"
53
53
  },
54
54
  "dependencies": {
55
- "@innovastudio/contentbuilder": "^1.5.68",
55
+ "@innovastudio/contentbuilder": "^1.5.69",
56
56
  "js-beautify": "^1.14.0",
57
57
  "sortablejs": "^1.15.2"
58
58
  }
@@ -27216,6 +27216,11 @@ class Snippets {
27216
27216
 
27217
27217
  var snippets = data_basic.snippets; //DATA
27218
27218
 
27219
+ ${!this.builder.canvas && !this.builder.isContentBox ? `
27220
+ const canvasFilter = (item) => (item.mode!=='canvas');
27221
+ snippets = snippets.filter(canvasFilter);
27222
+ ` : ''}
27223
+
27219
27224
  if (slider !== null){
27220
27225
  if(slider==='slick') {
27221
27226
  //remove glide
@@ -27445,6 +27450,12 @@ class Snippets {
27445
27450
  if(snippets[i].id + ''=== snippetid) {
27446
27451
 
27447
27452
  var html = snippets[i].html;
27453
+
27454
+ // check if is block
27455
+ if(html.includes('"is-block')) {
27456
+ html = snippets[i].html2;
27457
+ }
27458
+
27448
27459
  var noedit = snippets[i].noedit;
27449
27460
  break;
27450
27461
  }
@@ -75347,9 +75358,10 @@ class Hyperlink {
75347
75358
  linkTool.style.top = top - h - 3 + 'px';
75348
75359
  linkTool.style.left = left + link.offsetWidth * this.builder.opts.zoom - w + 'px';
75349
75360
  const handleLinkButtonClick = e => {
75361
+ const clrPicker = document.querySelector('.pop-picker.active') || document.querySelector('.pickgradientcolor.active');
75350
75362
  let elm = e.target;
75351
75363
  if (!elm) return;
75352
- if (!elm.closest('#divLinkTool') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('a')) {
75364
+ if (!elm.closest('#divLinkTool') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('a') && !clrPicker) {
75353
75365
  // click outside
75354
75366
 
75355
75367
  this.hideTool();
@@ -75475,6 +75487,7 @@ class Button {
75475
75487
  const contentStuff = this.builder.contentStuff;
75476
75488
  const dom = this.builder.dom;
75477
75489
  this.dom = dom;
75490
+ this.builderStuff = builderStuff;
75478
75491
  let buttonTool = builderStuff.querySelector('#divButtonTool');
75479
75492
  if (!buttonTool) {
75480
75493
  let html = `<div id="divButtonTool" class="is-tool">
@@ -75546,9 +75559,10 @@ class Button {
75546
75559
  this.renderTool();
75547
75560
  this.showTool(btn);
75548
75561
  const handleButtonClick = e => {
75562
+ const clrPicker = document.querySelector('.pop-picker.active') || document.querySelector('.pickgradientcolor.active');
75549
75563
  let elm = e.target;
75550
75564
  if (!elm) return;
75551
- if (!elm.closest('#divButtonTool') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('button')) {
75565
+ if (!elm.closest('#divButtonTool') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('button') && !clrPicker) {
75552
75566
  // click outside
75553
75567
 
75554
75568
  // hide
@@ -76750,9 +76764,11 @@ class Table {
76750
76764
  this.realtime();
76751
76765
  const handleTableClick = e => {
76752
76766
  // console.log('handleTableClick');
76767
+
76768
+ const clrPicker = document.querySelector('.pop-picker.active') || document.querySelector('.pickgradientcolor.active');
76753
76769
  let elm = e.target;
76754
76770
  if (!elm) return;
76755
- if (!elm.closest('.is-table-tool') && !elm.closest('.is-sidebar') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('table')) {
76771
+ if (!elm.closest('.is-table-tool') && !elm.closest('.is-sidebar') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('table') && !clrPicker) {
76756
76772
  // click outside
76757
76773
 
76758
76774
  // hide