Comparing version 0.3.2 to 0.3.3
@@ -1,1 +0,1 @@ | ||
var Garden=function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var i=n(1);i.keys().forEach(i)},function(e,t,n){function i(e){return n(r(e))}function r(e){return s[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var s={"./components/form":2,"./components/form.js":2,"./components/lazy-load":4,"./components/lazy-load.js":4,"./components/validation":7,"./components/validation.js":7,"./components/validation/confirm":12,"./components/validation/confirm.js":12,"./components/validation/defaults":10,"./components/validation/defaults.js":10,"./components/validation/email":15,"./components/validation/email.js":15,"./components/validation/maxlength":14,"./components/validation/maxlength.js":14,"./components/validation/minlength":13,"./components/validation/minlength.js":13,"./components/validation/required":11,"./components/validation/required.js":11};i.keys=function(){return Object.keys(s)},i.resolve=r,e.exports=i,i.id=1},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=i(o),l="form",u={events:"change",selectors:".input, select, .select, .textarea"},c=function(){function e(t,n){r(this,e),n=a["default"].extend({},u,n||{}),this._element=(0,a["default"])(t),this._options=n,this.bindListeners(),this.toggleFieldsActiveClass()}return s(e,[{key:"bindListeners",value:function(){(0,a["default"])(document).on(this._options.events,this._options.selectors,this.onFieldChange.bind(this))}},{key:"onFieldChange",value:function(e){this.toggleActiveClass(e.target)}},{key:"shouldInputBeActive",value:function(e){return!(!e.value&&!e.placeholder)}},{key:"toggleActiveClass",value:function(e){var t=(0,a["default"])(e),n=t.parents(".field");if(n.length)return!n.hasClass("active")&&this.shouldInputBeActive(e)?n.addClass("active"):n.hasClass("active")&&!this.shouldInputBeActive(e)?n.removeClass("active"):void 0}},{key:"toggleFieldsActiveClass",value:function(){Array.prototype.forEach.call(this._element.find(this._options.selectors),this.toggleActiveClass.bind(this))}}]),e}();a["default"].fn[l]=function(e){return e=e||{},this.each(function(){a["default"].data(this,l)||a["default"].data(this,l,new c(this,e))})},t["default"]=c},function(e,t){e.exports=$},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=i(o),l=n(5),u=i(l),c=n(6),f=i(c),h="lazyload",d={throttle:1e3,offset:200,selector:"data-lazy"},v=function(){function e(t,n){r(this,e),n=a["default"].extend({},d,n||{}),this._element=t,this._options=n}return s(e,[{key:"init",value:function(){return this.bindListeners(),this.checkVisiblePlaceholders(),this}},{key:"bindListeners",value:function(){this.onScrollHandler=(0,u["default"])(this.onScroll.bind(this),this._options.throttle),(0,a["default"])(window).on("scroll",this.onScrollHandler)}},{key:"onScroll",value:function(){return this._element.length?this.checkVisiblePlaceholders():(0,a["default"])(window).off("scroll",this.onScrollHandler)}},{key:"checkVisiblePlaceholders",value:function(){this.windowHeight=(0,a["default"])(window).height(),this.windowWidth=(0,a["default"])(window).width(),Array.prototype.forEach.call(this._element,this.checkPlaceholder.bind(this))}},{key:"checkPlaceholder",value:function(e){this.isPlaceholderVisible(e)&&(this.renderImage(e),(0,f["default"])(this._element,e))}},{key:"isPlaceholderVisible",value:function(e){return e.getBoundingClientRect().top<=this.windowHeight+this._options.offset}},{key:"renderImage",value:function(e){e.parentNode.replaceChild(this.createImage(e),e)}},{key:"createImage",value:function(e){var t=document.createElement("img");return this.parseAttributes(t,e.attributes),t.removeAttribute("data-lazy"),e.getAttribute("data-srcset")?(this.parseBreakpoints(t,e.getAttribute("data-srcset")),t):(t.src=e.getAttribute("data-src"),t)}},{key:"parseAttributes",value:function(e,t){var n=this;return Array.prototype.forEach.call(t,function(t){(t.name!==n._options.selector||"data-srcset"!==t.name||"data-src"!==t.name)&&e.setAttribute(t.name,t.value)}),e}},{key:"parseBreakpoints",value:function(e,t){e.removeAttribute("data-srcset"),t=t.split(",").map(function(e){return e=e.trim().split(" "),{src:e[0],width:e[1]}}).sort(function(e,t){return t.width-e.width});for(var n=0;n<t.length;n++){var i=t[n];if(i.width<=this.windowWidth){e.src=i.src;break}}return e}},{key:"destroy",value:function(){(0,a["default"])(window).off("scroll",this.onScrollHandler)}}]),e}();a["default"].fn[h]=function(e){return e=e||{},this.each(function(){a["default"].data(this,h)||a["default"].data(this,h,new v(this,e).init())})},t["default"]=v},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){var n=!0;return function(){if(n){for(var i=arguments.length,r=Array(i),s=0;i>s;s++)r[s]=arguments[s];e.apply(this,r),n=!1,setTimeout(function(){return n=!0},t)}}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){Array.prototype.splice.call(e,Array.prototype.indexOf.call(e,t))}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=i(o),l=n(8),u=i(l),c=n(10),f=i(c),h="validation",d={events:"blur",selector:"[data-required]"},v=function(){function e(t,n){r(this,e),this._element=t,this._options=a["default"].extend({},d,n||{})}return s(e,[{key:"init",value:function(){this._fields=this._element.find(this._options.selector),this.bindListeners()}},{key:"bindListeners",value:function(){var e=this;this.handler=function(t){e.validate(t.target)},this._element.off(this._options.events,this._options.selector,this.handler),this._element.on(this._options.events,this._options.selector,this.handler)}},{key:"validate",value:function(e){var t=this,n=e.getAttribute("data-validate");return n?(n=n.split(" ").reduce(function(n,i){return t.rules[i].call(t,e,t._element)||n.push(i),n},[]),u["default"].emit("validation:"+(n.length?"error":"success"),e,n),!n.length):void 0}},{key:"validateAll",value:function(){return Array.prototype.map.call(this._element.find(this._options.selector),this.validate,this).every(function(e){return e})}}]),e}();v.prototype.rules=f["default"],a["default"].fn[h]=function(e){return e=e||{},this.each(function(){a["default"].data(this,h)||a["default"].data(this,h,new v(this,e).init())})},t["default"]=v},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),s=i(r);t["default"]=new s["default"]},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function r(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!r(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,r,a,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],o(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(s(n))for(a=Array.prototype.slice.call(arguments,1),u=n.slice(),r=u.length,l=0;r>l;l++)u[l].apply(this,a);return!0},n.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,r,o,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(a=o;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),s=i(r),o=n(12),a=i(o),l=n(13),u=i(l),c=n(14),f=i(c),h=n(15),d=i(h);t["default"]={required:s["default"],confirm:a["default"],minlength:u["default"],maxlength:f["default"],email:d["default"]}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){return"checkbox"===e.type?e.checked:"radio"===e.type?t.find('[name="'+e.name+'"]:checked').length:!!e.value.trim()}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){return e.value===t.find('[name="'+e.getAttribute("data-confirm")+"]").val()}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return e.value.length>=e.getAttribute("data-minlength")}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return e.value.length<=e.getAttribute("maxlength")}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e.value)}}]); | ||
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var i=n(1);i.keys().forEach(i)},function(e,t,n){function i(e){return n(r(e))}function r(e){return s[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var s={"./components/form":2,"./components/form.js":2,"./components/lazy-load":4,"./components/lazy-load.js":4,"./components/validation":7,"./components/validation.js":7,"./components/validation/confirm":12,"./components/validation/confirm.js":12,"./components/validation/defaults":10,"./components/validation/defaults.js":10,"./components/validation/email":15,"./components/validation/email.js":15,"./components/validation/maxlength":14,"./components/validation/maxlength.js":14,"./components/validation/minlength":13,"./components/validation/minlength.js":13,"./components/validation/required":11,"./components/validation/required.js":11};i.keys=function(){return Object.keys(s)},i.resolve=r,e.exports=i,i.id=1},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=i(o),l="form",u={events:"change",selectors:".input, select, .select, .textarea"},c=function(){function e(t,n){r(this,e),n=a["default"].extend({},u,n||{}),this._element=(0,a["default"])(t),this._options=n,this.bindListeners(),this.toggleFieldsActiveClass()}return s(e,[{key:"bindListeners",value:function(){(0,a["default"])(document).on(this._options.events,this._options.selectors,this.onFieldChange.bind(this))}},{key:"onFieldChange",value:function(e){this.toggleActiveClass(e.target)}},{key:"shouldInputBeActive",value:function(e){return!(!e.value&&!e.placeholder)}},{key:"toggleActiveClass",value:function(e){var t=(0,a["default"])(e),n=t.parents(".field");if(n.length)return!n.hasClass("active")&&this.shouldInputBeActive(e)?n.addClass("active"):n.hasClass("active")&&!this.shouldInputBeActive(e)?n.removeClass("active"):void 0}},{key:"toggleFieldsActiveClass",value:function(){Array.prototype.forEach.call(this._element.find(this._options.selectors),this.toggleActiveClass.bind(this))}}]),e}();a["default"].fn[l]=function(e){return e=e||{},this.each(function(){a["default"].data(this,l)||a["default"].data(this,l,new c(this,e))})},t["default"]=c},function(e,t){e.exports=$},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=i(o),l=n(5),u=i(l),c=n(6),f=i(c),h="lazyload",d={throttle:1e3,offset:200,selector:"data-lazy"},v=function(){function e(t,n){r(this,e),n=a["default"].extend({},d,n||{}),this._element=(0,a["default"])(t),this._options=n}return s(e,[{key:"init",value:function(){return this.bindListeners(),this.checkVisiblePlaceholders(),this}},{key:"bindListeners",value:function(){this.onScrollHandler=(0,u["default"])(this.onScroll.bind(this),this._options.throttle),(0,a["default"])(window).on("scroll",this.onScrollHandler)}},{key:"onScroll",value:function(){return this._element.length?this.checkVisiblePlaceholders():(0,a["default"])(window).off("scroll",this.onScrollHandler)}},{key:"checkVisiblePlaceholders",value:function(){this.windowHeight=(0,a["default"])(window).height(),this.windowWidth=(0,a["default"])(window).width(),Array.prototype.forEach.call(this._element,this.checkPlaceholder.bind(this))}},{key:"checkPlaceholder",value:function(e){this.isPlaceholderVisible(e)&&(this.renderImage(e),(0,f["default"])(this._element,e))}},{key:"isPlaceholderVisible",value:function(e){return e.getBoundingClientRect().top<=this.windowHeight+this._options.offset}},{key:"renderImage",value:function(e){e.parentNode.replaceChild(this.createImage(e),e)}},{key:"createImage",value:function(e){var t=document.createElement("img");return this.parseAttributes(t,e.attributes),t.removeAttribute("data-lazy"),e.getAttribute("data-srcset")?(this.parseBreakpoints(t,e.getAttribute("data-srcset")),t):(t.src=e.getAttribute("data-src"),t)}},{key:"parseAttributes",value:function(e,t){var n=this;return Array.prototype.forEach.call(t,function(t){(t.name!==n._options.selector||"data-srcset"!==t.name||"data-src"!==t.name)&&e.setAttribute(t.name,t.value)}),e}},{key:"parseBreakpoints",value:function(e,t){e.removeAttribute("data-srcset"),t=t.split(",").map(function(e){return e=e.trim().split(" "),{src:e[0],width:e[1]}}).sort(function(e,t){return t.width-e.width});for(var n=0;n<t.length;n++){var i=t[n];if(i.width<=this.windowWidth){e.src=i.src;break}}return e}},{key:"destroy",value:function(){(0,a["default"])(window).off("scroll",this.onScrollHandler)}}]),e}();a["default"].fn[h]=function(e){return e=e||{},this.each(function(){a["default"].data(this,h)||a["default"].data(this,h,new v(this,e).init())})},t["default"]=v},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){var n=!0;return function(){if(n){for(var i=arguments.length,r=Array(i),s=0;i>s;s++)r[s]=arguments[s];e.apply(this,r),n=!1,setTimeout(function(){return n=!0},t)}}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){Array.prototype.splice.call(e,Array.prototype.indexOf.call(e,t))}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=i(o),l=n(8),u=i(l),c=n(10),f=i(c),h="validation",d={events:"blur",selector:"[data-required]"},v=function(){function e(t,n){r(this,e),this._element=(0,a["default"])(t),this._options=a["default"].extend({},d,n||{})}return s(e,[{key:"init",value:function(){this._fields=this._element.find(this._options.selector),this.bindListeners()}},{key:"bindListeners",value:function(){var e=this;this.handler=function(t){e.validate(t.target)},this._element.off(this._options.events,this._options.selector,this.handler),this._element.on(this._options.events,this._options.selector,this.handler)}},{key:"validate",value:function(e){var t=this,n=e.getAttribute("data-validate");return n?(n=n.split(" ").reduce(function(n,i){return t.rules[i].call(t,e,t._element)||n.push(i),n},[]),u["default"].emit("validation:"+(n.length?"error":"success"),e,n),!n.length):void 0}},{key:"validateAll",value:function(){return Array.prototype.map.call(this._element.find(this._options.selector),this.validate,this).every(function(e){return e})}}]),e}();v.prototype.rules=f["default"],a["default"].fn[h]=function(e){return e=e||{},this.each(function(){a["default"].data(this,h)||a["default"].data(this,h,new v(this,e).init())})},t["default"]=v},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),s=i(r);t["default"]=new s["default"]},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function r(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!r(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,r,a,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],o(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(s(n))for(a=Array.prototype.slice.call(arguments,1),u=n.slice(),r=u.length,l=0;r>l;l++)u[l].apply(this,a);return!0},n.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,r,o,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(a=o;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),s=i(r),o=n(12),a=i(o),l=n(13),u=i(l),c=n(14),f=i(c),h=n(15),d=i(h);t["default"]={required:s["default"],confirm:a["default"],minlength:u["default"],maxlength:f["default"],email:d["default"]}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){return"checkbox"===e.type?e.checked:"radio"===e.type?t.find('[name="'+e.name+'"]:checked').length:!!e.value.trim()}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){return e.value===t.find('[name="'+e.getAttribute("data-confirm")+"]").val()}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return e.value.length>=e.getAttribute("data-minlength")}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return e.value.length<=e.getAttribute("maxlength")}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e.value)}}]); |
{ | ||
"name": "garden", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "A styleguide based on Leroy Merlin needs", | ||
@@ -78,3 +78,2 @@ "main": "dist/js/garden.min.js", | ||
"postcss-each": "^0.7.1", | ||
"postcss-extend": "^1.0.1", | ||
"postcss-font-magician": "^1.4.0", | ||
@@ -81,0 +80,0 @@ "postcss-for": "^2.0.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
112822
67
1099