@innovastudio/contentbuilder 1.1.23 → 1.1.26
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
|
@@ -13778,6 +13778,8 @@ class HtmlUtil {
|
|
|
13778
13778
|
dom$I.removeClasses(elms, 'skrollable-before');
|
|
13779
13779
|
elms = tmp.querySelectorAll('.skrollable-between');
|
|
13780
13780
|
dom$I.removeClasses(elms, 'skrollable-between');
|
|
13781
|
+
elms = tmp.querySelectorAll('.is-inview');
|
|
13782
|
+
dom$I.removeClasses(elms, 'is-inview');
|
|
13781
13783
|
let emptyclasses = tmp.querySelectorAll('[class=""]');
|
|
13782
13784
|
Array.prototype.forEach.call(emptyclasses, emptyclass => {
|
|
13783
13785
|
emptyclass.removeAttribute('class');
|
|
@@ -47319,24 +47321,24 @@ class ButtonEditor {
|
|
|
47319
47321
|
</div>
|
|
47320
47322
|
|
|
47321
47323
|
<div class="flex flex-row" style="margin:15px 0 0">
|
|
47322
|
-
<div class="flex flex-col" style="
|
|
47324
|
+
<div class="flex flex-col" style="margin-right: 40px;">
|
|
47323
47325
|
<div>
|
|
47324
|
-
<label>${util.out('Border
|
|
47326
|
+
<label>${util.out('Border Color')}</label>:
|
|
47325
47327
|
</div>
|
|
47326
47328
|
<div class="flex flex-row flex-wrap" style="margin-top:5px">
|
|
47327
|
-
<button title="${util.out('
|
|
47328
|
-
<button title="
|
|
47329
|
-
<button title="2px" data-command="2" class="border-width-command" style="text-transform:none;margin-right:4px">2px</button>
|
|
47329
|
+
<button title="${util.out('Transparent')}" data-command="transparent" class="border-color-command" style="margin-right:4px">${util.out('Transparent')}</button>
|
|
47330
|
+
<button title="${util.out('Current')}" data-command="current" class="border-color-command" style="margin-right:4px">${util.out('Current')}</button>
|
|
47330
47331
|
</div>
|
|
47331
47332
|
</div>
|
|
47332
|
-
|
|
47333
|
+
|
|
47333
47334
|
<div class="flex flex-col">
|
|
47334
47335
|
<div>
|
|
47335
|
-
<label>${util.out('Border
|
|
47336
|
+
<label>${util.out('Border Thickness')}</label>:
|
|
47336
47337
|
</div>
|
|
47337
47338
|
<div class="flex flex-row flex-wrap" style="margin-top:5px">
|
|
47338
|
-
<button title="${util.out('
|
|
47339
|
-
<button title="
|
|
47339
|
+
<button title="${util.out('No Border')}" data-command="0" class="border-width-command" style="margin-right:4px">${util.out('No Border')}</button>
|
|
47340
|
+
<button title="1px" data-command="1" class="border-width-command" style="text-transform:none;margin-right:4px">1px</button>
|
|
47341
|
+
<button title="2px" data-command="2" class="border-width-command" style="text-transform:none;margin-right:4px">2px</button>
|
|
47340
47342
|
</div>
|
|
47341
47343
|
</div>
|
|
47342
47344
|
</div>
|
|
@@ -47533,53 +47535,90 @@ class ButtonEditor {
|
|
|
47533
47535
|
let btns; //background color
|
|
47534
47536
|
|
|
47535
47537
|
const btnBgColor = buttonModal.querySelector('.bg-color-command');
|
|
47536
|
-
btnBgColor.addEventListener('click',
|
|
47538
|
+
btnBgColor.addEventListener('click', e => {
|
|
47537
47539
|
this.builder.uo.saveForUndo(true); // checkLater = true
|
|
47540
|
+
// this.builder.simpleColorPicker((colorClass)=>{
|
|
47541
|
+
// const activeButton = this.builder.activeButton||this.builder.activeLinkButton;
|
|
47542
|
+
// dom.removeClassesByPrefix(activeButton, 'bg-');
|
|
47543
|
+
// dom.addClass(activeButton, colorClass);
|
|
47544
|
+
// this.applyDefault(activeButton);
|
|
47545
|
+
// setTimeout(()=>{
|
|
47546
|
+
// const currBg = dom.getStyle(activeButton,'background-color');
|
|
47547
|
+
// btnBgColor.style.backgroundColor = currBg;
|
|
47548
|
+
// },160);
|
|
47549
|
+
// this.builder.opts.onChange();
|
|
47550
|
+
// });
|
|
47538
47551
|
|
|
47539
|
-
this.builder.
|
|
47552
|
+
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
|
47553
|
+
let elm = e.target;
|
|
47554
|
+
this.builder.colorPicker.open(color => {
|
|
47540
47555
|
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
|
47556
|
+
activeButton.style.backgroundColor = color;
|
|
47557
|
+
activeButton.setAttribute('data-bg', color);
|
|
47541
47558
|
dom$z.removeClassesByPrefix(activeButton, 'bg-');
|
|
47542
|
-
|
|
47543
|
-
|
|
47544
|
-
|
|
47545
|
-
const currBg = dom$z.getStyle(activeButton, 'background-color');
|
|
47546
|
-
btnBgColor.style.backgroundColor = currBg;
|
|
47547
|
-
}, 160);
|
|
47559
|
+
elm.style.backgroundColor = color; // preview
|
|
47560
|
+
//Trigger Change event
|
|
47561
|
+
|
|
47548
47562
|
this.builder.opts.onChange();
|
|
47549
|
-
});
|
|
47563
|
+
}, activeButton.style.backgroundColor);
|
|
47550
47564
|
}); //text color
|
|
47551
47565
|
|
|
47552
47566
|
const btnTextColor = buttonModal.querySelector('.text-color-command');
|
|
47553
|
-
btnTextColor.addEventListener('click',
|
|
47567
|
+
btnTextColor.addEventListener('click', e => {
|
|
47554
47568
|
this.builder.uo.saveForUndo(true); // checkLater = true
|
|
47569
|
+
// this.builder.simpleColorPicker((colorClass)=>{
|
|
47570
|
+
// const activeButton = this.builder.activeButton||this.builder.activeLinkButton;
|
|
47571
|
+
// dom.removeClassesByPrefix(activeButton, 'text-');
|
|
47572
|
+
// dom.addClass(activeButton, colorClass);
|
|
47573
|
+
// this.applyDefault(activeButton);
|
|
47574
|
+
// setTimeout(function(){
|
|
47575
|
+
// const currColor = dom.getStyle(activeButton,'color');
|
|
47576
|
+
// btnTextColor.style.backgroundColor = currColor;
|
|
47577
|
+
// },160);
|
|
47578
|
+
// this.builder.opts.onChange();
|
|
47579
|
+
// }, 'text');
|
|
47555
47580
|
|
|
47556
|
-
this.builder.
|
|
47581
|
+
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
|
47582
|
+
let elm = e.target;
|
|
47583
|
+
this.builder.colorPicker.open(color => {
|
|
47557
47584
|
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
|
47585
|
+
activeButton.style.color = color;
|
|
47558
47586
|
dom$z.removeClassesByPrefix(activeButton, 'text-');
|
|
47559
|
-
|
|
47560
|
-
|
|
47561
|
-
|
|
47562
|
-
const currColor = dom$z.getStyle(activeButton, 'color');
|
|
47563
|
-
btnTextColor.style.backgroundColor = currColor;
|
|
47564
|
-
}, 160);
|
|
47587
|
+
elm.style.backgroundColor = color; // preview
|
|
47588
|
+
//Trigger Change event
|
|
47589
|
+
|
|
47565
47590
|
this.builder.opts.onChange();
|
|
47566
|
-
},
|
|
47591
|
+
}, activeButton.style.color);
|
|
47567
47592
|
}); //hover background color
|
|
47568
47593
|
|
|
47569
47594
|
const btnHoverBgColor = buttonModal.querySelector('.bg-color-hover-command');
|
|
47570
|
-
btnHoverBgColor.addEventListener('click',
|
|
47595
|
+
btnHoverBgColor.addEventListener('click', e => {
|
|
47571
47596
|
this.builder.uo.saveForUndo(true); // checkLater = true
|
|
47597
|
+
// this.builder.simpleColorPicker((colorClass)=>{
|
|
47598
|
+
// const activeButton = this.builder.activeButton||this.builder.activeLinkButton;
|
|
47599
|
+
// dom.removeClassesByPrefix(activeButton, 'hover:bg-');
|
|
47600
|
+
// if(colorClass) dom.addClass(activeButton, 'hover:' + colorClass);
|
|
47601
|
+
// this.applyDefault(activeButton);
|
|
47602
|
+
// this.getVisibleBgColor(colorClass, (color)=>{
|
|
47603
|
+
// btnHoverBgColor.style.backgroundColor = color;
|
|
47604
|
+
// });
|
|
47605
|
+
// this.builder.opts.onChange();
|
|
47606
|
+
// });
|
|
47572
47607
|
|
|
47573
|
-
this.builder.
|
|
47608
|
+
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
|
47609
|
+
let hoverbgcolor = activeButton.getAttribute('data-hover-bg');
|
|
47610
|
+
let elm = e.target;
|
|
47611
|
+
this.builder.colorPicker.open(color => {
|
|
47574
47612
|
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
|
47613
|
+
activeButton.setAttribute('data-hover-bg', color);
|
|
47575
47614
|
dom$z.removeClassesByPrefix(activeButton, 'hover:bg-');
|
|
47576
|
-
if
|
|
47577
|
-
this.
|
|
47578
|
-
|
|
47579
|
-
|
|
47580
|
-
|
|
47615
|
+
activeButton.setAttribute('onmouseover', 'if(this.getAttribute(\'data-hover-bg\'))this.style.backgroundColor=this.getAttribute(\'data-hover-bg\');');
|
|
47616
|
+
activeButton.setAttribute('onmouseout', 'if(this.getAttribute(\'data-bg\'))this.style.backgroundColor=this.getAttribute(\'data-bg\');else this.style.backgroundColor=\'\'');
|
|
47617
|
+
elm.style.backgroundColor = color; // preview
|
|
47618
|
+
//Trigger Change event
|
|
47619
|
+
|
|
47581
47620
|
this.builder.opts.onChange();
|
|
47582
|
-
});
|
|
47621
|
+
}, hoverbgcolor ? hoverbgcolor : '');
|
|
47583
47622
|
}); //hover text color
|
|
47584
47623
|
|
|
47585
47624
|
const btnHoverTextColor = document.querySelectorAll('.text-color-hover-command');
|
|
@@ -47657,8 +47696,8 @@ class ButtonEditor {
|
|
|
47657
47696
|
const val = btn.getAttribute('data-command');
|
|
47658
47697
|
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
|
47659
47698
|
dom$z.removeClass(activeButton, 'border-0');
|
|
47660
|
-
dom$z.removeClass(activeButton, 'border');
|
|
47661
47699
|
dom$z.removeClass(activeButton, 'border-2');
|
|
47700
|
+
dom$z.removeClass(activeButton, 'border');
|
|
47662
47701
|
if (val === '0') dom$z.addClass(activeButton, 'border-0');else if (val === '1') dom$z.addClass(activeButton, 'border');else if (val === '2') dom$z.addClass(activeButton, 'border-2');
|
|
47663
47702
|
this.applyDefault(activeButton); // Button on/off
|
|
47664
47703
|
|
|
@@ -47991,12 +48030,16 @@ class ButtonEditor {
|
|
|
47991
48030
|
if (item.indexOf('hover:bg-') === 0) {
|
|
47992
48031
|
this.getVisibleBgColor(item.replace('hover:', ''), color => {
|
|
47993
48032
|
btnHoverBgColor.style.backgroundColor = color;
|
|
48033
|
+
activeButton.setAttribute('data-hover-bg', color); //new inline
|
|
47994
48034
|
});
|
|
47995
48035
|
}
|
|
47996
48036
|
|
|
47997
48037
|
if (item.indexOf('bg-') === 0) {
|
|
47998
48038
|
this.getVisibleBgColor(item, color => {
|
|
47999
48039
|
btnBgColor.style.backgroundColor = color;
|
|
48040
|
+
activeButton.setAttribute('data-bg', color); //new inline
|
|
48041
|
+
|
|
48042
|
+
activeButton.style.backgroundColor = color; //new inline
|
|
48000
48043
|
});
|
|
48001
48044
|
}
|
|
48002
48045
|
|
|
@@ -48004,6 +48047,7 @@ class ButtonEditor {
|
|
|
48004
48047
|
this.getVisibleTextColor(item, color => {
|
|
48005
48048
|
btnTextColor.style.backgroundColor = color;
|
|
48006
48049
|
currColor = color;
|
|
48050
|
+
activeButton.style.color = color; //new inline
|
|
48007
48051
|
});
|
|
48008
48052
|
}
|
|
48009
48053
|
});
|
|
@@ -48013,8 +48057,12 @@ class ButtonEditor {
|
|
|
48013
48057
|
// if no text-[color] found
|
|
48014
48058
|
currColor = dom$z.getStyle(activeButton, 'color');
|
|
48015
48059
|
btnTextColor.style.backgroundColor = currColor;
|
|
48016
|
-
}
|
|
48060
|
+
} // NEW: inline color
|
|
48061
|
+
|
|
48017
48062
|
|
|
48063
|
+
if (activeButton.style.backgroundColor) btnBgColor.style.backgroundColor = activeButton.style.backgroundColor;
|
|
48064
|
+
if (activeButton.getAttribute('data-hover-bg')) btnHoverBgColor.style.backgroundColor = activeButton.getAttribute('data-hover-bg');
|
|
48065
|
+
if (activeButton.style.color) btnTextColor.style.backgroundColor = activeButton.style.color;
|
|
48018
48066
|
let btn;
|
|
48019
48067
|
btn = this.buttonModal.querySelector('.text-color-hover-command.on');
|
|
48020
48068
|
dom$z.removeClass(btn, 'on');
|
|
@@ -48095,6 +48143,20 @@ class ButtonEditor {
|
|
|
48095
48143
|
dom$z.addClass(btn, 'on');
|
|
48096
48144
|
}
|
|
48097
48145
|
|
|
48146
|
+
btn = this.buttonModal.querySelector('.border-width-command.on');
|
|
48147
|
+
dom$z.removeClass(btn, 'on');
|
|
48148
|
+
|
|
48149
|
+
if (dom$z.hasClass(activeButton, 'border-0')) {
|
|
48150
|
+
btn = this.buttonModal.querySelector('.border-width-command[data-command="0"]');
|
|
48151
|
+
dom$z.addClass(btn, 'on');
|
|
48152
|
+
} else if (dom$z.hasClass(activeButton, 'border-2')) {
|
|
48153
|
+
btn = this.buttonModal.querySelector('.border-width-command[data-command="2"]');
|
|
48154
|
+
dom$z.addClass(btn, 'on');
|
|
48155
|
+
} else if (dom$z.hasClass(activeButton, 'border')) {
|
|
48156
|
+
btn = this.buttonModal.querySelector('.border-width-command[data-command="1"]');
|
|
48157
|
+
dom$z.addClass(btn, 'on');
|
|
48158
|
+
}
|
|
48159
|
+
|
|
48098
48160
|
if (activeButton.classList) {
|
|
48099
48161
|
activeButton.classList.forEach(item => {
|
|
48100
48162
|
if (item.indexOf('size-') === 0) {
|
|
@@ -48305,13 +48367,13 @@ class ButtonEditor {
|
|
|
48305
48367
|
applyDefault(link) {
|
|
48306
48368
|
dom$z.addClass(link, 'transition-all');
|
|
48307
48369
|
dom$z.addClass(link, 'inline-block');
|
|
48308
|
-
dom$z.addClass(link, 'cursor-pointer');
|
|
48309
|
-
|
|
48370
|
+
dom$z.addClass(link, 'cursor-pointer'); // dom.addClass(link, 'border-2');
|
|
48371
|
+
|
|
48310
48372
|
dom$z.addClass(link, 'border-solid');
|
|
48311
|
-
dom$z.addClass(link, 'leading-relaxed');
|
|
48312
|
-
link.removeAttribute('
|
|
48313
|
-
link.removeAttribute('
|
|
48314
|
-
|
|
48373
|
+
dom$z.addClass(link, 'leading-relaxed'); // link.removeAttribute('style');
|
|
48374
|
+
// link.removeAttribute('onmouseover');
|
|
48375
|
+
// link.removeAttribute('onmouseout');
|
|
48376
|
+
|
|
48315
48377
|
link.removeAttribute('data-hover-bgcolor');
|
|
48316
48378
|
link.removeAttribute('data-hover-color');
|
|
48317
48379
|
link.removeAttribute('data-hover-bordercolor');
|
|
@@ -53986,11 +54048,18 @@ class ColumnTool {
|
|
|
53986
54048
|
dom$m.addCssClass(cell, classes.end, classes);
|
|
53987
54049
|
dom$m.addClass(elm, 'on');
|
|
53988
54050
|
}
|
|
54051
|
+
|
|
54052
|
+
cell.style.justifyContent = '';
|
|
54053
|
+
cell.style.alignItems = '';
|
|
53989
54054
|
} else {
|
|
53990
54055
|
dom$m.removeCssClasses(cell, this.builder.cssClasses.display);
|
|
53991
54056
|
dom$m.removeCssClasses(cell, this.builder.cssClasses.flexDirection);
|
|
53992
54057
|
dom$m.removeCssClasses(cell, this.builder.cssClasses.justifyContent);
|
|
53993
54058
|
dom$m.removeCssClasses(cell, this.builder.cssClasses.alignItems);
|
|
54059
|
+
cell.style.display = '';
|
|
54060
|
+
cell.style.flexDirection = '';
|
|
54061
|
+
cell.style.justifyContent = '';
|
|
54062
|
+
cell.style.alignItems = '';
|
|
53994
54063
|
}
|
|
53995
54064
|
} else {
|
|
53996
54065
|
cell.style.display = 'flex';
|