@brndts/brndts-ads 1.13.9 → 1.13.10
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/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -80033,6 +80033,10 @@ var Interface = /*#__PURE__*/ function(_import_events7_default) {
|
|
80033
80033
|
this.container = this.context.elements.container;
|
80034
80034
|
}
|
80035
80035
|
var backdrop = new Backdrop(this.context);
|
80036
|
+
var existingBackdrop = this.container.querySelector("#".concat(backdrop.view.id));
|
80037
|
+
if (existingBackdrop) {
|
80038
|
+
this.container.removeChild(existingBackdrop);
|
80039
|
+
}
|
80036
80040
|
this.container.firstChild ? this.container.insertBefore(backdrop.view, this.container.firstChild) : this.container.appendChild(backdrop.view);
|
80037
80041
|
this.migrateStyles();
|
80038
80042
|
if (this.media.view) {
|
@@ -80114,6 +80118,8 @@ var Interface = /*#__PURE__*/ function(_import_events7_default) {
|
|
80114
80118
|
value: function destroy() {
|
80115
80119
|
var _this_container_parentElement;
|
80116
80120
|
if (!this.context.elements.original) {
|
80121
|
+
var _this_context_elements_container;
|
80122
|
+
(_this_context_elements_container = this.context.elements.container) === null || _this_context_elements_container === void 0 ? void 0 : _this_context_elements_container.remove();
|
80117
80123
|
return;
|
80118
80124
|
}
|
80119
80125
|
(_this_container_parentElement = this.container.parentElement) === null || _this_container_parentElement === void 0 ? void 0 : _this_container_parentElement.replaceChild(this.context.elements.original, this.container);
|
@@ -81096,6 +81102,13 @@ var RegionRenderer = /*#__PURE__*/ function() {
|
|
81096
81102
|
{
|
81097
81103
|
key: "attach",
|
81098
81104
|
value: function attach(container, before) {
|
81105
|
+
if (!container) {
|
81106
|
+
this.context.logger.error("No container provided for regions");
|
81107
|
+
return;
|
81108
|
+
}
|
81109
|
+
if (container.querySelector("#BRNDTS_ARW")) {
|
81110
|
+
container.removeChild(container.querySelector("#BRNDTS_ARW"));
|
81111
|
+
}
|
81099
81112
|
if (before) {
|
81100
81113
|
container.insertBefore(this.regionsContainerView.view, before);
|
81101
81114
|
} else {
|
@@ -82522,9 +82535,10 @@ var VideoAds = /*#__PURE__*/ function() {
|
|
82522
82535
|
try {
|
82523
82536
|
for(var _iterator = medias[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
82524
82537
|
var media = _step.value;
|
82525
|
-
if (!media || media.closest("#BRNDTS_R") || media.querySelector("#BRNDTS_R")) {
|
82538
|
+
if (!media || media.closest("#BRNDTS_R") || media.querySelector("#BRNDTS_R") || media.dataset.b_I !== void 0) {
|
82526
82539
|
continue;
|
82527
82540
|
}
|
82541
|
+
media.dataset.b_I = "".concat(this.videoAdElements.length);
|
82528
82542
|
var videoAd = new VideoAd(this.context, media);
|
82529
82543
|
this.videoAdElements.push(videoAd);
|
82530
82544
|
videoAd.start();
|