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

vue-qrcode

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-qrcode - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5-beta.0

40

lib/cjs.js

@@ -6,2 +6,3 @@ 'use strict';

var QRCode = require('qrcode');
var Vue = require('vue');

@@ -132,21 +133,28 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

immediate: true,
handler: 'toDataURL',
handler: function () {
var _this = this;
var _a = this.$props, quality = _a.quality, props = __rest(_a, ["quality"]);
return QRCode__default['default'].toDataURL(this.value, Object.assign(props, quality == null || {
renderOptions: {
quality: quality,
},
})).then(function (dataUrl) { return (_this.dataUrl = dataUrl); });
},
},
},
methods: {
toDataURL: function () {
var _this = this;
var _a = this.$props, quality = _a.quality, props = __rest(_a, ["quality"]);
return QRCode__default['default'].toDataURL(this.value, Object.assign(props, quality == null || {
renderOptions: {
quality: quality,
},
})).then(function (dataUrl) { return (_this.dataUrl = dataUrl); });
},
// ! hack, compatible with Vue2 and Vue3 at the same time
render: function (h) {
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, import/namespace
var vueH = Vue.h;
var imgProps = __assign(__assign({}, this.$attrs), { src: this.dataUrl });
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return
return h('img',
// @ts-expect-error
vueH
? imgProps
: {
domProps: imgProps,
});
},
render: function () {
return this.$createElement('img', {
domProps: __assign(__assign({}, this.$attrs), { src: this.dataUrl }),
});
},
};

@@ -153,0 +161,0 @@

4

lib/cjs.min.js

@@ -1,2 +0,2 @@

"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("qrcode")),r=function(){return(r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("qrcode"),t=require("vue");function e(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var n=e(r),i=function(){return(i=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);return r}).apply(this,arguments)};
/*! *****************************************************************************

@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var n=["low","medium","quartile","high","L","M","Q","H"],i=[0,1,2,3,4,5,6,7],a=["alphanumeric","numeric","kanji","byte"],o=["image/png","image/jpeg","image/webp"],u={props:{version:{type:Number,validator:function(t){return t===Number.parseInt(String(t),10)&&t>=1&&t<=40}},errorCorrectionLevel:{type:String,validator:function(t){return n.includes(t)}},maskPattern:{type:Number,validator:function(t){return i.includes(t)}},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:function(t){return["dark","light"].every((function(e){return["string","undefined"].includes(typeof t[e])}))}},type:{type:String,validator:function(t){return o.includes(t)}},quality:{type:Number,validator:function(t){return t===Number.parseFloat(String(t))&&t>=0&&t<=1}},value:{type:[String,Array],required:!0,validator:function(t){return"string"==typeof t||t.every((function(t){var e=t.data,r=t.mode;return"string"==typeof e&&(null==r||a.includes(r))}))}}},data:function(){return{dataUrl:""}},watch:{$props:{deep:!0,immediate:!0,handler:"toDataURL"}},methods:{toDataURL:function(){var t=this,r=this.$props,n=r.quality,i=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}(r,["quality"]);return e.default.toDataURL(this.value,Object.assign(i,null==n||{renderOptions:{quality:n}})).then((function(e){return t.dataUrl=e}))}},render:function(){return this.$createElement("img",{domProps:r(r({},this.$attrs),{src:this.dataUrl})})}};exports.LEVELS=n,exports.MASK_PATTERNS=i,exports.MODES=a,exports.TYPES=o,exports.default=u;
***************************************************************************** */var a=["low","medium","quartile","high","L","M","Q","H"],u=[0,1,2,3,4,5,6,7],o=["alphanumeric","numeric","kanji","byte"],l=["image/png","image/jpeg","image/webp"],p={props:{version:{type:Number,validator:function(r){return r===Number.parseInt(String(r),10)&&r>=1&&r<=40}},errorCorrectionLevel:{type:String,validator:function(r){return a.includes(r)}},maskPattern:{type:Number,validator:function(r){return u.includes(r)}},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:function(r){return["dark","light"].every((function(t){return["string","undefined"].includes(typeof r[t])}))}},type:{type:String,validator:function(r){return l.includes(r)}},quality:{type:Number,validator:function(r){return r===Number.parseFloat(String(r))&&r>=0&&r<=1}},value:{type:[String,Array],required:!0,validator:function(r){return"string"==typeof r||r.every((function(r){var t=r.data,e=r.mode;return"string"==typeof t&&(null==e||o.includes(e))}))}}},data:function(){return{dataUrl:""}},watch:{$props:{deep:!0,immediate:!0,handler:function(){var r=this,t=this.$props,e=t.quality,i=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]])}return e}(t,["quality"]);return n.default.toDataURL(this.value,Object.assign(i,null==e||{renderOptions:{quality:e}})).then((function(t){return r.dataUrl=t}))}}},render:function(r){var e=t.h,n=i(i({},this.$attrs),{src:this.dataUrl});return r("img",e?n:{domProps:n})}};exports.LEVELS=a,exports.MASK_PATTERNS=u,exports.MODES=o,exports.TYPES=l,exports.default=p;
import QRCode from 'qrcode';
import { h } from 'vue';

@@ -99,20 +100,27 @@ /*! *****************************************************************************

immediate: true,
handler: 'toDataURL',
handler() {
const _a = this.$props, { quality } = _a, props = __rest(_a, ["quality"]);
return QRCode.toDataURL(this.value, Object.assign(props, quality == null || {
renderOptions: {
quality,
},
})).then(dataUrl => (this.dataUrl = dataUrl));
},
},
},
methods: {
toDataURL() {
const _a = this.$props, { quality } = _a, props = __rest(_a, ["quality"]);
return QRCode.toDataURL(this.value, Object.assign(props, quality == null || {
renderOptions: {
quality,
},
})).then(dataUrl => (this.dataUrl = dataUrl));
},
// ! hack, compatible with Vue2 and Vue3 at the same time
render(h$1) {
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, import/namespace
const vueH = h;
const imgProps = Object.assign(Object.assign({}, this.$attrs), { src: this.dataUrl });
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return
return h$1('img',
// @ts-expect-error
vueH
? imgProps
: {
domProps: imgProps,
});
},
render() {
return this.$createElement('img', {
domProps: Object.assign(Object.assign({}, this.$attrs), { src: this.dataUrl }),
});
},
};

@@ -119,0 +127,0 @@

@@ -1,2 +0,2 @@

import e from"qrcode";
import e from"qrcode";import{h as t}from"vue";
/*! *****************************************************************************

@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */const t=["low","medium","quartile","high","L","M","Q","H"],r=[0,1,2,3,4,5,6,7],a=["alphanumeric","numeric","kanji","byte"],i=["image/png","image/jpeg","image/webp"];var n={props:{version:{type:Number,validator:e=>e===Number.parseInt(String(e),10)&&e>=1&&e<=40},errorCorrectionLevel:{type:String,validator:e=>t.includes(e)},maskPattern:{type:Number,validator:e=>r.includes(e)},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:e=>["dark","light"].every((t=>["string","undefined"].includes(typeof e[t])))},type:{type:String,validator:e=>i.includes(e)},quality:{type:Number,validator:e=>e===Number.parseFloat(String(e))&&e>=0&&e<=1},value:{type:[String,Array],required:!0,validator:e=>"string"==typeof e||e.every((({data:e,mode:t})=>"string"==typeof e&&(null==t||a.includes(t))))}},data:()=>({dataUrl:""}),watch:{$props:{deep:!0,immediate:!0,handler:"toDataURL"}},methods:{toDataURL(){const t=this.$props,{quality:r}=t,a=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]])}return r}(t,["quality"]);return e.toDataURL(this.value,Object.assign(a,null==r||{renderOptions:{quality:r}})).then((e=>this.dataUrl=e))}},render(){return this.$createElement("img",{domProps:Object.assign(Object.assign({},this.$attrs),{src:this.dataUrl})})}};export default n;export{t as LEVELS,r as MASK_PATTERNS,a as MODES,i as TYPES};
***************************************************************************** */const r=["low","medium","quartile","high","L","M","Q","H"],a=[0,1,2,3,4,5,6,7],i=["alphanumeric","numeric","kanji","byte"],n=["image/png","image/jpeg","image/webp"];var o={props:{version:{type:Number,validator:e=>e===Number.parseInt(String(e),10)&&e>=1&&e<=40},errorCorrectionLevel:{type:String,validator:e=>r.includes(e)},maskPattern:{type:Number,validator:e=>a.includes(e)},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:e=>["dark","light"].every((t=>["string","undefined"].includes(typeof e[t])))},type:{type:String,validator:e=>n.includes(e)},quality:{type:Number,validator:e=>e===Number.parseFloat(String(e))&&e>=0&&e<=1},value:{type:[String,Array],required:!0,validator:e=>"string"==typeof e||e.every((({data:e,mode:t})=>"string"==typeof e&&(null==t||i.includes(t))))}},data:()=>({dataUrl:""}),watch:{$props:{deep:!0,immediate:!0,handler(){const t=this.$props,{quality:r}=t,a=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]])}return r}(t,["quality"]);return e.toDataURL(this.value,Object.assign(a,null==r||{renderOptions:{quality:r}})).then((e=>this.dataUrl=e))}}},render(e){const r=t,a=Object.assign(Object.assign({},this.$attrs),{src:this.dataUrl});return e("img",r?a:{domProps:a})}};export default o;export{r as LEVELS,a as MASK_PATTERNS,i as MODES,n as TYPES};
import QRCode from 'qrcode';
import { h } from 'vue';

@@ -123,21 +124,28 @@ /*! *****************************************************************************

immediate: true,
handler: 'toDataURL',
handler: function () {
var _this = this;
var _a = this.$props, quality = _a.quality, props = __rest(_a, ["quality"]);
return QRCode.toDataURL(this.value, Object.assign(props, quality == null || {
renderOptions: {
quality: quality,
},
})).then(function (dataUrl) { return (_this.dataUrl = dataUrl); });
},
},
},
methods: {
toDataURL: function () {
var _this = this;
var _a = this.$props, quality = _a.quality, props = __rest(_a, ["quality"]);
return QRCode.toDataURL(this.value, Object.assign(props, quality == null || {
renderOptions: {
quality: quality,
},
})).then(function (dataUrl) { return (_this.dataUrl = dataUrl); });
},
// ! hack, compatible with Vue2 and Vue3 at the same time
render: function (h$1) {
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, import/namespace
var vueH = h;
var imgProps = __assign(__assign({}, this.$attrs), { src: this.dataUrl });
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return
return h$1('img',
// @ts-expect-error
vueH
? imgProps
: {
domProps: imgProps,
});
},
render: function () {
return this.$createElement('img', {
domProps: __assign(__assign({}, this.$attrs), { src: this.dataUrl }),
});
},
};

@@ -144,0 +152,0 @@

@@ -1,2 +0,2 @@

import t from"qrcode";
import r from"qrcode";import{h as t}from"vue";
/*! *****************************************************************************

@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var r=function(){return(r=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var i in r=arguments[e])Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);return t}).apply(this,arguments)};var e=["low","medium","quartile","high","L","M","Q","H"],n=[0,1,2,3,4,5,6,7],i=["alphanumeric","numeric","kanji","byte"],a=["image/png","image/jpeg","image/webp"],o={props:{version:{type:Number,validator:function(t){return t===Number.parseInt(String(t),10)&&t>=1&&t<=40}},errorCorrectionLevel:{type:String,validator:function(t){return e.includes(t)}},maskPattern:{type:Number,validator:function(t){return n.includes(t)}},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:function(t){return["dark","light"].every((function(r){return["string","undefined"].includes(typeof t[r])}))}},type:{type:String,validator:function(t){return a.includes(t)}},quality:{type:Number,validator:function(t){return t===Number.parseFloat(String(t))&&t>=0&&t<=1}},value:{type:[String,Array],required:!0,validator:function(t){return"string"==typeof t||t.every((function(t){var r=t.data,e=t.mode;return"string"==typeof r&&(null==e||i.includes(e))}))}}},data:function(){return{dataUrl:""}},watch:{$props:{deep:!0,immediate:!0,handler:"toDataURL"}},methods:{toDataURL:function(){var r=this,e=this.$props,n=e.quality,i=function(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(e[n[i]]=t[n[i]])}return e}(e,["quality"]);return t.toDataURL(this.value,Object.assign(i,null==n||{renderOptions:{quality:n}})).then((function(t){return r.dataUrl=t}))}},render:function(){return this.$createElement("img",{domProps:r(r({},this.$attrs),{src:this.dataUrl})})}};export default o;export{e as LEVELS,n as MASK_PATTERNS,i as MODES,a as TYPES};
***************************************************************************** */var e=function(){return(e=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);return r}).apply(this,arguments)};var n=["low","medium","quartile","high","L","M","Q","H"],i=[0,1,2,3,4,5,6,7],a=["alphanumeric","numeric","kanji","byte"],o=["image/png","image/jpeg","image/webp"],u={props:{version:{type:Number,validator:function(r){return r===Number.parseInt(String(r),10)&&r>=1&&r<=40}},errorCorrectionLevel:{type:String,validator:function(r){return n.includes(r)}},maskPattern:{type:Number,validator:function(r){return i.includes(r)}},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:function(r){return["dark","light"].every((function(t){return["string","undefined"].includes(typeof r[t])}))}},type:{type:String,validator:function(r){return o.includes(r)}},quality:{type:Number,validator:function(r){return r===Number.parseFloat(String(r))&&r>=0&&r<=1}},value:{type:[String,Array],required:!0,validator:function(r){return"string"==typeof r||r.every((function(r){var t=r.data,e=r.mode;return"string"==typeof t&&(null==e||a.includes(e))}))}}},data:function(){return{dataUrl:""}},watch:{$props:{deep:!0,immediate:!0,handler:function(){var t=this,e=this.$props,n=e.quality,i=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]])}return e}(e,["quality"]);return r.toDataURL(this.value,Object.assign(i,null==n||{renderOptions:{quality:n}})).then((function(r){return t.dataUrl=r}))}}},render:function(r){var n=t,i=e(e({},this.$attrs),{src:this.dataUrl});return r("img",n?i:{domProps:i})}};export default u;export{n as LEVELS,i as MASK_PATTERNS,a as MODES,o as TYPES};
import { QRCodeSegment as _QRCodeSegment, QRCodeToDataURLOptions } from 'qrcode';
import Vue, { ComponentOptions } from 'vue';
import * as Vue from 'vue';
export declare const LEVELS: readonly ["low", "medium", "quartile", "high", "L", "M", "Q", "H"];

@@ -18,4 +18,4 @@ export declare const MASK_PATTERNS: readonly [0, 1, 2, 3, 4, 5, 6, 7];

};
declare const _default: ComponentOptions<Vue, import("vue/types/options").DefaultData<Vue>, import("vue/types/options").DefaultMethods<Vue>, import("vue/types/options").DefaultComputed, import("vue/types/options").PropsDefinition<Record<string, any>>, Record<string, any>>;
declare const _default: Vue.ComponentOptions<import("vue/types/umd"), import("vue/types/options").DefaultData<import("vue/types/umd")>, import("vue/types/options").DefaultMethods<import("vue/types/umd")>, import("vue/types/options").DefaultComputed, import("vue/types/options").PropsDefinition<Record<string, any>>, Record<string, any>>;
export default _default;
//# sourceMappingURL=index.d.ts.map
import { __assign, __rest } from "tslib";
import QRCode from 'qrcode';
import * as Vue from 'vue';
export var LEVELS = [

@@ -85,22 +86,29 @@ 'low',

immediate: true,
handler: 'toDataURL',
handler: function () {
var _this = this;
var _a = this.$props, quality = _a.quality, props = __rest(_a, ["quality"]);
return QRCode.toDataURL(this.value, Object.assign(props, quality == null || {
renderOptions: {
quality: quality,
},
})).then(function (dataUrl) { return (_this.dataUrl = dataUrl); });
},
},
},
methods: {
toDataURL: function () {
var _this = this;
var _a = this.$props, quality = _a.quality, props = __rest(_a, ["quality"]);
return QRCode.toDataURL(this.value, Object.assign(props, quality == null || {
renderOptions: {
quality: quality,
},
})).then(function (dataUrl) { return (_this.dataUrl = dataUrl); });
},
// ! hack, compatible with Vue2 and Vue3 at the same time
render: function (h) {
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, import/namespace
var vueH = Vue.h;
var imgProps = __assign(__assign({}, this.$attrs), { src: this.dataUrl });
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return
return h('img',
// @ts-expect-error
vueH
? imgProps
: {
domProps: imgProps,
});
},
render: function () {
return this.$createElement('img', {
domProps: __assign(__assign({}, this.$attrs), { src: this.dataUrl }),
});
},
};
//# sourceMappingURL=index.js.map
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('qrcode')) :
typeof define === 'function' && define.amd ? define(['exports', 'qrcode'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.VueQrcode = {}, global.QRCode));
}(this, (function (exports, QRCode) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('qrcode'), require('vue')) :
typeof define === 'function' && define.amd ? define(['exports', 'qrcode', 'vue'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.VueQrcode = {}, global.QRCode, global.Vue));
}(this, (function (exports, QRCode, Vue) { 'use strict';

@@ -131,21 +131,28 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

immediate: true,
handler: 'toDataURL',
handler: function () {
var _this = this;
var _a = this.$props, quality = _a.quality, props = __rest(_a, ["quality"]);
return QRCode__default['default'].toDataURL(this.value, Object.assign(props, quality == null || {
renderOptions: {
quality: quality,
},
})).then(function (dataUrl) { return (_this.dataUrl = dataUrl); });
},
},
},
methods: {
toDataURL: function () {
var _this = this;
var _a = this.$props, quality = _a.quality, props = __rest(_a, ["quality"]);
return QRCode__default['default'].toDataURL(this.value, Object.assign(props, quality == null || {
renderOptions: {
quality: quality,
},
})).then(function (dataUrl) { return (_this.dataUrl = dataUrl); });
},
// ! hack, compatible with Vue2 and Vue3 at the same time
render: function (h) {
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, import/namespace
var vueH = Vue.h;
var imgProps = __assign(__assign({}, this.$attrs), { src: this.dataUrl });
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return
return h('img',
// @ts-expect-error
vueH
? imgProps
: {
domProps: imgProps,
});
},
render: function () {
return this.$createElement('img', {
domProps: __assign(__assign({}, this.$attrs), { src: this.dataUrl }),
});
},
};

@@ -152,0 +159,0 @@

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("qrcode")):"function"==typeof define&&define.amd?define(["exports","qrcode"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueQrcode={},e.QRCode)}(this,(function(e,t){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(t),i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("qrcode"),require("vue")):"function"==typeof define&&define.amd?define(["exports","qrcode","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueQrcode={},e.QRCode,e.Vue)}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(t),o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};
/*! *****************************************************************************

@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var o=["low","medium","quartile","high","L","M","Q","H"],a=[0,1,2,3,4,5,6,7],u=["alphanumeric","numeric","kanji","byte"],l=["image/png","image/jpeg","image/webp"],c={props:{version:{type:Number,validator:function(e){return e===Number.parseInt(String(e),10)&&e>=1&&e<=40}},errorCorrectionLevel:{type:String,validator:function(e){return o.includes(e)}},maskPattern:{type:Number,validator:function(e){return a.includes(e)}},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:function(e){return["dark","light"].every((function(t){return["string","undefined"].includes(typeof e[t])}))}},type:{type:String,validator:function(e){return l.includes(e)}},quality:{type:Number,validator:function(e){return e===Number.parseFloat(String(e))&&e>=0&&e<=1}},value:{type:[String,Array],required:!0,validator:function(e){return"string"==typeof e||e.every((function(e){var t=e.data,r=e.mode;return"string"==typeof t&&(null==r||u.includes(r))}))}}},data:function(){return{dataUrl:""}},watch:{$props:{deep:!0,immediate:!0,handler:"toDataURL"}},methods:{toDataURL:function(){var e=this,t=this.$props,r=t.quality,i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(t,["quality"]);return n.default.toDataURL(this.value,Object.assign(i,null==r||{renderOptions:{quality:r}})).then((function(t){return e.dataUrl=t}))}},render:function(){return this.$createElement("img",{domProps:i(i({},this.$attrs),{src:this.dataUrl})})}};e.LEVELS=o,e.MASK_PATTERNS=a,e.MODES=u,e.TYPES=l,e.default=c,Object.defineProperty(e,"__esModule",{value:!0})}));
***************************************************************************** */var u=["low","medium","quartile","high","L","M","Q","H"],a=[0,1,2,3,4,5,6,7],l=["alphanumeric","numeric","kanji","byte"],c=["image/png","image/jpeg","image/webp"],d={props:{version:{type:Number,validator:function(e){return e===Number.parseInt(String(e),10)&&e>=1&&e<=40}},errorCorrectionLevel:{type:String,validator:function(e){return u.includes(e)}},maskPattern:{type:Number,validator:function(e){return a.includes(e)}},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:function(e){return["dark","light"].every((function(t){return["string","undefined"].includes(typeof e[t])}))}},type:{type:String,validator:function(e){return c.includes(e)}},quality:{type:Number,validator:function(e){return e===Number.parseFloat(String(e))&&e>=0&&e<=1}},value:{type:[String,Array],required:!0,validator:function(e){return"string"==typeof e||e.every((function(e){var t=e.data,r=e.mode;return"string"==typeof t&&(null==r||l.includes(r))}))}}},data:function(){return{dataUrl:""}},watch:{$props:{deep:!0,immediate:!0,handler:function(){var e=this,t=this.$props,r=t.quality,n=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(t,["quality"]);return i.default.toDataURL(this.value,Object.assign(n,null==r||{renderOptions:{quality:r}})).then((function(t){return e.dataUrl=t}))}}},render:function(e){var t=r.h,n=o(o({},this.$attrs),{src:this.dataUrl});return e("img",t?n:{domProps:n})}};e.LEVELS=u,e.MASK_PATTERNS=a,e.MODES=l,e.TYPES=c,e.default=d,Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "vue-qrcode",
"version": "0.3.4",
"version": "0.3.5-beta.0+cb3e1ea",
"description": "🤳 A Vue component for QR code generation with `qrcode`",

@@ -31,3 +31,3 @@ "repository": "git@github.com:rx-ts/vue.git",

"esm5": "lib",
"gitHead": "0273a80759ff1ee79243a9349fda101849fa7969"
"gitHead": "cb3e1ea08bac87f1ea12b00fc06a8ecfa34c8cca"
}

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

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