@innovastudio/contentbox 1.6.162 → 1.6.164

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.6.162",
4
+ "version": "1.6.164",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "types": "index.d.ts",
@@ -59,7 +59,7 @@
59
59
  "ws": "^8.13.0"
60
60
  },
61
61
  "dependencies": {
62
- "@innovastudio/contentbuilder": "^1.5.160",
62
+ "@innovastudio/contentbuilder": "^1.5.162",
63
63
  "js-beautify": "^1.14.0",
64
64
  "sortablejs": "^1.15.2"
65
65
  }
@@ -33333,15 +33333,16 @@ class Util$1 {
33333
33333
  rtepop.style.display = '';
33334
33334
  dom.removeClass(rtepop, 'active');
33335
33335
  dom.removeClass(rtepop, 'deactive');
33336
- // dom.addClass(rtepop, 'deactive');
33337
33336
  });
33338
33337
  }
33339
-
33340
33338
  let pops = builderStuff.querySelectorAll('.is-pop');
33341
33339
  Array.prototype.forEach.call(pops, pop => {
33342
33340
  pop.style.display = '';
33343
33341
  dom.removeClass(pop, 'active');
33344
- pop.setAttribute('aria-hidden', true);
33342
+ this.builder.doc.body.focus();
33343
+ setTimeout(() => {
33344
+ pop.setAttribute('aria-hidden', true);
33345
+ }, 0);
33345
33346
  });
33346
33347
  this.builder.colTool.lockIndicator.style.display = '';
33347
33348
  if (this.builder.resize) {
@@ -33704,6 +33705,7 @@ class Util$1 {
33704
33705
  // when column has just been deleted
33705
33706
  row = this.rowSelected();
33706
33707
  }
33708
+ if (!row) return;
33707
33709
  this.colTool = row.querySelector('.is-col-tool');
33708
33710
  if (!this.colTool) return; // when drag block as a new section
33709
33711
 
@@ -41530,7 +41532,7 @@ class HtmlUtil {
41530
41532
  });
41531
41533
  }
41532
41534
  }
41533
- applyHtml(modal) {
41535
+ async applyHtml(modal) {
41534
41536
  const util = this.builder.util;
41535
41537
  const cell = util.cellSelected();
41536
41538
  if (cell) cell.parentNode.classList.add('row-active'); // add row-select class back
@@ -41656,7 +41658,7 @@ class HtmlUtil {
41656
41658
  util.clearControls(); // NEW
41657
41659
 
41658
41660
  // Re-init plugins
41659
- if (this.builder.win.builderRuntime) this.builder.win.builderRuntime.reinitialize();
41661
+ if (this.builder.win.builderRuntime) await this.builder.win.builderRuntime.reinitialize();
41660
41662
  this.builder.hideModal(modal);
41661
41663
  }
41662
41664
  viewHtmlExternal() {
@@ -42214,7 +42216,6 @@ class HtmlUtil {
42214
42216
 
42215
42217
  // Remove runtime-added attributes
42216
42218
  element.removeAttribute('data-cb-original-content');
42217
- element.removeAttribute('data-cb-loaded');
42218
42219
 
42219
42220
  // element.removeAttribute('data-cb-logo-loop-initialized');
42220
42221
 
@@ -42225,12 +42226,12 @@ class HtmlUtil {
42225
42226
  element.removeAttribute(name);
42226
42227
  }
42227
42228
  });
42228
- element.removeAttribute('data-cb-editmode');
42229
42229
 
42230
42230
  // Remove runtime-added classes
42231
42231
  const type = element.getAttribute('data-cb-type');
42232
42232
  element.classList.remove(`cb-${type}`);
42233
42233
  }
42234
+ element.removeAttribute('data-cb-loaded');
42234
42235
  });
42235
42236
  html = '';
42236
42237
  if (multiple) {
@@ -43572,6 +43573,9 @@ class Grid {
43572
43573
  cell.click(); //refresh active cell/row
43573
43574
  }, 30);
43574
43575
  this.builder.opts.onChange();
43576
+
43577
+ // Re-init plugins
43578
+ if (this.builder.win.builderRuntime) this.builder.win.builderRuntime.reinitialize(cellElement);
43575
43579
  }
43576
43580
  removeColumn() {
43577
43581
  let util = this.util;
@@ -44345,6 +44349,9 @@ class Grid {
44345
44349
  builder.applyBehaviorOn(builderActive);
44346
44350
  this.rowTool.position(rowElement);
44347
44351
  this.builder.opts.onChange();
44352
+
44353
+ // Re-init plugins
44354
+ if (this.builder.win.builderRuntime) this.builder.win.builderRuntime.reinitialize(rowElement);
44348
44355
  }
44349
44356
  }
44350
44357
  class RowTool$1 {
@@ -90054,6 +90061,9 @@ class ElementTool {
90054
90061
 
90055
90062
  //Trigger Change event
90056
90063
  this.builder.opts.onChange();
90064
+
90065
+ // Re-init plugins
90066
+ if (this.builder.win.builderRuntime) this.builder.win.builderRuntime.reinitialize(newelm.parentNode);
90057
90067
  }, 100); //Timeout needed by Safari
90058
90068
  });
90059
90069
 
@@ -125113,6 +125123,9 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
125113
125123
 
125114
125124
  // Zoom
125115
125125
  this.setZoomOnControl(builder);
125126
+
125127
+ // Re-init plugins
125128
+ if (this.win.builderRuntime) this.win.builderRuntime.reinitialize(builder);
125116
125129
  }
125117
125130
  applySortableGrid() {
125118
125131
  if (this.iframe) {
@@ -145106,7 +145119,10 @@ class Section {
145106
145119
  if (this.builder.eb) this.builder.eb.refresh(); // freeform
145107
145120
 
145108
145121
  this.builder.onRender();
145109
- this.builder.onChange();
145122
+ this.builder.onChange(); // Re-init plugins
145123
+
145124
+ const runtime = this.builder.win.builderRuntime;
145125
+ if (runtime) runtime.reinitialize(section);
145110
145126
  }
145111
145127
 
145112
145128
  sectionDelete() {