@innovastudio/contentbox 1.0.32 → 1.0.36
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/README.md +3 -3
- package/package.json +2 -2
- package/public/contentbox/contentbox.esm.js +39 -33
- package/public/contentbox/contentbox.min.js +3 -3
- package/readme.txt +25 -0
package/README.md
CHANGED
|
@@ -139,9 +139,9 @@ React and Vue project examples are provided in separate downloads in the user ar
|
|
|
139
139
|
|
|
140
140
|
To start building a page, you can click the (+) button on the top left sidebar. This will open a selection of predesigned sections that you can add into your page.
|
|
141
141
|
|
|
142
|
-

|
|
143
143
|
|
|
144
|
-

|
|
145
145
|
|
|
146
146
|
There are 2 predesigned section categories:
|
|
147
147
|
- Simple Start (to start from a basic/clean design)
|
|
@@ -239,7 +239,7 @@ The style can be used to format the entire page or just a specific section of yo
|
|
|
239
239
|
|
|
240
240
|
To apply the typography style to a specific box area, open the Box Settings dialog, select the 'Text' tab and click 'Change Style'.
|
|
241
241
|
|
|
242
|
-

|
|
243
243
|
|
|
244
244
|
This will re-open the typography selection and your selection will be applied to the chosen box area only.
|
|
245
245
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@innovastudio/contentbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36",
|
|
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.63",
|
|
43
43
|
"axios": "^0.21.4",
|
|
44
44
|
"cors": "^2.8.5",
|
|
45
45
|
"express": "^4.17.1",
|
|
@@ -311,7 +311,7 @@ class SideBar {
|
|
|
311
311
|
this.builderStuff = builderStuff;
|
|
312
312
|
|
|
313
313
|
if (this.builder.useSidebar) {
|
|
314
|
-
html += '<div class="is-sidebar active" style="transform: translate3d(0,0,0);display: flex;flex-direction: column;">';
|
|
314
|
+
html += '<div class="is-sidebar active" style="transform: translate3d(0,0,0);display: flex;flex-direction: column;opacity:opacity: 0.0001;">';
|
|
315
315
|
var sideIndex = 0;
|
|
316
316
|
this.builder.sidebarData.buttons.map(button => {
|
|
317
317
|
if (button.name == 'section') {
|
|
@@ -2199,7 +2199,7 @@ class EditSection {
|
|
|
2199
2199
|
activeSection.parentNode.insertBefore(activeSection, currPrev); //Trigger Render event
|
|
2200
2200
|
|
|
2201
2201
|
this.builder.settings.onRender();
|
|
2202
|
-
this.builder.scrollTo(activeSection);
|
|
2202
|
+
this.builder.scrollTo(activeSection, 600);
|
|
2203
2203
|
}
|
|
2204
2204
|
}
|
|
2205
2205
|
|
|
@@ -2218,7 +2218,7 @@ class EditSection {
|
|
|
2218
2218
|
activeSection.parentNode.insertBefore(currNext, activeSection); //Trigger Render event
|
|
2219
2219
|
|
|
2220
2220
|
this.builder.settings.onRender();
|
|
2221
|
-
this.builder.scrollTo(activeSection);
|
|
2221
|
+
this.builder.scrollTo(activeSection, 600);
|
|
2222
2222
|
}
|
|
2223
2223
|
|
|
2224
2224
|
return false;
|
|
@@ -2231,7 +2231,7 @@ class EditSection {
|
|
|
2231
2231
|
activeSection.parentNode.insertBefore(activeSection, refSection); //Trigger Render event
|
|
2232
2232
|
|
|
2233
2233
|
this.builder.settings.onRender();
|
|
2234
|
-
this.builder.scrollTo(activeSection);
|
|
2234
|
+
this.builder.scrollTo(activeSection, 600);
|
|
2235
2235
|
}
|
|
2236
2236
|
|
|
2237
2237
|
sectionBottom() {
|
|
@@ -2242,7 +2242,7 @@ class EditSection {
|
|
|
2242
2242
|
activeSection.parentNode.insertBefore(activeSection, last.nextElementSibling); //Trigger Render event
|
|
2243
2243
|
|
|
2244
2244
|
this.builder.settings.onRender();
|
|
2245
|
-
this.builder.scrollTo(activeSection);
|
|
2245
|
+
this.builder.scrollTo(activeSection, 600);
|
|
2246
2246
|
}
|
|
2247
2247
|
|
|
2248
2248
|
sectionDuplicate() {
|
|
@@ -2296,7 +2296,7 @@ class EditSection {
|
|
|
2296
2296
|
|
|
2297
2297
|
this.builder.settings.onRender();
|
|
2298
2298
|
this.builder.hideModal(this.modalEditSection);
|
|
2299
|
-
this.builder.scrollTo(section);
|
|
2299
|
+
this.builder.scrollTo(section, 600);
|
|
2300
2300
|
}
|
|
2301
2301
|
|
|
2302
2302
|
sectionAnimStart(s) {
|
|
@@ -2398,7 +2398,7 @@ class EditSection {
|
|
|
2398
2398
|
|
|
2399
2399
|
|
|
2400
2400
|
this.builder.settings.onRender();
|
|
2401
|
-
this.builder.scrollTo(activeSection);
|
|
2401
|
+
this.builder.scrollTo(activeSection, 600);
|
|
2402
2402
|
}
|
|
2403
2403
|
|
|
2404
2404
|
boxSpacing(s) {
|
|
@@ -8109,34 +8109,36 @@ class EditBox {
|
|
|
8109
8109
|
const btnBoxTypos = modalEditBox.querySelectorAll('.cmd-box-typography');
|
|
8110
8110
|
btnBoxTypos.forEach(btnBoxTypo => {
|
|
8111
8111
|
btnBoxTypo.addEventListener('click', () => {
|
|
8112
|
-
|
|
8112
|
+
setTimeout(() => {
|
|
8113
|
+
this.builder.hideModal(modalEditBox); //Open divSidebarTypography
|
|
8113
8114
|
|
|
8114
|
-
|
|
8115
|
-
|
|
8115
|
+
builderStuff.querySelector('.is-sidebar > button[data-command="typography"]').click(); //Overide
|
|
8116
|
+
//--- overlay (this needs overlay to prevent activeBox change) ---
|
|
8116
8117
|
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8118
|
+
const overlayHtml = '<div class="is-sidebar-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(255,255,255,0.000001);z-index: 1000;"></div>';
|
|
8119
|
+
dom$G.appendHtml(builderStuff, overlayHtml);
|
|
8120
|
+
const modalOverlay = builderStuff.querySelector('.is-sidebar-overlay');
|
|
8121
|
+
if (modalOverlay) modalOverlay.addEventListener('click', () => {
|
|
8122
|
+
// Close all opened sidebar
|
|
8123
|
+
const overlay = document.querySelector('.is-sidebar-overlay');
|
|
8123
8124
|
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8125
|
+
if (overlay) {
|
|
8126
|
+
overlay.remove();
|
|
8127
|
+
document.body.style.overflowY = '';
|
|
8128
|
+
}
|
|
8128
8129
|
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8130
|
+
document.querySelectorAll('.is-sidebar-button.active').forEach(elm => {
|
|
8131
|
+
dom$G.removeClass(elm, 'active');
|
|
8132
|
+
});
|
|
8133
|
+
document.querySelectorAll('.is-sidebar-content.active').forEach(elm => {
|
|
8134
|
+
dom$G.removeClass(elm, 'active');
|
|
8135
|
+
});
|
|
8136
|
+
}); //--- /overlay ---
|
|
8136
8137
|
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8138
|
+
builderStuff.querySelector('.is-sidebar > button[data-command="typography"]').setAttribute('data-applyto', 'box');
|
|
8139
|
+
builderStuff.querySelector('.typo-target-default').style.display = 'none';
|
|
8140
|
+
builderStuff.querySelector('.typo-target-box').style.display = 'flex';
|
|
8141
|
+
}, 10); // delay to separate from currect click
|
|
8140
8142
|
});
|
|
8141
8143
|
});
|
|
8142
8144
|
const btnBoxSizes = modalEditBox.querySelectorAll('.cmd-box-size');
|
|
@@ -68440,6 +68442,8 @@ class ContentBuilder {
|
|
|
68440
68442
|
this.colTool.showColumnTool(this.activeCol);
|
|
68441
68443
|
}
|
|
68442
68444
|
}
|
|
68445
|
+
|
|
68446
|
+
this.util.checkEmpty(); // for multiple instances check
|
|
68443
68447
|
},
|
|
68444
68448
|
onAdd: evt => {
|
|
68445
68449
|
var itemEl = evt.item;
|
|
@@ -73723,6 +73727,7 @@ class ContentBox {
|
|
|
73723
73727
|
if (!builderStuff) {
|
|
73724
73728
|
builderStuff = document.createElement('div');
|
|
73725
73729
|
builderStuff.id = '_cbhtml';
|
|
73730
|
+
builderStuff.style.visibility = 'hidden';
|
|
73726
73731
|
builderStuff.className = 'is-ui';
|
|
73727
73732
|
document.body.appendChild(builderStuff);
|
|
73728
73733
|
builderStuff = document.querySelector('#_cbhtml');
|
|
@@ -73975,7 +73980,8 @@ class ContentBox {
|
|
|
73975
73980
|
if (elm) elm.parentNode.removeChild(elm);
|
|
73976
73981
|
this.wrapperEl.style.opacity = 1;
|
|
73977
73982
|
let sidebar = builderStuff.querySelector('.is-sidebar');
|
|
73978
|
-
if (sidebar) sidebar.style.opacity = 1;
|
|
73983
|
+
if (sidebar) sidebar.style.opacity = 1;
|
|
73984
|
+
this.builderStuff.style.visibility = 'visible'; // Remove the page-overlay
|
|
73979
73985
|
|
|
73980
73986
|
pageOverlay = builderStuff.querySelectorAll('.page-overlay');
|
|
73981
73987
|
pageOverlay.forEach(elm => {
|
|
@@ -74315,7 +74321,7 @@ class ContentBox {
|
|
|
74315
74321
|
scrollButton.forEach(btn => {
|
|
74316
74322
|
btn.addEventListener('click', e => {
|
|
74317
74323
|
let section = btn.parentNode.parentNode;
|
|
74318
|
-
this.scrollTo(section.nextElementSibling
|
|
74324
|
+
this.scrollTo(section.nextElementSibling);
|
|
74319
74325
|
e.preventDefault();
|
|
74320
74326
|
e.stopImmediatePropagation();
|
|
74321
74327
|
return false;
|
|
@@ -74397,7 +74403,7 @@ class ContentBox {
|
|
|
74397
74403
|
if (localStorage.getItem('_zoom') !== null) {
|
|
74398
74404
|
zoom = localStorage.getItem('_zoom');
|
|
74399
74405
|
} else {
|
|
74400
|
-
zoom = 1;
|
|
74406
|
+
zoom = this.settings.zoom; //1;
|
|
74401
74407
|
}
|
|
74402
74408
|
|
|
74403
74409
|
let leftadj;
|