react-native-google-mobile-ads 8.1.2 → 8.2.1

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.
Files changed (283) hide show
  1. package/__tests__/interstitial.test.ts +60 -0
  2. package/docs/european-user-consent.mdx +19 -0
  3. package/docs/index.mdx +43 -1
  4. package/ios_config.sh +1 -1
  5. package/jest.setup.ts +3 -0
  6. package/lib/commonjs/AdEventType.js +2 -1
  7. package/lib/commonjs/AdEventType.js.map +1 -1
  8. package/lib/commonjs/AdsConsent.js.map +1 -1
  9. package/lib/commonjs/AdsConsentDebugGeography.js.map +1 -1
  10. package/lib/commonjs/AdsConsentPurposes.js +2 -1
  11. package/lib/commonjs/AdsConsentPurposes.js.map +1 -1
  12. package/lib/commonjs/AdsConsentSpecialFeatures.js +2 -1
  13. package/lib/commonjs/AdsConsentSpecialFeatures.js.map +1 -1
  14. package/lib/commonjs/AdsConsentStatus.js.map +1 -1
  15. package/lib/commonjs/BannerAdSize.js +2 -1
  16. package/lib/commonjs/BannerAdSize.js.map +1 -1
  17. package/lib/commonjs/GAMAdEventType.js +2 -1
  18. package/lib/commonjs/GAMAdEventType.js.map +1 -1
  19. package/lib/commonjs/MaxAdContentRating.js +2 -1
  20. package/lib/commonjs/MaxAdContentRating.js.map +1 -1
  21. package/lib/commonjs/MobileAds.js.map +1 -1
  22. package/lib/commonjs/RewardedAdEventType.js +2 -1
  23. package/lib/commonjs/RewardedAdEventType.js.map +1 -1
  24. package/lib/commonjs/TestIds.js.map +1 -1
  25. package/lib/commonjs/ads/AppOpenAd.js.map +1 -1
  26. package/lib/commonjs/ads/BannerAd.js.map +1 -1
  27. package/lib/commonjs/ads/BaseAd.js.map +1 -1
  28. package/lib/commonjs/ads/GAMBannerAd.js.map +1 -1
  29. package/lib/commonjs/ads/GAMInterstitialAd.js.map +1 -1
  30. package/lib/commonjs/ads/InterstitialAd.js.map +1 -1
  31. package/lib/commonjs/ads/MobileAd.js +4 -0
  32. package/lib/commonjs/ads/MobileAd.js.map +1 -1
  33. package/lib/commonjs/ads/RewardedAd.js.map +1 -1
  34. package/lib/commonjs/ads/RewardedInterstitialAd.js.map +1 -1
  35. package/lib/commonjs/common/Base64.js.map +1 -1
  36. package/lib/commonjs/common/MutatableParams.js.map +1 -1
  37. package/lib/commonjs/common/ReferenceBase.js.map +1 -1
  38. package/lib/commonjs/common/deeps.js.map +1 -1
  39. package/lib/commonjs/common/id.js.map +1 -1
  40. package/lib/commonjs/common/index.js.map +1 -1
  41. package/lib/commonjs/common/path.js.map +1 -1
  42. package/lib/commonjs/common/promise.js.map +1 -1
  43. package/lib/commonjs/common/serialize.js.map +1 -1
  44. package/lib/commonjs/common/validate.js.map +1 -1
  45. package/lib/commonjs/declarations.d.js.map +1 -1
  46. package/lib/commonjs/hooks/useAppOpenAd.js.map +1 -1
  47. package/lib/commonjs/hooks/useFullScreenAd.js.map +1 -1
  48. package/lib/commonjs/hooks/useInterstitialAd.js.map +1 -1
  49. package/lib/commonjs/hooks/useRewardedAd.js.map +1 -1
  50. package/lib/commonjs/hooks/useRewardedInterstitialAd.js.map +1 -1
  51. package/lib/commonjs/index.js.map +1 -1
  52. package/lib/commonjs/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -1
  53. package/lib/commonjs/internal/Module.js.map +1 -1
  54. package/lib/commonjs/internal/NativeError.js.map +1 -1
  55. package/lib/commonjs/internal/SharedEventEmitter.js.map +1 -1
  56. package/lib/commonjs/internal/index.js.map +1 -1
  57. package/lib/commonjs/internal/registry/nativeModule.js +0 -20
  58. package/lib/commonjs/internal/registry/nativeModule.js.map +1 -1
  59. package/lib/commonjs/types/AdEventListener.js.map +1 -1
  60. package/lib/commonjs/types/AdEventsListener.js.map +1 -1
  61. package/lib/commonjs/types/AdShowOptions.js.map +1 -1
  62. package/lib/commonjs/types/AdStates.js.map +1 -1
  63. package/lib/commonjs/types/AdapterStatus.js +4 -3
  64. package/lib/commonjs/types/AdapterStatus.js.map +1 -1
  65. package/lib/commonjs/types/AdsConsent.interface.js.map +1 -1
  66. package/lib/commonjs/types/AppEvent.js.map +1 -1
  67. package/lib/commonjs/types/BannerAdProps.js.map +1 -1
  68. package/lib/commonjs/types/GoogleMobileAdsNativeModule.js.map +1 -1
  69. package/lib/commonjs/types/MobileAd.interface.js.map +1 -1
  70. package/lib/commonjs/types/MobileAdsModule.interface.js.map +1 -1
  71. package/lib/commonjs/types/Module.interface.js.map +1 -1
  72. package/lib/commonjs/types/RequestConfiguration.js.map +1 -1
  73. package/lib/commonjs/types/RequestOptions.js.map +1 -1
  74. package/lib/commonjs/types/RewardedAdReward.js.map +1 -1
  75. package/lib/commonjs/types/index.js.map +1 -1
  76. package/lib/commonjs/validateAdRequestConfiguration.js.map +1 -1
  77. package/lib/commonjs/validateAdRequestOptions.js.map +1 -1
  78. package/lib/commonjs/validateAdShowOptions.js.map +1 -1
  79. package/lib/commonjs/version.js +1 -1
  80. package/lib/commonjs/version.js.map +1 -1
  81. package/lib/module/AdEventType.js.map +1 -1
  82. package/lib/module/AdsConsent.js.map +1 -1
  83. package/lib/module/AdsConsentDebugGeography.js.map +1 -1
  84. package/lib/module/AdsConsentPurposes.js.map +1 -1
  85. package/lib/module/AdsConsentSpecialFeatures.js.map +1 -1
  86. package/lib/module/AdsConsentStatus.js.map +1 -1
  87. package/lib/module/BannerAdSize.js.map +1 -1
  88. package/lib/module/GAMAdEventType.js.map +1 -1
  89. package/lib/module/MaxAdContentRating.js.map +1 -1
  90. package/lib/module/MobileAds.js.map +1 -1
  91. package/lib/module/RewardedAdEventType.js.map +1 -1
  92. package/lib/module/TestIds.js.map +1 -1
  93. package/lib/module/ads/AppOpenAd.js.map +1 -1
  94. package/lib/module/ads/BannerAd.js.map +1 -1
  95. package/lib/module/ads/BaseAd.js.map +1 -1
  96. package/lib/module/ads/GAMBannerAd.js.map +1 -1
  97. package/lib/module/ads/GAMInterstitialAd.js.map +1 -1
  98. package/lib/module/ads/InterstitialAd.js.map +1 -1
  99. package/lib/module/ads/MobileAd.js +4 -0
  100. package/lib/module/ads/MobileAd.js.map +1 -1
  101. package/lib/module/ads/RewardedAd.js.map +1 -1
  102. package/lib/module/ads/RewardedInterstitialAd.js.map +1 -1
  103. package/lib/module/common/Base64.js.map +1 -1
  104. package/lib/module/common/MutatableParams.js.map +1 -1
  105. package/lib/module/common/ReferenceBase.js.map +1 -1
  106. package/lib/module/common/deeps.js.map +1 -1
  107. package/lib/module/common/id.js.map +1 -1
  108. package/lib/module/common/index.js.map +1 -1
  109. package/lib/module/common/path.js.map +1 -1
  110. package/lib/module/common/promise.js.map +1 -1
  111. package/lib/module/common/serialize.js.map +1 -1
  112. package/lib/module/common/validate.js.map +1 -1
  113. package/lib/module/declarations.d.js.map +1 -1
  114. package/lib/module/hooks/useAppOpenAd.js.map +1 -1
  115. package/lib/module/hooks/useFullScreenAd.js.map +1 -1
  116. package/lib/module/hooks/useInterstitialAd.js.map +1 -1
  117. package/lib/module/hooks/useRewardedAd.js.map +1 -1
  118. package/lib/module/hooks/useRewardedInterstitialAd.js.map +1 -1
  119. package/lib/module/index.js.map +1 -1
  120. package/lib/module/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -1
  121. package/lib/module/internal/Module.js.map +1 -1
  122. package/lib/module/internal/NativeError.js.map +1 -1
  123. package/lib/module/internal/SharedEventEmitter.js.map +1 -1
  124. package/lib/module/internal/index.js.map +1 -1
  125. package/lib/module/internal/registry/nativeModule.js +0 -19
  126. package/lib/module/internal/registry/nativeModule.js.map +1 -1
  127. package/lib/module/types/AdEventListener.js.map +1 -1
  128. package/lib/module/types/AdEventsListener.js.map +1 -1
  129. package/lib/module/types/AdShowOptions.js.map +1 -1
  130. package/lib/module/types/AdStates.js.map +1 -1
  131. package/lib/module/types/AdapterStatus.js.map +1 -1
  132. package/lib/module/types/AdsConsent.interface.js.map +1 -1
  133. package/lib/module/types/AppEvent.js.map +1 -1
  134. package/lib/module/types/BannerAdProps.js.map +1 -1
  135. package/lib/module/types/GoogleMobileAdsNativeModule.js.map +1 -1
  136. package/lib/module/types/MobileAd.interface.js.map +1 -1
  137. package/lib/module/types/MobileAdsModule.interface.js.map +1 -1
  138. package/lib/module/types/Module.interface.js.map +1 -1
  139. package/lib/module/types/RequestConfiguration.js.map +1 -1
  140. package/lib/module/types/RequestOptions.js.map +1 -1
  141. package/lib/module/types/RewardedAdReward.js.map +1 -1
  142. package/lib/module/types/index.js.map +1 -1
  143. package/lib/module/validateAdRequestConfiguration.js.map +1 -1
  144. package/lib/module/validateAdRequestOptions.js.map +1 -1
  145. package/lib/module/validateAdShowOptions.js.map +1 -1
  146. package/lib/module/version.js +1 -1
  147. package/lib/module/version.js.map +1 -1
  148. package/lib/typescript/AdEventType.d.ts +1 -0
  149. package/lib/typescript/AdEventType.d.ts.map +1 -0
  150. package/lib/typescript/AdsConsent.d.ts +1 -0
  151. package/lib/typescript/AdsConsent.d.ts.map +1 -0
  152. package/lib/typescript/AdsConsentDebugGeography.d.ts +1 -0
  153. package/lib/typescript/AdsConsentDebugGeography.d.ts.map +1 -0
  154. package/lib/typescript/AdsConsentPurposes.d.ts +1 -0
  155. package/lib/typescript/AdsConsentPurposes.d.ts.map +1 -0
  156. package/lib/typescript/AdsConsentSpecialFeatures.d.ts +1 -0
  157. package/lib/typescript/AdsConsentSpecialFeatures.d.ts.map +1 -0
  158. package/lib/typescript/AdsConsentStatus.d.ts +1 -0
  159. package/lib/typescript/AdsConsentStatus.d.ts.map +1 -0
  160. package/lib/typescript/BannerAdSize.d.ts +1 -0
  161. package/lib/typescript/BannerAdSize.d.ts.map +1 -0
  162. package/lib/typescript/GAMAdEventType.d.ts +1 -0
  163. package/lib/typescript/GAMAdEventType.d.ts.map +1 -0
  164. package/lib/typescript/MaxAdContentRating.d.ts +1 -0
  165. package/lib/typescript/MaxAdContentRating.d.ts.map +1 -0
  166. package/lib/typescript/MobileAds.d.ts +1 -0
  167. package/lib/typescript/MobileAds.d.ts.map +1 -0
  168. package/lib/typescript/RewardedAdEventType.d.ts +1 -0
  169. package/lib/typescript/RewardedAdEventType.d.ts.map +1 -0
  170. package/lib/typescript/TestIds.d.ts +1 -0
  171. package/lib/typescript/TestIds.d.ts.map +1 -0
  172. package/lib/typescript/ads/AppOpenAd.d.ts +1 -0
  173. package/lib/typescript/ads/AppOpenAd.d.ts.map +1 -0
  174. package/lib/typescript/ads/BannerAd.d.ts +1 -0
  175. package/lib/typescript/ads/BannerAd.d.ts.map +1 -0
  176. package/lib/typescript/ads/BaseAd.d.ts +1 -0
  177. package/lib/typescript/ads/BaseAd.d.ts.map +1 -0
  178. package/lib/typescript/ads/GAMBannerAd.d.ts +1 -0
  179. package/lib/typescript/ads/GAMBannerAd.d.ts.map +1 -0
  180. package/lib/typescript/ads/GAMInterstitialAd.d.ts +1 -0
  181. package/lib/typescript/ads/GAMInterstitialAd.d.ts.map +1 -0
  182. package/lib/typescript/ads/InterstitialAd.d.ts +1 -0
  183. package/lib/typescript/ads/InterstitialAd.d.ts.map +1 -0
  184. package/lib/typescript/ads/MobileAd.d.ts +1 -0
  185. package/lib/typescript/ads/MobileAd.d.ts.map +1 -0
  186. package/lib/typescript/ads/RewardedAd.d.ts +1 -0
  187. package/lib/typescript/ads/RewardedAd.d.ts.map +1 -0
  188. package/lib/typescript/ads/RewardedInterstitialAd.d.ts +1 -0
  189. package/lib/typescript/ads/RewardedInterstitialAd.d.ts.map +1 -0
  190. package/lib/typescript/common/Base64.d.ts +2 -0
  191. package/lib/typescript/common/Base64.d.ts.map +1 -0
  192. package/lib/typescript/common/MutatableParams.d.ts +1 -0
  193. package/lib/typescript/common/MutatableParams.d.ts.map +1 -0
  194. package/lib/typescript/common/ReferenceBase.d.ts +1 -0
  195. package/lib/typescript/common/ReferenceBase.d.ts.map +1 -0
  196. package/lib/typescript/common/deeps.d.ts +1 -0
  197. package/lib/typescript/common/deeps.d.ts.map +1 -0
  198. package/lib/typescript/common/id.d.ts +1 -0
  199. package/lib/typescript/common/id.d.ts.map +1 -0
  200. package/lib/typescript/common/index.d.ts +1 -0
  201. package/lib/typescript/common/index.d.ts.map +1 -0
  202. package/lib/typescript/common/path.d.ts +1 -0
  203. package/lib/typescript/common/path.d.ts.map +1 -0
  204. package/lib/typescript/common/promise.d.ts +1 -0
  205. package/lib/typescript/common/promise.d.ts.map +1 -0
  206. package/lib/typescript/common/serialize.d.ts +1 -0
  207. package/lib/typescript/common/serialize.d.ts.map +1 -0
  208. package/lib/typescript/common/validate.d.ts +1 -0
  209. package/lib/typescript/common/validate.d.ts.map +1 -0
  210. package/lib/typescript/hooks/useAppOpenAd.d.ts +1 -0
  211. package/lib/typescript/hooks/useAppOpenAd.d.ts.map +1 -0
  212. package/lib/typescript/hooks/useFullScreenAd.d.ts +1 -0
  213. package/lib/typescript/hooks/useFullScreenAd.d.ts.map +1 -0
  214. package/lib/typescript/hooks/useInterstitialAd.d.ts +1 -0
  215. package/lib/typescript/hooks/useInterstitialAd.d.ts.map +1 -0
  216. package/lib/typescript/hooks/useRewardedAd.d.ts +1 -0
  217. package/lib/typescript/hooks/useRewardedAd.d.ts.map +1 -0
  218. package/lib/typescript/hooks/useRewardedInterstitialAd.d.ts +1 -0
  219. package/lib/typescript/hooks/useRewardedInterstitialAd.d.ts.map +1 -0
  220. package/lib/typescript/index.d.ts +2 -1
  221. package/lib/typescript/index.d.ts.map +1 -0
  222. package/lib/typescript/internal/GoogleMobileAdsNativeEventEmitter.d.ts +1 -0
  223. package/lib/typescript/internal/GoogleMobileAdsNativeEventEmitter.d.ts.map +1 -0
  224. package/lib/typescript/internal/Module.d.ts +1 -0
  225. package/lib/typescript/internal/Module.d.ts.map +1 -0
  226. package/lib/typescript/internal/NativeError.d.ts +1 -0
  227. package/lib/typescript/internal/NativeError.d.ts.map +1 -0
  228. package/lib/typescript/internal/SharedEventEmitter.d.ts +1 -0
  229. package/lib/typescript/internal/SharedEventEmitter.d.ts.map +1 -0
  230. package/lib/typescript/internal/index.d.ts +1 -0
  231. package/lib/typescript/internal/index.d.ts.map +1 -0
  232. package/lib/typescript/internal/registry/nativeModule.d.ts +1 -6
  233. package/lib/typescript/internal/registry/nativeModule.d.ts.map +1 -0
  234. package/lib/typescript/types/AdEventListener.d.ts +1 -0
  235. package/lib/typescript/types/AdEventListener.d.ts.map +1 -0
  236. package/lib/typescript/types/AdEventsListener.d.ts +1 -0
  237. package/lib/typescript/types/AdEventsListener.d.ts.map +1 -0
  238. package/lib/typescript/types/AdShowOptions.d.ts +1 -0
  239. package/lib/typescript/types/AdShowOptions.d.ts.map +1 -0
  240. package/lib/typescript/types/AdStates.d.ts +1 -0
  241. package/lib/typescript/types/AdStates.d.ts.map +1 -0
  242. package/lib/typescript/types/AdapterStatus.d.ts +1 -0
  243. package/lib/typescript/types/AdapterStatus.d.ts.map +1 -0
  244. package/lib/typescript/types/AdsConsent.interface.d.ts +1 -0
  245. package/lib/typescript/types/AdsConsent.interface.d.ts.map +1 -0
  246. package/lib/typescript/types/AppEvent.d.ts +1 -0
  247. package/lib/typescript/types/AppEvent.d.ts.map +1 -0
  248. package/lib/typescript/types/BannerAdProps.d.ts +1 -0
  249. package/lib/typescript/types/BannerAdProps.d.ts.map +1 -0
  250. package/lib/typescript/types/GoogleMobileAdsNativeModule.d.ts +1 -0
  251. package/lib/typescript/types/GoogleMobileAdsNativeModule.d.ts.map +1 -0
  252. package/lib/typescript/types/MobileAd.interface.d.ts +1 -0
  253. package/lib/typescript/types/MobileAd.interface.d.ts.map +1 -0
  254. package/lib/typescript/types/MobileAdsModule.interface.d.ts +1 -0
  255. package/lib/typescript/types/MobileAdsModule.interface.d.ts.map +1 -0
  256. package/lib/typescript/types/Module.interface.d.ts +1 -0
  257. package/lib/typescript/types/Module.interface.d.ts.map +1 -0
  258. package/lib/typescript/types/RequestConfiguration.d.ts +1 -0
  259. package/lib/typescript/types/RequestConfiguration.d.ts.map +1 -0
  260. package/lib/typescript/types/RequestOptions.d.ts +1 -0
  261. package/lib/typescript/types/RequestOptions.d.ts.map +1 -0
  262. package/lib/typescript/types/RewardedAdReward.d.ts +1 -0
  263. package/lib/typescript/types/RewardedAdReward.d.ts.map +1 -0
  264. package/lib/typescript/types/index.d.ts +1 -0
  265. package/lib/typescript/types/index.d.ts.map +1 -0
  266. package/lib/typescript/validateAdRequestConfiguration.d.ts +1 -0
  267. package/lib/typescript/validateAdRequestConfiguration.d.ts.map +1 -0
  268. package/lib/typescript/validateAdRequestOptions.d.ts +1 -0
  269. package/lib/typescript/validateAdRequestOptions.d.ts.map +1 -0
  270. package/lib/typescript/validateAdShowOptions.d.ts +1 -0
  271. package/lib/typescript/validateAdShowOptions.d.ts.map +1 -0
  272. package/lib/typescript/version.d.ts +2 -1
  273. package/lib/typescript/version.d.ts.map +1 -0
  274. package/package.json +18 -19
  275. package/src/ads/MobileAd.ts +5 -0
  276. package/src/internal/registry/nativeModule.ts +0 -23
  277. package/src/version.ts +1 -1
  278. package/lib/commonjs/internal/constants.js +0 -30
  279. package/lib/commonjs/internal/constants.js.map +0 -1
  280. package/lib/module/internal/constants.js +0 -21
  281. package/lib/module/internal/constants.js.map +0 -1
  282. package/lib/typescript/internal/constants.d.ts +0 -3
  283. package/src/internal/constants.ts +0 -43
@@ -1,4 +1,5 @@
1
1
  import { AdEventType, InterstitialAd } from '../src';
2
+ import { NativeModules } from 'react-native';
2
3
 
3
4
  describe('Google Mobile Ads Interstitial', function () {
4
5
  describe('createForAdRequest', function () {
@@ -24,6 +25,65 @@ describe('Google Mobile Ads Interstitial', function () {
24
25
  expect(i.loaded).toEqual(false);
25
26
  });
26
27
 
28
+ describe('load()', () => {
29
+ afterEach(() => {
30
+ jest.clearAllMocks();
31
+ });
32
+
33
+ it('does call native load method', () => {
34
+ const ad = InterstitialAd.createForAdRequest('abc');
35
+
36
+ ad.load();
37
+ expect(NativeModules.RNGoogleMobileAdsModule.interstitialLoad).toBeCalledTimes(1);
38
+ });
39
+
40
+ it('does nothing if ad currently loading', () => {
41
+ const ad = InterstitialAd.createForAdRequest('abc');
42
+
43
+ ad.load();
44
+ expect(NativeModules.RNGoogleMobileAdsModule.interstitialLoad).toBeCalledTimes(1);
45
+
46
+ ad.load();
47
+ expect(NativeModules.RNGoogleMobileAdsModule.interstitialLoad).toBeCalledTimes(1);
48
+ });
49
+
50
+ it('does nothing if ad is already loaded', () => {
51
+ const ad = InterstitialAd.createForAdRequest('abc');
52
+
53
+ // @ts-ignore
54
+ ad._handleAdEvent({ body: { type: AdEventType.LOADED } });
55
+
56
+ ad.load();
57
+ expect(NativeModules.RNGoogleMobileAdsModule.interstitialLoad).not.toBeCalled();
58
+ });
59
+
60
+ it('can be called again after ad was closed', () => {
61
+ const ad = InterstitialAd.createForAdRequest('abc');
62
+
63
+ ad.load();
64
+ expect(NativeModules.RNGoogleMobileAdsModule.interstitialLoad).toBeCalledTimes(1);
65
+
66
+ // @ts-ignore
67
+ ad._handleAdEvent({ body: { type: AdEventType.CLOSED } });
68
+
69
+ ad.load();
70
+ expect(NativeModules.RNGoogleMobileAdsModule.interstitialLoad).toBeCalledTimes(2);
71
+ });
72
+
73
+ it('can be called again after ad failed to load', () => {
74
+ const ad = InterstitialAd.createForAdRequest('abc');
75
+
76
+ ad.load();
77
+ expect(NativeModules.RNGoogleMobileAdsModule.interstitialLoad).toBeCalledTimes(1);
78
+
79
+ // @ts-ignore
80
+ ad._handleAdEvent({ body: { type: AdEventType.ERROR } });
81
+
82
+ ad.load();
83
+ expect(NativeModules.RNGoogleMobileAdsModule.interstitialLoad).toBeCalledTimes(2);
84
+ });
85
+ });
86
+
27
87
  describe('show', function () {
28
88
  it('throws if showing before loaded', function () {
29
89
  const i = InterstitialAd.createForAdRequest('abc');
@@ -27,6 +27,25 @@ To setup and configure ads consent collection, first of all:
27
27
  ```
28
28
  -keep class com.google.android.gms.internal.consent_sdk.** { *; }
29
29
  ```
30
+ - For Expo users, add extraProguardRules property to `app.json` file following this guide [Expo](https://docs.expo.dev/versions/latest/sdk/build-properties/#pluginconfigtypeandroid):
31
+ ```json
32
+ {
33
+ "expo": {
34
+ "plugins": [
35
+ [
36
+ "expo-build-properties",
37
+ {
38
+ "android": {
39
+ "extraProguardRules": "-keep class com.google.android.gms.internal.consent_sdk.** { *; }"
40
+ },
41
+ }
42
+ ]
43
+ ]
44
+ }
45
+ }
46
+ ```
47
+ You'll need to generate a new development build before using it.
48
+
30
49
 
31
50
  ### Delaying app measurement
32
51
 
package/docs/index.mdx CHANGED
@@ -9,7 +9,27 @@ yarn add react-native-google-mobile-ads
9
9
 
10
10
  ## Optionally configure iOS static frameworks
11
11
 
12
- On iOS if you need to use static frameworks (that is, `use_frameworks!` in your `Podfile`) you must add the variable `$RNGoogleMobileAdsAsStaticFramework = true` to the targets in your `Podfile`. You may need this if you use this module in combination with react-native-firebase v15 and higher since it requires `use_frameworks!`.
12
+ On iOS if you need to use static frameworks (that is, `use_frameworks! :linkage => :static` in your `Podfile`) you must add the variable `$RNGoogleMobileAdsAsStaticFramework = true` to the targets in your `Podfile`. You may need this if you use this module in combination with react-native-firebase v15 and higher since it requires `use_frameworks!`.
13
+
14
+ Expo users may enable static frameworks by using the `expo-build-properties` plugin.
15
+ To do so [follow the official `expo-build-properties` installation instructions](https://docs.expo.dev/versions/latest/sdk/build-properties/) and merge the following code into your `app.json` file:
16
+
17
+ ```json
18
+ {
19
+ "expo": {
20
+ "plugins": [
21
+ [
22
+ "expo-build-properties",
23
+ {
24
+ "ios": {
25
+ "useFrameworks": "static"
26
+ }
27
+ }
28
+ ]
29
+ ]
30
+ }
31
+ }
32
+ ```
13
33
 
14
34
  ## What does it do
15
35
 
@@ -62,6 +82,22 @@ Within the root of your React Native project, open the `app.json` file and add t
62
82
  }
63
83
  ```
64
84
 
85
+ If you're an expo user, make sure the `react-native-google-mobile-ads` block is outside of the `expo` block!
86
+ It should look like this:
87
+
88
+ ```json
89
+ // <project-root>/app.json
90
+ {
91
+ "expo": {
92
+ // ...
93
+ },
94
+ "react-native-google-mobile-ads": {
95
+ "android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
96
+ "ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
97
+ }
98
+ }
99
+ ```
100
+
65
101
  For the changes to take effect, rebuild your project:
66
102
 
67
103
  ```bash
@@ -71,6 +107,12 @@ npx react-native run-ios
71
107
 
72
108
  # For Android
73
109
  npx react-native run-android
110
+
111
+ # For expo users not using EAS
112
+ npx expo prebuild
113
+
114
+ # For expo users using EAS
115
+ npx eas-cli build --profile development
74
116
  ```
75
117
 
76
118
  ### Configure outbound requests
package/ios_config.sh CHANGED
@@ -126,7 +126,7 @@ for i in "${!_PLIST_ENTRY_KEYS[@]}"; do
126
126
  done
127
127
 
128
128
  if ! [[ -f "${_TARGET_PLIST}" ]]; then
129
- echo "error: unable to locate Info.plist to set properties. App will crash without GADApplicationIdentier set."
129
+ echo "error: unable to locate Info.plist to set properties. App will crash without GADApplicationIdentifier set."
130
130
  exit 1
131
131
  fi
132
132
 
package/jest.setup.ts CHANGED
@@ -12,12 +12,15 @@ jest.doMock('react-native', () => {
12
12
  RNAppModule: {
13
13
  addListener: jest.fn(),
14
14
  removeListeners: jest.fn(),
15
+ eventsAddListener: jest.fn(),
16
+ eventsNotifyReady: jest.fn(),
15
17
  },
16
18
  RNGoogleMobileAdsModule: {
17
19
  addListener: jest.fn(),
18
20
  removeListeners: jest.fn(),
19
21
  eventsAddListener: jest.fn(),
20
22
  eventsNotifyReady: jest.fn(),
23
+ interstitialLoad: jest.fn(),
21
24
  },
22
25
  RNGoogleMobileAdsInterstitialModule: {},
23
26
  RNGoogleMobileAdsRewardedModule: {},
@@ -19,7 +19,8 @@ exports.AdEventType = void 0;
19
19
  * See the License for the specific language governing permissions and
20
20
  * limitations under the License.
21
21
  *
22
- */let AdEventType;
22
+ */
23
+ let AdEventType;
23
24
  exports.AdEventType = AdEventType;
24
25
  (function (AdEventType) {
25
26
  AdEventType["LOADED"] = "loaded";
@@ -1 +1 @@
1
- {"version":3,"names":["AdEventType"],"sources":["AdEventType.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport enum AdEventType {\n /**\n * When an ad has loaded. At this point, the ad is ready to be shown to the user.\n *\n * #### Example\n *\n * ```js\n * import { AdEventType } from 'react-native-google-mobile-ads';\n *\n * advert.addEventListener(AdEventType.LOADED, () => {\n * advert.show();\n * });\n * ```\n */\n LOADED = 'loaded',\n\n /**\n * The ad has thrown an error. See the error parameter the listener callback for more information.\n *\n * #### Example\n *\n * ```js\n * import { AdEventType } from 'react-native-google-mobile-ads';\n *\n * advert.addEventListener(AdEventType.ERROR, (error) => {\n * console.log('Ad error:', error);\n * });\n * ```\n */\n ERROR = 'error',\n\n /**\n * The ad opened and is currently visible to the user. This event is fired after the `show()`\n * method has been called.\n */\n OPENED = 'opened',\n\n /**\n * The user clicked the advert.\n */\n CLICKED = 'clicked',\n\n /**\n * The user closed the ad and has returned back to your application.\n */\n CLOSED = 'closed',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAfA,IAiBYA,WAAW;AAAA;AAAA,WAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,2BAAXA,WAAW"}
1
+ {"version":3,"names":["AdEventType"],"sourceRoot":"../../src","sources":["AdEventType.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA,IAiBYA,WAAW;AAAA;AAAA,WAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,2BAAXA,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"names":["native","NativeModules","RNGoogleMobileAdsConsentModule","AdsConsent","requestInfoUpdate","options","isObject","Error","isPropertySet","debugGeography","AdsConsentDebugGeography","DISABLED","EEA","NOT_EEA","isBoolean","tagForUnderAgeOfConsent","isArray","testDeviceIdentifiers","deviceId","isString","showForm","reset","getTCString","getTCModel","tcString","TCString","decode","getUserChoices","tcModel","e","TCModel","__DEV__","console","warn","activelyScanDeviceCharacteristicsForIdentification","specialFeatureOptins","has","AdsConsentSpecialFeatures","ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION","applyMarketResearchToGenerateAudienceInsights","purposeConsents","AdsConsentPurposes","APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS","createAPersonalisedAdsProfile","CREATE_A_PERSONALISED_ADS_PROFILE","createAPersonalisedContentProfile","developAndImproveProducts","DEVELOP_AND_IMPROVE_PRODUCTS","measureAdPerformance","MEASURE_AD_PERFORMANCE","measureContentPerformance","MEASURE_CONTENT_PERFORMANCE","selectBasicAds","SELECT_BASIC_ADS","selectPersonalisedAds","SELECT_PERSONALISED_ADS","selectPersonalisedContent","SELECT_PERSONALISED_CONTENT","storeAndAccessInformationOnDevice","STORE_AND_ACCESS_INFORMATION_ON_DEVICE","usePreciseGeolocationData","USE_PRECISE_GEOLOCATION_DATA"],"sources":["AdsConsent.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { TCModel, TCString } from '@iabtcf/core';\nimport { NativeModules } from 'react-native';\nimport { AdsConsentDebugGeography } from './AdsConsentDebugGeography';\nimport { AdsConsentPurposes } from './AdsConsentPurposes';\nimport { AdsConsentSpecialFeatures } from './AdsConsentSpecialFeatures';\nimport { isPropertySet, isArray, isBoolean, isObject, isString } from './common';\nimport {\n AdsConsentFormResult,\n AdsConsentInfo,\n AdsConsentInfoOptions,\n AdsConsentInterface,\n AdsConsentUserChoices,\n} from './types/AdsConsent.interface';\n\nconst native = NativeModules.RNGoogleMobileAdsConsentModule;\n\nexport const AdsConsent: AdsConsentInterface = {\n requestInfoUpdate(options: AdsConsentInfoOptions = {}): Promise<AdsConsentInfo> {\n if (!isObject(options)) {\n throw new Error(\"AdsConsent.requestInfoUpdate(*) 'options' expected an object value.\");\n }\n\n if (\n isPropertySet(options, 'debugGeography') &&\n options.debugGeography !== AdsConsentDebugGeography.DISABLED &&\n options.debugGeography !== AdsConsentDebugGeography.EEA &&\n options.debugGeography !== AdsConsentDebugGeography.NOT_EEA\n ) {\n throw new Error(\n \"AdsConsent.requestInfoUpdate(*) 'options.debugGeography' expected one of AdsConsentDebugGeography.DISABLED, AdsConsentDebugGeography.EEA or AdsConsentDebugGeography.NOT_EEA.\",\n );\n }\n\n if (\n isPropertySet(options, 'tagForUnderAgeOfConsent') &&\n !isBoolean(options.tagForUnderAgeOfConsent)\n ) {\n throw new Error(\n \"AdsConsent.requestInfoUpdate(*) 'options.tagForUnderAgeOfConsent' expected a boolean value.\",\n );\n }\n\n if (isPropertySet(options, 'testDeviceIdentifiers')) {\n if (!isArray(options.testDeviceIdentifiers)) {\n throw new Error(\n \"AdsConsent.requestInfoUpdate(*) 'options.testDeviceIdentifiers' expected an array of string values.\",\n );\n }\n\n for (const deviceId of options.testDeviceIdentifiers ?? []) {\n if (!isString(deviceId)) {\n throw new Error(\n \"AdsConsent.requestInfoUpdate(*) 'options.testDeviceIdentifiers' expected an array of string values.\",\n );\n }\n }\n }\n\n return native.requestInfoUpdate(options);\n },\n\n showForm(): Promise<AdsConsentFormResult> {\n return native.showForm();\n },\n\n reset(): void {\n return native.reset();\n },\n\n getTCString(): Promise<string> {\n return native.getTCString();\n },\n\n async getTCModel(): Promise<TCModel> {\n const tcString = await native.getTCString();\n return TCString.decode(tcString);\n },\n\n async getUserChoices(): Promise<AdsConsentUserChoices> {\n const tcString = await native.getTCString();\n\n let tcModel: TCModel;\n\n try {\n tcModel = TCString.decode(tcString);\n } catch (e) {\n tcModel = new TCModel();\n\n if (__DEV__) {\n // eslint-disable-next-line no-console\n console.warn(`Failed to decode tcString ${tcString}:`, e);\n }\n }\n\n return {\n activelyScanDeviceCharacteristicsForIdentification: tcModel.specialFeatureOptins.has(\n AdsConsentSpecialFeatures.ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION,\n ),\n applyMarketResearchToGenerateAudienceInsights: tcModel.purposeConsents.has(\n AdsConsentPurposes.APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS,\n ),\n createAPersonalisedAdsProfile: tcModel.purposeConsents.has(\n AdsConsentPurposes.CREATE_A_PERSONALISED_ADS_PROFILE,\n ),\n createAPersonalisedContentProfile: tcModel.purposeConsents.has(\n AdsConsentPurposes.CREATE_A_PERSONALISED_ADS_PROFILE,\n ),\n developAndImproveProducts: tcModel.purposeConsents.has(\n AdsConsentPurposes.DEVELOP_AND_IMPROVE_PRODUCTS,\n ),\n measureAdPerformance: tcModel.purposeConsents.has(AdsConsentPurposes.MEASURE_AD_PERFORMANCE),\n measureContentPerformance: tcModel.purposeConsents.has(\n AdsConsentPurposes.MEASURE_CONTENT_PERFORMANCE,\n ),\n selectBasicAds: tcModel.purposeConsents.has(AdsConsentPurposes.SELECT_BASIC_ADS),\n selectPersonalisedAds: tcModel.purposeConsents.has(\n AdsConsentPurposes.SELECT_PERSONALISED_ADS,\n ),\n selectPersonalisedContent: tcModel.purposeConsents.has(\n AdsConsentPurposes.SELECT_PERSONALISED_CONTENT,\n ),\n storeAndAccessInformationOnDevice: tcModel.purposeConsents.has(\n AdsConsentPurposes.STORE_AND_ACCESS_INFORMATION_ON_DEVICE,\n ),\n usePreciseGeolocationData: tcModel.specialFeatureOptins.has(\n AdsConsentSpecialFeatures.USE_PRECISE_GEOLOCATION_DATA,\n ),\n };\n },\n};\n"],"mappings":"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"}
1
+ {"version":3,"names":["native","NativeModules","RNGoogleMobileAdsConsentModule","AdsConsent","requestInfoUpdate","options","isObject","Error","isPropertySet","debugGeography","AdsConsentDebugGeography","DISABLED","EEA","NOT_EEA","isBoolean","tagForUnderAgeOfConsent","isArray","testDeviceIdentifiers","deviceId","isString","showForm","reset","getTCString","getTCModel","tcString","TCString","decode","getUserChoices","tcModel","e","TCModel","__DEV__","console","warn","activelyScanDeviceCharacteristicsForIdentification","specialFeatureOptins","has","AdsConsentSpecialFeatures","ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION","applyMarketResearchToGenerateAudienceInsights","purposeConsents","AdsConsentPurposes","APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS","createAPersonalisedAdsProfile","CREATE_A_PERSONALISED_ADS_PROFILE","createAPersonalisedContentProfile","developAndImproveProducts","DEVELOP_AND_IMPROVE_PRODUCTS","measureAdPerformance","MEASURE_AD_PERFORMANCE","measureContentPerformance","MEASURE_CONTENT_PERFORMANCE","selectBasicAds","SELECT_BASIC_ADS","selectPersonalisedAds","SELECT_PERSONALISED_ADS","selectPersonalisedContent","SELECT_PERSONALISED_CONTENT","storeAndAccessInformationOnDevice","STORE_AND_ACCESS_INFORMATION_ON_DEVICE","usePreciseGeolocationData","USE_PRECISE_GEOLOCATION_DATA"],"sourceRoot":"../../src","sources":["AdsConsent.ts"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"names":["AdsConsentDebugGeography"],"sources":["AdsConsentDebugGeography.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\n/**\n * AdsConsentDebugGeography enum.\n *\n * Used to set a mock location when testing the `AdsConsent` helper.\n */\nexport enum AdsConsentDebugGeography {\n /**\n * Disable any debug geography.\n */\n DISABLED = 0,\n\n /**\n * Sets the location to within the EEA.\n */\n EEA = 1,\n\n /**\n * Sets the location to outside of the EEA.\n */\n NOT_EEA = 2,\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAJA,IAKYA,wBAAwB;AAAA;AAAA,WAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,wCAAxBA,wBAAwB"}
1
+ {"version":3,"names":["AdsConsentDebugGeography"],"sourceRoot":"../../src","sources":["AdsConsentDebugGeography.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAJA,IAKYA,wBAAwB;AAAA;AAAA,WAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,wCAAxBA,wBAAwB"}
@@ -27,7 +27,8 @@ exports.AdsConsentPurposes = void 0;
27
27
  * https://vendor-list.consensu.org/v2/vendor-list.json
28
28
  * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework
29
29
  *
30
- */let AdsConsentPurposes;
30
+ */
31
+ let AdsConsentPurposes;
31
32
  exports.AdsConsentPurposes = AdsConsentPurposes;
32
33
  (function (AdsConsentPurposes) {
33
34
  AdsConsentPurposes[AdsConsentPurposes["STORE_AND_ACCESS_INFORMATION_ON_DEVICE"] = 1] = "STORE_AND_ACCESS_INFORMATION_ON_DEVICE";
@@ -1 +1 @@
1
- {"version":3,"names":["AdsConsentPurposes"],"sources":["AdsConsentPurposes.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n *\n *\n *\n * The definitions in this document are copied from IAB's global vendor list.\n *\n * https://vendor-list.consensu.org/v2/vendor-list.json\n * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework\n *\n */\n\nexport enum AdsConsentPurposes {\n /**\n * Cookies, device identifiers, or other information can be stored or\n * accessed on your device for the purposes presented to you.\n *\n * Vendors can:\n * - Store and access information on the device such as cookies\n * and device identifiers presented to a user.\n */\n STORE_AND_ACCESS_INFORMATION_ON_DEVICE = 1,\n\n /**\n * Ads can be shown to you based on the content you’re viewing,\n * the app you’re using, your approximate location, or your device type.\n *\n * To do basic ad selection vendors can:\n * - Use real-time information about the context in which the ad will be shown,\n * to show the ad, including information about the content and the device, such as:\n * device type and capabilities, user agent, URL, IP address\n * - Use a user’s non-precise geolocation data\n * - Control the frequency of ads shown to a user.\n * - Sequence the order in which ads are shown to a user.\n * - Prevent an ad from serving in an unsuitable editorial (brand-unsafe) context\n *\n * Vendors cannot:\n * - Create a personalised ads profile using this information for the selection of\n * future ads without a separate legal basis to create a personalised ads profile.\n * - N.B. Non-precise means only an approximate location involving at least a radius\n * of 500 meters is permitted.\n */\n SELECT_BASIC_ADS = 2,\n\n /**\n * A profile can be built about you and your interests to show you personalised ads\n * that are relevant to you.\n *\n * To create a personalised ads profile vendors can:\n * - Collect information about a user, including a user's activity, interests,\n * demographic information, or location, to create or edit a user profile for use\n * in personalised advertising.\n * - Combine this information with other information previously collected,\n * including from across websites and apps, to create or edit a user profile\n * for use in personalised advertising.\n */\n CREATE_A_PERSONALISED_ADS_PROFILE = 3,\n\n /**\n * Personalised ads can be shown to you based on a profile about you.\n *\n * To select personalised ads vendors can:\n * - Select personalised ads based on a user profile or other historical user data,\n * including a user’s prior activity, interests, visits to sites or apps, location,\n * or demographic information.\n */\n SELECT_PERSONALISED_ADS = 4,\n\n /**\n * A profile can be built about you and your interests to show you personalised content\n * that is relevant to you.\n *\n * To create a personalised content profile vendors can:\n * - Collect information about a user, including a user's activity, interests, visits to\n * sites or apps, demographic information, or location, to create or edit a user profile\n * for personalising content.\n * - Combine this information with other information previously collected,\n * including from across websites and apps, to create or edit a user profile for use\n * in personalising content.\n */\n CREATE_A_PERSONALISED_CONTENT_PROFILE = 5,\n\n /**\n * Personalised content can be shown to you based on a profile about you.\n *\n * To select personalised content vendors can:\n * - Select personalised content based on a user profile or other historical user data,\n * including a user’s prior activity, interests, visits to sites or apps, location,\n * or demographic information.\n */\n SELECT_PERSONALISED_CONTENT = 6,\n\n /**\n * The performance and effectiveness of ads that you see or interact with can be measured.\n *\n * To measure ad performance vendors can:\n * - Measure whether and how ads were delivered to and interacted with by a user\n * - Provide reporting about ads including their effectiveness and performance\n * - Provide reporting about users who interacted with ads using data observed during\n * the course of the user's interaction with that ad\n * - Provide reporting to publishers about the ads displayed on their property\n * - Measure whether an ad is serving in a suitable editorial environment (brand-safe) context\n * - Determine the percentage of the ad that had the opportunity to be seen and\n * the duration of that opportunity\n * - Combine this information with other information previously collected,\n * including from across websites and apps\n *\n * Vendors cannot:\n * - Apply panel- or similarly-derived audience insights data to ad measurement data\n * without a Legal Basis to apply market research to generate audience insights (Purpose 9)\n */\n MEASURE_AD_PERFORMANCE = 7,\n\n /**\n * The performance and effectiveness of content that you see or interact with can be measured.\n *\n * To measure content performance vendors can:\n * - Measure and report on how content was delivered to and interacted with by users.\n * - Provide reporting, using directly measurable or known information, about users who\n * interacted with the content\n * - Combine this information with other information previously collected,\n * including from across websites and apps.\n *\n * Vendors cannot:\n * - Measure whether and how ads (including native ads) were delivered to and\n * interacted with by a user.\n * - Apply panel- or similarly derived audience insights data to ad measurement\n * data without a Legal Basis to apply market research to generate audience insights (Purpose 9)\n */\n MEASURE_CONTENT_PERFORMANCE = 8,\n\n /**\n * Market research can be used to learn more about the audiences who visit sites/apps and view ads.\n *\n * To apply market research to generate audience insights vendors can:\n * - Provide aggregate reporting to advertisers or their representatives about\n * the audiences reached by their ads, through panel-based and similarly derived insights.\n * - Provide aggregate reporting to publishers about the audiences that were served or\n * interacted with content and/or ads on their property by applying\n * panel-based and similarly derived insights.\n * - Associate offline data with an online user for the purposes of\n * market research to generate audience insights if vendors have declared to match and\n * combine offline data sources (Feature 1)\n * - Combine this information with other information previously collected including from\n * across websites and apps.\n *\n * Vendors cannot:\n * - Measure the performance and effectiveness of ads that a specific user was served or\n * interacted with, without a Legal Basis to measure ad performance.\n * - Measure which content a specific user was served and how they interacted with it,\n * without a Legal Basis to measure content performance.\n */\n APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS = 9,\n\n /**\n * Your data can be used to improve existing systems and software,\n * and to develop new products\n *\n * To develop new products and improve products vendors can:\n * - Use information to improve their existing products with new features and\n * to develop new products\n * - Create new models and algorithms through machine learning\n *\n * Vendors cannot:\n * - Conduct any other data processing operation allowed under\n * a different purpose under this purpose\n */\n DEVELOP_AND_IMPROVE_PRODUCTS = 10,\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAvBA,IAyBYA,kBAAkB;AAAA;AAAA,WAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,kCAAlBA,kBAAkB"}
1
+ {"version":3,"names":["AdsConsentPurposes"],"sourceRoot":"../../src","sources":["AdsConsentPurposes.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvBA,IAyBYA,kBAAkB;AAAA;AAAA,WAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,kCAAlBA,kBAAkB"}
@@ -27,7 +27,8 @@ exports.AdsConsentSpecialFeatures = void 0;
27
27
  * https://vendor-list.consensu.org/v2/vendor-list.json
28
28
  * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework
29
29
  *
30
- */let AdsConsentSpecialFeatures;
30
+ */
31
+ let AdsConsentSpecialFeatures;
31
32
  exports.AdsConsentSpecialFeatures = AdsConsentSpecialFeatures;
32
33
  (function (AdsConsentSpecialFeatures) {
33
34
  AdsConsentSpecialFeatures[AdsConsentSpecialFeatures["USE_PRECISE_GEOLOCATION_DATA"] = 1] = "USE_PRECISE_GEOLOCATION_DATA";
@@ -1 +1 @@
1
- {"version":3,"names":["AdsConsentSpecialFeatures"],"sources":["AdsConsentSpecialFeatures.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n *\n *\n *\n * The definitions in this document are copied from IAB's global vendor list.\n *\n * https://vendor-list.consensu.org/v2/vendor-list.json\n * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework\n *\n */\n\nexport enum AdsConsentSpecialFeatures {\n /**\n * Your precise geolocation data can be used in support of one or more purposes.\n * This means your location can be accurate to within several meters.\n *\n * Vendors can:\n * - Collect and process precise geolocation data in support of one or more purposes.\n * - Precise geolocation means that there are no restrictions on the precision of\n * a user's location; this can be accurate to within several meters.\n */\n USE_PRECISE_GEOLOCATION_DATA = 1,\n\n /**\n * Your device can be identified based on a scan of your device's\n * unique combination of characteristics.\n *\n * Vendors can:\n * - Create an identifier using data collected via actively scanning a device for\n * specific characteristics, e.g. installed fonts or screen resolution.\n * - Use such an identifier to re-identify a device.\n */\n ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION = 2,\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAvBA,IAyBYA,yBAAyB;AAAA;AAAA,WAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;AAAA,GAAzBA,yBAAyB,yCAAzBA,yBAAyB"}
1
+ {"version":3,"names":["AdsConsentSpecialFeatures"],"sourceRoot":"../../src","sources":["AdsConsentSpecialFeatures.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvBA,IAyBYA,yBAAyB;AAAA;AAAA,WAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;AAAA,GAAzBA,yBAAyB,yCAAzBA,yBAAyB"}
@@ -1 +1 @@
1
- {"version":3,"names":["AdsConsentStatus"],"sources":["AdsConsentStatus.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\n/**\n * AdsConsentStatus enum.\n */\nexport enum AdsConsentStatus {\n /**\n * Unknown consent status, AdsConsent.requestInfoUpdate needs to be called to update it.\n */\n UNKNOWN = 'UNKNOWN',\n\n /**\n * User consent required but not yet obtained.\n */\n REQUIRED = 'REQUIRED',\n\n /**\n * User consent not required.\n */\n NOT_REQUIRED = 'NOT_REQUIRED',\n\n /**\n * User consent already obtained.\n */\n OBTAINED = 'OBTAINED',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,gBAAgB;AAAA;AAAA,WAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,gCAAhBA,gBAAgB"}
1
+ {"version":3,"names":["AdsConsentStatus"],"sourceRoot":"../../src","sources":["AdsConsentStatus.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,gBAAgB;AAAA;AAAA,WAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,gCAAhBA,gBAAgB"}
@@ -20,7 +20,8 @@ exports.BannerAdSize = void 0;
20
20
  * limitations under the License.
21
21
  *
22
22
  *
23
- */let BannerAdSize;
23
+ */
24
+ let BannerAdSize;
24
25
  exports.BannerAdSize = BannerAdSize;
25
26
  (function (BannerAdSize) {
26
27
  BannerAdSize["BANNER"] = "BANNER";
@@ -1 +1 @@
1
- {"version":3,"names":["BannerAdSize"],"sources":["BannerAdSize.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n *\n */\n\nexport enum BannerAdSize {\n /**\n * Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels).\n */\n BANNER = 'BANNER',\n\n /**\n * Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels).\n */\n FULL_BANNER = 'FULL_BANNER',\n\n /**\n * Large banner ad size (320x100 density-independent pixels).\n */\n LARGE_BANNER = 'LARGE_BANNER',\n\n /**\n * Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels).\n */\n LEADERBOARD = 'LEADERBOARD',\n\n /**\n * Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels).\n */\n MEDIUM_RECTANGLE = 'MEDIUM_RECTANGLE',\n\n /**\n * @deprecated Use `ANCHORED_ADAPTIVE_BANNER` instead.\n */\n ADAPTIVE_BANNER = 'ADAPTIVE_BANNER',\n\n /**\n * A (next generation) dynamically sized banner that is full-width and auto-height.\n */\n ANCHORED_ADAPTIVE_BANNER = 'ANCHORED_ADAPTIVE_BANNER',\n\n /**\n * Inline adaptive banners are larger, taller banners compared to anchored adaptive banners. They are of variable height, and can be as tall as the device screen.\n * They are intended to be placed in scrolling content.\n */\n INLINE_ADAPTIVE_BANNER = 'INLINE_ADAPTIVE_BANNER',\n\n /**\n * A dynamically sized banner that matches its parent's width and expands/contracts its height to match the ad's content after loading completes.\n */\n FLUID = 'FLUID',\n\n /**\n * IAB wide skyscraper ad size (160x600 density-independent pixels). This size is currently not supported by the Google Mobile Ads network; this is intended for mediation ad networks only.\n */\n WIDE_SKYSCRAPER = 'WIDE_SKYSCRAPER',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAhBA,IAkBYA,YAAY;AAAA;AAAA,WAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,4BAAZA,YAAY"}
1
+ {"version":3,"names":["BannerAdSize"],"sourceRoot":"../../src","sources":["BannerAdSize.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBA,IAkBYA,YAAY;AAAA;AAAA,WAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,4BAAZA,YAAY"}
@@ -19,7 +19,8 @@ exports.GAMAdEventType = void 0;
19
19
  * See the License for the specific language governing permissions and
20
20
  * limitations under the License.
21
21
  *
22
- */let GAMAdEventType;
22
+ */
23
+ let GAMAdEventType;
23
24
  exports.GAMAdEventType = GAMAdEventType;
24
25
  (function (GAMAdEventType) {
25
26
  GAMAdEventType["APP_EVENT"] = "app_event";
@@ -1 +1 @@
1
- {"version":3,"names":["GAMAdEventType"],"sources":["GAMAdEventType.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport enum GAMAdEventType {\n /**\n * An event fired when the ad received Ad Manager specific app event.\n *\n * The app event contains a `name` and `data`. `data` could be undefeined.\n *\n * #### Example\n *\n * ```js\n * import { GAMAdEventType } from 'react-native-google-mobile-ads';\n *\n * interstitialAd.onAdEvent((type, error, data) => {\n * if (type === GAMAdEventType.APP_EVENT) {\n * console.log(`Received app event: ${data.name} with data: ${data.data}`);\n * }\n * });\n * ```\n */\n APP_EVENT = 'app_event',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAfA,IAiBYA,cAAc;AAAA;AAAA,WAAdA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,8BAAdA,cAAc"}
1
+ {"version":3,"names":["GAMAdEventType"],"sourceRoot":"../../src","sources":["GAMAdEventType.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA,IAiBYA,cAAc;AAAA;AAAA,WAAdA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,8BAAdA,cAAc"}
@@ -19,7 +19,8 @@ exports.MaxAdContentRating = void 0;
19
19
  * See the License for the specific language governing permissions and
20
20
  * limitations under the License.
21
21
  *
22
- */let MaxAdContentRating;
22
+ */
23
+ let MaxAdContentRating;
23
24
  exports.MaxAdContentRating = MaxAdContentRating;
24
25
  (function (MaxAdContentRating) {
25
26
  MaxAdContentRating["G"] = "G";
@@ -1 +1 @@
1
- {"version":3,"names":["MaxAdContentRating"],"sources":["MaxAdContentRating.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport enum MaxAdContentRating {\n /**\n * \"General audiences.\" Content suitable for all audiences, including families and children.\n */\n G = 'G',\n\n /**\n * \"Parental guidance.\" Content suitable for most audiences with parental guidance, including topics like non-realistic, cartoonish violence.\n */\n PG = 'PG',\n\n /**\n * T: \"Teen.\" Content suitable for teen and older audiences, including topics such as general health, social networks, scary imagery, and fight sports.\n */\n T = 'T',\n\n /**\n * \"Mature audiences.\" Content suitable only for mature audiences; includes topics such as alcohol, gambling, sexual content, and weapons.\n */\n MA = 'MA',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAfA,IAiBYA,kBAAkB;AAAA;AAAA,WAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,kCAAlBA,kBAAkB"}
1
+ {"version":3,"names":["MaxAdContentRating"],"sourceRoot":"../../src","sources":["MaxAdContentRating.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA,IAiBYA,kBAAkB;AAAA;AAAA,WAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,kCAAlBA,kBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"names":["namespace","nativeModuleName","MobileAdsModule","Module","constructor","app","config","emitter","addListener","event","emit","adUnitId","requestId","initialize","native","setRequestConfiguration","requestConfiguration","validateAdRequestConfiguration","e","Error","message","openAdInspector","MobileAdsInstance","name","version","nativeEvents","MobileAds"],"sources":["MobileAds.ts"],"sourcesContent":["import { Module } from './internal';\nimport { validateAdRequestConfiguration } from './validateAdRequestConfiguration';\nimport { version } from './version';\nimport { MobileAdsModuleInterface } from './types/MobileAdsModule.interface';\nimport { RequestConfiguration } from './types/RequestConfiguration';\nimport { App, Config } from './types/Module.interface';\n\nconst namespace = 'google_mobile_ads';\n\nconst nativeModuleName = [\n 'RNGoogleMobileAdsModule',\n 'RNGoogleMobileAdsAppOpenModule',\n 'RNGoogleMobileAdsInterstitialModule',\n 'RNGoogleMobileAdsRewardedModule',\n 'RNGoogleMobileAdsRewardedInterstitialModule',\n];\n\ntype Event = {\n adUnitId: string;\n requestId: number;\n};\n\nclass MobileAdsModule extends Module implements MobileAdsModuleInterface {\n constructor(app: App, config: Config) {\n super(app, config);\n\n this.emitter.addListener('google_mobile_ads_app_open_event', (event: Event) => {\n this.emitter.emit(\n `google_mobile_ads_app_open_event:${event.adUnitId}:${event.requestId}`,\n event,\n );\n });\n\n this.emitter.addListener('google_mobile_ads_interstitial_event', (event: Event) => {\n this.emitter.emit(\n `google_mobile_ads_interstitial_event:${event.adUnitId}:${event.requestId}`,\n event,\n );\n });\n\n this.emitter.addListener('google_mobile_ads_rewarded_event', (event: Event) => {\n this.emitter.emit(\n `google_mobile_ads_rewarded_event:${event.adUnitId}:${event.requestId}`,\n event,\n );\n });\n\n this.emitter.addListener('google_mobile_ads_rewarded_interstitial_event', (event: Event) => {\n this.emitter.emit(\n `google_mobile_ads_rewarded_interstitial_event:${event.adUnitId}:${event.requestId}`,\n event,\n );\n });\n }\n\n initialize() {\n return this.native.initialize();\n }\n\n setRequestConfiguration(requestConfiguration: RequestConfiguration) {\n let config;\n try {\n config = validateAdRequestConfiguration(requestConfiguration);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`googleMobileAds.setRequestConfiguration(*) ${e.message}`);\n }\n }\n\n return this.native.setRequestConfiguration(config);\n }\n\n openAdInspector() {\n return this.native.openAdInspector();\n }\n}\n\nconst MobileAdsInstance = new MobileAdsModule(\n { name: 'AppName' },\n {\n version,\n namespace,\n nativeModuleName,\n nativeEvents: [\n 'google_mobile_ads_app_open_event',\n 'google_mobile_ads_interstitial_event',\n 'google_mobile_ads_rewarded_event',\n 'google_mobile_ads_rewarded_interstitial_event',\n ],\n },\n);\n\nexport const MobileAds = () => {\n return MobileAdsInstance;\n};\n\nexport default MobileAds;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAKA,MAAMA,SAAS,GAAG,mBAAmB;AAErC,MAAMC,gBAAgB,GAAG,CACvB,yBAAyB,EACzB,gCAAgC,EAChC,qCAAqC,EACrC,iCAAiC,EACjC,6CAA6C,CAC9C;AAOD,MAAMC,eAAe,SAASC,gBAAM,CAAqC;EACvEC,WAAW,CAACC,GAAQ,EAAEC,MAAc,EAAE;IACpC,KAAK,CAACD,GAAG,EAAEC,MAAM,CAAC;IAElB,IAAI,CAACC,OAAO,CAACC,WAAW,CAAC,kCAAkC,EAAGC,KAAY,IAAK;MAC7E,IAAI,CAACF,OAAO,CAACG,IAAI,CACd,oCAAmCD,KAAK,CAACE,QAAS,IAAGF,KAAK,CAACG,SAAU,EAAC,EACvEH,KAAK,CACN;IACH,CAAC,CAAC;IAEF,IAAI,CAACF,OAAO,CAACC,WAAW,CAAC,sCAAsC,EAAGC,KAAY,IAAK;MACjF,IAAI,CAACF,OAAO,CAACG,IAAI,CACd,wCAAuCD,KAAK,CAACE,QAAS,IAAGF,KAAK,CAACG,SAAU,EAAC,EAC3EH,KAAK,CACN;IACH,CAAC,CAAC;IAEF,IAAI,CAACF,OAAO,CAACC,WAAW,CAAC,kCAAkC,EAAGC,KAAY,IAAK;MAC7E,IAAI,CAACF,OAAO,CAACG,IAAI,CACd,oCAAmCD,KAAK,CAACE,QAAS,IAAGF,KAAK,CAACG,SAAU,EAAC,EACvEH,KAAK,CACN;IACH,CAAC,CAAC;IAEF,IAAI,CAACF,OAAO,CAACC,WAAW,CAAC,+CAA+C,EAAGC,KAAY,IAAK;MAC1F,IAAI,CAACF,OAAO,CAACG,IAAI,CACd,iDAAgDD,KAAK,CAACE,QAAS,IAAGF,KAAK,CAACG,SAAU,EAAC,EACpFH,KAAK,CACN;IACH,CAAC,CAAC;EACJ;EAEAI,UAAU,GAAG;IACX,OAAO,IAAI,CAACC,MAAM,CAACD,UAAU,EAAE;EACjC;EAEAE,uBAAuB,CAACC,oBAA0C,EAAE;IAClE,IAAIV,MAAM;IACV,IAAI;MACFA,MAAM,GAAG,IAAAW,8DAA8B,EAACD,oBAAoB,CAAC;IAC/D,CAAC,CAAC,OAAOE,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYC,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,8CAA6CD,CAAC,CAACE,OAAQ,EAAC,CAAC;MAC5E;IACF;IAEA,OAAO,IAAI,CAACN,MAAM,CAACC,uBAAuB,CAACT,MAAM,CAAC;EACpD;EAEAe,eAAe,GAAG;IAChB,OAAO,IAAI,CAACP,MAAM,CAACO,eAAe,EAAE;EACtC;AACF;AAEA,MAAMC,iBAAiB,GAAG,IAAIpB,eAAe,CAC3C;EAAEqB,IAAI,EAAE;AAAU,CAAC,EACnB;EACEC,OAAO,EAAPA,gBAAO;EACPxB,SAAS;EACTC,gBAAgB;EAChBwB,YAAY,EAAE,CACZ,kCAAkC,EAClC,sCAAsC,EACtC,kCAAkC,EAClC,+CAA+C;AAEnD,CAAC,CACF;AAEM,MAAMC,SAAS,GAAG,MAAM;EAC7B,OAAOJ,iBAAiB;AAC1B,CAAC;AAAC;AAAA,eAEaI,SAAS;AAAA"}
1
+ {"version":3,"names":["namespace","nativeModuleName","MobileAdsModule","Module","constructor","app","config","emitter","addListener","event","emit","adUnitId","requestId","initialize","native","setRequestConfiguration","requestConfiguration","validateAdRequestConfiguration","e","Error","message","openAdInspector","MobileAdsInstance","name","version","nativeEvents","MobileAds"],"sourceRoot":"../../src","sources":["MobileAds.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AAKA,MAAMA,SAAS,GAAG,mBAAmB;AAErC,MAAMC,gBAAgB,GAAG,CACvB,yBAAyB,EACzB,gCAAgC,EAChC,qCAAqC,EACrC,iCAAiC,EACjC,6CAA6C,CAC9C;AAOD,MAAMC,eAAe,SAASC,gBAAM,CAAqC;EACvEC,WAAW,CAACC,GAAQ,EAAEC,MAAc,EAAE;IACpC,KAAK,CAACD,GAAG,EAAEC,MAAM,CAAC;IAElB,IAAI,CAACC,OAAO,CAACC,WAAW,CAAC,kCAAkC,EAAGC,KAAY,IAAK;MAC7E,IAAI,CAACF,OAAO,CAACG,IAAI,CACd,oCAAmCD,KAAK,CAACE,QAAS,IAAGF,KAAK,CAACG,SAAU,EAAC,EACvEH,KAAK,CACN;IACH,CAAC,CAAC;IAEF,IAAI,CAACF,OAAO,CAACC,WAAW,CAAC,sCAAsC,EAAGC,KAAY,IAAK;MACjF,IAAI,CAACF,OAAO,CAACG,IAAI,CACd,wCAAuCD,KAAK,CAACE,QAAS,IAAGF,KAAK,CAACG,SAAU,EAAC,EAC3EH,KAAK,CACN;IACH,CAAC,CAAC;IAEF,IAAI,CAACF,OAAO,CAACC,WAAW,CAAC,kCAAkC,EAAGC,KAAY,IAAK;MAC7E,IAAI,CAACF,OAAO,CAACG,IAAI,CACd,oCAAmCD,KAAK,CAACE,QAAS,IAAGF,KAAK,CAACG,SAAU,EAAC,EACvEH,KAAK,CACN;IACH,CAAC,CAAC;IAEF,IAAI,CAACF,OAAO,CAACC,WAAW,CAAC,+CAA+C,EAAGC,KAAY,IAAK;MAC1F,IAAI,CAACF,OAAO,CAACG,IAAI,CACd,iDAAgDD,KAAK,CAACE,QAAS,IAAGF,KAAK,CAACG,SAAU,EAAC,EACpFH,KAAK,CACN;IACH,CAAC,CAAC;EACJ;EAEAI,UAAU,GAAG;IACX,OAAO,IAAI,CAACC,MAAM,CAACD,UAAU,EAAE;EACjC;EAEAE,uBAAuB,CAACC,oBAA0C,EAAE;IAClE,IAAIV,MAAM;IACV,IAAI;MACFA,MAAM,GAAG,IAAAW,8DAA8B,EAACD,oBAAoB,CAAC;IAC/D,CAAC,CAAC,OAAOE,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYC,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,8CAA6CD,CAAC,CAACE,OAAQ,EAAC,CAAC;MAC5E;IACF;IAEA,OAAO,IAAI,CAACN,MAAM,CAACC,uBAAuB,CAACT,MAAM,CAAC;EACpD;EAEAe,eAAe,GAAG;IAChB,OAAO,IAAI,CAACP,MAAM,CAACO,eAAe,EAAE;EACtC;AACF;AAEA,MAAMC,iBAAiB,GAAG,IAAIpB,eAAe,CAC3C;EAAEqB,IAAI,EAAE;AAAU,CAAC,EACnB;EACEC,OAAO,EAAPA,gBAAO;EACPxB,SAAS;EACTC,gBAAgB;EAChBwB,YAAY,EAAE,CACZ,kCAAkC,EAClC,sCAAsC,EACtC,kCAAkC,EAClC,+CAA+C;AAEnD,CAAC,CACF;AAEM,MAAMC,SAAS,GAAG,MAAM;EAC7B,OAAOJ,iBAAiB;AAC1B,CAAC;AAAC;AAAA,eAEaI,SAAS;AAAA"}
@@ -19,7 +19,8 @@ exports.RewardedAdEventType = void 0;
19
19
  * See the License for the specific language governing permissions and
20
20
  * limitations under the License.
21
21
  *
22
- */let RewardedAdEventType;
22
+ */
23
+ let RewardedAdEventType;
23
24
  exports.RewardedAdEventType = RewardedAdEventType;
24
25
  (function (RewardedAdEventType) {
25
26
  RewardedAdEventType["LOADED"] = "rewarded_loaded";
@@ -1 +1 @@
1
- {"version":3,"names":["RewardedAdEventType"],"sources":["RewardedAdEventType.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport enum RewardedAdEventType {\n /**\n * An event fired when a rewarded ad has loaded.\n *\n * This type differs from `AdEventType.LOADED` as when a rewarded ad is loaded,\n * an additional data payload is provided to the event handler containing the ad reward\n * (assuming the user earns the reward).\n *\n * The reward contains a `type` and `amount`.\n *\n * #### Example\n *\n * ```js\n * import { RewardedAdEventType } from 'react-native-google-mobile-ads';\n *\n * rewardedAd.addEventListener(RewardedAdEventType.LOADED, (reward) => {\n * console.log(`Rewarded Ad loaded with ${data.amount} ${data.type} as reward`);\n * // E.g. \"Rewarded Ad loaded with 50 coins as reward\"\n * rewardedAd.show();\n * });\n * ```\n */\n LOADED = 'rewarded_loaded',\n\n /**\n * An event fired when the user earned the reward for the video. If the user does not earn a reward,\n * the `AdEventType.CLOSED` event will be fired with no rewarded event.\n *\n * The reward contains a `type` and `amount`.\n *\n * #### Example\n *\n * ```js\n * import { RewardedAdEventType } from 'react-native-google-mobile-ads';\n *\n * rewardedAd.addEventListener(RewardedAdEventType.EARNED_REWARD, (reward) => {\n * console.log(`User earned ${data.amount} ${data.type}`);\n * // E.g. \"User earned 50 coins\"\n * });\n * ```\n */\n EARNED_REWARD = 'rewarded_earned_reward',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAfA,IAiBYA,mBAAmB;AAAA;AAAA,WAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,mCAAnBA,mBAAmB"}
1
+ {"version":3,"names":["RewardedAdEventType"],"sourceRoot":"../../src","sources":["RewardedAdEventType.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA,IAiBYA,mBAAmB;AAAA;AAAA,WAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,mCAAnBA,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"names":["TestIds","APP_OPEN","BANNER","INTERSTITIAL","REWARDED","REWARDED_INTERSTITIAL","GAM_APP_OPEN","GAM_BANNER","GAM_INTERSTITIAL","GAM_REWARDED","GAM_REWARDED_INTERSTITIAL","GAM_NATIVE","Platform","select","android","ios"],"sources":["TestIds.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { Platform } from 'react-native';\n\nexport const TestIds = {\n APP_OPEN: '',\n BANNER: '',\n INTERSTITIAL: '',\n REWARDED: '',\n REWARDED_INTERSTITIAL: '',\n GAM_APP_OPEN: '/6499/example/app-open',\n GAM_BANNER: '/6499/example/banner',\n GAM_INTERSTITIAL: '/6499/example/interstitial',\n GAM_REWARDED: '/6499/example/rewarded',\n GAM_REWARDED_INTERSTITIAL: '/21775744923/example/rewarded_interstitial',\n GAM_NATIVE: '/6499/example/native',\n ...Platform.select({\n android: {\n APP_OPEN: 'ca-app-pub-3940256099942544/3419835294',\n BANNER: 'ca-app-pub-3940256099942544/6300978111',\n INTERSTITIAL: 'ca-app-pub-3940256099942544/1033173712',\n REWARDED: 'ca-app-pub-3940256099942544/5224354917',\n REWARDED_INTERSTITIAL: 'ca-app-pub-3940256099942544/5354046379',\n },\n ios: {\n APP_OPEN: 'ca-app-pub-3940256099942544/5662855259',\n BANNER: 'ca-app-pub-3940256099942544/2934735716',\n INTERSTITIAL: 'ca-app-pub-3940256099942544/4411468910',\n REWARDED: 'ca-app-pub-3940256099942544/1712485313',\n REWARDED_INTERSTITIAL: 'ca-app-pub-3940256099942544/6978759866',\n },\n }),\n};\n"],"mappings":";;;;;;AAiBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMA,OAAO,GAAG;EACrBC,QAAQ,EAAE,EAAE;EACZC,MAAM,EAAE,EAAE;EACVC,YAAY,EAAE,EAAE;EAChBC,QAAQ,EAAE,EAAE;EACZC,qBAAqB,EAAE,EAAE;EACzBC,YAAY,EAAE,wBAAwB;EACtCC,UAAU,EAAE,sBAAsB;EAClCC,gBAAgB,EAAE,4BAA4B;EAC9CC,YAAY,EAAE,wBAAwB;EACtCC,yBAAyB,EAAE,4CAA4C;EACvEC,UAAU,EAAE,sBAAsB;EAClC,GAAGC,qBAAQ,CAACC,MAAM,CAAC;IACjBC,OAAO,EAAE;MACPb,QAAQ,EAAE,wCAAwC;MAClDC,MAAM,EAAE,wCAAwC;MAChDC,YAAY,EAAE,wCAAwC;MACtDC,QAAQ,EAAE,wCAAwC;MAClDC,qBAAqB,EAAE;IACzB,CAAC;IACDU,GAAG,EAAE;MACHd,QAAQ,EAAE,wCAAwC;MAClDC,MAAM,EAAE,wCAAwC;MAChDC,YAAY,EAAE,wCAAwC;MACtDC,QAAQ,EAAE,wCAAwC;MAClDC,qBAAqB,EAAE;IACzB;EACF,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"names":["TestIds","APP_OPEN","BANNER","INTERSTITIAL","REWARDED","REWARDED_INTERSTITIAL","GAM_APP_OPEN","GAM_BANNER","GAM_INTERSTITIAL","GAM_REWARDED","GAM_REWARDED_INTERSTITIAL","GAM_NATIVE","Platform","select","android","ios"],"sourceRoot":"../../src","sources":["TestIds.ts"],"mappings":";;;;;;AAiBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMA,OAAO,GAAG;EACrBC,QAAQ,EAAE,EAAE;EACZC,MAAM,EAAE,EAAE;EACVC,YAAY,EAAE,EAAE;EAChBC,QAAQ,EAAE,EAAE;EACZC,qBAAqB,EAAE,EAAE;EACzBC,YAAY,EAAE,wBAAwB;EACtCC,UAAU,EAAE,sBAAsB;EAClCC,gBAAgB,EAAE,4BAA4B;EAC9CC,YAAY,EAAE,wBAAwB;EACtCC,yBAAyB,EAAE,4CAA4C;EACvEC,UAAU,EAAE,sBAAsB;EAClC,GAAGC,qBAAQ,CAACC,MAAM,CAAC;IACjBC,OAAO,EAAE;MACPb,QAAQ,EAAE,wCAAwC;MAClDC,MAAM,EAAE,wCAAwC;MAChDC,YAAY,EAAE,wCAAwC;MACtDC,QAAQ,EAAE,wCAAwC;MAClDC,qBAAqB,EAAE;IACzB,CAAC;IACDU,GAAG,EAAE;MACHd,QAAQ,EAAE,wCAAwC;MAClDC,MAAM,EAAE,wCAAwC;MAChDC,YAAY,EAAE,wCAAwC;MACtDC,QAAQ,EAAE,wCAAwC;MAClDC,qBAAqB,EAAE;IACzB;EACF,CAAC;AACH,CAAC;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["AppOpenAd","MobileAd","createForAdRequest","adUnitId","requestOptions","isString","Error","options","validateAdRequestOptions","e","message","requestId","_appOpenRequest","MobileAds","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sources":["AppOpenAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isString } from '../common';\nimport { MobileAds } from '../MobileAds';\nimport { validateAdRequestOptions } from '../validateAdRequestOptions';\nimport { MobileAd } from './MobileAd';\nimport { AdEventType } from '../AdEventType';\nimport { AdEventListener } from '../types/AdEventListener';\nimport { AdEventsListener } from '../types/AdEventsListener';\nimport { RequestOptions } from '../types/RequestOptions';\n\nexport class AppOpenAd extends MobileAd {\n protected static _appOpenRequest = 0;\n\n static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions) {\n if (!isString(adUnitId)) {\n throw new Error(\"AppOpenAd.createForAdRequest(*) 'adUnitId' expected an string value.\");\n }\n\n let options = {};\n try {\n options = validateAdRequestOptions(requestOptions);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`AppOpenAd.createForAdRequest(_, *) ${e.message}.`);\n }\n }\n\n const requestId = AppOpenAd._appOpenRequest++;\n return new AppOpenAd('app_open', MobileAds(), requestId, adUnitId, options);\n }\n\n addAdEventsListener<T extends AdEventType>(listener: AdEventsListener<T>): () => void {\n return this._addAdEventsListener(listener);\n }\n\n addAdEventListener<T extends AdEventType>(type: T, listener: AdEventListener<T>) {\n return this._addAdEventListener(type, listener);\n }\n}\n"],"mappings":";;;;;;AAiBA;AACA;AACA;AACA;AAAsC;AAM/B,MAAMA,SAAS,SAASC,kBAAQ,CAAC;EAGtC,OAAOC,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAAC,IAAAC,gBAAQ,EAACF,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIG,KAAK,CAAC,sEAAsE,CAAC;IACzF;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAG,IAAAC,kDAAwB,EAACJ,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOK,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYH,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,sCAAqCG,CAAC,CAACC,OAAQ,GAAE,CAAC;MACrE;IACF;IAEA,MAAMC,SAAS,GAAGX,SAAS,CAACY,eAAe,EAAE;IAC7C,OAAO,IAAIZ,SAAS,CAAC,UAAU,EAAE,IAAAa,oBAAS,GAAE,EAAEF,SAAS,EAAER,QAAQ,EAAEI,OAAO,CAAC;EAC7E;EAEAO,mBAAmB,CAAwBC,QAA6B,EAAc;IACpF,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAAwBC,IAAO,EAAEH,QAA4B,EAAE;IAC/E,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC;AAAA,gBA5BYf,SAAS,qBACe,CAAC"}
1
+ {"version":3,"names":["AppOpenAd","MobileAd","createForAdRequest","adUnitId","requestOptions","isString","Error","options","validateAdRequestOptions","e","message","requestId","_appOpenRequest","MobileAds","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sourceRoot":"../../src","sources":["AppOpenAd.ts"],"mappings":";;;;;;AAiBA;AACA;AACA;AACA;AAAsC;AAM/B,MAAMA,SAAS,SAASC,kBAAQ,CAAC;EAGtC,OAAOC,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAAC,IAAAC,gBAAQ,EAACF,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIG,KAAK,CAAC,sEAAsE,CAAC;IACzF;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAG,IAAAC,kDAAwB,EAACJ,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOK,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYH,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,sCAAqCG,CAAC,CAACC,OAAQ,GAAE,CAAC;MACrE;IACF;IAEA,MAAMC,SAAS,GAAGX,SAAS,CAACY,eAAe,EAAE;IAC7C,OAAO,IAAIZ,SAAS,CAAC,UAAU,EAAE,IAAAa,oBAAS,GAAE,EAAEF,SAAS,EAAER,QAAQ,EAAEI,OAAO,CAAC;EAC7E;EAEAO,mBAAmB,CAAwBC,QAA6B,EAAc;IACpF,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAAwBC,IAAO,EAAEH,QAA4B,EAAE;IAC/E,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC;AAAA,gBA5BYf,SAAS,qBACe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["BannerAd","size","props"],"sources":["BannerAd.tsx"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport React from 'react';\nimport { BannerAdProps } from '../types/BannerAdProps';\nimport { BaseAd } from './BaseAd';\n\nexport function BannerAd({ size, ...props }: BannerAdProps) {\n return <BaseAd sizes={[size]} {...props} />;\n}\n"],"mappings":";;;;;;AAiBA;AAEA;AAAkC;AAAA;AAE3B,SAASA,QAAQ,OAAoC;EAAA,IAAnC;IAAEC,IAAI;IAAE,GAAGC;EAAqB,CAAC;EACxD,oBAAO,6BAAC,cAAM;IAAC,KAAK,EAAE,CAACD,IAAI;EAAE,GAAKC,KAAK,EAAI;AAC7C"}
1
+ {"version":3,"names":["BannerAd","size","props"],"sourceRoot":"../../src","sources":["BannerAd.tsx"],"mappings":";;;;;;AAiBA;AAEA;AAAkC;AAAA;AAE3B,SAASA,QAAQ,OAAoC;EAAA,IAAnC;IAAEC,IAAI;IAAE,GAAGC;EAAqB,CAAC;EACxD,oBAAO,6BAAC,cAAM;IAAC,KAAK,EAAE,CAACD,IAAI;EAAE,GAAKC,KAAK,EAAI;AAC7C"}
@@ -1 +1 @@
1
- {"version":3,"names":["sizeRegex","BaseAd","React","forwardRef","ref","unitId","sizes","requestOptions","manualImpressionsEnabled","props","dimensions","setDimensions","useState","useEffect","Error","length","every","size","BannerAdSize","test","parsedRequestOptions","JSON","stringify","validateAdRequestOptions","e","message","onNativeEvent","nativeEvent","type","isFunction","eventHandler","eventPayload","width","height","NativeError","fromEvent","name","data","style","includes","FLUID","displayName","GoogleMobileAdsBannerView","requireNativeComponent"],"sources":["BaseAd.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\n/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport React, { useState, useEffect } from 'react';\nimport { NativeMethods, requireNativeComponent } from 'react-native';\nimport { isFunction } from '../common';\nimport { NativeError } from '../internal/NativeError';\nimport { BannerAdSize } from '../BannerAdSize';\nimport { validateAdRequestOptions } from '../validateAdRequestOptions';\nimport { GAMBannerAdProps } from '../types/BannerAdProps';\nimport { RequestOptions } from '../types/RequestOptions';\n\ntype NativeEvent =\n | {\n type: 'onAdLoaded' | 'onSizeChange';\n width: number;\n height: number;\n }\n | { type: 'onAdOpened' | 'onAdClosed' }\n | {\n type: 'onAdFailedToLoad';\n code: string;\n message: string;\n }\n | {\n type: 'onAppEvent';\n name: string;\n data?: string;\n };\n\nconst sizeRegex = /([0-9]+)x([0-9]+)/;\n\nexport const BaseAd = React.forwardRef<GoogleMobileAdsBannerView, GAMBannerAdProps>(\n ({ unitId, sizes, requestOptions, manualImpressionsEnabled, ...props }, ref) => {\n const [dimensions, setDimensions] = useState<(number | string)[]>([0, 0]);\n\n useEffect(() => {\n if (!unitId) {\n throw new Error(\"BannerAd: 'unitId' expected a valid string unit ID.\");\n }\n }, [unitId]);\n\n useEffect(() => {\n if (\n sizes.length === 0 ||\n !sizes.every(size => size in BannerAdSize || sizeRegex.test(size))\n ) {\n throw new Error(\"BannerAd: 'size(s)' expected a valid BannerAdSize or custom size string.\");\n }\n }, [sizes]);\n\n const parsedRequestOptions = JSON.stringify(requestOptions);\n\n useEffect(() => {\n if (requestOptions) {\n try {\n validateAdRequestOptions(requestOptions);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`BannerAd: ${e.message}`);\n }\n }\n }\n }, [parsedRequestOptions]);\n\n function onNativeEvent({ nativeEvent }: { nativeEvent: NativeEvent }) {\n const { type } = nativeEvent;\n\n if (type !== 'onSizeChange' && isFunction(props[type])) {\n let eventHandler, eventPayload;\n switch (type) {\n case 'onAdLoaded':\n eventPayload = {\n width: nativeEvent.width,\n height: nativeEvent.height,\n };\n if ((eventHandler = props[type])) eventHandler(eventPayload);\n break;\n case 'onAdFailedToLoad':\n eventPayload = NativeError.fromEvent(nativeEvent, 'googleMobileAds');\n if ((eventHandler = props[type])) eventHandler(eventPayload);\n break;\n case 'onAppEvent':\n eventPayload = {\n name: nativeEvent.name,\n data: nativeEvent.data,\n };\n if ((eventHandler = props[type])) eventHandler(eventPayload);\n break;\n default:\n if ((eventHandler = props[type])) eventHandler();\n }\n }\n\n if (type === 'onAdLoaded' || type === 'onSizeChange') {\n const { width, height } = nativeEvent;\n if (width && height) setDimensions([width, height]);\n }\n }\n\n const style = sizes.includes(BannerAdSize.FLUID)\n ? {\n width: '100%',\n height: dimensions[1],\n }\n : {\n width: dimensions[0],\n height: dimensions[1],\n };\n\n return (\n <GoogleMobileAdsBannerView\n ref={ref}\n sizes={sizes}\n style={style}\n unitId={unitId}\n request={validateAdRequestOptions(requestOptions)}\n manualImpressionsEnabled={!!manualImpressionsEnabled}\n onNativeEvent={onNativeEvent}\n />\n );\n },\n);\nBaseAd.displayName = 'BaseAd';\n\ninterface NativeBannerProps {\n sizes: GAMBannerAdProps['sizes'];\n style: {\n width?: number | string;\n height?: number | string;\n };\n unitId: string;\n request: RequestOptions;\n manualImpressionsEnabled: boolean;\n onNativeEvent: (event: { nativeEvent: NativeEvent }) => void;\n}\n\nconst GoogleMobileAdsBannerView = requireNativeComponent<NativeBannerProps>(\n 'RNGoogleMobileAdsBannerView',\n);\nexport type GoogleMobileAdsBannerView = React.Component<NativeBannerProps> & NativeMethods;\n"],"mappings":"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"}
1
+ {"version":3,"names":["sizeRegex","BaseAd","React","forwardRef","ref","unitId","sizes","requestOptions","manualImpressionsEnabled","props","dimensions","setDimensions","useState","useEffect","Error","length","every","size","BannerAdSize","test","parsedRequestOptions","JSON","stringify","validateAdRequestOptions","e","message","onNativeEvent","nativeEvent","type","isFunction","eventHandler","eventPayload","width","height","NativeError","fromEvent","name","data","style","includes","FLUID","displayName","GoogleMobileAdsBannerView","requireNativeComponent"],"sourceRoot":"../../src","sources":["BaseAd.tsx"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"names":["GAMBannerAd","React","Component","createRef","recordManualImpression","UIManager","dispatchViewManagerCommand","findNodeHandle","ref","current","undefined","render","props"],"sources":["GAMBannerAd.tsx"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport React, { createRef } from 'react';\nimport { findNodeHandle, UIManager } from 'react-native';\nimport { GAMBannerAdProps } from '../types/BannerAdProps';\nimport { BaseAd, GoogleMobileAdsBannerView } from './BaseAd';\n\nexport class GAMBannerAd extends React.Component<GAMBannerAdProps> {\n private ref = createRef<GoogleMobileAdsBannerView>();\n\n recordManualImpression() {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(this.ref.current),\n 'recordManualImpression',\n undefined,\n );\n }\n\n render() {\n return <BaseAd ref={this.ref} {...this.props} />;\n }\n}\n"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAA6D;AAAA;AAAA;AAAA;AAEtD,MAAMA,WAAW,SAASC,cAAK,CAACC,SAAS,CAAmB;EAAA;IAAA;IAAA,0CACnD,IAAAC,gBAAS,GAA6B;EAAA;EAEpDC,sBAAsB,GAAG;IACvBC,sBAAS,CAACC,0BAA0B,CAClC,IAAAC,2BAAc,EAAC,IAAI,CAACC,GAAG,CAACC,OAAO,CAAC,EAChC,wBAAwB,EACxBC,SAAS,CACV;EACH;EAEAC,MAAM,GAAG;IACP,oBAAO,6BAAC,cAAM;MAAC,GAAG,EAAE,IAAI,CAACH;IAAI,GAAK,IAAI,CAACI,KAAK,EAAI;EAClD;AACF;AAAC"}
1
+ {"version":3,"names":["GAMBannerAd","React","Component","createRef","recordManualImpression","UIManager","dispatchViewManagerCommand","findNodeHandle","ref","current","undefined","render","props"],"sourceRoot":"../../src","sources":["GAMBannerAd.tsx"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAA6D;AAAA;AAAA;AAAA;AAEtD,MAAMA,WAAW,SAASC,cAAK,CAACC,SAAS,CAAmB;EAAA;IAAA;IAAA,0CACnD,IAAAC,gBAAS,GAA6B;EAAA;EAEpDC,sBAAsB,GAAG;IACvBC,sBAAS,CAACC,0BAA0B,CAClC,IAAAC,2BAAc,EAAC,IAAI,CAACC,GAAG,CAACC,OAAO,CAAC,EAChC,wBAAwB,EACxBC,SAAS,CACV;EACH;EAEAC,MAAM,GAAG;IACP,oBAAO,6BAAC,cAAM;MAAC,GAAG,EAAE,IAAI,CAACH;IAAI,GAAK,IAAI,CAACI,KAAK,EAAI;EAClD;AACF;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["GAMInterstitialAd","InterstitialAd","createForAdRequest","adUnitId","requestOptions","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sources":["GAMInterstitialAd.ts"],"sourcesContent":["import { AdEventType } from '../AdEventType';\nimport { GAMAdEventType } from '../GAMAdEventType';\nimport { AdEventListener } from '../types/AdEventListener';\nimport { AdEventsListener } from '../types/AdEventsListener';\nimport { RequestOptions } from '../types/RequestOptions';\nimport { InterstitialAd } from './InterstitialAd';\n\nexport class GAMInterstitialAd extends InterstitialAd {\n /**\n * Creates a new GAMInterstitialAd instance.\n *\n * #### Example\n *\n * ```js\n * import { GAMInterstitialAd, AdEventType, TestIds } from 'react-native-google-mobile-ads';\n *\n * const interstitialAd = await GAMInterstitialAd.createForAdRequest(TestIds.GAM_INTERSTITIAL, {\n * requestAgent: 'CoolAds',\n * });\n *\n * interstitialAd.addAdEventListener(AdEventType.Loaded, () => {\n * interstitialAd.show();\n * });\n *\n * interstitialAd.load();\n * ```\n *\n * @param adUnitId The Ad Unit ID for the Interstitial. You can find this on your Google Mobile Ads dashboard.\n * @param requestOptions Optional RequestOptions used to load the ad.\n */\n static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions) {\n return super.createForAdRequest(adUnitId, requestOptions) as GAMInterstitialAd;\n }\n\n addAdEventsListener<T extends AdEventType | GAMAdEventType>(listener: AdEventsListener<T>) {\n return this._addAdEventsListener(listener);\n }\n\n addAdEventListener<T extends AdEventType | GAMAdEventType>(\n type: T,\n listener: AdEventListener<T>,\n ) {\n return this._addAdEventListener(type, listener);\n }\n}\n"],"mappings":";;;;;;AAKA;AAEO,MAAMA,iBAAiB,SAASC,8BAAc,CAAC;EACpD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,OAAO,KAAK,CAACF,kBAAkB,CAACC,QAAQ,EAAEC,cAAc,CAAC;EAC3D;EAEAC,mBAAmB,CAAyCC,QAA6B,EAAE;IACzF,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAChBC,IAAO,EACPH,QAA4B,EAC5B;IACA,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC"}
1
+ {"version":3,"names":["GAMInterstitialAd","InterstitialAd","createForAdRequest","adUnitId","requestOptions","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sourceRoot":"../../src","sources":["GAMInterstitialAd.ts"],"mappings":";;;;;;AAKA;AAEO,MAAMA,iBAAiB,SAASC,8BAAc,CAAC;EACpD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,OAAO,KAAK,CAACF,kBAAkB,CAACC,QAAQ,EAAEC,cAAc,CAAC;EAC3D;EAEAC,mBAAmB,CAAyCC,QAA6B,EAAE;IACzF,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAChBC,IAAO,EACPH,QAA4B,EAC5B;IACA,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["InterstitialAd","MobileAd","createForAdRequest","adUnitId","requestOptions","isString","Error","options","validateAdRequestOptions","e","message","requestId","_interstitialRequest","MobileAds","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sources":["InterstitialAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isString } from '../common';\nimport { MobileAds } from '../MobileAds';\nimport { validateAdRequestOptions } from '../validateAdRequestOptions';\nimport { MobileAd } from './MobileAd';\nimport { AdEventType } from '../AdEventType';\nimport { AdEventListener } from '../types/AdEventListener';\nimport { AdEventsListener } from '../types/AdEventsListener';\nimport { RequestOptions } from '../types/RequestOptions';\n\n/**\n * A class for interacting and showing Interstitial Ads.\n *\n * An Interstitial advert can be pre-loaded and shown at a suitable point in your apps flow, such as at the end of a level\n * in a game. An Interstitial is a full screen advert, laid on-top of your entire application which the user can interact with.\n * Interactions are passed back via events which should be handled accordingly inside of your app.\n *\n * #### Example\n *\n * First create a new Interstitial instance, passing in your Ad Unit ID from the Google Mobile Ads configuration console, and any additional\n * request options. The example below will present a test advert, and only request a non-personalized ad.\n *\n * ```js\n * import { InterstitialAd, TestIds } from 'react-native-google-mobile-ads';\n *\n * const interstitial = InterstitialAd.createForAdRequest(TestIds.INTERSTITIAL, {\n * requestNonPersonalizedAdsOnly: true,\n * });\n * ```\n *\n * Each advert needs to be loaded from Google Mobile Ads before being shown. It is recommended this is performed before the user\n * reaches the checkpoint to show the advert, so it's ready to go. Before loading the advert, we need to setup\n * event listeners to listen for updates from Google Mobile Ads, such as advert loaded or failed to load.\n *\n * Event types match the `AdEventType` interface. Once the advert has loaded, we can trigger it to show:\n *\n * ```js\n * import { AdEventType } from 'react-native-google-mobile-ads';\n *\n * interstitialAd.addAdEventListener(AdEventType.Loaded, () => {\n * interstitialAd.show();\n * });\n *\n * interstitial.load();\n * ```\n *\n * The advert will be presented to the user, and several more events can be triggered such as the user clicking the\n * advert or closing it.\n */\nexport class InterstitialAd extends MobileAd {\n protected static _interstitialRequest = 0;\n /**\n * Creates a new InterstitialAd instance.\n *\n * #### Example\n *\n * ```js\n * import { InterstitialAd, AdEventType, TestIds } from 'react-native-google-mobile-ads';\n *\n * const interstitialAd = await InterstitialAd.createForAdRequest(TestIds.INTERSTITIAL, {\n * requestAgent: 'CoolAds',\n * });\n *\n * interstitialAd.addAdEventListener(AdEventType.Loaded, () => {\n * interstitialAd.show();\n * });\n *\n * interstitialAd.load();\n * ```\n *\n * @param adUnitId The Ad Unit ID for the Interstitial. You can find this on your Google Mobile Ads dashboard.\n * @param requestOptions Optional RequestOptions used to load the ad.\n */\n static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions) {\n if (!isString(adUnitId)) {\n throw new Error(\"InterstitialAd.createForAdRequest(*) 'adUnitId' expected an string value.\");\n }\n\n let options = {};\n try {\n options = validateAdRequestOptions(requestOptions);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`InterstitialAd.createForAdRequest(_, *) ${e.message}.`);\n }\n }\n\n const requestId = InterstitialAd._interstitialRequest++;\n return new InterstitialAd('interstitial', MobileAds(), requestId, adUnitId, options);\n }\n\n addAdEventsListener<T extends AdEventType>(listener: AdEventsListener<T>) {\n return this._addAdEventsListener(listener);\n }\n\n addAdEventListener<T extends AdEventType>(type: T, listener: AdEventListener<T>) {\n return this._addAdEventListener(type, listener);\n }\n}\n"],"mappings":";;;;;;AAiBA;AACA;AACA;AACA;AAAsC;AAMtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,SAASC,kBAAQ,CAAC;EAE3C;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAAC,IAAAC,gBAAQ,EAACF,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIG,KAAK,CAAC,2EAA2E,CAAC;IAC9F;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAG,IAAAC,kDAAwB,EAACJ,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOK,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYH,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,2CAA0CG,CAAC,CAACC,OAAQ,GAAE,CAAC;MAC1E;IACF;IAEA,MAAMC,SAAS,GAAGX,cAAc,CAACY,oBAAoB,EAAE;IACvD,OAAO,IAAIZ,cAAc,CAAC,cAAc,EAAE,IAAAa,oBAAS,GAAE,EAAEF,SAAS,EAAER,QAAQ,EAAEI,OAAO,CAAC;EACtF;EAEAO,mBAAmB,CAAwBC,QAA6B,EAAE;IACxE,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAAwBC,IAAO,EAAEH,QAA4B,EAAE;IAC/E,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC;AAAA,gBAjDYf,cAAc,0BACe,CAAC"}
1
+ {"version":3,"names":["InterstitialAd","MobileAd","createForAdRequest","adUnitId","requestOptions","isString","Error","options","validateAdRequestOptions","e","message","requestId","_interstitialRequest","MobileAds","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sourceRoot":"../../src","sources":["InterstitialAd.ts"],"mappings":";;;;;;AAiBA;AACA;AACA;AACA;AAAsC;AAMtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,SAASC,kBAAQ,CAAC;EAE3C;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAAC,IAAAC,gBAAQ,EAACF,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIG,KAAK,CAAC,2EAA2E,CAAC;IAC9F;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAG,IAAAC,kDAAwB,EAACJ,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOK,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYH,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,2CAA0CG,CAAC,CAACC,OAAQ,GAAE,CAAC;MAC1E;IACF;IAEA,MAAMC,SAAS,GAAGX,cAAc,CAACY,oBAAoB,EAAE;IACvD,OAAO,IAAIZ,cAAc,CAAC,cAAc,EAAE,IAAAa,oBAAS,GAAE,EAAEF,SAAS,EAAER,QAAQ,EAAEI,OAAO,CAAC;EACtF;EAEAO,mBAAmB,CAAwBC,QAA6B,EAAE;IACxE,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAAwBC,IAAO,EAAEH,QAA4B,EAAE;IAC/E,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC;AAAA,gBAjDYf,cAAc,0BACe,CAAC"}
@@ -59,6 +59,10 @@ class MobileAd {
59
59
  this._loaded = false;
60
60
  this._isLoadCalled = false;
61
61
  }
62
+ if (type === _AdEventType.AdEventType.ERROR) {
63
+ this._loaded = false;
64
+ this._isLoadCalled = false;
65
+ }
62
66
  let payload = data;
63
67
  if (error) {
64
68
  payload = _NativeError.NativeError.fromEvent(error, 'googleMobileAds');