Skip to content

Commit 5418b9e

Browse files
authored
[MAJC-104] Ad collapses on Pocket in the reporting flow (#9)
1 parent d996103 commit 5418b9e

File tree

11 files changed

+28
-24
lines changed

11 files changed

+28
-24
lines changed
Lines changed: 5 additions & 4 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ declare class DefaultLogReporter implements LogReporter {
332332
}
333333
declare const defaultLogReporter: DefaultLogReporter;
334334

335-
type MozAdsLocalizedStringKey = 'ad_image_default_alt' | 'loading_spinner_tooltip' | 'report_ad_button_tooltip' | 'report_form_close_button_tooltip' | 'report_form_select_reason_option_none' | 'report_form_select_reason_option_inappropriate' | 'report_form_select_reason_option_seen_multiple_times' | 'report_form_select_reason_option_not_interested' | 'report_form_submit_button' | 'report_form_title_default' | 'report_form_title_success';
335+
type MozAdsLocalizedStringKey = 'ad_image_default_alt' | 'loading_spinner_tooltip' | 'report_ad_button_tooltip' | 'report_form_close_button_tooltip' | 'report_form_select_reason_option_none' | 'report_form_select_reason_option_inappropriate' | 'report_form_select_reason_option_seen_too_many_times' | 'report_form_select_reason_option_not_interested' | 'report_form_submit_button' | 'report_form_title_default' | 'report_form_title_success';
336336
declare function l(key: MozAdsLocalizedStringKey): string;
337337

338338
declare enum LoggerLevel {

dist/core.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"./chunk-E6ZMCPIE.mjs";import"./chunk-57T3EAOB.mjs";export{w as CLOSE_ICON_SVG,b as DEFAULT_IMPRESSION_TIME_THRESHOLD_MS,x as DEFAULT_IMPRESSION_VIEW_THRESHOLD,r as DEFAULT_SERVICE_ENDPOINT,k as DefaultLogReporter,q as DefaultLogger,s as DefaultMozAdsImpressionObserver,B as FALLBACK_BILLBOARD_SVG,z as FALLBACK_DINO_SVG_FRAGMENT,A as FALLBACK_DONATE_SVG_FRAGMENT,d as FALLBACK_IMPRESSION_ENDPOINT,c as FALLBACK_IMPRESSION_TIME_THRESHOLD,a as FALLBACK_IMPRESSION_VIEW_THRESHOLD,D as FALLBACK_MRECTANGLE_SVG,C as FALLBACK_SKYSCRAPER_SVG,t as FallbackAdURL,M as FetchAdsError,p as FixedSize,e as IABFixedSize,f as IABFixedSizeLookup,g as INSTRUMENT_ENDPOINT,o as IS_BROWSER,i as LOG_EMIT_FLAG_DEFAULT,h as LOG_TO_CONSOLE_FLAG_DEFAULT,n as LoggerLevel,m as NonIABFixedSize,y as REPORT_ICON_SVG,j as SeverityLevel,H as StoreType,O as buildPlacementsRequest,u as defaultImpressionObserver,l as defaultLogReporter,N as fetchAds,I as getItemFromStore,L as getOrGenerateContextId,E as l,P as mapResponseToPlacementsWithContent,F as preloadImage,v as recordClick,K as removeItemFromStore,G as renderPlacement,J as setItemInStore};
1+
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"./chunk-GECI26SK.mjs";import"./chunk-57T3EAOB.mjs";export{w as CLOSE_ICON_SVG,b as DEFAULT_IMPRESSION_TIME_THRESHOLD_MS,x as DEFAULT_IMPRESSION_VIEW_THRESHOLD,r as DEFAULT_SERVICE_ENDPOINT,k as DefaultLogReporter,q as DefaultLogger,s as DefaultMozAdsImpressionObserver,B as FALLBACK_BILLBOARD_SVG,z as FALLBACK_DINO_SVG_FRAGMENT,A as FALLBACK_DONATE_SVG_FRAGMENT,d as FALLBACK_IMPRESSION_ENDPOINT,c as FALLBACK_IMPRESSION_TIME_THRESHOLD,a as FALLBACK_IMPRESSION_VIEW_THRESHOLD,D as FALLBACK_MRECTANGLE_SVG,C as FALLBACK_SKYSCRAPER_SVG,t as FallbackAdURL,M as FetchAdsError,p as FixedSize,e as IABFixedSize,f as IABFixedSizeLookup,g as INSTRUMENT_ENDPOINT,o as IS_BROWSER,i as LOG_EMIT_FLAG_DEFAULT,h as LOG_TO_CONSOLE_FLAG_DEFAULT,n as LoggerLevel,m as NonIABFixedSize,y as REPORT_ICON_SVG,j as SeverityLevel,H as StoreType,O as buildPlacementsRequest,u as defaultImpressionObserver,l as defaultLogReporter,N as fetchAds,I as getItemFromStore,L as getOrGenerateContextId,E as l,P as mapResponseToPlacementsWithContent,F as preloadImage,v as recordClick,K as removeItemFromStore,G as renderPlacement,J as setItemInStore};

dist/iife.global.js

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"use client";import{G as h,N as A,t as m,v as P,w as g}from"./chunk-E6ZMCPIE.mjs";import"./chunk-57T3EAOB.mjs";import{useLayoutEffect as x,useRef as b}from"react";import{createContext as v,useContext as y,useEffect as w,useState as L}from"react";var M;try{M=new m({name:"react.hooks.useMozAdsPlacement"})}catch(e){console.debug(`DefaultLogger for react.hooks.useMozAdsPlacement could not be instantiated: ${e}`)}var f=class{placements={};async getPlacementWithContent(t){let o=this.placements[t.placementId];if(o)return o;try{let r=await A({placements:{[t.placementId]:t}});this.placements={...this.placements,...r}}catch(r){return M?.error(`Unable to fetch ads; ${r.message}`,{type:"placementComponent.adLoad.failure",eventLabel:"ad_load_error",errorId:r?.name}),t.onError?.({error:r}),t}return this.placements[t.placementId]}},R=v(new f),z=({placementId:e,iabContent:t,fixedSize:o,onError:r})=>{let[l,s]=L({placementId:e,iabContent:t,fixedSize:o}),d=y(R),c=async()=>{s(await d.getPlacementWithContent({placementId:e,iabContent:t,fixedSize:o,onError:r}))};return w(()=>{c()},[e]),l};import{jsx as C}from"react/jsx-runtime";var E;try{E=new m({name:"react.components.MozAdsPlacement"})}catch(e){console.debug(`DefaultLogger for react.components.MozAdsPlacement could not be instantiated: ${e}`)}function q({placementId:e,iabContent:t,fixedSize:o,onClick:r,onReport:l,onError:s,onLoad:d}){let{width:c,height:u}=o||{},p={width:c&&`${c}px`,height:u&&`${u}px`};try{let n=z({placementId:e,iabContent:t,fixedSize:o,onError:s}),i=b(null);return x(()=>{i.current&&h(i.current,{placement:n,onClick:a=>{g(n),r?.(a)},onReport:a=>{l?.(a)},onError:a=>{s?.(a)},onLoad:a=>{P.observe(n),d?.(a)}})},[n]),C("div",{ref:i,style:p})}catch(n){try{E?.error(`An unexpected error has occured when rendering ${e}: ${n?.message}`,{type:"placementComponent.render.error",eventLabel:"render_error",placementId:e,errorId:n?.name}),s?.({error:n})}catch{}return C("div",{style:p})}}export{q as MozAdsPlacement,f as MozAdsPlacementContextState,R as mozAdsPlacementContext,z as useMozAdsPlacement};
1+
"use client";import{G as h,N as A,t as m,v as P,w as g}from"./chunk-GECI26SK.mjs";import"./chunk-57T3EAOB.mjs";import{useLayoutEffect as x,useRef as b}from"react";import{createContext as v,useContext as y,useEffect as w,useState as L}from"react";var M;try{M=new m({name:"react.hooks.useMozAdsPlacement"})}catch(e){console.debug(`DefaultLogger for react.hooks.useMozAdsPlacement could not be instantiated: ${e}`)}var f=class{placements={};async getPlacementWithContent(t){let o=this.placements[t.placementId];if(o)return o;try{let r=await A({placements:{[t.placementId]:t}});this.placements={...this.placements,...r}}catch(r){return M?.error(`Unable to fetch ads; ${r.message}`,{type:"placementComponent.adLoad.failure",eventLabel:"ad_load_error",errorId:r?.name}),t.onError?.({error:r}),t}return this.placements[t.placementId]}},R=v(new f),z=({placementId:e,iabContent:t,fixedSize:o,onError:r})=>{let[l,s]=L({placementId:e,iabContent:t,fixedSize:o}),d=y(R),c=async()=>{s(await d.getPlacementWithContent({placementId:e,iabContent:t,fixedSize:o,onError:r}))};return w(()=>{c()},[e]),l};import{jsx as C}from"react/jsx-runtime";var E;try{E=new m({name:"react.components.MozAdsPlacement"})}catch(e){console.debug(`DefaultLogger for react.components.MozAdsPlacement could not be instantiated: ${e}`)}function q({placementId:e,iabContent:t,fixedSize:o,onClick:r,onReport:l,onError:s,onLoad:d}){let{width:c,height:u}=o||{},p={width:c&&`${c}px`,height:u&&`${u}px`};try{let n=z({placementId:e,iabContent:t,fixedSize:o,onError:s}),i=b(null);return x(()=>{i.current&&h(i.current,{placement:n,onClick:a=>{g(n),r?.(a)},onReport:a=>{l?.(a)},onError:a=>{s?.(a)},onLoad:a=>{P.observe(n),d?.(a)}})},[n]),C("div",{ref:i,style:p})}catch(n){try{E?.error(`An unexpected error has occured when rendering ${e}: ${n?.message}`,{type:"placementComponent.render.error",eventLabel:"render_error",placementId:e,errorId:n?.name}),s?.({error:n})}catch{}return C("div",{style:p})}}export{q as MozAdsPlacement,f as MozAdsPlacementContextState,R as mozAdsPlacementContext,z as useMozAdsPlacement};

0 commit comments

Comments
 (0)