@customerglu/react-native-customerglu 2.1.2-1.0-beta → 3.0.0-beta-1.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 (81) hide show
  1. package/LICENSE +20 -15
  2. package/README.md +2 -2
  3. package/ReactNativeCustomerglu.podspec +42 -0
  4. package/android/build.gradle +78 -33
  5. package/android/generated/java/com/customerglu/reactnativecustomerglu/NativeReactNativeCustomergluSpec.java +144 -0
  6. package/android/generated/jni/CMakeLists.txt +36 -0
  7. package/android/generated/jni/RNReactNativeCustomergluSpec-generated.cpp +188 -0
  8. package/android/generated/jni/RNReactNativeCustomergluSpec.h +31 -0
  9. package/android/generated/jni/react/renderer/components/RNReactNativeCustomergluSpec/RNReactNativeCustomergluSpecJSI-generated.cpp +237 -0
  10. package/android/generated/jni/react/renderer/components/RNReactNativeCustomergluSpec/RNReactNativeCustomergluSpecJSI.h +305 -0
  11. package/android/gradle.properties +5 -0
  12. package/android/src/main/AndroidManifest.xml +1 -6
  13. package/android/src/main/AndroidManifestNew.xml +2 -0
  14. package/android/src/main/java/com/customerglu/reactnativecustomerglu/BannerView.kt +76 -0
  15. package/android/src/main/java/com/customerglu/reactnativecustomerglu/BannerViewManager.kt +19 -0
  16. package/android/src/main/java/com/customerglu/reactnativecustomerglu/CGEmbededView.kt +102 -0
  17. package/android/src/main/java/com/customerglu/reactnativecustomerglu/CGEmbededViewManager.kt +18 -0
  18. package/android/src/main/java/com/customerglu/reactnativecustomerglu/RnCustomergluModule.kt +698 -0
  19. package/android/src/main/java/com/customerglu/reactnativecustomerglu/RnCustomergluPackage.kt +41 -0
  20. package/ios/Rncustomerglu.h +6 -0
  21. package/ios/Rncustomerglu.mm +18 -0
  22. package/ios/generated/RNReactNativeCustomergluSpec/RNReactNativeCustomergluSpec-generated.mm +221 -0
  23. package/ios/generated/RNReactNativeCustomergluSpec/RNReactNativeCustomergluSpec.h +106 -0
  24. package/ios/generated/RNReactNativeCustomergluSpecJSI-generated.cpp +237 -0
  25. package/ios/generated/RNReactNativeCustomergluSpecJSI.h +305 -0
  26. package/lib/commonjs/NativeReactNativeCustomerglu.js +9 -0
  27. package/lib/commonjs/NativeReactNativeCustomerglu.js.map +1 -0
  28. package/lib/commonjs/index.js +28 -191
  29. package/lib/commonjs/index.js.map +1 -1
  30. package/lib/module/NativeReactNativeCustomerglu.js +5 -0
  31. package/lib/module/NativeReactNativeCustomerglu.js.map +1 -0
  32. package/lib/module/index.js +30 -164
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/typescript/commonjs/package.json +1 -0
  35. package/lib/typescript/commonjs/src/NativeReactNativeCustomerglu.d.ts +33 -0
  36. package/lib/typescript/commonjs/src/NativeReactNativeCustomerglu.d.ts.map +1 -0
  37. package/lib/typescript/commonjs/src/index.d.ts +35 -0
  38. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  39. package/lib/typescript/module/package.json +1 -0
  40. package/lib/typescript/module/src/NativeReactNativeCustomerglu.d.ts +33 -0
  41. package/lib/typescript/module/src/NativeReactNativeCustomerglu.d.ts.map +1 -0
  42. package/lib/typescript/module/src/index.d.ts +35 -0
  43. package/lib/typescript/module/src/index.d.ts.map +1 -0
  44. package/package.json +91 -45
  45. package/react-native.config.js +12 -0
  46. package/src/NativeReactNativeCustomerglu.ts +36 -0
  47. package/src/index.tsx +73 -217
  48. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  49. package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  50. package/android/gradlew +0 -185
  51. package/android/gradlew.bat +0 -89
  52. package/android/src/main/java/com/reactnativerncustomerglu/Bannerwidget/Bannerwidget/BannerWidgetViewGroupManager.java +0 -40
  53. package/android/src/main/java/com/reactnativerncustomerglu/Bannerwidget/Bannerwidget/bannerWidget.java +0 -43
  54. package/android/src/main/java/com/reactnativerncustomerglu/Bannerwidget/wrapperview/WrapperView.java +0 -61
  55. package/android/src/main/java/com/reactnativerncustomerglu/CGUtils.java +0 -13
  56. package/android/src/main/java/com/reactnativerncustomerglu/EmbedBannerwidget/EWrapperview/EWrapperView.java +0 -61
  57. package/android/src/main/java/com/reactnativerncustomerglu/EmbedBannerwidget/EmbedBannerwidget/EBannerWidget.java +0 -35
  58. package/android/src/main/java/com/reactnativerncustomerglu/EmbedBannerwidget/EmbedBannerwidget/EBannerWidgetVGManager.java +0 -40
  59. package/android/src/main/java/com/reactnativerncustomerglu/RncustomergluModule.java +0 -1033
  60. package/android/src/main/java/com/reactnativerncustomerglu/RncustomergluPackage.java +0 -35
  61. package/android/src/main/res/drawable/bottom_sheet_edges.xml +0 -7
  62. package/android/src/main/res/drawable/floating_close_layout.xml +0 -10
  63. package/android/src/main/res/drawable/ic_arrow_back.xml +0 -5
  64. package/android/src/main/res/drawable/ic_back.xml +0 -10
  65. package/android/src/main/res/drawable/ic_delete_bin.xml +0 -5
  66. package/android/src/main/res/drawable/ic_delete_bin_red.xml +0 -5
  67. package/android/src/main/res/drawable/ij.png +0 -0
  68. package/android/src/main/res/drawable/notification.png +0 -0
  69. package/android/src/main/res/drawable/progress_bg.xml +0 -33
  70. package/android/src/main/res/values/colors.xml +0 -13
  71. package/android/src/main/res/values/themes.xml +0 -15
  72. package/android/src/main/res/xml/provider_path.xml +0 -4
  73. package/ios/CustomPlayer.m +0 -30
  74. package/ios/Rncustomerglu-Bridging-Header.h +0 -4
  75. package/ios/Rncustomerglu.m +0 -83
  76. package/ios/Rncustomerglu.swift +0 -647
  77. package/ios/Rncustomerglu.xcodeproj/project.pbxproj +0 -293
  78. package/ios/Rncustomerglu.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
  79. package/ios/Rncustomerglu.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  80. package/lib/typescript/index.d.ts +0 -62
  81. package/react-native-customerglu.podspec +0 -23
@@ -0,0 +1,237 @@
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 "RNReactNativeCustomergluSpecJSI.h"
11
+
12
+ namespace facebook::react {
13
+
14
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->addListener(
16
+ rt,
17
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
18
+ );
19
+ return jsi::Value::undefined();
20
+ }
21
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
22
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->removeListeners(
23
+ rt,
24
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
25
+ );
26
+ return jsi::Value::undefined();
27
+ }
28
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_registerDevice(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
29
+ return static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->registerDevice(
30
+ rt,
31
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
32
+ );
33
+ }
34
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_UpdateUserAttributes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
35
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->UpdateUserAttributes(
36
+ rt,
37
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
38
+ );
39
+ return jsi::Value::undefined();
40
+ }
41
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_dataClear(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
42
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->dataClear(
43
+ rt
44
+ );
45
+ return jsi::Value::undefined();
46
+ }
47
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_sendData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
48
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->sendData(
49
+ rt,
50
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
51
+ );
52
+ return jsi::Value::undefined();
53
+ }
54
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_openWallet(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
55
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->openWallet(
56
+ rt,
57
+ count <= 0 || args[0].isUndefined() ? std::nullopt : std::make_optional(args[0].asObject(rt))
58
+ );
59
+ return jsi::Value::undefined();
60
+ }
61
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_initCGSDK(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
62
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->initCGSDK(
63
+ rt,
64
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
65
+ );
66
+ return jsi::Value::undefined();
67
+ }
68
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_loadCampaignById(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
69
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->loadCampaignById(
70
+ rt,
71
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
72
+ count <= 1 || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asObject(rt))
73
+ );
74
+ return jsi::Value::undefined();
75
+ }
76
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_loadCampaignWithUrl(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
77
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->loadCampaignWithUrl(
78
+ rt,
79
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
80
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt)
81
+ );
82
+ return jsi::Value::undefined();
83
+ }
84
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_enableAnalytic(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
85
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->enableAnalytic(
86
+ rt,
87
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
88
+ );
89
+ return jsi::Value::undefined();
90
+ }
91
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_allowAnonymousRegistration(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
92
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->allowAnonymousRegistration(
93
+ rt,
94
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
95
+ );
96
+ return jsi::Value::undefined();
97
+ }
98
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_gluSDKDebuggingMode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
99
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->gluSDKDebuggingMode(
100
+ rt,
101
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
102
+ );
103
+ return jsi::Value::undefined();
104
+ }
105
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_enableEntryPoints(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
106
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->enableEntryPoints(
107
+ rt,
108
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
109
+ );
110
+ return jsi::Value::undefined();
111
+ }
112
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_isFcmApn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
113
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->isFcmApn(
114
+ rt,
115
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
116
+ );
117
+ return jsi::Value::undefined();
118
+ }
119
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_UpdateProfile(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
120
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->UpdateProfile(
121
+ rt,
122
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
123
+ );
124
+ return jsi::Value::undefined();
125
+ }
126
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_DisplayCustomerGluNotification(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
127
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->DisplayCustomerGluNotification(
128
+ rt
129
+ );
130
+ return jsi::Value::undefined();
131
+ }
132
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_DisplayCGNotification(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
133
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->DisplayCGNotification(
134
+ rt,
135
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt),
136
+ count <= 1 || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asBool())
137
+ );
138
+ return jsi::Value::undefined();
139
+ }
140
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_DisplayCGBackgroundNotification(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
141
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->DisplayCGBackgroundNotification(
142
+ rt,
143
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt),
144
+ count <= 1 || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asBool())
145
+ );
146
+ return jsi::Value::undefined();
147
+ }
148
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_SetCurrentClassName(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
149
+ return static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->SetCurrentClassName(
150
+ rt,
151
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
152
+ );
153
+ }
154
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_setApnFcmToken(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
155
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->setApnFcmToken(
156
+ rt,
157
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
158
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
159
+ );
160
+ return jsi::Value::undefined();
161
+ }
162
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_getBannerHeight(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
163
+ return static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->getBannerHeight(
164
+ rt
165
+ );
166
+ }
167
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_addMarginsForPIP(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
168
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->addMarginsForPIP(
169
+ rt,
170
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
171
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(),
172
+ count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt)
173
+ );
174
+ return jsi::Value::undefined();
175
+ }
176
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_addDelayForPIP(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
177
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->addDelayForPIP(
178
+ rt,
179
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
180
+ );
181
+ return jsi::Value::undefined();
182
+ }
183
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_setOpenWalletAsFallback(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
184
+ static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->setOpenWalletAsFallback(
185
+ rt,
186
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
187
+ );
188
+ return jsi::Value::undefined();
189
+ }
190
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_isCampaignValid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
191
+ return static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->isCampaignValid(
192
+ rt,
193
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
194
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
195
+ );
196
+ }
197
+ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_getCampaignStatus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
198
+ return static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->getCampaignStatus(
199
+ rt,
200
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
201
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
202
+ );
203
+ }
204
+
205
+ NativeReactNativeCustomergluCxxSpecJSI::NativeReactNativeCustomergluCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
206
+ : TurboModule("Rncustomerglu", jsInvoker) {
207
+ methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_addListener};
208
+ methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_removeListeners};
209
+ methodMap_["registerDevice"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_registerDevice};
210
+ methodMap_["UpdateUserAttributes"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_UpdateUserAttributes};
211
+ methodMap_["dataClear"] = MethodMetadata {0, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_dataClear};
212
+ methodMap_["sendData"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_sendData};
213
+ methodMap_["openWallet"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_openWallet};
214
+ methodMap_["initCGSDK"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_initCGSDK};
215
+ methodMap_["loadCampaignById"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_loadCampaignById};
216
+ methodMap_["loadCampaignWithUrl"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_loadCampaignWithUrl};
217
+ methodMap_["enableAnalytic"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_enableAnalytic};
218
+ methodMap_["allowAnonymousRegistration"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_allowAnonymousRegistration};
219
+ methodMap_["gluSDKDebuggingMode"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_gluSDKDebuggingMode};
220
+ methodMap_["enableEntryPoints"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_enableEntryPoints};
221
+ methodMap_["isFcmApn"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_isFcmApn};
222
+ methodMap_["UpdateProfile"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_UpdateProfile};
223
+ methodMap_["DisplayCustomerGluNotification"] = MethodMetadata {0, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_DisplayCustomerGluNotification};
224
+ methodMap_["DisplayCGNotification"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_DisplayCGNotification};
225
+ methodMap_["DisplayCGBackgroundNotification"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_DisplayCGBackgroundNotification};
226
+ methodMap_["SetCurrentClassName"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_SetCurrentClassName};
227
+ methodMap_["setApnFcmToken"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_setApnFcmToken};
228
+ methodMap_["getBannerHeight"] = MethodMetadata {0, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_getBannerHeight};
229
+ methodMap_["addMarginsForPIP"] = MethodMetadata {3, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_addMarginsForPIP};
230
+ methodMap_["addDelayForPIP"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_addDelayForPIP};
231
+ methodMap_["setOpenWalletAsFallback"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_setOpenWalletAsFallback};
232
+ methodMap_["isCampaignValid"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_isCampaignValid};
233
+ methodMap_["getCampaignStatus"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_getCampaignStatus};
234
+ }
235
+
236
+
237
+ } // namespace facebook::react
@@ -0,0 +1,305 @@
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
+ class JSI_EXPORT NativeReactNativeCustomergluCxxSpecJSI : public TurboModule {
19
+ protected:
20
+ NativeReactNativeCustomergluCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
+
22
+ public:
23
+ virtual void addListener(jsi::Runtime &rt, jsi::String eventType) = 0;
24
+ virtual void removeListeners(jsi::Runtime &rt, double count) = 0;
25
+ virtual jsi::Value registerDevice(jsi::Runtime &rt, jsi::Object data) = 0;
26
+ virtual void UpdateUserAttributes(jsi::Runtime &rt, jsi::Object userdata) = 0;
27
+ virtual void dataClear(jsi::Runtime &rt) = 0;
28
+ virtual void sendData(jsi::Runtime &rt, jsi::Object obj) = 0;
29
+ virtual void openWallet(jsi::Runtime &rt, std::optional<jsi::Object> obj) = 0;
30
+ virtual void initCGSDK(jsi::Runtime &rt, jsi::String obj) = 0;
31
+ virtual void loadCampaignById(jsi::Runtime &rt, jsi::String id, std::optional<jsi::Object> obj) = 0;
32
+ virtual void loadCampaignWithUrl(jsi::Runtime &rt, jsi::String url, jsi::Object obj) = 0;
33
+ virtual void enableAnalytic(jsi::Runtime &rt, bool b) = 0;
34
+ virtual void allowAnonymousRegistration(jsi::Runtime &rt, bool b) = 0;
35
+ virtual void gluSDKDebuggingMode(jsi::Runtime &rt, bool b) = 0;
36
+ virtual void enableEntryPoints(jsi::Runtime &rt, bool b) = 0;
37
+ virtual void isFcmApn(jsi::Runtime &rt, bool id) = 0;
38
+ virtual void UpdateProfile(jsi::Runtime &rt, jsi::Object obj) = 0;
39
+ virtual void DisplayCustomerGluNotification(jsi::Runtime &rt) = 0;
40
+ virtual void DisplayCGNotification(jsi::Runtime &rt, jsi::Object obj, std::optional<bool> autoclosewebview) = 0;
41
+ virtual void DisplayCGBackgroundNotification(jsi::Runtime &rt, jsi::Object obj, std::optional<bool> autoclosewebview) = 0;
42
+ virtual jsi::Value SetCurrentClassName(jsi::Runtime &rt, jsi::String clname) = 0;
43
+ virtual void setApnFcmToken(jsi::Runtime &rt, jsi::String a, jsi::String b) = 0;
44
+ virtual jsi::Value getBannerHeight(jsi::Runtime &rt) = 0;
45
+ virtual void addMarginsForPIP(jsi::Runtime &rt, double horizontal, double vertical, jsi::String type) = 0;
46
+ virtual void addDelayForPIP(jsi::Runtime &rt, double delay) = 0;
47
+ virtual void setOpenWalletAsFallback(jsi::Runtime &rt, bool value) = 0;
48
+ virtual jsi::Value isCampaignValid(jsi::Runtime &rt, jsi::String campaignId, jsi::String dataFlag) = 0;
49
+ virtual jsi::Value getCampaignStatus(jsi::Runtime &rt, jsi::String campaignId, jsi::String dataFlag) = 0;
50
+
51
+ };
52
+
53
+ template <typename T>
54
+ class JSI_EXPORT NativeReactNativeCustomergluCxxSpec : public TurboModule {
55
+ public:
56
+ jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
57
+ return delegate_.create(rt, propName);
58
+ }
59
+
60
+ std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
61
+ return delegate_.getPropertyNames(runtime);
62
+ }
63
+
64
+ static constexpr std::string_view kModuleName = "Rncustomerglu";
65
+
66
+ protected:
67
+ NativeReactNativeCustomergluCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
68
+ : TurboModule(std::string{NativeReactNativeCustomergluCxxSpec::kModuleName}, jsInvoker),
69
+ delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
70
+
71
+
72
+ private:
73
+ class Delegate : public NativeReactNativeCustomergluCxxSpecJSI {
74
+ public:
75
+ Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
76
+ NativeReactNativeCustomergluCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
77
+
78
+ }
79
+
80
+ void addListener(jsi::Runtime &rt, jsi::String eventType) override {
81
+ static_assert(
82
+ bridging::getParameterCount(&T::addListener) == 2,
83
+ "Expected addListener(...) to have 2 parameters");
84
+
85
+ return bridging::callFromJs<void>(
86
+ rt, &T::addListener, jsInvoker_, instance_, std::move(eventType));
87
+ }
88
+ void removeListeners(jsi::Runtime &rt, double count) override {
89
+ static_assert(
90
+ bridging::getParameterCount(&T::removeListeners) == 2,
91
+ "Expected removeListeners(...) to have 2 parameters");
92
+
93
+ return bridging::callFromJs<void>(
94
+ rt, &T::removeListeners, jsInvoker_, instance_, std::move(count));
95
+ }
96
+ jsi::Value registerDevice(jsi::Runtime &rt, jsi::Object data) override {
97
+ static_assert(
98
+ bridging::getParameterCount(&T::registerDevice) == 2,
99
+ "Expected registerDevice(...) to have 2 parameters");
100
+
101
+ return bridging::callFromJs<jsi::Value>(
102
+ rt, &T::registerDevice, jsInvoker_, instance_, std::move(data));
103
+ }
104
+ void UpdateUserAttributes(jsi::Runtime &rt, jsi::Object userdata) override {
105
+ static_assert(
106
+ bridging::getParameterCount(&T::UpdateUserAttributes) == 2,
107
+ "Expected UpdateUserAttributes(...) to have 2 parameters");
108
+
109
+ return bridging::callFromJs<void>(
110
+ rt, &T::UpdateUserAttributes, jsInvoker_, instance_, std::move(userdata));
111
+ }
112
+ void dataClear(jsi::Runtime &rt) override {
113
+ static_assert(
114
+ bridging::getParameterCount(&T::dataClear) == 1,
115
+ "Expected dataClear(...) to have 1 parameters");
116
+
117
+ return bridging::callFromJs<void>(
118
+ rt, &T::dataClear, jsInvoker_, instance_);
119
+ }
120
+ void sendData(jsi::Runtime &rt, jsi::Object obj) override {
121
+ static_assert(
122
+ bridging::getParameterCount(&T::sendData) == 2,
123
+ "Expected sendData(...) to have 2 parameters");
124
+
125
+ return bridging::callFromJs<void>(
126
+ rt, &T::sendData, jsInvoker_, instance_, std::move(obj));
127
+ }
128
+ void openWallet(jsi::Runtime &rt, std::optional<jsi::Object> obj) override {
129
+ static_assert(
130
+ bridging::getParameterCount(&T::openWallet) == 2,
131
+ "Expected openWallet(...) to have 2 parameters");
132
+
133
+ return bridging::callFromJs<void>(
134
+ rt, &T::openWallet, jsInvoker_, instance_, std::move(obj));
135
+ }
136
+ void initCGSDK(jsi::Runtime &rt, jsi::String obj) override {
137
+ static_assert(
138
+ bridging::getParameterCount(&T::initCGSDK) == 2,
139
+ "Expected initCGSDK(...) to have 2 parameters");
140
+
141
+ return bridging::callFromJs<void>(
142
+ rt, &T::initCGSDK, jsInvoker_, instance_, std::move(obj));
143
+ }
144
+ void loadCampaignById(jsi::Runtime &rt, jsi::String id, std::optional<jsi::Object> obj) override {
145
+ static_assert(
146
+ bridging::getParameterCount(&T::loadCampaignById) == 3,
147
+ "Expected loadCampaignById(...) to have 3 parameters");
148
+
149
+ return bridging::callFromJs<void>(
150
+ rt, &T::loadCampaignById, jsInvoker_, instance_, std::move(id), std::move(obj));
151
+ }
152
+ void loadCampaignWithUrl(jsi::Runtime &rt, jsi::String url, jsi::Object obj) override {
153
+ static_assert(
154
+ bridging::getParameterCount(&T::loadCampaignWithUrl) == 3,
155
+ "Expected loadCampaignWithUrl(...) to have 3 parameters");
156
+
157
+ return bridging::callFromJs<void>(
158
+ rt, &T::loadCampaignWithUrl, jsInvoker_, instance_, std::move(url), std::move(obj));
159
+ }
160
+ void enableAnalytic(jsi::Runtime &rt, bool b) override {
161
+ static_assert(
162
+ bridging::getParameterCount(&T::enableAnalytic) == 2,
163
+ "Expected enableAnalytic(...) to have 2 parameters");
164
+
165
+ return bridging::callFromJs<void>(
166
+ rt, &T::enableAnalytic, jsInvoker_, instance_, std::move(b));
167
+ }
168
+ void allowAnonymousRegistration(jsi::Runtime &rt, bool b) override {
169
+ static_assert(
170
+ bridging::getParameterCount(&T::allowAnonymousRegistration) == 2,
171
+ "Expected allowAnonymousRegistration(...) to have 2 parameters");
172
+
173
+ return bridging::callFromJs<void>(
174
+ rt, &T::allowAnonymousRegistration, jsInvoker_, instance_, std::move(b));
175
+ }
176
+ void gluSDKDebuggingMode(jsi::Runtime &rt, bool b) override {
177
+ static_assert(
178
+ bridging::getParameterCount(&T::gluSDKDebuggingMode) == 2,
179
+ "Expected gluSDKDebuggingMode(...) to have 2 parameters");
180
+
181
+ return bridging::callFromJs<void>(
182
+ rt, &T::gluSDKDebuggingMode, jsInvoker_, instance_, std::move(b));
183
+ }
184
+ void enableEntryPoints(jsi::Runtime &rt, bool b) override {
185
+ static_assert(
186
+ bridging::getParameterCount(&T::enableEntryPoints) == 2,
187
+ "Expected enableEntryPoints(...) to have 2 parameters");
188
+
189
+ return bridging::callFromJs<void>(
190
+ rt, &T::enableEntryPoints, jsInvoker_, instance_, std::move(b));
191
+ }
192
+ void isFcmApn(jsi::Runtime &rt, bool id) override {
193
+ static_assert(
194
+ bridging::getParameterCount(&T::isFcmApn) == 2,
195
+ "Expected isFcmApn(...) to have 2 parameters");
196
+
197
+ return bridging::callFromJs<void>(
198
+ rt, &T::isFcmApn, jsInvoker_, instance_, std::move(id));
199
+ }
200
+ void UpdateProfile(jsi::Runtime &rt, jsi::Object obj) override {
201
+ static_assert(
202
+ bridging::getParameterCount(&T::UpdateProfile) == 2,
203
+ "Expected UpdateProfile(...) to have 2 parameters");
204
+
205
+ return bridging::callFromJs<void>(
206
+ rt, &T::UpdateProfile, jsInvoker_, instance_, std::move(obj));
207
+ }
208
+ void DisplayCustomerGluNotification(jsi::Runtime &rt) override {
209
+ static_assert(
210
+ bridging::getParameterCount(&T::DisplayCustomerGluNotification) == 1,
211
+ "Expected DisplayCustomerGluNotification(...) to have 1 parameters");
212
+
213
+ return bridging::callFromJs<void>(
214
+ rt, &T::DisplayCustomerGluNotification, jsInvoker_, instance_);
215
+ }
216
+ void DisplayCGNotification(jsi::Runtime &rt, jsi::Object obj, std::optional<bool> autoclosewebview) override {
217
+ static_assert(
218
+ bridging::getParameterCount(&T::DisplayCGNotification) == 3,
219
+ "Expected DisplayCGNotification(...) to have 3 parameters");
220
+
221
+ return bridging::callFromJs<void>(
222
+ rt, &T::DisplayCGNotification, jsInvoker_, instance_, std::move(obj), std::move(autoclosewebview));
223
+ }
224
+ void DisplayCGBackgroundNotification(jsi::Runtime &rt, jsi::Object obj, std::optional<bool> autoclosewebview) override {
225
+ static_assert(
226
+ bridging::getParameterCount(&T::DisplayCGBackgroundNotification) == 3,
227
+ "Expected DisplayCGBackgroundNotification(...) to have 3 parameters");
228
+
229
+ return bridging::callFromJs<void>(
230
+ rt, &T::DisplayCGBackgroundNotification, jsInvoker_, instance_, std::move(obj), std::move(autoclosewebview));
231
+ }
232
+ jsi::Value SetCurrentClassName(jsi::Runtime &rt, jsi::String clname) override {
233
+ static_assert(
234
+ bridging::getParameterCount(&T::SetCurrentClassName) == 2,
235
+ "Expected SetCurrentClassName(...) to have 2 parameters");
236
+
237
+ return bridging::callFromJs<jsi::Value>(
238
+ rt, &T::SetCurrentClassName, jsInvoker_, instance_, std::move(clname));
239
+ }
240
+ void setApnFcmToken(jsi::Runtime &rt, jsi::String a, jsi::String b) override {
241
+ static_assert(
242
+ bridging::getParameterCount(&T::setApnFcmToken) == 3,
243
+ "Expected setApnFcmToken(...) to have 3 parameters");
244
+
245
+ return bridging::callFromJs<void>(
246
+ rt, &T::setApnFcmToken, jsInvoker_, instance_, std::move(a), std::move(b));
247
+ }
248
+ jsi::Value getBannerHeight(jsi::Runtime &rt) override {
249
+ static_assert(
250
+ bridging::getParameterCount(&T::getBannerHeight) == 1,
251
+ "Expected getBannerHeight(...) to have 1 parameters");
252
+
253
+ return bridging::callFromJs<jsi::Value>(
254
+ rt, &T::getBannerHeight, jsInvoker_, instance_);
255
+ }
256
+ void addMarginsForPIP(jsi::Runtime &rt, double horizontal, double vertical, jsi::String type) override {
257
+ static_assert(
258
+ bridging::getParameterCount(&T::addMarginsForPIP) == 4,
259
+ "Expected addMarginsForPIP(...) to have 4 parameters");
260
+
261
+ return bridging::callFromJs<void>(
262
+ rt, &T::addMarginsForPIP, jsInvoker_, instance_, std::move(horizontal), std::move(vertical), std::move(type));
263
+ }
264
+ void addDelayForPIP(jsi::Runtime &rt, double delay) override {
265
+ static_assert(
266
+ bridging::getParameterCount(&T::addDelayForPIP) == 2,
267
+ "Expected addDelayForPIP(...) to have 2 parameters");
268
+
269
+ return bridging::callFromJs<void>(
270
+ rt, &T::addDelayForPIP, jsInvoker_, instance_, std::move(delay));
271
+ }
272
+ void setOpenWalletAsFallback(jsi::Runtime &rt, bool value) override {
273
+ static_assert(
274
+ bridging::getParameterCount(&T::setOpenWalletAsFallback) == 2,
275
+ "Expected setOpenWalletAsFallback(...) to have 2 parameters");
276
+
277
+ return bridging::callFromJs<void>(
278
+ rt, &T::setOpenWalletAsFallback, jsInvoker_, instance_, std::move(value));
279
+ }
280
+ jsi::Value isCampaignValid(jsi::Runtime &rt, jsi::String campaignId, jsi::String dataFlag) override {
281
+ static_assert(
282
+ bridging::getParameterCount(&T::isCampaignValid) == 3,
283
+ "Expected isCampaignValid(...) to have 3 parameters");
284
+
285
+ return bridging::callFromJs<jsi::Value>(
286
+ rt, &T::isCampaignValid, jsInvoker_, instance_, std::move(campaignId), std::move(dataFlag));
287
+ }
288
+ jsi::Value getCampaignStatus(jsi::Runtime &rt, jsi::String campaignId, jsi::String dataFlag) override {
289
+ static_assert(
290
+ bridging::getParameterCount(&T::getCampaignStatus) == 3,
291
+ "Expected getCampaignStatus(...) to have 3 parameters");
292
+
293
+ return bridging::callFromJs<jsi::Value>(
294
+ rt, &T::getCampaignStatus, jsInvoker_, instance_, std::move(campaignId), std::move(dataFlag));
295
+ }
296
+
297
+ private:
298
+ friend class NativeReactNativeCustomergluCxxSpec;
299
+ T *instance_;
300
+ };
301
+
302
+ Delegate delegate_;
303
+ };
304
+
305
+ } // namespace facebook::react
@@ -0,0 +1,5 @@
1
+ ReactNativeCustomerglu_kotlinVersion=2.0.21
2
+ ReactNativeCustomerglu_minSdkVersion=24
3
+ ReactNativeCustomerglu_targetSdkVersion=34
4
+ ReactNativeCustomerglu_compileSdkVersion=35
5
+ ReactNativeCustomerglu_ndkVersion=27.1.12297006
@@ -1,8 +1,3 @@
1
1
  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.reactnativerncustomerglu">
3
-
4
- <!-- only value should be changed -->
5
-
6
-
7
-
2
+ package="com.customerglu.reactnativecustomerglu">
8
3
  </manifest>
@@ -0,0 +1,2 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ </manifest>
@@ -0,0 +1,76 @@
1
+ package com.customerglu.reactnativecustomerglu
2
+
3
+ import android.widget.FrameLayout
4
+ import com.customerglu.sdk.entrypoints.Banner
5
+ import com.facebook.react.uimanager.ThemedReactContext
6
+
7
+ class BannerView(private val context: ThemedReactContext) : FrameLayout(context) {
8
+ private var banner: Banner? = null
9
+
10
+ override fun requestLayout() {
11
+ super.requestLayout()
12
+ post(measureAndLayout)
13
+ }
14
+
15
+ private val measureAndLayout = Runnable {
16
+ measure(
17
+ MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
18
+ MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)
19
+ )
20
+ layout(left, top, right, bottom)
21
+ }
22
+
23
+ override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
24
+ var maxWidth = 0
25
+ var maxHeight = 0
26
+
27
+ for (i in 0 until childCount) {
28
+ getChildAt(i)?.let { child ->
29
+ if (child.visibility != GONE) {
30
+ measureChild(child, widthMeasureSpec, MeasureSpec.UNSPECIFIED)
31
+ maxWidth = maxWidth.coerceAtLeast(child.measuredWidth)
32
+ maxHeight = maxHeight.coerceAtLeast(child.measuredHeight)
33
+ }
34
+ }
35
+ }
36
+
37
+ setMeasuredDimension(
38
+ maxWidth.coerceAtLeast(suggestedMinimumWidth),
39
+ maxHeight.coerceAtLeast(suggestedMinimumHeight)
40
+ )
41
+ }
42
+
43
+ fun setBannerId(id: String) {
44
+ try {
45
+ context.currentActivity?.let { activity ->
46
+ // Remove existing banner if any
47
+ removeAllViews()
48
+
49
+ try {
50
+ banner = Banner(activity, id)
51
+ banner?.let { addView(it) }
52
+ } catch (e: Exception) {
53
+ // Log the error for debugging
54
+ android.util.Log.e("BannerView", "Error creating Banner: ${e.message}")
55
+ e.printStackTrace()
56
+
57
+ // Create an error view to display
58
+ val errorView = android.widget.TextView(context).apply {
59
+ text = "Banner initialization failed. Please ensure SDK is initialized."
60
+ layoutParams = android.widget.FrameLayout.LayoutParams(
61
+ android.widget.FrameLayout.LayoutParams.WRAP_CONTENT,
62
+ android.widget.FrameLayout.LayoutParams.WRAP_CONTENT
63
+ ).apply {
64
+ gravity = android.view.Gravity.CENTER
65
+ }
66
+ setTextColor(android.graphics.Color.RED)
67
+ }
68
+ addView(errorView)
69
+ }
70
+ }
71
+ } catch (e: Exception) {
72
+ android.util.Log.e("CustomView", "Error in setBannerId: ${e.message}")
73
+ e.printStackTrace()
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,19 @@
1
+ package com.customerglu.reactnativecustomerglu
2
+
3
+ import com.facebook.react.uimanager.SimpleViewManager
4
+ import com.facebook.react.uimanager.ThemedReactContext
5
+ import com.facebook.react.uimanager.annotations.ReactProp
6
+
7
+ class BannerViewManager : SimpleViewManager<BannerView>() {
8
+ override fun getName(): String = "BannerView"
9
+
10
+ override fun createViewInstance(reactContext: ThemedReactContext): BannerView {
11
+ return BannerView(reactContext)
12
+ }
13
+
14
+ @ReactProp(name = "bannerId")
15
+ fun setBannerId(view: BannerView, bannerId: String?) {
16
+ bannerId?.let { view.setBannerId(it) }
17
+ }
18
+ }
19
+