react-native-webview-bootpay 11.26.20 → 13.6.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.
Files changed (335) hide show
  1. package/README.md +9 -31
  2. package/android/build.gradle +70 -112
  3. package/android/gradle.properties +5 -6
  4. package/android/src/main/java/kr/co/bootpay/webview/BPCBasicAuthCredential.java +11 -0
  5. package/android/src/main/java/kr/co/bootpay/webview/BPCWebChromeClient.java +354 -434
  6. package/android/src/main/java/kr/co/bootpay/webview/BPCWebView.java +350 -259
  7. package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewClient.java +253 -399
  8. package/android/src/main/java/kr/co/bootpay/webview/{WebViewConfig.java → BPCWebViewConfig.java} +3 -4
  9. package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewFileProvider.java +1 -1
  10. package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewManager.java +290 -877
  11. package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewManagerImpl.kt +664 -0
  12. package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewModule.java +29 -520
  13. package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewModuleImpl.java +554 -0
  14. package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewPackage.java +56 -0
  15. package/android/src/main/java/kr/co/bootpay/webview/BootpayUrlHelper.java +122 -0
  16. package/android/src/main/java/kr/co/bootpay/webview/events/TopCustomMenuSelectionEvent.kt +24 -0
  17. package/android/src/main/java/kr/co/bootpay/webview/events/TopNewWindowEvent.kt +25 -0
  18. package/android/src/newarch/com/reactnativecommunity/webview/BPCWebViewManager.java +544 -0
  19. package/android/src/newarch/com/reactnativecommunity/webview/BPCWebViewModule.java +57 -0
  20. package/apple/BPCWebView.h +22 -126
  21. package/apple/BPCWebView.mm +528 -0
  22. package/apple/BPCWebViewDecisionManager.h +20 -0
  23. package/apple/BPCWebViewDecisionManager.m +47 -0
  24. package/apple/BPCWebViewImpl.h +150 -0
  25. package/apple/{BPCWebView.m → BPCWebViewImpl.m} +377 -210
  26. package/apple/BPCWebViewManager.h +4 -8
  27. package/apple/{BPCWebViewManager.m → BPCWebViewManager.mm} +93 -149
  28. package/ios/{BPCWebView.xcodeproj → RNCWebView.xcodeproj}/project.pbxproj +18 -18
  29. package/ios/main.jsbundle +457 -0
  30. package/lib/BPCWebViewNativeComponent.d.ts +242 -0
  31. package/lib/BPCWebViewNativeComponent.d.ts.map +1 -0
  32. package/lib/BPCWebViewNativeComponent.js +6 -0
  33. package/lib/NativeBPCWebView.d.ts +10 -0
  34. package/lib/NativeBPCWebView.d.ts.map +1 -0
  35. package/lib/NativeBPCWebView.js +2 -0
  36. package/lib/WebView.android.d.ts.map +1 -1
  37. package/lib/WebView.android.js +53 -29
  38. package/lib/WebView.ios.d.ts.map +1 -1
  39. package/lib/WebView.ios.js +49 -28
  40. package/lib/WebView.macos.d.ts.map +1 -1
  41. package/lib/WebView.macos.js +10 -14
  42. package/lib/WebView.windows.d.ts.map +1 -1
  43. package/lib/WebView.windows.js +4 -6
  44. package/lib/WebViewNativeComponent.macos.d.ts +2 -2
  45. package/lib/WebViewNativeComponent.macos.js +2 -2
  46. package/lib/WebViewShared.d.ts +4 -2
  47. package/lib/WebViewShared.d.ts.map +1 -1
  48. package/lib/WebViewShared.js +8 -2
  49. package/lib/WebViewTypes.d.ts +62 -95
  50. package/lib/WebViewTypes.d.ts.map +1 -1
  51. package/lib/WebViewTypes.js +0 -16
  52. package/macos/RNCWebView.xcodeproj/project.pbxproj +44 -44
  53. package/package.json +38 -20
  54. package/react-native-webview-bootpay.podspec +22 -3
  55. package/react-native.config.js +1 -2
  56. package/src/BPCWebViewNativeComponent.ts +281 -0
  57. package/src/NativeBPCWebView.ts +14 -0
  58. package/src/WebView.android.tsx +229 -0
  59. package/src/WebView.ios.tsx +232 -0
  60. package/src/WebView.macos.tsx +177 -0
  61. package/src/WebView.styles.ts +44 -0
  62. package/src/WebView.tsx +18 -0
  63. package/src/WebView.windows.tsx +156 -0
  64. package/src/WebViewNativeComponent.macos.ts +8 -0
  65. package/src/WebViewNativeComponent.windows.ts +10 -0
  66. package/src/WebViewShared.tsx +235 -0
  67. package/src/WebViewTypes.ts +1287 -0
  68. package/src/__tests__/WebViewShared-test.js +208 -0
  69. package/src/__tests__/__snapshots__/WebViewShared-test.js.snap +8 -0
  70. package/src/index.ts +4 -0
  71. package/windows/ReactNativeWebView/ReactNativeWebView.vcxproj +1 -1
  72. package/windows/ReactNativeWebView/ReactWebView.idl +1 -0
  73. package/windows/ReactNativeWebView/ReactWebView2.cpp +142 -19
  74. package/windows/ReactNativeWebView/ReactWebView2.h +3 -0
  75. package/windows/ReactNativeWebView/ReactWebView2Manager.cpp +29 -5
  76. package/windows/ReactNativeWebView/pch.h +1 -0
  77. package/android/.editorconfig +0 -6
  78. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/results.bin +0 -1
  79. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebChromeClient$1.dex +0 -0
  80. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebChromeClient.dex +0 -0
  81. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView$1.dex +0 -0
  82. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView$BPCWebViewBridge.dex +0 -0
  83. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView$ProgressChangedFilter.dex +0 -0
  84. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebView.dex +0 -0
  85. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewClient.dex +0 -0
  86. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewFileProvider.dex +0 -0
  87. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$1.dex +0 -0
  88. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$2.dex +0 -0
  89. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$3.dex +0 -0
  90. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager$4.dex +0 -0
  91. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewManager.dex +0 -0
  92. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$1.dex +0 -0
  93. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$2.dex +0 -0
  94. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$MimeType.dex +0 -0
  95. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.dex +0 -0
  96. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock.dex +0 -0
  97. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewModule.dex +0 -0
  98. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BPCWebViewPackage.dex +0 -0
  99. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BasicAuthCredential.dex +0 -0
  100. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/BuildConfig.dex +0 -0
  101. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/URLUtil.dex +0 -0
  102. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/WebViewConfig.dex +0 -0
  103. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent$Companion.dex +0 -0
  104. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent.dex +0 -0
  105. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent$Companion.dex +0 -0
  106. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent.dex +0 -0
  107. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent$Companion.dex +0 -0
  108. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent.dex +0 -0
  109. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent$Companion.dex +0 -0
  110. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent.dex +0 -0
  111. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent$Companion.dex +0 -0
  112. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent.dex +0 -0
  113. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopMessageEvent$Companion.dex +0 -0
  114. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopMessageEvent.dex +0 -0
  115. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent$Companion.dex +0 -0
  116. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent.dex +0 -0
  117. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent$Companion.dex +0 -0
  118. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent.dex +0 -0
  119. package/android/build/.transforms/547b28b34bd585663252523c1a7a53e6/transformed/desugar_graph.bin +0 -0
  120. package/android/build/.transforms/88c49d67076e4458a9ddee82f875eb6a/results.bin +0 -1
  121. package/android/build/.transforms/88c49d67076e4458a9ddee82f875eb6a/transformed/classes/classes.dex +0 -0
  122. package/android/build/.transforms/c0e86b44db04fcaf424a5b7ce79324f4/results.bin +0 -1
  123. package/android/build/generated/source/buildConfig/debug/kr/co/bootpay/webview/BuildConfig.java +0 -10
  124. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +0 -106
  125. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +0 -18
  126. package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +0 -4
  127. package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +0 -1
  128. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  129. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  130. package/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -1861
  131. package/android/build/intermediates/compiled_local_resources/debug/out/xml_file_provider_paths.xml.flat +0 -0
  132. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -2
  133. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  134. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  135. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  136. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
  137. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebChromeClient$1.class +0 -0
  138. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebChromeClient.class +0 -0
  139. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$1.class +0 -0
  140. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$BPCWebViewBridge.class +0 -0
  141. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView$ProgressChangedFilter.class +0 -0
  142. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebView.class +0 -0
  143. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewClient.class +0 -0
  144. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewFileProvider.class +0 -0
  145. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$1.class +0 -0
  146. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$2.class +0 -0
  147. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$3.class +0 -0
  148. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager$4.class +0 -0
  149. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewManager.class +0 -0
  150. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$1.class +0 -0
  151. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$2.class +0 -0
  152. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$MimeType.class +0 -0
  153. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.class +0 -0
  154. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock.class +0 -0
  155. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BPCWebViewModule.class +0 -0
  156. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BasicAuthCredential.class +0 -0
  157. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/BuildConfig.class +0 -0
  158. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/URLUtil.class +0 -0
  159. package/android/build/intermediates/javac/debug/classes/kr/co/bootpay/webview/WebViewConfig.class +0 -0
  160. package/android/build/intermediates/library_java_res/debug/res.jar +0 -0
  161. package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +0 -3
  162. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -210
  163. package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +0 -106
  164. package/android/build/intermediates/navigation_json/debug/navigation.json +0 -1
  165. package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +0 -18
  166. package/android/build/intermediates/packaged_res/debug/xml/file_provider_paths.xml +0 -6
  167. package/android/build/intermediates/runtime_library_classes_dir/debug/META-INF/react-native-webview-bootpay_debug.kotlin_module +0 -0
  168. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebChromeClient$1.class +0 -0
  169. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebChromeClient.class +0 -0
  170. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView$1.class +0 -0
  171. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView$BPCWebViewBridge.class +0 -0
  172. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView$ProgressChangedFilter.class +0 -0
  173. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebView.class +0 -0
  174. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewClient.class +0 -0
  175. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewFileProvider.class +0 -0
  176. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$1.class +0 -0
  177. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$2.class +0 -0
  178. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$3.class +0 -0
  179. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager$4.class +0 -0
  180. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewManager.class +0 -0
  181. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$1.class +0 -0
  182. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$2.class +0 -0
  183. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$MimeType.class +0 -0
  184. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.class +0 -0
  185. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule$ShouldOverrideUrlLoadingLock.class +0 -0
  186. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewModule.class +0 -0
  187. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BPCWebViewPackage.class +0 -0
  188. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BasicAuthCredential.class +0 -0
  189. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/BuildConfig.class +0 -0
  190. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/URLUtil.class +0 -0
  191. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/WebViewConfig.class +0 -0
  192. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent$Companion.class +0 -0
  193. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent.class +0 -0
  194. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent$Companion.class +0 -0
  195. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent.class +0 -0
  196. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent$Companion.class +0 -0
  197. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent.class +0 -0
  198. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent$Companion.class +0 -0
  199. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent.class +0 -0
  200. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent$Companion.class +0 -0
  201. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent.class +0 -0
  202. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopMessageEvent$Companion.class +0 -0
  203. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopMessageEvent.class +0 -0
  204. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent$Companion.class +0 -0
  205. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent.class +0 -0
  206. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent$Companion.class +0 -0
  207. package/android/build/intermediates/runtime_library_classes_dir/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent.class +0 -0
  208. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  209. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -1381
  210. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  211. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  212. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  213. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  214. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  215. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  216. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  217. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  218. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  219. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  220. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  221. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  222. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  223. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  224. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  225. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  226. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  227. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  228. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  229. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  230. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  231. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  232. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  233. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  234. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  235. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  236. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  237. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  238. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  239. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  240. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  241. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  242. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  243. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  244. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  245. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab +0 -0
  246. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream +0 -0
  247. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len +0 -0
  248. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len +0 -0
  249. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at +0 -0
  250. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i +0 -0
  251. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i.len +0 -0
  252. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  253. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  254. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  255. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  256. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  257. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  258. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  259. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  260. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  261. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  262. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  263. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  264. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  265. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  266. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  267. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  268. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  269. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  270. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  271. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  272. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  273. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  274. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  275. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  276. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  277. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  278. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  279. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  280. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  281. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  282. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  283. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  284. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  285. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  286. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  287. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  288. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  289. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  290. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  291. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  292. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  293. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  294. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  295. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  296. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  297. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  298. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  299. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  300. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  301. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  302. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  303. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  304. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -229
  305. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  306. package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-webview-bootpay_debug.kotlin_module +0 -0
  307. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/BPCWebViewPackage.class +0 -0
  308. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent$Companion.class +0 -0
  309. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopHttpErrorEvent.class +0 -0
  310. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent$Companion.class +0 -0
  311. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingErrorEvent.class +0 -0
  312. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent$Companion.class +0 -0
  313. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingFinishEvent.class +0 -0
  314. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent$Companion.class +0 -0
  315. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingProgressEvent.class +0 -0
  316. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent$Companion.class +0 -0
  317. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopLoadingStartEvent.class +0 -0
  318. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopMessageEvent$Companion.class +0 -0
  319. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopMessageEvent.class +0 -0
  320. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent$Companion.class +0 -0
  321. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopRenderProcessGoneEvent.class +0 -0
  322. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent$Companion.class +0 -0
  323. package/android/build/tmp/kotlin-classes/debug/kr/co/bootpay/webview/events/TopShouldStartLoadWithRequestEvent.class +0 -0
  324. package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewPackage.kt +0 -15
  325. package/android/src/main/java/kr/co/bootpay/webview/BasicAuthCredential.java +0 -11
  326. package/ios/BPCWebView.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  327. package/ios/BPCWebView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  328. package/ios/BPCWebView.xcodeproj/project.xcworkspace/xcuserdata/ehowlsla.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  329. package/ios/BPCWebView.xcodeproj/xcuserdata/ehowlsla.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  330. package/lib/WebViewNativeComponent.android.d.ts +0 -4
  331. package/lib/WebViewNativeComponent.android.d.ts.map +0 -1
  332. package/lib/WebViewNativeComponent.android.js +0 -3
  333. package/lib/WebViewNativeComponent.ios.d.ts +0 -4
  334. package/lib/WebViewNativeComponent.ios.d.ts.map +0 -1
  335. package/lib/WebViewNativeComponent.ios.js +0 -3
@@ -0,0 +1,1287 @@
1
+ /* eslint-disable react/no-multi-comp, max-classes-per-file */
2
+
3
+ import { ReactElement, Component, ComponentProps } from 'react';
4
+ import {
5
+ NativeSyntheticEvent,
6
+ ViewProps,
7
+ StyleProp,
8
+ ViewStyle,
9
+ NativeMethodsMixin,
10
+ UIManagerStatic,
11
+ NativeScrollEvent,
12
+ } from 'react-native';
13
+
14
+ import type NativeWebViewComponent from './BPCWebViewNativeComponent'
15
+
16
+ type WebViewCommands =
17
+ | 'goForward'
18
+ | 'goBack'
19
+ | 'reload'
20
+ | 'stopLoading'
21
+ | 'postMessage'
22
+ | 'injectJavaScript'
23
+ | 'loadUrl'
24
+ | 'requestFocus'
25
+ | 'clearCache';
26
+
27
+ type AndroidWebViewCommands = 'clearHistory' | 'clearFormData';
28
+
29
+ interface BPCWebViewUIManager<Commands extends string> extends UIManagerStatic {
30
+ getViewManagerConfig: (name: string) => {
31
+ Commands: { [key in Commands]: number };
32
+ };
33
+ }
34
+
35
+ export type BPCWebViewUIManagerAndroid = BPCWebViewUIManager<
36
+ WebViewCommands | AndroidWebViewCommands
37
+ >;
38
+ export type BPCWebViewUIManagerIOS = BPCWebViewUIManager<WebViewCommands>;
39
+ export type BPCWebViewUIManagerMacOS = BPCWebViewUIManager<WebViewCommands>;
40
+ export type BPCWebViewUIManagerWindows = BPCWebViewUIManager<WebViewCommands>;
41
+
42
+ type WebViewState = 'IDLE' | 'LOADING' | 'ERROR';
43
+
44
+ interface BaseState {
45
+ viewState: WebViewState;
46
+ }
47
+
48
+ interface NormalState extends BaseState {
49
+ viewState: 'IDLE' | 'LOADING';
50
+ lastErrorEvent: WebViewError | null;
51
+ }
52
+
53
+ interface ErrorState extends BaseState {
54
+ viewState: 'ERROR';
55
+ lastErrorEvent: WebViewError;
56
+ }
57
+
58
+ export type State = NormalState | ErrorState;
59
+
60
+ // eslint-disable-next-line @typescript-eslint/no-type-alias, @typescript-eslint/no-explicit-any
61
+ type Constructor<T> = new (...args: any[]) => T;
62
+
63
+ // eslint-disable-next-line react/prefer-stateless-function
64
+ declare class NativeWebViewMacOSComponent extends Component<MacOSNativeWebViewProps> {}
65
+ declare const NativeWebViewMacOSBase: Constructor<NativeMethodsMixin> &
66
+ typeof NativeWebViewMacOSComponent;
67
+ export class NativeWebViewMacOS extends NativeWebViewMacOSBase {}
68
+
69
+ // eslint-disable-next-line react/prefer-stateless-function
70
+ declare class NativeWebViewWindowsComponent extends Component<WindowsNativeWebViewProps> {}
71
+ declare const NativeWebViewWindowsBase: Constructor<NativeMethodsMixin> &
72
+ typeof NativeWebViewWindowsComponent;
73
+ export class NativeWebViewWindows extends NativeWebViewWindowsBase {}
74
+
75
+ export interface ContentInsetProp {
76
+ top?: number;
77
+ left?: number;
78
+ bottom?: number;
79
+ right?: number;
80
+ }
81
+
82
+ export interface WebViewNativeEvent {
83
+ url: string;
84
+ loading: boolean;
85
+ title: string;
86
+ canGoBack: boolean;
87
+ canGoForward: boolean;
88
+ lockIdentifier: number;
89
+ }
90
+
91
+ export interface WebViewNativeProgressEvent extends WebViewNativeEvent {
92
+ progress: number;
93
+ }
94
+
95
+ export interface WebViewNavigation extends WebViewNativeEvent {
96
+ navigationType:
97
+ | 'click'
98
+ | 'formsubmit'
99
+ | 'backforward'
100
+ | 'reload'
101
+ | 'formresubmit'
102
+ | 'other';
103
+ mainDocumentURL?: string;
104
+ }
105
+
106
+ export interface ShouldStartLoadRequest extends WebViewNavigation {
107
+ isTopFrame: boolean;
108
+ }
109
+
110
+ export interface FileDownload {
111
+ downloadUrl: string;
112
+ }
113
+
114
+ export type DecelerationRateConstant = 'normal' | 'fast';
115
+
116
+ export interface WebViewMessage extends WebViewNativeEvent {
117
+ data: string;
118
+ }
119
+
120
+ export interface WebViewError extends WebViewNativeEvent {
121
+ /**
122
+ * `domain` is only used on iOS and macOS
123
+ */
124
+ domain?: string;
125
+ code: number;
126
+ description: string;
127
+ }
128
+
129
+ export interface WebViewHttpError extends WebViewNativeEvent {
130
+ description: string;
131
+ statusCode: number;
132
+ }
133
+
134
+ export interface WebViewRenderProcessGoneDetail {
135
+ didCrash: boolean;
136
+ }
137
+
138
+ export interface WebViewOpenWindow {
139
+ targetUrl: string;
140
+ }
141
+
142
+ export type WebViewEvent = NativeSyntheticEvent<WebViewNativeEvent>;
143
+
144
+ export type WebViewProgressEvent =
145
+ NativeSyntheticEvent<WebViewNativeProgressEvent>;
146
+
147
+ export type WebViewNavigationEvent = NativeSyntheticEvent<WebViewNavigation>;
148
+
149
+ export type ShouldStartLoadRequestEvent =
150
+ NativeSyntheticEvent<ShouldStartLoadRequest>;
151
+
152
+ export type FileDownloadEvent = NativeSyntheticEvent<FileDownload>;
153
+
154
+ export type WebViewMessageEvent = NativeSyntheticEvent<WebViewMessage>;
155
+
156
+ export type WebViewErrorEvent = NativeSyntheticEvent<WebViewError>;
157
+
158
+ export type WebViewTerminatedEvent = NativeSyntheticEvent<WebViewNativeEvent>;
159
+
160
+ export type WebViewHttpErrorEvent = NativeSyntheticEvent<WebViewHttpError>;
161
+
162
+ export type WebViewRenderProcessGoneEvent =
163
+ NativeSyntheticEvent<WebViewRenderProcessGoneDetail>;
164
+
165
+ export type WebViewOpenWindowEvent = NativeSyntheticEvent<WebViewOpenWindow>;
166
+
167
+ export type WebViewScrollEvent = NativeSyntheticEvent<NativeScrollEvent>;
168
+
169
+ export type DataDetectorTypes =
170
+ | 'phoneNumber'
171
+ | 'link'
172
+ | 'address'
173
+ | 'calendarEvent'
174
+ | 'trackingNumber'
175
+ | 'flightNumber'
176
+ | 'lookupSuggestion'
177
+ | 'none'
178
+ | 'all';
179
+
180
+ export type OverScrollModeType = 'always' | 'content' | 'never';
181
+
182
+ export type CacheMode =
183
+ | 'LOAD_DEFAULT'
184
+ | 'LOAD_CACHE_ONLY'
185
+ | 'LOAD_CACHE_ELSE_NETWORK'
186
+ | 'LOAD_NO_CACHE';
187
+
188
+ export type AndroidLayerType = 'none' | 'software' | 'hardware';
189
+
190
+ export interface WebViewSourceUri {
191
+ /**
192
+ * The URI to load in the `WebView`. Can be a local or remote file.
193
+ */
194
+ uri: string;
195
+
196
+ /**
197
+ * The HTTP Method to use. Defaults to GET if not specified.
198
+ * NOTE: On Android, only GET and POST are supported.
199
+ */
200
+ method?: string;
201
+
202
+ /**
203
+ * Additional HTTP headers to send with the request.
204
+ * NOTE: On Android, this can only be used with GET requests.
205
+ */
206
+ headers?: Object;
207
+
208
+ /**
209
+ * The HTTP body to send with the request. This must be a valid
210
+ * UTF-8 string, and will be sent exactly as specified, with no
211
+ * additional encoding (e.g. URL-escaping or base64) applied.
212
+ * NOTE: On Android, this can only be used with POST requests.
213
+ */
214
+ body?: string;
215
+ }
216
+
217
+ export interface WebViewSourceHtml {
218
+ /**
219
+ * A static HTML page to display in the WebView.
220
+ */
221
+ html: string;
222
+ /**
223
+ * The base URL to be used for any relative links in the HTML.
224
+ */
225
+ baseUrl?: string;
226
+ }
227
+
228
+ export interface WebViewCustomMenuItems {
229
+ /**
230
+ * The unique key that will be added as a selector on the webview
231
+ * Returned by the `onCustomMenuSelection` callback
232
+ */
233
+ key: string;
234
+ /**
235
+ * The label to appear on the UI Menu when selecting text
236
+ */
237
+ label: string;
238
+ }
239
+
240
+ export declare type SuppressMenuItem =
241
+ | "cut"
242
+ | "copy"
243
+ | "paste"
244
+ | "replace"
245
+ | "bold"
246
+ | "italic"
247
+ | "underline"
248
+ | "select"
249
+ | "selectAll"
250
+ | "translate"
251
+ | "lookup"
252
+ | "share";
253
+
254
+ export type WebViewSource = WebViewSourceUri | WebViewSourceHtml;
255
+
256
+ export interface ViewManager {
257
+ shouldStartLoadWithLockIdentifier: Function;
258
+ }
259
+
260
+ export interface WebViewNativeConfig {
261
+ /**
262
+ * The native component used to render the WebView.
263
+ */
264
+ component?:
265
+ | typeof NativeWebViewMacOS
266
+ | typeof NativeWebViewComponent;
267
+ /**
268
+ * Set props directly on the native component WebView. Enables custom props which the
269
+ * original WebView doesn't pass through.
270
+ */
271
+ props?: Object;
272
+ /**
273
+ * Set the ViewManager to use for communication with the native side.
274
+ * @platform ios, macos
275
+ */
276
+ viewManager?: ViewManager;
277
+ }
278
+
279
+ export type OnShouldStartLoadWithRequest = (
280
+ event: ShouldStartLoadRequest,
281
+ ) => boolean;
282
+
283
+ export interface BasicAuthCredential {
284
+ /**
285
+ * A username used for basic authentication.
286
+ */
287
+ username: string;
288
+
289
+ /**
290
+ * A password used for basic authentication.
291
+ */
292
+ password: string;
293
+ }
294
+
295
+ export interface CommonNativeWebViewProps extends ViewProps {
296
+ cacheEnabled?: boolean;
297
+ incognito?: boolean;
298
+ injectedJavaScript?: string;
299
+ injectedJavaScriptBeforeContentLoaded?: string;
300
+ injectedJavaScriptForMainFrameOnly?: boolean;
301
+ injectedJavaScriptBeforeContentLoadedForMainFrameOnly?: boolean;
302
+ javaScriptCanOpenWindowsAutomatically?: boolean;
303
+ mediaPlaybackRequiresUserAction?: boolean;
304
+ webviewDebuggingEnabled?: boolean;
305
+ messagingEnabled: boolean;
306
+ onScroll?: (event: WebViewScrollEvent) => void;
307
+ onLoadingError: (event: WebViewErrorEvent) => void;
308
+ onLoadingFinish: (event: WebViewNavigationEvent) => void;
309
+ onLoadingProgress: (event: WebViewProgressEvent) => void;
310
+ onLoadingStart: (event: WebViewNavigationEvent) => void;
311
+ onHttpError: (event: WebViewHttpErrorEvent) => void;
312
+ onMessage: (event: WebViewMessageEvent) => void;
313
+ onShouldStartLoadWithRequest: (event: ShouldStartLoadRequestEvent) => void;
314
+ showsHorizontalScrollIndicator?: boolean;
315
+ showsVerticalScrollIndicator?: boolean;
316
+ // TODO: find a better way to type this.
317
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
318
+ source: any;
319
+ userAgent?: string;
320
+ /**
321
+ * Append to the existing user-agent. Overridden if `userAgent` is set.
322
+ */
323
+ applicationNameForUserAgent?: string;
324
+ basicAuthCredential?: BasicAuthCredential;
325
+ }
326
+
327
+ export declare type ContentInsetAdjustmentBehavior =
328
+ | 'automatic'
329
+ | 'scrollableAxes'
330
+ | 'never'
331
+ | 'always';
332
+
333
+ export declare type MediaCapturePermissionGrantType =
334
+ | 'grantIfSameHostElsePrompt'
335
+ | 'grantIfSameHostElseDeny'
336
+ | 'deny'
337
+ | 'grant'
338
+ | 'prompt';
339
+
340
+ export declare type ContentMode = 'recommended' | 'mobile' | 'desktop';
341
+
342
+ export interface MacOSNativeWebViewProps extends CommonNativeWebViewProps {
343
+ allowingReadAccessToURL?: string;
344
+ allowFileAccessFromFileURLs?: boolean;
345
+ allowUniversalAccessFromFileURLs?: boolean;
346
+ allowsBackForwardNavigationGestures?: boolean;
347
+ allowsInlineMediaPlayback?: boolean;
348
+ allowsAirPlayForMediaPlayback?: boolean;
349
+ allowsLinkPreview?: boolean;
350
+ automaticallyAdjustContentInsets?: boolean;
351
+ bounces?: boolean;
352
+ contentInset?: ContentInsetProp;
353
+ contentInsetAdjustmentBehavior?: ContentInsetAdjustmentBehavior;
354
+ directionalLockEnabled?: boolean;
355
+ hideKeyboardAccessoryView?: boolean;
356
+ javaScriptEnabled?: boolean;
357
+ pagingEnabled?: boolean;
358
+ scrollEnabled?: boolean;
359
+ useSharedProcessPool?: boolean;
360
+ onContentProcessDidTerminate?: (event: WebViewTerminatedEvent) => void;
361
+ }
362
+
363
+ export interface WindowsNativeWebViewProps extends CommonNativeWebViewProps {
364
+ testID?: string;
365
+ }
366
+
367
+ export interface WindowsWebViewProps extends WebViewSharedProps {
368
+ useWebView2?: boolean;
369
+ }
370
+
371
+ export interface IOSWebViewProps extends WebViewSharedProps {
372
+ /**
373
+ * Does not store any data within the lifetime of the WebView.
374
+ */
375
+ incognito?: boolean;
376
+
377
+ /**
378
+ * Boolean value that determines whether the web view bounces
379
+ * when it reaches the edge of the content. The default value is `true`.
380
+ * @platform ios
381
+ */
382
+ bounces?: boolean;
383
+
384
+ /**
385
+ * A floating-point number that determines how quickly the scroll view
386
+ * decelerates after the user lifts their finger. You may also use the
387
+ * string shortcuts `"normal"` and `"fast"` which match the underlying iOS
388
+ * settings for `UIScrollViewDecelerationRateNormal` and
389
+ * `UIScrollViewDecelerationRateFast` respectively:
390
+ *
391
+ * - normal: 0.998
392
+ * - fast: 0.99 (the default for iOS web view)
393
+ * @platform ios
394
+ */
395
+ decelerationRate?: DecelerationRateConstant | number;
396
+
397
+ /**
398
+ * Boolean value that determines whether scrolling is enabled in the
399
+ * `WebView`. The default value is `true`.
400
+ * @platform ios
401
+ */
402
+ scrollEnabled?: boolean;
403
+
404
+ /**
405
+ * If the value of this property is true, the scroll view stops on multiples
406
+ * of the scroll view’s bounds when the user scrolls.
407
+ * The default value is false.
408
+ * @platform ios
409
+ */
410
+ pagingEnabled?: boolean;
411
+
412
+ /**
413
+ * Controls whether to adjust the content inset for web views that are
414
+ * placed behind a navigation bar, tab bar, or toolbar. The default value
415
+ * is `true`.
416
+ * @platform ios
417
+ */
418
+ automaticallyAdjustContentInsets?: boolean;
419
+
420
+ /**
421
+ * Controls whether to adjust the scroll indicator inset for web views that are
422
+ * placed behind a navigation bar, tab bar, or toolbar. The default value
423
+ * is `false`. (iOS 13+)
424
+ * @platform ios
425
+ */
426
+ automaticallyAdjustsScrollIndicatorInsets?: boolean;
427
+
428
+ /**
429
+ * This property specifies how the safe area insets are used to modify the
430
+ * content area of the scroll view. The default value of this property is
431
+ * "never". Available on iOS 11 and later.
432
+ */
433
+ contentInsetAdjustmentBehavior?: ContentInsetAdjustmentBehavior;
434
+
435
+ /**
436
+ * The amount by which the web view content is inset from the edges of
437
+ * the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
438
+ * @platform ios
439
+ */
440
+ contentInset?: ContentInsetProp;
441
+
442
+ /**
443
+ * Defaults to `recommended`, which loads mobile content on iPhone
444
+ * and iPad Mini but desktop content on other iPads.
445
+ *
446
+ * Possible values are:
447
+ * - `'recommended'`
448
+ * - `'mobile'`
449
+ * - `'desktop'`
450
+ * @platform ios
451
+ */
452
+ contentMode?: ContentMode;
453
+
454
+ /**
455
+ * Determines the types of data converted to clickable URLs in the web view's content.
456
+ * By default only phone numbers are detected.
457
+ *
458
+ * You can provide one type or an array of many types.
459
+ *
460
+ * Possible values for `dataDetectorTypes` are:
461
+ *
462
+ * - `'phoneNumber'`
463
+ * - `'link'`
464
+ * - `'address'`
465
+ * - `'calendarEvent'`
466
+ * - `'none'`
467
+ * - `'all'`
468
+ *
469
+ * With the new WebKit implementation, we have three new values:
470
+ * - `'trackingNumber'`,
471
+ * - `'flightNumber'`,
472
+ * - `'lookupSuggestion'`,
473
+ *
474
+ * @platform ios
475
+ */
476
+ readonly dataDetectorTypes?: DataDetectorTypes | DataDetectorTypes[];
477
+
478
+ /**
479
+ * Boolean that determines whether HTML5 videos play inline or use the
480
+ * native full-screen controller. The default value is `false`.
481
+ *
482
+ * **NOTE** : In order for video to play inline, not only does this
483
+ * property need to be set to `true`, but the video element in the HTML
484
+ * document must also include the `webkit-playsinline` attribute.
485
+ * @platform ios
486
+ */
487
+ allowsInlineMediaPlayback?: boolean;
488
+ /**
489
+ * A Boolean value indicating whether AirPlay is allowed. The default value is `false`.
490
+ * @platform ios
491
+ */
492
+ allowsAirPlayForMediaPlayback?: boolean;
493
+ /**
494
+ * Hide the accessory view when the keyboard is open. Default is false to be
495
+ * backward compatible.
496
+ */
497
+ hideKeyboardAccessoryView?: boolean;
498
+ /**
499
+ * A Boolean value indicating whether horizontal swipe gestures will trigger
500
+ * back-forward list navigations.
501
+ */
502
+ allowsBackForwardNavigationGestures?: boolean;
503
+ /**
504
+ * A Boolean value indicating whether WebKit WebView should be created using a shared
505
+ * process pool, enabling WebViews to share cookies and localStorage between each other.
506
+ * Default is true but can be set to false for backwards compatibility.
507
+ * @platform ios
508
+ */
509
+ useSharedProcessPool?: boolean;
510
+
511
+ /**
512
+ * The custom user agent string.
513
+ * @platform ios
514
+ */
515
+ userAgent?: string;
516
+
517
+ /**
518
+ * A Boolean value that determines whether pressing on a link
519
+ * displays a preview of the destination for the link.
520
+ *
521
+ * This property is available on devices that support 3D Touch.
522
+ * In iOS 10 and later, the default value is `true`; before that, the default value is `false`.
523
+ * @platform ios
524
+ */
525
+ allowsLinkPreview?: boolean;
526
+
527
+ /**
528
+ * Set true if shared cookies from HTTPCookieStorage should used for every load request.
529
+ * The default value is `false`.
530
+ * @platform ios
531
+ */
532
+ sharedCookiesEnabled?: boolean;
533
+
534
+ /**
535
+ * When set to true the hardware silent switch is ignored.
536
+ * The default value is `false`.
537
+ * @platform ios
538
+ */
539
+ ignoreSilentHardwareSwitch?: boolean;
540
+
541
+ /**
542
+ * Set true if StatusBar should be light when user watch video fullscreen.
543
+ * The default value is `true`.
544
+ * @platform ios
545
+ */
546
+ autoManageStatusBarEnabled?: boolean;
547
+
548
+ /**
549
+ * A Boolean value that determines whether scrolling is disabled in a particular direction.
550
+ * The default value is `true`.
551
+ * @platform ios
552
+ */
553
+ directionalLockEnabled?: boolean;
554
+
555
+ /**
556
+ * A Boolean value indicating whether web content can programmatically display the keyboard.
557
+ *
558
+ * When this property is set to true, the user must explicitly tap the elements in the
559
+ * web view to display the keyboard (or other relevant input view) for that element.
560
+ * When set to false, a focus event on an element causes the input view to be displayed
561
+ * and associated with that element automatically.
562
+ *
563
+ * The default value is `true`.
564
+ * @platform ios
565
+ */
566
+ keyboardDisplayRequiresUserAction?: boolean;
567
+
568
+ /**
569
+ * A String value that indicates which URLs the WebView's file can then
570
+ * reference in scripts, AJAX requests, and CSS imports. This is only used
571
+ * for WebViews that are loaded with a source.uri set to a `'file://'` URL.
572
+ *
573
+ * If not provided, the default is to only allow read access to the URL
574
+ * provided in source.uri itself.
575
+ * @platform ios
576
+ */
577
+ allowingReadAccessToURL?: string;
578
+
579
+ /**
580
+ * Boolean that sets whether JavaScript running in the context of a file
581
+ * scheme URL should be allowed to access content from other file scheme URLs.
582
+ * Including accessing content from other file scheme URLs
583
+ * @platform ios
584
+ */
585
+ allowFileAccessFromFileURLs?: boolean;
586
+
587
+ /**
588
+ * Boolean that sets whether JavaScript running in the context of a file
589
+ * scheme URL should be allowed to access content from any origin.
590
+ * Including accessing content from other file scheme URLs
591
+ * @platform ios
592
+ */
593
+ allowUniversalAccessFromFileURLs?: boolean;
594
+
595
+ /**
596
+ * Function that is invoked when the WebKit WebView content process gets terminated.
597
+ * @platform ios
598
+ */
599
+ onContentProcessDidTerminate?: (event: WebViewTerminatedEvent) => void;
600
+
601
+ /**
602
+ * Function that is invoked when the `WebView` should open a new window.
603
+ *
604
+ * This happens when the JS calls `window.open('http://someurl', '_blank')`
605
+ * or when the user clicks on a `<a href="http://someurl" target="_blank">` link.
606
+ *
607
+ * @platform ios
608
+ */
609
+ onOpenWindow?: (event: WebViewOpenWindowEvent) => void;
610
+
611
+ /**
612
+ * If `true` (default), loads the `injectedJavaScript` only into the main frame.
613
+ * If `false`, loads it into all frames (e.g. iframes).
614
+ * @platform ios
615
+ */
616
+ injectedJavaScriptForMainFrameOnly?: boolean;
617
+
618
+ /**
619
+ * If `true` (default), loads the `injectedJavaScriptBeforeContentLoaded` only into the main frame.
620
+ * If `false`, loads it into all frames (e.g. iframes).
621
+ * @platform ios
622
+ */
623
+ injectedJavaScriptBeforeContentLoadedForMainFrameOnly?: boolean;
624
+
625
+ /**
626
+ * Boolean value that determines whether a pull to refresh gesture is
627
+ * available in the `WebView`. The default value is `false`.
628
+ * If `true`, sets `bounces` automatically to `true`
629
+ * @platform ios
630
+ *
631
+ */
632
+ pullToRefreshEnabled?: boolean;
633
+
634
+ /**
635
+ * Function that is invoked when the client needs to download a file.
636
+ *
637
+ * iOS 13+ only: If the webview navigates to a URL that results in an HTTP
638
+ * response with a Content-Disposition header 'attachment...', then
639
+ * this will be called.
640
+ *
641
+ * iOS 8+: If the MIME type indicates that the content is not renderable by the
642
+ * webview, that will also cause this to be called. On iOS versions before 13,
643
+ * this is the only condition that will cause this function to be called.
644
+ *
645
+ * The application will need to provide its own code to actually download
646
+ * the file.
647
+ *
648
+ * If not provided, the default is to let the webview try to render the file.
649
+ */
650
+ onFileDownload?: (event: FileDownloadEvent) => void;
651
+
652
+ /**
653
+ * A Boolean value which, when set to `true`, indicates to WebKit that a WKWebView
654
+ * will only navigate to app-bound domains. Once set, any attempt to navigate away
655
+ * from an app-bound domain will fail with the error “App-bound domain failure.”
656
+ *
657
+ * Applications can specify up to 10 “app-bound” domains using a new
658
+ * Info.plist key `WKAppBoundDomains`.
659
+ * @platform ios
660
+ */
661
+ limitsNavigationsToAppBoundDomains?: boolean;
662
+
663
+ /**
664
+ * If false indicates to WebKit that a WKWebView will not interact with text, thus
665
+ * not showing a text selection loop. Only applicable for iOS 14.5 or greater.
666
+ *
667
+ * Defaults to true.
668
+ * @platform ios
669
+ */
670
+ textInteractionEnabled?: boolean;
671
+
672
+ /**
673
+ * This property specifies how to handle media capture permission requests.
674
+ * Defaults to `prompt`, resulting in the user being prompted repeatedly.
675
+ * Available on iOS 15 and later.
676
+ */
677
+ mediaCapturePermissionGrantType?: MediaCapturePermissionGrantType;
678
+
679
+ /**
680
+ * A Boolean value which, when set to `true`, WebView will be rendered with Apple Pay support.
681
+ * Once set, websites will be able to invoke apple pay from React Native Webview.
682
+ * This comes with a cost features like `injectJavaScript`, html5 History,`sharedCookiesEnabled`,
683
+ * `injectedJavaScript`, `injectedJavaScriptBeforeContentLoaded` will not work
684
+ * {@link https://developer.apple.com/documentation/safari-release-notes/safari-13-release-notes#Payment-Request-API ApplePay Doc}
685
+ * if you require to send message to App , webpage has to explicitly call webkit message handler
686
+ * and receive it on `onMessage` handler on react native side
687
+ * @example
688
+ * window.webkit.messageHandlers.ReactNativeWebView.postMessage("hello apple pay")
689
+ * @platform ios
690
+ * The default value is false.
691
+ */
692
+ enableApplePay?: boolean;
693
+
694
+ /**
695
+ * An array of objects which will be shown when selecting text. An empty array will suppress the menu.
696
+ * These will appear after a long press to select text.
697
+ * @platform ios, android
698
+ */
699
+ menuItems?: WebViewCustomMenuItems[];
700
+
701
+ /**
702
+ * An array of strings which will be suppressed from the menu.
703
+ * @platform ios
704
+ */
705
+ suppressMenuItems?: SuppressMenuItem[];
706
+
707
+ /**
708
+ * The function fired when selecting a custom menu item created by `menuItems`.
709
+ * It passes a WebViewEvent with a `nativeEvent`, where custom keys are passed:
710
+ * `customMenuKey`: the string of the menu item
711
+ * `selectedText`: the text selected on the document
712
+ * @platform ios, android
713
+ */
714
+ onCustomMenuSelection?: (event: {nativeEvent: {
715
+ label: string;
716
+ key: string;
717
+ selectedText: string;
718
+ }
719
+ }) => void;
720
+
721
+ /**
722
+ * A Boolean value that indicates whether the webview shows warnings for suspected
723
+ * fraudulent content, such as malware or phishing attempts.
724
+ * @platform ios
725
+ */
726
+ fraudulentWebsiteWarningEnabled?: boolean;
727
+ }
728
+
729
+ export interface MacOSWebViewProps extends WebViewSharedProps {
730
+ /**
731
+ * Does not store any data within the lifetime of the WebView.
732
+ */
733
+ incognito?: boolean;
734
+
735
+ /**
736
+ * Boolean value that determines whether the web view bounces
737
+ * when it reaches the edge of the content. The default value is `true`.
738
+ * @platform macos
739
+ */
740
+ bounces?: boolean;
741
+
742
+ /**
743
+ * Boolean value that determines whether scrolling is enabled in the
744
+ * `WebView`. The default value is `true`.
745
+ * @platform macos
746
+ */
747
+ scrollEnabled?: boolean;
748
+
749
+ /**
750
+ * If the value of this property is true, the scroll view stops on multiples
751
+ * of the scroll view’s bounds when the user scrolls.
752
+ * The default value is false.
753
+ * @platform macos
754
+ */
755
+ pagingEnabled?: boolean;
756
+
757
+ /**
758
+ * Controls whether to adjust the content inset for web views that are
759
+ * placed behind a navigation bar, tab bar, or toolbar. The default value
760
+ * is `true`.
761
+ * @platform macos
762
+ */
763
+ automaticallyAdjustContentInsets?: boolean;
764
+
765
+ /**
766
+ * This property specifies how the safe area insets are used to modify the
767
+ * content area of the scroll view. The default value of this property is
768
+ * "never". Available on iOS 11 and later.
769
+ */
770
+ contentInsetAdjustmentBehavior?: ContentInsetAdjustmentBehavior;
771
+
772
+ /**
773
+ * The amount by which the web view content is inset from the edges of
774
+ * the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
775
+ * @platform macos
776
+ */
777
+ contentInset?: ContentInsetProp;
778
+
779
+ /**
780
+ * Boolean that determines whether HTML5 videos play inline or use the
781
+ * native full-screen controller. The default value is `false`.
782
+ *
783
+ * **NOTE** : In order for video to play inline, not only does this
784
+ * property need to be set to `true`, but the video element in the HTML
785
+ * document must also include the `webkit-playsinline` attribute.
786
+ * @platform macos
787
+ */
788
+ allowsInlineMediaPlayback?: boolean;
789
+ /**
790
+ * A Boolean value indicating whether AirPlay is allowed. The default value is `false`.
791
+ * @platform macos
792
+ */
793
+ allowsAirPlayForMediaPlayback?: boolean;
794
+ /**
795
+ * Hide the accessory view when the keyboard is open. Default is false to be
796
+ * backward compatible.
797
+ */
798
+ hideKeyboardAccessoryView?: boolean;
799
+ /**
800
+ * A Boolean value indicating whether horizontal swipe gestures will trigger
801
+ * back-forward list navigations.
802
+ */
803
+ allowsBackForwardNavigationGestures?: boolean;
804
+ /**
805
+ * A Boolean value indicating whether WebKit WebView should be created using a shared
806
+ * process pool, enabling WebViews to share cookies and localStorage between each other.
807
+ * Default is true but can be set to false for backwards compatibility.
808
+ * @platform macos
809
+ */
810
+ useSharedProcessPool?: boolean;
811
+
812
+ /**
813
+ * The custom user agent string.
814
+ */
815
+ userAgent?: string;
816
+
817
+ /**
818
+ * A Boolean value that determines whether pressing on a link
819
+ * displays a preview of the destination for the link.
820
+ *
821
+ * This property is available on devices that support Force Touch trackpad.
822
+ * @platform macos
823
+ */
824
+ allowsLinkPreview?: boolean;
825
+
826
+ /**
827
+ * Set true if shared cookies from HTTPCookieStorage should used for every load request.
828
+ * The default value is `false`.
829
+ * @platform macos
830
+ */
831
+ sharedCookiesEnabled?: boolean;
832
+
833
+ /**
834
+ * A Boolean value that determines whether scrolling is disabled in a particular direction.
835
+ * The default value is `true`.
836
+ * @platform macos
837
+ */
838
+ directionalLockEnabled?: boolean;
839
+
840
+ /**
841
+ * A Boolean value indicating whether web content can programmatically display the keyboard.
842
+ *
843
+ * When this property is set to true, the user must explicitly tap the elements in the
844
+ * web view to display the keyboard (or other relevant input view) for that element.
845
+ * When set to false, a focus event on an element causes the input view to be displayed
846
+ * and associated with that element automatically.
847
+ *
848
+ * The default value is `true`.
849
+ * @platform macos
850
+ */
851
+ keyboardDisplayRequiresUserAction?: boolean;
852
+
853
+ /**
854
+ * A String value that indicates which URLs the WebView's file can then
855
+ * reference in scripts, AJAX requests, and CSS imports. This is only used
856
+ * for WebViews that are loaded with a source.uri set to a `'file://'` URL.
857
+ *
858
+ * If not provided, the default is to only allow read access to the URL
859
+ * provided in source.uri itself.
860
+ * @platform macos
861
+ */
862
+ allowingReadAccessToURL?: string;
863
+
864
+ /**
865
+ * Boolean that sets whether JavaScript running in the context of a file
866
+ * scheme URL should be allowed to access content from other file scheme URLs.
867
+ * Including accessing content from other file scheme URLs
868
+ * @platform macos
869
+ */
870
+ allowFileAccessFromFileURLs?: boolean;
871
+
872
+ /**
873
+ * Boolean that sets whether JavaScript running in the context of a file
874
+ * scheme URL should be allowed to access content from any origin.
875
+ * Including accessing content from other file scheme URLs
876
+ * @platform macos
877
+ */
878
+ allowUniversalAccessFromFileURLs?: boolean;
879
+
880
+ /**
881
+ * Function that is invoked when the WebKit WebView content process gets terminated.
882
+ * @platform macos
883
+ */
884
+ onContentProcessDidTerminate?: (event: WebViewTerminatedEvent) => void;
885
+ }
886
+
887
+ export interface AndroidWebViewProps extends WebViewSharedProps {
888
+ onNavigationStateChange?: (event: WebViewNavigation) => void;
889
+ onContentSizeChange?: (event: WebViewEvent) => void;
890
+
891
+ /**
892
+ * Function that is invoked when the `WebView` process crashes or is killed by the OS.
893
+ * Works only on Android (minimum API level 26).
894
+ */
895
+ onRenderProcessGone?: (event: WebViewRenderProcessGoneEvent) => void;
896
+
897
+ /**
898
+ * Function that is invoked when the `WebView` should open a new window.
899
+ *
900
+ * This happens when the JS calls `window.open('http://someurl', '_blank')`
901
+ * or when the user clicks on a `<a href="http://someurl" target="_blank">` link.
902
+ *
903
+ * @platform android
904
+ */
905
+ onOpenWindow?: (event: WebViewOpenWindowEvent) => void;
906
+
907
+ /**
908
+ * https://developer.android.com/reference/android/webkit/WebSettings.html#setCacheMode(int)
909
+ * Set the cacheMode. Possible values are:
910
+ *
911
+ * - `'LOAD_DEFAULT'` (default)
912
+ * - `'LOAD_CACHE_ELSE_NETWORK'`
913
+ * - `'LOAD_NO_CACHE'`
914
+ * - `'LOAD_CACHE_ONLY'`
915
+ *
916
+ * @platform android
917
+ */
918
+ cacheMode?: CacheMode;
919
+
920
+ /**
921
+ * https://developer.android.com/reference/android/view/View#OVER_SCROLL_NEVER
922
+ * Sets the overScrollMode. Possible values are:
923
+ *
924
+ * - `'always'` (default)
925
+ * - `'content'`
926
+ * - `'never'`
927
+ *
928
+ * @platform android
929
+ */
930
+ overScrollMode?: OverScrollModeType;
931
+
932
+ /**
933
+ * Boolean that controls whether the web content is scaled to fit
934
+ * the view and enables the user to change the scale. The default value
935
+ * is `true`.
936
+ */
937
+ scalesPageToFit?: boolean;
938
+
939
+ /**
940
+ * Sets whether Geolocation is enabled. The default is false.
941
+ * @platform android
942
+ */
943
+ geolocationEnabled?: boolean;
944
+
945
+ /**
946
+ * Boolean that sets whether JavaScript running in the context of a file
947
+ * scheme URL should be allowed to access content from other file scheme URLs.
948
+ * Including accessing content from other file scheme URLs
949
+ * @platform android
950
+ */
951
+ allowFileAccessFromFileURLs?: boolean;
952
+
953
+ /**
954
+ * Boolean that sets whether JavaScript running in the context of a file
955
+ * scheme URL should be allowed to access content from any origin.
956
+ * Including accessing content from other file scheme URLs
957
+ * @platform android
958
+ */
959
+ allowUniversalAccessFromFileURLs?: boolean;
960
+
961
+ /**
962
+ * Sets whether the webview allow access to file system.
963
+ * @platform android
964
+ */
965
+ allowFileAccess?: boolean;
966
+
967
+ /**
968
+ * Used on Android only, controls whether form autocomplete data should be saved
969
+ * @platform android
970
+ */
971
+ saveFormDataDisabled?: boolean;
972
+
973
+ /**
974
+ * Boolean value to set whether the WebView supports multiple windows. Used on Android only
975
+ * The default value is `true`.
976
+ * @platform android
977
+ */
978
+ setSupportMultipleWindows?: boolean;
979
+
980
+ /**
981
+ * https://developer.android.com/reference/android/webkit/WebView#setLayerType(int,%20android.graphics.Paint)
982
+ * Sets the layerType. Possible values are:
983
+ *
984
+ * - `'none'` (default)
985
+ * - `'software'`
986
+ * - `'hardware'`
987
+ *
988
+ * @platform android
989
+ */
990
+ androidLayerType?: AndroidLayerType;
991
+
992
+ /**
993
+ * Boolean value to enable third party cookies in the `WebView`. Used on
994
+ * Android Lollipop and above only as third party cookies are enabled by
995
+ * default on Android Kitkat and below and on iOS. The default value is `true`.
996
+ * @platform android
997
+ */
998
+ thirdPartyCookiesEnabled?: boolean;
999
+
1000
+ /**
1001
+ * Boolean value to control whether DOM Storage is enabled. Used only in
1002
+ * Android.
1003
+ * @platform android
1004
+ */
1005
+ domStorageEnabled?: boolean;
1006
+
1007
+ /**
1008
+ * Sets the user-agent for the `WebView`.
1009
+ * @platform android
1010
+ */
1011
+ userAgent?: string;
1012
+
1013
+ /**
1014
+ * Sets number that controls text zoom of the page in percent.
1015
+ * @platform android
1016
+ */
1017
+ textZoom?: number;
1018
+
1019
+ /**
1020
+ * Specifies the mixed content mode. i.e WebView will allow a secure origin to load content from any other origin.
1021
+ *
1022
+ * Possible values for `mixedContentMode` are:
1023
+ *
1024
+ * - `'never'` (default) - WebView will not allow a secure origin to load content from an insecure origin.
1025
+ * - `'always'` - WebView will allow a secure origin to load content from any other origin, even if that origin is insecure.
1026
+ * - `'compatibility'` - WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content.
1027
+ * @platform android
1028
+ */
1029
+ mixedContentMode?: 'never' | 'always' | 'compatibility';
1030
+
1031
+ /**
1032
+ * Sets ability to open fullscreen videos on Android devices.
1033
+ */
1034
+ allowsFullscreenVideo?: boolean;
1035
+
1036
+ /**
1037
+ * Configuring Dark Theme
1038
+ *
1039
+ * *NOTE* : The force dark setting is not persistent. You must call the static method every time your app process is started.
1040
+ *
1041
+ * *NOTE* : The change from day<->night mode is a configuration change so by default the activity will be restarted
1042
+ * and pickup the new values to apply the theme.
1043
+ * Take care when overriding this default behavior to ensure this method is still called when changes are made.
1044
+ *
1045
+ * @platform android
1046
+ */
1047
+ forceDarkOn?: boolean;
1048
+
1049
+ /**
1050
+ * Boolean value to control whether pinch zoom is enabled. Used only in Android.
1051
+ * Default to true
1052
+ *
1053
+ * @platform android
1054
+ */
1055
+ setBuiltInZoomControls?: boolean;
1056
+
1057
+ /**
1058
+ * Boolean value to control whether built-in zooms controls are displayed. Used only in Android.
1059
+ * Default to false
1060
+ * Controls will always be hidden if setBuiltInZoomControls is set to `false`
1061
+ *
1062
+ * @platform android
1063
+ */
1064
+ setDisplayZoomControls?: boolean;
1065
+
1066
+ /**
1067
+ * Allows to scroll inside the webview when used inside a scrollview.
1068
+ * Behaviour already existing on iOS.
1069
+ * Default to false
1070
+ *
1071
+ * @platform android
1072
+ */
1073
+ nestedScrollEnabled?: boolean;
1074
+
1075
+ /**
1076
+ * Sets the minimum font size.
1077
+ * A non-negative integer between 1 and 72. Any number outside the specified range will be pinned.
1078
+ * Default is 8.
1079
+ * @platform android
1080
+ */
1081
+ minimumFontSize?: number;
1082
+
1083
+ /**
1084
+ * Sets the message to be shown in the toast when downloading via the webview.
1085
+ * Default is 'Downloading'.
1086
+ * @platform android
1087
+ */
1088
+ downloadingMessage?: string;
1089
+
1090
+ /**
1091
+ * Sets the message to be shown in the toast when webview is unable to download due to permissions issue.
1092
+ * Default is 'Cannot download files as permission was denied. Please provide permission to write to storage, in order to download files.'.
1093
+ * @platform android
1094
+ */
1095
+ lackPermissionToDownloadMessage?: string;
1096
+
1097
+ /**
1098
+ * Boolean value to control whether webview can play media protected by DRM.
1099
+ * Default is false.
1100
+ * @platform android
1101
+ */
1102
+ allowsProtectedMedia?: boolean;
1103
+ }
1104
+
1105
+ export interface WebViewSharedProps extends ViewProps {
1106
+ /**
1107
+ * Loads static html or a uri (with optional headers) in the WebView.
1108
+ */
1109
+ source?: WebViewSource;
1110
+
1111
+ /**
1112
+ * Boolean value to enable JavaScript in the `WebView`. Used on Android only
1113
+ * as JavaScript is enabled by default on iOS. The default value is `true`.
1114
+ * @platform android
1115
+ */
1116
+ javaScriptEnabled?: boolean;
1117
+
1118
+ /**
1119
+ * A Boolean value indicating whether JavaScript can open windows without user interaction.
1120
+ * The default value is `false`.
1121
+ */
1122
+ javaScriptCanOpenWindowsAutomatically?: boolean;
1123
+
1124
+ /**
1125
+ * Stylesheet object to set the style of the container view.
1126
+ */
1127
+ containerStyle?: StyleProp<ViewStyle>;
1128
+
1129
+ /**
1130
+ * Function that returns a view to show if there's an error.
1131
+ */
1132
+ renderError?: (
1133
+ errorDomain: string | undefined,
1134
+ errorCode: number,
1135
+ errorDesc: string,
1136
+ ) => ReactElement; // view to show if there's an error
1137
+
1138
+ /**
1139
+ * Function that returns a loading indicator.
1140
+ */
1141
+ renderLoading?: () => ReactElement;
1142
+
1143
+ /**
1144
+ * Function that is invoked when the `WebView` scrolls.
1145
+ */
1146
+ onScroll?: ComponentProps<typeof NativeWebViewComponent>['onScroll'];
1147
+
1148
+ /**
1149
+ * Function that is invoked when the `WebView` has finished loading.
1150
+ */
1151
+ onLoad?: (event: WebViewNavigationEvent) => void;
1152
+
1153
+ /**
1154
+ * Function that is invoked when the `WebView` load succeeds or fails.
1155
+ */
1156
+ onLoadEnd?: (event: WebViewNavigationEvent | WebViewErrorEvent) => void;
1157
+
1158
+ /**
1159
+ * Function that is invoked when the `WebView` starts loading.
1160
+ */
1161
+ onLoadStart?: (event: WebViewNavigationEvent) => void;
1162
+
1163
+ /**
1164
+ * Function that is invoked when the `WebView` load fails.
1165
+ */
1166
+ onError?: (event: WebViewErrorEvent) => void;
1167
+
1168
+ /**
1169
+ * Function that is invoked when the `WebView` receives an error status code.
1170
+ * Works on iOS and Android (minimum API level 23).
1171
+ */
1172
+ onHttpError?: (event: WebViewHttpErrorEvent) => void;
1173
+
1174
+ /**
1175
+ * Function that is invoked when the `WebView` loading starts or ends.
1176
+ */
1177
+ onNavigationStateChange?: (event: WebViewNavigation) => void;
1178
+
1179
+ /**
1180
+ * Function that is invoked when the webview calls `window.ReactNativeWebView.postMessage`.
1181
+ * Setting this property will inject this global into your webview.
1182
+ *
1183
+ * `window.ReactNativeWebView.postMessage` accepts one argument, `data`, which will be
1184
+ * available on the event object, `event.nativeEvent.data`. `data` must be a string.
1185
+ */
1186
+ onMessage?: (event: WebViewMessageEvent) => void;
1187
+
1188
+ /**
1189
+ * Function that is invoked when the `WebView` is loading.
1190
+ */
1191
+ onLoadProgress?: (event: WebViewProgressEvent) => void;
1192
+
1193
+ /**
1194
+ * Boolean value that forces the `WebView` to show the loading view
1195
+ * on the first load.
1196
+ */
1197
+ startInLoadingState?: boolean;
1198
+
1199
+ /**
1200
+ * Set this to provide JavaScript that will be injected into the web page
1201
+ * when the view loads.
1202
+ */
1203
+ injectedJavaScript?: string;
1204
+
1205
+ /**
1206
+ * Set this to provide JavaScript that will be injected into the web page
1207
+ * once the webview is initialized but before the view loads any content.
1208
+ */
1209
+ injectedJavaScriptBeforeContentLoaded?: string;
1210
+
1211
+ /**
1212
+ * If `true` (default; mandatory for Android), loads the `injectedJavaScript` only into the main frame.
1213
+ * If `false` (only supported on iOS and macOS), loads it into all frames (e.g. iframes).
1214
+ */
1215
+ injectedJavaScriptForMainFrameOnly?: boolean;
1216
+
1217
+ /**
1218
+ * If `true` (default; mandatory for Android), loads the `injectedJavaScriptBeforeContentLoaded` only into the main frame.
1219
+ * If `false` (only supported on iOS and macOS), loads it into all frames (e.g. iframes).
1220
+ */
1221
+ injectedJavaScriptBeforeContentLoadedForMainFrameOnly?: boolean;
1222
+
1223
+ /**
1224
+ * Boolean value that determines whether a horizontal scroll indicator is
1225
+ * shown in the `WebView`. The default value is `true`.
1226
+ */
1227
+ showsHorizontalScrollIndicator?: boolean;
1228
+
1229
+ /**
1230
+ * Boolean value that determines whether a vertical scroll indicator is
1231
+ * shown in the `WebView`. The default value is `true`.
1232
+ */
1233
+ showsVerticalScrollIndicator?: boolean;
1234
+
1235
+ /**
1236
+ * Boolean that determines whether HTML5 audio and video requires the user
1237
+ * to tap them before they start playing. The default value is `true`.
1238
+ */
1239
+ mediaPlaybackRequiresUserAction?: boolean;
1240
+
1241
+ /**
1242
+ * List of origin strings to allow being navigated to. The strings allow
1243
+ * wildcards and get matched against *just* the origin (not the full URL).
1244
+ * If the user taps to navigate to a new page but the new page is not in
1245
+ * this whitelist, we will open the URL in Safari.
1246
+ * The default whitelisted origins are "http://*" and "https://*".
1247
+ */
1248
+ readonly originWhitelist?: string[];
1249
+
1250
+ /**
1251
+ * Function that allows custom handling of any web view requests. Return
1252
+ * `true` from the function to continue loading the request and `false`
1253
+ * to stop loading. The `navigationType` is always `other` on android.
1254
+ */
1255
+ onShouldStartLoadWithRequest?: OnShouldStartLoadWithRequest;
1256
+
1257
+ /**
1258
+ * Override the native component used to render the WebView. Enables a custom native
1259
+ * WebView which uses the same JavaScript as the original WebView.
1260
+ */
1261
+ nativeConfig?: WebViewNativeConfig;
1262
+
1263
+ /**
1264
+ * Should caching be enabled. Default is true.
1265
+ */
1266
+ cacheEnabled?: boolean;
1267
+
1268
+ /**
1269
+ * Append to the existing user-agent. Overridden if `userAgent` is set.
1270
+ */
1271
+ applicationNameForUserAgent?: string;
1272
+
1273
+ /**
1274
+ * An object that specifies the credentials of a user to be used for basic authentication.
1275
+ */
1276
+ basicAuthCredential?: BasicAuthCredential;
1277
+
1278
+ /**
1279
+ * Inject a JavaScript object to be accessed as a JSON string via JavaScript in the WebView.
1280
+ */
1281
+ injectedJavaScriptObject?: object;
1282
+
1283
+ /**
1284
+ * Enables WebView remote debugging using Chrome (Android) or Safari (iOS).
1285
+ */
1286
+ webviewDebuggingEnabled?: boolean;
1287
+ }