Skip to content

Commit 94c0017

Browse files
committed
conflict fixed
1 parent df7bb08 commit 94c0017

File tree

5 files changed

+64
-59
lines changed

5 files changed

+64
-59
lines changed

apple/BPCWebView.mm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
using namespace facebook::react;
1414

15-
auto stringToOnShouldStartLoadWithRequestNavigationTypeEnum(std::string value) {
15+
auto BPStringToOnShouldStartLoadWithRequestNavigationTypeEnum(std::string value) {
1616
if (value == "click") return BPCWebViewEventEmitter::OnShouldStartLoadWithRequestNavigationType::Click;
1717
if (value == "formsubmit") return BPCWebViewEventEmitter::OnShouldStartLoadWithRequestNavigationType::Formsubmit;
1818
if (value == "backforward") return BPCWebViewEventEmitter::OnShouldStartLoadWithRequestNavigationType::Backforward;
@@ -21,7 +21,7 @@ auto stringToOnShouldStartLoadWithRequestNavigationTypeEnum(std::string value) {
2121
return BPCWebViewEventEmitter::OnShouldStartLoadWithRequestNavigationType::Other;
2222
}
2323

24-
auto stringToOnLoadingStartNavigationTypeEnum(std::string value) {
24+
auto BPStringToOnLoadingStartNavigationTypeEnum(std::string value) {
2525
if (value == "click") return BPCWebViewEventEmitter::OnLoadingStartNavigationType::Click;
2626
if (value == "formsubmit") return BPCWebViewEventEmitter::OnLoadingStartNavigationType::Formsubmit;
2727
if (value == "backforward") return BPCWebViewEventEmitter::OnLoadingStartNavigationType::Backforward;
@@ -30,7 +30,7 @@ auto stringToOnLoadingStartNavigationTypeEnum(std::string value) {
3030
return BPCWebViewEventEmitter::OnLoadingStartNavigationType::Other;
3131
}
3232

33-
auto stringToOnLoadingFinishNavigationTypeEnum(std::string value) {
33+
auto BPStringToOnLoadingFinishNavigationTypeEnum(std::string value) {
3434
if (value == "click") return BPCWebViewEventEmitter::OnLoadingFinishNavigationType::Click;
3535
if (value == "formsubmit") return BPCWebViewEventEmitter::OnLoadingFinishNavigationType::Formsubmit;
3636
if (value == "backforward") return BPCWebViewEventEmitter::OnLoadingFinishNavigationType::Backforward;
@@ -81,7 +81,7 @@ - (instancetype)initWithFrame:(CGRect)frame
8181
.url = std::string([[dictionary valueForKey:@"url"] UTF8String]),
8282
.lockIdentifier = [[dictionary valueForKey:@"lockIdentifier"] doubleValue],
8383
.title = std::string([[dictionary valueForKey:@"title"] UTF8String]),
84-
.navigationType = stringToOnShouldStartLoadWithRequestNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String])),
84+
.navigationType = BPStringToOnShouldStartLoadWithRequestNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String])),
8585
.canGoBack = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
8686
.canGoForward = static_cast<bool>([[dictionary valueForKey:@"canGoForward"] boolValue]),
8787
.isTopFrame = static_cast<bool>([[dictionary valueForKey:@"isTopFrame"] boolValue]),
@@ -98,7 +98,7 @@ - (instancetype)initWithFrame:(CGRect)frame
9898
.url = std::string([[dictionary valueForKey:@"url"] UTF8String]),
9999
.lockIdentifier = [[dictionary valueForKey:@"lockIdentifier"] doubleValue],
100100
.title = std::string([[dictionary valueForKey:@"title"] UTF8String]),
101-
.navigationType = stringToOnLoadingStartNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String])),
101+
.navigationType = BPStringToOnLoadingStartNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String])),
102102
.canGoBack = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
103103
.canGoForward = static_cast<bool>([[dictionary valueForKey:@"canGoForward"] boolValue]),
104104
.loading = static_cast<bool>([[dictionary valueForKey:@"loading"] boolValue]),
@@ -146,7 +146,7 @@ - (instancetype)initWithFrame:(CGRect)frame
146146
.url = std::string([[dictionary valueForKey:@"url"] UTF8String]),
147147
.lockIdentifier = [[dictionary valueForKey:@"lockIdentifier"] doubleValue],
148148
.title = std::string([[dictionary valueForKey:@"title"] UTF8String]),
149-
.navigationType = stringToOnLoadingFinishNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String], [[dictionary valueForKey:@"navigationType"] lengthOfBytesUsingEncoding:NSUTF8StringEncoding])),
149+
.navigationType = BPStringToOnLoadingFinishNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String], [[dictionary valueForKey:@"navigationType"] lengthOfBytesUsingEncoding:NSUTF8StringEncoding])),
150150
.canGoBack = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
151151
.canGoForward = static_cast<bool>([[dictionary valueForKey:@"canGoForward"] boolValue]),
152152
.loading = static_cast<bool>([[dictionary valueForKey:@"loading"] boolValue]),

example/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React, { useCallback } from 'react';
22
import { SafeAreaView, StyleSheet, Dimensions, Linking } from 'react-native';
33
import { WebView } from 'react-native-webview-bootpay';
44

5-
65
const { width: deviceWidth, height: deviceHeight } = Dimensions.get('window');
76

87
export default function App() {
@@ -17,7 +16,7 @@ export default function App() {
1716
const shouldStartLoadWithRequest = useCallback((event) => {
1817
console.log('Request URL:', event.url);
1918

20-
if (event.url.includes("smartstore.naver")) {
19+
if (event.url.includes('smartstore.naver')) {
2120
Linking.openURL(event.url);
2221
return false;
2322
}

example/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* @format
33
*/
44

5-
import {AppRegistry} from 'react-native';
5+
import { AppRegistry } from 'react-native';
66
import App from './App';
7-
import {name as appName} from './app.json';
7+
import { name as appName } from './app.json';
88

99
AppRegistry.registerComponent(appName, () => App);

index.d.ts

Lines changed: 54 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,64 +2,70 @@ import { Component } from 'react';
22
// eslint-disable-next-line
33
import { IOSWebViewProps, AndroidWebViewProps, WindowsWebViewProps } from './lib/WebViewTypes';
44

5-
export { FileDownload, WebViewMessageEvent, WebViewNavigation } from "./lib/WebViewTypes";
5+
export {
6+
FileDownload,
7+
WebViewMessageEvent,
8+
WebViewNavigation,
9+
} from './lib/WebViewTypes';
610

7-
export type WebViewProps = IOSWebViewProps & AndroidWebViewProps & WindowsWebViewProps;
11+
export type WebViewProps = IOSWebViewProps &
12+
AndroidWebViewProps &
13+
WindowsWebViewProps;
814

915
declare class WebView<P = {}> extends Component<WebViewProps & P> {
10-
/**
11-
* Go back one page in the webview's history.
12-
*/
13-
goBack: () => void;
16+
/**
17+
* Go back one page in the webview's history.
18+
*/
19+
goBack: () => void;
1420

15-
/**
16-
* Go forward one page in the webview's history.
17-
*/
18-
goForward: () => void;
21+
/**
22+
* Go forward one page in the webview's history.
23+
*/
24+
goForward: () => void;
1925

20-
/**
21-
* Reloads the current page.
22-
*/
23-
reload: () => void;
26+
/**
27+
* Reloads the current page.
28+
*/
29+
reload: () => void;
2430

25-
/**
26-
* Stop loading the current page.
27-
*/
28-
stopLoading(): void;
31+
/**
32+
* Stop loading the current page.
33+
*/
34+
stopLoading(): void;
2935

30-
/**
31-
* Executes the JavaScript string.
32-
*/
33-
injectJavaScript: (script: string) => void;
36+
/**
37+
* Executes the JavaScript string.
38+
*/
39+
injectJavaScript: (script: string) => void;
3440

35-
/**
36-
* Focuses on WebView redered page.
37-
*/
38-
requestFocus: () => void;
39-
40-
/**
41-
* Posts a message to WebView.
42-
*/
43-
postMessage: (message: string) => void;
44-
45-
/**
46-
* (Android only)
47-
* Removes the autocomplete popup from the currently focused form field, if present.
48-
*/
49-
clearFormData?: () => void;
41+
/**
42+
* Focuses on WebView redered page.
43+
*/
44+
requestFocus: () => void;
5045

51-
/**
52-
* (Android only)
53-
* Clears the resource cache. Note that the cache is per-application, so this will clear the cache for all WebViews used.
54-
*/
55-
clearCache?: (clear: boolean) => void;
46+
/**
47+
* Posts a message to WebView.
48+
*/
49+
postMessage: (message: string) => void;
5650

57-
/**
58-
* (Android only)
59-
* Tells this WebView to clear its internal back/forward list.
60-
*/
61-
clearHistory?: () => void;
51+
/**
52+
* (Android only)
53+
* Removes the autocomplete popup from the currently focused form field, if present.
54+
*/
55+
clearFormData?: () => void;
56+
57+
/**
58+
* (Android only)
59+
* Clears the resource cache. Note that the cache is per-application, so this will clear the cache for all WebViews used.
60+
*/
61+
clearCache?: (clear: boolean) => void;
62+
63+
/**
64+
* (Android only)
65+
* Tells this WebView to clear its internal back/forward list.
66+
*/
67+
clearHistory?: () => void;
6268
}
6369

64-
export {WebView};
70+
export { WebView };
6571
export default WebView;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"Thibault Malbranche <[email protected]>"
1111
],
1212
"license": "MIT",
13-
"version": "13.13.423",
13+
"version": "13.13.44",
1414
"homepage": "https://github.com/react-native-webview/react-native-webview#readme",
1515
"scripts": {
1616
"android": "react-native run-android",

0 commit comments

Comments
 (0)