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.
- package/android/build.gradle +1 -1
- package/index.d.ts +3 -0
- package/index.js +9 -0
- package/ios/UserLeapBindings.h +2 -1
- package/ios/UserLeapBindings.m +20 -17
- package/package.json +1 -1
- package/react-native-userleap.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -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.
|
|
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;
|
package/ios/UserLeapBindings.h
CHANGED
package/ios/UserLeapBindings.m
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
#import "UserLeapBindings.h"
|
|
2
2
|
#import <React/RCTUtils.h>
|
|
3
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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