react-native-google-mobile-ads 14.2.2 → 14.2.4
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/__tests__/banner.test.tsx +14 -0
- package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsModule.kt +166 -0
- package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsPackage.kt +42 -0
- package/docs/european-user-consent.mdx +4 -3
- package/docs/index.mdx +6 -6
- package/docs/testing.mdx +17 -0
- package/docs.json +2 -1
- package/jest.setup.ts +1 -4
- package/lib/commonjs/validateAdRequestOptions.js +3 -0
- package/lib/commonjs/validateAdRequestOptions.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/validateAdRequestOptions.js +3 -0
- package/lib/module/validateAdRequestOptions.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/src/AdEventType.d.ts.map +1 -0
- package/lib/typescript/src/AdsConsent.d.ts.map +1 -0
- package/lib/typescript/src/AdsConsentDebugGeography.d.ts.map +1 -0
- package/lib/typescript/src/AdsConsentPrivacyOptionsRequirementStatus.d.ts.map +1 -0
- package/lib/typescript/src/AdsConsentPurposes.d.ts.map +1 -0
- package/lib/typescript/src/AdsConsentSpecialFeatures.d.ts.map +1 -0
- package/lib/typescript/src/AdsConsentStatus.d.ts.map +1 -0
- package/lib/typescript/src/BannerAdSize.d.ts.map +1 -0
- package/lib/typescript/src/GAMAdEventType.d.ts.map +1 -0
- package/lib/typescript/src/MaxAdContentRating.d.ts.map +1 -0
- package/lib/typescript/src/MobileAds.d.ts.map +1 -0
- package/lib/typescript/src/NativeGoogleMobileAdsModule.d.ts.map +1 -0
- package/lib/typescript/src/RewardedAdEventType.d.ts.map +1 -0
- package/lib/typescript/src/TestIds.d.ts.map +1 -0
- package/lib/typescript/src/ads/AppOpenAd.d.ts.map +1 -0
- package/lib/typescript/src/ads/BannerAd.d.ts.map +1 -0
- package/lib/typescript/src/ads/BaseAd.d.ts.map +1 -0
- package/lib/typescript/src/ads/GAMBannerAd.d.ts.map +1 -0
- package/lib/typescript/src/ads/GAMInterstitialAd.d.ts.map +1 -0
- package/lib/typescript/src/ads/GoogleMobileAdsBannerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/ads/InterstitialAd.d.ts.map +1 -0
- package/lib/typescript/src/ads/MobileAd.d.ts.map +1 -0
- package/lib/typescript/src/ads/RewardedAd.d.ts.map +1 -0
- package/lib/typescript/src/ads/RewardedInterstitialAd.d.ts.map +1 -0
- package/lib/typescript/src/common/constants.d.ts.map +1 -0
- package/lib/typescript/src/common/debounce.d.ts.map +1 -0
- package/lib/typescript/src/common/index.d.ts.map +1 -0
- package/lib/typescript/src/common/validate.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useAppOpenAd.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useForeground.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useFullScreenAd.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useInterstitialAd.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useRewardedAd.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useRewardedInterstitialAd.d.ts.map +1 -0
- package/lib/typescript/{index.d.ts → src/index.d.ts} +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/internal/GoogleMobileAdsNativeEventEmitter.d.ts.map +1 -0
- package/lib/typescript/src/internal/NativeError.d.ts.map +1 -0
- package/lib/typescript/src/internal/SharedEventEmitter.d.ts.map +1 -0
- package/lib/typescript/src/types/AdEventListener.d.ts.map +1 -0
- package/lib/typescript/src/types/AdEventsListener.d.ts.map +1 -0
- package/lib/typescript/src/types/AdShowOptions.d.ts.map +1 -0
- package/lib/typescript/src/types/AdStates.d.ts.map +1 -0
- package/lib/typescript/src/types/AdapterStatus.d.ts.map +1 -0
- package/lib/typescript/src/types/AdsConsent.interface.d.ts.map +1 -0
- package/lib/typescript/src/types/AppEvent.d.ts.map +1 -0
- package/lib/typescript/src/types/BannerAdProps.d.ts.map +1 -0
- package/lib/typescript/src/types/MobileAd.interface.d.ts.map +1 -0
- package/lib/typescript/src/types/MobileAdsModule.interface.d.ts.map +1 -0
- package/lib/typescript/src/types/PaidEventListener.d.ts.map +1 -0
- package/lib/typescript/src/types/RequestConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/types/RequestOptions.d.ts.map +1 -0
- package/lib/typescript/src/types/RewardedAdReward.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/lib/typescript/src/validateAdRequestConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/validateAdRequestOptions.d.ts.map +1 -0
- package/lib/typescript/src/validateAdShowOptions.d.ts.map +1 -0
- package/lib/typescript/src/version.d.ts +2 -0
- package/lib/typescript/src/version.d.ts.map +1 -0
- package/lib/typescript/type-test.d.ts +2 -0
- package/lib/typescript/type-test.d.ts.map +1 -0
- package/package.json +4 -4
- package/plugin/__tests__/__snapshots__/plugin.test.ts.snap +278 -0
- package/plugin/__tests__/fixtures/app.config.js +24 -0
- package/plugin/__tests__/fixtures/app.config.ts +24 -0
- package/plugin/__tests__/fixtures/without-params/app.config.js +11 -0
- package/plugin/__tests__/fixtures/without-params/app.config.ts +11 -0
- package/plugin/__tests__/plugin.test.ts +13 -10
- package/src/validateAdRequestOptions.ts +3 -0
- package/src/version.ts +1 -1
- package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsModule.java +0 -207
- package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsPackage.java +0 -49
- package/lib/typescript/AdEventType.d.ts.map +0 -1
- package/lib/typescript/AdsConsent.d.ts.map +0 -1
- package/lib/typescript/AdsConsentDebugGeography.d.ts.map +0 -1
- package/lib/typescript/AdsConsentPrivacyOptionsRequirementStatus.d.ts.map +0 -1
- package/lib/typescript/AdsConsentPurposes.d.ts.map +0 -1
- package/lib/typescript/AdsConsentSpecialFeatures.d.ts.map +0 -1
- package/lib/typescript/AdsConsentStatus.d.ts.map +0 -1
- package/lib/typescript/BannerAdSize.d.ts.map +0 -1
- package/lib/typescript/GAMAdEventType.d.ts.map +0 -1
- package/lib/typescript/MaxAdContentRating.d.ts.map +0 -1
- package/lib/typescript/MobileAds.d.ts.map +0 -1
- package/lib/typescript/NativeGoogleMobileAdsModule.d.ts.map +0 -1
- package/lib/typescript/RewardedAdEventType.d.ts.map +0 -1
- package/lib/typescript/TestIds.d.ts.map +0 -1
- package/lib/typescript/ads/AppOpenAd.d.ts.map +0 -1
- package/lib/typescript/ads/BannerAd.d.ts.map +0 -1
- package/lib/typescript/ads/BaseAd.d.ts.map +0 -1
- package/lib/typescript/ads/GAMBannerAd.d.ts.map +0 -1
- package/lib/typescript/ads/GAMInterstitialAd.d.ts.map +0 -1
- package/lib/typescript/ads/GoogleMobileAdsBannerViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/ads/InterstitialAd.d.ts.map +0 -1
- package/lib/typescript/ads/MobileAd.d.ts.map +0 -1
- package/lib/typescript/ads/RewardedAd.d.ts.map +0 -1
- package/lib/typescript/ads/RewardedInterstitialAd.d.ts.map +0 -1
- package/lib/typescript/common/constants.d.ts.map +0 -1
- package/lib/typescript/common/debounce.d.ts.map +0 -1
- package/lib/typescript/common/index.d.ts.map +0 -1
- package/lib/typescript/common/validate.d.ts.map +0 -1
- package/lib/typescript/hooks/useAppOpenAd.d.ts.map +0 -1
- package/lib/typescript/hooks/useForeground.d.ts.map +0 -1
- package/lib/typescript/hooks/useFullScreenAd.d.ts.map +0 -1
- package/lib/typescript/hooks/useInterstitialAd.d.ts.map +0 -1
- package/lib/typescript/hooks/useRewardedAd.d.ts.map +0 -1
- package/lib/typescript/hooks/useRewardedInterstitialAd.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/internal/GoogleMobileAdsNativeEventEmitter.d.ts.map +0 -1
- package/lib/typescript/internal/NativeError.d.ts.map +0 -1
- package/lib/typescript/internal/SharedEventEmitter.d.ts.map +0 -1
- package/lib/typescript/types/AdEventListener.d.ts.map +0 -1
- package/lib/typescript/types/AdEventsListener.d.ts.map +0 -1
- package/lib/typescript/types/AdShowOptions.d.ts.map +0 -1
- package/lib/typescript/types/AdStates.d.ts.map +0 -1
- package/lib/typescript/types/AdapterStatus.d.ts.map +0 -1
- package/lib/typescript/types/AdsConsent.interface.d.ts.map +0 -1
- package/lib/typescript/types/AppEvent.d.ts.map +0 -1
- package/lib/typescript/types/BannerAdProps.d.ts.map +0 -1
- package/lib/typescript/types/MobileAd.interface.d.ts.map +0 -1
- package/lib/typescript/types/MobileAdsModule.interface.d.ts.map +0 -1
- package/lib/typescript/types/PaidEventListener.d.ts.map +0 -1
- package/lib/typescript/types/RequestConfiguration.d.ts.map +0 -1
- package/lib/typescript/types/RequestOptions.d.ts.map +0 -1
- package/lib/typescript/types/RewardedAdReward.d.ts.map +0 -1
- package/lib/typescript/types/index.d.ts.map +0 -1
- package/lib/typescript/validateAdRequestConfiguration.d.ts.map +0 -1
- package/lib/typescript/validateAdRequestOptions.d.ts.map +0 -1
- package/lib/typescript/validateAdShowOptions.d.ts.map +0 -1
- package/lib/typescript/version.d.ts +0 -2
- package/lib/typescript/version.d.ts.map +0 -1
- /package/lib/typescript/{AdEventType.d.ts → src/AdEventType.d.ts} +0 -0
- /package/lib/typescript/{AdsConsent.d.ts → src/AdsConsent.d.ts} +0 -0
- /package/lib/typescript/{AdsConsentDebugGeography.d.ts → src/AdsConsentDebugGeography.d.ts} +0 -0
- /package/lib/typescript/{AdsConsentPrivacyOptionsRequirementStatus.d.ts → src/AdsConsentPrivacyOptionsRequirementStatus.d.ts} +0 -0
- /package/lib/typescript/{AdsConsentPurposes.d.ts → src/AdsConsentPurposes.d.ts} +0 -0
- /package/lib/typescript/{AdsConsentSpecialFeatures.d.ts → src/AdsConsentSpecialFeatures.d.ts} +0 -0
- /package/lib/typescript/{AdsConsentStatus.d.ts → src/AdsConsentStatus.d.ts} +0 -0
- /package/lib/typescript/{BannerAdSize.d.ts → src/BannerAdSize.d.ts} +0 -0
- /package/lib/typescript/{GAMAdEventType.d.ts → src/GAMAdEventType.d.ts} +0 -0
- /package/lib/typescript/{MaxAdContentRating.d.ts → src/MaxAdContentRating.d.ts} +0 -0
- /package/lib/typescript/{MobileAds.d.ts → src/MobileAds.d.ts} +0 -0
- /package/lib/typescript/{NativeGoogleMobileAdsModule.d.ts → src/NativeGoogleMobileAdsModule.d.ts} +0 -0
- /package/lib/typescript/{RewardedAdEventType.d.ts → src/RewardedAdEventType.d.ts} +0 -0
- /package/lib/typescript/{TestIds.d.ts → src/TestIds.d.ts} +0 -0
- /package/lib/typescript/{ads → src/ads}/AppOpenAd.d.ts +0 -0
- /package/lib/typescript/{ads → src/ads}/BannerAd.d.ts +0 -0
- /package/lib/typescript/{ads → src/ads}/BaseAd.d.ts +0 -0
- /package/lib/typescript/{ads → src/ads}/GAMBannerAd.d.ts +0 -0
- /package/lib/typescript/{ads → src/ads}/GAMInterstitialAd.d.ts +0 -0
- /package/lib/typescript/{ads → src/ads}/GoogleMobileAdsBannerViewNativeComponent.d.ts +0 -0
- /package/lib/typescript/{ads → src/ads}/InterstitialAd.d.ts +0 -0
- /package/lib/typescript/{ads → src/ads}/MobileAd.d.ts +0 -0
- /package/lib/typescript/{ads → src/ads}/RewardedAd.d.ts +0 -0
- /package/lib/typescript/{ads → src/ads}/RewardedInterstitialAd.d.ts +0 -0
- /package/lib/typescript/{common → src/common}/constants.d.ts +0 -0
- /package/lib/typescript/{common → src/common}/debounce.d.ts +0 -0
- /package/lib/typescript/{common → src/common}/index.d.ts +0 -0
- /package/lib/typescript/{common → src/common}/validate.d.ts +0 -0
- /package/lib/typescript/{hooks → src/hooks}/useAppOpenAd.d.ts +0 -0
- /package/lib/typescript/{hooks → src/hooks}/useForeground.d.ts +0 -0
- /package/lib/typescript/{hooks → src/hooks}/useFullScreenAd.d.ts +0 -0
- /package/lib/typescript/{hooks → src/hooks}/useInterstitialAd.d.ts +0 -0
- /package/lib/typescript/{hooks → src/hooks}/useRewardedAd.d.ts +0 -0
- /package/lib/typescript/{hooks → src/hooks}/useRewardedInterstitialAd.d.ts +0 -0
- /package/lib/typescript/{internal → src/internal}/GoogleMobileAdsNativeEventEmitter.d.ts +0 -0
- /package/lib/typescript/{internal → src/internal}/NativeError.d.ts +0 -0
- /package/lib/typescript/{internal → src/internal}/SharedEventEmitter.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/AdEventListener.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/AdEventsListener.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/AdShowOptions.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/AdStates.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/AdapterStatus.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/AdsConsent.interface.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/AppEvent.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/BannerAdProps.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/MobileAd.interface.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/MobileAdsModule.interface.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/PaidEventListener.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/RequestConfiguration.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/RequestOptions.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/RewardedAdReward.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/index.d.ts +0 -0
- /package/lib/typescript/{validateAdRequestConfiguration.d.ts → src/validateAdRequestConfiguration.d.ts} +0 -0
- /package/lib/typescript/{validateAdRequestOptions.d.ts → src/validateAdRequestOptions.d.ts} +0 -0
- /package/lib/typescript/{validateAdShowOptions.d.ts → src/validateAdShowOptions.d.ts} +0 -0
- /package/plugin/__tests__/fixtures/{app-without-params.json → without-params/app.json} +0 -0
|
@@ -1,9 +1,23 @@
|
|
|
1
|
+
import * as ReactNative from 'react-native';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { render } from '@testing-library/react-native';
|
|
3
4
|
import { BannerAd, BannerAdSize } from '../src';
|
|
4
5
|
|
|
5
6
|
const MOCK_ID = 'MOCK_ID';
|
|
6
7
|
|
|
8
|
+
jest.doMock('react-native', () => {
|
|
9
|
+
return Object.setPrototypeOf(
|
|
10
|
+
{
|
|
11
|
+
...ReactNative,
|
|
12
|
+
Platform: {
|
|
13
|
+
OS: 'android',
|
|
14
|
+
select: () => {},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
ReactNative,
|
|
18
|
+
);
|
|
19
|
+
});
|
|
20
|
+
|
|
7
21
|
describe('Google Mobile Ads Banner', function () {
|
|
8
22
|
it('throws if no unit ID was provided.', function () {
|
|
9
23
|
let errorMsg;
|
package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsModule.kt
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
package io.invertase.googlemobileads
|
|
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 com.facebook.react.bridge.*
|
|
21
|
+
import com.google.android.gms.ads.MobileAds
|
|
22
|
+
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener
|
|
23
|
+
import com.google.android.gms.ads.RequestConfiguration
|
|
24
|
+
import com.google.android.gms.ads.AdInspectorError
|
|
25
|
+
import com.google.android.gms.ads.AdRequest
|
|
26
|
+
import com.google.android.gms.ads.OnAdInspectorClosedListener
|
|
27
|
+
|
|
28
|
+
private const val SERVICE = "RNGoogleMobileAdsModule";
|
|
29
|
+
|
|
30
|
+
class ReactNativeGoogleMobileAdsModule(
|
|
31
|
+
reactContext: ReactApplicationContext
|
|
32
|
+
) : ReactContextBaseJavaModule(reactContext) {
|
|
33
|
+
|
|
34
|
+
override fun getName() = SERVICE
|
|
35
|
+
|
|
36
|
+
private fun buildRequestConfiguration(
|
|
37
|
+
requestConfiguration: ReadableMap
|
|
38
|
+
): RequestConfiguration {
|
|
39
|
+
val builder = RequestConfiguration.Builder()
|
|
40
|
+
|
|
41
|
+
if (requestConfiguration.hasKey("testDeviceIdentifiers")) {
|
|
42
|
+
val devices = checkNotNull(requestConfiguration.getArray("testDeviceIdentifiers")).toArrayList()
|
|
43
|
+
val testDeviceIds = devices.map {
|
|
44
|
+
val id = it as String;
|
|
45
|
+
if (id == "EMULATOR") {
|
|
46
|
+
AdRequest.DEVICE_ID_EMULATOR
|
|
47
|
+
} else {
|
|
48
|
+
id
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
builder.setTestDeviceIds(testDeviceIds)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (requestConfiguration.hasKey("maxAdContentRating")) {
|
|
56
|
+
val rating = requestConfiguration.getString("maxAdContentRating")
|
|
57
|
+
|
|
58
|
+
when (rating) {
|
|
59
|
+
"G" -> builder.setMaxAdContentRating(RequestConfiguration.MAX_AD_CONTENT_RATING_G)
|
|
60
|
+
"PG" -> builder.setMaxAdContentRating(RequestConfiguration.MAX_AD_CONTENT_RATING_PG)
|
|
61
|
+
"T" -> builder.setMaxAdContentRating(RequestConfiguration.MAX_AD_CONTENT_RATING_T)
|
|
62
|
+
"MA" -> builder.setMaxAdContentRating(RequestConfiguration.MAX_AD_CONTENT_RATING_MA)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (requestConfiguration.hasKey("tagForChildDirectedTreatment")) {
|
|
67
|
+
val tagForChildDirectedTreatment = requestConfiguration.getBoolean("tagForChildDirectedTreatment")
|
|
68
|
+
builder.setTagForChildDirectedTreatment(
|
|
69
|
+
if (tagForChildDirectedTreatment) {
|
|
70
|
+
RequestConfiguration.TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE
|
|
71
|
+
} else {
|
|
72
|
+
RequestConfiguration.TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
} else {
|
|
76
|
+
builder.setTagForChildDirectedTreatment(RequestConfiguration.TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (requestConfiguration.hasKey("tagForUnderAgeOfConsent")) {
|
|
80
|
+
val tagForUnderAgeOfConsent = requestConfiguration.getBoolean("tagForUnderAgeOfConsent")
|
|
81
|
+
builder.setTagForUnderAgeOfConsent(
|
|
82
|
+
if (tagForUnderAgeOfConsent) {
|
|
83
|
+
RequestConfiguration.TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE
|
|
84
|
+
} else {
|
|
85
|
+
RequestConfiguration.TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
} else {
|
|
89
|
+
builder.setTagForUnderAgeOfConsent(RequestConfiguration.TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return builder.build()
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@ReactMethod
|
|
96
|
+
fun initialize(promise: Promise) {
|
|
97
|
+
MobileAds.initialize(
|
|
98
|
+
reactApplicationContext,
|
|
99
|
+
OnInitializationCompleteListener { initializationStatus ->
|
|
100
|
+
val result = Arguments.createArray()
|
|
101
|
+
for ((key, value) in initializationStatus.adapterStatusMap) {
|
|
102
|
+
val info = Arguments.createMap();
|
|
103
|
+
info.putString("name", key)
|
|
104
|
+
info.putInt("state", value.initializationState.ordinal)
|
|
105
|
+
info.putString("description", value.description)
|
|
106
|
+
result.pushMap(info);
|
|
107
|
+
}
|
|
108
|
+
promise.resolve(result)
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@ReactMethod
|
|
113
|
+
fun setRequestConfiguration(
|
|
114
|
+
requestConfiguration: ReadableMap,
|
|
115
|
+
promise: Promise
|
|
116
|
+
) {
|
|
117
|
+
MobileAds.setRequestConfiguration(buildRequestConfiguration(requestConfiguration))
|
|
118
|
+
promise.resolve(null)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@ReactMethod
|
|
122
|
+
fun openAdInspector(promise: Promise) {
|
|
123
|
+
val activity = currentActivity
|
|
124
|
+
if (activity == null) {
|
|
125
|
+
promise.reject("null-activity", "Ad Inspector attempted to open but the current Activity was null.")
|
|
126
|
+
return
|
|
127
|
+
}
|
|
128
|
+
activity.runOnUiThread {
|
|
129
|
+
MobileAds.openAdInspector(
|
|
130
|
+
reactApplicationContext,
|
|
131
|
+
OnAdInspectorClosedListener { adInspectorError ->
|
|
132
|
+
if (adInspectorError != null) {
|
|
133
|
+
val code = when (adInspectorError.code) {
|
|
134
|
+
AdInspectorError.ERROR_CODE_INTERNAL_ERROR -> "INTERNAL_ERROR"
|
|
135
|
+
AdInspectorError.ERROR_CODE_FAILED_TO_LOAD -> "FAILED_TO_LOAD"
|
|
136
|
+
AdInspectorError.ERROR_CODE_NOT_IN_TEST_MODE -> "NOT_IN_TEST_MODE"
|
|
137
|
+
AdInspectorError.ERROR_CODE_ALREADY_OPEN -> "ALREADY_OPEN"
|
|
138
|
+
else -> ""
|
|
139
|
+
}
|
|
140
|
+
promise.reject(code, adInspectorError.message)
|
|
141
|
+
} else {
|
|
142
|
+
promise.resolve(null)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
@ReactMethod
|
|
151
|
+
fun openDebugMenu(adUnit: String) {
|
|
152
|
+
currentActivity?.runOnUiThread {
|
|
153
|
+
MobileAds.openDebugMenu(currentActivity!!, adUnit)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@ReactMethod
|
|
158
|
+
fun setAppVolume(volume: Float) {
|
|
159
|
+
MobileAds.setAppVolume(volume)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@ReactMethod
|
|
163
|
+
fun setAppMuted(muted: Boolean) {
|
|
164
|
+
MobileAds.setAppMuted(muted)
|
|
165
|
+
}
|
|
166
|
+
}
|
package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsPackage.kt
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
package io.invertase.googlemobileads
|
|
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 com.facebook.react.ReactPackage
|
|
21
|
+
import com.facebook.react.bridge.NativeModule
|
|
22
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
23
|
+
import com.facebook.react.uimanager.ViewManager
|
|
24
|
+
|
|
25
|
+
@SuppressWarnings("unused")
|
|
26
|
+
class ReactNativeGoogleMobileAdsPackage : ReactPackage {
|
|
27
|
+
override fun createNativeModules(reactContext: ReactApplicationContext) = listOf(
|
|
28
|
+
ReactNativeAppModule(reactContext),
|
|
29
|
+
ReactNativeGoogleMobileAdsModule(reactContext),
|
|
30
|
+
ReactNativeGoogleMobileAdsConsentModule(reactContext),
|
|
31
|
+
ReactNativeGoogleMobileAdsAppOpenModule(reactContext),
|
|
32
|
+
ReactNativeGoogleMobileAdsInterstitialModule(reactContext),
|
|
33
|
+
ReactNativeGoogleMobileAdsRewardedModule(reactContext),
|
|
34
|
+
ReactNativeGoogleMobileAdsRewardedInterstitialModule(reactContext)
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
override fun createViewManagers(
|
|
38
|
+
reactContext: ReactApplicationContext
|
|
39
|
+
): List<ViewManager<*, *>> {
|
|
40
|
+
return listOf(ReactNativeGoogleMobileAdsBannerAdViewManager())
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -34,9 +34,10 @@ For Android, add the following rule into `android/app/proguard-rules.pro`:
|
|
|
34
34
|
</TabItem>
|
|
35
35
|
<TabItem value="expo">
|
|
36
36
|
|
|
37
|
-
Add the `extraProguardRules` property to `app.json` file as described in the [Expo documentation](https://docs.expo.dev/versions/latest/sdk/build-properties/#pluginconfigtypeandroid):
|
|
37
|
+
Add the `extraProguardRules` property to `app.json`, `app.config.js`, or `app.config.ts` file as described in the [Expo documentation](https://docs.expo.dev/versions/latest/sdk/build-properties/#pluginconfigtypeandroid):
|
|
38
38
|
|
|
39
39
|
```json
|
|
40
|
+
// <project-root>/app.json
|
|
40
41
|
{
|
|
41
42
|
"expo": {
|
|
42
43
|
"plugins": [
|
|
@@ -82,7 +83,7 @@ Within your projects `app.json` file, set the `delay_app_measurement_init` to `t
|
|
|
82
83
|
</TabItem>
|
|
83
84
|
<TabItem value="expo">
|
|
84
85
|
|
|
85
|
-
Within your projects `app.json` file, set the `delayAppMeasurementInit` to `true` to delay app measurement:
|
|
86
|
+
Within your projects `app.json`, `app.config.js`, or `app.config.ts` file, set the `delayAppMeasurementInit` to `true` to delay app measurement:
|
|
86
87
|
|
|
87
88
|
```json
|
|
88
89
|
// <project-root>/app.json
|
|
@@ -111,7 +112,7 @@ Once set, rebuild your application.
|
|
|
111
112
|
|
|
112
113
|
If you configure an [ATT message](https://support.google.com/admob/answer/10115331) in your Google AdMob account, the UMP SDK will automatically handle the ATT alert.
|
|
113
114
|
This will also show an IDFA explainer message. If you don't want to show an explainer message you can show the ATT alert [manually](https://docs.page/invertase/react-native-google-mobile-ads#app-tracking-transparency-ios).
|
|
114
|
-
Also, within your projects
|
|
115
|
+
Also, within your projects configuration file, you have to provide a user tracking usage description (once set, rebuild your application):
|
|
115
116
|
|
|
116
117
|
<Tabs groupId="framework" values={[{label: 'React Native', value: 'bare'}, {label: 'Expo', value: 'expo'}]}>
|
|
117
118
|
<TabItem value="bare">
|
package/docs/index.mdx
CHANGED
|
@@ -51,7 +51,7 @@ To enable static frameworks, you must add the variable `$RNGoogleMobileAdsAsStat
|
|
|
51
51
|
<TabItem value="expo">
|
|
52
52
|
|
|
53
53
|
Expo users may enable static frameworks by using the `expo-build-properties` plugin.
|
|
54
|
-
To do so [follow the official `expo-build-properties` installation instructions](https://docs.expo.dev/versions/latest/sdk/build-properties/) and merge the following code into your `app.json` file:
|
|
54
|
+
To do so [follow the official `expo-build-properties` installation instructions](https://docs.expo.dev/versions/latest/sdk/build-properties/) and merge the following code into your `app.json`, `app.config.js`, or `app.config.ts` file:
|
|
55
55
|
|
|
56
56
|
```json
|
|
57
57
|
// <project-root>/app.json
|
|
@@ -81,7 +81,7 @@ Before you are able to display ads to your users, you must have a [Google AdMob
|
|
|
81
81
|
be added to the project.
|
|
82
82
|
|
|
83
83
|
<Warning>
|
|
84
|
-
Attempting to build your app without a valid App ID
|
|
84
|
+
Attempting to build your app without configuring a valid App ID for this package will cause the app to crash on start or fail to build.
|
|
85
85
|
</Warning>
|
|
86
86
|
|
|
87
87
|
Under the "App settings" menu item, you can find the "App ID":
|
|
@@ -89,7 +89,7 @@ Under the "App settings" menu item, you can find the "App ID":
|
|
|
89
89
|

|
|
90
90
|
|
|
91
91
|
The app IDs for Android and iOS need to be inserted into your apps native code.
|
|
92
|
-
For React Native projects
|
|
92
|
+
For bare React Native projects, you can add the app IDs to the `app.json` file.
|
|
93
93
|
For Expo projects, we provide an [Expo config plugin](https://docs.expo.dev/config-plugins/introduction/).
|
|
94
94
|
|
|
95
95
|
|
|
@@ -120,7 +120,7 @@ npx react-native run-android
|
|
|
120
120
|
</TabItem>
|
|
121
121
|
<TabItem value="expo">
|
|
122
122
|
|
|
123
|
-
This library contains an Expo config plugin which you must add to your `app.json` file.
|
|
123
|
+
This library contains an Expo config plugin which you must add to your `app.json`, `app.config.js`, or `app.config.ts` file.
|
|
124
124
|
For these changes to take effect, your must rebuild your project's native code and install the new build on your device.
|
|
125
125
|
|
|
126
126
|
```json
|
|
@@ -228,7 +228,7 @@ If you are using mediation, you may wish to wait until the promise is settled be
|
|
|
228
228
|
### Enable SKAdNetwork to track conversions (iOS)
|
|
229
229
|
|
|
230
230
|
The Google Mobile Ads SDK supports conversion tracking using Apple's SKAdNetwork, which lets Google and participating third-party buyers attribute an app install even when the IDFA is not available.
|
|
231
|
-
|
|
231
|
+
Add the advised [SKAdNetwork identifiers](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/3p-skadnetworks) to your project as described below.
|
|
232
232
|
Note that these identifiers are subject to change and should be updated regularly.
|
|
233
233
|
|
|
234
234
|
<Tabs groupId="framework" values={[{label: 'React Native', value: 'bare'}, {label: 'Expo', value: 'expo'}]}>
|
|
@@ -372,7 +372,7 @@ Note that these identifiers are subject to change and should be updated regularl
|
|
|
372
372
|
### App Tracking Transparency (iOS)
|
|
373
373
|
|
|
374
374
|
Apple requires apps to display the App Tracking Transparency authorization request for accessing the IDFA (leaving the choice to the user, whether to use personalized or non-personalized ads).
|
|
375
|
-
Within your projects
|
|
375
|
+
Within your projects configuration file, you have to provide a user tracking usage description:
|
|
376
376
|
|
|
377
377
|
<Tabs groupId="framework" values={[{label: 'React Native', value: 'bare'}, {label: 'Expo', value: 'expo'}]}>
|
|
378
378
|
<TabItem value="bare">
|
package/docs/testing.mdx
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Testing
|
|
2
|
+
|
|
3
|
+
The React Native Google Mobile Ads library depends on a lot of platform-specific native code which you likely want to mock in your tests.
|
|
4
|
+
|
|
5
|
+
## Testing with Jest
|
|
6
|
+
|
|
7
|
+
This library ships with a Jest setup file that mocks the native code for you.
|
|
8
|
+
To use it, add the following to your Jest configuration:
|
|
9
|
+
|
|
10
|
+
```json
|
|
11
|
+
// jest.config.js|ts|mjs|cjs|json
|
|
12
|
+
{
|
|
13
|
+
"setupFiles": [
|
|
14
|
+
"./node_modules/react-native-google-mobile-ads/jest.setup.ts"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
```
|
package/docs.json
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
["European User Consent", "/european-user-consent"],
|
|
19
19
|
["Ad Inspector", "/ad-inspector"],
|
|
20
20
|
["Impression-level ad revenue", "/impression-level-ad-revenue"],
|
|
21
|
-
["Video ad volume control", "/video-ad_volume-control"]
|
|
21
|
+
["Video ad volume control", "/video-ad_volume-control"],
|
|
22
|
+
["Testing", "/testing"]
|
|
22
23
|
]
|
|
23
24
|
],
|
|
24
25
|
[
|
package/jest.setup.ts
CHANGED
|
@@ -3,10 +3,6 @@ import * as ReactNative from 'react-native';
|
|
|
3
3
|
jest.doMock('react-native', () => {
|
|
4
4
|
return Object.setPrototypeOf(
|
|
5
5
|
{
|
|
6
|
-
Platform: {
|
|
7
|
-
OS: 'android',
|
|
8
|
-
select: () => {},
|
|
9
|
-
},
|
|
10
6
|
NativeModules: {
|
|
11
7
|
...ReactNative.NativeModules,
|
|
12
8
|
RNAppModule: {
|
|
@@ -28,6 +24,7 @@ jest.doMock('react-native', () => {
|
|
|
28
24
|
RNGoogleMobileAdsConsentModule: {},
|
|
29
25
|
},
|
|
30
26
|
TurboModuleRegistry: {
|
|
27
|
+
...ReactNative.TurboModuleRegistry,
|
|
31
28
|
getEnforcing: () => {
|
|
32
29
|
return {
|
|
33
30
|
initialize: jest.fn(),
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.validateAdRequestOptions = validateAdRequestOptions;
|
|
7
7
|
var _common = require("./common");
|
|
8
|
+
var _version = require("./version");
|
|
8
9
|
/*
|
|
9
10
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
11
|
*
|
|
@@ -76,6 +77,8 @@ function validateAdRequestOptions(options) {
|
|
|
76
77
|
throw new Error("'options.requestAgent' expected a string value");
|
|
77
78
|
}
|
|
78
79
|
out.requestAgent = options.requestAgent;
|
|
80
|
+
} else {
|
|
81
|
+
out.requestAgent = `rn-invertase-${_version.version}`;
|
|
79
82
|
}
|
|
80
83
|
if (options.serverSideVerificationOptions) {
|
|
81
84
|
if (!(0, _common.isObject)(options.serverSideVerificationOptions)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_common","require","validateAdRequestOptions","options","out","isUndefined","isObject","Error","isPropertySet","isBoolean","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","isString","keywords","isArray","i","length","keyword","contentUrl","isValidUrl","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sourceRoot":"../../src","sources":["validateAdRequestOptions.ts"],"mappings":";;;;;;AAiBA,IAAAA,OAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_common","require","_version","validateAdRequestOptions","options","out","isUndefined","isObject","Error","isPropertySet","isBoolean","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","isString","keywords","isArray","i","length","keyword","contentUrl","isValidUrl","requestAgent","version","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sourceRoot":"../../src","sources":["validateAdRequestOptions.ts"],"mappings":";;;;;;AAiBA,IAAAA,OAAA,GAAAC,OAAA;AASA,IAAAC,QAAA,GAAAD,OAAA;AA1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcO,SAASE,wBAAwBA,CAACC,OAAwB,EAAE;EACjE,MAAMC,GAAmB,GAAG,CAAC,CAAC;EAE9B,IAAI,IAAAC,mBAAW,EAACF,OAAO,CAAC,EAAE;IACxB,OAAOC,GAAG;EACZ;EAEA,IAAI,CAAC,IAAAE,gBAAQ,EAACH,OAAO,CAAC,EAAE;IACtB,MAAM,IAAII,KAAK,CAAC,oCAAoC,CAAC;EACvD;EAEA,IAAI,IAAAC,qBAAa,EAACL,OAAO,EAAE,+BAA+B,CAAC,EAAE;IAC3D,IAAI,CAAC,IAAAM,iBAAS,EAACN,OAAO,CAACO,6BAA6B,CAAC,EAAE;MACrD,MAAM,IAAIH,KAAK,CAAC,kEAAkE,CAAC;IACrF;IAEAH,GAAG,CAACM,6BAA6B,GAAGP,OAAO,CAACO,6BAA6B;EAC3E;EAEA,IAAIP,OAAO,CAACQ,aAAa,EAAE;IACzB,IAAI,CAAC,IAAAL,gBAAQ,EAACH,OAAO,CAACQ,aAAa,CAAC,EAAE;MACpC,MAAM,IAAIJ,KAAK,CAAC,+DAA+D,CAAC;IAClF;IAEAK,MAAM,CAACC,OAAO,CAACV,OAAO,CAACQ,aAAa,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;MAC9D,IAAI,CAAC,IAAAC,gBAAQ,EAACD,KAAK,CAAC,EAAE;QACpB,MAAM,IAAIT,KAAK,CAAC,mEAAmEQ,GAAG,GAAG,CAAC;MAC5F;IAC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GED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { isPropertySet, isArray, isBoolean, isObject, isString, isUndefined, isValidUrl } from './common';
|
|
19
|
+
import { version } from './version';
|
|
19
20
|
export function validateAdRequestOptions(options) {
|
|
20
21
|
const out = {};
|
|
21
22
|
if (isUndefined(options)) {
|
|
@@ -70,6 +71,8 @@ export function validateAdRequestOptions(options) {
|
|
|
70
71
|
throw new Error("'options.requestAgent' expected a string value");
|
|
71
72
|
}
|
|
72
73
|
out.requestAgent = options.requestAgent;
|
|
74
|
+
} else {
|
|
75
|
+
out.requestAgent = `rn-invertase-${version}`;
|
|
73
76
|
}
|
|
74
77
|
if (options.serverSideVerificationOptions) {
|
|
75
78
|
if (!isObject(options.serverSideVerificationOptions)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isPropertySet","isArray","isBoolean","isObject","isString","isUndefined","isValidUrl","validateAdRequestOptions","options","out","Error","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","keywords","i","length","keyword","contentUrl","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sourceRoot":"../../src","sources":["validateAdRequestOptions.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,aAAa,EACbC,OAAO,EACPC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,UAAU,QACL,UAAU;
|
|
1
|
+
{"version":3,"names":["isPropertySet","isArray","isBoolean","isObject","isString","isUndefined","isValidUrl","version","validateAdRequestOptions","options","out","Error","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","keywords","i","length","keyword","contentUrl","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sourceRoot":"../../src","sources":["validateAdRequestOptions.ts"],"mappings":"AAAA;A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BAA6B,CAAC,EAAE;MACpD,MAAM,IAAId,KAAK,CACb,+EACF,CAAC;IACH;IAEA,MAAMe,UAAU,GAAGjB,OAAO,CAACgB,6BAA6B;IAExD,IAAIC,UAAU,CAACC,MAAM,IAAI,CAACvB,QAAQ,CAACsB,UAAU,CAACC,MAAM,CAAC,EAAE;MACrD,MAAM,IAAIhB,KAAK,CAAC,wEAAwE,CAAC;IAC3F;IAEA,IAAIe,UAAU,CAACE,UAAU,IAAI,CAACxB,QAAQ,CAACsB,UAAU,CAACE,UAAU,CAAC,EAAE;MAC7D,MAAM,IAAIjB,KAAK,CAAC,4EAA4E,CAAC;IAC/F;IAEAD,GAAG,CAACe,6BAA6B,GAAGhB,OAAO,CAACgB,6BAA6B;EAC3E;EAEA,IAAIhB,OAAO,CAACoB,eAAe,EAAE;IAC3B,IAAI,CAAC1B,QAAQ,CAACM,OAAO,CAACoB,eAAe,CAAC,EAAE;MACtC,MAAM,IAAIlB,KAAK,CAAC,iEAAiE,CAAC;IACpF;IACAD,GAAG,CAACmB,eAAe,GAAGpB,OAAO,CAACoB,eAAe;EAC/C;EAEA,IAAIpB,OAAO,CAACqB,mBAAmB,EAAE;IAC/B,IAAI,CAAC1B,QAAQ,CAACK,OAAO,CAACqB,mBAAmB,CAAC,EAAE;MAC1C,MAAM,IAAInB,KAAK,CAAC,uDAAuD,CAAC;IAC1E;IACAD,GAAG,CAACoB,mBAAmB,GAAGrB,OAAO,CAACqB,mBAAmB;EACvD;EAEA,OAAOpB,GAAG;AACZ","ignoreList":[]}
|
package/lib/module/version.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdEventType.d.ts","sourceRoot":"","sources":["../../../src/AdEventType.ts"],"names":[],"mappings":"AAiBA,oBAAY,WAAW;IACrB;;;;;;;;;;;;OAYG;IACH,MAAM,WAAW;IAEjB;;;;;;;;;;;;OAYG;IACH,KAAK,UAAU;IAEf;;;OAGG;IACH,MAAM,WAAW;IAEjB;;;OAGG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdsConsent.d.ts","sourceRoot":"","sources":["../../../src/AdsConsent.ts"],"names":[],"mappings":"AAuBA,OAAO,EAGL,mBAAmB,EAEpB,MAAM,8BAA8B,CAAC;AAItC,eAAO,MAAM,UAAU,EAAE,mBAqIxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdsConsentDebugGeography.d.ts","sourceRoot":"","sources":["../../../src/AdsConsentDebugGeography.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,oBAAY,wBAAwB;IAClC;;OAEG;IACH,QAAQ,IAAI;IAEZ;;OAEG;IACH,GAAG,IAAI;IAEP;;OAEG;IACH,OAAO,IAAI;CACZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdsConsentPrivacyOptionsRequirementStatus.d.ts","sourceRoot":"","sources":["../../../src/AdsConsentPrivacyOptionsRequirementStatus.ts"],"names":[],"mappings":"AAiBA;;GAEG;AACH,oBAAY,yCAAyC;IACnD;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,YAAY,iBAAiB;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdsConsentPurposes.d.ts","sourceRoot":"","sources":["../../../src/AdsConsentPurposes.ts"],"names":[],"mappings":"AAyBA,oBAAY,kBAAkB;IAC5B;;;;;;;OAOG;IACH,sCAAsC,IAAI;IAE1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,gBAAgB,IAAI;IAEpB;;;;;;;;;;;OAWG;IACH,iCAAiC,IAAI;IAErC;;;;;;;OAOG;IACH,uBAAuB,IAAI;IAE3B;;;;;;;;;;;OAWG;IACH,qCAAqC,IAAI;IAEzC;;;;;;;OAOG;IACH,2BAA2B,IAAI;IAE/B;;;;;;;;;;;;;;;;;;OAkBG;IACH,sBAAsB,IAAI;IAE1B;;;;;;;;;;;;;;;OAeG;IACH,2BAA2B,IAAI;IAE/B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,mDAAmD,IAAI;IAEvD;;;;;;;;;;;;OAYG;IACH,4BAA4B,KAAK;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdsConsentSpecialFeatures.d.ts","sourceRoot":"","sources":["../../../src/AdsConsentSpecialFeatures.ts"],"names":[],"mappings":"AAyBA,oBAAY,yBAAyB;IACnC;;;;;;;;OAQG;IACH,4BAA4B,IAAI;IAEhC;;;;;;;;OAQG;IACH,uDAAuD,IAAI;CAC5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdsConsentStatus.d.ts","sourceRoot":"","sources":["../../../src/AdsConsentStatus.ts"],"names":[],"mappings":"AAiBA;;GAEG;AACH,oBAAY,gBAAgB;IAC1B;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAdSize.d.ts","sourceRoot":"","sources":["../../../src/BannerAdSize.ts"],"names":[],"mappings":"AAkBA,oBAAY,YAAY;IACtB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,gBAAgB,qBAAqB;IAErC;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,wBAAwB,6BAA6B;IAErD;;;OAGG;IACH,sBAAsB,2BAA2B;IAEjD;;OAEG;IACH,eAAe,oBAAoB;CACpC;AAED,eAAO,MAAM,eAAe;IAG1B;;OAEG;;IApDH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;OAEG;;CAWK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GAMAdEventType.d.ts","sourceRoot":"","sources":["../../../src/GAMAdEventType.ts"],"names":[],"mappings":"AAiBA,oBAAY,cAAc;IACxB;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,cAAc;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaxAdContentRating.d.ts","sourceRoot":"","sources":["../../../src/MaxAdContentRating.ts"],"names":[],"mappings":"AAiBA,oBAAY,kBAAkB;IAC5B;;OAEG;IACH,CAAC,MAAM;IAEP;;OAEG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,CAAC,MAAM;IAEP;;OAEG;IACH,EAAE,OAAO;CACV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobileAds.d.ts","sourceRoot":"","sources":["../../../src/MobileAds.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAWpE,cAAM,eAAgB,YAAW,wBAAwB;;IASvD,4BAA4B,CAAC,SAAS,EAAE,MAAM;IAU9C,UAAU;IAIV,uBAAuB,CAAC,oBAAoB,EAAE,oBAAoB;IAalE,eAAe;IAIf,aAAa,CAAC,MAAM,EAAE,MAAM;IAK5B,YAAY,CAAC,MAAM,EAAE,MAAM;IAM3B,WAAW,CAAC,KAAK,EAAE,OAAO;CAG3B;AAID,eAAO,MAAM,SAAS,uBAErB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeGoogleMobileAdsModule.d.ts","sourceRoot":"","sources":["../../../src/NativeGoogleMobileAdsModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACvC,uBAAuB,CAAC,oBAAoB,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5E,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACnC;;AAED,wBAAiF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RewardedAdEventType.d.ts","sourceRoot":"","sources":["../../../src/RewardedAdEventType.ts"],"names":[],"mappings":"AAiBA,oBAAY,mBAAmB;IAC7B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,oBAAoB;IAE1B;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,2BAA2B;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestIds.d.ts","sourceRoot":"","sources":["../../../src/TestIds.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;CAiCnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppOpenAd.d.ts","sourceRoot":"","sources":["../../../../src/ads/AppOpenAd.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,qBAAa,SAAU,SAAQ,QAAQ;IACrC,SAAS,CAAC,MAAM,CAAC,eAAe,SAAK;IAErC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc;IAwB3E,mBAAmB,CAAC,CAAC,SAAS,WAAW,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAIrF,kBAAkB,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;CAGhF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../../src/ads/BannerAd.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAmE;IAE9E,IAAI;IAMJ,MAAM;CAGP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseAd.d.ts","sourceRoot":"","sources":["../../../../src/ads/BaseAd.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AASnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAK1D,eAAO,MAAM,MAAM,sNAkJjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GAMBannerAd.d.ts","sourceRoot":"","sources":["../../../../src/ads/GAMBannerAd.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,qBAAa,WAAY,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAChE,OAAO,CAAC,GAAG,CAAmE;IAE9E,sBAAsB;IAMtB,IAAI;IAMJ,MAAM;CAGP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GAMInterstitialAd.d.ts","sourceRoot":"","sources":["../../../../src/ads/GAMInterstitialAd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,iBAAkB,SAAQ,cAAc;IACnD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GACZ,iBAAiB;IAGhF,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,cAAc,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAIzF,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,cAAc,EACvD,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;CAI/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleMobileAdsBannerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/ads/Goog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
|
+
{"version":3,"file":"InterstitialAd.d.ts","sourceRoot":"","sources":["../../../../src/ads/InterstitialAd.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,SAAS,CAAC,MAAM,CAAC,oBAAoB,SAAK;IAC1C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc;IAwB3E,mBAAmB,CAAC,CAAC,SAAS,WAAW,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAIxE,kBAAkB,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;CAGhF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobileAd.d.ts","sourceRoot":"","sources":["../../../../src/ads/MobileAd.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAiB,MAAM,cAAc,CAAC;AAGlE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAkB,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,C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AAE,MAAM,yBAAyB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,qBAAa,sBAAuB,SAAQ,QAAQ;IAClD,SAAS,CAAC,MAAM,CAAC,4BAA4B,SAAK;IAClD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc;IA0B3E,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,mBAAmB,EAC7D,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC5B,MAAM,IAAI;IAIb,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,mBAAmB,EAC5D,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;CAS/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/common/constants.ts"],"names":[],"mappings":"AASA,oBAAY,iBAAiB;IAC3B,SAAuC;IACvC,OAAmC;IACnC,kBAAyD;IACzD,OAAmC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../src/common/debounce.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,SAAS,SAAS,OAAO,EAAE,EAAE,MAAM,QACpD,CAAC,GAAG,IAAI,EAAE,SAAS,KAAK,MAAM,WAC3B,MAAM,KACd,CAAC,CAAC,GAAG,IAAI,EAAE,SAAS,KAAK,IAAI,CAW/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/index.ts"],"names":[],"mappings":"AAiBA,cAAc,YAAY,CAAC;AAG3B,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,WAEpE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,WAKnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/common/validate.ts"],"names":[],"mappings":"AAiBA;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,iBAEpC;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,WAEtC;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,WAExC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,mBAEtC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,oBAEvC;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,kBAErC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D;AAQD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,WAErC;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,OAAO,EAAO,WAK5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppOpenAd.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAppOpenAd.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAIzD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,cAAc,GAAE,cAAmB,GAClC,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,gBAAgB,CAAC,CAUlD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useForeground.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useForeground.ts"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,IAAI,QAejD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFullScreenAd.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useFullScreenAd.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EAAY,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAe5D,wBAAgB,eAAe,CAC7B,CAAC,SAAS,SAAS,GAAG,cAAc,GAAG,UAAU,GAAG,sBAAsB,GAAG,IAAI,EACjF,EAAE,EAAE,CAAC,GAAG,aAAa,CAmEtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInterstitialAd.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useInterstitialAd.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAIzD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,cAAc,GAAE,cAAmB,GAClC,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,gBAAgB,CAAC,CAUlD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRewardedAd.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useRewardedAd.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAIzD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,cAAc,GAAE,cAAmB,GAClC,aAAa,CAUf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRewardedInterstitialAd.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useRewardedInterstitialAd.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAIzD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,cAAc,GAAE,cAAmB,GAClC,aAAa,CAWf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "14.2.
|
|
1
|
+
export declare const SDK_VERSION = "14.2.4";
|
|
2
2
|
export { default, MobileAds } from './MobileAds';
|
|
3
3
|
export { AdsConsentDebugGeography } from './AdsConsentDebugGeography';
|
|
4
4
|
export { AdsConsentPurposes } from './AdsConsentPurposes';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,WAAW,WAAU,CAAC;AAEnC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,yCAAy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