Skip to content

Commit

Permalink
merging original fork
Browse files Browse the repository at this point in the history
  • Loading branch information
indratama01 committed Feb 12, 2024
2 parents c3ef0d7 + 0ec9180 commit 63a93ac
Show file tree
Hide file tree
Showing 13 changed files with 8,008 additions and 3,374 deletions.
158 changes: 89 additions & 69 deletions lib/WebView.android.d.ts
Original file line number Diff line number Diff line change
@@ -1,76 +1,96 @@
import React from 'react';
import { WebViewRenderProcessGoneEvent, WebViewErrorEvent, WebViewHttpErrorEvent, WebViewMessageEvent, WebViewNavigationEvent, WebViewProgressEvent, AndroidWebViewProps, NativeWebViewAndroid, State } from './WebViewTypes';
import { createOnShouldStartLoadWithRequest } from './WebViewShared';
import {
WebViewRenderProcessGoneEvent,
WebViewErrorEvent,
WebViewHttpErrorEvent,
WebViewMessageEvent,
WebViewNavigationEvent,
WebViewProgressEvent,
AndroidWebViewProps,
NativeWebViewAndroid,
State,
} from './WebViewTypes';
/**
* Renders a native WebView.
*/
declare class WebView extends React.Component<AndroidWebViewProps, State> {
static defaultProps: {
overScrollMode: string;
javaScriptEnabled: boolean;
thirdPartyCookiesEnabled: boolean;
scalesPageToFit: boolean;
allowsFullscreenVideo: boolean;
allowFileAccess: boolean;
saveFormDataDisabled: boolean;
cacheEnabled: boolean;
androidHardwareAccelerationDisabled: boolean;
originWhitelist: string[];
};
static isFileUploadSupported: () => Promise<any>;
startUrl: string | null;
state: State;
webViewRef: React.RefObject<NativeWebViewAndroid>;
messagingModuleName: string;
componentDidMount: () => void;
getCommands: () => {
goForward: number;
goBack: number;
reload: number;
stopLoading: number;
postMessage: number;
injectJavaScript: number;
loadUrl: number;
requestFocus: number;
exitFullScreen: number;
clearHistory: number;
clearCache: number;
clearFormData: number;
};
exitFullScreen: () => void;
goForward: () => void;
goBack: () => void;
reload: () => void;
stopLoading: () => void;
requestFocus: () => void;
postMessage: (data: string) => void;
clearFormData: () => void;
clearCache: (includeDiskFiles: boolean) => void;
clearHistory: () => void;
/**
* Injects a javascript string into the referenced WebView. Deliberately does not
* return a response because using eval() to return a response breaks this method
* on pages with a Content Security Policy that disallows eval(). If you need that
* functionality, look into postMessage/onMessage.
*/
injectJavaScript: (data: string) => void;
/**
* We return an event with a bunch of fields including:
* url, title, loading, canGoBack, canGoForward
*/
updateNavigationState: (event: WebViewNavigationEvent) => void;
/**
* Returns the native `WebView` node.
*/
getWebViewHandle: () => number;
onLoadingStart: (event: WebViewNavigationEvent) => void;
onLoadingError: (event: WebViewErrorEvent) => void;
onHttpError: (event: WebViewHttpErrorEvent) => void;
onRenderProcessGone: (event: WebViewRenderProcessGoneEvent) => void;
onLoadingFinish: (event: WebViewNavigationEvent) => void;
onMessage: (event: WebViewMessageEvent) => void;
onLoadingProgress: (event: WebViewProgressEvent) => void;
onShouldStartLoadWithRequestCallback: (shouldStart: boolean, url: string) => void;
render(): JSX.Element;
static defaultProps: {
overScrollMode: string;
javaScriptEnabled: boolean;
thirdPartyCookiesEnabled: boolean;
scalesPageToFit: boolean;
allowsFullscreenVideo: boolean;
allowFileAccess: boolean;
saveFormDataDisabled: boolean;
cacheEnabled: boolean;
androidHardwareAccelerationDisabled: boolean;
androidLayerType: string;
originWhitelist: string[];
setSupportMultipleWindows: boolean;
};
static isFileUploadSupported: () => Promise<any>;
startUrl: string | null;
state: State;
onShouldStartLoadWithRequest: ReturnType<
typeof createOnShouldStartLoadWithRequest
> | null;
webViewRef: React.RefObject<NativeWebViewAndroid>;
messagingModuleName: string;
componentDidMount: () => void;
getCommands: () => {
goForward: number;
goBack: number;
reload: number;
stopLoading: number;
postMessage: number;
injectJavaScript: number;
loadUrl: number;
requestFocus: number;
exitFullScreen: number;
clearHistory: number;
clearCache: number;
clearFormData: number;
};
exitFullScreen: () => void;
goForward: () => void;
goBack: () => void;
reload: () => void;
stopLoading: () => void;
requestFocus: () => void;
postMessage: (data: string) => void;
clearFormData: () => void;
clearCache: (includeDiskFiles: boolean) => void;
clearHistory: () => void;
/**
* Injects a javascript string into the referenced WebView. Deliberately does not
* return a response because using eval() to return a response breaks this method
* on pages with a Content Security Policy that disallows eval(). If you need that
* functionality, look into postMessage/onMessage.
*/
injectJavaScript: (data: string) => void;
/**
* We return an event with a bunch of fields including:
* url, title, loading, canGoBack, canGoForward
*/
updateNavigationState: (event: WebViewNavigationEvent) => void;
/**
* Returns the native `WebView` node.
*/
getWebViewHandle: () => number;
onLoadingStart: (event: WebViewNavigationEvent) => void;
onLoadingError: (event: WebViewErrorEvent) => void;
onHttpError: (event: WebViewHttpErrorEvent) => void;
onRenderProcessGone: (event: WebViewRenderProcessGoneEvent) => void;
onLoadingFinish: (event: WebViewNavigationEvent) => void;
onMessage: (event: WebViewMessageEvent) => void;
onLoadingProgress: (event: WebViewProgressEvent) => void;
onShouldStartLoadWithRequestCallback: (
shouldStart: boolean,
url: string,
lockIdentifier?: number | undefined,
) => void;
render(): JSX.Element;
}
export default WebView;
//# sourceMappingURL=WebView.android.d.ts.map
//# sourceMappingURL=WebView.android.d.ts.map
11 changes: 10 additions & 1 deletion lib/WebView.android.d.ts.map
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
{"version":3,"file":"WebView.android.d.ts","sourceRoot":"","sources":["../src/WebView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B,OAAO,EACL,6BAA6B,EAC7B,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,KAAK,EAEN,MAAM,gBAAgB,CAAC;AAgBxB;;GAEG;AACH,cAAM,OAAQ,SAAQ,KAAK,CAAC,SAAS,CAAC,mBAAmB,EAAE,KAAK,CAAC;IAC/D,MAAM,CAAC,YAAY;;;;;;;;;;;MAWjB;IAEF,MAAM,CAAC,qBAAqB,qBAG1B;IAEF,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B,KAAK,EAAE,KAAK,CAGV;IAGF,UAAU,wCAA2C;IAErD,mBAAmB,SAA0C;I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AAM,aAMJ;IAEF,MAAM,aASJ;IAEF,WAAW,aAMT;IAEF,YAAY,aAMV;IAEF,WAAW,yBAMT;IAEF,aAAa,aAMZ;IAED,UAAU,sCAMR;IAEF,YAAY,aAMV;IAEF;;;;;OAKG;IACH,gBAAgB,yBAMd;IAEF;;;OAGG;IACH,qBAAqB,0CAInB;IAEF;;OAEG;IACH,gBAAgB,eAId;IAEF,cAAc,0CAQZ;IAEF,cAAc,qCAeZ;IAEF,WAAW,yCAKV;IAED,mBAAmB,iDAKlB;IAED,eAAe,0CAeb;IAEF,SAAS,uCAKP;IAEF,iBAAiB,wCAcf;IAEF,oCAAoC,8CAWlC;IAEF,MAAM;CAoFP;AAED,eAAe,OAAO,CAAC"
}
Loading

0 comments on commit 63a93ac

Please sign in to comment.