Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-class-component

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-class-component - npm Package Compare versions

Comparing version 8.0.0-beta.4 to 8.0.0-rc.1

13

CHANGELOG.md

@@ -0,1 +1,14 @@

# [8.0.0-rc.1](https://github.com/vuejs/vue-class-component/compare/v8.0.0-beta.4...v8.0.0-rc.1) (2020-11-20)
### Breaking Changes
* Renamed `Vue.props` with `Vue.with`
### Bug Fixes
* avoid extended mixin missing own options (fix [#467](https://github.com/vuejs/vue-class-component/issues/467)) ([9d11761](https://github.com/vuejs/vue-class-component/commit/9d117611e8881f5c983534196413b2a8aa76c6ee))
# [8.0.0-beta.4](https://github.com/vuejs/vue-class-component/compare/v8.0.0-beta.3...v8.0.0-beta.4) (2020-10-04)

@@ -2,0 +15,0 @@

89

dist/vue-class-component.cjs.js
/**
* vue-class-component v8.0.0-beta.4
* vue-class-component v8.0.0-rc.1
* (c) 2015-present Evan You

@@ -243,2 +243,6 @@ * @license MIT

function getOwn(value, key) {
return value.hasOwnProperty(key) ? value[key] : undefined;
}
var VueImpl = /*#__PURE__*/function () {

@@ -271,23 +275,13 @@ function VueImpl(props, ctx) {

}
/** @internal */
_createClass(VueImpl, null, [{
key: "__vccExtend",
value: function __vccExtend(options) {
options.mixins = options.mixins || [];
options.mixins.push(this.__vccOpts);
}
/** @internal */
}, {
key: "registerHooks",
value: function registerHooks(keys) {
var _this$__vccHooks;
var _this$__h;
(_this$__vccHooks = this.__vccHooks).push.apply(_this$__vccHooks, _toConsumableArray(keys));
(_this$__h = this.__h).push.apply(_this$__h, _toConsumableArray(keys));
}
}, {
key: "props",
value: function props(Props) {
key: "with",
value: function _with(Props) {
var propsMeta = new Props();

@@ -311,12 +305,8 @@ var props = {};

_createClass(PropsMixin, null, [{
key: "__vccExtend",
value: function __vccExtend(options) {
options.props = props;
}
}]);
return PropsMixin;
}(this);
PropsMixin.__b = {
props: props
};
return PropsMixin;

@@ -332,16 +322,26 @@ }

var cache = this.hasOwnProperty('__vccCache') && this.__vccCache;
var Ctor = this;
var cache = getOwn(Ctor, '__c');
if (cache) {
return cache;
}
} // If the options are provided via decorator use it as a base
var Ctor = this; // If the options are provided via decorator use it as a base
var options = this.__vccCache = this.hasOwnProperty('__vccBase') ? _objectSpread2({}, this.__vccBase) : {}; // Handle super class options
var options = _objectSpread2({}, getOwn(Ctor, '__o'));
Ctor.__c = options; // Handle super class options
var Super = getSuper(Ctor);
if (Super) {
Super.__vccExtend(options);
options["extends"] = Super.__vccOpts;
} // Inject base options as a mixin
var base = getOwn(Ctor, '__b');
if (base) {
options.mixins = options.mixins || [];
options.mixins.unshift(base);
}

@@ -358,3 +358,3 @@

if (Ctor.__vccHooks.indexOf(key) > -1) {
if (Ctor.__h.indexOf(key) > -1) {
options[key] = proto[key];

@@ -423,3 +423,3 @@ return;

var decorators = this.hasOwnProperty('__vccDecorators') && this.__vccDecorators;
var decorators = getOwn(Ctor, '__d');

@@ -445,6 +445,4 @@ if (decorators) {

}();
/** @internal */
VueImpl.__vccHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUnmount', 'unmounted', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch'];
VueImpl.__h = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUnmount', 'unmounted', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch'];
var Vue = VueImpl;

@@ -454,3 +452,3 @@

return function (Component) {
Component.__vccBase = options;
Component.__o = options;
return Component;

@@ -463,4 +461,4 @@ };

if (!Ctor.__vccDecorators) {
Ctor.__vccDecorators = [];
if (!Ctor.__d) {
Ctor.__d = [];
}

@@ -472,3 +470,3 @@

Ctor.__vccDecorators.push(function (options) {
Ctor.__d.push(function (options) {
return factory(options, key, index);

@@ -483,3 +481,5 @@ });

return /*#__PURE__*/function (_Vue) {
var _a;
return _a = /*#__PURE__*/function (_Vue) {
_inherits(MixedVue, _Vue);

@@ -489,11 +489,2 @@

_createClass(MixedVue, null, [{
key: "__vccExtend",
value: function __vccExtend(options) {
Ctors.forEach(function (Ctor) {
return Ctor.__vccExtend(options);
});
}
}]);
function MixedVue() {

@@ -520,3 +511,7 @@ var _this;

return MixedVue;
}(Vue);
}(Vue), _a.__b = {
mixins: Ctors.map(function (Ctor) {
return Ctor.__vccOpts;
})
}, _a;
}

@@ -523,0 +518,0 @@ function setup(setupFn) {

@@ -94,3 +94,3 @@ import { AllowedComponentProps } from 'vue';

registerHooks(keys: string[]): void;
props<P extends {
with<P extends {
new (): unknown;

@@ -111,7 +111,7 @@ }>(Props: P): VueConstructor<V & VueWithProps<InstanceType<P>>>;

export declare interface VueStatic {
/* Excluded from this release type: __vccCache */
/* Excluded from this release type: __vccBase */
/* Excluded from this release type: __vccDecorators */
/* Excluded from this release type: __vccExtend */
/* Excluded from this release type: __vccHooks */
/* Excluded from this release type: __c */
/* Excluded from this release type: __b */
/* Excluded from this release type: __o */
/* Excluded from this release type: __d */
/* Excluded from this release type: __h */
/* Excluded from this release type: __vccOpts */

@@ -118,0 +118,0 @@ /* Excluded from this release type: render */

/**
* vue-class-component v8.0.0-beta.4
* vue-class-component v8.0.0-rc.1
* (c) 2015-present Evan You

@@ -86,2 +86,6 @@ * @license MIT

function getOwn(value, key) {
return value.hasOwnProperty(key) ? value[key] : undefined;
}
class VueImpl {

@@ -102,12 +106,3 @@ constructor(props, ctx) {

}
/** @internal */
static __vccExtend(options) {
options.mixins = options.mixins || [];
options.mixins.push(this.__vccOpts);
}
/** @internal */
static get __vccOpts() {

@@ -119,16 +114,26 @@ // Early return if `this` is base class as it does not have any options

var cache = this.hasOwnProperty('__vccCache') && this.__vccCache;
var Ctor = this;
var cache = getOwn(Ctor, '__c');
if (cache) {
return cache;
}
} // If the options are provided via decorator use it as a base
var Ctor = this; // If the options are provided via decorator use it as a base
var options = this.__vccCache = this.hasOwnProperty('__vccBase') ? _objectSpread2({}, this.__vccBase) : {}; // Handle super class options
var options = _objectSpread2({}, getOwn(Ctor, '__o'));
Ctor.__c = options; // Handle super class options
var Super = getSuper(Ctor);
if (Super) {
Super.__vccExtend(options);
options.extends = Super.__vccOpts;
} // Inject base options as a mixin
var base = getOwn(Ctor, '__b');
if (base) {
options.mixins = options.mixins || [];
options.mixins.unshift(base);
}

@@ -145,3 +150,3 @@

if (Ctor.__vccHooks.indexOf(key) > -1) {
if (Ctor.__h.indexOf(key) > -1) {
options[key] = proto[key];

@@ -210,3 +215,3 @@ return;

var decorators = this.hasOwnProperty('__vccDecorators') && this.__vccDecorators;
var decorators = getOwn(Ctor, '__d');

@@ -228,6 +233,6 @@ if (decorators) {

static registerHooks(keys) {
this.__vccHooks.push(...keys);
this.__h.push(...keys);
}
static props(Props) {
static with(Props) {
var propsMeta = new Props();

@@ -240,9 +245,7 @@ var props = {};

class PropsMixin extends this {
static __vccExtend(options) {
options.props = props;
}
class PropsMixin extends this {}
}
PropsMixin.__b = {
props
};
return PropsMixin;

@@ -252,6 +255,4 @@ }

}
/** @internal */
VueImpl.__vccHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUnmount', 'unmounted', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch'];
VueImpl.__h = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUnmount', 'unmounted', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch'];
var Vue = VueImpl;

@@ -261,3 +262,3 @@

return Component => {
Component.__vccBase = options;
Component.__o = options;
return Component;

@@ -270,4 +271,4 @@ };

if (!Ctor.__vccDecorators) {
Ctor.__vccDecorators = [];
if (!Ctor.__d) {
Ctor.__d = [];
}

@@ -279,3 +280,3 @@

Ctor.__vccDecorators.push(options => factory(options, key, index));
Ctor.__d.push(options => factory(options, key, index));
};

@@ -288,7 +289,5 @@ }

return class MixedVue extends Vue {
static __vccExtend(options) {
Ctors.forEach(Ctor => Ctor.__vccExtend(options));
}
var _a;
return _a = class MixedVue extends Vue {
constructor() {

@@ -308,3 +307,5 @@ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {

};
}, _a.__b = {
mixins: Ctors.map(Ctor => Ctor.__vccOpts)
}, _a;
}

@@ -311,0 +312,0 @@ function setup(setupFn) {

/**
* vue-class-component v8.0.0-beta.4
* vue-class-component v8.0.0-rc.1
* (c) 2015-present Evan You
* @license MIT
*/
import{ref,proxyRefs}from"vue";function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function defineGetter(e,t,r){Object.defineProperty(e,t,{get:r,enumerable:!1,configurable:!0})}function defineProxy(e,t,r){Object.defineProperty(e,t,{get:()=>r[t].value,set:e=>{r[t].value=e},enumerable:!0,configurable:!0})}function getSuper(e){var t=Object.getPrototypeOf(e.prototype);if(t)return t.constructor}class VueImpl{constructor(e,t){defineGetter(this,"$props",()=>e),defineGetter(this,"$attrs",()=>t.attrs),defineGetter(this,"$slots",()=>t.slots),defineGetter(this,"$emit",()=>t.emit),Object.keys(e).forEach(t=>{Object.defineProperty(this,t,{enumerable:!1,configurable:!0,writable:!0,value:e[t]})})}static __vccExtend(e){e.mixins=e.mixins||[],e.mixins.push(this.__vccOpts)}static get __vccOpts(){if(this===Vue)return{};var e=this.hasOwnProperty("__vccCache")&&this.__vccCache;if(e)return e;var t=this,r=this.__vccCache=this.hasOwnProperty("__vccBase")?_objectSpread2({},this.__vccBase):{},o=getSuper(t);o&&o.__vccExtend(r),r.methods=_objectSpread2({},r.methods),r.computed=_objectSpread2({},r.computed);var c=t.prototype;Object.getOwnPropertyNames(c).forEach(e=>{if("constructor"!==e)if(t.__vccHooks.indexOf(e)>-1)r[e]=c[e];else{var o=Object.getOwnPropertyDescriptor(c,e);"function"!=typeof o.value?(o.get||o.set)&&(r.computed[e]={get:o.get,set:o.set}):r.methods[e]=o.value}}),r.setup=function(e,r){var o,c=new t(e,r),n=Object.keys(c),s={},i=null;return n.forEach(e=>{void 0===c[e]||c[e]&&c[e].__s||(s[e]=ref(c[e]),defineProxy(c,e,s))}),n.forEach(e=>{if(c[e]&&c[e].__s){var t=c[e].__s();t instanceof Promise?(i||(i=Promise.resolve(s)),i=i.then(()=>t.then(t=>(s[e]=proxyRefs(t),s)))):s[e]=proxyRefs(t)}}),null!==(o=i)&&void 0!==o?o:s};var n=this.hasOwnProperty("__vccDecorators")&&this.__vccDecorators;n&&n.forEach(e=>e(r));return["render","ssrRender","__file","__cssModules","__scopeId","__hmrId"].forEach(e=>{t[e]&&(r[e]=t[e])}),r}static registerHooks(e){this.__vccHooks.push(...e)}static props(e){var t=new e,r={};Object.keys(t).forEach(e=>{var o=t[e];r[e]=null!==o&&void 0!==o?o:null});return class extends(this){static __vccExtend(e){e.props=r}}}}VueImpl.__vccHooks=["data","beforeCreate","created","beforeMount","mounted","beforeUnmount","unmounted","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];var Vue;function Options(e){return t=>(t.__vccBase=e,t)}function createDecorator(e){return(t,r,o)=>{var c="function"==typeof t?t:t.constructor;c.__vccDecorators||(c.__vccDecorators=[]),"number"!=typeof o&&(o=void 0),c.__vccDecorators.push(t=>e(t,r,o))}}function mixins(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return class extends Vue{static __vccExtend(e){t.forEach(t=>t.__vccExtend(e))}constructor(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];super(...r),t.forEach(e=>{var t=new e(...r);Object.keys(t).forEach(e=>{this[e]=t[e]})})}}}function setup(e){return{__s:e}}function prop(e){return e}export{Options,VueImpl as Vue,createDecorator,mixins,prop,setup};
import{ref,proxyRefs}from"vue";function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function defineGetter(e,t,r){Object.defineProperty(e,t,{get:r,enumerable:!1,configurable:!0})}function defineProxy(e,t,r){Object.defineProperty(e,t,{get:()=>r[t].value,set:e=>{r[t].value=e},enumerable:!0,configurable:!0})}function getSuper(e){var t=Object.getPrototypeOf(e.prototype);if(t)return t.constructor}function getOwn(e,t){return e.hasOwnProperty(t)?e[t]:void 0}class VueImpl{constructor(e,t){defineGetter(this,"$props",()=>e),defineGetter(this,"$attrs",()=>t.attrs),defineGetter(this,"$slots",()=>t.slots),defineGetter(this,"$emit",()=>t.emit),Object.keys(e).forEach(t=>{Object.defineProperty(this,t,{enumerable:!1,configurable:!0,writable:!0,value:e[t]})})}static get __vccOpts(){if(this===Vue)return{};var e=this,t=getOwn(e,"__c");if(t)return t;var r=_objectSpread2({},getOwn(e,"__o"));e.__c=r;var n=getSuper(e);n&&(r.extends=n.__vccOpts);var o=getOwn(e,"__b");o&&(r.mixins=r.mixins||[],r.mixins.unshift(o)),r.methods=_objectSpread2({},r.methods),r.computed=_objectSpread2({},r.computed);var s=e.prototype;Object.getOwnPropertyNames(s).forEach(t=>{if("constructor"!==t)if(e.__h.indexOf(t)>-1)r[t]=s[t];else{var n=Object.getOwnPropertyDescriptor(s,t);"function"!=typeof n.value?(n.get||n.set)&&(r.computed[t]={get:n.get,set:n.set}):r.methods[t]=n.value}}),r.setup=function(t,r){var n,o=new e(t,r),s=Object.keys(o),c={},i=null;return s.forEach(e=>{void 0===o[e]||o[e]&&o[e].__s||(c[e]=ref(o[e]),defineProxy(o,e,c))}),s.forEach(e=>{if(o[e]&&o[e].__s){var t=o[e].__s();t instanceof Promise?(i||(i=Promise.resolve(c)),i=i.then(()=>t.then(t=>(c[e]=proxyRefs(t),c)))):c[e]=proxyRefs(t)}}),null!==(n=i)&&void 0!==n?n:c};var c=getOwn(e,"__d");c&&c.forEach(e=>e(r));return["render","ssrRender","__file","__cssModules","__scopeId","__hmrId"].forEach(t=>{e[t]&&(r[t]=e[t])}),r}static registerHooks(e){this.__h.push(...e)}static with(e){var t=new e,r={};Object.keys(t).forEach(e=>{var n=t[e];r[e]=null!==n&&void 0!==n?n:null});class n extends(this){}return n.__b={props:r},n}}VueImpl.__h=["data","beforeCreate","created","beforeMount","mounted","beforeUnmount","unmounted","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];var Vue;function Options(e){return t=>(t.__o=e,t)}function createDecorator(e){return(t,r,n)=>{var o="function"==typeof t?t:t.constructor;o.__d||(o.__d=[]),"number"!=typeof n&&(n=void 0),o.__d.push(t=>e(t,r,n))}}function mixins(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n;return(n=class extends Vue{constructor(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];super(...r),t.forEach(e=>{var t=new e(...r);Object.keys(t).forEach(e=>{this[e]=t[e]})})}}).__b={mixins:t.map(e=>e.__vccOpts)},n}function setup(e){return{__s:e}}function prop(e){return e}export{Options,VueImpl as Vue,createDecorator,mixins,prop,setup};
/**
* vue-class-component v8.0.0-beta.4
* vue-class-component v8.0.0-rc.1
* (c) 2015-present Evan You

@@ -239,2 +239,6 @@ * @license MIT

function getOwn(value, key) {
return value.hasOwnProperty(key) ? value[key] : undefined;
}
var VueImpl = /*#__PURE__*/function () {

@@ -267,23 +271,13 @@ function VueImpl(props, ctx) {

}
/** @internal */
_createClass(VueImpl, null, [{
key: "__vccExtend",
value: function __vccExtend(options) {
options.mixins = options.mixins || [];
options.mixins.push(this.__vccOpts);
}
/** @internal */
}, {
key: "registerHooks",
value: function registerHooks(keys) {
var _this$__vccHooks;
var _this$__h;
(_this$__vccHooks = this.__vccHooks).push.apply(_this$__vccHooks, _toConsumableArray(keys));
(_this$__h = this.__h).push.apply(_this$__h, _toConsumableArray(keys));
}
}, {
key: "props",
value: function props(Props) {
key: "with",
value: function _with(Props) {
var propsMeta = new Props();

@@ -307,12 +301,8 @@ var props = {};

_createClass(PropsMixin, null, [{
key: "__vccExtend",
value: function __vccExtend(options) {
options.props = props;
}
}]);
return PropsMixin;
}(this);
PropsMixin.__b = {
props: props
};
return PropsMixin;

@@ -328,16 +318,26 @@ }

var cache = this.hasOwnProperty('__vccCache') && this.__vccCache;
var Ctor = this;
var cache = getOwn(Ctor, '__c');
if (cache) {
return cache;
}
} // If the options are provided via decorator use it as a base
var Ctor = this; // If the options are provided via decorator use it as a base
var options = this.__vccCache = this.hasOwnProperty('__vccBase') ? _objectSpread2({}, this.__vccBase) : {}; // Handle super class options
var options = _objectSpread2({}, getOwn(Ctor, '__o'));
Ctor.__c = options; // Handle super class options
var Super = getSuper(Ctor);
if (Super) {
Super.__vccExtend(options);
options["extends"] = Super.__vccOpts;
} // Inject base options as a mixin
var base = getOwn(Ctor, '__b');
if (base) {
options.mixins = options.mixins || [];
options.mixins.unshift(base);
}

@@ -354,3 +354,3 @@

if (Ctor.__vccHooks.indexOf(key) > -1) {
if (Ctor.__h.indexOf(key) > -1) {
options[key] = proto[key];

@@ -419,3 +419,3 @@ return;

var decorators = this.hasOwnProperty('__vccDecorators') && this.__vccDecorators;
var decorators = getOwn(Ctor, '__d');

@@ -441,6 +441,4 @@ if (decorators) {

}();
/** @internal */
VueImpl.__vccHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUnmount', 'unmounted', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch'];
VueImpl.__h = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUnmount', 'unmounted', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch'];
var Vue = VueImpl;

@@ -450,3 +448,3 @@

return function (Component) {
Component.__vccBase = options;
Component.__o = options;
return Component;

@@ -459,4 +457,4 @@ };

if (!Ctor.__vccDecorators) {
Ctor.__vccDecorators = [];
if (!Ctor.__d) {
Ctor.__d = [];
}

@@ -468,3 +466,3 @@

Ctor.__vccDecorators.push(function (options) {
Ctor.__d.push(function (options) {
return factory(options, key, index);

@@ -479,3 +477,5 @@ });

return /*#__PURE__*/function (_Vue) {
var _a;
return _a = /*#__PURE__*/function (_Vue) {
_inherits(MixedVue, _Vue);

@@ -485,11 +485,2 @@

_createClass(MixedVue, null, [{
key: "__vccExtend",
value: function __vccExtend(options) {
Ctors.forEach(function (Ctor) {
return Ctor.__vccExtend(options);
});
}
}]);
function MixedVue() {

@@ -516,3 +507,7 @@ var _this;

return MixedVue;
}(Vue);
}(Vue), _a.__b = {
mixins: Ctors.map(function (Ctor) {
return Ctor.__vccOpts;
})
}, _a;
}

@@ -519,0 +514,0 @@ function setup(setupFn) {

/**
* vue-class-component v8.0.0-beta.4
* vue-class-component v8.0.0-rc.1
* (c) 2015-present Evan You

@@ -240,2 +240,6 @@ * @license MIT

function getOwn(value, key) {
return value.hasOwnProperty(key) ? value[key] : undefined;
}
var VueImpl = /*#__PURE__*/function () {

@@ -268,23 +272,13 @@ function VueImpl(props, ctx) {

}
/** @internal */
_createClass(VueImpl, null, [{
key: "__vccExtend",
value: function __vccExtend(options) {
options.mixins = options.mixins || [];
options.mixins.push(this.__vccOpts);
}
/** @internal */
}, {
key: "registerHooks",
value: function registerHooks(keys) {
var _this$__vccHooks;
var _this$__h;
(_this$__vccHooks = this.__vccHooks).push.apply(_this$__vccHooks, _toConsumableArray(keys));
(_this$__h = this.__h).push.apply(_this$__h, _toConsumableArray(keys));
}
}, {
key: "props",
value: function props(Props) {
key: "with",
value: function _with(Props) {
var propsMeta = new Props();

@@ -308,12 +302,8 @@ var props = {};

_createClass(PropsMixin, null, [{
key: "__vccExtend",
value: function __vccExtend(options) {
options.props = props;
}
}]);
return PropsMixin;
}(this);
PropsMixin.__b = {
props: props
};
return PropsMixin;

@@ -329,16 +319,26 @@ }

var cache = this.hasOwnProperty('__vccCache') && this.__vccCache;
var Ctor = this;
var cache = getOwn(Ctor, '__c');
if (cache) {
return cache;
}
} // If the options are provided via decorator use it as a base
var Ctor = this; // If the options are provided via decorator use it as a base
var options = this.__vccCache = this.hasOwnProperty('__vccBase') ? _objectSpread2({}, this.__vccBase) : {}; // Handle super class options
var options = _objectSpread2({}, getOwn(Ctor, '__o'));
Ctor.__c = options; // Handle super class options
var Super = getSuper(Ctor);
if (Super) {
Super.__vccExtend(options);
options["extends"] = Super.__vccOpts;
} // Inject base options as a mixin
var base = getOwn(Ctor, '__b');
if (base) {
options.mixins = options.mixins || [];
options.mixins.unshift(base);
}

@@ -355,3 +355,3 @@

if (Ctor.__vccHooks.indexOf(key) > -1) {
if (Ctor.__h.indexOf(key) > -1) {
options[key] = proto[key];

@@ -420,3 +420,3 @@ return;

var decorators = this.hasOwnProperty('__vccDecorators') && this.__vccDecorators;
var decorators = getOwn(Ctor, '__d');

@@ -442,6 +442,4 @@ if (decorators) {

}();
/** @internal */
VueImpl.__vccHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUnmount', 'unmounted', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch'];
VueImpl.__h = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUnmount', 'unmounted', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch'];
var Vue = VueImpl;

@@ -451,3 +449,3 @@

return function (Component) {
Component.__vccBase = options;
Component.__o = options;
return Component;

@@ -460,4 +458,4 @@ };

if (!Ctor.__vccDecorators) {
Ctor.__vccDecorators = [];
if (!Ctor.__d) {
Ctor.__d = [];
}

@@ -469,3 +467,3 @@

Ctor.__vccDecorators.push(function (options) {
Ctor.__d.push(function (options) {
return factory(options, key, index);

@@ -480,3 +478,5 @@ });

return /*#__PURE__*/function (_Vue) {
var _a;
return _a = /*#__PURE__*/function (_Vue) {
_inherits(MixedVue, _Vue);

@@ -486,11 +486,2 @@

_createClass(MixedVue, null, [{
key: "__vccExtend",
value: function __vccExtend(options) {
Ctors.forEach(function (Ctor) {
return Ctor.__vccExtend(options);
});
}
}]);
function MixedVue() {

@@ -517,3 +508,7 @@ var _this;

return MixedVue;
}(Vue);
}(Vue), _a.__b = {
mixins: Ctors.map(function (Ctor) {
return Ctor.__vccOpts;
})
}, _a;
}

@@ -520,0 +515,0 @@ function setup(setupFn) {

/**
* vue-class-component v8.0.0-beta.4
* vue-class-component v8.0.0-rc.1
* (c) 2015-present Evan You
* @license MIT
*/
var VueClassComponent=function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach(function(e){c(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(){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}}function l(t,e,r){return(l=p()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&s(o,r.prototype),o}).apply(null,arguments)}function y(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){var e=p();return function(){var r,n=a(t);if(e){var o=a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return y(this,r)}}function h(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return b(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _(t,e,r){Object.defineProperty(t,e,{get:r,enumerable:!1,configurable:!0})}var d=function(){function t(e,n){var o=this;r(this,t),_(this,"$props",function(){return e}),_(this,"$attrs",function(){return n.attrs}),_(this,"$slots",function(){return n.slots}),_(this,"$emit",function(){return n.emit}),Object.keys(e).forEach(function(t){Object.defineProperty(o,t,{enumerable:!1,configurable:!0,writable:!0,value:e[t]})})}return o(t,null,[{key:"__vccExtend",value:function(t){t.mixins=t.mixins||[],t.mixins.push(this.__vccOpts)}},{key:"registerHooks",value:function(t){var e;(e=this.__vccHooks).push.apply(e,h(t))}},{key:"props",value:function(t){var e=new t,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=null!==r&&void 0!==r?r:null}),function(t){f(c,t);var e=v(c);function c(){return r(this,c),e.apply(this,arguments)}return o(c,null,[{key:"__vccExtend",value:function(t){t.props=n}}]),c}(this)}},{key:"__vccOpts",get:function(){if(this===O)return{};var t=this.hasOwnProperty("__vccCache")&&this.__vccCache;if(t)return t;var r=this,n=this.__vccCache=this.hasOwnProperty("__vccBase")?i({},this.__vccBase):{},o=function(t){var e=Object.getPrototypeOf(t.prototype);if(e)return e.constructor}(r);o&&o.__vccExtend(n),n.methods=i({},n.methods),n.computed=i({},n.computed);var c=r.prototype;Object.getOwnPropertyNames(c).forEach(function(t){if("constructor"!==t)if(r.__vccHooks.indexOf(t)>-1)n[t]=c[t];else{var e=Object.getOwnPropertyDescriptor(c,t);"function"!=typeof e.value?(e.get||e.set)&&(n.computed[t]={get:e.get,set:e.set}):n.methods[t]=e.value}}),n.setup=function(t,n){var o,c=new r(t,n),u=Object.keys(c),i={},f=null;return u.forEach(function(t){void 0===c[t]||c[t]&&c[t].__s||(i[t]=e.ref(c[t]),function(t,e,r){Object.defineProperty(t,e,{get:function(){return r[e].value},set:function(t){r[e].value=t},enumerable:!0,configurable:!0})}(c,t,i))}),u.forEach(function(t){if(c[t]&&c[t].__s){var r=c[t].__s();r instanceof Promise?(f||(f=Promise.resolve(i)),f=f.then(function(){return r.then(function(r){return i[t]=e.proxyRefs(r),i})})):i[t]=e.proxyRefs(r)}}),null!==(o=f)&&void 0!==o?o:i};var u=this.hasOwnProperty("__vccDecorators")&&this.__vccDecorators;u&&u.forEach(function(t){return t(n)});return["render","ssrRender","__file","__cssModules","__scopeId","__hmrId"].forEach(function(t){r[t]&&(n[t]=r[t])}),n}}]),t}();d.__vccHooks=["data","beforeCreate","created","beforeMount","mounted","beforeUnmount","unmounted","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];var O=d;return t.Options=function(t){return function(e){return e.__vccBase=t,e}},t.Vue=O,t.createDecorator=function(t){return function(e,r,n){var o="function"==typeof e?e:e.constructor;o.__vccDecorators||(o.__vccDecorators=[]),"number"!=typeof n&&(n=void 0),o.__vccDecorators.push(function(e){return t(e,r,n)})}},t.mixins=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){f(c,O);var n=v(c);function c(){for(var t,o=arguments.length,u=new Array(o),i=0;i<o;i++)u[i]=arguments[i];return r(this,c),t=n.call.apply(n,[this].concat(u)),e.forEach(function(e){var r=l(e,u);Object.keys(r).forEach(function(e){t[e]=r[e]})}),t}return o(c,null,[{key:"__vccExtend",value:function(t){e.forEach(function(e){return e.__vccExtend(t)})}}]),c}()},t.prop=function(t){return t},t.setup=function(t){return{__s:t}},t}({},Vue);
var VueClassComponent=function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(){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}}function p(t,e,r){return(p=s()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o}).apply(null,arguments)}function l(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(t){var e=s();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function b(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return v(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function h(t,e,r){Object.defineProperty(t,e,{get:r,enumerable:!1,configurable:!0})}function _(t,e){return t.hasOwnProperty(e)?t[e]:void 0}var d=function(){function t(e,n){var o=this;r(this,t),h(this,"$props",function(){return e}),h(this,"$attrs",function(){return n.attrs}),h(this,"$slots",function(){return n.slots}),h(this,"$emit",function(){return n.emit}),Object.keys(e).forEach(function(t){Object.defineProperty(o,t,{enumerable:!1,configurable:!0,writable:!0,value:e[t]})})}var o,u,f;return o=t,f=[{key:"registerHooks",value:function(t){var e;(e=this.__h).push.apply(e,b(t))}},{key:"with",value:function(t){var e=new t,n={};Object.keys(e).forEach(function(t){var r=e[t];n[t]=null!==r&&void 0!==r?r:null});var o=function(t){i(n,t);var e=y(n);function n(){return r(this,n),e.apply(this,arguments)}return n}(this);return o.__b={props:n},o}},{key:"__vccOpts",get:function(){if(this===O)return{};var t=this,r=_(t,"__c");if(r)return r;var n=c({},_(t,"__o"));t.__c=n;var o=function(t){var e=Object.getPrototypeOf(t.prototype);if(e)return e.constructor}(t);o&&(n.extends=o.__vccOpts);var u=_(t,"__b");u&&(n.mixins=n.mixins||[],n.mixins.unshift(u)),n.methods=c({},n.methods),n.computed=c({},n.computed);var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(e){if("constructor"!==e)if(t.__h.indexOf(e)>-1)n[e]=i[e];else{var r=Object.getOwnPropertyDescriptor(i,e);"function"!=typeof r.value?(r.get||r.set)&&(n.computed[e]={get:r.get,set:r.set}):n.methods[e]=r.value}}),n.setup=function(r,n){var o,u=new t(r,n),c=Object.keys(u),i={},f=null;return c.forEach(function(t){void 0===u[t]||u[t]&&u[t].__s||(i[t]=e.ref(u[t]),function(t,e,r){Object.defineProperty(t,e,{get:function(){return r[e].value},set:function(t){r[e].value=t},enumerable:!0,configurable:!0})}(u,t,i))}),c.forEach(function(t){if(u[t]&&u[t].__s){var r=u[t].__s();r instanceof Promise?(f||(f=Promise.resolve(i)),f=f.then(function(){return r.then(function(r){return i[t]=e.proxyRefs(r),i})})):i[t]=e.proxyRefs(r)}}),null!==(o=f)&&void 0!==o?o:i};var f=_(t,"__d");f&&f.forEach(function(t){return t(n)});return["render","ssrRender","__file","__cssModules","__scopeId","__hmrId"].forEach(function(e){t[e]&&(n[e]=t[e])}),n}}],(u=null)&&n(o.prototype,u),f&&n(o,f),t}();d.__h=["data","beforeCreate","created","beforeMount","mounted","beforeUnmount","unmounted","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];var O=d;return t.Options=function(t){return function(e){return e.__o=t,e}},t.Vue=O,t.createDecorator=function(t){return function(e,r,n){var o="function"==typeof e?e:e.constructor;o.__d||(o.__d=[]),"number"!=typeof n&&(n=void 0),o.__d.push(function(e){return t(e,r,n)})}},t.mixins=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o;return(o=function(t){i(o,O);var n=y(o);function o(){for(var t,u=arguments.length,c=new Array(u),i=0;i<u;i++)c[i]=arguments[i];return r(this,o),t=n.call.apply(n,[this].concat(c)),e.forEach(function(e){var r=p(e,c);Object.keys(r).forEach(function(e){t[e]=r[e]})}),t}return o}()).__b={mixins:e.map(function(t){return t.__vccOpts})},o},t.prop=function(t){return t},t.setup=function(t){return{__s:t}},t}({},Vue);
{
"name": "vue-class-component",
"version": "8.0.0-beta.4",
"version": "8.0.0-rc.1",
"description": "ES201X/TypeScript class decorator for Vue components",

@@ -5,0 +5,0 @@ "main": "dist/vue-class-component.cjs.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc