@thealteroffice/react-native-adgeist 0.0.11 → 0.0.13

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/Adgeist.podspec CHANGED
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
  s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
17
17
  s.private_header_files = "ios/**/*.h"
18
18
 
19
- s.dependency "AdgeistKit", '= 0.0.6'
19
+ s.dependency "AdgeistKit", '= 0.0.7'
20
20
 
21
21
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
22
22
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
@@ -0,0 +1,63 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJavaSpec.js
9
+ *
10
+ * @nolint
11
+ */
12
+
13
+ package com.facebook.fbreact.specs;
14
+
15
+ import com.facebook.proguard.annotations.DoNotStrip;
16
+ import com.facebook.react.bridge.Promise;
17
+ import com.facebook.react.bridge.ReactApplicationContext;
18
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
19
+ import com.facebook.react.bridge.ReactMethod;
20
+ import com.facebook.react.bridge.ReadableMap;
21
+ import com.facebook.react.turbomodule.core.interfaces.TurboModule;
22
+ import javax.annotation.Nonnull;
23
+
24
+ public abstract class NativeAdgeistSpec extends ReactContextBaseJavaModule implements TurboModule {
25
+ public static final String NAME = "Adgeist";
26
+
27
+ public NativeAdgeistSpec(ReactApplicationContext reactContext) {
28
+ super(reactContext);
29
+ }
30
+
31
+ @Override
32
+ public @Nonnull String getName() {
33
+ return NAME;
34
+ }
35
+
36
+ @ReactMethod
37
+ @DoNotStrip
38
+ public abstract void initializeSdk(String customDomain, Promise promise);
39
+
40
+ @ReactMethod
41
+ @DoNotStrip
42
+ public abstract void fetchCreative(String apiKey, String origin, String adSpaceId, String publisherId, boolean isTestEnvironment, Promise promise);
43
+
44
+ @ReactMethod
45
+ @DoNotStrip
46
+ public abstract void sendCreativeAnalytic(String campaignId, String adSpaceId, String publisherId, String eventType, String origin, String apiKey, String bidId, boolean isTestEnvironment, Promise promise);
47
+
48
+ @ReactMethod
49
+ @DoNotStrip
50
+ public abstract void setUserDetails(ReadableMap user);
51
+
52
+ @ReactMethod
53
+ @DoNotStrip
54
+ public abstract void logEvent(ReadableMap event);
55
+
56
+ @ReactMethod
57
+ @DoNotStrip
58
+ public abstract void getConsentStatus(Promise promise);
59
+
60
+ @ReactMethod
61
+ @DoNotStrip
62
+ public abstract void updateConsentStatus(boolean consent);
63
+ }
@@ -0,0 +1,36 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ cmake_minimum_required(VERSION 3.13)
7
+ set(CMAKE_VERBOSE_MAKEFILE on)
8
+
9
+ file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNAdgeistSpec/*.cpp)
10
+
11
+ add_library(
12
+ react_codegen_RNAdgeistSpec
13
+ OBJECT
14
+ ${react_codegen_SRCS}
15
+ )
16
+
17
+ target_include_directories(react_codegen_RNAdgeistSpec PUBLIC . react/renderer/components/RNAdgeistSpec)
18
+
19
+ target_link_libraries(
20
+ react_codegen_RNAdgeistSpec
21
+ fbjni
22
+ jsi
23
+ # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
+ # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
+ reactnative
26
+ )
27
+
28
+ target_compile_options(
29
+ react_codegen_RNAdgeistSpec
30
+ PRIVATE
31
+ -DLOG_TAG=\"ReactNative\"
32
+ -fexceptions
33
+ -frtti
34
+ -std=c++20
35
+ -Wall
36
+ )
@@ -0,0 +1,68 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJniCpp.js
9
+ */
10
+
11
+ #include "RNAdgeistSpec.h"
12
+
13
+ namespace facebook::react {
14
+
15
+ static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_initializeSdk(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
16
+ static jmethodID cachedMethodId = nullptr;
17
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "initializeSdk", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
18
+ }
19
+
20
+ static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_fetchCreative(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
21
+ static jmethodID cachedMethodId = nullptr;
22
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "fetchCreative", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
23
+ }
24
+
25
+ static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_sendCreativeAnalytic(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
26
+ static jmethodID cachedMethodId = nullptr;
27
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "sendCreativeAnalytic", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
28
+ }
29
+
30
+ static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_setUserDetails(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
31
+ static jmethodID cachedMethodId = nullptr;
32
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "setUserDetails", "(Lcom/facebook/react/bridge/ReadableMap;)V", args, count, cachedMethodId);
33
+ }
34
+
35
+ static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_logEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
36
+ static jmethodID cachedMethodId = nullptr;
37
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "logEvent", "(Lcom/facebook/react/bridge/ReadableMap;)V", args, count, cachedMethodId);
38
+ }
39
+
40
+ static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_getConsentStatus(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
41
+ static jmethodID cachedMethodId = nullptr;
42
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getConsentStatus", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
43
+ }
44
+
45
+ static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_updateConsentStatus(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
46
+ static jmethodID cachedMethodId = nullptr;
47
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "updateConsentStatus", "(Z)V", args, count, cachedMethodId);
48
+ }
49
+
50
+ NativeAdgeistSpecJSI::NativeAdgeistSpecJSI(const JavaTurboModule::InitParams &params)
51
+ : JavaTurboModule(params) {
52
+ methodMap_["initializeSdk"] = MethodMetadata {1, __hostFunction_NativeAdgeistSpecJSI_initializeSdk};
53
+ methodMap_["fetchCreative"] = MethodMetadata {5, __hostFunction_NativeAdgeistSpecJSI_fetchCreative};
54
+ methodMap_["sendCreativeAnalytic"] = MethodMetadata {8, __hostFunction_NativeAdgeistSpecJSI_sendCreativeAnalytic};
55
+ methodMap_["setUserDetails"] = MethodMetadata {1, __hostFunction_NativeAdgeistSpecJSI_setUserDetails};
56
+ methodMap_["logEvent"] = MethodMetadata {1, __hostFunction_NativeAdgeistSpecJSI_logEvent};
57
+ methodMap_["getConsentStatus"] = MethodMetadata {0, __hostFunction_NativeAdgeistSpecJSI_getConsentStatus};
58
+ methodMap_["updateConsentStatus"] = MethodMetadata {1, __hostFunction_NativeAdgeistSpecJSI_updateConsentStatus};
59
+ }
60
+
61
+ std::shared_ptr<TurboModule> RNAdgeistSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
62
+ if (moduleName == "Adgeist") {
63
+ return std::make_shared<NativeAdgeistSpecJSI>(params);
64
+ }
65
+ return nullptr;
66
+ }
67
+
68
+ } // namespace facebook::react
@@ -0,0 +1,31 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJniH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include <ReactCommon/JavaTurboModule.h>
14
+ #include <ReactCommon/TurboModule.h>
15
+ #include <jsi/jsi.h>
16
+
17
+ namespace facebook::react {
18
+
19
+ /**
20
+ * JNI C++ class for module 'NativeAdgeist'
21
+ */
22
+ class JSI_EXPORT NativeAdgeistSpecJSI : public JavaTurboModule {
23
+ public:
24
+ NativeAdgeistSpecJSI(const JavaTurboModule::InitParams &params);
25
+ };
26
+
27
+
28
+ JSI_EXPORT
29
+ std::shared_ptr<TurboModule> RNAdgeistSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params);
30
+
31
+ } // namespace facebook::react
@@ -0,0 +1,82 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleCpp.js
8
+ */
9
+
10
+ #include "RNAdgeistSpecJSI.h"
11
+
12
+ namespace facebook::react {
13
+
14
+ static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_initializeSdk(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
+ return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->initializeSdk(
16
+ rt,
17
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
18
+ );
19
+ }
20
+ static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_fetchCreative(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
21
+ return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->fetchCreative(
22
+ rt,
23
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
24
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
25
+ count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
26
+ count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
27
+ count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asBool()
28
+ );
29
+ }
30
+ static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_sendCreativeAnalytic(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
31
+ return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->sendCreativeAnalytic(
32
+ rt,
33
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
34
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
35
+ count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
36
+ count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
37
+ count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
38
+ count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asString(rt),
39
+ count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asString(rt),
40
+ count <= 7 ? throw jsi::JSError(rt, "Expected argument in position 7 to be passed") : args[7].asBool()
41
+ );
42
+ }
43
+ static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_setUserDetails(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
44
+ static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->setUserDetails(
45
+ rt,
46
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
47
+ );
48
+ return jsi::Value::undefined();
49
+ }
50
+ static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_logEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
51
+ static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->logEvent(
52
+ rt,
53
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
54
+ );
55
+ return jsi::Value::undefined();
56
+ }
57
+ static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_getConsentStatus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
58
+ return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->getConsentStatus(
59
+ rt
60
+ );
61
+ }
62
+ static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_updateConsentStatus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
63
+ static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->updateConsentStatus(
64
+ rt,
65
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
66
+ );
67
+ return jsi::Value::undefined();
68
+ }
69
+
70
+ NativeAdgeistCxxSpecJSI::NativeAdgeistCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
71
+ : TurboModule("Adgeist", jsInvoker) {
72
+ methodMap_["initializeSdk"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_initializeSdk};
73
+ methodMap_["fetchCreative"] = MethodMetadata {5, __hostFunction_NativeAdgeistCxxSpecJSI_fetchCreative};
74
+ methodMap_["sendCreativeAnalytic"] = MethodMetadata {8, __hostFunction_NativeAdgeistCxxSpecJSI_sendCreativeAnalytic};
75
+ methodMap_["setUserDetails"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_setUserDetails};
76
+ methodMap_["logEvent"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_logEvent};
77
+ methodMap_["getConsentStatus"] = MethodMetadata {0, __hostFunction_NativeAdgeistCxxSpecJSI_getConsentStatus};
78
+ methodMap_["updateConsentStatus"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_updateConsentStatus};
79
+ }
80
+
81
+
82
+ } // namespace facebook::react
@@ -0,0 +1,242 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+
19
+ #pragma mark - NativeAdgeistEvent
20
+
21
+ template <typename P0, typename P1>
22
+ struct NativeAdgeistEvent {
23
+ P0 eventType;
24
+ P1 eventProperties;
25
+ bool operator==(const NativeAdgeistEvent &other) const {
26
+ return eventType == other.eventType && eventProperties == other.eventProperties;
27
+ }
28
+ };
29
+
30
+ template <typename T>
31
+ struct NativeAdgeistEventBridging {
32
+ static T types;
33
+
34
+ static T fromJs(
35
+ jsi::Runtime &rt,
36
+ const jsi::Object &value,
37
+ const std::shared_ptr<CallInvoker> &jsInvoker) {
38
+ T result{
39
+ bridging::fromJs<decltype(types.eventType)>(rt, value.getProperty(rt, "eventType"), jsInvoker),
40
+ bridging::fromJs<decltype(types.eventProperties)>(rt, value.getProperty(rt, "eventProperties"), jsInvoker)};
41
+ return result;
42
+ }
43
+
44
+ #ifdef DEBUG
45
+ static jsi::String eventTypeToJs(jsi::Runtime &rt, decltype(types.eventType) value) {
46
+ return bridging::toJs(rt, value);
47
+ }
48
+
49
+ static jsi::Object eventPropertiesToJs(jsi::Runtime &rt, decltype(types.eventProperties) value) {
50
+ return bridging::toJs(rt, value);
51
+ }
52
+ #endif
53
+
54
+ static jsi::Object toJs(
55
+ jsi::Runtime &rt,
56
+ const T &value,
57
+ const std::shared_ptr<CallInvoker> &jsInvoker) {
58
+ auto result = facebook::jsi::Object(rt);
59
+ result.setProperty(rt, "eventType", bridging::toJs(rt, value.eventType, jsInvoker));
60
+ result.setProperty(rt, "eventProperties", bridging::toJs(rt, value.eventProperties, jsInvoker));
61
+ return result;
62
+ }
63
+ };
64
+
65
+
66
+
67
+ #pragma mark - NativeAdgeistUserDetails
68
+
69
+ template <typename P0, typename P1, typename P2, typename P3>
70
+ struct NativeAdgeistUserDetails {
71
+ P0 userId;
72
+ P1 userName;
73
+ P2 email;
74
+ P3 phone;
75
+ bool operator==(const NativeAdgeistUserDetails &other) const {
76
+ return userId == other.userId && userName == other.userName && email == other.email && phone == other.phone;
77
+ }
78
+ };
79
+
80
+ template <typename T>
81
+ struct NativeAdgeistUserDetailsBridging {
82
+ static T types;
83
+
84
+ static T fromJs(
85
+ jsi::Runtime &rt,
86
+ const jsi::Object &value,
87
+ const std::shared_ptr<CallInvoker> &jsInvoker) {
88
+ T result{
89
+ bridging::fromJs<decltype(types.userId)>(rt, value.getProperty(rt, "userId"), jsInvoker),
90
+ bridging::fromJs<decltype(types.userName)>(rt, value.getProperty(rt, "userName"), jsInvoker),
91
+ bridging::fromJs<decltype(types.email)>(rt, value.getProperty(rt, "email"), jsInvoker),
92
+ bridging::fromJs<decltype(types.phone)>(rt, value.getProperty(rt, "phone"), jsInvoker)};
93
+ return result;
94
+ }
95
+
96
+ #ifdef DEBUG
97
+ static jsi::String userIdToJs(jsi::Runtime &rt, decltype(types.userId) value) {
98
+ return bridging::toJs(rt, value);
99
+ }
100
+
101
+ static jsi::String userNameToJs(jsi::Runtime &rt, decltype(types.userName) value) {
102
+ return bridging::toJs(rt, value);
103
+ }
104
+
105
+ static jsi::String emailToJs(jsi::Runtime &rt, decltype(types.email) value) {
106
+ return bridging::toJs(rt, value);
107
+ }
108
+
109
+ static jsi::String phoneToJs(jsi::Runtime &rt, decltype(types.phone) value) {
110
+ return bridging::toJs(rt, value);
111
+ }
112
+ #endif
113
+
114
+ static jsi::Object toJs(
115
+ jsi::Runtime &rt,
116
+ const T &value,
117
+ const std::shared_ptr<CallInvoker> &jsInvoker) {
118
+ auto result = facebook::jsi::Object(rt);
119
+ if (value.userId) {
120
+ result.setProperty(rt, "userId", bridging::toJs(rt, value.userId.value(), jsInvoker));
121
+ }
122
+ if (value.userName) {
123
+ result.setProperty(rt, "userName", bridging::toJs(rt, value.userName.value(), jsInvoker));
124
+ }
125
+ if (value.email) {
126
+ result.setProperty(rt, "email", bridging::toJs(rt, value.email.value(), jsInvoker));
127
+ }
128
+ if (value.phone) {
129
+ result.setProperty(rt, "phone", bridging::toJs(rt, value.phone.value(), jsInvoker));
130
+ }
131
+ return result;
132
+ }
133
+ };
134
+
135
+ class JSI_EXPORT NativeAdgeistCxxSpecJSI : public TurboModule {
136
+ protected:
137
+ NativeAdgeistCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
138
+
139
+ public:
140
+ virtual jsi::Value initializeSdk(jsi::Runtime &rt, jsi::String customDomain) = 0;
141
+ virtual jsi::Value fetchCreative(jsi::Runtime &rt, jsi::String apiKey, jsi::String origin, jsi::String adSpaceId, jsi::String publisherId, bool isTestEnvironment) = 0;
142
+ virtual jsi::Value sendCreativeAnalytic(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String publisherId, jsi::String eventType, jsi::String origin, jsi::String apiKey, jsi::String bidId, bool isTestEnvironment) = 0;
143
+ virtual void setUserDetails(jsi::Runtime &rt, jsi::Object user) = 0;
144
+ virtual void logEvent(jsi::Runtime &rt, jsi::Object event) = 0;
145
+ virtual jsi::Value getConsentStatus(jsi::Runtime &rt) = 0;
146
+ virtual void updateConsentStatus(jsi::Runtime &rt, bool consent) = 0;
147
+
148
+ };
149
+
150
+ template <typename T>
151
+ class JSI_EXPORT NativeAdgeistCxxSpec : public TurboModule {
152
+ public:
153
+ jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
154
+ return delegate_.create(rt, propName);
155
+ }
156
+
157
+ std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
158
+ return delegate_.getPropertyNames(runtime);
159
+ }
160
+
161
+ static constexpr std::string_view kModuleName = "Adgeist";
162
+
163
+ protected:
164
+ NativeAdgeistCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
165
+ : TurboModule(std::string{NativeAdgeistCxxSpec::kModuleName}, jsInvoker),
166
+ delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
167
+
168
+
169
+ private:
170
+ class Delegate : public NativeAdgeistCxxSpecJSI {
171
+ public:
172
+ Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
173
+ NativeAdgeistCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
174
+
175
+ }
176
+
177
+ jsi::Value initializeSdk(jsi::Runtime &rt, jsi::String customDomain) override {
178
+ static_assert(
179
+ bridging::getParameterCount(&T::initializeSdk) == 2,
180
+ "Expected initializeSdk(...) to have 2 parameters");
181
+
182
+ return bridging::callFromJs<jsi::Value>(
183
+ rt, &T::initializeSdk, jsInvoker_, instance_, std::move(customDomain));
184
+ }
185
+ jsi::Value fetchCreative(jsi::Runtime &rt, jsi::String apiKey, jsi::String origin, jsi::String adSpaceId, jsi::String publisherId, bool isTestEnvironment) override {
186
+ static_assert(
187
+ bridging::getParameterCount(&T::fetchCreative) == 6,
188
+ "Expected fetchCreative(...) to have 6 parameters");
189
+
190
+ return bridging::callFromJs<jsi::Value>(
191
+ rt, &T::fetchCreative, jsInvoker_, instance_, std::move(apiKey), std::move(origin), std::move(adSpaceId), std::move(publisherId), std::move(isTestEnvironment));
192
+ }
193
+ jsi::Value sendCreativeAnalytic(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String publisherId, jsi::String eventType, jsi::String origin, jsi::String apiKey, jsi::String bidId, bool isTestEnvironment) override {
194
+ static_assert(
195
+ bridging::getParameterCount(&T::sendCreativeAnalytic) == 9,
196
+ "Expected sendCreativeAnalytic(...) to have 9 parameters");
197
+
198
+ return bridging::callFromJs<jsi::Value>(
199
+ rt, &T::sendCreativeAnalytic, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(publisherId), std::move(eventType), std::move(origin), std::move(apiKey), std::move(bidId), std::move(isTestEnvironment));
200
+ }
201
+ void setUserDetails(jsi::Runtime &rt, jsi::Object user) override {
202
+ static_assert(
203
+ bridging::getParameterCount(&T::setUserDetails) == 2,
204
+ "Expected setUserDetails(...) to have 2 parameters");
205
+
206
+ return bridging::callFromJs<void>(
207
+ rt, &T::setUserDetails, jsInvoker_, instance_, std::move(user));
208
+ }
209
+ void logEvent(jsi::Runtime &rt, jsi::Object event) override {
210
+ static_assert(
211
+ bridging::getParameterCount(&T::logEvent) == 2,
212
+ "Expected logEvent(...) to have 2 parameters");
213
+
214
+ return bridging::callFromJs<void>(
215
+ rt, &T::logEvent, jsInvoker_, instance_, std::move(event));
216
+ }
217
+ jsi::Value getConsentStatus(jsi::Runtime &rt) override {
218
+ static_assert(
219
+ bridging::getParameterCount(&T::getConsentStatus) == 1,
220
+ "Expected getConsentStatus(...) to have 1 parameters");
221
+
222
+ return bridging::callFromJs<jsi::Value>(
223
+ rt, &T::getConsentStatus, jsInvoker_, instance_);
224
+ }
225
+ void updateConsentStatus(jsi::Runtime &rt, bool consent) override {
226
+ static_assert(
227
+ bridging::getParameterCount(&T::updateConsentStatus) == 2,
228
+ "Expected updateConsentStatus(...) to have 2 parameters");
229
+
230
+ return bridging::callFromJs<void>(
231
+ rt, &T::updateConsentStatus, jsInvoker_, instance_, std::move(consent));
232
+ }
233
+
234
+ private:
235
+ friend class NativeAdgeistCxxSpec;
236
+ T *instance_;
237
+ };
238
+
239
+ Delegate delegate_;
240
+ };
241
+
242
+ } // namespace facebook::react
package/ios/Adgeist.mm CHANGED
@@ -74,12 +74,18 @@ RCT_EXPORT_METHOD(setUserDetails:(NSObject *)userDetails) {
74
74
  [adgeist setUserDetails:userDetails];
75
75
  }
76
76
 
77
+ RCT_EXPORT_METHOD(getConsentStatus:(RCTPromiseResolveBlock)resolve
78
+ reject:(RCTPromiseRejectBlock)reject) {
79
+ [adgeist getConsentStatusWithResolver:resolve
80
+ rejecter:reject];
81
+ }
82
+
77
83
  RCT_EXPORT_METHOD(updateConsentStatus:(BOOL)consent) {
78
84
  [adgeist updateConsentStatus:consent];
79
85
  }
80
86
 
81
- RCT_EXPORT_METHOD(logEvent:(NSObject *)eventDict) {
82
- [adgeist logEvent:eventDict];
87
+ RCT_EXPORT_METHOD(logEvent:(NSDictionary *)eventDict) {
88
+ [adgeist logEventWithEventDict:eventDict];
83
89
  }
84
90
 
85
91
  // TurboModule support for the new architecture
@@ -97,7 +97,11 @@ import React
97
97
  }
98
98
 
99
99
  @objc public func setUserDetails(_ userDetailsDict: [String: Any]) {
100
- let userDetails = UserDetails(
100
+ let filtered = userDetailsDict.compactMapValues { value -> Any? in
101
+ (value is NSNull) ? nil : value
102
+ }
103
+
104
+ let userDetails = UserDetails(
101
105
  userId: userDetailsDict["userId"] as? String,
102
106
  userName: userDetailsDict["userName"] as? String,
103
107
  email: userDetailsDict["email"] as? String,
@@ -106,19 +110,35 @@ import React
106
110
  adgeistInstance?.setUserDetails(userDetails)
107
111
  }
108
112
 
113
+
114
+ @objc public func getConsentStatus(resolver: @escaping RCTPromiseResolveBlock, rejecter: @escaping RCTPromiseRejectBlock) {
115
+ guard let adgeistInstance = adgeistInstance else {
116
+ rejecter("SDK_NOT_INITIALIZED", "SDK not initialized. Call initializeSdk() first.", nil)
117
+ return
118
+ }
119
+ let status = adgeistInstance.getConsentStatus()
120
+ resolver(status)
121
+ }
122
+
109
123
  @objc public func updateConsentStatus(_ consent: Bool) {
110
124
  adgeistInstance?.updateConsentStatus(consent)
111
125
  }
112
126
 
113
127
 
114
- @objc public func logEvent(_ eventDict: NSDictionary) {
115
- print("Event must have a non-empty eventType")
116
- guard let eventType = eventDict["eventType"] as? String, !eventType.isEmpty else {
128
+ @objc public func logEvent(eventDict: [String: Any]) {
129
+ let filtered = eventDict.compactMapValues { value -> Any? in
130
+ (value is NSNull) ? nil : value
131
+ }
132
+
133
+ guard let eventType = filtered["eventType"] as? String, !eventType.isEmpty else {
117
134
  print("Event must have a non-empty eventType")
118
135
  return
119
136
  }
120
137
 
121
- let eventProps = eventDict["eventProperties"] as? [String: Any] ?? [:]
138
+ let eventProps = (filtered["eventProperties"] as? [String: Any])?.compactMapValues { value -> Any? in
139
+ (value is NSNull) ? nil : value
140
+ } ?? [:]
141
+
122
142
  let event = Event(eventType: eventType, eventProperties: eventProps)
123
143
  adgeistInstance?.logEvent(event)
124
144
  }
@@ -1,14 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  import React, { useEffect, useState } from 'react';
4
- import { Dimensions, Image, Linking, StyleSheet, Text, View, TouchableWithoutFeedback, ActivityIndicator } from 'react-native';
4
+ import { Image, Linking, StyleSheet, Text, View, TouchableWithoutFeedback, ActivityIndicator } from 'react-native';
5
5
  import Adgeist from "../NativeAdgeist.js";
6
6
  import { useAdgeistContext } from "./AdgeistProvider.js";
7
7
  import Video from 'react-native-video';
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  export const BannerAd = ({
10
10
  dataAdSlot,
11
- dataSlotType = 'banner'
11
+ dataSlotType = 'banner',
12
+ width = 0,
13
+ height = 0,
14
+ isResponsive = false
15
+ // responsiveType = 'SQUARE',
12
16
  }) => {
13
17
  const [adData, setAdData] = useState(null);
14
18
  const [isLoading, setIsLoading] = useState(false);
@@ -46,7 +50,10 @@ export const BannerAd = ({
46
50
  };
47
51
  if (isLoading) {
48
52
  return /*#__PURE__*/_jsx(View, {
49
- style: styles.loadingOverlayContainer,
53
+ style: [styles.loadingOverlayContainer, !isResponsive && {
54
+ width: width,
55
+ height: height
56
+ }],
50
57
  children: /*#__PURE__*/_jsx(ActivityIndicator, {
51
58
  size: "large",
52
59
  color: "#63AA75"
@@ -57,12 +64,19 @@ export const BannerAd = ({
57
64
  return /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
58
65
  accessible: true,
59
66
  accessibilityLabel: "Ad Banner",
67
+ style: {
68
+ width: '100%',
69
+ height: '100%'
70
+ },
60
71
  children: /*#__PURE__*/_jsxs(View, {
61
- style: styles.adContainer,
62
- children: [dataSlotType == 'banner' ? /*#__PURE__*/_jsx(Image, {
72
+ style: [styles.adContainer, !isResponsive && {
73
+ width: width,
74
+ height: height
75
+ }],
76
+ children: [dataSlotType === 'banner' ? /*#__PURE__*/_jsx(Image, {
63
77
  style: [styles.creative, {
64
78
  width: '100%',
65
- height: 300
79
+ height: '70%'
66
80
  }],
67
81
  source: {
68
82
  uri: creativeData.creativeUrl
@@ -74,8 +88,9 @@ export const BannerAd = ({
74
88
  resizeMode: "contain",
75
89
  style: {
76
90
  width: '100%',
77
- height: 300
78
- }
91
+ height: '70%'
92
+ },
93
+ repeat: true
79
94
  }), /*#__PURE__*/_jsxs(View, {
80
95
  style: styles.adContent,
81
96
  children: [/*#__PURE__*/_jsxs(View, {
@@ -115,23 +130,22 @@ export const BannerAd = ({
115
130
  };
116
131
  const styles = StyleSheet.create({
117
132
  adContainer: {
118
- width: Dimensions.get('window').width,
119
133
  backgroundColor: 'white',
120
134
  borderRadius: 5
121
135
  },
122
136
  loadingOverlayContainer: {
123
- width: '100%',
124
- height: 375,
125
137
  alignItems: 'center',
126
138
  justifyContent: 'center'
127
139
  },
128
140
  creative: {
129
- resizeMode: 'cover',
141
+ resizeMode: 'contain',
130
142
  borderTopLeftRadius: 5,
143
+ backgroundColor: 'white',
131
144
  borderTopRightRadius: 5
132
145
  },
133
146
  adContent: {
134
147
  width: '100%',
148
+ height: '30%',
135
149
  backgroundColor: 'white',
136
150
  flexDirection: 'row',
137
151
  justifyContent: 'space-between',
@@ -142,7 +156,7 @@ const styles = StyleSheet.create({
142
156
  borderBottomRightRadius: 5
143
157
  },
144
158
  contentContainer: {
145
- width: Dimensions.get('window').width - 100
159
+ width: '80%'
146
160
  },
147
161
  title: {
148
162
  color: 'black',
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useState","Dimensions","Image","Linking","StyleSheet","Text","View","TouchableWithoutFeedback","ActivityIndicator","Adgeist","useAdgeistContext","Video","jsx","_jsx","jsxs","_jsxs","BannerAd","dataAdSlot","dataSlotType","adData","setAdData","isLoading","setIsLoading","isInitialized","publisherId","apiKey","domain","isTestEnvironment","creativeData","seatBid","bid","ext","response","fetchCreative","creative","data","length","sendCreativeAnalytic","id","error","console","handleClick","openURL","ctaUrl","catch","err","style","styles","loadingOverlayContainer","children","size","color","creativeUrl","accessible","accessibilityLabel","adContainer","width","height","source","uri","resizeMode","adContent","contentContainer","title","numberOfLines","ellipsizeMode","creativeTitle","description","creativeDescription","brandName","creativeBrandName","onPress","linkButton","create","get","backgroundColor","borderRadius","alignItems","justifyContent","borderTopLeftRadius","borderTopRightRadius","flexDirection","paddingVertical","paddingHorizontal","borderBottomLeftRadius","borderBottomRightRadius","f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iB,EAAE,EAAE;IACrBN,UAAU,EAAE,QAAQ;IACpBO,sBAAsB,EAAE,CAAC;IACzBC,uBAAuB,EAAE;EAC3B,CAAC;EACDvB,gBAAgB,EAAE;IAChBN,KAAK,EAAEvD,UAAU,CAACyE,GAAG,CAAC,QAAQ,CAAC,CAAClB,KAAK,GAAG;EAC1C,CAAC;EACDO,KAAK,EAAE;IACLZ,KAAK,EAAE,OAAO;IACdmC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDpB,WAAW,EAAE;IACXhB,KAAK,EAAE,OAAO;IACdmC,QAAQ,EAAE;EACZ,CAAC;EACDjB,SAAS,EAAE;IACTlB,KAAK,EAAE,OAAO;IACdmC,QAAQ,EAAE,EAAE;IACZE,OAAO,EAAE,GAAG;IACZC,SAAS,EAAE,CAAC;IACZF,UAAU,EAAE;EACd,CAAC;EACDf,UAAU,EAAE;IACVhB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useState","Image","Linking","StyleSheet","Text","View","TouchableWithoutFeedback","ActivityIndicator","Adgeist","useAdgeistContext","Video","jsx","_jsx","jsxs","_jsxs","BannerAd","dataAdSlot","dataSlotType","width","height","isResponsive","adData","setAdData","isLoading","setIsLoading","isInitialized","publisherId","apiKey","domain","isTestEnvironment","creativeData","seatBid","bid","ext","response","fetchCreative","creative","data","length","sendCreativeAnalytic","id","error","console","handleClick","openURL","ctaUrl","catch","err","style","styles","loadingOverlayContainer","children","size","color","creativeUrl","accessible","accessibilityLabel","adContainer","source","uri","resizeMode","repeat","adContent","contentContainer","title","numberOfLines","ellipsizeMode","creativeTitle","description","creativeDescription","brandName","creativeBrandName","onPress","linkButton","create","backgroundColor","borderRadius","alignItems","justifyContent","borderTopLeftRadius","borderTopRightRadius","flexDirection","paddingVertical","paddingHorizontal","borderBottomLeftRadius","borderBottomRightRadius","fontSize","fontWeight","opacity","marginTop"],"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ACrBmB,mBAAmB,EAAE,CAAC;IACtBJ,eAAe,EAAE,OAAO;IACxBK,oBAAoB,EAAE;EACxB,CAAC;EACDlB,SAAS,EAAE;IACT5C,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,KAAK;IACbwD,eAAe,EAAE,OAAO;IACxBM,aAAa,EAAE,KAAK;IACpBH,cAAc,EAAE,eAAe;IAC/BI,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,EAAE;IACrBN,UAAU,EAAE,QAAQ;IACpBO,sBAAsB,EAAE,CAAC;IACzBC,uBAAuB,EAAE;EAC3B,CAAC;EACDtB,gBAAgB,EAAE;IAChB7C,KAAK,EAAE;EACT,CAAC;EACD8C,KAAK,EAAE;IACLX,KAAK,EAAE,OAAO;IACdiC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDnB,WAAW,EAAE;IACXf,KAAK,EAAE,OAAO;IACdiC,QAAQ,EAAE;EACZ,CAAC;EACDhB,SAAS,EAAE;IACTjB,KAAK,EAAE,OAAO;IACdiC,QAAQ,EAAE,EAAE;IACZE,OAAO,EAAE,GAAG;IACZC,SAAS,EAAE,CAAC;IACZF,UAAU,EAAE;EACd,CAAC;EACDd,UAAU,EAAE;IACVvD,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import React from 'react';
4
- import { Dimensions, StyleSheet, View, Text, Pressable } from 'react-native';
4
+ import { StyleSheet, View, Text, Pressable } from 'react-native';
5
5
  import { useAdgeistContext } from "./AdgeistProvider.js";
6
6
  import Adgeist from "../NativeAdgeist.js";
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -45,44 +45,52 @@ export const ConsentModal = () => {
45
45
  };
46
46
  const styles = StyleSheet.create({
47
47
  modalContainer: {
48
- width: Dimensions.get('window').width,
49
- height: Dimensions.get('window').height,
48
+ width: '100%',
49
+ height: '100%',
50
50
  position: 'absolute',
51
51
  top: 0,
52
52
  left: 0,
53
53
  zIndex: 1000,
54
- backgroundColor: '#00000044',
55
- padding: 20,
54
+ backgroundColor: '#000000DD',
56
55
  flex: 1,
57
56
  justifyContent: 'center',
58
57
  alignItems: 'center'
59
58
  },
60
59
  modalInnerContainer: {
60
+ width: '95%',
61
+ maxWidth: 375,
61
62
  backgroundColor: 'white',
62
63
  borderRadius: 10,
63
64
  padding: 15
64
65
  },
65
66
  headerContainer: {
66
- fontSize: 18,
67
- fontWeight: 'bold',
68
- marginBottom: 5
67
+ fontSize: 20,
68
+ fontWeight: '600',
69
+ marginBottom: 5,
70
+ opacity: 0.8
69
71
  },
70
72
  textContainer: {
71
- fontSize: 14,
72
- marginBottom: 5
73
+ fontSize: 15,
74
+ marginBottom: 5,
75
+ opacity: 0.8
73
76
  },
74
77
  buttonContainer: {
75
78
  flexDirection: 'row',
76
79
  justifyContent: 'flex-end',
77
- gap: 5
80
+ gap: 10
78
81
  },
79
82
  button: {
80
- backgroundColor: '#63AA75',
81
- padding: 10,
82
- borderRadius: 5
83
+ backgroundColor: '#000000CC',
84
+ paddingVertical: 10,
85
+ paddingHorizontal: 25,
86
+ borderRadius: 5,
87
+ marginVertical: 5,
88
+ marginTop: 10
83
89
  },
84
90
  buttonText: {
85
- color: 'black'
91
+ color: '#FFFFFF',
92
+ fontWeight: '500',
93
+ fontSize: 15
86
94
  }
87
95
  });
88
96
  //# sourceMappingURL=ConsentModal.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Dimensions","StyleSheet","View","Text","Pressable","useAdgeistContext","Adgeist","jsx","_jsx","jsxs","_jsxs","ConsentModal","setAdgeistConsentModal","style","styles","modalContainer","children","modalInnerContainer","headerContainer","textContainer","buttonContainer","button","onPress","buttonText","updateConsentStatus","create","width","get","height","position","top","left","zIndex","backgroundColor","padding","flex","justifyContent","alignItems","borderRadius","fontSize","fontWeight","marginBottom","flexDirection","gap","color"],"sourceRo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"version":3,"names":["React","StyleSheet","View","Text","Pressable","useAdgeistContext","Adgeist","jsx","_jsx","jsxs","_jsxs","ConsentModal","setAdgeistConsentModal","style","styles","modalContainer","children","modalInnerContainer","headerContainer","textContainer","buttonContainer","button","onPress","buttonText","updateConsentStatus","create","width","height","position","top","left","zIndex","backgroundColor","flex","justifyContent","alignItems","maxWidth","borderRadius","padding","fontSize","fontWeight","marginBottom","opacity","flexDirection","gap","paddingVertical","paddingHorizontal","marginVertical","marginTop","color"],"sourceRoot":"../../../src","sources":["components/ConsentModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,EAAEC,SAAS,QAAQ,cAAc;AAChE,SAASC,iBAAiB,QAAQ,sBAAmB;AACrD,OAAOC,OAAO,MAAM,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAIvC,OAAO,MAAMC,YAA6C,GAAGA,CAAA,KAAM;EACjE,MAAM;IAAEC;EAAuB,CAAC,GAAGP,iBAAiB,CAAC,CAAC;EAEtD,oBACEG,IAAA,CAACN,IAAI;IAACW,KAAK,EAAEC,MAAM,CAACC,cAAe;IAAAC,QAAA,eACjCN,KAAA,CAACR,IAAI;MAACW,KAAK,EAAEC,MAAM,CAACG,mBAAoB;MAAAD,QAAA,gBACtCR,IAAA,CAACL,IAAI;QAACU,KAAK,EAAEC,MAAM,CAACI,eAAgB;QAAAF,QAAA,EAAC;MAAoB,CAAM,CAAC,eAChER,IAAA,CAACL,IAAI;QAACU,KAAK,EAAEC,MAAM,CAACK,aAAc;QAAAH,QAAA,EAAC;MAGnC,CAAM,CAAC,eAEPN,KAAA,CAACR,IAAI;QAACW,KAAK,EAAEC,MAAM,CAACM,eAAgB;QAAAJ,QAAA,gBAClCR,IAAA,CAACJ,SAAS;UACRS,KAAK,EAAEC,MAAM,CAACO,MAAO;UACrBC,OAAO,EAAEA,CAAA,KAAM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eAAe,EAAE;IACfuB,aAAa,EAAE,KAAK;IACpBT,cAAc,EAAE,UAAU;IAC1BU,GAAG,EAAE;EACP,CAAC;EACDvB,MAAM,EAAE;IACNW,eAAe,EAAE,WAAW;IAC5Ba,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,EAAE;IACrBT,YAAY,EAAE,CAAC;IACfU,cAAc,EAAE,CAAC;IACjBC,SAAS,EAAE;EACb,CAAC;EACDzB,UAAU,EAAE;IACV0B,KAAK,EAAE,SAAS;IAChBT,UAAU,EAAE,KAAK;IACjBD,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -13,8 +13,8 @@ export interface Spec extends TurboModule {
13
13
  initializeSdk(customDomain: string): Promise<boolean>;
14
14
  fetchCreative(apiKey: string, origin: string, adSpaceId: string, publisherId: string, isTestEnvironment: boolean): Promise<Object>;
15
15
  sendCreativeAnalytic(campaignId: string, adSpaceId: string, publisherId: string, eventType: string, origin: string, apiKey: string, bidId: string, isTestEnvironment: boolean): Promise<Object>;
16
- setUserDetails(user: UserDetails): void;
17
- logEvent(event: Event): void;
16
+ setUserDetails(user: Object): void;
17
+ logEvent(event: Object): void;
18
18
  getConsentStatus(): Promise<boolean>;
19
19
  updateConsentStatus(consent: boolean): void;
20
20
  }
@@ -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,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;CACzB;AACD,MAAM,WA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OAAO,CAAC,OAAO,CAAC,CAAC;IAEtD,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;IAEnB,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;IAEnB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAErC,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7C;;AAED,wBAAiE"}
@@ -2,8 +2,10 @@ import React from 'react';
2
2
  interface AdBannerTypes {
3
3
  dataAdSlot: string;
4
4
  dataSlotType: 'banner' | 'video';
5
- width: number;
6
- height: number;
5
+ width?: number;
6
+ height?: number;
7
+ isResponsive: boolean;
8
+ responsiveType?: 'SQUARE' | 'VERTICAL' | 'WIDE';
7
9
  }
8
10
  export declare const BannerAd: React.FC<AdBannerTypes>;
9
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../../src/components/BannerAd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAyCnD,UAAU,aAAa;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,QAAQ,GAAG,OAAO,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0I5C,CAAC"}
1
+ {"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../../src/components/BannerAd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAwCnD,UAAU,aAAa;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,QAAQ,GAAG,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;CACjD;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA6J5C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thealteroffice/react-native-adgeist",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
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",
@@ -34,9 +34,9 @@ export interface Spec extends TurboModule {
34
34
  isTestEnvironment: boolean
35
35
  ): Promise<Object>;
36
36
 
37
- setUserDetails(user: UserDetails): void;
37
+ setUserDetails(user: Object): void;
38
38
 
39
- logEvent(event: Event): void;
39
+ logEvent(event: Object): void;
40
40
 
41
41
  getConsentStatus(): Promise<boolean>;
42
42
 
@@ -1,6 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import {
3
- Dimensions,
4
3
  Image,
5
4
  Linking,
6
5
  StyleSheet,
@@ -42,13 +41,19 @@ interface BidExtension {
42
41
  interface AdBannerTypes {
43
42
  dataAdSlot: string;
44
43
  dataSlotType: 'banner' | 'video';
45
- width: number;
46
- height: number;
44
+ width?: number;
45
+ height?: number;
46
+ isResponsive: boolean;
47
+ responsiveType?: 'SQUARE' | 'VERTICAL' | 'WIDE';
47
48
  }
48
49
 
49
50
  export const BannerAd: React.FC<AdBannerTypes> = ({
50
51
  dataAdSlot,
51
52
  dataSlotType = 'banner',
53
+ width = 0,
54
+ height = 0,
55
+ isResponsive = false,
56
+ // responsiveType = 'SQUARE',
52
57
  }) => {
53
58
  const [adData, setAdData] = useState<AdData | null>(null);
54
59
  const [isLoading, setIsLoading] = useState(false);
@@ -120,7 +125,12 @@ export const BannerAd: React.FC<AdBannerTypes> = ({
120
125
 
121
126
  if (isLoading) {
122
127
  return (
123
- <View style={styles.loadingOverlayContainer}>
128
+ <View
129
+ style={[
130
+ styles.loadingOverlayContainer,
131
+ !isResponsive && { width: width, height: height },
132
+ ]}
133
+ >
124
134
  <ActivityIndicator size="large" color="#63AA75" />
125
135
  </View>
126
136
  );
@@ -129,18 +139,28 @@ export const BannerAd: React.FC<AdBannerTypes> = ({
129
139
  if (!creativeData?.creativeUrl) return null;
130
140
 
131
141
  return (
132
- <TouchableWithoutFeedback accessible accessibilityLabel="Ad Banner">
133
- <View style={styles.adContainer}>
134
- {dataSlotType == 'banner' ? (
142
+ <TouchableWithoutFeedback
143
+ accessible
144
+ accessibilityLabel="Ad Banner"
145
+ style={{ width: '100%', height: '100%' }}
146
+ >
147
+ <View
148
+ style={[
149
+ styles.adContainer,
150
+ !isResponsive && { width: width, height: height },
151
+ ]}
152
+ >
153
+ {dataSlotType === 'banner' ? (
135
154
  <Image
136
- style={[styles.creative, { width: '100%', height: 300 }]}
155
+ style={[styles.creative, { width: '100%', height: '70%' }]}
137
156
  source={{ uri: creativeData.creativeUrl }}
138
157
  />
139
158
  ) : (
140
159
  <Video
141
160
  source={{ uri: creativeData.creativeUrl }}
142
161
  resizeMode="contain"
143
- style={{ width: '100%', height: 300 }}
162
+ style={{ width: '100%', height: '70%' }}
163
+ repeat={true}
144
164
  />
145
165
  )}
146
166
 
@@ -188,23 +208,22 @@ export const BannerAd: React.FC<AdBannerTypes> = ({
188
208
 
189
209
  const styles = StyleSheet.create({
190
210
  adContainer: {
191
- width: Dimensions.get('window').width,
192
211
  backgroundColor: 'white',
193
212
  borderRadius: 5,
194
213
  },
195
214
  loadingOverlayContainer: {
196
- width: '100%',
197
- height: 375,
198
215
  alignItems: 'center',
199
216
  justifyContent: 'center',
200
217
  },
201
218
  creative: {
202
- resizeMode: 'cover',
219
+ resizeMode: 'contain',
203
220
  borderTopLeftRadius: 5,
221
+ backgroundColor: 'white',
204
222
  borderTopRightRadius: 5,
205
223
  },
206
224
  adContent: {
207
225
  width: '100%',
226
+ height: '30%',
208
227
  backgroundColor: 'white',
209
228
  flexDirection: 'row',
210
229
  justifyContent: 'space-between',
@@ -215,7 +234,7 @@ const styles = StyleSheet.create({
215
234
  borderBottomRightRadius: 5,
216
235
  },
217
236
  contentContainer: {
218
- width: Dimensions.get('window').width - 100,
237
+ width: '80%',
219
238
  },
220
239
  title: {
221
240
  color: 'black',
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- import { Dimensions, StyleSheet, View, Text, Pressable } from 'react-native';
3
+ import { StyleSheet, View, Text, Pressable } from 'react-native';
4
4
  import { useAdgeistContext } from './AdgeistProvider';
5
5
  import Adgeist from '../NativeAdgeist';
6
6
 
@@ -42,43 +42,51 @@ export const ConsentModal: React.FC<ConsentModalPropsType> = () => {
42
42
 
43
43
  const styles = StyleSheet.create({
44
44
  modalContainer: {
45
- width: Dimensions.get('window').width,
46
- height: Dimensions.get('window').height,
45
+ width: '100%',
46
+ height: '100%',
47
47
  position: 'absolute',
48
48
  top: 0,
49
49
  left: 0,
50
50
  zIndex: 1000,
51
- backgroundColor: '#00000044',
52
- padding: 20,
51
+ backgroundColor: '#000000DD',
53
52
  flex: 1,
54
53
  justifyContent: 'center',
55
54
  alignItems: 'center',
56
55
  },
57
56
  modalInnerContainer: {
57
+ width: '95%',
58
+ maxWidth: 375,
58
59
  backgroundColor: 'white',
59
60
  borderRadius: 10,
60
61
  padding: 15,
61
62
  },
62
63
  headerContainer: {
63
- fontSize: 18,
64
- fontWeight: 'bold',
64
+ fontSize: 20,
65
+ fontWeight: '600',
65
66
  marginBottom: 5,
67
+ opacity: 0.8,
66
68
  },
67
69
  textContainer: {
68
- fontSize: 14,
70
+ fontSize: 15,
69
71
  marginBottom: 5,
72
+ opacity: 0.8,
70
73
  },
71
74
  buttonContainer: {
72
75
  flexDirection: 'row',
73
76
  justifyContent: 'flex-end',
74
- gap: 5,
77
+ gap: 10,
75
78
  },
76
79
  button: {
77
- backgroundColor: '#63AA75',
78
- padding: 10,
80
+ backgroundColor: '#000000CC',
81
+ paddingVertical: 10,
82
+ paddingHorizontal: 25,
79
83
  borderRadius: 5,
84
+ marginVertical: 5,
85
+ marginTop: 10,
80
86
  },
81
87
  buttonText: {
82
- color: 'black',
88
+ color: '#FFFFFF',
89
+ fontWeight: '500',
90
+ fontSize: 15,
83
91
  },
84
92
  });