diff --git a/android/playground/app/src/main/assets/component/list/list-demo.js b/android/playground/app/src/main/assets/component/list/list-demo.js index e43fa7141c..4df309c25b 100644 --- a/android/playground/app/src/main/assets/component/list/list-demo.js +++ b/android/playground/app/src/main/assets/component/list/list-demo.js @@ -44,7 +44,7 @@ /* 0 */ /***/ function(module, exports) { - ;__weex_define__("@weex-component/cb2317d07ad026f4c51aa61496b2b05c", [], function(__weex_require__, __weex_exports__, __weex_module__){ + ;__weex_define__("@weex-component/b14be55e383e036df641734903dcecc6", [], function(__weex_require__, __weex_exports__, __weex_module__){ ; __weex_module__.exports = { @@ -371,6 +371,12 @@ this.backgroundColor = 'red'; this.composite = false; } + }, + onloading: function (e) { + this.loading_display = true + setTimeout(function () { + this.loading_display = 'hide' + }.bind(this), 1000) } } @@ -1188,7 +1194,7 @@ } }) }) - ;__weex_bootstrap__("@weex-component/cb2317d07ad026f4c51aa61496b2b05c", { + ;__weex_bootstrap__("@weex-component/b14be55e383e036df641734903dcecc6", { "transformerVersion": "0.3.1" },undefined) diff --git a/android/playground/app/src/main/assets/component/video-demo.js b/android/playground/app/src/main/assets/component/video-demo.js index b5d21471e5..6c38d1274e 100644 --- a/android/playground/app/src/main/assets/component/video-demo.js +++ b/android/playground/app/src/main/assets/component/video-demo.js @@ -44,7 +44,7 @@ /* 0 */ /***/ function(module, exports, __webpack_require__) { - ;__weex_define__("@weex-component/998c3a707a8f709ce0968668f832c89e", [], function(__weex_require__, __weex_exports__, __weex_module__){ + ;__weex_define__("@weex-component/13c6f8f9dc2ed874e5f24be910e31f26", [], function(__weex_require__, __weex_exports__, __weex_module__){ ; __webpack_require__(1); @@ -60,22 +60,18 @@ this.playStatus = 'play' }, onpause: function(e) { - console.log(this.playStatus); this.playStatus = e.playStatus; this.$call('modal', 'toast', {'message': 'video pause'}); }, onstart: function(e) { - console.log(this.playStatus); this.playStatus = e.playStatus; this.$call('modal', 'toast', {'message': 'video start'}); }, onfinish: function(e) { - console.log(this.playStatus); this.playStatus = e.playStatus; this.$call('modal', 'toast', {'message': 'video finish'}); }, onfail: function(e) { - console.log(this.playStatus); this.playStatus = e.playStatus; this.$call('modal', 'toast', {'message': 'video fail'}); } @@ -145,7 +141,7 @@ } }) }) - ;__weex_bootstrap__("@weex-component/998c3a707a8f709ce0968668f832c89e", { + ;__weex_bootstrap__("@weex-component/13c6f8f9dc2ed874e5f24be910e31f26", { "transformerVersion": "0.3.1" },undefined) diff --git a/android/playground/app/src/main/assets/iconfont.js b/android/playground/app/src/main/assets/iconfont.js new file mode 100644 index 0000000000..83ea43aa6e --- /dev/null +++ b/android/playground/app/src/main/assets/iconfont.js @@ -0,0 +1,144 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/f30da4ff4deb271b161473fed8083ed2", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + created: function() { + var domModule = __weex_require__('@weex-module/dom'); + //目前支持ttf、woff文件,不支持svg、eot类型 + domModule.addRule('font-face', { + 'font-family': "iconfont1", + 'src' : "url('iconfont.ttf')" + }); + domModule.addRule('font-face', { + 'font-family': "iconfont2", + 'src': "url('http://at.alicdn.com/t/font_1469606063_76593.ttf')" + }); + domModule.addRule('font-face', { + 'font-family': "iconfont3", + 'src': "url('http://at.alicdn.com/t/font_1469606522_9417143.woff')" + }); + domModule.addRule('font-face', { + 'font-family': "iconfont4", + 'src': "url('file:///storage/emulated/0/Android/data/com.alibaba.weex/cache/http:__at.alicdn.com_t_font_1469606063_76593.ttf')" + }); + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "children": [ + { + "type": "text", + "classList": [ + "title1" + ], + "attr": { + "value": "Assets: " + } + }, + { + "type": "text", + "classList": [ + "title2" + ], + "attr": { + "value": "http ttf: " + } + }, + { + "type": "text", + "classList": [ + "title3" + ], + "attr": { + "value": "http woff: " + } + }, + { + "type": "text", + "classList": [ + "title4" + ], + "attr": { + "value": "file: " + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "title1": { + "color": "#FF0000", + "fontSize": 36, + "fontFamily": "iconfont1" + }, + "title2": { + "color": "#FF0000", + "fontSize": 36, + "fontFamily": "iconfont2" + }, + "title3": { + "color": "#FF0000", + "fontSize": 36, + "fontFamily": "iconfont3" + }, + "title4": { + "color": "#FF0000", + "fontSize": 36, + "fontFamily": "iconfont4" + } + }) + }) + ;__weex_bootstrap__("@weex-component/f30da4ff4deb271b161473fed8083ed2", { + "transformerVersion": "0.3.1" + },undefined) + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/android/playground/app/src/main/assets/iconfont.ttf b/android/playground/app/src/main/assets/iconfont.ttf deleted file mode 100644 index ad252a0d53..0000000000 Binary files a/android/playground/app/src/main/assets/iconfont.ttf and /dev/null differ diff --git a/android/playground/app/src/main/assets/image-demo2.js b/android/playground/app/src/main/assets/image-demo2.js new file mode 100644 index 0000000000..96ee88f1a3 --- /dev/null +++ b/android/playground/app/src/main/assets/image-demo2.js @@ -0,0 +1,83 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/fca21923ec1c1c0065eb4383d4822356", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + img: '//gw.alicdn.com/tps/i2/TB1DpsmMpXXXXabaXXX20ySQVXX-512-512.png_400x400.jpg' + }} + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "image", + "classList": [ + "img" + ], + "style": { + "width": 400, + "height": 400 + }, + "attr": { + "src": function () {return this.img}, + "placeHolder": "hehe" + } + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "img": { + "marginBottom": 20 + } + }) + }) + ;__weex_bootstrap__("@weex-component/fca21923ec1c1c0065eb4383d4822356", { + "transformerVersion": "0.3.1" + },undefined) + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/android/playground/app/src/main/assets/index.js b/android/playground/app/src/main/assets/index.js index b3c97a06b7..6948d4076e 100644 --- a/android/playground/app/src/main/assets/index.js +++ b/android/playground/app/src/main/assets/index.js @@ -44,7 +44,7 @@ /* 0 */ /***/ function(module, exports, __webpack_require__) { - ;__weex_define__("@weex-component/2720f5df2d848285e38e4b2906e8540a", [], function(__weex_require__, __weex_exports__, __weex_module__){ + ;__weex_define__("@weex-component/5e6c4a62a4f2ddfd7c2d1010facc95ec", [], function(__weex_require__, __weex_exports__, __weex_module__){ ; __webpack_require__(15); @@ -78,11 +78,15 @@ {name: 'module/instance-api', title: 'Instance API'}, {name: 'module/modal', title: 'Modal'}, {name: 'module/stream-demo', title: 'Stream'}, + {name: 'module/storage-demo',title:'Storage'}, + {name: 'module/clipboard', title: 'Clipboard'}, + // showcase {name: 'showcase/new-fashion/index', title: 'Activity'}, {name: 'showcase/calculator', title: 'Calculator'}, {name: 'showcase/minesweeper', title: 'Minesweeper'}, - {name: 'showcase/ui', title: 'UI Gallery'} + {name: 'showcase/ui', title: 'UI Gallery'}, + {name: 'showcase/dropdown/dropdown-demo', title: 'Dropdown'} ] }} } @@ -96,7 +100,7 @@ } }) }) - ;__weex_bootstrap__("@weex-component/2720f5df2d848285e38e4b2906e8540a", { + ;__weex_bootstrap__("@weex-component/5e6c4a62a4f2ddfd7c2d1010facc95ec", { "transformerVersion": "0.3.1" },undefined) diff --git a/android/playground/app/src/main/assets/module/clipboard.js b/android/playground/app/src/main/assets/module/clipboard.js new file mode 100644 index 0000000000..7aa729a066 --- /dev/null +++ b/android/playground/app/src/main/assets/module/clipboard.js @@ -0,0 +1,1329 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + ;__weex_define__("@weex-component/7a05bd5f41281838ad84ab017d6b5115", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __webpack_require__(1); + + __weex_module__.exports = { + data: function () {return { + textToCopy : '', + textFromPaste: '', + tips : '', + }}, + ready : function() { + this.tips = "1. Just click COPY button. It will auto generate a string with random text, and copy to system clipboard. \n 2. do copy in another app, then come back and click PASTE button." + }, + methods: { + clicked: function() { + var $modal = __weex_require__('@weex-module/modal'); + $modal.toast({'message': 'clicked!', duration: 0.5}); + }, + + doCopy: function() { + textToCopy = "autoGenerateTextToCopy" + Math.random(); + + var $clipboard = __weex_require__('@weex-module/clipboard'); + $clipboard.setString(textToCopy); + + this.textToCopy = textToCopy; + this.tips = "copy done. Now system clipboard has string of '" + textToCopy + "', try PASTE button, or paste in another app." + }, + + doPaste: function() { + var $clipboard = __weex_require__('@weex-module/clipboard'); + var me = this; + $clipboard.getString(function(ret) { + console.log("paste result is " + JSON.stringify(ret)); + + me.textFromPaste = ret.data; + me.tips = "Paste done. Only support native(Android/iOS) NOW. according to security reason, paste in html5 is not supported."; + }); + } + + } + + + }; + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "scroller", + "children": [ + { + "type": "wxc-panel", + "attr": { + "title": "Clipboard", + "type": "primary" + }, + "children": [ + { + "type": "wxc-panel", + "attr": { + "title": "Copy to clipboard5" + }, + "children": [ + { + "type": "text", + "style": { + "lineHeight": 40, + "fontSize": 28 + }, + "attr": { + "value": function () {return this.textToCopy} + } + }, + { + "type": "wxc-button", + "attr": { + "type": "info", + "size": "middle", + "value": "Copy" + }, + "events": { + "click": "doCopy" + } + } + ] + }, + { + "type": "wxc-panel", + "attr": { + "title": "Paste from clipboard" + }, + "children": [ + { + "type": "text", + "style": { + "lineHeight": 40, + "fontSize": 28 + }, + "attr": { + "value": function () {return this.textFromPaste} + } + }, + { + "type": "wxc-button", + "attr": { + "type": "info", + "size": "middle", + "value": "Paste" + }, + "events": { + "click": "doPaste" + } + } + ] + }, + { + "type": "wxc-panel", + "attr": { + "title": "Result" + }, + "children": [ + { + "type": "wxc-tip", + "style": { + "marginBottom": 20 + }, + "attr": { + "value": function () {return this.tips} + } + } + ] + } + ] + } + ] + }) + }) + ;__weex_bootstrap__("@weex-component/7a05bd5f41281838ad84ab017d6b5115", { + "transformerVersion": "0.3.1" + },undefined) + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + ;__weex_define__("@weex-component/index", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __webpack_require__(2); + __webpack_require__(3); + __webpack_require__(4); + __webpack_require__(5); + __webpack_require__(6); + __webpack_require__(7); + __webpack_require__(8); + __webpack_require__(9); + __webpack_require__(10); + __webpack_require__(11); + __webpack_require__(12); + + }) + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-button", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + type: 'default', + size: 'large', + value: '' + }}, + methods: { + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": function () {return ['btn', 'btn-' + (this.type), 'btn-sz-' + (this.size)]}, + "children": [ + { + "type": "text", + "classList": function () {return ['btn-txt', 'btn-txt-' + (this.type), 'btn-txt-sz-' + (this.size)]}, + "attr": { + "value": function () {return this.value} + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "btn": { + "marginBottom": 0, + "alignItems": "center", + "justifyContent": "center", + "borderWidth": 1, + "borderStyle": "solid", + "borderColor": "#333333" + }, + "btn-default": { + "color": "rgb(51,51,51)" + }, + "btn-primary": { + "backgroundColor": "rgb(40,96,144)", + "borderColor": "rgb(40,96,144)" + }, + "btn-success": { + "backgroundColor": "rgb(92,184,92)", + "borderColor": "rgb(76,174,76)" + }, + "btn-info": { + "backgroundColor": "rgb(91,192,222)", + "borderColor": "rgb(70,184,218)" + }, + "btn-warning": { + "backgroundColor": "rgb(240,173,78)", + "borderColor": "rgb(238,162,54)" + }, + "btn-danger": { + "backgroundColor": "rgb(217,83,79)", + "borderColor": "rgb(212,63,58)" + }, + "btn-link": { + "borderColor": "rgba(0,0,0,0)", + "borderRadius": 0 + }, + "btn-txt-default": { + "color": "rgb(51,51,51)" + }, + "btn-txt-primary": { + "color": "rgb(255,255,255)" + }, + "btn-txt-success": { + "color": "rgb(255,255,255)" + }, + "btn-txt-info": { + "color": "rgb(255,255,255)" + }, + "btn-txt-warning": { + "color": "rgb(255,255,255)" + }, + "btn-txt-danger": { + "color": "rgb(255,255,255)" + }, + "btn-txt-link": { + "color": "rgb(51,122,183)" + }, + "btn-sz-large": { + "width": 300, + "height": 100, + "paddingTop": 25, + "paddingBottom": 25, + "paddingLeft": 40, + "paddingRight": 40, + "borderRadius": 15 + }, + "btn-sz-middle": { + "width": 240, + "height": 80, + "paddingTop": 15, + "paddingBottom": 15, + "paddingLeft": 30, + "paddingRight": 30, + "borderRadius": 10 + }, + "btn-sz-small": { + "width": 170, + "height": 60, + "paddingTop": 12, + "paddingBottom": 12, + "paddingLeft": 25, + "paddingRight": 25, + "borderRadius": 7 + }, + "btn-txt-sz-large": { + "fontSize": 45 + }, + "btn-txt-sz-middle": { + "fontSize": 35 + }, + "btn-txt-sz-small": { + "fontSize": 30 + } + }) + }) + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-hn", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + level: 1, + value: '' + }}, + methods: {} + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": function () {return ['h' + (this.level)]}, + "style": { + "justifyContent": "center" + }, + "children": [ + { + "type": "text", + "classList": function () {return ['txt-h' + (this.level)]}, + "attr": { + "value": function () {return this.value} + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "h1": { + "height": 110, + "paddingTop": 20, + "paddingBottom": 20 + }, + "h2": { + "height": 110, + "paddingTop": 20, + "paddingBottom": 20 + }, + "h3": { + "height": 110, + "paddingTop": 20, + "paddingBottom": 20 + }, + "txt-h1": { + "fontSize": 70 + }, + "txt-h2": { + "fontSize": 52 + }, + "txt-h3": { + "fontSize": 42 + } + }) + }) + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-list-item", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + bgColor: '#ffffff' + }}, + methods: { + touchstart: function() { + // FIXME android touch + // TODO adaptive opposite bgColor + // this.bgColor = '#e6e6e6'; + }, + touchend: function() { + // FIXME android touchend not triggered + // this.bgColor = '#ffffff'; + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "item" + ], + "events": { + "touchstart": "touchstart", + "touchend": "touchend" + }, + "style": { + "backgroundColor": function () {return this.bgColor} + }, + "children": [ + { + "type": "content" + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "item": { + "paddingTop": 25, + "paddingBottom": 25, + "paddingLeft": 35, + "paddingRight": 35, + "height": 160, + "justifyContent": "center", + "borderBottomWidth": 1, + "borderColor": "#dddddd" + } + }) + }) + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-panel", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + type: 'default', + title: '', + paddingBody: 20, + paddingHead: 20, + dataClass: '', // FIXME transfer class + border: 0 + }}, + ready: function() { + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": function () {return ['panel', 'panel-' + (this.type)]}, + "style": { + "borderWidth": function () {return this.border} + }, + "children": [ + { + "type": "text", + "classList": function () {return ['panel-header', 'panel-header-' + (this.type)]}, + "style": { + "paddingTop": function () {return this.paddingHead}, + "paddingBottom": function () {return this.paddingHead}, + "paddingLeft": function () {return this.paddingHead*1.5}, + "paddingRight": function () {return this.paddingHead*1.5} + }, + "attr": { + "value": function () {return this.title} + } + }, + { + "type": "div", + "classList": function () {return ['panel-body', 'panel-body-' + (this.type)]}, + "style": { + "paddingTop": function () {return this.paddingBody}, + "paddingBottom": function () {return this.paddingBody}, + "paddingLeft": function () {return this.paddingBody*1.5}, + "paddingRight": function () {return this.paddingBody*1.5} + }, + "children": [ + { + "type": "content" + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "panel": { + "marginBottom": 20, + "backgroundColor": "#ffffff", + "borderColor": "#dddddd", + "borderWidth": 1 + }, + "panel-primary": { + "borderColor": "rgb(40,96,144)" + }, + "panel-success": { + "borderColor": "rgb(76,174,76)" + }, + "panel-info": { + "borderColor": "rgb(70,184,218)" + }, + "panel-warning": { + "borderColor": "rgb(238,162,54)" + }, + "panel-danger": { + "borderColor": "rgb(212,63,58)" + }, + "panel-header": { + "backgroundColor": "#f5f5f5", + "fontSize": 40, + "color": "#333333" + }, + "panel-header-primary": { + "backgroundColor": "rgb(40,96,144)", + "color": "#ffffff" + }, + "panel-header-success": { + "backgroundColor": "rgb(92,184,92)", + "color": "#ffffff" + }, + "panel-header-info": { + "backgroundColor": "rgb(91,192,222)", + "color": "#ffffff" + }, + "panel-header-warning": { + "backgroundColor": "rgb(240,173,78)", + "color": "#ffffff" + }, + "panel-header-danger": { + "backgroundColor": "rgb(217,83,79)", + "color": "#ffffff" + }, + "panel-body": {} + }) + }) + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-tip", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + type: 'success', + value: '' + }} + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": function () {return ['tip', 'tip-' + (this.type)]}, + "children": [ + { + "type": "text", + "classList": function () {return ['tip-txt', 'tip-txt-' + (this.type)]}, + "attr": { + "value": function () {return this.value} + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "tip": { + "paddingLeft": 36, + "paddingRight": 36, + "paddingTop": 36, + "paddingBottom": 36, + "borderRadius": 10 + }, + "tip-txt": { + "fontSize": 28 + }, + "tip-success": { + "backgroundColor": "#dff0d8", + "borderColor": "#d6e9c6" + }, + "tip-txt-success": { + "color": "#3c763d" + }, + "tip-info": { + "backgroundColor": "#d9edf7", + "borderColor": "#bce8f1" + }, + "tip-txt-info": { + "color": "#31708f" + }, + "tip-warning": { + "backgroundColor": "#fcf8e3", + "borderColor": "#faebcc" + }, + "tip-txt-warning": { + "color": "#8a6d3b" + }, + "tip-danger": { + "backgroundColor": "#f2dede", + "borderColor": "#ebccd1" + }, + "tip-txt-danger": { + "color": "#a94442" + } + }) + }) + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-countdown", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + now: 0, + remain: 0, + time: { + elapse: 0, + D: '0', + DD: '0', + h: '0', + hh: '00', + H: '0', + HH: '0', + m: '0', + mm: '00', + M: '0', + MM: '0', + s: '0', + ss: '00', + S: '0', + SS: '0' + }, + outofview: false + }}, + ready: function() { + if (this.remain <= 0) { + return; + } + // this.isWeb = this.$getConfig().env.platform === 'Web'; + this.now = Date.now(); + this.nextTick(); + }, + methods: { + nextTick: function() { + if (this.outofview) { + setTimeout(this.nextTick.bind(this), 1000); + } else { + this.time.elapse = parseInt((Date.now() - this.now) / 1000); + + if (this.calc()) { + this.$emit('tick', Object.assign({}, this.time)); + setTimeout(this.nextTick.bind(this), 1000); + } else { + this.$emit('alarm', Object.assign({}, this.time)); + } + this._app.updateActions(); + } + }, + format: function(str) { + if (str.length >= 2) { + return str; + } else { + return '0' + str; + } + }, + calc: function() { + var remain = this.remain - this.time.elapse; + if (remain < 0) { + remain = 0; + } + this.time.D = String(parseInt(remain / 86400)); + this.time.DD = this.format(this.time.D); + this.time.h = String(parseInt((remain - parseInt(this.time.D) * 86400) / 3600)); + this.time.hh = this.format(this.time.h); + this.time.H = String(parseInt(remain / 3600)); + this.time.HH = this.format(this.time.H); + this.time.m = String(parseInt((remain - parseInt(this.time.H) * 3600) / 60)); + this.time.mm = this.format(this.time.m); + this.time.M = String(parseInt(remain / 60)); + this.time.MM = this.format(this.time.M); + this.time.s = String(remain - parseInt(this.time.M) * 60); + this.time.ss = this.format(this.time.s); + this.time.S = String(remain); + this.time.SS = this.format(this.time.S); + // console.log(remain, this.D, this.h, this.hh, this.H, this.HH, this.m, this.MM, this.s, this.ss, this.S, this.SS); + return remain > 0; + }, + appeared: function() { + this.outofview = false; + }, + disappeared: function() { + this.outofview = true; + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "style": { + "overflow": "hidden", + "flexDirection": "row" + }, + "events": { + "appear": "appeared", + "disappear": "disappeared" + }, + "children": [ + { + "type": "content" + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "wrap": { + "overflow": "hidden" + } + }) + }) + +/***/ }, +/* 8 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-marquee", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + step: 0, + count: 0, + index: 1, + duration: 0, + interval: 0, + outofview: false + }}, + ready: function () { + if (this.interval > 0 + && this.step > 0 + && this.duration > 0) { + this.nextTick(); + } + }, + methods: { + nextTick: function() { + var self = this; + if (this.outofview) { + setTimeout(self.nextTick.bind(self), self.interval); + } else { + setTimeout(function() { + self.animation(self.nextTick.bind(self)); + }, self.interval); + } + }, + animation: function(cb) { + var self = this; + var offset = -self.step * self.index; + var $animation = __weex_require__('@weex-module/animation'); + $animation.transition(this.$el('anim'), { + styles: { + transform: 'translateY(' + String(offset) + 'px) translateZ(0)' + }, + timingFunction: 'ease', + duration: self.duration + }, function() { + self.index = (self.index + 1) % (self.count); + self.$emit('change', { + index: self.index, + count: self.count + }); + cb && cb(); + }); + }, + appeared: function() { + this.outofview = false; + }, + disappeared: function() { + this.outofview = true; + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "wrap" + ], + "events": { + "appear": "appeared", + "disappear": "disappeared" + }, + "children": [ + { + "type": "div", + "id": "anim", + "classList": [ + "anim" + ], + "children": [ + { + "type": "content" + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "wrap": { + "overflow": "hidden", + "position": "relative" + }, + "anim": { + "flexDirection": "column", + "position": "absolute", + "transform": "translateY(0) translateZ(0)" + } + }) + }) + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-navbar", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + dataRole: 'navbar', + + //导航条背景色 + backgroundColor: 'black', + + //导航条高度 + height: 88, + + //导航条标题 + title: "", + + //导航条标题颜色 + titleColor: 'black', + + //右侧按钮图片 + rightItemSrc: '', + + //右侧按钮标题 + rightItemTitle: '', + + //右侧按钮标题颜色 + rightItemColor: 'black', + + //左侧按钮图片 + leftItemSrc: '', + + //左侧按钮标题 + leftItemTitle: '', + + //左侧按钮颜色 + leftItemColor: 'black', + }}, + methods: { + onclickrightitem: function (e) { + this.$dispatch('naviBar.rightItem.click', {}); + }, + onclickleftitem: function (e) { + this.$dispatch('naviBar.leftItem.click', {}); + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "container" + ], + "style": { + "height": function () {return this.height}, + "backgroundColor": function () {return this.backgroundColor} + }, + "attr": { + "dataRole": function () {return this.dataRole} + }, + "children": [ + { + "type": "text", + "classList": [ + "right-text" + ], + "style": { + "color": function () {return this.rightItemColor} + }, + "attr": { + "naviItemPosition": "right", + "value": function () {return this.rightItemTitle} + }, + "shown": function () {return !this.rightItemSrc}, + "events": { + "click": "onclickrightitem" + } + }, + { + "type": "image", + "classList": [ + "right-image" + ], + "attr": { + "naviItemPosition": "right", + "src": function () {return this.rightItemSrc} + }, + "shown": function () {return this.rightItemSrc}, + "events": { + "click": "onclickrightitem" + } + }, + { + "type": "text", + "classList": [ + "left-text" + ], + "style": { + "color": function () {return this.leftItemColor} + }, + "attr": { + "naviItemPosition": "left", + "value": function () {return this.leftItemTitle} + }, + "shown": function () {return !this.leftItemSrc}, + "events": { + "click": "onclickleftitem" + } + }, + { + "type": "image", + "classList": [ + "left-image" + ], + "attr": { + "naviItemPosition": "left", + "src": function () {return this.leftItemSrc} + }, + "shown": function () {return this.leftItemSrc}, + "events": { + "click": "onclickleftitem" + } + }, + { + "type": "text", + "classList": [ + "center-text" + ], + "style": { + "color": function () {return this.titleColor} + }, + "attr": { + "naviItemPosition": "center", + "value": function () {return this.title} + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "container": { + "flexDirection": "row", + "position": "fixed", + "top": 0, + "left": 0, + "right": 0, + "width": 750 + }, + "right-text": { + "position": "absolute", + "bottom": 28, + "right": 32, + "textAlign": "right", + "fontSize": 32, + "fontFamily": "'Open Sans', sans-serif" + }, + "left-text": { + "position": "absolute", + "bottom": 28, + "left": 32, + "textAlign": "left", + "fontSize": 32, + "fontFamily": "'Open Sans', sans-serif" + }, + "center-text": { + "position": "absolute", + "bottom": 25, + "left": 172, + "right": 172, + "textAlign": "center", + "fontSize": 36, + "fontWeight": "bold" + }, + "left-image": { + "position": "absolute", + "bottom": 20, + "left": 28, + "width": 50, + "height": 50 + }, + "right-image": { + "position": "absolute", + "bottom": 20, + "right": 28, + "width": 50, + "height": 50 + } + }) + }) + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + ;__weex_define__("@weex-component/wxc-navpage", [], function(__weex_require__, __weex_exports__, __weex_module__){ + __webpack_require__(9); + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "wrapper" + ], + "children": [ + { + "type": "wxc-navbar", + "attr": { + "dataRole": function () {return this.dataRole}, + "height": function () {return this.height}, + "backgroundColor": function () {return this.backgroundColor}, + "title": function () {return this.title}, + "titleColor": function () {return this.titleColor}, + "leftItemSrc": function () {return this.leftItemSrc}, + "leftItemTitle": function () {return this.leftItemTitle}, + "leftItemColor": function () {return this.leftItemColor}, + "rightItemSrc": function () {return this.rightItemSrc}, + "rightItemTitle": function () {return this.rightItemTitle}, + "rightItemColor": function () {return this.rightItemColor} + } + }, + { + "type": "div", + "classList": [ + "wrapper" + ], + "style": { + "marginTop": function () {return this.height} + }, + "children": [ + { + "type": "content" + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "wrapper": { + "position": "absolute", + "top": 0, + "left": 0, + "right": 0, + "bottom": 0, + "width": 750 + } + }) + }) + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + ;__weex_define__("@weex-component/wxc-tabbar", [], function(__weex_require__, __weex_exports__, __weex_module__){ + __webpack_require__(12); + + ; + __weex_module__.exports = { + data: function () {return { + tabItems: [ ], + selectedIndex: 0, + selectedColor: '#ff0000', + unselectedColor: '#000000', + }}, + created: function () { + this.selected(this.selectedIndex); + + this.$on('tabItem.onClick',function(e){ + var detail= e.detail; + this.selectedIndex = detail.index; + this.selected(detail.index); + + var params = { + index: detail.index + }; + this.$dispatch('tabBar.onClick', params); + }); + }, + methods: { + selected: function(index) { + for(var i = 0; i < this.tabItems.length; i++) { + var tabItem = this.tabItems[i]; + if(i == index){ + tabItem.icon = tabItem.selectedImage; + tabItem.titleColor = this.selectedColor; + tabItem.visibility = 'visible'; + } + else { + tabItem.icon = tabItem.image; + tabItem.titleColor = this.unselectedColor; + tabItem.visibility = 'hidden'; + } + } + }, + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "wrapper" + ], + "children": [ + { + "type": "embed", + "classList": [ + "content" + ], + "style": { + "visibility": function () {return this.visibility} + }, + "repeat": function () {return this.tabItems}, + "attr": { + "src": function () {return this.src}, + "type": "weex" + } + }, + { + "type": "div", + "classList": [ + "tabbar" + ], + "append": "tree", + "children": [ + { + "type": "wxc-tabitem", + "repeat": function () {return this.tabItems}, + "attr": { + "index": function () {return this.index}, + "icon": function () {return this.icon}, + "title": function () {return this.title}, + "titleColor": function () {return this.titleColor} + } + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "wrapper": { + "width": 750, + "position": "absolute", + "top": 0, + "left": 0, + "right": 0, + "bottom": 0 + }, + "content": { + "position": "absolute", + "top": 0, + "left": 0, + "right": 0, + "bottom": 0, + "marginTop": 0, + "marginBottom": 88 + }, + "tabbar": { + "flexDirection": "row", + "position": "fixed", + "bottom": 0, + "left": 0, + "right": 0, + "height": 88 + } + }) + }) + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-tabitem", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + index: 0, + title: '', + titleColor: '#000000', + icon: '', + backgroundColor: '#ffffff', + }}, + methods: { + onclickitem: function (e) { + var vm = this; + var params = { + index: vm.index + }; + vm.$dispatch('tabItem.onClick', params); + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "container" + ], + "style": { + "backgroundColor": function () {return this.backgroundColor} + }, + "events": { + "click": "onclickitem" + }, + "children": [ + { + "type": "image", + "classList": [ + "top-line" + ], + "attr": { + "src": "http://gtms03.alicdn.com/tps/i3/TB1mdsiMpXXXXXpXXXXNw4JIXXX-640-4.png" + } + }, + { + "type": "image", + "classList": [ + "tab-icon" + ], + "attr": { + "src": function () {return this.icon} + } + }, + { + "type": "text", + "classList": [ + "tab-text" + ], + "style": { + "color": function () {return this.titleColor} + }, + "attr": { + "value": function () {return this.title} + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "container": { + "flex": 1, + "flexDirection": "column", + "alignItems": "center", + "justifyContent": "center", + "height": 88 + }, + "top-line": { + "position": "absolute", + "top": 0, + "left": 0, + "right": 0, + "height": 2 + }, + "tab-icon": { + "marginTop": 5, + "width": 40, + "height": 40 + }, + "tab-text": { + "marginTop": 5, + "textAlign": "center", + "fontSize": 20 + } + }) + }) + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/android/playground/app/src/main/assets/module/storage-demo.js b/android/playground/app/src/main/assets/module/storage-demo.js new file mode 100644 index 0000000000..9155ec74f2 --- /dev/null +++ b/android/playground/app/src/main/assets/module/storage-demo.js @@ -0,0 +1,1339 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + ;__weex_define__("@weex-component/1c7fe998e56023469f05215078466ca1", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __webpack_require__(1); + __weex_module__.exports = { + data: function () {return { + setItemResult:'loading', + getItemResult:'loading', + removeItemResult:'loading', + lengthResult:'loading', + getAllKeysResult:'loading' + }}, + ready: function() { + var storage = __weex_require__('@weex-module/storage'); + var me = this; + + + //setItem + storage.setItem('foo','foo-value',function(e){ + console.log('set [foo<->foo-value]:'+JSON.stringify(e)); + me.setItemResult = 'foo:'+JSON.stringify(e)+'\n'; + }); + storage.setItem('bar','bar-value',function(e){ + console.log('set [bar<->bar-value]:'+JSON.stringify(e)); + me.setItemResult = me.setItemResult + 'bar:'+JSON.stringify(e); + }); + + //getItem + storage.getItem('foo',function(e){ + console.log('get foo result:'+JSON.stringify(e)); + me.getItemResult = 'get foo,value is '+e.data+'\n'; + }); + storage.getItem('bar',function(e){ + console.log('get bar result:'+JSON.stringify(e)); + me.getItemResult += 'get bar,value is '+e.data; + }); + + + //length + storage.length(function(e){ + console.log('length:'+JSON.stringify(e)); + me.lengthResult = 'current length is ' + e.data; + }); + + //getAllKeys + storage.getAllKeys(function(e){ + console.log('getAllKeys:'+JSON.stringify(e)); + me.getAllKeysResult = e.data; + //me.getAllKeysResult +=' '+ typeof e.data + }); + + //removeItem + storage.removeItem('foo',function(e){ + console.log('remove foo:'+JSON.stringify(e)); + me.removeItemResult = 'remove item foo '+e.result; + }); + + } + }; + + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "scroller", + "children": [ + { + "type": "wxc-panel", + "attr": { + "title": "storage API", + "type": "primary" + }, + "children": [ + { + "type": "wxc-panel", + "attr": { + "title": "setItem" + }, + "children": [ + { + "type": "text", + "attr": { + "value": function () {return this.setItemResult} + } + } + ] + }, + { + "type": "wxc-panel", + "attr": { + "title": "getItem" + }, + "children": [ + { + "type": "text", + "attr": { + "value": function () {return this.getItemResult} + } + } + ] + }, + { + "type": "wxc-panel", + "attr": { + "title": "length" + }, + "children": [ + { + "type": "text", + "attr": { + "value": function () {return this.lengthResult} + } + } + ] + }, + { + "type": "wxc-panel", + "attr": { + "title": "getAllKeys" + }, + "children": [ + { + "type": "text", + "attr": { + "value": function () {return this.getAllKeysResult} + } + } + ] + }, + { + "type": "wxc-panel", + "attr": { + "title": "removeItem" + }, + "children": [ + { + "type": "text", + "attr": { + "value": function () {return this.removeItemResult} + } + } + ] + } + ] + } + ] + }) + }) + ;__weex_bootstrap__("@weex-component/1c7fe998e56023469f05215078466ca1", { + "transformerVersion": "0.3.1" + },undefined) + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + ;__weex_define__("@weex-component/index", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __webpack_require__(2); + __webpack_require__(3); + __webpack_require__(4); + __webpack_require__(5); + __webpack_require__(6); + __webpack_require__(7); + __webpack_require__(8); + __webpack_require__(9); + __webpack_require__(10); + __webpack_require__(11); + __webpack_require__(12); + + }) + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-button", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + type: 'default', + size: 'large', + value: '' + }}, + methods: { + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": function () {return ['btn', 'btn-' + (this.type), 'btn-sz-' + (this.size)]}, + "children": [ + { + "type": "text", + "classList": function () {return ['btn-txt', 'btn-txt-' + (this.type), 'btn-txt-sz-' + (this.size)]}, + "attr": { + "value": function () {return this.value} + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "btn": { + "marginBottom": 0, + "alignItems": "center", + "justifyContent": "center", + "borderWidth": 1, + "borderStyle": "solid", + "borderColor": "#333333" + }, + "btn-default": { + "color": "rgb(51,51,51)" + }, + "btn-primary": { + "backgroundColor": "rgb(40,96,144)", + "borderColor": "rgb(40,96,144)" + }, + "btn-success": { + "backgroundColor": "rgb(92,184,92)", + "borderColor": "rgb(76,174,76)" + }, + "btn-info": { + "backgroundColor": "rgb(91,192,222)", + "borderColor": "rgb(70,184,218)" + }, + "btn-warning": { + "backgroundColor": "rgb(240,173,78)", + "borderColor": "rgb(238,162,54)" + }, + "btn-danger": { + "backgroundColor": "rgb(217,83,79)", + "borderColor": "rgb(212,63,58)" + }, + "btn-link": { + "borderColor": "rgba(0,0,0,0)", + "borderRadius": 0 + }, + "btn-txt-default": { + "color": "rgb(51,51,51)" + }, + "btn-txt-primary": { + "color": "rgb(255,255,255)" + }, + "btn-txt-success": { + "color": "rgb(255,255,255)" + }, + "btn-txt-info": { + "color": "rgb(255,255,255)" + }, + "btn-txt-warning": { + "color": "rgb(255,255,255)" + }, + "btn-txt-danger": { + "color": "rgb(255,255,255)" + }, + "btn-txt-link": { + "color": "rgb(51,122,183)" + }, + "btn-sz-large": { + "width": 300, + "height": 100, + "paddingTop": 25, + "paddingBottom": 25, + "paddingLeft": 40, + "paddingRight": 40, + "borderRadius": 15 + }, + "btn-sz-middle": { + "width": 240, + "height": 80, + "paddingTop": 15, + "paddingBottom": 15, + "paddingLeft": 30, + "paddingRight": 30, + "borderRadius": 10 + }, + "btn-sz-small": { + "width": 170, + "height": 60, + "paddingTop": 12, + "paddingBottom": 12, + "paddingLeft": 25, + "paddingRight": 25, + "borderRadius": 7 + }, + "btn-txt-sz-large": { + "fontSize": 45 + }, + "btn-txt-sz-middle": { + "fontSize": 35 + }, + "btn-txt-sz-small": { + "fontSize": 30 + } + }) + }) + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-hn", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + level: 1, + value: '' + }}, + methods: {} + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": function () {return ['h' + (this.level)]}, + "style": { + "justifyContent": "center" + }, + "children": [ + { + "type": "text", + "classList": function () {return ['txt-h' + (this.level)]}, + "attr": { + "value": function () {return this.value} + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "h1": { + "height": 110, + "paddingTop": 20, + "paddingBottom": 20 + }, + "h2": { + "height": 110, + "paddingTop": 20, + "paddingBottom": 20 + }, + "h3": { + "height": 110, + "paddingTop": 20, + "paddingBottom": 20 + }, + "txt-h1": { + "fontSize": 70 + }, + "txt-h2": { + "fontSize": 52 + }, + "txt-h3": { + "fontSize": 42 + } + }) + }) + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-list-item", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + bgColor: '#ffffff' + }}, + methods: { + touchstart: function() { + // FIXME android touch + // TODO adaptive opposite bgColor + // this.bgColor = '#e6e6e6'; + }, + touchend: function() { + // FIXME android touchend not triggered + // this.bgColor = '#ffffff'; + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "item" + ], + "events": { + "touchstart": "touchstart", + "touchend": "touchend" + }, + "style": { + "backgroundColor": function () {return this.bgColor} + }, + "children": [ + { + "type": "content" + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "item": { + "paddingTop": 25, + "paddingBottom": 25, + "paddingLeft": 35, + "paddingRight": 35, + "height": 160, + "justifyContent": "center", + "borderBottomWidth": 1, + "borderColor": "#dddddd" + } + }) + }) + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-panel", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + type: 'default', + title: '', + paddingBody: 20, + paddingHead: 20, + dataClass: '', // FIXME transfer class + border: 0 + }}, + ready: function() { + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": function () {return ['panel', 'panel-' + (this.type)]}, + "style": { + "borderWidth": function () {return this.border} + }, + "children": [ + { + "type": "text", + "classList": function () {return ['panel-header', 'panel-header-' + (this.type)]}, + "style": { + "paddingTop": function () {return this.paddingHead}, + "paddingBottom": function () {return this.paddingHead}, + "paddingLeft": function () {return this.paddingHead*1.5}, + "paddingRight": function () {return this.paddingHead*1.5} + }, + "attr": { + "value": function () {return this.title} + } + }, + { + "type": "div", + "classList": function () {return ['panel-body', 'panel-body-' + (this.type)]}, + "style": { + "paddingTop": function () {return this.paddingBody}, + "paddingBottom": function () {return this.paddingBody}, + "paddingLeft": function () {return this.paddingBody*1.5}, + "paddingRight": function () {return this.paddingBody*1.5} + }, + "children": [ + { + "type": "content" + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "panel": { + "marginBottom": 20, + "backgroundColor": "#ffffff", + "borderColor": "#dddddd", + "borderWidth": 1 + }, + "panel-primary": { + "borderColor": "rgb(40,96,144)" + }, + "panel-success": { + "borderColor": "rgb(76,174,76)" + }, + "panel-info": { + "borderColor": "rgb(70,184,218)" + }, + "panel-warning": { + "borderColor": "rgb(238,162,54)" + }, + "panel-danger": { + "borderColor": "rgb(212,63,58)" + }, + "panel-header": { + "backgroundColor": "#f5f5f5", + "fontSize": 40, + "color": "#333333" + }, + "panel-header-primary": { + "backgroundColor": "rgb(40,96,144)", + "color": "#ffffff" + }, + "panel-header-success": { + "backgroundColor": "rgb(92,184,92)", + "color": "#ffffff" + }, + "panel-header-info": { + "backgroundColor": "rgb(91,192,222)", + "color": "#ffffff" + }, + "panel-header-warning": { + "backgroundColor": "rgb(240,173,78)", + "color": "#ffffff" + }, + "panel-header-danger": { + "backgroundColor": "rgb(217,83,79)", + "color": "#ffffff" + }, + "panel-body": {} + }) + }) + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-tip", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + type: 'success', + value: '' + }} + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": function () {return ['tip', 'tip-' + (this.type)]}, + "children": [ + { + "type": "text", + "classList": function () {return ['tip-txt', 'tip-txt-' + (this.type)]}, + "attr": { + "value": function () {return this.value} + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "tip": { + "paddingLeft": 36, + "paddingRight": 36, + "paddingTop": 36, + "paddingBottom": 36, + "borderRadius": 10 + }, + "tip-txt": { + "fontSize": 28 + }, + "tip-success": { + "backgroundColor": "#dff0d8", + "borderColor": "#d6e9c6" + }, + "tip-txt-success": { + "color": "#3c763d" + }, + "tip-info": { + "backgroundColor": "#d9edf7", + "borderColor": "#bce8f1" + }, + "tip-txt-info": { + "color": "#31708f" + }, + "tip-warning": { + "backgroundColor": "#fcf8e3", + "borderColor": "#faebcc" + }, + "tip-txt-warning": { + "color": "#8a6d3b" + }, + "tip-danger": { + "backgroundColor": "#f2dede", + "borderColor": "#ebccd1" + }, + "tip-txt-danger": { + "color": "#a94442" + } + }) + }) + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-countdown", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + now: 0, + remain: 0, + time: { + elapse: 0, + D: '0', + DD: '0', + h: '0', + hh: '00', + H: '0', + HH: '0', + m: '0', + mm: '00', + M: '0', + MM: '0', + s: '0', + ss: '00', + S: '0', + SS: '0' + }, + outofview: false + }}, + ready: function() { + if (this.remain <= 0) { + return; + } + // this.isWeb = this.$getConfig().env.platform === 'Web'; + this.now = Date.now(); + this.nextTick(); + }, + methods: { + nextTick: function() { + if (this.outofview) { + setTimeout(this.nextTick.bind(this), 1000); + } else { + this.time.elapse = parseInt((Date.now() - this.now) / 1000); + + if (this.calc()) { + this.$emit('tick', Object.assign({}, this.time)); + setTimeout(this.nextTick.bind(this), 1000); + } else { + this.$emit('alarm', Object.assign({}, this.time)); + } + this._app.updateActions(); + } + }, + format: function(str) { + if (str.length >= 2) { + return str; + } else { + return '0' + str; + } + }, + calc: function() { + var remain = this.remain - this.time.elapse; + if (remain < 0) { + remain = 0; + } + this.time.D = String(parseInt(remain / 86400)); + this.time.DD = this.format(this.time.D); + this.time.h = String(parseInt((remain - parseInt(this.time.D) * 86400) / 3600)); + this.time.hh = this.format(this.time.h); + this.time.H = String(parseInt(remain / 3600)); + this.time.HH = this.format(this.time.H); + this.time.m = String(parseInt((remain - parseInt(this.time.H) * 3600) / 60)); + this.time.mm = this.format(this.time.m); + this.time.M = String(parseInt(remain / 60)); + this.time.MM = this.format(this.time.M); + this.time.s = String(remain - parseInt(this.time.M) * 60); + this.time.ss = this.format(this.time.s); + this.time.S = String(remain); + this.time.SS = this.format(this.time.S); + // console.log(remain, this.D, this.h, this.hh, this.H, this.HH, this.m, this.MM, this.s, this.ss, this.S, this.SS); + return remain > 0; + }, + appeared: function() { + this.outofview = false; + }, + disappeared: function() { + this.outofview = true; + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "style": { + "overflow": "hidden", + "flexDirection": "row" + }, + "events": { + "appear": "appeared", + "disappear": "disappeared" + }, + "children": [ + { + "type": "content" + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "wrap": { + "overflow": "hidden" + } + }) + }) + +/***/ }, +/* 8 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-marquee", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + step: 0, + count: 0, + index: 1, + duration: 0, + interval: 0, + outofview: false + }}, + ready: function () { + if (this.interval > 0 + && this.step > 0 + && this.duration > 0) { + this.nextTick(); + } + }, + methods: { + nextTick: function() { + var self = this; + if (this.outofview) { + setTimeout(self.nextTick.bind(self), self.interval); + } else { + setTimeout(function() { + self.animation(self.nextTick.bind(self)); + }, self.interval); + } + }, + animation: function(cb) { + var self = this; + var offset = -self.step * self.index; + var $animation = __weex_require__('@weex-module/animation'); + $animation.transition(this.$el('anim'), { + styles: { + transform: 'translateY(' + String(offset) + 'px) translateZ(0)' + }, + timingFunction: 'ease', + duration: self.duration + }, function() { + self.index = (self.index + 1) % (self.count); + self.$emit('change', { + index: self.index, + count: self.count + }); + cb && cb(); + }); + }, + appeared: function() { + this.outofview = false; + }, + disappeared: function() { + this.outofview = true; + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "wrap" + ], + "events": { + "appear": "appeared", + "disappear": "disappeared" + }, + "children": [ + { + "type": "div", + "id": "anim", + "classList": [ + "anim" + ], + "children": [ + { + "type": "content" + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "wrap": { + "overflow": "hidden", + "position": "relative" + }, + "anim": { + "flexDirection": "column", + "position": "absolute", + "transform": "translateY(0) translateZ(0)" + } + }) + }) + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-navbar", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + dataRole: 'navbar', + + //导航条背景色 + backgroundColor: 'black', + + //导航条高度 + height: 88, + + //导航条标题 + title: "", + + //导航条标题颜色 + titleColor: 'black', + + //右侧按钮图片 + rightItemSrc: '', + + //右侧按钮标题 + rightItemTitle: '', + + //右侧按钮标题颜色 + rightItemColor: 'black', + + //左侧按钮图片 + leftItemSrc: '', + + //左侧按钮标题 + leftItemTitle: '', + + //左侧按钮颜色 + leftItemColor: 'black', + }}, + methods: { + onclickrightitem: function (e) { + this.$dispatch('naviBar.rightItem.click', {}); + }, + onclickleftitem: function (e) { + this.$dispatch('naviBar.leftItem.click', {}); + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "container" + ], + "style": { + "height": function () {return this.height}, + "backgroundColor": function () {return this.backgroundColor} + }, + "attr": { + "dataRole": function () {return this.dataRole} + }, + "children": [ + { + "type": "text", + "classList": [ + "right-text" + ], + "style": { + "color": function () {return this.rightItemColor} + }, + "attr": { + "naviItemPosition": "right", + "value": function () {return this.rightItemTitle} + }, + "shown": function () {return !this.rightItemSrc}, + "events": { + "click": "onclickrightitem" + } + }, + { + "type": "image", + "classList": [ + "right-image" + ], + "attr": { + "naviItemPosition": "right", + "src": function () {return this.rightItemSrc} + }, + "shown": function () {return this.rightItemSrc}, + "events": { + "click": "onclickrightitem" + } + }, + { + "type": "text", + "classList": [ + "left-text" + ], + "style": { + "color": function () {return this.leftItemColor} + }, + "attr": { + "naviItemPosition": "left", + "value": function () {return this.leftItemTitle} + }, + "shown": function () {return !this.leftItemSrc}, + "events": { + "click": "onclickleftitem" + } + }, + { + "type": "image", + "classList": [ + "left-image" + ], + "attr": { + "naviItemPosition": "left", + "src": function () {return this.leftItemSrc} + }, + "shown": function () {return this.leftItemSrc}, + "events": { + "click": "onclickleftitem" + } + }, + { + "type": "text", + "classList": [ + "center-text" + ], + "style": { + "color": function () {return this.titleColor} + }, + "attr": { + "naviItemPosition": "center", + "value": function () {return this.title} + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "container": { + "flexDirection": "row", + "position": "fixed", + "top": 0, + "left": 0, + "right": 0, + "width": 750 + }, + "right-text": { + "position": "absolute", + "bottom": 28, + "right": 32, + "textAlign": "right", + "fontSize": 32, + "fontFamily": "'Open Sans', sans-serif" + }, + "left-text": { + "position": "absolute", + "bottom": 28, + "left": 32, + "textAlign": "left", + "fontSize": 32, + "fontFamily": "'Open Sans', sans-serif" + }, + "center-text": { + "position": "absolute", + "bottom": 25, + "left": 172, + "right": 172, + "textAlign": "center", + "fontSize": 36, + "fontWeight": "bold" + }, + "left-image": { + "position": "absolute", + "bottom": 20, + "left": 28, + "width": 50, + "height": 50 + }, + "right-image": { + "position": "absolute", + "bottom": 20, + "right": 28, + "width": 50, + "height": 50 + } + }) + }) + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + ;__weex_define__("@weex-component/wxc-navpage", [], function(__weex_require__, __weex_exports__, __weex_module__){ + __webpack_require__(9); + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "wrapper" + ], + "children": [ + { + "type": "wxc-navbar", + "attr": { + "dataRole": function () {return this.dataRole}, + "height": function () {return this.height}, + "backgroundColor": function () {return this.backgroundColor}, + "title": function () {return this.title}, + "titleColor": function () {return this.titleColor}, + "leftItemSrc": function () {return this.leftItemSrc}, + "leftItemTitle": function () {return this.leftItemTitle}, + "leftItemColor": function () {return this.leftItemColor}, + "rightItemSrc": function () {return this.rightItemSrc}, + "rightItemTitle": function () {return this.rightItemTitle}, + "rightItemColor": function () {return this.rightItemColor} + } + }, + { + "type": "div", + "classList": [ + "wrapper" + ], + "style": { + "marginTop": function () {return this.height} + }, + "children": [ + { + "type": "content" + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "wrapper": { + "position": "absolute", + "top": 0, + "left": 0, + "right": 0, + "bottom": 0, + "width": 750 + } + }) + }) + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + ;__weex_define__("@weex-component/wxc-tabbar", [], function(__weex_require__, __weex_exports__, __weex_module__){ + __webpack_require__(12); + + ; + __weex_module__.exports = { + data: function () {return { + tabItems: [ ], + selectedIndex: 0, + selectedColor: '#ff0000', + unselectedColor: '#000000', + }}, + created: function () { + this.selected(this.selectedIndex); + + this.$on('tabItem.onClick',function(e){ + var detail= e.detail; + this.selectedIndex = detail.index; + this.selected(detail.index); + + var params = { + index: detail.index + }; + this.$dispatch('tabBar.onClick', params); + }); + }, + methods: { + selected: function(index) { + for(var i = 0; i < this.tabItems.length; i++) { + var tabItem = this.tabItems[i]; + if(i == index){ + tabItem.icon = tabItem.selectedImage; + tabItem.titleColor = this.selectedColor; + tabItem.visibility = 'visible'; + } + else { + tabItem.icon = tabItem.image; + tabItem.titleColor = this.unselectedColor; + tabItem.visibility = 'hidden'; + } + } + }, + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "wrapper" + ], + "children": [ + { + "type": "embed", + "classList": [ + "content" + ], + "style": { + "visibility": function () {return this.visibility} + }, + "repeat": function () {return this.tabItems}, + "attr": { + "src": function () {return this.src}, + "type": "weex" + } + }, + { + "type": "div", + "classList": [ + "tabbar" + ], + "append": "tree", + "children": [ + { + "type": "wxc-tabitem", + "repeat": function () {return this.tabItems}, + "attr": { + "index": function () {return this.index}, + "icon": function () {return this.icon}, + "title": function () {return this.title}, + "titleColor": function () {return this.titleColor} + } + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "wrapper": { + "width": 750, + "position": "absolute", + "top": 0, + "left": 0, + "right": 0, + "bottom": 0 + }, + "content": { + "position": "absolute", + "top": 0, + "left": 0, + "right": 0, + "bottom": 0, + "marginTop": 0, + "marginBottom": 88 + }, + "tabbar": { + "flexDirection": "row", + "position": "fixed", + "bottom": 0, + "left": 0, + "right": 0, + "height": 88 + } + }) + }) + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/wxc-tabitem", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + __weex_module__.exports = { + data: function () {return { + index: 0, + title: '', + titleColor: '#000000', + icon: '', + backgroundColor: '#ffffff', + }}, + methods: { + onclickitem: function (e) { + var vm = this; + var params = { + index: vm.index + }; + vm.$dispatch('tabItem.onClick', params); + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "container" + ], + "style": { + "backgroundColor": function () {return this.backgroundColor} + }, + "events": { + "click": "onclickitem" + }, + "children": [ + { + "type": "image", + "classList": [ + "top-line" + ], + "attr": { + "src": "http://gtms03.alicdn.com/tps/i3/TB1mdsiMpXXXXXpXXXXNw4JIXXX-640-4.png" + } + }, + { + "type": "image", + "classList": [ + "tab-icon" + ], + "attr": { + "src": function () {return this.icon} + } + }, + { + "type": "text", + "classList": [ + "tab-text" + ], + "style": { + "color": function () {return this.titleColor} + }, + "attr": { + "value": function () {return this.title} + } + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "container": { + "flex": 1, + "flexDirection": "column", + "alignItems": "center", + "justifyContent": "center", + "height": 88 + }, + "top-line": { + "position": "absolute", + "top": 0, + "left": 0, + "right": 0, + "height": 2 + }, + "tab-icon": { + "marginTop": 5, + "width": 40, + "height": 40 + }, + "tab-text": { + "marginTop": 5, + "textAlign": "center", + "fontSize": 20 + } + }) + }) + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/android/playground/app/src/main/assets/module/stream-demo.js b/android/playground/app/src/main/assets/module/stream-demo.js index c15d7881e1..f0add2d954 100644 --- a/android/playground/app/src/main/assets/module/stream-demo.js +++ b/android/playground/app/src/main/assets/module/stream-demo.js @@ -44,30 +44,53 @@ /* 0 */ /***/ function(module, exports, __webpack_require__) { - ;__weex_define__("@weex-component/a7c8f395a9fe63d3701adaeb7a25eb97", [], function(__weex_require__, __weex_exports__, __weex_module__){ + ;__weex_define__("@weex-component/2e3ee5c853359a76389401bc185c933a", [], function(__weex_require__, __weex_exports__, __weex_module__){ ; __webpack_require__(1); __weex_module__.exports = { data: function () {return { + getJsonpResult: 'loading...', getResult: 'loading...', - postResult: 'loading...' + postResult: 'loading...', + putResult: 'loading...', + deleteResult: 'loading...', + headResult: 'loading...', + patchResult: 'loading...', }}, ready: function() { var stream = __weex_require__('@weex-module/stream'); var me = this; + var GET_URL_JSONP = 'http://jsfiddle.net/echo/jsonp/?callback=anything&result=content_in_response'; var GET_URL = 'http://httpbin.org/get'; var POST_URL = 'http://httpbin.org/post'; + var PUT_URL = 'http://httpbin.org/put'; + var DELETE_URL = 'http://httpbin.org/delete'; + var HEAD_URL = 'http://httpbin.org/status/418'; + var PATCH_URL = 'http://httpbin.org/patch'; + stream.fetch({ + method: 'GET', + url: GET_URL_JSONP, + type:'jsonp' + }, function(ret) { + if(!ret.ok){ + me.getJsonpResult = "request failed"; + }else{ + console.log('get:'+ret); + me.getJsonpResult = ret.data; + } + },function(response){ + console.log('get jsonp in progress:'+response.length); + me.getJsonpResult = "bytes received:"+response.length; + }); + stream.fetch({ method: 'GET', url: GET_URL, type:'json' }, function(ret) { - if(typeof ret === 'string'){ - ret = JSON.parse(ret); - } if(!ret.ok){ me.getResult = "request failed"; }else{ @@ -84,9 +107,6 @@ url: POST_URL, type:'json' }, function(ret) { - if(typeof ret === 'string'){ - ret = JSON.parse(ret); - } if(!ret.ok){ me.postResult = "request failed"; }else{ @@ -97,6 +117,71 @@ console.log('get in progress:'+response.length); me.postResult = "bytes received:"+response.length; }); + + stream.fetch({ + method: 'PUT', + url: PUT_URL, + type:'json' + }, function(ret) { + if(!ret.ok){ + me.putResult = "request failed"; + }else{ + console.log('get:'+ret); + me.putResult = ret.data; + } + },function(response){ + console.log('get in progress:'+response.length); + me.putResult = "bytes received:"+response.length; + }); + + stream.fetch({ + method: 'DELETE', + url: DELETE_URL, + type:'json' + }, function(ret) { + + if(!ret.ok){ + me.deleteResult = "request failed"; + }else{ + console.log('get:'+ret); + me.deleteResult = ret.data; + } + },function(response){ + console.log('get in progress:'+response.length); + me.deleteResult = "bytes received:"+response.length; + }); + + stream.fetch({ + method: 'HEAD', + url: HEAD_URL, + type:'json' + }, function(ret) { + if(ret.statusText !== 'I\'m a teapot'){ + me.headResult = "request failed"; + }else{ + console.log('get:'+ret); + me.headResult = ret.statusText; + } + },function(response){ + console.log('get in progress:'+response.length); + me.headResult = "bytes received:"+response.length; + }); + + stream.fetch({ + method: 'PATCH', + url: PATCH_URL, + type:'json' + }, function(ret) { + if(!ret.ok){ + me.patchResult = "request failed"; + }else{ + console.log('get:'+ret); + me.patchResult = ret.data; + } + },function(response){ + console.log('get in progress:'+response.length); + me.patchResult = "bytes received:"+response.length; + }); } }; @@ -125,6 +210,20 @@ } ] }, + { + "type": "wxc-panel", + "attr": { + "title": "method = GET / type = jsonp" + }, + "children": [ + { + "type": "text", + "attr": { + "value": function () {return this.getJsonpResult} + } + } + ] + }, { "type": "wxc-panel", "attr": { @@ -138,13 +237,69 @@ } } ] + }, + { + "type": "wxc-panel", + "attr": { + "title": "method = PUT" + }, + "children": [ + { + "type": "text", + "attr": { + "value": function () {return this.putResult} + } + } + ] + }, + { + "type": "wxc-panel", + "attr": { + "title": "method = DELETE" + }, + "children": [ + { + "type": "text", + "attr": { + "value": function () {return this.deleteResult} + } + } + ] + }, + { + "type": "wxc-panel", + "attr": { + "title": "method = HEAD" + }, + "children": [ + { + "type": "text", + "attr": { + "value": function () {return this.headResult} + } + } + ] + }, + { + "type": "wxc-panel", + "attr": { + "title": "method = PATCH" + }, + "children": [ + { + "type": "text", + "attr": { + "value": function () {return this.patchResult} + } + } + ] } ] } ] }) }) - ;__weex_bootstrap__("@weex-component/a7c8f395a9fe63d3701adaeb7a25eb97", { + ;__weex_bootstrap__("@weex-component/2e3ee5c853359a76389401bc185c933a", { "transformerVersion": "0.3.1" },undefined) diff --git a/android/playground/app/src/main/assets/showcase/dropdown/dropdown-demo.js b/android/playground/app/src/main/assets/showcase/dropdown/dropdown-demo.js new file mode 100644 index 0000000000..deb3f57cfa --- /dev/null +++ b/android/playground/app/src/main/assets/showcase/dropdown/dropdown-demo.js @@ -0,0 +1,549 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 0: +/***/ function(module, exports, __webpack_require__) { + + ;__weex_define__("@weex-component/89d20f2b69944aec95a233f12eadd0e7", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + + ; + __webpack_require__(17); + + var initData = '[{\"addTime\":\"2016-07-14\",\"questionStatus\":\"2\",\"questionStatusValue\":\"Closed\",\"title\":\"This is a demo\",\"vid\":\"AW5PMSC\"},{\"addTime\":\"2016-07-14\",\"questionStatus\":\"1\",\"questionStatusValue\":\"Waiting\",\"title\":\"This is a demo\",\"vid\":\"AW5PMSM\"},{\"addTime\":\"2016-07-14\",\"questionStatus\":\"2\",\"questionStatusValue\":\"Confirmed\",\"title\":\"This is a demo\",\"vid\":\"AW5PMSA\"}]'; + + __weex_module__.exports = { + data: function () {return { + screenHeight: 0, + // biz + status: '1', + list: [] + }}, + ready: function () { + this.screenHeight = this.$getConfig().env.deviceHeight ; + this.$on('statuschange', function (e) { + var detail = e.detail; + this.toast({ + message: JSON.stringify(detail) + }); + this.status = detail.id; + this.filter(); + }.bind(this)); + this.filter(); + }, + + methods: { + toast: function (params) { + var modal = __weex_require__('@weex-module/modal'); + modal.toast(params); + }, + + filter: function () { + var status = this.status; + this.list = []; + var allList = JSON.parse(initData); + if(status == '0') { + this.list = allList; + }else { + this.list = allList.filter(function(item){ + return item.questionStatus == status; + }); + } + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "wrapper" + ], + "children": [ + { + "type": "we-dropdown", + "classList": [ + "dropdown" + ], + "attr": { + "statusId": function () {return this.status} + }, + "children": [ + { + "type": "div", + "style": { + "height": function () {return this.screenHeight} + }, + "children": [ + { + "type": "list", + "classList": [ + "list" + ], + "shown": function () {return this.list.length}, + "children": [ + { + "type": "cell", + "append": "tree", + "repeat": function () {return this.list}, + "classList": [ + "cell" + ], + "attr": { + "vid": function () {return this.vid}, + "index": function () {return this.vid} + }, + "children": [ + { + "type": "text", + "classList": [ + "title" + ], + "attr": { + "value": function () {return this.title} + } + }, + { + "type": "div", + "classList": [ + "info" + ], + "children": [ + { + "type": "text", + "classList": function () {return ['txt', 'status', 'status-' + (this.questionStatus)]}, + "attr": { + "value": function () {return this.questionStatusValue} + } + }, + { + "type": "text", + "classList": [ + "txt" + ], + "attr": { + "value": function () {return ', id: ' + (this.vid) + ' ,'} + } + }, + { + "type": "text", + "classList": [ + "txt" + ], + "attr": { + "value": function () {return 'time: ' + (this.addTime)} + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "dropdown": { + "justifyContent": "center", + "alignContent": "stretch", + "position": "relative", + "zIndex": 100 + }, + "wrapper": { + "justifyContent": "flex-start", + "flexDirection": "column", + "position": "relative" + }, + "list": { + "flex": 1, + "width": 750 + }, + "refresh-view": { + "height": 120, + "width": 750, + "marginTop": 10, + "marginBottom": 10, + "alignItems": "center", + "justifyContent": "center" + }, + "refresh-arrow": { + "fontSize": 30, + "color": "#45b5f0" + }, + "indicator": { + "height": 40, + "width": 40, + "color": "#45b5f0" + }, + "cell": { + "width": 750, + "paddingTop": 15, + "paddingBottom": 5, + "paddingLeft": 20, + "paddingRight": 20, + "borderBottomWidth": 1, + "borderStyle": "solid", + "borderColor": "#999999" + }, + "title": { + "fontSize": 32, + "paddingTop": 5, + "paddingBottom": 5, + "color": "#333333" + }, + "info": { + "flexDirection": "row", + "justifyContent": "flex-start", + "alignItems": "stretch" + }, + "txt": { + "fontSize": 28, + "paddingTop": 5, + "paddingBottom": 5, + "color": "#999999" + }, + "status-1": { + "color": "#009900" + }, + "status-2": { + "color": "#ff0000" + } + }) + }) + ;__weex_bootstrap__("@weex-component/89d20f2b69944aec95a233f12eadd0e7", { + "transformerVersion": "0.3.1" + },undefined) + +/***/ }, + +/***/ 17: +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/we-dropdown", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + var animation = __weex_require__('@weex-module/animation'); + + __weex_module__.exports = { + data: function () {return { + statusId: '0', + status: [ + {id: '0', name: 'All'}, + {id: '1', name: 'Doing'}, + {id: '2', name: 'Done'} + ], + flagSrc: 'https://gw.alicdn.com/tps/TB11a2lKFXXXXbVXpXXXXXXXXXX-32-32.png', + arrowSrc: 'https://gw.alicdn.com/tps/TB1O3_aKFXXXXXdXVXXXXXXXXXX-27-23.png' + }}, + computed: { + statusName: { + get: function(){ + var id = this.statusId; + return this.status.filter(function(s){ + return s.id == id + })[0].name; + } + } + }, + methods: { + switchView: function() { + this.toggleMaskVisible(); + + this.opacity(this._ids.mask.el.ref); + this.collapse(this._ids.options.el.ref); + this.rotate(this._ids.arrow.el.ref); + + }, + + onItemClick: function(e) { + var vid = e.target.attr.vid; + this.updateStatus(vid); + this.switchView(); + this.$dispatch('statuschange', { + id: this.statusId, + name: this.statusName + }) + }, + + updateStatus: function(id) { + this.statusId = id; + }, + + toggleMaskVisible: function(){ + this.current_showMask = !this.current_showMask; + var visibility = this.current_showMask? 'visible': 'hidden'; + this._ids.mask.el.setClassStyle({visibility:visibility}); + }, + + collapse: function(ref, callback) { + var platform = this.$getConfig().env.platform; + var translate = 'translate(0, 100%)'; // Web need % ; + if(platform == 'iOS') { + translate = 'translate(0, 270)'; // ios bug && fixing + } + this.current_translate = this.current_translate ? '' : translate; + this.anim(ref, { + transform: this.current_translate + }, 'ease', 100, callback); + }, + + opacity: function(ref, callback) { + var self = this; + self.current_opacity = self.current_opacity === 1 ? 0.1 : 1; + self.anim(ref, { + opacity: self.current_opacity + }, 'ease', 100, callback); + }, + + rotate: function(ref, callback) { + var self = this; + if(!self.current_rotate) { + self.current_rotate = 0; + } + self.current_rotate = self.current_rotate + 180; + self.anim(ref, { + transform: 'rotate(' + self.current_rotate + 'deg)' + }, 'linear', 100, callback); + }, + + anim: function(ref, styles, timingFunction, duration, callback) { + animation.transition(ref, { + styles: styles, + timingFunction: timingFunction, + duration: duration + }, callback || function(){}); + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "select-container" + ], + "children": [ + { + "type": "div", + "classList": [ + "content" + ], + "children": [ + { + "type": "content" + } + ] + }, + { + "type": "div", + "classList": [ + "mask" + ], + "id": "mask", + "events": { + "click": "switchView" + } + }, + { + "type": "div", + "classList": [ + "options" + ], + "id": "options", + "children": [ + { + "type": "div", + "repeat": function () {return this.status}, + "classList": [ + "cell" + ], + "attr": { + "vid": function () {return this.id} + }, + "events": { + "click": "onItemClick" + }, + "children": [ + { + "type": "text", + "classList": function () {return ['name', this.id==this.statusId?'current':'']}, + "attr": { + "value": function () {return this.name} + } + }, + { + "type": "image", + "classList": [ + "icon-curr-flag" + ], + "attr": { + "src": function () {return this.flagSrc} + }, + "shown": function () {return this.id==this.statusId} + } + ] + } + ] + }, + { + "type": "div", + "classList": [ + "select" + ], + "events": { + "click": "switchView" + }, + "children": [ + { + "type": "text", + "classList": [ + "current-text" + ], + "attr": { + "value": function () {return this.statusName} + } + }, + { + "type": "image", + "classList": [ + "icon-arrow" + ], + "id": "arrow", + "attr": { + "src": function () {return this.arrowSrc} + } + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "select-container": { + "flexDirection": "column", + "position": "relative", + "zIndex": 1000 + }, + "content": { + "width": 750, + "marginTop": 90 + }, + "mask": { + "position": "absolute", + "top": 0, + "left": 0, + "bottom": 0, + "right": 0, + "flex": 1, + "width": 750, + "backgroundColor": "rgba(0,0,0,0.5)", + "visibility": "hidden" + }, + "select": { + "width": 750, + "height": 90, + "flexDirection": "row", + "alignItems": "center", + "justifyContent": "space-between", + "paddingLeft": 30, + "paddingRight": 30, + "borderBottomWidth": 1, + "borderStyle": "solid", + "borderColor": "#dddddd", + "backgroundColor": "#eeeeee", + "zIndex": 1001, + "position": "absolute", + "top": 0 + }, + "current-text": { + "color": "#333333", + "fontSize": 33, + "flex": 1 + }, + "icon-arrow": { + "width": 27, + "height": 23 + }, + "options": { + "position": "absolute", + "top": -181, + "width": 750, + "backgroundColor": "#ffffff", + "transformOrigin": "center center" + }, + "cell": { + "flexDirection": "row", + "justifyContent": "space-between", + "alignItems": "center", + "width": 750, + "height": 90, + "paddingLeft": 30, + "paddingRight": 30, + "borderBottomWidth": 1, + "borderStyle": "solid", + "borderColor": "#dddddd" + }, + "name": { + "color": "#333333", + "fontSize": 33, + "flex": 1 + }, + "icon-curr-flag": { + "width": 32, + "height": 32 + }, + "current": { + "color": "#0088FB" + } + }) + }) + +/***/ } + +/******/ }); \ No newline at end of file diff --git a/android/playground/app/src/main/assets/showcase/dropdown/we-dropdown.js b/android/playground/app/src/main/assets/showcase/dropdown/we-dropdown.js new file mode 100644 index 0000000000..b83977cf41 --- /dev/null +++ b/android/playground/app/src/main/assets/showcase/dropdown/we-dropdown.js @@ -0,0 +1,330 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports) { + + ;__weex_define__("@weex-component/526974094623ab419c9886ba381581b7", [], function(__weex_require__, __weex_exports__, __weex_module__){ + + ; + var animation = __weex_require__('@weex-module/animation'); + + __weex_module__.exports = { + data: function () {return { + statusId: '0', + status: [ + {id: '0', name: 'All'}, + {id: '1', name: 'Doing'}, + {id: '2', name: 'Done'} + ], + flagSrc: 'https://gw.alicdn.com/tps/TB11a2lKFXXXXbVXpXXXXXXXXXX-32-32.png', + arrowSrc: 'https://gw.alicdn.com/tps/TB1O3_aKFXXXXXdXVXXXXXXXXXX-27-23.png' + }}, + computed: { + statusName: { + get: function(){ + var id = this.statusId; + return this.status.filter(function(s){ + return s.id == id + })[0].name; + } + } + }, + methods: { + switchView: function() { + this.toggleMaskVisible(); + + this.opacity(this._ids.mask.el.ref); + this.collapse(this._ids.options.el.ref); + this.rotate(this._ids.arrow.el.ref); + + }, + + onItemClick: function(e) { + var vid = e.target.attr.vid; + this.updateStatus(vid); + this.switchView(); + this.$dispatch('statuschange', { + id: this.statusId, + name: this.statusName + }) + }, + + updateStatus: function(id) { + this.statusId = id; + }, + + toggleMaskVisible: function(){ + this.current_showMask = !this.current_showMask; + var visibility = this.current_showMask? 'visible': 'hidden'; + this._ids.mask.el.setClassStyle({visibility:visibility}); + }, + + collapse: function(ref, callback) { + var platform = this.$getConfig().env.platform; + var translate = 'translate(0, 100%)'; // Web need % ; + if(platform == 'iOS') { + translate = 'translate(0, 270)'; // ios bug && fixing + } + this.current_translate = this.current_translate ? '' : translate; + this.anim(ref, { + transform: this.current_translate + }, 'ease', 100, callback); + }, + + opacity: function(ref, callback) { + var self = this; + self.current_opacity = self.current_opacity === 1 ? 0.1 : 1; + self.anim(ref, { + opacity: self.current_opacity + }, 'ease', 100, callback); + }, + + rotate: function(ref, callback) { + var self = this; + if(!self.current_rotate) { + self.current_rotate = 0; + } + self.current_rotate = self.current_rotate + 180; + self.anim(ref, { + transform: 'rotate(' + self.current_rotate + 'deg)' + }, 'linear', 100, callback); + }, + + anim: function(ref, styles, timingFunction, duration, callback) { + animation.transition(ref, { + styles: styles, + timingFunction: timingFunction, + duration: duration + }, callback || function(){}); + } + } + } + + ;__weex_module__.exports.template = __weex_module__.exports.template || {} + ;Object.assign(__weex_module__.exports.template, { + "type": "div", + "classList": [ + "select-container" + ], + "children": [ + { + "type": "div", + "classList": [ + "content" + ], + "children": [ + { + "type": "content" + } + ] + }, + { + "type": "div", + "classList": [ + "mask" + ], + "id": "mask", + "events": { + "click": "switchView" + } + }, + { + "type": "div", + "classList": [ + "options" + ], + "id": "options", + "children": [ + { + "type": "div", + "repeat": function () {return this.status}, + "classList": [ + "cell" + ], + "attr": { + "vid": function () {return this.id} + }, + "events": { + "click": "onItemClick" + }, + "children": [ + { + "type": "text", + "classList": function () {return ['name', this.id==this.statusId?'current':'']}, + "attr": { + "value": function () {return this.name} + } + }, + { + "type": "image", + "classList": [ + "icon-curr-flag" + ], + "attr": { + "src": function () {return this.flagSrc} + }, + "shown": function () {return this.id==this.statusId} + } + ] + } + ] + }, + { + "type": "div", + "classList": [ + "select" + ], + "events": { + "click": "switchView" + }, + "children": [ + { + "type": "text", + "classList": [ + "current-text" + ], + "attr": { + "value": function () {return this.statusName} + } + }, + { + "type": "image", + "classList": [ + "icon-arrow" + ], + "id": "arrow", + "attr": { + "src": function () {return this.arrowSrc} + } + } + ] + } + ] + }) + ;__weex_module__.exports.style = __weex_module__.exports.style || {} + ;Object.assign(__weex_module__.exports.style, { + "select-container": { + "flexDirection": "column", + "position": "relative", + "zIndex": 1000 + }, + "content": { + "width": 750, + "marginTop": 90 + }, + "mask": { + "position": "absolute", + "top": 0, + "left": 0, + "bottom": 0, + "right": 0, + "flex": 1, + "width": 750, + "backgroundColor": "rgba(0,0,0,0.5)", + "visibility": "hidden" + }, + "select": { + "width": 750, + "height": 90, + "flexDirection": "row", + "alignItems": "center", + "justifyContent": "space-between", + "paddingLeft": 30, + "paddingRight": 30, + "borderBottomWidth": 1, + "borderStyle": "solid", + "borderColor": "#dddddd", + "backgroundColor": "#eeeeee", + "zIndex": 1001, + "position": "absolute", + "top": 0 + }, + "current-text": { + "color": "#333333", + "fontSize": 33, + "flex": 1 + }, + "icon-arrow": { + "width": 27, + "height": 23 + }, + "options": { + "position": "absolute", + "top": -181, + "width": 750, + "backgroundColor": "#ffffff", + "transformOrigin": "center center" + }, + "cell": { + "flexDirection": "row", + "justifyContent": "space-between", + "alignItems": "center", + "width": 750, + "height": 90, + "paddingLeft": 30, + "paddingRight": 30, + "borderBottomWidth": 1, + "borderStyle": "solid", + "borderColor": "#dddddd" + }, + "name": { + "color": "#333333", + "fontSize": 33, + "flex": 1 + }, + "icon-curr-flag": { + "width": 32, + "height": 32 + }, + "current": { + "color": "#0088FB" + } + }) + }) + ;__weex_bootstrap__("@weex-component/526974094623ab419c9886ba381581b7", { + "transformerVersion": "0.3.1" + },undefined) + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/android/playground/app/src/main/assets/showcase/new-fashion/banners.js b/android/playground/app/src/main/assets/showcase/new-fashion/banners.js index 621a6fafde..66076cf215 100644 --- a/android/playground/app/src/main/assets/showcase/new-fashion/banners.js +++ b/android/playground/app/src/main/assets/showcase/new-fashion/banners.js @@ -46,7 +46,7 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/6be669a40db0f3641576862213ed29fa", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -140,7 +140,7 @@ /***/ }, -/***/ 17: +/***/ 18: /***/ function(module, exports) { ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){ diff --git a/android/playground/app/src/main/assets/showcase/new-fashion/brand.js b/android/playground/app/src/main/assets/showcase/new-fashion/brand.js index 08a9707c9b..211be897d7 100644 --- a/android/playground/app/src/main/assets/showcase/new-fashion/brand.js +++ b/android/playground/app/src/main/assets/showcase/new-fashion/brand.js @@ -46,7 +46,7 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/82549c19c22bf0499e7fb5d202c2b2c1", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(18); + __webpack_require__(19); ; __weex_module__.exports = { @@ -137,7 +137,7 @@ /***/ }, -/***/ 17: +/***/ 18: /***/ function(module, exports) { ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){ @@ -184,11 +184,11 @@ /***/ }, -/***/ 18: +/***/ 19: /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/banners", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { diff --git a/android/playground/app/src/main/assets/showcase/new-fashion/category.js b/android/playground/app/src/main/assets/showcase/new-fashion/category.js index 375206064f..6d907ce94c 100644 --- a/android/playground/app/src/main/assets/showcase/new-fashion/category.js +++ b/android/playground/app/src/main/assets/showcase/new-fashion/category.js @@ -46,7 +46,7 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/918304b35162c0fa434158149beb7c82", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -703,7 +703,7 @@ /***/ }, -/***/ 17: +/***/ 18: /***/ function(module, exports) { ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){ diff --git a/android/playground/app/src/main/assets/showcase/new-fashion/fashion.js b/android/playground/app/src/main/assets/showcase/new-fashion/fashion.js index 7b3878d77f..b9be38a48f 100644 --- a/android/playground/app/src/main/assets/showcase/new-fashion/fashion.js +++ b/android/playground/app/src/main/assets/showcase/new-fashion/fashion.js @@ -46,8 +46,8 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/bc3fc70627d1feaf83ef4ae9faa6c91e", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); __webpack_require__(18); + __webpack_require__(19); ; __weex_module__.exports = { @@ -139,7 +139,7 @@ /***/ }, -/***/ 17: +/***/ 18: /***/ function(module, exports) { ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){ @@ -186,11 +186,11 @@ /***/ }, -/***/ 18: +/***/ 19: /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/banners", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { diff --git a/android/playground/app/src/main/assets/showcase/new-fashion/goods.js b/android/playground/app/src/main/assets/showcase/new-fashion/goods.js index 0d769b6acf..bd99cb83f8 100644 --- a/android/playground/app/src/main/assets/showcase/new-fashion/goods.js +++ b/android/playground/app/src/main/assets/showcase/new-fashion/goods.js @@ -46,7 +46,7 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/41f507967dfcd1999e9ffa0a3af0549a", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -218,7 +218,7 @@ /***/ }, -/***/ 17: +/***/ 18: /***/ function(module, exports) { ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){ diff --git a/android/playground/app/src/main/assets/showcase/new-fashion/headlines.js b/android/playground/app/src/main/assets/showcase/new-fashion/headlines.js index f967af6853..3ee960e4f2 100644 --- a/android/playground/app/src/main/assets/showcase/new-fashion/headlines.js +++ b/android/playground/app/src/main/assets/showcase/new-fashion/headlines.js @@ -46,8 +46,8 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/453b2fdb10f58e5716098d6f050875fc", [], function(__weex_require__, __weex_exports__, __weex_module__){ + __webpack_require__(20); __webpack_require__(19); - __webpack_require__(18); ; __weex_module__.exports = { @@ -194,7 +194,7 @@ /***/ }, -/***/ 17: +/***/ 18: /***/ function(module, exports) { ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){ @@ -241,11 +241,11 @@ /***/ }, -/***/ 18: +/***/ 19: /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/banners", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -336,7 +336,7 @@ /***/ }, -/***/ 19: +/***/ 20: /***/ function(module, exports) { ;__weex_define__("@weex-component/link", [], function(__weex_require__, __weex_exports__, __weex_module__){ diff --git a/android/playground/app/src/main/assets/showcase/new-fashion/main.js b/android/playground/app/src/main/assets/showcase/new-fashion/main.js index fc0a75814f..7d6588f8a3 100644 --- a/android/playground/app/src/main/assets/showcase/new-fashion/main.js +++ b/android/playground/app/src/main/assets/showcase/new-fashion/main.js @@ -45,7 +45,6 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/73a943c402110a473f70526894de4e0c", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(20); __webpack_require__(21); __webpack_require__(22); __webpack_require__(23); @@ -53,6 +52,7 @@ __webpack_require__(25); __webpack_require__(26); __webpack_require__(27); + __webpack_require__(28); ; __webpack_require__(1) @@ -2089,7 +2089,8 @@ /* 14 */, /* 15 */, /* 16 */, -/* 17 */ +/* 17 */, +/* 18 */ /***/ function(module, exports) { ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){ @@ -2135,11 +2136,11 @@ }) /***/ }, -/* 18 */ +/* 19 */ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/banners", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -2229,7 +2230,7 @@ }) /***/ }, -/* 19 */ +/* 20 */ /***/ function(module, exports) { ;__weex_define__("@weex-component/link", [], function(__weex_require__, __weex_exports__, __weex_module__){ @@ -2267,12 +2268,12 @@ }) /***/ }, -/* 20 */ +/* 21 */ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/headlines", [], function(__weex_require__, __weex_exports__, __weex_module__){ + __webpack_require__(20); __webpack_require__(19); - __webpack_require__(18); ; __weex_module__.exports = { @@ -2415,11 +2416,11 @@ }) /***/ }, -/* 21 */ +/* 22 */ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/category", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -3072,7 +3073,7 @@ }) /***/ }, -/* 22 */ +/* 23 */ /***/ function(module, exports) { ;__weex_define__("@weex-component/coupon", [], function(__weex_require__, __weex_exports__, __weex_module__){ @@ -3203,11 +3204,11 @@ }) /***/ }, -/* 23 */ +/* 24 */ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/goods", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -3375,12 +3376,12 @@ }) /***/ }, -/* 24 */ +/* 25 */ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/resource", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); __webpack_require__(18); + __webpack_require__(19); ; __weex_module__.exports = { @@ -3440,11 +3441,11 @@ }) /***/ }, -/* 25 */ +/* 26 */ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/scene", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -3802,11 +3803,11 @@ }) /***/ }, -/* 26 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/match", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -3926,11 +3927,11 @@ }) /***/ }, -/* 27 */ +/* 28 */ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/brand", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(18); + __webpack_require__(19); ; __weex_module__.exports = { diff --git a/android/playground/app/src/main/assets/showcase/new-fashion/match.js b/android/playground/app/src/main/assets/showcase/new-fashion/match.js index 144bb06bdd..c4c6d91de6 100644 --- a/android/playground/app/src/main/assets/showcase/new-fashion/match.js +++ b/android/playground/app/src/main/assets/showcase/new-fashion/match.js @@ -46,7 +46,7 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/691df56614eb1af85a2e46bfeebd4e3a", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -170,7 +170,7 @@ /***/ }, -/***/ 17: +/***/ 18: /***/ function(module, exports) { ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){ diff --git a/android/playground/app/src/main/assets/showcase/new-fashion/resource.js b/android/playground/app/src/main/assets/showcase/new-fashion/resource.js index 10f26af51c..fc0ea739f6 100644 --- a/android/playground/app/src/main/assets/showcase/new-fashion/resource.js +++ b/android/playground/app/src/main/assets/showcase/new-fashion/resource.js @@ -46,8 +46,8 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/7731ee0d1017fad0adf656990885c808", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); __webpack_require__(18); + __webpack_require__(19); ; __weex_module__.exports = { @@ -111,7 +111,7 @@ /***/ }, -/***/ 17: +/***/ 18: /***/ function(module, exports) { ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){ @@ -158,11 +158,11 @@ /***/ }, -/***/ 18: +/***/ 19: /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/banners", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { diff --git a/android/playground/app/src/main/assets/showcase/new-fashion/scene.js b/android/playground/app/src/main/assets/showcase/new-fashion/scene.js index e425430409..7b60acb8cd 100644 --- a/android/playground/app/src/main/assets/showcase/new-fashion/scene.js +++ b/android/playground/app/src/main/assets/showcase/new-fashion/scene.js @@ -46,7 +46,7 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/41333d527ccae7db33e37491c3583a26", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(17); + __webpack_require__(18); ; __weex_module__.exports = { @@ -408,7 +408,7 @@ /***/ }, -/***/ 17: +/***/ 18: /***/ function(module, exports) { ;__weex_define__("@weex-component/banner", [], function(__weex_require__, __weex_exports__, __weex_module__){ diff --git a/android/playground/app/src/main/assets/style/index.js b/android/playground/app/src/main/assets/style/index.js index dc3172ad51..e1c0560e75 100644 --- a/android/playground/app/src/main/assets/style/index.js +++ b/android/playground/app/src/main/assets/style/index.js @@ -45,9 +45,9 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/434dd75dfa97596800fbabc5f6646b3e", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(28); - __webpack_require__(30); __webpack_require__(29); + __webpack_require__(31); + __webpack_require__(30); ; __webpack_require__(1); @@ -1362,11 +1362,12 @@ /* 25 */, /* 26 */, /* 27 */, -/* 28 */ +/* 28 */, +/* 29 */ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/style-box", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(29); + __webpack_require__(30); ; __webpack_require__(1); @@ -1660,7 +1661,7 @@ }) /***/ }, -/* 29 */ +/* 30 */ /***/ function(module, exports) { ;__weex_define__("@weex-component/style-item", [], function(__weex_require__, __weex_exports__, __weex_module__){ @@ -1710,11 +1711,11 @@ }) /***/ }, -/* 30 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/style-flex", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(29); + __webpack_require__(30); ; __webpack_require__(1); diff --git a/android/playground/app/src/main/assets/style/style-box.js b/android/playground/app/src/main/assets/style/style-box.js index dcf2a648c1..fe1a3a70fa 100644 --- a/android/playground/app/src/main/assets/style/style-box.js +++ b/android/playground/app/src/main/assets/style/style-box.js @@ -45,7 +45,7 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/48dfbbf48c35cdba73846476a19fdd6a", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(29); + __webpack_require__(30); ; __webpack_require__(1); @@ -1498,7 +1498,8 @@ /* 26 */, /* 27 */, /* 28 */, -/* 29 */ +/* 29 */, +/* 30 */ /***/ function(module, exports) { ;__weex_define__("@weex-component/style-item", [], function(__weex_require__, __weex_exports__, __weex_module__){ diff --git a/android/playground/app/src/main/assets/style/style-flex.js b/android/playground/app/src/main/assets/style/style-flex.js index 02af0aa671..5ba222a140 100644 --- a/android/playground/app/src/main/assets/style/style-flex.js +++ b/android/playground/app/src/main/assets/style/style-flex.js @@ -45,7 +45,7 @@ /***/ function(module, exports, __webpack_require__) { ;__weex_define__("@weex-component/2f482d7aef70ea2a1dd251c635dac048", [], function(__weex_require__, __weex_exports__, __weex_module__){ - __webpack_require__(29); + __webpack_require__(30); ; __webpack_require__(1); @@ -1847,7 +1847,8 @@ /* 26 */, /* 27 */, /* 28 */, -/* 29 */ +/* 29 */, +/* 30 */ /***/ function(module, exports) { ;__weex_define__("@weex-component/style-item", [], function(__weex_require__, __weex_exports__, __weex_module__){ diff --git a/android/playground/app/src/main/assets/syntax/script-component.js b/android/playground/app/src/main/assets/syntax/script-component.js index dbc2cd1435..e48fa3190d 100644 --- a/android/playground/app/src/main/assets/syntax/script-component.js +++ b/android/playground/app/src/main/assets/syntax/script-component.js @@ -48,7 +48,7 @@ ;__weex_define__("@weex-component/8e6cff2d0487efb24411ddaeb27766c3", [], function(__weex_require__, __weex_exports__, __weex_module__){ ; - __webpack_require__(31) + __webpack_require__(32) __weex_module__.exports = { data: function () {return { items: [ @@ -94,7 +94,7 @@ /***/ }, -/***/ 31: +/***/ 32: /***/ function(module, exports) { ;__weex_define__("@weex-component/sub", [], function(__weex_require__, __weex_exports__, __weex_module__){ diff --git a/android/playground/app/src/main/assets/syntax/template-content.js b/android/playground/app/src/main/assets/syntax/template-content.js index 3cb1d18a73..42efe946fa 100644 --- a/android/playground/app/src/main/assets/syntax/template-content.js +++ b/android/playground/app/src/main/assets/syntax/template-content.js @@ -48,7 +48,7 @@ ;__weex_define__("@weex-component/9f86da5d6b34376b9cac6c09a9b78cc2", [], function(__weex_require__, __weex_exports__, __weex_module__){ ; - __webpack_require__(32) + __webpack_require__(33) ;__weex_module__.exports.template = __weex_module__.exports.template || {} ;Object.assign(__weex_module__.exports.template, { @@ -74,7 +74,7 @@ /***/ }, -/***/ 32: +/***/ 33: /***/ function(module, exports) { ;__weex_define__("@weex-component/btn", [], function(__weex_require__, __weex_exports__, __weex_module__){ diff --git a/android/sdk/assets/main.js b/android/sdk/assets/main.js index 5752254784..d2e50fe426 100644 --- a/android/sdk/assets/main.js +++ b/android/sdk/assets/main.js @@ -1,5 +1,8143 @@ -(this.nativeLog||function(s){console.log(s)})("START JS FRAMEWORK: 0.14.7 Build 20160712");(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:false};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.loaded=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.p="";return __webpack_require__(0)})([function(module,exports,__webpack_require__){(function(global){"use strict";__webpack_require__(1);var methods=__webpack_require__(104);var _global=global;var registerMethods=_global.registerMethods;registerMethods(methods)}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){(function(global){"use strict";__webpack_require__(2);var _runtime=__webpack_require__(77);var _runtime2=_interopRequireDefault(_runtime);var _package=__webpack_require__(102);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var native=_package.subversion.native;var transformer=_package.subversion.transformer;var _loop=function _loop(methodName){global[methodName]=function(){var ret=_runtime2.default[methodName].apply(_runtime2.default,arguments);if(ret instanceof Error){console.error(ret.toString())}return ret}};for(var methodName in _runtime2.default){_loop(methodName)}Object.assign(global,{frameworkVersion:native,needTransformerVersion:transformer});var methods=__webpack_require__(103);var _global=global;var registerMethods=_global.registerMethods;registerMethods(methods)}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){"use strict";__webpack_require__(3);__webpack_require__(41);__webpack_require__(42);__webpack_require__(76)},function(module,exports,__webpack_require__){"use strict";__webpack_require__(4)},function(module,exports,__webpack_require__){"use strict";__webpack_require__(5);module.exports=__webpack_require__(8).Object.assign},function(module,exports,__webpack_require__){"use strict";var $export=__webpack_require__(6);$export($export.S+$export.F,"Object",{assign:__webpack_require__(24)})},function(module,exports,__webpack_require__){"use strict";var global=__webpack_require__(7),core=__webpack_require__(8),hide=__webpack_require__(9),redefine=__webpack_require__(19),ctx=__webpack_require__(22),PROTOTYPE="prototype";var $export=function $export(type,name,source){var IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,target=IS_GLOBAL?global:IS_STATIC?global[name]||(global[name]={}):(global[name]||{})[PROTOTYPE],exports=IS_GLOBAL?core:core[name]||(core[name]={}),expProto=exports[PROTOTYPE]||(exports[PROTOTYPE]={}),key,own,out,exp;if(IS_GLOBAL)source=name;for(key in source){own=!IS_FORCED&&target&&target[key]!==undefined;out=(own?target:source)[key];exp=IS_BIND&&own?ctx(out,global):IS_PROTO&&typeof out=="function"?ctx(Function.call,out):out;if(target)redefine(target,key,out,type&$export.U);if(exports[key]!=out)hide(exports,key,exp);if(IS_PROTO&&expProto[key]!=out)expProto[key]=out}};global.core=core;$export.F=1;$export.G=2;$export.S=4;$export.P=8;$export.B=16;$export.W=32;$export.U=64;$export.R=128;module.exports=$export},function(module,exports){"use strict";var global=module.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();if(typeof __g=="number")__g=global},function(module,exports){"use strict";var core=module.exports={version:"2.4.0"};if(typeof __e=="number")__e=core},function(module,exports,__webpack_require__){"use strict";var dP=__webpack_require__(10),createDesc=__webpack_require__(18);module.exports=__webpack_require__(14)?function(object,key,value){return dP.f(object,key,createDesc(1,value))}:function(object,key,value){object[key]=value;return object}},function(module,exports,__webpack_require__){"use strict";var anObject=__webpack_require__(11),IE8_DOM_DEFINE=__webpack_require__(13),toPrimitive=__webpack_require__(17),dP=Object.defineProperty;exports.f=__webpack_require__(14)?Object.defineProperty:function defineProperty(O,P,Attributes){anObject(O);P=toPrimitive(P,true);anObject(Attributes);if(IE8_DOM_DEFINE)try{return dP(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)O[P]=Attributes.value;return O}},function(module,exports,__webpack_require__){"use strict";var isObject=__webpack_require__(12);module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},function(module,exports){"use strict";var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol?"symbol":typeof obj};module.exports=function(it){return(typeof it==="undefined"?"undefined":_typeof(it))==="object"?it!==null:typeof it==="function"}},function(module,exports,__webpack_require__){"use strict";module.exports=!__webpack_require__(14)&&!__webpack_require__(15)(function(){return Object.defineProperty(__webpack_require__(16)("div"),"a",{get:function get(){return 7}}).a!=7})},function(module,exports,__webpack_require__){"use strict";module.exports=!__webpack_require__(15)(function(){return Object.defineProperty({},"a",{get:function get(){return 7}}).a!=7})},function(module,exports){"use strict";module.exports=function(exec){try{return!!exec()}catch(e){return true}}},function(module,exports,__webpack_require__){"use strict";var isObject=__webpack_require__(12),document=__webpack_require__(7).document,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}},function(module,exports,__webpack_require__){"use strict";var isObject=__webpack_require__(12);module.exports=function(it,S){if(!isObject(it))return it;var fn,val;if(S&&typeof(fn=it.toString)=="function"&&!isObject(val=fn.call(it)))return val;if(typeof(fn=it.valueOf)=="function"&&!isObject(val=fn.call(it)))return val;if(!S&&typeof(fn=it.toString)=="function"&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to primitive value")}},function(module,exports){"use strict";module.exports=function(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}},function(module,exports,__webpack_require__){"use strict";var global=__webpack_require__(7),hide=__webpack_require__(9),has=__webpack_require__(20),SRC=__webpack_require__(21)("src"),TO_STRING="toString",$toString=Function[TO_STRING],TPL=(""+$toString).split(TO_STRING);__webpack_require__(8).inspectSource=function(it){return $toString.call(it)};(module.exports=function(O,key,val,safe){var isFunction=typeof val=="function";if(isFunction)has(val,"name")||hide(val,"name",key);if(O[key]===val)return;if(isFunction)has(val,SRC)||hide(val,SRC,O[key]?""+O[key]:TPL.join(String(key)));if(O===global){O[key]=val}else{if(!safe){delete O[key];hide(O,key,val)}else{if(O[key])O[key]=val;else hide(O,key,val)}}})(Function.prototype,TO_STRING,function toString(){return typeof this=="function"&&this[SRC]||$toString.call(this)})},function(module,exports){"use strict";var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},function(module,exports){"use strict";var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(key===undefined?"":key,")_",(++id+px).toString(36))}},function(module,exports,__webpack_require__){"use strict";var aFunction=__webpack_require__(23);module.exports=function(fn,that,length){aFunction(fn);if(that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},function(module,exports){"use strict";module.exports=function(it){if(typeof it!="function")throw TypeError(it+" is not a function!");return it}},function(module,exports,__webpack_require__){"use strict";var getKeys=__webpack_require__(25),gOPS=__webpack_require__(38),pIE=__webpack_require__(39),toObject=__webpack_require__(40),IObject=__webpack_require__(28),$assign=Object.assign;module.exports=!$assign||__webpack_require__(15)(function(){var A={},B={},S=Symbol(),K="abcdefghijklmnopqrst";A[S]=7;K.split("").forEach(function(k){B[k]=k});return $assign({},A)[S]!=7||Object.keys($assign({},B)).join("")!=K})?function assign(target,source){var T=toObject(target),aLen=arguments.length,index=1,getSymbols=gOPS.f,isEnum=pIE.f;while(aLen>index){var S=IObject(arguments[index++]),keys=getSymbols?getKeys(S).concat(getSymbols(S)):getKeys(S),length=keys.length,j=0,key;while(length>j){if(isEnum.call(S,key=keys[j++]))T[key]=S[key]}}return T}:$assign},function(module,exports,__webpack_require__){"use strict";var $keys=__webpack_require__(26),enumBugKeys=__webpack_require__(37);module.exports=Object.keys||function keys(O){return $keys(O,enumBugKeys)}},function(module,exports,__webpack_require__){"use strict";var has=__webpack_require__(20),toIObject=__webpack_require__(27),arrayIndexOf=__webpack_require__(31)(false),IE_PROTO=__webpack_require__(35)("IE_PROTO");module.exports=function(object,names){var O=toIObject(object),i=0,result=[],key;for(key in O){if(key!=IE_PROTO)has(O,key)&&result.push(key)}while(names.length>i){if(has(O,key=names[i++])){~arrayIndexOf(result,key)||result.push(key)}}return result}},function(module,exports,__webpack_require__){"use strict";var IObject=__webpack_require__(28),defined=__webpack_require__(30);module.exports=function(it){return IObject(defined(it))}},function(module,exports,__webpack_require__){"use strict";var cof=__webpack_require__(29);module.exports=Object("z").propertyIsEnumerable(0)?Object:function(it){return cof(it)=="String"?it.split(""):Object(it)}},function(module,exports){"use strict";var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},function(module,exports){"use strict";module.exports=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}},function(module,exports,__webpack_require__){"use strict";var toIObject=__webpack_require__(27),toLength=__webpack_require__(32),toIndex=__webpack_require__(34);module.exports=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIObject($this),length=toLength(O.length),index=toIndex(fromIndex,length),value;if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];if(value!=value)return true}else for(;length>index;index++){if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index||0}}return!IS_INCLUDES&&-1}}},function(module,exports,__webpack_require__){"use strict";var toInteger=__webpack_require__(33),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),9007199254740991):0}},function(module,exports){"use strict";var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}},function(module,exports,__webpack_require__){"use strict";var toInteger=__webpack_require__(33),max=Math.max,min=Math.min;module.exports=function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)}},function(module,exports,__webpack_require__){"use strict";var shared=__webpack_require__(36)("keys"),uid=__webpack_require__(21);module.exports=function(key){return shared[key]||(shared[key]=uid(key))}},function(module,exports,__webpack_require__){"use strict";var global=__webpack_require__(7),SHARED="__core-js_shared__",store=global[SHARED]||(global[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},function(module,exports){"use strict";module.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(module,exports){"use strict";exports.f=Object.getOwnPropertySymbols},function(module,exports){"use strict";exports.f={}.propertyIsEnumerable},function(module,exports,__webpack_require__){"use strict";var defined=__webpack_require__(30);module.exports=function(it){return Object(defined(it))}},function(module,exports){(function(global){"use strict";var _global=global;var setTimeout=_global.setTimeout;var setTimeoutNative=_global.setTimeoutNative;var MSG='Use "global.setTimeout" is unexpected, '+'please use require("@weex-module").setTimeout instead.';if(typeof setTimeout==="undefined"&&typeof setTimeoutNative==="function"){(function(){var timeoutMap={};var timeoutId=0;global.setTimeout=function(cb,time){console.warn(MSG);timeoutMap[++timeoutId]=cb;setTimeoutNative(timeoutId.toString(),time)};global.setTimeoutCallback=function(id){if(typeof timeoutMap[id]==="function"){timeoutMap[id]();delete timeoutMap[id]}}})()}}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){"use strict";__webpack_require__(43);__webpack_require__(46);__webpack_require__(57);__webpack_require__(61)},function(module,exports,__webpack_require__){"use strict";var classof=__webpack_require__(44),test={};test[__webpack_require__(45)("toStringTag")]="z";if(test+""!="[object z]"){__webpack_require__(19)(Object.prototype,"toString",function toString(){return"[object "+classof(this)+"]"},true)}},function(module,exports,__webpack_require__){"use strict";var cof=__webpack_require__(29),TAG=__webpack_require__(45)("toStringTag"),ARG=cof(function(){return arguments}())=="Arguments";var tryGet=function tryGet(it,key){try{return it[key]}catch(e){}};module.exports=function(it){var O,T,B;return it===undefined?"Undefined":it===null?"Null":typeof(T=tryGet(O=Object(it),TAG))=="string"?T:ARG?cof(O):(B=cof(O))=="Object"&&typeof O.callee=="function"?"Arguments":B}},function(module,exports,__webpack_require__){"use strict";var store=__webpack_require__(36)("wks"),uid=__webpack_require__(21),_Symbol=__webpack_require__(7).Symbol,USE_SYMBOL=typeof _Symbol=="function";var $exports=module.exports=function(name){return store[name]||(store[name]=USE_SYMBOL&&_Symbol[name]||(USE_SYMBOL?_Symbol:uid)("Symbol."+name))};$exports.store=store},function(module,exports,__webpack_require__){"use strict";var $at=__webpack_require__(47)(true);__webpack_require__(48)(String,"String",function(iterated){this._t=String(iterated);this._i=0},function(){var O=this._t,index=this._i,point;if(index>=O.length)return{value:undefined,done:true};point=$at(O,index);this._i+=point.length;return{value:point,done:false}})},function(module,exports,__webpack_require__){"use strict";var toInteger=__webpack_require__(33),defined=__webpack_require__(30);module.exports=function(TO_STRING){return function(that,pos){var s=String(defined(that)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},function(module,exports,__webpack_require__){"use strict";var LIBRARY=__webpack_require__(49),$export=__webpack_require__(6),redefine=__webpack_require__(19),hide=__webpack_require__(9),has=__webpack_require__(20),Iterators=__webpack_require__(50),$iterCreate=__webpack_require__(51),setToStringTag=__webpack_require__(55),getPrototypeOf=__webpack_require__(56),ITERATOR=__webpack_require__(45)("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values";var returnThis=function returnThis(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCED){$iterCreate(Constructor,NAME,next);var getMethod=function getMethod(kind){if(!BUGGY&&kind in proto)return proto[kind];switch(kind){case KEYS:return function keys(){return new Constructor(this,kind)};case VALUES:return function values(){return new Constructor(this,kind)}}return function entries(){return new Constructor(this,kind)}};var TAG=NAME+" Iterator",DEF_VALUES=DEFAULT==VALUES,VALUES_BUG=false,proto=Base.prototype,$native=proto[ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],$default=$native||getMethod(DEFAULT),$entries=DEFAULT?!DEF_VALUES?$default:getMethod("entries"):undefined,$anyNative=NAME=="Array"?proto.entries||$native:$native,methods,key,IteratorPrototype;if($anyNative){IteratorPrototype=getPrototypeOf($anyNative.call(new Base));if(IteratorPrototype!==Object.prototype){setToStringTag(IteratorPrototype,TAG,true);if(!LIBRARY&&!has(IteratorPrototype,ITERATOR))hide(IteratorPrototype,ITERATOR,returnThis)}}if(DEF_VALUES&&$native&&$native.name!==VALUES){VALUES_BUG=true;$default=function values(){return $native.call(this)}}if((!LIBRARY||FORCED)&&(BUGGY||VALUES_BUG||!proto[ITERATOR])){hide(proto,ITERATOR,$default)}Iterators[NAME]=$default;Iterators[TAG]=returnThis;if(DEFAULT){methods={values:DEF_VALUES?$default:getMethod(VALUES),keys:IS_SET?$default:getMethod(KEYS),entries:$entries};if(FORCED)for(key in methods){if(!(key in proto))redefine(proto,key,methods[key])}else $export($export.P+$export.F*(BUGGY||VALUES_BUG),NAME,methods)}return methods}},function(module,exports){"use strict";module.exports=false},function(module,exports){"use strict";module.exports={}},function(module,exports,__webpack_require__){"use strict";var create=__webpack_require__(52),descriptor=__webpack_require__(18),setToStringTag=__webpack_require__(55),IteratorPrototype={};__webpack_require__(9)(IteratorPrototype,__webpack_require__(45)("iterator"),function(){return this});module.exports=function(Constructor,NAME,next){Constructor.prototype=create(IteratorPrototype,{next:descriptor(1,next)});setToStringTag(Constructor,NAME+" Iterator")}},function(module,exports,__webpack_require__){"use strict";var anObject=__webpack_require__(11),dPs=__webpack_require__(53),enumBugKeys=__webpack_require__(37),IE_PROTO=__webpack_require__(35)("IE_PROTO"),Empty=function Empty(){},PROTOTYPE="prototype";var _createDict=function createDict(){var iframe=__webpack_require__(16)("iframe"),i=enumBugKeys.length,gt=">",iframeDocument;iframe.style.display="none";__webpack_require__(54).appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write("