@innovastudio/contentbuilder 1.5.36 → 1.5.37
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
|
@@ -17269,8 +17269,10 @@ const renderSnippetPanel = (builder, snippetOpen) => {
|
|
|
17269
17269
|
// evt.related.getBoundingClientRect().top>window.innerHeight) {
|
|
17270
17270
|
// return false;
|
|
17271
17271
|
// }
|
|
17272
|
-
},
|
|
17273
17272
|
|
|
17273
|
+
const wrapper = builder.doc.querySelector(builder.page);
|
|
17274
|
+
if (wrapper) wrapper.style.marginLeft = '';
|
|
17275
|
+
},
|
|
17274
17276
|
onSort: evt => {
|
|
17275
17277
|
if (!builder.canvas) return;
|
|
17276
17278
|
let snippetX = evt.originalEvent.clientX;
|
|
@@ -17286,6 +17288,12 @@ const renderSnippetPanel = (builder, snippetOpen) => {
|
|
|
17286
17288
|
block.style.left = x + '%';
|
|
17287
17289
|
block.removeAttribute('data-new-dummy');
|
|
17288
17290
|
}
|
|
17291
|
+
|
|
17292
|
+
// to prevent flicker caused by snippet panel above wrapper (see contentbuilder.js sectionDropSetup)
|
|
17293
|
+
if (builder.page && builder.page === '.is-wrapper') {
|
|
17294
|
+
const wrapper = builder.doc.querySelector(builder.page);
|
|
17295
|
+
if (wrapper) wrapper.style.marginLeft = '';
|
|
17296
|
+
}
|
|
17289
17297
|
},
|
|
17290
17298
|
onStart: () => {
|
|
17291
17299
|
// Remove .builder-active during dragging (because this class makes rows have border-right/left 120px)
|
|
@@ -17334,6 +17342,12 @@ const renderSnippetPanel = (builder, snippetOpen) => {
|
|
|
17334
17342
|
}
|
|
17335
17343
|
let dummies = builder.doc.querySelectorAll('.block-dummy');
|
|
17336
17344
|
dummies.forEach(elm => elm.parentNode.removeChild(elm));
|
|
17345
|
+
|
|
17346
|
+
// to prevent flicker caused by snippet panel above wrapper (see contentbuilder.js sectionDropSetup)
|
|
17347
|
+
if (builder.page && builder.page === '.is-wrapper') {
|
|
17348
|
+
const wrapper = builder.doc.querySelector(builder.page);
|
|
17349
|
+
if (wrapper) wrapper.style.marginLeft = '';
|
|
17350
|
+
}
|
|
17337
17351
|
}, 10);
|
|
17338
17352
|
}
|
|
17339
17353
|
});
|
|
@@ -86373,7 +86387,7 @@ class ContentBuilder {
|
|
|
86373
86387
|
deleteConfirm: false,
|
|
86374
86388
|
disableBootstrapIcons: false,
|
|
86375
86389
|
sectionTemplate: `
|
|
86376
|
-
<div class="is-section is-box is-section-100 type-
|
|
86390
|
+
<div class="is-section is-box is-section-100 type-system-ui">
|
|
86377
86391
|
<div class="is-overlay"></div>
|
|
86378
86392
|
<div class="is-boxes">
|
|
86379
86393
|
<div class="is-box-centered">
|
|
@@ -92500,6 +92514,11 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
|
92500
92514
|
if (this.page) {
|
|
92501
92515
|
if (this.page !== '.is-wrapper') return; // only for ContentBox
|
|
92502
92516
|
const wrapper = this.doc.querySelector(this.page);
|
|
92517
|
+
|
|
92518
|
+
// to prevent flicker caused by snippet panel above wrapper
|
|
92519
|
+
if (!wrapper.querySelector('.is-section')) {
|
|
92520
|
+
wrapper.style.marginLeft = '300px';
|
|
92521
|
+
}
|
|
92503
92522
|
this.sortableOnPage = new Sortable(wrapper, {
|
|
92504
92523
|
scroll: true,
|
|
92505
92524
|
group: 'shared',
|
|
@@ -92593,6 +92612,13 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
|
92593
92612
|
|
|
92594
92613
|
if (this.opts.emailMode) bSnippet = false;
|
|
92595
92614
|
|
|
92615
|
+
// check if is block
|
|
92616
|
+
let isBlock = false;
|
|
92617
|
+
if (html.includes('"is-block')) {
|
|
92618
|
+
isBlock = true;
|
|
92619
|
+
bSnippet = false;
|
|
92620
|
+
}
|
|
92621
|
+
|
|
92596
92622
|
// Convert snippet into your defined 12 columns grid
|
|
92597
92623
|
var rowClass = this.opts.row; //row
|
|
92598
92624
|
var colClass = this.opts.cols; //['col s1', 'col s2', 'col s3', 'col s4', 'col s5', 'col s6', 'col s7', 'col s8', 'col s9', 'col s10', 'col s11', 'col s12']
|
|
@@ -92650,6 +92676,14 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
|
92650
92676
|
// </div>
|
|
92651
92677
|
// `;
|
|
92652
92678
|
itemEl.outerHTML = this.settings.sectionTemplate.replace('[%CONTENT%]', html);
|
|
92679
|
+
} else if (isBlock) {
|
|
92680
|
+
let canvasTemplate = `
|
|
92681
|
+
<div class="is-section is-box is-section-100 type-system-ui box-canvas autolayout last-box">
|
|
92682
|
+
<div class="is-overlay"></div>
|
|
92683
|
+
[%CONTENT%]
|
|
92684
|
+
</div>
|
|
92685
|
+
`;
|
|
92686
|
+
itemEl.outerHTML = canvasTemplate.replace('[%CONTENT%]', html);
|
|
92653
92687
|
} else {
|
|
92654
92688
|
// Snippet is wrapped in row/colum (may contain custom code or has [data-html] attribute)
|
|
92655
92689
|
// Can only be inserted after current row or last row (not on column or element).
|