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,83 +0,0 @@
1
- package kr.iamport.exampleForExpo;
2
-
3
- import android.os.Build;
4
- import android.os.Bundle;
5
-
6
- import com.facebook.react.ReactActivity;
7
- import com.facebook.react.ReactActivityDelegate;
8
- import com.facebook.react.ReactRootView;
9
-
10
- import expo.modules.ReactActivityDelegateWrapper;
11
-
12
- public class MainActivity extends ReactActivity {
13
- @Override
14
- protected void onCreate(Bundle savedInstanceState) {
15
- // Set the theme to AppTheme BEFORE onCreate to support
16
- // coloring the background, status bar, and navigation bar.
17
- // This is required for expo-splash-screen.
18
- setTheme(R.style.AppTheme);
19
- super.onCreate(null);
20
- }
21
-
22
- /**
23
- * Returns the name of the main component registered from JavaScript.
24
- * This is used to schedule rendering of the component.
25
- */
26
- @Override
27
- protected String getMainComponentName() {
28
- return "main";
29
- }
30
-
31
- /**
32
- * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
33
- * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
34
- * (Paper).
35
- */
36
- @Override
37
- protected ReactActivityDelegate createReactActivityDelegate() {
38
- return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED,
39
- new MainActivityDelegate(this, getMainComponentName())
40
- );
41
- }
42
-
43
- /**
44
- * Align the back button behavior with Android S
45
- * where moving root activities to background instead of finishing activities.
46
- * @see <a href="https://developer.android.com/reference/android/app/Activity#onBackPressed()">onBackPressed</a>
47
- */
48
- @Override
49
- public void invokeDefaultOnBackPressed() {
50
- if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) {
51
- if (!moveTaskToBack(false)) {
52
- // For non-root activities, use the default implementation to finish them.
53
- super.invokeDefaultOnBackPressed();
54
- }
55
- return;
56
- }
57
-
58
- // Use the default back button implementation on Android S
59
- // because it's doing more than {@link Activity#moveTaskToBack} in fact.
60
- super.invokeDefaultOnBackPressed();
61
- }
62
-
63
- public static class MainActivityDelegate extends ReactActivityDelegate {
64
- public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
65
- super(activity, mainComponentName);
66
- }
67
-
68
- @Override
69
- protected ReactRootView createRootView() {
70
- ReactRootView reactRootView = new ReactRootView(getContext());
71
- // If you opted-in for the New Architecture, we enable the Fabric Renderer.
72
- reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
73
- return reactRootView;
74
- }
75
-
76
- @Override
77
- protected boolean isConcurrentRootEnabled() {
78
- // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
79
- // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
80
- return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
81
- }
82
- }
83
- }
@@ -1,106 +0,0 @@
1
- package kr.iamport.exampleForExpo;
2
-
3
- import android.app.Application;
4
- import android.content.Context;
5
- import android.content.res.Configuration;
6
- import androidx.annotation.NonNull;
7
-
8
- import com.facebook.react.PackageList;
9
- import com.facebook.react.ReactApplication;
10
- import com.facebook.react.ReactInstanceManager;
11
- import com.facebook.react.ReactNativeHost;
12
- import com.facebook.react.ReactPackage;
13
- import com.facebook.react.config.ReactFeatureFlags;
14
- import com.facebook.soloader.SoLoader;
15
- import kr.iamport.exampleForExpo.newarchitecture.MainApplicationReactNativeHost;
16
-
17
- import expo.modules.ApplicationLifecycleDispatcher;
18
- import expo.modules.ReactNativeHostWrapper;
19
-
20
- import java.lang.reflect.InvocationTargetException;
21
- import java.util.List;
22
-
23
- public class MainApplication extends Application implements ReactApplication {
24
- private final ReactNativeHost mReactNativeHost = new ReactNativeHostWrapper(
25
- this,
26
- new ReactNativeHost(this) {
27
- @Override
28
- public boolean getUseDeveloperSupport() {
29
- return BuildConfig.DEBUG;
30
- }
31
-
32
- @Override
33
- protected List<ReactPackage> getPackages() {
34
- @SuppressWarnings("UnnecessaryLocalVariable")
35
- List<ReactPackage> packages = new PackageList(this).getPackages();
36
- // Packages that cannot be autolinked yet can be added manually here, for example:
37
- // packages.add(new MyReactNativePackage());
38
- return packages;
39
- }
40
-
41
- @Override
42
- protected String getJSMainModuleName() {
43
- return "index";
44
- }
45
- });
46
-
47
- private final ReactNativeHost mNewArchitectureNativeHost =
48
- new ReactNativeHostWrapper(this, new MainApplicationReactNativeHost(this));
49
-
50
- @Override
51
- public ReactNativeHost getReactNativeHost() {
52
- if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
53
- return mNewArchitectureNativeHost;
54
- } else {
55
- return mReactNativeHost;
56
- }
57
- }
58
-
59
- @Override
60
- public void onCreate() {
61
- super.onCreate();
62
- // If you opted-in for the New Architecture, we enable the TurboModule system
63
- ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
64
- SoLoader.init(this, /* native exopackage */ false);
65
-
66
- initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
67
- ApplicationLifecycleDispatcher.onApplicationCreate(this);
68
- }
69
-
70
- @Override
71
- public void onConfigurationChanged(@NonNull Configuration newConfig) {
72
- super.onConfigurationChanged(newConfig);
73
- ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
74
- }
75
-
76
- /**
77
- * Loads Flipper in React Native templates. Call this in the onCreate method with something like
78
- * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
79
- *
80
- * @param context
81
- * @param reactInstanceManager
82
- */
83
- private static void initializeFlipper(
84
- Context context, ReactInstanceManager reactInstanceManager) {
85
- if (BuildConfig.DEBUG) {
86
- try {
87
- /*
88
- We use reflection here to pick up the class that initializes Flipper,
89
- since Flipper library is not available in release mode
90
- */
91
- Class<?> aClass = Class.forName("kr.iamport.exampleForExpo.ReactNativeFlipper");
92
- aClass
93
- .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
94
- .invoke(null, context, reactInstanceManager);
95
- } catch (ClassNotFoundException e) {
96
- e.printStackTrace();
97
- } catch (NoSuchMethodException e) {
98
- e.printStackTrace();
99
- } catch (IllegalAccessException e) {
100
- e.printStackTrace();
101
- } catch (InvocationTargetException e) {
102
- e.printStackTrace();
103
- }
104
- }
105
- }
106
- }
@@ -1,117 +0,0 @@
1
- package kr.iamport.exampleForExpo.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.EmptyReactNativeConfig;
20
- import com.facebook.react.fabric.FabricJSIModuleProvider;
21
- import com.facebook.react.fabric.ReactNativeConfig;
22
- import com.facebook.react.uimanager.ViewManagerRegistry;
23
- import kr.iamport.exampleForExpo.BuildConfig;
24
- import kr.iamport.exampleForExpo.newarchitecture.components.MainComponentsRegistry;
25
- import kr.iamport.exampleForExpo.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
26
- import java.util.ArrayList;
27
- import java.util.List;
28
-
29
- /**
30
- * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both
31
- * TurboModule delegates and the Fabric Renderer.
32
- *
33
- * <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
34
- * `newArchEnabled` property). Is ignored otherwise.
35
- */
36
- public class MainApplicationReactNativeHost extends ReactNativeHost {
37
- public MainApplicationReactNativeHost(Application application) {
38
- super(application);
39
- }
40
-
41
- @Override
42
- public boolean getUseDeveloperSupport() {
43
- return BuildConfig.DEBUG;
44
- }
45
-
46
- @Override
47
- protected List<ReactPackage> getPackages() {
48
- List<ReactPackage> packages = new PackageList(this).getPackages();
49
- // Packages that cannot be autolinked yet can be added manually here, for example:
50
- // packages.add(new MyReactNativePackage());
51
- // TurboModules must also be loaded here providing a valid TurboReactPackage implementation:
52
- // packages.add(new TurboReactPackage() { ... });
53
- // If you have custom Fabric Components, their ViewManagers should also be loaded here
54
- // inside a ReactPackage.
55
- return packages;
56
- }
57
-
58
- @Override
59
- protected String getJSMainModuleName() {
60
- return "index";
61
- }
62
-
63
- @NonNull
64
- @Override
65
- protected ReactPackageTurboModuleManagerDelegate.Builder
66
- getReactPackageTurboModuleManagerDelegateBuilder() {
67
- // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary
68
- // for the new architecture and to use TurboModules correctly.
69
- return new MainApplicationTurboModuleManagerDelegate.Builder();
70
- }
71
-
72
- @Override
73
- protected JSIModulePackage getJSIModulePackage() {
74
- return new JSIModulePackage() {
75
- @Override
76
- public List<JSIModuleSpec> getJSIModules(
77
- final ReactApplicationContext reactApplicationContext,
78
- final JavaScriptContextHolder jsContext) {
79
- final List<JSIModuleSpec> specs = new ArrayList<>();
80
-
81
- // Here we provide a new JSIModuleSpec that will be responsible of providing the
82
- // custom Fabric Components.
83
- specs.add(
84
- new JSIModuleSpec() {
85
- @Override
86
- public JSIModuleType getJSIModuleType() {
87
- return JSIModuleType.UIManager;
88
- }
89
-
90
- @Override
91
- public JSIModuleProvider<UIManager> getJSIModuleProvider() {
92
- final ComponentFactory componentFactory = new ComponentFactory();
93
- CoreComponentsRegistry.register(componentFactory);
94
-
95
- // Here we register a Components Registry.
96
- // The one that is generated with the template contains no components
97
- // and just provides you the one from React Native core.
98
- MainComponentsRegistry.register(componentFactory);
99
-
100
- final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
101
-
102
- ViewManagerRegistry viewManagerRegistry =
103
- new ViewManagerRegistry(
104
- reactInstanceManager.getOrCreateViewManagers(reactApplicationContext));
105
-
106
- return new FabricJSIModuleProvider(
107
- reactApplicationContext,
108
- componentFactory,
109
- ReactNativeConfig.DEFAULT_CONFIG,
110
- viewManagerRegistry);
111
- }
112
- });
113
- return specs;
114
- }
115
- };
116
- }
117
- }
@@ -1,36 +0,0 @@
1
- package kr.iamport.exampleForExpo.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 kr.iamport.exampleForExpo.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("exampleforexpo_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(exampleforexpo_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
- "Lkr/iamport/exampleForExpo/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
@@ -1,32 +0,0 @@
1
- #pragma once
2
-
3
- #include <ComponentFactory.h>
4
- #include <fbjni/fbjni.h>
5
- #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
6
- #include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
7
-
8
- namespace facebook {
9
- namespace react {
10
-
11
- class MainComponentsRegistry
12
- : public facebook::jni::HybridClass<MainComponentsRegistry> {
13
- public:
14
- // Adapt it to the package you used for your Java class.
15
- constexpr static auto kJavaDescriptor =
16
- "Lkr/iamport/exampleForExpo/newarchitecture/components/MainComponentsRegistry;";
17
-
18
- static void registerNatives();
19
-
20
- MainComponentsRegistry(ComponentFactory *delegate);
21
-
22
- private:
23
- static std::shared_ptr<ComponentDescriptorProviderRegistry const>
24
- sharedProviderRegistry();
25
-
26
- static jni::local_ref<jhybriddata> initHybrid(
27
- jni::alias_ref<jclass>,
28
- ComponentFactory *delegate);
29
- };
30
-
31
- } // namespace react
32
- } // namespace facebook
@@ -1,11 +0,0 @@
1
- #include <fbjni/fbjni.h>
2
- #include "MainApplicationTurboModuleManagerDelegate.h"
3
- #include "MainComponentsRegistry.h"
4
-
5
- JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
6
- return facebook::jni::initialize(vm, [] {
7
- facebook::react::MainApplicationTurboModuleManagerDelegate::
8
- registerNatives();
9
- facebook::react::MainComponentsRegistry::registerNatives();
10
- });
11
- }
@@ -1,36 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Copyright (C) 2014 The Android Open Source Project
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- -->
16
- <inset xmlns:android="http://schemas.android.com/apk/res/android"
17
- android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
18
- android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
19
- android:insetTop="@dimen/abc_edit_text_inset_top_material"
20
- android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
21
-
22
- <selector>
23
- <!--
24
- This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
25
- The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
26
- NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
27
-
28
- <item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
29
-
30
- For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
31
- -->
32
- <item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
33
- <item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
34
- </selector>
35
-
36
- </inset>