@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.
@@ -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.12.0"
126
+ implementation "app.screeb.sdk:survey:1.13.1"
128
127
  implementation "org.jetbrains.kotlin:kotlin-stdlib:1.7.0"
129
128
  }
@@ -1,3 +1,3 @@
1
- ScreebModule_kotlinVersion=1.6.0
1
+ ScreebModule_kotlinVersion=1.8.0
2
2
  ScreebModule_compileSdkVersion=33
3
3
  ScreebModule_targetSdkVersion=33
@@ -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
 
@@ -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)
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@screeb/react-native",
3
- "version": "0.8.13",
3
+ "version": "0.8.16",
4
4
  "description": "A react-native module to integrate Screeb mobile sdk for Android and/or iOS.",
5
5
  "scripts": {
6
6
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
16
16
  s.source_files = "ios/**/*.{h,m,mm,swift}"
17
17
 
18
18
  s.dependency "React-Core"
19
- s.dependency "Screeb", '~> 1.12.1'
19
+ s.dependency "Screeb", '~> 1.13.0'
20
20
  end
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();