@exodus/react-native-webview 11.26.1-exodus.31 → 11.26.1-exodus.33
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/bd1c9282aaabf4a0d1b6bb39aff484a4/results.bin +1 -0
- package/android/build/.transforms/bd1c9282aaabf4a0d1b6bb39aff484a4/transformed/classes/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/com/reactnativecommunity/webview/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +27 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +4 -0
- package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +1 -0
- 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 +1861 -0
- 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 +2 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/BasicAuthCredential.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewFileProvider.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebChromeClient$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebChromeClient$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebChromeClient.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebView$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebView$ProgressChangedFilter.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebView$RNCWebViewBridge.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebView.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebViewClient.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewModule$MimeType.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewModule$ShouldOverrideUrlLoadingLock.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewModule.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewPackage.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewUtils$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewUtils.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/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 +3 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +46 -0
- package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +27 -0
- package/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
- package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +18 -0
- package/android/build/intermediates/packaged_res/debug/xml/file_provider_paths.xml +6 -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 +1381 -0
- 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/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 +2 -0
- 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 +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 +59 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-webview_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingErrorEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingErrorEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingFinishEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingFinishEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingProgressEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingProgressEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingStartEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingStartEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopMessageEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopMessageEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopOpenWindowEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopOpenWindowEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopShouldStartLoadWithRequestEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopShouldStartLoadWithRequestEvent.class +0 -0
- package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java +32 -7
- package/apple/RNCWebView.m +17 -0
- package/apple/RNCWebViewManager.m +1 -0
- package/lib/WebView.android.js +7 -8
- package/lib/WebView.ios.js +5 -3
- package/lib/WebViewShared.d.ts +1 -0
- package/lib/WebViewShared.js +4 -1
- package/lib/WebViewTypes.d.ts +5 -0
- package/lib/validation.d.ts +4 -0
- package/lib/validation.js +9 -0
- package/package.json +1 -1
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab
ADDED
|
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/constants.tab.len
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i
ADDED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len
ADDED
|
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.keystream
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len
ADDED
|
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/subtypes.tab.len
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i
ADDED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len
ADDED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i
ADDED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
-- Merging decision tree log ---
|
|
2
|
+
manifest
|
|
3
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:1:1-21:12
|
|
4
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:1:1-21:12
|
|
5
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:1:1-21:12
|
|
6
|
+
package
|
|
7
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:2:3-45
|
|
8
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
9
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
10
|
+
xmlns:android
|
|
11
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:1:11-69
|
|
12
|
+
uses-feature#android.hardware.camera.any
|
|
13
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:4:7-66
|
|
14
|
+
android:name
|
|
15
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:4:21-63
|
|
16
|
+
uses-permission#android.permission.ACCESS_NETWORK_STATE
|
|
17
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:6:5-79
|
|
18
|
+
android:name
|
|
19
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:6:22-76
|
|
20
|
+
uses-permission#android.permission.CAMERA
|
|
21
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:7:5-65
|
|
22
|
+
android:name
|
|
23
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:7:22-62
|
|
24
|
+
uses-permission#android.permission.INTERNET
|
|
25
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:8:5-67
|
|
26
|
+
android:name
|
|
27
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:8:22-64
|
|
28
|
+
application
|
|
29
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:10:3-20:17
|
|
30
|
+
provider#com.reactnativecommunity.webview.RNCWebViewFileProvider
|
|
31
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:11:5-19:16
|
|
32
|
+
android:grantUriPermissions
|
|
33
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:15:7-41
|
|
34
|
+
android:authorities
|
|
35
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:13:7-58
|
|
36
|
+
android:exported
|
|
37
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:14:7-31
|
|
38
|
+
android:name
|
|
39
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:12:7-45
|
|
40
|
+
meta-data#android.support.FILE_PROVIDER_PATHS
|
|
41
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:16:7-18:55
|
|
42
|
+
android:resource
|
|
43
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:18:9-52
|
|
44
|
+
android:name
|
|
45
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml:17:9-59
|
|
46
|
+
uses-sdk
|
|
47
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
|
|
48
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
49
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
50
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
51
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
52
|
+
android:targetSdkVersion
|
|
53
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
54
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
55
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
56
|
+
android:minSdkVersion
|
|
57
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
58
|
+
ADDED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
|
59
|
+
INJECTED from /Users/muhammadndako/Apps/Exodus/react-native-webview/android/src/main/AndroidManifest.xml
|
package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-webview_debug.kotlin_module
ADDED
|
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
|
|
@@ -166,13 +166,7 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
|
|
166
166
|
protected @Nullable String mDownloadingMessage = null;
|
|
167
167
|
protected @Nullable String mLackPermissionToDownloadMessage = null;
|
|
168
168
|
|
|
169
|
-
private static Set<String> cameraPermissionOriginWhitelist;
|
|
170
|
-
|
|
171
169
|
public RNCWebViewManager() {
|
|
172
|
-
cameraPermissionOriginWhitelist = new HashSet<>();
|
|
173
|
-
cameraPermissionOriginWhitelist.add("https://alchemy.veriff.com/");
|
|
174
|
-
cameraPermissionOriginWhitelist.add("https://magic.veriff.me/");
|
|
175
|
-
|
|
176
170
|
mWebViewConfig = new WebViewConfig() {
|
|
177
171
|
public void configWebView(WebView webView) {
|
|
178
172
|
}
|
|
@@ -232,6 +226,16 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
|
|
232
226
|
return mDownloadingMessage == null ? DEFAULT_LACK_PERMISSION_TO_DOWNLOAD_MESSAGE : mLackPermissionToDownloadMessage;
|
|
233
227
|
}
|
|
234
228
|
|
|
229
|
+
@ReactProp(name = "cameraPermissionWhitelist")
|
|
230
|
+
public void setCameraPermissionWhitelist(RNCWebView webView, ReadableArray whitelist) {
|
|
231
|
+
Set<String> whitelistSet = new HashSet<>();
|
|
232
|
+
for (int i = 0; i < whitelist.size(); i++) {
|
|
233
|
+
whitelistSet.add(whitelist.getString(i));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
mWebChromeClient.setCameraPermissionWhitelist(whitelistSet);
|
|
237
|
+
}
|
|
238
|
+
|
|
235
239
|
@ReactProp(name = "javaScriptEnabled")
|
|
236
240
|
public void setJavaScriptEnabled(WebView view, boolean enabled) {
|
|
237
241
|
view.getSettings().setJavaScriptEnabled(enabled);
|
|
@@ -445,6 +449,12 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
|
|
445
449
|
@ReactProp(name = "source")
|
|
446
450
|
public void setSource(WebView view, @Nullable ReadableMap source) {
|
|
447
451
|
if (source != null) {
|
|
452
|
+
if (source.hasKey("html")) {
|
|
453
|
+
String html = source.getString("html");
|
|
454
|
+
String baseUrl = source.hasKey("baseUrl") ? source.getString("baseUrl") : "";
|
|
455
|
+
view.loadDataWithBaseURL(baseUrl, html, HTML_MIME_TYPE, HTML_ENCODING, null);
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
448
458
|
if (source.hasKey("uri")) {
|
|
449
459
|
String url = source.getString("uri");
|
|
450
460
|
String previousUrl = view.getUrl();
|
|
@@ -992,12 +1002,17 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
|
|
992
1002
|
|
|
993
1003
|
// True if protected media should be allowed, false otherwise
|
|
994
1004
|
protected boolean mAllowsProtectedMedia = false;
|
|
1005
|
+
private Set<String> cameraPermissionWhitelist = new HashSet<>();
|
|
995
1006
|
|
|
996
1007
|
public RNCWebChromeClient(ReactContext reactContext, WebView webView) {
|
|
997
1008
|
this.mReactContext = reactContext;
|
|
998
1009
|
this.mWebView = webView;
|
|
999
1010
|
}
|
|
1000
1011
|
|
|
1012
|
+
public void setCameraPermissionWhitelist(Set<String> whitelist) {
|
|
1013
|
+
this.cameraPermissionWhitelist = whitelist;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1001
1016
|
@Override
|
|
1002
1017
|
public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) {
|
|
1003
1018
|
|
|
@@ -1059,11 +1074,21 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
|
|
1059
1074
|
grantedPermissions = new ArrayList<>();
|
|
1060
1075
|
|
|
1061
1076
|
ArrayList<String> requestedAndroidPermissions = new ArrayList<>();
|
|
1077
|
+
String originUrl = request.getOrigin().toString();
|
|
1078
|
+
String originHost;
|
|
1079
|
+
|
|
1080
|
+
try {
|
|
1081
|
+
URL url = new URL(originUrl);
|
|
1082
|
+
originHost = url.getHost();
|
|
1083
|
+
} catch (MalformedURLException e) {
|
|
1084
|
+
request.deny();
|
|
1085
|
+
return;
|
|
1086
|
+
}
|
|
1062
1087
|
|
|
1063
1088
|
for (String requestedResource : request.getResources()) {
|
|
1064
1089
|
String androidPermission = null;
|
|
1065
1090
|
|
|
1066
|
-
if (
|
|
1091
|
+
if (this.cameraPermissionWhitelist.contains(originHost)) {
|
|
1067
1092
|
if (requestedResource.equals(PermissionRequest.RESOURCE_VIDEO_CAPTURE)) {
|
|
1068
1093
|
androidPermission = Manifest.permission.CAMERA;
|
|
1069
1094
|
} else if (requestedResource.equals(PermissionRequest.RESOURCE_AUDIO_CAPTURE)) {
|
package/apple/RNCWebView.m
CHANGED
|
@@ -22,6 +22,7 @@ static NSString *const HistoryShimName = @"ReactNativeHistoryShim";
|
|
|
22
22
|
static NSString *const MessageHandlerName = @"ReactNativeWebView";
|
|
23
23
|
static NSURLCredential* clientAuthenticationCredential;
|
|
24
24
|
static NSDictionary* customCertificatesForHost;
|
|
25
|
+
static NSSet *cameraPermissionWhitelist;
|
|
25
26
|
|
|
26
27
|
NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_";
|
|
27
28
|
|
|
@@ -70,6 +71,7 @@ RCTAutoInsetsProtocol>
|
|
|
70
71
|
@property (nonatomic, strong) WKUserScript *postMessageScript;
|
|
71
72
|
@property (nonatomic, strong) WKUserScript *atStartScript;
|
|
72
73
|
@property (nonatomic, strong) WKUserScript *atEndScript;
|
|
74
|
+
@property (nonatomic, strong) NSArray<NSString *> *cameraPermissionWhitelist;
|
|
73
75
|
@end
|
|
74
76
|
|
|
75
77
|
@implementation RNCWebView
|
|
@@ -645,6 +647,16 @@ RCTAutoInsetsProtocol>
|
|
|
645
647
|
|
|
646
648
|
- (void)visitSource
|
|
647
649
|
{
|
|
650
|
+
// Check for a static html source first
|
|
651
|
+
NSString *html = [RCTConvert NSString:_source[@"html"]];
|
|
652
|
+
if (html) {
|
|
653
|
+
NSURL *baseURL = [RCTConvert NSURL:_source[@"baseUrl"]];
|
|
654
|
+
if (!baseURL) {
|
|
655
|
+
baseURL = [NSURL URLWithString:@"about:blank"];
|
|
656
|
+
}
|
|
657
|
+
[_webView loadHTMLString:html baseURL:baseURL];
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
648
660
|
// Add cookie for subsequent resource requests sent by page itself, if cookie was set in headers on WebView
|
|
649
661
|
NSString *headerCookie = [RCTConvert NSString:_source[@"headers"][@"cookie"]];
|
|
650
662
|
if(headerCookie) {
|
|
@@ -1044,6 +1056,11 @@ RCTAutoInsetsProtocol>
|
|
|
1044
1056
|
initiatedByFrame:(WKFrameInfo *)frame
|
|
1045
1057
|
type:(WKMediaCaptureType)type
|
|
1046
1058
|
decisionHandler:(void (^)(WKPermissionDecision decision))decisionHandler {
|
|
1059
|
+
if (![self.cameraPermissionWhitelist containsObject:origin.host]) {
|
|
1060
|
+
decisionHandler(WKPermissionDecisionDeny);
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1047
1064
|
if (_mediaCapturePermissionGrantType == RNCWebViewPermissionGrantType_GrantIfSameHost_ElsePrompt || _mediaCapturePermissionGrantType == RNCWebViewPermissionGrantType_GrantIfSameHost_ElseDeny) {
|
|
1048
1065
|
if ([origin.host isEqualToString:webView.URL.host]) {
|
|
1049
1066
|
decisionHandler(WKPermissionDecisionGrant);
|
|
@@ -78,6 +78,7 @@ RCT_EXPORT_VIEW_PROPERTY(pagingEnabled, BOOL)
|
|
|
78
78
|
RCT_EXPORT_VIEW_PROPERTY(cacheEnabled, BOOL)
|
|
79
79
|
RCT_EXPORT_VIEW_PROPERTY(allowsLinkPreview, BOOL)
|
|
80
80
|
RCT_EXPORT_VIEW_PROPERTY(basicAuthCredential, NSDictionary)
|
|
81
|
+
RCT_EXPORT_VIEW_PROPERTY(cameraPermissionWhitelist, NSArray)
|
|
81
82
|
|
|
82
83
|
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
|
|
83
84
|
RCT_EXPORT_VIEW_PROPERTY(contentInsetAdjustmentBehavior, UIScrollViewContentInsetAdjustmentBehavior)
|
package/lib/WebView.android.js
CHANGED
|
@@ -5,8 +5,9 @@ import BatchedBridge from 'react-native/Libraries/BatchedBridge/BatchedBridge';
|
|
|
5
5
|
import codegenNativeCommandsUntyped from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
6
6
|
import invariant from 'invariant';
|
|
7
7
|
import RNCWebView from "./WebViewNativeComponent.android";
|
|
8
|
-
import { defaultOriginWhitelist, defaultDeeplinkWhitelist, defaultRenderError, defaultRenderLoading, useWebWiewLogic, versionPasses, } from './WebViewShared';
|
|
8
|
+
import { defaultOriginWhitelist, defaultDeeplinkWhitelist, defaultRenderError, defaultRenderLoading, useWebWiewLogic, versionPasses, removeHttpsFromOrigins, } from './WebViewShared';
|
|
9
9
|
import styles from './WebView.styles';
|
|
10
|
+
import validateProps from './validation';
|
|
10
11
|
const { getWebViewDefaultUserAgent } = NativeModules.RNCWebViewUtils;
|
|
11
12
|
let userAgentPromise;
|
|
12
13
|
async function getUserAgent() {
|
|
@@ -31,8 +32,9 @@ const mediaPlaybackRequiresUserAction = true;
|
|
|
31
32
|
const setSupportMultipleWindows = true;
|
|
32
33
|
const mixedContentMode = 'never';
|
|
33
34
|
const hardMinimumChromeVersion = '100.0'; // TODO: determinime a good lower bound
|
|
34
|
-
const WebViewComponent = forwardRef((
|
|
35
|
+
const WebViewComponent = forwardRef((props, ref) => {
|
|
35
36
|
var _a;
|
|
37
|
+
const { overScrollMode = 'always', javaScriptEnabled = true, thirdPartyCookiesEnabled = true, scalesPageToFit = true, saveFormDataDisabled = false, cacheEnabled = true, cameraPermissionWhitelist = [], androidHardwareAccelerationDisabled = false, androidLayerType = "none", originWhitelist = defaultOriginWhitelist, deeplinkWhitelist = defaultDeeplinkWhitelist, setBuiltInZoomControls = true, setDisplayZoomControls = false, nestedScrollEnabled = false, startInLoadingState, onLoadStart, onError, onLoad, onLoadEnd, onMessage: onMessageProp, onOpenWindow: onOpenWindowProp, renderLoading, renderError, style, containerStyle, source, onShouldStartLoadWithRequest: onShouldStartLoadWithRequestProp, validateMeta, validateData, minimumChromeVersion, unsupportedVersionComponent: UnsupportedVersionComponent, ...otherProps } = validateProps(props);
|
|
36
38
|
const messagingModuleName = useRef(`WebViewMessageHandler${uniqueRef += 1}`).current;
|
|
37
39
|
const webViewRef = useRef(null);
|
|
38
40
|
const onShouldStartLoadWithRequestCallback = useCallback((shouldStart, url, lockIdentifier) => {
|
|
@@ -120,14 +122,11 @@ const WebViewComponent = forwardRef(({ overScrollMode = 'always', javaScriptEnab
|
|
|
120
122
|
console.warn('WebView: `source.body` is not supported when using GET.');
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
|
-
|
|
124
|
-
// eslint-disable-next-line
|
|
125
|
-
source = { uri: "about:blank" };
|
|
126
|
-
}
|
|
125
|
+
const safeSource = (typeof source === "object" && 'uri' in source && !passesWhitelist(source.uri)) ? { uri: 'about:blank' } : source;
|
|
127
126
|
const NativeWebView = RNCWebView;
|
|
128
|
-
const webView = <NativeWebView key="webViewKey" {...otherProps} messagingEnabled={typeof onMessageProp === 'function'} messagingModuleName={messagingModuleName} onLoadingError={onLoadingError} onLoadingFinish={onLoadingFinish} onLoadingProgress={onLoadingProgress} onLoadingStart={onLoadingStart} onMessage={onMessage} onOpenWindow={onOpenWindow} onShouldStartLoadWithRequest={onShouldStartLoadWithRequest} ref={webViewRef}
|
|
127
|
+
const webView = <NativeWebView key="webViewKey" {...otherProps} cameraPermissionWhitelist={removeHttpsFromOrigins(cameraPermissionWhitelist)} messagingEnabled={typeof onMessageProp === 'function'} messagingModuleName={messagingModuleName} onLoadingError={onLoadingError} onLoadingFinish={onLoadingFinish} onLoadingProgress={onLoadingProgress} onLoadingStart={onLoadingStart} onMessage={onMessage} onOpenWindow={onOpenWindow} onShouldStartLoadWithRequest={onShouldStartLoadWithRequest} ref={webViewRef}
|
|
129
128
|
// TODO: find a better way to type this.
|
|
130
|
-
source={
|
|
129
|
+
source={safeSource} style={webViewStyles} overScrollMode={overScrollMode} javaScriptEnabled={javaScriptEnabled} thirdPartyCookiesEnabled={thirdPartyCookiesEnabled} scalesPageToFit={scalesPageToFit} saveFormDataDisabled={saveFormDataDisabled} cacheEnabled={cacheEnabled} androidHardwareAccelerationDisabled={androidHardwareAccelerationDisabled} androidLayerType={androidLayerType} setSupportMultipleWindows={setSupportMultipleWindows} setBuiltInZoomControls={setBuiltInZoomControls} setDisplayZoomControls={setDisplayZoomControls} mixedContentMode={mixedContentMode} nestedScrollEnabled={nestedScrollEnabled} mediaPlaybackRequiresUserAction={mediaPlaybackRequiresUserAction}/>;
|
|
131
130
|
return (<View style={webViewContainerStyle}>
|
|
132
131
|
{webView}
|
|
133
132
|
{otherView}
|
package/lib/WebView.ios.js
CHANGED
|
@@ -4,8 +4,9 @@ import invariant from 'invariant';
|
|
|
4
4
|
// @ts-expect-error react-native doesn't have this type
|
|
5
5
|
import codegenNativeCommandsUntyped from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
6
6
|
import RNCWebView from "./WebViewNativeComponent.ios";
|
|
7
|
-
import { defaultOriginWhitelist, defaultDeeplinkWhitelist, defaultRenderError, defaultRenderLoading, useWebWiewLogic, versionPasses, } from './WebViewShared';
|
|
7
|
+
import { defaultOriginWhitelist, defaultDeeplinkWhitelist, defaultRenderError, defaultRenderLoading, useWebWiewLogic, versionPasses, removeHttpsFromOrigins, } from './WebViewShared';
|
|
8
8
|
import styles from './WebView.styles';
|
|
9
|
+
import validateProps from './validation';
|
|
9
10
|
const codegenNativeCommands = codegenNativeCommandsUntyped;
|
|
10
11
|
const Commands = codegenNativeCommands({
|
|
11
12
|
supportedCommands: ['goBack', 'goForward', 'reload', 'stopLoading', /* 'injectJavaScript', */ 'requestFocus', 'postMessage', 'loadUrl'],
|
|
@@ -39,7 +40,8 @@ const sharedCookiesEnabled = false;
|
|
|
39
40
|
const enableApplePay = false;
|
|
40
41
|
const dataDetectorTypes = 'none';
|
|
41
42
|
const hardMinimumIOSVersion = '12.5.6 <13, 13.6.1 <14, 14.8.1 <15, 15.7.1';
|
|
42
|
-
const WebViewComponent = forwardRef((
|
|
43
|
+
const WebViewComponent = forwardRef((props, ref) => {
|
|
44
|
+
const { javaScriptEnabled = true, cacheEnabled = true, cameraPermissionWhitelist = [], originWhitelist = defaultOriginWhitelist, deeplinkWhitelist = defaultDeeplinkWhitelist, textInteractionEnabled = true, injectedJavaScript, injectedJavaScriptBeforeContentLoaded, startInLoadingState, onLoadStart, onError, onLoad, onLoadEnd, onMessage: onMessageProp, renderLoading, renderError, style, containerStyle, source, incognito, validateMeta, validateData, decelerationRate: decelerationRateProp, onShouldStartLoadWithRequest: onShouldStartLoadWithRequestProp, minimumIOSVersion, unsupportedVersionComponent: UnsupportedVersionComponent, ...otherProps } = validateProps(props);
|
|
43
45
|
const webViewRef = useRef(null);
|
|
44
46
|
const onShouldStartLoadWithRequestCallback = useCallback((shouldStart, _url, lockIdentifier = 0) => {
|
|
45
47
|
const viewManager = RNCWebViewManager;
|
|
@@ -103,7 +105,7 @@ const WebViewComponent = forwardRef(({ javaScriptEnabled = true, cacheEnabled =
|
|
|
103
105
|
const webViewContainerStyle = [styles.container, containerStyle];
|
|
104
106
|
const decelerationRate = processDecelerationRate(decelerationRateProp);
|
|
105
107
|
const NativeWebView = RNCWebView;
|
|
106
|
-
const webView = (<NativeWebView key="webViewKey" {...otherProps} enableApplePay={enableApplePay} javaScriptEnabled={javaScriptEnabled} cacheEnabled={cacheEnabled} dataDetectorTypes={dataDetectorTypes} useSharedProcessPool={useSharedProcessPool} textInteractionEnabled={textInteractionEnabled} decelerationRate={decelerationRate} messagingEnabled={typeof onMessageProp === 'function'} onLoadingError={onLoadingError} onLoadingFinish={onLoadingFinish} onLoadingProgress={onLoadingProgress} onLoadingStart={onLoadingStart} onMessage={onMessage} onShouldStartLoadWithRequest={onShouldStartLoadWithRequest} injectedJavaScript={injectedJavaScript} injectedJavaScriptBeforeContentLoaded={injectedJavaScriptBeforeContentLoaded} allowsInlineMediaPlayback={allowsInlineMediaPlayback} incognito={incognito} mediaPlaybackRequiresUserAction={mediaPlaybackRequiresUserAction} ref={webViewRef} sharedCookiesEnabled={sharedCookiesEnabled}
|
|
108
|
+
const webView = (<NativeWebView key="webViewKey" {...otherProps} enableApplePay={enableApplePay} javaScriptEnabled={javaScriptEnabled} cacheEnabled={cacheEnabled} cameraPermissionWhitelist={removeHttpsFromOrigins(cameraPermissionWhitelist)} dataDetectorTypes={dataDetectorTypes} useSharedProcessPool={useSharedProcessPool} textInteractionEnabled={textInteractionEnabled} decelerationRate={decelerationRate} messagingEnabled={typeof onMessageProp === 'function'} onLoadingError={onLoadingError} onLoadingFinish={onLoadingFinish} onLoadingProgress={onLoadingProgress} onLoadingStart={onLoadingStart} onMessage={onMessage} onShouldStartLoadWithRequest={onShouldStartLoadWithRequest} injectedJavaScript={injectedJavaScript} injectedJavaScriptBeforeContentLoaded={injectedJavaScriptBeforeContentLoaded} allowsInlineMediaPlayback={allowsInlineMediaPlayback} incognito={incognito} mediaPlaybackRequiresUserAction={mediaPlaybackRequiresUserAction} ref={webViewRef} sharedCookiesEnabled={sharedCookiesEnabled}
|
|
107
109
|
// TODO: find a better way to type this.
|
|
108
110
|
source={source} style={webViewStyles}/>);
|
|
109
111
|
return (<View style={webViewContainerStyle}>
|
package/lib/WebViewShared.d.ts
CHANGED
|
@@ -34,4 +34,5 @@ export declare const useWebWiewLogic: ({ startInLoadingState, onLoadStart, onLoa
|
|
|
34
34
|
lastErrorEvent: WebViewError | null;
|
|
35
35
|
};
|
|
36
36
|
export declare const versionPasses: (version: string | undefined, minimum: string | undefined) => boolean;
|
|
37
|
+
export declare const removeHttpsFromOrigins: (whitelist: string[]) => string[];
|
|
37
38
|
//# sourceMappingURL=WebViewShared.d.ts.map
|
package/lib/WebViewShared.js
CHANGED
|
@@ -99,7 +99,7 @@ export const useWebWiewLogic = ({ startInLoadingState, onLoadStart, onLoad, onLo
|
|
|
99
99
|
const extractMeta = (nativeEvent) => ({
|
|
100
100
|
url: String(nativeEvent.url),
|
|
101
101
|
loading: Boolean(nativeEvent.loading),
|
|
102
|
-
title: String(nativeEvent.title),
|
|
102
|
+
title: String(nativeEvent.title).slice(0, 512),
|
|
103
103
|
canGoBack: Boolean(nativeEvent.canGoBack),
|
|
104
104
|
canGoForward: Boolean(nativeEvent.canGoForward),
|
|
105
105
|
lockIdentifier: Number(nativeEvent.lockIdentifier),
|
|
@@ -215,3 +215,6 @@ export const versionPasses = (version, minimum) => {
|
|
|
215
215
|
}
|
|
216
216
|
return true; // equals
|
|
217
217
|
};
|
|
218
|
+
export const removeHttpsFromOrigins = (whitelist) => {
|
|
219
|
+
return whitelist.map((origin) => origin.replace('https://', ''));
|
|
220
|
+
};
|
package/lib/WebViewTypes.d.ts
CHANGED
|
@@ -145,6 +145,7 @@ export interface BasicAuthCredential {
|
|
|
145
145
|
}
|
|
146
146
|
export interface CommonNativeWebViewProps extends ViewProps {
|
|
147
147
|
cacheEnabled?: boolean;
|
|
148
|
+
cameraPermissionWhitelist?: string[];
|
|
148
149
|
incognito?: boolean;
|
|
149
150
|
injectedJavaScript?: string;
|
|
150
151
|
injectedJavaScriptBeforeContentLoaded?: string;
|
|
@@ -635,6 +636,10 @@ export interface WebViewSharedProps extends ViewProps {
|
|
|
635
636
|
* @platform android
|
|
636
637
|
*/
|
|
637
638
|
javaScriptEnabled?: boolean;
|
|
639
|
+
/**
|
|
640
|
+
* Defines a list of domain origins that can access camera.
|
|
641
|
+
*/
|
|
642
|
+
readonly cameraPermissionWhitelist?: string[];
|
|
638
643
|
/**
|
|
639
644
|
* Stylesheet object to set the style of the container view.
|
|
640
645
|
*/
|