react-native-google-mobile-ads 8.1.1 → 8.1.2
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.
- package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsAdHelper.kt +17 -42
- package/lib/commonjs/AdEventType.js +1 -4
- package/lib/commonjs/AdEventType.js.map +1 -1
- package/lib/commonjs/AdsConsent.js +2 -25
- package/lib/commonjs/AdsConsent.js.map +1 -1
- package/lib/commonjs/AdsConsentDebugGeography.js +0 -3
- package/lib/commonjs/AdsConsentDebugGeography.js.map +1 -1
- package/lib/commonjs/AdsConsentPurposes.js +1 -4
- package/lib/commonjs/AdsConsentPurposes.js.map +1 -1
- package/lib/commonjs/AdsConsentSpecialFeatures.js +1 -4
- package/lib/commonjs/AdsConsentSpecialFeatures.js.map +1 -1
- package/lib/commonjs/AdsConsentStatus.js +0 -3
- package/lib/commonjs/AdsConsentStatus.js.map +1 -1
- package/lib/commonjs/BannerAdSize.js +1 -4
- package/lib/commonjs/BannerAdSize.js.map +1 -1
- package/lib/commonjs/GAMAdEventType.js +1 -4
- package/lib/commonjs/GAMAdEventType.js.map +1 -1
- package/lib/commonjs/MaxAdContentRating.js +1 -4
- package/lib/commonjs/MaxAdContentRating.js.map +1 -1
- package/lib/commonjs/MobileAds.js +0 -14
- package/lib/commonjs/MobileAds.js.map +1 -1
- package/lib/commonjs/RewardedAdEventType.js +1 -4
- package/lib/commonjs/RewardedAdEventType.js.map +1 -1
- package/lib/commonjs/TestIds.js +1 -2
- package/lib/commonjs/TestIds.js.map +1 -1
- package/lib/commonjs/ads/AppOpenAd.js +0 -14
- package/lib/commonjs/ads/AppOpenAd.js.map +1 -1
- package/lib/commonjs/ads/BannerAd.js +1 -6
- package/lib/commonjs/ads/BannerAd.js.map +1 -1
- package/lib/commonjs/ads/BaseAd.js +1 -20
- package/lib/commonjs/ads/BaseAd.js.map +1 -1
- package/lib/commonjs/ads/GAMBannerAd.js +1 -14
- package/lib/commonjs/ads/GAMBannerAd.js.map +1 -1
- package/lib/commonjs/ads/GAMInterstitialAd.js +0 -6
- package/lib/commonjs/ads/GAMInterstitialAd.js.map +1 -1
- package/lib/commonjs/ads/InterstitialAd.js +0 -14
- package/lib/commonjs/ads/InterstitialAd.js.map +1 -1
- package/lib/commonjs/ads/MobileAd.js +2 -55
- package/lib/commonjs/ads/MobileAd.js.map +1 -1
- package/lib/commonjs/ads/RewardedAd.js +0 -16
- package/lib/commonjs/ads/RewardedAd.js.map +1 -1
- package/lib/commonjs/ads/RewardedInterstitialAd.js +0 -16
- package/lib/commonjs/ads/RewardedInterstitialAd.js.map +1 -1
- package/lib/commonjs/common/Base64.js +4 -23
- package/lib/commonjs/common/Base64.js.map +1 -1
- package/lib/commonjs/common/MutatableParams.js +2 -12
- package/lib/commonjs/common/MutatableParams.js.map +1 -1
- package/lib/commonjs/common/ReferenceBase.js +2 -10
- package/lib/commonjs/common/ReferenceBase.js.map +1 -1
- package/lib/commonjs/common/deeps.js +1 -17
- package/lib/commonjs/common/deeps.js.map +1 -1
- package/lib/commonjs/common/id.js +7 -17
- package/lib/commonjs/common/id.js.map +1 -1
- package/lib/commonjs/common/index.js +2 -34
- package/lib/commonjs/common/index.js.map +1 -1
- package/lib/commonjs/common/path.js +9 -28
- package/lib/commonjs/common/path.js.map +1 -1
- package/lib/commonjs/common/promise.js +1 -7
- package/lib/commonjs/common/promise.js.map +1 -1
- package/lib/commonjs/common/serialize.js +4 -8
- package/lib/commonjs/common/serialize.js.map +1 -1
- package/lib/commonjs/common/validate.js +17 -44
- package/lib/commonjs/common/validate.js.map +1 -1
- package/lib/commonjs/declarations.d.js.map +1 -1
- package/lib/commonjs/hooks/useAppOpenAd.js +0 -6
- package/lib/commonjs/hooks/useAppOpenAd.js.map +1 -1
- package/lib/commonjs/hooks/useFullScreenAd.js +5 -16
- package/lib/commonjs/hooks/useFullScreenAd.js.map +1 -1
- package/lib/commonjs/hooks/useInterstitialAd.js +0 -6
- package/lib/commonjs/hooks/useInterstitialAd.js.map +1 -1
- package/lib/commonjs/hooks/useRewardedAd.js +0 -6
- package/lib/commonjs/hooks/useRewardedAd.js.map +1 -1
- package/lib/commonjs/hooks/useRewardedInterstitialAd.js +0 -6
- package/lib/commonjs/hooks/useRewardedInterstitialAd.js.map +1 -1
- package/lib/commonjs/index.js +1 -29
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/GoogleMobileAdsNativeEventEmitter.js +8 -20
- package/lib/commonjs/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -1
- package/lib/commonjs/internal/Module.js +2 -18
- package/lib/commonjs/internal/Module.js.map +1 -1
- package/lib/commonjs/internal/NativeError.js +2 -13
- package/lib/commonjs/internal/NativeError.js.map +1 -1
- package/lib/commonjs/internal/SharedEventEmitter.js +2 -3
- package/lib/commonjs/internal/SharedEventEmitter.js.map +1 -1
- package/lib/commonjs/internal/constants.js +1 -1
- package/lib/commonjs/internal/constants.js.map +1 -1
- package/lib/commonjs/internal/index.js +0 -5
- package/lib/commonjs/internal/index.js.map +1 -1
- package/lib/commonjs/internal/registry/nativeModule.js +13 -44
- package/lib/commonjs/internal/registry/nativeModule.js.map +1 -1
- package/lib/commonjs/types/AdEventListener.js.map +1 -1
- package/lib/commonjs/types/AdEventsListener.js.map +1 -1
- package/lib/commonjs/types/AdShowOptions.js.map +1 -1
- package/lib/commonjs/types/AdStates.js.map +1 -1
- package/lib/commonjs/types/AdapterStatus.js +3 -6
- package/lib/commonjs/types/AdapterStatus.js.map +1 -1
- package/lib/commonjs/types/AdsConsent.interface.js.map +1 -1
- package/lib/commonjs/types/AppEvent.js.map +1 -1
- package/lib/commonjs/types/BannerAdProps.js.map +1 -1
- package/lib/commonjs/types/GoogleMobileAdsNativeModule.js.map +1 -1
- package/lib/commonjs/types/MobileAd.interface.js.map +1 -1
- package/lib/commonjs/types/MobileAdsModule.interface.js.map +1 -1
- package/lib/commonjs/types/Module.interface.js.map +1 -1
- package/lib/commonjs/types/RequestConfiguration.js.map +1 -1
- package/lib/commonjs/types/RequestOptions.js.map +1 -1
- package/lib/commonjs/types/RewardedAdReward.js.map +1 -1
- package/lib/commonjs/types/index.js +0 -22
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/validateAdRequestConfiguration.js +1 -13
- package/lib/commonjs/validateAdRequestConfiguration.js.map +1 -1
- package/lib/commonjs/validateAdRequestOptions.js +1 -29
- package/lib/commonjs/validateAdRequestOptions.js.map +1 -1
- package/lib/commonjs/validateAdShowOptions.js +1 -7
- package/lib/commonjs/validateAdShowOptions.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/AdEventType.js +1 -1
- package/lib/module/AdEventType.js.map +1 -1
- package/lib/module/AdsConsent.js +2 -18
- package/lib/module/AdsConsent.js.map +1 -1
- package/lib/module/AdsConsentDebugGeography.js +0 -1
- package/lib/module/AdsConsentDebugGeography.js.map +1 -1
- package/lib/module/AdsConsentPurposes.js +1 -1
- package/lib/module/AdsConsentPurposes.js.map +1 -1
- package/lib/module/AdsConsentSpecialFeatures.js +1 -1
- package/lib/module/AdsConsentSpecialFeatures.js.map +1 -1
- package/lib/module/AdsConsentStatus.js +0 -1
- package/lib/module/AdsConsentStatus.js.map +1 -1
- package/lib/module/BannerAdSize.js +1 -1
- package/lib/module/BannerAdSize.js.map +1 -1
- package/lib/module/GAMAdEventType.js +1 -1
- package/lib/module/GAMAdEventType.js.map +1 -1
- package/lib/module/MaxAdContentRating.js +1 -1
- package/lib/module/MaxAdContentRating.js.map +1 -1
- package/lib/module/MobileAds.js +0 -8
- package/lib/module/MobileAds.js.map +1 -1
- package/lib/module/RewardedAdEventType.js +1 -1
- package/lib/module/RewardedAdEventType.js.map +1 -1
- package/lib/module/TestIds.js +1 -0
- package/lib/module/TestIds.js.map +1 -1
- package/lib/module/ads/AppOpenAd.js +1 -8
- package/lib/module/ads/AppOpenAd.js.map +1 -1
- package/lib/module/ads/BannerAd.js +2 -2
- package/lib/module/ads/BannerAd.js.map +1 -1
- package/lib/module/ads/BaseAd.js +1 -9
- package/lib/module/ads/BaseAd.js.map +1 -1
- package/lib/module/ads/GAMBannerAd.js +2 -7
- package/lib/module/ads/GAMBannerAd.js.map +1 -1
- package/lib/module/ads/GAMInterstitialAd.js +0 -3
- package/lib/module/ads/GAMInterstitialAd.js.map +1 -1
- package/lib/module/ads/InterstitialAd.js +1 -9
- package/lib/module/ads/InterstitialAd.js.map +1 -1
- package/lib/module/ads/MobileAd.js +3 -47
- package/lib/module/ads/MobileAd.js.map +1 -1
- package/lib/module/ads/RewardedAd.js +1 -10
- package/lib/module/ads/RewardedAd.js.map +1 -1
- package/lib/module/ads/RewardedInterstitialAd.js +1 -10
- package/lib/module/ads/RewardedInterstitialAd.js.map +1 -1
- package/lib/module/common/Base64.js +4 -17
- package/lib/module/common/Base64.js.map +1 -1
- package/lib/module/common/MutatableParams.js +3 -9
- package/lib/module/common/MutatableParams.js.map +1 -1
- package/lib/module/common/ReferenceBase.js +2 -8
- package/lib/module/common/ReferenceBase.js.map +1 -1
- package/lib/module/common/deeps.js +3 -15
- package/lib/module/common/deeps.js.map +1 -1
- package/lib/module/common/id.js +7 -16
- package/lib/module/common/id.js.map +1 -1
- package/lib/module/common/index.js +2 -11
- package/lib/module/common/index.js.map +1 -1
- package/lib/module/common/path.js +9 -19
- package/lib/module/common/path.js.map +1 -1
- package/lib/module/common/promise.js +3 -5
- package/lib/module/common/promise.js.map +1 -1
- package/lib/module/common/serialize.js +4 -4
- package/lib/module/common/serialize.js.map +1 -1
- package/lib/module/common/validate.js +17 -24
- package/lib/module/common/validate.js.map +1 -1
- package/lib/module/declarations.d.js.map +1 -1
- package/lib/module/hooks/useAppOpenAd.js +2 -1
- package/lib/module/hooks/useAppOpenAd.js.map +1 -1
- package/lib/module/hooks/useFullScreenAd.js +5 -11
- package/lib/module/hooks/useFullScreenAd.js.map +1 -1
- package/lib/module/hooks/useInterstitialAd.js +2 -1
- package/lib/module/hooks/useInterstitialAd.js.map +1 -1
- package/lib/module/hooks/useRewardedAd.js +2 -1
- package/lib/module/hooks/useRewardedAd.js.map +1 -1
- package/lib/module/hooks/useRewardedInterstitialAd.js +2 -1
- package/lib/module/hooks/useRewardedInterstitialAd.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/GoogleMobileAdsNativeEventEmitter.js +9 -18
- package/lib/module/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -1
- package/lib/module/internal/Module.js +3 -13
- package/lib/module/internal/Module.js.map +1 -1
- package/lib/module/internal/NativeError.js +2 -11
- package/lib/module/internal/NativeError.js.map +1 -1
- package/lib/module/internal/SharedEventEmitter.js +1 -0
- package/lib/module/internal/SharedEventEmitter.js.map +1 -1
- package/lib/module/internal/constants.js +1 -0
- package/lib/module/internal/constants.js.map +1 -1
- package/lib/module/internal/index.js +1 -0
- package/lib/module/internal/index.js.map +1 -1
- package/lib/module/internal/registry/nativeModule.js +13 -35
- package/lib/module/internal/registry/nativeModule.js.map +1 -1
- package/lib/module/types/AdEventListener.js.map +1 -1
- package/lib/module/types/AdEventsListener.js.map +1 -1
- package/lib/module/types/AdShowOptions.js.map +1 -1
- package/lib/module/types/AdStates.js.map +1 -1
- package/lib/module/types/AdapterStatus.js +1 -1
- package/lib/module/types/AdapterStatus.js.map +1 -1
- package/lib/module/types/AdsConsent.interface.js.map +1 -1
- package/lib/module/types/AppEvent.js.map +1 -1
- package/lib/module/types/BannerAdProps.js.map +1 -1
- package/lib/module/types/GoogleMobileAdsNativeModule.js.map +1 -1
- package/lib/module/types/MobileAd.interface.js.map +1 -1
- package/lib/module/types/MobileAdsModule.interface.js.map +1 -1
- package/lib/module/types/Module.interface.js.map +1 -1
- package/lib/module/types/RequestConfiguration.js.map +1 -1
- package/lib/module/types/RequestOptions.js.map +1 -1
- package/lib/module/types/RewardedAdReward.js.map +1 -1
- package/lib/module/types/index.js +1 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/validateAdRequestConfiguration.js +1 -10
- package/lib/module/validateAdRequestConfiguration.js.map +1 -1
- package/lib/module/validateAdRequestOptions.js +1 -27
- package/lib/module/validateAdRequestOptions.js.map +1 -1
- package/lib/module/validateAdShowOptions.js +1 -5
- package/lib/module/validateAdShowOptions.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/common/Base64.d.ts +0 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +34 -29
- package/src/internal/registry/nativeModule.ts +2 -0
- package/src/version.ts +1 -1
package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsAdHelper.kt
CHANGED
|
@@ -18,88 +18,63 @@ package io.invertase.googlemobileads
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import android.app.Activity
|
|
21
|
-
import com.google.android.gms.ads.AdLoadCallback
|
|
22
21
|
import com.google.android.gms.ads.FullScreenContentCallback
|
|
23
|
-
import com.google.android.gms.ads.LoadAdError
|
|
24
22
|
import com.google.android.gms.ads.OnUserEarnedRewardListener
|
|
25
|
-
import com.google.android.gms.ads.admanager.AdManagerAdRequest
|
|
26
23
|
import com.google.android.gms.ads.admanager.AdManagerInterstitialAd
|
|
27
24
|
import com.google.android.gms.ads.admanager.AppEventListener
|
|
28
25
|
import com.google.android.gms.ads.appopen.AppOpenAd
|
|
29
26
|
import com.google.android.gms.ads.interstitial.InterstitialAd
|
|
30
|
-
import com.google.android.gms.ads.interstitial.InterstitialAdLoadCallback
|
|
31
27
|
import com.google.android.gms.ads.rewarded.RewardItem
|
|
32
28
|
import com.google.android.gms.ads.rewarded.RewardedAd
|
|
33
|
-
import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback
|
|
34
29
|
import com.google.android.gms.ads.rewarded.ServerSideVerificationOptions
|
|
35
30
|
import com.google.android.gms.ads.rewardedinterstitial.RewardedInterstitialAd
|
|
36
|
-
import com.google.android.gms.ads.rewardedinterstitial.RewardedInterstitialAdLoadCallback
|
|
37
31
|
|
|
38
32
|
class ReactNativeGoogleMobileAdsAdHelper<T>(private val ad: T) {
|
|
39
33
|
fun show(activity: Activity, onUserEarnedRewardListener: OnUserEarnedRewardListener?) {
|
|
40
34
|
when (ad) {
|
|
41
|
-
is AppOpenAd
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
is RewardedAd, is RewardedInterstitialAd -> {
|
|
46
|
-
val method = ad.javaClass.getMethod(
|
|
47
|
-
"show",
|
|
48
|
-
Activity::class.java,
|
|
49
|
-
OnUserEarnedRewardListener::class.java
|
|
50
|
-
)
|
|
51
|
-
method.invoke(ad, activity, onUserEarnedRewardListener)
|
|
52
|
-
}
|
|
35
|
+
is AppOpenAd -> ad.show(activity)
|
|
36
|
+
is InterstitialAd -> ad.show(activity)
|
|
37
|
+
is RewardedAd -> onUserEarnedRewardListener?.let { ad.show(activity, it) }
|
|
38
|
+
is RewardedInterstitialAd -> onUserEarnedRewardListener?.let { ad.show(activity, it) }
|
|
53
39
|
}
|
|
54
40
|
}
|
|
55
41
|
|
|
56
42
|
fun setFullScreenContentCallback(fullScreenContentCallback: FullScreenContentCallback) {
|
|
57
43
|
when (ad) {
|
|
58
|
-
is AppOpenAd
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
)
|
|
63
|
-
method.invoke(ad, fullScreenContentCallback)
|
|
64
|
-
}
|
|
44
|
+
is AppOpenAd -> ad.fullScreenContentCallback = fullScreenContentCallback
|
|
45
|
+
is InterstitialAd -> ad.fullScreenContentCallback = fullScreenContentCallback
|
|
46
|
+
is RewardedAd -> ad.fullScreenContentCallback = fullScreenContentCallback
|
|
47
|
+
is RewardedInterstitialAd -> ad.fullScreenContentCallback = fullScreenContentCallback
|
|
65
48
|
}
|
|
66
49
|
}
|
|
67
50
|
|
|
68
51
|
fun setAppEventListener(appEventListener: AppEventListener) {
|
|
69
52
|
if (ad is AdManagerInterstitialAd) {
|
|
70
|
-
|
|
71
|
-
method.invoke(ad, appEventListener)
|
|
53
|
+
ad.appEventListener = appEventListener
|
|
72
54
|
}
|
|
73
55
|
}
|
|
74
56
|
|
|
75
57
|
fun setImmersiveMode(enabled: Boolean) {
|
|
76
58
|
when (ad) {
|
|
77
|
-
is AppOpenAd
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
59
|
+
is AppOpenAd -> ad.setImmersiveMode(enabled)
|
|
60
|
+
is InterstitialAd -> ad.setImmersiveMode(enabled)
|
|
61
|
+
is RewardedAd -> ad.setImmersiveMode(enabled)
|
|
62
|
+
is RewardedInterstitialAd -> ad.setImmersiveMode(enabled)
|
|
81
63
|
}
|
|
82
64
|
}
|
|
83
65
|
|
|
84
66
|
fun setServerSideVerificationOptions(serverSideVerificationOptions: ServerSideVerificationOptions) {
|
|
85
67
|
when (ad) {
|
|
86
|
-
is RewardedAd
|
|
87
|
-
|
|
88
|
-
"setServerSideVerificationOptions",
|
|
89
|
-
ServerSideVerificationOptions::class.java
|
|
90
|
-
)
|
|
91
|
-
method.invoke(ad, serverSideVerificationOptions)
|
|
92
|
-
}
|
|
68
|
+
is RewardedAd -> ad.setServerSideVerificationOptions(serverSideVerificationOptions)
|
|
69
|
+
is RewardedInterstitialAd -> ad.setServerSideVerificationOptions(serverSideVerificationOptions)
|
|
93
70
|
}
|
|
94
71
|
}
|
|
95
72
|
|
|
96
73
|
val rewardItem: RewardItem
|
|
97
74
|
get() {
|
|
98
75
|
when (ad) {
|
|
99
|
-
is RewardedAd
|
|
100
|
-
|
|
101
|
-
return method.invoke(ad) as RewardItem
|
|
102
|
-
}
|
|
76
|
+
is RewardedAd -> return ad.rewardItem
|
|
77
|
+
is RewardedInterstitialAd -> return ad.rewardItem
|
|
103
78
|
}
|
|
104
79
|
throw IllegalStateException("Ad type not supported")
|
|
105
80
|
}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AdEventType = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
9
|
*
|
|
@@ -20,10 +19,8 @@ exports.AdEventType = void 0;
|
|
|
20
19
|
* See the License for the specific language governing permissions and
|
|
21
20
|
* limitations under the License.
|
|
22
21
|
*
|
|
23
|
-
*/
|
|
24
|
-
let AdEventType;
|
|
22
|
+
*/let AdEventType;
|
|
25
23
|
exports.AdEventType = AdEventType;
|
|
26
|
-
|
|
27
24
|
(function (AdEventType) {
|
|
28
25
|
AdEventType["LOADED"] = "loaded";
|
|
29
26
|
AdEventType["ERROR"] = "error";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
|
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AdsConsent = void 0;
|
|
7
|
-
|
|
8
7
|
var _core = require("@iabtcf/core");
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
9
|
var _AdsConsentDebugGeography = require("./AdsConsentDebugGeography");
|
|
13
|
-
|
|
14
10
|
var _AdsConsentPurposes = require("./AdsConsentPurposes");
|
|
15
|
-
|
|
16
11
|
var _AdsConsentSpecialFeatures = require("./AdsConsentSpecialFeatures");
|
|
17
|
-
|
|
18
12
|
var _common = require("./common");
|
|
19
|
-
|
|
20
13
|
/*
|
|
21
14
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
22
15
|
*
|
|
@@ -33,72 +26,57 @@ var _common = require("./common");
|
|
|
33
26
|
* limitations under the License.
|
|
34
27
|
*
|
|
35
28
|
*/
|
|
29
|
+
|
|
36
30
|
const native = _reactNative.NativeModules.RNGoogleMobileAdsConsentModule;
|
|
37
31
|
const AdsConsent = {
|
|
38
32
|
requestInfoUpdate() {
|
|
39
33
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
40
|
-
|
|
41
34
|
if (!(0, _common.isObject)(options)) {
|
|
42
35
|
throw new Error("AdsConsent.requestInfoUpdate(*) 'options' expected an object value.");
|
|
43
36
|
}
|
|
44
|
-
|
|
45
37
|
if ((0, _common.isPropertySet)(options, 'debugGeography') && options.debugGeography !== _AdsConsentDebugGeography.AdsConsentDebugGeography.DISABLED && options.debugGeography !== _AdsConsentDebugGeography.AdsConsentDebugGeography.EEA && options.debugGeography !== _AdsConsentDebugGeography.AdsConsentDebugGeography.NOT_EEA) {
|
|
46
38
|
throw new Error("AdsConsent.requestInfoUpdate(*) 'options.debugGeography' expected one of AdsConsentDebugGeography.DISABLED, AdsConsentDebugGeography.EEA or AdsConsentDebugGeography.NOT_EEA.");
|
|
47
39
|
}
|
|
48
|
-
|
|
49
40
|
if ((0, _common.isPropertySet)(options, 'tagForUnderAgeOfConsent') && !(0, _common.isBoolean)(options.tagForUnderAgeOfConsent)) {
|
|
50
41
|
throw new Error("AdsConsent.requestInfoUpdate(*) 'options.tagForUnderAgeOfConsent' expected a boolean value.");
|
|
51
42
|
}
|
|
52
|
-
|
|
53
43
|
if ((0, _common.isPropertySet)(options, 'testDeviceIdentifiers')) {
|
|
54
44
|
if (!(0, _common.isArray)(options.testDeviceIdentifiers)) {
|
|
55
45
|
throw new Error("AdsConsent.requestInfoUpdate(*) 'options.testDeviceIdentifiers' expected an array of string values.");
|
|
56
46
|
}
|
|
57
|
-
|
|
58
|
-
for (const deviceId of (_options$testDeviceId = options.testDeviceIdentifiers) !== null && _options$testDeviceId !== void 0 ? _options$testDeviceId : []) {
|
|
59
|
-
var _options$testDeviceId;
|
|
60
|
-
|
|
47
|
+
for (const deviceId of options.testDeviceIdentifiers ?? []) {
|
|
61
48
|
if (!(0, _common.isString)(deviceId)) {
|
|
62
49
|
throw new Error("AdsConsent.requestInfoUpdate(*) 'options.testDeviceIdentifiers' expected an array of string values.");
|
|
63
50
|
}
|
|
64
51
|
}
|
|
65
52
|
}
|
|
66
|
-
|
|
67
53
|
return native.requestInfoUpdate(options);
|
|
68
54
|
},
|
|
69
|
-
|
|
70
55
|
showForm() {
|
|
71
56
|
return native.showForm();
|
|
72
57
|
},
|
|
73
|
-
|
|
74
58
|
reset() {
|
|
75
59
|
return native.reset();
|
|
76
60
|
},
|
|
77
|
-
|
|
78
61
|
getTCString() {
|
|
79
62
|
return native.getTCString();
|
|
80
63
|
},
|
|
81
|
-
|
|
82
64
|
async getTCModel() {
|
|
83
65
|
const tcString = await native.getTCString();
|
|
84
66
|
return _core.TCString.decode(tcString);
|
|
85
67
|
},
|
|
86
|
-
|
|
87
68
|
async getUserChoices() {
|
|
88
69
|
const tcString = await native.getTCString();
|
|
89
70
|
let tcModel;
|
|
90
|
-
|
|
91
71
|
try {
|
|
92
72
|
tcModel = _core.TCString.decode(tcString);
|
|
93
73
|
} catch (e) {
|
|
94
74
|
tcModel = new _core.TCModel();
|
|
95
|
-
|
|
96
75
|
if (__DEV__) {
|
|
97
76
|
// eslint-disable-next-line no-console
|
|
98
77
|
console.warn(`Failed to decode tcString ${tcString}:`, e);
|
|
99
78
|
}
|
|
100
79
|
}
|
|
101
|
-
|
|
102
80
|
return {
|
|
103
81
|
activelyScanDeviceCharacteristicsForIdentification: tcModel.specialFeatureOptins.has(_AdsConsentSpecialFeatures.AdsConsentSpecialFeatures.ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION),
|
|
104
82
|
applyMarketResearchToGenerateAudienceInsights: tcModel.purposeConsents.has(_AdsConsentPurposes.AdsConsentPurposes.APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS),
|
|
@@ -114,7 +92,6 @@ const AdsConsent = {
|
|
|
114
92
|
usePreciseGeolocationData: tcModel.specialFeatureOptins.has(_AdsConsentSpecialFeatures.AdsConsentSpecialFeatures.USE_PRECISE_GEOLOCATION_DATA)
|
|
115
93
|
};
|
|
116
94
|
}
|
|
117
|
-
|
|
118
95
|
};
|
|
119
96
|
exports.AdsConsent = AdsConsent;
|
|
120
97
|
//# sourceMappingURL=AdsConsent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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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"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AdsConsentDebugGeography = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
9
|
*
|
|
@@ -21,7 +20,6 @@ exports.AdsConsentDebugGeography = void 0;
|
|
|
21
20
|
* limitations under the License.
|
|
22
21
|
*
|
|
23
22
|
*/
|
|
24
|
-
|
|
25
23
|
/**
|
|
26
24
|
* AdsConsentDebugGeography enum.
|
|
27
25
|
*
|
|
@@ -29,7 +27,6 @@ exports.AdsConsentDebugGeography = void 0;
|
|
|
29
27
|
*/
|
|
30
28
|
let AdsConsentDebugGeography;
|
|
31
29
|
exports.AdsConsentDebugGeography = AdsConsentDebugGeography;
|
|
32
|
-
|
|
33
30
|
(function (AdsConsentDebugGeography) {
|
|
34
31
|
AdsConsentDebugGeography[AdsConsentDebugGeography["DISABLED"] = 0] = "DISABLED";
|
|
35
32
|
AdsConsentDebugGeography[AdsConsentDebugGeography["EEA"] = 1] = "EEA";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AdsConsentPurposes = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
9
|
*
|
|
@@ -28,10 +27,8 @@ exports.AdsConsentPurposes = void 0;
|
|
|
28
27
|
* https://vendor-list.consensu.org/v2/vendor-list.json
|
|
29
28
|
* https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework
|
|
30
29
|
*
|
|
31
|
-
*/
|
|
32
|
-
let AdsConsentPurposes;
|
|
30
|
+
*/let AdsConsentPurposes;
|
|
33
31
|
exports.AdsConsentPurposes = AdsConsentPurposes;
|
|
34
|
-
|
|
35
32
|
(function (AdsConsentPurposes) {
|
|
36
33
|
AdsConsentPurposes[AdsConsentPurposes["STORE_AND_ACCESS_INFORMATION_ON_DEVICE"] = 1] = "STORE_AND_ACCESS_INFORMATION_ON_DEVICE";
|
|
37
34
|
AdsConsentPurposes[AdsConsentPurposes["SELECT_BASIC_ADS"] = 2] = "SELECT_BASIC_ADS";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AdsConsentSpecialFeatures = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
9
|
*
|
|
@@ -28,10 +27,8 @@ exports.AdsConsentSpecialFeatures = void 0;
|
|
|
28
27
|
* https://vendor-list.consensu.org/v2/vendor-list.json
|
|
29
28
|
* https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework
|
|
30
29
|
*
|
|
31
|
-
*/
|
|
32
|
-
let AdsConsentSpecialFeatures;
|
|
30
|
+
*/let AdsConsentSpecialFeatures;
|
|
33
31
|
exports.AdsConsentSpecialFeatures = AdsConsentSpecialFeatures;
|
|
34
|
-
|
|
35
32
|
(function (AdsConsentSpecialFeatures) {
|
|
36
33
|
AdsConsentSpecialFeatures[AdsConsentSpecialFeatures["USE_PRECISE_GEOLOCATION_DATA"] = 1] = "USE_PRECISE_GEOLOCATION_DATA";
|
|
37
34
|
AdsConsentSpecialFeatures[AdsConsentSpecialFeatures["ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION"] = 2] = "ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AdsConsentStatus = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
9
|
*
|
|
@@ -21,13 +20,11 @@ exports.AdsConsentStatus = void 0;
|
|
|
21
20
|
* limitations under the License.
|
|
22
21
|
*
|
|
23
22
|
*/
|
|
24
|
-
|
|
25
23
|
/**
|
|
26
24
|
* AdsConsentStatus enum.
|
|
27
25
|
*/
|
|
28
26
|
let AdsConsentStatus;
|
|
29
27
|
exports.AdsConsentStatus = AdsConsentStatus;
|
|
30
|
-
|
|
31
28
|
(function (AdsConsentStatus) {
|
|
32
29
|
AdsConsentStatus["UNKNOWN"] = "UNKNOWN";
|
|
33
30
|
AdsConsentStatus["REQUIRED"] = "REQUIRED";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BannerAdSize = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
9
|
*
|
|
@@ -21,10 +20,8 @@ exports.BannerAdSize = void 0;
|
|
|
21
20
|
* limitations under the License.
|
|
22
21
|
*
|
|
23
22
|
*
|
|
24
|
-
*/
|
|
25
|
-
let BannerAdSize;
|
|
23
|
+
*/let BannerAdSize;
|
|
26
24
|
exports.BannerAdSize = BannerAdSize;
|
|
27
|
-
|
|
28
25
|
(function (BannerAdSize) {
|
|
29
26
|
BannerAdSize["BANNER"] = "BANNER";
|
|
30
27
|
BannerAdSize["FULL_BANNER"] = "FULL_BANNER";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.GAMAdEventType = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
9
|
*
|
|
@@ -20,10 +19,8 @@ exports.GAMAdEventType = void 0;
|
|
|
20
19
|
* See the License for the specific language governing permissions and
|
|
21
20
|
* limitations under the License.
|
|
22
21
|
*
|
|
23
|
-
*/
|
|
24
|
-
let GAMAdEventType;
|
|
22
|
+
*/let GAMAdEventType;
|
|
25
23
|
exports.GAMAdEventType = GAMAdEventType;
|
|
26
|
-
|
|
27
24
|
(function (GAMAdEventType) {
|
|
28
25
|
GAMAdEventType["APP_EVENT"] = "app_event";
|
|
29
26
|
})(GAMAdEventType || (exports.GAMAdEventType = GAMAdEventType = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MaxAdContentRating = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
9
|
*
|
|
@@ -20,10 +19,8 @@ exports.MaxAdContentRating = void 0;
|
|
|
20
19
|
* See the License for the specific language governing permissions and
|
|
21
20
|
* limitations under the License.
|
|
22
21
|
*
|
|
23
|
-
*/
|
|
24
|
-
let MaxAdContentRating;
|
|
22
|
+
*/let MaxAdContentRating;
|
|
25
23
|
exports.MaxAdContentRating = MaxAdContentRating;
|
|
26
|
-
|
|
27
24
|
(function (MaxAdContentRating) {
|
|
28
25
|
MaxAdContentRating["G"] = "G";
|
|
29
26
|
MaxAdContentRating["PG"] = "PG";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
|
@@ -4,16 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.MobileAds = void 0;
|
|
7
|
-
|
|
8
7
|
var _internal = require("./internal");
|
|
9
|
-
|
|
10
8
|
var _validateAdRequestConfiguration = require("./validateAdRequestConfiguration");
|
|
11
|
-
|
|
12
9
|
var _version = require("./version");
|
|
13
|
-
|
|
14
10
|
const namespace = 'google_mobile_ads';
|
|
15
11
|
const nativeModuleName = ['RNGoogleMobileAdsModule', 'RNGoogleMobileAdsAppOpenModule', 'RNGoogleMobileAdsInterstitialModule', 'RNGoogleMobileAdsRewardedModule', 'RNGoogleMobileAdsRewardedInterstitialModule'];
|
|
16
|
-
|
|
17
12
|
class MobileAdsModule extends _internal.Module {
|
|
18
13
|
constructor(app, config) {
|
|
19
14
|
super(app, config);
|
|
@@ -30,14 +25,11 @@ class MobileAdsModule extends _internal.Module {
|
|
|
30
25
|
this.emitter.emit(`google_mobile_ads_rewarded_interstitial_event:${event.adUnitId}:${event.requestId}`, event);
|
|
31
26
|
});
|
|
32
27
|
}
|
|
33
|
-
|
|
34
28
|
initialize() {
|
|
35
29
|
return this.native.initialize();
|
|
36
30
|
}
|
|
37
|
-
|
|
38
31
|
setRequestConfiguration(requestConfiguration) {
|
|
39
32
|
let config;
|
|
40
|
-
|
|
41
33
|
try {
|
|
42
34
|
config = (0, _validateAdRequestConfiguration.validateAdRequestConfiguration)(requestConfiguration);
|
|
43
35
|
} catch (e) {
|
|
@@ -45,16 +37,12 @@ class MobileAdsModule extends _internal.Module {
|
|
|
45
37
|
throw new Error(`googleMobileAds.setRequestConfiguration(*) ${e.message}`);
|
|
46
38
|
}
|
|
47
39
|
}
|
|
48
|
-
|
|
49
40
|
return this.native.setRequestConfiguration(config);
|
|
50
41
|
}
|
|
51
|
-
|
|
52
42
|
openAdInspector() {
|
|
53
43
|
return this.native.openAdInspector();
|
|
54
44
|
}
|
|
55
|
-
|
|
56
45
|
}
|
|
57
|
-
|
|
58
46
|
const MobileAdsInstance = new MobileAdsModule({
|
|
59
47
|
name: 'AppName'
|
|
60
48
|
}, {
|
|
@@ -63,11 +51,9 @@ const MobileAdsInstance = new MobileAdsModule({
|
|
|
63
51
|
nativeModuleName,
|
|
64
52
|
nativeEvents: ['google_mobile_ads_app_open_event', 'google_mobile_ads_interstitial_event', 'google_mobile_ads_rewarded_event', 'google_mobile_ads_rewarded_interstitial_event']
|
|
65
53
|
});
|
|
66
|
-
|
|
67
54
|
const MobileAds = () => {
|
|
68
55
|
return MobileAdsInstance;
|
|
69
56
|
};
|
|
70
|
-
|
|
71
57
|
exports.MobileAds = MobileAds;
|
|
72
58
|
var _default = MobileAds;
|
|
73
59
|
exports.default = _default;
|