react-native-tree-multi-select 1.2.0 → 1.2.3
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/.editorconfig +15 -0
- package/.gitattributes +3 -0
- package/.github/FUNDING.yml +13 -0
- package/.github/ISSUE_TEMPLATE/bug-report.md +42 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +30 -0
- package/.github/actions/setup/action.yml +28 -0
- package/.github/assets/Jairaj_Jangle_Google_Pay_UPI_QR_Code.jpg +0 -0
- package/.github/assets/paypal_donate.png +0 -0
- package/.github/assets/upi.png +0 -0
- package/.github/workflows/ci.yml +225 -0
- package/.gitignore +73 -0
- package/.nvmrc +1 -0
- package/.watchmanconfig +1 -0
- package/.yarnrc +3 -0
- package/CHANGELOG.md +145 -0
- package/CODE_OF_CONDUCT.md +133 -0
- package/CONTRIBUTING.md +114 -0
- package/README.md +12 -3
- package/babel.config.js +3 -0
- package/example/.bundle/config +2 -0
- package/example/.watchmanconfig +1 -0
- package/example/Gemfile +6 -0
- package/example/README.md +79 -0
- package/example/android/app/build.gradle +130 -0
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +10 -0
- package/example/android/app/src/debug/AndroidManifest.xml +13 -0
- package/example/android/app/src/debug/java/com/treemultiselectexample/ReactNativeFlipper.java +75 -0
- package/example/android/app/src/main/AndroidManifest.xml +25 -0
- package/example/android/app/src/main/java/com/treemultiselectexample/MainActivity.java +32 -0
- package/example/android/app/src/main/java/com/treemultiselectexample/MainApplication.java +62 -0
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- 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 +3 -0
- package/example/android/app/src/main/res/values/styles.xml +9 -0
- package/example/android/app/src/release/java/com/treemultiselectexample/ReactNativeFlipper.java +20 -0
- package/example/android/build.gradle +23 -0
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/example/android/gradle.properties +44 -0
- package/example/android/gradlew +244 -0
- package/example/android/gradlew.bat +92 -0
- package/example/android/settings.gradle +4 -0
- package/example/app.json +4 -0
- package/example/babel.config.js +17 -0
- package/example/index.js +5 -0
- package/example/ios/.xcode.env +11 -0
- package/example/ios/File.swift +6 -0
- package/example/ios/Podfile +62 -0
- package/example/ios/Podfile.lock +639 -0
- package/example/ios/TreeMultiSelectExample/AppDelegate.h +6 -0
- package/example/ios/TreeMultiSelectExample/AppDelegate.mm +26 -0
- package/example/ios/TreeMultiSelectExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/example/ios/TreeMultiSelectExample/Images.xcassets/Contents.json +6 -0
- package/example/ios/TreeMultiSelectExample/Info.plist +74 -0
- package/example/ios/TreeMultiSelectExample/LaunchScreen.storyboard +47 -0
- package/example/ios/TreeMultiSelectExample/main.m +10 -0
- package/example/ios/TreeMultiSelectExample-Bridging-Header.h +3 -0
- package/example/ios/TreeMultiSelectExample.xcodeproj/project.pbxproj +706 -0
- package/example/ios/TreeMultiSelectExample.xcodeproj/xcshareddata/xcschemes/TreeMultiSelectExample.xcscheme +88 -0
- package/example/ios/TreeMultiSelectExample.xcworkspace/contents.xcworkspacedata +10 -0
- package/example/ios/TreeMultiSelectExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/example/ios/TreeMultiSelectExampleTests/Info.plist +24 -0
- package/example/ios/TreeMultiSelectExampleTests/TreeMultiSelectExampleTests.m +66 -0
- package/example/metro.config.js +45 -0
- package/example/package.json +41 -0
- package/example/react-native.config.js +10 -0
- package/example/src/App.tsx +70 -0
- package/example/src/components/CustomArrow.tsx +71 -0
- package/example/src/components/CustomCheckboxView.tsx +119 -0
- package/example/src/components/CustomNodeRowView.tsx +124 -0
- package/example/src/components/SearchInput.tsx +68 -0
- package/example/src/screens/CustomArrowScreen.tsx +99 -0
- package/example/src/screens/CustomCheckboxScreen.tsx +99 -0
- package/example/src/screens/CustomNodeRowViewScreen.tsx +99 -0
- package/example/src/screens/LargeDataScreen.tsx +95 -0
- package/example/src/screens/MediumDataScreen.tsx +96 -0
- package/example/src/screens/SmallDataScreen.tsx +96 -0
- package/example/src/screens/screens.styles.ts +25 -0
- package/example/src/utils/sampleDataGenerator.ts +32 -0
- package/example/yarn.lock +6368 -0
- package/lefthook.yml +17 -0
- package/lib/commonjs/TreeView.js +13 -3
- package/lib/commonjs/TreeView.js.map +1 -1
- package/lib/commonjs/helpers/expandCollapse.helper.js +88 -21
- package/lib/commonjs/helpers/expandCollapse.helper.js.map +1 -1
- package/lib/commonjs/helpers/toggleCheckbox.helper.js +0 -1
- package/lib/commonjs/helpers/toggleCheckbox.helper.js.map +1 -1
- package/lib/commonjs/utils/usePreviousState.js +20 -0
- package/lib/commonjs/utils/usePreviousState.js.map +1 -0
- package/lib/module/TreeView.js +14 -4
- package/lib/module/TreeView.js.map +1 -1
- package/lib/module/helpers/expandCollapse.helper.js +86 -21
- package/lib/module/helpers/expandCollapse.helper.js.map +1 -1
- package/lib/module/helpers/toggleCheckbox.helper.js +0 -1
- package/lib/module/helpers/toggleCheckbox.helper.js.map +1 -1
- package/lib/module/utils/usePreviousState.js +15 -0
- package/lib/module/utils/usePreviousState.js.map +1 -0
- package/lib/typescript/TreeView.d.ts.map +1 -1
- package/lib/typescript/__mocks__/generateTree.mock.d.ts +17 -0
- package/lib/typescript/__mocks__/generateTree.mock.d.ts.map +1 -0
- package/lib/typescript/__mocks__/zustand.d.ts +3 -0
- package/lib/typescript/__mocks__/zustand.d.ts.map +1 -0
- package/lib/typescript/__tests__/expandCollapse.helper.test.d.ts +2 -0
- package/lib/typescript/__tests__/expandCollapse.helper.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/flattenTree.helper.test.d.ts +2 -0
- package/lib/typescript/__tests__/flattenTree.helper.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/initNodeMap.helper.test.d.ts +2 -0
- package/lib/typescript/__tests__/initNodeMap.helper.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/search.helper.test.d.ts +2 -0
- package/lib/typescript/__tests__/search.helper.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/selectAll.helper.test.d.ts +2 -0
- package/lib/typescript/__tests__/selectAll.helper.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/store.test.d.ts +2 -0
- package/lib/typescript/__tests__/store.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/toggleCheckbox.helper.test.d.ts +2 -0
- package/lib/typescript/__tests__/toggleCheckbox.helper.test.d.ts.map +1 -0
- package/lib/typescript/helpers/expandCollapse.helper.d.ts +12 -0
- package/lib/typescript/helpers/expandCollapse.helper.d.ts.map +1 -1
- package/lib/typescript/types/treeView.types.d.ts +3 -0
- package/lib/typescript/types/treeView.types.d.ts.map +1 -1
- package/lib/typescript/utils/usePreviousState.d.ts +7 -0
- package/lib/typescript/utils/usePreviousState.d.ts.map +1 -0
- package/package.json +5 -3
- package/scripts/bootstrap.js +29 -0
- package/src/TreeView.tsx +25 -4
- package/src/__mocks__/generateTree.mock.ts +125 -0
- package/src/__mocks__/zustand.ts +24 -0
- package/src/__tests__/expandCollapse.helper.test.ts +189 -0
- package/src/__tests__/flattenTree.helper.test.ts +78 -0
- package/src/__tests__/initNodeMap.helper.test.ts +46 -0
- package/src/__tests__/search.helper.test.ts +47 -0
- package/src/__tests__/selectAll.helper.test.ts +233 -0
- package/src/__tests__/store.test.ts +208 -0
- package/src/__tests__/toggleCheckbox.helper.test.ts +124 -0
- package/src/helpers/expandCollapse.helper.ts +82 -21
- package/src/helpers/toggleCheckbox.helper.ts +1 -1
- package/src/types/treeView.types.ts +5 -0
- package/src/utils/usePreviousState.ts +16 -0
- package/tsconfig.build.json +5 -0
- package/tsconfig.json +31 -0
- package/turbo.json +34 -0
- package/yarn.lock +9953 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#import "AppDelegate.h"
|
|
2
|
+
|
|
3
|
+
#import <React/RCTBundleURLProvider.h>
|
|
4
|
+
|
|
5
|
+
@implementation AppDelegate
|
|
6
|
+
|
|
7
|
+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
8
|
+
{
|
|
9
|
+
self.moduleName = @"TreeMultiSelectExample";
|
|
10
|
+
// You can add your custom initial props in the dictionary below.
|
|
11
|
+
// They will be passed down to the ViewController used by React Native.
|
|
12
|
+
self.initialProps = @{};
|
|
13
|
+
|
|
14
|
+
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
|
18
|
+
{
|
|
19
|
+
#if DEBUG
|
|
20
|
+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
|
21
|
+
#else
|
|
22
|
+
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
|
23
|
+
#endif
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"images" : [
|
|
3
|
+
{
|
|
4
|
+
"idiom" : "iphone",
|
|
5
|
+
"scale" : "2x",
|
|
6
|
+
"size" : "20x20"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"idiom" : "iphone",
|
|
10
|
+
"scale" : "3x",
|
|
11
|
+
"size" : "20x20"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"idiom" : "iphone",
|
|
15
|
+
"scale" : "2x",
|
|
16
|
+
"size" : "29x29"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"idiom" : "iphone",
|
|
20
|
+
"scale" : "3x",
|
|
21
|
+
"size" : "29x29"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"idiom" : "iphone",
|
|
25
|
+
"scale" : "2x",
|
|
26
|
+
"size" : "40x40"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"idiom" : "iphone",
|
|
30
|
+
"scale" : "3x",
|
|
31
|
+
"size" : "40x40"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"idiom" : "iphone",
|
|
35
|
+
"scale" : "2x",
|
|
36
|
+
"size" : "60x60"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"idiom" : "iphone",
|
|
40
|
+
"scale" : "3x",
|
|
41
|
+
"size" : "60x60"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"idiom" : "ios-marketing",
|
|
45
|
+
"scale" : "1x",
|
|
46
|
+
"size" : "1024x1024"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"info" : {
|
|
50
|
+
"author" : "xcode",
|
|
51
|
+
"version" : 1
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>en</string>
|
|
7
|
+
<key>CFBundleDisplayName</key>
|
|
8
|
+
<string>TreeMultiSelectExample</string>
|
|
9
|
+
<key>CFBundleExecutable</key>
|
|
10
|
+
<string>$(EXECUTABLE_NAME)</string>
|
|
11
|
+
<key>CFBundleIdentifier</key>
|
|
12
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
13
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
14
|
+
<string>6.0</string>
|
|
15
|
+
<key>CFBundleName</key>
|
|
16
|
+
<string>$(PRODUCT_NAME)</string>
|
|
17
|
+
<key>CFBundlePackageType</key>
|
|
18
|
+
<string>APPL</string>
|
|
19
|
+
<key>CFBundleShortVersionString</key>
|
|
20
|
+
<string>$(MARKETING_VERSION)</string>
|
|
21
|
+
<key>CFBundleSignature</key>
|
|
22
|
+
<string>????</string>
|
|
23
|
+
<key>CFBundleVersion</key>
|
|
24
|
+
<string>$(CURRENT_PROJECT_VERSION)</string>
|
|
25
|
+
<key>LSRequiresIPhoneOS</key>
|
|
26
|
+
<true/>
|
|
27
|
+
<key>NSAppTransportSecurity</key>
|
|
28
|
+
<dict>
|
|
29
|
+
<key>NSExceptionDomains</key>
|
|
30
|
+
<dict>
|
|
31
|
+
<key>localhost</key>
|
|
32
|
+
<dict>
|
|
33
|
+
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
|
34
|
+
<true/>
|
|
35
|
+
</dict>
|
|
36
|
+
</dict>
|
|
37
|
+
</dict>
|
|
38
|
+
<key>NSLocationWhenInUseUsageDescription</key>
|
|
39
|
+
<string></string>
|
|
40
|
+
<key>UILaunchStoryboardName</key>
|
|
41
|
+
<string>LaunchScreen</string>
|
|
42
|
+
<key>UIRequiredDeviceCapabilities</key>
|
|
43
|
+
<array>
|
|
44
|
+
<string>armv7</string>
|
|
45
|
+
</array>
|
|
46
|
+
<key>UISupportedInterfaceOrientations</key>
|
|
47
|
+
<array>
|
|
48
|
+
<string>UIInterfaceOrientationPortrait</string>
|
|
49
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
50
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
51
|
+
</array>
|
|
52
|
+
<key>UIViewControllerBasedStatusBarAppearance</key>
|
|
53
|
+
<false/>
|
|
54
|
+
<key>UIAppFonts</key>
|
|
55
|
+
<array>
|
|
56
|
+
<string>AntDesign.ttf</string>
|
|
57
|
+
<string>Entypo.ttf</string>
|
|
58
|
+
<string>EvilIcons.ttf</string>
|
|
59
|
+
<string>Feather.ttf</string>
|
|
60
|
+
<string>FontAwesome.ttf</string>
|
|
61
|
+
<string>FontAwesome5_Brands.ttf</string>
|
|
62
|
+
<string>FontAwesome5_Regular.ttf</string>
|
|
63
|
+
<string>FontAwesome5_Solid.ttf</string>
|
|
64
|
+
<string>Foundation.ttf</string>
|
|
65
|
+
<string>Ionicons.ttf</string>
|
|
66
|
+
<string>MaterialIcons.ttf</string>
|
|
67
|
+
<string>MaterialCommunityIcons.ttf</string>
|
|
68
|
+
<string>SimpleLineIcons.ttf</string>
|
|
69
|
+
<string>Octicons.ttf</string>
|
|
70
|
+
<string>Zocial.ttf</string>
|
|
71
|
+
<string>Fontisto.ttf</string>
|
|
72
|
+
</array>
|
|
73
|
+
</dict>
|
|
74
|
+
</plist>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
|
3
|
+
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
|
4
|
+
<dependencies>
|
|
5
|
+
<deployment identifier="iOS"/>
|
|
6
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
|
|
7
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
|
8
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
|
9
|
+
</dependencies>
|
|
10
|
+
<scenes>
|
|
11
|
+
<!--View Controller-->
|
|
12
|
+
<scene sceneID="EHf-IW-A2E">
|
|
13
|
+
<objects>
|
|
14
|
+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
|
15
|
+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
|
16
|
+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
|
17
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
18
|
+
<subviews>
|
|
19
|
+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TreeMultiSelectExample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
|
|
20
|
+
<rect key="frame" x="0.0" y="202" width="375" height="43"/>
|
|
21
|
+
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
|
22
|
+
<nil key="highlightedColor"/>
|
|
23
|
+
</label>
|
|
24
|
+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="MN2-I3-ftu">
|
|
25
|
+
<rect key="frame" x="0.0" y="626" width="375" height="21"/>
|
|
26
|
+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
27
|
+
<nil key="highlightedColor"/>
|
|
28
|
+
</label>
|
|
29
|
+
</subviews>
|
|
30
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
|
31
|
+
<constraints>
|
|
32
|
+
<constraint firstItem="Bcu-3y-fUS" firstAttribute="bottom" secondItem="MN2-I3-ftu" secondAttribute="bottom" constant="20" id="OZV-Vh-mqD"/>
|
|
33
|
+
<constraint firstItem="Bcu-3y-fUS" firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/>
|
|
34
|
+
<constraint firstItem="MN2-I3-ftu" firstAttribute="centerX" secondItem="Bcu-3y-fUS" secondAttribute="centerX" id="akx-eg-2ui"/>
|
|
35
|
+
<constraint firstItem="MN2-I3-ftu" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" id="i1E-0Y-4RG"/>
|
|
36
|
+
<constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/>
|
|
37
|
+
<constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" symbolic="YES" id="x7j-FC-K8j"/>
|
|
38
|
+
</constraints>
|
|
39
|
+
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
|
|
40
|
+
</view>
|
|
41
|
+
</viewController>
|
|
42
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
43
|
+
</objects>
|
|
44
|
+
<point key="canvasLocation" x="52.173913043478265" y="375"/>
|
|
45
|
+
</scene>
|
|
46
|
+
</scenes>
|
|
47
|
+
</document>
|