@solidx/checkbox 0.0.0-stage → 0.7.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/RNCCheckbox.podspec +22 -0
- package/android/build.gradle +54 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/android/gradle.properties +4 -0
- package/android/gradlew +172 -0
- package/android/gradlew.bat +84 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/reactnativecommunity/checkbox/ReactCheckBox.java +43 -0
- package/android/src/main/java/com/reactnativecommunity/checkbox/ReactCheckBoxEvent.java +52 -0
- package/android/src/main/java/com/reactnativecommunity/checkbox/ReactCheckBoxManager.java +134 -0
- package/android/src/main/java/com/reactnativecommunity/checkbox/ReactCheckBoxPackage.java +29 -0
- package/dist/AndroidCheckBoxNativeComponent.d.ts +2 -0
- package/dist/AndroidCheckBoxNativeComponent.js +11 -0
- package/dist/CheckBox.android.d.ts +83 -0
- package/dist/CheckBox.android.js +160 -0
- package/dist/CheckBox.d.ts +1 -0
- package/dist/CheckBox.ios.d.ts +92 -0
- package/dist/CheckBox.ios.js +103 -0
- package/dist/CheckBox.js +2 -0
- package/dist/CheckBox.windows.d.ts +77 -0
- package/dist/CheckBox.windows.js +96 -0
- package/dist/IOSCheckBoxNativeComponent.d.ts +2 -0
- package/dist/IOSCheckBoxNativeComponent.js +11 -0
- package/dist/WindowsCheckBoxComponent.d.ts +2 -0
- package/dist/WindowsCheckBoxComponent.js +6 -0
- package/dist/setAndForwardRef.d.ts +40 -0
- package/dist/setAndForwardRef.js +52 -0
- package/ios/Podfile +3 -0
- package/ios/Podfile.lock +16 -0
- package/ios/RNCCheckbox.h +16 -0
- package/ios/RNCCheckbox.m +13 -0
- package/ios/RNCCheckbox.xcodeproj/project.pbxproj +322 -0
- package/ios/RNCCheckbox.xcodeproj/xcshareddata/xcschemes/RNCCheckbox.xcscheme +67 -0
- package/ios/RNCCheckbox.xcworkspace/contents.xcworkspacedata +10 -0
- package/ios/RNCCheckbox.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/RNCCheckbox.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +10 -0
- package/ios/RNCCheckboxManager.h +12 -0
- package/ios/RNCCheckboxManager.m +86 -0
- package/package.json +76 -4
- package/typings/index.d.ts +14 -0
- package/windows/CheckboxWindows/CheckboxView.cpp +116 -0
- package/windows/CheckboxWindows/CheckboxView.h +33 -0
- package/windows/CheckboxWindows/CheckboxView.idl +11 -0
- package/windows/CheckboxWindows/CheckboxViewManager.cpp +73 -0
- package/windows/CheckboxWindows/CheckboxViewManager.h +44 -0
- package/windows/CheckboxWindows/CheckboxWindows.def +3 -0
- package/windows/CheckboxWindows/CheckboxWindows.rc +0 -0
- package/windows/CheckboxWindows/CheckboxWindows.vcxproj +189 -0
- package/windows/CheckboxWindows/CheckboxWindows.vcxproj.filters +43 -0
- package/windows/CheckboxWindows/PropertySheet.props +16 -0
- package/windows/CheckboxWindows/ReactPackageProvider.cpp +18 -0
- package/windows/CheckboxWindows/ReactPackageProvider.h +23 -0
- package/windows/CheckboxWindows/ReactPackageProvider.idl +9 -0
- package/windows/CheckboxWindows/packages.config +4 -0
- package/windows/CheckboxWindows/pch.cpp +1 -0
- package/windows/CheckboxWindows/pch.h +4 -0
- package/windows/CheckboxWindows/readme.txt +23 -0
- package/windows/CheckboxWindows/resource.h +14 -0
- package/windows/CheckboxWindows.sln +226 -0
- package/windows/CheckboxWindows62.sln +254 -0
- package/README.md +0 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Imported from RN .71
|
|
3
|
+
*/
|
|
4
|
+
import type { ElementRef } from 'react';
|
|
5
|
+
declare type Args = {
|
|
6
|
+
getForwardedRef: () => React.Ref<any> | undefined;
|
|
7
|
+
setLocalRef: (ref: ElementRef<any>) => any;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* This is a helper function for when a component needs to be able to forward a ref
|
|
11
|
+
* to a child component, but still needs to have access to that component as part of
|
|
12
|
+
* its implementation.
|
|
13
|
+
*
|
|
14
|
+
* Its main use case is in wrappers for native components.
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
*
|
|
18
|
+
* class MyView extends React.Component {
|
|
19
|
+
* _nativeRef = null;
|
|
20
|
+
*
|
|
21
|
+
* _setNativeRef = setAndForwardRef({
|
|
22
|
+
* getForwardedRef: () => this.props.forwardedRef,
|
|
23
|
+
* setLocalRef: ref => {
|
|
24
|
+
* this._nativeRef = ref;
|
|
25
|
+
* },
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* render() {
|
|
29
|
+
* return <View ref={this._setNativeRef} />;
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
*
|
|
33
|
+
* const MyViewWithRef = React.forwardRef((props, ref) => (
|
|
34
|
+
* <MyView {...props} forwardedRef={ref} />
|
|
35
|
+
* ));
|
|
36
|
+
*
|
|
37
|
+
* module.exports = MyViewWithRef;
|
|
38
|
+
*/
|
|
39
|
+
declare function setAndForwardRef({ getForwardedRef, setLocalRef, }: Args): (ref: ElementRef<any>) => void;
|
|
40
|
+
export default setAndForwardRef;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Imported from RN .71
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/**
|
|
7
|
+
* This is a helper function for when a component needs to be able to forward a ref
|
|
8
|
+
* to a child component, but still needs to have access to that component as part of
|
|
9
|
+
* its implementation.
|
|
10
|
+
*
|
|
11
|
+
* Its main use case is in wrappers for native components.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
*
|
|
15
|
+
* class MyView extends React.Component {
|
|
16
|
+
* _nativeRef = null;
|
|
17
|
+
*
|
|
18
|
+
* _setNativeRef = setAndForwardRef({
|
|
19
|
+
* getForwardedRef: () => this.props.forwardedRef,
|
|
20
|
+
* setLocalRef: ref => {
|
|
21
|
+
* this._nativeRef = ref;
|
|
22
|
+
* },
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* render() {
|
|
26
|
+
* return <View ref={this._setNativeRef} />;
|
|
27
|
+
* }
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
* const MyViewWithRef = React.forwardRef((props, ref) => (
|
|
31
|
+
* <MyView {...props} forwardedRef={ref} />
|
|
32
|
+
* ));
|
|
33
|
+
*
|
|
34
|
+
* module.exports = MyViewWithRef;
|
|
35
|
+
*/
|
|
36
|
+
function setAndForwardRef(_a) {
|
|
37
|
+
var getForwardedRef = _a.getForwardedRef, setLocalRef = _a.setLocalRef;
|
|
38
|
+
return function forwardRef(ref) {
|
|
39
|
+
var forwardedRef = getForwardedRef();
|
|
40
|
+
setLocalRef(ref);
|
|
41
|
+
// Forward to user ref prop (if one has been specified)
|
|
42
|
+
if (typeof forwardedRef === 'function') {
|
|
43
|
+
// Handle function-based refs. String-based refs are handled as functions.
|
|
44
|
+
forwardedRef(ref);
|
|
45
|
+
}
|
|
46
|
+
else if (typeof forwardedRef === 'object' && forwardedRef != null) {
|
|
47
|
+
// Handle createRef-based refs
|
|
48
|
+
forwardedRef = ref;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.default = setAndForwardRef;
|
package/ios/Podfile
ADDED
package/ios/Podfile.lock
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
PODS:
|
|
2
|
+
- BEMCheckBox (1.4.1)
|
|
3
|
+
|
|
4
|
+
DEPENDENCIES:
|
|
5
|
+
- BEMCheckBox (~> 1.4)
|
|
6
|
+
|
|
7
|
+
SPEC REPOS:
|
|
8
|
+
trunk:
|
|
9
|
+
- BEMCheckBox
|
|
10
|
+
|
|
11
|
+
SPEC CHECKSUMS:
|
|
12
|
+
BEMCheckBox: 5ba6e37ade3d3657b36caecc35c8b75c6c2b1a4e
|
|
13
|
+
|
|
14
|
+
PODFILE CHECKSUM: 66e913a59a8189d3e32be7f9fb38ffe4513e67e2
|
|
15
|
+
|
|
16
|
+
COCOAPODS: 1.9.1
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNCCheckbox.h
|
|
3
|
+
// RNCCheckbox
|
|
4
|
+
//
|
|
5
|
+
// Created by nicholaslee on 2020/05/09.
|
|
6
|
+
// Copyright © 2020 Facebook. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
#import "BEMCheckBox.h"
|
|
9
|
+
#import <React/RCTComponent.h>
|
|
10
|
+
|
|
11
|
+
@interface RNCCheckbox: BEMCheckBox
|
|
12
|
+
|
|
13
|
+
@property (nonatomic, copy) RCTBubblingEventBlock onAnimationDidStop;
|
|
14
|
+
@property (nonatomic, copy) RCTBubblingEventBlock onValueChange;
|
|
15
|
+
|
|
16
|
+
@end
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
// !$*UTF8*$!
|
|
2
|
+
{
|
|
3
|
+
archiveVersion = 1;
|
|
4
|
+
classes = {
|
|
5
|
+
};
|
|
6
|
+
objectVersion = 46;
|
|
7
|
+
objects = {
|
|
8
|
+
|
|
9
|
+
/* Begin PBXBuildFile section */
|
|
10
|
+
04AB486C2464567600F95015 /* RNCCheckboxManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 04AB486B2464567600F95015 /* RNCCheckboxManager.m */; };
|
|
11
|
+
04D89B062466BC8600F12FAC /* RNCCheckbox.m in Sources */ = {isa = PBXBuildFile; fileRef = 04D89B052466BC8600F12FAC /* RNCCheckbox.m */; };
|
|
12
|
+
D42212A44A2EA7735AC18A04 /* libPods-RNCCheckbox.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B20689F31656ED47BFF7B01D /* libPods-RNCCheckbox.a */; };
|
|
13
|
+
/* End PBXBuildFile section */
|
|
14
|
+
|
|
15
|
+
/* Begin PBXCopyFilesBuildPhase section */
|
|
16
|
+
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
|
17
|
+
isa = PBXCopyFilesBuildPhase;
|
|
18
|
+
buildActionMask = 2147483647;
|
|
19
|
+
dstPath = "include/$(PRODUCT_NAME)";
|
|
20
|
+
dstSubfolderSpec = 16;
|
|
21
|
+
files = (
|
|
22
|
+
);
|
|
23
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
24
|
+
};
|
|
25
|
+
/* End PBXCopyFilesBuildPhase section */
|
|
26
|
+
|
|
27
|
+
/* Begin PBXFileReference section */
|
|
28
|
+
04AB486A2464559800F95015 /* RNCCheckboxManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNCCheckboxManager.h; sourceTree = "<group>"; };
|
|
29
|
+
04AB486B2464567600F95015 /* RNCCheckboxManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNCCheckboxManager.m; sourceTree = "<group>"; };
|
|
30
|
+
04D89B042466BC6300F12FAC /* RNCCheckbox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNCCheckbox.h; sourceTree = "<group>"; };
|
|
31
|
+
04D89B052466BC8600F12FAC /* RNCCheckbox.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNCCheckbox.m; sourceTree = "<group>"; };
|
|
32
|
+
134814201AA4EA6300B7C361 /* libRNCCheckbox.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNCCheckbox.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
33
|
+
33AC04FB2B2595F34A4FC607 /* Pods-RNCCheckbox.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNCCheckbox.release.xcconfig"; path = "Target Support Files/Pods-RNCCheckbox/Pods-RNCCheckbox.release.xcconfig"; sourceTree = "<group>"; };
|
|
34
|
+
350E98BE3B7F42A33CF16B1C /* Pods-RNCCheckbox.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNCCheckbox.debug.xcconfig"; path = "Target Support Files/Pods-RNCCheckbox/Pods-RNCCheckbox.debug.xcconfig"; sourceTree = "<group>"; };
|
|
35
|
+
8A03BB988CC7414D736B91E6 /* Pods-RNCCheckbox.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNCCheckbox.release.xcconfig"; path = "Target Support Files/Pods-RNCCheckbox/Pods-RNCCheckbox.release.xcconfig"; sourceTree = "<group>"; };
|
|
36
|
+
9BD42D4DAF49745FFCBF1194 /* Pods-RNCCheckbox.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNCCheckbox.debug.xcconfig"; path = "Target Support Files/Pods-RNCCheckbox/Pods-RNCCheckbox.debug.xcconfig"; sourceTree = "<group>"; };
|
|
37
|
+
B20689F31656ED47BFF7B01D /* libPods-RNCCheckbox.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNCCheckbox.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
38
|
+
/* End PBXFileReference section */
|
|
39
|
+
|
|
40
|
+
/* Begin PBXFrameworksBuildPhase section */
|
|
41
|
+
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
|
42
|
+
isa = PBXFrameworksBuildPhase;
|
|
43
|
+
buildActionMask = 2147483647;
|
|
44
|
+
files = (
|
|
45
|
+
D42212A44A2EA7735AC18A04 /* libPods-RNCCheckbox.a in Frameworks */,
|
|
46
|
+
);
|
|
47
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
48
|
+
};
|
|
49
|
+
/* End PBXFrameworksBuildPhase section */
|
|
50
|
+
|
|
51
|
+
/* Begin PBXGroup section */
|
|
52
|
+
134814211AA4EA7D00B7C361 /* Products */ = {
|
|
53
|
+
isa = PBXGroup;
|
|
54
|
+
children = (
|
|
55
|
+
134814201AA4EA6300B7C361 /* libRNCCheckbox.a */,
|
|
56
|
+
);
|
|
57
|
+
name = Products;
|
|
58
|
+
sourceTree = "<group>";
|
|
59
|
+
};
|
|
60
|
+
58B511D21A9E6C8500147676 = {
|
|
61
|
+
isa = PBXGroup;
|
|
62
|
+
children = (
|
|
63
|
+
04AB486A2464559800F95015 /* RNCCheckboxManager.h */,
|
|
64
|
+
04D89B042466BC6300F12FAC /* RNCCheckbox.h */,
|
|
65
|
+
04D89B052466BC8600F12FAC /* RNCCheckbox.m */,
|
|
66
|
+
04AB486B2464567600F95015 /* RNCCheckboxManager.m */,
|
|
67
|
+
134814211AA4EA7D00B7C361 /* Products */,
|
|
68
|
+
8181DC7905A1A52AA25CCEB0 /* Pods */,
|
|
69
|
+
A4CB0919B25531C83A6A0790 /* Frameworks */,
|
|
70
|
+
);
|
|
71
|
+
sourceTree = "<group>";
|
|
72
|
+
};
|
|
73
|
+
8181DC7905A1A52AA25CCEB0 /* Pods */ = {
|
|
74
|
+
isa = PBXGroup;
|
|
75
|
+
children = (
|
|
76
|
+
9BD42D4DAF49745FFCBF1194 /* Pods-RNCCheckbox.debug.xcconfig */,
|
|
77
|
+
8A03BB988CC7414D736B91E6 /* Pods-RNCCheckbox.release.xcconfig */,
|
|
78
|
+
350E98BE3B7F42A33CF16B1C /* Pods-RNCCheckbox.debug.xcconfig */,
|
|
79
|
+
33AC04FB2B2595F34A4FC607 /* Pods-RNCCheckbox.release.xcconfig */,
|
|
80
|
+
);
|
|
81
|
+
path = Pods;
|
|
82
|
+
sourceTree = "<group>";
|
|
83
|
+
};
|
|
84
|
+
A4CB0919B25531C83A6A0790 /* Frameworks */ = {
|
|
85
|
+
isa = PBXGroup;
|
|
86
|
+
children = (
|
|
87
|
+
B20689F31656ED47BFF7B01D /* libPods-RNCCheckbox.a */,
|
|
88
|
+
);
|
|
89
|
+
name = Frameworks;
|
|
90
|
+
sourceTree = "<group>";
|
|
91
|
+
};
|
|
92
|
+
/* End PBXGroup section */
|
|
93
|
+
|
|
94
|
+
/* Begin PBXNativeTarget section */
|
|
95
|
+
58B511DA1A9E6C8500147676 /* RNCCheckbox */ = {
|
|
96
|
+
isa = PBXNativeTarget;
|
|
97
|
+
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNCCheckbox" */;
|
|
98
|
+
buildPhases = (
|
|
99
|
+
F3A67330767D0695FB222E32 /* [CP] Check Pods Manifest.lock */,
|
|
100
|
+
58B511D71A9E6C8500147676 /* Sources */,
|
|
101
|
+
58B511D81A9E6C8500147676 /* Frameworks */,
|
|
102
|
+
58B511D91A9E6C8500147676 /* CopyFiles */,
|
|
103
|
+
);
|
|
104
|
+
buildRules = (
|
|
105
|
+
);
|
|
106
|
+
dependencies = (
|
|
107
|
+
);
|
|
108
|
+
name = RNCCheckbox;
|
|
109
|
+
productName = RCTDataManager;
|
|
110
|
+
productReference = 134814201AA4EA6300B7C361 /* libRNCCheckbox.a */;
|
|
111
|
+
productType = "com.apple.product-type.library.static";
|
|
112
|
+
};
|
|
113
|
+
/* End PBXNativeTarget section */
|
|
114
|
+
|
|
115
|
+
/* Begin PBXProject section */
|
|
116
|
+
58B511D31A9E6C8500147676 /* Project object */ = {
|
|
117
|
+
isa = PBXProject;
|
|
118
|
+
attributes = {
|
|
119
|
+
LastUpgradeCheck = 0830;
|
|
120
|
+
ORGANIZATIONNAME = Facebook;
|
|
121
|
+
TargetAttributes = {
|
|
122
|
+
58B511DA1A9E6C8500147676 = {
|
|
123
|
+
CreatedOnToolsVersion = 6.1.1;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNCCheckbox" */;
|
|
128
|
+
compatibilityVersion = "Xcode 3.2";
|
|
129
|
+
developmentRegion = English;
|
|
130
|
+
hasScannedForEncodings = 0;
|
|
131
|
+
knownRegions = (
|
|
132
|
+
English,
|
|
133
|
+
en,
|
|
134
|
+
);
|
|
135
|
+
mainGroup = 58B511D21A9E6C8500147676;
|
|
136
|
+
productRefGroup = 58B511D21A9E6C8500147676;
|
|
137
|
+
projectDirPath = "";
|
|
138
|
+
projectRoot = "";
|
|
139
|
+
targets = (
|
|
140
|
+
58B511DA1A9E6C8500147676 /* RNCCheckbox */,
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
/* End PBXProject section */
|
|
144
|
+
|
|
145
|
+
/* Begin PBXShellScriptBuildPhase section */
|
|
146
|
+
F3A67330767D0695FB222E32 /* [CP] Check Pods Manifest.lock */ = {
|
|
147
|
+
isa = PBXShellScriptBuildPhase;
|
|
148
|
+
buildActionMask = 2147483647;
|
|
149
|
+
files = (
|
|
150
|
+
);
|
|
151
|
+
inputFileListPaths = (
|
|
152
|
+
);
|
|
153
|
+
inputPaths = (
|
|
154
|
+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
|
155
|
+
"${PODS_ROOT}/Manifest.lock",
|
|
156
|
+
);
|
|
157
|
+
name = "[CP] Check Pods Manifest.lock";
|
|
158
|
+
outputFileListPaths = (
|
|
159
|
+
);
|
|
160
|
+
outputPaths = (
|
|
161
|
+
"$(DERIVED_FILE_DIR)/Pods-RNCCheckbox-checkManifestLockResult.txt",
|
|
162
|
+
);
|
|
163
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
164
|
+
shellPath = /bin/sh;
|
|
165
|
+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
|
166
|
+
showEnvVarsInLog = 0;
|
|
167
|
+
};
|
|
168
|
+
/* End PBXShellScriptBuildPhase section */
|
|
169
|
+
|
|
170
|
+
/* Begin PBXSourcesBuildPhase section */
|
|
171
|
+
58B511D71A9E6C8500147676 /* Sources */ = {
|
|
172
|
+
isa = PBXSourcesBuildPhase;
|
|
173
|
+
buildActionMask = 2147483647;
|
|
174
|
+
files = (
|
|
175
|
+
04D89B062466BC8600F12FAC /* RNCCheckbox.m in Sources */,
|
|
176
|
+
04AB486C2464567600F95015 /* RNCCheckboxManager.m in Sources */,
|
|
177
|
+
);
|
|
178
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
179
|
+
};
|
|
180
|
+
/* End PBXSourcesBuildPhase section */
|
|
181
|
+
|
|
182
|
+
/* Begin XCBuildConfiguration section */
|
|
183
|
+
58B511ED1A9E6C8500147676 /* Debug */ = {
|
|
184
|
+
isa = XCBuildConfiguration;
|
|
185
|
+
buildSettings = {
|
|
186
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
187
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
188
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
189
|
+
CLANG_ENABLE_MODULES = YES;
|
|
190
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
191
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
192
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
193
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
194
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
195
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
196
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
197
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
198
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
199
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
200
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
201
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
202
|
+
COPY_PHASE_STRIP = NO;
|
|
203
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
204
|
+
ENABLE_TESTABILITY = YES;
|
|
205
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
206
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
|
207
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
208
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
|
209
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
210
|
+
"DEBUG=1",
|
|
211
|
+
"$(inherited)",
|
|
212
|
+
);
|
|
213
|
+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
|
214
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
215
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
216
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
217
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
218
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
219
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
220
|
+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
|
221
|
+
MTL_ENABLE_DEBUG_INFO = YES;
|
|
222
|
+
ONLY_ACTIVE_ARCH = YES;
|
|
223
|
+
SDKROOT = iphoneos;
|
|
224
|
+
};
|
|
225
|
+
name = Debug;
|
|
226
|
+
};
|
|
227
|
+
58B511EE1A9E6C8500147676 /* Release */ = {
|
|
228
|
+
isa = XCBuildConfiguration;
|
|
229
|
+
buildSettings = {
|
|
230
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
231
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
232
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
233
|
+
CLANG_ENABLE_MODULES = YES;
|
|
234
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
235
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
236
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
237
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
238
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
239
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
240
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
241
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
242
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
243
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
244
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
245
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
246
|
+
COPY_PHASE_STRIP = YES;
|
|
247
|
+
ENABLE_NS_ASSERTIONS = NO;
|
|
248
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
249
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
250
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
251
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
252
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
253
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
254
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
255
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
256
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
257
|
+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
|
258
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
|
259
|
+
SDKROOT = iphoneos;
|
|
260
|
+
VALIDATE_PRODUCT = YES;
|
|
261
|
+
};
|
|
262
|
+
name = Release;
|
|
263
|
+
};
|
|
264
|
+
58B511F01A9E6C8500147676 /* Debug */ = {
|
|
265
|
+
isa = XCBuildConfiguration;
|
|
266
|
+
baseConfigurationReference = 350E98BE3B7F42A33CF16B1C /* Pods-RNCCheckbox.debug.xcconfig */;
|
|
267
|
+
buildSettings = {
|
|
268
|
+
HEADER_SEARCH_PATHS = (
|
|
269
|
+
"$(inherited)",
|
|
270
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
|
271
|
+
"$(SRCROOT)/../../../React/**",
|
|
272
|
+
"$(SRCROOT)/../../react-native/React/**",
|
|
273
|
+
);
|
|
274
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
275
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
276
|
+
PRODUCT_NAME = RNCCheckbox;
|
|
277
|
+
SKIP_INSTALL = YES;
|
|
278
|
+
};
|
|
279
|
+
name = Debug;
|
|
280
|
+
};
|
|
281
|
+
58B511F11A9E6C8500147676 /* Release */ = {
|
|
282
|
+
isa = XCBuildConfiguration;
|
|
283
|
+
baseConfigurationReference = 33AC04FB2B2595F34A4FC607 /* Pods-RNCCheckbox.release.xcconfig */;
|
|
284
|
+
buildSettings = {
|
|
285
|
+
HEADER_SEARCH_PATHS = (
|
|
286
|
+
"$(inherited)",
|
|
287
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
|
288
|
+
"$(SRCROOT)/../../../React/**",
|
|
289
|
+
"$(SRCROOT)/../../react-native/React/**",
|
|
290
|
+
);
|
|
291
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
292
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
293
|
+
PRODUCT_NAME = RNCCheckbox;
|
|
294
|
+
SKIP_INSTALL = YES;
|
|
295
|
+
};
|
|
296
|
+
name = Release;
|
|
297
|
+
};
|
|
298
|
+
/* End XCBuildConfiguration section */
|
|
299
|
+
|
|
300
|
+
/* Begin XCConfigurationList section */
|
|
301
|
+
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNCCheckbox" */ = {
|
|
302
|
+
isa = XCConfigurationList;
|
|
303
|
+
buildConfigurations = (
|
|
304
|
+
58B511ED1A9E6C8500147676 /* Debug */,
|
|
305
|
+
58B511EE1A9E6C8500147676 /* Release */,
|
|
306
|
+
);
|
|
307
|
+
defaultConfigurationIsVisible = 0;
|
|
308
|
+
defaultConfigurationName = Release;
|
|
309
|
+
};
|
|
310
|
+
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNCCheckbox" */ = {
|
|
311
|
+
isa = XCConfigurationList;
|
|
312
|
+
buildConfigurations = (
|
|
313
|
+
58B511F01A9E6C8500147676 /* Debug */,
|
|
314
|
+
58B511F11A9E6C8500147676 /* Release */,
|
|
315
|
+
);
|
|
316
|
+
defaultConfigurationIsVisible = 0;
|
|
317
|
+
defaultConfigurationName = Release;
|
|
318
|
+
};
|
|
319
|
+
/* End XCConfigurationList section */
|
|
320
|
+
};
|
|
321
|
+
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
|
|
322
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1140"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "NO"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "58B511DA1A9E6C8500147676"
|
|
18
|
+
BuildableName = "libRNCCheckbox.a"
|
|
19
|
+
BlueprintName = "RNCCheckbox"
|
|
20
|
+
ReferencedContainer = "container:RNCCheckbox.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
<MacroExpansion>
|
|
51
|
+
<BuildableReference
|
|
52
|
+
BuildableIdentifier = "primary"
|
|
53
|
+
BlueprintIdentifier = "58B511DA1A9E6C8500147676"
|
|
54
|
+
BuildableName = "libRNCCheckbox.a"
|
|
55
|
+
BlueprintName = "RNCCheckbox"
|
|
56
|
+
ReferencedContainer = "container:RNCCheckbox.xcodeproj">
|
|
57
|
+
</BuildableReference>
|
|
58
|
+
</MacroExpansion>
|
|
59
|
+
</ProfileAction>
|
|
60
|
+
<AnalyzeAction
|
|
61
|
+
buildConfiguration = "Debug">
|
|
62
|
+
</AnalyzeAction>
|
|
63
|
+
<ArchiveAction
|
|
64
|
+
buildConfiguration = "Release"
|
|
65
|
+
revealArchiveInOrganizer = "YES">
|
|
66
|
+
</ArchiveAction>
|
|
67
|
+
</Scheme>
|
|
@@ -0,0 +1,10 @@
|
|
|
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>BuildSystemType</key>
|
|
6
|
+
<string>Original</string>
|
|
7
|
+
<key>PreviewsEnabled</key>
|
|
8
|
+
<false/>
|
|
9
|
+
</dict>
|
|
10
|
+
</plist>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Created by on 2020/05/07.
|
|
2
|
+
// Copyright © 2020 Facebook. All rights reserved.
|
|
3
|
+
|
|
4
|
+
// This source code is licensed under the MIT license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
|
|
7
|
+
#import <React/RCTViewManager.h>
|
|
8
|
+
#import "BEMCheckBox.h"
|
|
9
|
+
|
|
10
|
+
@interface RNCCheckboxManager : RCTViewManager <BEMCheckBoxDelegate>
|
|
11
|
+
|
|
12
|
+
@end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Created by Nicholas Lee <nicholaslee@gmail.com> on 2020/05/07.
|
|
2
|
+
// Copyright © 2020 Facebook. All rights reserved.
|
|
3
|
+
|
|
4
|
+
// This source code is licensed under the MIT license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
|
|
7
|
+
#import "BEMCheckBox.h"
|
|
8
|
+
#import "RNCCheckboxManager.h"
|
|
9
|
+
#import "RNCCheckbox.h"
|
|
10
|
+
|
|
11
|
+
#import <React/RCTBridge.h>
|
|
12
|
+
#import <React/RCTEventDispatcher.h>
|
|
13
|
+
#import <React/UIView+React.h>
|
|
14
|
+
#import <React/RCTConvert.h>
|
|
15
|
+
|
|
16
|
+
@implementation RNCCheckboxManager
|
|
17
|
+
|
|
18
|
+
RCT_EXPORT_MODULE();
|
|
19
|
+
|
|
20
|
+
RCT_CUSTOM_VIEW_PROPERTY(value, BOOL, BEMCheckBox) {
|
|
21
|
+
[view setOn:[RCTConvert BOOL:json] animated:YES];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
RCT_EXPORT_VIEW_PROPERTY(lineWidth, CGFloat);
|
|
25
|
+
RCT_EXPORT_VIEW_PROPERTY(hideBox, BOOL);
|
|
26
|
+
RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor);
|
|
27
|
+
RCT_EXPORT_VIEW_PROPERTY(onCheckColor, UIColor);
|
|
28
|
+
RCT_EXPORT_VIEW_PROPERTY(onFillColor, UIColor);
|
|
29
|
+
RCT_EXPORT_VIEW_PROPERTY(onTintColor, UIColor);
|
|
30
|
+
RCT_EXPORT_VIEW_PROPERTY(animationDuration, CGFloat);
|
|
31
|
+
RCT_EXPORT_VIEW_PROPERTY(onAnimationDidStop, RCTBubblingEventBlock)
|
|
32
|
+
RCT_EXPORT_VIEW_PROPERTY(onValueChange, RCTBubblingEventBlock)
|
|
33
|
+
|
|
34
|
+
RCT_REMAP_VIEW_PROPERTY(boxType, boxType, BEMBoxType);
|
|
35
|
+
RCT_REMAP_VIEW_PROPERTY(onAnimationType, onAnimationType, BEMAnimationType);
|
|
36
|
+
RCT_REMAP_VIEW_PROPERTY(offAnimationType, offAnimationType, BEMAnimationType);
|
|
37
|
+
|
|
38
|
+
- (UIView *)view
|
|
39
|
+
{
|
|
40
|
+
RNCCheckbox *checkbox = [RNCCheckbox new];
|
|
41
|
+
checkbox.delegate = self;
|
|
42
|
+
return checkbox;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
- (void)didTapCheckBox:(RNCCheckbox *) checkbox {
|
|
46
|
+
if (!checkbox.onValueChange) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
checkbox.onValueChange(@{
|
|
50
|
+
@"target": checkbox.reactTag,
|
|
51
|
+
@"value": @(checkbox.on),
|
|
52
|
+
@"name": @"tap",
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
- (void)animationDidStopForCheckBox:(RNCCheckbox *) checkbox {
|
|
57
|
+
if (!checkbox.onAnimationDidStop) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
checkbox.onAnimationDidStop(@{
|
|
61
|
+
@"target": checkbox.reactTag,
|
|
62
|
+
@"value": @(checkbox.on),
|
|
63
|
+
@"name": @"animation",
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@end
|
|
68
|
+
|
|
69
|
+
@implementation RCTConvert (BEMCheckBox)
|
|
70
|
+
|
|
71
|
+
RCT_ENUM_CONVERTER(BEMBoxType, (@{
|
|
72
|
+
@"circle": @(BEMBoxTypeCircle),
|
|
73
|
+
@"square": @(BEMBoxTypeSquare),
|
|
74
|
+
}), BEMBoxTypeCircle, integerValue);
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
RCT_ENUM_CONVERTER(BEMAnimationType, (@{
|
|
78
|
+
@"stroke": @(BEMAnimationTypeStroke),
|
|
79
|
+
@"fill": @(BEMAnimationTypeFill),
|
|
80
|
+
@"bounce": @(BEMAnimationTypeBounce),
|
|
81
|
+
@"flat": @(BEMAnimationTypeFlat),
|
|
82
|
+
@"one-stroke": @(BEMAnimationTypeOneStroke),
|
|
83
|
+
@"fade": @(BEMAnimationTypeFade),
|
|
84
|
+
}), BEMAnimationTypeStroke, integerValue);
|
|
85
|
+
|
|
86
|
+
@end
|