react-native-userleap 2.16.2 → 2.17.1

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.
@@ -80,5 +80,5 @@ repositories {
80
80
  dependencies {
81
81
  //noinspection GradleDynamicVersion
82
82
  implementation 'com.facebook.react:react-native:+' // From node_modules
83
- implementation ("com.userleap:userleap-android-sdk:2.17.3") // update this version on android updates
83
+ implementation ("com.userleap:userleap-android-sdk:2.17.4") // update this version on android updates
84
84
  }
package/index.d.ts CHANGED
@@ -21,5 +21,8 @@ declare namespace UserLeap {
21
21
  function logout(): void;
22
22
  function trackAndPresent(event: string): void;
23
23
  function trackIdentifyAndPresent(event: string, userId: string | undefined, partnerAnonymousId: string | undefined): void;
24
+ // Uncomment for UI testing
25
+ // function renderSnapshotForUITest(name: string, maskingLevel: string)
26
+
24
27
  }
25
28
  export default UserLeap;
package/index.js CHANGED
@@ -139,6 +139,13 @@ const trackIdentifyAndPresent = (event, userId, partnerAnonynmousId) => {
139
139
  }
140
140
  }
141
141
 
142
+ // Uncomment for UI testing
143
+ // const renderSnapshotForUITest = (name, maskingLevel) => {
144
+ // if (isValidPlatform()) {
145
+ // NativeModules.UserLeapBindings.renderSnapshotForUITest(name, maskingLevel);
146
+ // }
147
+ // }
148
+
142
149
  const UserLeap = {
143
150
  SurveyState,
144
151
  visitorIdentifier,
@@ -158,6 +165,8 @@ const UserLeap = {
158
165
  logout,
159
166
  trackAndPresent,
160
167
  trackIdentifyAndPresent,
168
+ // Uncomment for UI testing
169
+ // renderSnapshotForUITest,
161
170
  }
162
171
 
163
172
  export default UserLeap;
@@ -1,5 +1,6 @@
1
1
  #import <React/RCTBridgeModule.h>
2
+ @import UserLeapKit;
2
3
 
3
4
  @interface UserLeapBindings : NSObject <RCTBridgeModule>
4
-
5
+ @property (nonatomic, weak) RCTBridge *bridge;
5
6
  @end
@@ -1,9 +1,17 @@
1
1
  #import "UserLeapBindings.h"
2
2
  #import <React/RCTUtils.h>
3
- @import UserLeapKit;
3
+ #import <React/RCTTextView.h>
4
+ #import <React/RCTUIManager.h>
5
+ #import <React/RCTTextShadowView.h>
6
+ #import <React/RCTShadowView.h>
7
+ #import <React/RCTRawTextShadowView.h>
8
+ #import <React/RCTVirtualTextShadowView.h>
9
+ #import <React/RCTUIManagerUtils.h>
4
10
 
5
11
  @implementation UserLeapBindings
6
12
 
13
+ @synthesize bridge = _bridge;
14
+
7
15
  - (dispatch_queue_t)methodQueue
8
16
  {
9
17
  return dispatch_get_main_queue();
@@ -12,17 +20,17 @@
12
20
  - (NSString *)getSurveyState:(SurveyState)surveyState
13
21
  {
14
22
  NSString *surveyStateBinding = @"NO_SURVEY";
15
- switch(surveyState) {
16
- case SurveyStateDisabled:
17
- surveyStateBinding = @"DISABLED";
18
- break;
19
- case SurveyStateReady:
20
- surveyStateBinding = @"READY";
21
- break;
22
- case SurveyStateNoSurvey:
23
- surveyStateBinding = @"NO_SURVEY";
24
- break;
25
- }
23
+ switch(surveyState) {
24
+ case SurveyStateDisabled:
25
+ surveyStateBinding = @"DISABLED";
26
+ break;
27
+ case SurveyStateReady:
28
+ surveyStateBinding = @"READY";
29
+ break;
30
+ case SurveyStateNoSurvey:
31
+ surveyStateBinding = @"NO_SURVEY";
32
+ break;
33
+ }
26
34
  return surveyStateBinding;
27
35
  }
28
36
 
@@ -38,11 +46,6 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(visitorIdentifierString)
38
46
  return [[UserLeap shared] visitorIdentifierString];
39
47
  }
40
48
 
41
- RCT_EXPORT_METHOD(configure:(NSString *)environmentId)
42
- {
43
- [[UserLeap shared] configureWithEnvironment:environmentId];
44
- }
45
-
46
49
  RCT_EXPORT_METHOD(configure:(NSString *)environmentId configuration:(NSDictionary *)configuration )
47
50
  {
48
51
  [[UserLeap shared] configureWithEnvironment:environmentId configuration:configuration];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-userleap",
3
- "version": "2.16.2",
3
+ "version": "2.17.1",
4
4
  "description": "React Native module for UserLeap",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -19,5 +19,5 @@ Pod::Spec.new do |s|
19
19
  s.requires_arc = true
20
20
 
21
21
  s.dependency "React"
22
- s.dependency "UserLeapKit", "4.22.1"
22
+ s.dependency "UserLeapKit", "4.23.0"
23
23
  end