@brndts/brndts-ads 1.14.15 → 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 +16 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -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
|
});
|
@@ -73357,6 +73362,7 @@ var StaticAdRegion = /*#__PURE__*/ function(Region) {
|
|
73357
73362
|
_this.content.view.remove();
|
73358
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);
|
73359
73364
|
_this.container.appendChild(_this.content.view);
|
73365
|
+
_this.container.style.pointerEvents = "all";
|
73360
73366
|
if (_this.deps.provider) {
|
73361
73367
|
_this.content.addContent(_this.deps.provider.contents());
|
73362
73368
|
}
|