@screeb/react-native 0.8.13 → 0.8.16
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/android/build.gradle +1 -2
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/screebmodule/ScreebModuleModule.kt +2 -2
- package/ios/ScreebModule.m +1 -1
- package/ios/ScreebModule.swift +2 -2
- package/package.json +1 -1
- package/screeb-module.podspec +1 -1
- package/src/index.tsx +2 -2
package/android/build.gradle
CHANGED
|
@@ -32,7 +32,6 @@ android {
|
|
|
32
32
|
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
33
33
|
versionCode 1
|
|
34
34
|
versionName "0.2.0"
|
|
35
|
-
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
buildTypes {
|
|
@@ -124,6 +123,6 @@ def kotlin_version = getExtOrDefault('kotlinVersion')
|
|
|
124
123
|
dependencies {
|
|
125
124
|
// noinspection GradleDynamicVersion
|
|
126
125
|
api 'com.facebook.react:react-native:+'
|
|
127
|
-
implementation "app.screeb.sdk:survey:1.
|
|
126
|
+
implementation "app.screeb.sdk:survey:1.13.1"
|
|
128
127
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.7.0"
|
|
129
128
|
}
|
|
@@ -104,14 +104,14 @@ class ScreebModuleModule(reactContext: ReactApplicationContext) :
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
@ReactMethod
|
|
107
|
-
fun startSurvey(surveyId: String, allowMultipleResponses: Boolean? = true, hiddenFields: ReadableMap? = null) {
|
|
107
|
+
fun startSurvey(surveyId: String, allowMultipleResponses: Boolean? = true, hiddenFields: ReadableMap? = null, ignoreSurveyStatus: Boolean? = true) {
|
|
108
108
|
Log.e("ScreebModule", "Called startSurvey : $surveyId")
|
|
109
109
|
var map: HashMap<String, Any>? = null
|
|
110
110
|
if (hiddenFields != null) {
|
|
111
111
|
map = hiddenFields.toHashMap()
|
|
112
112
|
}
|
|
113
113
|
Handler(Looper.getMainLooper()).post {
|
|
114
|
-
Screeb.startSurvey(surveyId, allowMultipleResponses ?: true, map)
|
|
114
|
+
Screeb.startSurvey(surveyId, allowMultipleResponses ?: true, map, ignoreSurveyStatus ?: true)
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
package/ios/ScreebModule.m
CHANGED
|
@@ -9,7 +9,7 @@ RCT_EXTERN_METHOD(assignGroup:(NSString *)type name:(NSString *)name_ properties
|
|
|
9
9
|
RCT_EXTERN_METHOD(unassignGroup:(NSString *)type name:(NSString *)name_ properties:(NSDictionary<NSString *, id> *)properties_)
|
|
10
10
|
RCT_EXTERN_METHOD(trackEvent:(NSString *)eventId properties:(NSDictionary<NSString *, id> *)properties_)
|
|
11
11
|
RCT_EXTERN_METHOD(trackScreen:(NSString *)screen properties:(NSDictionary<NSString *, id> *)properties_)
|
|
12
|
-
RCT_EXTERN_METHOD(startSurvey:(NSString *)surveyId allowMultipleResponses:(BOOL)allowMultipleResponses_ hiddenFields:(NSDictionary<NSString *, id> *)hiddenFields_)
|
|
12
|
+
RCT_EXTERN_METHOD(startSurvey:(NSString *)surveyId allowMultipleResponses:(BOOL)allowMultipleResponses_ hiddenFields:(NSDictionary<NSString *, id> *)hiddenFields_ ignoreSurveyStatus:(BOOL)ignoreSurveyStatus_)
|
|
13
13
|
RCT_EXTERN_METHOD(debug)
|
|
14
14
|
RCT_EXTERN_METHOD(debugTargeting)
|
|
15
15
|
RCT_EXTERN_METHOD(closeSdk)
|
package/ios/ScreebModule.swift
CHANGED
|
@@ -61,13 +61,13 @@ class ScreebModule: NSObject {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
@objc func startSurvey(_ surveyId: String, allowMultipleResponses allowMultipleResponses_: Bool, hiddenFields hiddenFields_: [String: Any]
|
|
64
|
+
@objc func startSurvey(_ surveyId: String, allowMultipleResponses allowMultipleResponses_: Bool, hiddenFields hiddenFields_: [String: Any]?,ignoreSurveyStatus ignoreSurveyStatus_: Bool) {
|
|
65
65
|
var map: [String: AnyEncodable] = [:]
|
|
66
66
|
if (hiddenFields_ != nil) {
|
|
67
67
|
map = self.mapToAnyEncodable(map: hiddenFields_!).filter({ $0.value != nil }).mapValues({ $0! })
|
|
68
68
|
}
|
|
69
69
|
DispatchQueue.main.async {
|
|
70
|
-
Screeb.startSurvey(surveyId: surveyId, allowMultipleResponses: allowMultipleResponses_, hiddenFields: map)
|
|
70
|
+
Screeb.startSurvey(surveyId: surveyId, allowMultipleResponses: allowMultipleResponses_, hiddenFields: map, ignoreSurveyStatus: ignoreSurveyStatus_)
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
package/package.json
CHANGED
package/screeb-module.podspec
CHANGED
package/src/index.tsx
CHANGED
|
@@ -46,8 +46,8 @@ export function trackEvent(name: string, properties?: Map<string, any>) {
|
|
|
46
46
|
export function trackScreen(name: string, properties?: Map<string, any>) {
|
|
47
47
|
return ScreebModule.trackScreen(name, properties);
|
|
48
48
|
}
|
|
49
|
-
export function startSurvey(surveyId: string, allowMultipleResponses?: boolean, hiddenFields?: Map<string, any
|
|
50
|
-
return ScreebModule.startSurvey(surveyId, allowMultipleResponses ?? true, hiddenFields);
|
|
49
|
+
export function startSurvey(surveyId: string, allowMultipleResponses?: boolean, hiddenFields?: Map<string, any>, ignoreSurveyStatus?: boolean) {
|
|
50
|
+
return ScreebModule.startSurvey(surveyId, allowMultipleResponses ?? true, hiddenFields, ignoreSurveyStatus ?? true);
|
|
51
51
|
}
|
|
52
52
|
export function debug(){
|
|
53
53
|
return ScreebModule.debug();
|