react-native-webview-bootpay 11.26.20 → 13.6.0
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/README.md +9 -31
- package/android/build.gradle +70 -112
- package/android/gradle.properties +5 -6
- package/android/src/main/java/kr/co/bootpay/webview/BPCBasicAuthCredential.java +11 -0
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebChromeClient.java +354 -434
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebView.java +350 -259
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewClient.java +253 -399
- package/android/src/main/java/kr/co/bootpay/webview/{WebViewConfig.java → BPCWebViewConfig.java} +3 -4
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewFileProvider.java +1 -1
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewManager.java +290 -877
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewManagerImpl.kt +664 -0
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewModule.java +29 -520
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewModuleImpl.java +554 -0
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewPackage.java +56 -0
- package/android/src/main/java/kr/co/bootpay/webview/BootpayUrlHelper.java +122 -0
- package/android/src/main/java/kr/co/bootpay/webview/events/TopCustomMenuSelectionEvent.kt +24 -0
- package/android/src/main/java/kr/co/bootpay/webview/events/TopNewWindowEvent.kt +25 -0
- package/android/src/newarch/com/reactnativecommunity/webview/BPCWebViewManager.java +544 -0
- package/android/src/newarch/com/reactnativecommunity/webview/BPCWebViewModule.java +57 -0
- package/apple/BPCWebView.h +22 -126
- package/apple/BPCWebView.mm +528 -0
- package/apple/BPCWebViewDecisionManager.h +20 -0
- package/apple/BPCWebViewDecisionManager.m +47 -0
- package/apple/BPCWebViewImpl.h +150 -0
- package/apple/{BPCWebView.m → BPCWebViewImpl.m} +381 -214
- package/apple/BPCWebViewManager.h +4 -8
- package/apple/{BPCWebViewManager.m → BPCWebViewManager.mm} +93 -149
- package/{android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream → ios/.DS_Store} +0 -0
- package/ios/{BPCWebView.xcodeproj → RNCWebView.xcodeproj}/project.pbxproj +18 -18
- package/ios/main.jsbundle +457 -0
- package/lib/BPCWebViewNativeComponent.d.ts +242 -0
- package/lib/BPCWebViewNativeComponent.d.ts.map +1 -0
- package/lib/BPCWebViewNativeComponent.js +6 -0
- package/lib/NativeBPCWebView.d.ts +10 -0
- package/lib/NativeBPCWebView.d.ts.map +1 -0
- package/lib/NativeBPCWebView.js +2 -0
- package/lib/NativeRNCWebView.d.ts +10 -0
- package/lib/NativeRNCWebView.d.ts.map +1 -0
- package/lib/NativeRNCWebView.js +2 -0
- package/lib/RNCWebViewNativeComponent.d.ts +242 -0
- package/lib/RNCWebViewNativeComponent.d.ts.map +1 -0
- package/lib/RNCWebViewNativeComponent.js +6 -0
- package/lib/WebView.android.d.ts.map +1 -1
- package/lib/WebView.android.js +53 -29
- package/lib/WebView.ios.d.ts.map +1 -1
- package/lib/WebView.ios.js +49 -28
- package/lib/WebView.macos.d.ts.map +1 -1
- package/lib/WebView.macos.js +10 -14
- package/lib/WebView.windows.d.ts.map +1 -1
- package/lib/WebView.windows.js +4 -6
- package/lib/WebViewNativeComponent.macos.d.ts +2 -2
- package/lib/WebViewNativeComponent.macos.js +2 -2
- package/lib/WebViewShared.d.ts +4 -2
- package/lib/WebViewShared.d.ts.map +1 -1
- package/lib/WebViewShared.js +8 -2
- package/lib/WebViewTypes.d.ts +62 -95
- package/lib/WebViewTypes.d.ts.map +1 -1
- package/lib/WebViewTypes.js +0 -16
- package/macos/RNCWebView.xcodeproj/project.pbxproj +44 -44
- package/package.json +38 -20
- package/react-native-webview-bootpay.podspec +22 -3
- package/react-native.config.js +1 -2
- package/src/BPCWebViewNativeComponent.ts +281 -0
- package/src/NativeBPCWebView.ts +14 -0
- package/src/WebView.android.tsx +229 -0
- package/src/WebView.ios.tsx +232 -0
- package/src/WebView.macos.tsx +177 -0
- package/src/WebView.styles.ts +44 -0
- package/src/WebView.tsx +18 -0
- package/src/WebView.windows.tsx +156 -0
- package/src/WebViewNativeComponent.macos.ts +8 -0
- package/src/WebViewNativeComponent.windows.ts +10 -0
- package/src/WebViewShared.tsx +235 -0
- package/src/WebViewTypes.ts +1287 -0
- package/src/__tests__/WebViewShared-test.js +208 -0
- package/src/__tests__/__snapshots__/WebViewShared-test.js.snap +8 -0
- package/src/index.ts +4 -0
- package/windows/.gitignore +353 -0
- package/windows/ReactNativeWebView/ReactNativeWebView.vcxproj +1 -1
- package/windows/ReactNativeWebView/ReactWebView.idl +1 -0
- package/windows/ReactNativeWebView/ReactWebView2.cpp +142 -19
- package/windows/ReactNativeWebView/ReactWebView2.h +3 -0
- package/windows/ReactNativeWebView/ReactWebView2Manager.cpp +29 -5
- package/windows/ReactNativeWebView/pch.h +1 -0
- package/android/.editorconfig +0 -6
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/results.bin +0 -1
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebChromeClient$1.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebChromeClient.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView$1.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView$BPCWebViewBridge.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView$ProgressChangedFilter.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewClient.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewFileProvider.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$1.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$2.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$3.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$4.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$1.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$2.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$MimeType.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewPackage.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BasicAuthCredential.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BuildConfig.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/URLUtil.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/WebViewConfig.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopMessageEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopMessageEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent$Companion.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent.dex +0 -0
- package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/desugar_graph.bin +0 -0
- package/android/build/.transforms/88c49d67076e4458a9ddee82f875eb6a/results.bin +0 -1
- package/android/build/.transforms/88c49d67076e4458a9ddee82f875eb6a/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/c0e86b44db04fcaf424a5b7ce79324f4/results.bin +0 -1
- package/android/build/generated/source/buildConfig/debug/kr/co/bootpay/webview/BuildConfig.java +0 -10
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +0 -106
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +0 -18
- package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +0 -4
- package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +0 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -1861
- package/android/build/intermediates/compiled_local_resources/debug/out/xml_file_provider_paths.xml.flat +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -2
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
- 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/BPCWebView$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$BPCWebViewBridge.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$ProgressChangedFilter.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewClient.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewFileProvider.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$3.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/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$MimeType.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BasicAuthCredential.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/URLUtil.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/WebViewConfig.class +0 -0
- package/android/build/intermediates/library_java_res/debug/res.jar +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +0 -3
- package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -210
- package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +0 -106
- package/android/build/intermediates/navigation_json/debug/navigation.json +0 -1
- package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +0 -18
- package/android/build/intermediates/packaged_res/debug/xml/file_provider_paths.xml +0 -6
- package/android/build/intermediates/runtime_library_classes_dir/debug/META-INF/react-native-webview-bootpay_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebChromeClient$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebChromeClient.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView$BPCWebViewBridge.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView$ProgressChangedFilter.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewClient.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewFileProvider.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$4.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$MimeType.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BasicAuthCredential.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/URLUtil.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/WebViewConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopMessageEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopMessageEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -1381
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +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-attributes.tab_i.len +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/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +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/java-sources-proto-map.tab_i.len +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.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +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/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +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/source-to-classes.tab_i.len +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/subtypes.tab_i.len +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/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +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/outputs/logs/manifest-merger-debug-report.txt +0 -229
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-webview-bootpay_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/BPCWebViewPackage.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopMessageEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopMessageEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent.class +0 -0
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewPackage.kt +0 -15
- package/android/src/main/java/kr/co/bootpay/webview/BasicAuthCredential.java +0 -11
- package/ios/BPCWebView.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/BPCWebView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/BPCWebView.xcodeproj/project.xcworkspace/xcuserdata/ehowlsla.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/BPCWebView.xcodeproj/xcuserdata/ehowlsla.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/lib/WebViewNativeComponent.android.d.ts +0 -4
- package/lib/WebViewNativeComponent.android.d.ts.map +0 -1
- package/lib/WebViewNativeComponent.android.js +0 -3
- package/lib/WebViewNativeComponent.ios.d.ts +0 -4
- package/lib/WebViewNativeComponent.ios.d.ts.map +0 -1
- package/lib/WebViewNativeComponent.ios.js +0 -3
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { Linking } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
defaultOriginWhitelist,
|
|
5
|
+
createOnShouldStartLoadWithRequest,
|
|
6
|
+
} from '../WebViewShared';
|
|
7
|
+
|
|
8
|
+
Linking.openURL.mockResolvedValue(undefined);
|
|
9
|
+
Linking.canOpenURL.mockResolvedValue(true);
|
|
10
|
+
|
|
11
|
+
// The tests that call createOnShouldStartLoadWithRequest will cause a promise
|
|
12
|
+
// to get kicked off (by calling the mocked `Linking.canOpenURL`) that the tests
|
|
13
|
+
// _need_ to get run to completion _before_ doing any `expect`ing. The reason
|
|
14
|
+
// is: once that promise is resolved another function should get run which will
|
|
15
|
+
// call `Linking.openURL`, and we want to test that.
|
|
16
|
+
//
|
|
17
|
+
// Normally we would probably do something like `await
|
|
18
|
+
// createShouldStartLoadWithRequest(...)` in the tests, but that doesn't work
|
|
19
|
+
// here because the promise that gets kicked off is not returned (because
|
|
20
|
+
// non-test code doesn't need to know about it).
|
|
21
|
+
//
|
|
22
|
+
// The tests thus need a way to "flush any pending promises" (to make sure
|
|
23
|
+
// pending promises run to completion) before doing any `expect`ing. `jest`
|
|
24
|
+
// doesn't provide a way to do this out of the box, but we can use this function
|
|
25
|
+
// to do it.
|
|
26
|
+
//
|
|
27
|
+
// See this issue for more discussion: https://github.com/facebook/jest/issues/2157
|
|
28
|
+
function flushPromises() {
|
|
29
|
+
return new Promise(resolve => setImmediate(resolve));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
describe('WebViewShared', () => {
|
|
34
|
+
test('exports defaultOriginWhitelist', () => {
|
|
35
|
+
expect(defaultOriginWhitelist).toMatchSnapshot();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
describe('createOnShouldStartLoadWithRequest', () => {
|
|
39
|
+
const alwaysTrueOnShouldStartLoadWithRequest = (nativeEvent) => {
|
|
40
|
+
return true;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const alwaysFalseOnShouldStartLoadWithRequest = (nativeEvent) => {
|
|
44
|
+
return false;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const loadRequest = jest.fn();
|
|
48
|
+
|
|
49
|
+
test('loadRequest is called without onShouldStartLoadWithRequest override', async () => {
|
|
50
|
+
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
51
|
+
loadRequest,
|
|
52
|
+
defaultOriginWhitelist,
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'https://www.example.com/', lockIdentifier: 1 } });
|
|
56
|
+
|
|
57
|
+
await flushPromises();
|
|
58
|
+
|
|
59
|
+
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
60
|
+
expect(loadRequest).toHaveBeenCalledWith(true, 'https://www.example.com/', 1);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test('Linking.openURL is called without onShouldStartLoadWithRequest override', async () => {
|
|
64
|
+
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
65
|
+
loadRequest,
|
|
66
|
+
defaultOriginWhitelist,
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'invalid://example.com/', lockIdentifier: 2 } });
|
|
70
|
+
|
|
71
|
+
await flushPromises();
|
|
72
|
+
|
|
73
|
+
expect(Linking.openURL).toHaveBeenCalledWith('invalid://example.com/');
|
|
74
|
+
expect(loadRequest).toHaveBeenCalledWith(false, 'invalid://example.com/', 2);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test('loadRequest with true onShouldStartLoadWithRequest override is called', async () => {
|
|
78
|
+
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
79
|
+
loadRequest,
|
|
80
|
+
defaultOriginWhitelist,
|
|
81
|
+
alwaysTrueOnShouldStartLoadWithRequest,
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'https://www.example.com/', lockIdentifier: 1 } });
|
|
85
|
+
|
|
86
|
+
await flushPromises();
|
|
87
|
+
|
|
88
|
+
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
89
|
+
expect(loadRequest).toHaveBeenLastCalledWith(true, 'https://www.example.com/', 1);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
test('Linking.openURL with true onShouldStartLoadWithRequest override is called for links not passing the whitelist', async () => {
|
|
93
|
+
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
94
|
+
loadRequest,
|
|
95
|
+
defaultOriginWhitelist,
|
|
96
|
+
alwaysTrueOnShouldStartLoadWithRequest,
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
var a = 10;
|
|
100
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'invalid://example.com/', lockIdentifier: 1 } });
|
|
101
|
+
|
|
102
|
+
await flushPromises();
|
|
103
|
+
|
|
104
|
+
expect(Linking.openURL).toHaveBeenLastCalledWith('invalid://example.com/');
|
|
105
|
+
// We don't expect the URL to have been loaded in the WebView because it
|
|
106
|
+
// is not in the origin whitelist
|
|
107
|
+
expect(loadRequest).toHaveBeenLastCalledWith(false, 'invalid://example.com/', 1);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
test('loadRequest with false onShouldStartLoadWithRequest override is called', async () => {
|
|
111
|
+
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
112
|
+
loadRequest,
|
|
113
|
+
defaultOriginWhitelist,
|
|
114
|
+
alwaysFalseOnShouldStartLoadWithRequest,
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'https://www.example.com/', lockIdentifier: 1 } });
|
|
118
|
+
|
|
119
|
+
await flushPromises();
|
|
120
|
+
|
|
121
|
+
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
122
|
+
expect(loadRequest).toHaveBeenLastCalledWith(false, 'https://www.example.com/', 1);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
test('loadRequest with limited whitelist', async () => {
|
|
126
|
+
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
127
|
+
loadRequest,
|
|
128
|
+
['https://*'],
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'https://www.example.com/', lockIdentifier: 1 } });
|
|
132
|
+
|
|
133
|
+
await flushPromises();
|
|
134
|
+
|
|
135
|
+
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
136
|
+
expect(loadRequest).toHaveBeenLastCalledWith(true, 'https://www.example.com/', 1);
|
|
137
|
+
|
|
138
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'http://insecure.com/', lockIdentifier: 2 } });
|
|
139
|
+
|
|
140
|
+
await flushPromises();
|
|
141
|
+
|
|
142
|
+
expect(Linking.openURL).toHaveBeenLastCalledWith('http://insecure.com/');
|
|
143
|
+
expect(loadRequest).toHaveBeenLastCalledWith(false, 'http://insecure.com/', 2);
|
|
144
|
+
|
|
145
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'git+https://insecure.com/', lockIdentifier: 3 } });
|
|
146
|
+
|
|
147
|
+
await flushPromises();
|
|
148
|
+
|
|
149
|
+
expect(Linking.openURL).toHaveBeenLastCalledWith('git+https://insecure.com/');
|
|
150
|
+
expect(loadRequest).toHaveBeenLastCalledWith(false, 'git+https://insecure.com/', 3);
|
|
151
|
+
|
|
152
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'fakehttps://insecure.com/', lockIdentifier: 4 } });
|
|
153
|
+
|
|
154
|
+
await flushPromises();
|
|
155
|
+
|
|
156
|
+
expect(Linking.openURL).toHaveBeenLastCalledWith('fakehttps://insecure.com/');
|
|
157
|
+
expect(loadRequest).toHaveBeenLastCalledWith(false, 'fakehttps://insecure.com/', 4);
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
test('loadRequest allows for valid URIs', async () => {
|
|
161
|
+
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
162
|
+
loadRequest,
|
|
163
|
+
['plus+https://*', 'DOT.https://*', 'dash-https://*', '0invalid://*', '+invalid://*'],
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'plus+https://www.example.com/', lockIdentifier: 1 } });
|
|
167
|
+
|
|
168
|
+
await flushPromises();
|
|
169
|
+
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
170
|
+
expect(loadRequest).toHaveBeenLastCalledWith(true, 'plus+https://www.example.com/', 1);
|
|
171
|
+
|
|
172
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'DOT.https://www.example.com/', lockIdentifier: 2 } });
|
|
173
|
+
|
|
174
|
+
await flushPromises();
|
|
175
|
+
|
|
176
|
+
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
177
|
+
expect(loadRequest).toHaveBeenLastCalledWith(true, 'DOT.https://www.example.com/', 2);
|
|
178
|
+
|
|
179
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'dash-https://www.example.com/', lockIdentifier: 3 } });
|
|
180
|
+
|
|
181
|
+
await flushPromises();
|
|
182
|
+
|
|
183
|
+
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
184
|
+
expect(loadRequest).toHaveBeenLastCalledWith(true, 'dash-https://www.example.com/', 3);
|
|
185
|
+
|
|
186
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: '0invalid://www.example.com/', lockIdentifier: 4 } });
|
|
187
|
+
|
|
188
|
+
await flushPromises();
|
|
189
|
+
|
|
190
|
+
expect(Linking.openURL).toHaveBeenLastCalledWith('0invalid://www.example.com/');
|
|
191
|
+
expect(loadRequest).toHaveBeenLastCalledWith(false, '0invalid://www.example.com/', 4);
|
|
192
|
+
|
|
193
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: '+invalid://www.example.com/', lockIdentifier: 5 } });
|
|
194
|
+
|
|
195
|
+
await flushPromises();
|
|
196
|
+
|
|
197
|
+
expect(Linking.openURL).toHaveBeenLastCalledWith('+invalid://www.example.com/');
|
|
198
|
+
expect(loadRequest).toHaveBeenLastCalledWith(false, '+invalid://www.example.com/', 5);
|
|
199
|
+
|
|
200
|
+
onShouldStartLoadWithRequest({ nativeEvent: { url: 'FAKE+plus+https://www.example.com/', lockIdentifier: 6 } });
|
|
201
|
+
|
|
202
|
+
await flushPromises();
|
|
203
|
+
|
|
204
|
+
expect(Linking.openURL).toHaveBeenLastCalledWith('FAKE+plus+https://www.example.com/');
|
|
205
|
+
expect(loadRequest).toHaveBeenLastCalledWith(false, 'FAKE+plus+https://www.example.com/', 6);
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
});
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
## Ignore Visual Studio temporary files, build results, and
|
|
2
|
+
## files generated by popular Visual Studio add-ons.
|
|
3
|
+
##
|
|
4
|
+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
|
5
|
+
|
|
6
|
+
# User-specific files
|
|
7
|
+
*.rsuser
|
|
8
|
+
*.suo
|
|
9
|
+
*.user
|
|
10
|
+
*.userosscache
|
|
11
|
+
*.sln.docstates
|
|
12
|
+
|
|
13
|
+
# User-specific files (MonoDevelop/Xamarin Studio)
|
|
14
|
+
*.userprefs
|
|
15
|
+
|
|
16
|
+
# Mono auto generated files
|
|
17
|
+
mono_crash.*
|
|
18
|
+
|
|
19
|
+
# Build results
|
|
20
|
+
[Dd]ebug/
|
|
21
|
+
[Dd]ebugPublic/
|
|
22
|
+
[Rr]elease/
|
|
23
|
+
[Rr]eleases/
|
|
24
|
+
x64/
|
|
25
|
+
x86/
|
|
26
|
+
[Aa][Rr][Mm]/
|
|
27
|
+
[Aa][Rr][Mm]64/
|
|
28
|
+
bld/
|
|
29
|
+
[Bb]in/
|
|
30
|
+
[Oo]bj/
|
|
31
|
+
[Ll]og/
|
|
32
|
+
[Ll]ogs/
|
|
33
|
+
|
|
34
|
+
# Visual Studio 2015/2017 cache/options directory
|
|
35
|
+
.vs/
|
|
36
|
+
# Uncomment if you have tasks that create the project's static files in wwwroot
|
|
37
|
+
#wwwroot/
|
|
38
|
+
|
|
39
|
+
# Visual Studio 2017 auto generated files
|
|
40
|
+
Generated\ Files/
|
|
41
|
+
|
|
42
|
+
# MSTest test Results
|
|
43
|
+
[Tt]est[Rr]esult*/
|
|
44
|
+
[Bb]uild[Ll]og.*
|
|
45
|
+
|
|
46
|
+
# NUnit
|
|
47
|
+
*.VisualState.xml
|
|
48
|
+
TestResult.xml
|
|
49
|
+
nunit-*.xml
|
|
50
|
+
|
|
51
|
+
# Build Results of an ATL Project
|
|
52
|
+
[Dd]ebugPS/
|
|
53
|
+
[Rr]eleasePS/
|
|
54
|
+
dlldata.c
|
|
55
|
+
|
|
56
|
+
# Benchmark Results
|
|
57
|
+
BenchmarkDotNet.Artifacts/
|
|
58
|
+
|
|
59
|
+
# .NET Core
|
|
60
|
+
project.lock.json
|
|
61
|
+
project.fragment.lock.json
|
|
62
|
+
artifacts/
|
|
63
|
+
|
|
64
|
+
# StyleCop
|
|
65
|
+
StyleCopReport.xml
|
|
66
|
+
|
|
67
|
+
# Files built by Visual Studio
|
|
68
|
+
*_i.c
|
|
69
|
+
*_p.c
|
|
70
|
+
*_h.h
|
|
71
|
+
*.ilk
|
|
72
|
+
*.meta
|
|
73
|
+
*.obj
|
|
74
|
+
*.iobj
|
|
75
|
+
*.pch
|
|
76
|
+
*.pdb
|
|
77
|
+
*.ipdb
|
|
78
|
+
*.pgc
|
|
79
|
+
*.pgd
|
|
80
|
+
*.rsp
|
|
81
|
+
*.sbr
|
|
82
|
+
*.tlb
|
|
83
|
+
*.tli
|
|
84
|
+
*.tlh
|
|
85
|
+
*.tmp
|
|
86
|
+
*.tmp_proj
|
|
87
|
+
*_wpftmp.csproj
|
|
88
|
+
*.log
|
|
89
|
+
*.vspscc
|
|
90
|
+
*.vssscc
|
|
91
|
+
.builds
|
|
92
|
+
*.pidb
|
|
93
|
+
*.svclog
|
|
94
|
+
*.scc
|
|
95
|
+
|
|
96
|
+
# Chutzpah Test files
|
|
97
|
+
_Chutzpah*
|
|
98
|
+
|
|
99
|
+
# Visual C++ cache files
|
|
100
|
+
ipch/
|
|
101
|
+
*.aps
|
|
102
|
+
*.ncb
|
|
103
|
+
*.opendb
|
|
104
|
+
*.opensdf
|
|
105
|
+
*.sdf
|
|
106
|
+
*.cachefile
|
|
107
|
+
*.VC.db
|
|
108
|
+
*.VC.VC.opendb
|
|
109
|
+
|
|
110
|
+
# Visual Studio profiler
|
|
111
|
+
*.psess
|
|
112
|
+
*.vsp
|
|
113
|
+
*.vspx
|
|
114
|
+
*.sap
|
|
115
|
+
|
|
116
|
+
# Visual Studio Trace Files
|
|
117
|
+
*.e2e
|
|
118
|
+
|
|
119
|
+
# TFS 2012 Local Workspace
|
|
120
|
+
$tf/
|
|
121
|
+
|
|
122
|
+
# Guidance Automation Toolkit
|
|
123
|
+
*.gpState
|
|
124
|
+
|
|
125
|
+
# ReSharper is a .NET coding add-in
|
|
126
|
+
_ReSharper*/
|
|
127
|
+
*.[Rr]e[Ss]harper
|
|
128
|
+
*.DotSettings.user
|
|
129
|
+
|
|
130
|
+
# TeamCity is a build add-in
|
|
131
|
+
_TeamCity*
|
|
132
|
+
|
|
133
|
+
# DotCover is a Code Coverage Tool
|
|
134
|
+
*.dotCover
|
|
135
|
+
|
|
136
|
+
# AxoCover is a Code Coverage Tool
|
|
137
|
+
.axoCover/*
|
|
138
|
+
!.axoCover/settings.json
|
|
139
|
+
|
|
140
|
+
# Coverlet is a free, cross platform Code Coverage Tool
|
|
141
|
+
coverage*[.json, .xml, .info]
|
|
142
|
+
|
|
143
|
+
# Visual Studio code coverage results
|
|
144
|
+
*.coverage
|
|
145
|
+
*.coveragexml
|
|
146
|
+
|
|
147
|
+
# NCrunch
|
|
148
|
+
_NCrunch_*
|
|
149
|
+
.*crunch*.local.xml
|
|
150
|
+
nCrunchTemp_*
|
|
151
|
+
|
|
152
|
+
# MightyMoose
|
|
153
|
+
*.mm.*
|
|
154
|
+
AutoTest.Net/
|
|
155
|
+
|
|
156
|
+
# Web workbench (sass)
|
|
157
|
+
.sass-cache/
|
|
158
|
+
|
|
159
|
+
# Installshield output folder
|
|
160
|
+
[Ee]xpress/
|
|
161
|
+
|
|
162
|
+
# DocProject is a documentation generator add-in
|
|
163
|
+
DocProject/buildhelp/
|
|
164
|
+
DocProject/Help/*.HxT
|
|
165
|
+
DocProject/Help/*.HxC
|
|
166
|
+
DocProject/Help/*.hhc
|
|
167
|
+
DocProject/Help/*.hhk
|
|
168
|
+
DocProject/Help/*.hhp
|
|
169
|
+
DocProject/Help/Html2
|
|
170
|
+
DocProject/Help/html
|
|
171
|
+
|
|
172
|
+
# Click-Once directory
|
|
173
|
+
publish/
|
|
174
|
+
|
|
175
|
+
# Publish Web Output
|
|
176
|
+
*.[Pp]ublish.xml
|
|
177
|
+
*.azurePubxml
|
|
178
|
+
# Note: Comment the next line if you want to checkin your web deploy settings,
|
|
179
|
+
# but database connection strings (with potential passwords) will be unencrypted
|
|
180
|
+
*.pubxml
|
|
181
|
+
*.publishproj
|
|
182
|
+
|
|
183
|
+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
|
184
|
+
# checkin your Azure Web App publish settings, but sensitive information contained
|
|
185
|
+
# in these scripts will be unencrypted
|
|
186
|
+
PublishScripts/
|
|
187
|
+
|
|
188
|
+
# NuGet Packages
|
|
189
|
+
*.nupkg
|
|
190
|
+
# NuGet Symbol Packages
|
|
191
|
+
*.snupkg
|
|
192
|
+
# The packages folder can be ignored because of Package Restore
|
|
193
|
+
**/[Pp]ackages/*
|
|
194
|
+
# except build/, which is used as an MSBuild target.
|
|
195
|
+
!**/[Pp]ackages/build/
|
|
196
|
+
# Uncomment if necessary however generally it will be regenerated when needed
|
|
197
|
+
#!**/[Pp]ackages/repositories.config
|
|
198
|
+
# NuGet v3's project.json files produces more ignorable files
|
|
199
|
+
*.nuget.props
|
|
200
|
+
*.nuget.targets
|
|
201
|
+
|
|
202
|
+
# Microsoft Azure Build Output
|
|
203
|
+
csx/
|
|
204
|
+
*.build.csdef
|
|
205
|
+
|
|
206
|
+
# Microsoft Azure Emulator
|
|
207
|
+
ecf/
|
|
208
|
+
rcf/
|
|
209
|
+
|
|
210
|
+
# Windows Store app package directories and files
|
|
211
|
+
AppPackages/
|
|
212
|
+
BundleArtifacts/
|
|
213
|
+
Package.StoreAssociation.xml
|
|
214
|
+
_pkginfo.txt
|
|
215
|
+
*.appx
|
|
216
|
+
*.appxbundle
|
|
217
|
+
*.appxupload
|
|
218
|
+
|
|
219
|
+
# Visual Studio cache files
|
|
220
|
+
# files ending in .cache can be ignored
|
|
221
|
+
*.[Cc]ache
|
|
222
|
+
# but keep track of directories ending in .cache
|
|
223
|
+
!?*.[Cc]ache/
|
|
224
|
+
|
|
225
|
+
# Others
|
|
226
|
+
ClientBin/
|
|
227
|
+
~$*
|
|
228
|
+
*~
|
|
229
|
+
*.dbmdl
|
|
230
|
+
*.dbproj.schemaview
|
|
231
|
+
*.jfm
|
|
232
|
+
*.pfx
|
|
233
|
+
*.publishsettings
|
|
234
|
+
orleans.codegen.cs
|
|
235
|
+
|
|
236
|
+
# Including strong name files can present a security risk
|
|
237
|
+
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
|
238
|
+
#*.snk
|
|
239
|
+
|
|
240
|
+
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
|
241
|
+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
|
242
|
+
#bower_components/
|
|
243
|
+
|
|
244
|
+
# RIA/Silverlight projects
|
|
245
|
+
Generated_Code/
|
|
246
|
+
|
|
247
|
+
# Backup & report files from converting an old project file
|
|
248
|
+
# to a newer Visual Studio version. Backup files are not needed,
|
|
249
|
+
# because we have git ;-)
|
|
250
|
+
_UpgradeReport_Files/
|
|
251
|
+
Backup*/
|
|
252
|
+
UpgradeLog*.XML
|
|
253
|
+
UpgradeLog*.htm
|
|
254
|
+
ServiceFabricBackup/
|
|
255
|
+
*.rptproj.bak
|
|
256
|
+
|
|
257
|
+
# SQL Server files
|
|
258
|
+
*.mdf
|
|
259
|
+
*.ldf
|
|
260
|
+
*.ndf
|
|
261
|
+
|
|
262
|
+
# Business Intelligence projects
|
|
263
|
+
*.rdl.data
|
|
264
|
+
*.bim.layout
|
|
265
|
+
*.bim_*.settings
|
|
266
|
+
*.rptproj.rsuser
|
|
267
|
+
*- [Bb]ackup.rdl
|
|
268
|
+
*- [Bb]ackup ([0-9]).rdl
|
|
269
|
+
*- [Bb]ackup ([0-9][0-9]).rdl
|
|
270
|
+
|
|
271
|
+
# Microsoft Fakes
|
|
272
|
+
FakesAssemblies/
|
|
273
|
+
|
|
274
|
+
# GhostDoc plugin setting file
|
|
275
|
+
*.GhostDoc.xml
|
|
276
|
+
|
|
277
|
+
# Node.js Tools for Visual Studio
|
|
278
|
+
.ntvs_analysis.dat
|
|
279
|
+
node_modules/
|
|
280
|
+
|
|
281
|
+
# Visual Studio 6 build log
|
|
282
|
+
*.plg
|
|
283
|
+
|
|
284
|
+
# Visual Studio 6 workspace options file
|
|
285
|
+
*.opt
|
|
286
|
+
|
|
287
|
+
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
|
288
|
+
*.vbw
|
|
289
|
+
|
|
290
|
+
# Visual Studio LightSwitch build output
|
|
291
|
+
**/*.HTMLClient/GeneratedArtifacts
|
|
292
|
+
**/*.DesktopClient/GeneratedArtifacts
|
|
293
|
+
**/*.DesktopClient/ModelManifest.xml
|
|
294
|
+
**/*.Server/GeneratedArtifacts
|
|
295
|
+
**/*.Server/ModelManifest.xml
|
|
296
|
+
_Pvt_Extensions
|
|
297
|
+
|
|
298
|
+
# Paket dependency manager
|
|
299
|
+
.paket/paket.exe
|
|
300
|
+
paket-files/
|
|
301
|
+
|
|
302
|
+
# FAKE - F# Make
|
|
303
|
+
.fake/
|
|
304
|
+
|
|
305
|
+
# CodeRush personal settings
|
|
306
|
+
.cr/personal
|
|
307
|
+
|
|
308
|
+
# Python Tools for Visual Studio (PTVS)
|
|
309
|
+
__pycache__/
|
|
310
|
+
*.pyc
|
|
311
|
+
|
|
312
|
+
# Cake - Uncomment if you are using it
|
|
313
|
+
# tools/**
|
|
314
|
+
# !tools/packages.config
|
|
315
|
+
|
|
316
|
+
# Tabs Studio
|
|
317
|
+
*.tss
|
|
318
|
+
|
|
319
|
+
# Telerik's JustMock configuration file
|
|
320
|
+
*.jmconfig
|
|
321
|
+
|
|
322
|
+
# BizTalk build output
|
|
323
|
+
*.btp.cs
|
|
324
|
+
*.btm.cs
|
|
325
|
+
*.odx.cs
|
|
326
|
+
*.xsd.cs
|
|
327
|
+
|
|
328
|
+
# OpenCover UI analysis results
|
|
329
|
+
OpenCover/
|
|
330
|
+
|
|
331
|
+
# Azure Stream Analytics local run output
|
|
332
|
+
ASALocalRun/
|
|
333
|
+
|
|
334
|
+
# MSBuild Binary and Structured Log
|
|
335
|
+
*.binlog
|
|
336
|
+
|
|
337
|
+
# NVidia Nsight GPU debugger configuration file
|
|
338
|
+
*.nvuser
|
|
339
|
+
|
|
340
|
+
# MFractors (Xamarin productivity tool) working folder
|
|
341
|
+
.mfractor/
|
|
342
|
+
|
|
343
|
+
# Local History for Visual Studio
|
|
344
|
+
.localhistory/
|
|
345
|
+
|
|
346
|
+
# BeatPulse healthcheck temp database
|
|
347
|
+
healthchecksdb
|
|
348
|
+
|
|
349
|
+
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
|
350
|
+
MigrationBackup/
|
|
351
|
+
|
|
352
|
+
# Ionide (cross platform F# VS Code tools) working folder
|
|
353
|
+
.ionide/
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<ApplicationType>Windows Store</ApplicationType>
|
|
16
16
|
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
|
17
17
|
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0</WindowsTargetPlatformVersion>
|
|
18
|
-
<WindowsTargetPlatformMinVersion>10.0.
|
|
18
|
+
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
21
21
|
<ItemGroup Label="ProjectConfigurations">
|
|
@@ -15,6 +15,7 @@ namespace ReactNativeWebView{
|
|
|
15
15
|
runtimeclass ReactWebView2 : Windows.UI.Xaml.Controls.ContentPresenter{
|
|
16
16
|
ReactWebView2(Microsoft.ReactNative.IReactContext context);
|
|
17
17
|
void NavigateToHtml(String html);
|
|
18
|
+
void NavigateWithHeaders(String uri, Windows.Foundation.Collections.IMapView<String, String> headers);
|
|
18
19
|
Boolean MessagingEnabled;
|
|
19
20
|
};
|
|
20
21
|
#endif
|