@jolibox/ads 1.2.2 → 1.2.3

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.
@@ -24,7 +24,7 @@ export declare class AdBreakAsyncProxy {
24
24
  private videoChecker;
25
25
  private contextInfo;
26
26
  constructor(context: IAdsContext);
27
- private notifyAdsEvent;
27
+ private notifyIframeAdsEvent;
28
28
  get paramsToTrack(): {
29
29
  provider: string | null;
30
30
  type: "reward" | "preroll" | "start" | "pause" | "next" | "browse" | undefined;
package/dist/index.js CHANGED
@@ -560,7 +560,7 @@ class Rn {
560
560
  n = !1;
561
561
  }), n = !this.videoChecker.paused, this.videoChecker.pause(), this.context.track("CallShowAdFn", Object.assign({}, {
562
562
  userEvent: n
563
- }, this.paramsToTrack)), this.notifyAdsEvent("JOLIBOX_AD_CALL_BEFORE_REWARD", Tt({
563
+ }, this.paramsToTrack)), this.notifyIframeAdsEvent("JOLIBOX_AD_CALL_BEFORE_REWARD", Tt({
564
564
  userEvent: n
565
565
  }, this.paramsToTrack)), dt() && this.context.track("mmp_ad_impression", {
566
566
  ad_network: (s = (o = this.currentProvider) == null ? void 0 : o.name) != null ? s : "",
@@ -572,7 +572,7 @@ class Rn {
572
572
  r == null || r();
573
573
  }), this.context = e, this.contextInfo = e.getContextInfo();
574
574
  }
575
- notifyAdsEvent(e, i) {
575
+ notifyIframeAdsEvent(e, i) {
576
576
  window.parent && window.parent.postMessage({
577
577
  type: e,
578
578
  data: i
@@ -591,7 +591,7 @@ class Rn {
591
591
  wrapBeforeAd(e) {
592
592
  return () => {
593
593
  var i, n, r, o;
594
- if (this.adsHasResponse = !0, this.context.track("CallBeforeAd", this.paramsToTrack), this.notifyAdsEvent("JOLIBOX_AD_CALL_BEFORE_AD", this.paramsToTrack), !this.isBeforeAdCalled) {
594
+ if (this.adsHasResponse = !0, this.context.track("CallBeforeAd", this.paramsToTrack), this.notifyIframeAdsEvent("JOLIBOX_AD_CALL_BEFORE_AD", this.paramsToTrack), !this.isBeforeAdCalled) {
595
595
  this.isBeforeAdCalled = !0;
596
596
  const s = ae(e);
597
597
  s == null || s(), ((i = this.currentClientParams) == null ? void 0 : i.type) !== "reward" && ((n = this.adIsShowingCallback) == null || n.call(this, !0), dt() && this.context.track("mmp_ad_impression", {
@@ -628,7 +628,7 @@ class Rn {
628
628
  }
629
629
  wrapAfterAd(e) {
630
630
  return () => {
631
- if (this.adsHasResponse = !0, this.context.track("CallAfterAd", this.paramsToTrack), this.notifyAdsEvent("JOLIBOX_AD_CALL_AFTER_AD", this.paramsToTrack), !this.isAfterAdCalled) {
631
+ if (this.adsHasResponse = !0, this.context.track("CallAfterAd", this.paramsToTrack), this.notifyIframeAdsEvent("JOLIBOX_AD_CALL_AFTER_AD", this.paramsToTrack), !this.isAfterAdCalled) {
632
632
  this.isAfterAdCalled = !0;
633
633
  const i = ae(e);
634
634
  i == null || i();
@@ -644,7 +644,7 @@ class Rn {
644
644
  breakName: (o = i.breakName) != null ? o : "",
645
645
  breakFormat: i.breakFormat,
646
646
  breakStatus: i.breakStatus
647
- }), this.notifyAdsEvent("JOLIBOX_AD_CALL_AD_BREAK_DONE", {
647
+ }), this.notifyIframeAdsEvent("JOLIBOX_AD_CALL_AD_BREAK_DONE", {
648
648
  provider: (a = (s = this.currentProvider) == null ? void 0 : s.name) != null ? a : null,
649
649
  breakType: i.breakType,
650
650
  breakName: (d = i.breakName) != null ? d : "",
@@ -713,7 +713,7 @@ class Rn {
713
713
  this.adsHasResponse || (this.context.track("CallAdBreakTimeout", {
714
714
  type: i.type,
715
715
  provider: (d = (a = this.currentProvider) == null ? void 0 : a.name) != null ? d : null
716
- }), this.notifyAdsEvent("JOLIBOX_AD_CALL_AD_BREAK_TIMEOUT", {
716
+ }), this.notifyIframeAdsEvent("JOLIBOX_AD_CALL_AD_BREAK_TIMEOUT", {
717
717
  type: i.type,
718
718
  provider: (c = (l = this.currentProvider) == null ? void 0 : l.name) != null ? c : null
719
719
  }), (u = this.continueCallback) == null || u.call(this, [!0, {
@@ -722,7 +722,7 @@ class Rn {
722
722
  breakFormat: i.type === "reward" ? "reward" : "interstitial",
723
723
  breakStatus: "timeout"
724
724
  }]), (f = this.adIsShowingCallback) == null || f.call(this, !1));
725
- }, 5e3), this.context.track("CallAdBreak", this.paramsToTrack), this.notifyAdsEvent("JOLIBOX_AD_CALL_AD_BREAK", this.paramsToTrack), e.adBreak(s, n), window.JoliTesterBridge && console.log("joli-fullscreen-ad-show");
725
+ }, 5e3), this.context.track("CallAdBreak", this.paramsToTrack), this.notifyIframeAdsEvent("JOLIBOX_AD_CALL_AD_BREAK", this.paramsToTrack), e.adBreak(s, n), window.JoliTesterBridge && console.log("joli-fullscreen-ad-show");
726
726
  });
727
727
  }
728
728
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jolibox/ads",
3
3
  "description": "This project is for integrating Jolibox ads providers",
4
- "version": "1.2.2",
4
+ "version": "1.2.3",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "type": "module",
@@ -12,9 +12,9 @@
12
12
  ],
13
13
  "types": "./dist/index.d.ts",
14
14
  "dependencies": {
15
- "@jolibox/common": "1.2.2",
15
+ "@jolibox/common": "1.2.3",
16
16
  "@emotion/css": "11.13.5",
17
- "@jolibox/types": "1.2.2",
17
+ "@jolibox/types": "1.2.3",
18
18
  "preact": "10.26.4",
19
19
  "@preact/signals": "2.0.4"
20
20
  },