vue-qrcode
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -6,2 +6,13 @@ # Change Log | ||
## 0.3.4 (2020-11-16) | ||
### Bug Fixes | ||
* bump all deps, reference types correctly - fix [#102](https://github.com/rx-ts/vue/issues/102) ([1db0d36](https://github.com/rx-ts/vue/commit/1db0d36300263db25358f80c25e3598093c7e445)) | ||
## 0.3.3 (2020-01-30) | ||
@@ -8,0 +19,0 @@ |
@@ -5,19 +5,21 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var QRCode = require('qrcode'); | ||
var QRCode = _interopDefault(require('qrcode')); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var QRCode__default = /*#__PURE__*/_interopDefaultLegacy(QRCode); | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Copyright (c) Microsoft Corporation. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */ | ||
@@ -68,3 +70,3 @@ | ||
validator: function (version) { | ||
return version === parseInt(String(version), 10) && | ||
return version === Number.parseInt(String(version), 10) && | ||
version >= 1 && | ||
@@ -103,3 +105,5 @@ version <= MAX_QR_VERSION; | ||
validator: function (quality) { | ||
return quality === parseFloat(String(quality)) && quality >= 0 && quality <= 1; | ||
return quality === Number.parseFloat(String(quality)) && | ||
quality >= 0 && | ||
quality <= 1; | ||
}, | ||
@@ -137,3 +141,3 @@ }, | ||
var _a = this.$props, quality = _a.quality, props = __rest(_a, ["quality"]); | ||
return QRCode.toDataURL(this.value, Object.assign(props, quality == null || { | ||
return QRCode__default['default'].toDataURL(this.value, Object.assign(props, quality == null || { | ||
renderOptions: { | ||
@@ -140,0 +144,0 @@ quality: quality, |
@@ -1,15 +0,15 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=(t=require("qrcode"))&&"object"==typeof t&&"default"in t?t.default:t,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";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)}; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Copyright (c) Microsoft Corporation. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */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===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===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.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; | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
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; |
import QRCode from 'qrcode'; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Copyright (c) Microsoft Corporation. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */ | ||
@@ -49,3 +49,3 @@ | ||
type: Number, | ||
validator: (version) => version === parseInt(String(version), 10) && | ||
validator: (version) => version === Number.parseInt(String(version), 10) && | ||
version >= 1 && | ||
@@ -76,3 +76,5 @@ version <= MAX_QR_VERSION, | ||
type: Number, | ||
validator: (quality) => quality === parseFloat(String(quality)) && quality >= 0 && quality <= 1, | ||
validator: (quality) => quality === Number.parseFloat(String(quality)) && | ||
quality >= 0 && | ||
quality <= 1, | ||
}, | ||
@@ -79,0 +81,0 @@ value: { |
@@ -1,15 +0,15 @@ | ||
import t from"qrcode"; | ||
import e from"qrcode"; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Copyright (c) Microsoft Corporation. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */const e=["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:t=>t===parseInt(String(t),10)&&t>=1&&t<=40},errorCorrectionLevel:{type:String,validator:t=>e.includes(t)},maskPattern:{type:Number,validator:t=>r.includes(t)},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:t=>["dark","light"].every(e=>["string","undefined"].includes(typeof t[e]))},type:{type:String,validator:t=>i.includes(t)},quality:{type:Number,validator:t=>t===parseFloat(String(t))&&t>=0&&t<=1},value:{type:[String,Array],required:!0,validator:t=>"string"==typeof t||t.every(({data:t,mode:e})=>"string"==typeof t&&(null==e||a.includes(e)))}},data:()=>({dataUrl:""}),watch:{$props:{deep:!0,immediate:!0,handler:"toDataURL"}},methods:{toDataURL(){const e=this.$props,{quality:r}=e,a=function(t,e){var r={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(r[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(t);i<a.length;i++)e.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(t,a[i])&&(r[a[i]]=t[a[i]])}return r}(e,["quality"]);return t.toDataURL(this.value,Object.assign(a,null==r||{renderOptions:{quality:r}})).then(t=>this.dataUrl=t)}},render(){return this.$createElement("img",{domProps:Object.assign(Object.assign({},this.$attrs),{src:this.dataUrl})})}};export default n;export{e as LEVELS,r as MASK_PATTERNS,a as MODES,i as TYPES}; | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
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}; |
import QRCode from 'qrcode'; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Copyright (c) Microsoft Corporation. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */ | ||
@@ -61,3 +61,3 @@ | ||
validator: function (version) { | ||
return version === parseInt(String(version), 10) && | ||
return version === Number.parseInt(String(version), 10) && | ||
version >= 1 && | ||
@@ -96,3 +96,5 @@ version <= MAX_QR_VERSION; | ||
validator: function (quality) { | ||
return quality === parseFloat(String(quality)) && quality >= 0 && quality <= 1; | ||
return quality === Number.parseFloat(String(quality)) && | ||
quality >= 0 && | ||
quality <= 1; | ||
}, | ||
@@ -99,0 +101,0 @@ }, |
import t from"qrcode"; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Copyright (c) Microsoft Corporation. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */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===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===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}; | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
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}; |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('qrcode')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'qrcode'], factory) : | ||
(global = global || self, factory(global.VueQrcode = {}, global.QRCode)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.VueQrcode = {}, global.QRCode)); | ||
}(this, (function (exports, QRCode) { 'use strict'; | ||
QRCode = QRCode && QRCode.hasOwnProperty('default') ? QRCode['default'] : QRCode; | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var QRCode__default = /*#__PURE__*/_interopDefaultLegacy(QRCode); | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Copyright (c) Microsoft Corporation. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */ | ||
@@ -67,3 +69,3 @@ | ||
validator: function (version) { | ||
return version === parseInt(String(version), 10) && | ||
return version === Number.parseInt(String(version), 10) && | ||
version >= 1 && | ||
@@ -102,3 +104,5 @@ version <= MAX_QR_VERSION; | ||
validator: function (quality) { | ||
return quality === parseFloat(String(quality)) && quality >= 0 && quality <= 1; | ||
return quality === Number.parseFloat(String(quality)) && | ||
quality >= 0 && | ||
quality <= 1; | ||
}, | ||
@@ -136,3 +140,3 @@ }, | ||
var _a = this.$props, quality = _a.quality, props = __rest(_a, ["quality"]); | ||
return QRCode.toDataURL(this.value, Object.assign(props, quality == null || { | ||
return QRCode__default['default'].toDataURL(this.value, Object.assign(props, quality == null || { | ||
renderOptions: { | ||
@@ -139,0 +143,0 @@ quality: quality, |
@@ -1,16 +0,15 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("qrcode")):"function"==typeof define&&define.amd?define(["exports","qrcode"],t):t((e=e||self).VueQrcode={},e.QRCode)}(this,(function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t; | ||
!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)}; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Copyright (c) Microsoft Corporation. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
var r=function(){return(r=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)};var n=["low","medium","quartile","high","L","M","Q","H"],i=[0,1,2,3,4,5,6,7],o=["alphanumeric","numeric","kanji","byte"],a=["image/png","image/jpeg","image/webp"],u={props:{version:{type:Number,validator:function(e){return e===parseInt(String(e),10)&&e>=1&&e<=40}},errorCorrectionLevel:{type:String,validator:function(e){return n.includes(e)}},maskPattern:{type:Number,validator:function(e){return i.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 a.includes(e)}},quality:{type:Number,validator:function(e){return e===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||o.includes(r))}))}}},data:function(){return{dataUrl:""}},watch:{$props:{deep:!0,immediate:!0,handler:"toDataURL"}},methods:{toDataURL:function(){var e=this,r=this.$props,n=r.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}(r,["quality"]);return t.toDataURL(this.value,Object.assign(i,null==n||{renderOptions:{quality:n}})).then((function(t){return e.dataUrl=t}))}},render:function(){return this.$createElement("img",{domProps:r(r({},this.$attrs),{src:this.dataUrl})})}};e.LEVELS=n,e.MASK_PATTERNS=i,e.MODES=o,e.TYPES=a,e.default=u,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
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})})); |
{ | ||
"name": "vue-qrcode", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "🤳 A Vue component for QR code generation with `qrcode`", | ||
@@ -11,12 +11,10 @@ "repository": "git@github.com:rx-ts/vue.git", | ||
"module": "lib", | ||
"es2015": "lib/es2015", | ||
"fesm5": "lib/esm", | ||
"jsdelivr": "lib/umd", | ||
"unpkg": "lib/umd", | ||
"es2015": "lib/es2015", | ||
"esm5": "lib", | ||
"fesm5": "lib/esm", | ||
"types": "lib", | ||
"files": [ | ||
"lib", | ||
"src", | ||
"!lib/*.tsbuildinfo" | ||
"!lib/*.tsbuildinfo", | ||
"lib" | ||
], | ||
@@ -33,3 +31,4 @@ "keywords": [ | ||
"sideEffects": false, | ||
"gitHead": "320a78520f235eb8c1a1853b57bb51489f273c11" | ||
"esm5": "lib", | ||
"gitHead": "0273a80759ff1ee79243a9349fda101849fa7969" | ||
} |
@@ -48,3 +48,3 @@ # VueQrcode | ||
| `quality` | `number`(0-1) | `0.92` | | ||
| `value` | `string | Array<{ data: string; mode?: string }>` | N/A | | ||
| `value` | `string | Array<{ data: string; mode?: string }>` | N/A | | ||
@@ -51,0 +51,0 @@ ## Changelog |
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
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
186173
0
752