Jason Safaiyeh 4 yıl önce
ebeveyn
işleme
f6be6469d5
No account linked to committer's email address

+ 1
- 1
.all-contributorsrc Dosyayı Görüntüle

@@ -1,5 +1,5 @@
1 1
 {
2
-  "projectName": "react-native-webview",
2
+  "projectName": "@react-native-community/webview",
3 3
   "projectOwner": "react-native-community",
4 4
   "repoType": "github",
5 5
   "repoHost": "https://github.com",

+ 1
- 1
.github/ISSUE_TEMPLATE/bug-report.md Dosyayı Görüntüle

@@ -39,4 +39,4 @@ If applicable, add screenshots to help explain your problem.
39 39
  - OS:
40 40
  - OS version:
41 41
  - react-native version:
42
- - react-native-webview version:
42
+ - @react-native-community/webview version:

+ 16
- 16
README.md
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 9
- 9
docs/Contributing.md Dosyayı Görüntüle

@@ -9,10 +9,10 @@ Secondly, we'd like the contribution experience to be as good as possible. While
9 9
 After you fork the repo, clone it to your machine, and make your changes, you'll want to test them in an app.
10 10
 
11 11
 There are two methods of testing:
12
-1) Testing within a clone of react-native-webview
12
+1) Testing within a clone of webview
13 13
 2) Testing in a new `react-native init` project
14 14
 
15
-### Testing within react-native-webview
15
+### Testing within webview
16 16
 
17 17
 #### For all platforms:
18 18
 ```
@@ -49,8 +49,8 @@ The Metro Bundler will now be running in the Terminal for react-native-macos.  I
49 49
 In a new `react-native init` project, do this:
50 50
 
51 51
 ```
52
-$ yarn add ../react-native-webview
53
-$ react-native link react-native-webview
52
+$ yarn add ../webview
53
+$ react-native link webview
54 54
 ```
55 55
 
56 56
 You may run into a problem where the `jest-haste-map` module map says react-native was added twice:
@@ -58,13 +58,13 @@ You may run into a problem where the `jest-haste-map` module map says react-nati
58 58
 ```
59 59
 Loading dependency graph...(node:32651) UnhandledPromiseRejectionWarning: Error: jest-haste-map: Haste module naming collision:
60 60
   Duplicate module name: react-native
61
-  Paths: /Users/myuser/TestApp/node_modules/react-native/package.json collides with /Users/myuser/TestApp/node_modules/react-native-webview/node_modules/react-native/package.json
61
+  Paths: /Users/myuser/TestApp/node_modules/react-native/package.json collides with /Users/myuser/TestApp/node_modules/webview/node_modules/react-native/package.json
62 62
 ```
63 63
 
64 64
 Just remove the second path like this:
65 65
 
66 66
 ```
67
-$ rm -rf ./node_modules/react-native-webview/node_modules/react-native
67
+$ rm -rf ./node_modules/webview/node_modules/react-native
68 68
 ```
69 69
 
70 70
 And then re-run the packager:
@@ -73,11 +73,11 @@ And then re-run the packager:
73 73
 $ react-native start --reset-cache
74 74
 ```
75 75
 
76
-When you make a change, you'll probably need to unlink, remove, re-add, and re-link `react-native-webview`:
76
+When you make a change, you'll probably need to unlink, remove, re-add, and re-link `webview`:
77 77
 
78 78
 ```
79
-$ react-native unlink react-native-webview && yarn remove react-native-webview
80
-$ yarn add ../react-native-webview && react-native link react-native-webview
79
+$ react-native unlink webview && yarn remove webview
80
+$ yarn add ../webview && react-native link webview
81 81
 ```
82 82
 
83 83
 ## Notes

+ 3
- 3
docs/Custom-Android.md Dosyayı Görüntüle

@@ -105,7 +105,7 @@ public class NavigationCompletedEvent extends Event<NavigationCompletedEvent> {
105 105
 
106 106
 You can trigger the event in your web view client. You can hook existing handlers if your events are based on them.
107 107
 
108
-You should refer to [RNCWebViewManager.java](https://github.com/react-native-community/react-native-webview/blob/master/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java) in the react-native-webview codebase to see what handlers are available and how they are implemented. You can extend any methods here to provide extra functionality.
108
+You should refer to [RNCWebViewManager.java](https://github.com/react-native-community/webview/blob/master/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java) in the webview codebase to see what handlers are available and how they are implemented. You can extend any methods here to provide extra functionality.
109 109
 
110 110
 ```java
111 111
 public class NavigationCompletedEvent extends Event<NavigationCompletedEvent> {
@@ -176,7 +176,7 @@ To get your native component, you must use `requireNativeComponent`: the same as
176 176
 ```javascript
177 177
 import React, {Component, PropTypes} from 'react';
178 178
 import {requireNativeComponent} from 'react-native';
179
-import {WebView} from 'react-native-webview';
179
+import {WebView} from '@react-native-community/webview';
180 180
 
181 181
 export default class CustomWebView extends Component {
182 182
   static propTypes = WebView.propTypes;
@@ -199,7 +199,7 @@ If you want to add custom props to your native component, you can use `nativeCon
199 199
 
200 200
 For events, the event handler must always be set to a function. This means it isn't safe to use the event handler directly from `this.props`, as the user might not have provided one. The standard approach is to create a event handler in your class, and then invoking the event handler given in `this.props` if it exists.
201 201
 
202
-If you are unsure how something should be implemented from the JS side, look at [WebView.android.js](https://github.com/react-native-community/react-native-webview/blob/master/js/WebView.android.js) in the React Native source.
202
+If you are unsure how something should be implemented from the JS side, look at [WebView.android.js](https://github.com/react-native-community/webview/blob/master/js/WebView.android.js) in the React Native source.
203 203
 
204 204
 ```javascript
205 205
 export default class CustomWebView extends Component {

+ 10
- 10
docs/Getting-Started.md Dosyayı Görüntüle

@@ -2,16 +2,16 @@
2 2
 
3 3
 Here's how to get started quickly with the React Native WebView.
4 4
 
5
-## 1. Add react-native-webview to your dependencies
5
+## 1. Add @react-native-community/webview to your dependencies
6 6
 
7 7
 ```
8
-$ yarn add react-native-webview
8
+$ yarn add @react-native-community/webview
9 9
 ```
10 10
  (or)
11 11
  
12 12
  For npm use
13 13
 ```
14
-$ npm install --save react-native-webview
14
+$ npm install --save @react-native-community/webview
15 15
 ```
16 16
 
17 17
 ## 2. Link native dependencies
@@ -21,10 +21,10 @@ From react-native 0.60 autolinking will take care of the link step but don't for
21 21
 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.
22 22
 
23 23
 ```
24
-$ react-native link react-native-webview
24
+$ react-native link @react-native-community/webview
25 25
 ```
26 26
 
27
-_NOTE: If you ever need to uninstall React Native WebView, run `react-native unlink react-native-webview` to unlink it._
27
+_NOTE: If you ever need to uninstall React Native WebView, run `react-native unlink @react-native-community/webview` to unlink it._
28 28
 
29 29
 ### iOS:
30 30
 
@@ -38,10 +38,10 @@ If you wish to use cocoapods and haven't set it up yet, please instead refer to
38 38
 
39 39
 ### Android:
40 40
 
41
-Android - react-native-webview version <6:
41
+Android - @react-native-community/webview version <6:
42 42
 This module does not require any extra step after running the link command 🎉
43 43
 
44
-Android - react-native-webview version >=6.X.X:
44
+Android - @react-native-community/webview version >=6.X.X:
45 45
 Please make sure AndroidX is enabled in your project by editting `android/gradle.properties` and adding 2 lines:
46 46
 
47 47
 ```
@@ -55,13 +55,13 @@ For Android manual installation, please refer to [this article](https://engineer
55 55
 
56 56
 Cocoapod and autolinking is not yet support for react-native macOS but is coming soon.  In the meantime you must manually link.
57 57
 
58
-The method is nearly identical to the [manual linking method for iOS](https://facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking) except that you will include the `node_modules/react-native-webview/macos/RNCWebView.xcodeproj` project in your main project and link the `RNCWebView-macOS.a` library. 
58
+The method is nearly identical to the [manual linking method for iOS](https://facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking) except that you will include the `node_modules/@react-native-community/webview/macos/RNCWebView.xcodeproj` project in your main project and link the `RNCWebView-macOS.a` library. 
59 59
 
60 60
 ## 3. Import the webview into your component
61 61
 
62 62
 ```js
63 63
 import React, { Component } from 'react';
64
-import { WebView } from 'react-native-webview';
64
+import { WebView } from '@react-native-community/webview';
65 65
 
66 66
 class MyWeb extends Component {
67 67
   render() {
@@ -79,7 +79,7 @@ Minimal example with inline HTML:
79 79
 
80 80
 ```js
81 81
 import React, { Component } from 'react';
82
-import { WebView } from 'react-native-webview';
82
+import { WebView } from '@react-native-community/webview';
83 83
 
84 84
 class MyInlineWeb extends Component {
85 85
   render() {

+ 13
- 13
docs/Guide.md Dosyayı Görüntüle

@@ -22,7 +22,7 @@ The simplest way to use the WebView is to simply pipe in the HTML you want to di
22 22
 
23 23
 ```js
24 24
 import React, { Component } from 'react';
25
-import { WebView } from 'react-native-webview';
25
+import { WebView } from '@react-native-community/webview';
26 26
 
27 27
 class MyInlineWeb extends Component {
28 28
   render() {
@@ -44,7 +44,7 @@ This is the most common use-case for WebView.
44 44
 
45 45
 ```js
46 46
 import React, { Component } from 'react';
47
-import { WebView } from 'react-native-webview';
47
+import { WebView } from '@react-native-community/webview';
48 48
 
49 49
 class MyWeb extends Component {
50 50
   render() {
@@ -61,7 +61,7 @@ Sometimes you would have bundled an HTML file along with the app and would like
61 61
 
62 62
 ```js
63 63
 import React, { Component } from 'react';
64
-import { WebView } from 'react-native-webview';
64
+import { WebView } from '@react-native-community/webview';
65 65
 
66 66
 const myHtmlFile = require("./my-asset-folder/local-site.html");
67 67
 
@@ -78,7 +78,7 @@ However on Android, you need to place the HTML file inside your android project'
78 78
 
79 79
 ```js
80 80
 import React, { Component } from 'react';
81
-import { WebView } from 'react-native-webview';
81
+import { WebView } from '@react-native-community/webview';
82 82
 
83 83
 class MyWeb extends Component {
84 84
   render() {
@@ -95,7 +95,7 @@ Sometimes you want to intercept a user tapping on a link in your webview and do
95 95
 
96 96
 ```js
97 97
 import React, { Component } from 'react';
98
-import { WebView } from 'react-native-webview';
98
+import { WebView } from '@react-native-community/webview';
99 99
 
100 100
 class MyWeb extends Component {
101 101
   webview = null;
@@ -202,7 +202,7 @@ Normally, apps that do not have permission to use the camera can prompt the user
202 202
 File Upload using `<input type="file" />` is not supported for Android 4.4 KitKat (see [details](https://github.com/delight-im/Android-AdvancedWebView/issues/4#issuecomment-70372146)):
203 203
 
204 204
 ```
205
-import { WebView } from "react-native-webview";
205
+import { WebView } from "@react-native-community/webview";
206 206
 
207 207
 WebView.isFileUploadSupported().then(res => {
208 208
   if (res === true) {
@@ -271,7 +271,7 @@ This is a script that runs immediately after the web page loads for the first ti
271 271
 ```jsx
272 272
 import React, { Component } from 'react';
273 273
 import { View } from 'react-native';
274
-import { WebView } from 'react-native-webview';
274
+import { WebView } from '@react-native-community/webview';
275 275
 
276 276
 export default class App extends Component {
277 277
   render() {
@@ -285,7 +285,7 @@ export default class App extends Component {
285 285
         <WebView
286 286
           source={{
287 287
             uri:
288
-              'https://github.com/react-native-community/react-native-webview',
288
+              'https://github.com/react-native-community/webview',
289 289
           }}
290 290
           injectedJavaScript={runFirst}
291 291
         />
@@ -312,7 +312,7 @@ This is a script that runs **before** the web page loads for the first time. It
312 312
 ```jsx
313 313
 import React, { Component } from 'react';
314 314
 import { View } from 'react-native';
315
-import { WebView } from 'react-native-webview';
315
+import { WebView } from '@react-native-community/webview';
316 316
 
317 317
 export default class App extends Component {
318 318
   render() {
@@ -325,7 +325,7 @@ export default class App extends Component {
325 325
         <WebView
326 326
           source={{
327 327
             uri:
328
-              'https://github.com/react-native-community/react-native-webview',
328
+              'https://github.com/react-native-community/webview',
329 329
           }}
330 330
           injectedJavaScriptBeforeContentLoaded={runFirst}
331 331
         />
@@ -344,7 +344,7 @@ While convenient, the downside to the previously mentioned `injectedJavaScript`
344 344
 ```jsx
345 345
 import React, { Component } from 'react';
346 346
 import { View } from 'react-native';
347
-import { WebView } from 'react-native-webview';
347
+import { WebView } from '@react-native-community/webview';
348 348
 
349 349
 export default class App extends Component {
350 350
   render() {
@@ -363,7 +363,7 @@ export default class App extends Component {
363 363
           ref={r => (this.webref = r)}
364 364
           source={{
365 365
             uri:
366
-              'https://github.com/react-native-community/react-native-webview',
366
+              'https://github.com/react-native-community/webview',
367 367
           }}
368 368
         />
369 369
       </View>
@@ -392,7 +392,7 @@ You _must_ set `onMessage` or the `window.ReactNativeWebView.postMessage` method
392 392
 ```jsx
393 393
 import React, { Component } from 'react';
394 394
 import { View } from 'react-native';
395
-import { WebView } from 'react-native-webview';
395
+import { WebView } from '@react-native-community/webview';
396 396
 
397 397
 export default class App extends Component {
398 398
   render() {

+ 15
- 17
docs/README.portuguese.md
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 1
- 1
example/examples/Alerts.tsx Dosyayı Görüntüle

@@ -1,7 +1,7 @@
1 1
 import React, {Component} from 'react';
2 2
 import {Text, View} from 'react-native';
3 3
 
4
-import WebView from 'react-native-webview';
4
+import WebView from '@react-native-community/webview';
5 5
 
6 6
 const HTML = `
7 7
 <!DOCTYPE html>\n

+ 1
- 1
example/examples/Background.tsx Dosyayı Görüntüle

@@ -1,7 +1,7 @@
1 1
 import React, {Component} from 'react';
2 2
 import {Text, View} from 'react-native';
3 3
 
4
-import WebView from 'react-native-webview';
4
+import WebView from '@react-native-community/webview';
5 5
 
6 6
 const HTML = `
7 7
 <!DOCTYPE html>\n

+ 1
- 1
example/examples/Scrolling.tsx Dosyayı Görüntüle

@@ -1,7 +1,7 @@
1 1
 import React, {Component} from 'react';
2 2
 import {Button, Text, View} from 'react-native';
3 3
 
4
-import WebView from 'react-native-webview';
4
+import WebView from '@react-native-community/webview';
5 5
 
6 6
 const HTML = `
7 7
 <!DOCTYPE html>\n

+ 2
- 2
example/ios/Podfile.lock Dosyayı Görüntüle

@@ -182,7 +182,7 @@ PODS:
182 182
     - React-cxxreact (= 0.61.5)
183 183
     - React-jsi (= 0.61.5)
184 184
   - React-jsinspector (0.61.5)
185
-  - react-native-webview (8.0.6):
185
+  - react-native-webview (8.1.0):
186 186
     - React
187 187
   - React-RCTActionSheet (0.61.5):
188 188
     - React-Core/RCTActionSheetHeaders (= 0.61.5)
@@ -326,7 +326,7 @@ SPEC CHECKSUMS:
326 326
   React-jsi: cb2cd74d7ccf4cffb071a46833613edc79cdf8f7
327 327
   React-jsiexecutor: d5525f9ed5f782fdbacb64b9b01a43a9323d2386
328 328
   React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0
329
-  react-native-webview: 222d83c9c489e09b5d3541519110a637490ad4fa
329
+  react-native-webview: 6a787655a50a59c309ea032561ea8a8d8b8d1c45
330 330
   React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76
331 331
   React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360
332 332
   React-RCTBlob: d89293cc0236d9cb0933d85e430b0bbe81ad1d72

+ 2
- 2
ios/RNCWebView.m Dosyayı Görüntüle

@@ -94,7 +94,7 @@ static NSDictionary* customCertificatesForHost;
94 94
   BOOL _savedKeyboardDisplayRequiresUserAction;
95 95
 
96 96
   // Workaround for StatusBar appearance bug for iOS 12
97
-  // https://github.com/react-native-community/react-native-webview/issues/62
97
+  // https://github.com/react-native-community/webview/issues/62
98 98
   BOOL _isFullScreenVideoOpen;
99 99
 #if !TARGET_OS_OSX
100 100
   UIStatusBarStyle _savedStatusBarStyle;
@@ -146,7 +146,7 @@ static NSDictionary* customCertificatesForHost;
146 146
       name:UIKeyboardWillShowNotification object:nil];
147 147
 
148 148
     // Workaround for StatusBar appearance bug for iOS 12
149
-    // https://github.com/react-native-community/react-native-webview/issues/62
149
+    // https://github.com/react-native-community/webview/issues/62
150 150
       [[NSNotificationCenter defaultCenter] addObserver:self
151 151
                                                selector:@selector(showFullScreenVideoStatusBars)
152 152
                                                    name:UIWindowDidBecomeVisibleNotification

+ 3
- 3
package.json Dosyayı Görüntüle

@@ -1,5 +1,5 @@
1 1
 {
2
-  "name": "react-native-webview",
2
+  "name": "@react-native-community/webview",
3 3
   "description": "React Native WebView component for iOS, Android, and macOS",
4 4
   "main": "index.js",
5 5
   "typings": "index.d.ts",
@@ -9,7 +9,7 @@
9 9
   ],
10 10
   "license": "MIT",
11 11
   "version": "8.1.1",
12
-  "homepage": "https://github.com/react-native-community/react-native-webview#readme",
12
+  "homepage": "https://github.com/react-native-community/webview#readme",
13 13
   "scripts": {
14 14
     "start": "node node_modules/react-native/local-cli/cli.js start",
15 15
     "start:android": "react-native run-android --root example/",
@@ -66,7 +66,7 @@
66 66
   },
67 67
   "repository": {
68 68
     "type": "git",
69
-    "url": "https://github.com/react-native-community/react-native-webview.git"
69
+    "url": "https://github.com/react-native-community/webview.git"
70 70
   },
71 71
   "files": [
72 72
     "android",

+ 2
- 2
react-native-webview.podspec Dosyayı Görüntüle

@@ -3,7 +3,7 @@ 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         = package['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']
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
12 12
   s.homepage     = package['homepage']
13 13
   s.platform     = :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/react-native-community/webview.git", :tag => "v#{s.version}" }
16 16
   s.source_files  = "ios/**/*.{h,m}"
17 17
 
18 18
   s.dependency 'React'