react-native-webview-bootpay 11.6.47 → 11.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -93
- package/android/.gradle/6.8/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.8/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/{7.0-rc-1 → 6.8}/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/{7.0-rc-1/dependencies-accessors → 6.8}/gc.properties +0 -0
- package/android/.gradle/7.1.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/{7.0-rc-1 → 7.1.1/dependencies-accessors}/gc.properties +0 -0
- package/android/.gradle/7.1.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.1.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.1.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.1.1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.idea/.gitignore +3 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +19 -0
- package/android/.idea/jarRepositories.xml +30 -0
- package/android/.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_2_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0.xml +11 -0
- package/android/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_autofill_autofill_1_1_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_collection_collection_1_0_0.xml +11 -0
- package/android/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_core_core_1_1_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_fragment_fragment_1_0_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_0_0.xml +11 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_0_1_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_webkit_webkit_1_4_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__com_facebook_fbjni_fbjni_java_only_0_2_2.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_2_5_0_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_2_5_0_aar.xml +18 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_2_5_0_aar.xml +18 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_2_5_0_aar.xml +18 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_base_2_5_0_aar.xml +18 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_native_2_5_0_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp3_2_5_0_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_ashmem_2_5_0_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_java_2_5_0_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_native_2_5_0_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_nativeimagefilters_2_5_0_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_nativeimagetranscoder_2_5_0_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_ui_common_2_5_0_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_infer_annotation_infer_annotation_0_18_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_66_4_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_soloader_annotation_0_10_1.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_soloader_nativeloader_0_10_1.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_10_1_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_yoga_proguard_annotations_1_19_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_2.xml +13 -0
- package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_4_9_1.xml +13 -0
- package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_urlconnection_4_9_1.xml +13 -0
- package/android/.idea/libraries/Gradle__com_squareup_okio_okio_2_9_0.xml +13 -0
- package/android/.idea/libraries/Gradle__javax_inject_javax_inject_1.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_annotations_jvm_1_3_72.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_4_10.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_4_10.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_4_10.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk8_1_4_10.xml +13 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/modules/android.iml +133 -0
- package/android/.idea/modules.xml +8 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/build/.transforms/cef19407ab645b1b4c01cb89efaec997/results.bin +1 -0
- package/android/build/.transforms/cef19407ab645b1b4c01cb89efaec997/transformed/classes/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/kr/co/bootpay/webview/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +21 -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 +1857 -0
- package/android/build/intermediates/compiled_local_resources/debug/out/xml_file_provider_paths.xml.flat +0 -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/incremental/packageDebugResources/compile-file-map.properties +2 -0
- package/android/build/intermediates/incremental/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebChromeClient.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$BPCWebViewBridge.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$ProgressChangedFilter.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewClient.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewFileProvider.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$3.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$4.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$MimeType.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BasicAuthCredential.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/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 +32 -0
- package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +21 -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 +1377 -0
- package/android/build/kotlin/compileDebugKotlin/build-history.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/counters.tab +2 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/last-build.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +43 -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/kr/co/bootpay/webview/BPCWebViewPackage.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopMessageEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopMessageEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent.class +0 -0
- package/android/build.gradle +4 -6
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradle.properties +6 -5
- package/android/gradlew +185 -0
- package/android/gradlew.bat +89 -0
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -78
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebChromeClient.java +2 -114
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebView.java +26 -11
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewClient.java +134 -103
- package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewManager.java +95 -49
- package/android/src/main/java/kr/co/bootpay/webview/BasicAuthCredential.java +12 -0
- package/apple/BPCWebView.h +19 -0
- package/apple/BPCWebView.m +363 -161
- package/apple/BPCWebViewManager.h +2 -0
- package/apple/BPCWebViewManager.m +25 -1
- package/index.d.ts +5 -5
- package/ios/.DS_Store +0 -0
- package/ios/RNCWebView.xcodeproj/project.pbxproj +18 -18
- package/ios/RNCWebView.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/RNCWebView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/RNCWebView.xcodeproj/project.xcworkspace/xcuserdata/bootpay.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNCWebView.xcodeproj/xcshareddata/xcschemes/RNCWebView.xcscheme +68 -0
- package/ios/RNCWebView.xcodeproj/xcuserdata/bootpay.xcuserdatad/xcschemes/xcschememanagement.plist +22 -0
- package/lib/WebView.android.d.ts +3 -0
- package/lib/WebView.android.d.ts.map +1 -1
- package/lib/WebView.android.js +22 -11
- package/lib/WebView.d.ts +2 -2
- package/lib/WebView.d.ts.map +1 -1
- package/lib/WebView.ios.d.ts +1 -0
- package/lib/WebView.ios.d.ts.map +1 -1
- package/lib/WebView.ios.js +23 -14
- package/lib/WebView.js +4 -4
- package/lib/WebView.macos.d.ts.map +1 -1
- package/lib/WebView.macos.js +21 -13
- package/lib/WebView.windows.d.ts +4 -2
- package/lib/WebView.windows.d.ts.map +1 -1
- package/lib/WebView.windows.js +22 -14
- package/lib/WebViewNativeComponent.android.d.ts +4 -0
- package/lib/WebViewNativeComponent.android.d.ts.map +1 -0
- package/lib/WebViewNativeComponent.android.js +3 -0
- package/lib/WebViewNativeComponent.ios.d.ts +4 -0
- package/lib/WebViewNativeComponent.ios.d.ts.map +1 -0
- package/lib/WebViewNativeComponent.ios.js +3 -0
- package/lib/WebViewNativeComponent.macos.d.ts +4 -0
- package/lib/WebViewNativeComponent.macos.d.ts.map +1 -0
- package/lib/WebViewNativeComponent.macos.js +3 -0
- package/lib/WebViewNativeComponent.windows.d.ts +4 -0
- package/lib/WebViewNativeComponent.windows.d.ts.map +1 -0
- package/lib/WebViewNativeComponent.windows.js +3 -0
- package/lib/WebViewShared.d.ts +1 -0
- package/lib/WebViewShared.d.ts.map +1 -1
- package/lib/WebViewShared.js +14 -12
- package/lib/WebViewTypes.d.ts +113 -2
- package/lib/WebViewTypes.d.ts.map +1 -1
- package/lib/WebViewTypes.js +3 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +3 -0
- package/package.json +31 -32
- package/react-native-webview-bootpay.podspec +1 -3
- package/react-native.config.js +47 -61
- package/windows/ExperimentalFeatures.props +12 -0
- package/windows/ReactNativeWebView/ReactNativeWebView.vcxproj +37 -20
- package/windows/ReactNativeWebView/ReactPackageProvider.cpp +5 -1
- package/windows/ReactNativeWebView/ReactWebView.cpp +2 -6
- package/windows/ReactNativeWebView/ReactWebView.h +3 -2
- package/windows/ReactNativeWebView/ReactWebView.idl +13 -1
- package/windows/ReactNativeWebView/ReactWebView2.cpp +119 -0
- package/windows/ReactNativeWebView/ReactWebView2.h +43 -0
- package/windows/ReactNativeWebView/ReactWebView2Manager.cpp +147 -0
- package/windows/ReactNativeWebView/ReactWebView2Manager.h +54 -0
- package/windows/ReactNativeWebView/ReactWebViewManager.cpp +36 -31
- package/windows/{WebViewBridgeComponent → ReactNativeWebView}/WebBridge.cpp +1 -1
- package/windows/{WebViewBridgeComponent → ReactNativeWebView}/WebBridge.h +2 -2
- package/windows/{WebViewBridgeComponent → ReactNativeWebView}/WebBridge.idl +1 -1
- package/windows/ReactNativeWebView/packages.config +2 -0
- package/windows/ReactNativeWebView/pch.h +6 -0
- package/windows/ReactNativeWebView.sln +81 -119
- package/android/.gradle/7.0-rc-1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.0-rc-1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.0-rc-1/fileHashes/fileHashes.lock +0 -0
- package/android/.project +0 -28
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/windows/WebViewBridgeComponent/PropertySheet.props +0 -16
- package/windows/WebViewBridgeComponent/WebViewBridgeComponent.def +0 -3
- package/windows/WebViewBridgeComponent/WebViewBridgeComponent.vcxproj +0 -160
- package/windows/WebViewBridgeComponent/WebViewBridgeComponent.vcxproj.filters +0 -33
- package/windows/WebViewBridgeComponent/packages.config +0 -4
- package/windows/WebViewBridgeComponent/pch.cpp +0 -1
- package/windows/WebViewBridgeComponent/pch.h +0 -4
- package/windows/WebViewBridgeComponent/readme.txt +0 -23
package/lib/WebViewTypes.js
CHANGED
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,eAAe,OAAO,CAAC"}
|
package/lib/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-webview-bootpay",
|
|
3
|
-
"description": "React Native WebView
|
|
3
|
+
"description": "한국 PG 결제를 지원하는 React Native WebView 입니다. iOS, Android, macOS, Windows 를 지원합니다.",
|
|
4
4
|
"main": "index.js",
|
|
5
|
+
"main-internal": "src/index.ts",
|
|
5
6
|
"typings": "index.d.ts",
|
|
6
|
-
"author": "
|
|
7
|
+
"author": "bootpay <bootpay.co.kr@gmail.com>",
|
|
7
8
|
"contributors": [
|
|
8
|
-
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
|
9
|
+
"Thibault Malbranche <malbranche.thibault@gmail.com>",
|
|
10
|
+
"Jamon Holmgren <jamon@infinite.red>"
|
|
9
11
|
],
|
|
10
12
|
"license": "MIT",
|
|
11
|
-
"version": "11.
|
|
12
|
-
"homepage": "https://github.com/react-native-webview
|
|
13
|
+
"version": "11.18.1",
|
|
14
|
+
"homepage": "https://github.com/bootpay/react-native-webview-bootpay",
|
|
13
15
|
"scripts": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"start
|
|
18
|
-
"
|
|
19
|
-
"run:windows": "react-native run-windows --root ./example --no-packager",
|
|
16
|
+
"android": "react-native run-android",
|
|
17
|
+
"ios": "react-native run-ios --project-path example/ios",
|
|
18
|
+
"macos": "react-native run-macos --scheme WebviewExample --project-path example/macos",
|
|
19
|
+
"start": "cd example && react-native start",
|
|
20
|
+
"windows": "install-windows-test-app --project-directory example/windows && react-native run-windows --root example --arch x64",
|
|
20
21
|
"ci": "CI=true && yarn lint",
|
|
21
22
|
"ci:publish": "yarn semantic-release",
|
|
22
23
|
"lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx",
|
|
@@ -30,30 +31,28 @@
|
|
|
30
31
|
"type": "Component"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
|
33
|
-
"react
|
|
34
|
+
"react": "*",
|
|
35
|
+
"react-native": "*"
|
|
34
36
|
},
|
|
35
37
|
"dependencies": {
|
|
36
38
|
"escape-string-regexp": "2.0.0",
|
|
37
39
|
"invariant": "2.2.4"
|
|
38
40
|
},
|
|
39
41
|
"devDependencies": {
|
|
40
|
-
"@babel/core": "7.
|
|
41
|
-
"@babel/runtime": "7.
|
|
42
|
-
"@react-native-community/cli": "^
|
|
43
|
-
"@react-native-community/cli-platform-android": "^
|
|
44
|
-
"@react-native-community/cli-platform-ios": "^
|
|
42
|
+
"@babel/core": "^7.0.0",
|
|
43
|
+
"@babel/runtime": "^7.0.0",
|
|
44
|
+
"@react-native-community/cli": "^6.0.0",
|
|
45
|
+
"@react-native-community/cli-platform-android": "^6.0.0",
|
|
46
|
+
"@react-native-community/cli-platform-ios": "^6.0.0",
|
|
45
47
|
"@semantic-release/git": "7.0.16",
|
|
46
48
|
"@types/invariant": "^2.2.30",
|
|
47
|
-
"@types/jest": "
|
|
48
|
-
"@types/react": "
|
|
49
|
-
"@types/react-native": "0.
|
|
49
|
+
"@types/jest": "^26.0.0",
|
|
50
|
+
"@types/react": "^17.0.0",
|
|
51
|
+
"@types/react-native": "^0.64.0",
|
|
50
52
|
"@types/selenium-webdriver": "4.0.9",
|
|
51
53
|
"@typescript-eslint/eslint-plugin": "2.1.0",
|
|
52
54
|
"@typescript-eslint/parser": "2.1.0",
|
|
53
55
|
"appium": "1.17.0",
|
|
54
|
-
"babel-eslint": "10.0.3",
|
|
55
|
-
"babel-jest": "24.8.0",
|
|
56
|
-
"babel-plugin-module-resolver": "3.1.3",
|
|
57
56
|
"eslint": "6.3.0",
|
|
58
57
|
"eslint-config-airbnb": "18.0.1",
|
|
59
58
|
"eslint-config-prettier": "6.2.0",
|
|
@@ -61,22 +60,22 @@
|
|
|
61
60
|
"eslint-plugin-jsx-a11y": "6.2.3",
|
|
62
61
|
"eslint-plugin-react": "7.14.3",
|
|
63
62
|
"eslint-plugin-react-native": "3.7.0",
|
|
64
|
-
"jest": "
|
|
65
|
-
"metro": "0.
|
|
66
|
-
"
|
|
67
|
-
"react": "
|
|
68
|
-
"react-native": "0.
|
|
69
|
-
"react-native-
|
|
70
|
-
"react-native-windows": "0.
|
|
63
|
+
"jest": "^26.6.3",
|
|
64
|
+
"metro-react-native-babel-preset": "^0.66.2",
|
|
65
|
+
"react": "17.0.2",
|
|
66
|
+
"react-native": "^0.66.0-0",
|
|
67
|
+
"react-native-macos": "^0.66.0-0",
|
|
68
|
+
"react-native-test-app": "^1.3.2",
|
|
69
|
+
"react-native-windows": "^0.66.0-0",
|
|
71
70
|
"selenium-appium": "1.0.2",
|
|
72
71
|
"selenium-webdriver": "4.0.0-alpha.7",
|
|
73
72
|
"semantic-release": "15.13.24",
|
|
74
|
-
"typescript": "
|
|
73
|
+
"typescript": "^4.0.0",
|
|
75
74
|
"winappdriver": "^0.0.7"
|
|
76
75
|
},
|
|
77
76
|
"repository": {
|
|
78
77
|
"type": "git",
|
|
79
|
-
"url": "https://github.com/react-native-webview
|
|
78
|
+
"url": "https://github.com/bootpay/react-native-webview-bootpay"
|
|
80
79
|
},
|
|
81
80
|
"files": [
|
|
82
81
|
"android",
|
|
@@ -3,7 +3,6 @@ require 'json'
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
4
|
|
|
5
5
|
Pod::Spec.new do |s|
|
|
6
|
-
s.name = "react-native-webview-bootpay"
|
|
7
6
|
s.name = package['name']
|
|
8
7
|
s.version = package['version']
|
|
9
8
|
s.summary = package['description']
|
|
@@ -13,8 +12,7 @@ Pod::Spec.new do |s|
|
|
|
13
12
|
s.homepage = package['homepage']
|
|
14
13
|
s.platforms = { :ios => "9.0", :osx => "10.13" }
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
s.source = { :git => "https://github.com/bootpay/react-native-webview-bootpay.git", :tag => "#{s.version}" }
|
|
15
|
+
s.source = { :git => "https://github.com/react-native-webview/react-native-webview.git", :tag => "v#{s.version}" }
|
|
18
16
|
s.source_files = "apple/**/*.{h,m}"
|
|
19
17
|
|
|
20
18
|
s.dependency 'React-Core'
|
package/react-native.config.js
CHANGED
|
@@ -1,67 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const path = require('path');
|
|
19
|
-
|
|
20
|
-
const macSwitch = '--use-react-native-macos';
|
|
21
|
-
const windowsSwitch = '--use-react-native-windows';
|
|
22
|
-
|
|
23
|
-
if (process.argv.includes(macSwitch)) {
|
|
24
|
-
process.argv = process.argv.filter(arg => arg !== macSwitch);
|
|
25
|
-
process.argv.push('--config=metro.config.macos.js');
|
|
26
|
-
module.exports = {
|
|
27
|
-
reactNativePath: 'node_modules/react-native-macos',
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
else if (process.argv.includes(windowsSwitch)) {
|
|
31
|
-
process.argv = process.argv.filter(arg => arg !== windowsSwitch);
|
|
32
|
-
process.argv.push('--config=metro.config.windows.js');
|
|
33
|
-
module.exports = {
|
|
34
|
-
reactNativePath: 'node_modules/react-native-windows',
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
module.exports = {
|
|
39
|
-
project: {
|
|
1
|
+
const project = (() => {
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
try {
|
|
5
|
+
const {
|
|
6
|
+
androidManifestPath,
|
|
7
|
+
iosProjectPath,
|
|
8
|
+
windowsProjectPath,
|
|
9
|
+
} = require('react-native-test-app');
|
|
10
|
+
return {
|
|
11
|
+
android: {
|
|
12
|
+
sourceDir: path.join('example', 'android'),
|
|
13
|
+
manifestPath: androidManifestPath(
|
|
14
|
+
path.join(__dirname, 'example', 'android'),
|
|
15
|
+
),
|
|
16
|
+
},
|
|
40
17
|
ios: {
|
|
41
|
-
project: 'example/ios
|
|
18
|
+
project: iosProjectPath('example/ios'),
|
|
42
19
|
},
|
|
43
|
-
|
|
44
|
-
sourceDir: 'example
|
|
20
|
+
windows: fs.existsSync('example/windows/WebviewExample.sln') && {
|
|
21
|
+
sourceDir: path.join('example', 'windows'),
|
|
22
|
+
solutionFile: 'WebviewExample.sln',
|
|
23
|
+
project: windowsProjectPath(path.join(__dirname, 'example', 'windows')),
|
|
45
24
|
},
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
25
|
+
};
|
|
26
|
+
} catch (_) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
})();
|
|
49
30
|
|
|
50
|
-
module.exports
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
31
|
+
module.exports = {
|
|
32
|
+
dependencies: {
|
|
33
|
+
// Help rn-cli find and autolink this library
|
|
34
|
+
'react-native-webview': {
|
|
35
|
+
root: __dirname,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
dependency: {
|
|
39
|
+
platforms: {
|
|
40
|
+
windows: {
|
|
41
|
+
sourceDir: 'windows',
|
|
42
|
+
solutionFile: 'ReactNativeWebView.sln',
|
|
43
|
+
projects: [
|
|
44
|
+
{
|
|
45
|
+
projectFile: 'ReactNativeWebView/ReactNativeWebView.vcxproj',
|
|
46
|
+
directDependency: true,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
65
50
|
},
|
|
66
51
|
},
|
|
67
|
-
}
|
|
52
|
+
...(project ? { project } : undefined),
|
|
53
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
|
|
4
|
+
<!-- Flags can be added here to effect the compilation of Microsoft.ReactNative -->
|
|
5
|
+
<PropertyGroup Label="Microsoft.ReactNative Build Flags">
|
|
6
|
+
<UseWinUI3>false</UseWinUI3>
|
|
7
|
+
<UseHermes>false</UseHermes>
|
|
8
|
+
<WinUI2xVersion>2.8.0-prerelease.210927001</WinUI2xVersion>
|
|
9
|
+
<WebView2Version>1.0.1020.30</WebView2Version>
|
|
10
|
+
</PropertyGroup>
|
|
11
|
+
|
|
12
|
+
</Project>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
<Import Project="$(SolutionDir)\ExperimentalFeatures.props" Condition="Exists('$(SolutionDir)\ExperimentalFeatures.props')" />
|
|
3
4
|
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" />
|
|
4
5
|
<PropertyGroup Label="Globals">
|
|
5
6
|
<CppWinRTOptimized>true</CppWinRTOptimized>
|
|
6
7
|
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
|
|
7
8
|
<MinimalCoreWin>true</MinimalCoreWin>
|
|
8
|
-
<ProjectGuid>{
|
|
9
|
+
<ProjectGuid>{00AA3765-C6A0-4713-B3F9-BFE47B9C83F5}</ProjectGuid>
|
|
9
10
|
<ProjectName>ReactNativeWebView</ProjectName>
|
|
10
11
|
<RootNamespace>ReactNativeWebView</RootNamespace>
|
|
11
12
|
<DefaultLanguage>en-US</DefaultLanguage>
|
|
@@ -18,10 +19,6 @@
|
|
|
18
19
|
</PropertyGroup>
|
|
19
20
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
20
21
|
<ItemGroup Label="ProjectConfigurations">
|
|
21
|
-
<ProjectConfiguration Include="Debug|ARM">
|
|
22
|
-
<Configuration>Debug</Configuration>
|
|
23
|
-
<Platform>ARM</Platform>
|
|
24
|
-
</ProjectConfiguration>
|
|
25
22
|
<ProjectConfiguration Include="Debug|ARM64">
|
|
26
23
|
<Configuration>Debug</Configuration>
|
|
27
24
|
<Platform>ARM64</Platform>
|
|
@@ -34,10 +31,6 @@
|
|
|
34
31
|
<Configuration>Debug</Configuration>
|
|
35
32
|
<Platform>x64</Platform>
|
|
36
33
|
</ProjectConfiguration>
|
|
37
|
-
<ProjectConfiguration Include="Release|ARM">
|
|
38
|
-
<Configuration>Release</Configuration>
|
|
39
|
-
<Platform>ARM</Platform>
|
|
40
|
-
</ProjectConfiguration>
|
|
41
34
|
<ProjectConfiguration Include="Release|ARM64">
|
|
42
35
|
<Configuration>Release</Configuration>
|
|
43
36
|
<Platform>ARM64</Platform>
|
|
@@ -56,6 +49,7 @@
|
|
|
56
49
|
<PlatformToolset>v140</PlatformToolset>
|
|
57
50
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
|
|
58
51
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
|
|
52
|
+
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
|
|
59
53
|
<CharacterSet>Unicode</CharacterSet>
|
|
60
54
|
<GenerateManifest>false</GenerateManifest>
|
|
61
55
|
</PropertyGroup>
|
|
@@ -83,6 +77,10 @@
|
|
|
83
77
|
<ImportGroup Label="PropertySheets">
|
|
84
78
|
<Import Project="PropertySheet.props" />
|
|
85
79
|
</ImportGroup>
|
|
80
|
+
<ImportGroup Label="ReactNativeWindowsPropertySheets">
|
|
81
|
+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" />
|
|
82
|
+
<Import Project="$(SolutionDir)\packages\$(WinUIPackageProps)" Condition="'$(WinUIPackageProps)'!='' And Exists('$(SolutionDir)\packages\$(WinUIPackageProps)')" />
|
|
83
|
+
</ImportGroup>
|
|
86
84
|
<PropertyGroup Label="UserMacros" />
|
|
87
85
|
<PropertyGroup />
|
|
88
86
|
<ItemDefinitionGroup>
|
|
@@ -116,20 +114,20 @@
|
|
|
116
114
|
</ClCompile>
|
|
117
115
|
</ItemDefinitionGroup>
|
|
118
116
|
<ItemGroup>
|
|
119
|
-
<ClInclude Include="ReactWebView.h"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<ClInclude Include="ReactWebViewManager.h" />
|
|
117
|
+
<ClInclude Include="ReactWebView.h" />
|
|
118
|
+
<ClInclude Include="ReactWebView2.h" />
|
|
119
|
+
<ClInclude Include="ReactWebView2Manager.h" />
|
|
123
120
|
<ClInclude Include="pch.h" />
|
|
124
121
|
<ClInclude Include="ReactPackageProvider.h">
|
|
125
122
|
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
|
126
123
|
</ClInclude>
|
|
124
|
+
<ClInclude Include="ReactWebViewManager.h" />
|
|
125
|
+
<ClInclude Include="WebBridge.h" />
|
|
127
126
|
</ItemGroup>
|
|
128
127
|
<ItemGroup>
|
|
129
|
-
<ClCompile Include="ReactWebView.cpp"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<ClCompile Include="ReactWebViewManager.cpp" />
|
|
128
|
+
<ClCompile Include="ReactWebView.cpp" />
|
|
129
|
+
<ClCompile Include="ReactWebView2.cpp" />
|
|
130
|
+
<ClCompile Include="ReactWebView2Manager.cpp" />
|
|
133
131
|
<ClCompile Include="pch.cpp">
|
|
134
132
|
<PrecompiledHeader>Create</PrecompiledHeader>
|
|
135
133
|
</ClCompile>
|
|
@@ -137,15 +135,19 @@
|
|
|
137
135
|
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
|
138
136
|
</ClCompile>
|
|
139
137
|
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
|
138
|
+
<ClCompile Include="ReactWebViewManager.cpp" />
|
|
139
|
+
<ClCompile Include="WebBridge.cpp" />
|
|
140
140
|
</ItemGroup>
|
|
141
141
|
<ItemGroup>
|
|
142
142
|
<Midl Include="ReactWebView.idl" />
|
|
143
143
|
<Midl Include="ReactPackageProvider.idl" />
|
|
144
|
+
<Midl Include="WebBridge.idl" />
|
|
144
145
|
</ItemGroup>
|
|
145
146
|
<ItemGroup>
|
|
146
147
|
<None Include="packages.config" />
|
|
147
148
|
<None Include="ReactNativeWebView.def" />
|
|
148
149
|
</ItemGroup>
|
|
150
|
+
|
|
149
151
|
<ItemGroup>
|
|
150
152
|
<None Include="PropertySheet.props" />
|
|
151
153
|
</ItemGroup>
|
|
@@ -154,13 +156,24 @@
|
|
|
154
156
|
<Project>{f7d32bd0-2749-483e-9a0d-1635ef7e3136}</Project>
|
|
155
157
|
<Private>false</Private>
|
|
156
158
|
</ProjectReference>
|
|
157
|
-
<ProjectReference Include="..\WebViewBridgeComponent\WebViewBridgeComponent.vcxproj">
|
|
158
|
-
<Project>{176323cd-97ce-4b0f-9d11-a2b77bda829b}</Project>
|
|
159
|
-
</ProjectReference>
|
|
160
159
|
</ItemGroup>
|
|
161
160
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
161
|
+
<ImportGroup Label="ReactNativeWindowsTargets">
|
|
162
|
+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" />
|
|
163
|
+
</ImportGroup>
|
|
164
|
+
<Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
|
|
165
|
+
<PropertyGroup>
|
|
166
|
+
<ErrorText>This project references targets in your node_modules\react-native-windows folder that are missing. The missing file is {0}.</ErrorText>
|
|
167
|
+
</PropertyGroup>
|
|
168
|
+
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props'))" />
|
|
169
|
+
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets'))" />
|
|
170
|
+
</Target>
|
|
162
171
|
<ImportGroup Label="ExtensionTargets">
|
|
163
172
|
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
|
173
|
+
<Import Project="$(SolutionDir)packages\Microsoft.Web.WebView2.1.0.1020.30\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Web.WebView2.1.0.1020.30\build\native\Microsoft.Web.WebView2.targets')" />
|
|
174
|
+
<Import Project="$(SolutionDir)packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets" Condition="Exists('$(SolutionDir)packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets')" />
|
|
175
|
+
<Import Project="$(SolutionDir)\packages\Microsoft.ReactNative.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.targets" Condition="'$(UseExperimentalNuget)'=='true' And Exists('$(SolutionDir)\packages\Microsoft.ReactNative.Cxx.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.Cxx.targets')" />
|
|
176
|
+
<Import Project="$(SolutionDir)\packages\Microsoft.ReactNative.Cxx.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.Cxx.targets" Condition="'$(UseExperimentalNuget)'=='true' And Exists('$(SolutionDir)\packages\Microsoft.ReactNative.Cxx.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.Cxx.targets')" />
|
|
164
177
|
</ImportGroup>
|
|
165
178
|
<Target Name="Deploy" />
|
|
166
179
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
@@ -169,5 +182,9 @@
|
|
|
169
182
|
</PropertyGroup>
|
|
170
183
|
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props'))" />
|
|
171
184
|
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
|
185
|
+
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Web.WebView2.1.0.1020.30\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Web.WebView2.1.0.1020.30\build\native\Microsoft.Web.WebView2.targets'))" />
|
|
186
|
+
<Error Condition="!Exists('$(SolutionDir)packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets'))" />
|
|
187
|
+
<Error Condition="'$(UseExperimentalNuget)'=='true' And !Exists('$(SolutionDir)\packages\Microsoft.ReactNative.Cxx.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.Cxx.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.ReactNative.Cxx.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.Cxx.targets'))" />
|
|
188
|
+
<Error Condition="'$(UseExperimentalNuget)'=='true' And !Exists('$(SolutionDir)\packages\Microsoft.ReactNative.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.ReactNative.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.targets'))" />
|
|
172
189
|
</Target>
|
|
173
190
|
</Project>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
#include "ReactPackageProvider.g.cpp"
|
|
5
5
|
#endif
|
|
6
6
|
|
|
7
|
+
#include "ReactWebView2Manager.h"
|
|
7
8
|
#include "ReactWebViewManager.h"
|
|
8
9
|
|
|
9
10
|
using namespace winrt::Microsoft::ReactNative;
|
|
@@ -12,6 +13,9 @@ namespace winrt::ReactNativeWebView::implementation {
|
|
|
12
13
|
|
|
13
14
|
void ReactPackageProvider::CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept {
|
|
14
15
|
packageBuilder.AddViewManager(L"ReactWebViewManager", []() { return winrt::make<ReactWebViewManager>(); });
|
|
16
|
+
#if RNW_VERSION_AT_LEAST(0,68,0)
|
|
17
|
+
packageBuilder.AddViewManager(L"ReactWebView2Manager", []() { return winrt::make<ReactWebView2Manager>(); });
|
|
18
|
+
#endif
|
|
15
19
|
}
|
|
16
20
|
|
|
17
|
-
} // namespace winrt::ReactNativeWebView::implementation
|
|
21
|
+
} // namespace winrt::ReactNativeWebView::implementation
|
|
@@ -23,11 +23,7 @@ namespace winrt {
|
|
|
23
23
|
namespace winrt::ReactNativeWebView::implementation {
|
|
24
24
|
|
|
25
25
|
ReactWebView::ReactWebView(winrt::IReactContext const& reactContext) : m_reactContext(reactContext) {
|
|
26
|
-
#ifdef CHAKRACORE_UWP
|
|
27
|
-
m_webView = winrt::WebView(winrt::WebViewExecutionMode::SeparateProcess);
|
|
28
|
-
#else
|
|
29
26
|
m_webView = winrt::WebView();
|
|
30
|
-
#endif
|
|
31
27
|
this->Content(m_webView);
|
|
32
28
|
RegisterEvents();
|
|
33
29
|
}
|
|
@@ -63,7 +59,7 @@ namespace winrt::ReactNativeWebView::implementation {
|
|
|
63
59
|
});
|
|
64
60
|
}
|
|
65
61
|
|
|
66
|
-
bool Is17763OrHigher() {
|
|
62
|
+
bool ReactWebView::Is17763OrHigher() {
|
|
67
63
|
static std::optional<bool> hasUniversalAPIContract_v7;
|
|
68
64
|
|
|
69
65
|
if (!hasUniversalAPIContract_v7.has_value()) {
|
|
@@ -123,7 +119,7 @@ namespace winrt::ReactNativeWebView::implementation {
|
|
|
123
119
|
|
|
124
120
|
if (m_messagingEnabled) {
|
|
125
121
|
winrt::hstring windowAlert = L"window.alert = function (msg) {__REACT_WEB_VIEW_BRIDGE.postMessage(`{\"type\":\"__alert\",\"message\":\"${msg}\"}`)};";
|
|
126
|
-
winrt::hstring postMessage = L"window.
|
|
122
|
+
winrt::hstring postMessage = L"window.ReactNativeWebView = {postMessage: function (data) {__REACT_WEB_VIEW_BRIDGE.postMessage(String(data))}};";
|
|
127
123
|
webView.InvokeScriptAsync(L"eval", { windowAlert + postMessage });
|
|
128
124
|
}
|
|
129
125
|
}
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
#include "NativeModules.h"
|
|
8
8
|
#include "ReactWebView.g.h"
|
|
9
9
|
|
|
10
|
-
#include "winrt/
|
|
10
|
+
#include "winrt/ReactNativeWebView.h"
|
|
11
11
|
|
|
12
|
-
using namespace winrt::
|
|
12
|
+
using namespace winrt::ReactNativeWebView;
|
|
13
13
|
|
|
14
14
|
namespace winrt::ReactNativeWebView::implementation {
|
|
15
15
|
|
|
@@ -36,6 +36,7 @@ namespace winrt::ReactNativeWebView::implementation {
|
|
|
36
36
|
void OnNavigationCompleted(winrt::Windows::UI::Xaml::Controls::WebView const& sender, winrt::Windows::UI::Xaml::Controls::WebViewNavigationCompletedEventArgs const& args);
|
|
37
37
|
void OnNavigationFailed(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::Controls::WebViewNavigationFailedEventArgs const& args);
|
|
38
38
|
void OnMessagePosted(hstring const& message);
|
|
39
|
+
bool Is17763OrHigher();
|
|
39
40
|
};
|
|
40
41
|
} // namespace winrt::ReactNativeWebView::implementation
|
|
41
42
|
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
namespace ReactNativeWebView{
|
|
2
2
|
[default_interface]
|
|
3
|
-
runtimeclass ReactWebView : Windows.UI.Xaml.Controls.
|
|
3
|
+
runtimeclass ReactWebView : Windows.UI.Xaml.Controls.ContentPresenter{
|
|
4
4
|
ReactWebView(Microsoft.ReactNative.IReactContext context);
|
|
5
5
|
void SetMessagingEnabled(Boolean enabled);
|
|
6
6
|
};
|
|
7
|
+
#if __has_include(<VersionMacros.h>)
|
|
8
|
+
#include <VersionMacros.h>
|
|
9
|
+
#else
|
|
10
|
+
#define RNW_VERSION_AT_LEAST(x,y,z) false
|
|
11
|
+
#endif
|
|
12
|
+
#if RNW_VERSION_AT_LEAST(0,68,0)
|
|
13
|
+
[default_interface]
|
|
14
|
+
runtimeclass ReactWebView2 : Windows.UI.Xaml.Controls.ContentPresenter{
|
|
15
|
+
ReactWebView2(Microsoft.ReactNative.IReactContext context);
|
|
16
|
+
void NavigateToHtml(String html);
|
|
17
|
+
};
|
|
18
|
+
#endif
|
|
7
19
|
} // namespace ReactNativeWebView
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
#include "pch.h"
|
|
5
|
+
#if RNW_VERSION_AT_LEAST(0,68,0)
|
|
6
|
+
#include "JSValueXaml.h"
|
|
7
|
+
#include "ReactWebView2.h"
|
|
8
|
+
#include "ReactWebView2.g.cpp"
|
|
9
|
+
#include <winrt/Windows.Foundation.Metadata.h>
|
|
10
|
+
#include <optional>
|
|
11
|
+
|
|
12
|
+
namespace winrt {
|
|
13
|
+
using namespace Microsoft::ReactNative;
|
|
14
|
+
using namespace Windows::Foundation;
|
|
15
|
+
using namespace Windows::UI;
|
|
16
|
+
using namespace Windows::UI::Xaml;
|
|
17
|
+
using namespace Windows::UI::Xaml::Controls;
|
|
18
|
+
using namespace Microsoft::UI::Xaml::Controls;
|
|
19
|
+
using namespace Microsoft::Web::WebView2::Core;
|
|
20
|
+
} // namespace winrt
|
|
21
|
+
|
|
22
|
+
namespace winrt::ReactNativeWebView::implementation {
|
|
23
|
+
|
|
24
|
+
ReactWebView2::ReactWebView2(winrt::IReactContext const& reactContext) : m_reactContext(reactContext) {
|
|
25
|
+
m_webView = winrt::WebView2();
|
|
26
|
+
this->Content(m_webView);
|
|
27
|
+
RegisterEvents();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ReactWebView2::~ReactWebView2(){}
|
|
31
|
+
|
|
32
|
+
void ReactWebView2::RegisterEvents() {
|
|
33
|
+
m_navigationStartingRevoker = m_webView.NavigationStarting(
|
|
34
|
+
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args) {
|
|
35
|
+
if (auto self = ref.get()) {
|
|
36
|
+
self->OnNavigationStarting(sender, args);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
m_navigationCompletedRevoker = m_webView.NavigationCompleted(
|
|
42
|
+
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args) {
|
|
43
|
+
if (auto self = ref.get()) {
|
|
44
|
+
self->OnNavigationCompleted(sender, args);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
m_CoreWebView2InitializedRevoker = m_webView.CoreWebView2Initialized(
|
|
49
|
+
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args){
|
|
50
|
+
if (auto self = ref.get()) {
|
|
51
|
+
self->OnCoreWebView2Initialized(sender, args);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
bool ReactWebView2::Is17763OrHigher() {
|
|
57
|
+
static std::optional<bool> hasUniversalAPIContract_v7;
|
|
58
|
+
|
|
59
|
+
if (!hasUniversalAPIContract_v7.has_value()) {
|
|
60
|
+
hasUniversalAPIContract_v7 = winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
|
|
61
|
+
}
|
|
62
|
+
return hasUniversalAPIContract_v7.value();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
void ReactWebView2::WriteWebViewNavigationEventArg(winrt::WebView2 const& sender, winrt::IJSValueWriter const& eventDataWriter) {
|
|
66
|
+
auto tag = this->GetValue(winrt::FrameworkElement::TagProperty()).as<winrt::IPropertyValue>().GetInt64();
|
|
67
|
+
WriteProperty(eventDataWriter, L"canGoBack", sender.CanGoBack());
|
|
68
|
+
WriteProperty(eventDataWriter, L"canGoForward", sender.CanGoForward());
|
|
69
|
+
if (Is17763OrHigher()) {
|
|
70
|
+
WriteProperty(eventDataWriter, L"loading", !sender.IsLoaded());
|
|
71
|
+
}
|
|
72
|
+
WriteProperty(eventDataWriter, L"target", tag);
|
|
73
|
+
if (auto uri = sender.Source()) {
|
|
74
|
+
WriteProperty(eventDataWriter, L"url", uri.AbsoluteCanonicalUri());
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
void ReactWebView2::OnNavigationStarting(winrt::WebView2 const& webView, winrt::CoreWebView2NavigationStartingEventArgs const& args) {
|
|
79
|
+
m_reactContext.DispatchEvent(
|
|
80
|
+
*this,
|
|
81
|
+
L"topLoadingStart",
|
|
82
|
+
[&](winrt::IJSValueWriter const& eventDataWriter) noexcept {
|
|
83
|
+
eventDataWriter.WriteObjectBegin();
|
|
84
|
+
WriteWebViewNavigationEventArg(webView, eventDataWriter);
|
|
85
|
+
eventDataWriter.WriteObjectEnd();
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
void ReactWebView2::OnNavigationCompleted(winrt::WebView2 const& webView, winrt::CoreWebView2NavigationCompletedEventArgs const& args) {
|
|
90
|
+
m_reactContext.DispatchEvent(
|
|
91
|
+
*this,
|
|
92
|
+
L"topLoadingFinish",
|
|
93
|
+
[&](winrt::IJSValueWriter const& eventDataWriter) noexcept {
|
|
94
|
+
eventDataWriter.WriteObjectBegin();
|
|
95
|
+
WriteWebViewNavigationEventArg(webView, eventDataWriter);
|
|
96
|
+
eventDataWriter.WriteObjectEnd();
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
void ReactWebView2::OnCoreWebView2Initialized(winrt::Microsoft::UI::Xaml::Controls::WebView2 const& sender, winrt::Microsoft::UI::Xaml::Controls::CoreWebView2InitializedEventArgs const& args) {
|
|
101
|
+
assert(sender.CoreWebView2());
|
|
102
|
+
if (m_navigateToHtml != L"") {
|
|
103
|
+
m_webView.NavigateToString(m_navigateToHtml);
|
|
104
|
+
m_navigateToHtml = L"";
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
void ReactWebView2::NavigateToHtml(winrt::hstring html) {
|
|
109
|
+
if (m_webView.CoreWebView2()) {
|
|
110
|
+
m_webView.NavigateToString(html);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
m_webView.EnsureCoreWebView2Async();
|
|
114
|
+
m_navigateToHtml = html;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
} // namespace winrt::ReactNativeWebView::implementation
|
|
119
|
+
#endif
|