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.
- package/CHANGELOG.md +13 -0
- package/README.md +12 -2
- package/lib/module/components/Certification/index.js +75 -72
- package/lib/module/components/Certification/index.js.map +1 -1
- package/lib/module/components/ErrorOnParams/index.js +13 -9
- package/lib/module/components/ErrorOnParams/index.js.map +1 -1
- package/lib/module/components/Loading/index.js +13 -9
- package/lib/module/components/Loading/index.js.map +1 -1
- package/lib/module/components/Payment/index.js +111 -93
- package/lib/module/components/Payment/index.js.map +1 -1
- package/lib/module/constants/index.js +2 -0
- package/lib/module/constants/index.js.map +1 -1
- package/lib/module/index.js +6 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/styles.js +2 -0
- package/lib/module/styles.js.map +1 -1
- package/lib/module/utils/IamportUrl.js +51 -29
- package/lib/module/utils/IamportUrl.js.map +1 -1
- package/lib/module/utils/Validation.js +3 -2
- package/lib/module/utils/Validation.js.map +1 -1
- package/lib/module/utils/ValidationForPayment.js +4 -2
- package/lib/module/utils/ValidationForPayment.js.map +1 -1
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/{components → src/components}/Certification/index.d.ts +1 -2
- package/lib/typescript/src/components/Certification/index.d.ts.map +1 -0
- package/lib/typescript/src/components/ErrorOnParams/index.d.ts +6 -0
- package/lib/typescript/src/components/ErrorOnParams/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Loading/index.d.ts +3 -0
- package/lib/typescript/src/components/Loading/index.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/Payment/index.d.ts +1 -2
- package/lib/typescript/src/components/Payment/index.d.ts.map +1 -0
- package/lib/typescript/src/constants/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/{styles.d.ts → src/styles.d.ts} +2 -2
- package/lib/typescript/src/styles.d.ts.map +1 -0
- package/lib/typescript/{utils → src/utils}/IamportUrl.d.ts +8 -7
- package/lib/typescript/src/utils/IamportUrl.d.ts.map +1 -0
- package/lib/typescript/src/utils/Validation.d.ts.map +1 -0
- package/lib/typescript/src/utils/ValidationForPayment.d.ts.map +1 -0
- package/package.json +81 -74
- package/src/components/Certification/index.tsx +7 -7
- package/src/components/ErrorOnParams/index.tsx +1 -2
- package/src/components/Loading/index.tsx +1 -2
- package/src/components/Payment/index.tsx +31 -7
- package/src/utils/IamportUrl.ts +54 -26
- package/.circleci/config.yml +0 -98
- package/.editorconfig +0 -15
- package/.gitattributes +0 -3
- package/.gitignore +0 -69
- package/.yarnrc +0 -3
- package/.yarnrc.yml +0 -1
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +0 -128
- package/android/gradle.properties +0 -4
- package/android/src/main/AndroidManifest.xml +0 -4
- package/android/src/main/java/com/iamportreactnative/IamportReactNativePackage.kt +0 -17
- package/android/src/main/java/com/iamportreactnative/IamportReactNativeViewManager.kt +0 -20
- package/babel.config.js +0 -3
- package/example/.gitignore +0 -69
- package/example/README.md +0 -44
- package/example/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/example/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
- package/example/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
- package/example/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/example/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
- package/example/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
- package/example/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/example/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
- package/example/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/example/android/.gradle/7.5.1/gc.properties +0 -0
- package/example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/example/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/example/android/.gradle/vcs-1/gc.properties +0 -0
- package/example/android/app/build.gradle +0 -183
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +0 -10
- package/example/android/app/src/debug/AndroidManifest.xml +0 -8
- package/example/android/app/src/debug/java/com/example/iamportreactnative/ReactNativeFlipper.java +0 -69
- package/example/android/app/src/main/AndroidManifest.xml +0 -34
- package/example/android/app/src/main/java/com/example/iamportreactnative/MainActivity.java +0 -15
- package/example/android/app/src/main/java/com/example/iamportreactnative/MainApplication.java +0 -80
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +0 -3
- package/example/android/app/src/main/res/values/styles.xml +0 -9
- package/example/android/build.gradle +0 -21
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/example/android/gradle.properties +0 -44
- package/example/android/gradlew +0 -183
- package/example/android/gradlew.bat +0 -103
- package/example/android/settings.gradle +0 -9
- package/example/app.json +0 -4
- package/example/babel.config.js +0 -11
- package/example/index.js +0 -5
- package/example/ios/File.swift +0 -8
- package/example/ios/Gemfile +0 -7
- package/example/ios/Gemfile.lock +0 -99
- package/example/ios/IamportReactNativeExample/AppDelegate.h +0 -15
- package/example/ios/IamportReactNativeExample/AppDelegate.mm +0 -138
- package/example/ios/IamportReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/example/ios/IamportReactNativeExample/Images.xcassets/Contents.json +0 -6
- package/example/ios/IamportReactNativeExample/Info.plist +0 -121
- package/example/ios/IamportReactNativeExample/LaunchScreen.storyboard +0 -58
- package/example/ios/IamportReactNativeExample/main.m +0 -16
- package/example/ios/IamportReactNativeExample-Bridging-Header.h +0 -3
- package/example/ios/IamportReactNativeExample.xcodeproj/project.pbxproj +0 -969
- package/example/ios/IamportReactNativeExample.xcodeproj/xcshareddata/xcschemes/IamportReactNativeExample.xcscheme +0 -99
- package/example/ios/IamportReactNativeExample.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/IamportReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/Podfile +0 -57
- package/example/ios/Podfile.lock +0 -756
- package/example/metro.config.js +0 -66
- package/example/package.json +0 -40
- package/example/src/App.tsx +0 -17
- package/example/src/Certification/index.tsx +0 -30
- package/example/src/CertificationResult/index.tsx +0 -79
- package/example/src/CertificationTest/index.tsx +0 -214
- package/example/src/Home/index.tsx +0 -87
- package/example/src/Loading/index.tsx +0 -12
- package/example/src/NavigationService.tsx +0 -127
- package/example/src/Payment/index.tsx +0 -28
- package/example/src/PaymentResult/index.tsx +0 -96
- package/example/src/PaymentTest/index.tsx +0 -383
- package/example/src/Picker/index.tsx +0 -60
- package/example/src/constants.ts +0 -274
- package/example/src/utils.ts +0 -83
- package/example/yarn.lock +0 -7358
- package/exampleForExpo/.buckconfig +0 -6
- package/exampleForExpo/.expo/README.md +0 -8
- package/exampleForExpo/.expo/devices.json +0 -3
- package/exampleForExpo/.gitattributes +0 -1
- package/exampleForExpo/.gitignore +0 -125
- package/exampleForExpo/.idea/.gitignore +0 -3
- package/exampleForExpo/.idea/caches/deviceStreaming.xml +0 -549
- package/exampleForExpo/.idea/exampleForExpo.iml +0 -9
- package/exampleForExpo/.idea/misc.xml +0 -6
- package/exampleForExpo/.idea/modules.xml +0 -8
- package/exampleForExpo/.idea/vcs.xml +0 -6
- package/exampleForExpo/.idea/workspace.xml +0 -53
- package/exampleForExpo/README.md +0 -58
- package/exampleForExpo/__tests__/App.js +0 -10
- package/exampleForExpo/android/.gitignore +0 -21
- package/exampleForExpo/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/exampleForExpo/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/exampleForExpo/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/exampleForExpo/android/.gradle/7.5.1/gc.properties +0 -0
- package/exampleForExpo/android/.gradle/vcs-1/gc.properties +0 -0
- package/exampleForExpo/android/app/BUCK +0 -55
- package/exampleForExpo/android/app/build.gradle +0 -362
- package/exampleForExpo/android/app/build_defs.bzl +0 -19
- package/exampleForExpo/android/app/debug.keystore +0 -0
- package/exampleForExpo/android/app/proguard-rules.pro +0 -14
- package/exampleForExpo/android/app/src/debug/AndroidManifest.xml +0 -7
- package/exampleForExpo/android/app/src/debug/java/kr/iamport/exampleForExpo/ReactNativeFlipper.java +0 -69
- package/exampleForExpo/android/app/src/main/AndroidManifest.xml +0 -34
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainActivity.java +0 -83
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainApplication.java +0 -106
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/MainApplicationReactNativeHost.java +0 -117
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/components/MainComponentsRegistry.java +0 -36
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
- package/exampleForExpo/android/app/src/main/jni/CMakeLists.txt +0 -7
- package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
- package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
- package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
- package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
- package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
- package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
- package/exampleForExpo/android/app/src/main/jni/OnLoad.cpp +0 -11
- package/exampleForExpo/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- package/exampleForExpo/android/app/src/main/res/drawable/splashscreen.xml +0 -4
- package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/values/colors.xml +0 -4
- package/exampleForExpo/android/app/src/main/res/values/strings.xml +0 -3
- package/exampleForExpo/android/app/src/main/res/values/styles.xml +0 -17
- package/exampleForExpo/android/app/src/main/res/values-night/colors.xml +0 -1
- package/exampleForExpo/android/build.gradle +0 -65
- package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/exampleForExpo/android/gradle.properties +0 -53
- package/exampleForExpo/android/gradlew +0 -240
- package/exampleForExpo/android/gradlew.bat +0 -91
- package/exampleForExpo/android/settings.gradle +0 -17
- package/exampleForExpo/app.json +0 -16
- package/exampleForExpo/babel.config.js +0 -11
- package/exampleForExpo/index.js +0 -9
- package/exampleForExpo/ios/.gitignore +0 -30
- package/exampleForExpo/ios/.xcode.env +0 -11
- package/exampleForExpo/ios/Podfile +0 -61
- package/exampleForExpo/ios/Podfile.lock +0 -734
- package/exampleForExpo/ios/Podfile.properties.json +0 -3
- package/exampleForExpo/ios/exampleForExpo/AppDelegate.h +0 -9
- package/exampleForExpo/ios/exampleForExpo/AppDelegate.mm +0 -166
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/Contents.json +0 -6
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/Contents.json +0 -21
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
- package/exampleForExpo/ios/exampleForExpo/Info.plist +0 -118
- package/exampleForExpo/ios/exampleForExpo/SplashScreen.storyboard +0 -43
- package/exampleForExpo/ios/exampleForExpo/Supporting/Expo.plist +0 -16
- package/exampleForExpo/ios/exampleForExpo/exampleForExpo.entitlements +0 -8
- package/exampleForExpo/ios/exampleForExpo/main.m +0 -10
- package/exampleForExpo/ios/exampleForExpo/noop-file.swift +0 -4
- package/exampleForExpo/ios/exampleForExpo.xcodeproj/project.pbxproj +0 -544
- package/exampleForExpo/ios/exampleForExpo.xcodeproj/xcshareddata/xcschemes/exampleForExpo.xcscheme +0 -88
- package/exampleForExpo/ios/exampleForExpo.xcworkspace/contents.xcworkspacedata +0 -10
- package/exampleForExpo/ios/exampleForExpo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/exampleForExpo/metro.config.js +0 -62
- package/exampleForExpo/package.json +0 -40
- package/exampleForExpo/src/App.js +0 -14
- package/exampleForExpo/src/Certification/index.js +0 -25
- package/exampleForExpo/src/CertificationResult/index.js +0 -61
- package/exampleForExpo/src/CertificationTest/index.js +0 -151
- package/exampleForExpo/src/Home/index.js +0 -80
- package/exampleForExpo/src/Loading/index.js +0 -10
- package/exampleForExpo/src/NavigationService.js +0 -102
- package/exampleForExpo/src/Payment/index.js +0 -23
- package/exampleForExpo/src/PaymentResult/index.js +0 -82
- package/exampleForExpo/src/PaymentTest/index.js +0 -313
- package/exampleForExpo/src/Picker/index.js +0 -19
- package/exampleForExpo/src/constants.js +0 -322
- package/exampleForExpo/src/utils.js +0 -116
- package/exampleForExpo/yarn.lock +0 -9498
- package/exampleForManagedExpo/.expo-shared/assets.json +0 -4
- package/exampleForManagedExpo/.gitignore +0 -22
- package/exampleForManagedExpo/App.js +0 -11
- package/exampleForManagedExpo/README.md +0 -33
- package/exampleForManagedExpo/app.json +0 -90
- package/exampleForManagedExpo/assets/adaptive-icon.png +0 -0
- package/exampleForManagedExpo/assets/favicon.png +0 -0
- package/exampleForManagedExpo/assets/icon.png +0 -0
- package/exampleForManagedExpo/assets/splash.png +0 -0
- package/exampleForManagedExpo/babel.config.js +0 -11
- package/exampleForManagedExpo/metro.config.js +0 -62
- package/exampleForManagedExpo/package.json +0 -36
- package/exampleForManagedExpo/src/Certification/index.js +0 -25
- package/exampleForManagedExpo/src/CertificationResult/index.js +0 -61
- package/exampleForManagedExpo/src/CertificationTest/index.js +0 -151
- package/exampleForManagedExpo/src/Home/index.js +0 -80
- package/exampleForManagedExpo/src/Loading/index.js +0 -10
- package/exampleForManagedExpo/src/NavigationService.js +0 -102
- package/exampleForManagedExpo/src/Payment/index.js +0 -23
- package/exampleForManagedExpo/src/PaymentResult/index.js +0 -82
- package/exampleForManagedExpo/src/PaymentTest/index.js +0 -313
- package/exampleForManagedExpo/src/Picker/index.js +0 -19
- package/exampleForManagedExpo/src/constants.js +0 -322
- package/exampleForManagedExpo/src/utils.js +0 -116
- package/exampleForManagedExpo/yarn.lock +0 -9411
- package/exampleForWebView/.buckconfig +0 -6
- package/exampleForWebView/.eslintrc.js +0 -4
- package/exampleForWebView/.gitattributes +0 -3
- package/exampleForWebView/.gitignore +0 -68
- package/exampleForWebView/.prettierrc.js +0 -7
- package/exampleForWebView/.watchmanconfig +0 -1
- package/exampleForWebView/README.md +0 -77
- package/exampleForWebView/__tests__/App-test.tsx +0 -14
- package/exampleForWebView/_editorconfig +0 -3
- package/exampleForWebView/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/exampleForWebView/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/exampleForWebView/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/exampleForWebView/android/.gradle/7.5.1/gc.properties +0 -0
- package/exampleForWebView/android/.gradle/vcs-1/gc.properties +0 -0
- package/exampleForWebView/android/app/BUCK +0 -55
- package/exampleForWebView/android/app/build.gradle +0 -313
- package/exampleForWebView/android/app/build_defs.bzl +0 -19
- package/exampleForWebView/android/app/debug.keystore +0 -0
- package/exampleForWebView/android/app/proguard-rules.pro +0 -10
- package/exampleForWebView/android/app/src/debug/AndroidManifest.xml +0 -13
- package/exampleForWebView/android/app/src/debug/java/com/exampleforwebview/ReactNativeFlipper.java +0 -73
- package/exampleForWebView/android/app/src/main/AndroidManifest.xml +0 -26
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainActivity.java +0 -48
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainApplication.java +0 -91
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/MainApplicationReactNativeHost.java +0 -116
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/components/MainComponentsRegistry.java +0 -36
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
- package/exampleForWebView/android/app/src/main/jni/CMakeLists.txt +0 -7
- package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
- package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
- package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
- package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
- package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
- package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
- package/exampleForWebView/android/app/src/main/jni/OnLoad.cpp +0 -11
- package/exampleForWebView/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/values/strings.xml +0 -3
- package/exampleForWebView/android/app/src/main/res/values/styles.xml +0 -9
- package/exampleForWebView/android/build.gradle +0 -51
- package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/exampleForWebView/android/gradle.properties +0 -40
- package/exampleForWebView/android/gradlew +0 -234
- package/exampleForWebView/android/gradlew.bat +0 -89
- package/exampleForWebView/android/settings.gradle +0 -11
- package/exampleForWebView/app.json +0 -4
- package/exampleForWebView/babel.config.js +0 -11
- package/exampleForWebView/index.js +0 -9
- package/exampleForWebView/ios/.xcode.env +0 -11
- package/exampleForWebView/ios/Podfile +0 -43
- package/exampleForWebView/ios/Podfile.lock +0 -748
- package/exampleForWebView/ios/exampleForWebView/AppDelegate.h +0 -8
- package/exampleForWebView/ios/exampleForWebView/AppDelegate.mm +0 -133
- package/exampleForWebView/ios/exampleForWebView/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/exampleForWebView/ios/exampleForWebView/Images.xcassets/Contents.json +0 -6
- package/exampleForWebView/ios/exampleForWebView/Info.plist +0 -96
- package/exampleForWebView/ios/exampleForWebView/LaunchScreen.storyboard +0 -47
- package/exampleForWebView/ios/exampleForWebView/main.m +0 -10
- package/exampleForWebView/ios/exampleForWebView.xcodeproj/project.pbxproj +0 -723
- package/exampleForWebView/ios/exampleForWebView.xcodeproj/xcshareddata/xcschemes/exampleForWebView.xcscheme +0 -88
- package/exampleForWebView/ios/exampleForWebView.xcworkspace/contents.xcworkspacedata +0 -10
- package/exampleForWebView/ios/exampleForWebView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/exampleForWebView/ios/exampleForWebViewTests/Info.plist +0 -24
- package/exampleForWebView/ios/exampleForWebViewTests/exampleForWebViewTests.m +0 -66
- package/exampleForWebView/manuals/CERTIFICATION.md +0 -223
- package/exampleForWebView/manuals/PAYMENT.md +0 -232
- package/exampleForWebView/metro.config.js +0 -61
- package/exampleForWebView/package.json +0 -54
- package/exampleForWebView/src/App.tsx +0 -50
- package/exampleForWebView/src/Certification.tsx +0 -54
- package/exampleForWebView/src/Home.tsx +0 -49
- package/exampleForWebView/src/Loading.tsx +0 -23
- package/exampleForWebView/src/Payment.tsx +0 -65
- package/exampleForWebView/yarn.lock +0 -7362
- package/iamport-react-native.podspec +0 -19
- package/ios/IamportReactNative-Bridging-Header.h +0 -1
- package/ios/IamportReactNative.xcodeproj/project.pbxproj +0 -293
- package/ios/IamportReactNativeViewManager.m +0 -12
- package/ios/IamportReactNativeViewManager.swift +0 -32
- package/lib/commonjs/components/Certification/index.js +0 -121
- package/lib/commonjs/components/Certification/index.js.map +0 -1
- package/lib/commonjs/components/ErrorOnParams/index.js +0 -50
- package/lib/commonjs/components/ErrorOnParams/index.js.map +0 -1
- package/lib/commonjs/components/Loading/index.js +0 -34
- package/lib/commonjs/components/Loading/index.js.map +0 -1
- package/lib/commonjs/components/Payment/index.js +0 -225
- package/lib/commonjs/components/Payment/index.js.map +0 -1
- package/lib/commonjs/constants/index.js +0 -114
- package/lib/commonjs/constants/index.js.map +0 -1
- package/lib/commonjs/img/iamport-logo.png +0 -0
- package/lib/commonjs/index.js +0 -29
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/styles.js +0 -27
- package/lib/commonjs/styles.js.map +0 -1
- package/lib/commonjs/utils/IamportUrl.js +0 -289
- package/lib/commonjs/utils/IamportUrl.js.map +0 -1
- package/lib/commonjs/utils/Validation.js +0 -109
- package/lib/commonjs/utils/Validation.js.map +0 -1
- package/lib/commonjs/utils/ValidationForPayment.js +0 -112
- package/lib/commonjs/utils/ValidationForPayment.js.map +0 -1
- package/lib/typescript/components/Certification/index.d.ts.map +0 -1
- package/lib/typescript/components/ErrorOnParams/index.d.ts +0 -7
- package/lib/typescript/components/ErrorOnParams/index.d.ts.map +0 -1
- package/lib/typescript/components/Loading/index.d.ts +0 -4
- package/lib/typescript/components/Loading/index.d.ts.map +0 -1
- package/lib/typescript/components/Payment/index.d.ts.map +0 -1
- package/lib/typescript/constants/index.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/styles.d.ts.map +0 -1
- package/lib/typescript/utils/IamportUrl.d.ts.map +0 -1
- package/lib/typescript/utils/Validation.d.ts.map +0 -1
- package/lib/typescript/utils/ValidationForPayment.d.ts.map +0 -1
- package/manuals/CALLBACK.md +0 -72
- package/manuals/EXAMPLE.md +0 -168
- package/manuals/EXPO.md +0 -246
- package/manuals/INSTALL.md +0 -31
- package/manuals/SETTING.md +0 -140
- package/manuals/SUPPORT.md +0 -35
- package/manuals/TRANS.md +0 -77
- package/manuals/VERSION.md +0 -187
- package/manuals/assets/after-linking-iamport.png +0 -0
- package/manuals/assets/after-linking-webview.png +0 -0
- package/manuals/assets/allow-arbitrary.gif +0 -0
- package/manuals/assets/android-studio-avd-manager.png +0 -0
- package/manuals/assets/android-studio-build.png +0 -0
- package/manuals/assets/app-scheme-registry.gif +0 -0
- package/manuals/assets/expo-eject.png +0 -0
- package/manuals/assets/ios-emulator-certification.png +0 -0
- package/manuals/assets/ios-emulator-home.png +0 -0
- package/manuals/assets/ios-emulator-payment.png +0 -0
- package/manuals/assets/ios-trans-create-header-file-1.png +0 -0
- package/manuals/assets/ios-trans-create-header-file-2.png +0 -0
- package/manuals/assets/ios-trans-create-objectivec-file-1.png +0 -0
- package/manuals/assets/ios-trans-create-objectivec-file-2.png +0 -0
- package/manuals/assets/ios-trans-result.png +0 -0
- package/manuals/assets/webview-peer-dependency.png +0 -0
- package/scripts/bootstrap.js +0 -24
- package/tsconfig.build.json +0 -9
- package/tsconfig.json +0 -26
- package/yarn.lock +0 -6174
- /package/lib/typescript/{constants → src/constants}/index.d.ts +0 -0
- /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
- /package/lib/typescript/{utils → src/utils}/Validation.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/ValidationForPayment.d.ts +0 -0
package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainActivity.java
DELETED
|
@@ -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
|
-
}
|
package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainApplication.java
DELETED
|
@@ -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 ¶ms) {
|
|
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 ¶ms);
|
|
14
|
-
|
|
15
|
-
} // namespace react
|
|
16
|
-
} // namespace facebook
|
package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp
DELETED
|
@@ -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 ¶ms) {
|
|
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 ¶ms) 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>
|