@truewatchtech/react-native-session-replay 0.4.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/FTSessionReplayReactNative.podspec +50 -0
- package/README.md +33 -0
- package/android/build.gradle +228 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradle.properties +4 -0
- package/android/gradlew +185 -0
- package/android/gradlew.bat +89 -0
- package/android/settings.gradle +1 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/AndroidManifestNew.xml +3 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/FTSessionReplayImpl.java +119 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/NoopTextPropertiesResolver.java +23 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/ReactNativeSessionReplayExtensionSupport.java +57 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/ShadowNodeWrapper.java +84 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/TextPropertiesResolver.java +20 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/extensions/ReactDrawablesExt.java +155 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/mappers/DefaultMapper.java +78 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/mappers/Pair.java +11 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/mappers/ReactEditTextMapper.java +136 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/mappers/ReactNativeImageViewMapper.java +117 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/mappers/ReactTextMapper.java +57 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/mappers/ReactViewGroupMapper.java +22 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/mappers/ReactViewModalMapper.java +21 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/resources/ReactDrawableCopier.java +35 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/utils/ColorUtils.java +24 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/utils/DrawableUtils.java +34 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/utils/ReactNativeUtils.java +18 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/utils/ReflectionUtils.java +43 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/utils/text/FabricTextViewUtils.java +69 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/utils/text/LegacyTextViewUtils.java +97 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/utils/text/TextViewUtils.java +184 -0
- package/android/src/main/java/com/ft/sdk/reactnative/sessionreplay/views/FTPrivacyView.java +113 -0
- package/android/src/newarch/java/com/ft/sdk/reactnative/sessionreplay/FTSessionReplayModule.java +20 -0
- package/android/src/newarch/java/com/ft/sdk/reactnative/sessionreplay/views/FTPrivacyViewManager.java +87 -0
- package/android/src/oldarch/java/com/ft/sdk/reactnative/sessionreplay/FTSessionReplayModule.java +25 -0
- package/android/src/oldarch/java/com/ft/sdk/reactnative/sessionreplay/views/FTPrivacyViewManager.java +70 -0
- package/android/src/rn69/java/com/ft/sdk/reactnative/sessionreplay/utils/ReactViewBackgroundDrawableUtils.java +100 -0
- package/android/src/rn75/java/com/ft/sdk/reactnative/sessionreplay/extensions/LengthPercentageExt.java +27 -0
- package/android/src/rn75/java/com/ft/sdk/reactnative/sessionreplay/utils/ReactViewBackgroundDrawableUtils.java +116 -0
- package/android/src/rn76/java/com/ft/sdk/reactnative/sessionreplay/extensions/LengthPercentageExt.java +38 -0
- package/android/src/rn76/java/com/ft/sdk/reactnative/sessionreplay/utils/ReactViewBackgroundDrawableUtils.java +117 -0
- package/android/src/rn79/java/com/ft/sdk/reactnative/sessionreplay/extensions/LengthPercentageExt.java +38 -0
- package/android/src/rn79/java/com/ft/sdk/reactnative/sessionreplay/utils/ReactViewBackgroundDrawableUtils.java +132 -0
- package/android/src/rn80/java/com/ft/sdk/reactnative/sessionreplay/extensions/ComputedBorderRadiusExt.java +58 -0
- package/android/src/rn80/java/com/ft/sdk/reactnative/sessionreplay/utils/ReactViewBackgroundDrawableUtils.java +190 -0
- package/android/src/rnlegacy/java/com/ft/sdk/reactnative/sessionreplay/utils/ReactViewBackgroundDrawableUtils.java +120 -0
- package/android/src/rnpost74/java/com/ft/sdk/reactnative/sessionreplay/FTSessionReplayPackage.java +58 -0
- package/android/src/rnpre74/java/com/ft/sdk/reactnative/sessionreplay/FTSessionReplayPackage.java +30 -0
- package/ios/FTPrivacyViewFabric.h +22 -0
- package/ios/FTPrivacyViewFabric.mm +84 -0
- package/ios/FTPrivacyViewPaper.h +17 -0
- package/ios/FTPrivacyViewPaper.mm +85 -0
- package/ios/FTRCTFabricWrapper.h +13 -0
- package/ios/FTRCTFabricWrapper.mm +113 -0
- package/ios/FTRCTTextPropertiesWrapper.h +24 -0
- package/ios/FTRCTTextPropertiesWrapper.mm +28 -0
- package/ios/FTRCTTextViewRecorder.h +33 -0
- package/ios/FTRCTTextViewRecorder.m +172 -0
- package/ios/FTReactNativeSessionReplay.h +13 -0
- package/ios/FTReactNativeSessionReplay.mm +85 -0
- package/ios/FTSessionReplayReactNative.xcodeproj/project.pbxproj +304 -0
- package/lib/commonjs/components/SessionReplayView/HideView.js +19 -0
- package/lib/commonjs/components/SessionReplayView/HideView.js.map +1 -0
- package/lib/commonjs/components/SessionReplayView/MaskAllView.js +25 -0
- package/lib/commonjs/components/SessionReplayView/MaskAllView.js.map +1 -0
- package/lib/commonjs/components/SessionReplayView/MaskNoneView.js +23 -0
- package/lib/commonjs/components/SessionReplayView/MaskNoneView.js.map +1 -0
- package/lib/commonjs/components/SessionReplayView/PrivacyView.js +28 -0
- package/lib/commonjs/components/SessionReplayView/PrivacyView.js.map +1 -0
- package/lib/commonjs/components/SessionReplayView/index.js +29 -0
- package/lib/commonjs/components/SessionReplayView/index.js.map +1 -0
- package/lib/commonjs/ft_session_replay.js +69 -0
- package/lib/commonjs/ft_session_replay.js.map +1 -0
- package/lib/commonjs/index.js +50 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/specs/FTPrivacyViewNative.js +29 -0
- package/lib/commonjs/specs/FTPrivacyViewNative.js.map +1 -0
- package/lib/commonjs/specs/FTPrivacyViewNativeComponent.js +10 -0
- package/lib/commonjs/specs/FTPrivacyViewNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/NativeFTReactNativeSessionReplay.js +10 -0
- package/lib/commonjs/specs/NativeFTReactNativeSessionReplay.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/components/SessionReplayView/HideView.js +12 -0
- package/lib/module/components/SessionReplayView/HideView.js.map +1 -0
- package/lib/module/components/SessionReplayView/MaskAllView.js +18 -0
- package/lib/module/components/SessionReplayView/MaskAllView.js.map +1 -0
- package/lib/module/components/SessionReplayView/MaskNoneView.js +16 -0
- package/lib/module/components/SessionReplayView/MaskNoneView.js.map +1 -0
- package/lib/module/components/SessionReplayView/PrivacyView.js +21 -0
- package/lib/module/components/SessionReplayView/PrivacyView.js.map +1 -0
- package/lib/module/components/SessionReplayView/index.js +23 -0
- package/lib/module/components/SessionReplayView/index.js.map +1 -0
- package/lib/module/ft_session_replay.js +67 -0
- package/lib/module/ft_session_replay.js.map +1 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/specs/FTPrivacyViewNative.js +24 -0
- package/lib/module/specs/FTPrivacyViewNative.js.map +1 -0
- package/lib/module/specs/FTPrivacyViewNativeComponent.js +3 -0
- package/lib/module/specs/FTPrivacyViewNativeComponent.js.map +1 -0
- package/lib/module/specs/NativeFTReactNativeSessionReplay.js +5 -0
- package/lib/module/specs/NativeFTReactNativeSessionReplay.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/components/SessionReplayView/HideView.d.ts +7 -0
- package/lib/typescript/components/SessionReplayView/MaskAllView.d.ts +8 -0
- package/lib/typescript/components/SessionReplayView/MaskNoneView.d.ts +7 -0
- package/lib/typescript/components/SessionReplayView/PrivacyView.d.ts +12 -0
- package/lib/typescript/components/SessionReplayView/index.d.ts +22 -0
- package/lib/typescript/ft_session_replay.d.ts +61 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/specs/FTPrivacyViewNative.d.ts +2 -0
- package/lib/typescript/specs/FTPrivacyViewNativeComponent.d.ts +10 -0
- package/lib/typescript/specs/NativeFTReactNativeSessionReplay.d.ts +11 -0
- package/lib/typescript/types.d.ts +8 -0
- package/package.json +97 -0
- package/scripts/set-ios-rn-version.js +47 -0
- package/src/components/SessionReplayView/HideView.tsx +15 -0
- package/src/components/SessionReplayView/MaskAllView.tsx +35 -0
- package/src/components/SessionReplayView/MaskNoneView.tsx +26 -0
- package/src/components/SessionReplayView/PrivacyView.tsx +40 -0
- package/src/components/SessionReplayView/index.ts +26 -0
- package/src/ft_session_replay.tsx +78 -0
- package/src/index.tsx +19 -0
- package/src/specs/FTPrivacyViewNative.ts +32 -0
- package/src/specs/FTPrivacyViewNativeComponent.ts +14 -0
- package/src/specs/NativeFTReactNativeSessionReplay.ts +13 -0
- package/src/types.ts +9 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
3
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#import "FTRCTTextViewRecorder.h"
|
|
8
|
+
#import <React/RCTUIManagerUtils.h>
|
|
9
|
+
#import <React/RCTTextView.h>
|
|
10
|
+
#import <React/RCTShadowView.h>
|
|
11
|
+
#import <React/RCTRawTextShadowView.h>
|
|
12
|
+
#import <React/RCTTextShadowView.h>
|
|
13
|
+
#import <React/RCTVirtualTextShadowView.h>
|
|
14
|
+
#import <FTMobileSDK/FTSRWireframe.h>
|
|
15
|
+
#import <FTMobileSDK/FTViewAttributes.h>
|
|
16
|
+
#import <FTMobileSDK/FTSRUtils.h>
|
|
17
|
+
#import <FTMobileSDK/FTSystemColors.h>
|
|
18
|
+
#import <FTMobileSDK/FTViewTreeRecordingContext.h>
|
|
19
|
+
#import <FTMobileSDK/FTSRUtils.h>
|
|
20
|
+
#import <React/RCTShadowView+Layout.h>
|
|
21
|
+
#import "FTRCTFabricWrapper.h"
|
|
22
|
+
|
|
23
|
+
@interface FTRCTTextViewRecorder ()
|
|
24
|
+
@property (nonatomic, strong) RCTUIManager *uiManager;
|
|
25
|
+
@property (nonatomic, strong) FTRCTFabricWrapper *fabricWrapper;
|
|
26
|
+
@end
|
|
27
|
+
@implementation FTRCTTextViewRecorder
|
|
28
|
+
-(instancetype)initWithUIManager:(RCTUIManager *)uiManager{
|
|
29
|
+
self = [super init];
|
|
30
|
+
if(self){
|
|
31
|
+
_identifier = [[NSUUID UUID] UUIDString];
|
|
32
|
+
_uiManager = uiManager;
|
|
33
|
+
_fabricWrapper = [FTRCTFabricWrapper new];
|
|
34
|
+
_textObfuscator = ^id<FTSRTextObfuscatingProtocol> _Nullable(FTViewTreeRecordingContext * _Nonnull context,FTViewAttributes *attributes) {
|
|
35
|
+
return [FTSRTextObfuscatingFactory staticTextObfuscator:[attributes resolveTextAndInputPrivacyLevel:context.recorder]];
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return self;
|
|
39
|
+
}
|
|
40
|
+
- (FTSRNodeSemantics *)recorder:(nonnull UIView *)view attributes:(nonnull FTViewAttributes *)attributes context:(nonnull FTViewTreeRecordingContext *)context{
|
|
41
|
+
FTRCTTextPropertiesWrapper *textProperties = [self.fabricWrapper tryToExtractTextPropertiesFromView:view]?:[self tryToExtractTextProperties:view];
|
|
42
|
+
if (!textProperties) {
|
|
43
|
+
return [view isKindOfClass:RCTTextView.class] ? [FTInvisibleElement constant] : nil;
|
|
44
|
+
}
|
|
45
|
+
FTRCTTextViewBuilder *builder = [[FTRCTTextViewBuilder alloc]init];
|
|
46
|
+
builder.wireframeID = [context.viewIDGenerator SRViewID:view nodeRecorder:self];
|
|
47
|
+
builder.attributes = attributes;
|
|
48
|
+
builder.text = textProperties.text;
|
|
49
|
+
builder.textAlignment = textProperties.alignment;
|
|
50
|
+
builder.textColor = textProperties.foregroundColor;
|
|
51
|
+
builder.textObfuscator = self.textObfuscator(context,attributes);
|
|
52
|
+
builder.fontSize = textProperties.fontSize;
|
|
53
|
+
builder.wireframeRect = attributes.frame;
|
|
54
|
+
builder.contentRect = textProperties.contentRect;
|
|
55
|
+
FTSpecificElement *element = [[FTSpecificElement alloc]initWithSubtreeStrategy:NodeSubtreeStrategyIgnore];
|
|
56
|
+
element.nodes = @[builder];
|
|
57
|
+
return element;
|
|
58
|
+
}
|
|
59
|
+
- (NSString *)extractTextFromSubViews:(NSArray<RCTShadowView *>*)subViews{
|
|
60
|
+
if(subViews && subViews.count>0){
|
|
61
|
+
NSString *result = @"";
|
|
62
|
+
for (id view in subViews) {
|
|
63
|
+
if ([view isKindOfClass:[RCTRawTextShadowView class]]){
|
|
64
|
+
RCTRawTextShadowView *textView = (RCTRawTextShadowView *)view;
|
|
65
|
+
if (textView.text) {
|
|
66
|
+
result = [result stringByAppendingString:textView.text];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if ([view isKindOfClass:[RCTVirtualTextShadowView class]]){
|
|
70
|
+
NSString *str = [self extractTextFromSubViews:[view reactSubviews]];
|
|
71
|
+
if (str) {
|
|
72
|
+
result = [result stringByAppendingString:str];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return result;
|
|
77
|
+
}
|
|
78
|
+
return nil;
|
|
79
|
+
}
|
|
80
|
+
- (nullable NSString *)tryToExtractTextFromSubViews:(nullable NSArray<RCTShadowView *> *)subviews {
|
|
81
|
+
if (!subviews) {
|
|
82
|
+
return nil;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
NSMutableString *result = [NSMutableString new];
|
|
86
|
+
for (RCTShadowView *subview in subviews) {
|
|
87
|
+
if ([subview isKindOfClass:[RCTRawTextShadowView class]]) {
|
|
88
|
+
NSString *text = [(RCTRawTextShadowView *)subview text];
|
|
89
|
+
if (text) {
|
|
90
|
+
[result appendString:text];
|
|
91
|
+
}
|
|
92
|
+
} else if ([subview isKindOfClass:[RCTVirtualTextShadowView class]]) {
|
|
93
|
+
NSString *nestedText = [self tryToExtractTextFromSubViews:[(RCTVirtualTextShadowView *)subview reactSubviews]];
|
|
94
|
+
if (nestedText) {
|
|
95
|
+
[result appendString:nestedText];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return result.length > 0 ? [result copy] : nil;
|
|
101
|
+
}
|
|
102
|
+
-(FTRCTTextPropertiesWrapper *)tryToExtractTextProperties:(UIView *)view{
|
|
103
|
+
if (![view isKindOfClass:RCTTextView.class]) {
|
|
104
|
+
return nil;
|
|
105
|
+
}
|
|
106
|
+
RCTTextView *textView = (RCTTextView *)view;
|
|
107
|
+
__block RCTTextShadowView *shadowView = nil;
|
|
108
|
+
NSNumber *tag = textView.reactTag;
|
|
109
|
+
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
|
|
110
|
+
NSTimeInterval timeout = 0.2;
|
|
111
|
+
|
|
112
|
+
dispatch_async(RCTGetUIManagerQueue(), ^{
|
|
113
|
+
RCTShadowView *sView = [self.uiManager shadowViewForReactTag:tag];
|
|
114
|
+
if ([sView isKindOfClass:[RCTTextShadowView class]]) {
|
|
115
|
+
shadowView = (RCTTextShadowView *)sView;
|
|
116
|
+
}
|
|
117
|
+
dispatch_semaphore_signal(semaphore);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
dispatch_time_t waitTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(timeout * NSEC_PER_SEC));
|
|
121
|
+
if (dispatch_semaphore_wait(semaphore, waitTime) != 0) {
|
|
122
|
+
return nil;
|
|
123
|
+
}
|
|
124
|
+
if (!shadowView) {
|
|
125
|
+
return nil;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
FTRCTTextPropertiesWrapper *textProperties = [FTRCTTextPropertiesWrapper new];
|
|
129
|
+
NSString *extractedText = [self tryToExtractTextFromSubViews:shadowView.reactSubviews];
|
|
130
|
+
if (extractedText) {
|
|
131
|
+
textProperties.text = extractedText;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (shadowView.textAttributes.foregroundColor) {
|
|
135
|
+
textProperties.foregroundColor = shadowView.textAttributes.foregroundColor;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
textProperties.alignment = shadowView.textAttributes.alignment;
|
|
139
|
+
textProperties.fontSize = shadowView.textAttributes.fontSize;
|
|
140
|
+
textProperties.contentRect = shadowView.contentFrame;
|
|
141
|
+
return textProperties;
|
|
142
|
+
}
|
|
143
|
+
@end
|
|
144
|
+
|
|
145
|
+
@implementation FTRCTTextViewBuilder
|
|
146
|
+
- (nonnull NSArray<FTSRWireframe *> *)buildWireframesWithBuilder:(nonnull FTSessionReplayWireframesBuilder *)builder {
|
|
147
|
+
CGRect frame = [self relativeIntersectedRect];
|
|
148
|
+
FTSRTextWireframe *wireframe = [[FTSRTextWireframe alloc]initWithIdentifier:self.wireframeID frame:frame];
|
|
149
|
+
|
|
150
|
+
wireframe.text = [self.textObfuscator mask:self.text];
|
|
151
|
+
wireframe.border = [[FTSRShapeBorder alloc]initWithColor:[FTSRUtils colorHexString:self.attributes.layerBorderColor] width:self.attributes.layerBorderWidth];
|
|
152
|
+
wireframe.shapeStyle = [[FTSRShapeStyle alloc]initWithBackgroundColor:[FTSRUtils colorHexString:self.attributes.backgroundColor.CGColor] cornerRadius:@(self.attributes.layerCornerRadius) opacity:@(self.attributes.alpha)];
|
|
153
|
+
wireframe.textStyle = [[FTSRTextStyle alloc]initWithSize:self.fontSize?self.fontSize:RCTTextPropertiesDefaultFontSize color:[FTSRUtils colorHexString:self.textColor.CGColor] family:nil];
|
|
154
|
+
FTSRTextPosition *textPosition = [[FTSRTextPosition alloc]init];
|
|
155
|
+
textPosition.alignment = [[FTAlignment alloc]initWithTextAlignment:self.textAlignment vertical:@"top"];
|
|
156
|
+
CGRect textFrame = [self textFrame];
|
|
157
|
+
textPosition.padding = [[FTPadding alloc]initWithLeft:CGRectGetMinX(textFrame)-CGRectGetMinX(frame) top:CGRectGetMinY(textFrame)-CGRectGetMinY(frame) right:CGRectGetMaxX(frame)-CGRectGetMaxX(textFrame) bottom:CGRectGetMaxY(frame)-CGRectGetMaxY(textFrame)];
|
|
158
|
+
wireframe.textPosition = textPosition;
|
|
159
|
+
wireframe.clip = [[FTSRContentClip alloc] initWithFrame:self.wireframeRect clip:self.attributes.clip];;
|
|
160
|
+
return @[wireframe];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
- (CGRect)relativeIntersectedRect{
|
|
164
|
+
return CGRectMake(self.attributes.frame.origin.x, self.attributes.frame.origin.y, MAX(self.contentRect.size.width, self.attributes.frame.size.width), MAX(self.contentRect.size.height, self.attributes.frame.size.height));
|
|
165
|
+
}
|
|
166
|
+
- (CGRect)textFrame{
|
|
167
|
+
return CGRectMake(self.attributes.frame.origin.x+self.contentRect.origin.x, self.attributes.frame.origin.y+self.contentRect.origin.y, self.contentRect.size.width, self.contentRect.size.height);
|
|
168
|
+
}
|
|
169
|
+
@end
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <React/RCTBridgeModule.h>
|
|
3
|
+
|
|
4
|
+
#if RCT_NEW_ARCH_ENABLED
|
|
5
|
+
#import <FTSessionReplayReactNative/FTSessionReplayReactNative.h>
|
|
6
|
+
@interface FTReactNativeSessionReplay: NSObject <NativeFTReactNativeSessionReplaySpec>
|
|
7
|
+
#else
|
|
8
|
+
|
|
9
|
+
#import <React/RCTBridgeModule.h>
|
|
10
|
+
@interface FTReactNativeSessionReplay : NSObject <RCTBridgeModule>
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
@end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#import "FTReactNativeSessionReplay.h"
|
|
2
|
+
#import <FTMobileSDK/FTRumSessionReplay.h>
|
|
3
|
+
#import <FTMobileSDK/FTSessionReplayConfig+Private.h>
|
|
4
|
+
#import <React/RCTConvert.h>
|
|
5
|
+
#import "FTRCTTextViewRecorder.h"
|
|
6
|
+
@implementation FTReactNativeSessionReplay
|
|
7
|
+
@synthesize bridge = _bridge;
|
|
8
|
+
|
|
9
|
+
RCT_EXPORT_MODULE()
|
|
10
|
+
|
|
11
|
+
// Example method
|
|
12
|
+
// See // https://reactnative.dev/docs/native-modules-ios
|
|
13
|
+
RCT_REMAP_METHOD(sessionReplayConfig,
|
|
14
|
+
context:(NSDictionary *)context
|
|
15
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
16
|
+
reject:(RCTPromiseRejectBlock)reject){
|
|
17
|
+
[self sessionReplayConfig:context resolve:resolve reject:reject];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
22
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params {
|
|
23
|
+
return std::make_shared<facebook::react::NativeFTReactNativeSessionReplaySpecJSI>(params);
|
|
24
|
+
}
|
|
25
|
+
#endif
|
|
26
|
+
- (void)sessionReplayConfig:(NSDictionary *)context resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject{
|
|
27
|
+
FTSessionReplayConfig *config = [[FTSessionReplayConfig alloc]init];
|
|
28
|
+
if([context.allKeys containsObject:@"sampleRate"]){
|
|
29
|
+
config.sampleRate = [RCTConvert double:context[@"sampleRate"]]*100;
|
|
30
|
+
}
|
|
31
|
+
if([context.allKeys containsObject:@"sessionReplayOnErrorSampleRate"]){
|
|
32
|
+
config.sessionReplayOnErrorSampleRate = [RCTConvert double:context[@"sessionReplayOnErrorSampleRate"]]*100;
|
|
33
|
+
}
|
|
34
|
+
if([context.allKeys containsObject:@"privacy"]){
|
|
35
|
+
int privacy = [context[@"privacy"] intValue];
|
|
36
|
+
config.privacy = (FTSRPrivacy)privacy;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Handle fine-grained privacy settings (overrides deprecated privacy setting if provided)
|
|
40
|
+
if([context.allKeys containsObject:@"touchPrivacy"]){
|
|
41
|
+
NSString *touchPrivacy = [RCTConvert NSString:context[@"touchPrivacy"]];
|
|
42
|
+
if ([touchPrivacy isEqualToString:@"SHOW"]) {
|
|
43
|
+
config.touchPrivacy = FTTouchPrivacyLevelShow;
|
|
44
|
+
} else if ([touchPrivacy isEqualToString:@"HIDE"]) {
|
|
45
|
+
config.touchPrivacy = FTTouchPrivacyLevelHide;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if([context.allKeys containsObject:@"textAndInputPrivacy"]){
|
|
50
|
+
NSString *textAndInputPrivacy = [RCTConvert NSString:context[@"textAndInputPrivacy"]];
|
|
51
|
+
if ([textAndInputPrivacy isEqualToString:@"MASK_SENSITIVE_INPUTS"]) {
|
|
52
|
+
config.textAndInputPrivacy = FTTextAndInputPrivacyLevelMaskAllInputs;
|
|
53
|
+
} else if ([textAndInputPrivacy isEqualToString:@"MASK_ALL_INPUTS"]) {
|
|
54
|
+
config.textAndInputPrivacy = FTTextAndInputPrivacyLevelMaskAllInputs;
|
|
55
|
+
} else if ([textAndInputPrivacy isEqualToString:@"MASK_ALL"]) {
|
|
56
|
+
config.textAndInputPrivacy = FTTextAndInputPrivacyLevelMaskAll;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if([context.allKeys containsObject:@"imagePrivacy"]){
|
|
61
|
+
NSString *imagePrivacy = [RCTConvert NSString:context[@"imagePrivacy"]];
|
|
62
|
+
if ([imagePrivacy isEqualToString:@"MASK_NON_BUNDLED_ONLY"]) {
|
|
63
|
+
config.imagePrivacy = FTImagePrivacyLevelMaskNonBundledOnly;
|
|
64
|
+
} else if ([imagePrivacy isEqualToString:@"MASK_ALL"]) {
|
|
65
|
+
config.imagePrivacy = FTImagePrivacyLevelMaskAll;
|
|
66
|
+
} else if ([imagePrivacy isEqualToString:@"MASK_NONE"]) {
|
|
67
|
+
config.imagePrivacy = FTImagePrivacyLevelMaskNone;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if([context.allKeys containsObject:@"enableLinkRUMKeys"]){
|
|
72
|
+
NSArray *rumKeys = context[@"enableLinkRUMKeys"];
|
|
73
|
+
if([rumKeys isKindOfClass:[NSArray class]]){
|
|
74
|
+
config.enableLinkRUMKeys = rumKeys;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
FTRCTTextViewRecorder *recorder = [[FTRCTTextViewRecorder alloc]initWithUIManager:_bridge.uiManager];
|
|
78
|
+
[config setAdditionalNodeRecorders:@[recorder]];
|
|
79
|
+
[[FTRumSessionReplay sharedInstance] startWithSessionReplayConfig:config];
|
|
80
|
+
resolve(nil);
|
|
81
|
+
}
|
|
82
|
+
+ (BOOL)requiresMainQueueSetup {
|
|
83
|
+
return NO;
|
|
84
|
+
}
|
|
85
|
+
@end
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
// !$*UTF8*$!
|
|
2
|
+
{
|
|
3
|
+
archiveVersion = 1;
|
|
4
|
+
classes = {
|
|
5
|
+
};
|
|
6
|
+
objectVersion = 46;
|
|
7
|
+
objects = {
|
|
8
|
+
|
|
9
|
+
/* Begin PBXBuildFile section */
|
|
10
|
+
B10000112F80000100100001 /* FTPrivacyViewFabric.mm in Sources */ = {isa = PBXBuildFile; fileRef = A10000112F80000100100001 /* FTPrivacyViewFabric.mm */; };
|
|
11
|
+
B10000132F80000100100001 /* FTPrivacyViewPaper.mm in Sources */ = {isa = PBXBuildFile; fileRef = A10000132F80000100100001 /* FTPrivacyViewPaper.mm */; };
|
|
12
|
+
B10000152F80000100100001 /* FTRCTFabricWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = A10000152F80000100100001 /* FTRCTFabricWrapper.mm */; };
|
|
13
|
+
B10000172F80000100100001 /* FTRCTTextPropertiesWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = A10000172F80000100100001 /* FTRCTTextPropertiesWrapper.mm */; };
|
|
14
|
+
B10000192F80000100100001 /* FTRCTTextViewRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = A10000192F80000100100001 /* FTRCTTextViewRecorder.m */; };
|
|
15
|
+
B100001B2F80000100100001 /* FTReactNativeSessionReplay.mm in Sources */ = {isa = PBXBuildFile; fileRef = A100001B2F80000100100001 /* FTReactNativeSessionReplay.mm */; };
|
|
16
|
+
/* End PBXBuildFile section */
|
|
17
|
+
|
|
18
|
+
/* Begin PBXCopyFilesBuildPhase section */
|
|
19
|
+
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
|
20
|
+
isa = PBXCopyFilesBuildPhase;
|
|
21
|
+
buildActionMask = 2147483647;
|
|
22
|
+
dstPath = "include/$(PRODUCT_NAME)";
|
|
23
|
+
dstSubfolderSpec = 16;
|
|
24
|
+
files = (
|
|
25
|
+
);
|
|
26
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
27
|
+
};
|
|
28
|
+
/* End PBXCopyFilesBuildPhase section */
|
|
29
|
+
|
|
30
|
+
/* Begin PBXFileReference section */
|
|
31
|
+
134814201AA4EA6300B7C361 /* libFTSessionReplayReactNative.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libFTSessionReplayReactNative.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
32
|
+
A10000102F80000100100001 /* FTPrivacyViewFabric.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FTPrivacyViewFabric.h; sourceTree = "<group>"; };
|
|
33
|
+
A10000112F80000100100001 /* FTPrivacyViewFabric.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FTPrivacyViewFabric.mm; sourceTree = "<group>"; };
|
|
34
|
+
A10000122F80000100100001 /* FTPrivacyViewPaper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FTPrivacyViewPaper.h; sourceTree = "<group>"; };
|
|
35
|
+
A10000132F80000100100001 /* FTPrivacyViewPaper.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FTPrivacyViewPaper.mm; sourceTree = "<group>"; };
|
|
36
|
+
A10000142F80000100100001 /* FTRCTFabricWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FTRCTFabricWrapper.h; sourceTree = "<group>"; };
|
|
37
|
+
A10000152F80000100100001 /* FTRCTFabricWrapper.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FTRCTFabricWrapper.mm; sourceTree = "<group>"; };
|
|
38
|
+
A10000162F80000100100001 /* FTRCTTextPropertiesWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FTRCTTextPropertiesWrapper.h; sourceTree = "<group>"; };
|
|
39
|
+
A10000172F80000100100001 /* FTRCTTextPropertiesWrapper.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FTRCTTextPropertiesWrapper.mm; sourceTree = "<group>"; };
|
|
40
|
+
A10000182F80000100100001 /* FTRCTTextViewRecorder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FTRCTTextViewRecorder.h; sourceTree = "<group>"; };
|
|
41
|
+
A10000192F80000100100001 /* FTRCTTextViewRecorder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FTRCTTextViewRecorder.m; sourceTree = "<group>"; };
|
|
42
|
+
A100001A2F80000100100001 /* FTReactNativeSessionReplay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FTReactNativeSessionReplay.h; sourceTree = "<group>"; };
|
|
43
|
+
A100001B2F80000100100001 /* FTReactNativeSessionReplay.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FTReactNativeSessionReplay.mm; sourceTree = "<group>"; };
|
|
44
|
+
A100001C2F80000100100001 /* RCTVersion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTVersion.h; sourceTree = "<group>"; };
|
|
45
|
+
/* End PBXFileReference section */
|
|
46
|
+
|
|
47
|
+
/* Begin PBXFrameworksBuildPhase section */
|
|
48
|
+
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
|
49
|
+
isa = PBXFrameworksBuildPhase;
|
|
50
|
+
buildActionMask = 2147483647;
|
|
51
|
+
files = (
|
|
52
|
+
);
|
|
53
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
54
|
+
};
|
|
55
|
+
/* End PBXFrameworksBuildPhase section */
|
|
56
|
+
|
|
57
|
+
/* Begin PBXGroup section */
|
|
58
|
+
134814211AA4EA7D00B7C361 /* Products */ = {
|
|
59
|
+
isa = PBXGroup;
|
|
60
|
+
children = (
|
|
61
|
+
134814201AA4EA6300B7C361 /* libFTSessionReplayReactNative.a */,
|
|
62
|
+
);
|
|
63
|
+
name = Products;
|
|
64
|
+
sourceTree = "<group>";
|
|
65
|
+
};
|
|
66
|
+
58B511D21A9E6C8500147676 = {
|
|
67
|
+
isa = PBXGroup;
|
|
68
|
+
children = (
|
|
69
|
+
A10000102F80000100100001 /* FTPrivacyViewFabric.h */,
|
|
70
|
+
A10000112F80000100100001 /* FTPrivacyViewFabric.mm */,
|
|
71
|
+
A10000122F80000100100001 /* FTPrivacyViewPaper.h */,
|
|
72
|
+
A10000132F80000100100001 /* FTPrivacyViewPaper.mm */,
|
|
73
|
+
A10000142F80000100100001 /* FTRCTFabricWrapper.h */,
|
|
74
|
+
A10000152F80000100100001 /* FTRCTFabricWrapper.mm */,
|
|
75
|
+
A10000162F80000100100001 /* FTRCTTextPropertiesWrapper.h */,
|
|
76
|
+
A10000172F80000100100001 /* FTRCTTextPropertiesWrapper.mm */,
|
|
77
|
+
A10000182F80000100100001 /* FTRCTTextViewRecorder.h */,
|
|
78
|
+
A10000192F80000100100001 /* FTRCTTextViewRecorder.m */,
|
|
79
|
+
A100001A2F80000100100001 /* FTReactNativeSessionReplay.h */,
|
|
80
|
+
A100001B2F80000100100001 /* FTReactNativeSessionReplay.mm */,
|
|
81
|
+
A100001C2F80000100100001 /* RCTVersion.h */,
|
|
82
|
+
134814211AA4EA7D00B7C361 /* Products */,
|
|
83
|
+
);
|
|
84
|
+
sourceTree = "<group>";
|
|
85
|
+
};
|
|
86
|
+
/* End PBXGroup section */
|
|
87
|
+
|
|
88
|
+
/* Begin PBXNativeTarget section */
|
|
89
|
+
58B511DA1A9E6C8500147676 /* FTSessionReplayReactNative */ = {
|
|
90
|
+
isa = PBXNativeTarget;
|
|
91
|
+
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "FTSessionReplayReactNative" */;
|
|
92
|
+
buildPhases = (
|
|
93
|
+
58B511D71A9E6C8500147676 /* Sources */,
|
|
94
|
+
58B511D81A9E6C8500147676 /* Frameworks */,
|
|
95
|
+
58B511D91A9E6C8500147676 /* CopyFiles */,
|
|
96
|
+
);
|
|
97
|
+
buildRules = (
|
|
98
|
+
);
|
|
99
|
+
dependencies = (
|
|
100
|
+
);
|
|
101
|
+
name = FTSessionReplayReactNative;
|
|
102
|
+
productName = FTSessionReplayReactNative;
|
|
103
|
+
productReference = 134814201AA4EA6300B7C361 /* libFTSessionReplayReactNative.a */;
|
|
104
|
+
productType = "com.apple.product-type.library.static";
|
|
105
|
+
};
|
|
106
|
+
/* End PBXNativeTarget section */
|
|
107
|
+
|
|
108
|
+
/* Begin PBXProject section */
|
|
109
|
+
58B511D31A9E6C8500147676 /* Project object */ = {
|
|
110
|
+
isa = PBXProject;
|
|
111
|
+
attributes = {
|
|
112
|
+
LastUpgradeCheck = 0920;
|
|
113
|
+
ORGANIZATIONNAME = CloudCare;
|
|
114
|
+
TargetAttributes = {
|
|
115
|
+
58B511DA1A9E6C8500147676 = {
|
|
116
|
+
CreatedOnToolsVersion = 6.1.1;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "FTSessionReplayReactNative" */;
|
|
121
|
+
compatibilityVersion = "Xcode 3.2";
|
|
122
|
+
developmentRegion = English;
|
|
123
|
+
hasScannedForEncodings = 0;
|
|
124
|
+
knownRegions = (
|
|
125
|
+
English,
|
|
126
|
+
en,
|
|
127
|
+
);
|
|
128
|
+
mainGroup = 58B511D21A9E6C8500147676;
|
|
129
|
+
productRefGroup = 58B511D21A9E6C8500147676;
|
|
130
|
+
projectDirPath = "";
|
|
131
|
+
projectRoot = "";
|
|
132
|
+
targets = (
|
|
133
|
+
58B511DA1A9E6C8500147676 /* FTSessionReplayReactNative */,
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
/* End PBXProject section */
|
|
137
|
+
|
|
138
|
+
/* Begin PBXSourcesBuildPhase section */
|
|
139
|
+
58B511D71A9E6C8500147676 /* Sources */ = {
|
|
140
|
+
isa = PBXSourcesBuildPhase;
|
|
141
|
+
buildActionMask = 2147483647;
|
|
142
|
+
files = (
|
|
143
|
+
B10000112F80000100100001 /* FTPrivacyViewFabric.mm in Sources */,
|
|
144
|
+
B10000132F80000100100001 /* FTPrivacyViewPaper.mm in Sources */,
|
|
145
|
+
B10000152F80000100100001 /* FTRCTFabricWrapper.mm in Sources */,
|
|
146
|
+
B10000172F80000100100001 /* FTRCTTextPropertiesWrapper.mm in Sources */,
|
|
147
|
+
B10000192F80000100100001 /* FTRCTTextViewRecorder.m in Sources */,
|
|
148
|
+
B100001B2F80000100100001 /* FTReactNativeSessionReplay.mm in Sources */,
|
|
149
|
+
);
|
|
150
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
151
|
+
};
|
|
152
|
+
/* End PBXSourcesBuildPhase section */
|
|
153
|
+
|
|
154
|
+
/* Begin XCBuildConfiguration section */
|
|
155
|
+
58B511ED1A9E6C8500147676 /* Debug */ = {
|
|
156
|
+
isa = XCBuildConfiguration;
|
|
157
|
+
buildSettings = {
|
|
158
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
159
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
160
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
161
|
+
CLANG_ENABLE_MODULES = YES;
|
|
162
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
163
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
164
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
165
|
+
CLANG_WARN_COMMA = YES;
|
|
166
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
167
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
168
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
169
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
170
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
171
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
172
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
173
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
174
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
175
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
176
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
177
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
178
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
179
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
180
|
+
COPY_PHASE_STRIP = NO;
|
|
181
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
182
|
+
ENABLE_TESTABILITY = YES;
|
|
183
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
184
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
|
185
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
186
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
|
187
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
188
|
+
"DEBUG=1",
|
|
189
|
+
"$(inherited)",
|
|
190
|
+
);
|
|
191
|
+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
|
192
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
193
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
194
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
195
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
196
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
197
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
198
|
+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
|
199
|
+
MTL_ENABLE_DEBUG_INFO = YES;
|
|
200
|
+
ONLY_ACTIVE_ARCH = YES;
|
|
201
|
+
SDKROOT = iphoneos;
|
|
202
|
+
};
|
|
203
|
+
name = Debug;
|
|
204
|
+
};
|
|
205
|
+
58B511EE1A9E6C8500147676 /* Release */ = {
|
|
206
|
+
isa = XCBuildConfiguration;
|
|
207
|
+
buildSettings = {
|
|
208
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
209
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
210
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
211
|
+
CLANG_ENABLE_MODULES = YES;
|
|
212
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
213
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
214
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
215
|
+
CLANG_WARN_COMMA = YES;
|
|
216
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
217
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
218
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
219
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
220
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
221
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
222
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
223
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
224
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
225
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
226
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
227
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
228
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
229
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
230
|
+
COPY_PHASE_STRIP = YES;
|
|
231
|
+
ENABLE_NS_ASSERTIONS = NO;
|
|
232
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
233
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
234
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
235
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
236
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
237
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
238
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
239
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
240
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
241
|
+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
|
242
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
|
243
|
+
SDKROOT = iphoneos;
|
|
244
|
+
VALIDATE_PRODUCT = YES;
|
|
245
|
+
};
|
|
246
|
+
name = Release;
|
|
247
|
+
};
|
|
248
|
+
58B511F01A9E6C8500147676 /* Debug */ = {
|
|
249
|
+
isa = XCBuildConfiguration;
|
|
250
|
+
buildSettings = {
|
|
251
|
+
HEADER_SEARCH_PATHS = (
|
|
252
|
+
"$(inherited)",
|
|
253
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
|
254
|
+
"$(SRCROOT)/../../../React/**",
|
|
255
|
+
"$(SRCROOT)/../../react-native/React/**",
|
|
256
|
+
);
|
|
257
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
258
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
259
|
+
PRODUCT_NAME = FTSessionReplayReactNative;
|
|
260
|
+
SKIP_INSTALL = YES;
|
|
261
|
+
};
|
|
262
|
+
name = Debug;
|
|
263
|
+
};
|
|
264
|
+
58B511F11A9E6C8500147676 /* Release */ = {
|
|
265
|
+
isa = XCBuildConfiguration;
|
|
266
|
+
buildSettings = {
|
|
267
|
+
HEADER_SEARCH_PATHS = (
|
|
268
|
+
"$(inherited)",
|
|
269
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
|
270
|
+
"$(SRCROOT)/../../../React/**",
|
|
271
|
+
"$(SRCROOT)/../../react-native/React/**",
|
|
272
|
+
);
|
|
273
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
274
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
275
|
+
PRODUCT_NAME = FTSessionReplayReactNative;
|
|
276
|
+
SKIP_INSTALL = YES;
|
|
277
|
+
};
|
|
278
|
+
name = Release;
|
|
279
|
+
};
|
|
280
|
+
/* End XCBuildConfiguration section */
|
|
281
|
+
|
|
282
|
+
/* Begin XCConfigurationList section */
|
|
283
|
+
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "FTSessionReplayReactNative" */ = {
|
|
284
|
+
isa = XCConfigurationList;
|
|
285
|
+
buildConfigurations = (
|
|
286
|
+
58B511ED1A9E6C8500147676 /* Debug */,
|
|
287
|
+
58B511EE1A9E6C8500147676 /* Release */,
|
|
288
|
+
);
|
|
289
|
+
defaultConfigurationIsVisible = 0;
|
|
290
|
+
defaultConfigurationName = Release;
|
|
291
|
+
};
|
|
292
|
+
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "FTSessionReplayReactNative" */ = {
|
|
293
|
+
isa = XCConfigurationList;
|
|
294
|
+
buildConfigurations = (
|
|
295
|
+
58B511F01A9E6C8500147676 /* Debug */,
|
|
296
|
+
58B511F11A9E6C8500147676 /* Release */,
|
|
297
|
+
);
|
|
298
|
+
defaultConfigurationIsVisible = 0;
|
|
299
|
+
defaultConfigurationName = Release;
|
|
300
|
+
};
|
|
301
|
+
/* End XCConfigurationList section */
|
|
302
|
+
};
|
|
303
|
+
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
|
|
304
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.HideView = HideView;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _PrivacyView = require("./PrivacyView");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
11
|
+
function HideView({
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}) {
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement(_PrivacyView.PrivacyView, _extends({}, props, {
|
|
16
|
+
hide: true
|
|
17
|
+
}), children);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=HideView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_PrivacyView","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","HideView","children","props","createElement","PrivacyView","hide"],"sources":["HideView.tsx"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport { PrivacyView } from './PrivacyView';\n\ntype HideViewProps = ViewProps & {\n children?: React.ReactNode;\n};\n\nexport function HideView({ children, ...props }: HideViewProps) {\n return (\n <PrivacyView {...props} hide={true}>\n {children as any}\n </PrivacyView>\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAA4C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAMrC,SAASO,QAAQA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAqB,CAAC,EAAE;EAC9D,oBACErB,MAAA,CAAAM,OAAA,CAAAgB,aAAA,CAACnB,YAAA,CAAAoB,WAAW,EAAAhB,QAAA,KAAKc,KAAK;IAAEG,IAAI,EAAE;EAAK,IAChCJ,QACU,CAAC;AAElB","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MaskAllView = MaskAllView;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _PrivacyView = require("./PrivacyView");
|
|
9
|
+
var _ft_session_replay = require("../../ft_session_replay");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
12
|
+
function MaskAllView({
|
|
13
|
+
children,
|
|
14
|
+
showTouch = false,
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
const touchPrivacy = showTouch ? _ft_session_replay.TouchPrivacyLevel.SHOW : _ft_session_replay.TouchPrivacyLevel.HIDE;
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement(_PrivacyView.PrivacyView, _extends({}, props, {
|
|
19
|
+
textAndInputPrivacy: _ft_session_replay.TextAndInputPrivacyLevel.MASK_ALL,
|
|
20
|
+
imagePrivacy: _ft_session_replay.ImagePrivacyLevel.MASK_ALL,
|
|
21
|
+
touchPrivacy: touchPrivacy,
|
|
22
|
+
hide: false
|
|
23
|
+
}), children);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=MaskAllView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_PrivacyView","_ft_session_replay","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","MaskAllView","children","showTouch","props","touchPrivacy","TouchPrivacyLevel","SHOW","HIDE","createElement","PrivacyView","textAndInputPrivacy","TextAndInputPrivacyLevel","MASK_ALL","imagePrivacy","ImagePrivacyLevel","hide"],"sources":["MaskAllView.tsx"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport { PrivacyView } from './PrivacyView';\nimport {\n ImagePrivacyLevel,\n TextAndInputPrivacyLevel,\n TouchPrivacyLevel,\n} from '../../ft_session_replay';\n\ntype MaskAllViewProps = ViewProps & {\n children?: React.ReactNode;\n showTouch?: boolean;\n};\n\nexport function MaskAllView({\n children,\n showTouch = false,\n ...props\n}: MaskAllViewProps) {\n const touchPrivacy = showTouch\n ? TouchPrivacyLevel.SHOW\n : TouchPrivacyLevel.HIDE;\n\n return (\n <PrivacyView\n {...props}\n textAndInputPrivacy={TextAndInputPrivacyLevel.MASK_ALL}\n imagePrivacy={ImagePrivacyLevel.MASK_ALL}\n touchPrivacy={touchPrivacy}\n hide={false}\n >\n {children as any}\n </PrivacyView>\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AAIiC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAO1B,SAASO,WAAWA,CAAC;EAC1BC,QAAQ;EACRC,SAAS,GAAG,KAAK;EACjB,GAAGC;AACa,CAAC,EAAE;EACnB,MAAMC,YAAY,GAAGF,SAAS,GAC1BG,oCAAiB,CAACC,IAAI,GACtBD,oCAAiB,CAACE,IAAI;EAE1B,oBACE3B,MAAA,CAAAO,OAAA,CAAAqB,aAAA,CAACzB,YAAA,CAAA0B,WAAW,EAAArB,QAAA,KACNe,KAAK;IACTO,mBAAmB,EAAEC,2CAAwB,CAACC,QAAS;IACvDC,YAAY,EAAEC,oCAAiB,CAACF,QAAS;IACzCR,YAAY,EAAEA,YAAa;IAC3BW,IAAI,EAAE;EAAM,IAEXd,QACU,CAAC;AAElB","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MaskNoneView = MaskNoneView;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _PrivacyView = require("./PrivacyView");
|
|
9
|
+
var _ft_session_replay = require("../../ft_session_replay");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
12
|
+
function MaskNoneView({
|
|
13
|
+
children,
|
|
14
|
+
...props
|
|
15
|
+
}) {
|
|
16
|
+
return /*#__PURE__*/_react.default.createElement(_PrivacyView.PrivacyView, _extends({}, props, {
|
|
17
|
+
textAndInputPrivacy: _ft_session_replay.TextAndInputPrivacyLevel.MASK_SENSITIVE_INPUTS,
|
|
18
|
+
imagePrivacy: _ft_session_replay.ImagePrivacyLevel.MASK_NONE,
|
|
19
|
+
touchPrivacy: _ft_session_replay.TouchPrivacyLevel.SHOW,
|
|
20
|
+
hide: false
|
|
21
|
+
}), children);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=MaskNoneView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_PrivacyView","_ft_session_replay","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","MaskNoneView","children","props","createElement","PrivacyView","textAndInputPrivacy","TextAndInputPrivacyLevel","MASK_SENSITIVE_INPUTS","imagePrivacy","ImagePrivacyLevel","MASK_NONE","touchPrivacy","TouchPrivacyLevel","SHOW","hide"],"sources":["MaskNoneView.tsx"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport { PrivacyView } from './PrivacyView';\nimport {\n ImagePrivacyLevel,\n TextAndInputPrivacyLevel,\n TouchPrivacyLevel,\n} from '../../ft_session_replay';\n\ntype MaskNoneViewProps = ViewProps & {\n children?: React.ReactNode;\n};\n\nexport function MaskNoneView({ children, ...props }: MaskNoneViewProps) {\n return (\n <PrivacyView\n {...props}\n textAndInputPrivacy={TextAndInputPrivacyLevel.MASK_SENSITIVE_INPUTS}\n imagePrivacy={ImagePrivacyLevel.MASK_NONE}\n touchPrivacy={TouchPrivacyLevel.SHOW}\n hide={false}\n >\n {children as any}\n </PrivacyView>\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AAIiC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAM1B,SAASO,YAAYA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAyB,CAAC,EAAE;EACtE,oBACEtB,MAAA,CAAAO,OAAA,CAAAgB,aAAA,CAACpB,YAAA,CAAAqB,WAAW,EAAAhB,QAAA,KACNc,KAAK;IACTG,mBAAmB,EAAEC,2CAAwB,CAACC,qBAAsB;IACpEC,YAAY,EAAEC,oCAAiB,CAACC,SAAU;IAC1CC,YAAY,EAAEC,oCAAiB,CAACC,IAAK;IACrCC,IAAI,EAAE;EAAM,IAEXb,QACU,CAAC;AAElB","ignoreList":[]}
|