react-native-webview-bootpay 11.26.18 → 11.26.19
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/build/.transforms/88c49d67076e4458a9ddee82f875eb6a/transformed/classes/classes.dex +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebChromeClient$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebChromeClient.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$4.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebChromeClient.java +122 -51
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewManager.java +2 -1
- package/apple/BPCWebView.m +19 -7
- package/package.json +1 -1
package/android/build/.transforms/88c49d67076e4458a9ddee82f875eb6a/transformed/classes/classes.dex
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i
CHANGED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -165,61 +165,132 @@ class BPCWebChromeClient extends WebChromeClient implements LifecycleEventListen
|
|
|
165
165
|
|
|
166
166
|
@Override
|
|
167
167
|
public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
168
|
+
|
|
169
|
+
if(isDialog) {
|
|
170
|
+
|
|
171
|
+
final BPCWebView newWebView = new BPCWebView((ThemedReactContext) view.getContext());
|
|
172
|
+
BPCWebChromeClient client = new BPCWebChromeClient(this.mReactContext, view);
|
|
173
|
+
// client.onCloseWindow();
|
|
174
|
+
client.setProgressChangedFilter(progressChangedFilter);
|
|
175
|
+
newWebView.setWebChromeClient(client);
|
|
176
|
+
setWebSettingCopy(view, newWebView);
|
|
177
|
+
|
|
178
|
+
newWebView.setWebViewClient(new BPCWebViewClient() {
|
|
179
|
+
|
|
180
|
+
@Override
|
|
181
|
+
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
182
|
+
Intent intent = getIntentWithPackage(url);
|
|
183
|
+
Context context = view.getContext();
|
|
184
|
+
|
|
185
|
+
if(isIntent(url)) {
|
|
186
|
+
if(isInstallApp(intent, context)) return startApp(intent, context);
|
|
187
|
+
else return startGooglePlay(intent, context);
|
|
188
|
+
} else if(isMarket(url)) {
|
|
189
|
+
if(isInstallApp(intent, context)) return startApp(intent, context);
|
|
190
|
+
else return startGooglePlay(intent, context);
|
|
191
|
+
} else if(isSpecialCase(url)) {
|
|
192
|
+
if(isInstallApp(intent, context)) return startApp(intent, context);
|
|
193
|
+
else return startGooglePlay(intent, context);
|
|
194
|
+
}
|
|
195
|
+
return url.contains("vguardend");
|
|
191
196
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
Dialog popupDialog = new Dialog(view.getContext(), android.R.style.Theme_Black_NoTitleBar_Fullscreen);
|
|
200
|
+
popupDialog.setContentView(newWebView);
|
|
201
|
+
ViewGroup.LayoutParams params = popupDialog.getWindow().getAttributes();
|
|
202
|
+
params.width = ViewGroup.LayoutParams.MATCH_PARENT;
|
|
203
|
+
params.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
|
204
|
+
popupDialog.getWindow().setAttributes((WindowManager.LayoutParams) params);
|
|
205
|
+
popupDialog.setOnDismissListener(dialog -> {
|
|
206
|
+
// Toast.makeText(view.getContext(), "팝업취소", Toast.LENGTH_SHORT).show();
|
|
207
|
+
onCloseWindow(view); //rn에선 딱히 동작하지 않음
|
|
208
|
+
});
|
|
209
|
+
newWebView.setDialog(popupDialog);
|
|
210
|
+
popupDialog.show();
|
|
211
|
+
|
|
212
|
+
final WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
|
|
213
|
+
transport.setWebView(newWebView);
|
|
214
|
+
resultMsg.sendToTarget();
|
|
215
|
+
|
|
216
|
+
return true;
|
|
217
|
+
} else {
|
|
218
|
+
final WebView newWebView = new WebView(view.getContext());
|
|
219
|
+
final WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
|
|
220
|
+
transport.setWebView(newWebView);
|
|
221
|
+
resultMsg.sendToTarget();
|
|
222
|
+
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
/*
|
|
228
|
+
|
|
229
|
+
String url = resultMsg.getData().getString("url");
|
|
230
|
+
|
|
231
|
+
if(url.startsWith("https://gw.bootpay.co.kr") || url.startsWith("http://gw.bootpay.co.kr")) {
|
|
232
|
+
final BPCWebView newWebView = new BPCWebView((ThemedReactContext) view.getContext());
|
|
233
|
+
BPCWebChromeClient client = new BPCWebChromeClient(this.mReactContext, view);
|
|
234
|
+
// client.onCloseWindow();
|
|
235
|
+
client.setProgressChangedFilter(progressChangedFilter);
|
|
236
|
+
newWebView.setWebChromeClient(client);
|
|
237
|
+
setWebSettingCopy(view, newWebView);
|
|
238
|
+
|
|
239
|
+
newWebView.setWebViewClient(new BPCWebViewClient() {
|
|
240
|
+
|
|
241
|
+
@Override
|
|
242
|
+
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
243
|
+
Intent intent = getIntentWithPackage(url);
|
|
244
|
+
Context context = view.getContext();
|
|
245
|
+
|
|
246
|
+
if(isIntent(url)) {
|
|
247
|
+
if(isInstallApp(intent, context)) return startApp(intent, context);
|
|
248
|
+
else return startGooglePlay(intent, context);
|
|
249
|
+
} else if(isMarket(url)) {
|
|
250
|
+
if(isInstallApp(intent, context)) return startApp(intent, context);
|
|
251
|
+
else return startGooglePlay(intent, context);
|
|
252
|
+
} else if(isSpecialCase(url)) {
|
|
253
|
+
if(isInstallApp(intent, context)) return startApp(intent, context);
|
|
254
|
+
else return startGooglePlay(intent, context);
|
|
255
|
+
}
|
|
256
|
+
return url.contains("vguardend");
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
Dialog popupDialog = new Dialog(view.getContext(), android.R.style.Theme_Black_NoTitleBar_Fullscreen);
|
|
261
|
+
popupDialog.setContentView(newWebView);
|
|
262
|
+
ViewGroup.LayoutParams params = popupDialog.getWindow().getAttributes();
|
|
263
|
+
params.width = ViewGroup.LayoutParams.MATCH_PARENT;
|
|
264
|
+
params.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
|
265
|
+
popupDialog.getWindow().setAttributes((WindowManager.LayoutParams) params);
|
|
266
|
+
popupDialog.setOnDismissListener(dialog -> {
|
|
267
|
+
// Toast.makeText(view.getContext(), "팝업취소", Toast.LENGTH_SHORT).show();
|
|
268
|
+
onCloseWindow(view); //rn에선 딱히 동작하지 않음
|
|
269
|
+
});
|
|
270
|
+
newWebView.setDialog(popupDialog);
|
|
271
|
+
popupDialog.show();
|
|
272
|
+
|
|
273
|
+
final WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
|
|
274
|
+
transport.setWebView(newWebView);
|
|
275
|
+
resultMsg.sendToTarget();
|
|
276
|
+
|
|
277
|
+
return true;
|
|
278
|
+
|
|
279
|
+
} else {
|
|
280
|
+
final WebView newWebView = new WebView(view.getContext());
|
|
281
|
+
final WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
|
|
282
|
+
transport.setWebView(newWebView);
|
|
283
|
+
resultMsg.sendToTarget();
|
|
284
|
+
|
|
285
|
+
return true;
|
|
286
|
+
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
*/
|
|
290
|
+
|
|
212
291
|
|
|
213
|
-
return true;
|
|
214
292
|
|
|
215
|
-
/*
|
|
216
|
-
final WebView newWebView = new WebView(view.getContext());
|
|
217
|
-
final WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
|
|
218
|
-
transport.setWebView(newWebView);
|
|
219
|
-
resultMsg.sendToTarget();
|
|
220
293
|
|
|
221
|
-
return true;
|
|
222
|
-
*/
|
|
223
294
|
}
|
|
224
295
|
|
|
225
296
|
@Override
|
|
@@ -889,7 +889,8 @@ public class BPCWebViewManager extends SimpleViewManager<WebView> {
|
|
|
889
889
|
mReactContext.removeLifecycleEventListener(this);
|
|
890
890
|
}
|
|
891
891
|
};
|
|
892
|
-
|
|
892
|
+
|
|
893
|
+
// bootpay added //
|
|
893
894
|
webView.setWebChromeClient(mWebChromeClient);
|
|
894
895
|
} else {
|
|
895
896
|
if (mWebChromeClient != null) {
|
package/apple/BPCWebView.m
CHANGED
|
@@ -317,16 +317,28 @@ RCTAutoInsetsProtocol>
|
|
|
317
317
|
[webView loadRequest:navigationAction.request];
|
|
318
318
|
}
|
|
319
319
|
return nil;
|
|
320
|
-
*/
|
|
321
|
-
|
|
320
|
+
*/
|
|
321
|
+
NSString *url = navigationAction.request.URL.absoluteString;
|
|
322
322
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
323
|
+
if (!navigationAction.targetFrame.isMainFrame) {
|
|
324
|
+
|
|
325
|
+
if ([url hasPrefix:@"https://gw.bootpay.co.kr"] || [url hasPrefix:@"http://gw.bootpay.co.kr"]) {
|
|
326
|
+
// 팝업(새 창) 뜨는 경우 호출됨 (window.open 또는 target="_blank")
|
|
327
|
+
WKWebView *popupView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height) configuration:configuration];
|
|
328
|
+
|
|
329
|
+
[popupView autoresizingMask];
|
|
330
|
+
popupView.navigationDelegate = self;
|
|
331
|
+
popupView.UIDelegate = self;
|
|
326
332
|
|
|
327
|
-
|
|
333
|
+
[self addSubview:popupView];
|
|
328
334
|
|
|
329
|
-
|
|
335
|
+
return popupView;
|
|
336
|
+
} else {
|
|
337
|
+
[webView loadRequest:navigationAction.request];
|
|
338
|
+
return nil;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return nil;
|
|
330
342
|
}
|
|
331
343
|
|
|
332
344
|
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
|
11
11
|
],
|
|
12
12
|
"license": "MIT",
|
|
13
|
-
"version": "11.26.
|
|
13
|
+
"version": "11.26.19",
|
|
14
14
|
"homepage": "https://github.com/bootpay/react-native-webview-bootpay",
|
|
15
15
|
"scripts": {
|
|
16
16
|
"android": "react-native run-android",
|