@exodus/react-native-webview 11.26.1-exodus.32 → 11.26.1-exodus.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/android/build/.transforms/bd1c9282aaabf4a0d1b6bb39aff484a4/results.bin +1 -0
  2. package/android/build/.transforms/bd1c9282aaabf4a0d1b6bb39aff484a4/transformed/classes/classes.dex +0 -0
  3. package/android/build/generated/source/buildConfig/debug/com/reactnativecommunity/webview/BuildConfig.java +10 -0
  4. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +27 -0
  5. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +18 -0
  6. package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +4 -0
  7. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  8. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  9. package/android/build/intermediates/compile_symbol_list/debug/R.txt +1861 -0
  10. package/android/build/intermediates/compiled_local_resources/debug/out/xml_file_provider_paths.xml.flat +0 -0
  11. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -0
  12. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  13. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  14. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  15. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  16. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/BasicAuthCredential.class +0 -0
  17. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/BuildConfig.class +0 -0
  18. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewFileProvider.class +0 -0
  19. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$1.class +0 -0
  20. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$2.class +0 -0
  21. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebChromeClient$1.class +0 -0
  22. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebChromeClient$2.class +0 -0
  23. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebChromeClient.class +0 -0
  24. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebView$1.class +0 -0
  25. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebView$ProgressChangedFilter.class +0 -0
  26. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebView$RNCWebViewBridge.class +0 -0
  27. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebView.class +0 -0
  28. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager$RNCWebViewClient.class +0 -0
  29. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewManager.class +0 -0
  30. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewModule$1.class +0 -0
  31. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewModule$MimeType.class +0 -0
  32. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewModule$ShouldOverrideUrlLoadingLock$ShouldOverrideCallbackState.class +0 -0
  33. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewModule$ShouldOverrideUrlLoadingLock.class +0 -0
  34. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewModule.class +0 -0
  35. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewPackage.class +0 -0
  36. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewUtils$1.class +0 -0
  37. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/RNCWebViewUtils.class +0 -0
  38. package/android/build/intermediates/javac/debug/classes/com/reactnativecommunity/webview/WebViewConfig.class +0 -0
  39. package/android/build/intermediates/library_java_res/debug/res.jar +0 -0
  40. package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +3 -0
  41. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +46 -0
  42. package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +27 -0
  43. package/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
  44. package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +18 -0
  45. package/android/build/intermediates/packaged_res/debug/xml/file_provider_paths.xml +6 -0
  46. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  47. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +1381 -0
  48. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  49. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  50. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  51. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  52. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  53. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  54. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  55. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  56. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  57. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  58. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  59. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  60. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  61. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  62. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  63. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  64. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  65. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  66. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  67. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  68. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  69. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  135. package/android/build/outputs/logs/manifest-merger-debug-report.txt +59 -0
  136. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  137. package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-webview_debug.kotlin_module +0 -0
  138. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingErrorEvent$Companion.class +0 -0
  139. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingErrorEvent.class +0 -0
  140. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingFinishEvent$Companion.class +0 -0
  141. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingFinishEvent.class +0 -0
  142. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingProgressEvent$Companion.class +0 -0
  143. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingProgressEvent.class +0 -0
  144. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingStartEvent$Companion.class +0 -0
  145. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopLoadingStartEvent.class +0 -0
  146. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopMessageEvent$Companion.class +0 -0
  147. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopMessageEvent.class +0 -0
  148. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopOpenWindowEvent$Companion.class +0 -0
  149. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopOpenWindowEvent.class +0 -0
  150. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopShouldStartLoadWithRequestEvent$Companion.class +0 -0
  151. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/webview/events/TopShouldStartLoadWithRequestEvent.class +0 -0
  152. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java +26 -7
  153. package/apple/RNCWebView.m +7 -0
  154. package/apple/RNCWebViewManager.m +1 -0
  155. package/lib/WebView.android.js +3 -3
  156. package/lib/WebView.ios.js +3 -3
  157. package/lib/WebViewShared.d.ts +1 -0
  158. package/lib/WebViewShared.js +4 -1
  159. package/lib/WebViewTypes.d.ts +5 -0
  160. package/package.json +1 -1
  161. package/.all-contributorsrc +0 -185
  162. package/.circleci/config.yml +0 -66
  163. package/.eslintignore +0 -2
  164. package/.eslintrc.js +0 -94
  165. package/.flowconfig +0 -88
  166. package/.flowconfig.android +0 -88
  167. package/.gitattributes +0 -12
  168. package/.github/CODEOWNERS +0 -1
  169. package/.github/ISSUE_TEMPLATE/bug-report.md +0 -42
  170. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -30
  171. package/.github/workflows/android-ci.yml +0 -35
  172. package/.github/workflows/detox.yml +0 -20
  173. package/.github/workflows/ios-ci.yml +0 -31
  174. package/.github/workflows/scripts/install-vs-features.ps1 +0 -108
  175. package/.github/workflows/stale.yml +0 -17
  176. package/.gitignore +0 -62
  177. package/.idea/.gitignore +0 -5
  178. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  179. package/.idea/misc.xml +0 -9
  180. package/.idea/modules.xml +0 -8
  181. package/.idea/react-native-webview.iml +0 -9
  182. package/.idea/vcs.xml +0 -6
  183. package/.idea/workspace.xml +0 -104
  184. package/.prettierrc.js +0 -10
  185. package/.releaserc +0 -15
  186. package/.vscode/settings.json +0 -9
  187. package/babel.config.js +0 -11
  188. package/bin/setup +0 -26
  189. package/docs/Contributing.md +0 -102
  190. package/docs/Custom-Android.md +0 -222
  191. package/docs/Custom-iOS.md +0 -236
  192. package/docs/Debugging.md +0 -101
  193. package/docs/Getting-Started.md +0 -142
  194. package/docs/Guide.md +0 -613
  195. package/docs/Reference.md +0 -1639
  196. package/example/.gitignore +0 -14
  197. package/example/App.tsx +0 -262
  198. package/example/android/build.gradle +0 -15
  199. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  200. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  201. package/example/android/gradle.properties +0 -34
  202. package/example/android/gradlew +0 -234
  203. package/example/android/gradlew.bat +0 -89
  204. package/example/android/settings.gradle +0 -12
  205. package/example/app.json +0 -20
  206. package/example/assets/test.html +0 -9
  207. package/example/babel.config.js +0 -3
  208. package/example/examples/Alerts.tsx +0 -72
  209. package/example/examples/ApplePay.tsx +0 -23
  210. package/example/examples/Background.tsx +0 -54
  211. package/example/examples/Downloads.tsx +0 -57
  212. package/example/examples/Injection.tsx +0 -161
  213. package/example/examples/LocalPageLoad.tsx +0 -16
  214. package/example/examples/Messaging.tsx +0 -63
  215. package/example/examples/NativeWebpage.tsx +0 -22
  216. package/example/examples/Scrolling.tsx +0 -68
  217. package/example/examples/Uploads.tsx +0 -69
  218. package/example/index.js +0 -9
  219. package/example/ios/Podfile +0 -8
  220. package/example/ios/Podfile.lock +0 -445
  221. package/jest-setups/jest.setup.js +0 -8
  222. package/jest.config.js +0 -184
  223. package/lib/WebView.android.d.ts.map +0 -1
  224. package/lib/WebView.d.ts.map +0 -1
  225. package/lib/WebView.ios.d.ts.map +0 -1
  226. package/lib/WebView.styles.d.ts.map +0 -1
  227. package/lib/WebViewNativeComponent.android.d.ts.map +0 -1
  228. package/lib/WebViewNativeComponent.ios.d.ts.map +0 -1
  229. package/lib/WebViewShared.d.ts.map +0 -1
  230. package/lib/WebViewTypes.d.ts.map +0 -1
  231. package/lib/index.d.ts.map +0 -1
  232. package/lib/validation.d.ts.map +0 -1
  233. package/metro.config.js +0 -57
  234. package/src/WebView.android.tsx +0 -255
  235. package/src/WebView.ios.tsx +0 -230
  236. package/src/WebView.styles.ts +0 -44
  237. package/src/WebView.tsx +0 -18
  238. package/src/WebViewNativeComponent.android.ts +0 -8
  239. package/src/WebViewNativeComponent.ios.ts +0 -8
  240. package/src/WebViewShared.tsx +0 -318
  241. package/src/WebViewTypes.ts +0 -941
  242. package/src/__tests__/WebViewShared-test.js +0 -292
  243. package/src/__tests__/__snapshots__/WebViewShared-test.js.snap +0 -13
  244. package/src/__tests__/validation-test.js +0 -39
  245. package/src/index.ts +0 -4
  246. package/src/validation.ts +0 -13
  247. package/tsconfig.json +0 -24
  248. package/yarn.lock +0 -13397
  249. /package/{example/.watchmanconfig → android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json} +0 -0
@@ -1,318 +0,0 @@
1
- import escapeStringRegexp from 'escape-string-regexp';
2
- import React, { useCallback, useMemo, useRef, useState } from 'react';
3
- import { Linking, View, ActivityIndicator, Text, Platform } from 'react-native';
4
- import {
5
- OnShouldStartLoadWithRequest,
6
- ShouldStartLoadRequestEvent,
7
- WebViewError,
8
- WebViewErrorEvent,
9
- WebViewMessageEvent,
10
- WebViewMessage,
11
- WebViewNavigationEvent,
12
- WebViewOpenWindowEvent,
13
- WebViewProgressEvent,
14
- WebViewNativeEvent,
15
- } from './WebViewTypes';
16
- import styles from './WebView.styles';
17
-
18
- const defaultOriginWhitelist = ['https://*'] as const;
19
- const defaultDeeplinkWhitelist = ['https:'] as const;
20
- const defaultDeeplinkBlocklist = [`http:`, `file:`, `javascript:`] as const;
21
-
22
- const stringWhitelistToRegex = (originWhitelist: string): RegExp =>
23
- new RegExp(`^${escapeStringRegexp(originWhitelist).replace(/\\\*/g, '.*')}$`);
24
-
25
- const matchWithRegexList = (
26
- compiledRegexList: readonly RegExp[],
27
- value: string,
28
- ) => {
29
- return compiledRegexList.some(x => x.test(value));
30
- };
31
-
32
- const matchWithStringList = (
33
- prefixes: readonly string[],
34
- value: string,
35
- ) => {
36
- if (typeof value !== 'string') throw new Error(`value was not a string`)
37
- return Array.prototype.includes.call(prefixes, value)
38
- };
39
-
40
- const _passesWhitelist = (
41
- compiledWhitelist: readonly RegExp[],
42
- url: string,
43
- ) => {
44
- try {
45
- const { origin } = new URL(url)
46
- return origin && matchWithRegexList(compiledWhitelist, origin)
47
- } catch {
48
- return false
49
- }
50
- };
51
-
52
- const compileWhitelist = (
53
- originWhitelist: readonly string[],
54
- ): readonly RegExp[] =>
55
- ['about:blank', ...(originWhitelist || [])].map(stringWhitelistToRegex);
56
-
57
- const urlToProtocolScheme = (url: string): string | null => {
58
- try {
59
- return new URL(url).protocol
60
- } catch {
61
- // Protocol schemes must start with a letter and cannot start with digits, underscores etc.
62
- // e.g 0invalid, _invalid, +invalid, -invalid, .invalid will all become null
63
- return null
64
- }
65
- }
66
-
67
- const createOnShouldStartLoadWithRequest = (
68
- loadRequest: (
69
- shouldStart: boolean,
70
- url: string,
71
- lockIdentifier: number,
72
- ) => void,
73
- originWhitelist: readonly string[],
74
- deepLinkWhitelist: readonly string[],
75
- onShouldStartLoadWithRequest?: OnShouldStartLoadWithRequest,
76
- ) => {
77
- const compiledWhiteList = compileWhitelist(originWhitelist)
78
-
79
- return ({ nativeEvent }: ShouldStartLoadRequestEvent) => {
80
- let shouldStart = true;
81
- const { url, lockIdentifier, isTopFrame } = nativeEvent;
82
-
83
- /** Check if the url passes the origin whitelist */
84
- if (!_passesWhitelist(compiledWhiteList, url)) {
85
- const protocol = urlToProtocolScheme(url)
86
-
87
- /* Check that the protocol was properly parsed */
88
- if (protocol !== null) {
89
- /** Check if the protocol passes the hardcoded deeplink blocklist */
90
- const foundMatchInBlocklist = matchWithStringList(defaultDeeplinkBlocklist, protocol)
91
- if (!foundMatchInBlocklist) {
92
- /** Check if the protocol passes the dynamic deeplink allow list */
93
- const foundMatchInAllowlist = matchWithStringList(deepLinkWhitelist, protocol)
94
-
95
- if (foundMatchInAllowlist) {
96
- Linking.canOpenURL(url).then((supported) => {
97
- if (supported && isTopFrame) {
98
- return Linking.openURL(url);
99
- }
100
- console.warn(`Can't open url: ${url}`);
101
- return undefined;
102
- }).catch(e => {
103
- console.warn('Error opening URL: ', e);
104
- });
105
- } else {
106
- console.warn(`Failed to pass whitelist for deep link url: ${url}`);
107
- }
108
- } else {
109
- console.warn(`Failed to pass default block list for deep link url: ${url}`);
110
- }
111
- }
112
-
113
- shouldStart = false;
114
- } else if (onShouldStartLoadWithRequest) {
115
- shouldStart = onShouldStartLoadWithRequest(nativeEvent);
116
- }
117
-
118
- loadRequest(shouldStart, url, lockIdentifier);
119
- };
120
- };
121
-
122
- const defaultRenderLoading = () => (
123
- <View style={styles.loadingOrErrorView}>
124
- <ActivityIndicator />
125
- </View>
126
- );
127
- const defaultRenderError = (
128
- errorDomain: string | undefined,
129
- errorCode: number,
130
- errorDesc: string,
131
- ) => (
132
- <View style={styles.loadingOrErrorView}>
133
- <Text style={styles.errorTextTitle}>Error loading page</Text>
134
- <Text style={styles.errorText}>{`Domain: ${errorDomain}`}</Text>
135
- <Text style={styles.errorText}>{`Error Code: ${errorCode}`}</Text>
136
- <Text style={styles.errorText}>{`Description: ${errorDesc}`}</Text>
137
- </View>
138
- );
139
-
140
- export {
141
- defaultOriginWhitelist,
142
- defaultDeeplinkWhitelist,
143
- createOnShouldStartLoadWithRequest,
144
- defaultRenderLoading,
145
- defaultRenderError,
146
- };
147
-
148
-
149
- export const useWebWiewLogic = ({
150
- startInLoadingState,
151
- onLoadStart,
152
- onLoad,
153
- onLoadEnd,
154
- onError,
155
- onMessageProp,
156
- onOpenWindowProp,
157
- originWhitelist,
158
- deeplinkWhitelist,
159
- onShouldStartLoadWithRequestProp,
160
- onShouldStartLoadWithRequestCallback,
161
- validateMeta,
162
- validateData,
163
- }: {
164
- startInLoadingState?: boolean
165
- onLoadStart?: (event: WebViewNavigationEvent) => void;
166
- onLoad?: (event: WebViewNavigationEvent) => void;
167
- onLoadEnd?: (event: WebViewNavigationEvent | WebViewErrorEvent) => void;
168
- onError?: (event: WebViewErrorEvent) => void;
169
- onMessageProp?: (event: WebViewMessage) => void;
170
- onOpenWindowProp?: (event: WebViewOpenWindowEvent) => void;
171
- originWhitelist: readonly string[];
172
- deeplinkWhitelist: readonly string[];
173
- onShouldStartLoadWithRequestProp?: OnShouldStartLoadWithRequest;
174
- onShouldStartLoadWithRequestCallback: (shouldStart: boolean, url: string, lockIdentifier?: number | undefined) => void;
175
- validateMeta: (event: WebViewNativeEvent) => WebViewNativeEvent;
176
- validateData: (data: object) => object;
177
- }) => {
178
-
179
- const [viewState, setViewState] = useState<'IDLE' | 'LOADING' | 'ERROR'>(startInLoadingState ? "LOADING" : "IDLE");
180
- const [lastErrorEvent, setLastErrorEvent] = useState<WebViewError | null>(null);
181
- const startUrl = useRef<string | null>(null)
182
-
183
- const passesWhitelist = (url: string) => {
184
- if (!url || typeof url !== 'string') return false;
185
- return _passesWhitelist(compileWhitelist(originWhitelist), url);
186
- }
187
-
188
- const passesWhitelistUse = useCallback(passesWhitelist, [originWhitelist])
189
-
190
- const extractMeta = (nativeEvent: WebViewNativeEvent): WebViewNativeEvent => ({
191
- url: String(nativeEvent.url),
192
- loading: Boolean(nativeEvent.loading),
193
- title: String(nativeEvent.title),
194
- canGoBack: Boolean(nativeEvent.canGoBack),
195
- canGoForward: Boolean(nativeEvent.canGoForward),
196
- lockIdentifier: Number(nativeEvent.lockIdentifier),
197
- });
198
-
199
- const onLoadingStart = useCallback((event: WebViewNavigationEvent) => {
200
- // Needed for android
201
- startUrl.current = event.nativeEvent.url;
202
- // !Needed for android
203
-
204
- onLoadStart?.(event);
205
- }, [onLoadStart]);
206
-
207
- const onLoadingError = useCallback((event: WebViewErrorEvent) => {
208
- event.persist();
209
- if (onError) {
210
- onError(event);
211
- } else {
212
- console.warn('Encountered an error loading page', event.nativeEvent);
213
- }
214
- onLoadEnd?.(event);
215
- if (event.isDefaultPrevented()) { return };
216
- setViewState('ERROR');
217
- setLastErrorEvent(event.nativeEvent);
218
- }, [onError, onLoadEnd]);
219
-
220
- const onLoadingFinish = useCallback((event: WebViewNavigationEvent) => {
221
- onLoad?.(event);
222
- onLoadEnd?.(event);
223
- const { nativeEvent: { url } } = event;
224
- if (!passesWhitelistUse(url)) return;
225
-
226
- // on Android, only if url === startUrl
227
- if (Platform.OS !== "android" || url === startUrl.current) {
228
- setViewState('IDLE');
229
- }
230
- // !on Android, only if url === startUrl
231
- // REMOVED: updateNavigationState(event);
232
- }, [onLoad, onLoadEnd, passesWhitelistUse]);
233
-
234
- const onMessage = useCallback((event: WebViewMessageEvent) => {
235
- const { nativeEvent } = event;
236
- if (!passesWhitelistUse(nativeEvent.url)) return;
237
-
238
- // TODO: can/should we perform any other validation?
239
-
240
- const data = JSON.stringify(validateData(JSON.parse(nativeEvent.data)));
241
- const meta = validateMeta(extractMeta(nativeEvent));
242
-
243
- onMessageProp?.({ ...meta, data });
244
- }, [onMessageProp, passesWhitelistUse, validateData, validateMeta]);
245
-
246
- const onLoadingProgress = useCallback((event: WebViewProgressEvent) => {
247
- const { nativeEvent: { progress } } = event;
248
- if (!passesWhitelistUse(event.nativeEvent.url)) return;
249
-
250
- // patch for Android only
251
- if (Platform.OS === "android" && progress === 1) {
252
- setViewState(prevViewState => prevViewState === 'LOADING' ? 'IDLE' : prevViewState);
253
- }
254
- // !patch for Android only
255
- // REMOVED: onLoadProgress?.(event);
256
- }, [passesWhitelistUse]);
257
-
258
- const onShouldStartLoadWithRequest = useMemo(() => createOnShouldStartLoadWithRequest(
259
- onShouldStartLoadWithRequestCallback,
260
- originWhitelist,
261
- deeplinkWhitelist,
262
- onShouldStartLoadWithRequestProp,
263
- )
264
- , [originWhitelist, deeplinkWhitelist, onShouldStartLoadWithRequestProp, onShouldStartLoadWithRequestCallback])
265
-
266
- // Android Only
267
- const onOpenWindow = useCallback((event: WebViewOpenWindowEvent) => {
268
- onOpenWindowProp?.(event);
269
- }, [onOpenWindowProp]);
270
- // !Android Only
271
-
272
- return {
273
- onShouldStartLoadWithRequest,
274
- onLoadingStart,
275
- onLoadingProgress,
276
- onLoadingError,
277
- onLoadingFinish,
278
- onMessage,
279
- onOpenWindow,
280
- passesWhitelist,
281
- viewState,
282
- setViewState,
283
- lastErrorEvent,
284
- }
285
- };
286
-
287
- export const versionPasses = (version: string | undefined, minimum: string | undefined): boolean => {
288
- if (!version || !minimum) return false
289
- if (typeof version !== 'string' || typeof minimum !== 'string') return false
290
-
291
- if (minimum.includes(', ')) {
292
- // We have a set of possible versions
293
- const variants = minimum.split(', ')
294
- // Every entry but the last one should be with an upper bound
295
- if (!variants.slice(0, -1).every(x => x.includes(' <'))) return false
296
- return variants.some(x => versionPasses(version, x)) // Any match passes
297
- }
298
-
299
- if (minimum.includes(' <')) {
300
- const [min, max, ...rest] = minimum.split(' <')
301
- if (rest.length > 0) return false
302
- // Last check is required for correctness/formatting validation
303
- return versionPasses(version, min) && !versionPasses(version, max) && versionPasses(max, version)
304
- }
305
-
306
- const versionRegex = /^[0-9]+(\.[0-9]+)*$/
307
- if (!versionRegex.test(version) || !versionRegex.test(minimum)) return false
308
- const versionParts = version.split('.').map(Number)
309
- const minimumParts = minimum.split('.').map(Number)
310
- const len = Math.max(versionParts.length, minimumParts.length)
311
- for (let i = 0; i < len; i += 1) {
312
- const ver = versionParts[i] || 0
313
- const min = minimumParts[i] || 0
314
- if (ver > min) return true
315
- if (ver < min) return false
316
- }
317
- return true // equals
318
- }