|
@@ -1,13 +1,13 @@
|
1
|
|
-import { ComponentType, ReactElement, ReactNode } from "react";
|
|
1
|
+import { ComponentType, ReactElement, ReactNode } from 'react';
|
2
|
2
|
import {
|
3
|
3
|
Insets,
|
4
|
4
|
NativeSyntheticEvent,
|
5
|
5
|
StyleProp,
|
6
|
6
|
ViewProps,
|
7
|
|
- ViewStyle
|
8
|
|
-} from "react-native";
|
|
7
|
+ ViewStyle,
|
|
8
|
+} from 'react-native';
|
9
|
9
|
|
10
|
|
-declare module "react-native" {
|
|
10
|
+declare module 'react-native' {
|
11
|
11
|
interface UIManagerStatic {
|
12
|
12
|
dispatchViewManagerCommand(node: any, callback: any, x: any): void;
|
13
|
13
|
RNCUIWebView: any;
|
|
@@ -28,12 +28,12 @@ export interface WebViewIOSLoadRequestEvent extends WebViewNativeEvent {
|
28
|
28
|
target: number;
|
29
|
29
|
lockIdentifier: number;
|
30
|
30
|
navigationType:
|
31
|
|
- | "click"
|
32
|
|
- | "formsubmit"
|
33
|
|
- | "backforward"
|
34
|
|
- | "reload"
|
35
|
|
- | "formresubmit"
|
36
|
|
- | "other";
|
|
31
|
+ | 'click'
|
|
32
|
+ | 'formsubmit'
|
|
33
|
+ | 'backforward'
|
|
34
|
+ | 'reload'
|
|
35
|
+ | 'formresubmit'
|
|
36
|
+ | 'other';
|
37
|
37
|
}
|
38
|
38
|
|
39
|
39
|
export interface WebViewProgressEvent extends WebViewNativeEvent {
|
|
@@ -42,12 +42,12 @@ export interface WebViewProgressEvent extends WebViewNativeEvent {
|
42
|
42
|
|
43
|
43
|
export interface WebViewNavigation extends WebViewNativeEvent {
|
44
|
44
|
readonly navigationType:
|
45
|
|
- | "click"
|
46
|
|
- | "formsubmit"
|
47
|
|
- | "backforward"
|
48
|
|
- | "reload"
|
49
|
|
- | "formresubmit"
|
50
|
|
- | "other";
|
|
45
|
+ | 'click'
|
|
46
|
+ | 'formsubmit'
|
|
47
|
+ | 'backforward'
|
|
48
|
+ | 'reload'
|
|
49
|
+ | 'formresubmit'
|
|
50
|
+ | 'other';
|
51
|
51
|
}
|
52
|
52
|
|
53
|
53
|
export interface WebViewMessage extends WebViewNativeEvent {
|
|
@@ -69,17 +69,17 @@ export type WebViewMessageEvent = NativeSyntheticEvent<WebViewMessage>;
|
69
|
69
|
export type WebViewErrorEvent = NativeSyntheticEvent<WebViewError>;
|
70
|
70
|
|
71
|
71
|
export type DataDetectorTypes =
|
72
|
|
- | "phoneNumber"
|
73
|
|
- | "link"
|
74
|
|
- | "address"
|
75
|
|
- | "calendarEvent"
|
76
|
|
- | "trackingNumber"
|
77
|
|
- | "flightNumber"
|
78
|
|
- | "lookupSuggestion"
|
79
|
|
- | "none"
|
80
|
|
- | "all";
|
81
|
|
-
|
82
|
|
-export type OverScrollModeType = "always" | "content" | "never";
|
|
72
|
+ | 'phoneNumber'
|
|
73
|
+ | 'link'
|
|
74
|
+ | 'address'
|
|
75
|
+ | 'calendarEvent'
|
|
76
|
+ | 'trackingNumber'
|
|
77
|
+ | 'flightNumber'
|
|
78
|
+ | 'lookupSuggestion'
|
|
79
|
+ | 'none'
|
|
80
|
+ | 'all';
|
|
81
|
+
|
|
82
|
+export type OverScrollModeType = 'always' | 'content' | 'never';
|
83
|
83
|
|
84
|
84
|
export interface WebViewSourceUri {
|
85
|
85
|
/**
|
|
@@ -163,7 +163,7 @@ export interface IOSWebViewProps {
|
163
|
163
|
* - fast: 0.99 (the default for iOS web view)
|
164
|
164
|
* @platform ios
|
165
|
165
|
*/
|
166
|
|
- decelerationRate?: "fast" | "normal" | number;
|
|
166
|
+ decelerationRate?: 'fast' | 'normal' | number;
|
167
|
167
|
|
168
|
168
|
/**
|
169
|
169
|
* Boolean value that determines whether scrolling is enabled in the
|
|
@@ -339,7 +339,7 @@ export interface AndroidWebViewProps {
|
339
|
339
|
* - `'compatibility'` - WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content.
|
340
|
340
|
* @platform android
|
341
|
341
|
*/
|
342
|
|
- mixedContentMode?: "never" | "always" | "compatibility";
|
|
342
|
+ mixedContentMode?: 'never' | 'always' | 'compatibility';
|
343
|
343
|
}
|
344
|
344
|
|
345
|
345
|
export interface WebViewSharedProps
|
|
@@ -366,7 +366,7 @@ export interface WebViewSharedProps
|
366
|
366
|
renderError?: (
|
367
|
367
|
errorDomain: string | undefined,
|
368
|
368
|
errorCode: number,
|
369
|
|
- errorDesc: string
|
|
369
|
+ errorDesc: string,
|
370
|
370
|
) => ReactElement<any>; // view to show if there's an error
|
371
|
371
|
|
372
|
372
|
/**
|