@exodus/react-native-webview 11.26.1-exodus.32 → 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/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 +26 -7
- package/apple/RNCWebView.m +7 -0
- package/apple/RNCWebViewManager.m +1 -0
- package/lib/WebView.android.js +3 -3
- package/lib/WebView.ios.js +3 -3
- package/lib/WebViewShared.d.ts +1 -0
- package/lib/WebViewShared.js +4 -1
- package/lib/WebViewTypes.d.ts +5 -0
- package/package.json +1 -1
- package/.all-contributorsrc +0 -185
- package/.circleci/config.yml +0 -66
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -94
- package/.flowconfig +0 -88
- package/.flowconfig.android +0 -88
- package/.gitattributes +0 -12
- package/.github/CODEOWNERS +0 -1
- package/.github/ISSUE_TEMPLATE/bug-report.md +0 -42
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -30
- package/.github/workflows/android-ci.yml +0 -35
- package/.github/workflows/detox.yml +0 -20
- package/.github/workflows/ios-ci.yml +0 -31
- package/.github/workflows/scripts/install-vs-features.ps1 +0 -108
- package/.github/workflows/stale.yml +0 -17
- package/.gitignore +0 -62
- package/.idea/.gitignore +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -9
- package/.idea/modules.xml +0 -8
- package/.idea/react-native-webview.iml +0 -9
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -104
- package/.prettierrc.js +0 -10
- package/.releaserc +0 -15
- package/.vscode/settings.json +0 -9
- package/babel.config.js +0 -11
- package/bin/setup +0 -26
- package/docs/Contributing.md +0 -102
- package/docs/Custom-Android.md +0 -222
- package/docs/Custom-iOS.md +0 -236
- package/docs/Debugging.md +0 -101
- package/docs/Getting-Started.md +0 -142
- package/docs/Guide.md +0 -613
- package/docs/Reference.md +0 -1639
- package/example/.gitignore +0 -14
- package/example/App.tsx +0 -262
- package/example/android/build.gradle +0 -15
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/example/android/gradle.properties +0 -34
- package/example/android/gradlew +0 -234
- package/example/android/gradlew.bat +0 -89
- package/example/android/settings.gradle +0 -12
- package/example/app.json +0 -20
- package/example/assets/test.html +0 -9
- package/example/babel.config.js +0 -3
- package/example/examples/Alerts.tsx +0 -72
- package/example/examples/ApplePay.tsx +0 -23
- package/example/examples/Background.tsx +0 -54
- package/example/examples/Downloads.tsx +0 -57
- package/example/examples/Injection.tsx +0 -161
- package/example/examples/LocalPageLoad.tsx +0 -16
- package/example/examples/Messaging.tsx +0 -63
- package/example/examples/NativeWebpage.tsx +0 -22
- package/example/examples/Scrolling.tsx +0 -68
- package/example/examples/Uploads.tsx +0 -69
- package/example/index.js +0 -9
- package/example/ios/Podfile +0 -8
- package/example/ios/Podfile.lock +0 -445
- package/jest-setups/jest.setup.js +0 -8
- package/jest.config.js +0 -184
- package/lib/WebView.android.d.ts.map +0 -1
- package/lib/WebView.d.ts.map +0 -1
- package/lib/WebView.ios.d.ts.map +0 -1
- package/lib/WebView.styles.d.ts.map +0 -1
- package/lib/WebViewNativeComponent.android.d.ts.map +0 -1
- package/lib/WebViewNativeComponent.ios.d.ts.map +0 -1
- package/lib/WebViewShared.d.ts.map +0 -1
- package/lib/WebViewTypes.d.ts.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/validation.d.ts.map +0 -1
- package/metro.config.js +0 -57
- package/src/WebView.android.tsx +0 -255
- package/src/WebView.ios.tsx +0 -230
- package/src/WebView.styles.ts +0 -44
- package/src/WebView.tsx +0 -18
- package/src/WebViewNativeComponent.android.ts +0 -8
- package/src/WebViewNativeComponent.ios.ts +0 -8
- package/src/WebViewShared.tsx +0 -318
- package/src/WebViewTypes.ts +0 -941
- package/src/__tests__/WebViewShared-test.js +0 -292
- package/src/__tests__/__snapshots__/WebViewShared-test.js.snap +0 -13
- package/src/__tests__/validation-test.js +0 -39
- package/src/index.ts +0 -4
- package/src/validation.ts +0 -13
- package/tsconfig.json +0 -24
- package/yarn.lock +0 -13397
- /package/{example/.watchmanconfig → android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json} +0 -0
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);
|
|
@@ -998,12 +1002,17 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
|
|
998
1002
|
|
|
999
1003
|
// True if protected media should be allowed, false otherwise
|
|
1000
1004
|
protected boolean mAllowsProtectedMedia = false;
|
|
1005
|
+
private Set<String> cameraPermissionWhitelist = new HashSet<>();
|
|
1001
1006
|
|
|
1002
1007
|
public RNCWebChromeClient(ReactContext reactContext, WebView webView) {
|
|
1003
1008
|
this.mReactContext = reactContext;
|
|
1004
1009
|
this.mWebView = webView;
|
|
1005
1010
|
}
|
|
1006
1011
|
|
|
1012
|
+
public void setCameraPermissionWhitelist(Set<String> whitelist) {
|
|
1013
|
+
this.cameraPermissionWhitelist = whitelist;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1007
1016
|
@Override
|
|
1008
1017
|
public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) {
|
|
1009
1018
|
|
|
@@ -1065,11 +1074,21 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
|
|
1065
1074
|
grantedPermissions = new ArrayList<>();
|
|
1066
1075
|
|
|
1067
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
|
+
}
|
|
1068
1087
|
|
|
1069
1088
|
for (String requestedResource : request.getResources()) {
|
|
1070
1089
|
String androidPermission = null;
|
|
1071
1090
|
|
|
1072
|
-
if (
|
|
1091
|
+
if (this.cameraPermissionWhitelist.contains(originHost)) {
|
|
1073
1092
|
if (requestedResource.equals(PermissionRequest.RESOURCE_VIDEO_CAPTURE)) {
|
|
1074
1093
|
androidPermission = Manifest.permission.CAMERA;
|
|
1075
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
|
|
@@ -1054,6 +1056,11 @@ RCTAutoInsetsProtocol>
|
|
|
1054
1056
|
initiatedByFrame:(WKFrameInfo *)frame
|
|
1055
1057
|
type:(WKMediaCaptureType)type
|
|
1056
1058
|
decisionHandler:(void (^)(WKPermissionDecision decision))decisionHandler {
|
|
1059
|
+
if (![self.cameraPermissionWhitelist containsObject:origin.host]) {
|
|
1060
|
+
decisionHandler(WKPermissionDecisionDeny);
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1057
1064
|
if (_mediaCapturePermissionGrantType == RNCWebViewPermissionGrantType_GrantIfSameHost_ElsePrompt || _mediaCapturePermissionGrantType == RNCWebViewPermissionGrantType_GrantIfSameHost_ElseDeny) {
|
|
1058
1065
|
if ([origin.host isEqualToString:webView.URL.host]) {
|
|
1059
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,7 +5,7 @@ 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
10
|
import validateProps from './validation';
|
|
11
11
|
const { getWebViewDefaultUserAgent } = NativeModules.RNCWebViewUtils;
|
|
@@ -34,7 +34,7 @@ const mixedContentMode = 'never';
|
|
|
34
34
|
const hardMinimumChromeVersion = '100.0'; // TODO: determinime a good lower bound
|
|
35
35
|
const WebViewComponent = forwardRef((props, ref) => {
|
|
36
36
|
var _a;
|
|
37
|
-
const { overScrollMode = 'always', javaScriptEnabled = true, thirdPartyCookiesEnabled = true, scalesPageToFit = true, saveFormDataDisabled = false, cacheEnabled = true, 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);
|
|
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);
|
|
38
38
|
const messagingModuleName = useRef(`WebViewMessageHandler${uniqueRef += 1}`).current;
|
|
39
39
|
const webViewRef = useRef(null);
|
|
40
40
|
const onShouldStartLoadWithRequestCallback = useCallback((shouldStart, url, lockIdentifier) => {
|
|
@@ -124,7 +124,7 @@ const WebViewComponent = forwardRef((props, ref) => {
|
|
|
124
124
|
}
|
|
125
125
|
const safeSource = (typeof source === "object" && 'uri' in source && !passesWhitelist(source.uri)) ? { uri: 'about:blank' } : source;
|
|
126
126
|
const NativeWebView = RNCWebView;
|
|
127
|
-
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}
|
|
128
128
|
// TODO: find a better way to type this.
|
|
129
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}/>;
|
|
130
130
|
return (<View style={webViewContainerStyle}>
|
package/lib/WebView.ios.js
CHANGED
|
@@ -4,7 +4,7 @@ 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
9
|
import validateProps from './validation';
|
|
10
10
|
const codegenNativeCommands = codegenNativeCommandsUntyped;
|
|
@@ -41,7 +41,7 @@ const enableApplePay = false;
|
|
|
41
41
|
const dataDetectorTypes = 'none';
|
|
42
42
|
const hardMinimumIOSVersion = '12.5.6 <13, 13.6.1 <14, 14.8.1 <15, 15.7.1';
|
|
43
43
|
const WebViewComponent = forwardRef((props, ref) => {
|
|
44
|
-
const { javaScriptEnabled = true, cacheEnabled = true, 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);
|
|
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);
|
|
45
45
|
const webViewRef = useRef(null);
|
|
46
46
|
const onShouldStartLoadWithRequestCallback = useCallback((shouldStart, _url, lockIdentifier = 0) => {
|
|
47
47
|
const viewManager = RNCWebViewManager;
|
|
@@ -105,7 +105,7 @@ const WebViewComponent = forwardRef((props, ref) => {
|
|
|
105
105
|
const webViewContainerStyle = [styles.container, containerStyle];
|
|
106
106
|
const decelerationRate = processDecelerationRate(decelerationRateProp);
|
|
107
107
|
const NativeWebView = RNCWebView;
|
|
108
|
-
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}
|
|
109
109
|
// TODO: find a better way to type this.
|
|
110
110
|
source={source} style={webViewStyles}/>);
|
|
111
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
|
*/
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "11.26.1-exodus.
|
|
12
|
+
"version": "11.26.1-exodus.33",
|
|
13
13
|
"homepage": "https://github.com/ExodusMovement/react-native-webview#readme",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"android": "react-native run-android",
|