react-native-visit-rn-sdk 6.0.3 → 7.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/README.md +288 -122
- package/android/build.gradle +4 -1
- package/android/gradle.properties +4 -4
- package/android/src/main/AndroidManifest.xml +11 -5
- package/android/src/main/AndroidManifestNew.xml +11 -5
- package/android/src/main/java/com/visitrnsdk/VisitFitnessModule.kt +642 -0
- package/android/src/main/java/com/visitrnsdk/VisitRnSdkPackage.kt +1 -1
- package/android/src/main/java/com/visitrnsdk/VisitSessionStorage.kt +50 -0
- package/ios/VisitRnSdkViewManager.h +23 -1
- package/ios/VisitRnSdkViewManager.m +1259 -8
- package/lib/commonjs/Services.js +35 -0
- package/lib/commonjs/Services.js.map +1 -0
- package/lib/commonjs/constants.js +11 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/index.android.js +450 -205
- package/lib/commonjs/index.android.js.map +1 -1
- package/lib/commonjs/index.ios.js +266 -114
- package/lib/commonjs/index.ios.js.map +1 -1
- package/lib/module/Services.js +27 -0
- package/lib/module/Services.js.map +1 -0
- package/lib/module/constants.js +5 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/index.android.js +450 -206
- package/lib/module/index.android.js.map +1 -1
- package/lib/module/index.ios.js +268 -116
- package/lib/module/index.ios.js.map +1 -1
- package/lib/typescript/Services.d.ts +3 -0
- package/lib/typescript/Services.d.ts.map +1 -0
- package/lib/typescript/constants.d.ts +6 -0
- package/lib/typescript/constants.d.ts.map +1 -0
- package/lib/typescript/index.android.d.ts +26 -3
- package/lib/typescript/index.android.d.ts.map +1 -1
- package/lib/typescript/index.ios.d.ts +20 -3
- package/lib/typescript/index.ios.d.ts.map +1 -1
- package/package.json +14 -25
- package/react-native-visit-rn-sdk.podspec +2 -1
- package/src/Services.js +37 -0
- package/src/constants.js +4 -0
- package/src/index.android.js +773 -0
- package/src/index.ios.js +429 -0
- package/android/src/main/java/com/visitrnsdk/VisitRnSdkLocationModule.kt +0 -37
- package/lib/commonjs/assets/video-call/connecting-lottie.gif +0 -0
- package/lib/commonjs/assets/video-call/end-call.png +0 -0
- package/lib/commonjs/assets/video-call/mic-off.png +0 -0
- package/lib/commonjs/assets/video-call/reconnecting.gif +0 -0
- package/lib/commonjs/assets/video-call/switch-camera.png +0 -0
- package/lib/commonjs/assets/video-call/toggle-down.png +0 -0
- package/lib/commonjs/assets/video-call/toggle-up.png +0 -0
- package/lib/commonjs/assets/video-call/video-off.png +0 -0
- package/lib/commonjs/components/VideoCallComponent.js +0 -1088
- package/lib/commonjs/components/VideoCallComponent.js.map +0 -1
- package/lib/commonjs/index.js +0 -6
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/shims.d.js +0 -2
- package/lib/commonjs/shims.d.js.map +0 -1
- package/lib/commonjs/types.js +0 -2
- package/lib/commonjs/types.js.map +0 -1
- package/lib/module/assets/video-call/connecting-lottie.gif +0 -0
- package/lib/module/assets/video-call/end-call.png +0 -0
- package/lib/module/assets/video-call/mic-off.png +0 -0
- package/lib/module/assets/video-call/reconnecting.gif +0 -0
- package/lib/module/assets/video-call/switch-camera.png +0 -0
- package/lib/module/assets/video-call/toggle-down.png +0 -0
- package/lib/module/assets/video-call/toggle-up.png +0 -0
- package/lib/module/assets/video-call/video-off.png +0 -0
- package/lib/module/components/VideoCallComponent.js +0 -1081
- package/lib/module/components/VideoCallComponent.js.map +0 -1
- package/lib/module/index.js +0 -2
- package/lib/module/index.js.map +0 -1
- package/lib/module/shims.d.js +0 -2
- package/lib/module/shims.d.js.map +0 -1
- package/lib/module/types.js +0 -2
- package/lib/module/types.js.map +0 -1
- package/lib/typescript/components/VideoCallComponent.d.ts +0 -79
- package/lib/typescript/components/VideoCallComponent.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -17
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/types.d.ts +0 -24
- package/lib/typescript/types.d.ts.map +0 -1
- package/src/assets/video-call/connecting-lottie.gif +0 -0
- package/src/assets/video-call/end-call.png +0 -0
- package/src/assets/video-call/mic-off.png +0 -0
- package/src/assets/video-call/reconnecting.gif +0 -0
- package/src/assets/video-call/switch-camera.png +0 -0
- package/src/assets/video-call/toggle-down.png +0 -0
- package/src/assets/video-call/toggle-up.png +0 -0
- package/src/assets/video-call/video-off.png +0 -0
- package/src/components/VideoCallComponent.tsx +0 -1484
- package/src/index.android.tsx +0 -459
- package/src/index.ios.tsx +0 -238
- package/src/index.tsx +0 -25
- package/src/shims.d.ts +0 -49
- package/src/types.ts +0 -25
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { VisitRnSdkViewHandle, VisitRnSdkViewProps } from './types';
|
|
3
|
-
declare const VisitRnSdkView: React.ForwardRefExoticComponent<VisitRnSdkViewProps & React.RefAttributes<VisitRnSdkViewHandle>>;
|
|
4
1
|
export default VisitRnSdkView;
|
|
2
|
+
declare function VisitRnSdkView({ cpsid, baseUrl, errorBaseUrl, token, moduleName, environment, magicLink, isLoggingEnabled, }: {
|
|
3
|
+
cpsid: any;
|
|
4
|
+
baseUrl: any;
|
|
5
|
+
errorBaseUrl: any;
|
|
6
|
+
token: any;
|
|
7
|
+
moduleName: any;
|
|
8
|
+
environment: any;
|
|
9
|
+
magicLink: any;
|
|
10
|
+
isLoggingEnabled: any;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare namespace VisitRnSdkView {
|
|
13
|
+
namespace defaultProps {
|
|
14
|
+
let id: string;
|
|
15
|
+
let token: string;
|
|
16
|
+
let baseUrl: string;
|
|
17
|
+
let errorBaseUrl: string;
|
|
18
|
+
let moduleName: string;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
import React from 'react';
|
|
5
22
|
//# sourceMappingURL=index.ios.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.ios.d.ts","sourceRoot":"","sources":["../../src/index.ios.
|
|
1
|
+
{"version":3,"file":"index.ios.d.ts","sourceRoot":"","sources":["../../src/index.ios.js"],"names":[],"mappings":";AAyDA;;;;;;;;;sBA0UC;;;;;;;;;;kBA7XM,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-visit-rn-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "a package to inject data into visit health pwa",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"*.podspec",
|
|
17
17
|
"!lib/typescript/example",
|
|
18
18
|
"!ios/build",
|
|
19
|
-
"!android/bin",
|
|
20
19
|
"!android/build",
|
|
20
|
+
"!android/bin",
|
|
21
21
|
"!android/gradle",
|
|
22
22
|
"!android/gradlew",
|
|
23
23
|
"!android/gradlew.bat",
|
|
@@ -29,19 +29,14 @@
|
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
31
|
"test": "jest",
|
|
32
|
-
"typecheck": "tsc --noEmit",
|
|
32
|
+
"typecheck": "tsc --noEmit -p tsconfig.build.json",
|
|
33
33
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
34
34
|
"prepack": "bob build",
|
|
35
35
|
"release": "release-it",
|
|
36
|
-
"example
|
|
37
|
-
"example:android": "npm --prefix example run android --",
|
|
38
|
-
"example:ios": "npm --prefix example run ios --",
|
|
39
|
-
"example:test": "npm --prefix example run test --",
|
|
40
|
-
"example:typecheck": "npm --prefix example run typecheck",
|
|
41
|
-
"example:pods": "npm --prefix example run pods",
|
|
36
|
+
"example": "yarn --cwd example",
|
|
42
37
|
"build:android": "cd example/android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a",
|
|
43
|
-
"build:ios": "cd example/ios && xcodebuild -workspace
|
|
44
|
-
"bootstrap": "
|
|
38
|
+
"build:ios": "cd example/ios && xcodebuild -workspace VisitRnSdkExample.xcworkspace -scheme VisitRnSdkExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO",
|
|
39
|
+
"bootstrap": "yarn example && yarn install && yarn example pods",
|
|
45
40
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build"
|
|
46
41
|
},
|
|
47
42
|
"keywords": [
|
|
@@ -70,13 +65,10 @@
|
|
|
70
65
|
"@types/jest": "^28.1.2",
|
|
71
66
|
"@types/react": "~17.0.21",
|
|
72
67
|
"@types/react-native": "0.70.0",
|
|
73
|
-
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
|
74
|
-
"@typescript-eslint/parser": "^8.70.0",
|
|
75
68
|
"commitlint": "^17.0.2",
|
|
76
69
|
"del-cli": "^5.0.0",
|
|
77
70
|
"eslint": "^8.4.1",
|
|
78
71
|
"eslint-config-prettier": "^8.5.0",
|
|
79
|
-
"eslint-plugin-jest": "^26.5.3",
|
|
80
72
|
"eslint-plugin-prettier": "^4.0.0",
|
|
81
73
|
"jest": "^28.1.1",
|
|
82
74
|
"pod-install": "^0.1.0",
|
|
@@ -84,30 +76,26 @@
|
|
|
84
76
|
"react": "18.2.0",
|
|
85
77
|
"react-native": "0.72.4",
|
|
86
78
|
"react-native-builder-bob": "^0.20.0",
|
|
87
|
-
"react-native-permissions": "4.1.5",
|
|
88
|
-
"react-test-renderer": "18.2.0",
|
|
89
79
|
"release-it": "^15.0.0",
|
|
90
80
|
"turbo": "^1.10.7",
|
|
91
81
|
"typescript": "^5.0.2"
|
|
92
82
|
},
|
|
83
|
+
"resolutions": {
|
|
84
|
+
"@types/react": "17.0.21"
|
|
85
|
+
},
|
|
93
86
|
"peerDependencies": {
|
|
94
|
-
"@twilio/video-react-native-sdk": "3.5.0",
|
|
95
87
|
"react": "*",
|
|
96
|
-
"react-native": "*"
|
|
97
|
-
"react-native-permissions": "^4.1.5"
|
|
88
|
+
"react-native": "*"
|
|
98
89
|
},
|
|
99
90
|
"engines": {
|
|
100
91
|
"node": ">= 16.0.0"
|
|
101
92
|
},
|
|
102
|
-
"packageManager": "
|
|
93
|
+
"packageManager": "^yarn@1.22.15",
|
|
103
94
|
"jest": {
|
|
104
95
|
"preset": "react-native",
|
|
105
96
|
"modulePathIgnorePatterns": [
|
|
106
97
|
"<rootDir>/example/node_modules",
|
|
107
98
|
"<rootDir>/lib/"
|
|
108
|
-
],
|
|
109
|
-
"testPathIgnorePatterns": [
|
|
110
|
-
"<rootDir>/example/"
|
|
111
99
|
]
|
|
112
100
|
},
|
|
113
101
|
"commitlint": {
|
|
@@ -118,7 +106,7 @@
|
|
|
118
106
|
"release-it": {
|
|
119
107
|
"git": {
|
|
120
108
|
"commitMessage": "chore: release ${version}",
|
|
121
|
-
"tagName": "
|
|
109
|
+
"tagName": "${version}"
|
|
122
110
|
},
|
|
123
111
|
"npm": {
|
|
124
112
|
"publish": true
|
|
@@ -177,7 +165,8 @@
|
|
|
177
165
|
]
|
|
178
166
|
},
|
|
179
167
|
"dependencies": {
|
|
180
|
-
"
|
|
168
|
+
"axios": "^1.8.2",
|
|
169
|
+
"moment": "^2.29.4"
|
|
181
170
|
},
|
|
182
171
|
"directories": {
|
|
183
172
|
"example": "example"
|
|
@@ -11,10 +11,11 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.license = package["license"]
|
|
12
12
|
s.authors = package["author"]
|
|
13
13
|
|
|
14
|
-
s.platforms = { :ios => "
|
|
14
|
+
s.platforms = { :ios => "11.0" }
|
|
15
15
|
s.source = { :git => "https://github.com/yash-vardhan-mishra/react-native-visit-rn-sdk.git", :tag => "#{s.version}" }
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm}"
|
|
18
|
+
|
|
18
19
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
19
20
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
20
21
|
if respond_to?(:install_modules_dependencies, true)
|
package/src/Services.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
|
|
3
|
+
export const httpClient = axios.create({
|
|
4
|
+
timeout: 60000,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
export const getWebViewLink = (
|
|
8
|
+
baseUrl,
|
|
9
|
+
token,
|
|
10
|
+
cpsid,
|
|
11
|
+
srcClientId,
|
|
12
|
+
deviceId,
|
|
13
|
+
appVersion,
|
|
14
|
+
deviceVersion,
|
|
15
|
+
userEnv
|
|
16
|
+
) => {
|
|
17
|
+
const data = {
|
|
18
|
+
cpsid,
|
|
19
|
+
token,
|
|
20
|
+
srcClientId,
|
|
21
|
+
deviceId,
|
|
22
|
+
appVersion,
|
|
23
|
+
deviceVersion,
|
|
24
|
+
userEnv,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return httpClient
|
|
28
|
+
.post(`${baseUrl}/partners/v3/generate-magic-link-star-health`, data)
|
|
29
|
+
.then((res) => {
|
|
30
|
+
console.log('getWebViewLink res', { res });
|
|
31
|
+
return res;
|
|
32
|
+
})
|
|
33
|
+
.catch((err) => {
|
|
34
|
+
console.log('getWebViewLink err', { err });
|
|
35
|
+
return err;
|
|
36
|
+
});
|
|
37
|
+
};
|
package/src/constants.js
ADDED