@brndts/brndts-ads 1.13.19 → 1.13.21

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 CHANGED
@@ -68606,6 +68606,13 @@ var regions = [
68606
68606
  h: 300,
68607
68607
  name: "Generic - 250x300",
68608
68608
  type: ""
68609
+ },
68610
+ {
68611
+ id: 1003,
68612
+ w: 300,
68613
+ h: 600,
68614
+ name: "Generic - 300x600",
68615
+ type: "large-rectangle"
68609
68616
  }
68610
68617
  ];
68611
68618
  var ContentProvider = /*#__PURE__*/ function() {
@@ -70343,7 +70350,7 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
70343
70350
  code: "prebid"
70344
70351
  }
70345
70352
  };
70346
- _this.affiliateManifestUrl = "https://brndts-public.s3.eu-west-2.amazonaws.com/affiliates/manifest.json";
70353
+ _this.affiliateManifestUrl = "https://brndts-public.s3.eu-west-2.amazonaws.com/affiliates/general_manifest.json";
70347
70354
  _this.affiliateProvider = new AffiliateProvider({}, {
70348
70355
  manifest: _this.affiliateManifestUrl
70349
70356
  });
@@ -70411,9 +70418,14 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
70411
70418
  var _this_affiliateProvider;
70412
70419
  var affiliateContent = (_this_affiliateProvider = _this.affiliateProvider) === null || _this_affiliateProvider === void 0 ? void 0 : _this_affiliateProvider.contents();
70413
70420
  if (affiliateContent && affiliateContent.content.length > 0) {
70421
+ var _affiliateContent_extra;
70414
70422
  _this.content = _object_spread_props(_object_spread({}, _this.content), {
70415
70423
  content: affiliateContent.content,
70416
70424
  extra: _object_spread_props(_object_spread({}, _this.content.extra || {}), {
70425
+ sz: ((_affiliateContent_extra = affiliateContent.extra) === null || _affiliateContent_extra === void 0 ? void 0 : _affiliateContent_extra.sz) || {
70426
+ w: 300,
70427
+ h: 250
70428
+ },
70417
70429
  region: regionId,
70418
70430
  fallback: "affiliate"
70419
70431
  })
@@ -70450,11 +70462,10 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
70450
70462
  key: "request",
70451
70463
  value: function request(params) {
70452
70464
  return _async_to_generator(function() {
70453
- var _this, adType, regionId, regionInfo, regionInfo1;
70465
+ var adType, adName, regionId, regionInfo;
70454
70466
  return _ts_generator(this, function(_state) {
70455
70467
  switch(_state.label){
70456
70468
  case 0:
70457
- _this = this;
70458
70469
  return [
70459
70470
  4,
70460
70471
  this.ready.promise
@@ -70462,17 +70473,23 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
70462
70473
  case 1:
70463
70474
  _state.sent();
70464
70475
  adType = params.params.adType;
70476
+ adName = params.params.regionName;
70465
70477
  regionId = params.params.regionId;
70466
70478
  if (params.params.useRatio) {
70467
70479
  regionInfo = ContentProvider.approxRegionByRatio(params.size.width, params.size.height);
70468
70480
  if (regionInfo) {
70469
70481
  regionId = "".concat(regionInfo.id);
70470
70482
  }
70483
+ } else if (adType && adName) {
70484
+ regionInfo = ContentProvider.approxRegionByType(adType);
70485
+ regionId = (regionInfo === null || regionInfo === void 0 ? void 0 : regionInfo.id) ? "".concat(regionInfo.id) : regionId;
70471
70486
  } else if (params.params.useSize) {
70472
- regionInfo1 = ContentProvider.approxRegionBySize(params.size.width, params.size.height);
70473
- if (regionInfo1) {
70474
- regionId = "".concat(regionInfo1.id);
70487
+ regionInfo = ContentProvider.approxRegionBySize(params.size.width, params.size.height);
70488
+ if (regionInfo) {
70489
+ regionId = "".concat(regionInfo.id);
70475
70490
  }
70491
+ } else {
70492
+ regionInfo = ContentProvider.approxRegionById(+regionId);
70476
70493
  }
70477
70494
  params.params.refRegionId = regionId;
70478
70495
  this.content = _object_spread_props(_object_spread({}, this.content), {
@@ -70486,10 +70503,7 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
70486
70503
  ];
70487
70504
  case 2:
70488
70505
  _state.sent();
70489
- PrebidJS.defineSlot(this.options, regionId, params.params.regionId, adType);
70490
- PrebidJS.request(regionId, params.params.regionId, function(bids) {
70491
- return _this.processBids(params, bids);
70492
- });
70506
+ this.processBids(params, {});
70493
70507
  return [
70494
70508
  2,
70495
70509
  Promise.resolve()
@@ -70883,7 +70897,7 @@ var PrebidGAMProvider = /*#__PURE__*/ function(ContentProvider1) {
70883
70897
  PrebidGAMEventsInstance.onSlotRenderEnd(function(event) {
70884
70898
  var slot = event.slot;
70885
70899
  if ("".concat(_this.workingSlotId) === event.slot.getSlotElementId()) {
70886
- var _this_content_extra_sz, _this_content_extra_sz1;
70900
+ var _event_size, _this_content_extra_sz, _event_size1, _this_content_extra_sz1;
70887
70901
  if (!_this.content.extra) {
70888
70902
  _this.content.extra = {};
70889
70903
  }
@@ -70894,8 +70908,8 @@ var PrebidGAMProvider = /*#__PURE__*/ function(ContentProvider1) {
70894
70908
  _this.content.extra.bidder = slot.getTargeting("hb_bidder")[0];
70895
70909
  }
70896
70910
  _this.content.extra.sz = {
70897
- w: event.size[0] || ((_this_content_extra_sz = _this.content.extra.sz) === null || _this_content_extra_sz === void 0 ? void 0 : _this_content_extra_sz.w) || 0,
70898
- h: event.size[1] || ((_this_content_extra_sz1 = _this.content.extra.sz) === null || _this_content_extra_sz1 === void 0 ? void 0 : _this_content_extra_sz1.h) || 0
70911
+ w: ((_event_size = event.size) === null || _event_size === void 0 ? void 0 : _event_size[0]) || ((_this_content_extra_sz = _this.content.extra.sz) === null || _this_content_extra_sz === void 0 ? void 0 : _this_content_extra_sz.w) || 0,
70912
+ h: ((_event_size1 = event.size) === null || _event_size1 === void 0 ? void 0 : _event_size1[1]) || ((_this_content_extra_sz1 = _this.content.extra.sz) === null || _this_content_extra_sz1 === void 0 ? void 0 : _this_content_extra_sz1.h) || 0
70899
70913
  };
70900
70914
  _this.content.pending = false;
70901
70915
  _this.fullfill();
@@ -71816,6 +71830,7 @@ var Region = /*#__PURE__*/ function() {
71816
71830
  this.container.style.pointerEvents = "none";
71817
71831
  if ((_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_clickability = _this_deps_config_getAdsConfig_general.clickability) === null || _this_deps_config_getAdsConfig_general_clickability === void 0 ? void 0 : _this_deps_config_getAdsConfig_general_clickability.value) {
71818
71832
  this.container.style.pointerEvents = "all";
71833
+ this.container.style.zIndex = "9999";
71819
71834
  }
71820
71835
  if ((_this_deps_config1 = this.deps.config) === null || _this_deps_config1 === void 0 ? void 0 : (_this_deps_config_getAdsConfig_general1 = _this_deps_config1.getAdsConfig().general) === null || _this_deps_config_getAdsConfig_general1 === void 0 ? void 0 : (_this_deps_config_getAdsConfig_general_debug_mode = _this_deps_config_getAdsConfig_general1.debug_mode) === null || _this_deps_config_getAdsConfig_general_debug_mode === void 0 ? void 0 : _this_deps_config_getAdsConfig_general_debug_mode.value) {
71821
71836
  this.container.style.pointerEvents = "none";