@exodus/react-native-webview 9.4.0-no-android.0 → 11.26.1-exodus.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.
Files changed (49) hide show
  1. package/README.md +21 -18
  2. package/android/.editorconfig +6 -0
  3. package/android/build.gradle +137 -0
  4. package/android/gradle.properties +6 -0
  5. package/android/src/main/AndroidManifest.xml +15 -0
  6. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewFileProvider.java +14 -0
  7. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java +1650 -0
  8. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java +550 -0
  9. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewPackage.kt +15 -0
  10. package/android/src/main/java/com/reactnativecommunity/webview/WebViewConfig.java +12 -0
  11. package/android/src/main/java/com/reactnativecommunity/webview/events/TopHttpErrorEvent.kt +25 -0
  12. package/android/src/main/java/com/reactnativecommunity/webview/events/TopLoadingErrorEvent.kt +25 -0
  13. package/android/src/main/java/com/reactnativecommunity/webview/events/TopLoadingFinishEvent.kt +24 -0
  14. package/android/src/main/java/com/reactnativecommunity/webview/events/TopLoadingProgressEvent.kt +24 -0
  15. package/android/src/main/java/com/reactnativecommunity/webview/events/TopLoadingStartEvent.kt +25 -0
  16. package/android/src/main/java/com/reactnativecommunity/webview/events/TopMessageEvent.kt +24 -0
  17. package/android/src/main/java/com/reactnativecommunity/webview/events/TopRenderProcessGoneEvent.kt +26 -0
  18. package/android/src/main/java/com/reactnativecommunity/webview/events/TopShouldStartLoadWithRequestEvent.kt +29 -0
  19. package/android/src/main/res/xml/file_provider_paths.xml +6 -0
  20. package/apple/RNCWKProcessPoolManager.h +15 -0
  21. package/apple/RNCWKProcessPoolManager.m +36 -0
  22. package/apple/RNCWebView.h +117 -0
  23. package/apple/RNCWebView.m +1532 -0
  24. package/apple/RNCWebViewManager.h +13 -0
  25. package/apple/RNCWebViewManager.m +288 -0
  26. package/index.d.ts +65 -0
  27. package/index.js +4 -0
  28. package/ios/RNCWebView.xcodeproj/project.pbxproj +2 -0
  29. package/lib/WebView.android.d.ts +7 -0
  30. package/lib/WebView.android.js +112 -1
  31. package/lib/WebView.d.ts +7 -0
  32. package/lib/WebView.ios.d.ts +7 -0
  33. package/lib/WebView.ios.js +134 -202
  34. package/lib/WebView.js +9 -2
  35. package/lib/WebView.styles.d.ts +12 -0
  36. package/lib/WebView.styles.js +7 -7
  37. package/lib/WebViewNativeComponent.android.d.ts +4 -0
  38. package/lib/WebViewNativeComponent.android.js +3 -0
  39. package/lib/WebViewNativeComponent.ios.d.ts +4 -0
  40. package/lib/WebViewNativeComponent.ios.js +3 -0
  41. package/lib/WebViewShared.d.ts +37 -0
  42. package/lib/WebViewShared.js +121 -24
  43. package/lib/WebViewTypes.d.ts +893 -0
  44. package/lib/WebViewTypes.js +31 -16
  45. package/lib/index.d.ts +4 -0
  46. package/lib/index.js +3 -0
  47. package/package.json +83 -87
  48. package/react-native-webview.podspec +3 -3
  49. package/react-native.config.js +37 -0
@@ -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
- export class NativeWebViewIOS extends NativeWebViewIOSBase {
4
- }
5
- export class NativeWebViewMacOS extends NativeWebViewMacOSBase {
6
- }
7
- export class NativeWebViewAndroid extends NativeWebViewAndroidBase {
8
- }
9
- export class NativeWebViewWindows extends NativeWebViewWindowsBase {
10
- }
11
- export var ContentInsetAdjustmentBehavior;
12
- (function (ContentInsetAdjustmentBehavior) {
13
- ContentInsetAdjustmentBehavior["automatic"] = "automatic";
14
- ContentInsetAdjustmentBehavior["scrollableAxes"] = "scrollableAxes";
15
- ContentInsetAdjustmentBehavior["never"] = "never";
16
- ContentInsetAdjustmentBehavior["always"] = "always";
17
- })(ContentInsetAdjustmentBehavior || (ContentInsetAdjustmentBehavior = {}));
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
@@ -0,0 +1,4 @@
1
+ import WebView from './WebView';
2
+ export { WebView };
3
+ export default WebView;
4
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import WebView from './WebView';
2
+ export { WebView };
3
+ export default WebView;
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
- "typings": "index.d.ts",
5
- "author": "Jamon Holmgren <jamon@infinite.red>",
6
- "contributors": [
7
- "Thibault Malbranche <malbranche.thibault@gmail.com>"
8
- ],
9
- "license": "MIT",
10
- "version": "9.4.0-no-android.0",
11
- "homepage": "https://github.com/react-native-community/react-native-webview#readme",
12
- "scripts": {
13
- "start": "node node_modules/react-native/local-cli/cli.js start",
14
- "start:android": "react-native run-android --root example/",
15
- "start:ios": "react-native run-ios --project-path example/ios --scheme example",
16
- "start:macos": "node node_modules/react-native-macos/local-cli/cli.js start --use-react-native-macos",
17
- "start:windows": "react-native start --use-react-native-windows",
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
- "test:windows": "yarn jest --setupFiles=./jest-setups/jest.setup.windows.js"
25
- },
26
- "rn-docs": {
27
- "title": "Webview",
28
- "type": "Component"
29
- },
30
- "peerDependencies": {
31
- "react": "^16.9",
32
- "react-native": ">=0.60 <0.62"
33
- },
34
- "dependencies": {
35
- "escape-string-regexp": "2.0.0",
36
- "invariant": "2.2.4"
37
- },
38
- "devDependencies": {
39
- "@babel/core": "7.4.5",
40
- "@babel/runtime": "7.4.5",
41
- "@react-native-community/cli": "^3.2.0",
42
- "@react-native-community/cli-platform-android": "^3.0.0",
43
- "@react-native-community/cli-platform-ios": "^3.0.0",
44
- "@semantic-release/git": "7.0.16",
45
- "@types/invariant": "^2.2.30",
46
- "@types/jest": "24.0.18",
47
- "@types/react": "16.8.8",
48
- "@types/react-native": "0.60.11",
49
- "@types/selenium-webdriver": "4.0.9",
50
- "@typescript-eslint/eslint-plugin": "2.1.0",
51
- "@typescript-eslint/parser": "2.1.0",
52
- "babel-eslint": "10.0.3",
53
- "babel-jest": "24.8.0",
54
- "babel-plugin-module-resolver": "3.1.3",
55
- "eslint": "6.3.0",
56
- "eslint-config-airbnb": "18.0.1",
57
- "eslint-config-prettier": "6.2.0",
58
- "eslint-plugin-import": "2.18.2",
59
- "eslint-plugin-jsx-a11y": "6.2.3",
60
- "eslint-plugin-react": "7.14.3",
61
- "eslint-plugin-react-native": "3.7.0",
62
- "jest": "24.9.0",
63
- "metro": "0.56.4",
64
- "metro-react-native-babel-preset": "0.54.1",
65
- "react": "16.9.0",
66
- "react-native": "0.61.5",
67
- "react-native-macos": "0.60.0-microsoft.73",
68
- "react-native-windows": "0.61.5",
69
- "semantic-release": "15.13.24",
70
- "typescript": "3.6.2",
71
- "appium": "1.17.0",
72
- "selenium-appium": "0.0.15",
73
- "selenium-webdriver": "4.0.0-alpha.7"
74
- },
75
- "repository": {
76
- "type": "git",
77
- "url": "https://github.com/react-native-community/react-native-webview.git"
78
- },
79
- "files": [
80
- "ios",
81
- "lib/*.js",
82
- "!lib/*.windows.js",
83
- "!lib/*.macos.js",
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.0",
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
+ }
@@ -10,10 +10,10 @@ Pod::Spec.new do |s|
10
10
 
11
11
  s.authors = package['author']
12
12
  s.homepage = package['homepage']
13
- s.platforms = { :ios => "9.0", :osx => "10.14" }
13
+ s.platforms = { :ios => "9.0" }
14
14
 
15
- s.source = { :git => "https://github.com/react-native-community/react-native-webview.git", :tag => "v#{s.version}" }
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
+ };