@exodus/react-native-webview 9.4.0-no-android.0 → 11.26.1-exodus.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/README.md +21 -18
- package/android/.editorconfig +6 -0
- package/android/build.gradle +137 -0
- package/android/gradle.properties +6 -0
- package/android/src/main/AndroidManifest.xml +15 -0
- package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewFileProvider.java +14 -0
- package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java +1650 -0
- package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java +550 -0
- package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewPackage.kt +15 -0
- package/android/src/main/java/com/reactnativecommunity/webview/WebViewConfig.java +12 -0
- package/android/src/main/java/com/reactnativecommunity/webview/events/TopHttpErrorEvent.kt +25 -0
- package/android/src/main/java/com/reactnativecommunity/webview/events/TopLoadingErrorEvent.kt +25 -0
- package/android/src/main/java/com/reactnativecommunity/webview/events/TopLoadingFinishEvent.kt +24 -0
- package/android/src/main/java/com/reactnativecommunity/webview/events/TopLoadingProgressEvent.kt +24 -0
- package/android/src/main/java/com/reactnativecommunity/webview/events/TopLoadingStartEvent.kt +25 -0
- package/android/src/main/java/com/reactnativecommunity/webview/events/TopMessageEvent.kt +24 -0
- package/android/src/main/java/com/reactnativecommunity/webview/events/TopRenderProcessGoneEvent.kt +26 -0
- package/android/src/main/java/com/reactnativecommunity/webview/events/TopShouldStartLoadWithRequestEvent.kt +29 -0
- package/android/src/main/res/xml/file_provider_paths.xml +6 -0
- package/apple/RNCWKProcessPoolManager.h +15 -0
- package/apple/RNCWKProcessPoolManager.m +36 -0
- package/apple/RNCWebView.h +117 -0
- package/apple/RNCWebView.m +1532 -0
- package/apple/RNCWebViewManager.h +13 -0
- package/apple/RNCWebViewManager.m +288 -0
- package/index.d.ts +65 -0
- package/index.js +4 -0
- package/ios/RNCWebView.xcodeproj/project.pbxproj +2 -0
- package/lib/WebView.android.d.ts +7 -0
- package/lib/WebView.android.js +125 -1
- package/lib/WebView.d.ts +7 -0
- package/lib/WebView.ios.d.ts +7 -0
- package/lib/WebView.ios.js +148 -202
- package/lib/WebView.js +9 -2
- package/lib/WebView.styles.d.ts +12 -0
- package/lib/WebView.styles.js +7 -7
- package/lib/WebViewNativeComponent.android.d.ts +4 -0
- package/lib/WebViewNativeComponent.android.js +3 -0
- package/lib/WebViewNativeComponent.ios.d.ts +4 -0
- package/lib/WebViewNativeComponent.ios.js +3 -0
- package/lib/WebViewShared.d.ts +37 -0
- package/lib/WebViewShared.js +121 -24
- package/lib/WebViewTypes.d.ts +873 -0
- package/lib/WebViewTypes.js +31 -16
- package/lib/index.d.ts +4 -0
- package/lib/index.js +3 -0
- package/package.json +83 -87
- package/react-native-webview.podspec +4 -4
- package/react-native.config.js +37 -0
package/lib/WebViewTypes.js
CHANGED
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
/* eslint-disable react/no-multi-comp, max-classes-per-file */
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
2
17
|
import { Component } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
;
|
|
18
|
+
var NativeWebViewIOS = /** @class */ (function (_super) {
|
|
19
|
+
__extends(NativeWebViewIOS, _super);
|
|
20
|
+
function NativeWebViewIOS() {
|
|
21
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
|
+
}
|
|
23
|
+
return NativeWebViewIOS;
|
|
24
|
+
}(NativeWebViewIOSBase));
|
|
25
|
+
export { NativeWebViewIOS };
|
|
26
|
+
var NativeWebViewAndroid = /** @class */ (function (_super) {
|
|
27
|
+
__extends(NativeWebViewAndroid, _super);
|
|
28
|
+
function NativeWebViewAndroid() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
return NativeWebViewAndroid;
|
|
32
|
+
}(NativeWebViewAndroidBase));
|
|
33
|
+
export { NativeWebViewAndroid };
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,87 +1,83 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@exodus/react-native-webview",
|
|
3
|
-
"description": "React Native WebView component for iOS, Android, macOS, and Windows",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"start
|
|
18
|
-
"ci": "CI=true && yarn lint",
|
|
19
|
-
"ci:publish": "yarn semantic-release",
|
|
20
|
-
"lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx",
|
|
21
|
-
"build": "yarn tsc",
|
|
22
|
-
"prepare": "yarn build",
|
|
23
|
-
"appium": "appium"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"react": "
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"@babel/
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@react
|
|
44
|
-
"@
|
|
45
|
-
"@types/
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"eslint": "
|
|
56
|
-
"eslint-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"!lib/*.apple.js",
|
|
85
|
-
"react-native-webview.podspec"
|
|
86
|
-
]
|
|
87
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@exodus/react-native-webview",
|
|
3
|
+
"description": "React Native WebView component for iOS, Android, macOS, and Windows",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"main-internal": "src/index.ts",
|
|
6
|
+
"typings": "index.d.ts",
|
|
7
|
+
"author": "Jamon Holmgren <jamon@infinite.red>",
|
|
8
|
+
"contributors": [
|
|
9
|
+
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"version": "11.26.1-exodus.1",
|
|
13
|
+
"homepage": "https://github.com/ExodusMovement/react-native-webview#readme",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"android": "react-native run-android",
|
|
16
|
+
"ios": "react-native run-ios --project-path example/ios",
|
|
17
|
+
"start": "cd example && react-native start",
|
|
18
|
+
"ci": "CI=true && yarn lint",
|
|
19
|
+
"ci:publish": "yarn semantic-release",
|
|
20
|
+
"lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx",
|
|
21
|
+
"build": "yarn tsc",
|
|
22
|
+
"prepare": "yarn build",
|
|
23
|
+
"appium": "appium"
|
|
24
|
+
},
|
|
25
|
+
"rn-docs": {
|
|
26
|
+
"title": "Webview",
|
|
27
|
+
"type": "Component"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"react": "*",
|
|
31
|
+
"react-native": "*"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"escape-string-regexp": "2.0.0",
|
|
35
|
+
"invariant": "2.2.4"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@babel/core": "^7.0.0",
|
|
39
|
+
"@babel/runtime": "^7.0.0",
|
|
40
|
+
"@semantic-release/git": "7.0.16",
|
|
41
|
+
"@types/invariant": "^2.2.30",
|
|
42
|
+
"@types/jest": "^26.0.0",
|
|
43
|
+
"@types/react": "^17.0.0",
|
|
44
|
+
"@types/react-native": "^0.67.3",
|
|
45
|
+
"@types/selenium-webdriver": "4.0.9",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "2.1.0",
|
|
47
|
+
"@typescript-eslint/parser": "2.1.0",
|
|
48
|
+
"appium": "1.17.0",
|
|
49
|
+
"eslint": "6.3.0",
|
|
50
|
+
"eslint-config-airbnb": "18.0.1",
|
|
51
|
+
"eslint-config-prettier": "6.2.0",
|
|
52
|
+
"eslint-plugin-import": "2.18.2",
|
|
53
|
+
"eslint-plugin-jsx-a11y": "6.2.3",
|
|
54
|
+
"eslint-plugin-react": "7.14.3",
|
|
55
|
+
"eslint-plugin-react-hooks": "^4.5.0",
|
|
56
|
+
"eslint-plugin-react-native": "3.7.0",
|
|
57
|
+
"jest": "^26.6.3",
|
|
58
|
+
"metro-react-native-babel-preset": "^0.67.0",
|
|
59
|
+
"react": "17.0.2",
|
|
60
|
+
"react-native": "0.68.5",
|
|
61
|
+
"react-native-test-app": "2.3.2",
|
|
62
|
+
"selenium-appium": "1.0.2",
|
|
63
|
+
"selenium-webdriver": "4.0.0-alpha.7",
|
|
64
|
+
"semantic-release": "15.13.24",
|
|
65
|
+
"typescript": "^4.0.0",
|
|
66
|
+
"winappdriver": "^0.0.7"
|
|
67
|
+
},
|
|
68
|
+
"repository": {
|
|
69
|
+
"type": "git",
|
|
70
|
+
"url": "https://github.com/ExodusMovement/react-native-webview.git"
|
|
71
|
+
},
|
|
72
|
+
"files": [
|
|
73
|
+
"android",
|
|
74
|
+
"apple",
|
|
75
|
+
"ios",
|
|
76
|
+
"lib",
|
|
77
|
+
"index.js",
|
|
78
|
+
"index.d.ts",
|
|
79
|
+
"react-native-webview.podspec",
|
|
80
|
+
"react-native.config.js",
|
|
81
|
+
"!**/*.map"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
@@ -3,17 +3,17 @@ require 'json'
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
4
|
|
|
5
5
|
Pod::Spec.new do |s|
|
|
6
|
-
s.name =
|
|
6
|
+
s.name = 'react-native-webview'
|
|
7
7
|
s.version = package['version']
|
|
8
8
|
s.summary = package['description']
|
|
9
9
|
s.license = package['license']
|
|
10
10
|
|
|
11
11
|
s.authors = package['author']
|
|
12
12
|
s.homepage = package['homepage']
|
|
13
|
-
s.platforms = { :ios => "9.0"
|
|
13
|
+
s.platforms = { :ios => "9.0" }
|
|
14
14
|
|
|
15
|
-
s.source = { :git => "https://github.com/
|
|
15
|
+
s.source = { :git => "https://github.com/ExodusMovement/react-native-webview.git", :tag => "v#{s.version}" }
|
|
16
16
|
s.source_files = "apple/**/*.{h,m}"
|
|
17
17
|
|
|
18
|
-
s.dependency 'React'
|
|
18
|
+
s.dependency 'React-Core'
|
|
19
19
|
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const project = (() => {
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
try {
|
|
5
|
+
const {
|
|
6
|
+
androidManifestPath,
|
|
7
|
+
iosProjectPath,
|
|
8
|
+
} = require('react-native-test-app');
|
|
9
|
+
return {
|
|
10
|
+
android: {
|
|
11
|
+
sourceDir: path.join('example', 'android'),
|
|
12
|
+
manifestPath: androidManifestPath(
|
|
13
|
+
path.join(__dirname, 'example', 'android'),
|
|
14
|
+
),
|
|
15
|
+
},
|
|
16
|
+
ios: {
|
|
17
|
+
project: iosProjectPath('example/ios'),
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
} catch (_) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
})();
|
|
24
|
+
|
|
25
|
+
module.exports = {
|
|
26
|
+
dependencies: {
|
|
27
|
+
// Help rn-cli find and autolink this library
|
|
28
|
+
'react-native-webview': {
|
|
29
|
+
root: __dirname,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
dependency: {
|
|
33
|
+
platforms: {
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
...(project ? { project } : undefined),
|
|
37
|
+
};
|