@brndts/brndts-ads 1.14.14 → 1.14.16
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 +25 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -72251,7 +72251,7 @@ var GPT = /*#__PURE__*/ function() {
|
|
72251
72251
|
},
|
72252
72252
|
{
|
72253
72253
|
key: "defineSlot",
|
72254
|
-
value: function defineSlot(slotId, size, containerId) {
|
72254
|
+
value: function defineSlot(slotId, size, containerId, targeting) {
|
72255
72255
|
window.googletag.cmd.push(function() {
|
72256
72256
|
if (window.googletag.pubads().getSlots().some(function(slot) {
|
72257
72257
|
return slot.getSlotElementId() === containerId;
|
@@ -72273,6 +72273,11 @@ var GPT = /*#__PURE__*/ function() {
|
|
72273
72273
|
0
|
72274
72274
|
], []).build();
|
72275
72275
|
mrec1 === null || mrec1 === void 0 ? void 0 : mrec1.defineSizeMapping(mrecmapping);
|
72276
|
+
if (targeting) {
|
72277
|
+
mrec1.setConfig({
|
72278
|
+
targeting: targeting
|
72279
|
+
});
|
72280
|
+
}
|
72276
72281
|
});
|
72277
72282
|
}
|
72278
72283
|
},
|
@@ -72302,7 +72307,6 @@ var GPT = /*#__PURE__*/ function() {
|
|
72302
72307
|
]);
|
72303
72308
|
return GPT;
|
72304
72309
|
}();
|
72305
|
-
var displayedSlots = /* @__PURE__ */ new Set();
|
72306
72310
|
var PrebidGAM = /*#__PURE__*/ function() {
|
72307
72311
|
"use strict";
|
72308
72312
|
function _PrebidGAM() {
|
@@ -72447,9 +72451,16 @@ var PrebidGAM = /*#__PURE__*/ function() {
|
|
72447
72451
|
var _unitDefinition_mediaTypes_banner;
|
72448
72452
|
sizes = ((_unitDefinition_mediaTypes_banner = unitDefinition.mediaTypes.banner) === null || _unitDefinition_mediaTypes_banner === void 0 ? void 0 : _unitDefinition_mediaTypes_banner.sizes) || [];
|
72449
72453
|
}
|
72454
|
+
var targeting = void 0;
|
72455
|
+
if (unitDefinition.zoneId && options.reviveId) {
|
72456
|
+
targeting = {
|
72457
|
+
brndts_rid: options.reviveId,
|
72458
|
+
brndts_zid: unitDefinition.zoneId
|
72459
|
+
};
|
72460
|
+
}
|
72450
72461
|
GPT.defineSlot("/".concat(gamNetworkId, "/").concat(adName), [
|
72451
72462
|
sizes[0] || []
|
72452
|
-
], "".concat(containerId));
|
72463
|
+
], "".concat(containerId), targeting);
|
72453
72464
|
if (!((_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.adUnits.some(function(defUnit) {
|
72454
72465
|
return "".concat(containerId) === "".concat(defUnit.code);
|
72455
72466
|
}))) {
|
@@ -72501,17 +72512,11 @@ var PrebidGAM = /*#__PURE__*/ function() {
|
|
72501
72512
|
(_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.setTargetingForGPTAsync([
|
72502
72513
|
"".concat(containerId)
|
72503
72514
|
]);
|
72504
|
-
window.googletag.cmd.push(function() {
|
72505
|
-
if (!displayedSlots.has(containerId)) {
|
72506
|
-
window.googletag.display(containerId);
|
72507
|
-
displayedSlots.add(containerId);
|
72508
|
-
}
|
72509
|
-
});
|
72510
72515
|
window.googletag.cmd.push(function() {
|
72511
72516
|
var container = document.createElement("div");
|
72512
72517
|
container.id = containerId;
|
72513
72518
|
var script = document.createElement("script");
|
72514
|
-
script.innerHTML = '\n window.googletag.cmd.push(function() {\n googletag.pubads().refresh(googletag.pubads().getSlots().filter(slot => slot.getSlotElementId() === "'.concat(containerId, '"));\n });');
|
72519
|
+
script.innerHTML = '\n window.googletag.cmd.push(function() {\n googletag.pubads().refresh(googletag.pubads().getSlots().filter(slot => slot.getSlotElementId() === "'.concat(containerId, '"), { changeCorrelator: true });\n });');
|
72515
72520
|
container.appendChild(script);
|
72516
72521
|
callback(container);
|
72517
72522
|
});
|
@@ -72978,6 +72983,15 @@ var PrebidReviveProvider = /*#__PURE__*/ function(ContentProvider) {
|
|
72978
72983
|
});
|
72979
72984
|
} else {
|
72980
72985
|
prebidReviveReady.promise.then(function() {
|
72986
|
+
_this.revive = new ReviveProvider({}, {
|
72987
|
+
units: _this.options.units.reduce(function(acc, unit) {
|
72988
|
+
acc[unit.code] = {
|
72989
|
+
zoneid: unit.zoneid
|
72990
|
+
};
|
72991
|
+
return acc;
|
72992
|
+
}, {}),
|
72993
|
+
reviveId: _this.options.reviveId
|
72994
|
+
});
|
72981
72995
|
_this.ready.resolve(true);
|
72982
72996
|
});
|
72983
72997
|
}
|
@@ -73348,6 +73362,7 @@ var StaticAdRegion = /*#__PURE__*/ function(Region) {
|
|
73348
73362
|
_this.content.view.remove();
|
73349
73363
|
_this.content = new StaticRegionContent(_this.id, _this.plane, _this.box, ((_this_deps_config = _this.deps.config) === null || _this_deps_config === void 0 ? void 0 : (_this_deps_config_getAdsConfig_general = _this_deps_config.getAdsConfig().general) === null || _this_deps_config_getAdsConfig_general === void 0 ? void 0 : (_this_deps_config_getAdsConfig_general_debug_mode = _this_deps_config_getAdsConfig_general.debug_mode) === null || _this_deps_config_getAdsConfig_general_debug_mode === void 0 ? void 0 : _this_deps_config_getAdsConfig_general_debug_mode.value) ? _this.regionDescriptor.ctx : void 0);
|
73350
73364
|
_this.container.appendChild(_this.content.view);
|
73365
|
+
_this.container.style.pointerEvents = "all";
|
73351
73366
|
if (_this.deps.provider) {
|
73352
73367
|
_this.content.addContent(_this.deps.provider.contents());
|
73353
73368
|
}
|