@innovastudio/contentbox 1.4.19 → 1.4.20
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.4.
|
4
|
+
"version": "1.4.20",
|
5
5
|
"description": "",
|
6
6
|
"main": "public/contentbox/contentbox.esm.js",
|
7
7
|
"files": [
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"webpack-dev-server": "^4.0.0"
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
|
-
"@innovastudio/contentbuilder": "^1.3.
|
49
|
+
"@innovastudio/contentbuilder": "^1.3.14",
|
50
50
|
"js-beautify": "^1.14.0"
|
51
51
|
}
|
52
52
|
}
|
@@ -1918,8 +1918,65 @@ class SideBar {
|
|
1918
1918
|
const wait2 = document.querySelector('.is-waiting2');
|
1919
1919
|
wait2.style.display = 'flex';
|
1920
1920
|
|
1921
|
+
let totalLoaded = 0;
|
1922
|
+
|
1921
1923
|
let designId = 1;
|
1922
1924
|
loadJsFiles(templateJSON, (template)=>{
|
1925
|
+
// console.log(template_list)
|
1926
|
+
|
1927
|
+
|
1928
|
+
// ---- Old Version (backward compatible) ----
|
1929
|
+
totalLoaded+=1;
|
1930
|
+
if(template_list.length!==totalLoaded) {
|
1931
|
+
if(template.url.indexOf('basic.js')!==-1) {
|
1932
|
+
|
1933
|
+
let arr = {
|
1934
|
+
name: 'Simple Start',
|
1935
|
+
categories: [
|
1936
|
+
{ id: 5, name: 'Random' },
|
1937
|
+
{ id: 1, name: 'Basic' },
|
1938
|
+
{ id: 2, name: 'Slider' },
|
1939
|
+
{ id: 3, name: 'Video' },
|
1940
|
+
{ id: 4, name: 'Custom' },
|
1941
|
+
],
|
1942
|
+
designs: window.data_basic.designs
|
1943
|
+
};
|
1944
|
+
template_list.push(arr);
|
1945
|
+
|
1946
|
+
}
|
1947
|
+
if(template.url.indexOf('examples.js')!==-1) {
|
1948
|
+
|
1949
|
+
let arr = {
|
1950
|
+
name: 'Quick Start',
|
1951
|
+
categories: [
|
1952
|
+
{ id: 101, name: 'Header' },
|
1953
|
+
{ id: 118, name: 'Article' },
|
1954
|
+
{ id: 102, name: 'Photos' },
|
1955
|
+
{ id: 103, name: 'Profile' },
|
1956
|
+
{ id: 104, name: 'Products, Services' },
|
1957
|
+
{ id: 105, name: 'Features' },
|
1958
|
+
{ id: 106, name: 'Process' },
|
1959
|
+
{ id: 107, name: 'Pricing' },
|
1960
|
+
{ id: 108, name: 'Skills' },
|
1961
|
+
{ id: 109, name: 'Achievements' },
|
1962
|
+
{ id: 110, name: 'Quotes' },
|
1963
|
+
{ id: 111, name: 'Partners' },
|
1964
|
+
{ id: 112, name: 'As Featured On' },
|
1965
|
+
{ id: 113, name: 'Page Not Found' },
|
1966
|
+
{ id: 114, name: 'Coming Soon' },
|
1967
|
+
{ id: 115, name: 'Help, FAQ' },
|
1968
|
+
{ id: 116, name: 'Contact' },
|
1969
|
+
{ id: 117, name: 'Footer' },
|
1970
|
+
],
|
1971
|
+
designs: window.data_examples.designs
|
1972
|
+
};
|
1973
|
+
template_list.push(arr);
|
1974
|
+
|
1975
|
+
}
|
1976
|
+
}
|
1977
|
+
// ---- /Old Version ----
|
1978
|
+
|
1979
|
+
|
1923
1980
|
// console.log(template)
|
1924
1981
|
const templateAdded = template_list[template_list.length-1];
|
1925
1982
|
templateAdded.path = template.path;
|
@@ -10385,6 +10442,8 @@ class EditBox {
|
|
10385
10442
|
dom$j.removeClass(activeBox.querySelector('.edge-y-3'), 'edge-y-3');
|
10386
10443
|
dom$j.removeClass(activeBox.querySelector('.edge-y-4'), 'edge-y-4');
|
10387
10444
|
dom$j.removeClass(activeBox.querySelector('.edge-y-5'), 'edge-y-5');
|
10445
|
+
dom$j.removeClass(activeBox.querySelector('.edge-y-8'), 'edge-y-8'); // old (backward compatible)
|
10446
|
+
|
10388
10447
|
dom$j.removeClass(activeBox.querySelector('.edge-x--1'), 'edge-x--1');
|
10389
10448
|
dom$j.removeClass(activeBox.querySelector('.edge-x--0-75'), 'edge-x--0-75');
|
10390
10449
|
dom$j.removeClass(activeBox.querySelector('.edge-x--0-5'), 'edge-x--0-5');
|
@@ -11087,10 +11146,35 @@ class EditBox {
|
|
11087
11146
|
chkBoxAddText.addEventListener('click', () => {
|
11088
11147
|
const activeBox = this.builder.activeBox;
|
11089
11148
|
const overlay = activeBox.querySelector('.is-overlay');
|
11149
|
+
const boxes = activeBox.querySelector('.is-boxes');
|
11150
|
+
|
11151
|
+
if (boxes) {
|
11152
|
+
if (boxes.querySelector('.is-overlay')) {
|
11153
|
+
// Need fix
|
11154
|
+
activeBox.prepend(overlay);
|
11155
|
+
boxes.parentNode.removeChild(boxes);
|
11156
|
+
}
|
11157
|
+
}
|
11158
|
+
|
11159
|
+
let copyClass = '';
|
11160
|
+
const otherContainer = activeBox.parentNode.querySelector('.is-container');
|
11161
|
+
|
11162
|
+
if (otherContainer) {
|
11163
|
+
otherContainer.classList.forEach(item => {
|
11164
|
+
if (item.indexOf('leading-') !== -1) {
|
11165
|
+
copyClass += ' ' + item;
|
11166
|
+
}
|
11167
|
+
|
11168
|
+
if (item.indexOf('size-') !== -1) {
|
11169
|
+
copyClass += ' ' + item;
|
11170
|
+
}
|
11171
|
+
});
|
11172
|
+
}
|
11173
|
+
|
11090
11174
|
let html = `
|
11091
11175
|
<div class="is-boxes">
|
11092
11176
|
<div class="is-box-centered">
|
11093
|
-
<div class="is-container
|
11177
|
+
<div class="is-container is-content-700 v2${copyClass}">
|
11094
11178
|
|
11095
11179
|
</div>
|
11096
11180
|
</div>
|
@@ -12392,8 +12476,8 @@ class EditBox {
|
|
12392
12476
|
if (!overlayBg) return;
|
12393
12477
|
|
12394
12478
|
if (this.modalEditBox.querySelector('#chkParallaxBg').checked) {
|
12395
|
-
overlayBg.setAttribute('data-bottom-top', 'transform:translateY(-
|
12396
|
-
overlayBg.setAttribute('data-top-bottom', 'transform:translateY(50px) scale(1.
|
12479
|
+
overlayBg.setAttribute('data-bottom-top', 'transform:translateY(-70px) scale(1);');
|
12480
|
+
overlayBg.setAttribute('data-top-bottom', 'transform:translateY(50px) scale(1.1)');
|
12397
12481
|
this.builder.settings.onRender();
|
12398
12482
|
} else {
|
12399
12483
|
dom$j.removeClass(overlayBg, 'skrollable');
|
@@ -27229,7 +27313,25 @@ class HtmlUtil {
|
|
27229
27313
|
range.setStart(area, 0);
|
27230
27314
|
area.appendChild(range.createContextualFragment(html));
|
27231
27315
|
let builderActive = this.builder.doc.querySelector('.builder-active');
|
27232
|
-
if (builderActive) this.builder.applyBehaviorOn(builderActive);
|
27316
|
+
if (builderActive) this.builder.applyBehaviorOn(builderActive);
|
27317
|
+
/*else {
|
27318
|
+
const builders = this.builder.doc.querySelectorAll(this.builder.opts.container);
|
27319
|
+
if(builders.length > 1) {
|
27320
|
+
const cell = util.cellSelected();
|
27321
|
+
if(!cell) {
|
27322
|
+
// Return first instance
|
27323
|
+
area = builders[0];
|
27324
|
+
} else {
|
27325
|
+
// Return active instance
|
27326
|
+
area = cell.parentNode.parentNode;
|
27327
|
+
}
|
27328
|
+
} else {
|
27329
|
+
// Single instance
|
27330
|
+
area = builders[0];
|
27331
|
+
}
|
27332
|
+
this.builder.applyBehaviorOn(area);
|
27333
|
+
}*/
|
27334
|
+
//Trigger Change event
|
27233
27335
|
|
27234
27336
|
this.builder.opts.onChange(); //Trigger Render event
|
27235
27337
|
|
@@ -27457,9 +27559,9 @@ class HtmlUtil {
|
|
27457
27559
|
|
27458
27560
|
|
27459
27561
|
let columnMore = builderStuff.querySelector('.is-pop.columnmore');
|
27460
|
-
columnMore.style.display = '';
|
27562
|
+
if (columnMore) columnMore.style.display = '';
|
27461
27563
|
let rowMore = builderStuff.querySelector('.is-pop.rowmore');
|
27462
|
-
rowMore.style.display = '';
|
27564
|
+
if (rowMore) rowMore.style.display = '';
|
27463
27565
|
this.builder.codeEditorMode = mode;
|
27464
27566
|
this.builder.codeEditorArea = area;
|
27465
27567
|
let codeEditor = viewhtml.querySelector('.input-code-editor');
|
@@ -62745,6 +62847,8 @@ class Image$1 {
|
|
62745
62847
|
}
|
62746
62848
|
|
62747
62849
|
newname = basename + '-edit' + this.util.makeId();
|
62850
|
+
newname = newname.replaceAll('%20', '-'); // fix 404 error after file upload
|
62851
|
+
|
62748
62852
|
img.setAttribute('data-filename', newname + '.' + extension);
|
62749
62853
|
}
|
62750
62854
|
|
@@ -62805,7 +62909,9 @@ class Image$1 {
|
|
62805
62909
|
this.imageTool.style.display = '';
|
62806
62910
|
}, 1000);
|
62807
62911
|
} else {
|
62808
|
-
|
62912
|
+
elm.onload = () => {
|
62913
|
+
this.refresh();
|
62914
|
+
};
|
62809
62915
|
}
|
62810
62916
|
}
|
62811
62917
|
|
@@ -62880,7 +62986,9 @@ class Image$1 {
|
|
62880
62986
|
this.builder.moveable.updateRect();
|
62881
62987
|
document.querySelector('.moveable-control-box').style.display = 'none';
|
62882
62988
|
}
|
62883
|
-
|
62989
|
+
|
62990
|
+
this.util.repositionColumnTool();
|
62991
|
+
}, 0); // refesh() is called after img onload, so no need to have a delay.
|
62884
62992
|
}
|
62885
62993
|
}
|
62886
62994
|
|
@@ -78462,7 +78570,7 @@ class Rte {
|
|
78462
78570
|
}
|
78463
78571
|
|
78464
78572
|
if (this.builder.opts.toolbarAddSnippetButton && html_elementrte.indexOf('rte-addsnippet') === -1 && html_elementrtemore.indexOf('rte-addsnippet') === -1) {
|
78465
|
-
html_elementrte = `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>` + html_rte;
|
78573
|
+
html_elementrte = `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>` + html_elementrte; //html_rte;
|
78466
78574
|
}
|
78467
78575
|
|
78468
78576
|
if (html_elementrtemore !== '' && html_elementrte.indexOf('rte-more') === -1) {
|
@@ -78493,7 +78601,7 @@ class Rte {
|
|
78493
78601
|
}
|
78494
78602
|
|
78495
78603
|
if (this.builder.opts.toolbarAddSnippetButton && html_iconrte.indexOf('rte-addsnippet') === -1 && html_iconrtemore.indexOf('rte-addsnippet') === -1) {
|
78496
|
-
html_iconrte = `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>` + html_rte;
|
78604
|
+
html_iconrte = `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>` + html_iconrte; //html_rte;
|
78497
78605
|
}
|
78498
78606
|
|
78499
78607
|
if (html_iconrtemore !== '' && html_iconrte.indexOf('rte-more') === -1) {
|