@javascriptcommon/react-native-google-mobile-ads 16.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (626) hide show
  1. package/LICENSE +32 -0
  2. package/README.md +181 -0
  3. package/RNGoogleMobileAds.podspec +74 -0
  4. package/__tests__/banner.test.tsx +53 -0
  5. package/__tests__/consent.test.ts +33 -0
  6. package/__tests__/googleMobileAds.test.ts +108 -0
  7. package/__tests__/interstitial.test.ts +140 -0
  8. package/__tests__/nativeEventEmitter.test.ts +72 -0
  9. package/__tests__/requestOptions.test.tsx +82 -0
  10. package/__tests__/rewarded.test.tsx +4 -0
  11. package/__tests__/showOptions.test.tsx +4 -0
  12. package/android/.editorconfig +10 -0
  13. package/android/app-json.gradle +69 -0
  14. package/android/build.gradle +149 -0
  15. package/android/lint.xml +5 -0
  16. package/android/settings.gradle +1 -0
  17. package/android/src/main/AndroidManifest.xml +23 -0
  18. package/android/src/main/java/io/invertase/googlemobileads/OnNativeEvent.kt +23 -0
  19. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeAppModule.java +152 -0
  20. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsAppOpenModule.kt +92 -0
  21. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsBannerAdViewManager.java +303 -0
  22. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsCommon.java +277 -0
  23. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsConsentModule.java +293 -0
  24. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsEvent.java +76 -0
  25. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsFullScreenAdModule.kt +201 -0
  26. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsInterstitialModule.kt +92 -0
  27. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsMediaViewManager.java +79 -0
  28. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsModule.kt +178 -0
  29. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsNativeAdViewManager.java +164 -0
  30. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsNativeModule.kt +172 -0
  31. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsPackage.kt +113 -0
  32. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsRewardedInterstitialModule.kt +127 -0
  33. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsRewardedModule.kt +121 -0
  34. package/android/src/main/java/io/invertase/googlemobileads/common/RCTConvert.java +111 -0
  35. package/android/src/main/java/io/invertase/googlemobileads/common/ReactNativeAdView.java +128 -0
  36. package/android/src/main/java/io/invertase/googlemobileads/common/ReactNativeApp.java +34 -0
  37. package/android/src/main/java/io/invertase/googlemobileads/common/ReactNativeEvent.java +41 -0
  38. package/android/src/main/java/io/invertase/googlemobileads/common/ReactNativeEventEmitter.java +150 -0
  39. package/android/src/main/java/io/invertase/googlemobileads/common/ReactNativeInitProvider.java +77 -0
  40. package/android/src/main/java/io/invertase/googlemobileads/common/ReactNativeJSON.java +107 -0
  41. package/android/src/main/java/io/invertase/googlemobileads/common/ReactNativeMeta.java +92 -0
  42. package/android/src/main/java/io/invertase/googlemobileads/common/ReactNativeModule.java +96 -0
  43. package/android/src/main/java/io/invertase/googlemobileads/common/ReactNativePreferences.java +86 -0
  44. package/android/src/main/java/io/invertase/googlemobileads/common/SharedUtils.java +429 -0
  45. package/android/src/main/java/io/invertase/googlemobileads/common/TaskExecutorService.java +124 -0
  46. package/android/src/main/java/io/invertase/googlemobileads/interfaces/ContextProvider.java +30 -0
  47. package/android/src/main/java/io/invertase/googlemobileads/interfaces/NativeError.java +28 -0
  48. package/android/src/main/java/io/invertase/googlemobileads/interfaces/NativeEvent.java +26 -0
  49. package/android/src/oldarch/com/facebook/react/viewmanagers/RNGoogleMobileAdsMediaViewManagerDelegate.java +32 -0
  50. package/android/src/oldarch/com/facebook/react/viewmanagers/RNGoogleMobileAdsMediaViewManagerInterface.java +10 -0
  51. package/android/src/oldarch/com/facebook/react/viewmanagers/RNGoogleMobileAdsNativeViewManagerDelegate.java +36 -0
  52. package/android/src/oldarch/com/facebook/react/viewmanagers/RNGoogleMobileAdsNativeViewManagerInterface.java +10 -0
  53. package/android/src/oldarch/io/invertase/googlemobileads/NativeGoogleMobileAdsNativeModuleSpec.kt +18 -0
  54. package/app.plugin.js +1 -0
  55. package/babel.config.js +8 -0
  56. package/docs/ad-inspector.mdx +47 -0
  57. package/docs/common-reasons-for-ads-not-showing.mdx +111 -0
  58. package/docs/displaying-ads-hook.mdx +103 -0
  59. package/docs/displaying-ads.mdx +512 -0
  60. package/docs/european-user-consent.mdx +315 -0
  61. package/docs/img/logo_admob_192px.svg +19 -0
  62. package/docs/impression-level-ad-revenue.mdx +41 -0
  63. package/docs/index.mdx +508 -0
  64. package/docs/mediation.mdx +323 -0
  65. package/docs/migrating-to-v15.mdx +7 -0
  66. package/docs/migrating-to-v5.mdx +63 -0
  67. package/docs/migrating-to-v6.mdx +111 -0
  68. package/docs/native-ads.mdx +385 -0
  69. package/docs/testing.mdx +17 -0
  70. package/docs/video-ad_volume-control.mdx +49 -0
  71. package/docs.json +36 -0
  72. package/ios/RNGoogleMobileAds/RNGoogleMobileAds-Bridging-Header.h +5 -0
  73. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsAppOpenModule.h +36 -0
  74. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsAppOpenModule.mm +104 -0
  75. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsBannerComponent.h +44 -0
  76. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsBannerComponent.m +221 -0
  77. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsBannerView.h +34 -0
  78. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsBannerView.mm +282 -0
  79. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsBannerViewManager.mm +87 -0
  80. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsCommon.h +72 -0
  81. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsCommon.mm +248 -0
  82. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsConsentModule.h +36 -0
  83. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsConsentModule.mm +356 -0
  84. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsFullScreenAd.h +53 -0
  85. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsFullScreenAd.mm +220 -0
  86. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsFullScreenContentDelegate.h +36 -0
  87. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsFullScreenContentDelegate.mm +80 -0
  88. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsInterstitialModule.h +36 -0
  89. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsInterstitialModule.mm +106 -0
  90. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsMediaView.h +52 -0
  91. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsMediaView.mm +155 -0
  92. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsModule.h +32 -0
  93. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsModule.mm +180 -0
  94. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsNativeModule.h +35 -0
  95. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsNativeModule.mm +321 -0
  96. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsNativeView.h +51 -0
  97. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsNativeView.mm +251 -0
  98. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsRewardedInterstitialModule.h +37 -0
  99. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsRewardedInterstitialModule.mm +106 -0
  100. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsRewardedModule.h +36 -0
  101. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsRewardedModule.mm +104 -0
  102. package/ios/RNGoogleMobileAds/common/RNAppModule.h +24 -0
  103. package/ios/RNGoogleMobileAds/common/RNAppModule.mm +95 -0
  104. package/ios/RNGoogleMobileAds/common/RNRCTEventEmitter.h +73 -0
  105. package/ios/RNGoogleMobileAds/common/RNRCTEventEmitter.mm +150 -0
  106. package/ios/RNGoogleMobileAds/common/RNSharedUtils.h +43 -0
  107. package/ios/RNGoogleMobileAds/common/RNSharedUtils.mm +34 -0
  108. package/ios/RNGoogleMobileAds.xcodeproj/project.pbxproj +377 -0
  109. package/ios/RNGoogleMobileAds.xcodeproj/xcshareddata/IDETemplateMacros.plist +24 -0
  110. package/ios_config.sh +192 -0
  111. package/jest.config.js +7 -0
  112. package/jest.setup.ts +92 -0
  113. package/lib/commonjs/AdEventType.js +72 -0
  114. package/lib/commonjs/AdEventType.js.map +1 -0
  115. package/lib/commonjs/AdsConsent.js +117 -0
  116. package/lib/commonjs/AdsConsent.js.map +1 -0
  117. package/lib/commonjs/AdsConsentPurposes.js +180 -0
  118. package/lib/commonjs/AdsConsentPurposes.js.map +1 -0
  119. package/lib/commonjs/AdsConsentSpecialFeatures.js +54 -0
  120. package/lib/commonjs/AdsConsentSpecialFeatures.js.map +1 -0
  121. package/lib/commonjs/BannerAdSize.js +75 -0
  122. package/lib/commonjs/BannerAdSize.js.map +1 -0
  123. package/lib/commonjs/GAMAdEventType.js +44 -0
  124. package/lib/commonjs/GAMAdEventType.js.map +1 -0
  125. package/lib/commonjs/MaxAdContentRating.js +42 -0
  126. package/lib/commonjs/MaxAdContentRating.js.map +1 -0
  127. package/lib/commonjs/MobileAds.js +63 -0
  128. package/lib/commonjs/MobileAds.js.map +1 -0
  129. package/lib/commonjs/NativeAdEventType.js +50 -0
  130. package/lib/commonjs/NativeAdEventType.js.map +1 -0
  131. package/lib/commonjs/RewardedAdEventType.js +66 -0
  132. package/lib/commonjs/RewardedAdEventType.js.map +1 -0
  133. package/lib/commonjs/TestIds.js +66 -0
  134. package/lib/commonjs/TestIds.js.map +1 -0
  135. package/lib/commonjs/ads/AppOpenAd.js +54 -0
  136. package/lib/commonjs/ads/AppOpenAd.js.map +1 -0
  137. package/lib/commonjs/ads/BannerAd.js +45 -0
  138. package/lib/commonjs/ads/BannerAd.js.map +1 -0
  139. package/lib/commonjs/ads/BaseAd.js +155 -0
  140. package/lib/commonjs/ads/BaseAd.js.map +1 -0
  141. package/lib/commonjs/ads/GAMBannerAd.js +49 -0
  142. package/lib/commonjs/ads/GAMBannerAd.js.map +1 -0
  143. package/lib/commonjs/ads/GAMInterstitialAd.js +42 -0
  144. package/lib/commonjs/ads/GAMInterstitialAd.js.map +1 -0
  145. package/lib/commonjs/ads/InterstitialAd.js +115 -0
  146. package/lib/commonjs/ads/InterstitialAd.js.map +1 -0
  147. package/lib/commonjs/ads/MobileAd.js +153 -0
  148. package/lib/commonjs/ads/MobileAd.js.map +1 -0
  149. package/lib/commonjs/ads/RewardedAd.js +128 -0
  150. package/lib/commonjs/ads/RewardedAd.js.map +1 -0
  151. package/lib/commonjs/ads/RewardedInterstitialAd.js +128 -0
  152. package/lib/commonjs/ads/RewardedInterstitialAd.js.map +1 -0
  153. package/lib/commonjs/ads/native-ad/NativeAd.js +123 -0
  154. package/lib/commonjs/ads/native-ad/NativeAd.js.map +1 -0
  155. package/lib/commonjs/ads/native-ad/NativeAdContext.js +26 -0
  156. package/lib/commonjs/ads/native-ad/NativeAdContext.js.map +1 -0
  157. package/lib/commonjs/ads/native-ad/NativeAdView.js +52 -0
  158. package/lib/commonjs/ads/native-ad/NativeAdView.js.map +1 -0
  159. package/lib/commonjs/ads/native-ad/NativeAsset.js +70 -0
  160. package/lib/commonjs/ads/native-ad/NativeAsset.js.map +1 -0
  161. package/lib/commonjs/ads/native-ad/NativeMediaView.js +61 -0
  162. package/lib/commonjs/ads/native-ad/NativeMediaView.js.map +1 -0
  163. package/lib/commonjs/common/constants.js +17 -0
  164. package/lib/commonjs/common/constants.js.map +1 -0
  165. package/lib/commonjs/common/debounce.js +18 -0
  166. package/lib/commonjs/common/debounce.js.map +1 -0
  167. package/lib/commonjs/common/index.js +47 -0
  168. package/lib/commonjs/common/index.js.map +1 -0
  169. package/lib/commonjs/common/ref.js +46 -0
  170. package/lib/commonjs/common/ref.js.map +1 -0
  171. package/lib/commonjs/common/validate.js +132 -0
  172. package/lib/commonjs/common/validate.js.map +1 -0
  173. package/lib/commonjs/declarations.d.js +2 -0
  174. package/lib/commonjs/declarations.d.js.map +1 -0
  175. package/lib/commonjs/hooks/useAppOpenAd.js +44 -0
  176. package/lib/commonjs/hooks/useAppOpenAd.js.map +1 -0
  177. package/lib/commonjs/hooks/useForeground.js +45 -0
  178. package/lib/commonjs/hooks/useForeground.js.map +1 -0
  179. package/lib/commonjs/hooks/useFullScreenAd.js +121 -0
  180. package/lib/commonjs/hooks/useFullScreenAd.js.map +1 -0
  181. package/lib/commonjs/hooks/useInterstitialAd.js +44 -0
  182. package/lib/commonjs/hooks/useInterstitialAd.js.map +1 -0
  183. package/lib/commonjs/hooks/useRewardedAd.js +44 -0
  184. package/lib/commonjs/hooks/useRewardedAd.js.map +1 -0
  185. package/lib/commonjs/hooks/useRewardedInterstitialAd.js +44 -0
  186. package/lib/commonjs/hooks/useRewardedInterstitialAd.js.map +1 -0
  187. package/lib/commonjs/index.js +337 -0
  188. package/lib/commonjs/index.js.map +1 -0
  189. package/lib/commonjs/internal/GoogleMobileAdsNativeEventEmitter.js +54 -0
  190. package/lib/commonjs/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -0
  191. package/lib/commonjs/internal/NativeError.js +53 -0
  192. package/lib/commonjs/internal/NativeError.js.map +1 -0
  193. package/lib/commonjs/internal/SharedEventEmitter.js +27 -0
  194. package/lib/commonjs/internal/SharedEventEmitter.js.map +1 -0
  195. package/lib/commonjs/package.json +1 -0
  196. package/lib/commonjs/specs/components/GoogleMobileAdsBannerViewNativeComponent.ts +62 -0
  197. package/lib/commonjs/specs/components/GoogleMobileAdsMediaViewNativeComponent.ts +30 -0
  198. package/lib/commonjs/specs/components/GoogleMobileAdsNativeViewNativeComponent.ts +45 -0
  199. package/lib/commonjs/specs/modules/NativeAppModule.js +24 -0
  200. package/lib/commonjs/specs/modules/NativeAppModule.js.map +1 -0
  201. package/lib/commonjs/specs/modules/NativeAppOpenModule.js +25 -0
  202. package/lib/commonjs/specs/modules/NativeAppOpenModule.js.map +1 -0
  203. package/lib/commonjs/specs/modules/NativeConsentModule.js +105 -0
  204. package/lib/commonjs/specs/modules/NativeConsentModule.js.map +1 -0
  205. package/lib/commonjs/specs/modules/NativeGoogleMobileAdsModule.js +25 -0
  206. package/lib/commonjs/specs/modules/NativeGoogleMobileAdsModule.js.map +1 -0
  207. package/lib/commonjs/specs/modules/NativeGoogleMobileAdsNativeModule.js +25 -0
  208. package/lib/commonjs/specs/modules/NativeGoogleMobileAdsNativeModule.js.map +1 -0
  209. package/lib/commonjs/specs/modules/NativeInterstitialModule.js +25 -0
  210. package/lib/commonjs/specs/modules/NativeInterstitialModule.js.map +1 -0
  211. package/lib/commonjs/specs/modules/NativeRewardedInterstitialModule.js +25 -0
  212. package/lib/commonjs/specs/modules/NativeRewardedInterstitialModule.js.map +1 -0
  213. package/lib/commonjs/specs/modules/NativeRewardedModule.js +25 -0
  214. package/lib/commonjs/specs/modules/NativeRewardedModule.js.map +1 -0
  215. package/lib/commonjs/types/AdEventListener.js +6 -0
  216. package/lib/commonjs/types/AdEventListener.js.map +1 -0
  217. package/lib/commonjs/types/AdEventsListener.js +6 -0
  218. package/lib/commonjs/types/AdEventsListener.js.map +1 -0
  219. package/lib/commonjs/types/AdShowOptions.js +2 -0
  220. package/lib/commonjs/types/AdShowOptions.js.map +1 -0
  221. package/lib/commonjs/types/AdStates.js +6 -0
  222. package/lib/commonjs/types/AdStates.js.map +1 -0
  223. package/lib/commonjs/types/AdapterStatus.js +21 -0
  224. package/lib/commonjs/types/AdapterStatus.js.map +1 -0
  225. package/lib/commonjs/types/AppEvent.js +2 -0
  226. package/lib/commonjs/types/AppEvent.js.map +1 -0
  227. package/lib/commonjs/types/BannerAdProps.js +6 -0
  228. package/lib/commonjs/types/BannerAdProps.js.map +1 -0
  229. package/lib/commonjs/types/MobileAd.interface.js +6 -0
  230. package/lib/commonjs/types/MobileAd.interface.js.map +1 -0
  231. package/lib/commonjs/types/MobileAdsModule.interface.js +6 -0
  232. package/lib/commonjs/types/MobileAdsModule.interface.js.map +1 -0
  233. package/lib/commonjs/types/NativeAdRequestOptions.js +37 -0
  234. package/lib/commonjs/types/NativeAdRequestOptions.js.map +1 -0
  235. package/lib/commonjs/types/PaidEventListener.js +6 -0
  236. package/lib/commonjs/types/PaidEventListener.js.map +1 -0
  237. package/lib/commonjs/types/RequestConfiguration.js +6 -0
  238. package/lib/commonjs/types/RequestConfiguration.js.map +1 -0
  239. package/lib/commonjs/types/RequestOptions.js +2 -0
  240. package/lib/commonjs/types/RequestOptions.js.map +1 -0
  241. package/lib/commonjs/types/RewardedAdReward.js +2 -0
  242. package/lib/commonjs/types/RewardedAdReward.js.map +1 -0
  243. package/lib/commonjs/types/index.js +138 -0
  244. package/lib/commonjs/types/index.js.map +1 -0
  245. package/lib/commonjs/validateAdRequestConfiguration.js +57 -0
  246. package/lib/commonjs/validateAdRequestConfiguration.js.map +1 -0
  247. package/lib/commonjs/validateAdRequestOptions.js +121 -0
  248. package/lib/commonjs/validateAdRequestOptions.js.map +1 -0
  249. package/lib/commonjs/validateAdShowOptions.js +41 -0
  250. package/lib/commonjs/validateAdShowOptions.js.map +1 -0
  251. package/lib/commonjs/validateNativeAdRequestOptions.js +51 -0
  252. package/lib/commonjs/validateNativeAdRequestOptions.js.map +1 -0
  253. package/lib/commonjs/version.js +9 -0
  254. package/lib/commonjs/version.js.map +1 -0
  255. package/lib/module/AdEventType.js +69 -0
  256. package/lib/module/AdEventType.js.map +1 -0
  257. package/lib/module/AdsConsent.js +113 -0
  258. package/lib/module/AdsConsent.js.map +1 -0
  259. package/lib/module/AdsConsentPurposes.js +177 -0
  260. package/lib/module/AdsConsentPurposes.js.map +1 -0
  261. package/lib/module/AdsConsentSpecialFeatures.js +51 -0
  262. package/lib/module/AdsConsentSpecialFeatures.js.map +1 -0
  263. package/lib/module/BannerAdSize.js +72 -0
  264. package/lib/module/BannerAdSize.js.map +1 -0
  265. package/lib/module/GAMAdEventType.js +41 -0
  266. package/lib/module/GAMAdEventType.js.map +1 -0
  267. package/lib/module/MaxAdContentRating.js +39 -0
  268. package/lib/module/MaxAdContentRating.js.map +1 -0
  269. package/lib/module/MobileAds.js +57 -0
  270. package/lib/module/MobileAds.js.map +1 -0
  271. package/lib/module/NativeAdEventType.js +46 -0
  272. package/lib/module/NativeAdEventType.js.map +1 -0
  273. package/lib/module/RewardedAdEventType.js +63 -0
  274. package/lib/module/RewardedAdEventType.js.map +1 -0
  275. package/lib/module/TestIds.js +62 -0
  276. package/lib/module/TestIds.js.map +1 -0
  277. package/lib/module/ads/AppOpenAd.js +48 -0
  278. package/lib/module/ads/AppOpenAd.js.map +1 -0
  279. package/lib/module/ads/BannerAd.js +39 -0
  280. package/lib/module/ads/BannerAd.js.map +1 -0
  281. package/lib/module/ads/BaseAd.js +149 -0
  282. package/lib/module/ads/BaseAd.js.map +1 -0
  283. package/lib/module/ads/GAMBannerAd.js +43 -0
  284. package/lib/module/ads/GAMBannerAd.js.map +1 -0
  285. package/lib/module/ads/GAMInterstitialAd.js +37 -0
  286. package/lib/module/ads/GAMInterstitialAd.js.map +1 -0
  287. package/lib/module/ads/InterstitialAd.js +110 -0
  288. package/lib/module/ads/InterstitialAd.js.map +1 -0
  289. package/lib/module/ads/MobileAd.js +148 -0
  290. package/lib/module/ads/MobileAd.js.map +1 -0
  291. package/lib/module/ads/RewardedAd.js +123 -0
  292. package/lib/module/ads/RewardedAd.js.map +1 -0
  293. package/lib/module/ads/RewardedInterstitialAd.js +123 -0
  294. package/lib/module/ads/RewardedInterstitialAd.js.map +1 -0
  295. package/lib/module/ads/native-ad/NativeAd.js +117 -0
  296. package/lib/module/ads/native-ad/NativeAd.js.map +1 -0
  297. package/lib/module/ads/native-ad/NativeAdContext.js +22 -0
  298. package/lib/module/ads/native-ad/NativeAdContext.js.map +1 -0
  299. package/lib/module/ads/native-ad/NativeAdView.js +45 -0
  300. package/lib/module/ads/native-ad/NativeAdView.js.map +1 -0
  301. package/lib/module/ads/native-ad/NativeAsset.js +65 -0
  302. package/lib/module/ads/native-ad/NativeAsset.js.map +1 -0
  303. package/lib/module/ads/native-ad/NativeMediaView.js +54 -0
  304. package/lib/module/ads/native-ad/NativeMediaView.js.map +1 -0
  305. package/lib/module/common/constants.js +13 -0
  306. package/lib/module/common/constants.js.map +1 -0
  307. package/lib/module/common/debounce.js +13 -0
  308. package/lib/module/common/debounce.js.map +1 -0
  309. package/lib/module/common/index.js +28 -0
  310. package/lib/module/common/index.js.map +1 -0
  311. package/lib/module/common/ref.js +41 -0
  312. package/lib/module/common/ref.js.map +1 -0
  313. package/lib/module/common/validate.js +119 -0
  314. package/lib/module/common/validate.js.map +1 -0
  315. package/lib/module/declarations.d.js +2 -0
  316. package/lib/module/declarations.d.js.map +1 -0
  317. package/lib/module/hooks/useAppOpenAd.js +40 -0
  318. package/lib/module/hooks/useAppOpenAd.js.map +1 -0
  319. package/lib/module/hooks/useForeground.js +42 -0
  320. package/lib/module/hooks/useForeground.js.map +1 -0
  321. package/lib/module/hooks/useFullScreenAd.js +117 -0
  322. package/lib/module/hooks/useFullScreenAd.js.map +1 -0
  323. package/lib/module/hooks/useInterstitialAd.js +40 -0
  324. package/lib/module/hooks/useInterstitialAd.js.map +1 -0
  325. package/lib/module/hooks/useRewardedAd.js +40 -0
  326. package/lib/module/hooks/useRewardedAd.js.map +1 -0
  327. package/lib/module/hooks/useRewardedInterstitialAd.js +40 -0
  328. package/lib/module/hooks/useRewardedInterstitialAd.js.map +1 -0
  329. package/lib/module/index.js +54 -0
  330. package/lib/module/index.js.map +1 -0
  331. package/lib/module/internal/GoogleMobileAdsNativeEventEmitter.js +49 -0
  332. package/lib/module/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -0
  333. package/lib/module/internal/NativeError.js +48 -0
  334. package/lib/module/internal/NativeError.js.map +1 -0
  335. package/lib/module/internal/SharedEventEmitter.js +22 -0
  336. package/lib/module/internal/SharedEventEmitter.js.map +1 -0
  337. package/lib/module/specs/components/GoogleMobileAdsBannerViewNativeComponent.ts +62 -0
  338. package/lib/module/specs/components/GoogleMobileAdsMediaViewNativeComponent.ts +30 -0
  339. package/lib/module/specs/components/GoogleMobileAdsNativeViewNativeComponent.ts +45 -0
  340. package/lib/module/specs/modules/NativeAppModule.js +21 -0
  341. package/lib/module/specs/modules/NativeAppModule.js.map +1 -0
  342. package/lib/module/specs/modules/NativeAppOpenModule.js +22 -0
  343. package/lib/module/specs/modules/NativeAppOpenModule.js.map +1 -0
  344. package/lib/module/specs/modules/NativeConsentModule.js +108 -0
  345. package/lib/module/specs/modules/NativeConsentModule.js.map +1 -0
  346. package/lib/module/specs/modules/NativeGoogleMobileAdsModule.js +22 -0
  347. package/lib/module/specs/modules/NativeGoogleMobileAdsModule.js.map +1 -0
  348. package/lib/module/specs/modules/NativeGoogleMobileAdsNativeModule.js +22 -0
  349. package/lib/module/specs/modules/NativeGoogleMobileAdsNativeModule.js.map +1 -0
  350. package/lib/module/specs/modules/NativeInterstitialModule.js +22 -0
  351. package/lib/module/specs/modules/NativeInterstitialModule.js.map +1 -0
  352. package/lib/module/specs/modules/NativeRewardedInterstitialModule.js +22 -0
  353. package/lib/module/specs/modules/NativeRewardedInterstitialModule.js.map +1 -0
  354. package/lib/module/specs/modules/NativeRewardedModule.js +22 -0
  355. package/lib/module/specs/modules/NativeRewardedModule.js.map +1 -0
  356. package/lib/module/types/AdEventListener.js +4 -0
  357. package/lib/module/types/AdEventListener.js.map +1 -0
  358. package/lib/module/types/AdEventsListener.js +4 -0
  359. package/lib/module/types/AdEventsListener.js.map +1 -0
  360. package/lib/module/types/AdShowOptions.js +2 -0
  361. package/lib/module/types/AdShowOptions.js.map +1 -0
  362. package/lib/module/types/AdStates.js +4 -0
  363. package/lib/module/types/AdStates.js.map +1 -0
  364. package/lib/module/types/AdapterStatus.js +18 -0
  365. package/lib/module/types/AdapterStatus.js.map +1 -0
  366. package/lib/module/types/AppEvent.js +2 -0
  367. package/lib/module/types/AppEvent.js.map +1 -0
  368. package/lib/module/types/BannerAdProps.js +4 -0
  369. package/lib/module/types/BannerAdProps.js.map +1 -0
  370. package/lib/module/types/MobileAd.interface.js +4 -0
  371. package/lib/module/types/MobileAd.interface.js.map +1 -0
  372. package/lib/module/types/MobileAdsModule.interface.js +4 -0
  373. package/lib/module/types/MobileAdsModule.interface.js.map +1 -0
  374. package/lib/module/types/NativeAdRequestOptions.js +34 -0
  375. package/lib/module/types/NativeAdRequestOptions.js.map +1 -0
  376. package/lib/module/types/PaidEventListener.js +4 -0
  377. package/lib/module/types/PaidEventListener.js.map +1 -0
  378. package/lib/module/types/RequestConfiguration.js +4 -0
  379. package/lib/module/types/RequestConfiguration.js.map +1 -0
  380. package/lib/module/types/RequestOptions.js +2 -0
  381. package/lib/module/types/RequestOptions.js.map +1 -0
  382. package/lib/module/types/RewardedAdReward.js +2 -0
  383. package/lib/module/types/RewardedAdReward.js.map +1 -0
  384. package/lib/module/types/index.js +32 -0
  385. package/lib/module/types/index.js.map +1 -0
  386. package/lib/module/validateAdRequestConfiguration.js +53 -0
  387. package/lib/module/validateAdRequestConfiguration.js.map +1 -0
  388. package/lib/module/validateAdRequestOptions.js +117 -0
  389. package/lib/module/validateAdRequestOptions.js.map +1 -0
  390. package/lib/module/validateAdShowOptions.js +37 -0
  391. package/lib/module/validateAdShowOptions.js.map +1 -0
  392. package/lib/module/validateNativeAdRequestOptions.js +47 -0
  393. package/lib/module/validateNativeAdRequestOptions.js.map +1 -0
  394. package/lib/module/version.js +5 -0
  395. package/lib/module/version.js.map +1 -0
  396. package/lib/typescript/AdEventType.d.ts +49 -0
  397. package/lib/typescript/AdEventType.d.ts.map +1 -0
  398. package/lib/typescript/AdsConsent.d.ts +3 -0
  399. package/lib/typescript/AdsConsent.d.ts.map +1 -0
  400. package/lib/typescript/AdsConsentPurposes.d.ts +149 -0
  401. package/lib/typescript/AdsConsentPurposes.d.ts.map +1 -0
  402. package/lib/typescript/AdsConsentSpecialFeatures.d.ts +23 -0
  403. package/lib/typescript/AdsConsentSpecialFeatures.d.ts.map +1 -0
  404. package/lib/typescript/BannerAdSize.d.ts +91 -0
  405. package/lib/typescript/BannerAdSize.d.ts.map +1 -0
  406. package/lib/typescript/GAMAdEventType.d.ts +21 -0
  407. package/lib/typescript/GAMAdEventType.d.ts.map +1 -0
  408. package/lib/typescript/MaxAdContentRating.d.ts +19 -0
  409. package/lib/typescript/MaxAdContentRating.d.ts.map +1 -0
  410. package/lib/typescript/MobileAds.d.ts +15 -0
  411. package/lib/typescript/MobileAds.d.ts.map +1 -0
  412. package/lib/typescript/NativeAdEventType.d.ts +43 -0
  413. package/lib/typescript/NativeAdEventType.d.ts.map +1 -0
  414. package/lib/typescript/RewardedAdEventType.d.ts +43 -0
  415. package/lib/typescript/RewardedAdEventType.d.ts.map +1 -0
  416. package/lib/typescript/TestIds.d.ts +19 -0
  417. package/lib/typescript/TestIds.d.ts.map +1 -0
  418. package/lib/typescript/ads/AppOpenAd.d.ts +12 -0
  419. package/lib/typescript/ads/AppOpenAd.d.ts.map +1 -0
  420. package/lib/typescript/ads/BannerAd.d.ts +8 -0
  421. package/lib/typescript/ads/BannerAd.d.ts.map +1 -0
  422. package/lib/typescript/ads/BaseAd.d.ts +4 -0
  423. package/lib/typescript/ads/BaseAd.d.ts.map +1 -0
  424. package/lib/typescript/ads/GAMBannerAd.d.ts +9 -0
  425. package/lib/typescript/ads/GAMBannerAd.d.ts.map +1 -0
  426. package/lib/typescript/ads/GAMInterstitialAd.d.ts +34 -0
  427. package/lib/typescript/ads/GAMInterstitialAd.d.ts.map +1 -0
  428. package/lib/typescript/ads/InterstitialAd.d.ts +73 -0
  429. package/lib/typescript/ads/InterstitialAd.d.ts.map +1 -0
  430. package/lib/typescript/ads/MobileAd.d.ts +54 -0
  431. package/lib/typescript/ads/MobileAd.d.ts.map +1 -0
  432. package/lib/typescript/ads/RewardedAd.d.ts +83 -0
  433. package/lib/typescript/ads/RewardedAd.d.ts.map +1 -0
  434. package/lib/typescript/ads/RewardedInterstitialAd.d.ts +83 -0
  435. package/lib/typescript/ads/RewardedInterstitialAd.d.ts.map +1 -0
  436. package/lib/typescript/ads/native-ad/NativeAd.d.ts +48 -0
  437. package/lib/typescript/ads/native-ad/NativeAd.d.ts.map +1 -0
  438. package/lib/typescript/ads/native-ad/NativeAdContext.d.ts +10 -0
  439. package/lib/typescript/ads/native-ad/NativeAdContext.d.ts.map +1 -0
  440. package/lib/typescript/ads/native-ad/NativeAdView.d.ts +8 -0
  441. package/lib/typescript/ads/native-ad/NativeAdView.d.ts.map +1 -0
  442. package/lib/typescript/ads/native-ad/NativeAsset.d.ts +18 -0
  443. package/lib/typescript/ads/native-ad/NativeAsset.d.ts.map +1 -0
  444. package/lib/typescript/ads/native-ad/NativeMediaView.d.ts +7 -0
  445. package/lib/typescript/ads/native-ad/NativeMediaView.d.ts.map +1 -0
  446. package/lib/typescript/common/constants.d.ts +7 -0
  447. package/lib/typescript/common/constants.d.ts.map +1 -0
  448. package/lib/typescript/common/debounce.d.ts +2 -0
  449. package/lib/typescript/common/debounce.d.ts.map +1 -0
  450. package/lib/typescript/common/index.d.ts +4 -0
  451. package/lib/typescript/common/index.d.ts.map +1 -0
  452. package/lib/typescript/common/ref.d.ts +13 -0
  453. package/lib/typescript/common/ref.d.ts.map +1 -0
  454. package/lib/typescript/common/validate.d.ts +62 -0
  455. package/lib/typescript/common/validate.d.ts.map +1 -0
  456. package/lib/typescript/hooks/useAppOpenAd.d.ts +10 -0
  457. package/lib/typescript/hooks/useAppOpenAd.d.ts.map +1 -0
  458. package/lib/typescript/hooks/useForeground.d.ts +7 -0
  459. package/lib/typescript/hooks/useForeground.d.ts.map +1 -0
  460. package/lib/typescript/hooks/useFullScreenAd.d.ts +7 -0
  461. package/lib/typescript/hooks/useFullScreenAd.d.ts.map +1 -0
  462. package/lib/typescript/hooks/useInterstitialAd.d.ts +10 -0
  463. package/lib/typescript/hooks/useInterstitialAd.d.ts.map +1 -0
  464. package/lib/typescript/hooks/useRewardedAd.d.ts +10 -0
  465. package/lib/typescript/hooks/useRewardedAd.d.ts.map +1 -0
  466. package/lib/typescript/hooks/useRewardedInterstitialAd.d.ts +10 -0
  467. package/lib/typescript/hooks/useRewardedInterstitialAd.d.ts.map +1 -0
  468. package/lib/typescript/index.d.ts +32 -0
  469. package/lib/typescript/index.d.ts.map +1 -0
  470. package/lib/typescript/internal/GoogleMobileAdsNativeEventEmitter.d.ts +13 -0
  471. package/lib/typescript/internal/GoogleMobileAdsNativeEventEmitter.d.ts.map +1 -0
  472. package/lib/typescript/internal/NativeError.d.ts +27 -0
  473. package/lib/typescript/internal/NativeError.d.ts.map +1 -0
  474. package/lib/typescript/internal/SharedEventEmitter.d.ts +3 -0
  475. package/lib/typescript/internal/SharedEventEmitter.d.ts.map +1 -0
  476. package/lib/typescript/specs/components/GoogleMobileAdsBannerViewNativeComponent.d.ts +35 -0
  477. package/lib/typescript/specs/components/GoogleMobileAdsBannerViewNativeComponent.d.ts.map +1 -0
  478. package/lib/typescript/specs/components/GoogleMobileAdsMediaViewNativeComponent.d.ts +9 -0
  479. package/lib/typescript/specs/components/GoogleMobileAdsMediaViewNativeComponent.d.ts.map +1 -0
  480. package/lib/typescript/specs/components/GoogleMobileAdsNativeViewNativeComponent.d.ts +14 -0
  481. package/lib/typescript/specs/components/GoogleMobileAdsNativeViewNativeComponent.d.ts.map +1 -0
  482. package/lib/typescript/specs/modules/NativeAppModule.d.ts +23 -0
  483. package/lib/typescript/specs/modules/NativeAppModule.d.ts.map +1 -0
  484. package/lib/typescript/specs/modules/NativeAppOpenModule.d.ts +25 -0
  485. package/lib/typescript/specs/modules/NativeAppOpenModule.d.ts.map +1 -0
  486. package/lib/typescript/specs/modules/NativeConsentModule.d.ts +498 -0
  487. package/lib/typescript/specs/modules/NativeConsentModule.d.ts.map +1 -0
  488. package/lib/typescript/specs/modules/NativeGoogleMobileAdsModule.d.ts +14 -0
  489. package/lib/typescript/specs/modules/NativeGoogleMobileAdsModule.d.ts.map +1 -0
  490. package/lib/typescript/specs/modules/NativeGoogleMobileAdsNativeModule.d.ts +42 -0
  491. package/lib/typescript/specs/modules/NativeGoogleMobileAdsNativeModule.d.ts.map +1 -0
  492. package/lib/typescript/specs/modules/NativeInterstitialModule.d.ts +25 -0
  493. package/lib/typescript/specs/modules/NativeInterstitialModule.d.ts.map +1 -0
  494. package/lib/typescript/specs/modules/NativeRewardedInterstitialModule.d.ts +25 -0
  495. package/lib/typescript/specs/modules/NativeRewardedInterstitialModule.d.ts.map +1 -0
  496. package/lib/typescript/specs/modules/NativeRewardedModule.d.ts +25 -0
  497. package/lib/typescript/specs/modules/NativeRewardedModule.d.ts.map +1 -0
  498. package/lib/typescript/types/AdEventListener.d.ts +8 -0
  499. package/lib/typescript/types/AdEventListener.d.ts.map +1 -0
  500. package/lib/typescript/types/AdEventsListener.d.ts +9 -0
  501. package/lib/typescript/types/AdEventsListener.d.ts.map +1 -0
  502. package/lib/typescript/types/AdShowOptions.d.ts +13 -0
  503. package/lib/typescript/types/AdShowOptions.d.ts.map +1 -0
  504. package/lib/typescript/types/AdStates.d.ts +91 -0
  505. package/lib/typescript/types/AdStates.d.ts.map +1 -0
  506. package/lib/typescript/types/AdapterStatus.d.ts +19 -0
  507. package/lib/typescript/types/AdapterStatus.d.ts.map +1 -0
  508. package/lib/typescript/types/AppEvent.d.ts +14 -0
  509. package/lib/typescript/types/AppEvent.d.ts.map +1 -0
  510. package/lib/typescript/types/BannerAdProps.d.ts +175 -0
  511. package/lib/typescript/types/BannerAdProps.d.ts.map +1 -0
  512. package/lib/typescript/types/MobileAd.interface.d.ts +90 -0
  513. package/lib/typescript/types/MobileAd.interface.d.ts.map +1 -0
  514. package/lib/typescript/types/MobileAdsModule.interface.d.ts +75 -0
  515. package/lib/typescript/types/MobileAdsModule.interface.d.ts.map +1 -0
  516. package/lib/typescript/types/NativeAdRequestOptions.d.ts +36 -0
  517. package/lib/typescript/types/NativeAdRequestOptions.d.ts.map +1 -0
  518. package/lib/typescript/types/PaidEventListener.d.ts +8 -0
  519. package/lib/typescript/types/PaidEventListener.d.ts.map +1 -0
  520. package/lib/typescript/types/RequestConfiguration.d.ts +37 -0
  521. package/lib/typescript/types/RequestConfiguration.d.ts.map +1 -0
  522. package/lib/typescript/types/RequestOptions.d.ts +133 -0
  523. package/lib/typescript/types/RequestOptions.d.ts.map +1 -0
  524. package/lib/typescript/types/RewardedAdReward.d.ts +14 -0
  525. package/lib/typescript/types/RewardedAdReward.d.ts.map +1 -0
  526. package/lib/typescript/types/index.d.ts +13 -0
  527. package/lib/typescript/types/index.d.ts.map +1 -0
  528. package/lib/typescript/validateAdRequestConfiguration.d.ts +3 -0
  529. package/lib/typescript/validateAdRequestConfiguration.d.ts.map +1 -0
  530. package/lib/typescript/validateAdRequestOptions.d.ts +3 -0
  531. package/lib/typescript/validateAdRequestOptions.d.ts.map +1 -0
  532. package/lib/typescript/validateAdShowOptions.d.ts +3 -0
  533. package/lib/typescript/validateAdShowOptions.d.ts.map +1 -0
  534. package/lib/typescript/validateNativeAdRequestOptions.d.ts +3 -0
  535. package/lib/typescript/validateNativeAdRequestOptions.d.ts.map +1 -0
  536. package/lib/typescript/version.d.ts +2 -0
  537. package/lib/typescript/version.d.ts.map +1 -0
  538. package/package.json +176 -0
  539. package/plugin/__tests__/__snapshots__/plugin.test.ts.snap +739 -0
  540. package/plugin/__tests__/fixtures/app.config.js +24 -0
  541. package/plugin/__tests__/fixtures/app.config.ts +24 -0
  542. package/plugin/__tests__/fixtures/app.json +24 -0
  543. package/plugin/__tests__/fixtures/package.json +19 -0
  544. package/plugin/__tests__/fixtures/without-params/app.config.js +11 -0
  545. package/plugin/__tests__/fixtures/without-params/app.config.ts +11 -0
  546. package/plugin/__tests__/fixtures/without-params/app.json +11 -0
  547. package/plugin/__tests__/plugin.test.ts +115 -0
  548. package/plugin/build/index.d.ts +12 -0
  549. package/plugin/build/index.js +109 -0
  550. package/plugin/jest.config.js +1 -0
  551. package/plugin/src/index.ts +205 -0
  552. package/plugin/tsconfig.json +9 -0
  553. package/plugin/tsconfig.tsbuildinfo +1 -0
  554. package/react-native.config.js +19 -0
  555. package/src/AdEventType.ts +70 -0
  556. package/src/AdsConsent.ts +170 -0
  557. package/src/AdsConsentPurposes.ts +182 -0
  558. package/src/AdsConsentSpecialFeatures.ts +48 -0
  559. package/src/BannerAdSize.ts +78 -0
  560. package/src/GAMAdEventType.ts +37 -0
  561. package/src/MaxAdContentRating.ts +38 -0
  562. package/src/MobileAds.ts +77 -0
  563. package/src/NativeAdEventType.ts +51 -0
  564. package/src/RewardedAdEventType.ts +60 -0
  565. package/src/TestIds.ts +60 -0
  566. package/src/ads/AppOpenAd.ts +62 -0
  567. package/src/ads/BannerAd.tsx +37 -0
  568. package/src/ads/BaseAd.tsx +185 -0
  569. package/src/ads/GAMBannerAd.tsx +43 -0
  570. package/src/ads/GAMInterstitialAd.ts +45 -0
  571. package/src/ads/InterstitialAd.ts +122 -0
  572. package/src/ads/MobileAd.ts +227 -0
  573. package/src/ads/RewardedAd.ts +142 -0
  574. package/src/ads/RewardedInterstitialAd.ts +144 -0
  575. package/src/ads/native-ad/NativeAd.ts +159 -0
  576. package/src/ads/native-ad/NativeAdContext.ts +26 -0
  577. package/src/ads/native-ad/NativeAdView.tsx +43 -0
  578. package/src/ads/native-ad/NativeAsset.tsx +66 -0
  579. package/src/ads/native-ad/NativeMediaView.tsx +44 -0
  580. package/src/common/constants.ts +9 -0
  581. package/src/common/debounce.ts +15 -0
  582. package/src/common/index.ts +30 -0
  583. package/src/common/ref.ts +46 -0
  584. package/src/common/validate.ts +116 -0
  585. package/src/declarations.d.ts +3 -0
  586. package/src/hooks/useAppOpenAd.ts +46 -0
  587. package/src/hooks/useForeground.ts +41 -0
  588. package/src/hooks/useFullScreenAd.ts +112 -0
  589. package/src/hooks/useInterstitialAd.ts +46 -0
  590. package/src/hooks/useRewardedAd.ts +46 -0
  591. package/src/hooks/useRewardedInterstitialAd.ts +47 -0
  592. package/src/index.ts +60 -0
  593. package/src/internal/GoogleMobileAdsNativeEventEmitter.ts +58 -0
  594. package/src/internal/NativeError.ts +56 -0
  595. package/src/internal/SharedEventEmitter.ts +20 -0
  596. package/src/specs/components/GoogleMobileAdsBannerViewNativeComponent.ts +62 -0
  597. package/src/specs/components/GoogleMobileAdsMediaViewNativeComponent.ts +30 -0
  598. package/src/specs/components/GoogleMobileAdsNativeViewNativeComponent.ts +45 -0
  599. package/src/specs/modules/NativeAppModule.ts +57 -0
  600. package/src/specs/modules/NativeAppOpenModule.ts +26 -0
  601. package/src/specs/modules/NativeConsentModule.ts +532 -0
  602. package/src/specs/modules/NativeGoogleMobileAdsModule.ts +33 -0
  603. package/src/specs/modules/NativeGoogleMobileAdsNativeModule.ts +70 -0
  604. package/src/specs/modules/NativeInterstitialModule.ts +26 -0
  605. package/src/specs/modules/NativeRewardedInterstitialModule.ts +32 -0
  606. package/src/specs/modules/NativeRewardedModule.ts +26 -0
  607. package/src/types/AdEventListener.ts +34 -0
  608. package/src/types/AdEventsListener.ts +24 -0
  609. package/src/types/AdShowOptions.ts +12 -0
  610. package/src/types/AdStates.ts +92 -0
  611. package/src/types/AdapterStatus.ts +20 -0
  612. package/src/types/AppEvent.ts +14 -0
  613. package/src/types/BannerAdProps.ts +184 -0
  614. package/src/types/MobileAd.interface.ts +113 -0
  615. package/src/types/MobileAdsModule.interface.ts +80 -0
  616. package/src/types/NativeAdRequestOptions.ts +55 -0
  617. package/src/types/PaidEventListener.ts +9 -0
  618. package/src/types/RequestConfiguration.ts +40 -0
  619. package/src/types/RequestOptions.ts +137 -0
  620. package/src/types/RewardedAdReward.ts +14 -0
  621. package/src/types/index.ts +29 -0
  622. package/src/validateAdRequestConfiguration.ts +66 -0
  623. package/src/validateAdRequestOptions.ts +154 -0
  624. package/src/validateAdShowOptions.ts +41 -0
  625. package/src/validateNativeAdRequestOptions.ts +50 -0
  626. package/src/version.ts +2 -0
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ /*
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+
20
+ import { useState } from 'react';
21
+ import useDeepCompareEffect from 'use-deep-compare-effect';
22
+ import { RewardedAd } from '../ads/RewardedAd';
23
+ import { useFullScreenAd } from './useFullScreenAd';
24
+
25
+ /**
26
+ * React Hook for Rewarded Ad.
27
+ *
28
+ * @param adUnitId The Ad Unit ID for the Rewarded Ad. You can find this on your Google Mobile Ads dashboard. You can destroy ad instance by setting this value to null.
29
+ * @param requestOptions Optional RequestOptions used to load the ad.
30
+ */
31
+ export function useRewardedAd(adUnitId, requestOptions = {}) {
32
+ const [rewardedAd, setRewardedAd] = useState(null);
33
+ useDeepCompareEffect(() => {
34
+ setRewardedAd(() => {
35
+ return adUnitId ? RewardedAd.createForAdRequest(adUnitId, requestOptions) : null;
36
+ });
37
+ }, [adUnitId, requestOptions]);
38
+ return useFullScreenAd(rewardedAd);
39
+ }
40
+ //# sourceMappingURL=useRewardedAd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useState","useDeepCompareEffect","RewardedAd","useFullScreenAd","useRewardedAd","adUnitId","requestOptions","rewardedAd","setRewardedAd","createForAdRequest"],"sourceRoot":"../../../src","sources":["hooks/useRewardedAd.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,OAAO;AAChC,OAAOC,oBAAoB,MAAM,yBAAyB;AAE1D,SAASC,UAAU,QAAQ,mBAAmB;AAI9C,SAASC,eAAe,QAAQ,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAC3BC,QAAuB,EACvBC,cAA8B,GAAG,CAAC,CAAC,EACpB;EACf,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGR,QAAQ,CAAoB,IAAI,CAAC;EAErEC,oBAAoB,CAAC,MAAM;IACzBO,aAAa,CAAC,MAAM;MAClB,OAAOH,QAAQ,GAAGH,UAAU,CAACO,kBAAkB,CAACJ,QAAQ,EAAEC,cAAc,CAAC,GAAG,IAAI;IAClF,CAAC,CAAC;EACJ,CAAC,EAAE,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAE9B,OAAOH,eAAe,CAACI,UAAU,CAAC;AACpC","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ /*
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+
20
+ import { useState } from 'react';
21
+ import useDeepCompareEffect from 'use-deep-compare-effect';
22
+ import { RewardedInterstitialAd } from '../ads/RewardedInterstitialAd';
23
+ import { useFullScreenAd } from './useFullScreenAd';
24
+
25
+ /**
26
+ * React Hook for Rewarded Interstitial Ad.
27
+ *
28
+ * @param adUnitId The Ad Unit ID for the Rewarded Interstitial Ad. You can find this on your Google Mobile Ads dashboard. You can destroy ad instance by setting this value to null.
29
+ * @param requestOptions Optional RequestOptions used to load the ad.
30
+ */
31
+ export function useRewardedInterstitialAd(adUnitId, requestOptions = {}) {
32
+ const [rewardedInterstitialAd, setRewardedInterstitialAd] = useState(null);
33
+ useDeepCompareEffect(() => {
34
+ setRewardedInterstitialAd(() => {
35
+ return adUnitId ? RewardedInterstitialAd.createForAdRequest(adUnitId, requestOptions) : null;
36
+ });
37
+ }, [adUnitId, requestOptions]);
38
+ return useFullScreenAd(rewardedInterstitialAd);
39
+ }
40
+ //# sourceMappingURL=useRewardedInterstitialAd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useState","useDeepCompareEffect","RewardedInterstitialAd","useFullScreenAd","useRewardedInterstitialAd","adUnitId","requestOptions","rewardedInterstitialAd","setRewardedInterstitialAd","createForAdRequest"],"sourceRoot":"../../../src","sources":["hooks/useRewardedInterstitialAd.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,OAAO;AAChC,OAAOC,oBAAoB,MAAM,yBAAyB;AAE1D,SAASC,sBAAsB,QAAQ,+BAA+B;AAItE,SAASC,eAAe,QAAQ,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CACvCC,QAAuB,EACvBC,cAA8B,GAAG,CAAC,CAAC,EACpB;EACf,MAAM,CAACC,sBAAsB,EAAEC,yBAAyB,CAAC,GACvDR,QAAQ,CAAgC,IAAI,CAAC;EAE/CC,oBAAoB,CAAC,MAAM;IACzBO,yBAAyB,CAAC,MAAM;MAC9B,OAAOH,QAAQ,GAAGH,sBAAsB,CAACO,kBAAkB,CAACJ,QAAQ,EAAEC,cAAc,CAAC,GAAG,IAAI;IAC9F,CAAC,CAAC;EACJ,CAAC,EAAE,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAE9B,OAAOH,eAAe,CAACI,sBAAsB,CAAC;AAChD","ignoreList":[]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ /*
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+
20
+ import { version } from './version';
21
+
22
+ // import { SDK_VERSION } from 'react-native-google-mobile-ads';
23
+ export const SDK_VERSION = version;
24
+ export { default, MobileAds } from './MobileAds';
25
+ export { AdsConsentDebugGeography, AdsConsentInfo, AdsConsentInfoOptions, AdsConsentInterface, AdsConsentPrivacyOptionsRequirementStatus, AdsConsentStatus, AdsConsentUserChoices } from './specs/modules/NativeConsentModule';
26
+ export { AdsConsentPurposes } from './AdsConsentPurposes';
27
+ export { AdsConsentSpecialFeatures } from './AdsConsentSpecialFeatures';
28
+ export { MaxAdContentRating } from './MaxAdContentRating';
29
+ export { TestIds } from './TestIds';
30
+ export { AdEventType } from './AdEventType';
31
+ export { BannerAdSize, GAMBannerAdSize } from './BannerAdSize';
32
+ export { GAMAdEventType } from './GAMAdEventType';
33
+ export { NativeAdEventType } from './NativeAdEventType';
34
+ export { RewardedAdEventType } from './RewardedAdEventType';
35
+ export { AdsConsent } from './AdsConsent';
36
+ export { AppOpenAd } from './ads/AppOpenAd';
37
+ export { InterstitialAd } from './ads/InterstitialAd';
38
+ export { RewardedAd } from './ads/RewardedAd';
39
+ export { RewardedInterstitialAd } from './ads/RewardedInterstitialAd';
40
+ export { BannerAd } from './ads/BannerAd';
41
+ export { NativeAd } from './ads/native-ad/NativeAd';
42
+ export { NativeAdView } from './ads/native-ad/NativeAdView';
43
+ export { NativeMediaView } from './ads/native-ad/NativeMediaView';
44
+ export { NativeAsset, NativeAssetType } from './ads/native-ad/NativeAsset';
45
+ export { GAMBannerAd } from './ads/GAMBannerAd';
46
+ export { GAMInterstitialAd } from './ads/GAMInterstitialAd';
47
+ export { useAppOpenAd } from './hooks/useAppOpenAd';
48
+ export { useInterstitialAd } from './hooks/useInterstitialAd';
49
+ export { useRewardedAd } from './hooks/useRewardedAd';
50
+ export { useRewardedInterstitialAd } from './hooks/useRewardedInterstitialAd';
51
+ export { useForeground } from './hooks/useForeground';
52
+ export { RevenuePrecisions } from './common/constants';
53
+ export * from './types';
54
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["version","SDK_VERSION","default","MobileAds","AdsConsentDebugGeography","AdsConsentInfo","AdsConsentInfoOptions","AdsConsentInterface","AdsConsentPrivacyOptionsRequirementStatus","AdsConsentStatus","AdsConsentUserChoices","AdsConsentPurposes","AdsConsentSpecialFeatures","MaxAdContentRating","TestIds","AdEventType","BannerAdSize","GAMBannerAdSize","GAMAdEventType","NativeAdEventType","RewardedAdEventType","AdsConsent","AppOpenAd","InterstitialAd","RewardedAd","RewardedInterstitialAd","BannerAd","NativeAd","NativeAdView","NativeMediaView","NativeAsset","NativeAssetType","GAMBannerAd","GAMInterstitialAd","useAppOpenAd","useInterstitialAd","useRewardedAd","useRewardedInterstitialAd","useForeground","RevenuePrecisions"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,WAAW;;AAEnC;AACA,OAAO,MAAMC,WAAW,GAAGD,OAAO;AAElC,SAASE,OAAO,EAAEC,SAAS,QAAQ,aAAa;AAChD,SACEC,wBAAwB,EACxBC,cAAc,EACdC,qBAAqB,EACrBC,mBAAmB,EACnBC,yCAAyC,EACzCC,gBAAgB,EAChBC,qBAAqB,QAChB,qCAAqC;AAC5C,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,EAAEC,eAAe,QAAQ,gBAAgB;AAC9D,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,QAAQ,QAAQ,0BAA0B;AACnD,SAASC,YAAY,QAAQ,8BAA8B;AAC3D,SAASC,eAAe,QAAQ,iCAAiC;AACjE,SAASC,WAAW,EAAEC,eAAe,QAAQ,6BAA6B;AAC1E,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,YAAY,QAAQ,sBAAsB;AACnD,SAASC,iBAAiB,QAAQ,2BAA2B;AAC7D,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,yBAAyB,QAAQ,mCAAmC;AAC7E,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,cAAc,SAAS","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ /*
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+
20
+ import { NativeEventEmitter } from 'react-native';
21
+ import NativeAppModule from '../specs/modules/NativeAppModule';
22
+ const RNAppModule = NativeAppModule;
23
+ class GANativeEventEmitter extends NativeEventEmitter {
24
+ constructor() {
25
+ super(RNAppModule);
26
+ this.ready = false;
27
+ }
28
+ addListener(eventType, listener, context) {
29
+ if (!this.ready) {
30
+ RNAppModule.eventsNotifyReady(true);
31
+ this.ready = true;
32
+ }
33
+ RNAppModule.eventsAddListener(eventType);
34
+ const subscription = super.addListener(`rnapp_${eventType}`, listener, context);
35
+
36
+ // override the default remove to unsubscribe our native listener, then call super
37
+ subscription.remove = () => {
38
+ RNAppModule.eventsRemoveListener(eventType, false);
39
+ subscription.remove();
40
+ };
41
+ return subscription;
42
+ }
43
+ removeAllListeners(eventType) {
44
+ RNAppModule.eventsRemoveListener(eventType, true);
45
+ super.removeAllListeners(`rnapp_${eventType}`);
46
+ }
47
+ }
48
+ export const GoogleMobileAdsNativeEventEmitter = new GANativeEventEmitter();
49
+ //# sourceMappingURL=GoogleMobileAdsNativeEventEmitter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeEventEmitter","NativeAppModule","RNAppModule","GANativeEventEmitter","constructor","ready","addListener","eventType","listener","context","eventsNotifyReady","eventsAddListener","subscription","remove","eventsRemoveListener","removeAllListeners","GoogleMobileAdsNativeEventEmitter"],"sourceRoot":"../../../src","sources":["internal/GoogleMobileAdsNativeEventEmitter.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,kBAAkB,QAAQ,cAAc;AACjD,OAAOC,eAAe,MAAM,kCAAkC;AAE9D,MAAMC,WAAW,GAAGD,eAAe;AAEnC,MAAME,oBAAoB,SAASH,kBAAkB,CAAC;EAGpDI,WAAWA,CAAA,EAAG;IACZ,KAAK,CAACF,WAAW,CAAC;IAClB,IAAI,CAACG,KAAK,GAAG,KAAK;EACpB;EAEAC,WAAWA,CACTC,SAAiB,EACjBC,QAAkE,EAClEC,OAAiC,EACjC;IACA,IAAI,CAAC,IAAI,CAACJ,KAAK,EAAE;MACfH,WAAW,CAACQ,iBAAiB,CAAC,IAAI,CAAC;MACnC,IAAI,CAACL,KAAK,GAAG,IAAI;IACnB;IACAH,WAAW,CAACS,iBAAiB,CAACJ,SAAS,CAAC;IAExC,MAAMK,YAAY,GAAG,KAAK,CAACN,WAAW,CAAC,SAASC,SAAS,EAAE,EAAEC,QAAQ,EAAEC,OAAO,CAAC;;IAE/E;IACAG,YAAY,CAACC,MAAM,GAAG,MAAM;MAC1BX,WAAW,CAACY,oBAAoB,CAACP,SAAS,EAAE,KAAK,CAAC;MAClDK,YAAY,CAACC,MAAM,CAAC,CAAC;IACvB,CAAC;IACD,OAAOD,YAAY;EACrB;EAEAG,kBAAkBA,CAACR,SAAiB,EAAE;IACpCL,WAAW,CAACY,oBAAoB,CAACP,SAAS,EAAE,IAAI,CAAC;IACjD,KAAK,CAACQ,kBAAkB,CAAC,SAASR,SAAS,EAAE,CAAC;EAChD;AACF;AAEA,OAAO,MAAMS,iCAAiC,GAAG,IAAIb,oBAAoB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ /*
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+
20
+ export class NativeError extends Error {
21
+ static fromEvent(errorEvent, namespace, stack) {
22
+ return new NativeError({
23
+ userInfo: errorEvent
24
+ }, stack || new Error().stack || '', namespace);
25
+ }
26
+ constructor(nativeError, jsStack, namespace) {
27
+ super();
28
+ const {
29
+ userInfo
30
+ } = nativeError;
31
+ this.namespace = namespace;
32
+ this.code = `${this.namespace}/${userInfo.code || 'unknown'}`;
33
+ this.message = `[${this.code}] ${userInfo.message}`;
34
+ this.jsStack = jsStack;
35
+ this.userInfo = userInfo;
36
+ this.stack = NativeError.getStackWithMessage(`NativeError: ${this.message}`, this.jsStack);
37
+ }
38
+
39
+ /**
40
+ * Build a stack trace that includes JS stack prior to calling the native method.
41
+ *
42
+ * @returns {string}
43
+ */
44
+ static getStackWithMessage(message, jsStack) {
45
+ return [message, ...jsStack.split('\n').slice(2, 13)].join('\n');
46
+ }
47
+ }
48
+ //# sourceMappingURL=NativeError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeError","Error","fromEvent","errorEvent","namespace","stack","userInfo","constructor","nativeError","jsStack","code","message","getStackWithMessage","split","slice","join"],"sourceRoot":"../../../src","sources":["internal/NativeError.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,WAAW,SAASC,KAAK,CAAC;EAOrC,OAAOC,SAASA,CACdC,UAA6C,EAC7CC,SAAiB,EACjBC,KAAc,EACd;IACA,OAAO,IAAIL,WAAW,CAAC;MAAEM,QAAQ,EAAEH;IAAW,CAAC,EAAEE,KAAK,IAAI,IAAIJ,KAAK,CAAC,CAAC,CAACI,KAAK,IAAI,EAAE,EAAED,SAAS,CAAC;EAC/F;EAEAG,WAAWA,CACTC,WAA4D,EAC5DC,OAAe,EACfL,SAAiB,EACjB;IACA,KAAK,CAAC,CAAC;IACP,MAAM;MAAEE;IAAS,CAAC,GAAGE,WAAW;IAChC,IAAI,CAACJ,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACM,IAAI,GAAG,GAAG,IAAI,CAACN,SAAS,IAAIE,QAAQ,CAACI,IAAI,IAAI,SAAS,EAAE;IAC7D,IAAI,CAACC,OAAO,GAAG,IAAI,IAAI,CAACD,IAAI,KAAKJ,QAAQ,CAACK,OAAO,EAAE;IACnD,IAAI,CAACF,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACH,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACD,KAAK,GAAGL,WAAW,CAACY,mBAAmB,CAAC,gBAAgB,IAAI,CAACD,OAAO,EAAE,EAAE,IAAI,CAACF,OAAO,CAAC;EAC5F;;EAEA;AACF;AACA;AACA;AACA;EACE,OAAOG,mBAAmBA,CAACD,OAAe,EAAEF,OAAe,EAAE;IAC3D,OAAO,CAACE,OAAO,EAAE,GAAGF,OAAO,CAACI,KAAK,CAAC,IAAI,CAAC,CAACC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;EAClE;AACF","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ /*
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+
20
+ import EventEmitter from 'react-native/Libraries/vendor/emitter/EventEmitter';
21
+ export const SharedEventEmitter = new EventEmitter();
22
+ //# sourceMappingURL=SharedEventEmitter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["EventEmitter","SharedEventEmitter"],"sourceRoot":"../../../src","sources":["internal/SharedEventEmitter.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,YAAY,MAAM,oDAAoD;AAE7E,OAAO,MAAMC,kBAAgC,GAAG,IAAID,YAAY,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ import type * as React from 'react';
19
+ import type { HostComponent, ViewProps } from 'react-native';
20
+ import type { BubblingEventHandler, Float } from 'react-native/Libraries/Types/CodegenTypes';
21
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
22
+ import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
23
+
24
+ export type NativeEvent = {
25
+ type: string;
26
+ width?: Float;
27
+ height?: Float;
28
+ code?: string;
29
+ message?: string;
30
+ name?: string;
31
+ data?: string;
32
+ currency?: string;
33
+ precision?: Float;
34
+ value?: Float;
35
+ };
36
+
37
+ export interface NativeProps extends ViewProps {
38
+ sizeConfig: { sizes: string[]; maxHeight?: Float; width?: Float };
39
+ unitId: string;
40
+ request: string;
41
+ manualImpressionsEnabled: boolean;
42
+ onNativeEvent: BubblingEventHandler<NativeEvent>;
43
+ }
44
+
45
+ export type ComponentType = HostComponent<NativeProps>;
46
+
47
+ interface NativeCommands {
48
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- https://github.com/facebook/react-native/issues/54272
49
+ recordManualImpression: (viewRef: React.ElementRef<ComponentType>) => void;
50
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- https://github.com/facebook/react-native/issues/54272
51
+ load: (viewRef: React.ElementRef<ComponentType>) => void;
52
+ }
53
+
54
+ // SyntaxError "'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands"
55
+ // @ts-ignore -- migration to react-native 0.73+
56
+ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
57
+ supportedCommands: ['recordManualImpression', 'load'],
58
+ });
59
+
60
+ export default codegenNativeComponent<NativeProps>(
61
+ 'RNGoogleMobileAdsBannerView',
62
+ ) as HostComponent<NativeProps>;
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ import type { HostComponent, ViewProps } from 'react-native';
19
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
20
+
21
+ export interface NativeProps extends ViewProps {
22
+ responseId: string;
23
+ resizeMode?: string;
24
+ }
25
+
26
+ type NativeViewComponentType = HostComponent<NativeProps>;
27
+
28
+ export default codegenNativeComponent<NativeProps>(
29
+ 'RNGoogleMobileAdsMediaView',
30
+ ) as NativeViewComponentType;
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ import type * as React from 'react';
19
+ import type { HostComponent, ViewProps } from 'react-native';
20
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
21
+ import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
22
+ import type { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
23
+
24
+ export interface NativeProps extends ViewProps {
25
+ responseId: string;
26
+ }
27
+
28
+ type NativeViewComponentType = HostComponent<NativeProps>;
29
+
30
+ interface NativeCommands {
31
+ registerAsset: (
32
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- https://github.com/facebook/react-native/issues/54272
33
+ viewRef: React.ElementRef<NativeViewComponentType>,
34
+ assetType: string,
35
+ reactTag: Int32,
36
+ ) => void;
37
+ }
38
+
39
+ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
40
+ supportedCommands: ['registerAsset'],
41
+ });
42
+
43
+ export default codegenNativeComponent<NativeProps>(
44
+ 'RNGoogleMobileAdsNativeView',
45
+ ) as NativeViewComponentType;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ /*
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ import { TurboModuleRegistry } from 'react-native';
20
+ export default TurboModuleRegistry.getEnforcing('RNAppModule');
21
+ //# sourceMappingURL=NativeAppModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../../src","sources":["specs/modules/NativeAppModule.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,cAAc;AAuClD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,aAAa,CAAC","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+
20
+ import { TurboModuleRegistry } from 'react-native';
21
+ export default TurboModuleRegistry.getEnforcing('RNGoogleMobileAdsAppOpenModule');
22
+ //# sourceMappingURL=NativeAppOpenModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../../src","sources":["specs/modules/NativeAppOpenModule.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAsBA,mBAAmB,QAAQ,cAAc;AAQ/D,eAAeA,mBAAmB,CAACC,YAAY,CAAO,gCAAgC,CAAC","ignoreList":[]}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+
20
+ import { TurboModuleRegistry } from 'react-native';
21
+ /**
22
+ * AdsConsentDebugGeography enum.
23
+ *
24
+ * Used to set a mock location when testing the `AdsConsent` helper.
25
+ */
26
+ export let AdsConsentDebugGeography = /*#__PURE__*/function (AdsConsentDebugGeography) {
27
+ /**
28
+ * Disable any debug geography.
29
+ */
30
+ AdsConsentDebugGeography[AdsConsentDebugGeography["DISABLED"] = 0] = "DISABLED";
31
+ /**
32
+ * Geography appears as in EEA for debug devices.
33
+ */
34
+ AdsConsentDebugGeography[AdsConsentDebugGeography["EEA"] = 1] = "EEA";
35
+ /**
36
+ * @deprecated Use `OTHER`.
37
+ */
38
+ AdsConsentDebugGeography[AdsConsentDebugGeography["NOT_EEA"] = 2] = "NOT_EEA";
39
+ /**
40
+ * Geography appears as in a regulated US State.
41
+ */
42
+ AdsConsentDebugGeography[AdsConsentDebugGeography["REGULATED_US_STATE"] = 3] = "REGULATED_US_STATE";
43
+ /**
44
+ * Geography appears as in a region with no regulation in force.
45
+ */
46
+ AdsConsentDebugGeography[AdsConsentDebugGeography["OTHER"] = 4] = "OTHER";
47
+ return AdsConsentDebugGeography;
48
+ }({});
49
+
50
+ /**
51
+ * AdsConsentStatus enum.
52
+ */
53
+ export let AdsConsentStatus = /*#__PURE__*/function (AdsConsentStatus) {
54
+ /**
55
+ * Unknown consent status, AdsConsent.requestInfoUpdate needs to be called to update it.
56
+ */
57
+ AdsConsentStatus["UNKNOWN"] = "UNKNOWN";
58
+ /**
59
+ * User consent required but not yet obtained.
60
+ */
61
+ AdsConsentStatus["REQUIRED"] = "REQUIRED";
62
+ /**
63
+ * User consent not required.
64
+ */
65
+ AdsConsentStatus["NOT_REQUIRED"] = "NOT_REQUIRED";
66
+ /**
67
+ * User consent already obtained.
68
+ */
69
+ AdsConsentStatus["OBTAINED"] = "OBTAINED";
70
+ return AdsConsentStatus;
71
+ }({});
72
+
73
+ /**
74
+ * AdsConsentPrivacyOptionsRequirementStatus enum.
75
+ */
76
+ export let AdsConsentPrivacyOptionsRequirementStatus = /*#__PURE__*/function (AdsConsentPrivacyOptionsRequirementStatus) {
77
+ /**
78
+ * Unknown consent status, AdsConsent.requestInfoUpdate needs to be called to update it.
79
+ */
80
+ AdsConsentPrivacyOptionsRequirementStatus["UNKNOWN"] = "UNKNOWN";
81
+ /**
82
+ * User consent required but not yet obtained.
83
+ */
84
+ AdsConsentPrivacyOptionsRequirementStatus["REQUIRED"] = "REQUIRED";
85
+ /**
86
+ * User consent not required.
87
+ */
88
+ AdsConsentPrivacyOptionsRequirementStatus["NOT_REQUIRED"] = "NOT_REQUIRED";
89
+ return AdsConsentPrivacyOptionsRequirementStatus;
90
+ }({});
91
+
92
+ /**
93
+ * The options used when requesting consent information.
94
+ */
95
+
96
+ /**
97
+ * The result of requesting info about a users consent status.
98
+ */
99
+
100
+ /**
101
+ * The options used when requesting consent information.
102
+ *
103
+ * https://vendor-list.consensu.org/v2/vendor-list.json
104
+ * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework
105
+ */
106
+
107
+ export default TurboModuleRegistry.getEnforcing('RNGoogleMobileAdsConsentModule');
108
+ //# sourceMappingURL=NativeConsentModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","AdsConsentDebugGeography","AdsConsentStatus","AdsConsentPrivacyOptionsRequirementStatus","getEnforcing"],"sourceRoot":"../../../../src","sources":["specs/modules/NativeConsentModule.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAsBA,mBAAmB,QAAQ,cAAc;AAG/D;AACA;AACA;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAClC;AACF;AACA;EAHYA,wBAAwB,CAAxBA,wBAAwB;EAMlC;AACF;AACA;EARYA,wBAAwB,CAAxBA,wBAAwB;EAWlC;AACF;AACA;EAbYA,wBAAwB,CAAxBA,wBAAwB;EAgBlC;AACF;AACA;EAlBYA,wBAAwB,CAAxBA,wBAAwB;EAqBlC;AACF;AACA;EAvBYA,wBAAwB,CAAxBA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA;;AA2BpC;AACA;AACA;AACA,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAC1B;AACF;AACA;EAHYA,gBAAgB;EAM1B;AACF;AACA;EARYA,gBAAgB;EAW1B;AACF;AACA;EAbYA,gBAAgB;EAgB1B;AACF;AACA;EAlBYA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAsB5B;AACA;AACA;AACA,WAAYC,yCAAyC,0BAAzCA,yCAAyC;EACnD;AACF;AACA;EAHYA,yCAAyC;EAMnD;AACF;AACA;EARYA,yCAAyC;EAWnD;AACF;AACA;EAbYA,yCAAyC;EAAA,OAAzCA,yCAAyC;AAAA;;AAiBrD;AACA;AACA;;AAkBA;AACA;AACA;;AA4BA;AACA;AACA;AACA;AACA;AACA;;AA2XA,eAAeH,mBAAmB,CAACI,YAAY,CAAO,gCAAgC,CAAC","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ /*
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+
20
+ import { TurboModuleRegistry } from 'react-native';
21
+ export default TurboModuleRegistry.getEnforcing('RNGoogleMobileAdsModule');
22
+ //# sourceMappingURL=NativeGoogleMobileAdsModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../../src","sources":["specs/modules/NativeGoogleMobileAdsModule.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,cAAc;AAclD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,yBAAyB,CAAC","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ /*
4
+ * Copyright (c) 2016-present Invertase Limited & Contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this library except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ */
19
+
20
+ import { TurboModuleRegistry } from 'react-native';
21
+ export default TurboModuleRegistry.getEnforcing('RNGoogleMobileAdsNativeModule');
22
+ //# sourceMappingURL=NativeGoogleMobileAdsNativeModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../../src","sources":["specs/modules/NativeGoogleMobileAdsNativeModule.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,cAAc;AAmDlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,+BAA+B,CAAC","ignoreList":[]}