vue-filepond
Advanced tools
Comparing version 7.0.3 to 7.0.4
/*! | ||
* vue-filepond v7.0.3 | ||
* vue-filepond v7.0.4 | ||
* A handy FilePond adapter component for Vue | ||
* | ||
* Copyright (c) 2022 PQINA | ||
* Copyright (c) 2023 PQINA | ||
* https://pqina.nl/filepond | ||
@@ -128,2 +128,4 @@ * | ||
return this.$watch(key, (next) => { | ||
// if pond is not initialized, don't update | ||
if (!this._pond) return; | ||
this._pond[key] = next; | ||
@@ -130,0 +132,0 @@ }); |
/*! | ||
* vue-filepond v7.0.3 | ||
* vue-filepond v7.0.4 | ||
* A handy FilePond adapter component for Vue | ||
* | ||
* Copyright (c) 2022 PQINA | ||
* Copyright (c) 2023 PQINA | ||
* https://pqina.nl/filepond | ||
@@ -137,2 +137,4 @@ * | ||
return _this.$watch(key, function (next) { | ||
// if pond is not initialized, don't update | ||
if (!_this._pond) return; | ||
_this._pond[key] = next; | ||
@@ -139,0 +141,0 @@ }); |
/*! | ||
* vue-filepond v7.0.3 | ||
* vue-filepond v7.0.4 | ||
* A handy FilePond adapter component for Vue | ||
* | ||
* Copyright (c) 2022 PQINA | ||
* Copyright (c) 2023 PQINA | ||
* https://pqina.nl/filepond | ||
@@ -10,2 +10,2 @@ * | ||
*/ | ||
!function(global,factory){if("function"==typeof define&&define.amd)define("vueFilePond",["exports","vue","filepond"],factory);else if("undefined"!=typeof exports)factory(exports,require("vue"),require("filepond"));else{var mod_exports={};factory(mod_exports,global.Vue,global.FilePond),global.vueFilePond=mod_exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,function(_exports,_vue,_filepond){"use strict";function _slicedToArray(arr,i){return function(arr){if(Array.isArray(arr))return arr}(arr)||function(arr,i){if(!(Symbol.iterator in Object(arr)||"[object Arguments]"===Object.prototype.toString.call(arr)))return;var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=_exports.setOptions=void 0;var filteredComponentMethods=["setOptions","on","off","onOnce","appendTo","insertAfter","insertBefore","isAttachedTo","replaceElement","restoreElement","destroy"],isSupported=(0,_filepond.supported)(),props={},events=[],instances=[],globalOptions={};_exports.setOptions=function(options){globalOptions=Object.assign(globalOptions,options),instances.forEach(function(instance){instance.setOptions(globalOptions)})};_exports.default=function(){for(var prop in _filepond.registerPlugin.apply(void 0,arguments),events.length=0,_filepond.OptionTypes)if(/^on/.test(prop))events.push(prop);else{var valid_types=[String,(type=_filepond.OptionTypes[prop],{string:String,boolean:Boolean,array:Array,function:Function,int:Number,serverapi:Object,object:Object}[type])];"labelFileProcessingError"==prop&&valid_types.push(Function),props[prop]={type:valid_types,default:void 0}}var type;return{name:"FilePond",props:props,render:function(){var attributes=Object.entries({id:this.id,name:this.name,type:"file",class:this.className,required:this.required,multiple:this.allowMultiple,accept:this.acceptedFileTypes,capture:this.captureMethod}).reduce(function(attributes,_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],value=_ref2[1];return void 0!==value&&(attributes[key]=value),attributes},{});return(0,_vue.h)("div",{class:{"filepond--wrapper":!0}},[(0,_vue.h)("input",attributes)])},created:function(){var _this=this;this.watchers=Object.keys(props).map(function(key){return _this.$watch(key,function(next){_this._pond[key]=next})})},mounted:function(){var _this2=this;if(isSupported){this._element=this.$el.querySelector("input");var options=events.reduce(function(obj,value){return obj[value]=function(){_this2.$emit("input",_this2._pond?_this2._pond.getFiles():[]);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];_this2.$emit.apply(_this2,[value.substr(2)].concat(args))},obj},{}),passedProps={};Object.keys(props).forEach(function(key){void 0!==_this2[key]&&(passedProps[key]=_this2[key])}),this._pond=(0,_filepond.create)(this._element,Object.assign({},globalOptions,options,passedProps)),Object.keys(this._pond).filter(function(key){return!filteredComponentMethods.includes(key)}).forEach(function(key){_this2[key]=_this2._pond[key]}),instances.push(this._pond)}},beforeUnmount:function(){var _this3=this,detached=this.$options.detached;if(this.$el.offsetParent){new MutationObserver(function(mutations,observer){var removedNode=((mutations[0]||{}).removedNodes||[])[0];removedNode&&removedNode.contains(_this3.$el)&&(observer.disconnect(),detached.call(_this3))}).observe(document.documentElement,{childList:!0,subtree:!0})}else detached.call(this)},detached:function(){if(this.watchers.forEach(function(unwatch){return unwatch()}),this._pond){this._pond.destroy();var index=instances.indexOf(this._pond);0<=index&&instances.splice(index,1),this._pond=null}}}}}); | ||
!function(global,factory){if("function"==typeof define&&define.amd)define("vueFilePond",["exports","vue","filepond"],factory);else if("undefined"!=typeof exports)factory(exports,require("vue"),require("filepond"));else{var mod_exports={};factory(mod_exports,global.Vue,global.FilePond),global.vueFilePond=mod_exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,function(_exports,_vue,_filepond){"use strict";function _slicedToArray(arr,i){return function(arr){if(Array.isArray(arr))return arr}(arr)||function(arr,i){if(!(Symbol.iterator in Object(arr)||"[object Arguments]"===Object.prototype.toString.call(arr)))return;var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=_exports.setOptions=void 0;var filteredComponentMethods=["setOptions","on","off","onOnce","appendTo","insertAfter","insertBefore","isAttachedTo","replaceElement","restoreElement","destroy"],isSupported=(0,_filepond.supported)(),props={},events=[],instances=[],globalOptions={};_exports.setOptions=function(options){globalOptions=Object.assign(globalOptions,options),instances.forEach(function(instance){instance.setOptions(globalOptions)})};_exports.default=function(){for(var prop in _filepond.registerPlugin.apply(void 0,arguments),events.length=0,_filepond.OptionTypes)if(/^on/.test(prop))events.push(prop);else{var valid_types=[String,(type=_filepond.OptionTypes[prop],{string:String,boolean:Boolean,array:Array,function:Function,int:Number,serverapi:Object,object:Object}[type])];"labelFileProcessingError"==prop&&valid_types.push(Function),props[prop]={type:valid_types,default:void 0}}var type;return{name:"FilePond",props:props,render:function(){var attributes=Object.entries({id:this.id,name:this.name,type:"file",class:this.className,required:this.required,multiple:this.allowMultiple,accept:this.acceptedFileTypes,capture:this.captureMethod}).reduce(function(attributes,_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],value=_ref2[1];return void 0!==value&&(attributes[key]=value),attributes},{});return(0,_vue.h)("div",{class:{"filepond--wrapper":!0}},[(0,_vue.h)("input",attributes)])},created:function(){var _this=this;this.watchers=Object.keys(props).map(function(key){return _this.$watch(key,function(next){_this._pond&&(_this._pond[key]=next)})})},mounted:function(){var _this2=this;if(isSupported){this._element=this.$el.querySelector("input");var options=events.reduce(function(obj,value){return obj[value]=function(){_this2.$emit("input",_this2._pond?_this2._pond.getFiles():[]);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];_this2.$emit.apply(_this2,[value.substr(2)].concat(args))},obj},{}),passedProps={};Object.keys(props).forEach(function(key){void 0!==_this2[key]&&(passedProps[key]=_this2[key])}),this._pond=(0,_filepond.create)(this._element,Object.assign({},globalOptions,options,passedProps)),Object.keys(this._pond).filter(function(key){return!filteredComponentMethods.includes(key)}).forEach(function(key){_this2[key]=_this2._pond[key]}),instances.push(this._pond)}},beforeUnmount:function(){var _this3=this,detached=this.$options.detached;if(this.$el.offsetParent){new MutationObserver(function(mutations,observer){var removedNode=((mutations[0]||{}).removedNodes||[])[0];removedNode&&removedNode.contains(_this3.$el)&&(observer.disconnect(),detached.call(_this3))}).observe(document.documentElement,{childList:!0,subtree:!0})}else detached.call(this)},detached:function(){if(this.watchers.forEach(function(unwatch){return unwatch()}),this._pond){this._pond.destroy();var index=instances.indexOf(this._pond);0<=index&&instances.splice(index,1),this._pond=null}}}}}); |
{ | ||
"name": "vue-filepond", | ||
"version": "7.0.3", | ||
"version": "7.0.4", | ||
"description": "A handy FilePond adapter component for Vue", | ||
@@ -5,0 +5,0 @@ "homepage": "https://pqina.nl/filepond", |
@@ -31,1 +31,3 @@ // TypeScript Version: 3.6 | ||
export default VueFilePond; | ||
export const setOptions: (options: FilePondOptionProps) => void; |
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
26781
407