react-native-userleap 3.2.1 → 4.0.0
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/ios/UserLeapBindings.m +0 -43
- package/package.json +4 -4
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
package/ios/UserLeapBindings.m
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
#import "UserLeapBindings.h"
|
|
2
2
|
#import <React/RCTUtils.h>
|
|
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>
|
|
10
3
|
#import <React/RCTView.h>
|
|
11
4
|
|
|
12
5
|
@implementation UserLeapBindings
|
|
13
6
|
|
|
14
|
-
@synthesize bridge = _bridge;
|
|
15
|
-
|
|
16
7
|
- (dispatch_queue_t)methodQueue
|
|
17
8
|
{
|
|
18
9
|
return dispatch_get_main_queue();
|
|
@@ -215,27 +206,6 @@ RCT_EXPORT_METHOD(trackIdentifyAndPresent:(NSString *)eventName userId:(NSString
|
|
|
215
206
|
|
|
216
207
|
- (_SGRNTextProperties *)textPropertiesFromView:(UIView * _Nonnull)passedView {
|
|
217
208
|
|
|
218
|
-
// Legacy for pre new arch.
|
|
219
|
-
if ([passedView isKindOfClass:[RCTTextView class]]) {
|
|
220
|
-
RCTUIManager* uiManager = [self.bridge moduleForClass:[RCTUIManager class]];
|
|
221
|
-
RCTTextView *textView = (RCTTextView *)passedView;
|
|
222
|
-
__block _SGRNTextProperties *textProperties = [[_SGRNTextProperties alloc] init];
|
|
223
|
-
dispatch_sync(RCTGetUIManagerQueue(), ^{
|
|
224
|
-
RCTShadowView *shadowView = [uiManager shadowViewForReactTag:textView.reactTag];
|
|
225
|
-
if ([shadowView isKindOfClass:[RCTTextShadowView class]]) {
|
|
226
|
-
RCTTextShadowView *textShadowView = (RCTTextShadowView *)shadowView;
|
|
227
|
-
NSString *text = [self extractText: textShadowView.reactSubviews];
|
|
228
|
-
if (text.length == 0) return;
|
|
229
|
-
textProperties.text = text;
|
|
230
|
-
textProperties.color = textShadowView.textAttributes.foregroundColor;
|
|
231
|
-
textProperties.alignment = textShadowView.textAttributes.alignment;
|
|
232
|
-
textProperties.font = textShadowView.textAttributes.effectiveFont;
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
if (textProperties.text.length == 0) return nil;
|
|
236
|
-
return textProperties;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
209
|
// Text under new arch.
|
|
240
210
|
Class ParagraphComponentView = NSClassFromString(@"RCTParagraphComponentView");
|
|
241
211
|
if (ParagraphComponentView && [passedView isKindOfClass:ParagraphComponentView]) {
|
|
@@ -297,19 +267,6 @@ RCT_EXPORT_METHOD(overrideUserInterfaceMode:(NSInteger)mode)
|
|
|
297
267
|
return nil;
|
|
298
268
|
}
|
|
299
269
|
|
|
300
|
-
- (NSString * _Nullable)extractText:(NSArray<RCTShadowView *> * _Nonnull) subviews {
|
|
301
|
-
NSMutableString *text = [[NSMutableString alloc] init];
|
|
302
|
-
for (RCTShadowView *subview in subviews) {
|
|
303
|
-
if ([subview isKindOfClass:[RCTRawTextShadowView class]]) {
|
|
304
|
-
[text appendString:((RCTRawTextShadowView *)subview).text];
|
|
305
|
-
}
|
|
306
|
-
if ([subview isKindOfClass:[RCTVirtualTextShadowView class]]) {
|
|
307
|
-
return [self extractText: ((RCTVirtualTextShadowView *)subview).reactSubviews];
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
return text;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
270
|
- (NSString *)extractTextFromParagraphComponentView:(UIView *)view {
|
|
314
271
|
if ([view respondsToSelector:@selector(attributedText)]) {
|
|
315
272
|
NSAttributedString *attrText = [view performSelector:@selector(attributedText)];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-userleap",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "React Native module for UserLeap",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"babel-jest": "29.7.0",
|
|
34
34
|
"eslint": "7.32.0",
|
|
35
35
|
"jest": "29.7.0",
|
|
36
|
-
"@react-native/babel-preset": "^0.
|
|
37
|
-
"react": "19.
|
|
38
|
-
"react-native": "0.
|
|
36
|
+
"@react-native/babel-preset": "^0.85.0",
|
|
37
|
+
"react": "19.2.3",
|
|
38
|
+
"react-native": "0.85.0",
|
|
39
39
|
"react-test-renderer": "18.2.0"
|
|
40
40
|
},
|
|
41
41
|
"overrides": {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|