@innovastudio/contentbuilder 1.3.62 → 1.3.64
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
@@ -17166,7 +17166,7 @@ const renderQuickAdd = builder => {
|
|
17166
17166
|
elm = quickadd.querySelector('.add-button');
|
17167
17167
|
if (elm) dom.addEventListener(elm, 'click', () => {
|
17168
17168
|
const mode = quickadd.getAttribute('data-mode');
|
17169
|
-
let html = `<div
|
17169
|
+
let html = `<div>
|
17170
17170
|
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid border-transparent ml-1 mr-1 mt-2 mb-2 hover:border-transparent rounded bg-gray-200 hover:bg-gray-300 tracking-50 uppercase py-2 size-14 px-6 font-semibold text-gray-600 leading-relaxed">Read More</a>
|
17171
17171
|
</div>`;
|
17172
17172
|
|
@@ -17179,7 +17179,7 @@ const renderQuickAdd = builder => {
|
|
17179
17179
|
elm = quickadd.querySelector('.add-twobutton');
|
17180
17180
|
if (elm) dom.addEventListener(elm, 'click', () => {
|
17181
17181
|
const mode = quickadd.getAttribute('data-mode');
|
17182
|
-
let html = `<div
|
17182
|
+
let html = `<div>
|
17183
17183
|
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid border-transparent ml-1 mr-1 mt-2 mb-2 hover:border-transparent rounded bg-gray-200 hover:bg-gray-300 tracking-50 uppercase py-2 size-14 px-6 font-semibold text-gray-600 leading-relaxed">Read More</a>
|
17184
17184
|
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid ml-1 mr-1 mt-2 mb-2 rounded tracking-50 uppercase py-2 size-14 px-6 border-current hover:border-transparent hover:text-white font-semibold text-indigo-500 hover:bg-indigo-500 leading-relaxed">Get Started</a>
|
17185
17185
|
</div>`;
|
@@ -57438,6 +57438,10 @@ class ColumnTool {
|
|
57438
57438
|
<input type="range" min="0" max="100" value="0" class="image-vert-slider is-rangeslider">
|
57439
57439
|
</div>
|
57440
57440
|
|
57441
|
+
<div style="padding-bottom:3px;padding-top: 10px;display:flex;justify-content:right;align-items:center;">
|
57442
|
+
<button title="${util.out('Reset')}" class="image-reset" style="display:flex;width:30px;height:30px;"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>
|
57443
|
+
</div>
|
57444
|
+
|
57441
57445
|
</div>
|
57442
57446
|
|
57443
57447
|
</div>
|
@@ -57902,12 +57906,56 @@ class ColumnTool {
|
|
57902
57906
|
//val: 100 - 500
|
57903
57907
|
let val = inpImageScaleSlider.value;
|
57904
57908
|
let cell = this.builder.elementSelected; //util.cellSelected();
|
57909
|
+
// cell.style.backgroundSize = val + '%';
|
57910
|
+
|
57911
|
+
if (document.querySelector('.page-preview.is-screen-375.active') && this.useTarget) {
|
57912
|
+
let dataBg = cell.getAttribute('data-bg-xs');
|
57913
|
+
if (!dataBg) dataBg = '';
|
57914
|
+
let div = document.createElement('div');
|
57915
|
+
div.style.cssText = dataBg; // div.style.backgroundSize = val + '%';
|
57916
|
+
|
57917
|
+
div.style.backgroundSize = 'cover';
|
57918
|
+
cell.setAttribute('data-bg-xs', div.style.cssText);
|
57919
|
+
} else if (document.querySelector('.page-preview.is-screen-768.active') && this.useTarget) {
|
57920
|
+
let dataBg = cell.getAttribute('data-bg-sm');
|
57921
|
+
if (!dataBg) dataBg = '';
|
57922
|
+
let div = document.createElement('div');
|
57923
|
+
div.style.cssText = dataBg; // div.style.backgroundSize = val + '%';
|
57924
|
+
|
57925
|
+
div.style.backgroundSize = 'cover';
|
57926
|
+
cell.setAttribute('data-bg-sm', div.style.cssText);
|
57927
|
+
} else if (document.querySelector('.page-preview.is-screen-1024.active') && this.useTarget) {
|
57928
|
+
let dataBg = cell.getAttribute('data-bg-md');
|
57929
|
+
if (!dataBg) dataBg = '';
|
57930
|
+
let div = document.createElement('div');
|
57931
|
+
div.style.cssText = dataBg; // div.style.backgroundSize = val + '%';
|
57932
|
+
|
57933
|
+
div.style.backgroundSize = 'cover';
|
57934
|
+
cell.setAttribute('data-bg-md', div.style.cssText);
|
57935
|
+
} else {
|
57936
|
+
cell.style.backgroundSize = val + '%';
|
57937
|
+
} // Clean unused
|
57905
57938
|
|
57906
|
-
|
57939
|
+
|
57940
|
+
cell.style.left = '';
|
57941
|
+
cell.style.top = '';
|
57942
|
+
cell.style.width = '';
|
57943
|
+
cell.style.height = '';
|
57944
|
+
cell.removeAttribute('data-x');
|
57945
|
+
cell.removeAttribute('data-y');
|
57946
|
+
cell.removeAttribute('data-scale');
|
57907
57947
|
};
|
57908
57948
|
|
57909
57949
|
inpImageScaleSlider.onchange = () => {
|
57910
|
-
|
57950
|
+
if (document.querySelector('.page-preview.is-screen-375.active')) {
|
57951
|
+
inpImageScaleSlider.value = 0;
|
57952
|
+
} else if (document.querySelector('.page-preview.is-screen-768.active')) {
|
57953
|
+
inpImageScaleSlider.value = 0;
|
57954
|
+
} else if (document.querySelector('.page-preview.is-screen-1024.active')) {
|
57955
|
+
inpImageScaleSlider.value = 0;
|
57956
|
+
} //Trigger Change event
|
57957
|
+
|
57958
|
+
|
57911
57959
|
this.builder.opts.onChange();
|
57912
57960
|
}; // Scale 2
|
57913
57961
|
|
@@ -57956,8 +58004,41 @@ class ColumnTool {
|
|
57956
58004
|
//val: 0 - 100
|
57957
58005
|
let val = inpImageHorSlider.value;
|
57958
58006
|
let cell = this.builder.elementSelected; //util.cellSelected();
|
58007
|
+
// cell.style.backgroundPositionX = val + '%';
|
58008
|
+
|
58009
|
+
if (document.querySelector('.page-preview.is-screen-375.active') && this.useTarget) {
|
58010
|
+
let dataBg = cell.getAttribute('data-bg-xs');
|
58011
|
+
if (!dataBg) dataBg = '';
|
58012
|
+
let div = document.createElement('div');
|
58013
|
+
div.style.cssText = dataBg;
|
58014
|
+
div.style.backgroundPositionX = val + '%';
|
58015
|
+
cell.setAttribute('data-bg-xs', div.style.cssText);
|
58016
|
+
} else if (document.querySelector('.page-preview.is-screen-768.active') && this.useTarget) {
|
58017
|
+
let dataBg = cell.getAttribute('data-bg-sm');
|
58018
|
+
if (!dataBg) dataBg = '';
|
58019
|
+
let div = document.createElement('div');
|
58020
|
+
div.style.cssText = dataBg;
|
58021
|
+
div.style.backgroundPositionX = val + '%';
|
58022
|
+
cell.setAttribute('data-bg-sm', div.style.cssText);
|
58023
|
+
} else if (document.querySelector('.page-preview.is-screen-1024.active') && this.useTarget) {
|
58024
|
+
let dataBg = cell.getAttribute('data-bg-md');
|
58025
|
+
if (!dataBg) dataBg = '';
|
58026
|
+
let div = document.createElement('div');
|
58027
|
+
div.style.cssText = dataBg;
|
58028
|
+
div.style.backgroundPositionX = val + '%';
|
58029
|
+
cell.setAttribute('data-bg-md', div.style.cssText);
|
58030
|
+
} else {
|
58031
|
+
cell.style.backgroundPositionX = val + '%';
|
58032
|
+
} // Clean unused
|
58033
|
+
|
57959
58034
|
|
57960
|
-
cell.style.
|
58035
|
+
cell.style.left = '';
|
58036
|
+
cell.style.top = '';
|
58037
|
+
cell.style.width = '';
|
58038
|
+
cell.style.height = '';
|
58039
|
+
cell.removeAttribute('data-x');
|
58040
|
+
cell.removeAttribute('data-y');
|
58041
|
+
cell.removeAttribute('data-scale');
|
57961
58042
|
};
|
57962
58043
|
|
57963
58044
|
inpImageHorSlider.onchange = () => {
|
@@ -58001,8 +58082,41 @@ class ColumnTool {
|
|
58001
58082
|
//val: 0 - 100
|
58002
58083
|
let val = inpImageVertSlider.value;
|
58003
58084
|
let cell = this.builder.elementSelected; //util.cellSelected();
|
58085
|
+
// cell.style.backgroundPositionY = val + '%';
|
58086
|
+
|
58087
|
+
if (document.querySelector('.page-preview.is-screen-375.active') && this.useTarget) {
|
58088
|
+
let dataBg = cell.getAttribute('data-bg-xs');
|
58089
|
+
if (!dataBg) dataBg = '';
|
58090
|
+
let div = document.createElement('div');
|
58091
|
+
div.style.cssText = dataBg;
|
58092
|
+
div.style.backgroundPositionY = val + '%';
|
58093
|
+
cell.setAttribute('data-bg-xs', div.style.cssText);
|
58094
|
+
} else if (document.querySelector('.page-preview.is-screen-768.active') && this.useTarget) {
|
58095
|
+
let dataBg = cell.getAttribute('data-bg-sm');
|
58096
|
+
if (!dataBg) dataBg = '';
|
58097
|
+
let div = document.createElement('div');
|
58098
|
+
div.style.cssText = dataBg;
|
58099
|
+
div.style.backgroundPositionY = val + '%';
|
58100
|
+
cell.setAttribute('data-bg-sm', div.style.cssText);
|
58101
|
+
} else if (document.querySelector('.page-preview.is-screen-1024.active') && this.useTarget) {
|
58102
|
+
let dataBg = cell.getAttribute('data-bg-md');
|
58103
|
+
if (!dataBg) dataBg = '';
|
58104
|
+
let div = document.createElement('div');
|
58105
|
+
div.style.cssText = dataBg;
|
58106
|
+
div.style.backgroundPositionY = val + '%';
|
58107
|
+
cell.setAttribute('data-bg-md', div.style.cssText);
|
58108
|
+
} else {
|
58109
|
+
cell.style.backgroundPositionY = val + '%';
|
58110
|
+
} // Clean unused
|
58111
|
+
|
58004
58112
|
|
58005
|
-
cell.style.
|
58113
|
+
cell.style.left = '';
|
58114
|
+
cell.style.top = '';
|
58115
|
+
cell.style.width = '';
|
58116
|
+
cell.style.height = '';
|
58117
|
+
cell.removeAttribute('data-x');
|
58118
|
+
cell.removeAttribute('data-y');
|
58119
|
+
cell.removeAttribute('data-scale');
|
58006
58120
|
};
|
58007
58121
|
|
58008
58122
|
inpImageVertSlider.onchange = () => {
|
@@ -58031,14 +58145,23 @@ class ColumnTool {
|
|
58031
58145
|
inpImageVertSlider2.onchange = () => {
|
58032
58146
|
//Trigger Change event
|
58033
58147
|
this.builder.opts.onChange();
|
58034
|
-
};
|
58148
|
+
}; //Reset
|
58149
|
+
|
58035
58150
|
|
58036
|
-
const btnImageReset =
|
58151
|
+
const btnImageReset = imageAdjust.querySelector('.image-reset');
|
58037
58152
|
btnImageReset.addEventListener('click', () => {
|
58038
58153
|
this.builder.uo.saveForUndo();
|
58039
58154
|
let cell = this.builder.elementSelected;
|
58040
58155
|
this.resetImage(cell); //Trigger Change event
|
58041
58156
|
|
58157
|
+
this.builder.opts.onChange();
|
58158
|
+
});
|
58159
|
+
const btnImageReset2 = imageAdjust2.querySelector('.image-reset');
|
58160
|
+
btnImageReset2.addEventListener('click', () => {
|
58161
|
+
this.builder.uo.saveForUndo();
|
58162
|
+
let cell = this.builder.elementSelected;
|
58163
|
+
this.resetImage2(cell); //Trigger Change event
|
58164
|
+
|
58042
58165
|
this.builder.opts.onChange();
|
58043
58166
|
}); // Row Enlarge (Currently not used)
|
58044
58167
|
|
@@ -58966,8 +59089,9 @@ class ColumnTool {
|
|
58966
59089
|
if (btn) btn.setAttribute('data-focus', true);
|
58967
59090
|
}
|
58968
59091
|
|
58969
|
-
openImageAdjust(elm, btn) {
|
58970
|
-
//Current value
|
59092
|
+
openImageAdjust(elm, btn, useTarget) {
|
59093
|
+
if (useTarget) this.useTarget = true;else this.useTarget = false; //Current value
|
59094
|
+
|
58971
59095
|
const imageAdjust = this.imageAdjust;
|
58972
59096
|
const inpImageScaleSlider = imageAdjust.querySelector('.image-scale-slider');
|
58973
59097
|
const inpImageHorSlider = imageAdjust.querySelector('.image-hor-slider');
|
@@ -58976,9 +59100,32 @@ class ColumnTool {
|
|
58976
59100
|
inpImageHorSlider.value = 0;
|
58977
59101
|
inpImageVertSlider.value = 0;
|
58978
59102
|
|
58979
|
-
if (
|
59103
|
+
if (useTarget) {
|
59104
|
+
inpImageHorSlider.value = 50;
|
59105
|
+
inpImageVertSlider.value = 60;
|
59106
|
+
}
|
59107
|
+
|
59108
|
+
let div = document.createElement('div');
|
59109
|
+
|
59110
|
+
if (document.querySelector('.page-preview.is-screen-375.active') && useTarget) {
|
59111
|
+
let dataBg = elm.getAttribute('data-bg-xs');
|
59112
|
+
if (!dataBg) dataBg = '';
|
59113
|
+
div.style.cssText = dataBg;
|
59114
|
+
} else if (document.querySelector('.page-preview.is-screen-768.active') && useTarget) {
|
59115
|
+
let dataBg = elm.getAttribute('data-bg-sm');
|
59116
|
+
if (!dataBg) dataBg = '';
|
59117
|
+
div.style.cssText = dataBg;
|
59118
|
+
} else if (document.querySelector('.page-preview.is-screen-1024.active') && useTarget) {
|
59119
|
+
let dataBg = elm.getAttribute('data-bg-md');
|
59120
|
+
if (!dataBg) dataBg = '';
|
59121
|
+
div.style.cssText = dataBg;
|
59122
|
+
} else {
|
59123
|
+
div.style.cssText = elm.style.cssText;
|
59124
|
+
}
|
59125
|
+
|
59126
|
+
if (div.style.backgroundSize) {
|
58980
59127
|
let val;
|
58981
|
-
let bgSize =
|
59128
|
+
let bgSize = div.style.backgroundSize;
|
58982
59129
|
|
58983
59130
|
if (isNaN(parseInt(bgSize))) {
|
58984
59131
|
val = 100;
|
@@ -58991,9 +59138,9 @@ class ColumnTool {
|
|
58991
59138
|
}
|
58992
59139
|
}
|
58993
59140
|
|
58994
|
-
if (
|
59141
|
+
if (div.style.backgroundPositionX) {
|
58995
59142
|
let val;
|
58996
|
-
let bgPosX =
|
59143
|
+
let bgPosX = div.style.backgroundPositionX;
|
58997
59144
|
|
58998
59145
|
if (isNaN(parseInt(bgPosX))) {
|
58999
59146
|
val = 0;
|
@@ -59006,9 +59153,9 @@ class ColumnTool {
|
|
59006
59153
|
}
|
59007
59154
|
}
|
59008
59155
|
|
59009
|
-
if (
|
59156
|
+
if (div.style.backgroundPositionY) {
|
59010
59157
|
let val;
|
59011
|
-
let bgPosY =
|
59158
|
+
let bgPosY = div.style.backgroundPositionY;
|
59012
59159
|
|
59013
59160
|
if (isNaN(parseInt(bgPosY))) {
|
59014
59161
|
val = 0;
|
@@ -59035,6 +59182,28 @@ class ColumnTool {
|
|
59035
59182
|
}
|
59036
59183
|
|
59037
59184
|
resetImage(elm) {
|
59185
|
+
//Current value
|
59186
|
+
const imageAdjust = this.imageAdjust;
|
59187
|
+
const inpImageScaleSlider = imageAdjust.querySelector('.image-scale-slider');
|
59188
|
+
const inpImageHorSlider = imageAdjust.querySelector('.image-hor-slider');
|
59189
|
+
const inpImageVertSlider = imageAdjust.querySelector('.image-vert-slider');
|
59190
|
+
inpImageHorSlider.value = 50;
|
59191
|
+
inpImageVertSlider.value = 60;
|
59192
|
+
inpImageScaleSlider.value = 0;
|
59193
|
+
elm.style.backgroundPositionX = '';
|
59194
|
+
elm.style.backgroundPositionY = '';
|
59195
|
+
elm.style.backgroundSize = ''; // Clean unused
|
59196
|
+
|
59197
|
+
elm.style.left = '';
|
59198
|
+
elm.style.top = '';
|
59199
|
+
elm.style.width = '';
|
59200
|
+
elm.style.height = '';
|
59201
|
+
elm.removeAttribute('data-x');
|
59202
|
+
elm.removeAttribute('data-y');
|
59203
|
+
elm.removeAttribute('data-scale');
|
59204
|
+
}
|
59205
|
+
|
59206
|
+
resetImage2(elm) {
|
59038
59207
|
//Current value
|
59039
59208
|
const imageAdjust2 = this.imageAdjust2;
|
59040
59209
|
const inpImageScaleSlider = imageAdjust2.querySelector('.image-scale-slider');
|
@@ -76049,11 +76218,11 @@ class ContentBuilder {
|
|
76049
76218
|
this.colTool.openImagePicker(currentUrl, callback, btn);
|
76050
76219
|
}
|
76051
76220
|
|
76052
|
-
openImageAdjust(elm, btn) {
|
76221
|
+
openImageAdjust(elm, btn, useTarget) {
|
76053
76222
|
if (this.opts.imageAdjust === 2) {
|
76054
76223
|
this.colTool.openImageAdjust2(elm, btn);
|
76055
76224
|
} else {
|
76056
|
-
this.colTool.openImageAdjust(elm, btn);
|
76225
|
+
this.colTool.openImageAdjust(elm, btn, useTarget);
|
76057
76226
|
}
|
76058
76227
|
}
|
76059
76228
|
|