@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
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
import { Linking } from 'react-native';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
defaultOriginWhitelist,
|
|
5
|
-
defaultDeeplinkWhitelist,
|
|
6
|
-
createOnShouldStartLoadWithRequest,
|
|
7
|
-
} from '../WebViewShared';
|
|
8
|
-
|
|
9
|
-
Linking.openURL.mockResolvedValue(undefined);
|
|
10
|
-
Linking.canOpenURL.mockResolvedValue(true);
|
|
11
|
-
|
|
12
|
-
// The tests that call createOnShouldStartLoadWithRequest will cause a promise
|
|
13
|
-
// to get kicked off (by calling the mocked `Linking.canOpenURL`) that the tests
|
|
14
|
-
// _need_ to get run to completion _before_ doing any `expect`ing. The reason
|
|
15
|
-
// is: once that promise is resolved another function should get run which will
|
|
16
|
-
// call `Linking.openURL`, and we want to test that.
|
|
17
|
-
//
|
|
18
|
-
// Normally we would probably do something like `await
|
|
19
|
-
// createShouldStartLoadWithRequest(...)` in the tests, but that doesn't work
|
|
20
|
-
// here because the promise that gets kicked off is not returned (because
|
|
21
|
-
// non-test code doesn't need to know about it).
|
|
22
|
-
//
|
|
23
|
-
// The tests thus need a way to "flush any pending promises" (to make sure
|
|
24
|
-
// pending promises run to completion) before doing any `expect`ing. `jest`
|
|
25
|
-
// doesn't provide a way to do this out of the box, but we can use this function
|
|
26
|
-
// to do it.
|
|
27
|
-
//
|
|
28
|
-
// See this issue for more discussion: https://github.com/facebook/jest/issues/2157
|
|
29
|
-
function flushPromises() {
|
|
30
|
-
return new Promise(resolve => setImmediate(resolve));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
describe('WebViewShared', () => {
|
|
35
|
-
test('exports defaultOriginWhitelist', () => {
|
|
36
|
-
expect(defaultOriginWhitelist).toMatchSnapshot();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
test('exports defaultDeeplinkWhitelist', () => {
|
|
40
|
-
expect(defaultDeeplinkWhitelist).toMatchSnapshot();
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
describe('createOnShouldStartLoadWithRequest', () => {
|
|
44
|
-
const alwaysTrueOnShouldStartLoadWithRequest = (nativeEvent) => {
|
|
45
|
-
return true;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const alwaysFalseOnShouldStartLoadWithRequest = (nativeEvent) => {
|
|
49
|
-
return false;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const loadRequest = jest.fn();
|
|
53
|
-
|
|
54
|
-
test('loadRequest is called without onShouldStartLoadWithRequest override', async () => {
|
|
55
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
56
|
-
loadRequest,
|
|
57
|
-
defaultOriginWhitelist,
|
|
58
|
-
defaultDeeplinkWhitelist,
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'https://www.example.com/', lockIdentifier: 1 } });
|
|
62
|
-
|
|
63
|
-
await flushPromises();
|
|
64
|
-
|
|
65
|
-
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
66
|
-
expect(loadRequest).toHaveBeenCalledWith(true, 'https://www.example.com/', 1);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
test('Linking.openURL is called without onShouldStartLoadWithRequest override', async () => {
|
|
70
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
71
|
-
loadRequest,
|
|
72
|
-
defaultOriginWhitelist,
|
|
73
|
-
['invalid:'],
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'invalid://example.com/', isTopFrame: true, lockIdentifier: 2 } });
|
|
77
|
-
|
|
78
|
-
await flushPromises();
|
|
79
|
-
|
|
80
|
-
expect(Linking.openURL).toHaveBeenCalledWith('invalid://example.com/');
|
|
81
|
-
expect(loadRequest).toHaveBeenCalledWith(false, 'invalid://example.com/', 2);
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
test('loadRequest with true onShouldStartLoadWithRequest override is called', async () => {
|
|
85
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
86
|
-
loadRequest,
|
|
87
|
-
defaultOriginWhitelist,
|
|
88
|
-
defaultDeeplinkWhitelist,
|
|
89
|
-
alwaysTrueOnShouldStartLoadWithRequest,
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'https://www.example.com/', isTopFrame: true, lockIdentifier: 1 } });
|
|
93
|
-
|
|
94
|
-
await flushPromises();
|
|
95
|
-
|
|
96
|
-
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
97
|
-
expect(loadRequest).toHaveBeenLastCalledWith(true, 'https://www.example.com/', 1);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
test('Linking.openURL with true onShouldStartLoadWithRequest override is called for links not passing the whitelist', async () => {
|
|
101
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
102
|
-
loadRequest,
|
|
103
|
-
defaultOriginWhitelist,
|
|
104
|
-
['invalid:'],
|
|
105
|
-
alwaysTrueOnShouldStartLoadWithRequest,
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'invalid://example.com/', isTopFrame: true, lockIdentifier: 1 } });
|
|
109
|
-
|
|
110
|
-
await flushPromises();
|
|
111
|
-
|
|
112
|
-
expect(Linking.openURL).toHaveBeenLastCalledWith('invalid://example.com/');
|
|
113
|
-
// We don't expect the URL to have been loaded in the WebView because it
|
|
114
|
-
// is not in the origin whitelist
|
|
115
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, 'invalid://example.com/', 1);
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
test('Linking.openURL with limited whitelist', async () => {
|
|
119
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
120
|
-
loadRequest,
|
|
121
|
-
['https://*'],
|
|
122
|
-
['bitcoin:'],
|
|
123
|
-
);
|
|
124
|
-
|
|
125
|
-
const good = 'bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=50&label=Luke-Jr&message=Donation%20for%20project%20xyz'
|
|
126
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: good, isTopFrame: true, lockIdentifier: 1 } });
|
|
127
|
-
|
|
128
|
-
await flushPromises();
|
|
129
|
-
|
|
130
|
-
expect(Linking.openURL).toHaveBeenCalledWith(good)
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
test.each([
|
|
134
|
-
'javascript:alert(1)',
|
|
135
|
-
'jAvAsCrIpT:alert(1)',
|
|
136
|
-
'file:///Users/user/Documents/projects/index.html',
|
|
137
|
-
'fIlE:///Users/user/Documents/projects/index.html',
|
|
138
|
-
'http://google.com',
|
|
139
|
-
'hTtP://google.com'
|
|
140
|
-
])('Linking.openURL with default blocklist %s', async (bad) => {
|
|
141
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
142
|
-
loadRequest,
|
|
143
|
-
['https://*'],
|
|
144
|
-
['bitcoin:'],
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: bad, isTopFrame: true, lockIdentifier: 1 } });
|
|
148
|
-
|
|
149
|
-
await flushPromises();
|
|
150
|
-
|
|
151
|
-
expect(Linking.openURL).not.toHaveBeenCalledWith(bad)
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
test.each([
|
|
155
|
-
'',
|
|
156
|
-
[''],
|
|
157
|
-
'*'
|
|
158
|
-
])('Linking.openURL with empty allow list should not allow passing', async (badList) => {
|
|
159
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
160
|
-
loadRequest,
|
|
161
|
-
[],
|
|
162
|
-
[badList],
|
|
163
|
-
);
|
|
164
|
-
const bad = 'bitcoin:'
|
|
165
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: bad, isTopFrame: true, lockIdentifier: 1 } });
|
|
166
|
-
|
|
167
|
-
await flushPromises();
|
|
168
|
-
|
|
169
|
-
expect(Linking.openURL).not.toHaveBeenCalledWith(bad)
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
test('Linking.openURL with hardcoded blocklist should take priority over whitelist', async () => {
|
|
173
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
174
|
-
loadRequest,
|
|
175
|
-
[],
|
|
176
|
-
['javascript:'],
|
|
177
|
-
);
|
|
178
|
-
const bad = 'javascript:alert(1)'
|
|
179
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: bad, isTopFrame: true, lockIdentifier: 1 } });
|
|
180
|
-
|
|
181
|
-
await flushPromises();
|
|
182
|
-
|
|
183
|
-
expect(Linking.openURL).not.toHaveBeenCalledWith(bad)
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
test('loadRequest with false onShouldStartLoadWithRequest override is called', async () => {
|
|
187
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
188
|
-
loadRequest,
|
|
189
|
-
defaultOriginWhitelist,
|
|
190
|
-
defaultDeeplinkWhitelist,
|
|
191
|
-
alwaysFalseOnShouldStartLoadWithRequest,
|
|
192
|
-
);
|
|
193
|
-
|
|
194
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'https://www.example.com/', isTopFrame: true, lockIdentifier: 1 } });
|
|
195
|
-
|
|
196
|
-
await flushPromises();
|
|
197
|
-
|
|
198
|
-
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
199
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, 'https://www.example.com/', 1);
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
test('loadRequest with limited whitelist', async () => {
|
|
203
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
204
|
-
loadRequest,
|
|
205
|
-
['https://*'],
|
|
206
|
-
['git+https:', 'fakehttps:'],
|
|
207
|
-
);
|
|
208
|
-
|
|
209
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'https://www.example.com/', isTopFrame: true, lockIdentifier: 1 } });
|
|
210
|
-
|
|
211
|
-
await flushPromises();
|
|
212
|
-
|
|
213
|
-
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
214
|
-
expect(loadRequest).toHaveBeenLastCalledWith(true, 'https://www.example.com/', 1);
|
|
215
|
-
|
|
216
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'http://insecure.com/', isTopFrame: true, lockIdentifier: 2 } });
|
|
217
|
-
|
|
218
|
-
await flushPromises();
|
|
219
|
-
|
|
220
|
-
expect(Linking.openURL).not.toHaveBeenLastCalledWith('http://insecure.com/');
|
|
221
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, 'http://insecure.com/', 2);
|
|
222
|
-
|
|
223
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'git+https://insecure.com/', isTopFrame: true, lockIdentifier: 3 } });
|
|
224
|
-
|
|
225
|
-
await flushPromises();
|
|
226
|
-
|
|
227
|
-
expect(Linking.openURL).toHaveBeenLastCalledWith('git+https://insecure.com/');
|
|
228
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, 'git+https://insecure.com/', 3);
|
|
229
|
-
|
|
230
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'fakehttps://insecure.com/', isTopFrame: true, lockIdentifier: 4 } });
|
|
231
|
-
|
|
232
|
-
await flushPromises();
|
|
233
|
-
|
|
234
|
-
expect(Linking.openURL).toHaveBeenLastCalledWith('fakehttps://insecure.com/');
|
|
235
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, 'fakehttps://insecure.com/', 4);
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
test('loadRequest allows for valid URIs', async () => {
|
|
239
|
-
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
|
240
|
-
loadRequest,
|
|
241
|
-
['plus+https://*', 'DOT.https://*', 'dash-https://*', '0invalid://*', '+invalid://*'],
|
|
242
|
-
['0invalid:', '+invalid:', 'fake+plus+https:'],
|
|
243
|
-
);
|
|
244
|
-
|
|
245
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'plus+https://www.example.com/', isTopFrame: true, lockIdentifier: 1 } });
|
|
246
|
-
|
|
247
|
-
await flushPromises();
|
|
248
|
-
|
|
249
|
-
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
250
|
-
// (new URL('plus+https://www.example.com/')).origin is null so it doesn't pass _passesWhitelist
|
|
251
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, 'plus+https://www.example.com/', 1);
|
|
252
|
-
|
|
253
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'DOT.https://www.example.com/', isTopFrame: true, lockIdentifier: 2 } });
|
|
254
|
-
|
|
255
|
-
await flushPromises();
|
|
256
|
-
|
|
257
|
-
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
258
|
-
// (new URL('DOT.https://www.example.com/')).origin is null so it doesn't pass _passesWhitelist
|
|
259
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, 'DOT.https://www.example.com/', 2);
|
|
260
|
-
|
|
261
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'dash-https://www.example.com/', isTopFrame: true, lockIdentifier: 3 } });
|
|
262
|
-
|
|
263
|
-
await flushPromises();
|
|
264
|
-
|
|
265
|
-
expect(Linking.openURL).toHaveBeenCalledTimes(0);
|
|
266
|
-
// (new URL('DOT.https://www.example.com/')).origin is null so it doesn't pass _passesWhitelist
|
|
267
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, 'dash-https://www.example.com/', 3);
|
|
268
|
-
|
|
269
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: '0invalid://www.example.com/', isTopFrame: true, lockIdentifier: 4 } });
|
|
270
|
-
|
|
271
|
-
await flushPromises();
|
|
272
|
-
|
|
273
|
-
expect(Linking.openURL).not.toHaveBeenLastCalledWith('0invalid://www.example.com/');
|
|
274
|
-
// (new URL('DOT.https://www.example.com/')).origin is null so it doesn't pass _passesWhitelist
|
|
275
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, '0invalid://www.example.com/', 4);
|
|
276
|
-
|
|
277
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: '+invalid://www.example.com/', isTopFrame: true, lockIdentifier: 5 } });
|
|
278
|
-
|
|
279
|
-
await flushPromises();
|
|
280
|
-
|
|
281
|
-
expect(Linking.openURL).not.toHaveBeenLastCalledWith('+invalid://www.example.com/');
|
|
282
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, '+invalid://www.example.com/', 5);
|
|
283
|
-
|
|
284
|
-
onShouldStartLoadWithRequest({ nativeEvent: { url: 'FAKE+plus+https://www.example.com/', isTopFrame: true, lockIdentifier: 6 } });
|
|
285
|
-
|
|
286
|
-
await flushPromises();
|
|
287
|
-
|
|
288
|
-
expect(Linking.openURL).toHaveBeenLastCalledWith('FAKE+plus+https://www.example.com/');
|
|
289
|
-
expect(loadRequest).toHaveBeenLastCalledWith(false, 'FAKE+plus+https://www.example.com/', 6);
|
|
290
|
-
});
|
|
291
|
-
});
|
|
292
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import validateProps from '../validation'
|
|
2
|
-
|
|
3
|
-
describe('validateProps', () => {
|
|
4
|
-
|
|
5
|
-
test('throws when providing static html without origin whitelist', () => {
|
|
6
|
-
expect(() => {
|
|
7
|
-
validateProps({
|
|
8
|
-
source: { html: '<h1>Wayne Foundation</h1>'}
|
|
9
|
-
})
|
|
10
|
-
}).toThrow('originWhitelist')
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
test('throws when providing static html with wildcard whitelist', () => {
|
|
14
|
-
expect(() => {
|
|
15
|
-
validateProps({
|
|
16
|
-
originWhitelist: ['*', 'http://localhost'],
|
|
17
|
-
source: { html: '<h1>Wayne Foundation</h1>'}
|
|
18
|
-
})
|
|
19
|
-
}).toThrow('originWhitelist')
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
test('throws when providing static html with empty whitelist', () => {
|
|
23
|
-
expect(() => {
|
|
24
|
-
validateProps({
|
|
25
|
-
originWhitelist: [],
|
|
26
|
-
source: { html: '<h1>Wayne Foundation</h1>'}
|
|
27
|
-
})
|
|
28
|
-
}).toThrow('originWhitelist')
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
test('returns props when origin whitelist present', () => {
|
|
32
|
-
const props = {
|
|
33
|
-
originWhitelist: ['http://localhost'],
|
|
34
|
-
source: { html: '<h1>Wayne Foundation</h1>'}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
expect(validateProps(props)).toBe(props)
|
|
38
|
-
})
|
|
39
|
-
})
|
package/src/index.ts
DELETED
package/src/validation.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import invariant from 'invariant'
|
|
2
|
-
import type { AndroidWebViewProps, IOSWebViewProps } from './WebViewTypes'
|
|
3
|
-
|
|
4
|
-
const validateProps = <P extends IOSWebViewProps | AndroidWebViewProps>(props: P): P => {
|
|
5
|
-
if(props.source && 'html' in props.source){
|
|
6
|
-
const { originWhitelist } = props
|
|
7
|
-
invariant(originWhitelist && originWhitelist.length > 0 && !originWhitelist.includes('*'), 'originWhitelist is required when using source.html prop and cannot include *')
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return props
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default validateProps
|
package/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"include": ["src/*"],
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"baseUrl": "./src/",
|
|
5
|
-
"jsx": "react-native",
|
|
6
|
-
"module": "esnext",
|
|
7
|
-
"moduleResolution": "node",
|
|
8
|
-
"target": "es2019",
|
|
9
|
-
"declaration": true,
|
|
10
|
-
"declarationMap": true,
|
|
11
|
-
"outDir": "lib",
|
|
12
|
-
"allowSyntheticDefaultImports": true,
|
|
13
|
-
"esModuleInterop": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"noFallthroughCasesInSwitch": true,
|
|
16
|
-
"noImplicitReturns": true,
|
|
17
|
-
"noUnusedLocals": true,
|
|
18
|
-
"noUnusedParameters": true,
|
|
19
|
-
"pretty": true,
|
|
20
|
-
"resolveJsonModule": true,
|
|
21
|
-
"skipLibCheck": true,
|
|
22
|
-
"strict": true
|
|
23
|
-
}
|
|
24
|
-
}
|