iamport-react-native 2.0.15 → 3.0.1-alpha.0

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 (430) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +12 -2
  3. package/lib/module/components/Certification/index.js +75 -72
  4. package/lib/module/components/Certification/index.js.map +1 -1
  5. package/lib/module/components/ErrorOnParams/index.js +13 -9
  6. package/lib/module/components/ErrorOnParams/index.js.map +1 -1
  7. package/lib/module/components/Loading/index.js +13 -9
  8. package/lib/module/components/Loading/index.js.map +1 -1
  9. package/lib/module/components/Payment/index.js +111 -93
  10. package/lib/module/components/Payment/index.js.map +1 -1
  11. package/lib/module/constants/index.js +2 -0
  12. package/lib/module/constants/index.js.map +1 -1
  13. package/lib/module/index.js +6 -4
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/module/package.json +1 -0
  16. package/lib/module/styles.js +2 -0
  17. package/lib/module/styles.js.map +1 -1
  18. package/lib/module/utils/IamportUrl.js +51 -29
  19. package/lib/module/utils/IamportUrl.js.map +1 -1
  20. package/lib/module/utils/Validation.js +3 -2
  21. package/lib/module/utils/Validation.js.map +1 -1
  22. package/lib/module/utils/ValidationForPayment.js +4 -2
  23. package/lib/module/utils/ValidationForPayment.js.map +1 -1
  24. package/lib/typescript/package.json +1 -0
  25. package/lib/typescript/{components → src/components}/Certification/index.d.ts +1 -2
  26. package/lib/typescript/src/components/Certification/index.d.ts.map +1 -0
  27. package/lib/typescript/src/components/ErrorOnParams/index.d.ts +6 -0
  28. package/lib/typescript/src/components/ErrorOnParams/index.d.ts.map +1 -0
  29. package/lib/typescript/src/components/Loading/index.d.ts +3 -0
  30. package/lib/typescript/src/components/Loading/index.d.ts.map +1 -0
  31. package/lib/typescript/{components → src/components}/Payment/index.d.ts +1 -2
  32. package/lib/typescript/src/components/Payment/index.d.ts.map +1 -0
  33. package/lib/typescript/src/constants/index.d.ts.map +1 -0
  34. package/lib/typescript/src/index.d.ts.map +1 -0
  35. package/lib/typescript/{styles.d.ts → src/styles.d.ts} +2 -2
  36. package/lib/typescript/src/styles.d.ts.map +1 -0
  37. package/lib/typescript/{utils → src/utils}/IamportUrl.d.ts +8 -7
  38. package/lib/typescript/src/utils/IamportUrl.d.ts.map +1 -0
  39. package/lib/typescript/src/utils/Validation.d.ts.map +1 -0
  40. package/lib/typescript/src/utils/ValidationForPayment.d.ts.map +1 -0
  41. package/package.json +81 -74
  42. package/src/components/Certification/index.tsx +7 -7
  43. package/src/components/ErrorOnParams/index.tsx +1 -2
  44. package/src/components/Loading/index.tsx +1 -2
  45. package/src/components/Payment/index.tsx +31 -7
  46. package/src/utils/IamportUrl.ts +54 -26
  47. package/.circleci/config.yml +0 -98
  48. package/.editorconfig +0 -15
  49. package/.gitattributes +0 -3
  50. package/.gitignore +0 -69
  51. package/.yarnrc +0 -3
  52. package/.yarnrc.yml +0 -1
  53. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  54. package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
  55. package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
  56. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  57. package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
  58. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  59. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  60. package/android/.gradle/8.9/gc.properties +0 -0
  61. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  62. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  63. package/android/.gradle/vcs-1/gc.properties +0 -0
  64. package/android/build.gradle +0 -128
  65. package/android/gradle.properties +0 -4
  66. package/android/src/main/AndroidManifest.xml +0 -4
  67. package/android/src/main/java/com/iamportreactnative/IamportReactNativePackage.kt +0 -17
  68. package/android/src/main/java/com/iamportreactnative/IamportReactNativeViewManager.kt +0 -20
  69. package/babel.config.js +0 -3
  70. package/example/.gitignore +0 -69
  71. package/example/README.md +0 -44
  72. package/example/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  73. package/example/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
  74. package/example/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
  75. package/example/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  76. package/example/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  77. package/example/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  78. package/example/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  79. package/example/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  80. package/example/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  81. package/example/android/.gradle/7.5.1/gc.properties +0 -0
  82. package/example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  83. package/example/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  84. package/example/android/.gradle/vcs-1/gc.properties +0 -0
  85. package/example/android/app/build.gradle +0 -183
  86. package/example/android/app/debug.keystore +0 -0
  87. package/example/android/app/proguard-rules.pro +0 -10
  88. package/example/android/app/src/debug/AndroidManifest.xml +0 -8
  89. package/example/android/app/src/debug/java/com/example/iamportreactnative/ReactNativeFlipper.java +0 -69
  90. package/example/android/app/src/main/AndroidManifest.xml +0 -34
  91. package/example/android/app/src/main/java/com/example/iamportreactnative/MainActivity.java +0 -15
  92. package/example/android/app/src/main/java/com/example/iamportreactnative/MainApplication.java +0 -80
  93. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  94. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  95. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  96. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  97. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  98. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  99. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  100. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  101. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  102. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  103. package/example/android/app/src/main/res/values/strings.xml +0 -3
  104. package/example/android/app/src/main/res/values/styles.xml +0 -9
  105. package/example/android/build.gradle +0 -21
  106. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  107. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  108. package/example/android/gradle.properties +0 -44
  109. package/example/android/gradlew +0 -183
  110. package/example/android/gradlew.bat +0 -103
  111. package/example/android/settings.gradle +0 -9
  112. package/example/app.json +0 -4
  113. package/example/babel.config.js +0 -11
  114. package/example/index.js +0 -5
  115. package/example/ios/File.swift +0 -8
  116. package/example/ios/Gemfile +0 -7
  117. package/example/ios/Gemfile.lock +0 -99
  118. package/example/ios/IamportReactNativeExample/AppDelegate.h +0 -15
  119. package/example/ios/IamportReactNativeExample/AppDelegate.mm +0 -138
  120. package/example/ios/IamportReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  121. package/example/ios/IamportReactNativeExample/Images.xcassets/Contents.json +0 -6
  122. package/example/ios/IamportReactNativeExample/Info.plist +0 -121
  123. package/example/ios/IamportReactNativeExample/LaunchScreen.storyboard +0 -58
  124. package/example/ios/IamportReactNativeExample/main.m +0 -16
  125. package/example/ios/IamportReactNativeExample-Bridging-Header.h +0 -3
  126. package/example/ios/IamportReactNativeExample.xcodeproj/project.pbxproj +0 -969
  127. package/example/ios/IamportReactNativeExample.xcodeproj/xcshareddata/xcschemes/IamportReactNativeExample.xcscheme +0 -99
  128. package/example/ios/IamportReactNativeExample.xcworkspace/contents.xcworkspacedata +0 -10
  129. package/example/ios/IamportReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  130. package/example/ios/Podfile +0 -57
  131. package/example/ios/Podfile.lock +0 -756
  132. package/example/metro.config.js +0 -66
  133. package/example/package.json +0 -40
  134. package/example/src/App.tsx +0 -17
  135. package/example/src/Certification/index.tsx +0 -30
  136. package/example/src/CertificationResult/index.tsx +0 -79
  137. package/example/src/CertificationTest/index.tsx +0 -214
  138. package/example/src/Home/index.tsx +0 -87
  139. package/example/src/Loading/index.tsx +0 -12
  140. package/example/src/NavigationService.tsx +0 -127
  141. package/example/src/Payment/index.tsx +0 -28
  142. package/example/src/PaymentResult/index.tsx +0 -96
  143. package/example/src/PaymentTest/index.tsx +0 -383
  144. package/example/src/Picker/index.tsx +0 -60
  145. package/example/src/constants.ts +0 -274
  146. package/example/src/utils.ts +0 -83
  147. package/example/yarn.lock +0 -7358
  148. package/exampleForExpo/.buckconfig +0 -6
  149. package/exampleForExpo/.expo/README.md +0 -8
  150. package/exampleForExpo/.expo/devices.json +0 -3
  151. package/exampleForExpo/.gitattributes +0 -1
  152. package/exampleForExpo/.gitignore +0 -125
  153. package/exampleForExpo/.idea/.gitignore +0 -3
  154. package/exampleForExpo/.idea/caches/deviceStreaming.xml +0 -549
  155. package/exampleForExpo/.idea/exampleForExpo.iml +0 -9
  156. package/exampleForExpo/.idea/misc.xml +0 -6
  157. package/exampleForExpo/.idea/modules.xml +0 -8
  158. package/exampleForExpo/.idea/vcs.xml +0 -6
  159. package/exampleForExpo/.idea/workspace.xml +0 -53
  160. package/exampleForExpo/README.md +0 -58
  161. package/exampleForExpo/__tests__/App.js +0 -10
  162. package/exampleForExpo/android/.gitignore +0 -21
  163. package/exampleForExpo/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  164. package/exampleForExpo/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  165. package/exampleForExpo/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  166. package/exampleForExpo/android/.gradle/7.5.1/gc.properties +0 -0
  167. package/exampleForExpo/android/.gradle/vcs-1/gc.properties +0 -0
  168. package/exampleForExpo/android/app/BUCK +0 -55
  169. package/exampleForExpo/android/app/build.gradle +0 -362
  170. package/exampleForExpo/android/app/build_defs.bzl +0 -19
  171. package/exampleForExpo/android/app/debug.keystore +0 -0
  172. package/exampleForExpo/android/app/proguard-rules.pro +0 -14
  173. package/exampleForExpo/android/app/src/debug/AndroidManifest.xml +0 -7
  174. package/exampleForExpo/android/app/src/debug/java/kr/iamport/exampleForExpo/ReactNativeFlipper.java +0 -69
  175. package/exampleForExpo/android/app/src/main/AndroidManifest.xml +0 -34
  176. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainActivity.java +0 -83
  177. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainApplication.java +0 -106
  178. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/MainApplicationReactNativeHost.java +0 -117
  179. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/components/MainComponentsRegistry.java +0 -36
  180. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
  181. package/exampleForExpo/android/app/src/main/jni/CMakeLists.txt +0 -7
  182. package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
  183. package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
  184. package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
  185. package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
  186. package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
  187. package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
  188. package/exampleForExpo/android/app/src/main/jni/OnLoad.cpp +0 -11
  189. package/exampleForExpo/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  190. package/exampleForExpo/android/app/src/main/res/drawable/splashscreen.xml +0 -4
  191. package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  192. package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  193. package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  194. package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  195. package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  196. package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  197. package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  198. package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  199. package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  200. package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  201. package/exampleForExpo/android/app/src/main/res/values/colors.xml +0 -4
  202. package/exampleForExpo/android/app/src/main/res/values/strings.xml +0 -3
  203. package/exampleForExpo/android/app/src/main/res/values/styles.xml +0 -17
  204. package/exampleForExpo/android/app/src/main/res/values-night/colors.xml +0 -1
  205. package/exampleForExpo/android/build.gradle +0 -65
  206. package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  207. package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  208. package/exampleForExpo/android/gradle.properties +0 -53
  209. package/exampleForExpo/android/gradlew +0 -240
  210. package/exampleForExpo/android/gradlew.bat +0 -91
  211. package/exampleForExpo/android/settings.gradle +0 -17
  212. package/exampleForExpo/app.json +0 -16
  213. package/exampleForExpo/babel.config.js +0 -11
  214. package/exampleForExpo/index.js +0 -9
  215. package/exampleForExpo/ios/.gitignore +0 -30
  216. package/exampleForExpo/ios/.xcode.env +0 -11
  217. package/exampleForExpo/ios/Podfile +0 -61
  218. package/exampleForExpo/ios/Podfile.lock +0 -734
  219. package/exampleForExpo/ios/Podfile.properties.json +0 -3
  220. package/exampleForExpo/ios/exampleForExpo/AppDelegate.h +0 -9
  221. package/exampleForExpo/ios/exampleForExpo/AppDelegate.mm +0 -166
  222. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
  223. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/Contents.json +0 -6
  224. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/Contents.json +0 -21
  225. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
  226. package/exampleForExpo/ios/exampleForExpo/Info.plist +0 -118
  227. package/exampleForExpo/ios/exampleForExpo/SplashScreen.storyboard +0 -43
  228. package/exampleForExpo/ios/exampleForExpo/Supporting/Expo.plist +0 -16
  229. package/exampleForExpo/ios/exampleForExpo/exampleForExpo.entitlements +0 -8
  230. package/exampleForExpo/ios/exampleForExpo/main.m +0 -10
  231. package/exampleForExpo/ios/exampleForExpo/noop-file.swift +0 -4
  232. package/exampleForExpo/ios/exampleForExpo.xcodeproj/project.pbxproj +0 -544
  233. package/exampleForExpo/ios/exampleForExpo.xcodeproj/xcshareddata/xcschemes/exampleForExpo.xcscheme +0 -88
  234. package/exampleForExpo/ios/exampleForExpo.xcworkspace/contents.xcworkspacedata +0 -10
  235. package/exampleForExpo/ios/exampleForExpo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  236. package/exampleForExpo/metro.config.js +0 -62
  237. package/exampleForExpo/package.json +0 -40
  238. package/exampleForExpo/src/App.js +0 -14
  239. package/exampleForExpo/src/Certification/index.js +0 -25
  240. package/exampleForExpo/src/CertificationResult/index.js +0 -61
  241. package/exampleForExpo/src/CertificationTest/index.js +0 -151
  242. package/exampleForExpo/src/Home/index.js +0 -80
  243. package/exampleForExpo/src/Loading/index.js +0 -10
  244. package/exampleForExpo/src/NavigationService.js +0 -102
  245. package/exampleForExpo/src/Payment/index.js +0 -23
  246. package/exampleForExpo/src/PaymentResult/index.js +0 -82
  247. package/exampleForExpo/src/PaymentTest/index.js +0 -313
  248. package/exampleForExpo/src/Picker/index.js +0 -19
  249. package/exampleForExpo/src/constants.js +0 -322
  250. package/exampleForExpo/src/utils.js +0 -116
  251. package/exampleForExpo/yarn.lock +0 -9498
  252. package/exampleForManagedExpo/.expo-shared/assets.json +0 -4
  253. package/exampleForManagedExpo/.gitignore +0 -22
  254. package/exampleForManagedExpo/App.js +0 -11
  255. package/exampleForManagedExpo/README.md +0 -33
  256. package/exampleForManagedExpo/app.json +0 -90
  257. package/exampleForManagedExpo/assets/adaptive-icon.png +0 -0
  258. package/exampleForManagedExpo/assets/favicon.png +0 -0
  259. package/exampleForManagedExpo/assets/icon.png +0 -0
  260. package/exampleForManagedExpo/assets/splash.png +0 -0
  261. package/exampleForManagedExpo/babel.config.js +0 -11
  262. package/exampleForManagedExpo/metro.config.js +0 -62
  263. package/exampleForManagedExpo/package.json +0 -36
  264. package/exampleForManagedExpo/src/Certification/index.js +0 -25
  265. package/exampleForManagedExpo/src/CertificationResult/index.js +0 -61
  266. package/exampleForManagedExpo/src/CertificationTest/index.js +0 -151
  267. package/exampleForManagedExpo/src/Home/index.js +0 -80
  268. package/exampleForManagedExpo/src/Loading/index.js +0 -10
  269. package/exampleForManagedExpo/src/NavigationService.js +0 -102
  270. package/exampleForManagedExpo/src/Payment/index.js +0 -23
  271. package/exampleForManagedExpo/src/PaymentResult/index.js +0 -82
  272. package/exampleForManagedExpo/src/PaymentTest/index.js +0 -313
  273. package/exampleForManagedExpo/src/Picker/index.js +0 -19
  274. package/exampleForManagedExpo/src/constants.js +0 -322
  275. package/exampleForManagedExpo/src/utils.js +0 -116
  276. package/exampleForManagedExpo/yarn.lock +0 -9411
  277. package/exampleForWebView/.buckconfig +0 -6
  278. package/exampleForWebView/.eslintrc.js +0 -4
  279. package/exampleForWebView/.gitattributes +0 -3
  280. package/exampleForWebView/.gitignore +0 -68
  281. package/exampleForWebView/.prettierrc.js +0 -7
  282. package/exampleForWebView/.watchmanconfig +0 -1
  283. package/exampleForWebView/README.md +0 -77
  284. package/exampleForWebView/__tests__/App-test.tsx +0 -14
  285. package/exampleForWebView/_editorconfig +0 -3
  286. package/exampleForWebView/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  287. package/exampleForWebView/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  288. package/exampleForWebView/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  289. package/exampleForWebView/android/.gradle/7.5.1/gc.properties +0 -0
  290. package/exampleForWebView/android/.gradle/vcs-1/gc.properties +0 -0
  291. package/exampleForWebView/android/app/BUCK +0 -55
  292. package/exampleForWebView/android/app/build.gradle +0 -313
  293. package/exampleForWebView/android/app/build_defs.bzl +0 -19
  294. package/exampleForWebView/android/app/debug.keystore +0 -0
  295. package/exampleForWebView/android/app/proguard-rules.pro +0 -10
  296. package/exampleForWebView/android/app/src/debug/AndroidManifest.xml +0 -13
  297. package/exampleForWebView/android/app/src/debug/java/com/exampleforwebview/ReactNativeFlipper.java +0 -73
  298. package/exampleForWebView/android/app/src/main/AndroidManifest.xml +0 -26
  299. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainActivity.java +0 -48
  300. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainApplication.java +0 -91
  301. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/MainApplicationReactNativeHost.java +0 -116
  302. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/components/MainComponentsRegistry.java +0 -36
  303. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
  304. package/exampleForWebView/android/app/src/main/jni/CMakeLists.txt +0 -7
  305. package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
  306. package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
  307. package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
  308. package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
  309. package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
  310. package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
  311. package/exampleForWebView/android/app/src/main/jni/OnLoad.cpp +0 -11
  312. package/exampleForWebView/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  313. package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  314. package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  315. package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  316. package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  317. package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  318. package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  319. package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  320. package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  321. package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  322. package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  323. package/exampleForWebView/android/app/src/main/res/values/strings.xml +0 -3
  324. package/exampleForWebView/android/app/src/main/res/values/styles.xml +0 -9
  325. package/exampleForWebView/android/build.gradle +0 -51
  326. package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  327. package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  328. package/exampleForWebView/android/gradle.properties +0 -40
  329. package/exampleForWebView/android/gradlew +0 -234
  330. package/exampleForWebView/android/gradlew.bat +0 -89
  331. package/exampleForWebView/android/settings.gradle +0 -11
  332. package/exampleForWebView/app.json +0 -4
  333. package/exampleForWebView/babel.config.js +0 -11
  334. package/exampleForWebView/index.js +0 -9
  335. package/exampleForWebView/ios/.xcode.env +0 -11
  336. package/exampleForWebView/ios/Podfile +0 -43
  337. package/exampleForWebView/ios/Podfile.lock +0 -748
  338. package/exampleForWebView/ios/exampleForWebView/AppDelegate.h +0 -8
  339. package/exampleForWebView/ios/exampleForWebView/AppDelegate.mm +0 -133
  340. package/exampleForWebView/ios/exampleForWebView/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  341. package/exampleForWebView/ios/exampleForWebView/Images.xcassets/Contents.json +0 -6
  342. package/exampleForWebView/ios/exampleForWebView/Info.plist +0 -96
  343. package/exampleForWebView/ios/exampleForWebView/LaunchScreen.storyboard +0 -47
  344. package/exampleForWebView/ios/exampleForWebView/main.m +0 -10
  345. package/exampleForWebView/ios/exampleForWebView.xcodeproj/project.pbxproj +0 -723
  346. package/exampleForWebView/ios/exampleForWebView.xcodeproj/xcshareddata/xcschemes/exampleForWebView.xcscheme +0 -88
  347. package/exampleForWebView/ios/exampleForWebView.xcworkspace/contents.xcworkspacedata +0 -10
  348. package/exampleForWebView/ios/exampleForWebView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  349. package/exampleForWebView/ios/exampleForWebViewTests/Info.plist +0 -24
  350. package/exampleForWebView/ios/exampleForWebViewTests/exampleForWebViewTests.m +0 -66
  351. package/exampleForWebView/manuals/CERTIFICATION.md +0 -223
  352. package/exampleForWebView/manuals/PAYMENT.md +0 -232
  353. package/exampleForWebView/metro.config.js +0 -61
  354. package/exampleForWebView/package.json +0 -54
  355. package/exampleForWebView/src/App.tsx +0 -50
  356. package/exampleForWebView/src/Certification.tsx +0 -54
  357. package/exampleForWebView/src/Home.tsx +0 -49
  358. package/exampleForWebView/src/Loading.tsx +0 -23
  359. package/exampleForWebView/src/Payment.tsx +0 -65
  360. package/exampleForWebView/yarn.lock +0 -7362
  361. package/iamport-react-native.podspec +0 -19
  362. package/ios/IamportReactNative-Bridging-Header.h +0 -1
  363. package/ios/IamportReactNative.xcodeproj/project.pbxproj +0 -293
  364. package/ios/IamportReactNativeViewManager.m +0 -12
  365. package/ios/IamportReactNativeViewManager.swift +0 -32
  366. package/lib/commonjs/components/Certification/index.js +0 -121
  367. package/lib/commonjs/components/Certification/index.js.map +0 -1
  368. package/lib/commonjs/components/ErrorOnParams/index.js +0 -50
  369. package/lib/commonjs/components/ErrorOnParams/index.js.map +0 -1
  370. package/lib/commonjs/components/Loading/index.js +0 -34
  371. package/lib/commonjs/components/Loading/index.js.map +0 -1
  372. package/lib/commonjs/components/Payment/index.js +0 -225
  373. package/lib/commonjs/components/Payment/index.js.map +0 -1
  374. package/lib/commonjs/constants/index.js +0 -114
  375. package/lib/commonjs/constants/index.js.map +0 -1
  376. package/lib/commonjs/img/iamport-logo.png +0 -0
  377. package/lib/commonjs/index.js +0 -29
  378. package/lib/commonjs/index.js.map +0 -1
  379. package/lib/commonjs/styles.js +0 -27
  380. package/lib/commonjs/styles.js.map +0 -1
  381. package/lib/commonjs/utils/IamportUrl.js +0 -289
  382. package/lib/commonjs/utils/IamportUrl.js.map +0 -1
  383. package/lib/commonjs/utils/Validation.js +0 -109
  384. package/lib/commonjs/utils/Validation.js.map +0 -1
  385. package/lib/commonjs/utils/ValidationForPayment.js +0 -112
  386. package/lib/commonjs/utils/ValidationForPayment.js.map +0 -1
  387. package/lib/typescript/components/Certification/index.d.ts.map +0 -1
  388. package/lib/typescript/components/ErrorOnParams/index.d.ts +0 -7
  389. package/lib/typescript/components/ErrorOnParams/index.d.ts.map +0 -1
  390. package/lib/typescript/components/Loading/index.d.ts +0 -4
  391. package/lib/typescript/components/Loading/index.d.ts.map +0 -1
  392. package/lib/typescript/components/Payment/index.d.ts.map +0 -1
  393. package/lib/typescript/constants/index.d.ts.map +0 -1
  394. package/lib/typescript/index.d.ts.map +0 -1
  395. package/lib/typescript/styles.d.ts.map +0 -1
  396. package/lib/typescript/utils/IamportUrl.d.ts.map +0 -1
  397. package/lib/typescript/utils/Validation.d.ts.map +0 -1
  398. package/lib/typescript/utils/ValidationForPayment.d.ts.map +0 -1
  399. package/manuals/CALLBACK.md +0 -72
  400. package/manuals/EXAMPLE.md +0 -168
  401. package/manuals/EXPO.md +0 -246
  402. package/manuals/INSTALL.md +0 -31
  403. package/manuals/SETTING.md +0 -140
  404. package/manuals/SUPPORT.md +0 -35
  405. package/manuals/TRANS.md +0 -77
  406. package/manuals/VERSION.md +0 -187
  407. package/manuals/assets/after-linking-iamport.png +0 -0
  408. package/manuals/assets/after-linking-webview.png +0 -0
  409. package/manuals/assets/allow-arbitrary.gif +0 -0
  410. package/manuals/assets/android-studio-avd-manager.png +0 -0
  411. package/manuals/assets/android-studio-build.png +0 -0
  412. package/manuals/assets/app-scheme-registry.gif +0 -0
  413. package/manuals/assets/expo-eject.png +0 -0
  414. package/manuals/assets/ios-emulator-certification.png +0 -0
  415. package/manuals/assets/ios-emulator-home.png +0 -0
  416. package/manuals/assets/ios-emulator-payment.png +0 -0
  417. package/manuals/assets/ios-trans-create-header-file-1.png +0 -0
  418. package/manuals/assets/ios-trans-create-header-file-2.png +0 -0
  419. package/manuals/assets/ios-trans-create-objectivec-file-1.png +0 -0
  420. package/manuals/assets/ios-trans-create-objectivec-file-2.png +0 -0
  421. package/manuals/assets/ios-trans-result.png +0 -0
  422. package/manuals/assets/webview-peer-dependency.png +0 -0
  423. package/scripts/bootstrap.js +0 -24
  424. package/tsconfig.build.json +0 -9
  425. package/tsconfig.json +0 -26
  426. package/yarn.lock +0 -6174
  427. /package/lib/typescript/{constants → src/constants}/index.d.ts +0 -0
  428. /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
  429. /package/lib/typescript/{utils → src/utils}/Validation.d.ts +0 -0
  430. /package/lib/typescript/{utils → src/utils}/ValidationForPayment.d.ts +0 -0
@@ -1,73 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * <p>This source code is licensed under the MIT license found in the LICENSE file in the root
5
- * directory of this source tree.
6
- */
7
- package com.exampleforwebview;
8
-
9
- import android.content.Context;
10
- import com.facebook.flipper.android.AndroidFlipperClient;
11
- import com.facebook.flipper.android.utils.FlipperUtils;
12
- import com.facebook.flipper.core.FlipperClient;
13
- import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14
- import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15
- import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16
- import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17
- import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18
- import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19
- import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20
- import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21
- import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22
- import com.facebook.react.ReactInstanceEventListener;
23
- import com.facebook.react.ReactInstanceManager;
24
- import com.facebook.react.bridge.ReactContext;
25
- import com.facebook.react.modules.network.NetworkingModule;
26
- import okhttp3.OkHttpClient;
27
-
28
- public class ReactNativeFlipper {
29
- public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
30
- if (FlipperUtils.shouldEnableFlipper(context)) {
31
- final FlipperClient client = AndroidFlipperClient.getInstance(context);
32
-
33
- client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
34
- client.addPlugin(new ReactFlipperPlugin());
35
- client.addPlugin(new DatabasesFlipperPlugin(context));
36
- client.addPlugin(new SharedPreferencesFlipperPlugin(context));
37
- client.addPlugin(CrashReporterPlugin.getInstance());
38
-
39
- NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
40
- NetworkingModule.setCustomClientBuilder(
41
- new NetworkingModule.CustomClientBuilder() {
42
- @Override
43
- public void apply(OkHttpClient.Builder builder) {
44
- builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
45
- }
46
- });
47
- client.addPlugin(networkFlipperPlugin);
48
- client.start();
49
-
50
- // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
51
- // Hence we run if after all native modules have been initialized
52
- ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
53
- if (reactContext == null) {
54
- reactInstanceManager.addReactInstanceEventListener(
55
- new ReactInstanceEventListener() {
56
- @Override
57
- public void onReactContextInitialized(ReactContext reactContext) {
58
- reactInstanceManager.removeReactInstanceEventListener(this);
59
- reactContext.runOnNativeModulesQueueThread(
60
- new Runnable() {
61
- @Override
62
- public void run() {
63
- client.addPlugin(new FrescoFlipperPlugin());
64
- }
65
- });
66
- }
67
- });
68
- } else {
69
- client.addPlugin(new FrescoFlipperPlugin());
70
- }
71
- }
72
- }
73
- }
@@ -1,26 +0,0 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.exampleforwebview">
3
-
4
- <uses-permission android:name="android.permission.INTERNET" />
5
-
6
- <application
7
- android:name=".MainApplication"
8
- android:label="@string/app_name"
9
- android:icon="@mipmap/ic_launcher"
10
- android:roundIcon="@mipmap/ic_launcher_round"
11
- android:allowBackup="false"
12
- android:theme="@style/AppTheme">
13
- <activity
14
- android:name=".MainActivity"
15
- android:label="@string/app_name"
16
- android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
17
- android:launchMode="singleTask"
18
- android:windowSoftInputMode="adjustResize"
19
- android:exported="true">
20
- <intent-filter>
21
- <action android:name="android.intent.action.MAIN" />
22
- <category android:name="android.intent.category.LAUNCHER" />
23
- </intent-filter>
24
- </activity>
25
- </application>
26
- </manifest>
@@ -1,48 +0,0 @@
1
- package com.exampleforwebview;
2
-
3
- import com.facebook.react.ReactActivity;
4
- import com.facebook.react.ReactActivityDelegate;
5
- import com.facebook.react.ReactRootView;
6
-
7
- public class MainActivity extends ReactActivity {
8
-
9
- /**
10
- * Returns the name of the main component registered from JavaScript. This is used to schedule
11
- * rendering of the component.
12
- */
13
- @Override
14
- protected String getMainComponentName() {
15
- return "exampleForWebView";
16
- }
17
-
18
- /**
19
- * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
20
- * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
21
- * (Paper).
22
- */
23
- @Override
24
- protected ReactActivityDelegate createReactActivityDelegate() {
25
- return new MainActivityDelegate(this, getMainComponentName());
26
- }
27
-
28
- public static class MainActivityDelegate extends ReactActivityDelegate {
29
- public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
30
- super(activity, mainComponentName);
31
- }
32
-
33
- @Override
34
- protected ReactRootView createRootView() {
35
- ReactRootView reactRootView = new ReactRootView(getContext());
36
- // If you opted-in for the New Architecture, we enable the Fabric Renderer.
37
- reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
38
- return reactRootView;
39
- }
40
-
41
- @Override
42
- protected boolean isConcurrentRootEnabled() {
43
- // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
44
- // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
45
- return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
46
- }
47
- }
48
- }
@@ -1,91 +0,0 @@
1
- package com.exampleforwebview;
2
-
3
- import android.app.Application;
4
- import android.content.Context;
5
- import com.facebook.react.PackageList;
6
- import com.facebook.react.ReactApplication;
7
- import com.facebook.react.ReactInstanceManager;
8
- import com.facebook.react.ReactNativeHost;
9
- import com.facebook.react.ReactPackage;
10
- import com.facebook.react.config.ReactFeatureFlags;
11
- import com.facebook.soloader.SoLoader;
12
- import com.exampleforwebview.newarchitecture.MainApplicationReactNativeHost;
13
- import java.lang.reflect.InvocationTargetException;
14
- import java.util.List;
15
-
16
- public class MainApplication extends Application implements ReactApplication {
17
-
18
- private final ReactNativeHost mReactNativeHost =
19
- new ReactNativeHost(this) {
20
- @Override
21
- public boolean getUseDeveloperSupport() {
22
- return BuildConfig.DEBUG;
23
- }
24
-
25
- @Override
26
- protected List<ReactPackage> getPackages() {
27
- @SuppressWarnings("UnnecessaryLocalVariable")
28
- List<ReactPackage> packages = new PackageList(this).getPackages();
29
- // Packages that cannot be autolinked yet can be added manually here, for example:
30
- // packages.add(new MyReactNativePackage());
31
- return packages;
32
- }
33
-
34
- @Override
35
- protected String getJSMainModuleName() {
36
- return "index";
37
- }
38
- };
39
-
40
- private final ReactNativeHost mNewArchitectureNativeHost =
41
- new MainApplicationReactNativeHost(this);
42
-
43
- @Override
44
- public ReactNativeHost getReactNativeHost() {
45
- if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
46
- return mNewArchitectureNativeHost;
47
- } else {
48
- return mReactNativeHost;
49
- }
50
- }
51
-
52
- @Override
53
- public void onCreate() {
54
- super.onCreate();
55
- // If you opted-in for the New Architecture, we enable the TurboModule system
56
- ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
57
- SoLoader.init(this, /* native exopackage */ false);
58
- initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
59
- }
60
-
61
- /**
62
- * Loads Flipper in React Native templates. Call this in the onCreate method with something like
63
- * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
64
- *
65
- * @param context
66
- * @param reactInstanceManager
67
- */
68
- private static void initializeFlipper(
69
- Context context, ReactInstanceManager reactInstanceManager) {
70
- if (BuildConfig.DEBUG) {
71
- try {
72
- /*
73
- We use reflection here to pick up the class that initializes Flipper,
74
- since Flipper library is not available in release mode
75
- */
76
- Class<?> aClass = Class.forName("com.exampleforwebview.ReactNativeFlipper");
77
- aClass
78
- .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
79
- .invoke(null, context, reactInstanceManager);
80
- } catch (ClassNotFoundException e) {
81
- e.printStackTrace();
82
- } catch (NoSuchMethodException e) {
83
- e.printStackTrace();
84
- } catch (IllegalAccessException e) {
85
- e.printStackTrace();
86
- } catch (InvocationTargetException e) {
87
- e.printStackTrace();
88
- }
89
- }
90
- }
91
- }
@@ -1,116 +0,0 @@
1
- package com.exampleforwebview.newarchitecture;
2
-
3
- import android.app.Application;
4
- import androidx.annotation.NonNull;
5
- import com.facebook.react.PackageList;
6
- import com.facebook.react.ReactInstanceManager;
7
- import com.facebook.react.ReactNativeHost;
8
- import com.facebook.react.ReactPackage;
9
- import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
10
- import com.facebook.react.bridge.JSIModulePackage;
11
- import com.facebook.react.bridge.JSIModuleProvider;
12
- import com.facebook.react.bridge.JSIModuleSpec;
13
- import com.facebook.react.bridge.JSIModuleType;
14
- import com.facebook.react.bridge.JavaScriptContextHolder;
15
- import com.facebook.react.bridge.ReactApplicationContext;
16
- import com.facebook.react.bridge.UIManager;
17
- import com.facebook.react.fabric.ComponentFactory;
18
- import com.facebook.react.fabric.CoreComponentsRegistry;
19
- import com.facebook.react.fabric.FabricJSIModuleProvider;
20
- import com.facebook.react.fabric.ReactNativeConfig;
21
- import com.facebook.react.uimanager.ViewManagerRegistry;
22
- import com.exampleforwebview.BuildConfig;
23
- import com.exampleforwebview.newarchitecture.components.MainComponentsRegistry;
24
- import com.exampleforwebview.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
25
- import java.util.ArrayList;
26
- import java.util.List;
27
-
28
- /**
29
- * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both
30
- * TurboModule delegates and the Fabric Renderer.
31
- *
32
- * <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
33
- * `newArchEnabled` property). Is ignored otherwise.
34
- */
35
- public class MainApplicationReactNativeHost extends ReactNativeHost {
36
- public MainApplicationReactNativeHost(Application application) {
37
- super(application);
38
- }
39
-
40
- @Override
41
- public boolean getUseDeveloperSupport() {
42
- return BuildConfig.DEBUG;
43
- }
44
-
45
- @Override
46
- protected List<ReactPackage> getPackages() {
47
- List<ReactPackage> packages = new PackageList(this).getPackages();
48
- // Packages that cannot be autolinked yet can be added manually here, for example:
49
- // packages.add(new MyReactNativePackage());
50
- // TurboModules must also be loaded here providing a valid TurboReactPackage implementation:
51
- // packages.add(new TurboReactPackage() { ... });
52
- // If you have custom Fabric Components, their ViewManagers should also be loaded here
53
- // inside a ReactPackage.
54
- return packages;
55
- }
56
-
57
- @Override
58
- protected String getJSMainModuleName() {
59
- return "index";
60
- }
61
-
62
- @NonNull
63
- @Override
64
- protected ReactPackageTurboModuleManagerDelegate.Builder
65
- getReactPackageTurboModuleManagerDelegateBuilder() {
66
- // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary
67
- // for the new architecture and to use TurboModules correctly.
68
- return new MainApplicationTurboModuleManagerDelegate.Builder();
69
- }
70
-
71
- @Override
72
- protected JSIModulePackage getJSIModulePackage() {
73
- return new JSIModulePackage() {
74
- @Override
75
- public List<JSIModuleSpec> getJSIModules(
76
- final ReactApplicationContext reactApplicationContext,
77
- final JavaScriptContextHolder jsContext) {
78
- final List<JSIModuleSpec> specs = new ArrayList<>();
79
-
80
- // Here we provide a new JSIModuleSpec that will be responsible of providing the
81
- // custom Fabric Components.
82
- specs.add(
83
- new JSIModuleSpec() {
84
- @Override
85
- public JSIModuleType getJSIModuleType() {
86
- return JSIModuleType.UIManager;
87
- }
88
-
89
- @Override
90
- public JSIModuleProvider<UIManager> getJSIModuleProvider() {
91
- final ComponentFactory componentFactory = new ComponentFactory();
92
- CoreComponentsRegistry.register(componentFactory);
93
-
94
- // Here we register a Components Registry.
95
- // The one that is generated with the template contains no components
96
- // and just provides you the one from React Native core.
97
- MainComponentsRegistry.register(componentFactory);
98
-
99
- final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
100
-
101
- ViewManagerRegistry viewManagerRegistry =
102
- new ViewManagerRegistry(
103
- reactInstanceManager.getOrCreateViewManagers(reactApplicationContext));
104
-
105
- return new FabricJSIModuleProvider(
106
- reactApplicationContext,
107
- componentFactory,
108
- ReactNativeConfig.DEFAULT_CONFIG,
109
- viewManagerRegistry);
110
- }
111
- });
112
- return specs;
113
- }
114
- };
115
- }
116
- }
@@ -1,36 +0,0 @@
1
- package com.exampleforwebview.newarchitecture.components;
2
-
3
- import com.facebook.jni.HybridData;
4
- import com.facebook.proguard.annotations.DoNotStrip;
5
- import com.facebook.react.fabric.ComponentFactory;
6
- import com.facebook.soloader.SoLoader;
7
-
8
- /**
9
- * Class responsible to load the custom Fabric Components. This class has native methods and needs a
10
- * corresponding C++ implementation/header file to work correctly (already placed inside the jni/
11
- * folder for you).
12
- *
13
- * <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
14
- * `newArchEnabled` property). Is ignored otherwise.
15
- */
16
- @DoNotStrip
17
- public class MainComponentsRegistry {
18
- static {
19
- SoLoader.loadLibrary("fabricjni");
20
- }
21
-
22
- @DoNotStrip private final HybridData mHybridData;
23
-
24
- @DoNotStrip
25
- private native HybridData initHybrid(ComponentFactory componentFactory);
26
-
27
- @DoNotStrip
28
- private MainComponentsRegistry(ComponentFactory componentFactory) {
29
- mHybridData = initHybrid(componentFactory);
30
- }
31
-
32
- @DoNotStrip
33
- public static MainComponentsRegistry register(ComponentFactory componentFactory) {
34
- return new MainComponentsRegistry(componentFactory);
35
- }
36
- }
@@ -1,48 +0,0 @@
1
- package com.exampleforwebview.newarchitecture.modules;
2
-
3
- import com.facebook.jni.HybridData;
4
- import com.facebook.react.ReactPackage;
5
- import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
6
- import com.facebook.react.bridge.ReactApplicationContext;
7
- import com.facebook.soloader.SoLoader;
8
- import java.util.List;
9
-
10
- /**
11
- * Class responsible to load the TurboModules. This class has native methods and needs a
12
- * corresponding C++ implementation/header file to work correctly (already placed inside the jni/
13
- * folder for you).
14
- *
15
- * <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
16
- * `newArchEnabled` property). Is ignored otherwise.
17
- */
18
- public class MainApplicationTurboModuleManagerDelegate
19
- extends ReactPackageTurboModuleManagerDelegate {
20
-
21
- private static volatile boolean sIsSoLibraryLoaded;
22
-
23
- protected MainApplicationTurboModuleManagerDelegate(
24
- ReactApplicationContext reactApplicationContext, List<ReactPackage> packages) {
25
- super(reactApplicationContext, packages);
26
- }
27
-
28
- protected native HybridData initHybrid();
29
-
30
- native boolean canCreateTurboModule(String moduleName);
31
-
32
- public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder {
33
- protected MainApplicationTurboModuleManagerDelegate build(
34
- ReactApplicationContext context, List<ReactPackage> packages) {
35
- return new MainApplicationTurboModuleManagerDelegate(context, packages);
36
- }
37
- }
38
-
39
- @Override
40
- protected synchronized void maybeLoadOtherSoLibraries() {
41
- if (!sIsSoLibraryLoaded) {
42
- // If you change the name of your application .so file in the Android.mk file,
43
- // make sure you update the name here as well.
44
- SoLoader.loadLibrary("exampleforwebview_appmodules");
45
- sIsSoLibraryLoaded = true;
46
- }
47
- }
48
- }
@@ -1,7 +0,0 @@
1
- cmake_minimum_required(VERSION 3.13)
2
-
3
- # Define the library name here.
4
- project(exampleforwebview_appmodules)
5
-
6
- # This file includes all the necessary to let you build your application with the New Architecture.
7
- include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)
@@ -1,32 +0,0 @@
1
- #include "MainApplicationModuleProvider.h"
2
-
3
- #include <rncli.h>
4
- #include <rncore.h>
5
-
6
- namespace facebook {
7
- namespace react {
8
-
9
- std::shared_ptr<TurboModule> MainApplicationModuleProvider(
10
- const std::string &moduleName,
11
- const JavaTurboModule::InitParams &params) {
12
- // Here you can provide your own module provider for TurboModules coming from
13
- // either your application or from external libraries. The approach to follow
14
- // is similar to the following (for a library called `samplelibrary`:
15
- //
16
- // auto module = samplelibrary_ModuleProvider(moduleName, params);
17
- // if (module != nullptr) {
18
- // return module;
19
- // }
20
- // return rncore_ModuleProvider(moduleName, params);
21
-
22
- // Module providers autolinked by RN CLI
23
- auto rncli_module = rncli_ModuleProvider(moduleName, params);
24
- if (rncli_module != nullptr) {
25
- return rncli_module;
26
- }
27
-
28
- return rncore_ModuleProvider(moduleName, params);
29
- }
30
-
31
- } // namespace react
32
- } // namespace facebook
@@ -1,16 +0,0 @@
1
- #pragma once
2
-
3
- #include <memory>
4
- #include <string>
5
-
6
- #include <ReactCommon/JavaTurboModule.h>
7
-
8
- namespace facebook {
9
- namespace react {
10
-
11
- std::shared_ptr<TurboModule> MainApplicationModuleProvider(
12
- const std::string &moduleName,
13
- const JavaTurboModule::InitParams &params);
14
-
15
- } // namespace react
16
- } // namespace facebook
@@ -1,45 +0,0 @@
1
- #include "MainApplicationTurboModuleManagerDelegate.h"
2
- #include "MainApplicationModuleProvider.h"
3
-
4
- namespace facebook {
5
- namespace react {
6
-
7
- jni::local_ref<MainApplicationTurboModuleManagerDelegate::jhybriddata>
8
- MainApplicationTurboModuleManagerDelegate::initHybrid(
9
- jni::alias_ref<jhybridobject>) {
10
- return makeCxxInstance();
11
- }
12
-
13
- void MainApplicationTurboModuleManagerDelegate::registerNatives() {
14
- registerHybrid({
15
- makeNativeMethod(
16
- "initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
17
- makeNativeMethod(
18
- "canCreateTurboModule",
19
- MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
20
- });
21
- }
22
-
23
- std::shared_ptr<TurboModule>
24
- MainApplicationTurboModuleManagerDelegate::getTurboModule(
25
- const std::string &name,
26
- const std::shared_ptr<CallInvoker> &jsInvoker) {
27
- // Not implemented yet: provide pure-C++ NativeModules here.
28
- return nullptr;
29
- }
30
-
31
- std::shared_ptr<TurboModule>
32
- MainApplicationTurboModuleManagerDelegate::getTurboModule(
33
- const std::string &name,
34
- const JavaTurboModule::InitParams &params) {
35
- return MainApplicationModuleProvider(name, params);
36
- }
37
-
38
- bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
39
- const std::string &name) {
40
- return getTurboModule(name, nullptr) != nullptr ||
41
- getTurboModule(name, {.moduleName = name}) != nullptr;
42
- }
43
-
44
- } // namespace react
45
- } // namespace facebook
@@ -1,38 +0,0 @@
1
- #include <memory>
2
- #include <string>
3
-
4
- #include <ReactCommon/TurboModuleManagerDelegate.h>
5
- #include <fbjni/fbjni.h>
6
-
7
- namespace facebook {
8
- namespace react {
9
-
10
- class MainApplicationTurboModuleManagerDelegate
11
- : public jni::HybridClass<
12
- MainApplicationTurboModuleManagerDelegate,
13
- TurboModuleManagerDelegate> {
14
- public:
15
- // Adapt it to the package you used for your Java class.
16
- static constexpr auto kJavaDescriptor =
17
- "Lcom/exampleforwebview/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
18
-
19
- static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject>);
20
-
21
- static void registerNatives();
22
-
23
- std::shared_ptr<TurboModule> getTurboModule(
24
- const std::string &name,
25
- const std::shared_ptr<CallInvoker> &jsInvoker) override;
26
- std::shared_ptr<TurboModule> getTurboModule(
27
- const std::string &name,
28
- const JavaTurboModule::InitParams &params) override;
29
-
30
- /**
31
- * Test-only method. Allows user to verify whether a TurboModule can be
32
- * created by instances of this class.
33
- */
34
- bool canCreateTurboModule(const std::string &name);
35
- };
36
-
37
- } // namespace react
38
- } // namespace facebook
@@ -1,65 +0,0 @@
1
- #include "MainComponentsRegistry.h"
2
-
3
- #include <CoreComponentsRegistry.h>
4
- #include <fbjni/fbjni.h>
5
- #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
6
- #include <react/renderer/components/rncore/ComponentDescriptors.h>
7
- #include <rncli.h>
8
-
9
- namespace facebook {
10
- namespace react {
11
-
12
- MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
13
-
14
- std::shared_ptr<ComponentDescriptorProviderRegistry const>
15
- MainComponentsRegistry::sharedProviderRegistry() {
16
- auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
17
-
18
- // Autolinked providers registered by RN CLI
19
- rncli_registerProviders(providerRegistry);
20
-
21
- // Custom Fabric Components go here. You can register custom
22
- // components coming from your App or from 3rd party libraries here.
23
- //
24
- // providerRegistry->add(concreteComponentDescriptorProvider<
25
- // AocViewerComponentDescriptor>());
26
- return providerRegistry;
27
- }
28
-
29
- jni::local_ref<MainComponentsRegistry::jhybriddata>
30
- MainComponentsRegistry::initHybrid(
31
- jni::alias_ref<jclass>,
32
- ComponentFactory *delegate) {
33
- auto instance = makeCxxInstance(delegate);
34
-
35
- auto buildRegistryFunction =
36
- [](EventDispatcher::Weak const &eventDispatcher,
37
- ContextContainer::Shared const &contextContainer)
38
- -> ComponentDescriptorRegistry::Shared {
39
- auto registry = MainComponentsRegistry::sharedProviderRegistry()
40
- ->createComponentDescriptorRegistry(
41
- {eventDispatcher, contextContainer});
42
-
43
- auto mutableRegistry =
44
- std::const_pointer_cast<ComponentDescriptorRegistry>(registry);
45
-
46
- mutableRegistry->setFallbackComponentDescriptor(
47
- std::make_shared<UnimplementedNativeViewComponentDescriptor>(
48
- ComponentDescriptorParameters{
49
- eventDispatcher, contextContainer, nullptr}));
50
-
51
- return registry;
52
- };
53
-
54
- delegate->buildRegistryFunction = buildRegistryFunction;
55
- return instance;
56
- }
57
-
58
- void MainComponentsRegistry::registerNatives() {
59
- registerHybrid({
60
- makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
61
- });
62
- }
63
-
64
- } // namespace react
65
- } // namespace facebook