@innovastudio/contentbox 1.0.47 → 1.0.51
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@innovastudio/contentbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.51",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "public/contentbox/contentbox.esm.js",
|
|
6
6
|
"files": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@ashthornton/asscroll": "^2.0.4",
|
|
42
|
-
"@innovastudio/contentbuilder": "^1.0.
|
|
42
|
+
"@innovastudio/contentbuilder": "^1.0.70",
|
|
43
43
|
"axios": "^0.21.4",
|
|
44
44
|
"cors": "^2.8.5",
|
|
45
45
|
"express": "^4.17.1",
|
|
@@ -8198,7 +8198,10 @@ class EditBox {
|
|
|
8198
8198
|
if (val >= 2700) val = 2700;
|
|
8199
8199
|
}
|
|
8200
8200
|
|
|
8201
|
-
container.style.maxWidth = val + 'px';
|
|
8201
|
+
container.style.maxWidth = val + 'px';
|
|
8202
|
+
dom$G.addClass(container, 'is-content-' + val); //new
|
|
8203
|
+
|
|
8204
|
+
dom$G.addClass(container, 'v2'); //new
|
|
8202
8205
|
|
|
8203
8206
|
modalEditBox.querySelector('.inp-box-size').value = val; //Trigger Change event
|
|
8204
8207
|
|
|
@@ -8208,6 +8211,13 @@ class EditBox {
|
|
|
8208
8211
|
const inpBoxSize = modalEditBox.querySelector('.inp-box-size');
|
|
8209
8212
|
inpBoxSize.addEventListener('input', () => {
|
|
8210
8213
|
this.builder.editor.saveForUndo();
|
|
8214
|
+
const arrMaxWidth = [];
|
|
8215
|
+
let n = 300;
|
|
8216
|
+
|
|
8217
|
+
while (n <= 2700) {
|
|
8218
|
+
arrMaxWidth.push(n);
|
|
8219
|
+
n = n + 20;
|
|
8220
|
+
}
|
|
8211
8221
|
|
|
8212
8222
|
let activeBox = this.builder.activeBox;
|
|
8213
8223
|
let container = activeBox.querySelector('.is-container');
|
|
@@ -8219,7 +8229,24 @@ class EditBox {
|
|
|
8219
8229
|
let val = inpBoxSize.value;
|
|
8220
8230
|
|
|
8221
8231
|
if (!isNaN(val) && val >= 300 && val <= 2700) {
|
|
8222
|
-
container.style.maxWidth = val + 'px';
|
|
8232
|
+
container.style.maxWidth = val + 'px';
|
|
8233
|
+
let maxWidth = parseInt(window.getComputedStyle(container, null).getPropertyValue('max-width'));
|
|
8234
|
+
|
|
8235
|
+
for (let n = 0; n <= 121; n++) {
|
|
8236
|
+
let mw = arrMaxWidth[n];
|
|
8237
|
+
|
|
8238
|
+
if (mw > maxWidth) {
|
|
8239
|
+
maxWidth = mw;
|
|
8240
|
+
break;
|
|
8241
|
+
}
|
|
8242
|
+
}
|
|
8243
|
+
|
|
8244
|
+
val = maxWidth;
|
|
8245
|
+
if (val <= 300) val = 300;
|
|
8246
|
+
if (val >= 2700) val = 2700;
|
|
8247
|
+
dom$G.addClass(container, 'is-content-' + val); //new
|
|
8248
|
+
|
|
8249
|
+
dom$G.addClass(container, 'v2'); //new
|
|
8223
8250
|
} //Trigger Change event
|
|
8224
8251
|
|
|
8225
8252
|
|
|
@@ -10002,13 +10029,19 @@ class EditBox {
|
|
|
10002
10029
|
} //end of added by jack
|
|
10003
10030
|
|
|
10004
10031
|
|
|
10005
|
-
boxImage(url) {
|
|
10032
|
+
boxImage(url, err) {
|
|
10006
10033
|
// Remove Waiting Indicator
|
|
10007
10034
|
const builderStuff = this.builderStuff;
|
|
10008
10035
|
const indicator = builderStuff.querySelector('.waiting-indicator');
|
|
10009
10036
|
const indicatorOverlay = builderStuff.querySelector('.waiting-indicator-overlay');
|
|
10010
10037
|
if (indicator) indicator.parentNode.removeChild(indicator);
|
|
10011
10038
|
if (indicatorOverlay) indicatorOverlay.parentNode.removeChild(indicatorOverlay);
|
|
10039
|
+
|
|
10040
|
+
if (err) {
|
|
10041
|
+
alert(err);
|
|
10042
|
+
return;
|
|
10043
|
+
}
|
|
10044
|
+
|
|
10012
10045
|
let activeBox;
|
|
10013
10046
|
|
|
10014
10047
|
if (this.targetBox) {
|
|
@@ -21159,14 +21192,16 @@ const renderQuickAdd = builder => {
|
|
|
21159
21192
|
elm = quickadd.querySelector('.add-button');
|
|
21160
21193
|
if (elm) dom$B.addEventListener(elm, 'click', () => {
|
|
21161
21194
|
const mode = quickadd.getAttribute('data-mode');
|
|
21162
|
-
const html = '<a href="#" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a>';
|
|
21195
|
+
const html = '<div><a href="#" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a></div>';
|
|
21163
21196
|
util.addContent(html, mode);
|
|
21164
21197
|
});
|
|
21165
21198
|
elm = quickadd.querySelector('.add-twobutton');
|
|
21166
21199
|
if (elm) dom$B.addEventListener(elm, 'click', () => {
|
|
21167
21200
|
const mode = quickadd.getAttribute('data-mode');
|
|
21168
|
-
const html = `<
|
|
21169
|
-
<a href="#" style="display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color:
|
|
21201
|
+
const html = `<div>
|
|
21202
|
+
<a href="#" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a>
|
|
21203
|
+
<a href="#" style="display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgba(0, 0, 0, 0); border-color: rgb(53, 53, 53); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 600; font-size: 14px; letter-spacing: 3px; color: rgb(53, 53, 53);">Get Started</a>
|
|
21204
|
+
</div>`;
|
|
21170
21205
|
util.addContent(html, mode);
|
|
21171
21206
|
});
|
|
21172
21207
|
elm = quickadd.querySelector('.add-spacer');
|
|
@@ -63048,8 +63083,9 @@ class Rte {
|
|
|
63048
63083
|
<button title="96px" data-value="96">96</button>
|
|
63049
63084
|
|
|
63050
63085
|
<button title="120px" data-value="120">120</button>
|
|
63051
|
-
|
|
63086
|
+
<!--<button title="160px" data-value="160">160</button>-->
|
|
63052
63087
|
<button title="200px" data-value="200">200</button>
|
|
63088
|
+
<button title="300px" data-value="300">300</button>
|
|
63053
63089
|
|
|
63054
63090
|
<button title="${util.out('Decrease')}" data-value="-" style="font-size:13px">-</button>
|
|
63055
63091
|
<button title="${util.out('Increase')}" data-value="+" style="font-size:13px">+</button>
|
|
@@ -67766,7 +67802,7 @@ class ContentBuilder {
|
|
|
67766
67802
|
clearPreferences: false,
|
|
67767
67803
|
toolbarAddSnippetButton: false,
|
|
67768
67804
|
animateModal: true,
|
|
67769
|
-
fontSizeClassValues: [12, 14, 16, 18, 21, 24, 28, 32, 35, 38, 42, 46, 48, 50, 54, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220],
|
|
67805
|
+
fontSizeClassValues: [12, 14, 16, 18, 21, 24, 28, 32, 35, 38, 42, 46, 48, 50, 54, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 248, 252, 256, 260, 264, 268, 272, 276, 280, 284, 288, 292, 296, 300, 304, 308, 312, 316, 320, 324, 328, 332, 336, 340, 344, 348, 352, 356, 360, 364, 368, 372, 376, 380, 384, 388, 392, 396, 400],
|
|
67770
67806
|
|
|
67771
67807
|
/* If not empty, applying font size will apply class: size-12, size-14, and so on. All responsive, defined in content.css */
|
|
67772
67808
|
gradientcolors: [['linear-gradient(0deg, rgb(255, 57, 25), rgb(249, 168, 37))'], ['linear-gradient(0deg, rgb(255, 57, 25), rgb(255, 104, 15))'], ['linear-gradient(0deg, #FF5722, #FF9800)'], ['linear-gradient(0deg, #613ca2, rgb(110, 123, 217))'], ['linear-gradient(0deg, rgb(65, 70, 206), rgb(236, 78, 130))'], ['linear-gradient(0deg, rgb(0, 150, 102), rgb(90, 103, 197))'], ['linear-gradient(30deg, rgb(249, 119, 148), rgb(98, 58, 162))'], ['linear-gradient(0deg, rgb(223, 70, 137), rgb(90, 103, 197))'], ['linear-gradient(0deg, rgb(40, 53, 147), rgb(90, 103, 197))'], ['linear-gradient(0deg, rgb(21, 101, 192), rgb(52, 169, 239))'], ['linear-gradient(0deg, rgb(32, 149, 219), rgb(139, 109, 230))'], ['linear-gradient(0deg, rgb(90, 103, 197), rgb(0, 184, 201))'], ['linear-gradient(0deg, rgb(0, 184, 201), rgb(253, 187, 45))'], ['linear-gradient(0deg, rgb(255, 208, 100), rgb(239, 98, 159))'], ['linear-gradient(0deg, rgb(0, 214, 223), rgb(130, 162, 253))'], ['linear-gradient(0deg, rgb(50, 234, 251), rgb(248, 247, 126))'], ['linear-gradient(0deg, rgb(141, 221, 255), rgb(255, 227, 255))'], ['linear-gradient(0deg, rgb(255, 170, 170), rgb(255, 255, 200))'], ['linear-gradient(0deg, rgb(239, 239, 239), rgb(252, 252, 252))']],
|
|
@@ -74686,8 +74722,8 @@ class ContentBox {
|
|
|
74686
74722
|
});
|
|
74687
74723
|
}
|
|
74688
74724
|
|
|
74689
|
-
boxImage(url) {
|
|
74690
|
-
this.editbox.boxImage(url);
|
|
74725
|
+
boxImage(url, err) {
|
|
74726
|
+
this.editbox.boxImage(url, err);
|
|
74691
74727
|
}
|
|
74692
74728
|
|
|
74693
74729
|
mainCss() {
|