Authored by lixia.zhang

更改成能正常运行代码,0.44的很多不支持的语法进行了修改

Showing 100 changed files with 1082 additions and 675 deletions

Too many changes to show.

To preserve performance only 100 of 100+ files are displayed.

... ... @@ -24,12 +24,18 @@
.*/Libraries/react-native/ReactNative.js
.*/node_modules/jest-runtime/build/__tests__/.*
; Ignore polyfills
.*/Libraries/polyfills/.*
; Ignore metro
.*/node_modules/metro/.*
[include]
[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow
flow/
node_modules/react-native/flow/
node_modules/react-native/flow-github/
[options]
module.system=haste
... ... @@ -44,15 +50,20 @@ munge_underscores=true
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
unsafe.enable_getters_and_setters=true
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
[version]
^0.30.0
^0.65.0
... ...
... ... @@ -22,23 +22,32 @@ DerivedData
*.xcuserstate
project.xcworkspace
# Android/IJ
# Android/IntelliJ
#
*.iml
build/
.idea
.gradle
local.properties
*.iml
# node.js
#
node_modules/
bundle/
index.android.bundle
index.android.bundle.meta
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
android/app/libs
android/keystores/debug.keystore
*.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
... ...
... ... @@ -33,6 +33,13 @@ import com.android.build.OutputFile
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
... ... @@ -65,6 +72,10 @@ import com.android.build.OutputFile
* ]
*/
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
/**
... ...
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yh_rncomponent"
android:versionCode="1"
android:versionName="1.0">
package="com.yh_rncomponent">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
... ...
... ... @@ -26,6 +26,11 @@ public class MainApplication extends Application implements ReactApplication {
new MainReactPackage()
);
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
... ...
... ... @@ -22,7 +22,21 @@
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; };
2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; };
2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; };
2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
2DCD954D1E0B4F2C00145EB5 /* YH_RNComponentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* YH_RNComponentTests.m */; };
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
... ... @@ -89,6 +103,139 @@
remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
remoteInfo = React;
};
2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
remoteInfo = "YH_RNComponent-tvOS";
};
2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = ADD01A681E09402E00F6D226;
remoteInfo = "RCTBlob-tvOS";
};
2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
remoteInfo = fishhook;
};
2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
remoteInfo = "fishhook-tvOS";
};
3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
remoteInfo = "RCTImage-tvOS";
};
3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28471D9B043800D4039D;
remoteInfo = "RCTLinking-tvOS";
};
3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
remoteInfo = "RCTNetwork-tvOS";
};
3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28611D9B046600D4039D;
remoteInfo = "RCTSettings-tvOS";
};
3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
remoteInfo = "RCTText-tvOS";
};
3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28881D9B049200D4039D;
remoteInfo = "RCTWebSocket-tvOS";
};
3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
remoteInfo = "React-tvOS";
};
3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3C059A1DE3340900C268FA;
remoteInfo = yoga;
};
3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3C06751DE3340C00C268FA;
remoteInfo = "yoga-tvOS";
};
3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4;
remoteInfo = cxxreact;
};
3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
remoteInfo = "cxxreact-tvOS";
};
3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
remoteInfo = jschelpers;
};
3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
remoteInfo = "jschelpers-tvOS";
};
5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RCTAnimation;
};
5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
remoteInfo = "RCTAnimation-tvOS";
};
78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
... ... @@ -103,6 +250,13 @@
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
remoteInfo = RCTText;
};
ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
remoteInfo = RCTBlob;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
... ... @@ -124,9 +278,14 @@
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = YH_RNComponent/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = YH_RNComponent/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = YH_RNComponent/main.m; sourceTree = "<group>"; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../node_modules/react-native/React/React.xcodeproj; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = ../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../node_modules/react-native/Libraries/Text/RCTText.xcodeproj; sourceTree = "<group>"; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
2D02E47B1E0B4A5D006451C7 /* YH_RNComponent-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "YH_RNComponent-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2D02E4901E0B4A5D006451C7 /* YH_RNComponent-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "YH_RNComponent-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
... ... @@ -142,6 +301,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
... ... @@ -155,6 +316,28 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */,
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */,
2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */,
2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
... ... @@ -227,6 +410,9 @@
isa = PBXGroup;
children = (
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
2D16E6841FA4F8DC00B85C8A /* libfishhook.a */,
2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
... ... @@ -249,6 +435,30 @@
isa = PBXGroup;
children = (
146834041AC3E56700842450 /* libReact.a */,
3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
isa = PBXGroup;
children = (
2D16E6891FA4F8E400B85C8A /* libReact.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
5E91572E1DD0AC6500FF2AA8 /* Products */ = {
isa = PBXGroup;
children = (
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */,
);
name = Products;
sourceTree = "<group>";
... ... @@ -266,6 +476,7 @@
children = (
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */,
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
... ... @@ -293,10 +504,12 @@
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* YH_RNComponentTests */,
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
usesTabs = 0;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;
... ... @@ -307,6 +520,15 @@
name = Products;
sourceTree = "<group>";
};
ADBDB9201DFEBF0600ED6528 /* Products */ = {
isa = PBXGroup;
children = (
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
... ... @@ -378,6 +600,14 @@
ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
},
{
ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
},
{
ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */;
ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
},
{
ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
},
... ... @@ -479,6 +709,132 @@
remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTBlob-tvOS.a";
remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libfishhook.a;
remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libfishhook-tvOS.a";
remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTImage-tvOS.a";
remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTLinking-tvOS.a";
remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTNetwork-tvOS.a";
remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTSettings-tvOS.a";
remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTText-tvOS.a";
remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTWebSocket-tvOS.a";
remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libReact-tvOS.a";
remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libyoga.a;
remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libyoga.a;
remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libcxxreact.a;
remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libcxxreact.a;
remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjschelpers.a;
remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjschelpers.a;
remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTAnimation.a;
remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTAnimation.a;
remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
... ... @@ -493,6 +849,13 @@
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTBlob.a;
remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
... ... @@ -527,8 +890,21 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
showEnvVarsInLog = 1;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Bundle React Native Code And Images";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
/* End PBXShellScriptBuildPhase section */
... ...
... ... @@ -17,31 +17,7 @@
{
NSURL *jsCodeLocation;
/**
* Loading JavaScript code - uncomment the one you want.
*
* OPTION 1
* Load from development server. Start the server from the repository root:
*
* $ npm start
*
* To run on device, change `localhost` to the IP address of your computer
* (you can get this by typing `ifconfig` into the terminal and selecting the
* `inet` value under `en0:`) and make sure your computer and iOS device are
* on the same Wi-Fi network.
*/
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
/**
* OPTION 2
* Load from pre-bundled file on disk. The static bundle is automatically
* generated by the "Bundle React Native code and images" build step when
* running the project on an actual device or running the project on the
* simulator in the "Release" build configuration.
*/
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"YH_Community"
... ...
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
... ...
... ... @@ -8,6 +8,7 @@ import ReactNative, {
Dimensions,
TouchableOpacity,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -38,7 +39,7 @@ function getInitialState() {
export default function native(platform) {
let YH_AssociatorGift = React.createClass({
let YH_AssociatorGift = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative, {
AppRegistry,
Platform,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -46,7 +47,7 @@ function getInitialState() {
export default function native(platform) {
let YH_BLK = React.createClass({
let YH_BLK = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -8,6 +8,7 @@ import ReactNative, {
Dimensions,
TouchableOpacity,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -43,7 +44,7 @@ function getInitialState() {
export default function native(platform) {
let YH_BrandStore = React.createClass({
let YH_BrandStore = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
... ... @@ -27,7 +27,7 @@ import ProductCategoryList from '../brandStore/brandStoreSubView/Cells/ProductCa
import LoadingIndicator from '../../../common/components/LoadingIndicator';
import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
import BrandProductListCell from '../../../common/components/ListCell/ProductListCell';
import Toast from 'react-native-smart-toast'
import Toast from '../../../common/components/Toast';
export default class BrandStore extends Component {
constructor(props) {
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -9,6 +9,7 @@ import ReactNative, {
TouchableOpacity,
View,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -62,7 +63,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Classify = React.createClass({
let YH_Classify = createReactClass({
_renderContainer() {
if (this.props.type == 0) {
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -3,9 +3,9 @@
import React from 'react';
import ReactNative from 'react-native';
import ImagesAsGif from '../components/ImagesAsGif';
import PropTypes from 'prop-types';
const {
PropTypes,
isValidElement,
createElement,
} = React;
... ...
var React = require('react')
var ReactNative = require('react-native')
var {
PropTypes,
} = React;
var PropTypes = require('prop-types');
var {
StyleSheet,
... ... @@ -13,6 +12,7 @@ var {
var ListView = require('./ListView')
var createElementFrom = require('./createElementFrom')
var RefreshingIndicator = require('./RefreshingIndicator')
var createReactClass = require('create-react-class');
const SCROLL_EVENT_THROTTLE = 32
const MIN_PULLDOWN_DISTANCE = 40
... ... @@ -30,7 +30,7 @@ const LISTVIEW_REF = 'listview'
* {isRefreshing: false}
*/
var ControlledRefreshableListView = React.createClass({
var ControlledRefreshableListView = createReactClass({
propTypes: {
colors: PropTypes.array,
progressBackgroundColor: PropTypes.string,
... ...
var React = require('react')
var ReactNative = require('react-native')
var {
PropTypes,
} = React;
var PropTypes = require('prop-types');
var {
StyleSheet,
... ... @@ -10,6 +8,7 @@ var {
Platform,
PullToRefreshViewAndroid,
} = ReactNative
import createReactClass from 'create-react-class';
var isPromise = require('is-promise')
var delay = require('./delay')
var RefreshingIndicator = require('./RefreshingIndicator')
... ... @@ -17,7 +16,7 @@ var ControlledRefreshableListView = require('./ControlledRefreshableListView')
const LISTVIEW_REF = 'listview'
var RefreshableListView = React.createClass({
var RefreshableListView = createReactClass({
propTypes: {
loadData: PropTypes.func.isRequired,
minDisplayTime: PropTypes.number,
... ...
var React = require('react')
var ReactNative = require('react-native')
var {
PropTypes,
isValidElement,
createElement,
} = React;
var PropTypes = require('prop-types');
var createReactClass = require('create-react-class');
var {
View,
... ... @@ -13,7 +14,7 @@ var {
StyleSheet,
} = ReactNative
var RefreshingIndicator = React.createClass({
var RefreshingIndicator = createReactClass({
propTypes: {
activityIndicatorComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
stylesheet: PropTypes.object,
... ...
... ... @@ -6,6 +6,7 @@ import YH_Swiper from './YH_Swiper';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from './SlicedImage';
import Platform from 'react-native';
import PropTypes from 'prop-types';
const {
View,
Image,
... ... @@ -19,14 +20,14 @@ export default class Banner extends React.Component {
static propTypes = {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
duration: React.PropTypes.number,
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
onPress: React.PropTypes.func,
duration: PropTypes.number,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
onPress: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -2,10 +2,11 @@
var React = require('react');
var ReactNative = require('react-native');
var createReactClass = require('create-react-class');
var {
PropTypes,
} = React;
import PropTypes from 'prop-types';
var {
Image,
... ... @@ -13,7 +14,7 @@ var {
var TimerMixin = require('react-timer-mixin');
module.exports = React.createClass({
module.exports = createReactClass({
propTypes: {
images: PropTypes.array.isRequired,
... ...
... ... @@ -9,13 +9,14 @@ import {
ActivityIndicator,
Platform,
} from 'react-native';
import PropTypes from 'prop-types';
export default class LoadMoreIndicator extends Component {
static propTypes = {
isVisible: React.PropTypes.bool.isRequired,
animating: React.PropTypes.bool,
text: React.PropTypes.string,
isVisible: PropTypes.bool.isRequired,
animating: PropTypes.bool,
text: PropTypes.string,
};
static defaultProps = {
... ...
... ... @@ -9,19 +9,20 @@ import {
ActivityIndicator,
Platform,
} from 'react-native';
import PropTypes from 'prop-types';
export default class LoadingIndicator extends Component {
static propTypes = {
isVisible: React.PropTypes.bool.isRequired,
size: React.PropTypes.string,
color: React.PropTypes.string,
overlayWidth: React.PropTypes.number,
overlayHeight: React.PropTypes.number,
overlayColor: React.PropTypes.string,
text: React.PropTypes.string,
textColor: React.PropTypes.string,
textFontSize: React.PropTypes.number,
isVisible: PropTypes.bool.isRequired,
size: PropTypes.string,
color: PropTypes.string,
overlayWidth: PropTypes.number,
overlayHeight: PropTypes.number,
overlayColor: PropTypes.string,
text: PropTypes.string,
textColor: PropTypes.string,
textFontSize: PropTypes.number,
};
static defaultProps = {
... ...
... ... @@ -12,6 +12,7 @@ import {
} from 'react-native';
import TimerMixin from 'react-timer-mixin';
import PropTypes from 'prop-types';
const initOpacity = 0.8;
... ... @@ -20,15 +21,15 @@ export default class Prompt extends Component {
static propTypes = {
icon: Image.propTypes.source,
overlayColor: React.PropTypes.string,
title: React.PropTypes.string,
titleColor: React.PropTypes.string,
titleFontSize: React.PropTypes.number,
text: React.PropTypes.string,
textColor: React.PropTypes.string,
textFontSize: React.PropTypes.number,
duration: React.PropTypes.number,
onPromptHidden: React.PropTypes.func,
overlayColor: PropTypes.string,
title: PropTypes.string,
titleColor: PropTypes.string,
titleFontSize: PropTypes.number,
text: PropTypes.string,
textColor: PropTypes.string,
textFontSize: PropTypes.number,
duration: PropTypes.number,
onPromptHidden: PropTypes.func,
};
static defaultProps = {
... ...
... ... @@ -11,19 +11,20 @@ import {
} from 'react-native';
import TimerMixin from 'react-timer-mixin';
import PropTypes from 'prop-types';
export default class Toast extends Component {
static propTypes = {
isVisible: React.PropTypes.bool.isRequired,
size: React.PropTypes.string,
color: React.PropTypes.string,
overlayWidth: React.PropTypes.number,
overlayHeight: React.PropTypes.number,
overlayColor: React.PropTypes.string,
text: React.PropTypes.string,
textColor: React.PropTypes.string,
textFontSize: React.PropTypes.number,
isVisible: PropTypes.bool.isRequired,
size: PropTypes.string,
color: PropTypes.string,
overlayWidth: PropTypes.number,
overlayHeight: PropTypes.number,
overlayColor: PropTypes.string,
text: PropTypes.string,
textColor: PropTypes.string,
textFontSize: PropTypes.number,
};
static defaultProps = {
... ...
... ... @@ -3,9 +3,9 @@ import ReactNative from 'react-native';
import {Platform} from 'react-native';
const {
PropTypes,
Component,
} = React;
import PropTypes from 'prop-types';
const {
NativeModules,
... ...
... ... @@ -7,6 +7,7 @@
*/
import React from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
let {
requireNativeComponent,
... ... @@ -42,14 +43,14 @@ export default class YH_ViewPager extends React.Component {
static propTypes = {
...View.propTypes,
initialPage: React.PropTypes.number,
onPageSelected: React.PropTypes.func,
pageMargin: React.PropTypes.number,
keyboardDismissMode: React.PropTypes.oneOf([
initialPage: PropTypes.number,
onPageSelected: PropTypes.func,
pageMargin: PropTypes.number,
keyboardDismissMode: PropTypes.oneOf([
'none', // default
'on-drag',
]),
scrollEnabled: React.PropTypes.bool,
scrollEnabled: PropTypes.bool,
};
constructor(props) {
... ...
... ... @@ -109,7 +109,7 @@ var TouchableHighlight = React.createClass({
*/
tvParallaxProperties: PropTypes.object,
yh_exposureData: React.PropTypes.object,
yh_exposureData: PropTypes.object,
},
... ...
... ... @@ -67,7 +67,7 @@ var TouchableOpacity = React.createClass({
*/
tvParallaxProperties: PropTypes.object,
yh_exposureData: React.PropTypes.object,
yh_exposureData: PropTypes.object,
},
getDefaultProps: function() {
... ...
... ... @@ -10,6 +10,7 @@
* @flow
*/
'use strict';
import PropTypes from 'prop-types';
const ColorPropType = require('ColorPropType');
const EdgeInsetsPropType = require('EdgeInsetsPropType');
... ... @@ -28,7 +29,6 @@ const dismissKeyboard = require('dismissKeyboard');
const flattenStyle = require('flattenStyle');
const invariant = require('fbjs/lib/invariant');
const processDecelerationRate = require('processDecelerationRate');
const PropTypes = React.PropTypes;
const requireNativeComponent = require('requireNativeComponent');
/**
... ...
import PropTypes from 'prop-types';
const React = require('react');
const ReactNative = require('react-native');
import createReactClass from 'create-react-class';
const {
StyleSheet,
Text,
... ... @@ -8,19 +10,19 @@ const {
} = ReactNative;
const Button = require('./Button');
const DefaultTabBar = React.createClass({
const DefaultTabBar = createReactClass({
propTypes: {
goToPage: React.PropTypes.func,
activeTab: React.PropTypes.number,
tabs: React.PropTypes.array,
underlineColor: React.PropTypes.string,
underlineHeight: React.PropTypes.number,
backgroundColor: React.PropTypes.string,
activeTextColor: React.PropTypes.string,
inactiveTextColor: React.PropTypes.string,
goToPage: PropTypes.func,
activeTab: PropTypes.number,
tabs: PropTypes.array,
underlineColor: PropTypes.string,
underlineHeight: PropTypes.number,
backgroundColor: PropTypes.string,
activeTextColor: PropTypes.string,
inactiveTextColor: PropTypes.string,
textStyle: Text.propTypes.style,
tabStyle: View.propTypes.style,
renderTabName: React.PropTypes.func,
renderTabName: PropTypes.func,
},
getDefaultProps() {
... ...
import PropTypes from 'prop-types';
const React = require('react');
const ReactNative = require('react-native');
import createReactClass from 'create-react-class';
const {
View,
Animated,
... ... @@ -13,22 +15,22 @@ const Button = require('./Button');
const WINDOW_WIDTH = Dimensions.get('window').width;
const ScrollableTabBar = React.createClass({
const ScrollableTabBar = createReactClass({
propTypes: {
goToPage: React.PropTypes.func,
activeTab: React.PropTypes.number,
tabs: React.PropTypes.array,
underlineColor: React.PropTypes.string,
underlineHeight: React.PropTypes.number,
backgroundColor: React.PropTypes.string,
activeTextColor: React.PropTypes.string,
inactiveTextColor: React.PropTypes.string,
scrollOffset: React.PropTypes.number,
goToPage: PropTypes.func,
activeTab: PropTypes.number,
tabs: PropTypes.array,
underlineColor: PropTypes.string,
underlineHeight: PropTypes.number,
backgroundColor: PropTypes.string,
activeTextColor: PropTypes.string,
inactiveTextColor: PropTypes.string,
scrollOffset: PropTypes.number,
style: View.propTypes.style,
tabStyle: View.propTypes.style,
tabsContainerStyle: View.propTypes.style,
textStyle: Text.propTypes.style,
renderTabName: React.PropTypes.func,
renderTabName: PropTypes.func,
},
getDefaultProps() {
... ...
const React = require('react');
const {
PropTypes,
Component,
} = React;
import PropTypes from 'prop-types';
const ReactNative = require('react-native');
const {
Dimensions,
... ... @@ -15,13 +15,14 @@ const {
InteractionManager,
} = ReactNative;
const TimerMixin = require('react-timer-mixin');
import createReactClass from 'create-react-class';
const SceneComponent = require('./SceneComponent');
const DefaultTabBar = require('./DefaultTabBar');
const ScrollableTabBar = require('./ScrollableTabBar');
const ScrollableTabView = React.createClass({
const ScrollableTabView = createReactClass({
mixins: [TimerMixin, ],
statics: {
DefaultTabBar,
... ...
... ... @@ -2,7 +2,8 @@
* react-native-swiper
* @author leecade<leecade@163.com>
*/
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types';
import {
Text,
View,
... ...
... ... @@ -26,6 +26,7 @@ import RNRF, {
TabBar,
Actions
} from 'react-native-router-flux';
import createReactClass from 'create-react-class';
import configureStore from './store/configureStore';
... ... @@ -104,7 +105,7 @@ function getInitialState() {
export default function community(platform) {
let YH_Community = React.createClass({
let YH_Community = createReactClass({
contanerIsYohoBuy() {
return parseInt(this.props.container) === 1;
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative from 'react-native';
import YH_Swiper from '../../../common/components/YH_Swiper';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -19,14 +20,14 @@ export default class Banner extends React.Component {
static propTypes = {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
duration: React.PropTypes.number,
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
onPress: React.PropTypes.func,
duration: PropTypes.number,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
onPress: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -11,6 +11,7 @@ import UploadProgress from './UploadProgress';
import SuperMan from './SuperMan';
import LoadingIndicator from '../../../common/components/LoadingIndicator';
import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
import PropTypes from 'prop-types';
const {
... ... @@ -36,26 +37,26 @@ export default class Home extends React.Component {
progressing: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
uploadState:React.PropTypes.number.isRequired,
progress:React.PropTypes.number,
image:React.PropTypes.string,
onPressRetry:React.PropTypes.func,
onPressDelete:React.PropTypes.func,
uploadState: PropTypes.number.isRequired,
progress: PropTypes.number,
image: PropTypes.string,
onPressRetry: PropTypes.func,
onPressDelete: PropTypes.func,
}),
),
banner: ImmutablePropTypes.listOf(
ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string,
src: PropTypes.string.isRequired,
url: PropTypes.string,
}),
),
),
notice: ImmutablePropTypes.listOf(
ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
title: React.PropTypes.string.isRequired,
url: React.PropTypes.string,
title: PropTypes.string.isRequired,
url: PropTypes.string,
}),
),
),
... ... @@ -63,27 +64,27 @@ export default class Home extends React.Component {
ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
header: ImmutablePropTypes.contains({
id: React.PropTypes.number.isRequired,
logo: React.PropTypes.string.isRequired,
title: React.PropTypes.string.isRequired,
post: React.PropTypes.string.isRequired,
comment: React.PropTypes.string.isRequired,
like: React.PropTypes.string.isRequired,
id: PropTypes.number.isRequired,
logo: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
post: PropTypes.string.isRequired,
comment: PropTypes.string.isRequired,
like: PropTypes.string.isRequired,
}),
hot: ImmutablePropTypes.contains({
postId: React.PropTypes.number,
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
postId: PropTypes.number,
avatar: PropTypes.string,
title: PropTypes.string,
content: PropTypes.string.isRequired,
}),
new: ImmutablePropTypes.contains({
postId: React.PropTypes.number,
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
postId: PropTypes.number,
avatar: PropTypes.string,
title: PropTypes.string,
content: PropTypes.string.isRequired,
}),
num: ImmutablePropTypes.contains({
onedayAddNum: React.PropTypes.number.isRequired,
onedayAddNum: PropTypes.number.isRequired,
}),
})
),
... ... @@ -91,50 +92,50 @@ export default class Home extends React.Component {
recommendation: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
}),
),
user: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
msgCount: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
msgCount: PropTypes.string,
}),
bannerDuration: React.PropTypes.number,
noticeOpen: React.PropTypes.oneOf(['Y', 'N']),
noticeDuration: React.PropTypes.number,
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSectionTag: React.PropTypes.func,
onPressComment: React.PropTypes.func,
onPressLike: React.PropTypes.func,
onRefresh: React.PropTypes.func,
onEndReached: React.PropTypes.func,
onUploadRetry: React.PropTypes.func,
onUploadSuccess: React.PropTypes.func,
onUploadDelete: React.PropTypes.func,
onSaveingTheWorld: React.PropTypes.func,
bannerDuration: PropTypes.number,
noticeOpen: PropTypes.oneOf(['Y', 'N']),
noticeDuration: PropTypes.number,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSectionTag: PropTypes.func,
onPressComment: PropTypes.func,
onPressLike: PropTypes.func,
onRefresh: PropTypes.func,
onEndReached: PropTypes.func,
onUploadRetry: PropTypes.func,
onUploadSuccess: PropTypes.func,
onUploadDelete: PropTypes.func,
onSaveingTheWorld: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -8,6 +8,7 @@ import Thumbs from './Thumbs';
import SectionItem from './SectionItem';
import NumberButton from './NumberButton';
import emojiDecter from '../../utils/emojiDecter';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -23,35 +24,35 @@ export default class ListCell extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
}),
hideSection: React.PropTypes.bool,
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSectionTag: React.PropTypes.func,
onPressComment: React.PropTypes.func,
onPressLike: React.PropTypes.func,
hideSection: PropTypes.bool,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSectionTag: PropTypes.func,
onPressComment: PropTypes.func,
onPressLike: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import YH_Swiper from '../../../common/components/YH_Swiper';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -18,14 +19,14 @@ export default class Notice extends React.Component {
static propTypes = {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
title: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
duration: React.PropTypes.number,
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
onPress: React.PropTypes.func,
duration: PropTypes.number,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
onPress: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -2,6 +2,7 @@
import React from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -16,8 +17,8 @@ export default class NumberButton extends React.Component {
static propTypes = {
source: Image.propTypes.source.isRequired,
number: React.PropTypes.number.isRequired,
onPressButton: React.PropTypes.func,
number: PropTypes.number.isRequired,
onPressButton: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -2,6 +2,7 @@
import React from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -15,8 +16,8 @@ const {
export default class SectionItem extends React.Component {
static propTypes = {
name: React.PropTypes.string.isRequired,
onPressSection: React.PropTypes.func,
name: PropTypes.string.isRequired,
onPressSection: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -17,10 +18,10 @@ const {
export default class SuperMan extends React.Component {
static propTypes = {
uid: React.PropTypes.number,
avatar: React.PropTypes.string,
msgCount: React.PropTypes.string,
onSaveingTheWorld: React.PropTypes.func,
uid: PropTypes.number,
avatar: PropTypes.string,
msgCount: PropTypes.string,
onSaveingTheWorld: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -3,6 +3,7 @@
import React from 'react';
import ReactNative from 'react-native';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -20,9 +21,9 @@ let marginLeft = Math.ceil(width - 34 - thumbHeight * 3) / 2;
export default class Thumbs extends React.Component {
static propTypes = {
data: React.PropTypes.arrayOf(
React.PropTypes.shape({
src: React.PropTypes.string,
data: PropTypes.arrayOf(
PropTypes.shape({
src: PropTypes.string,
})
),
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import * as Progress from 'react-native-progress';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -19,12 +20,12 @@ const {
export default class UploadProgress extends React.Component {
static propTypes = {
uploadState:React.PropTypes.number,
progress:React.PropTypes.number,
image:React.PropTypes.string,
onPressRetry:React.PropTypes.func,
onPressDelete:React.PropTypes.func,
uploadSuccess:React.PropTypes.func,
uploadState: PropTypes.number,
progress: PropTypes.number,
image: PropTypes.string,
onPressRetry: PropTypes.func,
onPressDelete: PropTypes.func,
uploadSuccess: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -18,11 +19,11 @@ export default class UserBrief extends React.Component {
static propTypes = {
containerStyle: View.propTypes.style,
avatar: React.PropTypes.string,
name: React.PropTypes.string,
timeago: React.PropTypes.string,
isOwner: React.PropTypes.bool,
onPressAvatar: React.PropTypes.func,
avatar: PropTypes.string,
name: PropTypes.string,
timeago: PropTypes.string,
isOwner: PropTypes.bool,
onPressAvatar: PropTypes.func,
};
constructor(props) {
... ...
import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
let {
requireNativeComponent
... ... @@ -31,32 +32,32 @@ class SectionView extends React.Component {
}
SectionView.propTypes = {
items: React.PropTypes.arrayOf(
React.PropTypes.shape({
header: React.PropTypes.shape({
id: React.PropTypes.number.isRequired,
logo: React.PropTypes.string.isRequired,
title: React.PropTypes.string.isRequired,
post: React.PropTypes.string.isRequired,
comment: React.PropTypes.string.isRequired,
like: React.PropTypes.string.isRequired,
items: PropTypes.arrayOf(
PropTypes.shape({
header: PropTypes.shape({
id: PropTypes.number.isRequired,
logo: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
post: PropTypes.string.isRequired,
comment: PropTypes.string.isRequired,
like: PropTypes.string.isRequired,
}),
hot: React.PropTypes.shape({
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
hot: PropTypes.shape({
avatar: PropTypes.string,
title: PropTypes.string,
content: PropTypes.string.isRequired,
}),
new: React.PropTypes.shape({
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
new: PropTypes.shape({
avatar: PropTypes.string,
title: PropTypes.string,
content: PropTypes.string.isRequired,
}),
num: React.PropTypes.shape({
onedayAddNum: React.PropTypes.number.isRequired,
num: PropTypes.shape({
onedayAddNum: PropTypes.number.isRequired,
}),
})
),
onClick: React.PropTypes.func,
onClick: PropTypes.func,
};
let YH_SectionView = requireNativeComponent('YH_SectionView', SectionView);
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import UserBrief from '../home/UserBrief';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -20,20 +21,20 @@ export default class LikeCell extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
user: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
nickName: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
nickName: PropTypes.string,
}),
timeago: React.PropTypes.string,
title: React.PropTypes.string,
timeago: PropTypes.string,
title: PropTypes.string,
post: ImmutablePropTypes.contains({
id: React.PropTypes.number,
thumb: React.PropTypes.string,
sectionId: React.PropTypes.number,
id: PropTypes.number,
thumb: PropTypes.string,
sectionId: PropTypes.number,
}),
}),
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -17,10 +18,10 @@ const {
export default class MessageIcon extends React.Component {
static propTypes = {
isRedDot: React.PropTypes.bool,
isRedDot: PropTypes.bool,
defaultSource: Image.propTypes.source,
image: React.PropTypes.string,
iconTap: React.PropTypes.func,
image: PropTypes.string,
iconTap: PropTypes.func,
}
constructor(props) {
... ...
... ... @@ -7,6 +7,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import MsgCenterCatgoryCell from './MsgCenterCatgoryCell'
import MsgCenterNormalCell from './MsgCenterNormalCell'
import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -24,41 +25,41 @@ export default class MessageCenter extends React.Component {
static propTypes = {
sysMsg: ImmutablePropTypes.contains({
timeagoStr:React.PropTypes.string,
tips:React.PropTypes.string,
isRead: React.PropTypes.bool,
timeagoStr: PropTypes.string,
tips: PropTypes.string,
isRead: PropTypes.bool,
}),
likeMsg: ImmutablePropTypes.contains({
timeagoStr:React.PropTypes.string,
tips:React.PropTypes.string,
isRead: React.PropTypes.bool,
timeagoStr: PropTypes.string,
tips: PropTypes.string,
isRead: PropTypes.bool,
}),
list: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago:React.PropTypes.string,
title:React.PropTypes.string,
reply:React.PropTypes.string,
timeago: PropTypes.string,
title: PropTypes.string,
reply: PropTypes.string,
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
}),
),
onPressSystemMsg: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSection: React.PropTypes.func,
onRefresh: React.PropTypes.func,
onPressSystemCell: React.PropTypes.func,
onPressLikeCell: React.PropTypes.func,
onPressPost: React.PropTypes.func,
onPressSystemMsg: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSection: PropTypes.func,
onRefresh: PropTypes.func,
onPressSystemCell: PropTypes.func,
onPressLikeCell: PropTypes.func,
onPressPost: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LittleRedDotImage from './LittleRedDotImage';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -18,12 +19,12 @@ export default class MsgCenterCatgoryCell extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
timeagoStr:React.PropTypes.string,
tips:React.PropTypes.string,
isRead: React.PropTypes.bool,
timeagoStr: PropTypes.string,
tips: PropTypes.string,
isRead: PropTypes.bool,
}),
onPressCell: React.PropTypes.func,
onPressCell: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LittleRedDotImage from './LittleRedDotImage';
import SectionItem from '../home/SectionItem';
import PropTypes from 'prop-types';
const {
View,
Text,
... ... @@ -19,23 +20,23 @@ export default class MsgCenterNormalCell extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
user: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
nickName: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
nickName: PropTypes.string,
}),
title:React.PropTypes.string,
subTitle:React.PropTypes.string,
timeago:React.PropTypes.string,
isRead: React.PropTypes.bool,
title: PropTypes.string,
subTitle: PropTypes.string,
timeago: PropTypes.string,
isRead: PropTypes.bool,
post:ImmutablePropTypes.contains({
sectionId: React.PropTypes.number,
sectionName: React.PropTypes.string,
sectionId: PropTypes.number,
sectionName: PropTypes.string,
}),
}),
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSection: React.PropTypes.func,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSection: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SectionItem from '../home/SectionItem';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -19,23 +20,23 @@ export default class SysMsgCell extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
user: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
nickName: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
nickName: PropTypes.string,
}),
title:React.PropTypes.string,
subTitle:React.PropTypes.string,
timeago:React.PropTypes.string,
isRead: React.PropTypes.bool,
title: PropTypes.string,
subTitle: PropTypes.string,
timeago: PropTypes.string,
isRead: PropTypes.bool,
post:ImmutablePropTypes.contains({
sectionId: React.PropTypes.number,
sectionName: React.PropTypes.string,
sectionId: PropTypes.number,
sectionName: PropTypes.string,
}),
}),
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSection: React.PropTypes.func,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSection: PropTypes.func,
};
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SysMsgCell from './SysMsgCell';
import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
import PropTypes from 'prop-types';
... ... @@ -27,23 +28,23 @@ export default class SystemMessage extends React.Component {
list: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago:React.PropTypes.string,
title:React.PropTypes.string,
reply:React.PropTypes.string,
timeago: PropTypes.string,
title: PropTypes.string,
reply: PropTypes.string,
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
}),
),
onPressSection: React.PropTypes.func,
onRefresh: React.PropTypes.func,
onEndReached: React.PropTypes.func,
onPressSection: PropTypes.func,
onRefresh: PropTypes.func,
onEndReached: PropTypes.func,
}
constructor(props) {
... ...
... ... @@ -16,15 +16,16 @@ import {
NativeModules,
NativeAppEventEmitter,
} from 'react-native';
import PropTypes from 'prop-types';
let YH_CommunityAssetsPicker = NativeModules.YH_CommunityAssetsPicker;
export default class AssertsPicker extends Component {
static propTypes = {
assets: React.PropTypes.array,
hidden: React.PropTypes.bool,
onSelectedAsset: React.PropTypes.func,
assets: PropTypes.array,
hidden: PropTypes.bool,
onSelectedAsset: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -10,15 +10,16 @@ import {
Dimensions,
StyleSheet,
} from 'react-native';
import PropTypes from 'prop-types';
export default class PostingToolBar extends Component {
static propTypes = {
imageCount: React.PropTypes.number,
selectedSectionName: React.PropTypes.string,
onPressImage: React.PropTypes.func,
onPressTrigger: React.PropTypes.func,
onPressSection: React.PropTypes.func,
imageCount: PropTypes.number,
selectedSectionName: PropTypes.string,
onPressImage: PropTypes.func,
onPressTrigger: PropTypes.func,
onPressSection: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -9,19 +9,20 @@ import {
Dimensions,
StyleSheet,
} from 'react-native';
import PropTypes from 'prop-types';
export default class SectionSelector extends Component {
static propTypes = {
sections: React.PropTypes.arrayOf(
React.PropTypes.shape({
forumCode: React.PropTypes.number.isRequired,
forumName: React.PropTypes.string.isRequired,
sections: PropTypes.arrayOf(
PropTypes.shape({
forumCode: PropTypes.number.isRequired,
forumName: PropTypes.string.isRequired,
}),
),
selectedSectionName: React.PropTypes.string.isRequired,
hidden: React.PropTypes.bool,
onPressSection: React.PropTypes.func,
selectedSectionName: PropTypes.string.isRequired,
hidden: PropTypes.bool,
onPressSection: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -12,6 +12,7 @@ import LoadingIndicator from '../../../common/components/LoadingIndicator';
import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
import UploadProgress from '../home/UploadProgress';
import SuperMan from '../home/SuperMan';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -36,27 +37,27 @@ export default class Section extends React.Component {
static propTypes = {
progressing: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
uploadState:React.PropTypes.number.isRequired,
progress:React.PropTypes.number,
image:React.PropTypes.string,
onPressRetry:React.PropTypes.func,
onPressDelete:React.PropTypes.func,
uploadState:PropTypes.number.isRequired,
progress:PropTypes.number,
image:PropTypes.string,
onPressRetry:PropTypes.func,
onPressDelete:PropTypes.func,
}),
),
header: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
uri: React.PropTypes.string.isRequired,
title: React.PropTypes.string.isRequired,
post: React.PropTypes.string.isRequired,
comment: React.PropTypes.string.isRequired,
like: React.PropTypes.string.isRequired,
uri: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
post: PropTypes.string.isRequired,
comment: PropTypes.string.isRequired,
like: PropTypes.string.isRequired,
}),
),
notice: ImmutablePropTypes.listOf(
ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
title: React.PropTypes.string.isRequired,
url: React.PropTypes.string,
title: PropTypes.string.isRequired,
url: PropTypes.string,
}),
),
),
... ... @@ -65,68 +66,68 @@ export default class Section extends React.Component {
new: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
})
),
hot: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner:PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
})
),
})
),
onPressNotice: React.PropTypes.func,
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSectionTag: React.PropTypes.func,
onPressComment: React.PropTypes.func,
onPressLike: React.PropTypes.func,
onRefresh: React.PropTypes.func,
onEndReached: React.PropTypes.func,
onSaveingTheWorld: React.PropTypes.func,
onPressNotice: PropTypes.func,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSectionTag: PropTypes.func,
onPressComment: PropTypes.func,
onPressLike: PropTypes.func,
onRefresh: PropTypes.func,
onEndReached: PropTypes.func,
onSaveingTheWorld: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -3,6 +3,7 @@
import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -20,12 +21,12 @@ export default class SectionHeader extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
uri: React.PropTypes.string.isRequired,
title: React.PropTypes.string,
desc: React.PropTypes.string.isRequired,
post: React.PropTypes.string.isRequired,
comment: React.PropTypes.string.isRequired,
like: React.PropTypes.string.isRequired,
uri: PropTypes.string.isRequired,
title: PropTypes.string,
desc: PropTypes.string.isRequired,
post: PropTypes.string.isRequired,
comment: PropTypes.string.isRequired,
like: PropTypes.string.isRequired,
}),
};
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ListCell from '../home/ListCell';
import Immutable, {Map} from 'immutable';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -27,28 +28,28 @@ export default class SectionList extends React.Component {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
}),
),
};
... ...
import React from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
const {
StyleSheet,
... ... @@ -12,15 +13,15 @@ const {
export default class SectionTabBar extends React.Component {
static propTypes = {
containerWidth: React.PropTypes.number,
goToPage: React.PropTypes.func,
activeTab: React.PropTypes.number,
tabs: React.PropTypes.array,
underlineColor: React.PropTypes.string,
underlineHeight: React.PropTypes.number,
backgroundColor: React.PropTypes.string,
activeTextColor: React.PropTypes.string,
inactiveTextColor: React.PropTypes.string,
containerWidth: PropTypes.number,
goToPage: PropTypes.func,
activeTab: PropTypes.number,
tabs: PropTypes.array,
underlineColor: PropTypes.string,
underlineHeight: PropTypes.number,
backgroundColor: PropTypes.string,
activeTextColor: PropTypes.string,
inactiveTextColor: PropTypes.string,
textStyle: Text.propTypes.style,
tabStyle: View.propTypes.style,
};
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -17,15 +18,15 @@ const {
export default class SPLikeCell extends React.Component {
static propTypes = {
users: React.PropTypes.arrayOf(
React.PropTypes.shape({
nickName: React.PropTypes.string,
headIcon: React.PropTypes.string,
uid: React.PropTypes.number,
users: PropTypes.arrayOf(
PropTypes.shape({
nickName: PropTypes.string,
headIcon: PropTypes.string,
uid: PropTypes.number,
})),
like: React.PropTypes.string,
browse: React.PropTypes.string,
onPressLikeCell: React.PropTypes.func,
like: PropTypes.string,
browse: PropTypes.string,
onPressLikeCell: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative from 'react-native';
import ListCell from '../home/ListCell';
import ImmutablePropTypes from 'react-immutable-proptypes';
import EmptyListTip from './EmptyListTip';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -23,30 +24,30 @@ export default class CommunityList extends React.Component {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
}),
),
onPressPost: React.PropTypes.func,
onPressPost: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -6,11 +6,12 @@ import {
View,
Text,
} from 'react-native';
import PropTypes from 'prop-types';
export default class EmptyListTip extends Component {
static propTypes = {
text: React.PropTypes.string,
text: PropTypes.string,
};
static defaultProps = {
... ...
... ... @@ -3,6 +3,7 @@
import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
// import SlicedImage from '../../../common/components/SlicedImage';
const {
... ... @@ -17,8 +18,8 @@ const {
export default class MessageIcon extends React.Component {
static propTypes = {
msgCount: React.PropTypes.string,
iconTap: React.PropTypes.func,
msgCount: PropTypes.string,
iconTap: PropTypes.func,
}
constructor(props) {
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import UserBrief from '../home/UserBrief';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -20,42 +21,42 @@ export default class ReplyCell extends React.Component {
data: ImmutablePropTypes.contains({
self: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
backgroundImage: PropTypes.string,
}),
createTime: React.PropTypes.number,
timeago: React.PropTypes.string,
createTime: PropTypes.number,
timeago: PropTypes.string,
replyToUser: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
backgroundImage: PropTypes.string,
}),
replyContent: ImmutablePropTypes.contains({
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
desc: React.PropTypes.string,
desc: PropTypes.string,
}),
postInfo: ImmutablePropTypes.contains({
type: React.PropTypes.string,
title: React.PropTypes.string,
postId: React.PropTypes.number,
type: PropTypes.string,
title: PropTypes.string,
postId: PropTypes.number,
}),
}),
onPressAvatar: React.PropTypes.func,
onPressReply: React.PropTypes.func,
onPressPost: React.PropTypes.func,
onPressAvatar: PropTypes.func,
onPressReply: PropTypes.func,
onPressPost: PropTypes.func,
};
... ...
... ... @@ -12,6 +12,7 @@ import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
import UserNavBar from './UserNavBar';
import TimerMixin from 'react-timer-mixin';
import EmptyListTip from './EmptyListTip';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -38,11 +39,11 @@ export default class User extends React.Component {
userInfo: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
nickName: React.PropTypes.string.isRequired,
sign: React.PropTypes.string,
msgCount: React.PropTypes.string,
avatar: PropTypes.string,
backgroundImage: PropTypes.string,
nickName: PropTypes.string.isRequired,
sign: PropTypes.string,
msgCount: PropTypes.string,
}),
),
... ... @@ -51,90 +52,90 @@ export default class User extends React.Component {
posts: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
})
),
like: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
})
),
reply: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
self: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
backgroundImage: PropTypes.string,
}),
createTime: React.PropTypes.number,
timeago: React.PropTypes.string,
createTime: PropTypes.number,
timeago: PropTypes.string,
replyToUser: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
backgroundImage: PropTypes.string,
}),
replyContent: ImmutablePropTypes.contains({
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
desc: React.PropTypes.string,
desc: PropTypes.string,
}),
postInfo: ImmutablePropTypes.contains({
type: React.PropTypes.string,
title: React.PropTypes.string,
postId: React.PropTypes.number,
type: PropTypes.string,
title: PropTypes.string,
postId: PropTypes.number,
}),
}),
... ... @@ -144,13 +145,13 @@ export default class User extends React.Component {
})
),
onPressUserAvatar: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressComment: React.PropTypes.func,
onPressLike: React.PropTypes.func,
onPressPost: React.PropTypes.func,
onEndReached: React.PropTypes.func,
onRefresh: React.PropTypes.func,
onPressUserAvatar: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressComment: PropTypes.func,
onPressLike: PropTypes.func,
onPressPost: PropTypes.func,
onEndReached: PropTypes.func,
onRefresh: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -21,13 +22,13 @@ export default class UserCenterTop extends React.Component {
static propTypes = {
userInfo: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
nickName: React.PropTypes.string.isRequired,
sign: React.PropTypes.string,
avatar: PropTypes.string,
backgroundImage: PropTypes.string,
nickName: PropTypes.string.isRequired,
sign: PropTypes.string,
}),
onPressUserAvatar: React.PropTypes.func,
onPressBackgroundImg: React.PropTypes.func,
onPressUserAvatar: PropTypes.func,
onPressBackgroundImg: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -10,6 +10,7 @@ import ListCell from '../home/ListCell';
import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
import UserNavBar from '../user/UserNavBar';
import EmptyListTip from '../user/EmptyListTip';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -31,44 +32,44 @@ export default class UserThatNotMe extends React.Component {
static propTypes = {
user: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
nickName: React.PropTypes.string.isRequired,
sign: React.PropTypes.string,
avatar: PropTypes.string,
backgroundImage: PropTypes.string,
nickName: PropTypes.string.isRequired,
sign: PropTypes.string,
}),
posts: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
}),
),
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSectionTag: React.PropTypes.func,
onPressComment: React.PropTypes.func,
onPressLike: React.PropTypes.func,
onEndReached: React.PropTypes.func,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSectionTag: PropTypes.func,
onPressComment: PropTypes.func,
onPressLike: PropTypes.func,
onEndReached: PropTypes.func,
};
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -8,6 +8,7 @@ import ReactNative, {
Dimensions,
TouchableOpacity,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -42,7 +43,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Coupon = React.createClass({
let YH_Coupon = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
import React, {Component} from 'react';
import ReactNative from 'react-native';
let { requireNativeComponent } = ReactNative;
// requireNativeComponent automatically resolves this to "YH_BannerViewManager"
module.exports = requireNativeComponent('YH_BannerView', null);
class BannerView extends React.Component {
constructor(props) {
super(props);
this._onSelectBanner = this._onSelectBanner.bind(this);
}
_onSelectBanner(event: Event) {
if (!this.props.onSelectBanner) {
return;
}
this.props.onSelectBanner(event.nativeEvent.url);
}
render() {
return <YH_BannerView {...this.props} onPress={this._onSelectBanner} />;
}
}
BannerView.propTypes = {
autoLooping: React.PropTypes.bool,
items: React.PropTypes.arrayOf(
React.PropTypes.shape({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
})
),
onSelectBanner: React.PropTypes.func,
};
let YH_BannerView = requireNativeComponent('YH_BannerView', BannerView);
module.exports = BannerView;
... ... @@ -8,6 +8,7 @@ import {
TouchableWithoutFeedback,
StyleSheet,
} from 'react-native';
import PropTypes from 'prop-types';
export default class Button extends Component {
... ... @@ -91,13 +92,13 @@ export default class Button extends Component {
};
Button.propTypes = {
title: React.PropTypes.string,
selected: React.PropTypes.bool,
onPress: React.PropTypes.func,
selectedTitleStyle: React.PropTypes.any,
normalTitleStyle: React.PropTypes.any,
helightedTitleStyle: React.PropTypes.any,
containerStyle: React.PropTypes.any,
title: PropTypes.string,
selected: PropTypes.bool,
onPress: PropTypes.func,
selectedTitleStyle: PropTypes.any,
normalTitleStyle: PropTypes.any,
helightedTitleStyle: PropTypes.any,
containerStyle: PropTypes.any,
};
let styles = StyleSheet.create({
... ...
... ... @@ -12,6 +12,7 @@ import {
} from 'react-native';
import TimerMixin from 'react-timer-mixin';
import PropTypes from 'prop-types';
const initOpacity = 0.8;
... ... @@ -20,15 +21,15 @@ export default class Prompt extends Component {
static propTypes = {
icon: Image.propTypes.source,
overlayColor: React.PropTypes.string,
title: React.PropTypes.string,
titleColor: React.PropTypes.string,
titleFontSize: React.PropTypes.number,
text: React.PropTypes.string,
textColor: React.PropTypes.string,
textFontSize: React.PropTypes.number,
duration: React.PropTypes.number,
onPromptHidden: React.PropTypes.func,
overlayColor: PropTypes.string,
title: PropTypes.string,
titleColor: PropTypes.string,
titleFontSize: PropTypes.number,
text: PropTypes.string,
textColor: PropTypes.string,
textFontSize: PropTypes.number,
duration: PropTypes.number,
onPromptHidden: PropTypes.func,
};
static defaultProps = {
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative, {
AppRegistry,
Platform,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -25,7 +26,6 @@ import {
setServiceHost,
} from './reducers/app/appActions';
function getInitialState() {
const _initState = {
app: (new appInitialState()),
... ... @@ -36,7 +36,7 @@ function getInitialState() {
export default function native(platform) {
let YH_GlobalHome = React.createClass({
let YH_GlobalHome = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -10,6 +10,7 @@ import {
Provider,
connect
} from 'react-redux';
import createReactClass from 'create-react-class';
import configureStore from './store/configureStore';
import {Record, List, Map} from 'immutable';
... ... @@ -45,7 +46,7 @@ function getInitialState() {
export default function native(platform) {
let YH_GoodGoodsRecommend = React.createClass({
let YH_GoodGoodsRecommend = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
let {
requireNativeComponent,
View
} = ReactNative;
module.exports = requireNativeComponent('YH_GoodGoodsImagesView', null);
class GoodGoodsImagesView extends React.Component {
constructor(props) {
... ... @@ -30,8 +29,8 @@ class GoodGoodsImagesView extends React.Component {
}
GoodGoodsImagesView.propTypes = {
items: React.PropTypes.arrayOf(
React.PropTypes.string
items: PropTypes.arrayOf(
PropTypes.string
),
...View.propTypes // 包含默认的View的属性
};
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative, {
AppRegistry,
Platform,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -49,7 +50,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Guang = React.createClass({
let YH_Guang = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative, {
AppRegistry,
Platform,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -41,7 +42,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Home = React.createClass({
let YH_Home = createReactClass({
render() {
let channel = this.props.channelId;
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -12,6 +12,7 @@ import {
Provider,
connect
} from 'react-redux';
import createReactClass from 'create-react-class';
import configureStore from './store/configureStore';
import {Record, List, Map} from 'immutable';
... ... @@ -85,7 +86,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Installment = React.createClass({
let YH_Installment = createReactClass({
render() {
let type = this.props.type;
const store = configureStore(getInitialState());
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -10,6 +10,7 @@ import {
Provider,
connect
} from 'react-redux';
import createReactClass from 'create-react-class';
import configureStore from './store/configureStore';
import {Record, List, Map} from 'immutable';
... ... @@ -44,7 +45,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Message = React.createClass({
let YH_Message = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -8,6 +8,7 @@ import ReactNative, {
Dimensions,
TouchableOpacity,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
connect
... ... @@ -45,7 +46,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Mine = React.createClass({
let YH_Mine = createReactClass({
render() {
const store = configureStore(getInitialState());
store.dispatch(setPlatform(platform));
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -9,6 +9,7 @@ import ReactNative, {
TouchableOpacity,
View,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -39,7 +40,7 @@ function getInitialState() {
export default function native(platform) {
let YH_MineGuang = React.createClass({
let YH_MineGuang = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative, {
AppRegistry,
Platform,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -47,7 +48,7 @@ function getInitialState() {
export default function native(platform) {
let YH_MyAssets = React.createClass({
let YH_MyAssets = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative, {
AppRegistry,
Platform,
} from 'react-native';
import createReactClass from 'create-react-class';
import {
Provider,
... ... @@ -38,7 +39,7 @@ function getInitialState() {
export default function native(platform) {
let YH_NewArrival = React.createClass({
let YH_NewArrival = createReactClass({
render() {
let type = this.props.type;
... ...
... ... @@ -5,6 +5,7 @@ import ReactNative from 'react-native';
import YH_Swiper from '../../../common/components/YH_Swiper';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
... ... @@ -19,10 +20,10 @@ const {
export default class Banner extends React.Component {
static propTypes = {
duration: React.PropTypes.number,
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
onPress: React.PropTypes.func,
duration: PropTypes.number,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
onPress: PropTypes.func,
};
constructor(props) {
... ...
import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
let {
requireNativeComponent,
View
} = ReactNative;
module.exports = requireNativeComponent('YH_FeaturedView', null);
class FeaturedView extends React.Component {
constructor(props) {
... ... @@ -30,10 +29,10 @@ class FeaturedView extends React.Component {
}
FeaturedView.propTypes = {
items: React.PropTypes.arrayOf(
React.PropTypes.any
items: PropTypes.arrayOf(
PropTypes.any
),
onClick: React.PropTypes.func,
onClick: PropTypes.func,
...View.propTypes // 包含默认的View的属性
};
... ...
... ... @@ -13,7 +13,7 @@
*/
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import {createLogger} from 'redux-logger';
/**
* ## Reducer
... ...
... ... @@ -4,6 +4,7 @@ import React from 'react';
import ReactNative, {AppRegistry, Platform} from 'react-native';
import {Provider, connect} from 'react-redux';
import createReactClass from 'create-react-class';
import configureStore from './store/configureStore';
import {Record, List, Map} from 'immutable';
... ... @@ -32,7 +33,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Order = React.createClass({
let YH_Order = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...