@thealteroffice/react-native-adgeist 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/adgeist/AdgeistPackage.kt +15 -7
  3. package/android/src/main/java/com/adgeist/implementation/AdgeistModuleImpl.kt +37 -28
  4. package/android/src/newarch/java/com/AdgeistModule.kt +4 -4
  5. package/android/src/oldarch/java/com/AdgeistModule.kt +4 -4
  6. package/lib/module/NativeAdgeist.js.map +1 -1
  7. package/lib/module/components/AdgeistProvider.js +29 -0
  8. package/lib/module/components/AdgeistProvider.js.map +1 -0
  9. package/lib/module/components/BannerAd.js +68 -108
  10. package/lib/module/components/BannerAd.js.map +1 -1
  11. package/lib/module/index.js +1 -1
  12. package/lib/module/index.js.map +1 -1
  13. package/lib/typescript/src/NativeAdgeist.d.ts +2 -2
  14. package/lib/typescript/src/NativeAdgeist.d.ts.map +1 -1
  15. package/lib/typescript/src/components/AdgeistProvider.d.ts +18 -0
  16. package/lib/typescript/src/components/AdgeistProvider.d.ts.map +1 -0
  17. package/lib/typescript/src/components/BannerAd.d.ts +0 -1
  18. package/lib/typescript/src/components/BannerAd.d.ts.map +1 -1
  19. package/lib/typescript/src/index.d.ts +1 -1
  20. package/lib/typescript/src/index.d.ts.map +1 -1
  21. package/package.json +1 -1
  22. package/src/NativeAdgeist.ts +12 -2
  23. package/src/components/AdgeistProvider.tsx +41 -0
  24. package/src/components/BannerAd.tsx +105 -108
  25. package/src/index.tsx +1 -1
  26. package/lib/module/components/BottomBannerAd.js +0 -150
  27. package/lib/module/components/BottomBannerAd.js.map +0 -1
  28. package/lib/typescript/src/components/BottomBannerAd.d.ts +0 -8
  29. package/lib/typescript/src/components/BottomBannerAd.d.ts.map +0 -1
  30. package/src/components/BottomBannerAd.tsx +0 -185
@@ -101,7 +101,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
101
101
 
102
102
  dependencies {
103
103
  implementation "com.facebook.react:react-android"
104
- implementation "ai.adgeist:adgeistkit:0.0.1"
104
+ implementation "ai.adgeist:adgeistkit:0.0.4"
105
105
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
106
106
  }
107
107
 
@@ -1,14 +1,18 @@
1
1
  package com.adgeist
2
2
 
3
- import com.facebook.react.BaseReactPackage
3
+ import androidx.annotation.Nullable
4
+ import com.facebook.react.TurboReactPackage
4
5
  import com.facebook.react.bridge.NativeModule
5
6
  import com.facebook.react.bridge.ReactApplicationContext
6
7
  import com.facebook.react.module.model.ReactModuleInfo
7
8
  import com.facebook.react.module.model.ReactModuleInfoProvider
9
+ import com.facebook.react.uimanager.ViewManager
8
10
  import com.adgeist.implementation.AdgeistModuleImpl
9
11
  import java.util.HashMap
10
12
 
11
- class AdgeistPackage : BaseReactPackage() {
13
+ class AdgeistPackage : TurboReactPackage() {
14
+
15
+ @Nullable
12
16
  override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
13
17
  return if (name == AdgeistModuleImpl.NAME) {
14
18
  AdgeistModule(reactContext)
@@ -19,16 +23,20 @@ class AdgeistPackage : BaseReactPackage() {
19
23
 
20
24
  override fun getReactModuleInfoProvider(): ReactModuleInfoProvider {
21
25
  return ReactModuleInfoProvider {
22
- val moduleInfos: MutableMap<String, ReactModuleInfo> = HashMap()
26
+ val moduleInfos = HashMap<String, ReactModuleInfo>()
23
27
  moduleInfos[AdgeistModuleImpl.NAME] = ReactModuleInfo(
24
28
  AdgeistModuleImpl.NAME,
25
29
  AdgeistModuleImpl.NAME,
26
- false, // canOverrideExistingModule
27
- false, // needsEagerInit
28
- false, // isCxxModule
29
- true // isTurboModule
30
+ false, // canOverrideExistingModule
31
+ false, // needsEagerInit
32
+ false, // isCxxModule
33
+ true // isTurboModule (set to true if TurboModule is supported)
30
34
  )
31
35
  moduleInfos
32
36
  }
33
37
  }
38
+
39
+ override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
40
+ return emptyList() // Add your ViewManagers here if any
41
+ }
34
42
  }
@@ -6,9 +6,11 @@ import com.facebook.react.bridge.Arguments
6
6
  import com.facebook.react.bridge.WritableMap
7
7
  import com.adgeistkit.AdgeistCore
8
8
  import com.adgeistkit.CreativeDataModel
9
- import com.adgeistkit.Campaign
10
- import com.adgeistkit.Creative
11
- import com.adgeistkit.BudgetSettings
9
+ import com.adgeistkit.BidResponseData
10
+ import com.adgeistkit.SeatBid
11
+ import com.adgeistkit.Bid
12
+ import com.adgeistkit.BidExtension
13
+
12
14
 
13
15
  class AdgeistModuleImpl internal constructor(private val context: ReactApplicationContext) {
14
16
 
@@ -16,8 +18,8 @@ class AdgeistModuleImpl internal constructor(private val context: ReactApplicati
16
18
  private val getAd = adgeistInstanceFromLibrary.getCreative()
17
19
  private val postCreativeAnalytic = adgeistInstanceFromLibrary.postCreativeAnalytics()
18
20
 
19
- fun fetchCreative(adSpaceId: String, publisherId: String, promise: Promise) {
20
- getAd.fetchCreative(adSpaceId, publisherId) { adData ->
21
+ fun fetchCreative(apiKey: String, origin: String, adSpaceId: String, publisherId: String, isTestEnvironment: Boolean, promise: Promise) {
22
+ getAd.fetchCreative(apiKey, origin, adSpaceId, publisherId, isTestEnvironment) { adData ->
21
23
  if (adData != null) {
22
24
  promise.resolve(adData.toWritableMap())
23
25
  } else {
@@ -26,8 +28,8 @@ class AdgeistModuleImpl internal constructor(private val context: ReactApplicati
26
28
  }
27
29
  }
28
30
 
29
- fun sendCreativeAnalytic(campaignId: String, adSpaceId: String, publisherId: String, eventType: String, promise: Promise) {
30
- postCreativeAnalytic.sendTrackingData(campaignId, adSpaceId, publisherId, eventType) { adData ->
31
+ fun sendCreativeAnalytic(campaignId: String, adSpaceId: String, publisherId: String, eventType: String, origin: String, apiKey: String, bidId: String, isTestEnvironment: Boolean = true, promise: Promise) {
32
+ postCreativeAnalytic.sendTrackingData(campaignId, adSpaceId, publisherId, eventType, origin, apiKey, bidId, isTestEnvironment) { adData ->
31
33
  if (adData != null) {
32
34
  promise.resolve(adData)
33
35
  } else {
@@ -42,36 +44,43 @@ class AdgeistModuleImpl internal constructor(private val context: ReactApplicati
42
44
  }
43
45
  }
44
46
 
45
- // Extension function to convert CreativeData to WritableMap
47
+ // Extension function to convert CreativeDataModel to WritableMap
46
48
  fun CreativeDataModel.toWritableMap(): WritableMap {
47
49
  val map = Arguments.createMap()
48
50
  map.putBoolean("success", success)
49
51
  map.putString("message", message)
50
52
 
51
53
  val dataMap = Arguments.createMap()
52
- data?.let { campaign ->
53
- dataMap.putString("_id", campaign._id)
54
- dataMap.putString("name", campaign.name)
54
+ data?.let { bidResponse ->
55
+ dataMap.putString("id", bidResponse.id)
56
+ dataMap.putString("bidId", bidResponse.bidId)
57
+ dataMap.putString("cur", bidResponse.cur)
55
58
 
56
- val creativeMap = Arguments.createMap()
57
- campaign.creative?.let { creative ->
58
- creativeMap.putString("title", creative.title)
59
- creativeMap.putString("description", creative.description)
60
- creativeMap.putString("fileUrl", creative.fileUrl)
61
- creativeMap.putString("ctaUrl", creative.ctaUrl)
62
- creativeMap.putString("type", creative.type)
63
- creativeMap.putString("fileName", creative.fileName)
64
- creativeMap.putString("createdAt", creative.createdAt)
65
- creativeMap.putString("updatedAt", creative.updatedAt)
66
- }
67
- dataMap.putMap("creative", creativeMap)
59
+ val seatBidArray = Arguments.createArray()
60
+ bidResponse.seatBid.forEach { seatBid ->
61
+ val seatBidMap = Arguments.createMap()
62
+ seatBidMap.putString("bidId", seatBid.bidId)
63
+
64
+ val bidArray = Arguments.createArray()
65
+ seatBid.bid.forEach { bid ->
66
+ val bidMap = Arguments.createMap()
67
+ bidMap.putString("id", bid.id)
68
+ bidMap.putString("impId", bid.impId)
69
+ bidMap.putDouble("price", bid.price)
68
70
 
69
- val budgetMap = Arguments.createMap()
70
- campaign.budgetSettings?.let { budget ->
71
- budgetMap.putDouble("totalBudget", budget.totalBudget)
72
- budgetMap.putDouble("spentBudget", budget.spentBudget)
71
+ val extMap = Arguments.createMap()
72
+ extMap.putString("creativeUrl", bid.ext.creativeUrl)
73
+ extMap.putString("ctaUrl", bid.ext.ctaUrl)
74
+ extMap.putString("creativeTitle", bid.ext.creativeTitle)
75
+ extMap.putString("creativeDescription", bid.ext.creativeDescription)
76
+ bidMap.putMap("ext", extMap)
77
+
78
+ bidArray.pushMap(bidMap)
79
+ }
80
+ seatBidMap.putArray("bid", bidArray)
81
+ seatBidArray.pushMap(seatBidMap)
73
82
  }
74
- dataMap.putMap("budgetSettings", budgetMap)
83
+ dataMap.putArray("seatBid", seatBidArray)
75
84
  }
76
85
 
77
86
  map.putMap("data", dataMap)
@@ -11,12 +11,12 @@ class AdgeistModule internal constructor(reactContext: ReactApplicationContext)
11
11
 
12
12
  override fun getName(): String = AdgeistModuleImpl.NAME
13
13
 
14
- override fun fetchCreative(adSpaceId: String, publisherId: String, promise: Promise) {
15
- implementation.fetchCreative(adSpaceId, publisherId, promise)
14
+ override fun fetchCreative(apiKey: String, origin: String, adSpaceId: String, publisherId: String, isTestEnvironment: Boolean, promise: Promise) {
15
+ implementation.fetchCreative(apiKey, origin, adSpaceId, publisherId, isTestEnvironment, promise)
16
16
  }
17
17
 
18
- override fun sendCreativeAnalytic(campaignId: String, adSpaceId: String, publisherId: String, eventType: String, promise: Promise) {
19
- implementation.sendCreativeAnalytic(campaignId, adSpaceId, publisherId, eventType, promise)
18
+ override fun sendCreativeAnalytic(campaignId: String, adSpaceId: String, publisherId: String, eventType: String, origin: String, apiKey: String, bidId: String, isTestEnvironment: Boolean , promise: Promise) {
19
+ implementation.sendCreativeAnalytic(campaignId, adSpaceId, publisherId, eventType, origin, apiKey, bidId, isTestEnvironment, promise)
20
20
  }
21
21
 
22
22
  }
@@ -14,13 +14,13 @@ class AdgeistModule internal constructor(reactContext: ReactApplicationContext)
14
14
  override fun getName(): String = AdgeistModuleImpl.NAME
15
15
 
16
16
  @ReactMethod
17
- fun fetchCreative(adSpaceId: String, publisherId: String, promise: Promise) {
18
- implementation.fetchCreative(adSpaceId, publisherId, promise)
17
+ fun fetchCreative(apiKey: String, origin: String, adSpaceId: String, publisherId: String, isTestEnvironment: Boolean, promise: Promise) {
18
+ implementation.fetchCreative(apiKey, origin, adSpaceId, publisherId, isTestEnvironment, promise)
19
19
  }
20
20
 
21
21
  @ReactMethod
22
- fun sendCreativeAnalytic(campaignId: String, adSpaceId: String, publisherId: String, eventType: String, promise: Promise) {
23
- implementation.sendCreativeAnalytic(campaignId, adSpaceId, publisherId, eventType, promise)
22
+ fun sendCreativeAnalytic(campaignId: String, adSpaceId: String, publisherId: String, eventType: String, origin: String, apiKey: String, bidId: String, isTestEnvironment: Boolean , promise: Promise) {
23
+ implementation.sendCreativeAnalytic(campaignId, adSpaceId, publisherId, eventType, origin, apiKey, bidId, isTestEnvironment, promise)
24
24
  }
25
25
 
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeAdgeist.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAYlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,SAAS,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeAdgeist.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAsBlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,SAAS,CAAC","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ import React, { createContext, useContext } from 'react';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ const AdgeistContext = /*#__PURE__*/createContext({
6
+ publisherId: '',
7
+ apiKey: '',
8
+ domain: '',
9
+ isTestEnvironment: true
10
+ });
11
+ export const AdgeistProvider = ({
12
+ children,
13
+ publisherId = '',
14
+ apiKey = '',
15
+ domain = '',
16
+ isTestEnvironment = true
17
+ }) => {
18
+ return /*#__PURE__*/_jsx(AdgeistContext.Provider, {
19
+ value: {
20
+ publisherId,
21
+ apiKey,
22
+ domain,
23
+ isTestEnvironment
24
+ },
25
+ children: children
26
+ });
27
+ };
28
+ export const useAdgeistContext = () => useContext(AdgeistContext);
29
+ //# sourceMappingURL=AdgeistProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","createContext","useContext","jsx","_jsx","AdgeistContext","publisherId","apiKey","domain","isTestEnvironment","AdgeistProvider","children","Provider","value","useAdgeistContext"],"sourceRoot":"../../../src","sources":["components/AdgeistProvider.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAiBzD,MAAMC,cAAc,gBAAGJ,aAAa,CAAqB;EACvDK,WAAW,EAAE,EAAE;EACfC,MAAM,EAAE,EAAE;EACVC,MAAM,EAAE,EAAE;EACVC,iBAAiB,EAAE;AACrB,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAmD,GAAGA,CAAC;EAClEC,QAAQ;EACRL,WAAW,GAAG,EAAE;EAChBC,MAAM,GAAG,EAAE;EACXC,MAAM,GAAG,EAAE;EACXC,iBAAiB,GAAG;AACtB,CAAC,KAAK;EACJ,oBACEL,IAAA,CAACC,cAAc,CAACO,QAAQ;IACtBC,KAAK,EAAE;MAAEP,WAAW;MAAEC,MAAM;MAAEC,MAAM;MAAEC;IAAkB,CAAE;IAAAE,QAAA,EAEzDA;EAAQ,CACc,CAAC;AAE9B,CAAC;AAED,OAAO,MAAMG,iBAAiB,GAAGA,CAAA,KAAMZ,UAAU,CAACG,cAAc,CAAC","ignoreList":[]}
@@ -3,91 +3,84 @@
3
3
  import React, { useEffect, useState } from 'react';
4
4
  import { Dimensions, Image, Linking, StyleSheet, Text, View, TouchableWithoutFeedback } from 'react-native';
5
5
  import Adgeist from "../NativeAdgeist.js";
6
+ import { useAdgeistContext } from "./AdgeistProvider.js";
6
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
8
  export const BannerAd = ({
8
- dataPublisherId,
9
- dataAdSlot,
10
- width,
11
- height
9
+ dataAdSlot
12
10
  }) => {
13
11
  const [adData, setAdData] = useState(null);
12
+ const {
13
+ publisherId,
14
+ apiKey,
15
+ domain,
16
+ isTestEnvironment
17
+ } = useAdgeistContext();
18
+ const creativeData = adData?.seatBid?.[0]?.bid?.[0]?.ext;
14
19
  useEffect(() => {
15
20
  (async () => {
16
21
  try {
17
- const response = await Adgeist.fetchCreative(dataAdSlot, dataPublisherId);
22
+ const response = await Adgeist.fetchCreative(apiKey, domain, dataAdSlot, publisherId, isTestEnvironment);
18
23
  const creative = response;
19
24
  setAdData(creative.data);
20
- await Adgeist.sendCreativeAnalytic(creative.data._id, dataAdSlot, dataPublisherId, 'impression');
25
+ if (creative.data.seatBid.length > 0) {
26
+ await Adgeist.sendCreativeAnalytic(creative.data.seatBid?.[0]?.bid?.[0]?.id || '', dataAdSlot, publisherId, 'IMPRESSION', domain, apiKey, creative.data.id, isTestEnvironment);
27
+ }
21
28
  } catch (error) {
22
29
  console.error('Ad load failed:', error);
23
30
  }
24
31
  })();
25
- }, [dataPublisherId, dataAdSlot]);
32
+ }, [publisherId, dataAdSlot, apiKey, domain, isTestEnvironment]);
26
33
  const handleClick = async () => {
27
- if (adData?.creative?.ctaUrl) {
28
- await Adgeist.sendCreativeAnalytic(adData._id, dataAdSlot, dataPublisherId, 'click');
29
- Linking.openURL(adData.creative.ctaUrl).catch(err => console.error('Failed to open URL:', err));
34
+ if (adData && adData?.seatBid.length > 0) {
35
+ await Adgeist.sendCreativeAnalytic(adData?.seatBid?.[0]?.bid?.[0]?.id || '', dataAdSlot, publisherId, 'CLICK', domain, apiKey, adData.id, isTestEnvironment);
36
+ Linking.openURL(creativeData.ctaUrl).catch(err => console.error('Failed to open URL:', err));
30
37
  }
31
38
  };
32
- if (!adData?.creative?.fileUrl) return null;
39
+ if (!creativeData?.creativeUrl) return null;
33
40
  return /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
34
41
  accessible: true,
35
42
  accessibilityLabel: "Ad Banner",
36
43
  children: /*#__PURE__*/_jsxs(View, {
37
- style: styles.container,
44
+ style: styles.adContainer,
38
45
  children: [/*#__PURE__*/_jsx(Image, {
39
46
  style: [styles.creative, {
40
- width,
41
- height
47
+ width: '100%',
48
+ height: 300
42
49
  }],
43
50
  source: {
44
- uri: adData.creative.fileUrl
51
+ uri: creativeData.creativeUrl
45
52
  }
46
- }), /*#__PURE__*/_jsxs(View, {
47
- style: styles.options,
48
- children: [/*#__PURE__*/_jsx(Text, {
49
- style: styles.option,
50
- children: "x"
51
- }), /*#__PURE__*/_jsx(Text, {
52
- style: styles.option,
53
- children: "i"
54
- })]
55
53
  }), /*#__PURE__*/_jsxs(View, {
56
54
  style: styles.adContent,
57
- children: [/*#__PURE__*/_jsx(Image, {
58
- style: styles.logo,
59
- source: {
60
- uri: adData.creative.fileUrl
61
- }
62
- }), /*#__PURE__*/_jsxs(View, {
63
- style: styles.textContainer,
64
- children: [/*#__PURE__*/_jsxs(View, {
65
- style: styles.titleRow,
66
- children: [/*#__PURE__*/_jsx(Text, {
67
- style: styles.adBadge,
68
- children: "AD"
69
- }), /*#__PURE__*/_jsx(Text, {
70
- style: styles.title,
71
- numberOfLines: 1,
72
- ellipsizeMode: "tail",
73
- children: adData.creative.title
74
- })]
55
+ children: [/*#__PURE__*/_jsxs(View, {
56
+ style: styles.contentContainer,
57
+ children: [/*#__PURE__*/_jsx(Text, {
58
+ style: styles.title,
59
+ numberOfLines: 1,
60
+ ellipsizeMode: "tail",
61
+ children: creativeData.creativeTitle
75
62
  }), /*#__PURE__*/_jsx(Text, {
76
63
  style: styles.description,
77
64
  numberOfLines: 1,
78
65
  ellipsizeMode: "tail",
79
- children: adData.creative.description
66
+ children: creativeData.creativeDescription
67
+ }), /*#__PURE__*/_jsx(Text, {
68
+ style: styles.brandName,
69
+ numberOfLines: 1,
70
+ ellipsizeMode: "tail",
71
+ children: creativeData?.creativeBrandName || 'Brand Name'
80
72
  })]
81
73
  }), /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
82
- onPress: handleClick,
74
+ onPress: () => {
75
+ handleClick();
76
+ },
83
77
  accessible: true,
84
78
  accessibilityLabel: "Visit Site Button",
85
- children: /*#__PURE__*/_jsx(View, {
86
- style: styles.button,
87
- children: /*#__PURE__*/_jsx(Text, {
88
- style: styles.buttonText,
89
- children: "Visit Site"
90
- })
79
+ children: /*#__PURE__*/_jsx(Image, {
80
+ style: [styles.linkButton],
81
+ source: {
82
+ uri: 'https://d2cfeg6k9cklz9.cloudfront.net/onboarding-icons/Button.png'
83
+ }
91
84
  })
92
85
  })]
93
86
  })]
@@ -95,82 +88,49 @@ export const BannerAd = ({
95
88
  });
96
89
  };
97
90
  const styles = StyleSheet.create({
98
- container: {
91
+ adContainer: {
92
+ width: Dimensions.get('window').width,
99
93
  backgroundColor: 'white',
100
- borderRadius: 10
94
+ borderRadius: 5
101
95
  },
102
96
  creative: {
103
- resizeMode: 'contain',
104
- borderTopLeftRadius: 10,
105
- borderTopRightRadius: 10
106
- },
107
- options: {
108
- flexDirection: 'row',
109
- gap: 2,
110
- position: 'absolute',
111
- top: 5,
112
- left: 5
113
- },
114
- option: {
115
- color: 'green',
116
- backgroundColor: '#00000022',
117
- width: 20,
118
- height: 20,
119
- textAlign: 'center'
97
+ resizeMode: 'cover',
98
+ borderTopLeftRadius: 5,
99
+ borderTopRightRadius: 5
120
100
  },
121
101
  adContent: {
122
102
  width: '100%',
123
103
  backgroundColor: 'white',
124
104
  flexDirection: 'row',
125
105
  justifyContent: 'space-between',
126
- paddingHorizontal: 10,
127
106
  paddingVertical: 10,
107
+ paddingHorizontal: 20,
128
108
  alignItems: 'center',
129
- borderBottomLeftRadius: 10,
130
- borderBottomRightRadius: 10,
131
- borderTopColor: '#00000022',
132
- borderTopWidth: 1
109
+ borderBottomLeftRadius: 5,
110
+ borderBottomRightRadius: 5
133
111
  },
134
- logo: {
135
- width: 35,
136
- height: 35,
137
- resizeMode: 'contain',
138
- borderRadius: 2
139
- },
140
- textContainer: {
141
- width: Dimensions.get('window').width - 150
142
- },
143
- titleRow: {
144
- flexDirection: 'row',
145
- alignItems: 'center',
146
- gap: 5,
147
- width: Dimensions.get('window').width - 200
148
- },
149
- adBadge: {
150
- color: 'white',
151
- backgroundColor: 'green',
152
- width: 40,
153
- borderRadius: 4,
154
- textAlign: 'center'
112
+ contentContainer: {
113
+ width: Dimensions.get('window').width - 100
155
114
  },
156
115
  title: {
157
- color: 'black'
116
+ color: 'black',
117
+ fontSize: 18,
118
+ fontWeight: 'bold'
158
119
  },
159
120
  description: {
160
- color: 'black'
121
+ color: 'black',
122
+ fontSize: 16
161
123
  },
162
- button: {
163
- paddingHorizontal: 10,
164
- paddingVertical: 5,
165
- borderWidth: 1,
166
- borderColor: 'green',
167
- borderRadius: 5,
168
- alignItems: 'center',
169
- justifyContent: 'center',
170
- height: 40
124
+ brandName: {
125
+ color: 'black',
126
+ fontSize: 16,
127
+ opacity: 0.6,
128
+ marginTop: 5,
129
+ fontWeight: 'semibold'
171
130
  },
172
- buttonText: {
173
- color: 'green'
131
+ linkButton: {
132
+ width: 40,
133
+ height: 40
174
134
  }
175
135
  });
176
136
  //# sourceMappingURL=BannerAd.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useState","Dimensions","Image","Linking","StyleSheet","Text","View","TouchableWithoutFeedback","Adgeist","jsx","_jsx","jsxs","_jsxs","BannerAd","dataPublisherId","dataAdSlot","width","height","adData","setAdData","response","fetchCreative","creative","data","sendCreativeAnalytic","_id","error","console","handleClick","ctaUrl","openURL","catch","err","fileUrl","accessible","accessibilityLabel","children","style","styles","container","source","uri","options","option","adContent","logo","textContainer","titleRow","adBadge","title","numberOfLines","ellipsizeMode","description","onPress","button","buttonText","create","backgroundColor","borderRadius","resizeMode","borderTopLeftRadius","borderTopRightRadius","flexDirection","gap","position","top","left","color","textAlign","justifyContent","paddingHorizontal","paddingVertical","alignItems","borderBottomLeftRadius","borderBottomRightRadius","borderTopColor","borderTopWidth","get","borderWidth","borderColor"],"sourceRoot":"../../../src","sources":["components/BannerAd.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,wBAAwB,QACnB,cAAc;AACrB,OAAOC,OAAO,MAAM,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAqBvC,OAAO,MAAMC,QAAiC,GAAGA,CAAC;EAChDC,eAAe;EACfC,UAAU;EACVC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGnB,QAAQ,CAAgB,IAAI,CAAC;EAEzDD,SAAS,CAAC,MAAM;IACd,CAAC,YAAY;MACX,IAAI;QACF,MAAMqB,QAAgB,GAAG,MAAMZ,OAAO,CAACa,aAAa,CAClDN,UAAU,EACVD,eACF,CAAC;QACD,MAAMQ,QAA0B,GAAGF,QAA4B;QAC/DD,SAAS,CAACG,QAAQ,CAACC,IAAI,CAAC;QAExB,MAAMf,OAAO,CAACgB,oBAAoB,CAChCF,QAAQ,CAACC,IAAI,CAACE,GAAG,EACjBV,UAAU,EACVD,eAAe,EACf,YACF,CAAC;MACH,CAAC,CAAC,OAAOY,KAAK,EAAE;QACdC,OAAO,CAACD,KAAK,CAAC,iBAAiB,EAAEA,KAAK,CAAC;MACzC;IACF,CAAC,EAAE,CAAC;EACN,CAAC,EAAE,CAACZ,eAAe,EAAEC,UAAU,CAAC,CAAC;EAEjC,MAAMa,WAAW,GAAG,MAAAA,CAAA,KAAY;IAC9B,IAAIV,MAAM,EAAEI,QAAQ,EAAEO,MAAM,EAAE;MAC5B,MAAMrB,OAAO,CAACgB,oBAAoB,CAChCN,MAAM,CAACO,GAAG,E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DnB,KAAK,EAAE;IACLkB,KAAK,EAAE;EACT,CAAC;EACDf,WAAW,EAAE;IACXe,KAAK,EAAE;EACT,CAAC;EACDb,MAAM,EAAE;IACNgB,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBO,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,OAAO;IACpBrB,YAAY,EAAE,CAAC;IACfc,UAAU,EAAE,QAAQ;IACpBH,cAAc,EAAE,QAAQ;IACxBpD,MAAM,EAAE;EACV,CAAC;EACDsC,UAAU,EAAE;IACVY,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useState","Dimensions","Image","Linking","StyleSheet","Text","View","TouchableWithoutFeedback","Adgeist","useAdgeistContext","jsx","_jsx","jsxs","_jsxs","BannerAd","dataAdSlot","adData","setAdData","publisherId","apiKey","domain","isTestEnvironment","creativeData","seatBid","bid","ext","response","fetchCreative","creative","data","length","sendCreativeAnalytic","id","error","console","handleClick","openURL","ctaUrl","catch","err","creativeUrl","accessible","accessibilityLabel","children","style","styles","adContainer","width","height","source","uri","adContent","contentContainer","title","numberOfLines","ellipsizeMode","creativeTitle","description","creativeDescription","brandName","creativeBrandName","onPress","linkButton","create","get","backgroundColor","borderRadius","resizeMode","borderTopLeftRadius","borderTopRightRadius","flexDirection","justifyContent","paddingVertical","paddingHorizontal","alignItems","borderBottomLeftRadius","borderBottomRightRadius","color","fontSize","fontWeight","opacity","marginTop"],"sourceRoot":"../../../src","sources":["components/BannerAd.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,wBAAwB,QACnB,cAAc;AACrB,OAAOC,OAAO,MAAM,qBAAkB;AACtC,SAASC,iBAAiB,QAAQ,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,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AC/BC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE,QAAQ;IACpBC,sBAAsB,EAAE,CAAC;IACzBC,uBAAuB,EAAE;EAC3B,CAAC;EACDxB,gBAAgB,EAAE;IAChBL,KAAK,EAAE9C,UAAU,CAAC+D,GAAG,CAAC,QAAQ,CAAC,CAACjB,KAAK,GAAG;EAC1C,CAAC;EACDM,KAAK,EAAE;IACLwB,KAAK,EAAE,OAAO;IACdC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDtB,WAAW,EAAE;IACXoB,KAAK,EAAE,OAAO;IACdC,QAAQ,EAAE;EACZ,CAAC;EACDnB,SAAS,EAAE;IACTkB,KAAK,EAAE,OAAO;IACdC,QAAQ,EAAE,EAAE;IACZE,OAAO,EAAE,GAAG;IACZC,SAAS,EAAE,CAAC;IACZF,UAAU,EAAE;EACd,CAAC;EACDjB,UAAU,EAAE;IACVf,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  export * from "./components/BannerAd.js";
4
- export * from "./components/BottomBannerAd.js";
4
+ export * from "./components/AdgeistProvider.js";
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,cAAc,0BAAuB;AACrC,cAAc,gCAA6B","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,cAAc,0BAAuB;AACrC,cAAc,iCAA8B","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import type { TurboModule } from 'react-native';
2
2
  export interface Spec extends TurboModule {
3
- fetchCreative(adSpaceId: string, publisherId: string): Promise<Object>;
4
- sendCreativeAnalytic(campaignId: string, adSpaceId: string, publisherId: string, eventType: string): Promise<Object>;
3
+ fetchCreative(apiKey: string, origin: string, adSpaceId: string, publisherId: string, isTestEnvironment: boolean): Promise<Object>;
4
+ sendCreativeAnalytic(campaignId: string, adSpaceId: string, publisherId: string, eventType: string, origin: string, apiKey: string, bidId: string, isTestEnvironment: boolean): Promise<Object>;
5
5
  }
6
6
  declare const _default: Spec;
7
7
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeAdgeist.d.ts","sourceRoot":"","sources":["../../../src/NativeAdgeist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvE,oBAAoB,CAClB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAAC;CACpB;;AAED,wBAAiE"}
1
+ {"version":3,"file":"NativeAdgeist.d.ts","sourceRoot":"","sources":["../../../src/NativeAdgeist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,aAAa,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,OAAO,GACzB,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,oBAAoB,CAClB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,iBAAiB,EAAE,OAAO,GACzB,OAAO,CAAC,MAAM,CAAC,CAAC;CACpB;;AAED,wBAAiE"}
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ interface AdgeistContextType {
3
+ publisherId: string;
4
+ apiKey: string;
5
+ domain: string;
6
+ isTestEnvironment: boolean;
7
+ }
8
+ interface AdgeistProviderPropsType {
9
+ children: React.ReactNode;
10
+ publisherId: string;
11
+ apiKey: string;
12
+ domain: string;
13
+ isTestEnvironment: boolean;
14
+ }
15
+ export declare const AdgeistProvider: React.FC<AdgeistProviderPropsType>;
16
+ export declare const useAdgeistContext: () => AdgeistContextType;
17
+ export {};
18
+ //# sourceMappingURL=AdgeistProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdgeistProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/AdgeistProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,UAAU,kBAAkB;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,UAAU,wBAAwB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AASD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAc9D,CAAC;AAEF,eAAO,MAAM,iBAAiB,0BAAmC,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  interface AdBannerTypes {
3
- dataPublisherId: string;
4
3
  dataAdSlot: string;
5
4
  width: number;
6
5
  height: number;
@@ -1 +1 @@
1
- {"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../../src/components/BannerAd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAwBnD,UAAU,aAAa;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0F5C,CAAC"}
1
+ {"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../../src/components/BannerAd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAuCnD,UAAU,aAAa;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0G5C,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export * from './components/BannerAd';
2
- export * from './components/BottomBannerAd';
2
+ export * from './components/AdgeistProvider';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thealteroffice/react-native-adgeist",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Publishers can integrate our SDK to connect their ad spaces to the AdGeist marketplace.",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -2,12 +2,22 @@ import type { TurboModule } from 'react-native';
2
2
  import { TurboModuleRegistry } from 'react-native';
3
3
 
4
4
  export interface Spec extends TurboModule {
5
- fetchCreative(adSpaceId: string, publisherId: string): Promise<Object>;
5
+ fetchCreative(
6
+ apiKey: string,
7
+ origin: string,
8
+ adSpaceId: string,
9
+ publisherId: string,
10
+ isTestEnvironment: boolean
11
+ ): Promise<Object>;
6
12
  sendCreativeAnalytic(
7
13
  campaignId: string,
8
14
  adSpaceId: string,
9
15
  publisherId: string,
10
- eventType: string
16
+ eventType: string,
17
+ origin: string,
18
+ apiKey: string,
19
+ bidId: string,
20
+ isTestEnvironment: boolean
11
21
  ): Promise<Object>;
12
22
  }
13
23