@pluginjs/loader
Advanced tools
Comparing version 0.7.17 to 0.7.18
/*! | ||
* @pluginjs/loader v0.7.17 (https://pluginjs.com) | ||
* @pluginjs/loader v0.7.18 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
@@ -4,0 +4,0 @@ * Released under the GPL-3.0 License. |
/*! | ||
* @pluginjs/loader v0.7.17 (https://pluginjs.com) | ||
* @pluginjs/loader v0.7.18 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
@@ -4,0 +4,0 @@ * Released under the GPL-3.0 License. |
/*! | ||
* @pluginjs/loader v0.7.17 (https://pluginjs.com) | ||
* @pluginjs/loader v0.7.18 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
@@ -4,0 +4,0 @@ * Released under the GPL-3.0 License. |
/*! | ||
* @pluginjs/loader v0.7.17 (https://pluginjs.com) | ||
* @pluginjs/loader v0.7.18 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
import s from"@pluginjs/component";import{addClass as t,removeClass as i}from"@pluginjs/classes";import{appendTo as e,append as o}from"@pluginjs/dom";import{setStyle as h}from"@pluginjs/styled";import{themeable as a,styleable as r,eventable as l,stateable as n,optionable as c,register as d}from"@pluginjs/decorator";var m,p={READY:"ready",DESTROY:"destroy",SHOW:"show",HIDE:"hide"};export default a()(m=r({NAMESPACE:"pj-loader",LOADER:"{namespace}",THEME:"{namespace}--{theme}",SHOW:"{namespace}-show",SIZE:"{namespace}-{size}",TEXT:"{namespace}-text",MASK:"{namespace}-mask"})(m=l(p)(m=n()(m=c({theme:"circle",size:null,text:null,background:null,color:null},!0)(m=d("loader",{methods:["destroy","show","hide","toggle"]})(m=class extends s{constructor(s){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(s),this.setupOptions(t),this.setupClasses(),this.setupStates(),this.initialize()}initialize(){this.$mask=e('<div class="'.concat(this.classes.MASK,'"></div>'),this.element),this.$loader=e('<div class="'.concat(this.classes.LOADER,'"></div>'),this.$mask),this.options.size&&t(this.getClass(this.classes.SIZE,"size",this.options.size),this.$loader),this.options.theme&&t(this.getThemeClass(),this.$loader),this.options.background&&h("background",this.options.background,this.$mask),this.options.color&&h("color",this.options.color,this.$loader),this.options.text&&(this.$text=o('<div class="'.concat(this.classes.TEXT,'">').concat(this.options.text,"</div>"),this.$mask)),this.enter("initialized"),this.trigger(p.READY)}destroy(){this.is("initialized")&&(this.options.text&&this.$text.remove(),this.$loader.remove(),this.$mask.remove(),this.leave("initialized")),this.trigger(p.DESTROY),super.destroy()}toggle(){this.is("shown")?this.hide():this.show()}show(){this.is("shown")||(t(this.classes.SHOW,this.$mask),this.enter("shown")),this.trigger(p.SHOW)}hide(){this.is("shown")&&(i(this.classes.SHOW,this.$mask),this.leave("shown")),this.trigger(p.HIDE)}})||m)||m)||m)||m)||m)||m; | ||
import s from"@pluginjs/component";import{addClass as t,removeClass as i}from"@pluginjs/classes";import{appendTo as e,append as o}from"@pluginjs/dom";import{setStyle as h}from"@pluginjs/styled";import{themeable as a,styleable as r,eventable as l,stateable as n,optionable as c,register as d}from"@pluginjs/decorator";var m,p={READY:"ready",DESTROY:"destroy",SHOW:"show",HIDE:"hide"},g=a()(m=r({NAMESPACE:"pj-loader",LOADER:"{namespace}",THEME:"{namespace}--{theme}",SHOW:"{namespace}-show",SIZE:"{namespace}-{size}",TEXT:"{namespace}-text",MASK:"{namespace}-mask"})(m=l(p)(m=n()(m=c({theme:"circle",size:null,text:null,background:null,color:null},!0)(m=d("loader",{methods:["destroy","show","hide","toggle"]})(m=class extends s{constructor(s){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(s),this.setupOptions(t),this.setupClasses(),this.setupStates(),this.initialize()}initialize(){this.$mask=e('<div class="'.concat(this.classes.MASK,'"></div>'),this.element),this.$loader=e('<div class="'.concat(this.classes.LOADER,'"></div>'),this.$mask),this.options.size&&t(this.getClass(this.classes.SIZE,"size",this.options.size),this.$loader),this.options.theme&&t(this.getThemeClass(),this.$loader),this.options.background&&h("background",this.options.background,this.$mask),this.options.color&&h("color",this.options.color,this.$loader),this.options.text&&(this.$text=o('<div class="'.concat(this.classes.TEXT,'">').concat(this.options.text,"</div>"),this.$mask)),this.enter("initialized"),this.trigger(p.READY)}destroy(){this.is("initialized")&&(this.options.text&&this.$text.remove(),this.$loader.remove(),this.$mask.remove(),this.leave("initialized")),this.trigger(p.DESTROY),super.destroy()}toggle(){this.is("shown")?this.hide():this.show()}show(){this.is("shown")||(t(this.classes.SHOW,this.$mask),this.enter("shown")),this.trigger(p.SHOW)}hide(){this.is("shown")&&(i(this.classes.SHOW,this.$mask),this.leave("shown")),this.trigger(p.HIDE)}})||m)||m)||m)||m)||m)||m;export default g; |
/*! | ||
* @pluginjs/loader v0.7.17 (https://pluginjs.com) | ||
* @pluginjs/loader v0.7.18 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
@@ -4,0 +4,0 @@ * Released under the GPL-3.0 License. |
/*! | ||
* @pluginjs/loader v0.7.17 (https://pluginjs.com) | ||
* @pluginjs/loader v0.7.18 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@pluginjs/component"),require("@pluginjs/classes"),require("@pluginjs/dom"),require("@pluginjs/styled"),require("@pluginjs/decorator")):"function"==typeof define&&define.amd?define(["@pluginjs/component","@pluginjs/classes","@pluginjs/dom","@pluginjs/styled","@pluginjs/decorator"],t):(e=e||self)["@pluginjs/loader"]=t(e["@pluginjs/component"],e["@pluginjs/classes"],e["@pluginjs/dom"],e["@pluginjs/styled"],e["@pluginjs/decorator"])}(this,function(e,t,s,i,n){"use strict";function o(e,t){for(var s=0;s<t.length;s++){var i=t[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t,s){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,s){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}(e,t);if(i){var n=Object.getOwnPropertyDescriptor(i,t);return n.get?n.get.call(s):n.value}})(e,t,s||e)}e=e&&e.hasOwnProperty("default")?e.default:e;var u,h={READY:"ready",DESTROY:"destroy",SHOW:"show",HIDE:"hide"};return n.themeable()(u=n.styleable({NAMESPACE:"pj-loader",LOADER:"{namespace}",THEME:"{namespace}--{theme}",SHOW:"{namespace}-show",SIZE:"{namespace}-{size}",TEXT:"{namespace}-text",MASK:"{namespace}-mask"})(u=n.eventable(h)(u=n.stateable()(u=n.optionable({theme:"circle",size:null,text:null,background:null,color:null},!0)(u=n.register("loader",{methods:["destroy","show","hide","toggle"]})(u=function(n){function u(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=l(this,r(u).call(this,e))).setupOptions(s),t.setupClasses(),t.setupStates(),t.initialize(),t}var p,d,f;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(u,e),p=u,(d=[{key:"initialize",value:function(){this.$mask=s.appendTo('<div class="'.concat(this.classes.MASK,'"></div>'),this.element),this.$loader=s.appendTo('<div class="'.concat(this.classes.LOADER,'"></div>'),this.$mask),this.options.size&&t.addClass(this.getClass(this.classes.SIZE,"size",this.options.size),this.$loader),this.options.theme&&t.addClass(this.getThemeClass(),this.$loader),this.options.background&&i.setStyle("background",this.options.background,this.$mask),this.options.color&&i.setStyle("color",this.options.color,this.$loader),this.options.text&&(this.$text=s.append('<div class="'.concat(this.classes.TEXT,'">').concat(this.options.text,"</div>"),this.$mask)),this.enter("initialized"),this.trigger(h.READY)}},{key:"destroy",value:function(){this.is("initialized")&&(this.options.text&&this.$text.remove(),this.$loader.remove(),this.$mask.remove(),this.leave("initialized")),this.trigger(h.DESTROY),c(r(u.prototype),"destroy",this).call(this)}},{key:"toggle",value:function(){this.is("shown")?this.hide():this.show()}},{key:"show",value:function(){this.is("shown")||(t.addClass(this.classes.SHOW,this.$mask),this.enter("shown")),this.trigger(h.SHOW)}},{key:"hide",value:function(){this.is("shown")&&(t.removeClass(this.classes.SHOW,this.$mask),this.leave("shown")),this.trigger(h.HIDE)}}])&&o(p.prototype,d),f&&o(p,f),u}())||u)||u)||u)||u)||u)||u}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@pluginjs/component"),require("@pluginjs/classes"),require("@pluginjs/dom"),require("@pluginjs/styled"),require("@pluginjs/decorator")):"function"==typeof define&&define.amd?define(["@pluginjs/component","@pluginjs/classes","@pluginjs/dom","@pluginjs/styled","@pluginjs/decorator"],t):(e=e||self)["@pluginjs/loader"]=t(e["@pluginjs/component"],e["@pluginjs/classes"],e["@pluginjs/dom"],e["@pluginjs/styled"],e["@pluginjs/decorator"])}(this,(function(e,t,s,i,n){"use strict";function o(e,t){for(var s=0;s<t.length;s++){var i=t[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t,s){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,s){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}(e,t);if(i){var n=Object.getOwnPropertyDescriptor(i,t);return n.get?n.get.call(s):n.value}})(e,t,s||e)}e=e&&e.hasOwnProperty("default")?e.default:e;var u,h={READY:"ready",DESTROY:"destroy",SHOW:"show",HIDE:"hide"};return n.themeable()(u=n.styleable({NAMESPACE:"pj-loader",LOADER:"{namespace}",THEME:"{namespace}--{theme}",SHOW:"{namespace}-show",SIZE:"{namespace}-{size}",TEXT:"{namespace}-text",MASK:"{namespace}-mask"})(u=n.eventable(h)(u=n.stateable()(u=n.optionable({theme:"circle",size:null,text:null,background:null,color:null},!0)(u=n.register("loader",{methods:["destroy","show","hide","toggle"]})(u=function(e){function n(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=l(this,r(n).call(this,e))).setupOptions(s),t.setupClasses(),t.setupStates(),t.initialize(),t}var u,p,d;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(n,e),u=n,(p=[{key:"initialize",value:function(){this.$mask=s.appendTo('<div class="'.concat(this.classes.MASK,'"></div>'),this.element),this.$loader=s.appendTo('<div class="'.concat(this.classes.LOADER,'"></div>'),this.$mask),this.options.size&&t.addClass(this.getClass(this.classes.SIZE,"size",this.options.size),this.$loader),this.options.theme&&t.addClass(this.getThemeClass(),this.$loader),this.options.background&&i.setStyle("background",this.options.background,this.$mask),this.options.color&&i.setStyle("color",this.options.color,this.$loader),this.options.text&&(this.$text=s.append('<div class="'.concat(this.classes.TEXT,'">').concat(this.options.text,"</div>"),this.$mask)),this.enter("initialized"),this.trigger(h.READY)}},{key:"destroy",value:function(){this.is("initialized")&&(this.options.text&&this.$text.remove(),this.$loader.remove(),this.$mask.remove(),this.leave("initialized")),this.trigger(h.DESTROY),c(r(n.prototype),"destroy",this).call(this)}},{key:"toggle",value:function(){this.is("shown")?this.hide():this.show()}},{key:"show",value:function(){this.is("shown")||(t.addClass(this.classes.SHOW,this.$mask),this.enter("shown")),this.trigger(h.SHOW)}},{key:"hide",value:function(){this.is("shown")&&(t.removeClass(this.classes.SHOW,this.$mask),this.leave("shown")),this.trigger(h.HIDE)}}])&&o(u.prototype,p),d&&o(u,d),n}(e))||u)||u)||u)||u)||u)||u})); |
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "0.7.17", | ||
"version": "0.7.18", | ||
"category": "ui", | ||
@@ -41,18 +41,18 @@ "main": "dist/loader.common.js", | ||
"dependencies": { | ||
"@pluginjs/classes": "^0.7.15", | ||
"@pluginjs/component": "^0.7.13", | ||
"@pluginjs/decorator": "^0.7.17", | ||
"@pluginjs/dom": "^0.7.16", | ||
"@pluginjs/events": "^0.7.15", | ||
"@pluginjs/factory": "^0.7.15", | ||
"@pluginjs/is": "^0.7.14", | ||
"@pluginjs/styled": "^0.7.16", | ||
"@pluginjs/styles": "^0.7.9", | ||
"@pluginjs/template": "^0.7.15", | ||
"@pluginjs/utils": "^0.7.15" | ||
"@pluginjs/classes": "^0.7.16", | ||
"@pluginjs/component": "^0.7.14", | ||
"@pluginjs/decorator": "^0.7.18", | ||
"@pluginjs/dom": "^0.7.17", | ||
"@pluginjs/events": "^0.7.16", | ||
"@pluginjs/factory": "^0.7.16", | ||
"@pluginjs/is": "^0.7.15", | ||
"@pluginjs/styled": "^0.7.17", | ||
"@pluginjs/styles": "^0.7.10", | ||
"@pluginjs/template": "^0.7.16", | ||
"@pluginjs/utils": "^0.7.16" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.5.5", | ||
"@pluginjs/browserslist-config": "^1.2.10", | ||
"@pluginjs/cli": "^0.7.13", | ||
"@babel/core": "^7.6.0", | ||
"@pluginjs/browserslist-config": "^1.2.11", | ||
"@pluginjs/cli": "^0.7.14", | ||
"babel-jest": "*", | ||
@@ -83,3 +83,3 @@ "jest": "*", | ||
], | ||
"gitHead": "2d2c629bf12f5a071c43b3074a6becdd4afadedc" | ||
"gitHead": "d1b3d9591a2fa49f13758c5ad8effcb021b096fc" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
50383
Updated@pluginjs/classes@^0.7.16
Updated@pluginjs/component@^0.7.14
Updated@pluginjs/decorator@^0.7.18
Updated@pluginjs/dom@^0.7.17
Updated@pluginjs/events@^0.7.16
Updated@pluginjs/factory@^0.7.16
Updated@pluginjs/is@^0.7.15
Updated@pluginjs/styled@^0.7.17
Updated@pluginjs/styles@^0.7.10
Updated@pluginjs/template@^0.7.16
Updated@pluginjs/utils@^0.7.16