react-native-applovin-max 9.0.0 → 9.2.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.
- package/android/build.gradle +3 -3
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdView.java +4 -10
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewUiComponent.java +17 -8
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXModuleImpl.java +36 -14
- package/android/src/newarch/com/applovin/reactnative/AppLovinMAXModule.java +6 -6
- package/android/src/oldarch/com/applovin/reactnative/AppLovinMAXModule.java +6 -6
- package/ios/AppLovinMAX.mm +36 -13
- package/ios/AppLovinMAXAdView.h +1 -0
- package/ios/AppLovinMAXAdView.mm +3 -9
- package/ios/AppLovinMAXAdViewUIComponent.h +1 -2
- package/ios/AppLovinMAXAdViewUIComponent.mm +18 -10
- package/lib/commonjs/AdView.js +63 -79
- package/lib/commonjs/AdView.js.map +1 -1
- package/lib/commonjs/AppLovinMAX.js +43 -29
- package/lib/commonjs/AppLovinMAX.js.map +1 -1
- package/lib/commonjs/BannerAd.js +2 -3
- package/lib/commonjs/BannerAd.js.map +1 -1
- package/lib/commonjs/ErrorCode.js +24 -31
- package/lib/commonjs/ErrorCode.js.map +1 -1
- package/lib/commonjs/EventEmitter.js +22 -1
- package/lib/commonjs/EventEmitter.js.map +1 -1
- package/lib/commonjs/Utils.js +22 -4
- package/lib/commonjs/Utils.js.map +1 -1
- package/lib/commonjs/index.js +1 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/nativeAd/NativeAdView.js +34 -24
- package/lib/commonjs/nativeAd/NativeAdView.js.map +1 -1
- package/lib/commonjs/nativeAd/NativeAdViewComponents.js +85 -43
- package/lib/commonjs/nativeAd/NativeAdViewComponents.js.map +1 -1
- package/lib/commonjs/nativeAd/NativeAdViewProvider.js +30 -2
- package/lib/commonjs/nativeAd/NativeAdViewProvider.js.map +1 -1
- package/lib/commonjs/specs/AppLovinMAXAdViewNativeComponent.js +27 -0
- package/lib/commonjs/specs/AppLovinMAXAdViewNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/AppLovinMAXNativeAdViewNativeComponent.js +23 -0
- package/lib/commonjs/specs/AppLovinMAXNativeAdViewNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/NativeAppLovinMAXModule.js +7 -0
- package/lib/commonjs/specs/NativeAppLovinMAXModule.js.map +1 -1
- package/lib/commonjs/types/AdInfo.js +13 -16
- package/lib/commonjs/types/AdInfo.js.map +1 -1
- package/lib/module/AdView.js +62 -77
- package/lib/module/AdView.js.map +1 -1
- package/lib/module/AppLovinMAX.js +44 -29
- package/lib/module/AppLovinMAX.js.map +1 -1
- package/lib/module/BannerAd.js +2 -3
- package/lib/module/BannerAd.js.map +1 -1
- package/lib/module/ErrorCode.js +24 -31
- package/lib/module/ErrorCode.js.map +1 -1
- package/lib/module/EventEmitter.js +22 -1
- package/lib/module/EventEmitter.js.map +1 -1
- package/lib/module/Utils.js +22 -4
- package/lib/module/Utils.js.map +1 -1
- package/lib/module/nativeAd/NativeAdView.js +34 -21
- package/lib/module/nativeAd/NativeAdView.js.map +1 -1
- package/lib/module/nativeAd/NativeAdViewComponents.js +87 -40
- package/lib/module/nativeAd/NativeAdViewComponents.js.map +1 -1
- package/lib/module/nativeAd/NativeAdViewProvider.js +30 -0
- package/lib/module/nativeAd/NativeAdViewProvider.js.map +1 -1
- package/lib/module/specs/AppLovinMAXAdViewNativeComponent.js +28 -0
- package/lib/module/specs/AppLovinMAXAdViewNativeComponent.js.map +1 -1
- package/lib/module/specs/AppLovinMAXNativeAdViewNativeComponent.js +24 -0
- package/lib/module/specs/AppLovinMAXNativeAdViewNativeComponent.js.map +1 -1
- package/lib/module/specs/NativeAppLovinMAXModule.js +9 -0
- package/lib/module/specs/NativeAppLovinMAXModule.js.map +1 -1
- package/lib/module/types/AdInfo.js +13 -16
- package/lib/module/types/AdInfo.js.map +1 -1
- package/lib/typescript/src/AdView.d.ts +27 -21
- package/lib/typescript/src/AdView.d.ts.map +1 -1
- package/lib/typescript/src/AppLovinMAX.d.ts +22 -21
- package/lib/typescript/src/AppLovinMAX.d.ts.map +1 -1
- package/lib/typescript/src/BannerAd.d.ts.map +1 -1
- package/lib/typescript/src/ErrorCode.d.ts +24 -31
- package/lib/typescript/src/ErrorCode.d.ts.map +1 -1
- package/lib/typescript/src/EventEmitter.d.ts +16 -0
- package/lib/typescript/src/EventEmitter.d.ts.map +1 -1
- package/lib/typescript/src/Utils.d.ts +15 -0
- package/lib/typescript/src/Utils.d.ts.map +1 -1
- package/lib/typescript/src/nativeAd/NativeAdView.d.ts +15 -7
- package/lib/typescript/src/nativeAd/NativeAdView.d.ts.map +1 -1
- package/lib/typescript/src/nativeAd/NativeAdViewComponents.d.ts +65 -1
- package/lib/typescript/src/nativeAd/NativeAdViewComponents.d.ts.map +1 -1
- package/lib/typescript/src/nativeAd/NativeAdViewProvider.d.ts +17 -0
- package/lib/typescript/src/nativeAd/NativeAdViewProvider.d.ts.map +1 -1
- package/lib/typescript/src/specs/AppLovinMAXAdViewNativeComponent.d.ts +45 -1
- package/lib/typescript/src/specs/AppLovinMAXAdViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/AppLovinMAXNativeAdViewNativeComponent.d.ts +57 -6
- package/lib/typescript/src/specs/AppLovinMAXNativeAdViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeAppLovinMAXModule.d.ts +13 -3
- package/lib/typescript/src/specs/NativeAppLovinMAXModule.d.ts.map +1 -1
- package/lib/typescript/src/types/AdEvent.d.ts +10 -4
- package/lib/typescript/src/types/AdEvent.d.ts.map +1 -1
- package/lib/typescript/src/types/AdInfo.d.ts +78 -85
- package/lib/typescript/src/types/AdInfo.d.ts.map +1 -1
- package/lib/typescript/src/types/AdProps.d.ts +14 -15
- package/lib/typescript/src/types/AdProps.d.ts.map +1 -1
- package/lib/typescript/src/types/AdViewProps.d.ts +32 -29
- package/lib/typescript/src/types/AdViewProps.d.ts.map +1 -1
- package/lib/typescript/src/types/AppLovinMAX.d.ts +50 -53
- package/lib/typescript/src/types/AppLovinMAX.d.ts.map +1 -1
- package/lib/typescript/src/types/BannerAd.d.ts +24 -18
- package/lib/typescript/src/types/BannerAd.d.ts.map +1 -1
- package/lib/typescript/src/types/CMPError.d.ts +7 -4
- package/lib/typescript/src/types/CMPError.d.ts.map +1 -1
- package/lib/typescript/src/types/Configuration.d.ts +12 -14
- package/lib/typescript/src/types/Configuration.d.ts.map +1 -1
- package/lib/typescript/src/types/FullscreenAd.d.ts +39 -46
- package/lib/typescript/src/types/FullscreenAd.d.ts.map +1 -1
- package/lib/typescript/src/types/MRecAd.d.ts +7 -3
- package/lib/typescript/src/types/MRecAd.d.ts.map +1 -1
- package/lib/typescript/src/types/NativeAd.d.ts +12 -11
- package/lib/typescript/src/types/NativeAd.d.ts.map +1 -1
- package/lib/typescript/src/types/NativeAdViewProps.d.ts +4 -3
- package/lib/typescript/src/types/NativeAdViewProps.d.ts.map +1 -1
- package/lib/typescript/src/types/Privacy.d.ts +13 -6
- package/lib/typescript/src/types/Privacy.d.ts.map +1 -1
- package/lib/typescript/src/types/RewardedAd.d.ts +7 -5
- package/lib/typescript/src/types/RewardedAd.d.ts.map +1 -1
- package/lib/typescript/src/types/ViewAd.d.ts +46 -50
- package/lib/typescript/src/types/ViewAd.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-native-applovin-max.podspec +2 -2
- package/src/AdView.tsx +64 -82
- package/src/AppLovinMAX.ts +39 -29
- package/src/BannerAd.ts +2 -3
- package/src/ErrorCode.ts +24 -31
- package/src/EventEmitter.ts +20 -2
- package/src/Utils.ts +20 -1
- package/src/nativeAd/NativeAdView.tsx +31 -21
- package/src/nativeAd/NativeAdViewComponents.tsx +97 -38
- package/src/nativeAd/NativeAdViewProvider.tsx +23 -0
- package/src/specs/AppLovinMAXAdViewNativeComponent.ts +62 -1
- package/src/specs/AppLovinMAXNativeAdViewNativeComponent.ts +70 -6
- package/src/specs/NativeAppLovinMAXModule.ts +77 -56
- package/src/types/AdEvent.ts +10 -4
- package/src/types/AdInfo.ts +78 -85
- package/src/types/AdProps.ts +14 -15
- package/src/types/AdViewProps.ts +33 -29
- package/src/types/AppLovinMAX.ts +50 -53
- package/src/types/BannerAd.ts +24 -18
- package/src/types/CMPError.ts +7 -4
- package/src/types/Configuration.ts +12 -14
- package/src/types/FullscreenAd.ts +39 -46
- package/src/types/MRecAd.ts +7 -3
- package/src/types/NativeAd.ts +12 -11
- package/src/types/NativeAdViewProps.ts +4 -3
- package/src/types/Privacy.ts +13 -6
- package/src/types/RewardedAd.ts +7 -5
- package/src/types/ViewAd.ts +46 -50
|
@@ -1,73 +1,74 @@
|
|
|
1
1
|
import type { AppLovinMAXType } from './types/AppLovinMAX';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* user.
|
|
3
|
+
* Represents the user's geography, used to determine which type of consent flow to display.
|
|
5
4
|
*/
|
|
6
5
|
export declare enum ConsentFlowUserGeography {
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
7
|
+
* The user's geography could not be determined.
|
|
9
8
|
*/
|
|
10
9
|
UNKNOWN = "U",
|
|
11
10
|
/**
|
|
12
|
-
* The user is in GDPR region.
|
|
11
|
+
* The user is located in a GDPR region.
|
|
13
12
|
*/
|
|
14
13
|
GDPR = "G",
|
|
15
14
|
/**
|
|
16
|
-
* The user is in a
|
|
15
|
+
* The user is not in a GDPR region.
|
|
17
16
|
*/
|
|
18
17
|
OTHER = "O"
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* App tracking transparency status values as defined by the AppLovin SDK.
|
|
21
|
+
*
|
|
22
|
+
* These values are based on Apple's AppTrackingTransparency framework (iOS 14+).
|
|
23
23
|
*/
|
|
24
24
|
export declare enum AppTrackingStatus {
|
|
25
25
|
/**
|
|
26
|
-
* Device is
|
|
26
|
+
* Device is running an iOS version prior to iOS 14.
|
|
27
|
+
* AppTrackingTransparency is not available.
|
|
27
28
|
*/
|
|
28
29
|
UNAVAILABLE = "U",
|
|
29
30
|
/**
|
|
30
|
-
* The user has not yet
|
|
31
|
-
* data that can be used for tracking the user or the device.
|
|
31
|
+
* The user has not yet responded to the tracking authorization prompt.
|
|
32
32
|
*/
|
|
33
33
|
NOT_DETERMINED = "N",
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
* is restricted.
|
|
35
|
+
* Tracking is restricted (e.g. due to parental controls).
|
|
37
36
|
*/
|
|
38
37
|
RESTRICTED = "R",
|
|
39
38
|
/**
|
|
40
|
-
* The user
|
|
41
|
-
* user or the device.
|
|
39
|
+
* The user denied authorization for tracking.
|
|
42
40
|
*/
|
|
43
41
|
DENIED = "D",
|
|
44
42
|
/**
|
|
45
|
-
* The user
|
|
46
|
-
* device.
|
|
43
|
+
* The user authorized tracking access.
|
|
47
44
|
*/
|
|
48
45
|
AUTHORIZED = "A"
|
|
49
46
|
}
|
|
50
47
|
/**
|
|
51
|
-
*
|
|
48
|
+
* Error codes returned from the Consent Management Platform (CMP) flow.
|
|
52
49
|
*/
|
|
53
50
|
export declare enum CMPErrorCode {
|
|
54
51
|
/**
|
|
55
|
-
*
|
|
52
|
+
* An unspecified error occurred.
|
|
56
53
|
*/
|
|
57
54
|
UNSPECIFIED = -1,
|
|
58
55
|
/**
|
|
59
|
-
*
|
|
56
|
+
* The CMP was not integrated correctly.
|
|
60
57
|
*/
|
|
61
58
|
INTEGRATION_ERROR = 1,
|
|
62
59
|
/**
|
|
63
|
-
*
|
|
60
|
+
* The CMP form is unavailable.
|
|
64
61
|
*/
|
|
65
62
|
FORM_UNAVAILABLE = 2,
|
|
66
63
|
/**
|
|
67
|
-
*
|
|
64
|
+
* The CMP form is not required for this user.
|
|
68
65
|
*/
|
|
69
66
|
FORM_NOT_REQUIRED = 3
|
|
70
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Main AppLovin MAX module interface exposed to JavaScript.
|
|
70
|
+
* Wraps the native module and overrides `initialize()` and `getSegments()` for custom handling.
|
|
71
|
+
*/
|
|
71
72
|
export declare const AppLovinMAX: AppLovinMAXType;
|
|
72
73
|
export default AppLovinMAX;
|
|
73
74
|
//# sourceMappingURL=AppLovinMAX.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLovinMAX.d.ts","sourceRoot":"","sources":["../../../src/AppLovinMAX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAM3D
|
|
1
|
+
{"version":3,"file":"AppLovinMAX.d.ts","sourceRoot":"","sources":["../../../src/AppLovinMAX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAM3D;;GAEG;AACH,oBAAY,wBAAwB;IAChC;;OAEG;IACH,OAAO,MAAM;IAEb;;OAEG;IACH,IAAI,MAAM;IAEV;;OAEG;IACH,KAAK,MAAM;CACd;AAED;;;;GAIG;AACH,oBAAY,iBAAiB;IACzB;;;OAGG;IACH,WAAW,MAAM;IAEjB;;OAEG;IACH,cAAc,MAAM;IAEpB;;OAEG;IACH,UAAU,MAAM;IAEhB;;OAEG;IACH,MAAM,MAAM;IAEZ;;OAEG;IACH,UAAU,MAAM;CACnB;AAED;;GAEG;AACH,oBAAY,YAAY;IACpB;;OAEG;IACH,WAAW,KAAK;IAEhB;;OAEG;IACH,iBAAiB,IAAI;IAErB;;OAEG;IACH,gBAAgB,IAAI;IAEpB;;OAEG;IACH,iBAAiB,IAAI;CACxB;AAwCD;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,eASxB,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../src/BannerAd.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../src/BannerAd.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA2HrD,eAAO,MAAM,QAAQ,EAAE,YA6CtB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,72 +1,65 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* display.
|
|
2
|
+
* Error codes returned by the AppLovin MAX SDK when an ad fails to load or display.
|
|
4
3
|
*/
|
|
5
4
|
export declare enum ErrorCode {
|
|
6
5
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* An unspecified error occurred.
|
|
7
|
+
* See the `message` field for more details.
|
|
9
8
|
*/
|
|
10
9
|
UNSPECIFIED,
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
13
|
-
* app/device.
|
|
11
|
+
* No eligible ads were returned from any mediated networks.
|
|
14
12
|
*/
|
|
15
13
|
NO_FILL,
|
|
16
14
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* Eligible ads were returned but all failed to load.
|
|
16
|
+
* See `adLoadFailureInfo` for more details.
|
|
19
17
|
*/
|
|
20
18
|
AD_LOAD_FAILED,
|
|
21
19
|
/**
|
|
22
|
-
*
|
|
20
|
+
* An error occurred while attempting to display the ad.
|
|
23
21
|
*/
|
|
24
22
|
AD_DISPLAY_FAILED,
|
|
25
23
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
24
|
+
* The ad request failed due to a general network issue.
|
|
25
|
+
* See the `message` field for details.
|
|
28
26
|
*/
|
|
29
27
|
NETWORK_ERROR,
|
|
30
28
|
/**
|
|
31
|
-
*
|
|
29
|
+
* The ad request timed out, likely due to a slow internet connection.
|
|
32
30
|
*/
|
|
33
31
|
NETWORK_TIMEOUT,
|
|
34
32
|
/**
|
|
35
|
-
*
|
|
36
|
-
* internet.
|
|
33
|
+
* The ad request failed because the device was offline.
|
|
37
34
|
*/
|
|
38
35
|
NO_NETWORK,
|
|
39
36
|
/**
|
|
40
|
-
*
|
|
41
|
-
* is still showing.
|
|
37
|
+
* A fullscreen ad was requested while another one was already showing.
|
|
42
38
|
*/
|
|
43
39
|
FULLSCREEN_AD_ALREADY_SHOWING,
|
|
44
40
|
/**
|
|
45
|
-
*
|
|
46
|
-
* loaded.
|
|
41
|
+
* A fullscreen ad was requested before it had finished loading.
|
|
47
42
|
*/
|
|
48
43
|
FULLSCREEN_AD_NOT_READY,
|
|
49
44
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* **iOS ONLY**.
|
|
45
|
+
* The ad was presented from an invalid view controller.
|
|
46
|
+
* **iOS only**.
|
|
53
47
|
*/
|
|
54
48
|
FULLSCREEN_AD_INVALID_VIEW_CONTROLLER,
|
|
55
49
|
/**
|
|
56
|
-
*
|
|
57
|
-
* "Don't Keep Activities" developer setting enabled.
|
|
58
|
-
* **Android
|
|
50
|
+
* The SDK was unable to display the ad because the
|
|
51
|
+
* "Don't Keep Activities" developer setting is enabled.
|
|
52
|
+
* **Android only**.
|
|
59
53
|
*/
|
|
60
54
|
DONT_KEEP_ACTIVITIES_ENABLED,
|
|
61
55
|
/**
|
|
62
|
-
*
|
|
63
|
-
* invalid ad unit identifier.
|
|
56
|
+
* The ad failed to load due to an invalid ad unit identifier.
|
|
64
57
|
*
|
|
65
|
-
* Possible
|
|
66
|
-
* 1.
|
|
67
|
-
* 2.
|
|
68
|
-
* 3.
|
|
69
|
-
* 4.
|
|
58
|
+
* Possible causes:
|
|
59
|
+
* 1. The ad unit ID is malformed or does not exist.
|
|
60
|
+
* 2. The ad unit is disabled.
|
|
61
|
+
* 3. The ad unit is not linked to the current app’s package name.
|
|
62
|
+
* 4. The ad unit was recently created (less than ~30–60 minutes ago).
|
|
70
63
|
*/
|
|
71
64
|
INVALID_AD_UNIT_ID
|
|
72
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorCode.d.ts","sourceRoot":"","sources":["../../../src/ErrorCode.ts"],"names":[],"mappings":"AAiBA
|
|
1
|
+
{"version":3,"file":"ErrorCode.d.ts","sourceRoot":"","sources":["../../../src/ErrorCode.ts"],"names":[],"mappings":"AAiBA;;GAEG;AACH,oBAAY,SAAS;IACjB;;;OAGG;IACH,WAAwC;IAExC;;OAEG;IACH,OAAgC;IAEhC;;;OAGG;IACH,cAA8C;IAE9C;;OAEG;IACH,iBAAoD;IAEpD;;;OAGG;IACH,aAA4C;IAE5C;;OAEG;IACH,eAAgD;IAEhD;;OAEG;IACH,UAAsC;IAEtC;;OAEG;IACH,6BAA4E;IAE5E;;OAEG;IACH,uBAAgE;IAEhE;;;OAGG;IACH,qCAA4F;IAE5F;;;;OAIG;IACH,4BAA0E;IAE1E;;;;;;;;OAQG;IACH,kBAAsD;CACzD"}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manages AppLovin MAX ad event listeners using a shared NativeEventEmitter.
|
|
3
|
+
* Ensures only one active subscription per event type at any given time.
|
|
4
|
+
*/
|
|
1
5
|
import type { AdEventObject, AdEventListener } from './types/AdEvent';
|
|
6
|
+
/**
|
|
7
|
+
* Subscribes to a specific ad event.
|
|
8
|
+
* If a listener already exists for the event, it will be replaced.
|
|
9
|
+
*
|
|
10
|
+
* @param event - The event name to listen for.
|
|
11
|
+
* @param handler - The callback to handle the event.
|
|
12
|
+
*/
|
|
2
13
|
export declare const addEventListener: <T extends AdEventObject>(event: string, handler: AdEventListener<T>) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Unsubscribes from a specific ad event, if a listener exists.
|
|
16
|
+
*
|
|
17
|
+
* @param event - The event name to unsubscribe from.
|
|
18
|
+
*/
|
|
3
19
|
export declare const removeEventListener: (event: string) => void;
|
|
4
20
|
//# sourceMappingURL=EventEmitter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventEmitter.d.ts","sourceRoot":"","sources":["../../../src/EventEmitter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EventEmitter.d.ts","sourceRoot":"","sources":["../../../src/EventEmitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAStE;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,aAAa,EAAE,OAAO,MAAM,EAAE,SAAS,eAAe,CAAC,CAAC,CAAC,KAAG,IAOtG,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,KAAG,IAMnD,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { LocalExtraParameterValue } from './types/AdProps';
|
|
2
|
+
/**
|
|
3
|
+
* Converts a record of string-based extra parameters into an array of `{ key, value }` objects.
|
|
4
|
+
* Used for sending extra parameters to the native SDK.
|
|
5
|
+
*
|
|
6
|
+
* @param input - An optional map of key-value string pairs (or null values).
|
|
7
|
+
* @returns An array of `{ key, value }` objects. Returns an empty array if input is undefined.
|
|
8
|
+
*/
|
|
2
9
|
export declare const makeExtraParametersArray: (input?: Record<string, string | null>) => {
|
|
3
10
|
key: string;
|
|
4
11
|
value: string | null;
|
|
@@ -8,6 +15,14 @@ type LocalExtraParameterValueMap = {
|
|
|
8
15
|
str: string | null;
|
|
9
16
|
bool: boolean | null;
|
|
10
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Converts a map of local extra parameters into a filtered array of `{ key, value }` pairs.
|
|
20
|
+
* Only values matching the specified type (`'str'` or `'bool'`) are included.
|
|
21
|
+
*
|
|
22
|
+
* @param input - A record of local extra parameters (string, boolean, or null).
|
|
23
|
+
* @param type - The expected type of each value: `'str'` for strings, `'bool'` for booleans.
|
|
24
|
+
* @returns A filtered array of `{ key, value }` objects, cast to the specified type.
|
|
25
|
+
*/
|
|
11
26
|
export declare const makeLocalExtraParametersArray: <T extends LocalExtraParameterType>(input: Record<string, LocalExtraParameterValue> | undefined, type: T) => {
|
|
12
27
|
key: string;
|
|
13
28
|
value: LocalExtraParameterValueMap[T];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../src/Utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEhE,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../src/Utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,KAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAIrH,CAAC;AAEF,KAAK,uBAAuB,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9C,KAAK,2BAA2B,GAAG;IAC/B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,GAAI,CAAC,SAAS,uBAAuB,EAC3E,OAAO,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,GAAG,SAAS,EAC3D,MAAM,CAAC,KACR;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAA;CAAE,EAWxD,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the NativeAdView component, which manages loading and rendering of native ads using the
|
|
3
|
+
* AppLovin MAX SDK in React Native.
|
|
4
|
+
*/
|
|
1
5
|
import * as React from 'react';
|
|
2
6
|
import type { ViewProps } from 'react-native';
|
|
3
7
|
import type { NativeAdViewHandler } from '../types/NativeAdViewProps';
|
|
4
8
|
/**
|
|
5
|
-
* The {@link NativeAdView} component
|
|
6
|
-
* renders it with the asset views:
|
|
9
|
+
* The {@link NativeAdView} component renders a native ad and binds it to asset views:
|
|
7
10
|
*
|
|
8
11
|
* - {@link IconView}
|
|
9
12
|
* - {@link TitleView}
|
|
@@ -13,19 +16,21 @@ import type { NativeAdViewHandler } from '../types/NativeAdViewProps';
|
|
|
13
16
|
* - {@link MediaView}
|
|
14
17
|
* - {@link CallToActionView}
|
|
15
18
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
+
* Each asset view must be manually laid out and styled.
|
|
20
|
+
* The component automatically populates content once an ad is loaded.
|
|
21
|
+
* You can reload the ad using the component’s ref via `loadAd()`.
|
|
22
|
+
*
|
|
23
|
+
* **Note:** The AppLovin SDK must be initialized before using this component.
|
|
19
24
|
*
|
|
20
25
|
* ### Example:
|
|
21
|
-
* ```
|
|
26
|
+
* ```tsx
|
|
22
27
|
* <NativeAdView
|
|
23
28
|
* ref={nativeAdViewHandler}
|
|
24
29
|
* adUnitId={adUnitId}
|
|
25
30
|
* style={styles.nativead}
|
|
26
31
|
* onAdLoaded={(adInfo: AdInfo) => { ... }}
|
|
27
32
|
* >
|
|
28
|
-
* <View style={
|
|
33
|
+
* <View style={...}>
|
|
29
34
|
* <IconView style={styles.icon} />
|
|
30
35
|
* <TitleView style={styles.title} />
|
|
31
36
|
* <AdvertiserView style={styles.advertiser} />
|
|
@@ -37,6 +42,9 @@ import type { NativeAdViewHandler } from '../types/NativeAdViewProps';
|
|
|
37
42
|
* </View>
|
|
38
43
|
* </NativeAdView>
|
|
39
44
|
* ```
|
|
45
|
+
*
|
|
46
|
+
* For a complete implementation example, see:
|
|
47
|
+
* https://github.com/AppLovin/AppLovin-MAX-React-Native/blob/master/example/src/NativeAdViewExample.tsx
|
|
40
48
|
*/
|
|
41
49
|
export declare const NativeAdView: React.ForwardRefExoticComponent<import("../types/AdProps").AdProps & ViewProps & React.RefAttributes<NativeAdViewHandler>>;
|
|
42
50
|
//# sourceMappingURL=NativeAdView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAdView.d.ts","sourceRoot":"","sources":["../../../../src/nativeAd/NativeAdView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAwB,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpE,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,4BAA4B,CAAC;AAGzF
|
|
1
|
+
{"version":3,"file":"NativeAdView.d.ts","sourceRoot":"","sources":["../../../../src/nativeAd/NativeAdView.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAwB,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpE,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,4BAA4B,CAAC;AAGzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,YAAY,4HAuBvB,CAAC"}
|
|
@@ -1,11 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides pre-styled React Native components for each native ad asset view:
|
|
3
|
+
*
|
|
4
|
+
* - TitleView
|
|
5
|
+
* - AdvertiserView
|
|
6
|
+
* - BodyView
|
|
7
|
+
* - CallToActionView
|
|
8
|
+
* - IconView
|
|
9
|
+
* - OptionsView
|
|
10
|
+
* - MediaView
|
|
11
|
+
* - StarRatingView
|
|
12
|
+
*
|
|
13
|
+
* Each component pulls ad content and view refs from NativeAdView context,
|
|
14
|
+
* and must be rendered inside a {@link NativeAdView}.
|
|
15
|
+
*/
|
|
1
16
|
import * as React from 'react';
|
|
2
17
|
import type { ViewProps, ImageProps, TextProps } from 'react-native';
|
|
18
|
+
/**
|
|
19
|
+
* Renders the native ad’s title.
|
|
20
|
+
*/
|
|
3
21
|
export declare const TitleView: (props: TextProps) => React.JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* Renders the advertiser name.
|
|
24
|
+
*/
|
|
4
25
|
export declare const AdvertiserView: (props: TextProps) => React.JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Renders the ad’s body text (description).
|
|
28
|
+
*/
|
|
5
29
|
export declare const BodyView: (props: TextProps) => React.JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Renders the call-to-action label.
|
|
32
|
+
* On iOS, wraps the text with a TouchableOpacity for better click behavior.
|
|
33
|
+
*/
|
|
6
34
|
export declare const CallToActionView: (props: TextProps) => React.JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Renders the icon image for the native ad.
|
|
37
|
+
* Falls back to a blank placeholder if not available.
|
|
38
|
+
*/
|
|
7
39
|
export declare const IconView: (props: Omit<ImageProps, "source">) => React.JSX.Element;
|
|
40
|
+
/**
|
|
41
|
+
* Renders the native ad’s options view.
|
|
42
|
+
*/
|
|
8
43
|
export declare const OptionsView: (props: ViewProps) => React.JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Renders the native ad’s media content.
|
|
46
|
+
*/
|
|
9
47
|
export declare const MediaView: (props: ViewProps) => React.JSX.Element;
|
|
10
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Props for the {@link StarRatingView} component, which displays a star rating
|
|
50
|
+
* using Unicode stars (★ and ☆) styled with color, shadow, and size.
|
|
51
|
+
*/
|
|
52
|
+
type StarRatingViewProps = ViewProps & {
|
|
53
|
+
/**
|
|
54
|
+
* The color used for filled (active) stars.
|
|
55
|
+
* Defaults to gold (#ffe234).
|
|
56
|
+
*/
|
|
57
|
+
color?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The color used for empty (inactive) stars.
|
|
60
|
+
* Defaults to light gray (#dedede).
|
|
61
|
+
*/
|
|
62
|
+
shadowColor?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The size of each star, which also determines their visual size.
|
|
65
|
+
* Defaults to 10.
|
|
66
|
+
*/
|
|
67
|
+
size?: number;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Renders the star rating of the ad, using Unicode stars (★ and ☆).
|
|
71
|
+
* Filled stars are rendered over hollow stars using a clipped view.
|
|
72
|
+
*/
|
|
73
|
+
export declare const StarRatingView: ({ color, shadowColor, size, style }: StarRatingViewProps) => React.JSX.Element;
|
|
74
|
+
export {};
|
|
11
75
|
//# sourceMappingURL=NativeAdViewComponents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAdViewComponents.d.ts","sourceRoot":"","sources":["../../../../src/nativeAd/NativeAdViewComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"NativeAdViewComponents.d.ts","sourceRoot":"","sources":["../../../../src/nativeAd/NativeAdViewComponents.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGrE;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,SAAS,sBAOzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,sBAO9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,SAAS,sBAOxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,SAAS,sBAkBhD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,sBAezD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,SAAS,sBAG3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,SAAS,sBAGzC,CAAC;AAEF;;;GAGG;AACH,KAAK,mBAAmB,GAAG,SAAS,GAAG;IACnC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,qCAAkE,mBAAmB,sBA+BnH,CAAC"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides context and state management for NativeAdView and its child asset views.
|
|
3
|
+
* Shares asset view refs and native ad data between internal components and the native SDK.
|
|
4
|
+
*/
|
|
1
5
|
import * as React from 'react';
|
|
2
6
|
import type { ReactNode } from 'react';
|
|
3
7
|
import type { Image, NativeMethods, Text, View } from 'react-native';
|
|
4
8
|
import type { NativeAd } from '../types/NativeAd';
|
|
5
9
|
import type { NativeProps } from '../specs/AppLovinMAXNativeAdViewNativeComponent';
|
|
10
|
+
/**
|
|
11
|
+
* Native component type for the rendered NativeAdView.
|
|
12
|
+
*/
|
|
6
13
|
export type NativeAdViewType = React.Component<NativeProps> & NativeMethods;
|
|
7
14
|
type TextRef = React.ElementRef<typeof Text>;
|
|
8
15
|
type ImageRef = React.ElementRef<typeof Image>;
|
|
9
16
|
type ViewRef = React.ElementRef<typeof View>;
|
|
17
|
+
/**
|
|
18
|
+
* Context type used internally by NativeAdView.
|
|
19
|
+
* Stores references to asset views and the current native ad data.
|
|
20
|
+
*/
|
|
10
21
|
export type NativeAdViewContextType = {
|
|
11
22
|
titleRef: React.RefObject<TextRef>;
|
|
12
23
|
advertiserRef: React.RefObject<TextRef>;
|
|
@@ -18,7 +29,13 @@ export type NativeAdViewContextType = {
|
|
|
18
29
|
nativeAd: NativeAd;
|
|
19
30
|
setNativeAd: React.Dispatch<React.SetStateAction<NativeAd>>;
|
|
20
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Internal context used by NativeAdView to provide access to asset view refs and native ad data.
|
|
34
|
+
*/
|
|
21
35
|
export declare const NativeAdViewContext: React.Context<NativeAdViewContextType>;
|
|
36
|
+
/**
|
|
37
|
+
* React provider that wraps components requiring access to NativeAdViewContext.
|
|
38
|
+
*/
|
|
22
39
|
export declare const NativeAdViewProvider: React.FC<{
|
|
23
40
|
children: ReactNode;
|
|
24
41
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAdViewProvider.d.ts","sourceRoot":"","sources":["../../../../src/nativeAd/NativeAdViewProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAC;AAEnF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeAdViewProvider.d.ts","sourceRoot":"","sources":["../../../../src/nativeAd/NativeAdViewProvider.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,C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,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CA6BlE,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
2
|
import type { Double, DirectEventHandler, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
/**
|
|
4
|
+
* Payload for ad lifecycle events (e.g. load, display, click).
|
|
5
|
+
*/
|
|
3
6
|
export type AdInfoEvent = Readonly<{
|
|
4
7
|
adUnitId: string;
|
|
5
8
|
adFormat: string;
|
|
@@ -17,6 +20,9 @@ export type AdInfoEvent = Readonly<{
|
|
|
17
20
|
height: Double;
|
|
18
21
|
}>;
|
|
19
22
|
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Payload for ad load failure events.
|
|
25
|
+
*/
|
|
20
26
|
export type AdLoadFailedEvent = Readonly<{
|
|
21
27
|
adUnitId: string;
|
|
22
28
|
adViewId?: Double;
|
|
@@ -26,6 +32,9 @@ export type AdLoadFailedEvent = Readonly<{
|
|
|
26
32
|
mediatedNetworkErrorMessage: string;
|
|
27
33
|
adLoadFailureInfo?: string | null;
|
|
28
34
|
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Payload for ad display failure events.
|
|
37
|
+
*/
|
|
29
38
|
export type AdDisplayFailedEvent = Readonly<{
|
|
30
39
|
adUnitId: string;
|
|
31
40
|
adFormat: string;
|
|
@@ -47,40 +56,75 @@ export type AdDisplayFailedEvent = Readonly<{
|
|
|
47
56
|
mediatedNetworkErrorCode: Double;
|
|
48
57
|
mediatedNetworkErrorMessage: string;
|
|
49
58
|
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Props passed to the {@link AppLovinMAXAdView} native component.
|
|
61
|
+
*/
|
|
50
62
|
export interface NativeProps extends ViewProps {
|
|
63
|
+
/** Ad unit ID used to load the ad. */
|
|
51
64
|
adUnitId: string;
|
|
65
|
+
/** Ad format (e.g., "BANNER", "MREC"). */
|
|
52
66
|
adFormat?: string;
|
|
67
|
+
/** Unique identifier for this ad view. Defaults to 0. */
|
|
53
68
|
adViewId?: WithDefault<Double, 0>;
|
|
69
|
+
/** Optional placement name for ad tracking. */
|
|
54
70
|
placement?: string | null;
|
|
71
|
+
/** Optional custom data associated with the ad. */
|
|
55
72
|
customData?: string | null;
|
|
73
|
+
/** Enables adaptive banner sizing. Defaults to `true`. */
|
|
56
74
|
adaptiveBannerEnabled?: WithDefault<boolean, true>;
|
|
75
|
+
/** Enables automatic refresh of the ad. Defaults to `true`. */
|
|
57
76
|
autoRefresh?: WithDefault<boolean, true>;
|
|
77
|
+
/** Whether to automatically load the ad on mount. Defaults to `true`. */
|
|
58
78
|
loadOnMount?: WithDefault<boolean, true>;
|
|
79
|
+
/** Extra key-value string parameters passed to the SDK. */
|
|
59
80
|
extraParameters?: ReadonlyArray<{
|
|
60
81
|
key: string;
|
|
61
82
|
value: string | null;
|
|
62
83
|
}>;
|
|
84
|
+
/** Local string parameters passed to the mediation adapter. */
|
|
63
85
|
strLocalExtraParameters?: ReadonlyArray<{
|
|
64
86
|
key: string;
|
|
65
87
|
value: string | null;
|
|
66
88
|
}>;
|
|
89
|
+
/** Local boolean parameters passed to the mediation adapter. */
|
|
67
90
|
boolLocalExtraParameters?: ReadonlyArray<{
|
|
68
91
|
key: string;
|
|
69
92
|
value: boolean | null;
|
|
70
93
|
}>;
|
|
94
|
+
/** Called when an ad is successfully loaded. */
|
|
71
95
|
onAdLoadedEvent: DirectEventHandler<AdInfoEvent>;
|
|
96
|
+
/** Called when an ad fails to load. */
|
|
72
97
|
onAdLoadFailedEvent: DirectEventHandler<AdLoadFailedEvent>;
|
|
98
|
+
/** Called when an ad fails to display. */
|
|
73
99
|
onAdDisplayFailedEvent: DirectEventHandler<AdDisplayFailedEvent>;
|
|
100
|
+
/** Called when the ad is clicked. */
|
|
74
101
|
onAdClickedEvent: DirectEventHandler<AdInfoEvent>;
|
|
102
|
+
/** Called when the ad expands. */
|
|
75
103
|
onAdExpandedEvent: DirectEventHandler<AdInfoEvent>;
|
|
104
|
+
/** Called when the ad collapses. */
|
|
76
105
|
onAdCollapsedEvent: DirectEventHandler<AdInfoEvent>;
|
|
106
|
+
/** Called when ad revenue is reported. */
|
|
77
107
|
onAdRevenuePaidEvent: DirectEventHandler<AdInfoEvent>;
|
|
78
108
|
}
|
|
79
109
|
type AppLovinMAXAdViewNativeComponentType = HostComponent<NativeProps>;
|
|
110
|
+
/**
|
|
111
|
+
* Native commands callable from JS for managing {@link AppLovinMAXAdView}.
|
|
112
|
+
*/
|
|
80
113
|
interface NativeCommands {
|
|
81
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Manually starts loading a new ad when `loadOnMount` is `false`.
|
|
116
|
+
*
|
|
117
|
+
* @param viewRef - Reference to the native ad view component.
|
|
118
|
+
*/
|
|
119
|
+
loadAd(viewRef: React.ElementRef<AppLovinMAXAdViewNativeComponentType>): void;
|
|
82
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* JS interface to ad view commands for {@link AppLovinMAXAdView}.
|
|
123
|
+
*/
|
|
83
124
|
export declare const Commands: NativeCommands;
|
|
125
|
+
/**
|
|
126
|
+
* Native view component for displaying a banner or MREC ad.
|
|
127
|
+
*/
|
|
84
128
|
declare const _default: HostComponent<NativeProps>;
|
|
85
129
|
export default _default;
|
|
86
130
|
//# sourceMappingURL=AppLovinMAXAdViewNativeComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLovinMAXAdViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/AppLovinMAXAdViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAIzG,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IAC/B,QA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