@adadapted/react-native-sdk 3.3.0 → 3.4.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 (63) hide show
  1. package/android/bin/build.gradle +9 -8
  2. package/android/bin/gradle.properties +1 -1
  3. package/android/build.gradle +17 -80
  4. package/android/gradle.properties +2 -2
  5. package/android/src/main/java/com/adadaptedreactnativesdk/AdadaptedReactNativeSdkModule.kt +39 -54
  6. package/ios/AdadaptedReactNativeSdk.m +1 -1
  7. package/lib/commonjs/api/adadaptedApiRequests.js +3 -3
  8. package/lib/commonjs/api/adadaptedApiRequests.js.map +1 -1
  9. package/lib/commonjs/api/adadaptedApiRequests.mock.js.map +1 -1
  10. package/lib/commonjs/api/adadaptedApiTypes.js +5 -10
  11. package/lib/commonjs/api/adadaptedApiTypes.js.map +1 -1
  12. package/lib/commonjs/components/AdZone.js +68 -73
  13. package/lib/commonjs/components/AdZone.js.map +1 -1
  14. package/lib/commonjs/components/ReportAdButton.js +9 -7
  15. package/lib/commonjs/components/ReportAdButton.js.map +1 -1
  16. package/lib/commonjs/index.js +63 -67
  17. package/lib/commonjs/index.js.map +1 -1
  18. package/lib/commonjs/package.json +1 -0
  19. package/lib/commonjs/types.js.map +1 -1
  20. package/lib/commonjs/util.js +1 -4
  21. package/lib/commonjs/util.js.map +1 -1
  22. package/lib/module/api/adadaptedApiRequests.js +2 -0
  23. package/lib/module/api/adadaptedApiRequests.js.map +1 -1
  24. package/lib/module/api/adadaptedApiRequests.mock.js +2 -0
  25. package/lib/module/api/adadaptedApiRequests.mock.js.map +1 -1
  26. package/lib/module/api/adadaptedApiTypes.js +16 -0
  27. package/lib/module/api/adadaptedApiTypes.js.map +1 -1
  28. package/lib/module/components/AdZone.js +62 -68
  29. package/lib/module/components/AdZone.js.map +1 -1
  30. package/lib/module/components/ReportAdButton.js +9 -5
  31. package/lib/module/components/ReportAdButton.js.map +1 -1
  32. package/lib/module/index.js +58 -56
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/module/package.json +1 -0
  35. package/lib/module/types.js +2 -0
  36. package/lib/module/types.js.map +1 -1
  37. package/lib/module/util.js +5 -5
  38. package/lib/module/util.js.map +1 -1
  39. package/lib/typescript/src/api/adadaptedApiTypes.d.ts +4 -0
  40. package/lib/typescript/src/api/adadaptedApiTypes.d.ts.map +1 -1
  41. package/lib/typescript/src/components/AdZone.d.ts +7 -3
  42. package/lib/typescript/src/components/AdZone.d.ts.map +1 -1
  43. package/lib/typescript/src/components/ReportAdButton.d.ts +2 -2
  44. package/lib/typescript/src/components/ReportAdButton.d.ts.map +1 -1
  45. package/lib/typescript/src/index.d.ts +11 -12
  46. package/lib/typescript/src/index.d.ts.map +1 -1
  47. package/package.json +10 -14
  48. package/src/api/adadaptedApiTypes.ts +5 -0
  49. package/src/components/AdZone.tsx +58 -42
  50. package/src/components/ReportAdButton.tsx +1 -1
  51. package/src/index.tsx +87 -76
  52. package/lib/typescript/example/index.d.ts +0 -2
  53. package/lib/typescript/example/index.d.ts.map +0 -1
  54. package/lib/typescript/example/src/App.d.ts +0 -29
  55. package/lib/typescript/example/src/App.d.ts.map +0 -1
  56. package/lib/typescript/example/src/OffScreenAdZone.d.ts +0 -38
  57. package/lib/typescript/example/src/OffScreenAdZone.d.ts.map +0 -1
  58. package/lib/typescript/example/src/StandardAdZone.d.ts +0 -38
  59. package/lib/typescript/example/src/StandardAdZone.d.ts.map +0 -1
  60. package/lib/typescript/index.d.ts +0 -2
  61. package/lib/typescript/index.d.ts.map +0 -1
  62. package/lib/typescript/jest.setup.d.ts +0 -6
  63. package/lib/typescript/jest.setup.d.ts.map +0 -1
@@ -3,16 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.AdZone = AdZone;
7
- var React = _interopRequireWildcard(require("react"));
6
+ exports.AdZone = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var adadaptedApiRequests = _interopRequireWildcard(require("../api/adadaptedApiRequests"));
10
10
  var _adadaptedApiTypes = require("../api/adadaptedApiTypes");
11
11
  var _reactNativeWebview = require("react-native-webview");
12
12
  var _util = require("../util");
13
13
  var _ReportAdButton = require("./ReportAdButton");
14
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
17
  /**
17
18
  * Component for creating an {@link AdZone}.
18
19
  * @module
@@ -41,67 +42,53 @@ let cycleAdTimer;
41
42
  * @param props - properties passed to AdZone.
42
43
  * @returns an AdZone JSX Element.
43
44
  */
44
- function AdZone(props) {
45
- // Generates a random number between 0 and (number of available ads - 1).
46
- const startingAdIndex = Math.floor(Math.random() * props.adZoneData.ads.length);
47
-
45
+ const AdZone = props => {
48
46
  /**
49
47
  * Tracks the current ad index being shown.
50
48
  */
51
- const [adIndexShown, setAdIndexShown] = (0, React.useState)(startingAdIndex);
49
+ const [adIndexShown, setAdIndexShown] = (0, _react.useState)(Math.floor(Math.random() * props.adZoneData.ads.length));
52
50
  /**
53
51
  * Tracks the coordinates when the user started touching the Ad View.
54
52
  */
55
- const [touchStartCoords, setTouchStartCoords] = (0, React.useState)({
53
+ const [touchStartCoords, setTouchStartCoords] = (0, _react.useState)({
56
54
  x: 0,
57
55
  y: 0
58
56
  });
57
+
59
58
  /**
60
59
  * Track ad visibility (for off-screen ads).
61
60
  */
62
- const [isAdVisible, setIsAdVisibile] = (0, React.useState)(props.isAdZoneVisible);
61
+ const [isAdZoneVisible, setIsAdVisibile] = (0, _react.useState)(props.isAdZoneVisible);
63
62
 
64
63
  // Setup device listeners.
65
- (0, React.useEffect)(() => {
64
+ (0, _react.useEffect)(() => {
66
65
  _reactNative.DeviceEventEmitter.addListener("visibility-event", event => {
67
66
  setIsAdVisibile(event);
68
67
  });
69
68
  _reactNative.DeviceEventEmitter.addListener("acknowledge", itemName => {
70
69
  acknowledge(itemName);
71
70
  });
72
- if (props.offScreenAdZone && isAdVisible) {
73
- sendAdImpression();
74
- } else if (!props.offScreenAdZone) {
75
- sendAdImpression();
76
- }
77
71
  return () => {
78
72
  clearTimeout(cycleAdTimer);
79
- _reactNative.DeviceEventEmitter.removeAllListeners("visibility-event");
80
73
  _reactNative.DeviceEventEmitter.removeAllListeners("acknowledge");
81
74
  };
82
75
  // eslint-disable-next-line react-hooks/exhaustive-deps
83
76
  }, []);
84
77
 
85
78
  // Send impression on ad cycle.
86
- (0, React.useEffect)(() => {
79
+ (0, _react.useEffect)(() => {
87
80
  startAdTimer();
88
- if (props.offScreenAdZone && isAdVisible) {
89
- sendAdImpression();
90
- } else if (!props.offScreenAdZone) {
81
+ if (isAdZoneVisible) {
91
82
  sendAdImpression();
92
83
  }
93
84
  // eslint-disable-next-line react-hooks/exhaustive-deps
94
85
  }, [adIndexShown]);
95
-
96
- // Send impression based on visibility change. (for off-screen ads)
97
- (0, React.useEffect)(() => {
98
- if (props.offScreenAdZone && isAdVisible) {
99
- sendAdImpression();
100
- } else if (!props.offScreenAdZone) {
86
+ (0, _react.useEffect)(() => {
87
+ if (props.offScreenAdZone && isAdZoneVisible && props.adZoneData && props.adZoneData.ads && props.adZoneData.ads.length > adIndexShown && !props.adZoneData.ads[adIndexShown].impression_tracked) {
101
88
  sendAdImpression();
102
89
  }
103
90
  // eslint-disable-next-line react-hooks/exhaustive-deps
104
- }, [isAdVisible]);
91
+ }, [isAdZoneVisible]);
105
92
 
106
93
  /**
107
94
  * Generates all component related styles.
@@ -128,9 +115,8 @@ function AdZone(props) {
128
115
  // Generate the styles each render in case the ad is updated with
129
116
  // new settings that need to be reflected in the styles of the view.
130
117
  const styles = generateStyles();
131
- const currentAd = props.adZoneData.ads[adIndexShown] || undefined;
132
118
  const finalMainViewStyle = styles.mainView;
133
- if (!currentAd || !currentAd.creative_url) {
119
+ if (!props.adZoneData.ads[adIndexShown] || !props.adZoneData.ads[adIndexShown].creative_url) {
134
120
  // If there is no ad to display, make the view take up no space.
135
121
  finalMainViewStyle.width = 0;
136
122
  finalMainViewStyle.height = 0;
@@ -199,9 +185,11 @@ function AdZone(props) {
199
185
  */
200
186
  function startAdTimer() {
201
187
  clearTimeout(cycleAdTimer);
202
- if (props.adZoneData.ads.length > 0) {
188
+ if (props.adZoneData.ads.length > 0 && props.adZoneData.ads[adIndexShown]) {
203
189
  const refreshTime = props.adZoneData.ads[adIndexShown].refresh_time * 1000;
204
190
  cycleAdTimer = setTimeout(cycleDisplayedAd, refreshTime);
191
+ } else {
192
+ cycleAdTimer = setTimeout(cycleDisplayedAd, 30000);
205
193
  }
206
194
  }
207
195
 
@@ -209,19 +197,23 @@ function AdZone(props) {
209
197
  * Cycles to the next ad to display in the current available sequence of ads.
210
198
  */
211
199
  function cycleDisplayedAd() {
212
- // Start by determining the next ad index to display.
213
200
  let nextAdIndex = 0;
201
+
202
+ // Start by determining the next ad index to display.
214
203
  const lastAd = props.adZoneData.ads[adIndexShown];
215
204
  if (adIndexShown < props.adZoneData.ads.length - 1) {
216
205
  nextAdIndex = adIndexShown + 1;
217
- }
218
- if (nextAdIndex !== adIndexShown && lastAd.impression_tracked) {
219
- // Reset ad impression tracking status.
220
- lastAd.impression_tracked = false;
221
206
  } else {
207
+ nextAdIndex = 0;
208
+ }
209
+ if (!lastAd.impression_tracked && !isAdZoneVisible) {
222
210
  // Send invisible ad impression if ad was not visible before end of timer cycle.
223
211
  triggerReportAdEvent(lastAd, _adadaptedApiTypes.ReportedEventType.INVISIBLE_IMPRESSION);
224
212
  }
213
+ if (lastAd.impression_tracked) {
214
+ // Reset ad impression tracking status.
215
+ lastAd.impression_tracked = false;
216
+ }
225
217
  setAdIndexShown(nextAdIndex);
226
218
  }
227
219
 
@@ -230,50 +222,53 @@ function AdZone(props) {
230
222
  */
231
223
  function sendAdImpression() {
232
224
  const ad = props.adZoneData.ads[adIndexShown];
233
- if (!ad.impression_tracked) {
225
+ if (ad.impression_tracked === undefined || !ad.impression_tracked) {
234
226
  triggerReportAdEvent(ad, _adadaptedApiTypes.ReportedEventType.IMPRESSION);
235
227
  ad.impression_tracked = true;
236
228
  }
237
229
  }
238
230
 
239
231
  // Returned JSX.
240
- return /*#__PURE__*/React.createElement(_reactNative.View, {
241
- style: finalMainViewStyle
242
- }, currentAd && currentAd.creative_url ? /*#__PURE__*/React.createElement(_reactNativeWebview.WebView, {
243
- source: {
244
- uri: currentAd.creative_url
245
- },
246
- androidLayerType: "hardware",
247
- automaticallyAdjustContentInsets: false,
248
- style: styles.webView,
249
- onTouchStart: e => {
250
- setTouchStartCoords({
251
- x: e.nativeEvent.pageX,
252
- y: e.nativeEvent.pageY
253
- });
254
- },
255
- onTouchEnd: e => {
256
- if (touchStartCoords) {
257
- const touchEndCoords = {
232
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
233
+ style: finalMainViewStyle,
234
+ children: [props.adZoneData.ads[adIndexShown] && props.adZoneData.ads[adIndexShown].creative_url ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeWebview.WebView, {
235
+ source: {
236
+ uri: props.adZoneData.ads[adIndexShown].creative_url
237
+ },
238
+ androidLayerType: "hardware",
239
+ automaticallyAdjustContentInsets: false,
240
+ style: styles.webView,
241
+ onTouchStart: e => {
242
+ setTouchStartCoords({
258
243
  x: e.nativeEvent.pageX,
259
244
  y: e.nativeEvent.pageY
260
- };
261
- if (Math.abs(touchStartCoords.x - touchEndCoords.x) < props.xyDragDistanceAllowed && Math.abs(touchStartCoords.y - touchEndCoords.y) < props.xyDragDistanceAllowed) {
262
- onAdZoneSelected(currentAd);
263
- }
264
-
265
- // Make sure to reset the start coords
266
- setTouchStartCoords({
267
- x: 0,
268
- y: 0
269
245
  });
246
+ },
247
+ onTouchEnd: e => {
248
+ if (touchStartCoords) {
249
+ const touchEndCoords = {
250
+ x: e.nativeEvent.pageX,
251
+ y: e.nativeEvent.pageY
252
+ };
253
+ if (Math.abs(touchStartCoords.x - touchEndCoords.x) < props.xyDragDistanceAllowed && Math.abs(touchStartCoords.y - touchEndCoords.y) < props.xyDragDistanceAllowed) {
254
+ onAdZoneSelected(props.adZoneData.ads[adIndexShown]);
255
+ }
256
+
257
+ // Make sure to reset the start coords
258
+ setTouchStartCoords({
259
+ x: 0,
260
+ y: 0
261
+ });
262
+ }
270
263
  }
271
- }
272
- }) : undefined, /*#__PURE__*/React.createElement(_reactNative.View, {
273
- style: styles.reportAd
274
- }, /*#__PURE__*/React.createElement(_ReportAdButton.ReportAdButton, {
275
- adId: currentAd.ad_id,
276
- udid: props.udid
277
- })));
278
- }
264
+ }) : undefined, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
265
+ style: styles.reportAd,
266
+ children: props.adZoneData && props.adZoneData.ads[adIndexShown] ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReportAdButton.ReportAdButton, {
267
+ adId: props.adZoneData.ads[adIndexShown].ad_id,
268
+ udid: props.udid
269
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {})
270
+ })]
271
+ });
272
+ };
273
+ exports.AdZone = AdZone;
279
274
  //# sourceMappingURL=AdZone.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","adadaptedApiRequests","_adadaptedApiTypes","_reactNativeWebview","_util","_ReportAdButton","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","cycleAdTimer","AdZone","props","startingAdIndex","Math","floor","random","adZoneData","ads","length","adIndexShown","setAdIndexShown","useState","touchStartCoords","setTouchStartCoords","x","y","isAdVisible","setIsAdVisibile","isAdZoneVisible","useEffect","DeviceEventEmitter","addListener","event","itemName","acknowledge","offScreenAdZone","sendAdImpression","clearTimeout","removeAllListeners","startAdTimer","generateStyles","StyleSheet","create","mainView","width","height","webView","reportAd","position","top","right","styles","currentAd","undefined","finalMainViewStyle","creative_url","onAdZoneSelected","currentlyDisplayedAd","action_type","AdActionType","EXTERNAL","action_path","Linking","openURL","then","CONTENT","payload","detailed_list_items","safeInvoke","onAddToListTriggered","cycleDisplayedAd","forEach","ad","item","product_title","triggerReportAdEvent","ReportedEventType","INTERACTION","eventType","currentTs","round","Date","getTime","reportAdEvent","app_id","appId","session_id","sessionId","udid","events","ad_id","impression_id","event_type","created_at","deviceOs","apiEnv","refreshTime","refresh_time","setTimeout","nextAdIndex","lastAd","impression_tracked","INVISIBLE_IMPRESSION","IMPRESSION","createElement","View","style","WebView","source","uri","androidLayerType","automaticallyAdjustContentInsets","onTouchStart","e","nativeEvent","pageX","pageY","onTouchEnd","touchEndCoords","abs","xyDragDistanceAllowed","ReportAdButton","adId"],"sourceRoot":"../../../src","sources":["components/AdZone.tsx"],"mappings":";;;;;;AAIA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,oBAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAOA,IAAAI,mBAAA,GAAAJ,OAAA;AAEA,IAAAK,KAAA,GAAAL,OAAA;AAEA,IAAAM,eAAA,GAAAN,OAAA;AAAkD,SAAAO,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAa,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,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KAAK,EAAEvD,MAAM,CAACL,OAAQ;IACtBkE,YAAY,EAAGC,CAAC,IAAK;MACjB1F,mBAAmB,CAAC;QAChBC,CAAC,EAAEyF,CAAC,CAACC,WAAW,CAACC,KAAK;QACtB1F,CAAC,EAAEwF,CAAC,CAACC,WAAW,CAACE;MACrB,CAAC,CAAC;IACN,CAAE;IACFC,UAAU,EAAGJ,CAAC,IAAK;MACf,IAAI3F,gBAAgB,EAAE;QAClB,MAAMgG,cAAgC,GAAG;UACrC9F,CAAC,EAAEyF,CAAC,CAACC,WAAW,CAACC,KAAK;UACtB1F,CAAC,EAAEwF,CAAC,CAACC,WAAW,CAACE;QACrB,CAAC;QAED,IACIvG,IAAI,CAAC0G,GAAG,CACJjG,gBAAgB,CAACE,CAAC,GAAG8F,cAAc,CAAC9F,CACxC,CAAC,GAAGb,KAAK,CAAC6G,qBAAqB,IAC/B3G,IAAI,CAAC0G,GAAG,CACJjG,gBAAgB,CAACG,CAAC,GAAG6F,cAAc,CAAC7F,CACxC,CAAC,GAAGd,KAAK,CAAC6G,qBAAqB,EACjC;UACEhE,gBAAgB,CAACJ,SAAS,CAAC;QAC/B;;QAEA;QACA7B,mBAAmB,CAAC;UAAEC,CAAC,EAAE,CAAC;UAAEC,CAAC,EAAE;QAAE,CAAC,CAAC;MACvC;IACJ;EAAE,CACL,CAAC,GACF4B,SAAS,eACb3E,KAAA,CAAA8H,aAAA,CAAC3H,YAAA,CAAA4H,IAAI;IAACC,KAAK,EAAEvD,MAAM,CAACJ;EAAS,gBACzBrE,KAAA,CAAA8H,aAAA,CAACtH,eAAA,CAAAuI,cAAc;IAACC,IAAI,EAAEtE,SAAS,CAACsC,KAAM;IAACF,IAAI,EAAE7E,KAAK,CAAC6E;EAAK,CAAE,CACxD,CACJ,CAAC;AAEf"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","adadaptedApiRequests","_adadaptedApiTypes","_reactNativeWebview","_util","_ReportAdButton","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","cycleAdTimer","AdZone","props","adIndexShown","setAdIndexShown","useState","Math","floor","random","adZoneData","ads","length","touchStartCoords","setTouchStartCoords","x","y","isAdZoneVisible","setIsAdVisibile","useEffect","DeviceEventEmitter","addListener","event","itemName","acknowledge","clearTimeout","removeAllListeners","startAdTimer","sendAdImpression","offScreenAdZone","impression_tracked","generateStyles","StyleSheet","create","mainView","width","height","webView","reportAd","position","top","right","styles","finalMainViewStyle","creative_url","onAdZoneSelected","currentlyDisplayedAd","action_type","AdActionType","EXTERNAL","action_path","Linking","openURL","then","CONTENT","payload","detailed_list_items","safeInvoke","onAddToListTriggered","cycleDisplayedAd","forEach","ad","item","product_title","triggerReportAdEvent","ReportedEventType","INTERACTION","eventType","currentTs","round","Date","getTime","reportAdEvent","app_id","appId","session_id","sessionId","udid","events","ad_id","impression_id","event_type","created_at","deviceOs","apiEnv","refreshTime","refresh_time","setTimeout","nextAdIndex","lastAd","INVISIBLE_IMPRESSION","undefined","IMPRESSION","jsxs","View","style","children","jsx","WebView","source","uri","androidLayerType","automaticallyAdjustContentInsets","onTouchStart","nativeEvent","pageX","pageY","onTouchEnd","touchEndCoords","abs","xyDragDistanceAllowed","ReportAdButton","adId","Fragment","exports"],"sourceRoot":"../../../src","sources":["components/AdZone.tsx"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,oBAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAOA,IAAAI,mBAAA,GAAAJ,OAAA;AAEA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAAkD,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC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ACE,CAAC,GAAG6F,cAAc,CAAC7F,CACxC,CAAC,GAAGZ,KAAK,CAAC2G,qBAAqB,IAC/BvG,IAAI,CAACsG,GAAG,CACJhG,gBAAgB,CAACG,CAAC,GAAG4F,cAAc,CAAC5F,CACxC,CAAC,GAAGb,KAAK,CAAC2G,qBAAqB,EACjC;YACEjE,gBAAgB,CACZ1C,KAAK,CAACO,UAAU,CAACC,GAAG,CAACP,YAAY,CACrC,CAAC;UACL;;UAEA;UACAU,mBAAmB,CAAC;YAAEC,CAAC,EAAE,CAAC;YAAEC,CAAC,EAAE;UAAE,CAAC,CAAC;QACvC;MACJ;IAAE,CACL,CAAC,GACF2E,SAAS,eACb,IAAA/G,WAAA,CAAAqH,GAAA,EAAC3H,YAAA,CAAAwH,IAAI;MAACC,KAAK,EAAErD,MAAM,CAACJ,QAAS;MAAA0D,QAAA,EACxB7F,KAAK,CAACO,UAAU,IAAIP,KAAK,CAACO,UAAU,CAACC,GAAG,CAACP,YAAY,CAAC,gBACnD,IAAAxB,WAAA,CAAAqH,GAAA,EAACtH,eAAA,CAAAoI,cAAc;QACXC,IAAI,EAAE7G,KAAK,CAACO,UAAU,CAACC,GAAG,CAACP,YAAY,CAAC,CAAC2E,KAAM;QAC/CF,IAAI,EAAE1E,KAAK,CAAC0E;MAAK,CACpB,CAAC,gBAEF,IAAAjG,WAAA,CAAAqH,GAAA,EAAArH,WAAA,CAAAqI,QAAA,IAAI;IACP,CACC,CAAC;EAAA,CACL,CAAC;AAEf,CAAC;AAACC,OAAA,CAAAhH,MAAA,GAAAA,MAAA","ignoreList":[]}
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.ReportAdButton = ReportAdButton;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
12
  /**
12
13
  * Creates the ReportAdButton component.
13
14
  * @param props The component's props.
@@ -26,13 +27,14 @@ function ReportAdButton(props) {
26
27
  reportAdUrlBase.searchParams.append("uid", props.udid);
27
28
  // eslint-disable-next-line react-hooks/exhaustive-deps
28
29
  }, [props]);
29
- return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
30
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
30
31
  style: styles.buttonStyle,
31
32
  onPress: () => {
32
33
  _reactNative.Linking.openURL(reportAdUrlBase.toString());
33
- }
34
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
35
- source: require("../images/ReportIcon.png")
36
- }));
34
+ },
35
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
36
+ source: require("../images/ReportIcon.png")
37
+ })
38
+ });
37
39
  }
38
40
  //# sourceMappingURL=ReportAdButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ReportAdButton","props","reportAdUrlBase","URL","styles","StyleSheet","create","buttonStyle","width","height","useEffect","searchParams","append","adId","udid","createElement","TouchableOpacity","style","onPress","Linking","openURL","toString","Image","source"],"sourceRoot":"../../../src","sources":["components/ReportAdButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA4E,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG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ACG,WAAY;IAC1BW,OAAO,EAAEA,CAAA,KAAM;MACXC,oBAAO,CAACC,OAAO,CAAClB,eAAe,CAACmB,QAAQ,CAAC,CAAC,CAAC;IAC/C;EAAE,gBAEF/C,MAAA,CAAAW,OAAA,CAAA8B,aAAA,CAACtC,YAAA,CAAA6C,KAAK;IAACC,MAAM,EAAE/C,OAAO,CAAC,0BAA0B;EAAE,CAAE,CACvC,CAAC;AAE3B"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ReportAdButton","props","reportAdUrlBase","URL","styles","StyleSheet","create","buttonStyle","width","height","useEffect","searchParams","append","adId","udid","jsx","TouchableOpacity","style","onPress","Linking","openURL","toString","children","Image","source"],"sourceRoot":"../../../src","sources":["components/ReportAdButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA4E,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC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AClB,eAAe,CAACmB,QAAQ,CAAC,CAAC,CAAC;IAC/C,CAAE;IAAAC,QAAA,eAEF,IAAA3C,WAAA,CAAAoC,GAAA,EAACrC,YAAA,CAAA6C,KAAK;MAACC,MAAM,EAAE/C,OAAO,CAAC,0BAA0B;IAAE,CAAE;EAAC,CACxC,CAAC;AAE3B","ignoreList":[]}
@@ -12,16 +12,17 @@ var _AdZone = require("./components/AdZone");
12
12
  var _util = require("./util");
13
13
  var _package = _interopRequireDefault(require("../package.json"));
14
14
  var _reactNativeBase = _interopRequireDefault(require("react-native-base64"));
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
19
  /**
19
20
  * The AdadaptedReactNativeSdk package/module definition.
20
21
  */
21
22
  /**
22
23
  * Enum representing possible device operating systems.
23
24
  */
24
- let DeviceOS = /*#__PURE__*/function (DeviceOS) {
25
+ let DeviceOS = exports.DeviceOS = /*#__PURE__*/function (DeviceOS) {
25
26
  DeviceOS["ANDROID"] = "android";
26
27
  DeviceOS["IOS"] = "ios";
27
28
  return DeviceOS;
@@ -29,8 +30,7 @@ let DeviceOS = /*#__PURE__*/function (DeviceOS) {
29
30
  /**
30
31
  * Enum defining the different API environments.
31
32
  */
32
- exports.DeviceOS = DeviceOS;
33
- let ApiEnv = /*#__PURE__*/function (ApiEnv) {
33
+ let ApiEnv = exports.ApiEnv = /*#__PURE__*/function (ApiEnv) {
34
34
  ApiEnv["Prod"] = "https://ads.adadapted.com";
35
35
  ApiEnv["Dev"] = "https://sandbox.adadapted.com";
36
36
  ApiEnv["Mock"] = "MOCK_DATA";
@@ -39,8 +39,7 @@ let ApiEnv = /*#__PURE__*/function (ApiEnv) {
39
39
  /**
40
40
  * Enum defining the different API environments for List Manager.
41
41
  */
42
- exports.ApiEnv = ApiEnv;
43
- let ListManagerApiEnv = /*#__PURE__*/function (ListManagerApiEnv) {
42
+ let ListManagerApiEnv = exports.ListManagerApiEnv = /*#__PURE__*/function (ListManagerApiEnv) {
44
43
  ListManagerApiEnv["Prod"] = "https://ec.adadapted.com";
45
44
  ListManagerApiEnv["Dev"] = "https://sandec.adadapted.com";
46
45
  ListManagerApiEnv["Mock"] = "MOCK_DATA";
@@ -49,8 +48,7 @@ let ListManagerApiEnv = /*#__PURE__*/function (ListManagerApiEnv) {
49
48
  /**
50
49
  * Enum defining the different API environments for the Payload Server.
51
50
  */
52
- exports.ListManagerApiEnv = ListManagerApiEnv;
53
- let PayloadApiEnv = /*#__PURE__*/function (PayloadApiEnv) {
51
+ let PayloadApiEnv = exports.PayloadApiEnv = /*#__PURE__*/function (PayloadApiEnv) {
54
52
  PayloadApiEnv["Prod"] = "https://payload.adadapted.com";
55
53
  PayloadApiEnv["Dev"] = "https://sandpayload.adadapted.com";
56
54
  PayloadApiEnv["Mock"] = "MOCK_DATA";
@@ -71,7 +69,6 @@ let PayloadApiEnv = /*#__PURE__*/function (PayloadApiEnv) {
71
69
  * {@link AdadaptedReactNativeSdk} so the interaction with the SDK all be
72
70
  * done through this namespace.
73
71
  */
74
- exports.PayloadApiEnv = PayloadApiEnv;
75
72
  /**
76
73
  * Class that acts as the AdAdapted SDK for react-native.
77
74
  */
@@ -151,7 +148,7 @@ class AdadaptedReactNativeSdk {
151
148
  /**
152
149
  * If provided, triggers when an "add to list" item is
153
150
  * clicked in an ad zone.
154
- * @param items - The array of items to "add to list".
151
+ * @param detail - The array of items to "add to list".
155
152
  * @param isExternalPayload - If true, the items are from an external payload.
156
153
  */
157
154
 
@@ -170,11 +167,7 @@ class AdadaptedReactNativeSdk {
170
167
  */
171
168
 
172
169
  /**
173
- * Track ad zone visibility for off-screen ads.
174
- */
175
- isAdZoneVisible = true;
176
- /**
177
- * Ad zones that contain off-screen ads..
170
+ * Ad zones that contain off-screen ads.
178
171
  */
179
172
 
180
173
  /**
@@ -253,27 +246,25 @@ class AdadaptedReactNativeSdk {
253
246
  const adZoneInfoList = [];
254
247
  for (const adZoneId in adZones) {
255
248
  if (Object.prototype.hasOwnProperty.call(adZones, adZoneId)) {
256
- this.offScreenAdZone?.forEach(zone => {
257
- if (Number(adZones[adZoneId].id) !== zone) {
258
- adZoneInfoList.push({
259
- zoneId: adZones[adZoneId].id,
260
- adZone: /*#__PURE__*/React.createElement(_AdZone.AdZone, {
261
- key: adZoneId,
262
- appId: this.appId,
263
- sessionId: this.sessionId,
264
- udid: this.deviceInfo.udid,
265
- deviceOs: this.deviceOs,
266
- apiEnv: this.apiEnv,
267
- xyDragDistanceAllowed: this.xyAdZoneDragDistanceAllowed || 25,
268
- adZoneData: adZones[adZoneId],
269
- onAddToListTriggered: items => {
270
- (0, _util.safeInvoke)(this.onAddToListTriggered, items);
271
- },
272
- isAdZoneVisible: true,
273
- offScreenAdZone: false
274
- })
275
- });
276
- }
249
+ adZoneInfoList.push({
250
+ zoneId: adZones[adZoneId].id,
251
+ adZone: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AdZone.AdZone, {
252
+ appId: this.appId,
253
+ sessionId: this.sessionId,
254
+ udid: this.deviceInfo.udid,
255
+ deviceOs: this.deviceOs,
256
+ apiEnv: this.apiEnv,
257
+ xyDragDistanceAllowed: this.xyAdZoneDragDistanceAllowed || 25,
258
+ adZoneData: adZones[adZoneId],
259
+ onAddToListTriggered: details => {
260
+ (0, _util.safeInvoke)(this.onAddToListTriggered, {
261
+ zoneId: adZoneId,
262
+ items: details
263
+ });
264
+ },
265
+ isAdZoneVisible: true,
266
+ offScreenAdZone: false
267
+ }, adZoneId)
277
268
  });
278
269
  }
279
270
  }
@@ -289,28 +280,28 @@ class AdadaptedReactNativeSdk {
289
280
  const adZoneInfoList = [];
290
281
  for (const adZoneId in adZones) {
291
282
  if (Object.prototype.hasOwnProperty.call(adZones, adZoneId)) {
292
- this.offScreenAdZone?.forEach(zone => {
293
- if (Number(adZones[adZoneId].id) === zone) {
294
- adZoneInfoList.push({
295
- zoneId: adZones[adZoneId].id,
296
- adZone: /*#__PURE__*/React.createElement(_AdZone.AdZone, {
297
- key: adZoneId,
298
- appId: this.appId,
299
- sessionId: this.sessionId,
300
- udid: this.deviceInfo.udid,
301
- deviceOs: this.deviceOs,
302
- apiEnv: this.apiEnv,
303
- xyDragDistanceAllowed: this.xyAdZoneDragDistanceAllowed || 25,
304
- adZoneData: adZones[adZoneId],
305
- onAddToListTriggered: items => {
306
- (0, _util.safeInvoke)(this.onAddToListTriggered, items);
307
- },
308
- isAdZoneVisible: this.isAdZoneVisible,
309
- offScreenAdZone: true
310
- })
311
- });
312
- }
313
- });
283
+ if (this.offScreenAdZone && this.offScreenAdZone.length > 0 && this.offScreenAdZone.includes(Number(adZoneId))) {
284
+ adZoneInfoList.push({
285
+ zoneId: adZones[adZoneId].id,
286
+ adZone: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AdZone.AdZone, {
287
+ appId: this.appId,
288
+ sessionId: this.sessionId,
289
+ udid: this.deviceInfo.udid,
290
+ deviceOs: this.deviceOs,
291
+ apiEnv: this.apiEnv,
292
+ xyDragDistanceAllowed: this.xyAdZoneDragDistanceAllowed || 25,
293
+ adZoneData: adZones[adZoneId],
294
+ onAddToListTriggered: items => {
295
+ (0, _util.safeInvoke)(this.onAddToListTriggered, {
296
+ zoneId: adZoneId,
297
+ items
298
+ });
299
+ },
300
+ isAdZoneVisible: false,
301
+ offScreenAdZone: true
302
+ }, adZoneId)
303
+ });
304
+ }
314
305
  }
315
306
  }
316
307
  return adZoneInfoList;
@@ -504,7 +495,6 @@ class AdadaptedReactNativeSdk {
504
495
  * @param isVisible - Ad Zone visibility tracking.
505
496
  */
506
497
  onAdZoneVisibilityChanged(isVisible) {
507
- this.isAdZoneVisible = isVisible;
508
498
  _reactNative.DeviceEventEmitter.emit("visibility-event", isVisible);
509
499
  }
510
500
 
@@ -661,8 +651,10 @@ class AdadaptedReactNativeSdk {
661
651
  const finalResultListStartsWith = [];
662
652
  const finalResultListContains = [];
663
653
  this.keywordInterceptSearchValue = searchTerm;
664
- if (!this.deviceInfo || !this.sessionId) {
665
- console.error("AdAdapted SDK has not been initialized.");
654
+ if (!this.deviceInfo) {
655
+ console.error("AdAdapted SDK has not been initialized with device info.");
656
+ } else if (!this.sessionId) {
657
+ console.error("AdAdapted SDK has not been initialized with session id.");
666
658
  } else if (!this.keywordIntercepts) {
667
659
  console.error("No available keyword intercepts.");
668
660
  } else if (searchTerm && searchTerm.trim() && searchTerm.trim().length >= this.keywordIntercepts.min_match_length) {
@@ -733,8 +725,10 @@ class AdadaptedReactNativeSdk {
733
725
  */
734
726
  reportKeywordInterceptTermSelected(termId) {
735
727
  const termObj = this.getKeywordInterceptTerm(termId);
736
- if (!this.deviceInfo || !this.sessionId) {
737
- console.error("AdAdapted SDK has not been initialized.");
728
+ if (!this.deviceInfo) {
729
+ console.error("AdAdapted SDK has not been initialized with device info.");
730
+ } else if (!this.sessionId) {
731
+ console.error("AdAdapted SDK has not been initialized with session id.");
738
732
  } else if (!this.keywordIntercepts) {
739
733
  console.error("No available keyword intercepts.");
740
734
  } else if (!termId || !termObj) {
@@ -775,8 +769,10 @@ class AdadaptedReactNativeSdk {
775
769
  termObjs.push(termObj);
776
770
  }
777
771
  }
778
- if (!this.deviceInfo || !this.sessionId) {
779
- console.error("AdAdapted SDK has not been initialized.");
772
+ if (!this.deviceInfo) {
773
+ console.error("AdAdapted SDK has not been initialized with device info.");
774
+ } else if (!this.sessionId) {
775
+ console.error("AdAdapted SDK has not been initialized with session id.");
780
776
  } else if (!this.keywordIntercepts) {
781
777
  console.error("No available keyword intercepts.");
782
778
  } else if (!termIds || termIds.length === 0 || termObjs.length === 0) {