@formvuelate/plugin-vee-validate
Advanced tools
Comparing version 2.2.0 to 2.2.1
/** | ||
* @formvuelate/plugin-vee-validate v2.2.0 | ||
* @formvuelate/plugin-vee-validate v2.2.1 | ||
* (c) 2021 Abdelrahman Awad <logaretm1@gmail.com> | ||
@@ -124,3 +124,3 @@ * @license MIT | ||
modelValue: { | ||
type: [String, Number], | ||
type: null, | ||
default: undefined | ||
@@ -127,0 +127,0 @@ }, |
/** | ||
* @formvuelate/plugin-vee-validate v2.2.0 | ||
* @formvuelate/plugin-vee-validate v2.2.1 | ||
* (c) 2021 Abdelrahman Awad <logaretm1@gmail.com> | ||
@@ -120,3 +120,3 @@ * @license MIT | ||
modelValue: { | ||
type: [String, Number], | ||
type: null, | ||
default: undefined | ||
@@ -123,0 +123,0 @@ }, |
/** | ||
* @formvuelate/plugin-vee-validate v2.2.0 | ||
* @formvuelate/plugin-vee-validate v2.2.1 | ||
* (c) 2021 Abdelrahman Awad <logaretm1@gmail.com> | ||
@@ -123,3 +123,3 @@ * @license MIT | ||
modelValue: { | ||
type: [String, Number], | ||
type: null, | ||
default: undefined | ||
@@ -126,0 +126,0 @@ }, |
/** | ||
* @formvuelate/plugin-vee-validate v2.2.0 | ||
* @formvuelate/plugin-vee-validate v2.2.1 | ||
* (c) 2021 Abdelrahman Awad <logaretm1@gmail.com> | ||
@@ -7,2 +7,2 @@ * @license MIT | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("vee-validate")):"function"==typeof define&&define.amd?define(["exports","vue","vee-validate"],t):t(e["@formvuelate/pluginVeeValidate"]={},e.Vue,e.VeeValidate)}(this,function(e,y,V){"use strict";var l=function(e,t){return e.map(function(e){return e.map(function(e){return t(e)})})};function t(e){return{validation:e}}var m="vee-validate-fvl-form-context";var a=new Map;function v(b){var j=b.component;if(a.has(j))return a.get(j);var e=y.markRaw({name:"withFieldWrapper",props:{modelValue:{type:[String,Number],default:void 0},validations:{type:[String,Object,Function],default:void 0},_veeValidateConfig:{type:Object,required:!0}},setup:function(e,t){var a=t.attrs,n=e._veeValidateConfig,r=n.path,i=n.mapProps,o=y.toRefs(e),u=o.validations,s=o.modelValue,c=s?s.value:void 0,d=r?r+"."+a.model:a.model,l=V.useField(d,u,{initialValue:c}),m=l.value,v=l.errorMessage,f=l.meta,p=l.setTouched,h=l.errors;s&&y.watch(s,function(e){m.value=e});var g=y.resolveDynamicComponent(j);return function(){return y.h(g,Object.assign({},e,a,i({errorMessage:y.unref(v),errors:y.unref(h),meta:f,setTouched:p},b)))}}});return a.set(j,e),e}e.mapElementsInSchema=l,e.default=function(e){var d=e&&e.mapProps||t;return function(e){var t=e.parsedSchema,a=e.formBinds,n=y.getCurrentInstance().attrs,r=y.inject(m,void 0);r||(r=V.useForm({validationSchema:n["validation-schema"]||n.validationSchema,initialErrors:n["initial-errors"]||n.initialErrors,initialTouched:n["initial-touched"]||n.initialTouched}),y.provide(m,r));var i=r.handleSubmit;function o(t,a){if(void 0===a&&(a=""),t.schema){a=a?a+"."+t.model:t.model;var e=Array.isArray(t.schema)?t.schema:Object.keys(t.schema).map(function(e){return Object.assign({},{model:e},t.schema[e])});return Object.assign({},t,{schema:e.map(function(e){return o(e,a)})})}return Object.assign({},t,{_veeValidateConfig:{mapProps:d,path:a},component:v(t)})}var u=y.computed(function(){return l(t.value,o)}),s=a.value.onSubmit,c=i(function(e,t){var a=t.evt;s(a)});return Object.assign({},e,{formBinds:y.computed(function(){return Object.assign({},e.formBinds.value,{onSubmit:c})}),parsedSchema:u})}},e.withField=v,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("vee-validate")):"function"==typeof define&&define.amd?define(["exports","vue","vee-validate"],t):t(e["@formvuelate/pluginVeeValidate"]={},e.Vue,e.VeeValidate)}(this,function(e,y,V){"use strict";var l=function(e,t){return e.map(function(e){return e.map(function(e){return t(e)})})};function t(e){return{validation:e}}var m="vee-validate-fvl-form-context";var a=new Map;function v(b){var j=b.component;if(a.has(j))return a.get(j);var e=y.markRaw({name:"withFieldWrapper",props:{modelValue:{type:null,default:void 0},validations:{type:[String,Object,Function],default:void 0},_veeValidateConfig:{type:Object,required:!0}},setup:function(e,t){var a=t.attrs,n=e._veeValidateConfig,r=n.path,i=n.mapProps,o=y.toRefs(e),u=o.validations,s=o.modelValue,c=s?s.value:void 0,d=r?r+"."+a.model:a.model,l=V.useField(d,u,{initialValue:c}),m=l.value,v=l.errorMessage,f=l.meta,p=l.setTouched,h=l.errors;s&&y.watch(s,function(e){m.value=e});var g=y.resolveDynamicComponent(j);return function(){return y.h(g,Object.assign({},e,a,i({errorMessage:y.unref(v),errors:y.unref(h),meta:f,setTouched:p},b)))}}});return a.set(j,e),e}e.mapElementsInSchema=l,e.default=function(e){var d=e&&e.mapProps||t;return function(e){var t=e.parsedSchema,a=e.formBinds,n=y.getCurrentInstance().attrs,r=y.inject(m,void 0);r||(r=V.useForm({validationSchema:n["validation-schema"]||n.validationSchema,initialErrors:n["initial-errors"]||n.initialErrors,initialTouched:n["initial-touched"]||n.initialTouched}),y.provide(m,r));var i=r.handleSubmit;function o(t,a){if(void 0===a&&(a=""),t.schema){a=a?a+"."+t.model:t.model;var e=Array.isArray(t.schema)?t.schema:Object.keys(t.schema).map(function(e){return Object.assign({},{model:e},t.schema[e])});return Object.assign({},t,{schema:e.map(function(e){return o(e,a)})})}return Object.assign({},t,{_veeValidateConfig:{mapProps:d,path:a},component:v(t)})}var u=y.computed(function(){return l(t.value,o)}),s=a.value.onSubmit,c=i(function(e,t){var a=t.evt;s(a)});return Object.assign({},e,{formBinds:y.computed(function(){return Object.assign({},e.formBinds.value,{onSubmit:c})}),parsedSchema:u})}},e.withField=v,Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "@formvuelate/plugin-vee-validate", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "FormVueLate Vee-validate plugin", | ||
@@ -5,0 +5,0 @@ "main": "dist/formvuelate-plugin-vee-validate.cjs.js", |
@@ -118,3 +118,3 @@ import { toRefs, h, computed, markRaw, watch, getCurrentInstance, unref, resolveDynamicComponent, inject, provide } from 'vue' | ||
modelValue: { | ||
type: [String, Number], | ||
type: null, | ||
default: undefined | ||
@@ -121,0 +121,0 @@ }, |
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
27382