@pluginjs/component
Advanced tools
Comparing version 0.7.8 to 0.7.9
/*! | ||
* @pluginjs/component v0.7.8 (https://pluginjs.com) | ||
* @pluginjs/component v0.7.9 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
undefined | ||
'use strict'; | ||
// import { getData } from '@pluginjs/dom' | ||
class Component { | ||
constructor() { | ||
let element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | ||
// if(getData(this.plugin, element)) { | ||
// throw new Error(`The plugin ${this.plugin} already initialized on element.`); | ||
// } | ||
this.element = element; | ||
this.constructor.addInstance(this); | ||
} | ||
static of() { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
return new this(...args); | ||
} | ||
destroy() { | ||
this.constructor.removeInstance(this); | ||
this.element = null; | ||
} | ||
} | ||
module.exports = Component; |
/*! | ||
* @pluginjs/component v0.7.8 (https://pluginjs.com) | ||
* @pluginjs/component v0.7.9 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
undefined | ||
"use strict";class Component{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.element=t,this.constructor.addInstance(this)}static of(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new this(...e)}destroy(){this.constructor.removeInstance(this),this.element=null}}module.exports=Component; |
/*! | ||
* @pluginjs/component v0.7.8 (https://pluginjs.com) | ||
* @pluginjs/component v0.7.9 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
undefined | ||
// import { getData } from '@pluginjs/dom' | ||
class Component { | ||
constructor() { | ||
let element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | ||
// if(getData(this.plugin, element)) { | ||
// throw new Error(`The plugin ${this.plugin} already initialized on element.`); | ||
// } | ||
this.element = element; | ||
this.constructor.addInstance(this); | ||
} | ||
static of() { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
return new this(...args); | ||
} | ||
destroy() { | ||
this.constructor.removeInstance(this); | ||
this.element = null; | ||
} | ||
} | ||
export default Component; |
/*! | ||
* @pluginjs/component v0.7.8 (https://pluginjs.com) | ||
* @pluginjs/component v0.7.9 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
undefined | ||
export default class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.element=t,this.constructor.addInstance(this)}static of(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new this(...e)}destroy(){this.constructor.removeInstance(this),this.element=null}} |
/*! | ||
* @pluginjs/component v0.7.8 (https://pluginjs.com) | ||
* @pluginjs/component v0.7.9 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
undefined | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global = global || self, global['@pluginjs/component'] = factory()); | ||
}(this, function () { 'use strict'; | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
function _construct(Parent, args, Class) { | ||
if (isNativeReflectConstruct()) { | ||
_construct = Reflect.construct; | ||
} else { | ||
_construct = function _construct(Parent, args, Class) { | ||
var a = [null]; | ||
a.push.apply(a, args); | ||
var Constructor = Function.bind.apply(Parent, a); | ||
var instance = new Constructor(); | ||
if (Class) _setPrototypeOf(instance, Class.prototype); | ||
return instance; | ||
}; | ||
} | ||
return _construct.apply(null, arguments); | ||
} | ||
// import { getData } from '@pluginjs/dom' | ||
var Component = | ||
/*#__PURE__*/ | ||
function () { | ||
function Component() { | ||
var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | ||
_classCallCheck(this, Component); | ||
// if(getData(this.plugin, element)) { | ||
// throw new Error(`The plugin ${this.plugin} already initialized on element.`); | ||
// } | ||
this.element = element; | ||
this.constructor.addInstance(this); | ||
} | ||
_createClass(Component, [{ | ||
key: "destroy", | ||
value: function destroy() { | ||
this.constructor.removeInstance(this); | ||
this.element = null; | ||
} | ||
}], [{ | ||
key: "of", | ||
value: function of() { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
return _construct(this, args); | ||
} | ||
}]); | ||
return Component; | ||
}(); | ||
return Component; | ||
})); |
/*! | ||
* @pluginjs/component v0.7.8 (https://pluginjs.com) | ||
* @pluginjs/component v0.7.9 (https://pluginjs.com) | ||
* Copyright 2019 Creation Studio Limited | ||
* Released under the GPL-3.0 License. | ||
*/ | ||
undefined | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self)["@pluginjs/component"]=n()}(this,function(){"use strict";function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,e){return(n=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,e)}function e(t,r,o){return(e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,r){var o=[null];o.push.apply(o,e);var u=new(Function.bind.apply(t,o));return r&&n(u,r.prototype),u}).apply(null,arguments)}return function(){function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),this.element=t,this.constructor.addInstance(this)}var r,o,u;return r=n,u=[{key:"of",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e(this,n)}}],(o=[{key:"destroy",value:function(){this.constructor.removeInstance(this),this.element=null}}])&&t(r.prototype,o),u&&t(r,u),n}()}); |
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "0.7.8", | ||
"version": "0.7.9", | ||
"category": "core", | ||
@@ -38,4 +38,4 @@ "main": "dist/component.common.js", | ||
"@babel/core": "^7.4.4", | ||
"@pluginjs/browserslist-config": "^1.2.5", | ||
"@pluginjs/cli": "^0.7.8", | ||
"@pluginjs/browserslist-config": "^1.2.6", | ||
"@pluginjs/cli": "^0.7.9", | ||
"babel-jest": "*", | ||
@@ -66,3 +66,4 @@ "jest": "*", | ||
], | ||
"title": "Plugin" | ||
"title": "Plugin", | ||
"gitHead": "9ae759d6378f7bd8b952e5c1951dec91a101966e" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12493
191
0