cloudx-react-native 3.10.0 → 3.11.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/README.md +1 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/cloudxreactnative/CloudXAdEvents.kt +10 -0
- package/android/src/main/java/com/cloudxreactnative/CloudXAdInfo.kt +40 -0
- package/android/src/main/java/com/cloudxreactnative/CloudXNativeAdView.kt +718 -0
- package/android/src/main/java/com/cloudxreactnative/CloudXNativeAdViewManagerImpl.kt +119 -0
- package/android/src/main/java/com/cloudxreactnative/CloudXPackage.kt +4 -1
- package/android/src/main/res/layout/cloudx_rn_native_media_banner_template.xml +100 -0
- package/android/src/main/res/layout/cloudx_rn_native_medium_template.xml +99 -0
- package/android/src/main/res/layout/cloudx_rn_native_small_template.xml +72 -0
- package/android/src/main/res/layout/cloudx_rn_native_vertical_media_template.xml +117 -0
- package/android/src/newarch/com/cloudxreactnative/CloudXModule.kt +1 -0
- package/android/src/newarch/com/cloudxreactnative/CloudXNativeAdViewManager.kt +86 -0
- package/android/src/oldarch/com/cloudxreactnative/CloudXModule.kt +1 -0
- package/android/src/oldarch/com/cloudxreactnative/CloudXNativeAdViewManager.kt +118 -0
- package/cloudx-react-native.podspec +1 -1
- package/ios/CloudX.h +8 -0
- package/ios/CloudX.mm +159 -29
- package/ios/CloudXNativeAdView.h +75 -0
- package/ios/CloudXNativeAdView.mm +979 -0
- package/ios/CloudXNativeAdViewManager.h +12 -0
- package/ios/CloudXNativeAdViewManager.mm +119 -0
- package/lib/commonjs/CloudXAdViewBase.js +8 -97
- package/lib/commonjs/CloudXAdViewBase.js.map +1 -1
- package/lib/commonjs/CloudXNativeAdView.js +331 -0
- package/lib/commonjs/CloudXNativeAdView.js.map +1 -0
- package/lib/commonjs/CloudXNativeAdViewComponents.js +252 -0
- package/lib/commonjs/CloudXNativeAdViewComponents.js.map +1 -0
- package/lib/commonjs/CloudXNativeAdViewProvider.js +117 -0
- package/lib/commonjs/CloudXNativeAdViewProvider.js.map +1 -0
- package/lib/commonjs/extraParameters.js +52 -0
- package/lib/commonjs/extraParameters.js.map +1 -0
- package/lib/commonjs/hooks.js +34 -0
- package/lib/commonjs/hooks.js.map +1 -1
- package/lib/commonjs/index.js +72 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/CloudXNativeAdViewNativeComponent.js +41 -0
- package/lib/commonjs/specs/CloudXNativeAdViewNativeComponent.js.map +1 -0
- package/lib/commonjs/types/NativeAd.js +70 -0
- package/lib/commonjs/types/NativeAd.js.map +1 -0
- package/lib/commonjs/types/index.js +13 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/useCloudXSdkInitialization.js +75 -0
- package/lib/commonjs/useCloudXSdkInitialization.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/CloudXAdViewBase.js +7 -96
- package/lib/module/CloudXAdViewBase.js.map +1 -1
- package/lib/module/CloudXNativeAdView.js +324 -0
- package/lib/module/CloudXNativeAdView.js.map +1 -0
- package/lib/module/CloudXNativeAdViewComponents.js +240 -0
- package/lib/module/CloudXNativeAdViewComponents.js.map +1 -0
- package/lib/module/CloudXNativeAdViewProvider.js +110 -0
- package/lib/module/CloudXNativeAdViewProvider.js.map +1 -0
- package/lib/module/extraParameters.js +45 -0
- package/lib/module/extraParameters.js.map +1 -0
- package/lib/module/hooks.js +34 -0
- package/lib/module/hooks.js.map +1 -1
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/CloudXNativeAdViewNativeComponent.js +35 -0
- package/lib/module/specs/CloudXNativeAdViewNativeComponent.js.map +1 -0
- package/lib/module/types/NativeAd.js +68 -0
- package/lib/module/types/NativeAd.js.map +1 -0
- package/lib/module/types/index.js +1 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/useCloudXSdkInitialization.js +68 -0
- package/lib/module/useCloudXSdkInitialization.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/src/CloudXAdViewBase.d.ts.map +1 -1
- package/lib/typescript/src/CloudXNativeAdView.d.ts +24 -0
- package/lib/typescript/src/CloudXNativeAdView.d.ts.map +1 -0
- package/lib/typescript/src/CloudXNativeAdViewComponents.d.ts +67 -0
- package/lib/typescript/src/CloudXNativeAdViewComponents.d.ts.map +1 -0
- package/lib/typescript/src/CloudXNativeAdViewProvider.d.ts +72 -0
- package/lib/typescript/src/CloudXNativeAdViewProvider.d.ts.map +1 -0
- package/lib/typescript/src/extraParameters.d.ts +4 -0
- package/lib/typescript/src/extraParameters.d.ts.map +1 -0
- package/lib/typescript/src/hooks.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/CloudXNativeAdViewNativeComponent.d.ts +103 -0
- package/lib/typescript/src/specs/CloudXNativeAdViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/types/AdInfo.d.ts +4 -1
- package/lib/typescript/src/types/AdInfo.d.ts.map +1 -1
- package/lib/typescript/src/types/NativeAd.d.ts +114 -0
- package/lib/typescript/src/types/NativeAd.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +2 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/useCloudXSdkInitialization.d.ts +16 -0
- package/lib/typescript/src/useCloudXSdkInitialization.d.ts.map +1 -0
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/CloudXAdViewBase.tsx +8 -125
- package/src/CloudXNativeAdView.tsx +419 -0
- package/src/CloudXNativeAdViewComponents.tsx +203 -0
- package/src/CloudXNativeAdViewProvider.tsx +149 -0
- package/src/extraParameters.ts +65 -0
- package/src/hooks.ts +38 -0
- package/src/index.ts +24 -0
- package/src/specs/CloudXNativeAdViewNativeComponent.ts +137 -0
- package/src/types/AdInfo.ts +5 -1
- package/src/types/NativeAd.ts +125 -0
- package/src/types/index.ts +7 -0
- package/src/useCloudXSdkInitialization.ts +73 -0
- package/src/version.ts +1 -1
package/lib/commonjs/index.js
CHANGED
|
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "CloudXAdPosition", {
|
|
|
21
21
|
return _CloudXAdPosition.CloudXAdPosition;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "CloudXAdvertiserView", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _CloudXNativeAdViewComponents.CloudXAdvertiserView;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
Object.defineProperty(exports, "CloudXAppOpenAd", {
|
|
25
31
|
enumerable: true,
|
|
26
32
|
get: function () {
|
|
@@ -45,12 +51,30 @@ Object.defineProperty(exports, "CloudXBannerView", {
|
|
|
45
51
|
return _CloudXBannerView.CloudXBannerView;
|
|
46
52
|
}
|
|
47
53
|
});
|
|
54
|
+
Object.defineProperty(exports, "CloudXBodyView", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _CloudXNativeAdViewComponents.CloudXBodyView;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "CloudXCallToActionView", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _CloudXNativeAdViewComponents.CloudXCallToActionView;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
48
66
|
Object.defineProperty(exports, "CloudXErrorCode", {
|
|
49
67
|
enumerable: true,
|
|
50
68
|
get: function () {
|
|
51
69
|
return _CloudXErrorCode.CloudXErrorCode;
|
|
52
70
|
}
|
|
53
71
|
});
|
|
72
|
+
Object.defineProperty(exports, "CloudXIconView", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _CloudXNativeAdViewComponents.CloudXIconView;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
54
78
|
Object.defineProperty(exports, "CloudXInterstitialAd", {
|
|
55
79
|
enumerable: true,
|
|
56
80
|
get: function () {
|
|
@@ -70,6 +94,30 @@ Object.defineProperty(exports, "CloudXMRECView", {
|
|
|
70
94
|
return _CloudXMRECView.CloudXMRECView;
|
|
71
95
|
}
|
|
72
96
|
});
|
|
97
|
+
Object.defineProperty(exports, "CloudXMediaView", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
get: function () {
|
|
100
|
+
return _CloudXNativeAdViewComponents.CloudXMediaView;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(exports, "CloudXNativeAdView", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () {
|
|
106
|
+
return _CloudXNativeAdView.CloudXNativeAdView;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(exports, "CloudXNativeTemplate", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () {
|
|
112
|
+
return _types.CloudXNativeTemplate;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(exports, "CloudXOptionsView", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function () {
|
|
118
|
+
return _CloudXNativeAdViewComponents.CloudXOptionsView;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
73
121
|
Object.defineProperty(exports, "CloudXRevenuePlatform", {
|
|
74
122
|
enumerable: true,
|
|
75
123
|
get: function () {
|
|
@@ -88,6 +136,18 @@ Object.defineProperty(exports, "CloudXRewardedAd", {
|
|
|
88
136
|
return _CloudXRewardedAd.CloudXRewardedAd;
|
|
89
137
|
}
|
|
90
138
|
});
|
|
139
|
+
Object.defineProperty(exports, "CloudXStarRatingView", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function () {
|
|
142
|
+
return _CloudXNativeAdViewComponents.CloudXStarRatingView;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
Object.defineProperty(exports, "CloudXTitleView", {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function () {
|
|
148
|
+
return _CloudXNativeAdViewComponents.CloudXTitleView;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
91
151
|
Object.defineProperty(exports, "NativeCloudX", {
|
|
92
152
|
enumerable: true,
|
|
93
153
|
get: function () {
|
|
@@ -155,9 +215,12 @@ var _CloudXMRECAd = require("./CloudXMRECAd");
|
|
|
155
215
|
var _CloudXAdPosition = require("./CloudXAdPosition");
|
|
156
216
|
var _CloudXBannerView = require("./CloudXBannerView");
|
|
157
217
|
var _CloudXMRECView = require("./CloudXMRECView");
|
|
218
|
+
var _CloudXNativeAdView = require("./CloudXNativeAdView");
|
|
219
|
+
var _CloudXNativeAdViewComponents = require("./CloudXNativeAdViewComponents");
|
|
158
220
|
var _CloudXErrorCode = require("./CloudXErrorCode");
|
|
159
221
|
var _AppTrackingTransparency = require("./AppTrackingTransparency");
|
|
160
222
|
var _hooks = require("./hooks");
|
|
223
|
+
var _types = require("./types");
|
|
161
224
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
162
225
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
163
226
|
// Core SDK
|
|
@@ -170,6 +233,15 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
170
233
|
|
|
171
234
|
// Ad View Components (in-tree; layer correctly under app overlays)
|
|
172
235
|
|
|
236
|
+
// Exposed so publishers can build fully custom manual layouts that consume
|
|
237
|
+
// the loaded-ad context outside the bundled asset components.
|
|
238
|
+
// The provider, its context and the context value type are deliberately NOT
|
|
239
|
+
// public. The host `<CloudXNativeAdView/>` always mounts its own provider: one
|
|
240
|
+
// mounted outside it is ignored, and one mounted inside it breaks binding for
|
|
241
|
+
// the asset components beneath. Exporting the value type would also freeze
|
|
242
|
+
// `setNativeAd` and every asset ref as public API. Widening this surface later
|
|
243
|
+
// is additive; removing it after release would be a breaking change.
|
|
244
|
+
|
|
173
245
|
// Error Codes
|
|
174
246
|
|
|
175
247
|
// App Tracking Transparency (iOS)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_CloudX","_interopRequireWildcard","require","_NativeCloudX","_interopRequireDefault","_EventEmitter","_Arbiter","_RevenueData","_CloudXInterstitialAd","_CloudXAppOpenAd","_CloudXRewardedAd","_CloudXBannerAd","_CloudXMRECAd","_CloudXAdPosition","_CloudXBannerView","_CloudXMRECView","_CloudXErrorCode","_AppTrackingTransparency","_hooks","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CloudXLogLevel","exports","VERBOSE","DEBUG","INFO","WARN","ERROR","NONE"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_CloudX","_interopRequireWildcard","require","_NativeCloudX","_interopRequireDefault","_EventEmitter","_Arbiter","_RevenueData","_CloudXInterstitialAd","_CloudXAppOpenAd","_CloudXRewardedAd","_CloudXBannerAd","_CloudXMRECAd","_CloudXAdPosition","_CloudXBannerView","_CloudXMRECView","_CloudXNativeAdView","_CloudXNativeAdViewComponents","_CloudXErrorCode","_AppTrackingTransparency","_hooks","_types","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CloudXLogLevel","exports","VERBOSE","DEBUG","INFO","WARN","ERROR","NONE"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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A,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAG,CAAA,OAAAK,CAAA,IAAAD,CAAA,GAAAS,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAG,CAAA,OAAAK,CAAA,CAAAI,GAAA,IAAAJ,CAAA,CAAAK,GAAA,IAAAN,CAAA,CAAAE,CAAA,EAAAN,CAAA,EAAAK,CAAA,IAAAC,CAAA,CAAAN,CAAA,IAAAH,CAAA,CAAAG,CAAA,WAAAM,CAAA,KAAAT,CAAA,EAAAG,CAAA;AAhG/C;;AAGA;AACA;AACA;;AAKA;;AAQA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;;AAGA;;AAGA;;AASA;;AAyCA;AACO,MAAMgB,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC1BE,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE;AACV,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Commands = void 0;
|
|
7
|
+
var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
|
|
8
|
+
var _codegenNativeCommands = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeCommands"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* Payload for native-ad lifecycle events (load, click, revenue).
|
|
12
|
+
*
|
|
13
|
+
* Codegen cannot express `Record<string, string>`, so the SDK-owned ad values
|
|
14
|
+
* are delivered as a JSON-encoded string in `adValuesJson` (mirroring
|
|
15
|
+
* CloudXAdViewNativeComponent) and re-parsed into a map by the JS wrapper.
|
|
16
|
+
* The loaded native ad's own metadata (title, media, icon, etc.) is likewise
|
|
17
|
+
* delivered as a JSON-encoded string in `nativeAdJson`, since codegen cannot
|
|
18
|
+
* express the native ad's heterogeneous field set as typed props.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Payload for native-ad load/display-failure events.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Props for the native CloudXNativeAdView component.
|
|
27
|
+
*
|
|
28
|
+
* Mirrors the in-tree CloudXAdView (banner/MREC) component: the ad renders as
|
|
29
|
+
* an ordinary React Native view so publisher overlays layer above it via
|
|
30
|
+
* normal RN z-ordering.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
const Commands = exports.Commands = (0, _codegenNativeCommands.default)({
|
|
34
|
+
supportedCommands: ['loadAd', 'destroyAd', 'updateAssetView', 'renderNativeAd']
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Native in-tree view component backing the publisher-facing native ad view.
|
|
39
|
+
*/
|
|
40
|
+
var _default = exports.default = (0, _codegenNativeComponent.default)('CloudXNativeAdView');
|
|
41
|
+
//# sourceMappingURL=CloudXNativeAdViewNativeComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","_codegenNativeCommands","e","__esModule","default","Commands","exports","codegenNativeCommands","supportedCommands","_default","codegenNativeComponent"],"sourceRoot":"../../../src","sources":["specs/CloudXNativeAdViewNativeComponent.ts"],"mappings":";;;;;;AAQA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA2F,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;;AA4EO,MAAMG,QAAwB,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,8BAAqB,EAAiB;EAC1EC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB;AAClF,CAAC,CAAC;;AAEF;AACA;AACA;AAFA,IAAAC,QAAA,GAAAH,OAAA,CAAAF,OAAA,GAGe,IAAAM,+BAAsB,EAAc,oBAAoB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CloudXNativeTemplate = exports.CloudXNativeAssetType = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Built-in native ad template variants rendered by the SDK's view component.
|
|
9
|
+
*
|
|
10
|
+
* All four variants have a distinct bundled layout on both iOS and Android,
|
|
11
|
+
* and unknown values fall back to `MEDIUM` on both.
|
|
12
|
+
*
|
|
13
|
+
* On both platforms this prop selects the **local layout only**. Neither
|
|
14
|
+
* bid request carries the selection, so the server sizes the creative's
|
|
15
|
+
* assets for `medium` whatever is chosen here:
|
|
16
|
+
*
|
|
17
|
+
* - iOS: `CLXNativeAdLoader` builds its publisher with
|
|
18
|
+
* `CLXNativeTemplateDefault`, which is `CLXNativeTemplateMedium`.
|
|
19
|
+
* `CLXBidSignals` would thread a non-default template, but the loader
|
|
20
|
+
* never supplies one.
|
|
21
|
+
* - Android: `BidSignalsProvider` writes `nativeRequirements.template`
|
|
22
|
+
* as a fixed `"medium"`, pending a public template-selection API.
|
|
23
|
+
*
|
|
24
|
+
* A creative rendered in a non-`MEDIUM` layout therefore carries assets cut
|
|
25
|
+
* for `MEDIUM` — most visible with `VERTICAL_MEDIA`, the full-screen shape.
|
|
26
|
+
* Tracked as CXD-5385.
|
|
27
|
+
*/
|
|
28
|
+
let CloudXNativeTemplate = exports.CloudXNativeTemplate = /*#__PURE__*/function (CloudXNativeTemplate) {
|
|
29
|
+
/** 320x90 compact template: icon, title, advertiser, CTA. */
|
|
30
|
+
CloudXNativeTemplate["SMALL"] = "small_template";
|
|
31
|
+
/** 320x250 template. */
|
|
32
|
+
CloudXNativeTemplate["MEDIUM"] = "medium_template";
|
|
33
|
+
/** 320x300 media-forward template. */
|
|
34
|
+
CloudXNativeTemplate["MEDIA_BANNER"] = "media_banner_template";
|
|
35
|
+
/**
|
|
36
|
+
* Full-screen vertical template sized to the available bounds.
|
|
37
|
+
* Intended for feed-style vertical experiences. Bundled layout on both
|
|
38
|
+
* iOS and Android.
|
|
39
|
+
*/
|
|
40
|
+
CloudXNativeTemplate["VERTICAL_MEDIA"] = "vertical_media_template";
|
|
41
|
+
return CloudXNativeTemplate;
|
|
42
|
+
}({});
|
|
43
|
+
/**
|
|
44
|
+
* Type-safe asset identifiers for custom native-ad binding.
|
|
45
|
+
*/
|
|
46
|
+
let CloudXNativeAssetType = exports.CloudXNativeAssetType = /*#__PURE__*/function (CloudXNativeAssetType) {
|
|
47
|
+
CloudXNativeAssetType["TITLE"] = "TitleView";
|
|
48
|
+
CloudXNativeAssetType["ADVERTISER"] = "AdvertiserView";
|
|
49
|
+
CloudXNativeAssetType["BODY"] = "BodyView";
|
|
50
|
+
CloudXNativeAssetType["CALL_TO_ACTION"] = "CallToActionView";
|
|
51
|
+
CloudXNativeAssetType["ICON"] = "IconView";
|
|
52
|
+
CloudXNativeAssetType["OPTIONS"] = "OptionsView";
|
|
53
|
+
CloudXNativeAssetType["MEDIA"] = "MediaView";
|
|
54
|
+
CloudXNativeAssetType["STAR_RATING"] = "StarRatingView";
|
|
55
|
+
return CloudXNativeAssetType;
|
|
56
|
+
}({});
|
|
57
|
+
/**
|
|
58
|
+
* Structured metadata for a single loaded native ad.
|
|
59
|
+
*
|
|
60
|
+
* Surfaced on the `onAdLoaded` callback as `CloudXAdInfo.nativeAd`.
|
|
61
|
+
*/
|
|
62
|
+
// Shares one value type with `extraParameters`: both native setters accept any
|
|
63
|
+
// value, so narrowing one of the two sibling props was an accidental restriction.
|
|
64
|
+
/**
|
|
65
|
+
* Props for the native-ad view component.
|
|
66
|
+
*
|
|
67
|
+
* Callbacks inherited from {@link CloudXAdProps} (`onAdLoaded`, `onAdLoadFailed`,
|
|
68
|
+
* `onAdClicked`, `onAdRevenuePaid`) receive unwrapped payloads, not synthetic events.
|
|
69
|
+
*/
|
|
70
|
+
//# sourceMappingURL=NativeAd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CloudXNativeTemplate","exports","CloudXNativeAssetType"],"sourceRoot":"../../../src","sources":["types/NativeAd.ts"],"mappings":";;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApBA,IAqBYA,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,0BAApBA,oBAAoB;EAC5B;EADQA,oBAAoB;EAI5B;EAJQA,oBAAoB;EAO5B;EAPQA,oBAAoB;EAU5B;AACJ;AACA;AACA;AACA;EAdYA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAkBhC;AACA;AACA;AAFA,IAGYE,qBAAqB,GAAAD,OAAA,CAAAC,qBAAA,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAWjC;AACA;AACA;AACA;AACA;AAkBA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "CloudXNativeAssetType", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _NativeAd.CloudXNativeAssetType;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "CloudXNativeTemplate", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _NativeAd.CloudXNativeTemplate;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
6
18
|
Object.defineProperty(exports, "CloudXRevenuePlatform", {
|
|
7
19
|
enumerable: true,
|
|
8
20
|
get: function () {
|
|
@@ -16,4 +28,5 @@ Object.defineProperty(exports, "CloudXRevenuePrecision", {
|
|
|
16
28
|
}
|
|
17
29
|
});
|
|
18
30
|
var _RevenueData = require("./RevenueData");
|
|
31
|
+
var _NativeAd = require("./NativeAd");
|
|
19
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_RevenueData","require"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_RevenueData","require","_NativeAd"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAAA,YAAA,GAAAC,OAAA;AAkBA,IAAAC,SAAA,GAAAD,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useCloudXSdkInitializationGate = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _NativeCloudX = _interopRequireDefault(require("./specs/NativeCloudX"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/*
|
|
11
|
+
* Once the SDK reports initialized it stays initialized for the JS VM's life,
|
|
12
|
+
* so cache it module-wide: only the first ad view mounted before init has to
|
|
13
|
+
* poll + show a placeholder; every later mount (banner, MREC, or native)
|
|
14
|
+
* renders its native view immediately.
|
|
15
|
+
*/
|
|
16
|
+
let cachedIsInitialized = false;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Polls CloudX SDK initialization state and caches the result module-wide.
|
|
20
|
+
*
|
|
21
|
+
* Shared by `CloudXAdViewBase` (banner/MREC) and `CloudXNativeAdView` so
|
|
22
|
+
* every in-tree ad-view component gates native-view creation on SDK
|
|
23
|
+
* initialization identically: a view mounted before `CloudX.initialize()`
|
|
24
|
+
* completes would create its native ad against an uninitialized SDK, which
|
|
25
|
+
* on iOS returns nil and leaves the view permanently dead (no retry, no
|
|
26
|
+
* load-failed event). There is no init event to subscribe to, so poll
|
|
27
|
+
* `isInitialized()` until ready.
|
|
28
|
+
*
|
|
29
|
+
* @param componentName Used only in the console warnings, so callers can
|
|
30
|
+
* tell which component is waiting on initialization.
|
|
31
|
+
*/
|
|
32
|
+
const useCloudXSdkInitializationGate = componentName => {
|
|
33
|
+
const [isInitialized, setIsInitialized] = (0, _react.useState)(cachedIsInitialized);
|
|
34
|
+
(0, _react.useEffect)(() => {
|
|
35
|
+
if (cachedIsInitialized) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
let cancelled = false;
|
|
39
|
+
let timer;
|
|
40
|
+
let warnedOnce = false;
|
|
41
|
+
const check = () => {
|
|
42
|
+
_NativeCloudX.default.isInitialized().then(ready => {
|
|
43
|
+
if (cancelled) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (ready) {
|
|
47
|
+
cachedIsInitialized = true;
|
|
48
|
+
setIsInitialized(true);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (!warnedOnce) {
|
|
52
|
+
warnedOnce = true;
|
|
53
|
+
console.warn(`${componentName} mounted before CloudX SDK initialization; will render once initialize() completes.`);
|
|
54
|
+
}
|
|
55
|
+
timer = setTimeout(check, 1000);
|
|
56
|
+
}).catch(error => {
|
|
57
|
+
if (cancelled) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
console.warn(`${componentName} failed to read initialization state:`, error);
|
|
61
|
+
timer = setTimeout(check, 1000);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
check();
|
|
65
|
+
return () => {
|
|
66
|
+
cancelled = true;
|
|
67
|
+
if (timer) {
|
|
68
|
+
clearTimeout(timer);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}, [componentName]);
|
|
72
|
+
return isInitialized;
|
|
73
|
+
};
|
|
74
|
+
exports.useCloudXSdkInitializationGate = useCloudXSdkInitializationGate;
|
|
75
|
+
//# sourceMappingURL=useCloudXSdkInitialization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_NativeCloudX","_interopRequireDefault","e","__esModule","default","cachedIsInitialized","useCloudXSdkInitializationGate","componentName","isInitialized","setIsInitialized","useState","useEffect","cancelled","timer","warnedOnce","check","NativeCloudX","then","ready","console","warn","setTimeout","catch","error","clearTimeout","exports"],"sourceRoot":"../../src","sources":["useCloudXSdkInitialization.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgD,SAAAE,uBAAAC,CAAA,WAAAA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,EAAE;QACPW,YAAY,CAACX,KAAK,CAAC;MACvB;IACJ,CAAC;EACL,CAAC,EAAE,CAACN,aAAa,CAAC,CAAC;EAEnB,OAAOC,aAAa;AACxB,CAAC;AAACiB,OAAA,CAAAnB,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
package/lib/commonjs/version.js
CHANGED
|
@@ -9,5 +9,5 @@ exports.PLUGIN_VERSION = void 0;
|
|
|
9
9
|
// This value is reported to the native SDK in CloudX.initialize() and is used
|
|
10
10
|
// for wrapper-version telemetry/attribution, so a stale value mis-attributes
|
|
11
11
|
// installs to the wrong release.
|
|
12
|
-
const PLUGIN_VERSION = exports.PLUGIN_VERSION = '3.
|
|
12
|
+
const PLUGIN_VERSION = exports.PLUGIN_VERSION = '3.11.0';
|
|
13
13
|
//# sourceMappingURL=version.js.map
|
|
@@ -3,6 +3,8 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
import NativeCloudXAdView from './specs/CloudXAdViewNativeComponent';
|
|
5
5
|
import NativeCloudX from './specs/NativeCloudX';
|
|
6
|
+
import { toNativeExtraParameterEntries } from './extraParameters';
|
|
7
|
+
import { useCloudXSdkInitializationGate } from './useCloudXSdkInitialization';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Ad format rendered by the in-tree view component.
|
|
@@ -35,14 +37,6 @@ const AD_SIZE = {
|
|
|
35
37
|
* phone->leader; every later mount reads the resolved value synchronously.
|
|
36
38
|
*/
|
|
37
39
|
let cachedIsTablet = null;
|
|
38
|
-
|
|
39
|
-
/*
|
|
40
|
-
* Once the SDK reports initialized it stays initialized for the JS VM's life,
|
|
41
|
-
* so cache it module-wide: only the first ad view mounted before init has to
|
|
42
|
-
* poll + show a placeholder; every later mount renders the native view
|
|
43
|
-
* immediately. Mirrors cachedIsTablet above.
|
|
44
|
-
*/
|
|
45
|
-
let cachedIsInitialized = false;
|
|
46
40
|
const parseAdValues = json => {
|
|
47
41
|
if (!json) {
|
|
48
42
|
return {};
|
|
@@ -69,50 +63,6 @@ const toLoadFailedInfo = event => ({
|
|
|
69
63
|
code: event.code,
|
|
70
64
|
message: event.message || null
|
|
71
65
|
});
|
|
72
|
-
const warnIgnoredUndefinedExtraParameter = keyPath => {
|
|
73
|
-
console.warn(`CloudXAdView ignored extra parameter "${keyPath}" because ` + 'undefined values are not supported. Use null when a value is intentional.');
|
|
74
|
-
};
|
|
75
|
-
const normalizeExtraParameterValue = (keyPath, value) => {
|
|
76
|
-
if (value === undefined) {
|
|
77
|
-
warnIgnoredUndefinedExtraParameter(keyPath);
|
|
78
|
-
return undefined;
|
|
79
|
-
}
|
|
80
|
-
if (Array.isArray(value)) {
|
|
81
|
-
return value.reduce((items, item, index) => {
|
|
82
|
-
const normalized = normalizeExtraParameterValue(`${keyPath}[${index}]`, item);
|
|
83
|
-
if (normalized !== undefined) {
|
|
84
|
-
items.push(normalized);
|
|
85
|
-
}
|
|
86
|
-
return items;
|
|
87
|
-
}, []);
|
|
88
|
-
}
|
|
89
|
-
if (value !== null && typeof value === 'object') {
|
|
90
|
-
return Object.entries(value).reduce((object, [childKey, childValue]) => {
|
|
91
|
-
const normalized = normalizeExtraParameterValue(`${keyPath}.${childKey}`, childValue);
|
|
92
|
-
if (normalized !== undefined) {
|
|
93
|
-
object[childKey] = normalized;
|
|
94
|
-
}
|
|
95
|
-
return object;
|
|
96
|
-
}, {});
|
|
97
|
-
}
|
|
98
|
-
return value;
|
|
99
|
-
};
|
|
100
|
-
const toNativeExtraParameterEntries = extraParameters => {
|
|
101
|
-
if (!extraParameters) {
|
|
102
|
-
return [];
|
|
103
|
-
}
|
|
104
|
-
return Object.entries(extraParameters).reduce((entries, [key, value]) => {
|
|
105
|
-
const normalizedValue = normalizeExtraParameterValue(key, value);
|
|
106
|
-
if (normalizedValue === undefined) {
|
|
107
|
-
return entries;
|
|
108
|
-
}
|
|
109
|
-
entries.push({
|
|
110
|
-
key,
|
|
111
|
-
value: normalizedValue
|
|
112
|
-
});
|
|
113
|
-
return entries;
|
|
114
|
-
}, []);
|
|
115
|
-
};
|
|
116
66
|
|
|
117
67
|
/**
|
|
118
68
|
* Shared implementation for the in-tree banner/MREC view component. Resolves a
|
|
@@ -148,51 +98,12 @@ export const CloudXAdViewBase = ({
|
|
|
148
98
|
* Gate native ad-view creation on SDK initialization. A view mounted before
|
|
149
99
|
* CloudX.initialize() completes would create the ad against an uninitialized
|
|
150
100
|
* SDK — on iOS createBannerWithAdUnitId: returns nil and the view is
|
|
151
|
-
* permanently dead (no retry, no load-failed event).
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* mount pays the placeholder + poll.
|
|
101
|
+
* permanently dead (no retry, no load-failed event). Shared with
|
|
102
|
+
* CloudXNativeAdView via useCloudXSdkInitializationGate: cached module-wide
|
|
103
|
+
* so only the first pre-init mount across any ad-view type pays the
|
|
104
|
+
* placeholder + poll.
|
|
156
105
|
*/
|
|
157
|
-
const
|
|
158
|
-
useEffect(() => {
|
|
159
|
-
if (cachedIsInitialized) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
let cancelled = false;
|
|
163
|
-
let timer;
|
|
164
|
-
let warnedOnce = false;
|
|
165
|
-
const check = () => {
|
|
166
|
-
NativeCloudX.isInitialized().then(ready => {
|
|
167
|
-
if (cancelled) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
if (ready) {
|
|
171
|
-
cachedIsInitialized = true;
|
|
172
|
-
setIsInitialized(true);
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
if (!warnedOnce) {
|
|
176
|
-
warnedOnce = true;
|
|
177
|
-
console.warn('CloudXAdView mounted before CloudX SDK initialization; will render once initialize() completes.');
|
|
178
|
-
}
|
|
179
|
-
timer = setTimeout(check, 1000);
|
|
180
|
-
}).catch(error => {
|
|
181
|
-
if (cancelled) {
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
console.warn('CloudXAdView failed to read initialization state:', error);
|
|
185
|
-
timer = setTimeout(check, 1000);
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
check();
|
|
189
|
-
return () => {
|
|
190
|
-
cancelled = true;
|
|
191
|
-
if (timer) {
|
|
192
|
-
clearTimeout(timer);
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
}, []);
|
|
106
|
+
const isInitialized = useCloudXSdkInitializationGate('CloudXAdView');
|
|
196
107
|
useEffect(() => {
|
|
197
108
|
if (adFormat !== 'BANNER' || cachedIsTablet !== null) {
|
|
198
109
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useMemo","useState","View","NativeCloudXAdView","NativeCloudX","AD_SIZE","banner","width","height","leader","mrec","cachedIsTablet","
|
|
1
|
+
{"version":3,"names":["React","useEffect","useMemo","useState","View","NativeCloudXAdView","NativeCloudX","toNativeExtraParameterEntries","useCloudXSdkInitializationGate","AD_SIZE","banner","width","height","leader","mrec","cachedIsTablet","parseAdValues","json","parsed","JSON","parse","toAdInfo","event","adUnitId","adFormat","networkName","networkPlacement","placement","creativeId","revenue","adValues","adValuesJson","toLoadFailedInfo","code","message","CloudXAdViewBase","customData","extraParameters","onAdLoaded","onAdLoadFailed","onAdClicked","onAdRevenuePaid","style","viewProps","isTablet","setIsTablet","nativeViewProps","onAdExpanded","onAdCollapsed","isInitialized","cancelled","then","tablet","catch","defaultSize","resolvedStyle","nativeExtraParameters","createElement","_extends","onAdLoadedEvent","e","nativeEvent","onAdLoadFailedEvent","onAdClickedEvent","onAdRevenuePaidEvent"],"sourceRoot":"../../src","sources":["CloudXAdViewBase.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,kBAAkB,MAAM,qCAAqC;AAEpE,OAAOC,YAAY,MAAM,sBAAsB;AAI/C,SAASC,6BAA6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