@innovastudio/contentbuilder 1.5.202 → 1.5.204

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/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.5.202",
4
+ "version": "1.5.204",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -18207,7 +18207,7 @@ const renderSnippetPanel = (builder, snippetOpen) => {
18207
18207
  builder.opts.snippetJSON.snippets.forEach(item => {
18208
18208
  item.id = index; //Give id to each record
18209
18209
  if (item.category === builder.opts.defaultSnippetCategory + '') {
18210
- dom.appendHtml(snippetlist, '<div class="snippet-item" data-id="' + item.id + '" data-cat="' + item.category + '"><img alt="' + util.out('Snippet') + '" src="' + snippetPath + item.thumbnail + '"><span class="is-overlay"></span></div>');
18210
+ dom.appendHtml(snippetlist, '<div data-drag-id="' + (index - 1) + '" class="snippet-item" data-id="' + item.id + '" data-cat="' + item.category + '"><img alt="' + util.out('Snippet') + '" src="' + snippetPath + item.thumbnail + '"><span class="is-overlay"></span></div>');
18211
18211
  }
18212
18212
  index++;
18213
18213
  });
@@ -18242,8 +18242,9 @@ const renderSnippetPanel = (builder, snippetOpen) => {
18242
18242
  });
18243
18243
  useClick=true;
18244
18244
  }
18245
- if(!useClick) */
18246
- new Sortable(snippetlist, {
18245
+
18246
+ if(!useClick) */
18247
+ if (!builder.iframeDragDrop) new Sortable(snippetlist, {
18247
18248
  // forceFallback: safariAgent,
18248
18249
  group: {
18249
18250
  name: 'shared',
@@ -92589,6 +92590,7 @@ The frameworks provide utility classes for structure and typography. To create r
92589
92590
  class ContentBuilder {
92590
92591
  constructor(opts = {}) {
92591
92592
  let defaults = {
92593
+ iframeDragDrop: false,
92592
92594
  page: '',
92593
92595
  container: '.is-container',
92594
92596
  siteToken: '',
@@ -99844,6 +99846,7 @@ Please obtain a license at: https://innovastudio.com/contentbox`);
99844
99846
  return visibleHeight / rect.height > 0.5;
99845
99847
  }
99846
99848
  sectionDropSetup() {
99849
+ if (this.iframeDragDrop) return;
99847
99850
  if (this.blockContainer) {
99848
99851
  this.sortableOnCanvas = [];
99849
99852
  let wrapper;
@@ -100042,6 +100045,9 @@ Please obtain a license at: https://innovastudio.com/contentbox`);
100042
100045
  if (this.opts.onBlockCanvasAdd) this.opts.onBlockCanvasAdd();
100043
100046
  this.opts.onChange();
100044
100047
  this.opts.onRender();
100048
+
100049
+ // Reinit after drag drop block
100050
+ if (this.win.builderRuntime) this.win.builderRuntime.reinitialize();
100045
100051
  }
100046
100052
 
100047
100053
  // destroy