@react-native-ohos/react-native-context-menu-view 1.16.1-rc.1
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/LICENSE +21 -0
- package/README.OpenSource +11 -0
- package/README.md +13 -0
- package/harmony/context_menu/BuildProfile.ets +17 -0
- package/harmony/context_menu/build-profile.json5 +12 -0
- package/harmony/context_menu/hvigorfile.ts +2 -0
- package/harmony/context_menu/index.ets +28 -0
- package/harmony/context_menu/oh-package.json5 +12 -0
- package/harmony/context_menu/src/main/cpp/CMakeLists.txt +8 -0
- package/harmony/context_menu/src/main/cpp/ComponentDescriptors.h +18 -0
- package/harmony/context_menu/src/main/cpp/ContextMenuJSIBinder.h +58 -0
- package/harmony/context_menu/src/main/cpp/ContextMenuPackage.h +140 -0
- package/harmony/context_menu/src/main/cpp/ContextMenuTurboModule.cpp +36 -0
- package/harmony/context_menu/src/main/cpp/ContextMenuTurboModule.h +38 -0
- package/harmony/context_menu/src/main/cpp/EventEmitters.cpp +49 -0
- package/harmony/context_menu/src/main/cpp/EventEmitters.h +41 -0
- package/harmony/context_menu/src/main/cpp/Props.cpp +33 -0
- package/harmony/context_menu/src/main/cpp/Props.h +115 -0
- package/harmony/context_menu/src/main/cpp/RTNContextMenuComponentInstance.cpp +286 -0
- package/harmony/context_menu/src/main/cpp/RTNContextMenuComponentInstance.h +165 -0
- package/harmony/context_menu/src/main/cpp/ShadowNodes.cpp +15 -0
- package/harmony/context_menu/src/main/cpp/ShadowNodes.h +30 -0
- package/harmony/context_menu/src/main/cpp/States.cpp +15 -0
- package/harmony/context_menu/src/main/cpp/States.h +34 -0
- package/harmony/context_menu/src/main/ets/ContextMenuLongPress.ets +374 -0
- package/harmony/context_menu/src/main/ets/ContextMenuLongPressWithNoSelect.ets +356 -0
- package/harmony/context_menu/src/main/ets/ContextMenuPackage.ets +48 -0
- package/harmony/context_menu/src/main/ets/ContextMenuThreeMenu.ets +224 -0
- package/harmony/context_menu/src/main/ets/ContextMenuThreeMenuWithNoSelect.ets +221 -0
- package/harmony/context_menu/src/main/ets/ContextMenuTurboModule.ets +293 -0
- package/harmony/context_menu/src/main/ets/ContextMenuTwoMenu.ets +209 -0
- package/harmony/context_menu/src/main/ets/ContextMenuTwoMenuWithNoSelect.ets +207 -0
- package/harmony/context_menu/src/main/ets/Logger.ets +64 -0
- package/harmony/context_menu/src/main/module.json5 +7 -0
- package/harmony/context_menu/src/main/resources/base/element/string.json +8 -0
- package/harmony/context_menu/src/main/resources/base/media/airplane_fill.png +0 -0
- package/harmony/context_menu/src/main/resources/base/media/background.png +0 -0
- package/harmony/context_menu/src/main/resources/base/media/foreground.png +0 -0
- package/harmony/context_menu/src/main/resources/base/media/layered_image.json +7 -0
- package/harmony/context_menu/src/main/resources/base/media/startIcon.png +0 -0
- package/harmony/context_menu/src/main/resources/base/profile/backup_config.json +3 -0
- package/harmony/context_menu/src/main/resources/base/profile/main_pages.json +5 -0
- package/harmony/context_menu/src/main/resources/en_US/element/string.json +8 -0
- package/harmony/context_menu/src/main/resources/zh_CN/element/string.json +8 -0
- package/harmony/context_menu/ts.ets +26 -0
- package/harmony/context_menu.har +0 -0
- package/index.js +44 -0
- package/package.json +49 -0
- package/react-native-context-menu-view.podspec +26 -0
- package/src/RTNContextMenuNativeComponent.ts +50 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = "react-native-context-menu-view"
|
|
7
|
+
s.version = package["version"]
|
|
8
|
+
s.summary = package["description"]
|
|
9
|
+
s.description = <<-DESC
|
|
10
|
+
react-native-context-menu-view
|
|
11
|
+
DESC
|
|
12
|
+
s.homepage = "https://github.com/mpiannucci/react-native-context-menu-view"
|
|
13
|
+
s.license = "MIT"
|
|
14
|
+
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
|
|
15
|
+
s.authors = { "Matthew Iannucci" => "mpiannucci@gmail.com" }
|
|
16
|
+
s.platforms = { :ios => "9.0" }
|
|
17
|
+
s.source = { :git => "https://github.com/mpiannucci/react-native-context-menu-view.git", :tag => "#{s.version}" }
|
|
18
|
+
|
|
19
|
+
s.source_files = "ios/**/*.{h,m,swift}"
|
|
20
|
+
s.requires_arc = true
|
|
21
|
+
|
|
22
|
+
s.dependency "React"
|
|
23
|
+
# ...
|
|
24
|
+
# s.dependency "..."
|
|
25
|
+
end
|
|
26
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ViewProps, ProcessedColorValue, HostComponent } from "react-native";
|
|
2
|
+
import {DirectEventHandler,DefaultTypes, Int32, WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
4
|
+
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
5
|
+
|
|
6
|
+
export interface ContextMenuAction {
|
|
7
|
+
title: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
systemIcon?: string;
|
|
10
|
+
icon?: string;
|
|
11
|
+
iconColor?: string;
|
|
12
|
+
destructive?: boolean;
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
inlineChildren?: boolean;
|
|
16
|
+
actions?: ContextMenuAction;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ContextMenuOnPressNativeEvent {
|
|
20
|
+
index: Int32;
|
|
21
|
+
indexPath: Int32[];
|
|
22
|
+
name: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ContextMenuProps extends ViewProps {
|
|
26
|
+
title?: string;
|
|
27
|
+
actions?: ContextMenuAction;
|
|
28
|
+
onPress?: DirectEventHandler<ContextMenuOnPressNativeEvent>
|
|
29
|
+
onPreviewPress?: DirectEventHandler<Readonly<{}>>
|
|
30
|
+
onCancel?: DirectEventHandler<Readonly<{}>>
|
|
31
|
+
previewBackgroundColor?: string;
|
|
32
|
+
// preview?: React.ReactNode;
|
|
33
|
+
dropdownMenuMode?: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
// children?: React.ReactNode;
|
|
36
|
+
subtitle?: string;
|
|
37
|
+
systemIcon?: string;
|
|
38
|
+
icon?: string;
|
|
39
|
+
iconColor?: string;
|
|
40
|
+
destructive?: boolean;
|
|
41
|
+
selected?: boolean;
|
|
42
|
+
inlineChildren?: boolean;
|
|
43
|
+
preview?: React.ReactNode;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type ContextMenuViewComponentType = HostComponent<ContextMenuProps>
|
|
47
|
+
|
|
48
|
+
console.log('2024-7-27,components')
|
|
49
|
+
|
|
50
|
+
export default codegenNativeComponent<ContextMenuProps>('RTNContextMenu') as ContextMenuViewComponentType;
|