react-native-webview-bootpay 11.6.511 → 11.18.12
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/.DS_Store +0 -0
- package/android/build.gradle +7 -9
- package/android/gradle.properties +2 -1
- package/android/src/.DS_Store +0 -0
- package/android/src/main/.DS_Store +0 -0
- package/android/src/main/java/.DS_Store +0 -0
- package/android/src/main/java/kr/.DS_Store +0 -0
- package/android/src/main/java/kr/co/.DS_Store +0 -0
- package/android/src/main/java/kr/co/bootpay/.DS_Store +0 -0
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebChromeClient.java +2 -2
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewClient.java +20 -4
- package/ios/.DS_Store +0 -0
- package/ios/RNCWebView.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/RNCWebView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/RNCWebView.xcodeproj/project.xcworkspace/xcuserdata/bootpay.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNCWebView.xcodeproj/xcuserdata/bootpay.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/lib/WebView.android.d.ts.map +1 -1
- package/lib/WebView.android.js +11 -7
- package/lib/WebView.ios.d.ts.map +1 -1
- package/lib/WebView.ios.js +11 -7
- package/lib/WebView.js +4 -4
- package/lib/WebView.macos.d.ts.map +1 -1
- package/lib/WebView.macos.js +11 -7
- package/lib/WebView.windows.d.ts.map +1 -1
- package/lib/WebView.windows.js +4 -2
- package/lib/WebViewShared.d.ts.map +1 -1
- package/lib/WebViewShared.js +14 -12
- package/lib/WebViewTypes.js +3 -1
- package/package.json +17 -20
|
Binary file
|
package/android/build.gradle
CHANGED
|
@@ -9,18 +9,16 @@ buildscript {
|
|
|
9
9
|
if (project == rootProject) {
|
|
10
10
|
repositories {
|
|
11
11
|
mavenCentral()
|
|
12
|
-
google()
|
|
13
|
-
jcenter()
|
|
12
|
+
google()
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
dependencies {
|
|
17
|
-
classpath("com.android.tools.build:gradle:
|
|
16
|
+
classpath("com.android.tools.build:gradle:3.6.0")
|
|
18
17
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}")
|
|
19
18
|
}
|
|
20
19
|
} else {
|
|
21
20
|
repositories {
|
|
22
|
-
mavenCentral()
|
|
23
|
-
jcenter()
|
|
21
|
+
mavenCentral()
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
dependencies {
|
|
@@ -37,8 +35,7 @@ apply plugin: 'com.android.library'
|
|
|
37
35
|
apply plugin: 'kotlin-android'
|
|
38
36
|
|
|
39
37
|
android {
|
|
40
|
-
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
|
|
41
|
-
buildToolsVersion getExtOrDefault('buildToolsVersion')
|
|
38
|
+
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
|
|
42
39
|
defaultConfig {
|
|
43
40
|
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
|
|
44
41
|
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
@@ -60,8 +57,7 @@ android {
|
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
repositories {
|
|
63
|
-
mavenCentral()
|
|
64
|
-
jcenter()
|
|
60
|
+
mavenCentral()
|
|
65
61
|
google()
|
|
66
62
|
|
|
67
63
|
def found = false
|
|
@@ -131,9 +127,11 @@ repositories {
|
|
|
131
127
|
}
|
|
132
128
|
|
|
133
129
|
def kotlin_version = getExtOrDefault('kotlinVersion')
|
|
130
|
+
def webkit_version = getExtOrDefault('webkitVersion')
|
|
134
131
|
|
|
135
132
|
dependencies {
|
|
136
133
|
//noinspection GradleDynamicVersion
|
|
137
134
|
implementation 'com.facebook.react:react-native:+'
|
|
138
135
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
136
|
+
implementation "androidx.webkit:webkit:$webkit_version"
|
|
139
137
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
ReactNativeWebViewBootpay_kotlinVersion=1.3.50
|
|
2
|
+
ReactNativeWebViewBootpay_webkitVersion=1.4.0
|
|
2
3
|
ReactNativeWebViewBootpay_compileSdkVersion=30
|
|
3
4
|
ReactNativeWebViewBootpay_buildToolsVersion=30.0.3
|
|
4
5
|
ReactNativeWebViewBootpay_targetSdkVersion=28
|
|
5
|
-
ReactNativeWebViewBootpay_minSdkVersion=
|
|
6
|
+
ReactNativeWebViewBootpay_minSdkVersion=21
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -198,8 +198,8 @@ class BPCWebChromeClient extends WebChromeClient implements LifecycleEventListen
|
|
|
198
198
|
params.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
|
199
199
|
popupDialog.getWindow().setAttributes((WindowManager.LayoutParams) params);
|
|
200
200
|
popupDialog.setOnDismissListener(dialog -> {
|
|
201
|
-
Toast.makeText(view.getContext(), "팝업취소", Toast.LENGTH_SHORT).show();
|
|
202
|
-
onCloseWindow(view);
|
|
201
|
+
// Toast.makeText(view.getContext(), "팝업취소", Toast.LENGTH_SHORT).show();
|
|
202
|
+
onCloseWindow(view); //rn에선 딱히 동작하지 않음
|
|
203
203
|
});
|
|
204
204
|
newWebView.setDialog(popupDialog);
|
|
205
205
|
popupDialog.show();
|
|
@@ -211,29 +211,45 @@ public class BPCWebViewClient extends WebViewClient {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
protected boolean startApp(Intent intent, Context context) {
|
|
214
|
+
intent.addFlags(intent.FLAG_ACTIVITY_CLEAR_TASK);
|
|
215
|
+
intent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
|
|
214
216
|
context.startActivity(intent);
|
|
215
217
|
return true;
|
|
216
218
|
}
|
|
217
219
|
|
|
218
220
|
protected boolean startGooglePlay(Intent intent, Context context) {
|
|
219
221
|
final String appPackageName = intent.getPackage();
|
|
222
|
+
|
|
220
223
|
if(appPackageName == null) {
|
|
221
224
|
Uri dataUri = intent.getData();
|
|
222
225
|
|
|
223
226
|
try {
|
|
224
|
-
|
|
227
|
+
Intent addIntent = new Intent(Intent.ACTION_VIEW, intent.getData());
|
|
228
|
+
addIntent.addFlags(intent.FLAG_ACTIVITY_CLEAR_TASK);
|
|
229
|
+
addIntent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
|
|
230
|
+
context.startActivity(addIntent);
|
|
225
231
|
} catch (Exception e) {
|
|
226
232
|
String packageName = "com.nhn.android.search"; //appPackageName이 비어있으면 네이버로 보내기(네이버 로그인)
|
|
227
233
|
if(dataUri != null && dataUri.toString().startsWith("wooripay://")) packageName = "com.wooricard.wpay"; //우리카드 예외처리
|
|
228
234
|
|
|
229
|
-
|
|
235
|
+
Intent addIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + packageName));
|
|
236
|
+
addIntent.addFlags(intent.FLAG_ACTIVITY_CLEAR_TASK);
|
|
237
|
+
addIntent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
|
|
238
|
+
context.startActivity(addIntent);
|
|
239
|
+
// context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + packageName)));
|
|
230
240
|
}
|
|
231
241
|
return true;
|
|
232
242
|
}
|
|
233
243
|
try {
|
|
234
|
-
|
|
244
|
+
Intent addIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName));
|
|
245
|
+
addIntent.addFlags(intent.FLAG_ACTIVITY_CLEAR_TASK);
|
|
246
|
+
addIntent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
|
|
247
|
+
context.startActivity(addIntent);
|
|
235
248
|
} catch (android.content.ActivityNotFoundException anfe) {
|
|
236
|
-
|
|
249
|
+
Intent addIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName));
|
|
250
|
+
addIntent.addFlags(intent.FLAG_ACTIVITY_CLEAR_TASK);
|
|
251
|
+
addIntent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
|
|
252
|
+
context.startActivity(addIntent);
|
|
237
253
|
}
|
|
238
254
|
return true;
|
|
239
255
|
}
|
package/ios/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|
package/ios/RNCWebView.xcodeproj/xcuserdata/bootpay.xcuserdatad/xcschemes/xcschememanagement.plist
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>RNCWebView.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>0</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
</dict>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebView.android.d.ts","sourceRoot":"","sources":["../src/WebView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,OAAO,EAEL,kCAAkC,EAGnC,MAAM,iBAAiB,CAAC;AACzB,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;I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MAAM,aASJ;IAEF,WAAW,aAMT;IAEF,YAAY,aAMV;IAEF,WAAW,SAAU,MAAM,UAMzB;IAEF,aAAa,aAMZ;IAED,UAAU,qBAAsB,OAAO,UAMrC;IAEF,YAAY,aAMV;IAEF;;;;;OAKG;IACH,gBAAgB,SAAU,MAAM,UAM9B;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,gBACrB,OAAO,OACf,MAAM,+CAYX;IAEF,MAAM;CAoFP;AAED,eAAe,OAAO,CAAC"}
|
package/lib/WebView.android.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -85,7 +87,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
85
87
|
};
|
|
86
88
|
_this.onShouldStartLoadWithRequest = null;
|
|
87
89
|
_this.webViewRef = React.createRef();
|
|
88
|
-
_this.messagingModuleName = "WebViewMessageHandler"
|
|
90
|
+
_this.messagingModuleName = "WebViewMessageHandler".concat(uniqueRef += 1);
|
|
89
91
|
_this.componentDidMount = function () {
|
|
90
92
|
BatchedBridge.registerCallableModule(_this.messagingModuleName, _this);
|
|
91
93
|
};
|
|
@@ -157,7 +159,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
157
159
|
};
|
|
158
160
|
_this.onLoadingError = function (event) {
|
|
159
161
|
event.persist(); // persist this event because we need to store it
|
|
160
|
-
var
|
|
162
|
+
var _b = _this.props, onError = _b.onError, onLoadEnd = _b.onLoadEnd;
|
|
161
163
|
if (onError) {
|
|
162
164
|
onError(event);
|
|
163
165
|
}
|
|
@@ -183,7 +185,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
183
185
|
}
|
|
184
186
|
};
|
|
185
187
|
_this.onLoadingFinish = function (event) {
|
|
186
|
-
var
|
|
188
|
+
var _b = _this.props, onLoad = _b.onLoad, onLoadEnd = _b.onLoadEnd;
|
|
187
189
|
var url = event.nativeEvent.url;
|
|
188
190
|
if (onLoad) {
|
|
189
191
|
onLoad(event);
|
|
@@ -230,7 +232,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
230
232
|
return _this;
|
|
231
233
|
}
|
|
232
234
|
WebView.prototype.render = function () {
|
|
233
|
-
var
|
|
235
|
+
var _b = this.props, onMessage = _b.onMessage, onShouldStartLoadWithRequestProp = _b.onShouldStartLoadWithRequest, originWhitelist = _b.originWhitelist, renderError = _b.renderError, renderLoading = _b.renderLoading, source = _b.source, style = _b.style, containerStyle = _b.containerStyle, _c = _b.nativeConfig, nativeConfig = _c === void 0 ? {} : _c, otherProps = __rest(_b, ["onMessage", "onShouldStartLoadWithRequest", "originWhitelist", "renderError", "renderLoading", "source", "style", "containerStyle", "nativeConfig"]);
|
|
234
236
|
var otherView = null;
|
|
235
237
|
if (this.state.viewState === 'LOADING') {
|
|
236
238
|
otherView = (renderLoading || defaultRenderLoading)();
|
|
@@ -241,7 +243,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
241
243
|
otherView = (renderError || defaultRenderError)(errorEvent.domain, errorEvent.code, errorEvent.description);
|
|
242
244
|
}
|
|
243
245
|
else if (this.state.viewState !== 'IDLE') {
|
|
244
|
-
console.error("BPCWebView invalid state encountered: "
|
|
246
|
+
console.error("BPCWebView invalid state encountered: ".concat(this.state.viewState));
|
|
245
247
|
}
|
|
246
248
|
var webViewStyles = [styles.container, styles.webView, style];
|
|
247
249
|
var webViewContainerStyle = [styles.container, containerStyle];
|
|
@@ -265,6 +267,8 @@ var WebView = /** @class */ (function (_super) {
|
|
|
265
267
|
{otherView}
|
|
266
268
|
</View>);
|
|
267
269
|
};
|
|
270
|
+
var _a;
|
|
271
|
+
_a = WebView;
|
|
268
272
|
WebView.defaultProps = {
|
|
269
273
|
overScrollMode: 'always',
|
|
270
274
|
javaScriptEnabled: true,
|
|
@@ -280,7 +284,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
280
284
|
setSupportMultipleWindows: true
|
|
281
285
|
};
|
|
282
286
|
WebView.isFileUploadSupported = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
283
|
-
return __generator(
|
|
287
|
+
return __generator(_a, function (_b) {
|
|
284
288
|
// native implementation should return "true" only for Android 5+
|
|
285
289
|
return [2 /*return*/, NativeModules.BPCWebView.isFileUploadSupported()];
|
|
286
290
|
});
|
package/lib/WebView.ios.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebView.ios.d.ts","sourceRoot":"","sources":["../src/WebView.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAkB1B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EAEf,gBAAgB,EAEhB,KAAK,EAEN,MAAM,gBAAgB,CAAC;AAyBxB,cAAM,OAAQ,SAAQ,KAAK,CAAC,SAAS,CAAC,eAAe,EA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;IAEF,WAAW,yCAKV;IAED,eAAe,0CAYb;IAEF,SAAS,uCAKP;IAEF,iBAAiB,wCAKf;IAEF,oCAAoC,gBACrB,OAAO,QACd,MAAM,kBACI,MAAM,UAOtB;IAEF,4BAA4B,0CAK1B;IAEF,kBAAkB,CAAC,SAAS,EAAE,eAAe;IAO7C,uBAAuB,CACrB,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,MAAM,eAAe;IASjC,MAAM;CAqFP;AAED,eAAe,OAAO,CAAC"}
|
package/lib/WebView.ios.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -167,7 +169,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
167
169
|
};
|
|
168
170
|
_this.onLoadingError = function (event) {
|
|
169
171
|
event.persist(); // persist this event because we need to store it
|
|
170
|
-
var
|
|
172
|
+
var _b = _this.props, onError = _b.onError, onLoadEnd = _b.onLoadEnd;
|
|
171
173
|
if (onLoadEnd) {
|
|
172
174
|
onLoadEnd(event);
|
|
173
175
|
}
|
|
@@ -187,7 +189,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
187
189
|
}
|
|
188
190
|
};
|
|
189
191
|
_this.onLoadingFinish = function (event) {
|
|
190
|
-
var
|
|
192
|
+
var _b = _this.props, onLoad = _b.onLoad, onLoadEnd = _b.onLoadEnd;
|
|
191
193
|
if (onLoad) {
|
|
192
194
|
onLoad(event);
|
|
193
195
|
}
|
|
@@ -232,11 +234,11 @@ var WebView = /** @class */ (function (_super) {
|
|
|
232
234
|
};
|
|
233
235
|
WebView.prototype.showRedboxOnPropChanges = function (prevProps, propName) {
|
|
234
236
|
if (this.props[propName] !== prevProps[propName]) {
|
|
235
|
-
console.error("Changes to property "
|
|
237
|
+
console.error("Changes to property ".concat(propName, " do nothing after the initial render."));
|
|
236
238
|
}
|
|
237
239
|
};
|
|
238
240
|
WebView.prototype.render = function () {
|
|
239
|
-
var
|
|
241
|
+
var _b = this.props, decelerationRateProp = _b.decelerationRate, _c = _b.nativeConfig, nativeConfig = _c === void 0 ? {} : _c, onMessage = _b.onMessage, onShouldStartLoadWithRequestProp = _b.onShouldStartLoadWithRequest, originWhitelist = _b.originWhitelist, renderError = _b.renderError, renderLoading = _b.renderLoading, _d = _b.injectedJavaScriptForMainFrameOnly, injectedJavaScriptForMainFrameOnly = _d === void 0 ? true : _d, _e = _b.injectedJavaScriptBeforeContentLoadedForMainFrameOnly, injectedJavaScriptBeforeContentLoadedForMainFrameOnly = _e === void 0 ? true : _e, style = _b.style, containerStyle = _b.containerStyle, otherProps = __rest(_b, ["decelerationRate", "nativeConfig", "onMessage", "onShouldStartLoadWithRequest", "originWhitelist", "renderError", "renderLoading", "injectedJavaScriptForMainFrameOnly", "injectedJavaScriptBeforeContentLoadedForMainFrameOnly", "style", "containerStyle"]);
|
|
240
242
|
var otherView = null;
|
|
241
243
|
if (this.state.viewState === 'LOADING') {
|
|
242
244
|
otherView = (renderLoading || defaultRenderLoading)();
|
|
@@ -247,7 +249,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
247
249
|
otherView = (renderError || defaultRenderError)(errorEvent.domain, errorEvent.code, errorEvent.description);
|
|
248
250
|
}
|
|
249
251
|
else if (this.state.viewState !== 'IDLE') {
|
|
250
|
-
console.error("BPCWebView invalid state encountered: "
|
|
252
|
+
console.error("BPCWebView invalid state encountered: ".concat(this.state.viewState));
|
|
251
253
|
}
|
|
252
254
|
var webViewStyles = [styles.container, styles.webView, style];
|
|
253
255
|
var webViewContainerStyle = [styles.container, containerStyle];
|
|
@@ -265,6 +267,8 @@ var WebView = /** @class */ (function (_super) {
|
|
|
265
267
|
{otherView}
|
|
266
268
|
</View>);
|
|
267
269
|
};
|
|
270
|
+
var _a;
|
|
271
|
+
_a = WebView;
|
|
268
272
|
WebView.defaultProps = {
|
|
269
273
|
javaScriptEnabled: true,
|
|
270
274
|
cacheEnabled: true,
|
|
@@ -272,7 +276,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
272
276
|
useSharedProcessPool: true
|
|
273
277
|
};
|
|
274
278
|
WebView.isFileUploadSupported = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
275
|
-
return __generator(
|
|
279
|
+
return __generator(_a, function (_b) {
|
|
276
280
|
// no native implementation for iOS, depends only on permissions
|
|
277
281
|
return [2 /*return*/, true];
|
|
278
282
|
});
|
package/lib/WebView.js
CHANGED
|
@@ -5,9 +5,9 @@ import { View } from 'react-native';
|
|
|
5
5
|
// implementation which is produced by Expo SDK 37.0.0.1 implementation, with
|
|
6
6
|
// similar interface than the native ones have.
|
|
7
7
|
var WebView = function () { return (<View style={{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}}/>); };
|
|
8
|
+
alignSelf: 'flex-start',
|
|
9
|
+
borderColor: 'rgb(255, 0, 0)',
|
|
10
|
+
borderWidth: 1
|
|
11
|
+
}}/>); };
|
|
12
12
|
export { WebView };
|
|
13
13
|
export default WebView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebView.macos.d.ts","sourceRoot":"","sources":["../src/WebView.macos.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAA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AEF;;OAEG;IACH,YAAY,aAMV;IAEF;;;;;;;;;OASG;IACH,WAAW,SAAU,MAAM,UAMzB;IAEF;;;;;OAKG;IACH,gBAAgB,SAAU,MAAM,UAM9B;IAEF;;;OAGG;IACH,qBAAqB,0CAInB;IAEF;;OAEG;IACH,gBAAgB,eAId;IAEF,cAAc,0CAMZ;IAEF,cAAc,qCAeZ;IAEF,WAAW,yCAKV;IAED,eAAe,0CAYb;IAEF,SAAS,uCAKP;IAEF,iBAAiB,wCAKf;IAEF,oCAAoC,gBACrB,OAAO,QACd,MAAM,kBACI,MAAM,UAOtB;IAEF,4BAA4B,0CAK1B;IAEF,kBAAkB,CAAC,SAAS,EAAE,iBAAiB;IAM/C,uBAAuB,CACrB,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,MAAM,iBAAiB;IASnC,MAAM;CA0EP;AAED,eAAe,OAAO,CAAC"}
|
package/lib/WebView.macos.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -157,7 +159,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
157
159
|
};
|
|
158
160
|
_this.onLoadingError = function (event) {
|
|
159
161
|
event.persist(); // persist this event because we need to store it
|
|
160
|
-
var
|
|
162
|
+
var _b = _this.props, onError = _b.onError, onLoadEnd = _b.onLoadEnd;
|
|
161
163
|
if (onLoadEnd) {
|
|
162
164
|
onLoadEnd(event);
|
|
163
165
|
}
|
|
@@ -177,7 +179,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
177
179
|
}
|
|
178
180
|
};
|
|
179
181
|
_this.onLoadingFinish = function (event) {
|
|
180
|
-
var
|
|
182
|
+
var _b = _this.props, onLoad = _b.onLoad, onLoadEnd = _b.onLoadEnd;
|
|
181
183
|
if (onLoad) {
|
|
182
184
|
onLoad(event);
|
|
183
185
|
}
|
|
@@ -221,11 +223,11 @@ var WebView = /** @class */ (function (_super) {
|
|
|
221
223
|
};
|
|
222
224
|
WebView.prototype.showRedboxOnPropChanges = function (prevProps, propName) {
|
|
223
225
|
if (this.props[propName] !== prevProps[propName]) {
|
|
224
|
-
console.error("Changes to property "
|
|
226
|
+
console.error("Changes to property ".concat(propName, " do nothing after the initial render."));
|
|
225
227
|
}
|
|
226
228
|
};
|
|
227
229
|
WebView.prototype.render = function () {
|
|
228
|
-
var
|
|
230
|
+
var _b = this.props, _c = _b.nativeConfig, nativeConfig = _c === void 0 ? {} : _c, onMessage = _b.onMessage, onShouldStartLoadWithRequestProp = _b.onShouldStartLoadWithRequest, originWhitelist = _b.originWhitelist, renderError = _b.renderError, renderLoading = _b.renderLoading, style = _b.style, containerStyle = _b.containerStyle, otherProps = __rest(_b, ["nativeConfig", "onMessage", "onShouldStartLoadWithRequest", "originWhitelist", "renderError", "renderLoading", "style", "containerStyle"]);
|
|
229
231
|
var otherView = null;
|
|
230
232
|
if (this.state.viewState === 'LOADING') {
|
|
231
233
|
otherView = (renderLoading || defaultRenderLoading)();
|
|
@@ -236,7 +238,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
236
238
|
otherView = (renderError || defaultRenderError)(errorEvent.domain, errorEvent.code, errorEvent.description);
|
|
237
239
|
}
|
|
238
240
|
else if (this.state.viewState !== 'IDLE') {
|
|
239
|
-
console.error("BPCWebView invalid state encountered: "
|
|
241
|
+
console.error("BPCWebView invalid state encountered: ".concat(this.state.viewState));
|
|
240
242
|
}
|
|
241
243
|
var webViewStyles = [styles.container, styles.webView, style];
|
|
242
244
|
var webViewContainerStyle = [styles.container, containerStyle];
|
|
@@ -253,6 +255,8 @@ var WebView = /** @class */ (function (_super) {
|
|
|
253
255
|
{otherView}
|
|
254
256
|
</View>);
|
|
255
257
|
};
|
|
258
|
+
var _a;
|
|
259
|
+
_a = WebView;
|
|
256
260
|
WebView.defaultProps = {
|
|
257
261
|
javaScriptEnabled: true,
|
|
258
262
|
cacheEnabled: true,
|
|
@@ -260,7 +264,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
260
264
|
useSharedProcessPool: true
|
|
261
265
|
};
|
|
262
266
|
WebView.isFileUploadSupported = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
263
|
-
return __generator(
|
|
267
|
+
return __generator(_a, function (_b) {
|
|
264
268
|
// no native implementation for macOS, depends only on permissions
|
|
265
269
|
return [2 /*return*/, true];
|
|
266
270
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebView.windows.d.ts","sourceRoot":"","sources":["../src/WebView.windows.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EAEnB,KAAK,EACN,MAAM,gBAAgB,CAAC;AA0BxB,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,KAAK,CAAC;IAE7E,MAAM,CAAC,YAAY;;MAEjB;IAEF,KAAK,EAAE,KAAK,CAGX;IAED,UAAU,wCAA2C;IAErD,SAAS,aAMR;IAED,MAAM,aAML;IAED,MAAM,aAML;IAED,gBAAgB,
|
|
1
|
+
{"version":3,"file":"WebView.windows.d.ts","sourceRoot":"","sources":["../src/WebView.windows.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EAEnB,KAAK,EACN,MAAM,gBAAgB,CAAC;AA0BxB,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,KAAK,CAAC;IAE7E,MAAM,CAAC,YAAY;;MAEjB;IAEF,KAAK,EAAE,KAAK,CAGX;IAED,UAAU,wCAA2C;IAErD,SAAS,aAMR;IAED,MAAM,aAML;IAED,MAAM,aAML;IAED,gBAAgB,SAAU,MAAM,UAM/B;IAED,WAAW,SAAU,MAAM,UAOzB;IAEF,sBAAsB,YAAa,MAAM,YAIxC;IAID;;;OAGG;IACH,qBAAqB,0CAIpB;IAED,gBAAgB,sBAGf;IAED,cAAc,0CAMb;IAED,iBAAiB,wCAKf;IAEF,cAAc,qCAcb;IAED,eAAe,0CAYd;IAED,SAAS,uCAKR;IAED,WAAW,yCAKV;IAED,MAAM;CA6EP"}
|
package/lib/WebView.windows.js
CHANGED
|
@@ -13,10 +13,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
var extendStatics = function (d, b) {
|
|
14
14
|
extendStatics = Object.setPrototypeOf ||
|
|
15
15
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
16
|
-
function (d, b) { for (var p in b) if (
|
|
16
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
17
17
|
return extendStatics(d, b);
|
|
18
18
|
};
|
|
19
19
|
return function (d, b) {
|
|
20
|
+
if (typeof b !== "function" && b !== null)
|
|
21
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
20
22
|
extendStatics(d, b);
|
|
21
23
|
function __() { this.constructor = d; }
|
|
22
24
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -82,7 +84,7 @@ var WebView = /** @class */ (function (_super) {
|
|
|
82
84
|
UIManager.dispatchViewManagerCommand(_this.getWebViewHandle(), UIManager.getViewManagerConfig('RCTWebView').Commands.injectJavaScript, [message]);
|
|
83
85
|
};
|
|
84
86
|
_this.getInjectableJSMessage = function (message) {
|
|
85
|
-
return "(function() {window.dispatchEvent(new MessageEvent('message', {data: "
|
|
87
|
+
return "(function() {window.dispatchEvent(new MessageEvent('message', {data: ".concat(JSON.stringify(message), "}));})();");
|
|
86
88
|
};
|
|
87
89
|
/**
|
|
88
90
|
* We return an event with a bunch of fields including:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebViewShared.d.ts","sourceRoot":"","sources":["../src/WebViewShared.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAGxB,QAAA,MAAM,sBAAsB,UAA4B,CAAC;AAuBzD,QAAA,MAAM,kCAAkC,
|
|
1
|
+
{"version":3,"file":"WebViewShared.d.ts","sourceRoot":"","sources":["../src/WebViewShared.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAGxB,QAAA,MAAM,sBAAsB,UAA4B,CAAC;AAuBzD,QAAA,MAAM,kCAAkC,8BAEvB,OAAO,OACf,MAAM,kBACK,MAAM,KACnB,IAAI,mBACQ,SAAS,MAAM,EAAE,oIAwBnC,CAAC;AAEF,QAAA,MAAM,oBAAoB,mBAIzB,CAAC;AACF,QAAA,MAAM,kBAAkB,gBACT,MAAM,GAAG,SAAS,aACpB,MAAM,aACN,MAAM,gBAQlB,CAAC;AAEF,OAAO,EACL,sBAAsB,EACtB,kCAAkC,EAClC,oBAAoB,EACpB,kBAAkB,GACnB,CAAC"}
|
package/lib/WebViewShared.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
7
9
|
};
|
|
8
10
|
import escapeStringRegexp from 'escape-string-regexp';
|
|
9
11
|
import React from 'react';
|
|
@@ -15,14 +17,14 @@ var extractOrigin = function (url) {
|
|
|
15
17
|
return result === null ? '' : result[0];
|
|
16
18
|
};
|
|
17
19
|
var originWhitelistToRegex = function (originWhitelist) {
|
|
18
|
-
return "^"
|
|
20
|
+
return "^".concat(escapeStringRegexp(originWhitelist).replace(/\\\*/g, '.*'));
|
|
19
21
|
};
|
|
20
22
|
var passesWhitelist = function (compiledWhitelist, url) {
|
|
21
23
|
var origin = extractOrigin(url);
|
|
22
24
|
return compiledWhitelist.some(function (x) { return new RegExp(x).test(origin); });
|
|
23
25
|
};
|
|
24
26
|
var compileWhitelist = function (originWhitelist) {
|
|
25
|
-
return
|
|
27
|
+
return __spreadArray(['about:blank'], (originWhitelist || []), true).map(originWhitelistToRegex);
|
|
26
28
|
};
|
|
27
29
|
var createOnShouldStartLoadWithRequest = function (loadRequest, originWhitelist, onShouldStartLoadWithRequest) {
|
|
28
30
|
return function (_a) {
|
|
@@ -34,7 +36,7 @@ var createOnShouldStartLoadWithRequest = function (loadRequest, originWhitelist,
|
|
|
34
36
|
if (supported) {
|
|
35
37
|
return Linking.openURL(url);
|
|
36
38
|
}
|
|
37
|
-
console.warn("Can't open url: "
|
|
39
|
+
console.warn("Can't open url: ".concat(url));
|
|
38
40
|
return undefined;
|
|
39
41
|
})["catch"](function (e) {
|
|
40
42
|
console.warn('Error opening URL: ', e);
|
|
@@ -52,8 +54,8 @@ var defaultRenderLoading = function () { return (<View style={styles.loadingOrEr
|
|
|
52
54
|
</View>); };
|
|
53
55
|
var defaultRenderError = function (errorDomain, errorCode, errorDesc) { return (<View style={styles.loadingOrErrorView}>
|
|
54
56
|
<Text style={styles.errorTextTitle}>Error loading page</Text>
|
|
55
|
-
<Text style={styles.errorText}>{"Domain: "
|
|
56
|
-
<Text style={styles.errorText}>{"Error Code: "
|
|
57
|
-
<Text style={styles.errorText}>{"Description: "
|
|
57
|
+
<Text style={styles.errorText}>{"Domain: ".concat(errorDomain)}</Text>
|
|
58
|
+
<Text style={styles.errorText}>{"Error Code: ".concat(errorCode)}</Text>
|
|
59
|
+
<Text style={styles.errorText}>{"Description: ".concat(errorDesc)}</Text>
|
|
58
60
|
</View>); };
|
|
59
61
|
export { defaultOriginWhitelist, createOnShouldStartLoadWithRequest, defaultRenderLoading, defaultRenderError, };
|
package/lib/WebViewTypes.js
CHANGED
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "11.
|
|
11
|
+
"version": "11.18.12",
|
|
12
12
|
"homepage": "https://github.com/react-native-webview/react-native-webview#readme",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"start": "node node_modules/react-native/local-cli/cli.js start",
|
|
@@ -37,23 +37,20 @@
|
|
|
37
37
|
"invariant": "2.2.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@babel/core": "7.
|
|
41
|
-
"@babel/runtime": "7.
|
|
42
|
-
"@react-native-community/cli": "^
|
|
43
|
-
"@react-native-community/cli-platform-android": "^
|
|
44
|
-
"@react-native-community/cli-platform-ios": "^
|
|
40
|
+
"@babel/core": "^7.0.0",
|
|
41
|
+
"@babel/runtime": "^7.0.0",
|
|
42
|
+
"@react-native-community/cli": "^6.0.0",
|
|
43
|
+
"@react-native-community/cli-platform-android": "^6.0.0",
|
|
44
|
+
"@react-native-community/cli-platform-ios": "^6.0.0",
|
|
45
45
|
"@semantic-release/git": "7.0.16",
|
|
46
46
|
"@types/invariant": "^2.2.30",
|
|
47
|
-
"@types/jest": "
|
|
48
|
-
"@types/react": "
|
|
49
|
-
"@types/react-native": "0.
|
|
47
|
+
"@types/jest": "^26.0.0",
|
|
48
|
+
"@types/react": "^17.0.0",
|
|
49
|
+
"@types/react-native": "^0.64.0",
|
|
50
50
|
"@types/selenium-webdriver": "4.0.9",
|
|
51
51
|
"@typescript-eslint/eslint-plugin": "2.1.0",
|
|
52
52
|
"@typescript-eslint/parser": "2.1.0",
|
|
53
53
|
"appium": "1.17.0",
|
|
54
|
-
"babel-eslint": "10.0.3",
|
|
55
|
-
"babel-jest": "24.8.0",
|
|
56
|
-
"babel-plugin-module-resolver": "3.1.3",
|
|
57
54
|
"eslint": "6.3.0",
|
|
58
55
|
"eslint-config-airbnb": "18.0.1",
|
|
59
56
|
"eslint-config-prettier": "6.2.0",
|
|
@@ -61,17 +58,17 @@
|
|
|
61
58
|
"eslint-plugin-jsx-a11y": "6.2.3",
|
|
62
59
|
"eslint-plugin-react": "7.14.3",
|
|
63
60
|
"eslint-plugin-react-native": "3.7.0",
|
|
64
|
-
"jest": "
|
|
65
|
-
"metro": "0.
|
|
66
|
-
"
|
|
67
|
-
"react": "
|
|
68
|
-
"react-native": "0.
|
|
69
|
-
"react-native-
|
|
70
|
-
"react-native-windows": "0.
|
|
61
|
+
"jest": "^26.6.3",
|
|
62
|
+
"metro-react-native-babel-preset": "^0.66.2",
|
|
63
|
+
"react": "17.0.2",
|
|
64
|
+
"react-native": "0.68.1",
|
|
65
|
+
"react-native-macos": "^0.66.0-0",
|
|
66
|
+
"react-native-test-app": "^1.3.2",
|
|
67
|
+
"react-native-windows": "^0.66.0-0",
|
|
71
68
|
"selenium-appium": "1.0.2",
|
|
72
69
|
"selenium-webdriver": "4.0.0-alpha.7",
|
|
73
70
|
"semantic-release": "15.13.24",
|
|
74
|
-
"typescript": "
|
|
71
|
+
"typescript": "^4.0.0",
|
|
75
72
|
"winappdriver": "^0.0.7"
|
|
76
73
|
},
|
|
77
74
|
"repository": {
|