@innovastudio/contentbuilder 1.5.67 → 1.5.69
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -841,6 +841,11 @@ class Snippets {
|
|
841
841
|
|
842
842
|
var snippets = data_basic.snippets; //DATA
|
843
843
|
|
844
|
+
${!this.builder.canvas && !this.builder.isContentBox ? `
|
845
|
+
const canvasFilter = (item) => (item.mode!=='canvas');
|
846
|
+
snippets = snippets.filter(canvasFilter);
|
847
|
+
` : ''}
|
848
|
+
|
844
849
|
if (slider !== null){
|
845
850
|
if(slider==='slick') {
|
846
851
|
//remove glide
|
@@ -1070,6 +1075,12 @@ class Snippets {
|
|
1070
1075
|
if(snippets[i].id + ''=== snippetid) {
|
1071
1076
|
|
1072
1077
|
var html = snippets[i].html;
|
1078
|
+
|
1079
|
+
// check if is block
|
1080
|
+
if(html.includes('"is-block')) {
|
1081
|
+
html = snippets[i].html2;
|
1082
|
+
}
|
1083
|
+
|
1073
1084
|
var noedit = snippets[i].noedit;
|
1074
1085
|
break;
|
1075
1086
|
}
|
@@ -48972,9 +48983,10 @@ class Hyperlink {
|
|
48972
48983
|
linkTool.style.top = top - h - 3 + 'px';
|
48973
48984
|
linkTool.style.left = left + link.offsetWidth * this.builder.opts.zoom - w + 'px';
|
48974
48985
|
const handleLinkButtonClick = e => {
|
48986
|
+
const clrPicker = document.querySelector('.pop-picker.active') || document.querySelector('.pickgradientcolor.active');
|
48975
48987
|
let elm = e.target;
|
48976
48988
|
if (!elm) return;
|
48977
|
-
if (!elm.closest('#divLinkTool') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('a')) {
|
48989
|
+
if (!elm.closest('#divLinkTool') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('a') && !clrPicker) {
|
48978
48990
|
// click outside
|
48979
48991
|
|
48980
48992
|
this.hideTool();
|
@@ -49100,6 +49112,7 @@ class Button {
|
|
49100
49112
|
const contentStuff = this.builder.contentStuff;
|
49101
49113
|
const dom = this.builder.dom;
|
49102
49114
|
this.dom = dom;
|
49115
|
+
this.builderStuff = builderStuff;
|
49103
49116
|
let buttonTool = builderStuff.querySelector('#divButtonTool');
|
49104
49117
|
if (!buttonTool) {
|
49105
49118
|
let html = `<div id="divButtonTool" class="is-tool">
|
@@ -49171,9 +49184,10 @@ class Button {
|
|
49171
49184
|
this.renderTool();
|
49172
49185
|
this.showTool(btn);
|
49173
49186
|
const handleButtonClick = e => {
|
49187
|
+
const clrPicker = document.querySelector('.pop-picker.active') || document.querySelector('.pickgradientcolor.active');
|
49174
49188
|
let elm = e.target;
|
49175
49189
|
if (!elm) return;
|
49176
|
-
if (!elm.closest('#divButtonTool') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('button')) {
|
49190
|
+
if (!elm.closest('#divButtonTool') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('button') && !clrPicker) {
|
49177
49191
|
// click outside
|
49178
49192
|
|
49179
49193
|
// hide
|
@@ -50375,9 +50389,11 @@ class Table {
|
|
50375
50389
|
this.realtime();
|
50376
50390
|
const handleTableClick = e => {
|
50377
50391
|
// console.log('handleTableClick');
|
50392
|
+
|
50393
|
+
const clrPicker = document.querySelector('.pop-picker.active') || document.querySelector('.pickgradientcolor.active');
|
50378
50394
|
let elm = e.target;
|
50379
50395
|
if (!elm) return;
|
50380
|
-
if (!elm.closest('.is-table-tool') && !elm.closest('.is-sidebar') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('table')) {
|
50396
|
+
if (!elm.closest('.is-table-tool') && !elm.closest('.is-sidebar') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('table') && !clrPicker) {
|
50381
50397
|
// click outside
|
50382
50398
|
|
50383
50399
|
// hide
|
@@ -51996,6 +52012,11 @@ class RowTool {
|
|
51996
52012
|
row.style.backgroundColor = color;
|
51997
52013
|
elm.style.backgroundColor = color; // preview
|
51998
52014
|
|
52015
|
+
if (color !== '') {
|
52016
|
+
let btnRowGradient = rowSettings.querySelector('.input-row-gradient');
|
52017
|
+
btnRowGradient.style.backgroundImage = '';
|
52018
|
+
row.style.backgroundImage = '';
|
52019
|
+
}
|
51999
52020
|
this.builder.opts.onChange();
|
52000
52021
|
}, rowSettings.querySelector('.input-row-bgcolor').style.backgroundColor, () => {
|
52001
52022
|
btnRowBgColor.removeAttribute('data-focus');
|
@@ -52111,9 +52132,13 @@ class RowTool {
|
|
52111
52132
|
div.innerHTML = '';
|
52112
52133
|
const inpSrc = this.imageSource.querySelector('.input-src');
|
52113
52134
|
inpSrc.value = '';
|
52135
|
+
if (row.style.backgroundImage && row.style.backgroundImage.includes('linear-gradient')) {
|
52136
|
+
const btnCellBgColor = this.rowSettings.querySelector('.input-row-bgcolor');
|
52137
|
+
btnCellBgColor.style.backgroundColor = '';
|
52138
|
+
row.style.backgroundColor = '';
|
52139
|
+
}
|
52114
52140
|
|
52115
|
-
//
|
52116
|
-
this.builder.opts.onChange();
|
52141
|
+
// this.builder.opts.onChange();
|
52117
52142
|
}, isChanged => {
|
52118
52143
|
btnRowGradient.removeAttribute('data-focus');
|
52119
52144
|
btnRowGradient.focus();
|
@@ -53713,6 +53738,11 @@ class ColumnTool {
|
|
53713
53738
|
cell.style.backgroundColor = color;
|
53714
53739
|
elm.style.backgroundColor = color; // preview
|
53715
53740
|
|
53741
|
+
if (color !== '') {
|
53742
|
+
let btnCellGradient = cellSettings.querySelector('.input-cell-gradient');
|
53743
|
+
btnCellGradient.style.backgroundImage = '';
|
53744
|
+
cell.style.backgroundImage = '';
|
53745
|
+
}
|
53716
53746
|
this.builder.opts.onChange();
|
53717
53747
|
}, cellSettings.querySelector('.input-cell-bgcolor').style.backgroundColor, () => {
|
53718
53748
|
btnCellBgColor.removeAttribute('data-focus');
|
@@ -53846,7 +53876,13 @@ class ColumnTool {
|
|
53846
53876
|
div.innerHTML = '';
|
53847
53877
|
const inpSrc = this.imageSource.querySelector('.input-src');
|
53848
53878
|
inpSrc.value = '';
|
53849
|
-
|
53879
|
+
if (cell.style.backgroundImage && cell.style.backgroundImage.includes('linear-gradient')) {
|
53880
|
+
const btnCellBgColor = cellSettings.querySelector('.input-cell-bgcolor');
|
53881
|
+
btnCellBgColor.style.backgroundColor = '';
|
53882
|
+
cell.style.backgroundColor = '';
|
53883
|
+
}
|
53884
|
+
|
53885
|
+
// this.builder.opts.onChange();
|
53850
53886
|
}, isChanged => {
|
53851
53887
|
btnCellGradient.removeAttribute('data-focus');
|
53852
53888
|
btnCellGradient.focus();
|
@@ -55519,17 +55555,20 @@ class ElementGeneralStyles {
|
|
55519
55555
|
|
55520
55556
|
// Background color
|
55521
55557
|
let btnElmBgColor = panelStuff.querySelector('.input-elm-bgcolor');
|
55522
|
-
btnElmBgColor.addEventListener('click',
|
55558
|
+
btnElmBgColor.addEventListener('click', () => {
|
55523
55559
|
this.builder.uo.saveForUndo(true); // checkLater = true
|
55524
55560
|
|
55525
|
-
let elm = e.target;
|
55526
55561
|
this.builder.colorPicker.open(color => {
|
55527
|
-
this.builder.inspectedElement
|
55528
|
-
elm.style.backgroundColor = color;
|
55562
|
+
let elm = this.builder.inspectedElement;
|
55563
|
+
elm.style.backgroundColor = color;
|
55564
|
+
btnElmBgColor.style.backgroundColor = color; // preview
|
55529
55565
|
|
55566
|
+
if (color !== '') {
|
55567
|
+
let btnElmGradient = panelStuff.querySelector('.input-elm-gradient');
|
55568
|
+
btnElmGradient.style.backgroundImage = '';
|
55569
|
+
elm.style.backgroundImage = '';
|
55570
|
+
}
|
55530
55571
|
elementStyleEditor.refresh();
|
55531
|
-
|
55532
|
-
//Trigger Change event
|
55533
55572
|
this.builder.opts.onChange();
|
55534
55573
|
}, panelStuff.querySelector('.input-elm-bgcolor').style.backgroundColor, () => {
|
55535
55574
|
btnElmBgColor.removeAttribute('data-focus');
|
@@ -55546,10 +55585,15 @@ class ElementGeneralStyles {
|
|
55546
55585
|
this.builder.uo.saveForUndo(true); // checkLater = true
|
55547
55586
|
|
55548
55587
|
gradientPicker.open(this.builder.inspectedElement, () => {
|
55588
|
+
let elm = this.builder.inspectedElement;
|
55589
|
+
if (elm.style.backgroundImage && elm.style.backgroundImage.includes('linear-gradient')) {
|
55590
|
+
const btnElmBgColor = panelStuff.querySelector('.input-elm-bgcolor');
|
55591
|
+
btnElmBgColor.style.backgroundColor = '';
|
55592
|
+
elm.style.backgroundColor = '';
|
55593
|
+
}
|
55549
55594
|
elementStyleEditor.refresh();
|
55550
55595
|
|
55551
|
-
//
|
55552
|
-
this.builder.opts.onChange();
|
55596
|
+
// this.builder.opts.onChange();
|
55553
55597
|
}, isChanged => {
|
55554
55598
|
if (isChanged) {
|
55555
55599
|
elementStyleEditor.refresh();
|