react-native-tree-multi-select 0.5.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/LICENSE +20 -0
- package/README.md +124 -0
- package/android/build.gradle +94 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/treemultiselect/TreeMultiSelectModule.kt +25 -0
- package/android/src/main/java/com/treemultiselect/TreeMultiSelectPackage.kt +17 -0
- package/ios/TreeMultiSelect-Bridging-Header.h +2 -0
- package/ios/TreeMultiSelect.mm +14 -0
- package/ios/TreeMultiSelect.swift +8 -0
- package/ios/TreeMultiSelect.xcodeproj/project.pbxproj +283 -0
- package/ios/TreeMultiSelect.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
- package/ios/TreeMultiSelect.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/TreeMultiSelect.xcodeproj/project.xcworkspace/xcuserdata/guest_jj.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/TreeMultiSelect.xcodeproj/xcuserdata/guest_jj.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/lib/commonjs/TreeView.js +99 -0
- package/lib/commonjs/TreeView.js.map +1 -0
- package/lib/commonjs/components/CheckboxView.js +77 -0
- package/lib/commonjs/components/CheckboxView.js.map +1 -0
- package/lib/commonjs/components/CustomExpandCollapseIcon.js +20 -0
- package/lib/commonjs/components/CustomExpandCollapseIcon.js.map +1 -0
- package/lib/commonjs/components/NodeList.js +193 -0
- package/lib/commonjs/components/NodeList.js.map +1 -0
- package/lib/commonjs/helpers/expandCollapse.helper.js +93 -0
- package/lib/commonjs/helpers/expandCollapse.helper.js.map +1 -0
- package/lib/commonjs/helpers/index.js +61 -0
- package/lib/commonjs/helpers/index.js.map +1 -0
- package/lib/commonjs/helpers/initNodeMap.helper.js +44 -0
- package/lib/commonjs/helpers/initNodeMap.helper.js.map +1 -0
- package/lib/commonjs/helpers/search.helper.js +29 -0
- package/lib/commonjs/helpers/search.helper.js.map +1 -0
- package/lib/commonjs/helpers/selectAll.helper.js +73 -0
- package/lib/commonjs/helpers/selectAll.helper.js.map +1 -0
- package/lib/commonjs/helpers/toggleCheckbox.helper.js +153 -0
- package/lib/commonjs/helpers/toggleCheckbox.helper.js.map +1 -0
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/signals/global.signals.js +42 -0
- package/lib/commonjs/signals/global.signals.js.map +1 -0
- package/lib/commonjs/types/treeView.types.js +6 -0
- package/lib/commonjs/types/treeView.types.js.map +1 -0
- package/lib/module/TreeView.js +89 -0
- package/lib/module/TreeView.js.map +1 -0
- package/lib/module/components/CheckboxView.js +68 -0
- package/lib/module/components/CheckboxView.js.map +1 -0
- package/lib/module/components/CustomExpandCollapseIcon.js +13 -0
- package/lib/module/components/CustomExpandCollapseIcon.js.map +1 -0
- package/lib/module/components/NodeList.js +185 -0
- package/lib/module/components/NodeList.js.map +1 -0
- package/lib/module/helpers/expandCollapse.helper.js +86 -0
- package/lib/module/helpers/expandCollapse.helper.js.map +1 -0
- package/lib/module/helpers/index.js +6 -0
- package/lib/module/helpers/index.js.map +1 -0
- package/lib/module/helpers/initNodeMap.helper.js +39 -0
- package/lib/module/helpers/initNodeMap.helper.js.map +1 -0
- package/lib/module/helpers/search.helper.js +23 -0
- package/lib/module/helpers/search.helper.js.map +1 -0
- package/lib/module/helpers/selectAll.helper.js +65 -0
- package/lib/module/helpers/selectAll.helper.js.map +1 -0
- package/lib/module/helpers/toggleCheckbox.helper.js +148 -0
- package/lib/module/helpers/toggleCheckbox.helper.js.map +1 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/signals/global.signals.js +26 -0
- package/lib/module/signals/global.signals.js.map +1 -0
- package/lib/module/types/treeView.types.js +2 -0
- package/lib/module/types/treeView.types.js.map +1 -0
- package/lib/typescript/TreeView.d.ts +4 -0
- package/lib/typescript/TreeView.d.ts.map +1 -0
- package/lib/typescript/components/CheckboxView.d.ts +24 -0
- package/lib/typescript/components/CheckboxView.d.ts.map +1 -0
- package/lib/typescript/components/CustomExpandCollapseIcon.d.ts +4 -0
- package/lib/typescript/components/CustomExpandCollapseIcon.d.ts.map +1 -0
- package/lib/typescript/components/NodeList.d.ts +14 -0
- package/lib/typescript/components/NodeList.d.ts.map +1 -0
- package/lib/typescript/helpers/expandCollapse.helper.d.ts +18 -0
- package/lib/typescript/helpers/expandCollapse.helper.d.ts.map +1 -0
- package/lib/typescript/helpers/index.d.ts +6 -0
- package/lib/typescript/helpers/index.d.ts.map +1 -0
- package/lib/typescript/helpers/initNodeMap.helper.d.ts +12 -0
- package/lib/typescript/helpers/initNodeMap.helper.d.ts.map +1 -0
- package/lib/typescript/helpers/search.helper.d.ts +14 -0
- package/lib/typescript/helpers/search.helper.d.ts.map +1 -0
- package/lib/typescript/helpers/selectAll.helper.d.ts +25 -0
- package/lib/typescript/helpers/selectAll.helper.d.ts.map +1 -0
- package/lib/typescript/helpers/toggleCheckbox.helper.d.ts +9 -0
- package/lib/typescript/helpers/toggleCheckbox.helper.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +5 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/signals/global.signals.d.ts +11 -0
- package/lib/typescript/signals/global.signals.d.ts.map +1 -0
- package/lib/typescript/types/treeView.types.d.ts +61 -0
- package/lib/typescript/types/treeView.types.d.ts.map +1 -0
- package/package.json +165 -0
- package/react-native-tree-multi-select.podspec +41 -0
- package/src/TreeView.tsx +139 -0
- package/src/components/CheckboxView.tsx +109 -0
- package/src/components/CustomExpandCollapseIcon.tsx +20 -0
- package/src/components/NodeList.tsx +278 -0
- package/src/helpers/expandCollapse.helper.ts +88 -0
- package/src/helpers/index.ts +5 -0
- package/src/helpers/initNodeMap.helper.ts +46 -0
- package/src/helpers/search.helper.ts +28 -0
- package/src/helpers/selectAll.helper.ts +59 -0
- package/src/helpers/toggleCheckbox.helper.ts +144 -0
- package/src/index.tsx +22 -0
- package/src/signals/global.signals.ts +36 -0
- package/src/types/treeView.types.ts +86 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Jairaj Jangle
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# react-native-tree-multi-select
|
|
2
|
+
|
|
3
|
+
Tree view with multi selection using checkbox + search filtering.
|
|
4
|
+
|
|
5
|
+
 
|
|
6
|
+
|
|
7
|
+
## Demo
|
|
8
|
+
|
|
9
|
+
<div align="left">
|
|
10
|
+
<img src="https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExNHFleDNleTZsMXVoMjk1YnlpdXFtanZyZGprMDkwcDdteGhqYTNhcCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/L0w26RrC32gdfWZ8Ux/giphy.gif" alt="demo" style="border: 1px solid gray;" />
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
Using yarn
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
yarn add react-native-tree-multi-select
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
using npm:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npm install react-native-tree-multi-select
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Dependencies required to be installed for this library to work:
|
|
28
|
+
|
|
29
|
+
1. [@shopify/flash-list](https://github.com/Shopify/flash-list)
|
|
30
|
+
2. [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons)
|
|
31
|
+
|
|
32
|
+
Make sure to follow the native-related installation for these dependencies.
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
import {
|
|
38
|
+
TreeView,
|
|
39
|
+
type TreeNode,
|
|
40
|
+
type TreeViewRef
|
|
41
|
+
} from 'react-native-tree-multi-select';
|
|
42
|
+
|
|
43
|
+
const myData: TreeNode[] = [...];
|
|
44
|
+
|
|
45
|
+
export function MyAppScreen(){
|
|
46
|
+
const treeViewRef = React.useRef<TreeViewRef | null>(null);
|
|
47
|
+
|
|
48
|
+
// Recommended to use debounce for search function
|
|
49
|
+
function triggerSearch(text: string){
|
|
50
|
+
// Pass search text to the tree along with the keys on which search is to be done(optional)
|
|
51
|
+
treeViewRef.current?.setSearchText(text, ["name"]);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const handleSelectionChange = (checkedIds: string[]) => {
|
|
55
|
+
// NOTE: Do something with updated checkedIds here
|
|
56
|
+
};
|
|
57
|
+
const handleExpanded = (expandedIds: string[]) => {
|
|
58
|
+
// NOTE: Do something with updated expandedIds here
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// Multi-selection function calls using ref
|
|
62
|
+
const onSelectAllPress = () => treeViewRef.current?.selectAll?.();
|
|
63
|
+
const onUnselectAllPress = () => treeViewRef.current?.unselectAll?.();
|
|
64
|
+
const onSelectAllFilteredPress = () => treeViewRef.current?.selectAllFiltered?.();
|
|
65
|
+
const onUnselectAllFilteredPress = () => treeViewRef.current?.unselectAllFiltered?.();
|
|
66
|
+
|
|
67
|
+
return(
|
|
68
|
+
// ...
|
|
69
|
+
<TreeView
|
|
70
|
+
ref={treeViewRef}
|
|
71
|
+
data={myData}
|
|
72
|
+
onCheck={handleSelectionChange}
|
|
73
|
+
onExpand={handleExpanded}
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Properties
|
|
80
|
+
|
|
81
|
+
| Property | Type | Required | Description |
|
|
82
|
+
| ---------------------------------- | -------------------------------------- | -------- | -------------------------------------------- |
|
|
83
|
+
| `data` | `TreeNode[]` | Yes | An array of `TreeNode` objects |
|
|
84
|
+
| `onCheck` | `(checkedIds: string[]) => void` | No | Callback when a checkbox is checked |
|
|
85
|
+
| `onExpand` | `(expandedIds: string[]) => void` | No | Callback when a node is expanded |
|
|
86
|
+
| `preselectedIds` | `string[]` | No | An array of `id`s that should be preselected |
|
|
87
|
+
| `treeFlashListProps` | `TreeFlatListProps` | No | Props for the flash list |
|
|
88
|
+
| `checkBoxViewStyleProps` | `CheckBoxViewStyleProps` | No | Props for the checkbox view |
|
|
89
|
+
| `CheckboxComponent` | `ComponentType<CheckBoxViewProps>` | No | A custom checkbox component |
|
|
90
|
+
| `ExpandCollapseIconComponent` | `ComponentType<ExpandIconProps>` | No | A custom expand/collapse icon component |
|
|
91
|
+
| `ExpandCollapseTouchableComponent` | `ComponentType<TouchableOpacityProps>` | No | A custom expand/collapse touchable component |
|
|
92
|
+
|
|
93
|
+
## TreeViewRef
|
|
94
|
+
|
|
95
|
+
| Property | Type | Description |
|
|
96
|
+
| --------------------- | ----------------------------------------------------- | ------------------------------------------------------------ |
|
|
97
|
+
| `selectAll` | `() => void` | Selects **all** nodes |
|
|
98
|
+
| `unselectAll` | `() => void` | Unselects **all** nodes |
|
|
99
|
+
| `selectAllFiltered` | `() => void` | Selects all **filtered** nodes |
|
|
100
|
+
| `unselectAllFiltered` | `() => void` | Unselects all **filtered** nodes |
|
|
101
|
+
| `expandAll` | `() => void` | Expands all nodes |
|
|
102
|
+
| `collapseAll` | `() => void` | Collapses all nodes |
|
|
103
|
+
| `setSearchText` | `(searchText: string, searchKeys?: string[]) => void` | Set the search text and optionally the search keys. Default search key is "name"<br /><br />Recommended to call this inside a debounced function if you find any performance issue otherwise. |
|
|
104
|
+
|
|
105
|
+
## TreeNode
|
|
106
|
+
|
|
107
|
+
| Property | Type | Required | Description |
|
|
108
|
+
| --------------- | ------------ | -------- | ------------------------------------------------------------ |
|
|
109
|
+
| `id` | `string` | Yes | Unique identifier for the node |
|
|
110
|
+
| `name` | `string` | Yes | The display name of the node |
|
|
111
|
+
| `children` | `TreeNode[]` | No | An array of child `TreeNode` objects |
|
|
112
|
+
| `[key: string]` | `any` | No | Any additional properties for the node <br />(May be useful to perform search on) |
|
|
113
|
+
|
|
114
|
+
## Contributing
|
|
115
|
+
|
|
116
|
+
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
|
117
|
+
|
|
118
|
+
## License
|
|
119
|
+
|
|
120
|
+
MIT
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
buildscript {
|
|
2
|
+
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
|
|
3
|
+
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["TreeMultiSelect_kotlinVersion"]
|
|
4
|
+
|
|
5
|
+
repositories {
|
|
6
|
+
google()
|
|
7
|
+
mavenCentral()
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
dependencies {
|
|
11
|
+
classpath "com.android.tools.build:gradle:7.2.1"
|
|
12
|
+
// noinspection DifferentKotlinGradleVersion
|
|
13
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
def isNewArchitectureEnabled() {
|
|
18
|
+
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
apply plugin: "com.android.library"
|
|
22
|
+
apply plugin: "kotlin-android"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
|
|
26
|
+
|
|
27
|
+
if (isNewArchitectureEnabled()) {
|
|
28
|
+
apply plugin: "com.facebook.react"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def getExtOrDefault(name) {
|
|
32
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["TreeMultiSelect_" + name]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
def getExtOrIntegerDefault(name) {
|
|
36
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["TreeMultiSelect_" + name]).toInteger()
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
def isAGPVersionGreaterThan(version) {
|
|
40
|
+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
|
|
41
|
+
return agpVersion > version
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
android {
|
|
45
|
+
if (isAGPVersionGreaterThan(7)) {
|
|
46
|
+
namespace "com.treemultiselect"
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
|
|
50
|
+
|
|
51
|
+
defaultConfig {
|
|
52
|
+
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
53
|
+
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
54
|
+
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
55
|
+
}
|
|
56
|
+
buildTypes {
|
|
57
|
+
release {
|
|
58
|
+
minifyEnabled false
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
lintOptions {
|
|
63
|
+
disable "GradleCompatible"
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
compileOptions {
|
|
67
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
68
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
repositories {
|
|
74
|
+
mavenCentral()
|
|
75
|
+
google()
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
79
|
+
|
|
80
|
+
dependencies {
|
|
81
|
+
// For < 0.71, this will be from the local maven repo
|
|
82
|
+
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
83
|
+
//noinspection GradleDynamicVersion
|
|
84
|
+
implementation "com.facebook.react:react-native:+"
|
|
85
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (isNewArchitectureEnabled()) {
|
|
89
|
+
react {
|
|
90
|
+
jsRootDir = file("../src/")
|
|
91
|
+
libraryName = "TreeMultiSelect"
|
|
92
|
+
codegenJavaPackageName = "com.treemultiselect"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
package com.treemultiselect
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
5
|
+
import com.facebook.react.bridge.ReactMethod
|
|
6
|
+
import com.facebook.react.bridge.Promise
|
|
7
|
+
|
|
8
|
+
class TreeMultiSelectModule(reactContext: ReactApplicationContext) :
|
|
9
|
+
ReactContextBaseJavaModule(reactContext) {
|
|
10
|
+
|
|
11
|
+
override fun getName(): String {
|
|
12
|
+
return NAME
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Example method
|
|
16
|
+
// See https://reactnative.dev/docs/native-modules-android
|
|
17
|
+
@ReactMethod
|
|
18
|
+
fun multiply(a: Double, b: Double, promise: Promise) {
|
|
19
|
+
promise.resolve(a * b)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
companion object {
|
|
23
|
+
const val NAME = "TreeMultiSelect"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
package com.treemultiselect
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.ReactPackage
|
|
4
|
+
import com.facebook.react.bridge.NativeModule
|
|
5
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
+
import com.facebook.react.uimanager.ViewManager
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TreeMultiSelectPackage : ReactPackage {
|
|
10
|
+
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
|
11
|
+
return listOf(TreeMultiSelectModule(reactContext))
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
15
|
+
return emptyList()
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#import <React/RCTBridgeModule.h>
|
|
2
|
+
|
|
3
|
+
@interface RCT_EXTERN_MODULE(TreeMultiSelect, NSObject)
|
|
4
|
+
|
|
5
|
+
RCT_EXTERN_METHOD(multiply:(float)a withB:(float)b
|
|
6
|
+
withResolver:(RCTPromiseResolveBlock)resolve
|
|
7
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
8
|
+
|
|
9
|
+
+ (BOOL)requiresMainQueueSetup
|
|
10
|
+
{
|
|
11
|
+
return NO;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@end
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
// !$*UTF8*$!
|
|
2
|
+
{
|
|
3
|
+
archiveVersion = 1;
|
|
4
|
+
classes = {
|
|
5
|
+
};
|
|
6
|
+
objectVersion = 46;
|
|
7
|
+
objects = {
|
|
8
|
+
|
|
9
|
+
/* Begin PBXBuildFile section */
|
|
10
|
+
5E555C0D2413F4C50049A1A2 /* TreeMultiSelect.mm in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* TreeMultiSelect.mm */; };
|
|
11
|
+
F4FF95D7245B92E800C19C63 /* TreeMultiSelect.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* TreeMultiSelect.swift */; };
|
|
12
|
+
/* End PBXBuildFile section */
|
|
13
|
+
|
|
14
|
+
/* Begin PBXCopyFilesBuildPhase section */
|
|
15
|
+
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
|
16
|
+
isa = PBXCopyFilesBuildPhase;
|
|
17
|
+
buildActionMask = 2147483647;
|
|
18
|
+
dstPath = "include/$(PRODUCT_NAME)";
|
|
19
|
+
dstSubfolderSpec = 16;
|
|
20
|
+
files = (
|
|
21
|
+
);
|
|
22
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
23
|
+
};
|
|
24
|
+
/* End PBXCopyFilesBuildPhase section */
|
|
25
|
+
|
|
26
|
+
/* Begin PBXFileReference section */
|
|
27
|
+
134814201AA4EA6300B7C361 /* libTreeMultiSelect.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTreeMultiSelect.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
28
|
+
B3E7B5891CC2AC0600A0062D /* TreeMultiSelect.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TreeMultiSelect.mm; sourceTree = "<group>"; };
|
|
29
|
+
F4FF95D5245B92E700C19C63 /* TreeMultiSelect-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TreeMultiSelect-Bridging-Header.h"; sourceTree = "<group>"; };
|
|
30
|
+
F4FF95D6245B92E800C19C63 /* TreeMultiSelect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TreeMultiSelect.swift; sourceTree = "<group>"; };
|
|
31
|
+
/* End PBXFileReference section */
|
|
32
|
+
|
|
33
|
+
/* Begin PBXFrameworksBuildPhase section */
|
|
34
|
+
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
|
35
|
+
isa = PBXFrameworksBuildPhase;
|
|
36
|
+
buildActionMask = 2147483647;
|
|
37
|
+
files = (
|
|
38
|
+
);
|
|
39
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
40
|
+
};
|
|
41
|
+
/* End PBXFrameworksBuildPhase section */
|
|
42
|
+
|
|
43
|
+
/* Begin PBXGroup section */
|
|
44
|
+
134814211AA4EA7D00B7C361 /* Products */ = {
|
|
45
|
+
isa = PBXGroup;
|
|
46
|
+
children = (
|
|
47
|
+
134814201AA4EA6300B7C361 /* libTreeMultiSelect.a */,
|
|
48
|
+
);
|
|
49
|
+
name = Products;
|
|
50
|
+
sourceTree = "<group>";
|
|
51
|
+
};
|
|
52
|
+
58B511D21A9E6C8500147676 = {
|
|
53
|
+
isa = PBXGroup;
|
|
54
|
+
children = (
|
|
55
|
+
F4FF95D6245B92E800C19C63 /* TreeMultiSelect.swift */,
|
|
56
|
+
B3E7B5891CC2AC0600A0062D /* TreeMultiSelect.mm */,
|
|
57
|
+
F4FF95D5245B92E700C19C63 /* TreeMultiSelect-Bridging-Header.h */,
|
|
58
|
+
134814211AA4EA7D00B7C361 /* Products */,
|
|
59
|
+
);
|
|
60
|
+
sourceTree = "<group>";
|
|
61
|
+
};
|
|
62
|
+
/* End PBXGroup section */
|
|
63
|
+
|
|
64
|
+
/* Begin PBXNativeTarget section */
|
|
65
|
+
58B511DA1A9E6C8500147676 /* TreeMultiSelect */ = {
|
|
66
|
+
isa = PBXNativeTarget;
|
|
67
|
+
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "TreeMultiSelect" */;
|
|
68
|
+
buildPhases = (
|
|
69
|
+
58B511D71A9E6C8500147676 /* Sources */,
|
|
70
|
+
58B511D81A9E6C8500147676 /* Frameworks */,
|
|
71
|
+
58B511D91A9E6C8500147676 /* CopyFiles */,
|
|
72
|
+
);
|
|
73
|
+
buildRules = (
|
|
74
|
+
);
|
|
75
|
+
dependencies = (
|
|
76
|
+
);
|
|
77
|
+
name = TreeMultiSelect;
|
|
78
|
+
productName = RCTDataManager;
|
|
79
|
+
productReference = 134814201AA4EA6300B7C361 /* libTreeMultiSelect.a */;
|
|
80
|
+
productType = "com.apple.product-type.library.static";
|
|
81
|
+
};
|
|
82
|
+
/* End PBXNativeTarget section */
|
|
83
|
+
|
|
84
|
+
/* Begin PBXProject section */
|
|
85
|
+
58B511D31A9E6C8500147676 /* Project object */ = {
|
|
86
|
+
isa = PBXProject;
|
|
87
|
+
attributes = {
|
|
88
|
+
LastUpgradeCheck = 0920;
|
|
89
|
+
ORGANIZATIONNAME = Facebook;
|
|
90
|
+
TargetAttributes = {
|
|
91
|
+
58B511DA1A9E6C8500147676 = {
|
|
92
|
+
CreatedOnToolsVersion = 6.1.1;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "TreeMultiSelect" */;
|
|
97
|
+
compatibilityVersion = "Xcode 3.2";
|
|
98
|
+
developmentRegion = English;
|
|
99
|
+
hasScannedForEncodings = 0;
|
|
100
|
+
knownRegions = (
|
|
101
|
+
English,
|
|
102
|
+
en,
|
|
103
|
+
);
|
|
104
|
+
mainGroup = 58B511D21A9E6C8500147676;
|
|
105
|
+
productRefGroup = 58B511D21A9E6C8500147676;
|
|
106
|
+
projectDirPath = "";
|
|
107
|
+
projectRoot = "";
|
|
108
|
+
targets = (
|
|
109
|
+
58B511DA1A9E6C8500147676 /* TreeMultiSelect */,
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
/* End PBXProject section */
|
|
113
|
+
|
|
114
|
+
/* Begin PBXSourcesBuildPhase section */
|
|
115
|
+
58B511D71A9E6C8500147676 /* Sources */ = {
|
|
116
|
+
isa = PBXSourcesBuildPhase;
|
|
117
|
+
buildActionMask = 2147483647;
|
|
118
|
+
files = (
|
|
119
|
+
F4FF95D7245B92E800C19C63 /* TreeMultiSelect.swift in Sources */,
|
|
120
|
+
B3E7B58A1CC2AC0600A0062D /* TreeMultiSelect.mm in Sources */,
|
|
121
|
+
);
|
|
122
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
123
|
+
};
|
|
124
|
+
/* End PBXSourcesBuildPhase section */
|
|
125
|
+
|
|
126
|
+
/* Begin XCBuildConfiguration section */
|
|
127
|
+
58B511ED1A9E6C8500147676 /* Debug */ = {
|
|
128
|
+
isa = XCBuildConfiguration;
|
|
129
|
+
buildSettings = {
|
|
130
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
131
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
132
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
133
|
+
CLANG_ENABLE_MODULES = YES;
|
|
134
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
135
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
136
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
137
|
+
CLANG_WARN_COMMA = YES;
|
|
138
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
139
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
140
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
141
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
142
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
143
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
144
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
145
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
146
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
147
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
148
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
149
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
150
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
151
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
152
|
+
COPY_PHASE_STRIP = NO;
|
|
153
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
154
|
+
ENABLE_TESTABILITY = YES;
|
|
155
|
+
"EXCLUDED_ARCHS[sdk=*]" = arm64;
|
|
156
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
157
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
|
158
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
159
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
|
160
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
161
|
+
"DEBUG=1",
|
|
162
|
+
"$(inherited)",
|
|
163
|
+
);
|
|
164
|
+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
|
165
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
166
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
167
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
168
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
169
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
170
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
171
|
+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
|
172
|
+
MTL_ENABLE_DEBUG_INFO = YES;
|
|
173
|
+
ONLY_ACTIVE_ARCH = YES;
|
|
174
|
+
SDKROOT = iphoneos;
|
|
175
|
+
};
|
|
176
|
+
name = Debug;
|
|
177
|
+
};
|
|
178
|
+
58B511EE1A9E6C8500147676 /* Release */ = {
|
|
179
|
+
isa = XCBuildConfiguration;
|
|
180
|
+
buildSettings = {
|
|
181
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
182
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
183
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
184
|
+
CLANG_ENABLE_MODULES = YES;
|
|
185
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
186
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
187
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
188
|
+
CLANG_WARN_COMMA = YES;
|
|
189
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
190
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
191
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
192
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
193
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
194
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
195
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
196
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
197
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
198
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
199
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
200
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
201
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
202
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
203
|
+
COPY_PHASE_STRIP = YES;
|
|
204
|
+
ENABLE_NS_ASSERTIONS = NO;
|
|
205
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
206
|
+
"EXCLUDED_ARCHS[sdk=*]" = arm64;
|
|
207
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
208
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
209
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
210
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
211
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
212
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
213
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
214
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
215
|
+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
|
216
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
|
217
|
+
SDKROOT = iphoneos;
|
|
218
|
+
VALIDATE_PRODUCT = YES;
|
|
219
|
+
};
|
|
220
|
+
name = Release;
|
|
221
|
+
};
|
|
222
|
+
58B511F01A9E6C8500147676 /* Debug */ = {
|
|
223
|
+
isa = XCBuildConfiguration;
|
|
224
|
+
buildSettings = {
|
|
225
|
+
HEADER_SEARCH_PATHS = (
|
|
226
|
+
"$(inherited)",
|
|
227
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
|
228
|
+
"$(SRCROOT)/../../../React/**",
|
|
229
|
+
"$(SRCROOT)/../../react-native/React/**",
|
|
230
|
+
);
|
|
231
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
232
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
233
|
+
PRODUCT_NAME = TreeMultiSelect;
|
|
234
|
+
SKIP_INSTALL = YES;
|
|
235
|
+
SWIFT_OBJC_BRIDGING_HEADER = "TreeMultiSelect-Bridging-Header.h";
|
|
236
|
+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
237
|
+
SWIFT_VERSION = 5.0;
|
|
238
|
+
};
|
|
239
|
+
name = Debug;
|
|
240
|
+
};
|
|
241
|
+
58B511F11A9E6C8500147676 /* Release */ = {
|
|
242
|
+
isa = XCBuildConfiguration;
|
|
243
|
+
buildSettings = {
|
|
244
|
+
HEADER_SEARCH_PATHS = (
|
|
245
|
+
"$(inherited)",
|
|
246
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
|
247
|
+
"$(SRCROOT)/../../../React/**",
|
|
248
|
+
"$(SRCROOT)/../../react-native/React/**",
|
|
249
|
+
);
|
|
250
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
251
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
252
|
+
PRODUCT_NAME = TreeMultiSelect;
|
|
253
|
+
SKIP_INSTALL = YES;
|
|
254
|
+
SWIFT_OBJC_BRIDGING_HEADER = "TreeMultiSelect-Bridging-Header.h";
|
|
255
|
+
SWIFT_VERSION = 5.0;
|
|
256
|
+
};
|
|
257
|
+
name = Release;
|
|
258
|
+
};
|
|
259
|
+
/* End XCBuildConfiguration section */
|
|
260
|
+
|
|
261
|
+
/* Begin XCConfigurationList section */
|
|
262
|
+
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "TreeMultiSelect" */ = {
|
|
263
|
+
isa = XCConfigurationList;
|
|
264
|
+
buildConfigurations = (
|
|
265
|
+
58B511ED1A9E6C8500147676 /* Debug */,
|
|
266
|
+
58B511EE1A9E6C8500147676 /* Release */,
|
|
267
|
+
);
|
|
268
|
+
defaultConfigurationIsVisible = 0;
|
|
269
|
+
defaultConfigurationName = Release;
|
|
270
|
+
};
|
|
271
|
+
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "TreeMultiSelect" */ = {
|
|
272
|
+
isa = XCConfigurationList;
|
|
273
|
+
buildConfigurations = (
|
|
274
|
+
58B511F01A9E6C8500147676 /* Debug */,
|
|
275
|
+
58B511F11A9E6C8500147676 /* Release */,
|
|
276
|
+
);
|
|
277
|
+
defaultConfigurationIsVisible = 0;
|
|
278
|
+
defaultConfigurationName = Release;
|
|
279
|
+
};
|
|
280
|
+
/* End XCConfigurationList section */
|
|
281
|
+
};
|
|
282
|
+
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
|
|
283
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>TreeMultiSelect.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>0</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
</dict>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|