@xrnjs/app-template 0.0.6 → 0.1.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/$package.json +30 -36
- package/android/app/build.gradle +56 -73
- package/android/app/src/debug/java/com/xrn/template/ReactNativeFlipper.java +23 -44
- package/android/app/src/main/assets/xrn-manifest.json +1 -1
- package/android/app/src/main/java/com/xrn/template/MainApplication.kt +54 -65
- package/android/app/src/main/java/com/xrn/template/multibundle/CodePushBundleActivity.kt +65 -0
- package/android/app/src/main/java/com/xrn/template/multibundle/CodePushJSBundleLoader.kt +18 -0
- package/android/app/src/main/java/com/xrn/template/multibundle/CodePushUtils.kt +263 -0
- package/android/app/src/main/java/com/xrn/template/multibundle/XBundleTool.kt +9 -0
- package/android/app/src/main/java/com/xrn/template/multibundle/XRNReactHostDelegate.kt +56 -0
- package/android/app/src/main/java/com/xrn/template/navigation/XBundleActivity.kt +10 -7
- package/android/app/src/main/res/raw/bundle_config.json +2 -6
- package/android/build.gradle +40 -39
- package/android/buildSrc/build.gradle.kts +15 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +3 -1
- package/android/gradle.properties +17 -10
- package/android/settings.gradle +40 -12
- package/harmony/.clang-tidy +1 -1
- package/harmony/.clangd +3 -1
- package/harmony/AppScope/app.json5 +1 -1
- package/harmony/build-profile.json5 +8 -8
- package/harmony/entry/oh-package-lock.json5 +283 -262
- package/harmony/entry/oh-package.json5 +35 -36
- package/harmony/entry/src/main/cpp/CMakeLists.txt +37 -17
- package/harmony/entry/src/main/cpp/PackageProvider.cpp +20 -2
- package/harmony/entry/src/main/cpp/generated/BundleNavigation.cpp +3 -0
- package/harmony/entry/src/main/cpp/generated/RNOHGeneratedPackage.h +31 -87
- package/harmony/entry/src/main/cpp/generated/RTNCodePush.cpp +7 -1
- package/harmony/entry/src/main/cpp/generated/XRNBundleModule.cpp +9 -0
- package/harmony/entry/src/main/cpp/generated/XRNDebugToolsModule.cpp +10 -0
- package/harmony/entry/src/main/cpp/generated/{ImageResizer.cpp → XRNImageView.cpp} +6 -3
- package/harmony/entry/src/main/cpp/generated/{ImageResizer.h → XRNImageView.h} +2 -2
- package/harmony/entry/src/main/cpp/generated/{RNCWebViewComponentDescriptor.h → XRNImageViewComponentDescriptor.h} +11 -10
- package/harmony/entry/src/main/cpp/generated/XRNImageViewJSIBinder.h +58 -0
- package/harmony/entry/src/main/cpp/generated/XRNKeyboard.cpp +23 -0
- package/harmony/entry/src/main/cpp/generated/{RNLocalize.h → XRNKeyboard.h} +2 -2
- package/harmony/entry/src/main/cpp/generated/XRNNavigation.cpp +5 -0
- package/harmony/entry/src/main/cpp/generated/{RNCWebViewModule.cpp → XRNNetworkModule.cpp} +2 -4
- package/harmony/entry/src/main/cpp/generated/{RNCWebViewModule.h → XRNNetworkModule.h} +2 -2
- package/harmony/entry/src/main/ets/BundleHelper.ets +41 -45
- package/harmony/entry/src/main/ets/MainAbilityStage.ets +9 -4
- package/harmony/entry/src/main/ets/entryability/EntryAbility.ets +1 -1
- package/harmony/entry/src/main/ets/navDestination/BizModuleContainer.ets +2 -2
- package/harmony/entry/src/main/ets/navDestination/MainModuleContainer.ets +2 -2
- package/harmony/entry/src/main/ets/navDestination/Splash.ets +1 -2
- package/harmony/entry/src/main/ets/pages/Index.ets +4 -4
- package/harmony/entry/src/main/resources/rawfile/bundle_config.json5 +2 -6
- package/harmony/entry/src/main/resources/rawfile/xrn-manifest.json +1 -0
- package/harmony/oh-package-lock.json5 +2 -1
- package/harmony/oh-package.json5 +12 -4
- package/index.ts +0 -0
- package/ios/BundleEventCenter/Hooks/XRNCustomKeyborad+XTHooks.h +16 -0
- package/ios/BundleEventCenter/Hooks/XRNCustomKeyborad+XTHooks.mm +40 -0
- package/ios/BundleEventCenter/Hooks/XTIQKeyboardManagerBridge.h +15 -0
- package/ios/BundleEventCenter/Hooks/XTIQKeyboardManagerBridge.m +22 -0
- package/ios/BundleEventCenter/XTBundleProvider.m +98 -72
- package/ios/BundleEventCenter/XTBundleViewControllerFactory.m +4 -15
- package/ios/BundleEventCenter/bundleController/XTBundleViewController.mm +43 -0
- package/ios/BundleEventCenter/bundleController/XTMainBundleViewController.mm +48 -0
- package/ios/BundleEventCenter/bundleController/xtBundles.plist +1 -1
- package/ios/Podfile +234 -151
- package/ios/Podfile.lock +2810 -594
- package/ios/RNDebug/DebugPlugin/XTPluginManage.m +5 -5
- package/ios/RNDebug/MotroTools/XTMetroAutoConnector.h +21 -0
- package/ios/RNDebug/MotroTools/XTMetroAutoConnector.m +124 -0
- package/ios/RNDebug/MotroTools/XTReloadCommandHelper.h +30 -0
- package/ios/RNDebug/MotroTools/XTReloadCommandHelper.mm +128 -0
- package/ios/RNDebug/Views/XTScanQRPlugin.swift +9 -4
- package/ios/XRNTemplate/AppDelegate.h +3 -3
- package/ios/XRNTemplate/AppDelegate.mm +40 -102
- package/ios/XRNTemplate/Info.plist +4 -4
- package/ios/XRNTemplate/PrivacyInfo.xcprivacy +48 -0
- package/ios/XRNTemplate-Bridging-Header.h +2 -1
- package/ios/XRNTemplate.xcodeproj/project.pbxproj +68 -77
- package/ios/ios_patches/fixed_glog_config.h +195 -0
- package/ios/ios_patches/xt_IQKeyboardManager+Position.swift +1341 -0
- package/ios/ios_patches/xt_IQKeyboardManager.swift +454 -0
- package/ios/subBundles/.gitkeep +0 -0
- package/main-bundle/babel.config.js +2 -2
- package/main-bundle/package.json +11 -20
- package/main-bundle/yarn.lock +14655 -9651
- package/metro.config.js +21 -0
- package/package.json +2 -2
- package/react-native.config.js +3 -45
- package/src/.gitkeep +0 -0
- package/sub-bundle/babel.config.js +2 -2
- package/sub-bundle/package.json +11 -20
- package/sub-bundle/react-native.config.js +4 -0
- package/sub-bundle/yarn.lock +14655 -9651
- package/xrn.config.json +12 -12
- package/android/app/src/main/java/com/xrn/template/multibundle/XDevSupportParams.kt +0 -6
- package/android/app/src/main/java/com/xrn/template/multibundle/XRNHostParams.kt +0 -82
- package/harmony/entry/src/main/cpp/generated/ConfigNativeModule.cpp +0 -21
- package/harmony/entry/src/main/cpp/generated/ConfigNativeModule.h +0 -21
- package/harmony/entry/src/main/cpp/generated/GetRandomValuesNativeModule.cpp +0 -21
- package/harmony/entry/src/main/cpp/generated/GetRandomValuesNativeModule.h +0 -21
- package/harmony/entry/src/main/cpp/generated/NativeHarmonyTouchId.cpp +0 -22
- package/harmony/entry/src/main/cpp/generated/NativeHarmonyTouchId.h +0 -21
- package/harmony/entry/src/main/cpp/generated/OreitationLockerNativeModule.cpp +0 -31
- package/harmony/entry/src/main/cpp/generated/OreitationLockerNativeModule.h +0 -21
- package/harmony/entry/src/main/cpp/generated/RNCCameraRoll.cpp +0 -28
- package/harmony/entry/src/main/cpp/generated/RNCCameraRoll.h +0 -21
- package/harmony/entry/src/main/cpp/generated/RNCCameraRollPermission.cpp +0 -26
- package/harmony/entry/src/main/cpp/generated/RNCCameraRollPermission.h +0 -21
- package/harmony/entry/src/main/cpp/generated/RNCWebViewJSIBinder.h +0 -120
- package/harmony/entry/src/main/cpp/generated/RNDeviceInfo.cpp +0 -164
- package/harmony/entry/src/main/cpp/generated/RNDeviceInfo.h +0 -21
- package/harmony/entry/src/main/cpp/generated/RNDocumentPicker.cpp +0 -24
- package/harmony/entry/src/main/cpp/generated/RNDocumentPicker.h +0 -21
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerButtonComponentDescriptor.h +0 -43
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerButtonJSIBinder.h +0 -38
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerModule.cpp +0 -28
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerModule.h +0 -21
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerRootViewComponentDescriptor.h +0 -43
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerRootViewJSIBinder.h +0 -31
- package/harmony/entry/src/main/cpp/generated/RNLocalize.cpp +0 -31
- package/harmony/entry/src/main/cpp/generated/ReactNativeBlobUtil.cpp +0 -51
- package/harmony/entry/src/main/cpp/generated/ReactNativeBlobUtil.h +0 -21
- package/harmony/entry/src/main/cpp/generated/XRNAssetLoaderModule.cpp +0 -21
- package/harmony/entry/src/main/cpp/generated/XRNAssetLoaderModule.h +0 -21
- package/harmony/entry/src/main/cpp/generated/XRNFileModule.cpp +0 -22
- package/harmony/entry/src/main/cpp/generated/XRNFileModule.h +0 -21
- package/ios/BundleEventCenter/bundleController/XTBundleViewController.m +0 -35
- package/ios/BundleEventCenter/bundleController/XTMainBundleViewController.m +0 -41
|
@@ -7,49 +7,48 @@
|
|
|
7
7
|
license: '',
|
|
8
8
|
dependencies: {
|
|
9
9
|
'@rnoh/react-native-openharmony': '../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har',
|
|
10
|
-
'@react-native-
|
|
11
|
-
'@react-native-
|
|
12
|
-
'@react-native-
|
|
10
|
+
'@react-native-ohos/react-native-blob-util': '../../node_modules/@react-native-ohos/react-native-blob-util/harmony/blobUtil.har',
|
|
11
|
+
'@react-native-ohos/react-native-video': '../../node_modules/@react-native-ohos/react-native-video/harmony/rn_video.har',
|
|
12
|
+
'@react-native-ohos/react-native-vision-camera': '../../node_modules/@react-native-ohos/react-native-vision-camera/harmony/vision_camera.har',
|
|
13
13
|
'@react-native-ohos/push-notification-ios': '../../node_modules/@react-native-ohos/push-notification-ios/harmony/push_notification.har',
|
|
14
|
-
'@react-native-
|
|
15
|
-
'@react-native-
|
|
16
|
-
'@react-native-
|
|
17
|
-
'@react-native-
|
|
18
|
-
'@react-native-
|
|
19
|
-
'@react-native-
|
|
20
|
-
'@react-native-
|
|
21
|
-
'@react-native-
|
|
22
|
-
'@react-native-
|
|
14
|
+
'@react-native-ohos/react-native-image-picker': '../../node_modules/@react-native-ohos/react-native-image-picker/harmony/image_picker.har',
|
|
15
|
+
'@react-native-ohos/async-storage': '../../node_modules/@react-native-ohos/async-storage/harmony/async_storage.har',
|
|
16
|
+
'@react-native-ohos/clipboard': '../../node_modules/@react-native-ohos/clipboard/harmony/clipboard.har',
|
|
17
|
+
'@react-native-ohos/netinfo': '../../node_modules/@react-native-ohos/netinfo/harmony/netinfo.har',
|
|
18
|
+
'@react-native-ohos/cookies': '../../node_modules/@react-native-ohos/cookies/harmony/rn_cookies.har',
|
|
19
|
+
'@react-native-ohos/lottie-react-native': '../../node_modules/@react-native-ohos/lottie-react-native/harmony/lottie.har',
|
|
20
|
+
'@react-native-ohos/react-native-config': '../../node_modules/@react-native-ohos/react-native-config/harmony/config',
|
|
21
|
+
'@react-native-ohos/react-native-device-info': 'file:../../node_modules/@react-native-ohos/react-native-device-info/harmony/device_info',
|
|
22
|
+
'@react-native-ohos/react-native-fast-image': '../../node_modules/@react-native-ohos/react-native-fast-image/harmony/fast_image.har',
|
|
23
23
|
'@react-native-ohos/react-native-fs': '../../node_modules/@react-native-ohos/react-native-fs/harmony/fs.har',
|
|
24
|
-
'@react-native-
|
|
25
|
-
'@react-native-
|
|
24
|
+
'@react-native-ohos/react-native-gesture-handler': '../../node_modules/@react-native-ohos/react-native-gesture-handler/harmony/gesture_handler.har',
|
|
25
|
+
'@react-native-ohos/react-native-get-random-values': '../../node_modules/@react-native-ohos/react-native-get-random-values/harmony/get_random_values.har',
|
|
26
26
|
'@react-native-ohos/react-native-linear-gradient': '../../node_modules/@react-native-ohos/react-native-linear-gradient/harmony/linear_gradient.har',
|
|
27
|
-
'@react-native-
|
|
28
|
-
'@react-native-
|
|
29
|
-
'@react-native-
|
|
30
|
-
'@react-native-
|
|
31
|
-
'@react-native-
|
|
32
|
-
'@react-native-
|
|
33
|
-
'@react-native-
|
|
34
|
-
'@react-native-
|
|
35
|
-
'@react-native-
|
|
36
|
-
'@react-native-
|
|
37
|
-
'@react-native-
|
|
38
|
-
'@react-native-
|
|
39
|
-
'@react-native-oh-tpl/react-native-image-resizer': '../../node_modules/@react-native-oh-tpl/react-native-image-resizer/harmony/image_resizer.har',
|
|
27
|
+
'@react-native-ohos/react-native-localize': '../../node_modules/@react-native-ohos/react-native-localize/harmony/rn_localize.har',
|
|
28
|
+
'@react-native-ohos/react-native-orientation-locker': '../../node_modules/@react-native-ohos/react-native-orientation-locker/harmony/orientation_locker.har',
|
|
29
|
+
'@react-native-ohos/react-native-permissions': '../../node_modules/@react-native-ohos/react-native-permissions/harmony/permissions.har',
|
|
30
|
+
'@react-native-ohos/react-native-reanimated': '../../node_modules/@react-native-ohos/react-native-reanimated/harmony/reanimated.har',
|
|
31
|
+
'@react-native-ohos/react-native-safe-area-context': '../../node_modules/@react-native-ohos/react-native-safe-area-context/harmony/safe_area.har',
|
|
32
|
+
'@react-native-ohos/react-native-svg': '../../node_modules/@react-native-ohos/react-native-svg/harmony/svg.har',
|
|
33
|
+
'@react-native-ohos/react-native-smartrefreshlayout': '../../node_modules/@react-native-ohos/react-native-smartrefreshlayout/harmony/smart_refresh_layout.har',
|
|
34
|
+
'@react-native-ohos/camera-roll': '../../node_modules/@react-native-ohos/camera-roll/harmony/camera_roll.har',
|
|
35
|
+
'@react-native-ohos/react-native-pdf': '../../node_modules/@react-native-ohos/react-native-pdf/harmony/pdfview.har',
|
|
36
|
+
'@react-native-ohos/react-native-webview': '../../node_modules/@react-native-ohos/react-native-webview/harmony/rn_webview.har',
|
|
37
|
+
'@react-native-ohos/react-native-document-picker': '../../node_modules/@react-native-ohos/react-native-document-picker/harmony/document_picker.har',
|
|
38
|
+
'@react-native-ohos/react-native-image-resizer': '../../node_modules/@react-native-ohos/react-native-image-resizer/harmony/image_resizer.har',
|
|
40
39
|
'@ohos/lottie': '^2.0.15',
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
40
|
+
'@xrnjs/loading': '../../node_modules/@xrnjs/loading/harmony/xrn_loading',
|
|
41
|
+
'@xrnjs/native-storage': '../../node_modules/@xrnjs/native-storage/harmony/xrn_native_storage',
|
|
42
|
+
'@xrnjs/navigation': '../../node_modules/@xrnjs/navigation/harmony/xrn_navigation',
|
|
43
|
+
'@xrnjs/react-native-code-push': '../../node_modules/@xrnjs/react-native-code-push/harmony/codePush',
|
|
44
|
+
'@xrnjs/multi-bundle': '../../node_modules/@xrnjs/multi-bundle/harmony/xrn_multi_bundle',
|
|
45
|
+
'@xrnjs/bundle': '../../node_modules/@xrnjs/bundle/harmony/xrn_bundle',
|
|
46
|
+
'@xrnjs/app-utils': '../../node_modules/@xrnjs/app-utils/harmony/xrn_app_utils',
|
|
47
|
+
'@xrnjs/debug-tools': '../../node_modules/@xrnjs/debug-tools/harmony/xrn_debug_tools',
|
|
49
48
|
'@umeng/common': '^1.1.3',
|
|
50
49
|
'@umeng/analytics': '^1.2.4',
|
|
51
50
|
'@umeng/apm': '^1.1.1',
|
|
52
51
|
},
|
|
53
52
|
devDependencies: {},
|
|
54
53
|
dynamicDependencies: {},
|
|
55
|
-
}
|
|
54
|
+
}
|
|
@@ -15,11 +15,11 @@ add_compile_definitions(WITH_HITRACE_SYSTRACE)
|
|
|
15
15
|
set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
|
|
16
16
|
|
|
17
17
|
add_subdirectory("${RNOH_CPP_DIR}" ./rn)
|
|
18
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
18
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-smartrefreshlayout/src/main/cpp" ./smart-refresh-layout)
|
|
19
19
|
|
|
20
20
|
set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
|
|
21
21
|
file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
|
|
22
|
-
file(GLOB VISION_CAMERA_CPP_FILES "${OH_MODULES}/@react-native-
|
|
22
|
+
file(GLOB VISION_CAMERA_CPP_FILES "${OH_MODULES}/@react-native-ohos/react-native-vision-camera/src/main/cpp/*.cpp")
|
|
23
23
|
|
|
24
24
|
add_library(rnoh_app SHARED
|
|
25
25
|
${GENERATED_CPP_FILES}
|
|
@@ -27,24 +27,34 @@ add_library(rnoh_app SHARED
|
|
|
27
27
|
"./PackageProvider.cpp"
|
|
28
28
|
"${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
|
|
29
29
|
)
|
|
30
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
31
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
32
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
33
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
34
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
35
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
30
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/cookies/src/main/cpp" ./rn_cookies)
|
|
31
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/async-storage/src/main/cpp" ./async-storage)
|
|
32
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-svg/src/main/cpp" ./svg)
|
|
33
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/clipboard/src/main/cpp" ./clipboard)
|
|
34
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/lottie-react-native/src/main/cpp" ./lottie)
|
|
35
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-safe-area-context/src/main/cpp" ./safe-area)
|
|
36
36
|
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-fs/src/main/cpp" ./fs)
|
|
37
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
38
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
37
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-video/src/main/cpp" ./video)
|
|
38
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-vision-camera/src/main/cpp" ./vision-camera)
|
|
39
39
|
add_subdirectory("${OH_MODULES}/@react-native-ohos/push-notification-ios/src/main/cpp" ./push_notification)
|
|
40
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
41
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
42
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
43
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
40
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-image-picker/src/main/cpp" ./image_picker)
|
|
41
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/netinfo/src/main/cpp" ./netinfo)
|
|
42
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-fast-image/src/main/cpp" ./fast-image)
|
|
43
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-gesture-handler/src/main/cpp" ./gesture-handler)
|
|
44
44
|
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-linear-gradient/src/main/cpp" ./linear-gradient)
|
|
45
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
46
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
47
|
-
add_subdirectory("${OH_MODULES}/@react-native-
|
|
45
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-permissions/src/main/cpp" ./permissions)
|
|
46
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-reanimated/src/main/cpp" ./reanimated)
|
|
47
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-pdf/src/main/cpp" ./pdfview)
|
|
48
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/camera-roll/src/main/cpp" ./camera-roll)
|
|
49
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-blob-util/src/main/cpp" ./blob-util)
|
|
50
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-config/src/main/cpp" ./config)
|
|
51
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-device-info/src/main/cpp" ./device-info)
|
|
52
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-document-picker/src/main/cpp" ./document-picker)
|
|
53
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-get-random-values/src/main/cpp" ./get-random-values)
|
|
54
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-image-resizer/src/main/cpp" ./image-resizer)
|
|
55
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-localize/src/main/cpp" ./localize)
|
|
56
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-orientation-locker/src/main/cpp" ./orientation-locker)
|
|
57
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-webview/src/main/cpp" ./webview)
|
|
48
58
|
# 新版本需要配置 cpp
|
|
49
59
|
#add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-background-timer/src/main/cpp" ./background_timer)
|
|
50
60
|
#add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-document-picker/src/main/cpp" ./document_picker)
|
|
@@ -68,5 +78,15 @@ target_link_libraries(rnoh_app PUBLIC rnoh_linear_gradient)
|
|
|
68
78
|
target_link_libraries(rnoh_app PUBLIC rnoh_permissions)
|
|
69
79
|
target_link_libraries(rnoh_app PUBLIC rnoh_reanimated)
|
|
70
80
|
target_link_libraries(rnoh_app PUBLIC rnoh_pdf_view)
|
|
81
|
+
target_link_libraries(rnoh_app PUBLIC rnoh_camera_roll)
|
|
82
|
+
target_link_libraries(rnoh_app PUBLIC rnoh_blob_util)
|
|
83
|
+
target_link_libraries(rnoh_app PUBLIC rnoh_config)
|
|
84
|
+
target_link_libraries(rnoh_app PUBLIC device_info)
|
|
85
|
+
target_link_libraries(rnoh_app PUBLIC rnoh_document_picker)
|
|
86
|
+
target_link_libraries(rnoh_app PUBLIC rnoh_get_random_values)
|
|
87
|
+
target_link_libraries(rnoh_app PUBLIC rnoh_ImageResizer)
|
|
88
|
+
target_link_libraries(rnoh_app PUBLIC rnoh_localize)
|
|
89
|
+
target_link_libraries(rnoh_app PUBLIC rnoh_orientation_locker)
|
|
90
|
+
target_link_libraries(rnoh_app PUBLIC rnoh_webview)
|
|
71
91
|
#target_link_libraries(rnoh_app PUBLIC rnoh_background_timer)
|
|
72
92
|
#target_link_libraries(rnoh_app PUBLIC rnoh_document_picker)
|
|
@@ -19,8 +19,17 @@
|
|
|
19
19
|
#include "PermissionsPackage.h"
|
|
20
20
|
#include "ReanimatedPackage.h"
|
|
21
21
|
#include "PdfViewPackage.h"
|
|
22
|
+
#include "DocumentPickerPackage.h"
|
|
23
|
+
#include "RNDeviceInfoPackage.h"
|
|
24
|
+
#include "RNConfigPackage.h"
|
|
25
|
+
#include "GetRandomValuesPackage.h"
|
|
26
|
+
#include "WebViewPackage.h"
|
|
27
|
+
#include "CameraRollPackage.h"
|
|
28
|
+
#include "BlobUtilPackage.h"
|
|
29
|
+
#include "ImageResizerPackage.h"
|
|
30
|
+
#include "RNLocalizePackage.h"
|
|
31
|
+
#include "OrientationLockerPackage.h"
|
|
22
32
|
// #include "BackgroundTimerPackage.h"
|
|
23
|
-
// #include "DocumentPickerPackage.h"
|
|
24
33
|
using namespace rnoh;
|
|
25
34
|
|
|
26
35
|
std::vector<std::shared_ptr<Package>> PackageProvider::getPackages(Package::Context ctx) {
|
|
@@ -45,7 +54,16 @@ std::vector<std::shared_ptr<Package>> PackageProvider::getPackages(Package::Cont
|
|
|
45
54
|
std::make_shared<PermissionsPackage>(ctx),
|
|
46
55
|
std::make_shared<ReanimatedPackage>(ctx),
|
|
47
56
|
std::make_shared<PdfViewPackage>(ctx),
|
|
57
|
+
std::make_shared<DocumentPickerPackage>(ctx),
|
|
58
|
+
std::make_shared<RNDeviceInfoPackage>(ctx),
|
|
59
|
+
std::make_shared<RNConfigPackage>(ctx),
|
|
60
|
+
std::make_shared<GetRandomValuesPackage>(ctx),
|
|
61
|
+
std::make_shared<WebViewPackage>(ctx),
|
|
62
|
+
std::make_shared<CameraRollPackage>(ctx),
|
|
63
|
+
std::make_shared<RNBlobUtilPackage>(ctx),
|
|
64
|
+
std::make_shared<ImageResizerPackage>(ctx),
|
|
65
|
+
std::make_shared<RNLocalizePackage>(ctx),
|
|
66
|
+
std::make_shared<OrientationLockerPackage>(ctx),
|
|
48
67
|
// std::make_shared<BackgroundTimerPackage>(ctx),
|
|
49
|
-
// std::make_shared<DocumentPickerPackage>(ctx),
|
|
50
68
|
};
|
|
51
69
|
}
|
|
@@ -19,6 +19,9 @@ BundleNavigation::BundleNavigation(const ArkTSTurboModule::Context ctx, const st
|
|
|
19
19
|
ARK_METHOD_METADATA(publishSingleBundleEvent, 2),
|
|
20
20
|
ARK_METHOD_METADATA(publishAllBundleEvent, 2),
|
|
21
21
|
ARK_METHOD_METADATA(goBack, 0),
|
|
22
|
+
ARK_METHOD_METADATA(gestureEnabled, 1),
|
|
23
|
+
ARK_METHOD_METADATA(addListener, 1),
|
|
24
|
+
ARK_METHOD_METADATA(removeListeners, 1),
|
|
22
25
|
};
|
|
23
26
|
}
|
|
24
27
|
|
|
@@ -11,100 +11,45 @@
|
|
|
11
11
|
|
|
12
12
|
#include "RNOH/Package.h"
|
|
13
13
|
#include "RNOH/ArkTSTurboModule.h"
|
|
14
|
-
#include "generated/RNCCameraRoll.h"
|
|
15
|
-
#include "generated/RNCCameraRollPermission.h"
|
|
16
|
-
#include "generated/ReactNativeBlobUtil.h"
|
|
17
|
-
#include "generated/ConfigNativeModule.h"
|
|
18
|
-
#include "generated/RNDeviceInfo.h"
|
|
19
|
-
#include "generated/RNDocumentPicker.h"
|
|
20
|
-
#include "generated/RNGestureHandlerModule.h"
|
|
21
|
-
#include "generated/GetRandomValuesNativeModule.h"
|
|
22
|
-
#include "generated/ImageResizer.h"
|
|
23
|
-
#include "generated/RNLocalize.h"
|
|
24
|
-
#include "generated/OreitationLockerNativeModule.h"
|
|
25
|
-
#include "generated/NativeHarmonyTouchId.h"
|
|
26
|
-
#include "generated/RNCWebViewModule.h"
|
|
27
|
-
#include "generated/XRNFileModule.h"
|
|
28
14
|
#include "generated/XRNAppUtilsModule.h"
|
|
29
15
|
#include "generated/XRNToastModule.h"
|
|
30
|
-
#include "generated/XRNAssetLoaderModule.h"
|
|
31
16
|
#include "generated/XRNBundleModule.h"
|
|
32
17
|
#include "generated/XRNDebugToolsModule.h"
|
|
18
|
+
#include "generated/XRNImageView.h"
|
|
19
|
+
#include "generated/XRNKeyboard.h"
|
|
33
20
|
#include "generated/XRNLoadingModule.h"
|
|
34
21
|
#include "generated/XRNMultiBundleModule.h"
|
|
35
22
|
#include "generated/XRNNativeStorageModule.h"
|
|
36
23
|
#include "generated/BundleNavigation.h"
|
|
37
24
|
#include "generated/XRNNavigation.h"
|
|
25
|
+
#include "generated/XRNNetworkModule.h"
|
|
38
26
|
#include "generated/RTNCodePush.h"
|
|
39
|
-
#include "generated/
|
|
40
|
-
#include "generated/
|
|
41
|
-
#include "generated/RNCWebViewComponentDescriptor.h"
|
|
42
|
-
#include "generated/RNGestureHandlerButtonJSIBinder.h"
|
|
43
|
-
#include "generated/RNGestureHandlerRootViewJSIBinder.h"
|
|
44
|
-
#include "generated/RNCWebViewJSIBinder.h"
|
|
27
|
+
#include "generated/XRNImageViewComponentDescriptor.h"
|
|
28
|
+
#include "generated/XRNImageViewJSIBinder.h"
|
|
45
29
|
|
|
46
30
|
namespace rnoh {
|
|
47
31
|
|
|
48
32
|
class RNOHGeneratedPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
|
|
49
33
|
public:
|
|
50
34
|
SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
|
|
51
|
-
if (name == "RNCCameraRoll") {
|
|
52
|
-
return std::make_shared<RNCCameraRoll>(ctx, name);
|
|
53
|
-
}
|
|
54
|
-
if (name == "RNCCameraRollPermission") {
|
|
55
|
-
return std::make_shared<RNCCameraRollPermission>(ctx, name);
|
|
56
|
-
}
|
|
57
|
-
if (name == "ReactNativeBlobUtil") {
|
|
58
|
-
return std::make_shared<ReactNativeBlobUtil>(ctx, name);
|
|
59
|
-
}
|
|
60
|
-
if (name == "ConfigNativeModule") {
|
|
61
|
-
return std::make_shared<ConfigNativeModule>(ctx, name);
|
|
62
|
-
}
|
|
63
|
-
if (name == "RNDeviceInfo") {
|
|
64
|
-
return std::make_shared<RNDeviceInfo>(ctx, name);
|
|
65
|
-
}
|
|
66
|
-
if (name == "RNDocumentPicker") {
|
|
67
|
-
return std::make_shared<RNDocumentPicker>(ctx, name);
|
|
68
|
-
}
|
|
69
|
-
if (name == "RNGestureHandlerModule") {
|
|
70
|
-
return std::make_shared<RNGestureHandlerModule>(ctx, name);
|
|
71
|
-
}
|
|
72
|
-
if (name == "GetRandomValuesNativeModule") {
|
|
73
|
-
return std::make_shared<GetRandomValuesNativeModule>(ctx, name);
|
|
74
|
-
}
|
|
75
|
-
if (name == "ImageResizer") {
|
|
76
|
-
return std::make_shared<ImageResizer>(ctx, name);
|
|
77
|
-
}
|
|
78
|
-
if (name == "RNLocalize") {
|
|
79
|
-
return std::make_shared<RNLocalize>(ctx, name);
|
|
80
|
-
}
|
|
81
|
-
if (name == "OreitationLockerNativeModule") {
|
|
82
|
-
return std::make_shared<OreitationLockerNativeModule>(ctx, name);
|
|
83
|
-
}
|
|
84
|
-
if (name == "NativeHarmonyTouchId") {
|
|
85
|
-
return std::make_shared<NativeHarmonyTouchId>(ctx, name);
|
|
86
|
-
}
|
|
87
|
-
if (name == "RNCWebViewModule") {
|
|
88
|
-
return std::make_shared<RNCWebViewModule>(ctx, name);
|
|
89
|
-
}
|
|
90
|
-
if (name == "XRNFileModule") {
|
|
91
|
-
return std::make_shared<XRNFileModule>(ctx, name);
|
|
92
|
-
}
|
|
93
35
|
if (name == "XRNAppUtilsModule") {
|
|
94
36
|
return std::make_shared<XRNAppUtilsModule>(ctx, name);
|
|
95
37
|
}
|
|
96
38
|
if (name == "XRNToastModule") {
|
|
97
39
|
return std::make_shared<XRNToastModule>(ctx, name);
|
|
98
40
|
}
|
|
99
|
-
if (name == "XRNAssetLoaderModule") {
|
|
100
|
-
return std::make_shared<XRNAssetLoaderModule>(ctx, name);
|
|
101
|
-
}
|
|
102
41
|
if (name == "XRNBundleModule") {
|
|
103
42
|
return std::make_shared<XRNBundleModule>(ctx, name);
|
|
104
43
|
}
|
|
105
44
|
if (name == "XRNDebugToolsModule") {
|
|
106
45
|
return std::make_shared<XRNDebugToolsModule>(ctx, name);
|
|
107
46
|
}
|
|
47
|
+
if (name == "XRNImageView") {
|
|
48
|
+
return std::make_shared<XRNImageView>(ctx, name);
|
|
49
|
+
}
|
|
50
|
+
if (name == "XRNKeyboard") {
|
|
51
|
+
return std::make_shared<XRNKeyboard>(ctx, name);
|
|
52
|
+
}
|
|
108
53
|
if (name == "XRNLoadingModule") {
|
|
109
54
|
return std::make_shared<XRNLoadingModule>(ctx, name);
|
|
110
55
|
}
|
|
@@ -120,6 +65,9 @@ class RNOHGeneratedPackageTurboModuleFactoryDelegate : public TurboModuleFactory
|
|
|
120
65
|
if (name == "XRNNavigation") {
|
|
121
66
|
return std::make_shared<XRNNavigation>(ctx, name);
|
|
122
67
|
}
|
|
68
|
+
if (name == "XRNNetworkModule") {
|
|
69
|
+
return std::make_shared<XRNNetworkModule>(ctx, name);
|
|
70
|
+
}
|
|
123
71
|
if (name == "RTNCodePush") {
|
|
124
72
|
return std::make_shared<RTNCodePush>(ctx, name);
|
|
125
73
|
}
|
|
@@ -131,27 +79,27 @@ class GeneratedEventEmitRequestHandler : public EventEmitRequestHandler {
|
|
|
131
79
|
public:
|
|
132
80
|
void handleEvent(Context const &ctx) override {
|
|
133
81
|
auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
|
|
82
|
+
auto componentName = ctx.shadowViewRegistry->getComponentName(ctx.tag);
|
|
83
|
+
|
|
134
84
|
if (eventEmitter == nullptr) {
|
|
135
85
|
return;
|
|
136
86
|
}
|
|
137
87
|
|
|
88
|
+
std::vector<std::string> supportedComponentNames = {
|
|
89
|
+
"XRNImageView",
|
|
90
|
+
};
|
|
91
|
+
|
|
138
92
|
std::vector<std::string> supportedEventNames = {
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"loadingFinish",
|
|
146
|
-
"loadingProgress",
|
|
147
|
-
"loadingStart",
|
|
148
|
-
"httpError",
|
|
149
|
-
"message",
|
|
150
|
-
"openWindow",
|
|
151
|
-
"scroll",
|
|
152
|
-
"shouldStartLoadWithRequest",
|
|
93
|
+
"load",
|
|
94
|
+
"loadStart",
|
|
95
|
+
"loadEnd",
|
|
96
|
+
"progress",
|
|
97
|
+
"display",
|
|
98
|
+
"error",
|
|
153
99
|
};
|
|
154
|
-
|
|
100
|
+
|
|
101
|
+
if (std::find(supportedComponentNames.begin(), supportedComponentNames.end(), componentName) != supportedComponentNames.end() &&
|
|
102
|
+
std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
|
|
155
103
|
eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
|
|
156
104
|
}
|
|
157
105
|
}
|
|
@@ -167,17 +115,13 @@ class RNOHGeneratedPackage : public Package {
|
|
|
167
115
|
|
|
168
116
|
std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
|
|
169
117
|
return {
|
|
170
|
-
facebook::react::concreteComponentDescriptorProvider<facebook::react::
|
|
171
|
-
facebook::react::concreteComponentDescriptorProvider<facebook::react::RNGestureHandlerRootViewComponentDescriptor>(),
|
|
172
|
-
facebook::react::concreteComponentDescriptorProvider<facebook::react::RNCWebViewComponentDescriptor>(),
|
|
118
|
+
facebook::react::concreteComponentDescriptorProvider<facebook::react::XRNImageViewComponentDescriptor>(),
|
|
173
119
|
};
|
|
174
120
|
}
|
|
175
121
|
|
|
176
122
|
ComponentJSIBinderByString createComponentJSIBinderByName() override {
|
|
177
123
|
return {
|
|
178
|
-
{"
|
|
179
|
-
{"RNGestureHandlerRootView", std::make_shared<RNGestureHandlerRootViewJSIBinder>()},
|
|
180
|
-
{"RNCWebView", std::make_shared<RNCWebViewJSIBinder>()},
|
|
124
|
+
{"XRNImageView", std::make_shared<XRNImageViewJSIBinder>()},
|
|
181
125
|
};
|
|
182
126
|
};
|
|
183
127
|
|
|
@@ -26,7 +26,7 @@ RTNCodePush::RTNCodePush(const ArkTSTurboModule::Context ctx, const std::string
|
|
|
26
26
|
ARK_METHOD_METADATA(allow, 0),
|
|
27
27
|
ARK_METHOD_METADATA(clearPendingRestart, 0),
|
|
28
28
|
ARK_METHOD_METADATA(disallow, 0),
|
|
29
|
-
|
|
29
|
+
ARK_ASYNC_METHOD_METADATA(restartApp, 1),
|
|
30
30
|
ARK_ASYNC_METHOD_METADATA(downloadUpdate, 2),
|
|
31
31
|
ARK_ASYNC_METHOD_METADATA(getConfiguration, 0),
|
|
32
32
|
ARK_ASYNC_METHOD_METADATA(getUpdateMetadata, 1),
|
|
@@ -42,6 +42,12 @@ RTNCodePush::RTNCodePush(const ArkTSTurboModule::Context ctx, const std::string
|
|
|
42
42
|
ARK_METHOD_METADATA(clearUpdates, 0),
|
|
43
43
|
ARK_METHOD_METADATA(isFileExist, 1),
|
|
44
44
|
ARK_METHOD_METADATA(getIntlResourcePath, 1),
|
|
45
|
+
ARK_METHOD_METADATA(isNativeSyncing, 0),
|
|
46
|
+
ARK_METHOD_METADATA(isAssetBundleFileExists, 0),
|
|
47
|
+
ARK_METHOD_METADATA(getBasePackageBundlePath, 0),
|
|
48
|
+
ARK_METHOD_METADATA(addListener, 1),
|
|
49
|
+
ARK_METHOD_METADATA(removeListeners, 1),
|
|
50
|
+
ARK_METHOD_METADATA(beforeLoadBizBundleHandlePendingUpdate, 0),
|
|
45
51
|
};
|
|
46
52
|
}
|
|
47
53
|
|
|
@@ -19,8 +19,17 @@ XRNBundleModule::XRNBundleModule(const ArkTSTurboModule::Context ctx, const std:
|
|
|
19
19
|
ARK_ASYNC_METHOD_METADATA(getAllBundleInfos, 0),
|
|
20
20
|
ARK_ASYNC_METHOD_METADATA(getBundleList, 0),
|
|
21
21
|
ARK_METHOD_METADATA(preLoadBundle, 1),
|
|
22
|
+
ARK_METHOD_METADATA(releaseBundle, 1),
|
|
23
|
+
ARK_METHOD_METADATA(releaseBundleForce, 1),
|
|
24
|
+
ARK_METHOD_METADATA(releaseAllBundle, 1),
|
|
25
|
+
ARK_METHOD_METADATA(reloadBundleByName, 1),
|
|
26
|
+
ARK_METHOD_METADATA(reloadBundleForceByName, 1),
|
|
27
|
+
ARK_METHOD_METADATA(preloadCommonEnabled, 1),
|
|
28
|
+
ARK_METHOD_METADATA(preloadBundleEnabled, 1),
|
|
22
29
|
ARK_METHOD_METADATA(reloadBundle, 0),
|
|
23
30
|
ARK_METHOD_METADATA(switchModule, 2),
|
|
31
|
+
ARK_ASYNC_METHOD_METADATA(preDownloadCodePush, 1),
|
|
32
|
+
ARK_ASYNC_METHOD_METADATA(reportCodePushProgressShown, 0),
|
|
24
33
|
};
|
|
25
34
|
}
|
|
26
35
|
|
|
@@ -23,9 +23,19 @@ XRNDebugToolsModule::XRNDebugToolsModule(const ArkTSTurboModule::Context ctx, co
|
|
|
23
23
|
ARK_ASYNC_METHOD_METADATA(getInspectorIsShown, 0),
|
|
24
24
|
ARK_ASYNC_METHOD_METADATA(togglePerfMonitor, 0),
|
|
25
25
|
ARK_ASYNC_METHOD_METADATA(getPerfMonitorIsShown, 0),
|
|
26
|
+
ARK_ASYNC_METHOD_METADATA(toggleMemoryLeak, 0),
|
|
27
|
+
ARK_ASYNC_METHOD_METADATA(getMemoryLeakIsShown, 0),
|
|
26
28
|
ARK_ASYNC_METHOD_METADATA(pingStart, 1),
|
|
27
29
|
ARK_ASYNC_METHOD_METADATA(dnsStart, 1),
|
|
28
30
|
ARK_ASYNC_METHOD_METADATA(proxyInfo, 1),
|
|
31
|
+
ARK_METHOD_METADATA(registerDevBundle, 2),
|
|
32
|
+
ARK_ASYNC_METHOD_METADATA(getBundleDebugConfig, 1),
|
|
33
|
+
ARK_METHOD_METADATA(setBundleDebugConfig, 2),
|
|
34
|
+
ARK_METHOD_METADATA(getNativeStorageSync, 2),
|
|
35
|
+
ARK_METHOD_METADATA(setNativeStorageSync, 3),
|
|
36
|
+
ARK_METHOD_METADATA(getBundleHostIPSync, 0),
|
|
37
|
+
ARK_METHOD_METADATA(setBundleHostIP, 1),
|
|
38
|
+
ARK_METHOD_METADATA(openConnection, 3),
|
|
29
39
|
};
|
|
30
40
|
}
|
|
31
41
|
|
|
@@ -7,14 +7,17 @@
|
|
|
7
7
|
* @generatorVersion: 1
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
#include "
|
|
10
|
+
#include "XRNImageView.h"
|
|
11
11
|
|
|
12
12
|
namespace rnoh {
|
|
13
13
|
using namespace facebook;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
XRNImageView::XRNImageView(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
16
16
|
methodMap_ = {
|
|
17
|
-
ARK_ASYNC_METHOD_METADATA(
|
|
17
|
+
ARK_ASYNC_METHOD_METADATA(prefetch, 3),
|
|
18
|
+
ARK_ASYNC_METHOD_METADATA(clearMemoryCache, 0),
|
|
19
|
+
ARK_ASYNC_METHOD_METADATA(clearDiskCache, 0),
|
|
20
|
+
ARK_ASYNC_METHOD_METADATA(getCachePathAsync, 1),
|
|
18
21
|
};
|
|
19
22
|
}
|
|
20
23
|
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
namespace rnoh {
|
|
15
15
|
|
|
16
|
-
class JSI_EXPORT
|
|
16
|
+
class JSI_EXPORT XRNImageView : public ArkTSTurboModule {
|
|
17
17
|
public:
|
|
18
|
-
|
|
18
|
+
XRNImageView(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
} // namespace rnoh
|
|
@@ -17,25 +17,26 @@
|
|
|
17
17
|
namespace facebook {
|
|
18
18
|
namespace react {
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
// RNOH patch
|
|
21
|
+
constexpr char XRNImageViewComponentName[] = "XRNImageView";
|
|
21
22
|
|
|
22
|
-
class
|
|
23
|
+
class XRNImageViewProps : public ViewProps {
|
|
23
24
|
public:
|
|
24
|
-
|
|
25
|
+
XRNImageViewProps() = default;
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
XRNImageViewProps(const PropsParserContext &context, const XRNImageViewProps &sourceProps, const RawProps &rawProps)
|
|
27
28
|
: ViewProps(context, sourceProps, rawProps) {}
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
using
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
using XRNImageViewShadowNode = ConcreteViewShadowNode<
|
|
32
|
+
XRNImageViewComponentName,
|
|
33
|
+
XRNImageViewProps,
|
|
33
34
|
ViewEventEmitter>;
|
|
34
35
|
|
|
35
|
-
class
|
|
36
|
-
: public ConcreteComponentDescriptor<
|
|
36
|
+
class XRNImageViewComponentDescriptor final
|
|
37
|
+
: public ConcreteComponentDescriptor<XRNImageViewShadowNode> {
|
|
37
38
|
public:
|
|
38
|
-
|
|
39
|
+
XRNImageViewComponentDescriptor(ComponentDescriptorParameters const ¶meters)
|
|
39
40
|
: ConcreteComponentDescriptor(parameters) {}
|
|
40
41
|
};
|
|
41
42
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generatorVersion: 1
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#pragma once
|
|
11
|
+
#include "RNOHCorePackage/ComponentBinders/ViewComponentJSIBinder.h"
|
|
12
|
+
|
|
13
|
+
namespace rnoh {
|
|
14
|
+
class XRNImageViewJSIBinder : public ViewComponentJSIBinder {
|
|
15
|
+
protected:
|
|
16
|
+
facebook::jsi::Object createNativeProps(facebook::jsi::Runtime &rt) override {
|
|
17
|
+
auto object = ViewComponentJSIBinder::createNativeProps(rt);
|
|
18
|
+
object.setProperty(rt, "source", true);
|
|
19
|
+
object.setProperty(rt, "placeholder", true);
|
|
20
|
+
object.setProperty(rt, "contentFit", true);
|
|
21
|
+
object.setProperty(rt, "placeholderContentFit", true);
|
|
22
|
+
object.setProperty(rt, "contentPosition", "Object");
|
|
23
|
+
object.setProperty(rt, "blurRadius", true);
|
|
24
|
+
object.setProperty(rt, "transition", "Object");
|
|
25
|
+
object.setProperty(rt, "tintColor", true);
|
|
26
|
+
object.setProperty(rt, "accessible", true);
|
|
27
|
+
object.setProperty(rt, "focusable", true);
|
|
28
|
+
object.setProperty(rt, "priority", true);
|
|
29
|
+
object.setProperty(rt, "cachePolicy", true);
|
|
30
|
+
object.setProperty(rt, "recyclingKey", true);
|
|
31
|
+
object.setProperty(rt, "allowDownscaling", true);
|
|
32
|
+
object.setProperty(rt, "autoplay", true);
|
|
33
|
+
object.setProperty(rt, "decodeFormat", true);
|
|
34
|
+
return object;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
facebook::jsi::Object createCommands(facebook::jsi::Runtime &rt) override {
|
|
38
|
+
auto commands = ViewComponentJSIBinder::createCommands(rt);
|
|
39
|
+
return commands;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
facebook::jsi::Object createBubblingEventTypes(facebook::jsi::Runtime &rt) override {
|
|
43
|
+
facebook::jsi::Object events(rt);
|
|
44
|
+
return events;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
facebook::jsi::Object createDirectEventTypes(facebook::jsi::Runtime &rt) override {
|
|
48
|
+
facebook::jsi::Object events(rt);
|
|
49
|
+
events.setProperty(rt, "topLoad", createDirectEvent(rt, "onLoad"));
|
|
50
|
+
events.setProperty(rt, "topLoadStart", createDirectEvent(rt, "onLoadStart"));
|
|
51
|
+
events.setProperty(rt, "topLoadEnd", createDirectEvent(rt, "onLoadEnd"));
|
|
52
|
+
events.setProperty(rt, "topProgress", createDirectEvent(rt, "onProgress"));
|
|
53
|
+
events.setProperty(rt, "topDisplay", createDirectEvent(rt, "onDisplay"));
|
|
54
|
+
events.setProperty(rt, "topError", createDirectEvent(rt, "onError"));
|
|
55
|
+
return events;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generatorVersion: 1
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "XRNKeyboard.h"
|
|
11
|
+
|
|
12
|
+
namespace rnoh {
|
|
13
|
+
using namespace facebook;
|
|
14
|
+
|
|
15
|
+
XRNKeyboard::XRNKeyboard(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
16
|
+
methodMap_ = {
|
|
17
|
+
ARK_ASYNC_METHOD_METADATA(getKeyboardContentNativeID, 0),
|
|
18
|
+
ARK_ASYNC_METHOD_METADATA(setSoftInputMode, 1),
|
|
19
|
+
ARK_ASYNC_METHOD_METADATA(setKeyboard, 4),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
} // namespace rnoh
|