react-native-userleap 2.17.0 → 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.
@@ -1,10 +1,6 @@
1
1
  #import <React/RCTBridgeModule.h>
2
2
  @import UserLeapKit;
3
3
 
4
- #if DEBUG
5
- @interface UserLeapBindings : NSObject <RCTBridgeModule, SGRNTextExtractor>
6
- #else
7
4
  @interface UserLeapBindings : NSObject <RCTBridgeModule>
8
- #endif
9
5
  @property (nonatomic, weak) RCTBridge *bridge;
10
6
  @end
@@ -46,17 +46,9 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(visitorIdentifierString)
46
46
  return [[UserLeap shared] visitorIdentifierString];
47
47
  }
48
48
 
49
- RCT_EXPORT_METHOD(configure:(NSString *)environmentId)
50
- {
51
- [[UserLeap shared] configureWithEnvironment:environmentId];
52
- }
53
-
54
49
  RCT_EXPORT_METHOD(configure:(NSString *)environmentId configuration:(NSDictionary *)configuration )
55
50
  {
56
51
  [[UserLeap shared] configureWithEnvironment:environmentId configuration:configuration];
57
- #if DEBUG
58
- [[UserLeap shared] passWithRnTextExtractor:self];
59
- #endif
60
52
  }
61
53
 
62
54
  RCT_EXPORT_METHOD(setPreviewKey:(NSString *)previewKey)
@@ -168,42 +160,4 @@ RCT_EXPORT_METHOD(trackIdentifyAndPresent:(NSString *)eventName userId:(NSString
168
160
  [[UserLeap shared] trackAndPresentWithEventName:eventName userId:userId partnerAnonymousId:partnerAnonymousId from:RCTPresentedViewController()];
169
161
  }
170
162
 
171
- #if DEBUG
172
- RCT_EXPORT_METHOD(renderSnapshotForUITest:(NSString *)name maskingLevel: (NSString *) maskingLevel)
173
- {
174
- [[UserLeap shared] renderSnapshotForUITestWithName: name maskingLevel: maskingLevel];
175
- }
176
-
177
-
178
- - (SGRNTextProperties *)textPropertiesFromView:(UIView * _Nonnull)passedView {
179
- if (![passedView isKindOfClass:[RCTTextView class]]) { return nil;}
180
- RCTUIManager* uiManager = [self.bridge moduleForClass:[RCTUIManager class]];
181
- RCTTextView *textView = (RCTTextView *)passedView;
182
- __block SGRNTextProperties *textProperties = [[SGRNTextProperties alloc] init];
183
- dispatch_sync(RCTGetUIManagerQueue(), ^{
184
- RCTShadowView *shadowView = [uiManager shadowViewForReactTag:textView.reactTag];
185
- if ([shadowView isKindOfClass:[RCTTextShadowView class]]) {
186
- RCTTextShadowView *textShadowView = (RCTTextShadowView *)shadowView;
187
- textProperties.text = [self extractText: textShadowView.reactSubviews];
188
- textProperties.color = textShadowView.textAttributes.foregroundColor;
189
- textProperties.alignment = textShadowView.textAttributes.alignment;
190
- textProperties.font = textShadowView.textAttributes.effectiveFont;
191
- }
192
- });
193
- return textProperties;
194
- }
195
-
196
- - (NSString * _Nullable)extractText:(NSArray<RCTShadowView *> * _Nonnull) subviews {
197
- NSMutableString *text = [[NSMutableString alloc] init];
198
- for (RCTShadowView *subview in subviews) {
199
- if ([subview isKindOfClass:[RCTRawTextShadowView class]]) {
200
- [text appendString:((RCTRawTextShadowView *)subview).text];
201
- }
202
- if ([subview isKindOfClass:[RCTVirtualTextShadowView class]]) {
203
- return [self extractText: ((RCTVirtualTextShadowView *)subview).reactSubviews];
204
- }
205
- }
206
- return text;
207
- }
208
- #endif
209
163
  @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-userleap",
3
- "version": "2.17.0",
3
+ "version": "2.17.1",
4
4
  "description": "React Native module for UserLeap",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",