[GitHub] incubator-weex pull request #539: +[ios] recyclerComponent add drag method
Github user cxfeng1 commented on a diff in the pull request: https://github.com/apache/incubator-weex/pull/539#discussion_r129747806 --- Diff: ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m --- @@ -89,6 +96,15 @@ @interface WXRecyclerComponent ()
[GitHub] incubator-weex pull request #539: +[ios] recyclerComponent add drag method
Github user cxfeng1 commented on a diff in the pull request: https://github.com/apache/incubator-weex/pull/539#discussion_r129747478 --- Diff: ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m --- @@ -655,6 +707,166 @@ - (void)fixFlicker }); } +#pragma mark - dragMethod +- (void)longPressMethod:(UILongPressGestureRecognizer*)gesture +{ +if (_isDragable) { +switch (gesture.state) { +case UIGestureRecognizerStateBegan: +[self dragBegin:gesture]; +break; +case UIGestureRecognizerStateChanged: +[self dragChanged:gesture]; +break; +case UIGestureRecognizerStateEnded: +[self dragEnd:gesture]; +break; +default: +break; +} +} +} + +- (void)dragBegin:(UILongPressGestureRecognizer *)gesture{ + +CGPoint point = [gesture locationInView:_collectionView]; + +_startIndexPath = [self getDragingIndexPathWithPoint:point]; +if (!_startIndexPath) { +return; +} + +[self fireEvent:@"dragstart" params:@{@"fromIndex":[NSString stringWithFormat:@"%ld",(long)_startIndexPath.row]}]; + +_dragingIndexPath = [self getDragingIndexPathWithPoint:point]; +if (!_dragingIndexPath) { +return; +} + +[_collectionView bringSubviewToFront:_dragingCell]; +_dragingCell.frame = [_collectionView cellForItemAtIndexPath:_dragingIndexPath].frame; +_dragingCell.hidden = false; +[UIView animateWithDuration:0.3 animations:^{ +[_dragingCell setTransform:CGAffineTransformMakeScale(1.2, 1.2)]; +}]; +} + +- (void)dragChanged:(UILongPressGestureRecognizer *)gesture{ + +if (!_startIndexPath) { +return; +} +CGPoint point = [gesture locationInView:_collectionView]; +_dragingCell.center = point; +_targetIndexPath = [self getTargetIndexPathWithPoint:point]; + +if (_targetIndexPath && _dragingIndexPath && (_targetIndexPath.section == _startIndexPath.section)){ +[_collectionView moveItemAtIndexPath:_dragingIndexPath toIndexPath:_targetIndexPath]; +_dragingIndexPath = _targetIndexPath; +} +} + +- (void)dragEnd:(UILongPressGestureRecognizer *)gesture{ + +if (!_startIndexPath || !_dragingIndexPath) { +return; +} + +[self fireEvent:@"dragend" params:@{@"toIndex":[NSString stringWithFormat:@"%ld",(long)_dragingIndexPath.row],@"fromIndex":[NSString stringWithFormat:@"%ld",(long)_startIndexPath.row]}]; + +CGRect endFrame = [_collectionView cellForItemAtIndexPath:_dragingIndexPath].frame; + +__weak typeof(self) weakSelf = self; +[UIView animateWithDuration:0.3 animations:^{ +[weakSelf.dragingCell setTransform:CGAffineTransformMakeScale(1.0, 1.0)]; +weakSelf.dragingCell.frame = endFrame; +} completion:^(BOOL finished) { +weakSelf.dragingCell.hidden = YES; +NSMutableArray *oldComponents = [[NSMutableArray alloc] initWithArray:weakSelf.dataController.sections[weakSelf.startIndexPath.section].cellComponents]; +if(oldComponents.count > 1){ +WXCellComponent *startComponent = weakSelf.dataController.sections[weakSelf.startIndexPath.section].cellComponents[weakSelf.startIndexPath.item]; +[oldComponents removeObject:startComponent]; +[oldComponents insertObject:startComponent atIndex:weakSelf.targetIndexPath.item]; + weakSelf.dataController.sections[weakSelf.startIndexPath.section].cellComponents = oldComponents; +} +}]; +} + +- (NSIndexPath *)getDragingIndexPathWithPoint:(CGPoint)point{ +NSIndexPath *dragingIndexPath = nil; +for (NSIndexPath *indexPath in [_collectionView indexPathsForVisibleItems]){ +if (CGRectContainsPoint([_collectionView cellForItemAtIndexPath:indexPath].frame,point)) { +dragingIndexPath = indexPath; +break; +} +} + +BOOL isExcluded = NO; +if (dragingIndexPath) { +for (NSIndexPath *indexPath in _excludedAry) { +if (indexPath.row == dragingIndexPath.row) { +isExcluded = YES; +} +} +} +return isExcluded?nil:dragingIndexPath; +} + +- (NSIndexPath *)getTargetIndexPathWithPoint:(CGPoint)point{ +NSIndexPath *targetIndexPath = nil; +for (NSIndexPath *indexPath in _collectionView.indexPathsForVisibleItems) { +if (CGRectContainsPoint([_collectionView
[GitHub] incubator-weex pull request #582: + [android] ignore set index when current ...
GitHub user misakuo opened a pull request: https://github.com/apache/incubator-weex/pull/582 + [android] ignore set index when current index not zero @notdanger You can merge this pull request into a Git repository by running: $ git pull https://github.com/misakuo/incubator-weex android-bugfix-init-index Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/582.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #582 commit 43c5fdfdbdec57d1dc243b18eb0f3f2c82033844 Author: misakuoDate: 2017-08-07T02:45:50Z + [android] ignore set index when current index not zero @notdanger --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex issue #518: + [ios] update input number type; change nsassert...
Github user mlcldh commented on the issue: https://github.com/apache/incubator-weex/pull/518 @acton393 æä»¬å ¬å¸webå端åçweex页é¢ï¼å¾å¾æå¼ä¸æ¬¡ï¼å åå¢é¿ä¸æ¬¡ï¼æ¹åweex页é¢åå å并没æåå°ï¼æ们çviewcontrollerå·²ç»éæ¾äºï¼æ们çweex viewcontroller deallocæ¶è®©instanceæ§è¡äºdestroyInstanceæ¹æ³ãå´©æºæ¥å¿ç»è®¡å¯ä»¥å¼æå¯éçï¼ä½ 们å¯ä»¥åªç»è®¡weexç¸å ³çå´©æºã --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation
Github user kfeagle commented on a diff in the pull request: https://github.com/apache/incubator-weex/pull/581#discussion_r131900391 --- Diff: ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h --- @@ -214,3 +251,11 @@ - (void)setGradientLayer; @end + +@interface WXLayoutAnimationInfo : NSObject +@property (nonatomic, strong) id fromValue; --- End diff -- use for CGfloat, maybe assign is better? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex issue #581: + [ios] LayoutAnimation
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/581 Fails :no_entry_sign: This PR modify SDK code. Please add/modify corresponding testcases. If it is ok, please comment about it. Or put '@notdanger' in you commit message. Warnings :warning: No Changelog changes! :warning: This PR should update related documents as well. Messages :book: According to the blame info, we recommended @bluebird78999 , @cxfeng1 to be the reviewers. Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex pull request #581: + [ios] LayoutAnimation
GitHub user doumafang opened a pull request: https://github.com/apache/incubator-weex/pull/581 + [ios] LayoutAnimation Layout Animation Base on CADisplayLinkï¼to create generated frame animation. You can merge this pull request into a Git repository by running: $ git pull https://github.com/doumafang/incubator-weex ios-feature-layoutanimation-0.16dev Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/581.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #581 commit 6bd86e5625bff1310a48244fd2c74db307b9314e Author: doumafangDate: 2017-08-08T12:31:03Z + [ios] LayoutAnimation --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex issue #580: +[ios] add more info for tracing
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/580 Fails :no_entry_sign: This PR modify SDK code. Please add/modify corresponding testcases. If it is ok, please comment about it. Or put '@notdanger' in you commit message. Warnings :warning: No Changelog changes! :warning: This PR should update related documents as well. Messages :book: According to the blame info, we recommended @boboning , @cxfeng1 to be the reviewers. Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex pull request #580: +[ios] add more info for tracing
GitHub user kfeagle opened a pull request: https://github.com/apache/incubator-weex/pull/580 +[ios] add more info for tracing +[ios] add more info for tracing You can merge this pull request into a Git repository by running: $ git pull https://github.com/kfeagle/incubator-weex ios-devtools-tracing-0.16-dev Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/580.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #580 commit e4e0f491569da13429f8d2d3cce70e0917f7ddc2 Author: é½å±±Date: 2017-07-31T03:23:13Z + [ios] if not set , set weex default commit 4b80dac218e41490e447978e03005a275cbad639 Author: é½å±± Date: 2017-08-04T07:40:37Z + [ios] update tracing logic --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex issue #579: * [ios] update wxtestdemo
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/579 Warnings :warning: No Changelog changes! Messages :book: According to the blame info, we recommended @boboning , @acton393 to be the reviewers. Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex pull request #579: * [ios] update wxtestdemo
GitHub user gurisxie opened a pull request: https://github.com/apache/incubator-weex/pull/579 * [ios] update wxtestdemo You can merge this pull request into a Git repository by running: $ git pull https://github.com/gurisxie/incubator-weex 0.16-dev Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/579.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #579 commit 027f8a14635bff03e1ec534338157ff7dc385f1c Author: gurisxie <279483...@qq.com> Date: 2017-08-08T09:31:08Z * [ios] update wxtestdemo --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex pull request #550: [jsfm] Fix potential memory leak in callba...
Github user Hanks10100 closed the pull request at: https://github.com/apache/incubator-weex/pull/550 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex issue #550: [jsfm] Fix potential memory leak in callbacks
Github user Hanks10100 commented on the issue: https://github.com/apache/incubator-weex/pull/550 It's already merged in #559 . --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[22/39] incubator-weex git commit: + [build] add weex-js-framework and weex-js-runtime packages
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0d8f8595/packages/weex-js-framework/index.min.js -- diff --git a/packages/weex-js-framework/index.min.js b/packages/weex-js-framework/index.min.js new file mode 100644 index 000..4cdd4d8 --- /dev/null +++ b/packages/weex-js-framework/index.min.js @@ -0,0 +1 @@ +(this.nativeLog||function(e){console.log(e)})("START JS FRAMEWORK 0.20.6, Build 2017-08-01 19:09."),this.getJSFMVersion=function(){return"0.20.6"};var global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&?define(t):t()}(0,function(){"use strict";function e(e){return e&__esModule?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function n(){ga.forEach(function(e){var t=ga.indexOf(e);ba[e]={},ga.forEach(function(n){ga.indexOf(n)<=t&&(ba[e][n]=!0)})})}function r(e){var t=global.WXEnvironment&||"log";return ba[t]&[t][e]}function o(e){return e.map(function(e){return e="[object object]"===Object.prototype.toString.call(e).toLowerCase()?JSON.stringify(e):String(e)})}function i(){if(void 0===setTimeout&&"function"==typeof Oa){var e={},t=0;global.setTimeout=function(n,r){e[++t]=n,Oa(t.toString(),r)},global.setTimeoutCa llback=function(t){"function"==typeof e[t]&&(e[t](),delete e[t])}}}function a(){Object.freeze(Object),Object.freeze(Array),s(),Object.freeze(Array.prototype),Object.freeze(String.prototype),Object.freeze(Number.prototype),Object.freeze(Boolean.prototype),u(),Object.freeze(Date.prototype),Object.freeze(RegExp.prototype)}function s(){var e=Object.prototype,t="Object.prototype";c(e,"__defineGetter__",t),c(e,"__defineSetter__",t),c(e,"__lookupGetter__",t),c(e,"__lookupSetter__",t),c(e,"constructor",t),c(e,"hasOwnProperty",t),c(e,"isPrototypeOf",t),c(e,"propertyIsEnumerable",t),c(e,"toLocaleString",t),c(e,"toString",t),c(e,"valueOf",t),Object.seal(e)}function u(){var e=Error.prototype,t="Error.prototype";c(e,"name",t),c(e,"message",t),c(e,"toString",t),c(e,"constructor",t),Object.seal(e)}function c(e,t,n){if(e.hasOwnProperty(t)){var r=e[t];Object.defineProperty(e,t,{get:function(){return r},set:function(r){if(this===e)throw Error("Cannot assign to read only property "+t+" of "+n);return Object.defineProperty(this,t,{value:r,writable:!0}),r}})}}function l(e,t){e&&(xa[e]=t)}function f(e){return xa[e]}function p(e){delete xa[e]}function d(e){var t=xa[e];return t&?t.taskCenter:null}function h(){return(Ca++).toString()}function v(e,t,n){var r=e.documentElement;if(!(r.pureChildren.length>0||t.parentNode)){var o=r.children,i=o.indexOf(n);i<0?o.push(t):o.splice(i,0,t),1===t.nodeType?("body"===t.role?(t.docId=e.id,t.ownerDocument=e,t.parentNode=r,_(t,r)):(t.children.forEach(function(e){e.parentNode=t}),y(e,t),t.docId=e.id,t.ownerDocument=e,_(t,r),delete e.nodeMap[t.nodeId]),r.pureChildren.push(t),m(e,t)):(t.parentNode=r,e.nodeMap[t.ref]=t)}}function m(e,t){var n=t.toJSON(),r=n.children;delete n.children;var o=e.taskCenter.send("dom",{action:"createBody"},[n]);return r&(function(t){o=e.taskCenter.send("dom",{action:"addElement"},[n.ref,t,-1])}),o}function y(e,t){t.role="body",t.depth=1,delete e.nodeMap[t.nodeId],t.ref="_root",e.nodeMap._root=t,e.body=t }function _(e,t){e.parentNode=t,t.docId&&(e.docId=t.docId,e.ownerDocument=t.ownerDocument,e.ownerDocument.nodeMap[e.nodeId]=e,e.depth=t.depth+1),e.children.forEach(function(t){_(t,e)})}function g(e){for(;e;){if(1===e.nodeType)return e;e=e.nextSibling}}function b(e){for(;e;){if(1===e.nodeType)return e;e=e.previousSibling}}function w(e,t,n,r){n<0&&(n=0);var o=t[n-1],i=t[n];return t.splice(n,0,e),r&&(o&&(o.nextSibling=e),e.previousSibling=o,e.nextSibling=i,i&&(i.previousSibling=e)),n}function E(e,t,n,r){var o=t.indexOf(e);if(o<0)return-1;if(r){var i=t[o-1],a=t[o+1];i&&(i.nextSibling=a),a&&(a.previousSibling=i)}t.splice(o,1);var s=n;o<=n&&(s=n-1);var u=t[s-1],c=t[s];return t.splice(s,0,e),r&&(u&&(u.nextSibling=e),e.previousSibling=u,e.nextSibling=c,c&&(c.previousSibling=e)),o===s?-1:n}function O(e,t,n){var r=t.indexOf(e);if(!(r<0)){if(n){var o=t[r-1],i=t[r+1];o&&(o.nextSibling=i),i&&(i.previousSibling=o)}t.splice(r,1)}}function S(){this.nodeId=h(),this.ref=this.nodeId,this.children=[],t his.pureChildren=[],this.parentNode=null,this.nextSibling=null,this.previousSibling=null}function x(e,t){if(t&){var n=function(t){ka.call(this,e,t,!0)};n.prototype=Object.create(ka.prototype),Object.defineProperty(n.prototype,"constructor",{configurable:!1,enumerable:!1,writable:!1,value:ka}),t.forEach(function(t){n.prototype[t]=function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var o=d(this.docId);if(o)return o.send("component",{ref:this.ref,component:e,method:t},n)}}),ja[e]=n}}function C(e,t,n){void 0===e&&(e=Aa);var r=ja[e];if(r&&!n)return new
[25/39] incubator-weex git commit: * [build] support to release weex-legacy-framework
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5aa1517a/packages/weex-legacy-framework/index.min.js -- diff --git a/packages/weex-legacy-framework/index.min.js b/packages/weex-legacy-framework/index.min.js new file mode 100644 index 000..b77094a --- /dev/null +++ b/packages/weex-legacy-framework/index.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&?define(["exports"],t):t(e.WeexVanillaFramework=e.WeexVanillaFramework||{})}(this,function(e){"use strict";function t(e){for(var r=[],n=arguments.length-1;n-- >0;)r[n]=arguments[n+1];if("function"==typeof Object.assign)Object.assign.apply(Object,[e].concat(r));else{var o=r.shift();for(var i in o)e[i]=o[i];r.length&(void 0,[e].concat(r))}return e}function r(e,t,r,n){Object.defineProperty(e,t,{value:r,enumerable:!!n,writable:!0,configurable:!0})}function n(e,t){if(e.length){var r=e.indexOf(t);if(r>-1)return e.splice(r,1)}}function o(e,t){return ut.call(e,t)}function i(e,t){return function(r){var n=arguments.length;return n?n>1?e.apply(t,arguments):e.call(t,r):e.call(t)}}function a(e){return null!==e&&"object"==typeof e}function s(e){return lt.call(e)===pt}function c(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function u(){return"object"==typeof nativeSet? nativeSet.create():new st}function l(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1).toLowerCase()}function p(e){return e.replace(ht,"").replace(dt,"")}function f(e){return e.replace(mt,"")}function h(){this.id=bt++,this.subs=[]}function d(e){h.target&(h.target),h.target=e}function v(){h.target=kt.pop()}function m(){h.target=null,kt=[]}function y(e,r,n,o){o&(this,o);var i="function"==typeof r;this.vm=e,e._watchers.push(this),this.expression=r,this.cb=n,this.id=++Et,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=u(),this.newDepIds=u(),i&&(this.getter=r),this.value=this.lazy?void 0:this.get(),this.queued=this.shallow=!1}function g(e,t){var r,n,o,i;if(t||(t=St).clear(),o=Array.isArray(e),i=a(e),o||i){if(e.__ob__){var s=e.__ob__.dep.id;if(t.has(s))return;t.add(s)}if(o)for(r=e.length;r--;)g(e[r],t);else if(i)for(r=(n=Object.keys(e)).length;r--;)g(e[n[r]],t)}}function w(e){this.value=e,this.dep=new h,r(e,"__ob__",this),Ar ray.isArray(e)?((ft?_:b)(e,$t,xt),this.observeArray(e)):this.walk(e)}function _(e,t){e.__proto__=t}function b(e,t,n){for(var o=0,i=n.length;o-1||!c(t))&(e,t,{configurable:!0,enumerable:!0,get:function(){return e._data[t]},set:function(r){e._data[t]=r}})}function $(e,t){c(t)||delete e[t]}function x(e){e._watchers=[],O(e),C(e),F(e)}function O(e){var t=e._data;s(t)||(t={});for(var r=Object.keys(t),n=r.length;n--;)j(e,r[n]);k(t,e)}function M(){}function C(e){var t=e._computed;if(t)for(var r in t){var n=t[r],o={enumerable:!0,configurable:!0};"function"==typeof n?(o.get=V(n,e),o.set=M):(o.get=n.get?!1!==n.cache?V(n.get,e):i(n.get,e):M,o.set=n.set?i(n.set,e):M),Object.defineProperty(e,r,o)}}function V(e,t){var r=new y(t,e,null,{lazy:!0});return function(){return r.dirty&(),h.target&(),r.value}}function F(e){var t=e._methods;if(t)for(var r in t)e[r]=t[r]}function T(e){var t=e.type,r=Ct[t];if("object"==typeof r)for(var n in r)if(null==e[n])e[n]=r[n];else if("object"===l(e[n])&&"object"===l(r[n]))for(var o in r[n])n ull==e[n][o]&&(e[n][o]=r[n][o])}function A(e,t,r){q(e,t,r.id,e),B(e,t,r.attr),z(e,t,r.classList),L(e,t,r.style),U(e,t,r.events)}function I(e,t,r,n){t=t||{},r=r||{};var o=(t._options||{}).props;Array.isArray(o)&&(o=o.reduce(function(e,t){return e[t]=!0,e},{})),D(n,o,e,t),D(r.attr,o,e,t)}function J(e,t,r,n){void 0===n&&(n={}),P(r.classList,e,t),R(r.style,e,t),n.children?n.children[n.children.length-1]._vm=t:n._vm=t}function D(e,t,r,n){if(e){for(var o in e)!function(o){if(!t||t[o]){var i=e[o];if("function"==typeof i){var a=Z(r,i,function(e){n[o]=e});n[o]=a}else n[o]=i}}(o)}}function R(e,t,r){for(var n in e)!function(n){var o=e[n];if("function"==typeof
[23/39] incubator-weex git commit: + [build] add weex-js-framework and weex-js-runtime packages
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0d8f8595/packages/weex-js-framework/index.js -- diff --git a/packages/weex-js-framework/index.js b/packages/weex-js-framework/index.js new file mode 100644 index 000..21afb62 --- /dev/null +++ b/packages/weex-js-framework/index.js @@ -0,0 +1,25150 @@ +(this.nativeLog || function(s) {console.log(s)})('START JS FRAMEWORK 0.20.6, Build 2017-08-01 19:09.'); +;(this.getJSFMVersion = function(){return "0.20.6"}); +var global = this, process = { env: {} };var setTimeout = global.setTimeout; + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory() : + typeof define === 'function' && define.amd ? define(factory) : + (factory()); +}(this, (function () { 'use strict'; + +var subversion = {"browser":"0.5.0","framework":"0.20.6","vue-render":"0.12.1","transformer":">=0.1.5 <0.5"}; + +/* + * 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. + */ + +/* eslint-disable */ + +// Production steps of ECMA-262, Edition 6, 22.1.2.1 +// Reference: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from + +/* istanbul ignore if */ +if (!Array.from) { + Array.from = (function() { +var toStr = Object.prototype.toString; +var isCallable = function(fn) { + return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; +}; +var toInteger = function(value) { + var number = Number(value); + if (isNaN(number)) { +return 0; + } + if (number === 0 || !isFinite(number)) { +return number; + } + return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); +}; +var maxSafeInteger = Math.pow(2, 53) - 1; +var toLength = function(value) { + var len = toInteger(value); + return Math.min(Math.max(len, 0), maxSafeInteger); +}; + +// The length property of the from method is 1. +return function from(arrayLike/*, mapFn, thisArg */) { + // 1. Let C be the this value. + var C = this; + + // 2. Let items be ToObject(arrayLike). + var items = Object(arrayLike); + + // 3. ReturnIfAbrupt(items). + if (arrayLike == null) { +throw new TypeError('Array.from requires an array-like object - not null or undefined'); + } + + // 4. If mapfn is undefined, then let mapping be false. + var mapFn = arguments.length > 1 ? arguments[1] : void undefined; + var T; + if (typeof mapFn !== 'undefined') { +// 5. else +// 5. a If IsCallable(mapfn) is false, throw a TypeError exception. +if (!isCallable(mapFn)) { + throw new TypeError('Array.from: when provided, the second argument must be a function'); +} + +// 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined. +if (arguments.length > 2) { + T = arguments[2]; +} + } + + // 10. Let lenValue be Get(items, "length"). + // 11. Let len be ToLength(lenValue). + var len = toLength(items.length); + + // 13. If IsConstructor(C) is true, then + // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len. + // 14. a. Else, Let A be ArrayCreate(len). + var A = isCallable(C) ? Object(new C(len)) : new Array(len); + + // 16. Let k be 0. + var k = 0; + // 17. Repeat, while k < len⦠(also steps a - h) + var kValue; + while (k < len) { +kValue = items[k]; +if (mapFn) { + A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k); +} else { + A[k] = kValue; +} +k += 1; + } + // 18. Let putStatus be Put(A, "length", len, true). + A.length = len; + // 20. Return A. + return A; +}; + }()); +} + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + + +function unwrapExports (x) { + return x && x.__esModule ? x['default'] : x; +} + +function createCommonjsModule(fn,
[33/39] incubator-weex git commit: * [jsfm] upgrade jsfm to 0.21.6 in pre-build
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/05ccde90/pre-build/native-bundle-main.js -- diff --git a/pre-build/native-bundle-main.js b/pre-build/native-bundle-main.js index e24c730..fa5c569 100644 --- a/pre-build/native-bundle-main.js +++ b/pre-build/native-bundle-main.js @@ -1,8 +1,8 @@ -(this.nativeLog||function(e){console.log(e)})("START JS FRAMEWORK 0.21.4, Build 2017-07-26 11:48."),this.getJSFMVersion=function(){return"0.21.4"};var global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&?define(t):t()}(0,function(){"use strict";function e(e){Jn.Document=e.Document,Jn.Element=e.Element,Jn.Comment=e.Comment,Jn.sendTasks=e.sendTasks}function t(e){}function n(e){}function r(e){}function o(e,t,n){}function i(e,t,n,r,o){var i=new Jn.Document(e,n.bundleUrl),a={},s=0;i.addCallback=function(e){return s++,a[s]=e,s},i.handleCallback=function(e,t,n){var r=a[e];return n& a[e],r(t)},Hn[e]=i;var u=Object.assign({Document:Jn.Document,Element:Jn.Element,Comment:Jn.Comment,sendTasks:Jn.sendTasks,id:e,options:n,data:r,document:i},o),c=[],l=[];for(var f in u)c.push(f),l.push(u[f]);return c.push(t),(new(Function.prototype.bind.apply(Function,[null].concat(c.apply (void 0,l)}function a(e,t){}function s(e){delete Hn[e]}function u(e){return Hn[e].body.toJSON()}function c(e,t){var n={fireEvent:function(e,t,n,r,o){var i=Hn[e],a=i.getRef(t);return i.fireEvent(a,n,r,o)},callback:function(e,t,n,r){return Hn[e].handleCallback(t,n,r)}};if(Hn[e]&(t)){var r=[];return t.forEach(function(t){var o=n[t.method],i=[].concat(t.args);"function"==typeof o&&(i.unshift(e),r.push(o.apply(void 0,i)))}),r}}function l(e){return e&__esModule?e.default:e}function f(e,t){return t={exports:{}},e(t,t.exports),t.exports}function d(e){console.warn("[JS Framework] Vm#$ is deprecated, please use Vm#$vm instead");var t=this._ids[e];if(t)return t.vm}function p(e){var t=this._ids[e];if(t)return t.el}function h(e){var t=this._ids[e];if(t)return t.vm}function v(e){return this._app.differ.then(function(){e()})}function m(e,t){console.warn("[JS Framework] Vm#$scrollTo is deprecated, please use \"require('@weex-module/dom').scrollTo(el, options)\" instead");var n=this .$el(e);if(n){this._app.requireModule("dom").scrollToElement(n.ref,{offset:t})}}function y(e,t,n){var r=this,o=this.$el(e);if(o&&){this._app.requireModule("animation").transition(o.ref,t,function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];r._setStyle(o,t.styles),n&(void 0,e)})}}function _(e){var t=this._app.options;return"function"==typeof e&&(console.warn("[JS Framework] the callback of Vm#$getConfig(callback) is deprecated, this api now can directly RETURN config info."),e(t)),t}function g(e,t){console.warn("[JS Framework] Vm#$sendHttp is deprecated, please use \"require('@weex-module/stream').sendHttp(params, callback)\" instead"),this._app.requireModule("stream").sendHttp(e,t)}function b(e){console.warn("[JS Framework] Vm#$openURL is deprecated, please use \"require('@weex-module/event').openURL(url)\" instead"),this._app.requireModule("event").openURL(e)}function w(e){console.warn("[JS Framework] Vm#$setTitle is deprecated, please use \"require( '@weex-module/pageInfo').setTitle(title)\" instead"),this._app.requireModule("pageInfo").setTitle(e)}function O(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];console.warn("[JS Framework] Vm#$call is deprecated, please use \"require('@weex-module/moduleName')\" instead");var o=this._app.requireModule(e);o&[t]&[t].apply(o,n)}function E(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"==typeof Object.assign)Object.assign.apply(Object,[e].concat(t));else{var r=t.shift();for(var o in r)e[o]=r[o];t.length&(void 0,[e].concat(t))}return e}function x(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function S(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function C(e,t){return wr.call(e,t)}function k(e,t){return function(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}}function j(e){return null!==e&&"object"==typeof e}function A(e){retur n Or.call(e)===Er}function I(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function T(){return"object"==typeof nativeSet?nativeSet.create():new zn}function N(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1).toLowerCase()}function P(e){return e.replace(Sr,"").replace(Cr,"")}function M(e){return e.replace(jr,"")}function $(){this.id=Pr++,this.subs=[]}function R(e){$.target&($.target),$.target=e}function D(){$.target=Mr.pop()}function F(){$.target=null,Mr=[]}function L(e,t,n,r){r&(this,r);var o="function"==typeof
[GitHub] incubator-weex pull request #577: [jsfm] Upgrade jsfm to 0.21.7 in pre-build
Github user asfgit closed the pull request at: https://github.com/apache/incubator-weex/pull/577 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex pull request #561: [build] Modify the build scripts to releas...
Github user asfgit closed the pull request at: https://github.com/apache/incubator-weex/pull/561 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[35/39] incubator-weex git commit: * [jsfm] upgrade jsfm versions
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5c5b33dc/pre-build/native-bundle-main.js -- diff --git a/pre-build/native-bundle-main.js b/pre-build/native-bundle-main.js index fa5c569..4da6843 100644 --- a/pre-build/native-bundle-main.js +++ b/pre-build/native-bundle-main.js @@ -1,8 +1,8 @@ -(this.nativeLog||function(e){console.log(e)})("START JS FRAMEWORK 0.21.6, Build 2017-07-28 17:52."),this.getJSFMVersion=function(){return"0.21.6"};var global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&?define(t):t()}(0,function(){"use strict";function e(e){Jn.Document=e.Document,Jn.Element=e.Element,Jn.Comment=e.Comment,Jn.sendTasks=e.sendTasks}function t(e){}function n(e){}function r(e){}function o(e,t,n){}function i(e,t,n,r,o){var i=new Jn.Document(e,n.bundleUrl),a={},s=0;i.addCallback=function(e){return s++,a[s]=e,s},i.handleCallback=function(e,t,n){var r=a[e];return n& a[e],r(t)},Hn[e]=i;var u=Object.assign({Document:Jn.Document,Element:Jn.Element,Comment:Jn.Comment,sendTasks:Jn.sendTasks,id:e,options:n,data:r,document:i},o),c=[],l=[];for(var f in u)c.push(f),l.push(u[f]);return c.push(t),(new(Function.prototype.bind.apply(Function,[null].concat(c.apply (void 0,l),{document:i}}function a(e,t){}function s(e){delete Hn[e]}function u(e){return Hn[e].body.toJSON()}function c(e,t){var n={fireEvent:function(e,t,n,r,o){var i=Hn[e],a=i.getRef(t);return i.fireEvent(a,n,r,o)},callback:function(e,t,n,r){return Hn[e].handleCallback(t,n,r)}};if(Hn[e]&(t)){var r=[];return t.forEach(function(t){var o=n[t.method],i=[].concat(t.args);"function"==typeof o&&(i.unshift(e),r.push(o.apply(void 0,i)))}),r}}function l(e){return e&__esModule?e.default:e}function f(e,t){return t={exports:{}},e(t,t.exports),t.exports}function d(e){console.warn("[JS Framework] Vm#$ is deprecated, please use Vm#$vm instead");var t=this._ids[e];if(t)return t.vm}function p(e){var t=this._ids[e];if(t)return t.el}function h(e){var t=this._ids[e];if(t)return t.vm}function v(e){return this._app.differ.then(function(){e()})}function m(e,t){console.warn("[JS Framework] Vm#$scrollTo is deprecated, please use \"require('@weex-module/dom').scrollTo(el, options)\" instead ");var n=this.$el(e);if(n){this._app.requireModule("dom").scrollToElement(n.ref,{offset:t})}}function y(e,t,n){var r=this,o=this.$el(e);if(o&&){this._app.requireModule("animation").transition(o.ref,t,function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];r._setStyle(o,t.styles),n&(void 0,e)})}}function _(e){var t=this._app.options;return"function"==typeof e&&(console.warn("[JS Framework] the callback of Vm#$getConfig(callback) is deprecated, this api now can directly RETURN config info."),e(t)),t}function g(e,t){console.warn("[JS Framework] Vm#$sendHttp is deprecated, please use \"require('@weex-module/stream').sendHttp(params, callback)\" instead"),this._app.requireModule("stream").sendHttp(e,t)}function b(e){console.warn("[JS Framework] Vm#$openURL is deprecated, please use \"require('@weex-module/event').openURL(url)\" instead"),this._app.requireModule("event").openURL(e)}function w(e){console.warn("[JS Framework] Vm#$setTitle is deprecated, please u se \"require('@weex-module/pageInfo').setTitle(title)\" instead"),this._app.requireModule("pageInfo").setTitle(e)}function O(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];console.warn("[JS Framework] Vm#$call is deprecated, please use \"require('@weex-module/moduleName')\" instead");var o=this._app.requireModule(e);o&[t]&[t].apply(o,n)}function E(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"==typeof Object.assign)Object.assign.apply(Object,[e].concat(t));else{var r=t.shift();for(var o in r)e[o]=r[o];t.length&(void 0,[e].concat(t))}return e}function x(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function C(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function S(e,t){return pr.call(e,t)}function k(e,t){return function(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}}function j(e){return null!==e&&"object"==typeof e}functi on A(e){return hr.call(e)===vr}function I(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function T(){return"object"==typeof nativeSet?nativeSet.create():new zn}function N(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1).toLowerCase()}function P(e){return e.replace(yr,"").replace(_r,"")}function M(e){return e.replace(br,"")}function $(){this.id=Cr++,this.subs=[]}function R(e){$.target&($.target),$.target=e}function D(){$.target=Sr.pop()}function F(){$.target=null,Sr=[]}function L(e,t,n,r){r&(this,r);var o="function"==typeof
[GitHub] incubator-weex pull request #559: [jsfm] Merge jsfm 0.21 features into 0.16-...
Github user asfgit closed the pull request at: https://github.com/apache/incubator-weex/pull/559 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[26/39] incubator-weex git commit: * [build] support to release weex-legacy-framework
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5aa1517a/packages/weex-legacy-framework/index.js -- diff --git a/packages/weex-legacy-framework/index.js b/packages/weex-legacy-framework/index.js new file mode 100644 index 000..a2d9804 --- /dev/null +++ b/packages/weex-legacy-framework/index.js @@ -0,0 +1,5770 @@ +/* 'WEEX VANILLA FRAMEWORK 0.20.6, Build 2017-08-01 19:19. */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.WeexVanillaFramework = global.WeexVanillaFramework || {}))); +}(this, (function (exports) { 'use strict'; + +/* + * 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. + */ +/** + * @fileOverview The api for invoking with "$" prefix + */ + +/** + * @deprecated use $vm instead + * find the vm by id + * Note: there is only one id in whole component + * @param {string} id + * @return {Vm} + */ +function $ (id) { + console.warn('[JS Framework] Vm#$ is deprecated, please use Vm#$vm instead'); + var info = this._ids[id]; + if (info) { +return info.vm + } +} + +/** + * find the element by id + * Note: there is only one id in whole component + * @param {string} id + * @return {Element} + */ +function $el (id) { + var info = this._ids[id]; + if (info) { +return info.el + } +} + +/** + * find the vm of the custom component by id + * Note: there is only one id in whole component + * @param {string} id + * @return {Vm} + */ +function $vm (id) { + var info = this._ids[id]; + if (info) { +return info.vm + } +} + +/** + * Fire when differ rendering finished + * + * @param {Function} fn + */ +function $renderThen (fn) { + var app = this._app; + var differ = app.differ; + return differ.then(function () { +fn(); + }) +} + +/** + * scroll an element specified by id into view, + * moreover specify a number of offset optionally + * @param {string} id + * @param {number} offset + */ +function $scrollTo (id, offset) { + console.warn('[JS Framework] Vm#$scrollTo is deprecated, ' + + 'please use "require(\'@weex-module/dom\')' + + '.scrollTo(el, options)" instead'); + var el = this.$el(id); + if (el) { +var dom = this._app.requireModule('dom'); +dom.scrollToElement(el.ref, { offset: offset }); + } +} + +/** + * perform transition animation on an element specified by id + * @param {string} id + * @param {object} options + * @param {object} options.styles + * @param {object} options.duration(ms) + * @param {object} [options.timingFunction] + * @param {object} [options.delay=0(ms)] + * @param {Function} callback + */ +function $transition (id, options, callback) { + var this$1 = this; + + var el = this.$el(id); + if (el && options && options.styles) { +var animation = this._app.requireModule('animation'); +animation.transition(el.ref, options, function () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + this$1._setStyle(el, options.styles); + callback && callback.apply(void 0, args); +}); + } +} + +/** + * get some config + * @return {object} some config for app instance + * @property {string} bundleUrl + * @property {boolean} debug + * @property {object} env + * @property {string} env.weexVersion(ex. 1.0.0) + * @property {string} env.appName(ex. TB/TM) + * @property {string} env.appVersion(ex. 5.0.0) + * @property {string} env.platform(ex. iOS/Android) + * @property {string} env.osVersion(ex. 7.0.0) + * @property {string} env.deviceModel **native only** + * @property {number} env.[deviceWidth=750] + * @property {number} env.deviceHeight + */ +function $getConfig (callback) { + var config = this._app.options; + if (typeof callback === 'function') { +console.warn('[JS Framework] the callback of Vm#$getConfig(callback) is deprecated, ' + + 'this api now can directly RETURN config info.'); +callback(config); + } + return config +} + +/** + * @deprecated + * request network via http protocol + * @param {object} params + *
[31/39] incubator-weex git commit: * [jsfm] support to pass buffer between js and native
* [jsfm] support to pass buffer between js and native Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5b7aae05 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5b7aae05 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5b7aae05 Branch: refs/heads/0.16-dev Commit: 5b7aae05760943ebeb549861f2641ddea12d28e0 Parents: 85e32df Author: HanksAuthored: Wed Aug 2 15:55:05 2017 +0800 Committer: Hanks Committed: Wed Aug 2 15:55:05 2017 +0800 -- html5/runtime/callback-manager.js | 4 ++- html5/runtime/normalize.js| 54 -- 2 files changed, 55 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b7aae05/html5/runtime/callback-manager.js -- diff --git a/html5/runtime/callback-manager.js b/html5/runtime/callback-manager.js index 84a40f2..058fcc0 100644 --- a/html5/runtime/callback-manager.js +++ b/html5/runtime/callback-manager.js @@ -17,6 +17,8 @@ * under the License. */ +import { decodePrimitive } from './normalize' + /** * For general callback management of a certain Weex instance. * Because function can not passed into native, so we create callback @@ -46,7 +48,7 @@ export default class CallbackManager { delete this.callbacks[callbackId] } if (typeof callback === 'function') { - return callback(data) + return callback(decodePrimitive(data)) } return new Error(`invalid callback id "${callbackId}"`) } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b7aae05/html5/runtime/normalize.js -- diff --git a/html5/runtime/normalize.js b/html5/runtime/normalize.js index 3d9ad0b..f1e93b8 100644 --- a/html5/runtime/normalize.js +++ b/html5/runtime/normalize.js @@ -3,6 +3,29 @@ export function typof (v) { return s.substring(8, s.length - 1) } +export function bufferToBase64 (buffer) { + if (typeof btoa !== 'function') { +return '' + } + const string = Array.prototype.map.call( +new Uint8Array(buffer), +code => String.fromCharCode(code) + ).join('') + return btoa(string) // eslint-disable-line no-undef +} + +export function base64ToBuffer (base64) { + if (typeof atob !== 'function') { +return new ArrayBuffer(0) + } + const string = atob(base64) // eslint-disable-line no-undef + const array = new Uint8Array(string.length) + Array.prototype.forEach.call(string, (ch, i) => { +array[i] = ch.charCodeAt(0) + }) + return array.buffer +} + /** * Normalize a primitive value. * @param {any}v @@ -29,7 +52,11 @@ export function normalizePrimitive (v) { return v case 'ArrayBuffer': - return { type, buffer: v } + return { +'@type': 'binary', +dataType: type, +base64: bufferToBase64(v) + } case 'Int8Array': case 'Uint8Array': @@ -40,9 +67,32 @@ export function normalizePrimitive (v) { case 'Uint32Array': case 'Float32Array': case 'Float64Array': - return { type, buffer: v.buffer } + return { +'@type': 'binary', +dataType: type, +base64: bufferToBase64(v.buffer) + } default: return JSON.stringify(v) } } + +export function decodePrimitive (data) { + if (typof(data) === 'Object') { +// decode base64 into binary +if (data['@type'] && data['@type'] === 'binary') { + return base64ToBuffer(data.base64 || '') +} + +const realData = {} +for (const key in data) { + realData[key] = decodePrimitive(data[key]) +} +return realData + } + if (typof(data) === 'Array') { +return data.map(decodePrimitive) + } + return data +}
[38/39] incubator-weex git commit: Merge branch 'jsfm-feature-0.21' of https://github.com/Hanks10100/incubator-weex into wip-us-0.16-dev
Merge branch 'jsfm-feature-0.21' of https://github.com/Hanks10100/incubator-weex into wip-us-0.16-dev Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/94d7bde6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/94d7bde6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/94d7bde6 Branch: refs/heads/0.16-dev Commit: 94d7bde63e1a32d5845fb743fc3e0a1b0a04bda0 Parents: cf40471 f30a0c3 Author: acton393Authored: Tue Aug 8 16:52:16 2017 +0800 Committer: acton393 Committed: Tue Aug 8 16:52:16 2017 +0800 -- .gitignore | 2 +- build/build.js | 1 + build/config.js |17 +- html5/frameworks/legacy/core/array.js | 4 + html5/frameworks/legacy/core/object.js | 6 + html5/frameworks/legacy/static/create.js| 7 +- html5/frameworks/legacy/vm/directive.js | 6 + html5/frameworks/vanilla/index.js |35 +- html5/runtime/callback-manager.js |12 +- html5/runtime/config.js | 5 +- html5/runtime/normalize.js | 107 + html5/runtime/task-center.js|61 +- html5/runtime/vdom/document.js | 2 + html5/runtime/vdom/element.js |15 +- package.json|10 +- packages/weex-js-framework/.npmignore | 4 + packages/weex-js-framework/index.js | 25150 + packages/weex-js-framework/index.min.js | 1 + packages/weex-js-framework/package.json |22 + packages/weex-js-runtime/.npmignore | 4 + packages/weex-js-runtime/index.js | 3906 packages/weex-js-runtime/index.min.js | 1 + packages/weex-js-runtime/index.min.js.gz| Bin 0 -> 12588 bytes packages/weex-js-runtime/package.json |22 + packages/weex-legacy-framework/.npmignore | 4 + packages/weex-legacy-framework/index.js | 5770 + packages/weex-legacy-framework/index.min.js | 1 + packages/weex-legacy-framework/package.json |22 + scripts/commit-msg.sh | 2 +- 29 files changed, 35114 insertions(+), 85 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/94d7bde6/package.json --
[36/39] incubator-weex git commit: * [jsfm] upgrade jsfm versions
* [jsfm] upgrade jsfm versions Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5c5b33dc Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5c5b33dc Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5c5b33dc Branch: refs/heads/0.16-dev Commit: 5c5b33dc5c4cfa0c0aca14557d0179edf6e3a4a9 Parents: 05ccde9 Author: HanksAuthored: Tue Aug 8 16:23:30 2017 +0800 Committer: Hanks Committed: Tue Aug 8 16:23:30 2017 +0800 -- package.json| 2 +- pre-build/native-bundle-main.js | 16 2 files changed, 9 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5c5b33dc/package.json -- diff --git a/package.json b/package.json index 26e38a9..6dd3db0 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.12.2", "subversion": { "browser": "0.5.0", -"framework": "0.20.6", +"framework": "0.21.7", "vue-render": "0.12.1", "transformer": ">=0.1.5 <0.5" },
[19/39] incubator-weex git commit: + [build] add weex-js-framework and weex-js-runtime packages
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0d8f8595/packages/weex-js-runtime/index.min.js -- diff --git a/packages/weex-js-runtime/index.min.js b/packages/weex-js-runtime/index.min.js new file mode 100644 index 000..1466f7e --- /dev/null +++ b/packages/weex-js-runtime/index.min.js @@ -0,0 +1 @@ +this.getJSFMVersion=function(){return"0.20.6"};var global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&?define(t):e.WeexRuntime=t()}(this,function(){"use strict";function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}function t(){so.forEach(function(e){var t=so.indexOf(e);uo[e]={},so.forEach(function(n){so.indexOf(n)<=t&&(uo[e][n]=!0)})})}function n(e){var t=global.WXEnvironment&||"log";return uo[t]&[t][e]}function r(e){return e.map(function(e){return e="[object object]"===Object.prototype.toString.call(e).toLowerCase()?JSON.stringify(e):String(e)})}function o(){if(void 0===setTimeout&&"function"==typeof ho){var e={},t=0;global.setTimeout=function(n,r){e[++t]=n,ho(t.toString(),r)},global.setTimeoutCallback=function(t){"function"==typeof e[t]&&(e[t](),delete e[t])}}}function i(){Object.freeze(Object),Object.freeze(A rray),c(),Object.freeze(Array.prototype),Object.freeze(String.prototype),Object.freeze(Number.prototype),Object.freeze(Boolean.prototype),a(),Object.freeze(Date.prototype),Object.freeze(RegExp.prototype)}function c(){var e=Object.prototype,t="Object.prototype";s(e,"__defineGetter__",t),s(e,"__defineSetter__",t),s(e,"__lookupGetter__",t),s(e,"__lookupSetter__",t),s(e,"constructor",t),s(e,"hasOwnProperty",t),s(e,"isPrototypeOf",t),s(e,"propertyIsEnumerable",t),s(e,"toLocaleString",t),s(e,"toString",t),s(e,"valueOf",t),Object.seal(e)}function a(){var e=Error.prototype,t="Error.prototype";s(e,"name",t),s(e,"message",t),s(e,"toString",t),s(e,"constructor",t),Object.seal(e)}function s(e,t,n){if(e.hasOwnProperty(t)){var r=e[t];Object.defineProperty(e,t,{get:function(){return r},set:function(r){if(this===e)throw Error("Cannot assign to read only property "+t+" of "+n);return Object.defineProperty(this,t,{value:r,writable:!0}),r}})}}function u(e,t){e&&(vo[e]=t)}function l(e){return vo[e]}fun ction f(e){delete vo[e]}function d(e){var t=vo[e];return t&?t.taskCenter:null}function h(){return(yo++).toString()}function p(e,t,n){var r=e.documentElement;if(!(r.pureChildren.length>0||t.parentNode)){var o=r.children,i=o.indexOf(n);i<0?o.push(t):o.splice(i,0,t),1===t.nodeType?("body"===t.role?(t.docId=e.id,t.ownerDocument=e,t.parentNode=r,m(t,r)):(t.children.forEach(function(e){e.parentNode=t}),y(e,t),t.docId=e.id,t.ownerDocument=e,m(t,r),delete e.nodeMap[t.nodeId]),r.pureChildren.push(t),v(e,t)):(t.parentNode=r,e.nodeMap[t.ref]=t)}}function v(e,t){var n=t.toJSON(),r=n.children;delete n.children;var o=e.taskCenter.send("dom",{action:"createBody"},[n]);return r&(function(t){o=e.taskCenter.send("dom",{action:"addElement"},[n.ref,t,-1])}),o}function y(e,t){t.role="body",t.depth=1,delete e.nodeMap[t.nodeId],t.ref="_root",e.nodeMap._root=t,e.body=t}function m(e,t){e.parentNode=t,t.docId&&(e.docId=t.docId,e.ownerDocument=t.ownerDocument,e.ownerDocument.nodeMap[e.n odeId]=e,e.depth=t.depth+1),e.children.forEach(function(t){m(t,e)})}function g(e){for(;e;){if(1===e.nodeType)return e;e=e.nextSibling}}function b(e){for(;e;){if(1===e.nodeType)return e;e=e.previousSibling}}function _(e,t,n,r){n<0&&(n=0);var o=t[n-1],i=t[n];return t.splice(n,0,e),r&&(o&&(o.nextSibling=e),e.previousSibling=o,e.nextSibling=i,i&&(i.previousSibling=e)),n}function O(e,t,n,r){var o=t.indexOf(e);if(o<0)return-1;if(r){var i=t[o-1],c=t[o+1];i&&(i.nextSibling=c),c&&(c.previousSibling=i)}t.splice(o,1);var a=n;o<=n&&(a=n-1);var s=t[a-1],u=t[a];return t.splice(a,0,e),r&&(s&&(s.nextSibling=e),e.previousSibling=s,e.nextSibling=u,u&&(u.previousSibling=e)),o===a?-1:n}function S(e,t,n){var r=t.indexOf(e);if(!(r<0)){if(n){var o=t[r-1],i=t[r+1];o&&(o.nextSibling=i),i&&(i.previousSibling=o)}t.splice(r,1)}}function E(){this.nodeId=h(),this.ref=this.nodeId,this.children=[],this.pureChildren=[],this.parentNode=null,this.nextSibling=null,this.previousSibling=null}function w(e,t){if(t& th){var n=function(t){mo.call(this,e,t,!0)};n.prototype=Object.create(mo.prototype),Object.defineProperty(n.prototype,"constructor",{configurable:!1,enumerable:!1,writable:!1,value:mo}),t.forEach(function(t){n.prototype[t]=function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var o=d(this.docId);if(o)return o.send("component",{ref:this.ref,component:e,method:t},n)}}),go[e]=n}}function j(e,t,n){void 0===e&&(e=bo);var r=go[e];if(r&&!n)return new
[20/39] incubator-weex git commit: + [build] add weex-js-framework and weex-js-runtime packages
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0d8f8595/packages/weex-js-runtime/index.js -- diff --git a/packages/weex-js-runtime/index.js b/packages/weex-js-runtime/index.js new file mode 100644 index 000..ff5f91a --- /dev/null +++ b/packages/weex-js-runtime/index.js @@ -0,0 +1,3906 @@ +/* 'WEEX JS RUNTIME 0.20.6, Build 2017-08-01 19:09. */ + +;(this.getJSFMVersion = function(){return "0.20.6"}); +var global = this, process = { env: {} };var setTimeout = global.setTimeout; + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.WeexRuntime = factory()); +}(this, (function () { 'use strict'; + +/* + * 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. + */ + +/* eslint-disable */ + +// Production steps of ECMA-262, Edition 6, 22.1.2.1 +// Reference: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from + +/* istanbul ignore if */ +if (!Array.from) { + Array.from = (function() { +var toStr = Object.prototype.toString; +var isCallable = function(fn) { + return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; +}; +var toInteger = function(value) { + var number = Number(value); + if (isNaN(number)) { +return 0; + } + if (number === 0 || !isFinite(number)) { +return number; + } + return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); +}; +var maxSafeInteger = Math.pow(2, 53) - 1; +var toLength = function(value) { + var len = toInteger(value); + return Math.min(Math.max(len, 0), maxSafeInteger); +}; + +// The length property of the from method is 1. +return function from(arrayLike/*, mapFn, thisArg */) { + // 1. Let C be the this value. + var C = this; + + // 2. Let items be ToObject(arrayLike). + var items = Object(arrayLike); + + // 3. ReturnIfAbrupt(items). + if (arrayLike == null) { +throw new TypeError('Array.from requires an array-like object - not null or undefined'); + } + + // 4. If mapfn is undefined, then let mapping be false. + var mapFn = arguments.length > 1 ? arguments[1] : void undefined; + var T; + if (typeof mapFn !== 'undefined') { +// 5. else +// 5. a If IsCallable(mapfn) is false, throw a TypeError exception. +if (!isCallable(mapFn)) { + throw new TypeError('Array.from: when provided, the second argument must be a function'); +} + +// 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined. +if (arguments.length > 2) { + T = arguments[2]; +} + } + + // 10. Let lenValue be Get(items, "length"). + // 11. Let len be ToLength(lenValue). + var len = toLength(items.length); + + // 13. If IsConstructor(C) is true, then + // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len. + // 14. a. Else, Let A be ArrayCreate(len). + var A = isCallable(C) ? Object(new C(len)) : new Array(len); + + // 16. Let k be 0. + var k = 0; + // 17. Repeat, while k < len⦠(also steps a - h) + var kValue; + while (k < len) { +kValue = items[k]; +if (mapFn) { + A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k); +} else { + A[k] = kValue; +} +k += 1; + } + // 18. Let putStatus be Put(A, "length", len, true). + A.length = len; + // 20. Return A. + return A; +}; + }()); +} + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + + + + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var _global = createCommonjsModule(function (module) { +//
[27/39] incubator-weex git commit: * [build] support to release weex-legacy-framework
* [build] support to release weex-legacy-framework Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5aa1517a Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5aa1517a Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5aa1517a Branch: refs/heads/0.16-dev Commit: 5aa1517abb1fc5d20cb65c1d3fd6fc9f13cdebba Parents: 0d8f859 Author: HanksAuthored: Tue Aug 1 19:22:48 2017 +0800 Committer: Hanks Committed: Tue Aug 1 19:22:48 2017 +0800 -- .gitignore |1 + build/build.js |1 + build/config.js | 13 + package.json|2 + packages/weex-legacy-framework/.npmignore |4 + packages/weex-legacy-framework/index.js | 5770 ++ packages/weex-legacy-framework/index.min.js |1 + packages/weex-legacy-framework/package.json | 22 + 8 files changed, 5814 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5aa1517a/.gitignore -- diff --git a/.gitignore b/.gitignore index 4f1baeb..f97c1da 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ test/build weex_tmp coverage dist +*.js.gz # Node logs http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5aa1517a/build/build.js -- diff --git a/build/build.js b/build/build.js index d3b0559..5327ac1 100644 --- a/build/build.js +++ b/build/build.js @@ -169,6 +169,7 @@ function build (name) { switch (name) { case 'native': pkgName = 'weex-js-framework'; break; case 'runtime': pkgName = 'weex-js-runtime'; break; +case 'legacy': pkgName = 'weex-legacy-framework'; break; case 'browser': pkgName = 'weex-web-render'; break; case 'vue': pkgName = 'weex-vue-render'; break; case 'vue-plugins': pkgName = 'weex-vue-render-plugins'; break; http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5aa1517a/build/config.js -- diff --git a/build/config.js b/build/config.js index 62cb4f5..f422a58 100644 --- a/build/config.js +++ b/build/config.js @@ -63,6 +63,19 @@ const configs = { }), ] }, + 'weex-legacy-framework': { +moduleName: 'WeexVanillaFramework', +entry: absolute('html5/frameworks/legacy/index.js'), +dest: absolute('packages/weex-legacy-framework/index.js'), +banner: `/* 'WEEX VANILLA FRAMEWORK ${subversion.framework}, Build ${now()}. */\n`, +format: 'umd', +plugins: [ + nodeResolve({ +jsnext: true, +main: true + }), +] + }, 'weex-web-render': { moduleName: 'Weex', entry: absolute('html5/render/browser/index.js'), http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5aa1517a/package.json -- diff --git a/package.json b/package.json index 68e5ab1..7e27a7e 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "postinstall": "bash ./scripts/install-hooks.sh", "build:native": "node build/build.js native", "build:runtime": "node build/build.js runtime", +"build:legacy": "node build/build.js legacy", "install:buildtools": "npm i webpack@^1.0 weex-vue-bundle-util rollup rollup-watch rollup-plugin-buble rollup-plugin-json rollup-plugin-eslint rollup-plugin-commonjs rollup-plugin-flow rollup-plugin-flow-no-whitespace rollup-plugin-postcss rollup-plugin-replace rollup-plugin-uglify rollup-plugin-node-resolve wwp flow-bin babel-core babel-eslint babel-istanbul babel-loader babel-plugin-coverage babel-preset-es2015 babel-runtime eslint-plugin-flowtype", "build:source": "npm run build:native && npm run build:browser && node build/build.js vue", "build:browser": "wwp && node build/build.js browser", @@ -62,6 +63,7 @@ "dist": "npm run dist:browser && npm run dist:vue", "dev:native": "node build/build.js native --watch", "dev:runtime": "node build/build.js runtime --watch", +"dev:legacy": "node build/build.js legacy --watch", "dev:browser": "wwp && node build/build.js native --watch", "dev:vue": "node build/build.js vue --watch", "dev:examples": "webpack --watch --config build/webpack.examples.config.js", http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5aa1517a/packages/weex-legacy-framework/.npmignore -- diff --git a/packages/weex-legacy-framework/.npmignore b/packages/weex-legacy-framework/.npmignore new file mode 100644 index 000..1cb6dac
[03/39] incubator-weex git commit: * [jsfm] change callbacks from array to object
* [jsfm] change callbacks from array to object Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/acd5814a Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/acd5814a Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/acd5814a Branch: refs/heads/0.16-dev Commit: acd5814a8e64f6cc1dff52b9c5333867d5107570 Parents: 769167a Author: HanksAuthored: Wed Jul 26 16:03:57 2017 +0800 Committer: Hanks Committed: Wed Jul 26 16:03:57 2017 +0800 -- html5/runtime/callback-manager.js | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/acd5814a/html5/runtime/callback-manager.js -- diff --git a/html5/runtime/callback-manager.js b/html5/runtime/callback-manager.js index a83f034..84a40f2 100644 --- a/html5/runtime/callback-manager.js +++ b/html5/runtime/callback-manager.js @@ -28,7 +28,7 @@ export default class CallbackManager { constructor (instanceId) { this.instanceId = instanceId this.lastCallbackId = 0 -this.callbacks = [] +this.callbacks = {} } add (callback) { this.lastCallbackId++ @@ -37,13 +37,13 @@ export default class CallbackManager { } remove (callbackId) { const callback = this.callbacks[callbackId] -this.callbacks[callbackId] = undefined +delete this.callbacks[callbackId] return callback } consume (callbackId, data, ifKeepAlive) { const callback = this.callbacks[callbackId] if (typeof ifKeepAlive === 'undefined' || ifKeepAlive === false) { - this.callbacks[callbackId] = undefined + delete this.callbacks[callbackId] } if (typeof callback === 'function') { return callback(data) @@ -51,6 +51,6 @@ export default class CallbackManager { return new Error(`invalid callback id "${callbackId}"`) } close () { -this.callbacks = this.callbacks.map(cb => undefined) +this.callbacks = {} } }
[18/39] incubator-weex git commit: * [build] update build script and gitignore
* [build] update build script and gitignore Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/9e49d24c Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9e49d24c Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9e49d24c Branch: refs/heads/0.16-dev Commit: 9e49d24c89599bd82627a925faa2647663f14e81 Parents: a877605 Author: HanksAuthored: Tue Aug 1 19:08:50 2017 +0800 Committer: Hanks Committed: Tue Aug 1 19:08:50 2017 +0800 -- .gitignore| 1 - build/config.js | 4 ++-- scripts/commit-msg.sh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9e49d24c/.gitignore -- diff --git a/.gitignore b/.gitignore index d1469fc..4f1baeb 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ test/build weex_tmp coverage dist -packages # Node logs http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9e49d24c/build/config.js -- diff --git a/build/config.js b/build/config.js index 85470d7..62cb4f5 100644 --- a/build/config.js +++ b/build/config.js @@ -37,7 +37,7 @@ const configs = { 'weex-js-framework': { moduleName: 'Weex', entry: absolute('html5/render/native/index.js'), -dest: absolute('dist/native.js'), +dest: absolute('packages/weex-js-framework/index.js'), banner: `(this.nativeLog || function(s) {console.log(s)})` + `('START JS FRAMEWORK ${subversion.framework}, Build ${now()}.');\n` + frameworkBanner, @@ -52,7 +52,7 @@ const configs = { 'weex-js-runtime': { moduleName: 'WeexRuntime', entry: absolute('html5/runtime/index.js'), -dest: absolute('dist/runtime.js'), +dest: absolute('packages/weex-js-runtime/index.js'), banner: `/* 'WEEX JS RUNTIME ${subversion.framework}, Build ${now()}. */\n\n` + frameworkBanner, format: 'umd', http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9e49d24c/scripts/commit-msg.sh -- diff --git a/scripts/commit-msg.sh b/scripts/commit-msg.sh index 64381a9..ff1a967 100755 --- a/scripts/commit-msg.sh +++ b/scripts/commit-msg.sh @@ -17,7 +17,7 @@ # under the License. # Validate commit log -commit_regex='^Merge.+|[+*-] \[(android|ios|jsfm|html5|component|doc|website|example|test|all)\] .{1,50}' +commit_regex='^Merge.+|[+*-] \[(android|ios|jsfm|html5|component|doc|build|website|example|test|all)\] .{1,50}' if ! grep -iqE "$commit_regex" "$1"; then echo "ERROR: commit log format is not correct!"
[24/39] incubator-weex git commit: + [build] add weex-js-framework and weex-js-runtime packages
+ [build] add weex-js-framework and weex-js-runtime packages Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/0d8f8595 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/0d8f8595 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/0d8f8595 Branch: refs/heads/0.16-dev Commit: 0d8f859526bc459a38cda8c4e9470d6c939d3659 Parents: 9e49d24 Author: HanksAuthored: Tue Aug 1 19:15:39 2017 +0800 Committer: Hanks Committed: Tue Aug 1 19:15:39 2017 +0800 -- package.json | 2 +- packages/weex-js-framework/.npmignore| 4 + packages/weex-js-framework/index.js | 25150 packages/weex-js-framework/index.min.js | 1 + packages/weex-js-framework/package.json |22 + packages/weex-js-runtime/.npmignore | 4 + packages/weex-js-runtime/index.js| 3906 packages/weex-js-runtime/index.min.js| 1 + packages/weex-js-runtime/index.min.js.gz | Bin 0 -> 12588 bytes packages/weex-js-runtime/package.json|22 + 10 files changed, 29111 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0d8f8595/package.json -- diff --git a/package.json b/package.json index e76c35b..68e5ab1 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "clean:examples": "echo \"\\033[36;1m[Clean]\\033[0m \\033[33mexamples\\033[0m\" && rm -vrf examples/build/*", "clean:test": "echo \"\\033[36;1m[Clean]\\033[0m \\033[33mtest\\033[0m\" && rm -vrf test/build/*", "clean": "npm run clean:examples && npm run clean:test", -"copy:js": "cp -vf ./dist/native.js ./android/sdk/assets/main.js", +"copy:js": "cp -vf ./packages/weex-js-framework/index.js ./pre-build/native-bundle-main.js", "copy:examples": "rm -rf ./android/playground/app/src/main/assets/* && cp -vrf ./examples/build/* ./android/playground/app/src/main/assets/", "copy": "npm run copy:js && npm run copy:examples", "danger": "danger" http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0d8f8595/packages/weex-js-framework/.npmignore -- diff --git a/packages/weex-js-framework/.npmignore b/packages/weex-js-framework/.npmignore new file mode 100644 index 000..1cb6dac --- /dev/null +++ b/packages/weex-js-framework/.npmignore @@ -0,0 +1,4 @@ +node_modules +package-lock.json +*.log +*.gz
[32/39] incubator-weex git commit: * [jsfm] support to normalize buffer in deep object
* [jsfm] support to normalize buffer in deep object Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/fe8e8ed8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/fe8e8ed8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/fe8e8ed8 Branch: refs/heads/0.16-dev Commit: fe8e8ed8d80c24753693f5635fdb94dc789a2a88 Parents: 5b7aae0 Author: HanksAuthored: Thu Aug 3 17:04:28 2017 +0800 Committer: Hanks Committed: Thu Aug 3 17:04:28 2017 +0800 -- html5/runtime/normalize.js | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fe8e8ed8/html5/runtime/normalize.js -- diff --git a/html5/runtime/normalize.js b/html5/runtime/normalize.js index f1e93b8..b5fab23 100644 --- a/html5/runtime/normalize.js +++ b/html5/runtime/normalize.js @@ -47,10 +47,19 @@ export function normalizePrimitive (v) { case 'Number': case 'String': case 'Boolean': -case 'Array': -case 'Object': return v +case 'Array': + return v.map(normalizePrimitive) + +case 'Object': { + const obj = {} + for (const k in v) { +obj[k] = normalizePrimitive(v[k]) + } + return obj +} + case 'ArrayBuffer': return { '@type': 'binary',
[08/39] incubator-weex git commit: * [jsfm] release v0.21.5
* [jsfm] release v0.21.5 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ac53dc8c Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ac53dc8c Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ac53dc8c Branch: refs/heads/0.16-dev Commit: ac53dc8c19e03de67d93658f9798c3198918df89 Parents: 8540aa4 Author: HanksAuthored: Wed Jul 26 16:28:18 2017 +0800 Committer: Hanks Committed: Wed Jul 26 16:28:18 2017 +0800 -- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ac53dc8c/package.json -- diff --git a/package.json b/package.json index d759116..de2fa78 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.12.0", "subversion": { "browser": "0.5.0", -"framework": "0.20.6", +"framework": "0.21.5", "vue-render": "0.11.56", "transformer": ">=0.1.5 <0.5" },
[39/39] incubator-weex git commit: Merge branch 'jsfm-feature-release' of https://github.com/Hanks10100/incubator-weex into wip-us-0.16-dev
Merge branch 'jsfm-feature-release' of https://github.com/Hanks10100/incubator-weex into wip-us-0.16-dev # Conflicts: # package.json Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1ebd484e Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1ebd484e Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1ebd484e Branch: refs/heads/0.16-dev Commit: 1ebd484ed51e73e7e1917a259845880275bdff69 Parents: 94d7bde 5c5b33d Author: acton393Authored: Tue Aug 8 16:54:17 2017 +0800 Committer: acton393 Committed: Tue Aug 8 16:54:17 2017 +0800 -- package.json| 2 +- pre-build/native-bundle-main.js | 16 2 files changed, 9 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1ebd484e/package.json --
[05/39] incubator-weex git commit: * [jsfm] pass instance id to callback manager
* [jsfm] pass instance id to callback manager Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8130b5c5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8130b5c5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8130b5c5 Branch: refs/heads/0.16-dev Commit: 8130b5c599bbf58236e1668944ad593651a3a174 Parents: e57f824 Author: HanksAuthored: Wed Jul 26 16:09:00 2017 +0800 Committer: Hanks Committed: Wed Jul 26 16:09:00 2017 +0800 -- html5/runtime/task-center.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8130b5c5/html5/runtime/task-center.js -- diff --git a/html5/runtime/task-center.js b/html5/runtime/task-center.js index f103011..41b3607 100644 --- a/html5/runtime/task-center.js +++ b/html5/runtime/task-center.js @@ -30,7 +30,7 @@ export class TaskCenter { }) Object.defineProperty(this, 'callbackManager', { enumerable: true, - value: new CallbackManager() + value: new CallbackManager(id) }) fallback = sendTasks || function () {} }
[12/39] incubator-weex git commit: * [jsfm] fix the computed classList issue in legacy framework
* [jsfm] fix the computed classList issue in legacy framework Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d7537b29 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d7537b29 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d7537b29 Branch: refs/heads/0.16-dev Commit: d7537b291549d2c1c107d7760f0d9948d55fb48d Parents: d239389 Author: HanksAuthored: Fri Jul 28 14:53:38 2017 +0800 Committer: Hanks Committed: Fri Jul 28 14:53:38 2017 +0800 -- html5/frameworks/legacy/vm/directive.js | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d7537b29/html5/frameworks/legacy/vm/directive.js -- diff --git a/html5/frameworks/legacy/vm/directive.js b/html5/frameworks/legacy/vm/directive.js index 42cc04a..fec7252 100644 --- a/html5/frameworks/legacy/vm/directive.js +++ b/html5/frameworks/legacy/vm/directive.js @@ -232,6 +232,12 @@ function setAttr (vm, el, attr) { } function setClassStyle (el, css, classList) { + if (typeof classList === 'string') { +classList = classList.split(/\s+/) + } + classList.forEach((name, i) => { +classList.splice(i, 1, ...name.split(/\s+/)) + }) const classStyle = {} const length = classList.length @@ -253,6 +259,7 @@ function setClass (vm, el, classList) { if (typeof classList !== 'function' && !Array.isArray(classList)) { return } + console.log(` => setClass:`, classList) if (Array.isArray(classList) && !classList.length) { el.setClassStyle({}) return
[30/39] incubator-weex git commit: * [jsfm] refactor the normalize method
* [jsfm] refactor the normalize method Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/85e32df7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/85e32df7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/85e32df7 Branch: refs/heads/0.16-dev Commit: 85e32df780183e2517c15fcdaa42e82ef939fc32 Parents: 3fb8d99 Author: HanksAuthored: Wed Aug 2 14:13:27 2017 +0800 Committer: Hanks Committed: Wed Aug 2 14:13:27 2017 +0800 -- html5/runtime/buffer.js | 13 - html5/runtime/normalize.js | 48 ++ html5/runtime/task-center.js | 61 +-- 3 files changed, 62 insertions(+), 60 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/85e32df7/html5/runtime/buffer.js -- diff --git a/html5/runtime/buffer.js b/html5/runtime/buffer.js deleted file mode 100644 index ff610d5..000 --- a/html5/runtime/buffer.js +++ /dev/null @@ -1,13 +0,0 @@ -export function bufferToString (buffer) { - return String.fromCharCode.apply(null, new Uint16Array(buffer)) -} - -export function stringToBuffer (string) { - const N = string.length - const buffer = new ArrayBuffer(N * 2) - const view = new Uint16Array(buffer) - for (let i = 0; i < N; i++) { -view[i] = string.charCodeAt(i) - } - return buffer -} http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/85e32df7/html5/runtime/normalize.js -- diff --git a/html5/runtime/normalize.js b/html5/runtime/normalize.js new file mode 100644 index 000..3d9ad0b --- /dev/null +++ b/html5/runtime/normalize.js @@ -0,0 +1,48 @@ +export function typof (v) { + const s = Object.prototype.toString.call(v) + return s.substring(8, s.length - 1) +} + +/** + * Normalize a primitive value. + * @param {any}v + * @return {primitive} + */ +export function normalizePrimitive (v) { + const type = typof(v) + + switch (type) { +case 'Undefined': +case 'Null': + return '' + +case 'RegExp': + return v.toString() +case 'Date': + return v.toISOString() + +case 'Number': +case 'String': +case 'Boolean': +case 'Array': +case 'Object': + return v + +case 'ArrayBuffer': + return { type, buffer: v } + +case 'Int8Array': +case 'Uint8Array': +case 'Uint8ClampedArray': +case 'Int16Array': +case 'Uint16Array': +case 'Int32Array': +case 'Uint32Array': +case 'Float32Array': +case 'Float64Array': + return { type, buffer: v.buffer } + +default: + return JSON.stringify(v) + } +} http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/85e32df7/html5/runtime/task-center.js -- diff --git a/html5/runtime/task-center.js b/html5/runtime/task-center.js index f2fbcb5..b2f960f 100644 --- a/html5/runtime/task-center.js +++ b/html5/runtime/task-center.js @@ -18,7 +18,7 @@ */ import CallbackManager from './callback-manager' import Element from './vdom/element' -import { bufferToString } from './buffer' +import { typof, normalizePrimitive } from './normalize' let fallback = function () {} @@ -44,61 +44,28 @@ export class TaskCenter { return this.callbackManager.close() } - typof (v) { -const s = Object.prototype.toString.call(v) -return s.substring(8, s.length - 1) - } - /** * Normalize a value. Specially, if the value is a function, then generate a function id * and save it to `CallbackManager`, at last return the function id. * @param {any}v - * @param {object} app * @return {primitive} */ normalize (v) { -const type = this.typof(v) +const type = typof(v) -switch (type) { - case 'Undefined': - case 'Null': -return '' - case 'RegExp': -return v.toString() - case 'Date': -return v.toISOString() - case 'Number': - case 'String': - case 'Boolean': - case 'Array': - case 'Object': -if (v instanceof Element) { - return v.ref -} -if (v._isVue && v.$el instanceof Element) { - return v.$el.ref -} -return v - - case 'ArrayBuffer': -return { type, buffer: v, string: bufferToString(v) } - case 'Int8Array': - case 'Uint8Array': - case 'Uint8ClampedArray': - case 'Int16Array': - case 'Uint16Array': - case 'Int32Array': - case 'Uint32Array': - case 'Float32Array': - case 'Float64Array': -return { type, buffer: v.buffer, string:
[11/39] incubator-weex git commit: * [jsfm] export more reliable sendTask method
* [jsfm] export more reliable sendTask method Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d2393899 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d2393899 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d2393899 Branch: refs/heads/0.16-dev Commit: d239389950e036f052c4ad8da7080ec49dfb1d6a Parents: 80b3eae Author: HanksAuthored: Fri Jul 28 13:54:04 2017 +0800 Committer: Hanks Committed: Fri Jul 28 13:54:04 2017 +0800 -- html5/runtime/config.js | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d2393899/html5/runtime/config.js -- diff --git a/html5/runtime/config.js b/html5/runtime/config.js index 4a8fd58..695aa66 100644 --- a/html5/runtime/config.js +++ b/html5/runtime/config.js @@ -24,7 +24,10 @@ const config = { Document, Element, Comment, Listener, TaskCenter, sendTasks (...args) { -return global.callNative(...args) +if (typeof callNative === 'function') { + return callNative(...args) +} +return (global.callNative || (() => {}))(...args) } }
[02/39] incubator-weex git commit: Merge branch 'send-options' into jsfm-0.21
Merge branch 'send-options' into jsfm-0.21 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/769167a7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/769167a7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/769167a7 Branch: refs/heads/0.16-dev Commit: 769167a7ad5acce8354478c3033ba2396906a8a2 Parents: e01d0e7 18c7924 Author: HanksAuthored: Wed Jul 26 16:01:47 2017 +0800 Committer: Hanks Committed: Wed Jul 26 16:01:47 2017 +0800 -- html5/runtime/task-center.js | 16 1 file changed, 8 insertions(+), 8 deletions(-) --
[13/39] incubator-weex git commit: + [jsfm] add warnings for legacy api on prototype
+ [jsfm] add warnings for legacy api on prototype Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/afc261ec Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/afc261ec Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/afc261ec Branch: refs/heads/0.16-dev Commit: afc261ec042ef39eba8b41deeec5a8294e046084 Parents: d7537b2 Author: HanksAuthored: Fri Jul 28 15:35:22 2017 +0800 Committer: Hanks Committed: Fri Jul 28 15:35:22 2017 +0800 -- html5/frameworks/legacy/core/array.js | 4 html5/frameworks/legacy/core/object.js | 6 ++ html5/frameworks/legacy/vm/directive.js | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/afc261ec/html5/frameworks/legacy/core/array.js -- diff --git a/html5/frameworks/legacy/core/array.js b/html5/frameworks/legacy/core/array.js index 818fdb5..856792f 100644 --- a/html5/frameworks/legacy/core/array.js +++ b/html5/frameworks/legacy/core/array.js @@ -64,6 +64,8 @@ def( arrayProto, '$set', function $set (index, val) { +console.warn(`[JS Framework] "Array.prototype.$set" is not a standard API,` + + ` it will be removed in the next version.`) if (index >= this.length) { this.length = index + 1 } @@ -82,6 +84,8 @@ def( arrayProto, '$remove', function $remove (index) { +console.warn(`[JS Framework] "Array.prototype.$remove" is not a standard API,` + + ` it will be removed in the next version.`) /* istanbul ignore if */ if (!this.length) return /* istanbul ignore else */ http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/afc261ec/html5/frameworks/legacy/core/object.js -- diff --git a/html5/frameworks/legacy/core/object.js b/html5/frameworks/legacy/core/object.js index 4f2b5a0..86f83e3 100644 --- a/html5/frameworks/legacy/core/object.js +++ b/html5/frameworks/legacy/core/object.js @@ -17,6 +17,8 @@ _.define( objProto, '$add', function $add (key, val) { +console.warn(`[JS Framework] "Object.prototype.$add" is not a standard API,` + + ` it will be removed in the next version.`) if (this.hasOwnProperty(key)) return var ob = this.__ob__ if (!ob || _.isReserved(key)) { @@ -49,6 +51,8 @@ _.define( objProto, '$set', function $set (key, val) { +console.warn(`[JS Framework] "Object.prototype.$set" is not a standard API,` + + ` it will be removed in the next version.`) this.$add(key, val) this[key] = val } @@ -66,6 +70,8 @@ _.define( objProto, '$delete', function $delete (key) { +console.warn(`[JS Framework] "Object.prototype.$delete" is not a standard API,` + + ` it will be removed in the next version.`) if (!this.hasOwnProperty(key)) return delete this[key] var ob = this.__ob__ http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/afc261ec/html5/frameworks/legacy/vm/directive.js -- diff --git a/html5/frameworks/legacy/vm/directive.js b/html5/frameworks/legacy/vm/directive.js index fec7252..081a014 100644 --- a/html5/frameworks/legacy/vm/directive.js +++ b/html5/frameworks/legacy/vm/directive.js @@ -259,7 +259,6 @@ function setClass (vm, el, classList) { if (typeof classList !== 'function' && !Array.isArray(classList)) { return } - console.log(` => setClass:`, classList) if (Array.isArray(classList) && !classList.length) { el.setClassStyle({}) return
[06/39] incubator-weex git commit: * [jsfm] support return values in fireEvent
* [jsfm] support return values in fireEvent Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/523abfee Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/523abfee Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/523abfee Branch: refs/heads/0.16-dev Commit: 523abfeefa366d796bd16f678c19501c1374bbb8 Parents: 8130b5c Author: HanksAuthored: Wed Jul 26 16:23:22 2017 +0800 Committer: Hanks Committed: Wed Jul 26 16:23:22 2017 +0800 -- html5/runtime/vdom/element.js | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/523abfee/html5/runtime/vdom/element.js -- diff --git a/html5/runtime/vdom/element.js b/html5/runtime/vdom/element.js index 9ecff04..44aded2 100644 --- a/html5/runtime/vdom/element.js +++ b/html5/runtime/vdom/element.js @@ -394,23 +394,26 @@ Object.assign(Element.prototype, { * @return {} anything returned by handler function */ fireEvent (type, e, isBubble) { +let result = null let isStopPropagation = false const handler = this.event[type] if (handler && e) { e.stopPropagation = () => { isStopPropagation = true } - handler.call(this, e) + result = handler.call(this, e) } -if (isStopPropagation) { - return -} - -if (isBubble && BUBBLE_EVENTS.includes(type) && this.parentNode && this.parentNode.fireEvent) { +if (!isStopPropagation + && isBubble + && BUBBLE_EVENTS.includes(type) + && this.parentNode + && this.parentNode.fireEvent) { e.currentTarget = this.parentNode this.parentNode.fireEvent(type, e, isBubble) } + +return result }, /**
[28/39] incubator-weex git commit: * [build] fix conflict
* [build] fix conflict Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/24efe6ca Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/24efe6ca Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/24efe6ca Branch: refs/heads/0.16-dev Commit: 24efe6cae2e4101228fbde369146d663576432b1 Parents: c938f64 5aa1517 Author: HanksAuthored: Wed Aug 2 11:35:55 2017 +0800 Committer: Hanks Committed: Wed Aug 2 11:35:55 2017 +0800 -- .gitignore | 5 +- WeexSDK.podspec | 2 +- .../java/com/alibaba/weex/IndexActivity.java|14 + .../java/com/taobao/weex/WXSDKInstance.java |11 +- .../main/java/com/taobao/weex/WXSDKManager.java |10 + .../taobao/weex/common/WXWorkThreadManager.java |48 + .../com/taobao/weex/ui/component/WXImage.java |68 + .../ui/component/list/BasicListComponent.java |15 +- .../taobao/weex/utils/WXViewToImageUtil.java| 151 + build/build.js | 106 +- build/config.js |54 +- dangerfile.js |79 +- entry.js|11 + examples/vue/index.vue | 1 + examples/vue/modules/picker.vue |97 + html5/render/vue/README.md |77 + html5/render/vue/components/a.js|90 +- html5/render/vue/components/div.js |43 +- html5/render/vue/components/image.js|18 +- html5/render/vue/components/index.js|37 +- html5/render/vue/components/input.js| 130 +- html5/render/vue/components/scrollable/cell.js |39 + .../render/vue/components/scrollable/header.js | 102 +- html5/render/vue/components/scrollable/index.js |48 + html5/render/vue/components/scrollable/list.js |82 + .../vue/components/scrollable/list/cell.js |36 - .../vue/components/scrollable/list/index.js |77 - .../vue/components/scrollable/list/listMixin.js |47 - .../vue/components/scrollable/list/style.js |34 - .../components/scrollable/loading-indicator.js |17 +- .../render/vue/components/scrollable/loading.js | 141 +- .../vue/components/scrollable/mixins/index.js |26 + .../vue/components/scrollable/mixins/list.js|46 + .../components/scrollable/mixins/scrollable.js | 267 + .../render/vue/components/scrollable/refresh.js | 157 +- .../vue/components/scrollable/scroller.js | 135 +- .../render/vue/components/scrollable/style.css |85 + .../vue/components/scrollable/waterfall.js | 573 +- html5/render/vue/components/slider/index.js |52 +- html5/render/vue/components/slider/indicator.js |18 +- .../render/vue/components/slider/slideMixin.js |46 +- .../vue/components/slider/slider-neighbor.js|12 +- html5/render/vue/components/slider/slider.css |19 + html5/render/vue/components/slider/slider.js|75 + html5/render/vue/components/switch.js | 114 +- html5/render/vue/components/text.js |52 +- html5/render/vue/components/textarea.js | 104 +- html5/render/vue/components/video.js| 107 +- html5/render/vue/components/web.js |98 +- html5/render/vue/core/style.js |35 - html5/render/vue/env/global.js | 6 + html5/render/vue/env/index.js | 5 - html5/render/vue/index.js |25 - html5/render/vue/mixins/base.js |71 - html5/render/vue/mixins/index.js| 2 - html5/render/vue/mixins/scrollable.js | 233 - html5/render/vue/mixins/style.js| 4 +- html5/render/vue/modules/animation.js |36 +- html5/render/vue/modules/dom.js |21 +- html5/render/vue/modules/globalEvent.js | 8 +- html5/render/vue/modules/index.js |36 +- html5/render/vue/modules/navigator.js |10 +- html5/render/vue/modules/webview.js |18 +- html5/render/vue/styles/base.css|86 +- html5/render/vue/styles/reset.css |19 + html5/render/vue/utils/lazyload.js |24 +- html5/render/vue/utils/perf.js | 283 +- html5/test/render/vue/components/list.js| 2 +- html5/test/render/vue/components/switch.js | 5 +- html5/test/render/vue/examples/list-cell.js | 2 +- html5/test/render/vue/helper/index.js | 2 +- html5/test/render/vue/helper/main.js| 3 +- html5/test/render/vue/helper/utils.js |
[21/39] incubator-weex git commit: + [build] add weex-js-framework and weex-js-runtime packages
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0d8f8595/packages/weex-js-framework/package.json -- diff --git a/packages/weex-js-framework/package.json b/packages/weex-js-framework/package.json new file mode 100644 index 000..9048b2f --- /dev/null +++ b/packages/weex-js-framework/package.json @@ -0,0 +1,22 @@ +{ + "name": "weex-js-framework", + "version": "0.20.6", + "description": "Weex JS Framework", + "main": "index.js", + "engines": { +"node": ">=4" + }, + "homepage": "https://github.com/apache/incubator-weex/;, + "keywords": [ +"weex", +"hybrid", +"mvvm", +"javascript", +"runtime" + ], + "repository": { +"type": "git", +"url": "git+ssh://g...@github.com/apache/incubator-weex.git" + }, + "license": "Apache-2.0" +} http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0d8f8595/packages/weex-js-runtime/.npmignore -- diff --git a/packages/weex-js-runtime/.npmignore b/packages/weex-js-runtime/.npmignore new file mode 100644 index 000..1cb6dac --- /dev/null +++ b/packages/weex-js-runtime/.npmignore @@ -0,0 +1,4 @@ +node_modules +package-lock.json +*.log +*.gz
[34/39] incubator-weex git commit: * [jsfm] upgrade jsfm to 0.21.6 in pre-build
* [jsfm] upgrade jsfm to 0.21.6 in pre-build Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/05ccde90 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/05ccde90 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/05ccde90 Branch: refs/heads/0.16-dev Commit: 05ccde90eaa4fb4db9786e503787d80a49aba432 Parents: cf40471 Author: HanksAuthored: Tue Aug 8 15:50:53 2017 +0800 Committer: Hanks Committed: Tue Aug 8 15:50:53 2017 +0800 -- pre-build/native-bundle-main.js | 16 1 file changed, 8 insertions(+), 8 deletions(-) --
[04/39] incubator-weex git commit: * [jsfm] destroy taskCenter when destory the document
* [jsfm] destroy taskCenter when destory the document Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e57f8245 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e57f8245 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e57f8245 Branch: refs/heads/0.16-dev Commit: e57f8245fb074b681bf5f041cf92ff8d92bb61e9 Parents: acd5814 Author: HanksAuthored: Wed Jul 26 16:07:58 2017 +0800 Committer: Hanks Committed: Wed Jul 26 16:07:58 2017 +0800 -- html5/runtime/vdom/document.js | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e57f8245/html5/runtime/vdom/document.js -- diff --git a/html5/runtime/vdom/document.js b/html5/runtime/vdom/document.js index fe4f52f..ef8ef4e 100644 --- a/html5/runtime/vdom/document.js +++ b/html5/runtime/vdom/document.js @@ -185,8 +185,10 @@ Object.assign(Document.prototype, { * Destroy current document, and remove itself form docMap. */ destroy () { +this.taskCenter.destroyCallback() delete this.listener delete this.nodeMap +delete this.taskCenter removeDoc(this.id) } })
[29/39] incubator-weex git commit: * [jsfm] support to convert buffer to string
* [jsfm] support to convert buffer to string Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/3fb8d991 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/3fb8d991 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/3fb8d991 Branch: refs/heads/0.16-dev Commit: 3fb8d991f303c10204d3ea3072c343ddacc432f2 Parents: 24efe6c Author: HanksAuthored: Wed Aug 2 12:23:39 2017 +0800 Committer: Hanks Committed: Wed Aug 2 12:23:39 2017 +0800 -- html5/runtime/buffer.js | 13 + html5/runtime/task-center.js | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3fb8d991/html5/runtime/buffer.js -- diff --git a/html5/runtime/buffer.js b/html5/runtime/buffer.js new file mode 100644 index 000..ff610d5 --- /dev/null +++ b/html5/runtime/buffer.js @@ -0,0 +1,13 @@ +export function bufferToString (buffer) { + return String.fromCharCode.apply(null, new Uint16Array(buffer)) +} + +export function stringToBuffer (string) { + const N = string.length + const buffer = new ArrayBuffer(N * 2) + const view = new Uint16Array(buffer) + for (let i = 0; i < N; i++) { +view[i] = string.charCodeAt(i) + } + return buffer +} http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3fb8d991/html5/runtime/task-center.js -- diff --git a/html5/runtime/task-center.js b/html5/runtime/task-center.js index 6a0d273..f2fbcb5 100644 --- a/html5/runtime/task-center.js +++ b/html5/runtime/task-center.js @@ -18,6 +18,7 @@ */ import CallbackManager from './callback-manager' import Element from './vdom/element' +import { bufferToString } from './buffer' let fallback = function () {} @@ -80,7 +81,7 @@ export class TaskCenter { return v case 'ArrayBuffer': -return { type, buffer: v } +return { type, buffer: v, string: bufferToString(v) } case 'Int8Array': case 'Uint8Array': case 'Uint8ClampedArray': @@ -90,7 +91,7 @@ export class TaskCenter { case 'Uint32Array': case 'Float32Array': case 'Float64Array': -return { type, buffer: v.buffer } +return { type, buffer: v.buffer, string: bufferToString(v.buffer) } case 'Function': return this.callbackManager.add(v).toString()
[37/39] incubator-weex git commit: Merge branch 'jsfm-feature-0.21' of https://github.com/Hanks10100/incubator-weex into jsfm-feature-0.21
Merge branch 'jsfm-feature-0.21' of https://github.com/Hanks10100/incubator-weex into jsfm-feature-0.21 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f30a0c39 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f30a0c39 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f30a0c39 Branch: refs/heads/0.16-dev Commit: f30a0c3965cbe04eefbeac38e9e28ec8ef9e4b0f Parents: fe8e8ed ae475e8 Author: HanksAuthored: Tue Aug 8 16:48:35 2017 +0800 Committer: Hanks Committed: Tue Aug 8 16:48:35 2017 +0800 -- --
[17/39] incubator-weex git commit: * [jsfm] support to pass ArrayBuffer to native
* [jsfm] support to pass ArrayBuffer to native Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/c938f642 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/c938f642 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/c938f642 Branch: refs/heads/0.16-dev Commit: c938f6420499586dfd383de712b6af7fabbb3830 Parents: f40f596 Author: HanksAuthored: Tue Aug 1 17:55:36 2017 +0800 Committer: Hanks Committed: Tue Aug 1 17:55:36 2017 +0800 -- html5/runtime/task-center.js | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c938f642/html5/runtime/task-center.js -- diff --git a/html5/runtime/task-center.js b/html5/runtime/task-center.js index e538631..6a0d273 100644 --- a/html5/runtime/task-center.js +++ b/html5/runtime/task-center.js @@ -45,7 +45,7 @@ export class TaskCenter { typof (v) { const s = Object.prototype.toString.call(v) -return s.substring(8, s.length - 1).toLowerCase() +return s.substring(8, s.length - 1) } /** @@ -59,18 +59,18 @@ export class TaskCenter { const type = this.typof(v) switch (type) { - case 'undefined': - case 'null': + case 'Undefined': + case 'Null': return '' - case 'regexp': + case 'RegExp': return v.toString() - case 'date': + case 'Date': return v.toISOString() - case 'number': - case 'string': - case 'boolean': - case 'array': - case 'object': + case 'Number': + case 'String': + case 'Boolean': + case 'Array': + case 'Object': if (v instanceof Element) { return v.ref } @@ -78,7 +78,21 @@ export class TaskCenter { return v.$el.ref } return v - case 'function': + + case 'ArrayBuffer': +return { type, buffer: v } + case 'Int8Array': + case 'Uint8Array': + case 'Uint8ClampedArray': + case 'Int16Array': + case 'Uint16Array': + case 'Int32Array': + case 'Uint32Array': + case 'Float32Array': + case 'Float64Array': +return { type, buffer: v.buffer } + + case 'Function': return this.callbackManager.add(v).toString() /* istanbul ignore next */ default:
[15/39] incubator-weex git commit: * [jsfm] release v0.21.6
* [jsfm] release v0.21.6 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f40f596e Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f40f596e Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f40f596e Branch: refs/heads/0.16-dev Commit: f40f596e6f0160a5b6f5feff8a94a146e655e692 Parents: 80bd8e2 Author: HanksAuthored: Fri Jul 28 17:48:31 2017 +0800 Committer: Hanks Committed: Fri Jul 28 17:48:31 2017 +0800 -- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f40f596e/package.json -- diff --git a/package.json b/package.json index de2fa78..f1d9704 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.12.0", "subversion": { "browser": "0.5.0", -"framework": "0.21.5", +"framework": "0.21.6", "vue-render": "0.11.56", "transformer": ">=0.1.5 <0.5" }, @@ -98,7 +98,7 @@ "semver": "^5.1.0", "weex-picker": "^0.1.0", "weex-rax-framework": "0.4.7", -"weex-vue-framework": "2.4.2-weex.2", +"weex-vue-framework": "2.4.2-weex.3", "weex-styler": "0.1.9" }, "devDependencies": {
[16/39] incubator-weex git commit: Merge branch '0.16-dev' into jsfm-feature-0.21
Merge branch '0.16-dev' into jsfm-feature-0.21 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ae475e8a Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ae475e8a Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ae475e8a Branch: refs/heads/0.16-dev Commit: ae475e8aaf562fcad2fd6f8753815032aa09fa90 Parents: f40f596 5951404 Author: HanksAuthored: Mon Jul 31 16:54:02 2017 +0800 Committer: GitHub Committed: Mon Jul 31 16:54:02 2017 +0800 -- .gitignore | 3 + WeexSDK.podspec | 2 +- .../java/com/taobao/weex/WXSDKInstance.java | 11 +- .../ui/component/list/BasicListComponent.java | 15 +- build/build.js | 105 +++- build/config.js | 37 +- dangerfile.js | 79 ++- entry.js| 11 + examples/vue/index.vue | 1 + examples/vue/modules/picker.vue | 97 html5/render/vue/README.md | 77 +++ html5/render/vue/components/a.js| 90 +-- html5/render/vue/components/div.js | 43 +- html5/render/vue/components/image.js| 18 +- html5/render/vue/components/index.js| 37 +- html5/render/vue/components/input.js| 130 +++-- html5/render/vue/components/scrollable/cell.js | 39 ++ .../render/vue/components/scrollable/header.js | 102 ++-- html5/render/vue/components/scrollable/index.js | 48 ++ html5/render/vue/components/scrollable/list.js | 82 +++ .../vue/components/scrollable/list/cell.js | 36 -- .../vue/components/scrollable/list/index.js | 77 --- .../vue/components/scrollable/list/listMixin.js | 47 -- .../vue/components/scrollable/list/style.js | 34 -- .../components/scrollable/loading-indicator.js | 17 +- .../render/vue/components/scrollable/loading.js | 141 ++--- .../vue/components/scrollable/mixins/index.js | 26 + .../vue/components/scrollable/mixins/list.js| 46 ++ .../components/scrollable/mixins/scrollable.js | 267 + .../render/vue/components/scrollable/refresh.js | 157 ++--- .../vue/components/scrollable/scroller.js | 135 +++-- .../render/vue/components/scrollable/style.css | 85 +++ .../vue/components/scrollable/waterfall.js | 573 ++- html5/render/vue/components/slider/index.js | 52 +- html5/render/vue/components/slider/indicator.js | 18 +- .../render/vue/components/slider/slideMixin.js | 46 +- .../vue/components/slider/slider-neighbor.js| 12 +- html5/render/vue/components/slider/slider.css | 19 + html5/render/vue/components/slider/slider.js| 75 +++ html5/render/vue/components/switch.js | 114 ++-- html5/render/vue/components/text.js | 52 +- html5/render/vue/components/textarea.js | 104 ++-- html5/render/vue/components/video.js| 107 ++-- html5/render/vue/components/web.js | 98 ++-- html5/render/vue/core/style.js | 35 -- html5/render/vue/env/global.js | 6 + html5/render/vue/env/index.js | 5 - html5/render/vue/index.js | 25 - html5/render/vue/mixins/base.js | 71 --- html5/render/vue/mixins/index.js| 2 - html5/render/vue/mixins/scrollable.js | 233 html5/render/vue/mixins/style.js| 4 +- html5/render/vue/modules/animation.js | 36 +- html5/render/vue/modules/dom.js | 21 +- html5/render/vue/modules/globalEvent.js | 8 +- html5/render/vue/modules/index.js | 36 +- html5/render/vue/modules/navigator.js | 10 +- html5/render/vue/modules/webview.js | 18 +- html5/render/vue/styles/base.css| 86 +-- html5/render/vue/styles/reset.css | 19 + html5/render/vue/utils/lazyload.js | 24 +- html5/render/vue/utils/perf.js | 283 + html5/test/render/vue/components/list.js| 2 +- html5/test/render/vue/components/switch.js | 5 +- html5/test/render/vue/examples/list-cell.js | 2 +- html5/test/render/vue/helper/index.js | 2 +- html5/test/render/vue/helper/main.js| 3 +- html5/test/render/vue/helper/utils.js | 4 + html5/test/render/vue/modules/animation.js | 12 +- html5/test/render/vue/modules/dom.js| 10 +- html5/test/render/vue/modules/globalEvent.js| 8 +- html5/test/render/vue/modules/navigator.js | 8 +- html5/test/render/vue/modules/webview.js| 10 +-
[09/39] incubator-weex git commit: * [jsfm] return instance in legacy framework
* [jsfm] return instance in legacy framework Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ac348544 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ac348544 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ac348544 Branch: refs/heads/0.16-dev Commit: ac348544ccbf46170d714521a0a9cd3cf32901f1 Parents: ac53dc8 Author: HanksAuthored: Fri Jul 28 13:50:48 2017 +0800 Committer: Hanks Committed: Fri Jul 28 13:50:48 2017 +0800 -- html5/frameworks/legacy/static/create.js | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ac348544/html5/frameworks/legacy/static/create.js -- diff --git a/html5/frameworks/legacy/static/create.js b/html5/frameworks/legacy/static/create.js index ae97d46..1c963b3 100644 --- a/html5/frameworks/legacy/static/create.js +++ b/html5/frameworks/legacy/static/create.js @@ -42,13 +42,10 @@ export function createInstance (id, code, options, data, info) { if (!instance) { instance = new App(id, options) instanceMap[id] = instance -result = initApp(instance, - code, - data, - services) +result = initApp(instance, code, data, services) } else { result = new Error(`invalid instance id "${id}"`) } - return result + return (result instanceof Error) ? result : instance }
[01/39] incubator-weex git commit: * [jsfm] support send options in task center
Repository: incubator-weex Updated Branches: refs/heads/0.16-dev cf40471e6 -> 1ebd484ed * [jsfm] support send options in task center Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/18c79244 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/18c79244 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/18c79244 Branch: refs/heads/0.16-dev Commit: 18c79244791fcdee62b4924647ed5c488e18ebde Parents: 9994583 Author: HanksAuthored: Wed Jun 21 16:54:50 2017 +0800 Committer: Hanks Committed: Wed Jun 21 16:54:50 2017 +0800 -- html5/runtime/task-center.js | 16 1 file changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/18c79244/html5/runtime/task-center.js -- diff --git a/html5/runtime/task-center.js b/html5/runtime/task-center.js index 7fe6096..f103011 100644 --- a/html5/runtime/task-center.js +++ b/html5/runtime/task-center.js @@ -83,8 +83,8 @@ export class TaskCenter { } } - send (type, options, args) { -const { action, component, ref, module, method } = options + send (type, params, args, options) { +const { action, component, ref, module, method } = params args = args.map(arg => this.normalize(arg)) @@ -92,9 +92,9 @@ export class TaskCenter { case 'dom': return this[action](this.instanceId, args) case 'component': -return this.componentHandler(this.instanceId, ref, method, args, { component }) +return this.componentHandler(this.instanceId, ref, method, args, Object.assign({ component }, options)) default: -return this.moduleHandler(this.instanceId, module, method, args, {}) +return this.moduleHandler(this.instanceId, module, method, args, options) } } @@ -102,12 +102,12 @@ export class TaskCenter { return this[action](this.instanceId, args) } - callComponent (ref, method, args) { -return this.componentHandler(this.instanceId, ref, method, args, {}) + callComponent (ref, method, args, options) { +return this.componentHandler(this.instanceId, ref, method, args, options) } - callModule (module, method, args) { -return this.moduleHandler(this.instanceId, module, method, args, {}) + callModule (module, method, args, options) { +return this.moduleHandler(this.instanceId, module, method, args, options) } }
[14/39] incubator-weex git commit: * [jsfm] support to normalize refs in vue
* [jsfm] support to normalize refs in vue Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/80bd8e29 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/80bd8e29 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/80bd8e29 Branch: refs/heads/0.16-dev Commit: 80bd8e294cd72990c88e50d70322e62cfde8c0b2 Parents: afc261e Author: HanksAuthored: Fri Jul 28 17:47:35 2017 +0800 Committer: Hanks Committed: Fri Jul 28 17:47:35 2017 +0800 -- html5/runtime/task-center.js | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/80bd8e29/html5/runtime/task-center.js -- diff --git a/html5/runtime/task-center.js b/html5/runtime/task-center.js index 41b3607..e538631 100644 --- a/html5/runtime/task-center.js +++ b/html5/runtime/task-center.js @@ -74,6 +74,9 @@ export class TaskCenter { if (v instanceof Element) { return v.ref } +if (v._isVue && v.$el instanceof Element) { + return v.$el.ref +} return v case 'function': return this.callbackManager.add(v).toString()
[07/39] incubator-weex git commit: * [jsfm] upgrade weex-rax-framework and weex-vue-framework
* [jsfm] upgrade weex-rax-framework and weex-vue-framework Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8540aa4f Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8540aa4f Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8540aa4f Branch: refs/heads/0.16-dev Commit: 8540aa4f35cb2fa27259cfa4646f09b23c407e53 Parents: 523abfe Author: HanksAuthored: Wed Jul 26 16:27:28 2017 +0800 Committer: Hanks Committed: Wed Jul 26 16:27:28 2017 +0800 -- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8540aa4f/package.json -- diff --git a/package.json b/package.json index f99aec9..d759116 100644 --- a/package.json +++ b/package.json @@ -97,8 +97,8 @@ "scroll-to": "0.0.2", "semver": "^5.1.0", "weex-picker": "^0.1.0", -"weex-rax-framework": "0.3.5", -"weex-vue-framework": "2.2.6-weex.1", +"weex-rax-framework": "0.4.7", +"weex-vue-framework": "2.4.2-weex.2", "weex-styler": "0.1.9" }, "devDependencies": { @@ -166,4 +166,4 @@ "wwp": "^0.3.5", "xmldom": "^0.1.27" } -} \ No newline at end of file +}
[GitHub] incubator-weex issue #577: [jsfm] Upgrade jsfm to 0.21.7 in pre-build
Github user Hanks10100 commented on the issue: https://github.com/apache/incubator-weex/pull/577 #559 is related. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex issue #578: + [ios] support arraybuffer for websocket and str...
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/578 Fails :no_entry_sign: This PR modify SDK code. Please add/modify corresponding testcases. If it is ok, please comment about it. Or put '@notdanger' in you commit message. Warnings :warning: No Changelog changes! :warning: This PR should update related documents as well. Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex issue #577: [jsfm] Upgrade jsfm to 0.21.6 in pre-build
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/577 Warnings :warning: No Changelog changes! Messages :book: According to the blame info, we recommended @atomtong to be the reviewers. Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex pull request #577: [jsfm] Upgrade jsfm to 0.21.6 in pre-build
GitHub user Hanks10100 opened a pull request: https://github.com/apache/incubator-weex/pull/577 [jsfm] Upgrade jsfm to 0.21.6 in pre-build You can merge this pull request into a Git repository by running: $ git pull https://github.com/Hanks10100/incubator-weex jsfm-feature-release Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/577.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #577 commit 05ccde90eaa4fb4db9786e503787d80a49aba432 Author: HanksDate: 2017-08-08T07:50:53Z * [jsfm] upgrade jsfm to 0.21.6 in pre-build --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex issue #576: * [android] refresh bugfix
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/576 Fails :no_entry_sign: This PR modify SDK code. Please add/modify corresponding testcases. If it is ok, please comment about it. Or put '@notdanger' in you commit message. Warnings :warning: No Changelog changes! :warning: This PR should update related documents as well. Messages :book: According to the blame info, we recommended @misakuo to be the reviewers. Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-weex pull request #576: * [android] refresh bugfix
GitHub user miomin opened a pull request: https://github.com/apache/incubator-weex/pull/576 * [android] refresh bugfix You can merge this pull request into a Git repository by running: $ git pull https://github.com/miomin/incubator-weex 0.15-bugfix-refresh Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/576.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #576 commit 31a70760219e2d0ed2d01979cc367170342507e3 Author: miomin <691292...@qq.com> Date: 2017-08-08T06:09:01Z * [android] refresh bugfix --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---