@innovastudio/contentbuilder 1.4.140 → 1.4.141
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
|
@@ -207,6 +207,12 @@ button:focus-visible {
|
|
|
207
207
|
display: none !important;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
#_cbhtml {
|
|
211
|
+
height: 0px;
|
|
212
|
+
float: left;
|
|
213
|
+
margin-top: -100px;
|
|
214
|
+
}
|
|
215
|
+
|
|
210
216
|
#_cbhtml,
|
|
211
217
|
.is-ui {
|
|
212
218
|
/*
|
|
@@ -219,7 +225,7 @@ button:focus-visible {
|
|
|
219
225
|
font-family: sans-serif;
|
|
220
226
|
font-size: 13px;
|
|
221
227
|
letter-spacing: 1px;
|
|
222
|
-
font-weight:
|
|
228
|
+
font-weight: 300;
|
|
223
229
|
/* general use */
|
|
224
230
|
/*
|
|
225
231
|
.rte-align-options,
|
|
@@ -4994,6 +5000,7 @@ button:focus-visible {
|
|
|
4994
5000
|
border-radius: 0px;
|
|
4995
5001
|
color: #fefefe;
|
|
4996
5002
|
z-index: 100005;
|
|
5003
|
+
-webkit-font-smoothing: auto;
|
|
4997
5004
|
}
|
|
4998
5005
|
|
|
4999
5006
|
/*!
|
|
@@ -18276,12 +18276,16 @@ const renderSnippetPanel = (builder, snippetOpen) => {
|
|
|
18276
18276
|
}
|
|
18277
18277
|
|
|
18278
18278
|
// destroy
|
|
18279
|
-
if (builder.sortableOnCanvas)
|
|
18280
|
-
|
|
18281
|
-
obj
|
|
18282
|
-
|
|
18283
|
-
|
|
18284
|
-
|
|
18279
|
+
if (builder.sortableOnCanvas) {
|
|
18280
|
+
builder.sortableOnCanvas.forEach(obj => {
|
|
18281
|
+
if (obj) {
|
|
18282
|
+
obj.destroy();
|
|
18283
|
+
}
|
|
18284
|
+
});
|
|
18285
|
+
if (builder.sortableOnPage) builder.sortableOnPage.destroy();
|
|
18286
|
+
}
|
|
18287
|
+
let dummies = builder.doc.querySelectorAll('.block-dummy');
|
|
18288
|
+
dummies.forEach(elm => elm.parentNode.removeChild(elm));
|
|
18285
18289
|
}
|
|
18286
18290
|
});
|
|
18287
18291
|
if (builder.opts.snippetList === '#divSnippetList') {
|
|
@@ -70885,7 +70889,7 @@ class Resizeable {
|
|
|
70885
70889
|
let scale = this.getScale(container);
|
|
70886
70890
|
if (!scale) {
|
|
70887
70891
|
const wrapper = container.closest('.is-wrapper');
|
|
70888
|
-
scale = this.getScale(wrapper);
|
|
70892
|
+
if (wrapper) scale = this.getScale(wrapper);else scale = 1;
|
|
70889
70893
|
}
|
|
70890
70894
|
|
|
70891
70895
|
// Minimum resize
|
|
@@ -77329,11 +77333,17 @@ class ContentBuilder {
|
|
|
77329
77333
|
|
|
77330
77334
|
// Hide element tool
|
|
77331
77335
|
this.elmTool.hide();
|
|
77332
|
-
|
|
77333
|
-
|
|
77334
|
-
|
|
77335
|
-
|
|
77336
|
-
|
|
77336
|
+
|
|
77337
|
+
// destroy
|
|
77338
|
+
if (this.sortableOnCanvas) {
|
|
77339
|
+
this.sortableOnCanvas.forEach(obj => {
|
|
77340
|
+
if (obj) {
|
|
77341
|
+
obj.destroy();
|
|
77342
|
+
}
|
|
77343
|
+
});
|
|
77344
|
+
let dummies = this.doc.querySelectorAll('.block-dummy');
|
|
77345
|
+
dummies.forEach(elm => elm.parentNode.removeChild(elm));
|
|
77346
|
+
}
|
|
77337
77347
|
|
|
77338
77348
|
// if(this.sortableOnPage) this.sortableOnPage.destroy();
|
|
77339
77349
|
}
|
|
@@ -79977,13 +79987,14 @@ class ContentBuilder {
|
|
|
79977
79987
|
}
|
|
79978
79988
|
|
|
79979
79989
|
sectionDropSetup() {
|
|
79980
|
-
if (this.
|
|
79981
|
-
if (this.page !== '.is-wrapper') return; // only for ContentBox
|
|
79982
|
-
const wrapper = this.doc.querySelector(this.page);
|
|
79990
|
+
if (this.blockContainer) {
|
|
79983
79991
|
this.sortableOnCanvas = [];
|
|
79984
|
-
const
|
|
79985
|
-
|
|
79986
|
-
|
|
79992
|
+
const boxes = this.doc.querySelectorAll(this.blockContainer);
|
|
79993
|
+
boxes.forEach(box => {
|
|
79994
|
+
box.insertAdjacentHTML('afterbegin', `
|
|
79995
|
+
<div class="is-block block-dummy" style="top: calc(97.2707% - 149.797px); left: calc(50% - 222px); width: 444px; height: 154px;z-index:-1000;visibility:hidden">
|
|
79996
|
+
</div>`);
|
|
79997
|
+
const obj = new Sortable(box, {
|
|
79987
79998
|
scroll: true,
|
|
79988
79999
|
group: 'shared',
|
|
79989
80000
|
direction: 'horizontal',
|
|
@@ -79996,7 +80007,7 @@ class ContentBuilder {
|
|
|
79996
80007
|
|
|
79997
80008
|
let snippetid = itemEl.getAttribute('data-id');
|
|
79998
80009
|
let lastBlock;
|
|
79999
|
-
let elements = Array.from(
|
|
80010
|
+
let elements = Array.from(box.querySelectorAll('.is-block')).filter(elm => !elm.parentNode.classList.contains('is-block')); // exclude child blocks
|
|
80000
80011
|
if (elements.length > 0) {
|
|
80001
80012
|
lastBlock = elements[elements.length - 1];
|
|
80002
80013
|
}
|
|
@@ -80108,14 +80119,14 @@ class ContentBuilder {
|
|
|
80108
80119
|
itemEl.outerHTML = blockTemplate.replace('[%CONTENT%]', itemEl.innerHTML);
|
|
80109
80120
|
}
|
|
80110
80121
|
this.activeCol = null;
|
|
80111
|
-
const builders =
|
|
80122
|
+
const builders = box.querySelectorAll('.is-container.container-new');
|
|
80112
80123
|
builders.forEach(builder => {
|
|
80113
80124
|
const block = builder.parentNode;
|
|
80114
80125
|
if (lastBlock) {
|
|
80115
80126
|
lastBlock.insertAdjacentElement('afterend', block);
|
|
80116
80127
|
} else {
|
|
80117
|
-
const ovarlay =
|
|
80118
|
-
ovarlay.insertAdjacentElement('afterend', block);
|
|
80128
|
+
const ovarlay = box.querySelector('.is-overlay');
|
|
80129
|
+
if (ovarlay) ovarlay.insertAdjacentElement('afterend', block);else box.insertAdjacentElement('afterbegin', block);
|
|
80119
80130
|
}
|
|
80120
80131
|
|
|
80121
80132
|
// After snippet has been added, re-apply behavior on builder areas
|
|
@@ -80128,16 +80139,24 @@ class ContentBuilder {
|
|
|
80128
80139
|
}
|
|
80129
80140
|
|
|
80130
80141
|
// destroy
|
|
80131
|
-
if (this.sortableOnCanvas)
|
|
80132
|
-
|
|
80133
|
-
obj
|
|
80134
|
-
|
|
80135
|
-
|
|
80142
|
+
if (this.sortableOnCanvas) {
|
|
80143
|
+
this.sortableOnCanvas.forEach(obj => {
|
|
80144
|
+
if (obj) {
|
|
80145
|
+
obj.destroy();
|
|
80146
|
+
}
|
|
80147
|
+
});
|
|
80148
|
+
let dummies = this.doc.querySelectorAll('.block-dummy');
|
|
80149
|
+
dummies.forEach(elm => elm.parentNode.removeChild(elm));
|
|
80150
|
+
}
|
|
80136
80151
|
if (this.sortableOnPage) this.sortableOnPage.destroy();
|
|
80137
80152
|
}
|
|
80138
80153
|
});
|
|
80139
80154
|
this.sortableOnCanvas.push(obj);
|
|
80140
80155
|
});
|
|
80156
|
+
}
|
|
80157
|
+
if (this.page) {
|
|
80158
|
+
if (this.page !== '.is-wrapper') return; // only for ContentBox
|
|
80159
|
+
const wrapper = this.doc.querySelector(this.page);
|
|
80141
80160
|
this.sortableOnPage = new Sortable(wrapper, {
|
|
80142
80161
|
scroll: true,
|
|
80143
80162
|
group: 'shared',
|
|
@@ -80337,11 +80356,15 @@ class ContentBuilder {
|
|
|
80337
80356
|
// this.sortableOnPage.option('draggable', '.dummy');
|
|
80338
80357
|
|
|
80339
80358
|
// destroy
|
|
80340
|
-
if (this.sortableOnCanvas)
|
|
80341
|
-
|
|
80342
|
-
obj
|
|
80343
|
-
|
|
80344
|
-
|
|
80359
|
+
if (this.sortableOnCanvas) {
|
|
80360
|
+
this.sortableOnCanvas.forEach(obj => {
|
|
80361
|
+
if (obj) {
|
|
80362
|
+
obj.destroy();
|
|
80363
|
+
}
|
|
80364
|
+
});
|
|
80365
|
+
let dummies = this.doc.querySelectorAll('.block-dummy');
|
|
80366
|
+
dummies.forEach(elm => elm.parentNode.removeChild(elm));
|
|
80367
|
+
}
|
|
80345
80368
|
if (this.sortableOnPage) this.sortableOnPage.destroy();
|
|
80346
80369
|
}
|
|
80347
80370
|
});
|