@customerglu/react-native-customerglu 2.1.1 → 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
package/LICENSE CHANGED
@@ -1,15 +1,20 @@
1
- /*
2
- * Copyright 2012 bose999.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13
- * either express or implied. See the License for the specific language
14
- * governing permissions and limitations under the License.
15
- */
1
+ MIT License
2
+
3
+ Copyright (c) 2025 CustomerGlu
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md CHANGED
@@ -16,7 +16,7 @@ Supports API 21 and above. Please ensure the minSDKVersion in the app's build.gr
16
16
  ### Option 1
17
17
  Add the CustomerGlu React Native plugin in package.json file
18
18
  ```
19
- "@customerglu/react-native-customerglu": "^8"
19
+ "@customerglu/react-native-customerglu": "^3.0.0-beta-1.0"
20
20
  ```
21
21
 
22
22
  ### Option 2
@@ -27,4 +27,4 @@ npm install @customerglu/react-native-customerglu
27
27
 
28
28
  # Initialisation & Functionalities
29
29
 
30
- Please refer to the [Documentation here](https://docs.customerglu.com/sdk/mobile-sdks#react-native)
30
+ Please refer to the [Documentation here](https://docs.customerglu.com/sdk/mobile-sdks#react-native)
@@ -0,0 +1,42 @@
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5
+
6
+ Pod::Spec.new do |s|
7
+ s.name = "ReactNativeCustomerglu"
8
+ s.version = package["version"]
9
+ s.summary = package["description"]
10
+ s.homepage = package["homepage"]
11
+ s.license = package["license"]
12
+ s.authors = package["author"]
13
+
14
+ s.platforms = { :ios => min_ios_version_supported }
15
+ s.source = { :git => "https://github.com/customerglu/CG-SDK-React-Native.git", :tag => "#{s.version}" }
16
+
17
+ s.source_files = "ios/**/*.{h,m,mm,cpp}"
18
+ s.private_header_files = "ios/generated/**/*.h"
19
+
20
+ # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
21
+ # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
22
+ if respond_to?(:install_modules_dependencies, true)
23
+ install_modules_dependencies(s)
24
+ else
25
+ s.dependency "React-Core"
26
+
27
+ # Don't install the dependencies when we run `pod install` in the old architecture.
28
+ if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
29
+ s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
30
+ s.pod_target_xcconfig = {
31
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
32
+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
33
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
34
+ }
35
+ s.dependency "React-Codegen"
36
+ s.dependency "RCT-Folly"
37
+ s.dependency "RCTRequired"
38
+ s.dependency "RCTTypeSafety"
39
+ s.dependency "ReactCommon/turbomodule/core"
40
+ end
41
+ end
42
+ end
@@ -1,35 +1,66 @@
1
1
  buildscript {
2
- if (project == rootProject) {
3
- repositories {
4
- google()
5
- mavenCentral()
2
+ ext.getExtOrDefault = {name ->
3
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['RnCustomerglu_' + name]
4
+ }
6
5
 
7
- maven { url "https://jitpack.io" }
8
- }
6
+ repositories {
7
+ google()
8
+ mavenCentral()
9
+ }
9
10
 
10
- dependencies {
11
- classpath 'com.android.tools.build:gradle:4.2.0'
11
+ dependencies {
12
+ classpath "com.android.tools.build:gradle:8.7.2"
13
+ // noinspection DifferentKotlinGradleVersion
14
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
15
+ }
16
+ }
12
17
 
13
18
 
14
- }
15
- }
19
+ def isNewArchitectureEnabled() {
20
+ return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
21
+ }
22
+
23
+ apply plugin: "com.android.library"
24
+ apply plugin: "kotlin-android"
16
25
 
26
+ if (isNewArchitectureEnabled()) {
27
+ apply plugin: "com.facebook.react"
17
28
  }
18
29
 
19
- apply plugin: 'com.android.library'
30
+ def getExtOrIntegerDefault(name) {
31
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["Rncustomerglu" + name]).toInteger()
32
+ }
33
+
34
+ def supportsNamespace() {
35
+ def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
36
+ def major = parsed[0].toInteger()
37
+ def minor = parsed[1].toInteger()
20
38
 
21
- def safeExtGet(prop, fallback) {
22
- rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
39
+ // Namespace support was added in 7.3.0
40
+ return (major == 7 && minor >= 3) || major >= 8
23
41
  }
24
42
 
25
43
  android {
26
- compileSdkVersion safeExtGet('Rncustomerglu_compileSdkVersion', 34)
44
+ if (supportsNamespace()) {
45
+ namespace "com.customerglu.reactnativecustomerglu"
46
+
47
+ sourceSets {
48
+ main {
49
+ manifest.srcFile "src/main/AndroidManifestNew.xml"
50
+ }
51
+ }
52
+ }
53
+
54
+ compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
55
+
27
56
  defaultConfig {
28
- minSdkVersion safeExtGet('Rncustomerglu_minSdkVersion', 21)
29
- targetSdkVersion safeExtGet('Rncustomerglu_targetSdkVersion', 34)
30
- versionCode 1
31
- versionName "1.0"
57
+ minSdkVersion getExtOrIntegerDefault("minSdkVersion")
58
+ targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
59
+ buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
60
+ }
32
61
 
62
+ buildFeatures {
63
+ buildConfig true
33
64
  }
34
65
 
35
66
  buildTypes {
@@ -37,33 +68,47 @@ android {
37
68
  minifyEnabled false
38
69
  }
39
70
  }
71
+
40
72
  lintOptions {
41
- disable 'GradleCompatible'
73
+ disable "GradleCompatible"
42
74
  }
75
+
43
76
  compileOptions {
44
77
  sourceCompatibility JavaVersion.VERSION_1_8
45
78
  targetCompatibility JavaVersion.VERSION_1_8
46
79
  }
80
+
81
+ sourceSets {
82
+ main {
83
+ if (isNewArchitectureEnabled()) {
84
+ java.srcDirs += [
85
+ "generated/java",
86
+ "generated/jni"
87
+ ]
88
+ }
89
+ }
90
+ }
47
91
  }
48
92
 
49
93
  repositories {
50
- mavenLocal()
51
- maven {
52
- // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
53
- url("$rootDir/../node_modules/react-native/android")
54
- }
55
- google()
56
94
  mavenCentral()
57
-
58
- maven { url "https://jitpack.io" }
95
+ google()
59
96
  }
60
97
 
98
+ def kotlin_version = getExtOrDefault("kotlinVersion")
99
+
61
100
  dependencies {
62
- //noinspection GradleDynamicVersion
63
- implementation "com.facebook.react:react-native:+" // From node_modules
64
- implementation 'com.customerglu:CustomerGluLibrary:3.0.6'
65
- implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
101
+ implementation "com.facebook.react:react-android"
102
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
66
103
  implementation 'com.google.code.gson:gson:2.8.6'
67
- implementation 'androidx.cardview:cardview:1.0.0'
68
- implementation 'androidx.recyclerview:recyclerview:1.2.0'
104
+ implementation 'com.customerglu:CustomerGluLibrary:3.0.6'
105
+
106
+ }
107
+
108
+ if (isNewArchitectureEnabled()) {
109
+ react {
110
+ jsRootDir = file("../src/")
111
+ libraryName = "Rncustomerglu"
112
+ codegenJavaPackageName = "com.customerglu.reactnativecustomerglu"
113
+ }
69
114
  }
@@ -0,0 +1,144 @@
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.customerglu.reactnativecustomerglu;
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
+ import javax.annotation.Nullable;
24
+
25
+ public abstract class NativeReactNativeCustomergluSpec extends ReactContextBaseJavaModule implements TurboModule {
26
+ public static final String NAME = "Rncustomerglu";
27
+
28
+ public NativeReactNativeCustomergluSpec(ReactApplicationContext reactContext) {
29
+ super(reactContext);
30
+ }
31
+
32
+ @Override
33
+ public @Nonnull String getName() {
34
+ return NAME;
35
+ }
36
+
37
+ @ReactMethod
38
+ @DoNotStrip
39
+ public abstract void addListener(String eventType);
40
+
41
+ @ReactMethod
42
+ @DoNotStrip
43
+ public abstract void removeListeners(double count);
44
+
45
+ @ReactMethod
46
+ @DoNotStrip
47
+ public abstract void registerDevice(ReadableMap data, Promise promise);
48
+
49
+ @ReactMethod
50
+ @DoNotStrip
51
+ public abstract void UpdateUserAttributes(ReadableMap userdata);
52
+
53
+ @ReactMethod
54
+ @DoNotStrip
55
+ public abstract void dataClear();
56
+
57
+ @ReactMethod
58
+ @DoNotStrip
59
+ public abstract void sendData(ReadableMap obj);
60
+
61
+ @ReactMethod
62
+ @DoNotStrip
63
+ public abstract void openWallet(@Nullable ReadableMap obj);
64
+
65
+ @ReactMethod
66
+ @DoNotStrip
67
+ public abstract void initCGSDK(String obj);
68
+
69
+ @ReactMethod
70
+ @DoNotStrip
71
+ public abstract void loadCampaignById(String id, @Nullable ReadableMap obj);
72
+
73
+ @ReactMethod
74
+ @DoNotStrip
75
+ public abstract void loadCampaignWithUrl(String url, ReadableMap obj);
76
+
77
+ @ReactMethod
78
+ @DoNotStrip
79
+ public abstract void enableAnalytic(boolean b);
80
+
81
+ @ReactMethod
82
+ @DoNotStrip
83
+ public abstract void allowAnonymousRegistration(boolean b);
84
+
85
+ @ReactMethod
86
+ @DoNotStrip
87
+ public abstract void gluSDKDebuggingMode(boolean b);
88
+
89
+ @ReactMethod
90
+ @DoNotStrip
91
+ public abstract void enableEntryPoints(boolean b);
92
+
93
+ @ReactMethod
94
+ @DoNotStrip
95
+ public abstract void isFcmApn(boolean id);
96
+
97
+ @ReactMethod
98
+ @DoNotStrip
99
+ public abstract void UpdateProfile(ReadableMap obj);
100
+
101
+ @ReactMethod
102
+ @DoNotStrip
103
+ public abstract void DisplayCustomerGluNotification();
104
+
105
+ @ReactMethod
106
+ @DoNotStrip
107
+ public abstract void DisplayCGNotification(ReadableMap obj, @Nullable Boolean autoclosewebview);
108
+
109
+ @ReactMethod
110
+ @DoNotStrip
111
+ public abstract void DisplayCGBackgroundNotification(ReadableMap obj, @Nullable Boolean autoclosewebview);
112
+
113
+ @ReactMethod
114
+ @DoNotStrip
115
+ public abstract void SetCurrentClassName(String clname, Promise promise);
116
+
117
+ @ReactMethod
118
+ @DoNotStrip
119
+ public abstract void setApnFcmToken(String a, String b);
120
+
121
+ @ReactMethod
122
+ @DoNotStrip
123
+ public abstract void getBannerHeight(Promise promise);
124
+
125
+ @ReactMethod
126
+ @DoNotStrip
127
+ public abstract void addMarginsForPIP(double horizontal, double vertical, String type);
128
+
129
+ @ReactMethod
130
+ @DoNotStrip
131
+ public abstract void addDelayForPIP(double delay);
132
+
133
+ @ReactMethod
134
+ @DoNotStrip
135
+ public abstract void setOpenWalletAsFallback(boolean value);
136
+
137
+ @ReactMethod
138
+ @DoNotStrip
139
+ public abstract void isCampaignValid(String campaignId, String dataFlag, Promise promise);
140
+
141
+ @ReactMethod
142
+ @DoNotStrip
143
+ public abstract void getCampaignStatus(String campaignId, String dataFlag, Promise promise);
144
+ }
@@ -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/RNReactNativeCustomergluSpec/*.cpp)
10
+
11
+ add_library(
12
+ react_codegen_RNReactNativeCustomergluSpec
13
+ OBJECT
14
+ ${react_codegen_SRCS}
15
+ )
16
+
17
+ target_include_directories(react_codegen_RNReactNativeCustomergluSpec PUBLIC . react/renderer/components/RNReactNativeCustomergluSpec)
18
+
19
+ target_link_libraries(
20
+ react_codegen_RNReactNativeCustomergluSpec
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_RNReactNativeCustomergluSpec
30
+ PRIVATE
31
+ -DLOG_TAG=\"ReactNative\"
32
+ -fexceptions
33
+ -frtti
34
+ -std=c++20
35
+ -Wall
36
+ )
@@ -0,0 +1,188 @@
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 "RNReactNativeCustomergluSpec.h"
12
+
13
+ namespace facebook::react {
14
+
15
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_addListener(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, VoidKind, "addListener", "(Ljava/lang/String;)V", args, count, cachedMethodId);
18
+ }
19
+
20
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_removeListeners(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, VoidKind, "removeListeners", "(D)V", args, count, cachedMethodId);
23
+ }
24
+
25
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_registerDevice(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, "registerDevice", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
28
+ }
29
+
30
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_UpdateUserAttributes(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, "UpdateUserAttributes", "(Lcom/facebook/react/bridge/ReadableMap;)V", args, count, cachedMethodId);
33
+ }
34
+
35
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_dataClear(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, "dataClear", "()V", args, count, cachedMethodId);
38
+ }
39
+
40
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_sendData(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, VoidKind, "sendData", "(Lcom/facebook/react/bridge/ReadableMap;)V", args, count, cachedMethodId);
43
+ }
44
+
45
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_openWallet(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, "openWallet", "(Lcom/facebook/react/bridge/ReadableMap;)V", args, count, cachedMethodId);
48
+ }
49
+
50
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_initCGSDK(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
51
+ static jmethodID cachedMethodId = nullptr;
52
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "initCGSDK", "(Ljava/lang/String;)V", args, count, cachedMethodId);
53
+ }
54
+
55
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_loadCampaignById(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
56
+ static jmethodID cachedMethodId = nullptr;
57
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "loadCampaignById", "(Ljava/lang/String;Lcom/facebook/react/bridge/ReadableMap;)V", args, count, cachedMethodId);
58
+ }
59
+
60
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_loadCampaignWithUrl(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
61
+ static jmethodID cachedMethodId = nullptr;
62
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "loadCampaignWithUrl", "(Ljava/lang/String;Lcom/facebook/react/bridge/ReadableMap;)V", args, count, cachedMethodId);
63
+ }
64
+
65
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_enableAnalytic(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
66
+ static jmethodID cachedMethodId = nullptr;
67
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "enableAnalytic", "(Z)V", args, count, cachedMethodId);
68
+ }
69
+
70
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_allowAnonymousRegistration(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
71
+ static jmethodID cachedMethodId = nullptr;
72
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "allowAnonymousRegistration", "(Z)V", args, count, cachedMethodId);
73
+ }
74
+
75
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_gluSDKDebuggingMode(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
76
+ static jmethodID cachedMethodId = nullptr;
77
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "gluSDKDebuggingMode", "(Z)V", args, count, cachedMethodId);
78
+ }
79
+
80
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_enableEntryPoints(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
81
+ static jmethodID cachedMethodId = nullptr;
82
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "enableEntryPoints", "(Z)V", args, count, cachedMethodId);
83
+ }
84
+
85
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_isFcmApn(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
86
+ static jmethodID cachedMethodId = nullptr;
87
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "isFcmApn", "(Z)V", args, count, cachedMethodId);
88
+ }
89
+
90
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_UpdateProfile(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
91
+ static jmethodID cachedMethodId = nullptr;
92
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "UpdateProfile", "(Lcom/facebook/react/bridge/ReadableMap;)V", args, count, cachedMethodId);
93
+ }
94
+
95
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_DisplayCustomerGluNotification(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
96
+ static jmethodID cachedMethodId = nullptr;
97
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "DisplayCustomerGluNotification", "()V", args, count, cachedMethodId);
98
+ }
99
+
100
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_DisplayCGNotification(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
101
+ static jmethodID cachedMethodId = nullptr;
102
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "DisplayCGNotification", "(Lcom/facebook/react/bridge/ReadableMap;Ljava/lang/Boolean;)V", args, count, cachedMethodId);
103
+ }
104
+
105
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_DisplayCGBackgroundNotification(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
106
+ static jmethodID cachedMethodId = nullptr;
107
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "DisplayCGBackgroundNotification", "(Lcom/facebook/react/bridge/ReadableMap;Ljava/lang/Boolean;)V", args, count, cachedMethodId);
108
+ }
109
+
110
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_SetCurrentClassName(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
111
+ static jmethodID cachedMethodId = nullptr;
112
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "SetCurrentClassName", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
113
+ }
114
+
115
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_setApnFcmToken(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
116
+ static jmethodID cachedMethodId = nullptr;
117
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "setApnFcmToken", "(Ljava/lang/String;Ljava/lang/String;)V", args, count, cachedMethodId);
118
+ }
119
+
120
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_getBannerHeight(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
121
+ static jmethodID cachedMethodId = nullptr;
122
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getBannerHeight", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
123
+ }
124
+
125
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_addMarginsForPIP(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
126
+ static jmethodID cachedMethodId = nullptr;
127
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "addMarginsForPIP", "(DDLjava/lang/String;)V", args, count, cachedMethodId);
128
+ }
129
+
130
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_addDelayForPIP(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
131
+ static jmethodID cachedMethodId = nullptr;
132
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "addDelayForPIP", "(D)V", args, count, cachedMethodId);
133
+ }
134
+
135
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_setOpenWalletAsFallback(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
136
+ static jmethodID cachedMethodId = nullptr;
137
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "setOpenWalletAsFallback", "(Z)V", args, count, cachedMethodId);
138
+ }
139
+
140
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_isCampaignValid(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
141
+ static jmethodID cachedMethodId = nullptr;
142
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "isCampaignValid", "(Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
143
+ }
144
+
145
+ static facebook::jsi::Value __hostFunction_NativeReactNativeCustomergluSpecJSI_getCampaignStatus(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
146
+ static jmethodID cachedMethodId = nullptr;
147
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getCampaignStatus", "(Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
148
+ }
149
+
150
+ NativeReactNativeCustomergluSpecJSI::NativeReactNativeCustomergluSpecJSI(const JavaTurboModule::InitParams &params)
151
+ : JavaTurboModule(params) {
152
+ methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_addListener};
153
+ methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_removeListeners};
154
+ methodMap_["registerDevice"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_registerDevice};
155
+ methodMap_["UpdateUserAttributes"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_UpdateUserAttributes};
156
+ methodMap_["dataClear"] = MethodMetadata {0, __hostFunction_NativeReactNativeCustomergluSpecJSI_dataClear};
157
+ methodMap_["sendData"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_sendData};
158
+ methodMap_["openWallet"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_openWallet};
159
+ methodMap_["initCGSDK"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_initCGSDK};
160
+ methodMap_["loadCampaignById"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluSpecJSI_loadCampaignById};
161
+ methodMap_["loadCampaignWithUrl"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluSpecJSI_loadCampaignWithUrl};
162
+ methodMap_["enableAnalytic"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_enableAnalytic};
163
+ methodMap_["allowAnonymousRegistration"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_allowAnonymousRegistration};
164
+ methodMap_["gluSDKDebuggingMode"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_gluSDKDebuggingMode};
165
+ methodMap_["enableEntryPoints"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_enableEntryPoints};
166
+ methodMap_["isFcmApn"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_isFcmApn};
167
+ methodMap_["UpdateProfile"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_UpdateProfile};
168
+ methodMap_["DisplayCustomerGluNotification"] = MethodMetadata {0, __hostFunction_NativeReactNativeCustomergluSpecJSI_DisplayCustomerGluNotification};
169
+ methodMap_["DisplayCGNotification"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluSpecJSI_DisplayCGNotification};
170
+ methodMap_["DisplayCGBackgroundNotification"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluSpecJSI_DisplayCGBackgroundNotification};
171
+ methodMap_["SetCurrentClassName"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_SetCurrentClassName};
172
+ methodMap_["setApnFcmToken"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluSpecJSI_setApnFcmToken};
173
+ methodMap_["getBannerHeight"] = MethodMetadata {0, __hostFunction_NativeReactNativeCustomergluSpecJSI_getBannerHeight};
174
+ methodMap_["addMarginsForPIP"] = MethodMetadata {3, __hostFunction_NativeReactNativeCustomergluSpecJSI_addMarginsForPIP};
175
+ methodMap_["addDelayForPIP"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_addDelayForPIP};
176
+ methodMap_["setOpenWalletAsFallback"] = MethodMetadata {1, __hostFunction_NativeReactNativeCustomergluSpecJSI_setOpenWalletAsFallback};
177
+ methodMap_["isCampaignValid"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluSpecJSI_isCampaignValid};
178
+ methodMap_["getCampaignStatus"] = MethodMetadata {2, __hostFunction_NativeReactNativeCustomergluSpecJSI_getCampaignStatus};
179
+ }
180
+
181
+ std::shared_ptr<TurboModule> RNReactNativeCustomergluSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
182
+ if (moduleName == "Rncustomerglu") {
183
+ return std::make_shared<NativeReactNativeCustomergluSpecJSI>(params);
184
+ }
185
+ return nullptr;
186
+ }
187
+
188
+ } // 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 'NativeReactNativeCustomerglu'
21
+ */
22
+ class JSI_EXPORT NativeReactNativeCustomergluSpecJSI : public JavaTurboModule {
23
+ public:
24
+ NativeReactNativeCustomergluSpecJSI(const JavaTurboModule::InitParams &params);
25
+ };
26
+
27
+
28
+ JSI_EXPORT
29
+ std::shared_ptr<TurboModule> RNReactNativeCustomergluSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params);
30
+
31
+ } // namespace facebook::react