@multiplayer-app/session-recorder-react-native 1.0.1-beta.7 → 1.0.1-beta.9
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/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativeModule.kt +2 -1
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativePackage.kt +1 -1
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativeSpec.kt +79 -0
- package/ios/SessionRecorderNative.podspec +1 -7
- package/ios/SessionRecorderNative.swift +1 -1
- package/lib/module/SessionRecorderNativeSpec.js +2 -2
- package/lib/module/SessionRecorderNativeSpec.js.map +1 -1
- package/lib/typescript/src/SessionRecorderNativeSpec.d.ts +1 -2
- package/lib/typescript/src/SessionRecorderNativeSpec.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/SessionRecorderNativeSpec.ts +3 -4
- package/ios/SessionRecorderNativeSpec.swift +0 -55
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
2
|
</manifest>
|
|
@@ -15,6 +15,7 @@ import android.webkit.WebView
|
|
|
15
15
|
import android.widget.*
|
|
16
16
|
import com.facebook.react.bridge.*
|
|
17
17
|
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
18
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
18
19
|
import com.sessionrecordernative.util.ViewUtils
|
|
19
20
|
import java.io.ByteArrayOutputStream
|
|
20
21
|
import java.util.concurrent.CountDownLatch
|
|
@@ -24,7 +25,7 @@ import com.facebook.react.module.annotations.ReactModule
|
|
|
24
25
|
|
|
25
26
|
@ReactModule(name = SessionRecorderNativeModule.NAME)
|
|
26
27
|
class SessionRecorderNativeModule(reactContext: ReactApplicationContext) :
|
|
27
|
-
|
|
28
|
+
ReactContextBaseJavaModule(reactContext) {
|
|
28
29
|
|
|
29
30
|
override fun getName(): String {
|
|
30
31
|
return NAME
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
package com.multiplayer.sessionrecordernative
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
5
|
+
import com.facebook.react.bridge.ReactMethod
|
|
6
|
+
import com.facebook.react.bridge.Promise
|
|
7
|
+
import com.facebook.react.bridge.Callback
|
|
8
|
+
import com.facebook.react.bridge.ReadableMap
|
|
9
|
+
import com.facebook.react.bridge.Arguments
|
|
10
|
+
import com.facebook.react.bridge.WritableMap
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Spec class for SessionRecorderNative TurboModule
|
|
14
|
+
* This class defines the interface that React Native expects for TurboModules
|
|
15
|
+
*/
|
|
16
|
+
class SessionRecorderNativeSpec(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
|
17
|
+
|
|
18
|
+
override fun getName(): String {
|
|
19
|
+
return NAME
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
companion object {
|
|
23
|
+
const val NAME = "SessionRecorderNative"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Delegate to the actual implementation
|
|
27
|
+
private val implementation = SessionRecorderNativeModule(reactContext)
|
|
28
|
+
|
|
29
|
+
@ReactMethod
|
|
30
|
+
fun captureAndMask(promise: Promise) {
|
|
31
|
+
implementation.captureAndMask(promise)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@ReactMethod
|
|
35
|
+
fun captureAndMaskWithOptions(options: ReadableMap, promise: Promise) {
|
|
36
|
+
implementation.captureAndMaskWithOptions(options, promise)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@ReactMethod
|
|
40
|
+
fun startGestureRecording(promise: Promise) {
|
|
41
|
+
implementation.startGestureRecording(promise)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@ReactMethod
|
|
45
|
+
fun stopGestureRecording(promise: Promise) {
|
|
46
|
+
implementation.stopGestureRecording(promise)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@ReactMethod
|
|
50
|
+
fun isGestureRecordingActive(promise: Promise) {
|
|
51
|
+
implementation.isGestureRecordingActive(promise)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@ReactMethod
|
|
55
|
+
fun setGestureCallback(callback: Callback) {
|
|
56
|
+
implementation.setGestureCallback(callback)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@ReactMethod
|
|
60
|
+
fun recordGesture(
|
|
61
|
+
gestureType: String,
|
|
62
|
+
x: Double,
|
|
63
|
+
y: Double,
|
|
64
|
+
target: String?,
|
|
65
|
+
metadata: ReadableMap?
|
|
66
|
+
) {
|
|
67
|
+
implementation.recordGesture(gestureType, x, y, target, metadata)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@ReactMethod
|
|
71
|
+
fun addListener(eventName: String) {
|
|
72
|
+
implementation.addListener(eventName)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@ReactMethod
|
|
76
|
+
fun removeListeners(count: Int) {
|
|
77
|
+
implementation.removeListeners(count)
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -14,15 +14,9 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
s.source = { :git => "https://github.com/multiplayer-app/multiplayer-session-recorder-javascript.git", :tag => "#{s.version}" }
|
|
15
15
|
|
|
16
16
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
17
|
+
s.swift_version = "5.0"
|
|
17
18
|
s.requires_arc = true
|
|
18
19
|
|
|
19
20
|
s.dependency "React-Core"
|
|
20
21
|
s.dependency "React"
|
|
21
|
-
s.dependency "React-Codegen"
|
|
22
|
-
|
|
23
|
-
# Turbo Module support
|
|
24
|
-
s.pod_target_xcconfig = {
|
|
25
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/React-Core/React\"",
|
|
26
|
-
"DEFINES_MODULE" => "YES"
|
|
27
|
-
}
|
|
28
22
|
end
|
|
@@ -3,7 +3,7 @@ import React
|
|
|
3
3
|
import WebKit
|
|
4
4
|
|
|
5
5
|
@objc(SessionRecorderNative)
|
|
6
|
-
class SessionRecorderNative: RCTEventEmitter, UIGestureRecognizerDelegate
|
|
6
|
+
class SessionRecorderNative: RCTEventEmitter, UIGestureRecognizerDelegate {
|
|
7
7
|
|
|
8
8
|
// Configuration options
|
|
9
9
|
private var maskTextInputs: Bool = true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
export default
|
|
3
|
+
import { NativeModules } from 'react-native';
|
|
4
|
+
export default NativeModules.SessionRecorderNative;
|
|
5
5
|
//# sourceMappingURL=SessionRecorderNativeSpec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["NativeModules","SessionRecorderNative"],"sourceRoot":"../../src","sources":["SessionRecorderNativeSpec.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,cAAc;AAmD5C,eAAeA,aAAa,CAACC,qBAAqB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRecorderNativeSpec.d.ts","sourceRoot":"","sources":["../../../src/SessionRecorderNativeSpec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SessionRecorderNativeSpec.d.ts","sourceRoot":"","sources":["../../../src/SessionRecorderNativeSpec.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAElC;;;;OAIG;IACH,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAGpE,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,kBAAkB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IACzD,aAAa,CACX,WAAW,EAAE,MAAM,EACnB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,CAAC,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,GAAG,GACb,IAAI,CAAC;IACR,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC7B,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,0FAA0F;IAC1F,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;wBAEqD,IAAI;AAA1D,wBAA2D"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplayer-app/session-recorder-react-native",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.9",
|
|
4
4
|
"description": "Multiplayer Fullstack Session Recorder for React Native",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Multiplayer Software, Inc.",
|
|
7
7
|
"url": "https://www.multiplayer.app"
|
|
8
8
|
},
|
|
9
9
|
"license": "MIT",
|
|
10
|
+
"homepage": "https://github.com/multiplayer-app/multiplayer-session-recorder-javascript",
|
|
10
11
|
"bugs": {
|
|
11
12
|
"url": "https://github.com/multiplayer-app/multiplayer-session-recorder-javascript/issues"
|
|
12
13
|
},
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TurboModuleRegistry } from 'react-native';
|
|
1
|
+
import { NativeModules } from 'react-native';
|
|
3
2
|
|
|
4
|
-
export interface Spec
|
|
3
|
+
export interface Spec {
|
|
5
4
|
/**
|
|
6
5
|
* Capture the current screen and apply masking to sensitive elements
|
|
7
6
|
* @returns Promise that resolves to base64 encoded image
|
|
@@ -50,4 +49,4 @@ export interface MaskingOptions {
|
|
|
50
49
|
maskSandboxedViews?: boolean;
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
export default
|
|
52
|
+
export default NativeModules.SessionRecorderNative as Spec;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import Foundation
|
|
2
|
-
import React
|
|
3
|
-
|
|
4
|
-
@objc(SessionRecorderNativeSpec)
|
|
5
|
-
class SessionRecorderNativeSpec: NSObject, RCTTurboModule {
|
|
6
|
-
|
|
7
|
-
@objc static func moduleName() -> String! {
|
|
8
|
-
return "SessionRecorderNative"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@objc static func requiresMainQueueSetup() -> Bool {
|
|
12
|
-
return true
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@objc func captureAndMask(_ resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
|
16
|
-
// Implementation will be provided by the actual module
|
|
17
|
-
reject("NOT_IMPLEMENTED", "Method not implemented", nil)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@objc func captureAndMaskWithOptions(_ options: NSDictionary, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
|
21
|
-
// Implementation will be provided by the actual module
|
|
22
|
-
reject("NOT_IMPLEMENTED", "Method not implemented", nil)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@objc func startGestureRecording(_ resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
|
26
|
-
// Implementation will be provided by the actual module
|
|
27
|
-
reject("NOT_IMPLEMENTED", "Method not implemented", nil)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@objc func stopGestureRecording(_ resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
|
31
|
-
// Implementation will be provided by the actual module
|
|
32
|
-
reject("NOT_IMPLEMENTED", "Method not implemented", nil)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@objc func isGestureRecordingActive(_ resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
|
36
|
-
// Implementation will be provided by the actual module
|
|
37
|
-
reject("NOT_IMPLEMENTED", "Method not implemented", nil)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@objc func setGestureCallback(_ callback: @escaping RCTResponseSenderBlock) {
|
|
41
|
-
// Implementation will be provided by the actual module
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@objc func recordGesture(_ gestureType: String, x: NSNumber, y: NSNumber, target: String?, metadata: NSDictionary?) {
|
|
45
|
-
// Implementation will be provided by the actual module
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@objc func addListener(_ eventName: String) {
|
|
49
|
-
// Required for RN event emitter contracts
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@objc func removeListeners(_ count: Int) {
|
|
53
|
-
// Required for RN event emitter contracts
|
|
54
|
-
}
|
|
55
|
-
}
|