@brndts/brndts-ads 1.13.20 → 1.13.22

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.mjs CHANGED
@@ -68636,6 +68636,13 @@ var regions = [
68636
68636
  h: 300,
68637
68637
  name: "Generic - 250x300",
68638
68638
  type: ""
68639
+ },
68640
+ {
68641
+ id: 1003,
68642
+ w: 300,
68643
+ h: 600,
68644
+ name: "Generic - 300x600",
68645
+ type: "large-rectangle"
68639
68646
  }
68640
68647
  ];
68641
68648
  var ContentProvider = /*#__PURE__*/ function() {
@@ -70393,7 +70400,7 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
70393
70400
  code: "prebid"
70394
70401
  }
70395
70402
  };
70396
- _this.affiliateManifestUrl = "https://brndts-public.s3.eu-west-2.amazonaws.com/affiliates/manifest.json";
70403
+ _this.affiliateManifestUrl = "https://brndts-public.s3.eu-west-2.amazonaws.com/affiliates/general_manifest.json";
70397
70404
  _this.affiliateProvider = new AffiliateProvider({}, {
70398
70405
  manifest: _this.affiliateManifestUrl
70399
70406
  });
@@ -70461,9 +70468,14 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
70461
70468
  var _this_affiliateProvider;
70462
70469
  var affiliateContent = (_this_affiliateProvider = _this.affiliateProvider) === null || _this_affiliateProvider === void 0 ? void 0 : _this_affiliateProvider.contents();
70463
70470
  if (affiliateContent && affiliateContent.content.length > 0) {
70471
+ var _affiliateContent_extra;
70464
70472
  _this.content = _object_spread_props(_object_spread({}, _this.content), {
70465
70473
  content: affiliateContent.content,
70466
70474
  extra: _object_spread_props(_object_spread({}, _this.content.extra || {}), {
70475
+ sz: ((_affiliateContent_extra = affiliateContent.extra) === null || _affiliateContent_extra === void 0 ? void 0 : _affiliateContent_extra.sz) || {
70476
+ w: 300,
70477
+ h: 250
70478
+ },
70467
70479
  region: regionId,
70468
70480
  fallback: "affiliate"
70469
70481
  })
@@ -70500,7 +70512,7 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
70500
70512
  key: "request",
70501
70513
  value: function request(params) {
70502
70514
  return _async_to_generator(function() {
70503
- var _this, adType, regionId, regionInfo, regionInfo1;
70515
+ var _this, adType, adName, regionId, regionInfo;
70504
70516
  return _ts_generator(this, function(_state) {
70505
70517
  switch(_state.label){
70506
70518
  case 0:
@@ -70512,17 +70524,23 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
70512
70524
  case 1:
70513
70525
  _state.sent();
70514
70526
  adType = params.params.adType;
70527
+ adName = params.params.regionName;
70515
70528
  regionId = params.params.regionId;
70516
70529
  if (params.params.useRatio) {
70517
70530
  regionInfo = ContentProvider.approxRegionByRatio(params.size.width, params.size.height);
70518
70531
  if (regionInfo) {
70519
70532
  regionId = "".concat(regionInfo.id);
70520
70533
  }
70534
+ } else if (adType && adName) {
70535
+ regionInfo = ContentProvider.approxRegionByType(adType);
70536
+ regionId = (regionInfo === null || regionInfo === void 0 ? void 0 : regionInfo.id) ? "".concat(regionInfo.id) : regionId;
70521
70537
  } else if (params.params.useSize) {
70522
- regionInfo1 = ContentProvider.approxRegionBySize(params.size.width, params.size.height);
70523
- if (regionInfo1) {
70524
- regionId = "".concat(regionInfo1.id);
70538
+ regionInfo = ContentProvider.approxRegionBySize(params.size.width, params.size.height);
70539
+ if (regionInfo) {
70540
+ regionId = "".concat(regionInfo.id);
70525
70541
  }
70542
+ } else {
70543
+ regionInfo = ContentProvider.approxRegionById(+regionId);
70526
70544
  }
70527
70545
  params.params.refRegionId = regionId;
70528
70546
  this.content = _object_spread_props(_object_spread({}, this.content), {
@@ -70536,6 +70554,7 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
70536
70554
  ];
70537
70555
  case 2:
70538
70556
  _state.sent();
70557
+ this.processBids(params, {});
70539
70558
  PrebidJS.defineSlot(this.options, regionId, params.params.regionId, adType);
70540
70559
  PrebidJS.request(regionId, params.params.regionId, function(bids) {
70541
70560
  return _this.processBids(params, bids);
@@ -71885,6 +71904,7 @@ var Region = /*#__PURE__*/ function() {
71885
71904
  this.container.style.pointerEvents = "none";
71886
71905
  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) {
71887
71906
  this.container.style.pointerEvents = "all";
71907
+ this.container.style.zIndex = "9999";
71888
71908
  }
71889
71909
  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) {
71890
71910
  this.container.style.pointerEvents = "none";