From cfb684cd350e42fc976d039015e4e88c3f302d4c Mon Sep 17 00:00:00 2001 From: David Higgins Date: Wed, 3 Oct 2018 09:35:57 -0400 Subject: [PATCH] v2.3.1 --- CHANGELOG.md | 7 + bower.json | 2 +- dist/vfg-core.css | 2 +- dist/vfg-core.js | 4 +- dist/vfg.css | 2 +- dist/vfg.js | 4 +- package-lock.json | 6772 ++++++++++++++++++++++----------------------- package.json | 2 +- 8 files changed, 3399 insertions(+), 3396 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e9919de..5b043a56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ + +## 2.3.0 (2018-10-03) + +* Use lodash-webpack-plugin for even better size +* Added required attribute to textarea + + ## 2.3.0 (2018-09-19) diff --git a/bower.json b/bower.json index 471b73c4..f8d07381 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "vue-form-generator", - "version": "2.3.0", + "version": "2.3.1", "homepage": "https://github.com/vue-generators/vue-form-generator/", "authors": [ "Icebob" diff --git a/dist/vfg-core.css b/dist/vfg-core.css index 2a35f34f..493c9dce 100644 --- a/dist/vfg-core.css +++ b/dist/vfg-core.css @@ -1,5 +1,5 @@ /** - * vue-form-generator v2.3.0 + * vue-form-generator v2.3.1 * https://github.com/vue-generators/vue-form-generator/ * Released under the MIT License. */ diff --git a/dist/vfg-core.js b/dist/vfg-core.js index fc016e5a..012dcb5c 100644 --- a/dist/vfg-core.js +++ b/dist/vfg-core.js @@ -1,7 +1,7 @@ /** - * vue-form-generator v2.3.0 + * vue-form-generator v2.3.1 * https://github.com/vue-generators/vue-form-generator/ * Released under the MIT License. */ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.VueFormGenerator=n():t.VueFormGenerator=n()}("undefined"!=typeof self?self:this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var e={};return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=87)}([function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n,e){var r=e(46)("wks"),i=e(47),u=e(0).Symbol,o="function"==typeof u;(t.exports=function(t){return r[t]||(r[t]=o&&u[t]||(o?u:i)("Symbol."+t))}).store=r},function(t,n,e){"use strict";function r(t,n,e,r,i,u,o,a){t=t||{};var c=typeof t.default;"object"!==c&&"function"!==c||(t=t.default);var f="function"==typeof t?t.options:t;n&&(f.render=n,f.staticRenderFns=e,f._compiled=!0),r&&(f.functional=!0),u&&(f._scopeId=u);var s;if(o?(s=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},f._ssrRegister=s):i&&(s=a?function(){i.call(this,this.$root.$options.shadowRoot)}:i),s)if(f.functional){f._injectStyles=s;var l=f.render;f.render=function(t,n){return s.call(n),l(t,n)}}else{var h=f.beforeCreate;f.beforeCreate=h?[].concat(h,s):[s]}return{exports:t,options:f}}n.a=r},function(t,n,e){function r(t){if(!u(t))return!1;var n=i(t);return n==a||n==c||n==o||n==f}var i=e(33),u=e(4),o="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",f="[object Proxy]";t.exports=r},function(t,n){function e(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}t.exports=e},function(t,n,e){"use strict";function r(t){return h()(t)?null!=y.default[t]?y.default[t]:(console.warn("'"+t+"' is not a validator function!"),null):t}function i(t,n,e){var r=_()(e.context,"schema.attributes",{}),i=n.value||"input";h()(i)&&(r=_()(r,i)||r),m()(r,function(n,e){t.setAttribute(e,n)})}Object.defineProperty(n,"__esModule",{value:!0});var u=e(40),o=e.n(u),a=e(71),c=e.n(a),f=e(7),s=e.n(f),l=e(35),h=e.n(l),d=e(3),p=e.n(d),v=e(34),m=e.n(v),g=e(13),_=e.n(g),y=e(73),b=e(21);n.default={props:["model","schema","formOptions","disabled"],data:function(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunction:null}},directives:{attributes:{bind:i,updated:i,componentUpdated:i}},computed:{value:{cache:!1,get:function(){var t=void 0;return t=p()(_()(this.schema,"get"))?this.schema.get(this.model):_()(this.model,this.schema.model),this.formatValueToField(t)},set:function(t){var n=this.value;t=this.formatValueToModel(t),p()(t)?t(t,n):this.updateModelValue(t,n)}}},methods:{validate:function(t){var n=this;this.clearValidationErrors();var e=_()(this.formOptions,"validateAsync",!1),i=[];if(this.schema.validator&&!0!==this.schema.readonly&&!0!==this.disabled){var u=[];s()(this.schema.validator)?m()(this.schema.validator,function(t){u.push(r(t).bind(n))}):u.push(r(this.schema.validator).bind(this)),m()(u,function(t){if(e)i.push(t(n.value,n.schema,n.model));else{var r=t(n.value,n.schema,n.model);r&&p()(r.then)?r.then(function(t){t&&(n.errors=n.errors.concat(t));var e=0===n.errors.length;n.$emit("validated",e,n.errors,n)}):r&&(i=i.concat(r))}})}var a=function(e){var r=[];m()(e,function(t){s()(t)&&t.length>0?r=r.concat(t):h()(t)&&r.push(t)}),p()(n.schema.onValidated)&&n.schema.onValidated.call(n,n.model,r,n.schema);var i=0===r.length;return t||n.$emit("validated",i,r,n),n.errors=r,r};return e?o.a.all(i).then(a):a(i)},debouncedValidate:function(){p()(this.debouncedValidateFunc)||(this.debouncedValidateFunc=c()(this.validate.bind(this),_()(this,"$parent.options.validateDebounceTime",500))),this.debouncedValidateFunc()},updateModelValue:function(t,n){var e=!1;p()(this.schema.set)?(this.schema.set(this.model,t),e=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,t),e=!0),e&&(this.$emit("model-updated",t,this.schema.model),p()(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,t,n,this.schema),!0===_()(this.$parent,"options.validateAfterChanged",!1)&&(_()(this.$parent,"options.validateDebounceTime",0)>0?this.debouncedValidate():this.validate()))},clearValidationErrors:function(){this.errors.splice(0)},setModelValueByPath:function(t,n){var e=t.replace(/\[(\w+)\]/g,".$1");e=e.replace(/^\./,"");for(var r=this.model,i=e.split("."),u=0,o=i.length;u1&&void 0!==arguments[1]?arguments[1]:{};return h()(t.fields,function(e){void 0===m()(n,e.model)&&void 0!==e.default&&(o()(e.default)?p()(n,e.model,e.default(e,t,n)):s()(e.default)||c()(e.default)?p()(n,e.model,i()(e.default)):p()(n,e.model,e.default))}),n},_=function(t){var n=[];return h()(t.fields,function(t){!0===t.multi&&n.push(t)}),n},y=function(t,n){var e={},r=_(t);return h()(r,function(t){var r=void 0,i=!0,u=t.model;h()(n,function(t){var n=m()(t,u);i?(r=n,i=!1):r!==n&&(r=void 0)}),p()(e,u,r)}),e},b=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return void 0!==t.id?n+t.id:n+(t.inputName||t.label||t.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,"")},x=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_\/.\/:]+)/g,"")}},function(t,n,e){function r(t,n){for(var e=t.length;e--;)if(i(t[e][0],n))return e;return-1}var i=e(36);t.exports=r},function(t,n,e){function r(t,n,e,r){var o=!e;e||(e={});for(var a=-1,c=n.length;++a0?r:e)(t)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(15),i=e(0).document,u=r(i)&&r(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,n,e){var r=e(101),i=e(26);t.exports=function(t){return r(i(t))}},function(t,n,e){var r=e(46)("keys"),i=e(47);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,n,e){var r=e(14).f,i=e(19),u=e(1)("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,u)&&r(t,u,{configurable:!0,value:n})}},function(t,n,e){"use strict";function r(t){var n,e;this.promise=new t(function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r}),this.resolve=i(n),this.reject=i(e)}var i=e(18);t.exports.f=function(t){return new r(t)}},function(t,n){function e(t){return i.call(t)}var r=Object.prototype,i=r.toString;t.exports=e},function(t,n){function e(t,n){for(var e=-1,r=null==t?0:t.length;++e0}}},data:function(){return{errors:[]}},computed:{fields:function(){var t=this,n=[];return this.schema&&this.schema.fields&&h()(this.schema.fields,function(e){t.multiple&&!0!==e.multi||n.push(e)}),n},groups:function(){var t=[];return this.schema&&this.schema.groups&&h()(this.schema.groups.slice(0),function(n){t.push(n)}),t}},watch:{model:function(t,n){var e=this;n!==t&&null!=t&&this.$nextTick(function(){!0===e.options.validateAfterLoad&&!0!==e.isNewModel?e.validate():e.clearValidationErrors()})}},mounted:function(){var t=this;this.$nextTick(function(){t.model&&(!0===t.options.validateAfterLoad&&!0!==t.isNewModel?t.validate():t.clearValidationErrors())})},methods:{fieldVisible:function(t){return s()(t.visible)?t.visible.call(this,this.model,t,this):!!c()(t.visible)||t.visible},onFieldValidated:function(t,n,e){var r=this;this.errors=this.errors.filter(function(t){return t.field!==e.schema}),!t&&n&&n.length>0&&h()(n,function(t){r.errors.push({field:e.schema,error:t})});var i=0===this.errors.length;this.$emit("validated",i,this.errors,this)},onModelUpdated:function(t,n){this.$emit("model-updated",t,n)},validate:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===n&&(n=p()(this.options,"validateAsync",!1)),this.clearValidationErrors();var e=[],r=[];h()(this.$children,function(t){s()(t.validate)&&(e.push(t.$refs.child),r.push(t.validate(!0)))});var u=function(r){var i=[];h()(r,function(t,n){o()(t)&&t.length>0&&h()(t,function(t){i.push({field:e[n].schema,error:t})})}),t.errors=i;var u=0===i.length;return t.$emit("validated",u,i,t),n?i:u};return n?i.a.all(r).then(u):u(r)},clearValidationErrors:function(){this.errors.splice(0),h()(this.$children,function(t){t.clearValidationErrors()})}}}},function(t,n,e){t.exports={default:e(90),__esModule:!0}},function(t,n,e){"use strict";var r=e(42),i=e(9),u=e(96),o=e(10),a=e(19),c=e(16),f=e(97),s=e(31),l=e(104),h=e(1)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,n,e,v,m,g,_){f(e,n,v);var y,b,x,w=function(t){if(!d&&t in M)return M[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},j=n+" Iterator",O="values"==m,C=!1,M=t.prototype,S=M[h]||M["@@iterator"]||m&&M[m],I=S||w(m),k=m?O?w("entries"):I:void 0,A="Array"==n?M.entries||S:S;if(A&&(x=l(A.call(new t)))!==Object.prototype&&x.next&&(s(x,j,!0),r||a(x,h)||o(x,h,p)),O&&S&&"values"!==S.name&&(C=!0,I=function(){return S.call(this)}),r&&!_||!d&&!C&&M[h]||o(M,h,I),c[n]=I,c[j]=p,m)if(y={values:O?I:w("values"),keys:g?I:w("keys"),entries:k},_)for(b in y)b in M||u(M,b,y[b]);else i(i.P+i.F*(d||C),n,y);return y}},function(t,n){t.exports=!0},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(100),i=e(48);t.exports=Object.keys||function(t){return r(t,i)}},function(t,n,e){var r=e(25),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n,e){var r=e(0),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(0).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(26);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(20),i=e(1)("toStringTag"),u="Arguments"==r(function(){return arguments}()),o=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,e,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=o(n=Object(t),i))?e:u?r(n):"Object"==(a=r(n))&&"function"==typeof n.callee?"Arguments":a}},function(t,n,e){var r=e(8),i=e(18),u=e(1)("species");t.exports=function(t,n){var e,o=r(t).constructor;return void 0===o||void 0==(e=r(o)[u])?n:i(e)}},function(t,n,e){var r,i,u,o=e(17),a=e(115),c=e(49),f=e(28),s=e(0),l=s.process,h=s.setImmediate,d=s.clearImmediate,p=s.MessageChannel,v=s.Dispatch,m=0,g={},_=function(){var t=+this;if(g.hasOwnProperty(t)){var n=g[t];delete g[t],n()}},y=function(t){_.call(t.data)};h&&d||(h=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return g[++m]=function(){a("function"==typeof t?t:Function(t),n)},r(m),m},d=function(t){delete g[t]},"process"==e(20)(l)?r=function(t){l.nextTick(o(_,t,1))}:v&&v.now?r=function(t){v.now(o(_,t,1))}:p?(i=new p,u=i.port2,i.port1.onmessage=y,r=o(u.postMessage,u,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts?(r=function(t){s.postMessage(t+"","*")},s.addEventListener("message",y,!1)):r="onreadystatechange"in f("script")?function(t){c.appendChild(f("script")).onreadystatechange=function(){c.removeChild(this),_.call(t)}}:function(t){setTimeout(o(_,t,1),0)}),t.exports={set:h,clear:d}},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,e){var r=e(8),i=e(15),u=e(32);t.exports=function(t,n){if(r(t),i(n)&&n.constructor===t)return n;var e=u.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){"use strict";var r=e(123),i=e.n(r),u=e(3),o=e.n(u),a=e(35),c=e.n(a),f=e(7),s=e.n(f),l=e(12),h=e.n(l),d=e(34),p=e.n(d),v=e(13),m=e.n(v);n.a={methods:{getFieldRowClasses:function(t){var n,e=this.fieldErrors(t).length>0,r=(n={},i()(n,m()(this.options,"validationErrorClass","error"),e),i()(n,m()(this.options,"validationSuccessClass","valid"),!e),i()(n,"disabled",this.fieldDisabled(t)),i()(n,"readonly",this.fieldReadonly(t)),i()(n,"featured",this.fieldFeatured(t)),i()(n,"required",this.fieldRequired(t)),n);return s()(t.styleClasses)?p()(t.styleClasses,function(t){return r[t]=!0}):c()(t.styleClasses)&&(r[t.styleClasses]=!0),h()(t.type)||(r["field-"+t.type]=!0),r},fieldErrors:function(t){return this.errors.filter(function(n){return n.field===t}).map(function(t){return t.error})},fieldDisabled:function(t){return o()(t.disabled)?t.disabled.call(this,this.model,t,this):!h()(t.disabled)&&t.disabled},fieldReadonly:function(t){return o()(t.readonly)?t.readonly.call(this,this.model,t,this):!h()(t.readonly)&&t.readonly},fieldFeatured:function(t){return o()(t.featured)?t.featured.call(this,this.model,t,this):!h()(t.featured)&&t.featured},fieldRequired:function(t){return o()(t.required)?t.required.call(this,this.model,t,this):!h()(t.required)&&t.required}}}},function(t,n){function e(t){return null!=t&&"object"==typeof t}t.exports=e},function(t,n,e){"use strict";var r=e(3),i=e.n(r),u=e(12),o=e.n(u),a=e(13),c=e.n(a),f=e(21),s=e(56),l=e(69),h=e.n(l);n.a={name:"form-group",components:h.a,mixins:[s.a],props:{model:Object,options:{type:Object},field:{type:Object,required:!0},errors:{type:Array,default:function(){return[]}}},methods:{fieldTypeHasLabel:function(t){if(o()(t.label))return!1;switch("input"===t.type?t.inputType:t.type){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID:function(t){var n=c()(this.options,"fieldIdPrefix","");return Object(f.slugifyFormID)(t,n)},getFieldType:function(t){return"field-"+t.type},onFieldValidated:function(t,n,e){this.$emit("validated",t,n,e)},buttonVisibility:function(t){return t.buttons&&t.buttons.length>0},buttonClickHandler:function(t,n,e){return t.onclick.call(this,this.model,n,e,this)},fieldHint:function(t){return i()(t.hint)?t.hint.call(this,this.model,t,this):t.hint},fieldErrors:function(t){return this.errors.filter(function(n){return n.field===t}).map(function(t){return t.error})},onModelUpdated:function(t,n){this.$emit("model-updated",t,n)},validate:function(t){return this.$refs.child.validate(t)},clearValidationErrors:function(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()}}}},function(t,n,e){function r(t,n,e,F,P,D){var N,L=n&C,R=n&M,$=n&S;if(e&&(N=P?e(t,F,P,D):e(t)),void 0!==N)return N;if(!w(t))return t;var V=y(t);if(V){if(N=m(t),!L)return s(t,N)}else{var z=v(t),U=z==k||z==A;if(b(t))return f(t,L);if(z==T||z==I||U&&!P){if(N=R||U?{}:_(t),!L)return R?h(t,c(N,t)):l(t,a(N,t))}else{if(!E[z])return P?t:{};N=g(t,z,L)}}D||(D=new i);var Y=D.get(t);if(Y)return Y;if(D.set(t,N),j(t))return t.forEach(function(i){N.add(r(i,n,e,i,t,D))}),N;if(x(t))return t.forEach(function(i,u){N.set(u,r(i,n,e,u,t,D))}),N;var B=$?R?p:d:R?keysIn:O,q=V?void 0:B(t);return u(q||t,function(i,u){q&&(u=i,i=t[u]),o(N,u,r(i,n,e,u,t,D))}),N}var i=e(130),u=e(136),o=e(37),a=e(139),c=e(140),f=e(141),s=e(143),l=e(144),h=e(146),d=e(148),p=e(149),v=e(65),m=e(150),g=e(151),_=e(152),y=e(7),b=e(67),x=e(155),w=e(4),j=e(156),O=e(38),C=1,M=2,S=4,I="[object Arguments]",k="[object Function]",A="[object GeneratorFunction]",T="[object Object]",E={};E[I]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E[T]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E[k]=E["[object WeakMap]"]=!1,t.exports=r},function(t,n,e){function r(t,n,e){"__proto__"==n&&i?i(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}var i=e(137);t.exports=r},function(t,n){function e(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}t.exports=e},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n,e){var r=e(142),i="object"==typeof self&&self&&self.Object===Object&&self,u=r||i||Function("return this")();t.exports=u},function(t,n){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n){function e(t){return i.call(t)}var r=Object.prototype,i=r.toString;t.exports=e},function(t,n){function e(){return!1}t.exports=e},function(t,n){function e(){return!1}t.exports=e},function(t,n){function e(){return!1}t.exports=e},function(t,n,e){var r=e(163).forEach,i={},u=e(164);r(u.keys(),function(t){var n=t.replace(/^\.\//,"").replace(/\.vue/,"");i[n]=u(t).default});t.exports=i},function(t,n,e){"use strict";var r=e(5);n.a={mixins:[r.default]}},function(t,n,e){function r(t,n,e){function r(n){var e=_,r=y;return _=y=void 0,O=n,x=t.apply(r,e)}function s(t){return O=t,w=setTimeout(d,n),C?r(t):x}function l(t){var e=t-j,r=t-O,i=n-e;return M?f(i,b-r):i}function h(t){var e=t-j,r=t-O;return void 0===j||e>=n||e<0||M&&r>=b}function d(){var t=u();if(h(t))return p(t);w=setTimeout(d,l(t))}function p(t){return w=void 0,S&&_?r(t):(_=y=void 0,x)}function v(){void 0!==w&&clearTimeout(w),O=0,_=j=y=w=void 0}function m(){return void 0===w?x:p(u())}function g(){var t=u(),e=h(t);if(_=arguments,y=this,j=t,e){if(void 0===w)return s(j);if(M)return w=setTimeout(d,n),r(j)}return void 0===w&&(w=setTimeout(d,n)),x}var _,y,b,x,w,j,O=0,C=!1,M=!1,S=!0;if("function"!=typeof t)throw new TypeError(a);return n=o(n)||0,i(e)&&(C=!!e.leading,M="maxWait"in e,b=M?c(o(e.maxWait)||0,n):b,S="trailing"in e?!!e.trailing:S),g.cancel=v,g.flush=m,g}var i=e(4),u=e(167),o=e(72),a="Expected a function",c=Math.max,f=Math.min;t.exports=r},function(t,n,e){function r(t){if("number"==typeof t)return t;if(u(t))return o;if(i(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=i(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var e=f.test(t);return e||s.test(t)?l(t.slice(2),e?2:8):c.test(t)?o:+t}var i=e(4),u=e(68),o=NaN,a=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:j;return _()(t)||""===t?n?[i(e.fieldIsRequired)]:[]:null}function i(t){if(null!=t&&arguments.length>1)for(var n=1;n3&&void 0!==arguments[3]?arguments[3]:j;return r(t,n.required,i)},number:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);if(null!=o)return o;var a=[];return m()(t)?(!_()(n.min)&&tn.max&&a.push(i(u.numberTooBig,n.max))):a.push(i(u.invalidNumber)),a},integer:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);if(null!=o)return o;var a=O.number(t,n,e,u);return p()(t)||a.push(i(u.invalidInteger)),a},double:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);return null!=o?o:!m()(t)||isNaN(t)?[i(u.invalidNumber)]:void 0},string:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);if(null!=o)return o;var a=[];return h()(t)?(!_()(n.min)&&t.lengthn.max&&a.push(i(u.textTooBig,t.length,n.max))):a.push(i(u.thisNotText)),a},array:function(t,n,e){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j;if(n.required){if(!s()(t))return[i(r.thisNotArray)];if(0===t.length)return[i(r.fieldIsRequired)]}if(!_()(t)){if(!_()(n.min)&&t.lengthn.max)return[i(r.selectMaxItems,n.max)]}},date:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);if(null!=o)return o;var a=new Date(t);if(!a)return[i(u.invalidDate)];var c=[];if(!_()(n.min)){var f=new Date(n.min);a.valueOf()s.valueOf()&&c.push(i(u.dateIsLate,w.a.format(a),w.a.format(s)))}return c},regexp:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);if(null!=o)return o;if(!_()(n.pattern)){if(!new RegExp(n.pattern).test(t))return[i(u.invalidFormat)]}},email:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);return null!=o?o:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)?void 0:[i(u.invalidEmail)]},url:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);return null!=o?o:/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g.test(t)?void 0:[i(u.invalidURL)]},creditCard:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);if(null!=o)return o;var a=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,c=t.replace(/[^0-9]+/g,"");if(!a.test(c))return[i(u.invalidCard)];for(var f=0,s=void 0,l=void 0,h=void 0,d=c.length-1;d>=0;d--)s=c.substring(d,d+1),l=parseInt(s,10),h?(l*=2,f+=l>=10?l%10+1:l):f+=l,h=!h;return f%10==0&&c?void 0:[i(u.invalidCardNumber)]},alpha:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);return null!=o?o:/^[a-zA-Z]*$/.test(t)?void 0:[i(u.invalidTextContainNumber)]},alphaNumeric:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,o=r(t,n.required,u);return null!=o?o:/^[a-zA-Z0-9]*$/.test(t)?void 0:[i(u.invalidTextContainSpec)]}};o()(O).forEach(function(t){var n=O[t];c()(n)&&(n.locale=function(t){return function(e,r,i){return n(e,r,i,b()(t,j))}})}),n.default=O},function(t,n,e){function r(t){var n=i(t),e=n%1;return n===n?e?n-e:n:0}var i=e(173);t.exports=r},function(t,n,e){function r(t){return"number"==typeof t||u(t)&&i(t)==o}var i=e(33),u=e(57),o="[object Number]";t.exports=r},function(t,n,e){var r;!function(i){"use strict";function u(t,n){for(var e=[],r=0,i=t.length;r3?0:(t-t%10!=10)*t%10]}};var b={D:function(t){return t.getDate()},DD:function(t){return a(t.getDate())},Do:function(t,n){return n.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return a(t.getDay())},ddd:function(t,n){return n.dayNamesShort[t.getDay()]},dddd:function(t,n){return n.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return a(t.getMonth()+1)},MMM:function(t,n){return n.monthNamesShort[t.getMonth()]},MMMM:function(t,n){return n.monthNames[t.getMonth()]},YY:function(t){return String(t.getFullYear()).substr(2)},YYYY:function(t){return a(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return a(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return a(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return a(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return a(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return a(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return a(t.getMilliseconds(),3)},a:function(t,n){return t.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(t,n){return t.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+a(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4)}},x={D:[s,function(t,n){t.day=n}],Do:[new RegExp(s.source+d.source),function(t,n){t.day=parseInt(n,10)}],M:[s,function(t,n){t.month=n-1}],YY:[s,function(t,n){var e=new Date,r=+(""+e.getFullYear()).substr(0,2);t.year=""+(n>68?r-1:r)+n}],h:[s,function(t,n){t.hour=n}],m:[s,function(t,n){t.minute=n}],s:[s,function(t,n){t.second=n}],YYYY:[h,function(t,n){t.year=n}],S:[/\d/,function(t,n){t.millisecond=100*n}],SS:[/\d{2}/,function(t,n){t.millisecond=10*n}],SSS:[l,function(t,n){t.millisecond=n}],d:[s,v],ddd:[d,v],MMM:[d,o("monthNamesShort")],MMMM:[d,o("monthNames")],a:[d,function(t,n,e){var r=n.toLowerCase();r===e.amPm[0]?t.isPm=!1:r===e.amPm[1]&&(t.isPm=!0)}],ZZ:[/([\+\-]\d\d:?\d\d|Z)/,function(t,n){"Z"===n&&(n="+00:00");var e,r=(n+"").match(/([\+\-]|\d\d)/gi);r&&(e=60*r[1]+parseInt(r[2],10),t.timezoneOffset="+"===r[0]?e:-e)}]};x.dd=x.d,x.dddd=x.ddd,x.DD=x.D,x.mm=x.m,x.hh=x.H=x.HH=x.h,x.MM=x.M,x.ss=x.s,x.A=x.a,c.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},c.format=function(t,n,e){var r=e||c.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");n=c.masks[n]||n||c.masks.default;var i=[];return n=n.replace(p,function(t,n){return i.push(n),"??"}),n=n.replace(f,function(n){return n in b?b[n](t,r):n.slice(1,n.length-1)}),n.replace(/\?\?/g,function(){return i.shift()})},c.parse=function(t,n,e){var r=e||c.i18n;if("string"!=typeof n)throw new Error("Invalid format in fecha.parse");if(n=c.masks[n]||n,t.length>1e3)return!1;var i=!0,u={};if(n.replace(f,function(n){if(x[n]){var e=x[n],o=t.search(e[0]);~o?t.replace(e[0],function(n){return e[1](u,n,r),t=t.substr(o+n.length),n}):i=!1}return x[n]?"":n.slice(1,n.length-1)}),!i)return!1;var o=new Date;!0===u.isPm&&null!=u.hour&&12!=+u.hour?u.hour=+u.hour+12:!1===u.isPm&&12==+u.hour&&(u.hour=0);var a;return null!=u.timezoneOffset?(u.minute=+(u.minute||0)-+u.timezoneOffset,a=new Date(Date.UTC(u.year||o.getFullYear(),u.month||0,u.day||1,u.hour||0,u.minute||0,u.second||0,u.millisecond||0))):a=new Date(u.year||o.getFullYear(),u.month||0,u.day||1,u.hour||0,u.minute||0,u.second||0,u.millisecond||0),a},void 0!==t&&t.exports?t.exports=c:void 0!==(r=function(){return c}.call(n,e,n,t))&&(t.exports=r)}()},function(t,n,e){"use strict";var r=e(184),i=e.n(r),u=e(12),o=e.n(u),a=e(4),c=e.n(a),f=e(5),s=e(21);n.a={mixins:[f.default],data:function(){return{comboExpanded:!1}},computed:{items:function(){var t=this.schema.values;return"function"==typeof t?t.apply(this,[this.model,this.schema]):t},selectedCount:function(){return this.value?this.value.length:0}},methods:{getInputName:function(t){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?Object(s.slugify)(this.schema.inputName+"_"+this.getItemValue(t)):Object(s.slugify)(this.getItemValue(t))},getItemValue:function(t){if(c()(t)){if(void 0!==this.schema.checklistOptions&&void 0!==this.schema.checklistOptions.value)return t[this.schema.checklistOptions.value];if(void 0!==t.value)return t.value;throw"`value` is not defined. If you want to use another key name, add a `value` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values"}return t},getItemName:function(t){if(c()(t)){if(void 0!==this.schema.checklistOptions&&void 0!==this.schema.checklistOptions.name)return t[this.schema.checklistOptions.name];if(void 0!==t.name)return t.name;throw"`name` is not defined. If you want to use another key name, add a `name` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values"}return t},isItemChecked:function(t){return this.value&&-1!==this.value.indexOf(this.getItemValue(t))},onChanged:function(t,n){if(!o()(this.value)&&Array.isArray(this.value)||(this.value=[]),t.target.checked){var e=i()(this.value);e.push(this.getItemValue(n)),this.value=e}else{var r=i()(this.value);r.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=r}},onExpandCombo:function(){this.comboExpanded=!this.comboExpanded}}}},function(t,n,e){"use strict";var r=e(75),i=e.n(r),u=e(3),o=e.n(u),a=e(13),c=e.n(a),f=e(71),s=e.n(f),l=e(5),h=e(76),d=e.n(h),p={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"};n.a={mixins:[l.default],methods:{formatValueToModel:function(t){var n=this;if(null!=t)switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":case"number":case"range":return function(e,r){n.debouncedFormatFunc(t,r)}}return t},formatDatetimeToModel:function(t,n){var e=p[this.schema.inputType.toLowerCase()],r=d.a.parse(t,e);!1!==r&&(t=this.schema.format?d.a.format(r,this.schema.format):r.valueOf()),this.updateModelValue(t,n)},formatNumberToModel:function(t,n){i()(t)||(t=NaN),this.updateModelValue(t,n)},onInput:function(t){var n=t.target.value;switch(this.schema.inputType.toLowerCase()){case"number":case"range":i()(parseFloat(t.target.value))&&(n=parseFloat(t.target.value))}this.value=n},onBlur:function(){o()(this.debouncedFormatFunc)&&this.debouncedFormatFunc.flush()}},mounted:function(){var t=this;switch(this.schema.inputType.toLowerCase()){case"number":case"range":this.debouncedFormatFunc=s()(function(n,e){t.formatNumberToModel(n,e)},parseInt(c()(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":this.debouncedFormatFunc=s()(function(n,e){t.formatDatetimeToModel(n,e)},parseInt(c()(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1})}},created:function(){"file"===this.schema.inputType.toLowerCase()&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")}}},function(t,n,e){"use strict";var r=e(5);n.a={mixins:[r.default]}},function(t,n,e){"use strict";var r=e(4),i=e.n(r),u=e(5);n.a={mixins:[u.default],computed:{items:function(){var t=this.schema.values;return"function"==typeof t?t.apply(this,[this.model,this.schema]):t},id:function(){return this.schema.model}},methods:{getItemValue:function(t){if(i()(t)){if(void 0!==this.schema.radiosOptions&&void 0!==this.schema.radiosOptions.value)return t[this.schema.radiosOptions.value];if(void 0!==t.value)return t.value;throw"`value` is not defined. If you want to use another key name, add a `value` property under `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values"}return t},getItemName:function(t){if(i()(t)){if(void 0!==this.schema.radiosOptions&&void 0!==this.schema.radiosOptions.name)return t[this.schema.radiosOptions.name];if(void 0!==t.name)return t.name;throw"`name` is not defined. If you want to use another key name, add a `name` property under `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values"}return t},onSelection:function(t){this.value=this.getItemValue(t)},isItemChecked:function(t){return this.getItemValue(t)===this.value}}}},function(t,n,e){"use strict";var r=e(197),i=e.n(r),u=e(12),o=e.n(u),a=e(4),c=e.n(a),f=e(5);n.a={mixins:[f.default],computed:{selectOptions:function(){return this.schema.selectOptions||{}},items:function(){var t=this.schema.values;return"function"==typeof t?this.groupValues(t.apply(this,[this.model,this.schema])):this.groupValues(t)}},methods:{formatValueToField:function(t){return o()(t)?null:t},groupValues:function(t){var n=[],e={};return t.forEach(function(t){e=null,t.group&&c()(t)?(e=i()(n,function(n){return n.group===t.group}),e?e.ops.push({id:t.id,name:t.name}):(e={group:"",ops:[]},e.group=t.group,e.ops.push({id:t.id,name:t.name}),n.push(e))):n.push(t)}),n},getGroupName:function(t){if(t&&t.group)return t.group;throw"Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items"},getItemValue:function(t){if(c()(t)){if(void 0!==this.schema.selectOptions&&void 0!==this.schema.selectOptions.value)return t[this.schema.selectOptions.value];if(void 0!==t.id)return t.id;throw"`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items"}return t},getItemName:function(t){if(c()(t)){if(void 0!==this.schema.selectOptions&&void 0!==this.schema.selectOptions.name)return t[this.schema.selectOptions.name];if(void 0!==t.name)return t.name;throw"`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items"}return t}}}},function(t,n){function e(t){return t}t.exports=e},function(t,n,e){function r(t){return null!=t&&u(t.length)&&!i(t)}var i=e(3),u=e(199);t.exports=r},function(t,n,e){"use strict";var r=e(205),i=e.n(r),u=e(3),o=e.n(u),a=e(5);n.a={mixins:[a.default],methods:{onClick:function(t){var n=this;if(!0===this.schema.validateBeforeSubmit){t.preventDefault();var e=this.$parent.validate(),r=function(e){!i()(e)&&o()(n.schema.onValidationError)?n.schema.onValidationError(n.model,n.schema,e,t):o()(n.schema.onSubmit)&&n.schema.onSubmit(n.model,n.schema,t)};e&&o()(e.then)?e.then(r):r(e)}else o()(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,t)}}}},function(t,n,e){"use strict";var r=e(5);n.a={mixins:[r.default]}},function(t,n,e){"use strict";var r=e(3),i=e.n(r),u=e(5);n.a={mixins:[u.default],methods:{onChange:function(t){i()(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,this.schema,t,this)}}}},function(t,n,e){var r=e(88).default,i=e(21),u=e(73).default,o=e(69).default,a=e(5).default,c=function(n){n.component("VueFormGenerator",t.exports.component)};t.exports={component:r,schema:i,validators:u,abstractField:a,fieldComponents:o,install:c}},function(t,n,e){"use strict";function r(t){e(89)}Object.defineProperty(n,"__esModule",{value:!0});var i=e(39),u=e(217),o=e(2),a=r,c=Object(o.a)(i.a,u.a,u.b,!1,a,null,null);n.default=c.exports},function(t,n){},function(t,n,e){e(91),e(92),e(105),e(109),e(120),e(121),t.exports=e(6).Promise},function(t,n){},function(t,n,e){"use strict";var r=e(93)(!0);e(41)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})})},function(t,n,e){var r=e(25),i=e(26);t.exports=function(t){return function(n,e){var u,o,a=String(i(n)),c=r(e),f=a.length;return c<0||c>=f?t?"":void 0:(u=a.charCodeAt(c),u<55296||u>56319||c+1===f||(o=a.charCodeAt(c+1))<56320||o>57343?t?a.charAt(c):u:t?a.slice(c,c+2):o-56320+(u-55296<<10)+65536)}}},function(t,n,e){t.exports=!e(11)&&!e(27)(function(){return 7!=Object.defineProperty(e(28)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(15);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){t.exports=e(10)},function(t,n,e){"use strict";var r=e(98),i=e(43),u=e(31),o={};e(10)(o,e(1)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(o,{next:i(1,e)}),u(t,n+" Iterator")}},function(t,n,e){var r=e(8),i=e(99),u=e(48),o=e(30)("IE_PROTO"),a=function(){},c=function(){var t,n=e(28)("iframe"),r=u.length;for(n.style.display="none",e(49).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("