react-native-google-mobile-ads 14.7.2 → 14.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/README.md +4 -2
  2. package/android/build.gradle +10 -0
  3. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeAppModule.java +2 -2
  4. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsConsentModule.java +2 -2
  5. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsMediaView.kt +57 -0
  6. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsMediaViewManager.kt +55 -0
  7. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsModule.kt +5 -4
  8. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsNativeAdView.kt +107 -0
  9. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsNativeAdViewManager.kt +85 -0
  10. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsNativeModule.kt +211 -0
  11. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsPackage.kt +102 -13
  12. package/android/src/oldarch/com/facebook/react/viewmanagers/RNGoogleMobileAdsMediaViewManagerDelegate.java +29 -0
  13. package/android/src/oldarch/com/facebook/react/viewmanagers/RNGoogleMobileAdsMediaViewManagerInterface.java +10 -0
  14. package/android/src/oldarch/com/facebook/react/viewmanagers/RNGoogleMobileAdsNativeViewManagerDelegate.java +33 -0
  15. package/android/src/oldarch/com/facebook/react/viewmanagers/RNGoogleMobileAdsNativeViewManagerInterface.java +10 -0
  16. package/android/src/oldarch/io/invertase/googlemobileads/NativeGoogleMobileAdsNativeModuleSpec.kt +18 -0
  17. package/docs/displaying-ads.mdx +4 -0
  18. package/docs/index.mdx +5 -4
  19. package/docs/native-ads.mdx +365 -0
  20. package/docs.json +1 -0
  21. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsMediaView.h +49 -0
  22. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsMediaView.mm +152 -0
  23. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsNativeModule.h +35 -0
  24. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsNativeModule.mm +290 -0
  25. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsNativeView.h +48 -0
  26. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsNativeView.mm +218 -0
  27. package/jest.setup.ts +7 -0
  28. package/lib/commonjs/NativeAdEventType.js +19 -0
  29. package/lib/commonjs/NativeAdEventType.js.map +1 -0
  30. package/lib/commonjs/TestIds.js +15 -8
  31. package/lib/commonjs/TestIds.js.map +1 -1
  32. package/lib/commonjs/ads/native-ad/NativeAd.js +122 -0
  33. package/lib/commonjs/ads/native-ad/NativeAd.js.map +1 -0
  34. package/lib/commonjs/ads/native-ad/NativeAdContext.js +26 -0
  35. package/lib/commonjs/ads/native-ad/NativeAdContext.js.map +1 -0
  36. package/lib/commonjs/ads/native-ad/NativeAdView.js +48 -0
  37. package/lib/commonjs/ads/native-ad/NativeAdView.js.map +1 -0
  38. package/lib/commonjs/ads/native-ad/NativeAsset.js +71 -0
  39. package/lib/commonjs/ads/native-ad/NativeAsset.js.map +1 -0
  40. package/lib/commonjs/ads/native-ad/NativeMediaView.js +58 -0
  41. package/lib/commonjs/ads/native-ad/NativeMediaView.js.map +1 -0
  42. package/lib/commonjs/common/ref.js +45 -0
  43. package/lib/commonjs/common/ref.js.map +1 -0
  44. package/lib/commonjs/index.js +47 -0
  45. package/lib/commonjs/index.js.map +1 -1
  46. package/lib/commonjs/specs/components/GoogleMobileAdsBannerViewNativeComponent.js +17 -0
  47. package/lib/commonjs/specs/components/GoogleMobileAdsBannerViewNativeComponent.js.map +1 -1
  48. package/lib/commonjs/specs/components/GoogleMobileAdsMediaViewNativeComponent.js +26 -0
  49. package/lib/commonjs/specs/components/GoogleMobileAdsMediaViewNativeComponent.js.map +1 -0
  50. package/lib/commonjs/specs/components/GoogleMobileAdsNativeViewNativeComponent.js +31 -0
  51. package/lib/commonjs/specs/components/GoogleMobileAdsNativeViewNativeComponent.js.map +1 -0
  52. package/lib/commonjs/specs/modules/NativeGoogleMobileAdsModule.js +1 -1
  53. package/lib/commonjs/specs/modules/NativeGoogleMobileAdsNativeModule.js +25 -0
  54. package/lib/commonjs/specs/modules/NativeGoogleMobileAdsNativeModule.js.map +1 -0
  55. package/lib/commonjs/types/NativeAdRequestOptions.js +37 -0
  56. package/lib/commonjs/types/NativeAdRequestOptions.js.map +1 -0
  57. package/lib/commonjs/types/index.js +11 -0
  58. package/lib/commonjs/types/index.js.map +1 -1
  59. package/lib/commonjs/version.js +1 -1
  60. package/lib/module/NativeAdEventType.js +13 -0
  61. package/lib/module/NativeAdEventType.js.map +1 -0
  62. package/lib/module/TestIds.js +15 -8
  63. package/lib/module/TestIds.js.map +1 -1
  64. package/lib/module/ads/native-ad/NativeAd.js +115 -0
  65. package/lib/module/ads/native-ad/NativeAd.js.map +1 -0
  66. package/lib/module/ads/native-ad/NativeAdContext.js +20 -0
  67. package/lib/module/ads/native-ad/NativeAdContext.js.map +1 -0
  68. package/lib/module/ads/native-ad/NativeAdView.js +40 -0
  69. package/lib/module/ads/native-ad/NativeAdView.js.map +1 -0
  70. package/lib/module/ads/native-ad/NativeAsset.js +63 -0
  71. package/lib/module/ads/native-ad/NativeAsset.js.map +1 -0
  72. package/lib/module/ads/native-ad/NativeMediaView.js +50 -0
  73. package/lib/module/ads/native-ad/NativeMediaView.js.map +1 -0
  74. package/lib/module/common/ref.js +38 -0
  75. package/lib/module/common/ref.js.map +1 -0
  76. package/lib/module/index.js +5 -0
  77. package/lib/module/index.js.map +1 -1
  78. package/lib/module/specs/components/GoogleMobileAdsBannerViewNativeComponent.js +17 -0
  79. package/lib/module/specs/components/GoogleMobileAdsBannerViewNativeComponent.js.map +1 -1
  80. package/lib/module/specs/components/GoogleMobileAdsMediaViewNativeComponent.js +20 -0
  81. package/lib/module/specs/components/GoogleMobileAdsMediaViewNativeComponent.js.map +1 -0
  82. package/lib/module/specs/components/GoogleMobileAdsNativeViewNativeComponent.js +24 -0
  83. package/lib/module/specs/components/GoogleMobileAdsNativeViewNativeComponent.js.map +1 -0
  84. package/lib/module/specs/modules/NativeGoogleMobileAdsModule.js +1 -1
  85. package/lib/module/specs/modules/NativeGoogleMobileAdsNativeModule.js +20 -0
  86. package/lib/module/specs/modules/NativeGoogleMobileAdsNativeModule.js.map +1 -0
  87. package/lib/module/types/NativeAdRequestOptions.js +32 -0
  88. package/lib/module/types/NativeAdRequestOptions.js.map +1 -0
  89. package/lib/module/types/index.js +1 -0
  90. package/lib/module/types/index.js.map +1 -1
  91. package/lib/module/version.js +1 -1
  92. package/lib/typescript/NativeAdEventType.d.ts +39 -0
  93. package/lib/typescript/NativeAdEventType.d.ts.map +1 -0
  94. package/lib/typescript/TestIds.d.ts +3 -0
  95. package/lib/typescript/TestIds.d.ts.map +1 -1
  96. package/lib/typescript/ads/native-ad/NativeAd.d.ts +46 -0
  97. package/lib/typescript/ads/native-ad/NativeAd.d.ts.map +1 -0
  98. package/lib/typescript/ads/native-ad/NativeAdContext.d.ts +10 -0
  99. package/lib/typescript/ads/native-ad/NativeAdContext.d.ts.map +1 -0
  100. package/lib/typescript/ads/native-ad/NativeAdView.d.ts +8 -0
  101. package/lib/typescript/ads/native-ad/NativeAdView.d.ts.map +1 -0
  102. package/lib/typescript/ads/native-ad/NativeAsset.d.ts +18 -0
  103. package/lib/typescript/ads/native-ad/NativeAsset.d.ts.map +1 -0
  104. package/lib/typescript/ads/native-ad/NativeMediaView.d.ts +7 -0
  105. package/lib/typescript/ads/native-ad/NativeMediaView.d.ts.map +1 -0
  106. package/lib/typescript/common/ref.d.ts +13 -0
  107. package/lib/typescript/common/ref.d.ts.map +1 -0
  108. package/lib/typescript/index.d.ts +6 -1
  109. package/lib/typescript/index.d.ts.map +1 -1
  110. package/lib/typescript/specs/components/GoogleMobileAdsBannerViewNativeComponent.d.ts.map +1 -1
  111. package/lib/typescript/specs/components/GoogleMobileAdsMediaViewNativeComponent.d.ts +9 -0
  112. package/lib/typescript/specs/components/GoogleMobileAdsMediaViewNativeComponent.d.ts.map +1 -0
  113. package/lib/typescript/specs/components/GoogleMobileAdsNativeViewNativeComponent.d.ts +14 -0
  114. package/lib/typescript/specs/components/GoogleMobileAdsNativeViewNativeComponent.d.ts.map +1 -0
  115. package/lib/typescript/specs/modules/NativeGoogleMobileAdsModule.d.ts +1 -17
  116. package/lib/typescript/specs/modules/NativeGoogleMobileAdsModule.d.ts.map +1 -1
  117. package/lib/typescript/specs/modules/NativeGoogleMobileAdsNativeModule.d.ts +37 -0
  118. package/lib/typescript/specs/modules/NativeGoogleMobileAdsNativeModule.d.ts.map +1 -0
  119. package/lib/typescript/types/NativeAdRequestOptions.d.ts +36 -0
  120. package/lib/typescript/types/NativeAdRequestOptions.d.ts.map +1 -0
  121. package/lib/typescript/types/index.d.ts +1 -0
  122. package/lib/typescript/types/index.d.ts.map +1 -1
  123. package/lib/typescript/version.d.ts +1 -1
  124. package/package.json +1 -1
  125. package/src/NativeAdEventType.ts +46 -0
  126. package/src/TestIds.ts +13 -6
  127. package/src/ads/native-ad/NativeAd.ts +152 -0
  128. package/src/ads/native-ad/NativeAdContext.ts +26 -0
  129. package/src/ads/native-ad/NativeAdView.tsx +43 -0
  130. package/src/ads/native-ad/NativeAsset.tsx +66 -0
  131. package/src/ads/native-ad/NativeMediaView.tsx +44 -0
  132. package/src/common/ref.ts +44 -0
  133. package/src/index.ts +5 -0
  134. package/src/specs/components/GoogleMobileAdsBannerViewNativeComponent.ts +17 -0
  135. package/src/specs/components/GoogleMobileAdsMediaViewNativeComponent.ts +30 -0
  136. package/src/specs/components/GoogleMobileAdsNativeViewNativeComponent.ts +44 -0
  137. package/src/specs/modules/NativeGoogleMobileAdsModule.ts +2 -2
  138. package/src/specs/modules/NativeGoogleMobileAdsNativeModule.ts +64 -0
  139. package/src/types/NativeAdRequestOptions.ts +55 -0
  140. package/src/types/index.ts +1 -0
  141. package/src/version.ts +1 -1
@@ -0,0 +1,115 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ import { NativeEventEmitter, Platform } from 'react-native';
19
+ import EventEmitter from 'react-native/Libraries/vendor/emitter/EventEmitter';
20
+ import { NativeAdEventType } from '../../NativeAdEventType';
21
+ import { isFunction, isOneOf, isString } from '../../common';
22
+ import NativeGoogleMobileAdsNativeModule from '../../specs/modules/NativeGoogleMobileAdsNativeModule';
23
+ import { validateAdRequestOptions } from '../../validateAdRequestOptions';
24
+
25
+ /**
26
+ * A class for loading Native Ads.
27
+ */
28
+ export class NativeAd {
29
+ constructor(adUnitId, props) {
30
+ this.adUnitId = adUnitId;
31
+ this.responseId = props.responseId;
32
+ this.advertiser = props.advertiser;
33
+ this.body = props.body;
34
+ this.callToAction = props.callToAction;
35
+ this.headline = props.headline;
36
+ this.price = props.price;
37
+ this.store = props.store;
38
+ this.starRating = props.starRating;
39
+ this.icon = props.icon;
40
+ this.images = props.images;
41
+ this.mediaContent = props.mediaContent;
42
+ this.extras = props.extras;
43
+ if ('onAdEvent' in NativeGoogleMobileAdsNativeModule) {
44
+ this.nativeEventSubscription = NativeGoogleMobileAdsNativeModule.onAdEvent(this.onNativeAdEvent.bind(this));
45
+ } else {
46
+ let eventEmitter;
47
+ if (Platform.OS === 'ios') {
48
+ eventEmitter = new NativeEventEmitter(NativeGoogleMobileAdsNativeModule);
49
+ } else {
50
+ eventEmitter = new NativeEventEmitter();
51
+ }
52
+ this.nativeEventSubscription = eventEmitter.addListener('RNGMANativeAdEvent', this.onNativeAdEvent.bind(this));
53
+ }
54
+ this.eventEmitter = new EventEmitter();
55
+ }
56
+ onNativeAdEvent({
57
+ responseId,
58
+ type
59
+ }) {
60
+ if (this.responseId !== responseId) {
61
+ return;
62
+ }
63
+ this.eventEmitter.emit(type);
64
+ }
65
+ addAdEventListener(type, listener) {
66
+ if (!isOneOf(type, Object.values(NativeAdEventType))) {
67
+ throw new Error(`NativeAd.addAdEventListener(*) 'type' expected a valid event type value.`);
68
+ }
69
+ if (!isFunction(listener)) {
70
+ throw new Error(`NativeAd.addAdEventListener(_, *) 'listener' expected a function.`);
71
+ }
72
+ return this.eventEmitter.addListener(type, listener);
73
+ }
74
+ removeAllAdEventListeners() {
75
+ this.eventEmitter.removeAllListeners();
76
+ }
77
+ destroy() {
78
+ NativeGoogleMobileAdsNativeModule.destroy(this.responseId);
79
+ this.nativeEventSubscription.remove();
80
+ this.removeAllAdEventListeners();
81
+ }
82
+
83
+ /**
84
+ * Creates a new NativeAd instance.
85
+ *
86
+ * #### Example
87
+ *
88
+ * ```js
89
+ * import { NativeAd, AdEventType, TestIds } from 'react-native-google-mobile-ads';
90
+ *
91
+ * const nativeAd = await NativeAd.createForAdRequest(TestIds.NATIVE, {
92
+ * requestAgent: 'CoolAds',
93
+ * });
94
+ * ```
95
+ *
96
+ * @param adUnitId The Ad Unit ID for the Native Ad. You can find this on your Google Mobile Ads dashboard.
97
+ * @param requestOptions Optional RequestOptions used to load the ad.
98
+ */
99
+ static async createForAdRequest(adUnitId, requestOptions) {
100
+ if (!isString(adUnitId)) {
101
+ throw new Error("NativeAd.createForAdRequest(*) 'adUnitId' expected an string value.");
102
+ }
103
+ let options = {};
104
+ try {
105
+ options = validateAdRequestOptions(requestOptions);
106
+ } catch (e) {
107
+ if (e instanceof Error) {
108
+ throw new Error(`NativeAd.createForAdRequest(_, *) ${e.message}.`);
109
+ }
110
+ }
111
+ const props = await NativeGoogleMobileAdsNativeModule.load(adUnitId, options);
112
+ return new NativeAd(adUnitId, props);
113
+ }
114
+ }
115
+ //# sourceMappingURL=NativeAd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeEventEmitter","Platform","EventEmitter","NativeAdEventType","isFunction","isOneOf","isString","NativeGoogleMobileAdsNativeModule","validateAdRequestOptions","NativeAd","constructor","adUnitId","props","responseId","advertiser","body","callToAction","headline","price","store","starRating","icon","images","mediaContent","extras","nativeEventSubscription","onAdEvent","onNativeAdEvent","bind","eventEmitter","OS","addListener","type","emit","addAdEventListener","listener","Object","values","Error","removeAllAdEventListeners","removeAllListeners","destroy","remove","createForAdRequest","requestOptions","options","e","message","load"],"sourceRoot":"../../../../src","sources":["ads/native-ad/NativeAd.ts"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ import { createContext } from 'react';
19
+ export const NativeAdContext = /*#__PURE__*/createContext({});
20
+ //# sourceMappingURL=NativeAdContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","NativeAdContext"],"sourceRoot":"../../../../src","sources":["ads/native-ad/NativeAdContext.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAAgBA,aAAa,QAAmB,OAAO;AAOvD,OAAO,MAAMC,eAAe,gBAAGD,aAAa,CAAsB,CAAC,CAAwB,CAAC","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ /*
3
+ * Copyright (c) 2016-present Invertase Limited & Contributors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this library except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ */
18
+
19
+ import React, { useRef } from 'react';
20
+ import { NativeAdContext } from './NativeAdContext';
21
+ import GoogleMobileAdsNativeView from '../../specs/components/GoogleMobileAdsNativeViewNativeComponent';
22
+ export const NativeAdView = props => {
23
+ const {
24
+ nativeAd,
25
+ children,
26
+ ...viewProps
27
+ } = props;
28
+ const ref = useRef(null);
29
+ return /*#__PURE__*/React.createElement(GoogleMobileAdsNativeView, _extends({}, viewProps, {
30
+ ref: ref,
31
+ responseId: nativeAd.responseId,
32
+ removeClippedSubviews: false
33
+ }), /*#__PURE__*/React.createElement(NativeAdContext.Provider, {
34
+ value: {
35
+ nativeAd,
36
+ viewRef: ref
37
+ }
38
+ }, children));
39
+ };
40
+ //# sourceMappingURL=NativeAdView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useRef","NativeAdContext","GoogleMobileAdsNativeView","NativeAdView","props","nativeAd","children","viewProps","ref","createElement","_extends","responseId","removeClippedSubviews","Provider","value","viewRef"],"sourceRoot":"../../../../src","sources":["ads/native-ad/NativeAdView.tsx"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AAGrC,SAASC,eAAe,QAAQ,mBAAmB;AACnD,OAAOC,yBAAyB,MAAM,iEAAiE;AAMvG,OAAO,MAAMC,YAAY,GAAIC,KAAwB,IAAK;EACxD,MAAM;IAAEC,QAAQ;IAAEC,QAAQ;IAAE,GAAGC;EAAU,CAAC,GAAGH,KAAK;EAClD,MAAMI,GAAG,GAAGR,MAAM,CAAqD,IAAI,CAAC;EAC5E,oBACED,KAAA,CAAAU,aAAA,CAACP,yBAAyB,EAAAQ,QAAA,KACpBH,SAAS;IACbC,GAAG,EAAEA,GAAI;IACTG,UAAU,EAAEN,QAAQ,CAACM,UAAW;IAChCC,qBAAqB,EAAE;EAAM,iBAE7Bb,KAAA,CAAAU,aAAA,CAACR,eAAe,CAACY,QAAQ;IAACC,KAAK,EAAE;MAAET,QAAQ;MAAEU,OAAO,EAAEP;IAAI;EAAE,GACzDF,QACuB,CACD,CAAC;AAEhC,CAAC","ignoreList":[]}
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ import React, { useContext, useEffect, useRef } from 'react';
19
+ import { findNodeHandle } from 'react-native';
20
+ import { NativeAdContext } from './NativeAdContext';
21
+ import { Commands } from '../../specs/components/GoogleMobileAdsNativeViewNativeComponent';
22
+ import { composeRefs, getElementRef } from '../../common/ref';
23
+ export let NativeAssetType = /*#__PURE__*/function (NativeAssetType) {
24
+ NativeAssetType["ADVERTISER"] = "advertiser";
25
+ NativeAssetType["BODY"] = "body";
26
+ NativeAssetType["CALL_TO_ACTION"] = "callToAction";
27
+ NativeAssetType["HEADLINE"] = "headline";
28
+ NativeAssetType["PRICE"] = "price";
29
+ NativeAssetType["STORE"] = "store";
30
+ NativeAssetType["STAR_RATING"] = "starRating";
31
+ NativeAssetType["ICON"] = "icon";
32
+ NativeAssetType["IMAGE"] = "image";
33
+ return NativeAssetType;
34
+ }({});
35
+ export const NativeAsset = props => {
36
+ const {
37
+ assetType,
38
+ children
39
+ } = props;
40
+ const {
41
+ viewRef
42
+ } = useContext(NativeAdContext);
43
+ const ref = useRef(null);
44
+ useEffect(() => {
45
+ if (!viewRef.current) {
46
+ return;
47
+ }
48
+ const node = ref.current;
49
+ const reactTag = findNodeHandle(node);
50
+ if (reactTag) {
51
+ Commands.registerAsset(viewRef.current, assetType, reactTag);
52
+ }
53
+ }, [viewRef]);
54
+ if (! /*#__PURE__*/React.isValidElement(children)) {
55
+ return null;
56
+ }
57
+ const childrenRef = getElementRef(children);
58
+ return /*#__PURE__*/React.cloneElement(children, {
59
+ // @ts-ignore
60
+ ref: composeRefs(ref, childrenRef)
61
+ });
62
+ };
63
+ //# sourceMappingURL=NativeAsset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useContext","useEffect","useRef","findNodeHandle","NativeAdContext","Commands","composeRefs","getElementRef","NativeAssetType","NativeAsset","props","assetType","children","viewRef","ref","current","node","reactTag","registerAsset","isValidElement","childrenRef","cloneElement"],"sourceRoot":"../../../../src","sources":["ads/native-ad/NativeAsset.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAkBC,UAAU,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAC1E,SAASC,cAAc,QAAQ,cAAc;AAC7C,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,QAAQ,QAAQ,iEAAiE;AAC1F,SAASC,WAAW,EAAEC,aAAa,QAAQ,kBAAkB;AAE7D,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAiB3B,OAAO,MAAMC,WAAW,GAAIC,KAAuB,IAAK;EACtD,MAAM;IAAEC,SAAS;IAAEC;EAAS,CAAC,GAAGF,KAAK;EACrC,MAAM;IAAEG;EAAQ,CAAC,GAAGb,UAAU,CAACI,eAAe,CAAC;EAC/C,MAAMU,GAAG,GAAGZ,MAAM,CAAkB,IAAI,CAAC;EAEzCD,SAAS,CAAC,MAAM;IACd,IAAI,CAACY,OAAO,CAACE,OAAO,EAAE;MACpB;IACF;IACA,MAAMC,IAAI,GAAGF,GAAG,CAACC,OAAO;IACxB,MAAME,QAAQ,GAAGd,cAAc,CAACa,IAAI,CAAC;IACrC,IAAIC,QAAQ,EAAE;MACZZ,QAAQ,CAACa,aAAa,CAACL,OAAO,CAACE,OAAO,EAAEJ,SAAS,EAAEM,QAAQ,CAAC;IAC9D;EACF,CAAC,EAAE,CAACJ,OAAO,CAAC,CAAC;EAEb,IAAI,eAACd,KAAK,CAACoB,cAAc,CAACP,QAAQ,CAAC,EAAE;IACnC,OAAO,IAAI;EACb;EAEA,MAAMQ,WAAW,GAAGb,aAAa,CAACK,QAAQ,CAAC;EAC3C,oBAAOb,KAAK,CAACsB,YAAY,CAACT,QAAQ,EAAE;IAClC;IACAE,GAAG,EAAER,WAAW,CAACQ,GAAG,EAAEM,WAAW;EACnC,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
@@ -0,0 +1,50 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ /*
3
+ * Copyright (c) 2016-present Invertase Limited & Contributors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this library except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ */
18
+
19
+ import React, { useContext } from 'react';
20
+ import GoogleMobileAdsMediaView from '../../specs/components/GoogleMobileAdsMediaViewNativeComponent';
21
+ import { NativeAsset } from './NativeAsset';
22
+ import { NativeAdContext } from './NativeAdContext';
23
+ export const NativeMediaView = props => {
24
+ const {
25
+ resizeMode,
26
+ style,
27
+ ...viewProps
28
+ } = props;
29
+ const {
30
+ nativeAd
31
+ } = useContext(NativeAdContext);
32
+ const {
33
+ responseId,
34
+ mediaContent
35
+ } = nativeAd;
36
+ return (
37
+ /*#__PURE__*/
38
+ // @ts-ignore
39
+ React.createElement(NativeAsset, {
40
+ assetType: 'media'
41
+ }, /*#__PURE__*/React.createElement(GoogleMobileAdsMediaView, _extends({}, viewProps, {
42
+ responseId: responseId,
43
+ resizeMode: resizeMode,
44
+ style: [{
45
+ aspectRatio: mediaContent === null || mediaContent === void 0 ? void 0 : mediaContent.aspectRatio
46
+ }, style]
47
+ })))
48
+ );
49
+ };
50
+ //# sourceMappingURL=NativeMediaView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useContext","GoogleMobileAdsMediaView","NativeAsset","NativeAdContext","NativeMediaView","props","resizeMode","style","viewProps","nativeAd","responseId","mediaContent","createElement","assetType","_extends","aspectRatio"],"sourceRoot":"../../../../src","sources":["ads/native-ad/NativeMediaView.tsx"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAEzC,OAAOC,wBAAwB,MAAM,gEAAgE;AACrG,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,eAAe,QAAQ,mBAAmB;AAMnD,OAAO,MAAMC,eAAe,GAAIC,KAA2B,IAAK;EAC9D,MAAM;IAAEC,UAAU;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGH,KAAK;EACjD,MAAM;IAAEI;EAAS,CAAC,GAAGT,UAAU,CAACG,eAAe,CAAC;EAChD,MAAM;IAAEO,UAAU;IAAEC;EAAa,CAAC,GAAGF,QAAQ;EAE7C;IAAA;IACE;IACAV,KAAA,CAAAa,aAAA,CAACV,WAAW;MAACW,SAAS,EAAE;IAAQ,gBAC9Bd,KAAA,CAAAa,aAAA,CAACX,wBAAwB,EAAAa,QAAA,KACnBN,SAAS;MACbE,UAAU,EAAEA,UAAW;MACvBJ,UAAU,EAAEA,UAAW;MACvBC,KAAK,EAAE,CAAC;QAAEQ,WAAW,EAAEJ,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEI;MAAY,CAAC,EAAER,KAAK;IAAE,EAC5D,CACU;EAAC;AAElB,CAAC","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Access the ref using the method that doesn't yield a warning.
3
+ *
4
+ * Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`
5
+ * After React 19 accessing `element.ref` does the opposite.
6
+ * https://github.com/facebook/react/pull/28348
7
+ */
8
+ export function getElementRef(element) {
9
+ var _Object$getOwnPropert, _Object$getOwnPropert2;
10
+ // React <=18 in DEV
11
+ let getter = (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(element.props, 'ref')) === null || _Object$getOwnPropert === void 0 ? void 0 : _Object$getOwnPropert.get;
12
+ let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;
13
+ if (mayWarn) {
14
+ return element.ref;
15
+ }
16
+
17
+ // React 19 in DEV
18
+ getter = (_Object$getOwnPropert2 = Object.getOwnPropertyDescriptor(element, 'ref')) === null || _Object$getOwnPropert2 === void 0 ? void 0 : _Object$getOwnPropert2.get;
19
+ mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;
20
+ if (mayWarn) {
21
+ return element.props.ref;
22
+ }
23
+
24
+ // Not DEV
25
+ return element.props.ref || element.ref;
26
+ }
27
+ export function composeRefs(...refs) {
28
+ return value => {
29
+ refs.forEach(ref => {
30
+ if (typeof ref === 'function') {
31
+ ref(value);
32
+ } else if (ref !== null && ref !== undefined) {
33
+ ref.current = value;
34
+ }
35
+ });
36
+ };
37
+ }
38
+ //# sourceMappingURL=ref.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getElementRef","element","_Object$getOwnPropert","_Object$getOwnPropert2","getter","Object","getOwnPropertyDescriptor","props","get","mayWarn","isReactWarning","ref","composeRefs","refs","value","forEach","undefined","current"],"sourceRoot":"../../../src","sources":["common/ref.ts"],"mappings":"AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,aAAaA,CAACC,OAA2B,EAAwB;EAAA,IAAAC,qBAAA,EAAAC,sBAAA;EAC/E;EACA,IAAIC,MAAM,IAAAF,qBAAA,GAAGG,MAAM,CAACC,wBAAwB,CAACL,OAAO,CAACM,KAAK,EAAE,KAAK,CAAC,cAAAL,qBAAA,uBAArDA,qBAAA,CAAuDM,GAAG;EACvE,IAAIC,OAAO,GAAGL,MAAM,IAAI,gBAAgB,IAAIA,MAAM,IAAIA,MAAM,CAACM,cAAc;EAC3E,IAAID,OAAO,EAAE;IACX,OAAQR,OAAO,CAAoBU,GAAG;EACxC;;EAEA;EACAP,MAAM,IAAAD,sBAAA,GAAGE,MAAM,CAACC,wBAAwB,CAACL,OAAO,EAAE,KAAK,CAAC,cAAAE,sBAAA,uBAA/CA,sBAAA,CAAiDK,GAAG;EAC7DC,OAAO,GAAGL,MAAM,IAAI,gBAAgB,IAAIA,MAAM,IAAIA,MAAM,CAACM,cAAc;EACvE,IAAID,OAAO,EAAE;IACX,OAAOR,OAAO,CAACM,KAAK,CAACI,GAAG;EAC1B;;EAEA;EACA,OAAOV,OAAO,CAACM,KAAK,CAACI,GAAG,IAAKV,OAAO,CAAoBU,GAAG;AAC7D;AAEA,OAAO,SAASC,WAAWA,CAAI,GAAGC,IAAsB,EAAE;EACxD,OAAQC,KAAQ,IAAK;IACnBD,IAAI,CAACE,OAAO,CAACJ,GAAG,IAAI;MAClB,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;QAC7BA,GAAG,CAACG,KAAK,CAAC;MACZ,CAAC,MAAM,IAAIH,GAAG,KAAK,IAAI,IAAIA,GAAG,KAAKK,SAAS,EAAE;QAC3CL,GAAG,CAA+BM,OAAO,GAAGH,KAAK;MACpD;IACF,CAAC,CAAC;EACJ,CAAC;AACH","ignoreList":[]}
@@ -28,6 +28,7 @@ export { TestIds } from './TestIds';
28
28
  export { AdEventType } from './AdEventType';
29
29
  export { BannerAdSize, GAMBannerAdSize } from './BannerAdSize';
30
30
  export { GAMAdEventType } from './GAMAdEventType';
31
+ export { NativeAdEventType } from './NativeAdEventType';
31
32
  export { RewardedAdEventType } from './RewardedAdEventType';
32
33
  export { AdsConsent } from './AdsConsent';
33
34
  export { AppOpenAd } from './ads/AppOpenAd';
@@ -35,6 +36,10 @@ export { InterstitialAd } from './ads/InterstitialAd';
35
36
  export { RewardedAd } from './ads/RewardedAd';
36
37
  export { RewardedInterstitialAd } from './ads/RewardedInterstitialAd';
37
38
  export { BannerAd } from './ads/BannerAd';
39
+ export { NativeAd } from './ads/native-ad/NativeAd';
40
+ export { NativeAdView } from './ads/native-ad/NativeAdView';
41
+ export { NativeMediaView } from './ads/native-ad/NativeMediaView';
42
+ export { NativeAsset, NativeAssetType } from './ads/native-ad/NativeAsset';
38
43
  export { GAMBannerAd } from './ads/GAMBannerAd';
39
44
  export { GAMInterstitialAd } from './ads/GAMInterstitialAd';
40
45
  export { useAppOpenAd } from './hooks/useAppOpenAd';
@@ -1 +1 @@
1
- {"version":3,"names":["version","SDK_VERSION","default","MobileAds","AdsConsentDebugGeography","AdsConsentInfo","AdsConsentInfoOptions","AdsConsentInterface","AdsConsentPrivacyOptionsRequirementStatus","AdsConsentStatus","AdsConsentUserChoices","AdsConsentPurposes","AdsConsentSpecialFeatures","MaxAdContentRating","TestIds","AdEventType","BannerAdSize","GAMBannerAdSize","GAMAdEventType","RewardedAdEventType","AdsConsent","AppOpenAd","InterstitialAd","RewardedAd","RewardedInterstitialAd","BannerAd","GAMBannerAd","GAMInterstitialAd","useAppOpenAd","useInterstitialAd","useRewardedAd","useRewardedInterstitialAd","useForeground","RevenuePrecisions"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,WAAW;;AAEnC;AACA,OAAO,MAAMC,WAAW,GAAGD,OAAO;AAElC,SAASE,OAAO,EAAEC,SAAS,QAAQ,aAAa;AAChD,SACEC,wBAAwB,EACxBC,cAAc,EACdC,qBAAqB,EACrBC,mBAAmB,EACnBC,yCAAyC,EACzCC,gBAAgB,EAChBC,qBAAqB,QAChB,qCAAqC;AAC5C,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,EAAEC,eAAe,QAAQ,gBAAgB;AAC9D,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,YAAY,QAAQ,sBAAsB;AACnD,SAASC,iBAAiB,QAAQ,2BAA2B;AAC7D,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,yBAAyB,QAAQ,mCAAmC;AAC7E,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,cAAc,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["version","SDK_VERSION","default","MobileAds","AdsConsentDebugGeography","AdsConsentInfo","AdsConsentInfoOptions","AdsConsentInterface","AdsConsentPrivacyOptionsRequirementStatus","AdsConsentStatus","AdsConsentUserChoices","AdsConsentPurposes","AdsConsentSpecialFeatures","MaxAdContentRating","TestIds","AdEventType","BannerAdSize","GAMBannerAdSize","GAMAdEventType","NativeAdEventType","RewardedAdEventType","AdsConsent","AppOpenAd","InterstitialAd","RewardedAd","RewardedInterstitialAd","BannerAd","NativeAd","NativeAdView","NativeMediaView","NativeAsset","NativeAssetType","GAMBannerAd","GAMInterstitialAd","useAppOpenAd","useInterstitialAd","useRewardedAd","useRewardedInterstitialAd","useForeground","RevenuePrecisions"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,WAAW;;AAEnC;AACA,OAAO,MAAMC,WAAW,GAAGD,OAAO;AAElC,SAASE,OAAO,EAAEC,SAAS,QAAQ,aAAa;AAChD,SACEC,wBAAwB,EACxBC,cAAc,EACdC,qBAAqB,EACrBC,mBAAmB,EACnBC,yCAAyC,EACzCC,gBAAgB,EAChBC,qBAAqB,QAChB,qCAAqC;AAC5C,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,EAAEC,eAAe,QAAQ,gBAAgB;AAC9D,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,QAAQ,QAAQ,0BAA0B;AACnD,SAASC,YAAY,QAAQ,8BAA8B;AAC3D,SAASC,eAAe,QAAQ,iCAAiC;AACjE,SAASC,WAAW,EAAEC,eAAe,QAAQ,6BAA6B;AAC1E,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,YAAY,QAAQ,sBAAsB;AACnD,SAASC,iBAAiB,QAAQ,2BAA2B;AAC7D,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,yBAAyB,QAAQ,mCAAmC;AAC7E,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,cAAc,SAAS","ignoreList":[]}
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
1
18
  import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
2
19
  import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
3
20
  // SyntaxError "'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands"
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent","codegenNativeCommands","Commands","supportedCommands"],"sourceRoot":"../../../../src","sources":["specs/components/GoogleMobileAdsBannerViewNativeComponent.ts"],"mappings":"AAGA,OAAOA,sBAAsB,MAAM,yDAAyD;AAC5F,OAAOC,qBAAqB,MAAM,wDAAwD;AA8B1F;AACA;AACA,OAAO,MAAMC,QAAwB,GAAGD,qBAAqB,CAAiB;EAC5EE,iBAAiB,EAAE,CAAC,wBAAwB,EAAE,MAAM;AACtD,CAAC,CAAC;AAEF,eAAeH,sBAAsB,CACnC,6BACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["codegenNativeComponent","codegenNativeCommands","Commands","supportedCommands"],"sourceRoot":"../../../../src","sources":["specs/components/GoogleMobileAdsBannerViewNativeComponent.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAOA,sBAAsB,MAAM,yDAAyD;AAC5F,OAAOC,qBAAqB,MAAM,wDAAwD;AA8B1F;AACA;AACA,OAAO,MAAMC,QAAwB,GAAGD,qBAAqB,CAAiB;EAC5EE,iBAAiB,EAAE,CAAC,wBAAwB,EAAE,MAAM;AACtD,CAAC,CAAC;AAEF,eAAeH,sBAAsB,CACnC,6BACF,CAAC","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
19
+ export default codegenNativeComponent('RNGoogleMobileAdsMediaView');
20
+ //# sourceMappingURL=GoogleMobileAdsMediaViewNativeComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["codegenNativeComponent"],"sourceRoot":"../../../../src","sources":["specs/components/GoogleMobileAdsMediaViewNativeComponent.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,sBAAsB,MAAM,yDAAyD;AAS5F,eAAeA,sBAAsB,CACnC,4BACF,CAAC","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
19
+ import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
20
+ export const Commands = codegenNativeCommands({
21
+ supportedCommands: ['registerAsset']
22
+ });
23
+ export default codegenNativeComponent('RNGoogleMobileAdsNativeView');
24
+ //# sourceMappingURL=GoogleMobileAdsNativeViewNativeComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["codegenNativeComponent","codegenNativeCommands","Commands","supportedCommands"],"sourceRoot":"../../../../src","sources":["specs/components/GoogleMobileAdsNativeViewNativeComponent.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAOA,sBAAsB,MAAM,yDAAyD;AAC5F,OAAOC,qBAAqB,MAAM,wDAAwD;AAiB1F,OAAO,MAAMC,QAAwB,GAAGD,qBAAqB,CAAiB;EAC5EE,iBAAiB,EAAE,CAAC,eAAe;AACrC,CAAC,CAAC;AAEF,eAAeH,sBAAsB,CACnC,6BACF,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /**
1
+ /*
2
2
  * Copyright (c) 2016-present Invertase Limited & Contributors
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ import { TurboModuleRegistry } from 'react-native';
19
+ export default TurboModuleRegistry.getEnforcing('RNGoogleMobileAdsNativeModule');
20
+ //# sourceMappingURL=NativeGoogleMobileAdsNativeModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../../src","sources":["specs/modules/NativeGoogleMobileAdsNativeModule.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,cAAc;AA6ClD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,+BAA+B,CAAC","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited & Contributors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this library except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ export let NativeMediaAspectRatio = /*#__PURE__*/function (NativeMediaAspectRatio) {
19
+ NativeMediaAspectRatio[NativeMediaAspectRatio["ANY"] = 1] = "ANY";
20
+ NativeMediaAspectRatio[NativeMediaAspectRatio["LANDSCAPE"] = 2] = "LANDSCAPE";
21
+ NativeMediaAspectRatio[NativeMediaAspectRatio["PORTRAIT"] = 3] = "PORTRAIT";
22
+ NativeMediaAspectRatio[NativeMediaAspectRatio["SQUARE"] = 4] = "SQUARE";
23
+ return NativeMediaAspectRatio;
24
+ }({});
25
+ export let NativeAdChoicesPlacement = /*#__PURE__*/function (NativeAdChoicesPlacement) {
26
+ NativeAdChoicesPlacement[NativeAdChoicesPlacement["TOP_LEFT"] = 0] = "TOP_LEFT";
27
+ NativeAdChoicesPlacement[NativeAdChoicesPlacement["TOP_RIGHT"] = 1] = "TOP_RIGHT";
28
+ NativeAdChoicesPlacement[NativeAdChoicesPlacement["BOTTOM_RIGHT"] = 2] = "BOTTOM_RIGHT";
29
+ NativeAdChoicesPlacement[NativeAdChoicesPlacement["BOTTOM_LEFT"] = 3] = "BOTTOM_LEFT";
30
+ return NativeAdChoicesPlacement;
31
+ }({});
32
+ //# sourceMappingURL=NativeAdRequestOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeMediaAspectRatio","NativeAdChoicesPlacement"],"sourceRoot":"../../../src","sources":["types/NativeAdRequestOptions.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,WAAYA,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB,CAAtBA,sBAAsB;EAAtBA,sBAAsB,CAAtBA,sBAAsB;EAAtBA,sBAAsB,CAAtBA,sBAAsB;EAAtBA,sBAAsB,CAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;AAOlC,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA","ignoreList":[]}
@@ -26,4 +26,5 @@ export * from './RequestConfiguration';
26
26
  export * from './RequestOptions';
27
27
  export * from './RewardedAdReward';
28
28
  export * from './AppEvent';
29
+ export * from './NativeAdRequestOptions';
29
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,iBAAiB;AAC/B,cAAc,mBAAmB;AACjC,cAAc,oBAAoB;AAClC,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,qBAAqB;AACnC,cAAc,wBAAwB;AACtC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,YAAY","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,iBAAiB;AAC/B,cAAc,mBAAmB;AACjC,cAAc,oBAAoB;AAClC,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,qBAAqB;AACnC,cAAc,wBAAwB;AACtC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,YAAY;AAC1B,cAAc,0BAA0B","ignoreList":[]}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '14.7.2';
2
+ export const version = '14.8.0';
3
3
  //# sourceMappingURL=version.js.map
@@ -0,0 +1,39 @@
1
+ export declare enum NativeAdEventType {
2
+ /**
3
+ * Called when an impression is recorded for an ad.
4
+ */
5
+ IMPRESSION = "impression",
6
+ /**
7
+ * Called when a click is recorded for an ad.
8
+ */
9
+ CLICKED = "clicked",
10
+ /**
11
+ * Called when an ad opens an overlay that covers the screen.
12
+ */
13
+ OPENED = "opened",
14
+ /**
15
+ * Called when the user is about to return to the application after clicking on an ad.
16
+ */
17
+ CLOSED = "closed",
18
+ /**
19
+ * Called when the video controller has begun or resumed playing a video
20
+ */
21
+ VIDEO_PLAYED = "video_played",
22
+ /**
23
+ * Called when the video controller has paused video.
24
+ */
25
+ VIDEO_PAUSED = "video_paused",
26
+ /**
27
+ * Called when the video controller’s video playback has ended.
28
+ */
29
+ VIDEO_ENDED = "video_ended",
30
+ /**
31
+ * Called when the video controller has muted video.
32
+ */
33
+ VIDEO_MUTED = "video_muted",
34
+ /**
35
+ * Called when the video controller has unmuted video.
36
+ */
37
+ VIDEO_UNMUTED = "video_unmuted"
38
+ }
39
+ //# sourceMappingURL=NativeAdEventType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeAdEventType.d.ts","sourceRoot":"","sources":["../../src/NativeAdEventType.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,aAAa,kBAAkB;CAChC"}
@@ -6,11 +6,14 @@ export declare const TestIds: {
6
6
  INTERSTITIAL_VIDEO?: string | undefined;
7
7
  REWARDED: string;
8
8
  REWARDED_INTERSTITIAL: string;
9
+ NATIVE: string;
10
+ NATIVE_VIDEO: string;
9
11
  GAM_APP_OPEN: string;
10
12
  GAM_BANNER: string;
11
13
  GAM_INTERSTITIAL: string;
12
14
  GAM_REWARDED: string;
13
15
  GAM_REWARDED_INTERSTITIAL: string;
14
16
  GAM_NATIVE: string;
17
+ GAM_NATIVE_VIDEO: string;
15
18
  };
16
19
  //# sourceMappingURL=TestIds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TestIds.d.ts","sourceRoot":"","sources":["../../src/TestIds.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;CAiCnB,CAAC"}
1
+ {"version":3,"file":"TestIds.d.ts","sourceRoot":"","sources":["../../src/TestIds.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;CAwCnB,CAAC"}