@exodus/react-native-webview 11.26.1-exodus.32 → 11.26.1-exodus.34
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/java/com/reactnativecommunity/webview/RNCWebViewManager.java +24 -7
- package/apple/RNCWebView.m +10 -11
- package/apple/RNCWebViewManager.m +1 -0
- package/lib/WebViewShared.js +1 -1
- package/lib/WebViewTypes.d.ts +5 -0
- package/package.json +1 -1
- package/.all-contributorsrc +0 -185
- package/.circleci/config.yml +0 -66
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -94
- package/.flowconfig +0 -88
- package/.flowconfig.android +0 -88
- package/.gitattributes +0 -12
- package/.github/CODEOWNERS +0 -1
- package/.github/ISSUE_TEMPLATE/bug-report.md +0 -42
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -30
- package/.github/workflows/android-ci.yml +0 -35
- package/.github/workflows/detox.yml +0 -20
- package/.github/workflows/ios-ci.yml +0 -31
- package/.github/workflows/scripts/install-vs-features.ps1 +0 -108
- package/.github/workflows/stale.yml +0 -17
- package/.gitignore +0 -62
- package/.idea/.gitignore +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -9
- package/.idea/modules.xml +0 -8
- package/.idea/react-native-webview.iml +0 -9
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -104
- package/.prettierrc.js +0 -10
- package/.releaserc +0 -15
- package/.vscode/settings.json +0 -9
- package/babel.config.js +0 -11
- package/bin/setup +0 -26
- package/docs/Contributing.md +0 -102
- package/docs/Custom-Android.md +0 -222
- package/docs/Custom-iOS.md +0 -236
- package/docs/Debugging.md +0 -101
- package/docs/Getting-Started.md +0 -142
- package/docs/Guide.md +0 -613
- package/docs/Reference.md +0 -1639
- package/example/.gitignore +0 -14
- package/example/.watchmanconfig +0 -1
- package/example/App.tsx +0 -262
- package/example/android/build.gradle +0 -15
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/example/android/gradle.properties +0 -34
- package/example/android/gradlew +0 -234
- package/example/android/gradlew.bat +0 -89
- package/example/android/settings.gradle +0 -12
- package/example/app.json +0 -20
- package/example/assets/test.html +0 -9
- package/example/babel.config.js +0 -3
- package/example/examples/Alerts.tsx +0 -72
- package/example/examples/ApplePay.tsx +0 -23
- package/example/examples/Background.tsx +0 -54
- package/example/examples/Downloads.tsx +0 -57
- package/example/examples/Injection.tsx +0 -161
- package/example/examples/LocalPageLoad.tsx +0 -16
- package/example/examples/Messaging.tsx +0 -63
- package/example/examples/NativeWebpage.tsx +0 -22
- package/example/examples/Scrolling.tsx +0 -68
- package/example/examples/Uploads.tsx +0 -69
- package/example/index.js +0 -9
- package/example/ios/Podfile +0 -8
- package/example/ios/Podfile.lock +0 -445
- package/jest-setups/jest.setup.js +0 -8
- package/jest.config.js +0 -184
- package/lib/WebView.android.d.ts.map +0 -1
- package/lib/WebView.d.ts.map +0 -1
- package/lib/WebView.ios.d.ts.map +0 -1
- package/lib/WebView.styles.d.ts.map +0 -1
- package/lib/WebViewNativeComponent.android.d.ts.map +0 -1
- package/lib/WebViewNativeComponent.ios.d.ts.map +0 -1
- package/lib/WebViewShared.d.ts.map +0 -1
- package/lib/WebViewTypes.d.ts.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/validation.d.ts.map +0 -1
- package/metro.config.js +0 -57
- package/src/WebView.android.tsx +0 -255
- package/src/WebView.ios.tsx +0 -230
- package/src/WebView.styles.ts +0 -44
- package/src/WebView.tsx +0 -18
- package/src/WebViewNativeComponent.android.ts +0 -8
- package/src/WebViewNativeComponent.ios.ts +0 -8
- package/src/WebViewShared.tsx +0 -318
- package/src/WebViewTypes.ts +0 -941
- package/src/__tests__/WebViewShared-test.js +0 -292
- package/src/__tests__/__snapshots__/WebViewShared-test.js.snap +0 -13
- package/src/__tests__/validation-test.js +0 -39
- package/src/index.ts +0 -4
- package/src/validation.ts +0 -13
- package/tsconfig.json +0 -24
- package/yarn.lock +0 -13397
package/docs/Getting-Started.md
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# React Native WebView Getting Started Guide
|
|
2
|
-
|
|
3
|
-
Here's how to get started quickly with the React Native WebView.
|
|
4
|
-
|
|
5
|
-
## 1. Add react-native-webview to your dependencies
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
$ yarn add react-native-webview
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
(or)
|
|
12
|
-
|
|
13
|
-
For npm use
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
$ npm install --save react-native-webview
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## 2. Link native dependencies
|
|
20
|
-
|
|
21
|
-
From react-native 0.60 autolinking will take care of the link step but don't forget to run `pod install`
|
|
22
|
-
|
|
23
|
-
React Native modules that include native Objective-C, Swift, Java, or Kotlin code have to be "linked" so that the compiler knows to include them in the app.
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
$ react-native link react-native-webview
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
_NOTE: If you ever need to uninstall React Native WebView, run `react-native unlink react-native-webview` to unlink it._
|
|
30
|
-
|
|
31
|
-
### iOS & macOS:
|
|
32
|
-
|
|
33
|
-
If using CocoaPods, in the `ios/` or `macos/` directory run:
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
$ pod install
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
While you can manually link the old way using [react-native own tutorial](https://reactnative.dev/docs/linking-libraries-ios), we find it easier to use CocoaPods.
|
|
40
|
-
If you wish to use CocoaPods and haven't set it up yet, please instead refer to [that article](https://engineering.brigad.co/demystifying-react-native-modules-linking-ae6c017a6b4a).
|
|
41
|
-
|
|
42
|
-
### Android:
|
|
43
|
-
|
|
44
|
-
Android - react-native-webview version <6:
|
|
45
|
-
This module does not require any extra step after running the link command 🎉
|
|
46
|
-
|
|
47
|
-
Android - react-native-webview version >=6.X.X:
|
|
48
|
-
Please make sure AndroidX is enabled in your project by editting `android/gradle.properties` and adding 2 lines:
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
android.useAndroidX=true
|
|
52
|
-
android.enableJetifier=true
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
For Android manual installation, please refer to [this article](https://engineering.brigad.co/demystifying-react-native-modules-linking-964399ec731b) where you can find detailed step on how to link any react-native project.
|
|
56
|
-
|
|
57
|
-
### Windows:
|
|
58
|
-
|
|
59
|
-
Autolinking is supported for React Native Windows v0.63 and higher. If your app uses a React Native Windows version that does not have autolinking support, make the following additions to the given files manually:
|
|
60
|
-
|
|
61
|
-
#### **windows/myapp.sln**
|
|
62
|
-
|
|
63
|
-
Add the `ReactNativeWebView` project to your solution.
|
|
64
|
-
|
|
65
|
-
1. Open the solution in Visual Studio 2019
|
|
66
|
-
2. Right-click Solution icon in Solution Explorer > Add > Existing Project
|
|
67
|
-
Select `node_modules\react-native-webview\windows\ReactNativeWebView\ReactNativeWebView.vcxproj`
|
|
68
|
-
|
|
69
|
-
#### **windows/myapp/myapp.vcxproj**
|
|
70
|
-
|
|
71
|
-
Add a reference to `ReactNativeWebView` to your main application project. From Visual Studio 2019:
|
|
72
|
-
|
|
73
|
-
1. Right-click main application project > Add > Reference...
|
|
74
|
-
Check `ReactNativeWebView` from Solution Projects.
|
|
75
|
-
|
|
76
|
-
2. Modify files below to add the package providers to your main application project
|
|
77
|
-
|
|
78
|
-
#### **pch.h**
|
|
79
|
-
|
|
80
|
-
Add `#include "winrt/ReactNativeWebView.h"`.
|
|
81
|
-
|
|
82
|
-
#### **app.cpp**
|
|
83
|
-
|
|
84
|
-
Add `PackageProviders().Append(winrt::ReactNativeWebView::ReactPackageProvider());` before `InitializeComponent();`.
|
|
85
|
-
|
|
86
|
-
Note if you want to enable scroll with Touch for the WebView component you must disable perspective for your app using [ReactRootView.IsPerspectiveEnabled](https://microsoft.github.io/react-native-windows/docs/ReactRootView#isperspectiveenabled).
|
|
87
|
-
|
|
88
|
-
## 3. WebView2 Support
|
|
89
|
-
The WebView2 control is a [WinUI](https://docs.microsoft.com/windows/apps/winui/) control that renders web content using the Microsoft Edge (Chromium) rendering engine. We have added support for the WebView2 control to the react-native-webview community module in v11.18.0.
|
|
90
|
-
If your app is RNW v0.68 or higher, follow these steps:
|
|
91
|
-
|
|
92
|
-
i. Let autolinking handle adding the `ReactNativeWebView` project to your app.
|
|
93
|
-
|
|
94
|
-
ii. Customize your app's WinUI 2.x version to version 2.8.0-prerelease.210927001 or higher. See [here](https://microsoft.github.io/react-native-windows/docs/customizing-sdk-versions) for instructions. The WinUI 2.x support for WebView2 is not yet available in "stable" releases, so for now you will need to use a prerelease version.
|
|
95
|
-
|
|
96
|
-
iii. You may need to specify the `Microsoft.Web.WebView2` package in your app's `packages.config` file. If this is needed, you will get a build error listing the version of the package that you needed to specify. Simply add the package to your `packages.config`, and you should be good to go.
|
|
97
|
-
|
|
98
|
-
Now you can access the WinUI WebView2 control from your app's JavaScript via the `useWebView2` prop.
|
|
99
|
-
|
|
100
|
-
## 4. Import the webview into your component
|
|
101
|
-
|
|
102
|
-
```js
|
|
103
|
-
import React, { Component } from 'react';
|
|
104
|
-
import { WebView } from 'react-native-webview';
|
|
105
|
-
|
|
106
|
-
class MyWeb extends Component {
|
|
107
|
-
render() {
|
|
108
|
-
return (
|
|
109
|
-
<WebView
|
|
110
|
-
source={{ uri: 'https://infinite.red' }}
|
|
111
|
-
style={{ marginTop: 20 }}
|
|
112
|
-
/>
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Minimal example with inline HTML:
|
|
119
|
-
|
|
120
|
-
```js
|
|
121
|
-
import React, { Component } from 'react';
|
|
122
|
-
import { WebView } from 'react-native-webview';
|
|
123
|
-
|
|
124
|
-
class MyInlineWeb extends Component {
|
|
125
|
-
render() {
|
|
126
|
-
return (
|
|
127
|
-
<WebView
|
|
128
|
-
originWhitelist={['*']}
|
|
129
|
-
source={{ html: '<h1>Hello world</h1>' }}
|
|
130
|
-
/>
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Next, check out the [API Reference](Reference.md) or [In-Depth Guide](Guide.md).
|
|
137
|
-
|
|
138
|
-
## Translations
|
|
139
|
-
|
|
140
|
-
This file is available at:
|
|
141
|
-
|
|
142
|
-
- [Brazilian portuguese](Getting-Started.portuguese.md)
|