You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/09/21 13:44:40 UTC
[17/17] incubator-weex git commit: * [ios] merge pull request
* [ios] merge pull request
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5b99cc6b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5b99cc6b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5b99cc6b
Branch: refs/heads/0.16-dev
Commit: 5b99cc6b0c721eeceb14491efb3dd6fd1a41bce0
Parents: 8725289
Author: acton393 <zh...@gmail.com>
Authored: Thu Sep 21 21:43:53 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Sep 21 21:43:53 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 105 +++
.../Component/RecycleList/WXCellSlotComponent.h | 32 +
.../Component/RecycleList/WXCellSlotComponent.m | 93 ++
.../RecycleList/WXComponent+DataBinding.h | 31 +
.../RecycleList/WXComponent+DataBinding.mm | 451 +++++++++
.../Component/RecycleList/WXJSASTParser.h | 100 ++
.../Component/RecycleList/WXJSASTParser.mm | 919 +++++++++++++++++++
.../RecycleList/WXRecycleListComponent.h | 25 +
.../RecycleList/WXRecycleListComponent.m | 459 +++++++++
.../RecycleList/WXRecycleListDataManager.h | 34 +
.../RecycleList/WXRecycleListDataManager.m | 71 ++
.../Component/RecycleList/WXRecycleListLayout.h | 32 +
.../Component/RecycleList/WXRecycleListLayout.m | 113 +++
.../RecycleList/WXRecycleListTemplateManager.h | 33 +
.../RecycleList/WXRecycleListTemplateManager.m | 94 ++
.../RecycleList/WXRecycleListUpdateManager.h | 50 +
.../RecycleList/WXRecycleListUpdateManager.m | 262 ++++++
.../Recycler/WXSectionDataController.m | 2 +-
.../WeexSDK/Sources/Component/WXCellComponent.m | 4 +-
.../Sources/Component/WXComponent_internal.h | 28 +
.../Sources/Component/WXScrollerComponent.h | 2 +
.../Sources/Component/WXScrollerComponent.m | 13 +-
ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m | 4 +
.../WeexSDK/Sources/Events/WXComponent+Events.m | 5 +-
.../WeexSDK/Sources/Manager/WXBridgeManager.h | 13 +-
.../WeexSDK/Sources/Manager/WXBridgeManager.m | 10 +
.../Sources/Manager/WXComponentFactory.h | 12 +
.../Sources/Manager/WXComponentFactory.m | 30 +-
.../Sources/Manager/WXComponentManager.h | 13 +-
.../Sources/Manager/WXComponentManager.m | 147 ++-
ios/sdk/WeexSDK/Sources/Model/WXComponent.h | 19 +-
ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 83 ++
ios/sdk/WeexSDK/Sources/Utility/WXDiffUtil.h | 23 +-
ios/sdk/WeexSDK/Sources/Utility/WXDiffUtil.m | 86 +-
ios/sdk/WeexSDK/Sources/Utility/WXUtility.h | 20 +-
.../Sources/View/WXComponent+ViewManagement.m | 4 +
pre-build/native-bundle-main.js | 12 +-
37 files changed, 3383 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b99cc6b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 765a26a..8addaca 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -102,6 +102,8 @@
7423899B1C3174EB00D748CA /* WXWeakObjectWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 742389991C3174EB00D748CA /* WXWeakObjectWrapper.h */; };
7423899C1C3174EB00D748CA /* WXWeakObjectWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 7423899A1C3174EB00D748CA /* WXWeakObjectWrapper.m */; };
7423899F1C32733800D748CA /* WXType.h in Headers */ = {isa = PBXBuildFile; fileRef = 7423899D1C32733800D748CA /* WXType.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 7423EB511F4ADE30001662D1 /* WXComponent+DataBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = 7423EB4F1F4ADE30001662D1 /* WXComponent+DataBinding.h */; };
+ 7423EB521F4ADE30001662D1 /* WXComponent+DataBinding.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7423EB501F4ADE30001662D1 /* WXComponent+DataBinding.mm */; };
742AD72E1DF98C45007DC46C /* WXResourceRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 742AD7251DF98C45007DC46C /* WXResourceRequest.h */; settings = {ATTRIBUTES = (Public, ); }; };
742AD72F1DF98C45007DC46C /* WXResourceRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 742AD7261DF98C45007DC46C /* WXResourceRequest.m */; };
742AD7301DF98C45007DC46C /* WXResourceRequestHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 742AD7271DF98C45007DC46C /* WXResourceRequestHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -147,6 +149,8 @@
7463192A1C71B92600EFEBD4 /* WXModalUIModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 746319281C71B92600EFEBD4 /* WXModalUIModule.m */; };
7469869F1C4E2C000054A57E /* NSArray+Weex.h in Headers */ = {isa = PBXBuildFile; fileRef = 7469869D1C4E2C000054A57E /* NSArray+Weex.h */; };
746986A01C4E2C010054A57E /* NSArray+Weex.m in Sources */ = {isa = PBXBuildFile; fileRef = 7469869E1C4E2C000054A57E /* NSArray+Weex.m */; };
+ 746B923B1F46BE36009AE86B /* WXCellSlotComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 746B92391F46BE36009AE86B /* WXCellSlotComponent.h */; };
+ 746B923C1F46BE36009AE86B /* WXCellSlotComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 746B923A1F46BE36009AE86B /* WXCellSlotComponent.m */; };
747A787C1D1BAAC900DED9D0 /* WXComponent+ViewManagement.h in Headers */ = {isa = PBXBuildFile; fileRef = 747A787A1D1BAAC900DED9D0 /* WXComponent+ViewManagement.h */; };
747A787D1D1BAAC900DED9D0 /* WXComponent+ViewManagement.m in Sources */ = {isa = PBXBuildFile; fileRef = 747A787B1D1BAAC900DED9D0 /* WXComponent+ViewManagement.m */; };
747DF6821E31AEE4005C53A8 /* WXLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 747DF6801E31AEE4005C53A8 /* WXLength.h */; };
@@ -178,17 +182,45 @@
74AD99841D5B0E59008F0336 /* WXPolyfillSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 74AD99821D5B0E59008F0336 /* WXPolyfillSet.h */; };
74AD99851D5B0E59008F0336 /* WXPolyfillSet.m in Sources */ = {isa = PBXBuildFile; fileRef = 74AD99831D5B0E59008F0336 /* WXPolyfillSet.m */; };
74B232D21D2A2BA4006322EA /* WXLayoutDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 74B232D11D2A2BA4006322EA /* WXLayoutDefine.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 74B81AE31F73C3E300D3A61D /* WXRecycleListComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CFDD371F45939C007A1A66 /* WXRecycleListComponent.h */; };
+ 74B81AE41F73C3E500D3A61D /* WXRecycleListComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 74CFDD381F45939C007A1A66 /* WXRecycleListComponent.m */; };
+ 74B81AE51F73C3E900D3A61D /* WXRecycleListDataManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CFDD3B1F459400007A1A66 /* WXRecycleListDataManager.h */; };
+ 74B81AE61F73C3E900D3A61D /* WXRecycleListDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 74CFDD3C1F459400007A1A66 /* WXRecycleListDataManager.m */; };
+ 74B81AE71F73C3E900D3A61D /* WXRecycleListTemplateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CFDD3F1F45941E007A1A66 /* WXRecycleListTemplateManager.h */; };
+ 74B81AE81F73C3E900D3A61D /* WXRecycleListTemplateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 74CFDD401F45941E007A1A66 /* WXRecycleListTemplateManager.m */; };
+ 74B81AE91F73C3E900D3A61D /* WXRecycleListUpdateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CFDD431F459443007A1A66 /* WXRecycleListUpdateManager.h */; };
+ 74B81AEA1F73C3E900D3A61D /* WXRecycleListUpdateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 74CFDD441F459443007A1A66 /* WXRecycleListUpdateManager.m */; };
+ 74B81AEB1F73C3E900D3A61D /* WXRecycleListLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 74BA4AB11F70F4B600AC29BF /* WXRecycleListLayout.h */; };
+ 74B81AEC1F73C3E900D3A61D /* WXRecycleListLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 74BA4AB21F70F4B600AC29BF /* WXRecycleListLayout.m */; };
+ 74B81AED1F73C3E900D3A61D /* WXCellSlotComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 746B92391F46BE36009AE86B /* WXCellSlotComponent.h */; };
+ 74B81AEE1F73C3E900D3A61D /* WXCellSlotComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 746B923A1F46BE36009AE86B /* WXCellSlotComponent.m */; };
+ 74B81AEF1F73C3E900D3A61D /* WXComponent+DataBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = 7423EB4F1F4ADE30001662D1 /* WXComponent+DataBinding.h */; };
+ 74B81AF01F73C3E900D3A61D /* WXComponent+DataBinding.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7423EB501F4ADE30001662D1 /* WXComponent+DataBinding.mm */; };
+ 74B81AF11F73C3E900D3A61D /* WXJSASTParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 74BF19F61F5139BB00AEE3D7 /* WXJSASTParser.h */; };
+ 74B81AF21F73C3E900D3A61D /* WXJSASTParser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 74BF19F71F5139BB00AEE3D7 /* WXJSASTParser.mm */; };
74B8BEFE1DC47B72004A6027 /* WXRootView.h in Headers */ = {isa = PBXBuildFile; fileRef = 74B8BEFC1DC47B72004A6027 /* WXRootView.h */; };
74B8BEFF1DC47B72004A6027 /* WXRootView.m in Sources */ = {isa = PBXBuildFile; fileRef = 74B8BEFD1DC47B72004A6027 /* WXRootView.m */; };
74B8BF011DC49AFE004A6027 /* WXRootViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 74B8BF001DC49AFE004A6027 /* WXRootViewTests.m */; };
+ 74BA4AB31F70F4B600AC29BF /* WXRecycleListLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 74BA4AB11F70F4B600AC29BF /* WXRecycleListLayout.h */; };
+ 74BA4AB41F70F4B600AC29BF /* WXRecycleListLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 74BA4AB21F70F4B600AC29BF /* WXRecycleListLayout.m */; };
74BB5FB91DFEE81A004FC3DF /* WXMetaModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 74BB5FB71DFEE81A004FC3DF /* WXMetaModule.h */; };
74BB5FBA1DFEE81A004FC3DF /* WXMetaModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 74BB5FB81DFEE81A004FC3DF /* WXMetaModule.m */; };
+ 74BF19F81F5139BB00AEE3D7 /* WXJSASTParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 74BF19F61F5139BB00AEE3D7 /* WXJSASTParser.h */; };
+ 74BF19F91F5139BB00AEE3D7 /* WXJSASTParser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 74BF19F71F5139BB00AEE3D7 /* WXJSASTParser.mm */; };
74C896401D2AC2210043B82A /* WeexSDKTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 74C8963F1D2AC2210043B82A /* WeexSDKTests.m */; };
74C896421D2AC2210043B82A /* WeexSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77D160FD1C02DBE70010B15B /* WeexSDK.framework */; };
74CC7A1C1C2BC5F800829368 /* WXCellComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CC7A1A1C2BC5F800829368 /* WXCellComponent.h */; };
74CC7A1D1C2BC5F800829368 /* WXCellComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 74CC7A1B1C2BC5F800829368 /* WXCellComponent.m */; };
74CC7A201C2BF9DC00829368 /* WXListComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CC7A1E1C2BF9DC00829368 /* WXListComponent.h */; settings = {ATTRIBUTES = (Public, ); }; };
74CC7A211C2BF9DC00829368 /* WXListComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 74CC7A1F1C2BF9DC00829368 /* WXListComponent.m */; };
+ 74CFDD391F45939C007A1A66 /* WXRecycleListComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CFDD371F45939C007A1A66 /* WXRecycleListComponent.h */; };
+ 74CFDD3A1F45939C007A1A66 /* WXRecycleListComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 74CFDD381F45939C007A1A66 /* WXRecycleListComponent.m */; };
+ 74CFDD3D1F459400007A1A66 /* WXRecycleListDataManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CFDD3B1F459400007A1A66 /* WXRecycleListDataManager.h */; };
+ 74CFDD3E1F459400007A1A66 /* WXRecycleListDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 74CFDD3C1F459400007A1A66 /* WXRecycleListDataManager.m */; };
+ 74CFDD411F45941E007A1A66 /* WXRecycleListTemplateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CFDD3F1F45941E007A1A66 /* WXRecycleListTemplateManager.h */; };
+ 74CFDD421F45941E007A1A66 /* WXRecycleListTemplateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 74CFDD401F45941E007A1A66 /* WXRecycleListTemplateManager.m */; };
+ 74CFDD451F459443007A1A66 /* WXRecycleListUpdateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CFDD431F459443007A1A66 /* WXRecycleListUpdateManager.h */; };
+ 74CFDD461F459443007A1A66 /* WXRecycleListUpdateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 74CFDD441F459443007A1A66 /* WXRecycleListUpdateManager.m */; };
74D205201E091B8000128F44 /* WXCallJSMethod.h in Headers */ = {isa = PBXBuildFile; fileRef = 74D2051E1E091B8000128F44 /* WXCallJSMethod.h */; };
74D205211E091B8000128F44 /* WXCallJSMethod.m in Sources */ = {isa = PBXBuildFile; fileRef = 74D2051F1E091B8000128F44 /* WXCallJSMethod.m */; };
74EF31AA1DE58AE600667A07 /* WXURLRewriteProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 74EF31A91DE58AE600667A07 /* WXURLRewriteProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -668,6 +700,8 @@
742389991C3174EB00D748CA /* WXWeakObjectWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXWeakObjectWrapper.h; sourceTree = "<group>"; };
7423899A1C3174EB00D748CA /* WXWeakObjectWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXWeakObjectWrapper.m; sourceTree = "<group>"; };
7423899D1C32733800D748CA /* WXType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXType.h; sourceTree = "<group>"; };
+ 7423EB4F1F4ADE30001662D1 /* WXComponent+DataBinding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WXComponent+DataBinding.h"; sourceTree = "<group>"; };
+ 7423EB501F4ADE30001662D1 /* WXComponent+DataBinding.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = "WXComponent+DataBinding.mm"; sourceTree = "<group>"; };
742AD7251DF98C45007DC46C /* WXResourceRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WXResourceRequest.h; path = Network/WXResourceRequest.h; sourceTree = "<group>"; };
742AD7261DF98C45007DC46C /* WXResourceRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WXResourceRequest.m; path = Network/WXResourceRequest.m; sourceTree = "<group>"; };
742AD7271DF98C45007DC46C /* WXResourceRequestHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WXResourceRequestHandler.h; path = Network/WXResourceRequestHandler.h; sourceTree = "<group>"; };
@@ -714,6 +748,8 @@
7469869B1C4DEAC20054A57E /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; };
7469869D1C4E2C000054A57E /* NSArray+Weex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+Weex.h"; sourceTree = "<group>"; };
7469869E1C4E2C000054A57E /* NSArray+Weex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+Weex.m"; sourceTree = "<group>"; };
+ 746B92391F46BE36009AE86B /* WXCellSlotComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WXCellSlotComponent.h; sourceTree = "<group>"; };
+ 746B923A1F46BE36009AE86B /* WXCellSlotComponent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WXCellSlotComponent.m; sourceTree = "<group>"; };
747A787A1D1BAAC900DED9D0 /* WXComponent+ViewManagement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WXComponent+ViewManagement.h"; sourceTree = "<group>"; };
747A787B1D1BAAC900DED9D0 /* WXComponent+ViewManagement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "WXComponent+ViewManagement.m"; sourceTree = "<group>"; };
747DF6801E31AEE4005C53A8 /* WXLength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXLength.h; sourceTree = "<group>"; };
@@ -748,8 +784,12 @@
74B8BEFC1DC47B72004A6027 /* WXRootView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXRootView.h; sourceTree = "<group>"; };
74B8BEFD1DC47B72004A6027 /* WXRootView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXRootView.m; sourceTree = "<group>"; };
74B8BF001DC49AFE004A6027 /* WXRootViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXRootViewTests.m; sourceTree = "<group>"; };
+ 74BA4AB11F70F4B600AC29BF /* WXRecycleListLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WXRecycleListLayout.h; sourceTree = "<group>"; };
+ 74BA4AB21F70F4B600AC29BF /* WXRecycleListLayout.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WXRecycleListLayout.m; sourceTree = "<group>"; };
74BB5FB71DFEE81A004FC3DF /* WXMetaModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXMetaModule.h; sourceTree = "<group>"; };
74BB5FB81DFEE81A004FC3DF /* WXMetaModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXMetaModule.m; sourceTree = "<group>"; };
+ 74BF19F61F5139BB00AEE3D7 /* WXJSASTParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WXJSASTParser.h; sourceTree = "<group>"; };
+ 74BF19F71F5139BB00AEE3D7 /* WXJSASTParser.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WXJSASTParser.mm; sourceTree = "<group>"; };
74C27A011CEC441D004E488E /* WeexSDK-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WeexSDK-Prefix.pch"; sourceTree = "<group>"; };
74C8963D1D2AC2210043B82A /* WeexSDKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WeexSDKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
74C8963F1D2AC2210043B82A /* WeexSDKTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WeexSDKTests.m; sourceTree = "<group>"; };
@@ -758,6 +798,14 @@
74CC7A1B1C2BC5F800829368 /* WXCellComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXCellComponent.m; sourceTree = "<group>"; };
74CC7A1E1C2BF9DC00829368 /* WXListComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXListComponent.h; sourceTree = "<group>"; };
74CC7A1F1C2BF9DC00829368 /* WXListComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXListComponent.m; sourceTree = "<group>"; };
+ 74CFDD371F45939C007A1A66 /* WXRecycleListComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WXRecycleListComponent.h; sourceTree = "<group>"; };
+ 74CFDD381F45939C007A1A66 /* WXRecycleListComponent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WXRecycleListComponent.m; sourceTree = "<group>"; };
+ 74CFDD3B1F459400007A1A66 /* WXRecycleListDataManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WXRecycleListDataManager.h; sourceTree = "<group>"; };
+ 74CFDD3C1F459400007A1A66 /* WXRecycleListDataManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WXRecycleListDataManager.m; sourceTree = "<group>"; };
+ 74CFDD3F1F45941E007A1A66 /* WXRecycleListTemplateManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WXRecycleListTemplateManager.h; sourceTree = "<group>"; };
+ 74CFDD401F45941E007A1A66 /* WXRecycleListTemplateManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WXRecycleListTemplateManager.m; sourceTree = "<group>"; };
+ 74CFDD431F459443007A1A66 /* WXRecycleListUpdateManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WXRecycleListUpdateManager.h; sourceTree = "<group>"; };
+ 74CFDD441F459443007A1A66 /* WXRecycleListUpdateManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WXRecycleListUpdateManager.m; sourceTree = "<group>"; };
74D2051E1E091B8000128F44 /* WXCallJSMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXCallJSMethod.h; sourceTree = "<group>"; };
74D2051F1E091B8000128F44 /* WXCallJSMethod.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXCallJSMethod.m; sourceTree = "<group>"; };
74EF31A91DE58AE600667A07 /* WXURLRewriteProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXURLRewriteProtocol.h; sourceTree = "<group>"; };
@@ -1079,6 +1127,29 @@
path = WeexSDKTests;
sourceTree = "<group>";
};
+ 74CFDD361F45937D007A1A66 /* RecycleList */ = {
+ isa = PBXGroup;
+ children = (
+ 74CFDD371F45939C007A1A66 /* WXRecycleListComponent.h */,
+ 74CFDD381F45939C007A1A66 /* WXRecycleListComponent.m */,
+ 74CFDD3B1F459400007A1A66 /* WXRecycleListDataManager.h */,
+ 74CFDD3C1F459400007A1A66 /* WXRecycleListDataManager.m */,
+ 74CFDD3F1F45941E007A1A66 /* WXRecycleListTemplateManager.h */,
+ 74CFDD401F45941E007A1A66 /* WXRecycleListTemplateManager.m */,
+ 74CFDD431F459443007A1A66 /* WXRecycleListUpdateManager.h */,
+ 74CFDD441F459443007A1A66 /* WXRecycleListUpdateManager.m */,
+ 74BA4AB11F70F4B600AC29BF /* WXRecycleListLayout.h */,
+ 74BA4AB21F70F4B600AC29BF /* WXRecycleListLayout.m */,
+ 746B92391F46BE36009AE86B /* WXCellSlotComponent.h */,
+ 746B923A1F46BE36009AE86B /* WXCellSlotComponent.m */,
+ 7423EB4F1F4ADE30001662D1 /* WXComponent+DataBinding.h */,
+ 7423EB501F4ADE30001662D1 /* WXComponent+DataBinding.mm */,
+ 74BF19F61F5139BB00AEE3D7 /* WXJSASTParser.h */,
+ 74BF19F71F5139BB00AEE3D7 /* WXJSASTParser.mm */,
+ );
+ path = RecycleList;
+ sourceTree = "<group>";
+ };
74D8DB401E4825920078B667 /* Recycler */ = {
isa = PBXGroup;
children = (
@@ -1372,6 +1443,7 @@
children = (
C4B3D6D21E6954300013F38D /* WXEditComponent.h */,
C4B3D6D31E6954300013F38D /* WXEditComponent.m */,
+ 74CFDD361F45937D007A1A66 /* RecycleList */,
74D8DB401E4825920078B667 /* Recycler */,
2A837AAC1CD9DE9200AEDF03 /* WXLoadingComponent.h */,
2A837AAD1CD9DE9200AEDF03 /* WXLoadingComponent.m */,
@@ -1483,7 +1555,9 @@
775BEE711C1BD977008D1629 /* WXModuleProtocol.h in Headers */,
7469869F1C4E2C000054A57E /* NSArray+Weex.h in Headers */,
74CC7A201C2BF9DC00829368 /* WXListComponent.h in Headers */,
+ 7423EB511F4ADE30001662D1 /* WXComponent+DataBinding.h in Headers */,
74FD6E041C7C0E9600DBEB6D /* WXScrollerProtocol.h in Headers */,
+ 74CFDD3D1F459400007A1A66 /* WXRecycleListDataManager.h in Headers */,
77D161201C02DDB40010B15B /* WXSDKEngine.h in Headers */,
745ED2DA1C5F2C7E002DB5A8 /* WXView.h in Headers */,
59D3CA411CF9ED57008835DC /* Layout.h in Headers */,
@@ -1496,6 +1570,7 @@
59A5961C1CB630F10012CD52 /* WXComponent+Navigation.h in Headers */,
775BEE6E1C1BD8F4008D1629 /* WXImgLoaderProtocol.h in Headers */,
7410811F1CED585A001BC6E5 /* WXComponentManager.h in Headers */,
+ 74CFDD411F45941E007A1A66 /* WXRecycleListTemplateManager.h in Headers */,
1D3000F11D40B9AC004F3B4F /* WXClipboardModule.h in Headers */,
59A583081CF5B2FD0081FD3E /* WXNavigationDefaultImpl.h in Headers */,
775BEE4E1C16F993008D1629 /* WXDefine.h in Headers */,
@@ -1538,14 +1613,17 @@
749DC27B1D40827B009E1C91 /* WXMonitor.h in Headers */,
77E659DA1C07F594008B8775 /* WXDomModule.h in Headers */,
74EF31AD1DE58BE200667A07 /* WXURLRewriteDefaultImpl.h in Headers */,
+ 746B923B1F46BE36009AE86B /* WXCellSlotComponent.h in Headers */,
744D61101E49979000B624B3 /* WXFooterComponent.h in Headers */,
744D61141E4AF23E00B624B3 /* WXDiffUtil.h in Headers */,
74862F791E02B88D00B7A041 /* JSValue+Weex.h in Headers */,
2A1F57B71C75C6A600B58017 /* WXTextInputComponent.h in Headers */,
+ 74CFDD451F459443007A1A66 /* WXRecycleListUpdateManager.h in Headers */,
74A4BA9A1CB3BAA100195969 /* WXThreadSafeMutableDictionary.h in Headers */,
74A4BA9E1CB3C0A100195969 /* WXHandlerFactory.h in Headers */,
741DFE021DDD7D18009B020F /* WXRoundedRect.h in Headers */,
7423899B1C3174EB00D748CA /* WXWeakObjectWrapper.h in Headers */,
+ 74BF19F81F5139BB00AEE3D7 /* WXJSASTParser.h in Headers */,
59A596191CB630E50012CD52 /* WXNavigationProtocol.h in Headers */,
59A5962F1CB632050012CD52 /* WXBaseViewController.h in Headers */,
74AD99841D5B0E59008F0336 /* WXPolyfillSet.h in Headers */,
@@ -1559,6 +1637,7 @@
741081261CEDB4EC001BC6E5 /* WXComponent_internal.h in Headers */,
77E65A191C155F25008B8775 /* WXScrollerComponent.h in Headers */,
C4E375381E5FCBD3009B2D9C /* WXComponent+BoxShadow.h in Headers */,
+ 74BA4AB31F70F4B600AC29BF /* WXRecycleListLayout.h in Headers */,
742AD7311DF98C45007DC46C /* WXResourceRequestHandlerDefaultImpl.h in Headers */,
C4F0127D1E1502A6003378D0 /* WXWebSocketHandler.h in Headers */,
DC03ADBA1D508719003F76E7 /* WXTextAreaComponent.h in Headers */,
@@ -1616,6 +1695,7 @@
741081231CED6756001BC6E5 /* WXComponentFactory.h in Headers */,
59D3CA4A1CFC3CE1008835DC /* NSTimer+Weex.h in Headers */,
C4424E5B1F24DA3D009F52E2 /* WXExtendCallNativeProtocol.h in Headers */,
+ 74CFDD391F45939C007A1A66 /* WXRecycleListComponent.h in Headers */,
D334510C1D3E19B80083598A /* WXCanvasModule.h in Headers */,
742AD73A1DF98C8B007DC46C /* WXResourceLoader.h in Headers */,
746319291C71B92600EFEBD4 /* WXModalUIModule.h in Headers */,
@@ -1643,11 +1723,14 @@
DCA445A61EFA571E00D0CFA8 /* WXSDKEngine.h in Headers */,
DCA445AA1EFA573900D0CFA8 /* WXResourceRequest.h in Headers */,
DCA445C61EFA57EE00D0CFA8 /* NSObject+WXSwizzle.h in Headers */,
+ 74B81AEB1F73C3E900D3A61D /* WXRecycleListLayout.h in Headers */,
DCA445B41EFA577F00D0CFA8 /* WXJSExceptionProtocol.h in Headers */,
+ 74B81AEF1F73C3E900D3A61D /* WXComponent+DataBinding.h in Headers */,
DCA445B51EFA578400D0CFA8 /* WXJSExceptionInfo.h in Headers */,
DCA445B61EFA578B00D0CFA8 /* WXIndicatorComponent.h in Headers */,
DCA445BF1EFA57C300D0CFA8 /* WXComponent.h in Headers */,
DCA445A71EFA572300D0CFA8 /* WXRootViewController.h in Headers */,
+ 74B81AE91F73C3E900D3A61D /* WXRecycleListUpdateManager.h in Headers */,
DCA445C01EFA57C900D0CFA8 /* WXBridgeProtocol.h in Headers */,
DCA445AC1EFA574A00D0CFA8 /* WXNetworkProtocol.h in Headers */,
DCA445C31EFA57DC00D0CFA8 /* WXAppMonitorProtocol.h in Headers */,
@@ -1673,11 +1756,13 @@
DCA445A11EFA56FA00D0CFA8 /* WXScrollerProtocol.h in Headers */,
DCA445DE1EFA59B800D0CFA8 /* WXSectionDataController.h in Headers */,
DCA445F01EFA5A1D00D0CFA8 /* WXComponent_internal.h in Headers */,
+ 74B81AE71F73C3E900D3A61D /* WXRecycleListTemplateManager.h in Headers */,
DCA445ED1EFA5A1200D0CFA8 /* WXTransform.h in Headers */,
DCA445CD1EFA592E00D0CFA8 /* WXComponent+Events.h in Headers */,
DCA445EC1EFA5A0E00D0CFA8 /* WXTextAreaComponent.h in Headers */,
DCA445D81EFA599400D0CFA8 /* WXRootView.h in Headers */,
DCA446131EFA5A8C00D0CFA8 /* WXCallJSMethod.h in Headers */,
+ 74B81AED1F73C3E900D3A61D /* WXCellSlotComponent.h in Headers */,
DCA445E41EFA59DC00D0CFA8 /* WXVideoComponent.h in Headers */,
DCA4460B1EFA5A7200D0CFA8 /* WXAssert.h in Headers */,
DCA445F71EFA5A3100D0CFA8 /* WXPickerModule.h in Headers */,
@@ -1709,6 +1794,7 @@
DCA4460E1EFA5A7E00D0CFA8 /* WXLength.h in Headers */,
DCA445FA1EFA5A3A00D0CFA8 /* WXNavigatorModule.h in Headers */,
DCA446081EFA5A6A00D0CFA8 /* NSArray+Weex.h in Headers */,
+ 74B81AE51F73C3E900D3A61D /* WXRecycleListDataManager.h in Headers */,
DCA445F21EFA5A2300D0CFA8 /* WXHeaderComponent.h in Headers */,
DCA445DD1EFA59B300D0CFA8 /* WXRecyclerUpdateController.h in Headers */,
DCA4461E1EFA5AAF00D0CFA8 /* WXComponentFactory.h in Headers */,
@@ -1718,6 +1804,7 @@
DCA4461D1EFA5AAA00D0CFA8 /* WXHandlerFactory.h in Headers */,
DCA445EE1EFA5A1500D0CFA8 /* WXWebComponent.h in Headers */,
DCA4460D1EFA5A7900D0CFA8 /* WXThreadSafeMutableArray.h in Headers */,
+ 74B81AE31F73C3E300D3A61D /* WXRecycleListComponent.h in Headers */,
DCA445DA1EFA59A600D0CFA8 /* WXMultiColumnLayout.h in Headers */,
DCA445E01EFA59CD00D0CFA8 /* WXLoadingIndicator.h in Headers */,
DCA445E61EFA59E500D0CFA8 /* WXImageComponent.h in Headers */,
@@ -1754,6 +1841,7 @@
DCA445EB1EFA5A0B00D0CFA8 /* WXTextInputComponent.h in Headers */,
DCA4460C1EFA5A7600D0CFA8 /* WXThreadSafeMutableDictionary.h in Headers */,
DCA445CE1EFA593500D0CFA8 /* WXComponent+BoxShadow.h in Headers */,
+ 74B81AF11F73C3E900D3A61D /* WXJSASTParser.h in Headers */,
DCA4461C1EFA5AA600D0CFA8 /* WXModuleFactory.h in Headers */,
DCA445D91EFA59A100D0CFA8 /* WXEditComponent.h in Headers */,
DCA445FB1EFA5A3C00D0CFA8 /* WXStorageModule.h in Headers */,
@@ -1866,6 +1954,7 @@
};
DCA445241EFA555400D0CFA8 = {
CreatedOnToolsVersion = 8.3.3;
+ DevelopmentTeam = "Xing Zhang";
ProvisioningStyle = Automatic;
};
};
@@ -2006,6 +2095,7 @@
746986A01C4E2C010054A57E /* NSArray+Weex.m in Sources */,
74B8BEFF1DC47B72004A6027 /* WXRootView.m in Sources */,
742AD7321DF98C45007DC46C /* WXResourceRequestHandlerDefaultImpl.m in Sources */,
+ 74CFDD421F45941E007A1A66 /* WXRecycleListTemplateManager.m in Sources */,
747DF6831E31AEE4005C53A8 /* WXLength.m in Sources */,
77E65A0E1C155E99008B8775 /* WXDivComponent.m in Sources */,
2A60CE9D1C91733E00857B9F /* WXSwitchComponent.m in Sources */,
@@ -2024,6 +2114,7 @@
DCF087621DCAE161005CD6EB /* WXInvocationConfig.m in Sources */,
C47B78CF1F2998EE001D3B0C /* WXExtendCallNativeManager.m in Sources */,
77D161311C02DE4E0010B15B /* WXComponent.m in Sources */,
+ 74CFDD461F459443007A1A66 /* WXRecycleListUpdateManager.m in Sources */,
74862F7A1E02B88D00B7A041 /* JSValue+Weex.m in Sources */,
740451EB1E14BB26004157CB /* WXServiceFactory.m in Sources */,
77E659DB1C07F594008B8775 /* WXDomModule.m in Sources */,
@@ -2061,6 +2152,7 @@
59CE27E91CC387DB000BE37A /* WXEmbedComponent.m in Sources */,
DCA0EF651D6EED6F00CB18B9 /* WXGlobalEventModule.m in Sources */,
2A919DA71E321F1F006EB6B5 /* WXBridgeMethod.m in Sources */,
+ 7423EB521F4ADE30001662D1 /* WXComponent+DataBinding.mm in Sources */,
DCAB35FF1D658EB700C0EA70 /* WXRuleManager.m in Sources */,
77D161251C02DDD10010B15B /* WXSDKInstance.m in Sources */,
DC7764931F3C2CA300B5727E /* WXRecyclerDragController.m in Sources */,
@@ -2082,9 +2174,11 @@
74CC7A1D1C2BC5F800829368 /* WXCellComponent.m in Sources */,
74862F821E03A24500B7A041 /* WXComponentMethod.m in Sources */,
77E65A121C155EA8008B8775 /* WXImageComponent.m in Sources */,
+ 74CFDD3E1F459400007A1A66 /* WXRecycleListDataManager.m in Sources */,
2A837AB31CD9DE9200AEDF03 /* WXLoadingComponent.m in Sources */,
2AE5B7531CAB7DBD0082FDDB /* WXAComponent.m in Sources */,
333D9A291F41507A007CED39 /* WXTransition.m in Sources */,
+ 74CFDD3A1F45939C007A1A66 /* WXRecycleListComponent.m in Sources */,
741DFE031DDD7D18009B020F /* WXRoundedRect.mm in Sources */,
59A596301CB632050012CD52 /* WXBaseViewController.m in Sources */,
74CC7A211C2BF9DC00829368 /* WXListComponent.m in Sources */,
@@ -2093,6 +2187,7 @@
7408C48F1CFB345D000BCCD0 /* WXComponent+Events.m in Sources */,
C4F012871E150307003378D0 /* WXWebSocketLoader.m in Sources */,
C4D872211E5DDEDA00E39BC1 /* WXInnerLayer.m in Sources */,
+ 74BA4AB41F70F4B600AC29BF /* WXRecycleListLayout.m in Sources */,
745ED2DB1C5F2C7E002DB5A8 /* WXView.m in Sources */,
DC03ADB91D508719003F76E7 /* WXTextAreaComponent.m in Sources */,
59A596231CB6311F0012CD52 /* WXNavigatorModule.m in Sources */,
@@ -2101,6 +2196,7 @@
D33451091D3E19480083598A /* WXCanvasComponent.m in Sources */,
74A4BA971CB365D100195969 /* WXAppConfiguration.m in Sources */,
59A583091CF5B2FD0081FD3E /* WXNavigationDefaultImpl.m in Sources */,
+ 746B923C1F46BE36009AE86B /* WXCellSlotComponent.m in Sources */,
7463192A1C71B92600EFEBD4 /* WXModalUIModule.m in Sources */,
77D161501C02E3880010B15B /* WXUtility.m in Sources */,
74A4BA9F1CB3C0A100195969 /* WXHandlerFactory.m in Sources */,
@@ -2116,6 +2212,7 @@
C4B834271DE69B09007AD27E /* WXPickerModule.m in Sources */,
745B2D691E5A8E1E0092D38A /* WXMultiColumnLayout.m in Sources */,
77D161391C02DE940010B15B /* WXBridgeManager.m in Sources */,
+ 74BF19F91F5139BB00AEE3D7 /* WXJSASTParser.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2137,7 +2234,9 @@
DCA445391EFA55B300D0CFA8 /* WXComponent+PseudoClassManagement.m in Sources */,
DCA4453A1EFA55B300D0CFA8 /* WXView.m in Sources */,
DCA4453B1EFA55B300D0CFA8 /* WXErrorView.m in Sources */,
+ 74B81AEC1F73C3E900D3A61D /* WXRecycleListLayout.m in Sources */,
DCA4453C1EFA55B300D0CFA8 /* WXComponent+ViewManagement.m in Sources */,
+ 74B81AE41F73C3E500D3A61D /* WXRecycleListComponent.m in Sources */,
DC7764951F3C685200B5727E /* WXRecyclerDragController.m in Sources */,
DCA4453D1EFA55B300D0CFA8 /* WXRootView.m in Sources */,
DCA4453E1EFA55B300D0CFA8 /* WXBaseViewController.m in Sources */,
@@ -2153,7 +2252,9 @@
DCA445481EFA55B300D0CFA8 /* WXLoadingIndicator.m in Sources */,
DCA445491EFA55B300D0CFA8 /* WXRefreshComponent.m in Sources */,
DCA4454A1EFA55B300D0CFA8 /* WXEmbedComponent.m in Sources */,
+ 74B81AE81F73C3E900D3A61D /* WXRecycleListTemplateManager.m in Sources */,
DCA4454B1EFA55B300D0CFA8 /* WXVideoComponent.m in Sources */,
+ 74B81AE61F73C3E900D3A61D /* WXRecycleListDataManager.m in Sources */,
DCA4454C1EFA55B300D0CFA8 /* WXComponent.m in Sources */,
DCA4454D1EFA55B300D0CFA8 /* WXDivComponent.m in Sources */,
DCA4454E1EFA55B300D0CFA8 /* WXImageComponent.m in Sources */,
@@ -2176,6 +2277,7 @@
DCA4455D1EFA55B300D0CFA8 /* WXHeaderComponent.m in Sources */,
DCA4455E1EFA55B300D0CFA8 /* WXFooterComponent.m in Sources */,
DCA4455F1EFA55B300D0CFA8 /* WXNavigationDefaultImpl.m in Sources */,
+ 74B81AF21F73C3E900D3A61D /* WXJSASTParser.mm in Sources */,
DCA445601EFA55B300D0CFA8 /* WXURLRewriteDefaultImpl.m in Sources */,
DCA445611EFA55B300D0CFA8 /* WXPrerenderManager.m in Sources */,
DCA445631EFA55B300D0CFA8 /* WXPickerModule.m in Sources */,
@@ -2195,8 +2297,11 @@
DCA445711EFA55B300D0CFA8 /* WXMetaModule.m in Sources */,
DCA445721EFA55B300D0CFA8 /* WXBoxShadow.m in Sources */,
DCA445731EFA55B300D0CFA8 /* NSTimer+Weex.m in Sources */,
+ 74B81AEE1F73C3E900D3A61D /* WXCellSlotComponent.m in Sources */,
DCA445741EFA55B300D0CFA8 /* WXConvert.m in Sources */,
DCA445751EFA55B300D0CFA8 /* WXUtility.m in Sources */,
+ 74B81AEA1F73C3E900D3A61D /* WXRecycleListUpdateManager.m in Sources */,
+ 74B81AF01F73C3E900D3A61D /* WXComponent+DataBinding.mm in Sources */,
DCA445761EFA55B300D0CFA8 /* WXLog.m in Sources */,
DCA445771EFA55B300D0CFA8 /* WXWeakObjectWrapper.m in Sources */,
DCA445781EFA55B300D0CFA8 /* NSArray+Weex.m in Sources */,
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b99cc6b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXCellSlotComponent.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXCellSlotComponent.h b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXCellSlotComponent.h
new file mode 100644
index 0000000..4e62676
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXCellSlotComponent.h
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "WXComponent.h"
+
+@interface WXCellSlotComponent : WXComponent
+
+@property (nonatomic, strong) NSString *templateType;
+
+- (void)updateCellData:(NSDictionary *)data;
+
+- (void)triggerLayout;
+
+
+@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b99cc6b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXCellSlotComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXCellSlotComponent.m b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXCellSlotComponent.m
new file mode 100644
index 0000000..0cbd97b
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXCellSlotComponent.m
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import "WXCellSlotComponent.h"
+#import "WXComponent_internal.h"
+#import "WXComponentManager.h"
+#import "WXSDKInstance_private.h"
+#import "WXConvert.h"
+#import "WXAssert.h"
+#import "WXScrollerComponent.h"
+
+static const NSString *WXDefaultRecycleTemplateType = @"WXDefaultRecycleTemplateType";
+
+@implementation WXCellSlotComponent
+
+- (instancetype)initWithRef:(NSString *)ref
+ type:(NSString *)type
+ styles:(NSDictionary *)styles
+ attributes:(NSDictionary *)attributes
+ events:(NSArray *)events
+ weexInstance:(WXSDKInstance *)weexInstance
+{
+ self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance];
+ if (self) {
+ // TODO: isRecycle / insertAnimation / deleteAnimation / keepScrollPosition
+ _templateType = attributes[@"templateType"] ? [WXConvert NSString:attributes[@"templateType"]] : WXDefaultRecycleTemplateType;
+ _lazyCreateView = YES;
+ _isNeedJoinLayoutSystem = NO;
+ }
+
+ return self;
+}
+
+- (void)updateAttributes:(NSDictionary *)attributes
+{
+
+}
+
+- (void)updateCellData:(NSDictionary *)data
+{
+ WXAssertComponentThread();
+
+ [self updateBindingData:data];
+ [self triggerLayout];
+}
+
+- (void)_didInserted
+{
+ [self triggerLayout];
+}
+
+- (void)triggerLayout
+{
+ WXAssertComponentThread();
+
+ //TODO: _isUseContainerWidth?
+ if (isUndefined(self.cssNode->style.dimensions[CSS_WIDTH])) {
+ self.cssNode->style.dimensions[CSS_WIDTH] = ((WXScrollerComponent *)(self.supercomponent)).scrollerCSSNode->style.dimensions[CSS_WIDTH];
+ }
+
+ if ([self needsLayout]) {
+ layoutNode(self.cssNode, CSS_UNDEFINED, CSS_UNDEFINED, CSS_DIRECTION_INHERIT);
+ if ([WXLog logLevel] >= WXLogLevelDebug) {
+ print_css_node(self.cssNode, CSS_PRINT_LAYOUT | CSS_PRINT_STYLE | CSS_PRINT_CHILDREN);
+ }
+ }
+
+ NSMutableSet<WXComponent *> *dirtyComponents = [NSMutableSet set];
+ [self _calculateFrameWithSuperAbsolutePosition:CGPointZero gatherDirtyComponents:dirtyComponents];
+ for (WXComponent *dirtyComponent in dirtyComponents) {
+ [self.weexInstance.componentManager _addUITask:^{
+ [dirtyComponent _layoutDidFinish];
+ }];
+ }
+}
+
+@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b99cc6b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.h b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.h
new file mode 100644
index 0000000..610f82f
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.h
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import <WeexSDK/WeexSDK.h>
+
+static const NSString *WXBindingIdentify = @"@binding";
+static const NSString *WXBindingMatchIdentify = @"[[match]]";
+static const NSString *WXBindingRepeatIdentify = @"[[repeat]]";
+static const NSString *WXBindingRepeatExprIdentify = @"@expression";
+static const NSString *WXBindingRepeatIndexIdentify = @"@index";
+static const NSString *WXBindingRepeatLabelIdentify = @"@alias";
+
+@interface WXComponent (DataBinding)
+
+@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b99cc6b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.mm
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.mm b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.mm
new file mode 100644
index 0000000..b15ebd8
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.mm
@@ -0,0 +1,451 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import "WXComponent+DataBinding.h"
+#import "WXComponent_internal.h"
+#import "WXSDKInstance_private.h"
+#import "WXComponentManager.h"
+#import "WXAssert.h"
+#import "WXJSASTParser.h"
+
+#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
+
+typedef enum : NSUInteger {
+ WXDataBindingTypeProp = 0,
+ WXDataBindingTypeStyle,
+ WXDataBindingTypeAttributes,
+ WXDataBindingTypeEvents,
+ WXDataBindingTypeCount,
+} WXDataBindingType;
+
+static JSContext *jsContext;
+
+@implementation WXComponent (DataBinding)
+
+- (void)updateBindingData:(NSDictionary *)data
+{
+ WXAssertComponentThread();
+
+ if (_isSkipUpdate) {
+ _isSkipUpdate = NO;
+ return;
+ }
+
+ WXLogDebug(@"Update binding data:%@, for component:%@", data, self.ref);
+ if (!data) {
+ WXLogWarning(@"No data for updateBindingData");
+ return;
+ }
+
+ WXComponent *templateComponent = _templateComponent;
+ if (!templateComponent) {
+ WXLogError(@"No template fount for component:%@", templateComponent);
+ return;
+ }
+
+ if (templateComponent->_bindingProps) {
+ NSMutableDictionary *newData = [NSMutableDictionary dictionary];
+ [templateComponent->_bindingProps enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull key, WXDataBindingBlock _Nonnull block, BOOL * _Nonnull stop) {
+ BOOL needUpdate;
+ id value = block(data, &needUpdate);
+ if (value) {
+ newData[key] = value;
+ }
+ }];
+
+ data = newData;
+ }
+
+ if (!_isRepeating) {
+ WXDataBindingBlock repeatBlock = templateComponent->_bindingRepeat;
+ if (repeatBlock) {
+ BOOL needUpdate = NO;
+ NSArray *repeatData = repeatBlock(data, &needUpdate);
+ [self _repeat:repeatData inData:data];
+ return;
+ }
+ }
+
+ WXDataBindingBlock matchBlock = templateComponent->_bindingMatch;
+ if (matchBlock) {
+ BOOL needUpdate = NO;
+ BOOL needDisplay = [matchBlock(data, &needUpdate) boolValue];
+ if (!needDisplay) {
+ self.displayType = WXDisplayTypeNone;
+ return;
+ } else if (needDisplay && !_isNeedJoinLayoutSystem) {
+ self.displayType = WXDisplayTypeBlock;
+ }
+ }
+
+ for (int i = WXDataBindingTypeStyle; i < WXDataBindingTypeCount; i++) {
+ NSDictionary *bindingMap = i == WXDataBindingTypeStyle ? templateComponent->_bindingStyles : (i == WXDataBindingTypeAttributes ? templateComponent->_bindingAttributes : templateComponent->_bindingEvents);
+ if (!bindingMap || bindingMap.count == 0) {
+ continue;
+ }
+ NSMutableDictionary *newAttributesOrStyles = [NSMutableDictionary dictionary];
+
+ [bindingMap enumerateKeysAndObjectsUsingBlock:^(id _Nonnull attributeOrStyleName, WXDataBindingBlock _Nonnull bindingBlock, BOOL * _Nonnull stop) {
+ BOOL needUpdate = NO;
+ id newValue = bindingBlock(data, &needUpdate);
+ if (needUpdate) {
+ newAttributesOrStyles[attributeOrStyleName] = newValue;
+ }
+ }];
+
+ if (newAttributesOrStyles.count > 0) {
+ [self.weexInstance.componentManager startComponentTasks];
+ if (i == WXDataBindingTypeStyle) {
+ [self.weexInstance.componentManager updateStyles:newAttributesOrStyles forComponent:self.ref];
+ } else if (i == WXDataBindingTypeAttributes) {
+ [self.weexInstance.componentManager updateAttributes:newAttributesOrStyles forComponent:self.ref];
+ } else if (i == WXDataBindingTypeEvents) {
+ [self _addEventParams:newAttributesOrStyles];
+ }
+ }
+ }
+
+ NSArray *subcomponents = self.subcomponents;
+ for (WXComponent *subcomponent in subcomponents) {
+ [subcomponent updateBindingData:data];
+ }
+}
+
+- (void)_repeat:(NSArray *)repeatData inData:(NSDictionary *)data
+{
+ NSMutableDictionary *dataCopy = [data mutableCopy];
+ WXComponent *templateComponent = _templateComponent;
+ NSArray *subcomponents = self.supercomponent.subcomponents;
+ NSUInteger startIndex = [subcomponents indexOfObject:self];
+ [repeatData enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+ if (templateComponent->_repeatIndexIdentify) {
+ dataCopy[templateComponent->_repeatIndexIdentify] = @(idx);
+ }
+ if (templateComponent->_repeatLabelIdentify) {
+ dataCopy[templateComponent->_repeatLabelIdentify] = obj;
+ }
+
+ WXComponent *exsitingComponent;
+ if (startIndex + idx < subcomponents.count) {
+ if (subcomponents[startIndex + idx]
+ && ((WXComponent *)(subcomponents[startIndex + idx]))->_templateComponent == templateComponent) {
+ exsitingComponent = subcomponents[startIndex + idx];
+ exsitingComponent.displayType = WXDisplayTypeBlock;
+ }
+ }
+
+ WXComponent *component = exsitingComponent ? : [templateComponent copy];
+ component->_isRepeating = YES;
+ [component updateBindingData:dataCopy];
+ component->_isRepeating = NO;
+
+ if (idx > 0 && exsitingComponent) {
+ component->_isSkipUpdate = YES;
+ }
+
+ if (!exsitingComponent) {
+ [self.weexInstance.componentManager startComponentTasks];
+ [self.supercomponent _insertSubcomponent:component atIndex:startIndex + idx];
+ [self.weexInstance.componentManager _addUITask:^{
+ [self.supercomponent insertSubview:component atIndex:startIndex + idx];
+ }];
+ }
+ }];
+
+ // set displaty:none to the redundant components;
+ NSUInteger i = startIndex + repeatData.count;
+ while (i < self.supercomponent.subcomponents.count) {
+ WXComponent *component = self.supercomponent.subcomponents[i];
+ if (component->_templateComponent == templateComponent) {
+ component->_isSkipUpdate = YES;
+ component.displayType = WXDisplayTypeNone;
+ }
+ i++;
+ }
+}
+
+- (void)_storeBindingsWithProps:(NSDictionary *)props styles:(NSDictionary *)styles attributes:(NSDictionary *)attributes events:(NSDictionary *)events
+{
+ WXAssertComponentThread();
+
+ if (props.count > 0) {
+ if (!_bindingProps) {
+ _bindingProps = [NSMutableDictionary dictionary];
+ }
+ [self _storeBindings:props type:WXDataBindingTypeProp];
+ }
+
+ if (styles.count > 0) {
+ if (!_bindingStyles) {
+ _bindingStyles = [NSMutableDictionary dictionary];
+ }
+ [self _storeBindings:styles type:WXDataBindingTypeStyle];
+ }
+
+ if (attributes.count > 0) {
+ if (!_bindingAttributes) {
+ _bindingAttributes = [NSMutableDictionary dictionary];
+ }
+ [self _storeBindings:attributes type:WXDataBindingTypeAttributes];
+ }
+
+ if (events.count > 0) {
+ if (!_bindingEvents) {
+ _bindingEvents = [NSMutableDictionary dictionary];
+ }
+ [self _storeBindings:events type:WXDataBindingTypeEvents];
+ }
+}
+
+- (void)_storeBindings:(NSDictionary *)stylesOrAttributesOrEvents type:(WXDataBindingType)type
+{
+ WXAssertComponentThread();
+
+ NSMutableDictionary *bindingMap;
+ switch (type) {
+ case WXDataBindingTypeProp:
+ bindingMap = _bindingProps;
+ break;
+ case WXDataBindingTypeStyle:
+ bindingMap = _bindingStyles;
+ break;
+ case WXDataBindingTypeAttributes:
+ bindingMap = _bindingAttributes;
+ break;
+ case WXDataBindingTypeEvents:
+ bindingMap = _bindingEvents;
+ break;
+ default:
+ WXAssert(NO, @"error binding type:%z", type);
+ break;
+ }
+
+ [stylesOrAttributesOrEvents enumerateKeysAndObjectsUsingBlock:^(id _Nonnull name, id _Nonnull binding, BOOL * _Nonnull stop) {
+ if ([binding isKindOfClass:[NSDictionary class]] && binding[WXBindingIdentify]) {
+ // {"attributeOrStyleName":{"@binding":"bindingExpression"}
+ NSString *bindingExpression = binding[WXBindingIdentify];
+ WXJSASTParser *parser = [WXJSASTParser parserWithScript:bindingExpression];
+ WXJSExpression *expression = [parser parseExpression];
+ WXDataBindingBlock block = [self bindingBlockWithExpression:expression];
+ bindingMap[name] = block;
+ } else if ([binding isKindOfClass:[NSArray class]]) {
+ // {"attributeOrStyleName":[..., "string", {"@binding":"bindingExpression"}, "string", {"@binding":"bindingExpression"}, ...]
+ NSMutableDictionary *bindingBlocksForIndex = [NSMutableDictionary dictionary];
+ __block BOOL isBinding = NO;
+ [binding enumerateObjectsUsingBlock:^(id _Nonnull bindingInArray, NSUInteger idx, BOOL * _Nonnull stop) {
+ if ([bindingInArray isKindOfClass:[NSDictionary class]] && bindingInArray[WXBindingIdentify]) {
+ isBinding = YES;
+ NSString *bindingExpression = bindingInArray[WXBindingIdentify];
+ WXJSASTParser *parser = [WXJSASTParser parserWithScript:bindingExpression];
+ WXJSExpression *expression = [parser parseExpression];
+ WXDataBindingBlock block = [self bindingBlockWithExpression:expression];
+ bindingBlocksForIndex[@(idx)] = block;
+ }
+ }];
+
+ bindingMap[name] = ^id(NSDictionary *data, BOOL *needUpdate) {
+ NSMutableArray *newArray = [binding mutableCopy];
+ [binding enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+ BOOL _needUpdate = NO;
+ WXDataBindingBlock block = bindingBlocksForIndex[@(idx)];
+ if (block) {
+ id newValue = block(data, &_needUpdate);
+ if (newValue) {
+ newArray[idx] = newValue;
+ }
+ if (_needUpdate) {
+ *needUpdate = YES;
+ }
+ }
+ }];
+
+ return type == WXDataBindingTypeEvents ? newArray : [newArray componentsJoinedByString:@""];
+ };
+ }
+
+ if (type == WXDataBindingTypeAttributes) {
+ if ([WXBindingMatchIdentify isEqualToString:name]) {
+ WXJSASTParser *parser = [WXJSASTParser parserWithScript:binding];
+ WXJSExpression *expression = [parser parseExpression];
+ _bindingMatch = [self bindingBlockWithExpression:expression];
+ } else if ([WXBindingRepeatIdentify isEqualToString:name]) {
+ WXJSASTParser *parser = [WXJSASTParser parserWithScript:binding[WXBindingRepeatExprIdentify]];
+ WXJSExpression *expression = [parser parseExpression];
+ _bindingRepeat = [self bindingBlockWithExpression:expression];
+ _repeatIndexIdentify = binding[WXBindingRepeatIndexIdentify];
+ _repeatLabelIdentify = binding[WXBindingRepeatLabelIdentify];
+ }
+ }
+ }];
+}
+
+- (WXDataBindingBlock)bindingBlockWithExpression:(WXJSExpression *)expression
+{
+ if (!expression) {
+ return nil;
+ }
+ WXDataBindingBlock block = ^id(NSDictionary *data, BOOL *needUpdate) {
+ if (expression->is<WXJSStringLiteral>()) {
+ *needUpdate = NO;
+ return [NSString stringWithCString:(((WXJSStringLiteral *)expression)->value).c_str() encoding:[NSString defaultCStringEncoding]];
+ } else if (expression->is<WXJSNumericLiteral>()) {
+ *needUpdate = NO;
+ return @(((WXJSNumericLiteral *)expression)->value);
+ } else if (expression->is<WXJSBooleanLiteral>()) {
+ *needUpdate = NO;
+ return @(((WXJSBooleanLiteral *)expression)->value);
+ } else if (expression->is<WXJSNullLiteral>()) {
+ *needUpdate = NO;
+ return nil;
+ } else if (expression->is<WXJSIdentifier>()) {
+ NSString *identiferName = [NSString stringWithCString:(((WXJSIdentifier *)expression)->name).c_str() encoding:[NSString defaultCStringEncoding]];
+ if (data[identiferName]) {
+ *needUpdate = YES;
+ return data[identiferName];
+ } else {
+ WXLogError(@"identifer:%@ not found", identiferName);
+ return nil;
+ }
+ } else if (expression->is<WXJSMemberExpression>()) {
+ WXJSMemberExpression *member = (WXJSMemberExpression *)expression;
+ BOOL objectNeedUpdate = NO, propertyNeedUpdate = NO;
+ id object = [self bindingBlockWithExpression:member->object](data, &objectNeedUpdate);
+ if (member->computed) {
+ id propertyName = [self bindingBlockWithExpression:member->property](data, &propertyNeedUpdate);
+ *needUpdate = objectNeedUpdate || propertyNeedUpdate;
+ if ([object isKindOfClass:[NSDictionary class]] && [propertyName isKindOfClass:[NSString class]]) {
+ return object[propertyName];
+ } else if ([object isKindOfClass:[NSArray class]] && [propertyName isKindOfClass:[NSNumber class]]) {
+ return [object objectAtIndex:[propertyName unsignedIntegerValue]];
+ }
+ } else {
+ NSString *propertyName = [NSString stringWithCString:(((WXJSStringLiteral *)member->property)->value).c_str() encoding:[NSString defaultCStringEncoding]];
+ *needUpdate = objectNeedUpdate;
+ return object[propertyName];
+ }
+
+ return nil;
+ } else if (expression->is<WXJSArrayExpression>()) {
+ WXJSArrayExpression *expr = (WXJSArrayExpression *)expression;
+ std::vector<WXJSExpression *> expressions = expr->expressions;
+ NSMutableArray *array = [NSMutableArray array];
+ for(WXJSExpression *expr : expressions) {
+ if (expr == NULL) {
+ continue;
+ }
+ WXDataBindingBlock block = [self bindingBlockWithExpression:expr];
+ *needUpdate = NO;
+ if (block) {
+ BOOL elementNeedUpdate;
+ id object = block(data, &elementNeedUpdate);
+ if (object) {
+ *needUpdate = *needUpdate || elementNeedUpdate;
+ [array addObject:object];
+ }
+ }
+ }
+
+ return array;
+ } else if (expression->is<WXJSUnaryExpression>()) {
+ WXJSUnaryExpression *expr = (WXJSUnaryExpression *)expression;
+ std::string operator_ = expr->operator_;
+ id argument = [self bindingBlockWithExpression:expr->argument](data, needUpdate);
+ if (operator_ == "+") {
+ return @([argument doubleValue]);
+ } else if (operator_ == "-") {
+ return @(-[argument doubleValue]);
+ } else if (operator_ == "!") {
+ return @(![argument boolValue]);
+ } else {
+ WXLogError(@"Not supported unary operator:%s", operator_.c_str());
+ return nil;
+ }
+ } else if (expression->is<WXJSBinaryExpression>()) {
+ WXJSBinaryExpression *expr = (WXJSBinaryExpression *)expression;
+ std::string operator_ = expr->operator_;
+ BOOL leftNeedUpdate = NO, rightNeedUpdate = NO;
+ id left = [self bindingBlockWithExpression:expr->left](data, &leftNeedUpdate);
+ id right = [self bindingBlockWithExpression:expr->right](data, &rightNeedUpdate);
+ *needUpdate = leftNeedUpdate || rightNeedUpdate;
+ if (operator_ == "+") {
+ return @([left doubleValue] + [right doubleValue]);
+ } else if (operator_ == "-") {
+ return @([left doubleValue] - [right doubleValue]);
+ } else if (operator_ == "*") {
+ return @([left doubleValue] * [right doubleValue]);
+ } else if (operator_ == "/") {
+ return @([left doubleValue] / [right doubleValue]);
+ } else if (operator_ == "%") {
+ return @([left integerValue] % [right integerValue]);
+ } else if (operator_ == ">") {
+ return @([left doubleValue] > [right doubleValue]);
+ } else if (operator_ == ">=") {
+ return @([left doubleValue] >= [right doubleValue]);
+ } else if (operator_ == "<") {
+ return @([left doubleValue] < [right doubleValue]);
+ } else if (operator_ == "<=") {
+ return @([left doubleValue] <= [right doubleValue]);
+ } else if (operator_ == "===" || operator_ == "==") {
+ if ([left isKindOfClass:[NSString class]]) {
+ return @([left isEqualToString:right]);
+ } else if ([left isKindOfClass:[NSNumber class]]) {
+ return @([left doubleValue] == [right doubleValue]);
+ } else {
+ WXLogError(@"Wrong type %@ at left of '===' or '=='", NSStringFromClass([left class]));
+ return nil;
+ }
+ } else if (operator_ == "!==" || operator_ == "!=") {
+ if ([left isKindOfClass:[NSString class]]) {
+ return @(![left isEqualToString:right]);
+ } else if ([left isKindOfClass:[NSNumber class]]) {
+ return @([left doubleValue] != [right doubleValue]);
+ } else {
+ WXLogError(@"Wrong type %@ at left of '!==' or '!='", NSStringFromClass([left class]));
+ return nil;
+ }
+ } else if (operator_ == "||") {
+ return @([left boolValue] || [right boolValue]);
+ } else if (operator_ == "&&") {
+ return @([left boolValue] && [right boolValue]);
+ } else {
+ WXLogError(@"Not supported binary operator:%s", operator_.c_str());
+ return nil;
+ }
+ } else if (expression->is<WXJSConditionalExpression>()) {
+ WXJSConditionalExpression *conditional = (WXJSConditionalExpression *)expression;
+ BOOL testNeedUpdate = NO, conditionalNeedUpdate = NO, alternateNeedUpdate = NO;
+ id testResult = [self bindingBlockWithExpression:conditional->test](data, &testNeedUpdate);
+ id result;
+ if ([testResult boolValue]) {
+ result = [self bindingBlockWithExpression:conditional->consequent](data, &conditionalNeedUpdate);
+ } else {
+ result = [self bindingBlockWithExpression:conditional->alternate](data, &alternateNeedUpdate);
+ }
+ *needUpdate = testNeedUpdate || conditionalNeedUpdate || alternateNeedUpdate;
+ return result;
+ } else {
+ WXAssert(NO, @"expression type error");
+ return nil;
+ }
+ };
+
+ return block;
+}
+
+@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b99cc6b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXJSASTParser.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXJSASTParser.h b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXJSASTParser.h
new file mode 100644
index 0000000..76ebff3
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXJSASTParser.h
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#include <string>
+#include <vector>
+
+typedef enum : NSUInteger {
+ WXJSExpressionTypeUnary,
+ WXJSExpressionTypeBinary,
+ WXJSExpressionTypeBinaryConditional,
+} WXJSExpressionType;
+
+struct WXJSExpression {
+ virtual ~WXJSExpression() {}
+ template <class T> bool is() {
+ return dynamic_cast<T *>(this) != NULL;
+ }
+};
+
+struct WXJSLiteral :WXJSExpression {
+};
+
+struct WXJSNullLiteral : WXJSLiteral {
+};
+
+struct WXJSStringLiteral : WXJSLiteral {
+ std::string value;
+};
+
+struct WXJSNumericLiteral : WXJSLiteral {
+ double value;
+};
+
+struct WXJSBooleanLiteral : WXJSLiteral {
+ bool value;
+};
+
+struct WXJSIdentifier : WXJSExpression {
+ std::string name;
+};
+
+struct WXJSMemberExpression : WXJSExpression {
+ WXJSExpression *object;
+ WXJSExpression *property;
+ bool computed;
+};
+
+struct WXJSArrayExpression : WXJSExpression {
+ std::vector<WXJSExpression *> expressions;
+};
+
+struct WXJSUnaryExpression : WXJSExpression {
+ std::string operator_;
+ bool prefix;
+ WXJSExpression *argument;
+};
+
+struct WXJSBinaryExpression : WXJSExpression {
+ std::string operator_;
+ WXJSExpression *left;
+ WXJSExpression *right;
+};
+
+struct WXJSLogicalExpression : WXJSExpression {
+ std::string operator_;
+ WXJSExpression *left;
+ WXJSExpression *right;
+};
+
+struct WXJSConditionalExpression : WXJSExpression {
+ WXJSExpression *test;
+ WXJSExpression *alternate;
+ WXJSExpression *consequent;
+};
+
+
+@interface WXJSASTParser : NSObject
+
++ (instancetype)parserWithScript:(NSString *)script;
+
+- (WXJSExpression *)parseExpression;
+
+@end