Skip to content

Commit 8b543ad

Browse files
author
Shuwen Qian
committed
add clean:dist to dist build and commit clean dist build
1 parent cbf03c7 commit 8b543ad

156 files changed

Lines changed: 61 additions & 8524 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ gulp.task('build', function(cb) {
196196
});
197197

198198
gulp.task('build:dist', function(cb) {
199-
run('clean','patch-lib', 'copy',['sass','font'], 'lib-version','build:prod', cb);
199+
run('clean','clean:dist','patch-lib', 'copy',['sass','font'], 'lib-version','build:prod', cb);
200200
});
201201

202202
gulp.task('lib-version', function() {

dist/mm-action/mm-action.html

Lines changed: 1 addition & 18 deletions
Large diffs are not rendered by default.

dist/mm-action/style.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

dist/mm-ajax/mm-ajax.html

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,4 @@
22
* @license
33
* Copyright (c) 2015 MediaMath Inc. All rights reserved.
44
* This code may only be used under the BSD style license found at http://mediamath.github.io/strand/LICENSE.txt
5-
6-
-->
7-
<link rel="import" href="../../../polymer/polymer.html">
8-
<link rel="import" href="../shared/js/ajax.html">
9-
10-
<dom-module id="mm-ajax">
11-
<link rel="import" type="css" href="mm-ajax.css"/>
12-
<template>
13-
</template>
14-
<script src="mm-ajax.js"></script>
15-
</dom-module>
5+
--><html><head><meta charset="UTF-8"><link rel="import" href="../../bower_components/polymer/polymer.html"></head><body><div hidden by-vulcanize=""><script>!function(n){function e(n,e){return Object.prototype.toString.call(n).toLowerCase()==="[object "+e.toLowerCase()+"]"}function r(n){return n?Array.prototype.slice.call(n):void 0}function t(n,e){return e?-1===e.indexOf(n.name):!0}function u(n,e,u){var a={},i=r(n.attributes);return i&&(i.forEach(function(n){if(t(n,e))try{a[n.name]=JSON.parse(n.value)}catch(r){""===n.value?a[n.name]=!0:a[n.name]=n.value}}),n.innerHTML&&u&&(a.inner=n.innerHTML)),a}function a(){var n={},e=r(arguments);return e.forEach(function(e){e.length>0&&i(e,n)}),o(n)}function i(n,e){if(0===n.length)return{};var r,t,u=e||{};for(r=n.length-1;r>=0;r--)t=n[r],u[t.name]=t.value;return u}function o(n){var e=[];for(var r in n)e.push({name:r,value:n[r]});return e}function c(){var n=r(arguments),t=n.length>1?n.shift():{};return n.reduce(function(n,r){if(e(r,"object"))for(var t in r)n[t]=r[t];return n},t)}function f(n,r){if(!r)return null;var t=n;return"string"==typeof n&&(t=n.split(".")),t.reduce(function(n,r){return e(n,"object")&&r in n?n[r]:null},r)}function l(n,e,r,t){if(e){var u=n;"string"==typeof n&&(u=n.split("."));var a=u.slice(-1)[0];u.reduce(function(n,e){return e===a?n[e]=r:t&&!n[e]&&(n[e]={}),n[e]},e)}}function s(n){return n.value||n.inner}function v(n){return{name:n.name,value:s(n)}}var d={clone:r,copy:c,isType:e,param:function(n,e){return{name:n,value:e}},packParams:i,unpackParams:o,uniqueMergeParams:a,objectifyDistributedNodes:function(n,e){function t(n){return n.nodeType===Node.ELEMENT_NODE}return n=r(n).filter(t),n.reduce(function a(n,e){var t=e.nodeName.toLowerCase();return void 0===n[t]&&(n[t]=[]),e.children.length>0?n[t]=r(e.children).reduce(a,{}):n[t].push(u(e,null,!0)),n},{})},nodeInnerValue:s,nodeToParam:v,mergeParamLists:function(){var n,e,t,u={},a=[],i=[],o=r(arguments);for(n=o.length-1;n>=0;n--)if(i=o[n],i&&i.length)for(e=i.length-1;e>=0;e--)t=i[e],t&&!u[t.name||t]&&(a.push(t),u[t.name||t]=!0);return a.reverse()},getPathValue:f,setPathValue:l};n.DataUtils=d}(window.StrandLib=window.StrandLib||{});</script><script>!function(t){"use strict";function e(t){if(t){var e=this;t(function(t){e.resolve(t)},function(t){e.reject(t)})}}function n(t,e){if("function"==typeof t.y)try{var n=t.y.call(i,e);t.p.resolve(n)}catch(o){t.p.reject(o)}else t.p.resolve(e)}function o(t,e){if("function"==typeof t.n)try{var n=t.n.call(i,e);t.p.resolve(n)}catch(o){t.p.reject(o)}else t.p.reject(e)}var r,i,c="fulfilled",u="rejected",s="undefined",f=function(){function t(){for(;e.length-n;)e[n](),n++,n>1024&&(e.splice(0,n),n=0)}var e=[],n=0,o=function(){if(typeof MutationObserver!==s){var e=document.createElement("div"),n=new MutationObserver(t);return n.observe(e,{attributes:!0}),function(){e.setAttribute("a",0)}}return typeof setImmediate!==s?function(){setImmediate(t)}:function(){setTimeout(t,0)}}();return function(t){e.push(t),e.length-n==1&&o()}}();e.prototype={resolve:function(t){if(this.state===r){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var e=this;if(t&&("function"==typeof t||"object"==typeof t))try{var o=!0,i=t.then;if("function"==typeof i)return void i.call(t,function(t){o&&(o=!1,e.resolve(t))},function(t){o&&(o=!1,e.reject(t))})}catch(u){return void(o&&this.reject(u))}this.state=c,this.v=t,e.c&&f(function(){for(var o=0,r=e.c.length;r>o;o++)n(e.c[o],t)})}},reject:function(t){if(this.state===r){this.state=u,this.v=t;var n=this.c;n?f(function(){for(var e=0,r=n.length;r>e;e++)o(n[e],t)}):e.suppressUncaughtRejectionError||console.log("You upset Zousan. Please catch rejections: ",t,t.stack)}},then:function(t,i){var u=new e,s={y:t,n:i,p:u};if(this.state===r)this.c?this.c.push(s):this.c=[s];else{var l=this.state,a=this.v;f(function(){l===c?n(s,a):o(s,a)})}return u},"catch":function(t){return this.then(null,t)},timeout:function(t){var n=this;return new e(function(e,o){setTimeout(function(){o(Error("Timeout"))},t),n.then(function(t){e(t)},function(t){o(t)})})}},e.resolve=function(t){var n=new e;return n.resolve(t),n},e.reject=function(t){var n=new e;return n.reject(t),n},e.all=function(t){function n(n,c){"function"!=typeof n.then&&(n=e.resolve(n)),n.then(function(e){o[c]=e,r++,r==t.length&&i.resolve(o)},function(t){i.reject(t)})}for(var o=[],r=0,i=new e,c=0;c<t.length;c++)n(t[c],c);return t.length||i.resolve(o),i},typeof module!=s&&module.exports&&(module.exports=e),t.Zousan=e,t.soon=f}("undefined"!=typeof global?global:this);</script><script>Zousan.suppressUncaughtRejectionError=!0;</script><script>var EventDispatcher=function(){};EventDispatcher.prototype={constructor:EventDispatcher,apply:function(e){e.addEventListener=EventDispatcher.prototype.addEventListener,e.hasEventListener=EventDispatcher.prototype.hasEventListener,e.removeEventListener=EventDispatcher.prototype.removeEventListener,e.dispatchEvent=EventDispatcher.prototype.dispatchEvent},addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var i=this._listeners;return void 0!==i[e]&&-1!==i[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var i=this._listeners,n=i[e];if(void 0!==n){var s=n.indexOf(t);-1!==s&&n.splice(s,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners,i=t[e.type];if(void 0!==i){e.target=this;for(var n=[],s=i.length,r=0;s>r;r++)n[r]=i[r];for(var r=0;s>r;r++)n[r].call(this,e)}}}};</script><script>!function(t){function e(t){t=t||{},this.url=t.url,this.method=t.method||e.GET,this.body=t.body,this.responseType=t.responseType,this.headers=t.headers,this.withCredentials=t.withCredentials,this.timeout=t.timeout,this.username=t.username,this.password=t.password,this.progress=t.progress,this.requestMarshaller=t.requestMarshaller,this.responseMarshaller=t.responseMarshaller,this.xhr=new XMLHttpRequest,this.promise=new Zousan}var s="request-";e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.prototype={exec:function(){return this.method&&this.url?(this.xhr.open(this.method,this.url,!0,this.username,this.password),this.xhr.responseType=this.responseType||"",this.xhr.timeout=this.timeout||1e4,this.xhr.withCredentials=this.withCredentials,this.xhr.onreadystatechange=this.readyStateChange.bind(this),this.xhr.addEventListener("abort",this.handleAbort.bind(this)),this.xhr.addEventListener("progress",this.handleProgress.bind(this)),this.contentType&&this.xhr.setRequestHeader("content-type",this.contentType),this.headers&&this.headers.forEach(function(t){this.xhr.setRequestHeader(t.name,t.value)}.bind(this)),this.dispatchEvent(new CustomEvent(s+"preflight"),{instance:this}),this.xhr.send(this.body),this.promise):(this.promise.reject({error:"url and method are required!!",instance:this,response:null}),this.promise)},readyStateChange:function(){var t={};4===this.xhr.readyState&&(this.dispatchEvent(new CustomEvent(s+"result"),{instance:this}),this.response=this.responseHandler[this.xhr.responseType||"json"].call(this),!this.xhr.status||this.xhr.status>=200&&this.xhr.status<300?(t={response:this.response,instance:this},this.promise&&(this.promise.resolve(t),this.dispatchEvent(new CustomEvent(s+"response"),t))):(t={error:this.xhr.status,instance:this,response:this.response},this.promise&&(this.promise.reject(t),this.dispatchEvent(new CustomEvent(s+"error"),t))))},handleAbort:function(){if(this.promise){var t={error:"aborted",instance:this,response:null};this.promise.reject(t),this.dispatchEvent(new CustomEvent(s+"preflight"),t)}},handleProgress:function(t){var e={percent:t.totalSize/t.position,total:t.totalSize,current:t.position};this.progress&&this.progress(e),this.dispatchEvent(new CustomEvent(s+"progress"),e)},responseHandler:{xml:function(){return this.xhr.responseXML},text:function(){return this.xhr.responseText},json:function(){var t=this.xhr.responseText;try{return JSON.parse(t)}catch(e){var r={error:e.message,instance:this,response:t};return this.dispatchEvent(new CustomEvent(s+"error"),r),this.promise.reject(r),t}},document:function(){return this.xhr.response},blob:function(){return this.xhr.response},arrayBuffer:function(){return this.xhr.response}},abort:function(){this.xhr&&(this.xhr.abort(),this.dispatchEvent(new CustomEvent(s+"abort"),{instance:this}))},get status(){return this.xhr&&this.xhr.status},get state(){return this.xhr&&this.xhr.readyState}},EventDispatcher.prototype.apply(e.prototype),t.Request=e}(window.StrandLib=window.StrandLib||{});</script><script>!function(t){function i(t,i,s){if(!t)throw new Error("request array is required");this.work=t.slice(),this.results=[],this.failures=[],this.flight=[],this.concurrency=i,this.processHook=s,this.promise=new Zousan}i.prototype={next:function(t){t&&(this.results=this.results.concat(t));var i=this.work.splice(0,this.concurrency).map(function(t){return this.flight.push(t),this.processHook&&this.processHook(t),t.exec()},this);if(i&&i.length>0){var s=Zousan.all(i);s.then(this.next.bind(this),this.fail.bind(this))}else this.promise.resolve(this.results)},fail:function(t){this.promise.reject(t),this.failures.push(t)},exec:function(){this.next()},abort:function(){this.work=[],this.flight.forEach(function(t){t.abort()}),this.promise.reject(new Error("Aborted"))}},t.RequestQueue=i}(window.StrandLib=window.StrandLib||{});</script><script>!function(t){function e(t,e){return encodeURIComponent(t)+"="+encodeURIComponent(e)}function i(t,r,n,s){s=s||e;var a,o=[];r=r||"",n=n||0;for(var u in t)a=t[u],name=0===n?u:"["+u+"]","object"==typeof a?o=o.concat(i(a,r+name,n+1)):o.push(s(r+name,a));return o}function r(t){this._eventPrefix=n,this.recent={},this.requests=[],this.options=StrandLib.DataUtils.copy({},{contentType:"application/x-www-form-urlencoded",method:StrandLib.Request.GET,withCredentials:!1,timeout:1e4},t)}var n="ajax-";r.GET=StrandLib.Request.GET,r.POST=StrandLib.Request.POST,r.PUT=StrandLib.Request.PUT,r.DELETE=StrandLib.Request.DELETE,r.prototype={queue:function(t,e,i){var r=this._requestFactory(t,e);return this._getQueue(i,!0).push(r),r.promise},execQueue:function(t){var e=this._getQueue(t),i=new StrandLib.RequestQueue(e,this.options.concurrency,function(t){this.current=t}.bind(this));return i.exec(),e.running=i,i.promise},exec:function(t,e){var i=this._requestFactory(t,e);return this.requests.push(i),this.current=i,i.exec(),i.promise},_getQueue:function(t,e){return t?this[t]?this[t]:e?(this[t]=[],this[t]):void 0:this.requests},_requestFactory:function(t,e){var i=StrandLib.DataUtils.copy;e=i({},this.options,e);var r=this.serializeUrl(e.url,e.urlParams);return r=this.serializeParams(r,e.params),t=this.setRequestData(e.method,e.contentType,t,e.body),new StrandLib.Request(i(e,{url:r,body:t}))},abort:function(){this.current&&(this.current.abort(),this.fire("abort",{instance:this}))},abortQueue:function(t){_getQueue(t).running.abort(),this.fire("abort-queue",{instance:this})},handleProgress:function(t){this.fire("progress",{percent:t.totalSize/t.position,total:t.totalSize,current:t.position})},addHeader:function(t,e){this.options.headers=this.options.headers||[],this.options.headers.push({name:t,value:e})},addParam:function(t,e){this.options.params=this.params||[],this.options.params.push({name:t,value:e})},addUrlParam:function(t){this.options.urlParams=this.urlParams||[],this.options.urlParams.push(t)},setRequestData:function(t,e,i,r){var n,s;if(i){if("string"==typeof i)return i;n=StrandLib.DataUtils.copy({},r,i)}else n=r;if(t.match(/(POST|PUT|DELETE)/i))if("application/json"===e)s=n;else if("multipart/form-data"===e)if(n instanceof FormData)s=n;else{var a=new FormData;this.serialize(n,a.append.bind(a)),s=a}else s=this.serialize(n).join("&");return s},serializeUrl:function(t,e){return t=t||"",e&&e.length>0&&("/"!==t.slice(-1)&&(t+="/"),t+=e.join("/")),t},serializeParams:function(t,e){if(e&&e.length){if(-1!==t.indexOf("?")){var i=t.slice(-1);"&"!==i&&"?"!==i&&(t+="&")}else t+="?";t+=this.serialize(e).join("&")}return t},serialize:function(t,r){r=r||e;var n,s,a=[];if("string"==typeof t)try{t=JSON.parse(t)}catch(o){this.fire("error",{error:o,instance:this})}if(StrandLib.DataUtils.isType(t,"array"))for(n=t.length-1;n>=0;n--)s=t[n],null!==s.name&&null!==s.value&&a.push(r(s.name,s.value));else a=i(t,null,null,r);return a},fire:function(t,e){this._eventPrefix&&(t=this._eventPrefix+t);var i=new CustomEvent(t,{detail:e});this.dispatchEvent(i)},get status(){return this.current&&this.current.xhr.status},get state(){return this.current&&this.current.state},get xhr(){return this.current&&this.current.xhr}},EventDispatcher.prototype.apply(r.prototype),t.Ajax=r}(window.StrandLib=window.StrandLib||{});</script></div><dom-module id="mm-ajax"><template><style>:host{display:none}</style></template><script>!function(e){e.Ajax=Polymer({is:"mm-ajax",GET:StrandLib.Ajax.GET,POST:StrandLib.Ajax.POST,PUT:StrandLib.Ajax.PUT,DELETE:StrandLib.Ajax.DELETE,behaviors:[StrandTraits.Refable],properties:{ajax:{type:StrandLib.Ajax,value:function(){return new StrandLib.Ajax}},url:{type:String,value:"",observer:"_updateAjax"},method:{type:String,value:"GET",observer:"_updateAjax"},responseType:{type:String,value:"",observer:"_updateAjax"},response:{type:Object,value:function(){return{}},notify:!0},contentType:{type:String,value:"application/x-www-form-urlencoded",observer:"_updateAjax"},auto:{type:Boolean,value:!1,observer:"_updateAjax"},body:{type:Object,value:null,observer:"_updateAjax"},withCredentials:{type:Boolean,value:!1,observer:"_updateAjax"},timeout:{type:Number,value:1e4,observer:"_updateAjax"},concurrency:{type:Number,value:4,observer:"_updateAjax"},progress:{type:Object,value:function(){return{percent:0,total:0,current:0}},notify:!0}},ready:function(){this.async(function(){this._validateAjax()&&this.exec()})},_updateAjax:function(){this.debounce("options",function(){this.ajax.options=StrandLib.DataUtils.copy(this.ajax.options,{contentType:this.contentType,responseType:this.responseType,method:this.method,url:this.url,body:this.body,withCredentials:this.withCredentials,timeout:this.timeout,concurrency:this.concurrency})}.bind(this))},_validateAjax:function(){if(!this.method||!this.auto)return!1;if(this.method===StrandLib.Ajax.GET){if(this.url)return!0}else if(this.url&&this.body)return!0;return!1},exec:function(e,t){var a=this.ajax.exec(e,t);return this.ajax.current.progress=this.handleProgress,a.then(this._handleResponse.bind(this),this._handleError.bind(this)),a},queue:function(e,t,a){return this.ajax.queue(e,t,a)},execQueue:function(e){return this.ajax.execQueue(e)},abort:function(){this.ajax.abort(),this.ajax.current&&this.ajax.current.promise.then(handleAbort,handleAbort)},_handleAbort:function(e){this.fire("data-abort",e)},_handleResponse:function(e){e.response&&this.set("response",e.response),this.fire("data-ready",e)},_handleError:function(e){e.response&&this.set("response",e.response),this.fire("data-error",e)},_handleProgress:function(e){this.progress=e,this.fire("data-progress",e)},addHeader:function(e,t){this.ajax.addHeader(e,t)},addParam:function(e,t){this.ajax.addParam(e,t)},addUrlParam:function(e){this.ajax.addUrlParam(e)},get status(){return this.ajax.status},get state(){return this.ajax.state},get xhr(){return this.ajax.xhr}})}(window.Strand=window.Strand||{});</script></dom-module></body></html>

dist/mm-ajax/style.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

dist/mm-autocomplete/mm-autocomplete.html

Lines changed: 1 addition & 45 deletions
Large diffs are not rendered by default.

dist/mm-autocomplete/style.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)