@highfivve/ad-tag 5.8.7 → 5.8.9

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.
@@ -184,6 +184,9 @@ export const createFrequencyCapping = (config, _window, now, logger) => {
184
184
  pacingInterval.maxImpressions) ||
185
185
  (delay && numAdRequests < delay.minRequestAds));
186
186
  });
187
+ },
188
+ getRequestAdsCount() {
189
+ return numAdRequests;
187
190
  }
188
191
  };
189
192
  };
@@ -92,6 +92,13 @@ export const createGlobalAuctionContext = (window, logger, eventService, config
92
92
  interstitialChannel: () => {
93
93
  return interstitial?.interstitialChannel();
94
94
  },
95
+ hasMinimumRequestAds(minRequestAds) {
96
+ if (!frequencyCapping) {
97
+ return true;
98
+ }
99
+ const currentRequestAdsCount = frequencyCapping.getRequestAdsCount();
100
+ return currentRequestAdsCount >= minRequestAds;
101
+ },
95
102
  configureStep() {
96
103
  return configureStep;
97
104
  }
@@ -35,8 +35,8 @@ export const createUtiq = () => {
35
35
  return Promise.resolve();
36
36
  }
37
37
  const minAdRequests = config.delay?.enabled && config.delay.minAdRequests ? config.delay.minAdRequests : 0;
38
- if (context.requestAdsCalls__ < minAdRequests) {
39
- context.logger__.info('Utiq', `not enough ad requests (${context.requestAdsCalls__}) to load Utiq. ${minAdRequests} required.`);
38
+ if (!context.auction__.hasMinimumRequestAds(minAdRequests)) {
39
+ context.logger__.info('Utiq', `not enough ad requests to load Utiq. ${minAdRequests} required.`);
40
40
  return Promise.resolve();
41
41
  }
42
42
  return context.assetLoaderService__
package/lib/ads/moli.js CHANGED
@@ -536,7 +536,7 @@ export const createMoliTag = (window) => {
536
536
  .then(() => 'refreshed');
537
537
  }
538
538
  else {
539
- state.runtimeConfig.refreshBuckets.push({ bucket, options });
539
+ state.nextRuntimeConfig.refreshBuckets.push({ bucket, options });
540
540
  return Promise.resolve('queued');
541
541
  }
542
542
  }
@@ -439,13 +439,12 @@ export class GlobalConfig extends Component {
439
439
  showOnlyRenderedSlots: e.target.checked
440
440
  }) }),
441
441
  "Show only rendered slots")),
442
- this.props.showOverlays &&
443
- config.slots.map((slot, index) => this.isSlotRendered(slot) || !showOnlyRenderedSlots ? (React.createElement("div", { key: index },
444
- React.createElement("strong", null, slot.behaviour.loaded),
445
- " slot with DOM ID",
446
- ' ',
447
- React.createElement("strong", null, slot.domId),
448
- React.createElement(AdSlotConfig, { labelConfigService: labelConfigService, slot: slot }))) : null)))),
442
+ config.slots.map((slot, index) => this.isSlotRendered(slot) || !showOnlyRenderedSlots ? (React.createElement("div", { key: index },
443
+ React.createElement("strong", null, slot.behaviour.loaded),
444
+ " slot with DOM ID",
445
+ ' ',
446
+ React.createElement("strong", null, slot.domId),
447
+ React.createElement(AdSlotConfig, { labelConfigService: labelConfigService, slot: slot }))) : null)))),
449
448
  React.createElement("div", { className: "MoliDebug-sidebarSection MoliDebug-sidebarSection--targeting" },
450
449
  React.createElement("h4", null,
451
450
  this.collapseToggle('targeting'),
@@ -1,3 +1,3 @@
1
1
  export const packageJson = {
2
- version: '5.8.7'
2
+ version: '5.8.9'
3
3
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highfivve/ad-tag",
3
- "version": "5.8.7",
3
+ "version": "5.8.9",
4
4
  "license": "Apache-2.0",
5
5
  "description": "An ad tag implementation called moli",
6
6
  "main": "./lib/index.js",