@progress/kendo-vue-form 3.3.3 → 3.3.5-dev.202206141337
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-vue-form.js +1 -1
- package/dist/es/Field.d.ts +4 -1
- package/dist/es/Field.js +5 -1
- package/dist/es/FieldArray.d.ts +4 -1
- package/dist/es/FieldArray.js +5 -1
- package/dist/es/FieldWrapper.d.ts +4 -1
- package/dist/es/FieldWrapper.js +5 -1
- package/dist/es/Form.d.ts +4 -1
- package/dist/es/Form.js +5 -1
- package/dist/es/FormElement.d.ts +4 -1
- package/dist/es/FormElement.js +5 -1
- package/dist/es/additionalTypes.ts +11 -0
- package/dist/es/interfaces/FieldArrayProps.d.ts +1 -1
- package/dist/es/interfaces/FormInjectedProps.d.ts +149 -0
- package/dist/es/interfaces/FormInjectedProps.js +0 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/Field.d.ts +4 -1
- package/dist/npm/Field.js +5 -1
- package/dist/npm/FieldArray.d.ts +4 -1
- package/dist/npm/FieldArray.js +5 -1
- package/dist/npm/FieldWrapper.d.ts +4 -1
- package/dist/npm/FieldWrapper.js +5 -1
- package/dist/npm/Form.d.ts +4 -1
- package/dist/npm/Form.js +5 -1
- package/dist/npm/FormElement.d.ts +4 -1
- package/dist/npm/FormElement.js +5 -1
- package/dist/npm/additionalTypes.ts +11 -0
- package/dist/npm/interfaces/FieldArrayProps.d.ts +1 -1
- package/dist/npm/interfaces/FormInjectedProps.d.ts +149 -0
- package/dist/npm/interfaces/FormInjectedProps.js +2 -0
- package/dist/npm/package-metadata.js +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define(["vue","@progress/kendo-licensing"],t):"object"==typeof exports?exports.KendoVueForm=t(require("vue"),require("@progress/kendo-licensing")):e.KendoVueForm=t(e.Vue,e.KendoLicensing)}(window,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t),n.d(t,"classNames",(function(){return r})),n.d(t,"guid",(function(){return o})),n.d(t,"Keys",(function(){return i})),n.d(t,"noop",(function(){return S})),n.d(t,"getListeners",(function(){return C})),n.d(t,"hasListener",(function(){return T})),n.d(t,"canUseDOM",(function(){return u})),n.d(t,"focusFirstFocusableChild",(function(){return s})),n.d(t,"clone",(function(){return k})),n.d(t,"Draggable",(function(){return _})),n.d(t,"cloneArray",(function(){return B})),n.d(t,"cloneValue",(function(){return w})),n.d(t,"cloneObject",(function(){return P})),n.d(t,"cloneDate",(function(){return j})),n.d(t,"getTemplate",(function(){return L})),n.d(t,"templateRendering",(function(){return I})),n.d(t,"templateDefinition",(function(){return R})),n.d(t,"getTabIndex",(function(){return N})),n.d(t,"getDefaultSlots",(function(){return F})),n.d(t,"isRtl",(function(){return K})),n.d(t,"getDir",(function(){return U})),n.d(t,"getter",(function(){return V})),n.d(t,"setter",(function(){return E})),n.d(t,"validatePackage",(function(){return G})),n.d(t,"kendoThemeMaps",(function(){return X}));var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?r.apply(void 0,e):"object"==typeof e?Object.keys(e).map((function(t,n){return e[n]||e[t]&&t||null})).filter((function(e){return null!==e})).join(" "):e})).filter((function(e){return!!e})).join(" ")},o=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n},i={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},u=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),s=function(e){if(e){var t=e.querySelectorAll('input, [tabindex]:not([tabindex="-1"])');t.length&&t[0].focus&&t[0].focus()}},a=n(0),d=function(e,t){return function(n){return t(e(n))}},l=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},c=function(e,t,n){return e&&e.removeEventListener&&e.removeEventListener(t,n)},f=function(){},h=function(e){return e.preventDefault()},m=/touch/;function p(e){return e.type.match(m)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,type:e.type,originalEvent:e,isTouch:!0}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}var v=function(e){var t=this,n=e.press;void 0===n&&(n=f);var r=e.drag;void 0===r&&(r=f);var o=e.release;void 0===o&&(o=f);var i=e.mouseOnly;void 0===i&&(i=!1),this._pressHandler=d(p,n),this._dragHandler=d(p,r),this._releaseHandler=d(p,o),this._ignoreMouse=!1,this._mouseOnly=i,this._touchstart=function(e){1===e.touches.length&&t._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&t._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(t._releaseHandler(e),t._ignoreMouse=!0,setTimeout(t._restoreMouse,2e3))},this._restoreMouse=function(){t._ignoreMouse=!1},this._mousedown=function(e){var n=e.which;n&&n>1||t._ignoreMouse||(l(document,"mousemove",t._mousemove),l(document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){c(document,"mousemove",t._mousemove),c(document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(l(document,"pointermove",t._pointermove),l(document,"pointerup",t._pointerup),l(document,"pointercancel",t._pointerup),l(document,"contextmenu",h),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(c(document,"pointermove",t._pointermove),c(document,"pointerup",t._pointerup),c(document,"pointercancel",t._pointerup),c(document,"contextmenu",h),t._releaseHandler(e))}};v.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},v.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},v.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?l(e,"pointerdown",this._pointerdown):(l(e,"mousedown",this._mousedown),this._mouseOnly||(l(e,"touchstart",this._touchstart),l(e,"touchmove",this._touchmove),l(e,"touchend",this._touchend)))},v.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return c(e,"pointerdown",this._pointerdown),c(document,"pointermove",this._pointermove),c(document,"pointerup",this._pointerup),c(document,"contextmenu",h),void c(document,"pointercancel",this._pointerup);c(e,"mousedown",this._mousedown),this._mouseOnly||(c(e,"touchstart",this._touchstart),c(e,"touchmove",this._touchmove),c(e,"touchend",this._touchend))},v.prototype._usePointers=function(){return!this._mouseOnly&&v.supportPointerEvent()},v.prototype.update=function(e){var t=e.press;void 0===t&&(t=f);var n=e.drag;void 0===n&&(n=f);var r=e.release;void 0===r&&(r=f);var o=e.mouseOnly;void 0===o&&(o=!1),this._pressHandler=d(p,t),this._dragHandler=d(p,n),this._releaseHandler=d(p,r),this._mouseOnly=o},v.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},v.default=v;var y,g=v;function F(e){var t=e.$slots.default;return e.v3&&t&&"function"==typeof t?t():t}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=a.h,_=(b(y={emits:{press:null,drag:null,release:null},inheritAttrs:!1,created:function(){this.element=null,this.draggable=new g({press:this.press,drag:this.drag,release:this.release})},setup:O?function(){return{v3:!!O}}:void 0,mounted:function(){this.$el&&(this.element=3===this.$el.nodeType?this.$el.nextElementSibling:this.$el,this.draggable.bindTo(this.element))},destroyed:O?void 0:function(){this.draggable.destroy()},unmounted:function(){this.draggable.destroy()},methods:{press:function(e){this.element&&this.$emit("press",e,this.element)},drag:function(e){this.element&&this.$emit("drag",e,this.element)},release:function(e){this.element&&this.$emit("release",e,this.element)}}},"setup",O?function(){return{v3:!!O}}:void 0),b(y,"render",(function(e){return F(this)})),y),j=function(e){return e?new Date(e.getTime()):null};function k(e){var t={};return P(e,t),t}function P(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[n]=w(r,t[n])}}function w(e,t){if(Array.isArray(e))return B(e);if(e instanceof Date)return j(e);if(e&&"object"==typeof e){var n=t||{};return P(e,n),n}return e}function B(e){return e.map((function(e){return w(e,void 0)}))}var S=function(){},$=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,M={};function V(e){if(M[e])return M[e];var t=[];return e.replace($,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),M[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},M[e]}M.undefined=function(){};var A={};function E(e){if(A[e])return A[e];var t=[];return e.replace($,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),A[e]=function(e,n){for(var r=e,o=t.length-1,i=0;i<o&&r;i++)r=r[t[i]]=r[t[i]]||{};r[t[o]]=n},A[e]}function T(e){return this.v3?Object.keys(this.$attrs).map((function(e){return e.toLowerCase()})).some((function(t){return t.endsWith(e.toLowerCase())})):this.$listeners[e]}function C(){if(this.v3){var e={};for(var t in this.$attrs)t.startsWith("on")&&(e[t]=this.$attrs[t]);return e}return this.$listeners}A.undefined=function(e){return e};var x=function(){return(x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},D=a.h,R={type:[String,Function,Object,Boolean],default:function(){}};function I(e,t){if(e||!1===e){var n=D?this.$slots[e]||(e.toLowerCase?this.$slots[e.toLowerCase()]:null):this.$scopedSlots[e]||(e.toLowerCase?this.$scopedSlots[e.toLowerCase()]:null);return"string"==typeof e&&n?{kt:!0,type:"slot",render:n,listeners:t}:"string"==typeof e||"object"==typeof e||"function"==typeof e&&e.component?{kt:!0,type:"component",render:e,listeners:t}:{kt:!0,type:"renderFunction",render:e,listeners:t}}}function L(e){var t,n,r,o=e.h,i=e.template,u=e.defaultRendering,s=e.defaultSlots,a=e.additionalProps,d=e.additionalListeners,l=e.swapDefaultSlots;if(!i||i&&!0===i.render)return u;if(D){var c=u?u.props:{};t=x(x({},H(d)),i.listeners),n=x(x(x({},c),a),t),r=x(x({},n),t)}else{var f=u&&u.componentOptions,h=f?u.componentOptions.listeners:{},m=f?u.componentOptions.propsData:{};t=x(x(x(x({},h),d),H(d)),i.listeners),r={props:n=x(x(x({},m),a),t),on:t}}if("slot"===i.type){var p=i.render({props:n,listeners:t,methods:t,defaultSlots:s});return p?p[0]:void 0}return"renderFunction"===i.type?l?i.render?i.render(o,u,s,n,t):void 0:i.render?i.render(o,u,n,t,s):void 0:o(i.render,r,D?function(){return[s]}:[s])}function H(e){if(!e)return e;for(var t={},n=Object.keys(e),r=0;r<n.length;r++){var o=n[r];t["on"+o.charAt(0).toUpperCase()+o.slice(1)]=e[o]}return t}var N=function(e,t,n){var r="string"==typeof e?parseInt(e,void 0):e;if(NaN!==r)return void 0!==r?r:t?n?void 0:-1:0};function K(e){return Boolean(u&&e&&"rtl"===getComputedStyle(e).direction)}function U(e,t){if(!t&&u&&e){var n=window.getComputedStyle(e).direction;if(n)return n}return t}var W=n(3);function G(e){if(void 0!==W)W.validatePackage(e);else{var t="License activation failed for "+e.name+"\n";t+="The @progress/kendo-licensing script is not loaded.\n",t+="See "+e.licensingDocsUrl+" for more information.\n",console.warn(t)}}var X={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata=void 0,t.packageMetadata={name:"@progress/kendo-vue-form",productName:"Kendo UI for Vue",productCodes:["KENDOUIVUE","KENDOUICOMPLETE"],publishDate:1653914226,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"}},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormElementVue2=t.FormElement=t.FieldWrapperVue2=t.FieldWrapper=t.FormVue2=t.Form=t.FieldVue2=t.Field=t.FieldArrayVue2=t.FieldArray=void 0;var r=n(5);Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return r.Field}}),Object.defineProperty(t,"FieldVue2",{enumerable:!0,get:function(){return r.FieldVue2}});var o=n(6);Object.defineProperty(t,"Form",{enumerable:!0,get:function(){return o.Form}}),Object.defineProperty(t,"FormVue2",{enumerable:!0,get:function(){return o.FormVue2}});var i=n(7);Object.defineProperty(t,"FieldArray",{enumerable:!0,get:function(){return i.FieldArray}}),Object.defineProperty(t,"FieldArrayVue2",{enumerable:!0,get:function(){return i.FieldArrayVue2}});var u=n(8);Object.defineProperty(t,"FieldWrapper",{enumerable:!0,get:function(){return u.FieldWrapper}}),Object.defineProperty(t,"FieldWrapperVue2",{enumerable:!0,get:function(){return u.FieldWrapperVue2}});var s=n(9);Object.defineProperty(t,"FormElement",{enumerable:!0,get:function(){return s.FormElement}}),Object.defineProperty(t,"FormElementVue2",{enumerable:!0,get:function(){return s.FormElementVue2}})},function(e,t,n){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldVue2=t.Field=void 0;var a=u(n(0)).h,d=n(1),l={name:"KendoField",props:{component:[String,Number,Boolean,Object],validator:[Function,Array],name:String,changeOnInput:{type:Boolean,default:!0}},created:function(){if(this.kendoForm)return this.kendoForm.registerField(this.$props.name,this.$props.validator)},inject:{kendoForm:{default:null}},methods:{handleOnChange:function(e){var t=e?void 0!==e.value?e.value:e.target?e.target.value:e.target:e;this.kendoForm.onChange(this.$props.name,{value:t}),this.$emit("change",e)},handleOnInput:function(e){var t=e?void 0!==e.value?e.value:e.target?e.target.value:e.target:e;this.changeOnInput&&this.kendoForm.onChange(this.$props.name,{value:t}),this.$emit("input",e)},onNativeComponentChange:function(e){this.kendoForm.onChange(this.$props.name,{value:e.target.value})},handleOnBlur:function(){this.kendoForm.onBlur(this.$props.name)},handleOnFocus:function(){this.kendoForm.onFocus(this.$props.name)}},setup:a?function(){return{v3:!!a}}:void 0,render:function(e){var t=a||e,n=d.getDefaultSlots(this),o=this.$props,i=o.name,u=o.component,l=(o.validator,o.id);s(o,["name","component","validator","id"]);if(!this.kendoForm)return null;var c=this.kendoForm.values[i];if("string"==typeof u&&"input"===u)return t(u,r(r({attrs:this.$attrs},this.$attrs),{onChange:this.onNativeComponentChange,onBlur:this.handleOnBlur,onFocus:this.handleOnFocus,on:this.v3?void 0:{change:this.handleOnChange,blur:this.handleOnBlur,focus:this.handleOnFocus},domProps:this.v3?void 0:{value:c||""},name:i,value:c||""}));if(u){var f=u?u.kt?u:d.templateRendering.call(this,u,d.getListeners.call(this)):null;return d.getTemplate.call(this,{h:t,template:f,additionalProps:r({value:c,validationMessage:this.kendoForm.errors[i],touched:this.kendoForm.touchedByField[i],modified:this.kendoForm.modifiedByField[i],visited:this.kendoForm.visitedByField[i],valid:!(Boolean(this.kendoForm.errors[i])&&this.kendoForm.touchedByField[i]),name:i,id:l},this.$attrs),additionalListeners:{change:this.handleOnChange,input:this.handleOnInput,blur:this.handleOnBlur,focus:this.handleOnFocus},defaultSlots:n})}}};t.FieldVue2=l;var c=l;t.Field=c},function(e,t,n){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],u=0,s=i.length;u<s;u++,o++)r[o]=i[u];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.FormVue2=t.Form=void 0;var a=n(1),d=n(2),l=u(n(0)).h,c=n(1),f={name:"KendoForm",inheritAttrs:!1,props:{renderForm:[Object,Function],initialValues:Object,validator:Function,ignoreModified:Boolean},emits:{submitclick:null,submit:null},created:function(){this._accumulatorTimeout=void 0,a.validatePackage(d.packageMetadata),this.form.values=a.clone(this.$props.initialValues)},mounted:function(){this.form.errors=this.getErrors(),this.form.allowSubmit=this.allowSubmit(),this.form.valid=this.isValid()},destroyed:l?void 0:function(){this.onDestroy()},unmounted:function(){this.onDestroy()},data:function(){return{validatorsByField:{},fields:[],unmounted:!1,form:{id:this.id,errors:{},values:{},modifiedByField:{},touchedByField:{},visitedByField:{},valid:!1,modified:!1,touched:!1,visited:!1,submitted:!1,valueGetter:this.valueGetter,allowSubmit:!1,onChange:this.onChange,onSubmit:this.onSubmit,onFormReset:this.resetForm,registerField:this.onFieldRegister,onFocus:this.onFocus,onBlur:this.onBlur,onUnshift:this.onUnshift,onPush:this.onPush,onInsert:this.onInsert,onPop:this.onPop,onRemove:this.onRemove,onReplace:this.onReplace,onMove:this.onMove}}},provide:function(){return{kendoForm:this.$data.form}},watch:{"form.values":function(){this.form.errors=this.getErrors(),this.form.allowSubmit=this.allowSubmit(),this.form.valid=this.isValid()},"form.touchedByField":function(e){this.form.touched=this.isFormTouched(e,this.fields),this.form.allowSubmit=this.allowSubmit()},"form.modifiedByField":function(e){this.form.modified=this.isFormModified(e,this.fields),this.form.allowSubmit=this.allowSubmit()},"form.visitedByField":function(e){this.form.visited=this.isFormVisited(e,this.fields)}},methods:{isValid:function(){return this.isFormValid(this.form.errors)},formErrors:function(){if(this.$props.validator)return this.$props.validator(this.form.values,this.valueGetter)},getErrors:function(){var e=this,t={},n=this.validatorsByField;return Object.keys(this.fields).forEach((function(r){if(t[r]="",n[r]){var o=[];n[r].forEach((function(e){Array.isArray(e)?o.push.apply(o,e):o.push(e)})),o.find((function(n){if(n){var o=n(e.valueGetter(r),e.valueGetter,{name:r});if(o)return t[r]=o,!0}return!1}))}})),this.formErrors()&&a.cloneObject(this.formErrors(),t),t},accumulatedForceUpdate:function(){var e=this;this._accumulatorTimeout&&clearTimeout(this._accumulatorTimeout),this._accumulatorTimeout=window.setTimeout((function(){e._accumulatorTimeout=void 0}),0)},resetForm:function(){this.form.values=a.clone(this.$props.initialValues),this.id=a.guid(),this.form.touchedByField={},this.form.visitedByField={},this.form.modifiedByField={},this.form.submitted=!1},onReset:function(){this.resetForm()},addField:function(e){this.fields[e]=!0},onSubmit:function(e){var t={},n=this.fields;e&&("function"==typeof e.preventDefault&&e.preventDefault(),"function"==typeof e.stopPropagation&&e.stopPropagation()),Object.keys(n).forEach((function(e){t[e]=!0})),this.form.visitedByField=r({},t),this.form.touchedByField=r({},t);var o=this.form.values,i=this.isValid(),u=this.isFormModified(this.form.modifiedByField,n);this.$emit("submitclick",{values:o,isValid:i,isModified:u,event:e}),i&&(this.$props.ignoreModified||u)&&(this.form.submitted=!0,this.$emit("submit",o,e))},onChange:function(e,t){var n,o=t.value;this.addField(e),this.form.modifiedByField[e]||(this.form.modifiedByField=r(r({},this.form.modifiedByField),((n={})[e]=!0,n))),this.valueSetter(e,o)},onFocus:function(e){var t;this.form.visitedByField[e]||(this.form.visitedByField=r(r({},this.form.visitedByField),((t={})[e]=!0,t)))},onBlur:function(e){var t;this.form.touchedByField[e]||(this.onFocus(e),this.form.touchedByField=r(r({},this.form.touchedByField),((t={})[e]=!0,t)))},onFieldRegister:function(e,t){var n,o=this;this.addField(e);var i=this.validatorsByField[e]||[],u=i.length;return this.validatorsByField=r(r({},this.validatorsByField),((n={})[e]=s(i,[t]),n)),this.accumulatedForceUpdate(),function(){var t;if(!o._unmounted){var n=s(o.validatorsByField[e]||[]),i=Boolean(n[u]);n[u]=void 0,o.validatorsByField=r(r({},o.validatorsByField),((t={})[e]=n,t)),i&&o.accumulatedForceUpdate()}}},isFormValid:function(e){return!Object.keys(e).some((function(t){return Boolean(e[t])}))},isFormModified:function(e,t){return Object.keys(t).some((function(t){return e[t]}))},isFormHasNotTouched:function(e,t){return Object.keys(t).some((function(t){return!e[t]}))},isFormTouched:function(e,t){return Object.keys(t).some((function(t){return e[t]}))},isFormVisited:function(e,t){return Object.keys(t).some((function(t){return e[t]}))},formHasNotTouched:function(){return this.isFormHasNotTouched(this.form.touchedByField,this.fields)},allowSubmit:function(){return this.formHasNotTouched()&&!this.isValid()||this.isValid()&&(this.$props.ignoreModified||this.isFormModified(this.form.modifiedByField,this.fields))},valueGetter:function(e){return this.form.values[e]},valueSetter:function(e,t){var n;this.form.values=r(r({},this.form.values),((n={})[e]=t,n))},onArrayAction:function(e){var t;this.addField(e),this.form.modifiedByField[e]||(this.form.modifiedByField=r(r({},this.form.modifiedByField),((t={})[e]=!0,t))),this.onBlur(e,!0)},onInsert:function(e,t){this.onArrayAction(e);var n=s(this.valueGetter(e)||[]);n.splice(t.index,0,t.value),this.valueSetter(e,n)},onUnshift:function(e,t){this.onInsert(e,{value:t.value,index:0})},onPush:function(e,t){this.onArrayAction(e);var n=s(this.valueGetter(e)||[],[t.value]);this.valueSetter(e,n)},onPop:function(e){this.onArrayAction(e);var t=s(this.valueGetter(e)||[]),n=t.pop();return this.valueSetter(e,t),n},onRemove:function(e,t){this.onArrayAction(e);var n=s(this.valueGetter(e)||[]),r=n.splice(t.index,1);return this.valueSetter(e,n),r},onReplace:function(e,t){this.onArrayAction(e);var n=s(this.valueGetter(e)||[]);n.splice(t.index,1,t.value),this.valueSetter(e,n)},onMove:function(e,t){this.onArrayAction(e);var n=s(this.valueGetter(e)||[]),r=n[t.prevIndex];n.splice(t.prevIndex,1),n.splice(t.nextIndex,0,r),this.valueSetter(e,n)},onDestroy:function(){this.unmounted=!0,this._accumulatorTimeout&&clearTimeout(this._accumulatorTimeout)}},setup:l?function(){return{v3:!!l}}:void 0,render:function(e){return c.getDefaultSlots(this)}};t.FormVue2=f;var h=f;t.Form=h},function(e,t,n){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldArrayVue2=t.FieldArray=void 0;var s=u(n(0)).h,a=n(1),d={name:"KendoFieldArray",props:{value:[String,Number,Boolean,Object,Array],component:[String,Number,Boolean,Object],validationMessage:String,touched:Boolean,modified:Boolean,validator:[Function,Array],visited:Boolean,valid:Boolean,name:String,id:String},created:function(){if(this.kendoForm)return this.kendoForm.registerField(this.$props.name,this.$props.validator)},methods:{onUnshift:function(e){this.kendoForm.onUnshift(this.$props.name,e)},onPush:function(e){this.kendoForm.onPush(this.$props.name,e)},onInsert:function(e){this.kendoForm.onInsert(this.$props.name,e)},onPop:function(){this.kendoForm.onPop(this.$props.name)},onRemove:function(e){this.kendoForm.onRemove(this.$props.name,e)},onReplace:function(e){this.kendoForm.onReplace(this.$props.name,e)},onMove:function(e){this.kendoForm.onMove(this.$props.name,e)}},setup:s?function(){return{v3:!!s}}:void 0,inject:{kendoForm:{default:null}},render:function(e){var t=s||e,n=this.$props,o=n.name,i=n.component,u=n.id;if(!this.kendoForm)return null;var d=this.kendoForm.values[o];if(i){var l=i?a.templateRendering.call(this,i,a.getListeners.call(this)):null;return a.getTemplate.call(this,{h:t,template:l,additionalProps:r({value:d,validationMessage:this.kendoForm.errors[o],touched:this.kendoForm.touchedByField[o],modified:this.kendoForm.modifiedByField[o],visited:this.kendoForm.visitedByField[o],valid:!(Boolean(this.kendoForm.errors[o])&&this.kendoForm.touchedByField[o]),name:o,id:u},this.$attrs),additionalListeners:{unshift:this.onUnshift,push:this.onPush,insert:this.onInsert,pop:this.onPop,remove:this.onRemove,replace:this.onReplace,move:this.onMove}})}}};t.FieldArrayVue2=d;var l=d;t.FieldArray=l},function(e,t,n){"use strict";var r=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldWrapperVue2=t.FieldWrapper=void 0;var u=i(n(0)).h,s=n(2),a=n(1),d={name:"KendoFieldWrapper",props:{dir:String},created:function(){a.validatePackage(s.packageMetadata)},computed:{fieldClassName:function(){return{"k-form-field":!0,"k-rtl":"rtl"===this.$props.dir}}},setup:u?function(){return{v3:!!u}}:void 0,render:function(e){var t=u||e,n=a.getDefaultSlots(this);return t("div",{class:this.fieldClassName},[n])}};t.FieldWrapperVue2=d;var l=d;t.FieldWrapper=l},function(e,t,n){"use strict";var r=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FormElementVue2=t.FormElement=void 0;var u=i(n(0)).h,s=n(2),a=n(1),d={name:"KendoFormElement",props:{horizontal:Boolean},created:function(){a.validatePackage(s.packageMetadata)},inject:{kendoForm:{default:null}},computed:{formElementClassName:function(){return{"k-form":!0,"k-form-horizontal":!0===this.$props.horizontal}}},methods:{handleSubmit:function(e){this.kendoForm&&this.kendoForm.onSubmit(e)}},setup:u?function(){return{v3:!!u}}:void 0,render:function(e){var t=u||e,n=a.getDefaultSlots(this);return t("form",{class:this.formElementClassName,onSubmit:this.handleSubmit,on:this.v3?void 0:{submit:this.handleSubmit}},[n])}};t.FormElementVue2=d;var l=d;t.FormElement=l}])}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define(["vue","@progress/kendo-licensing"],t):"object"==typeof exports?exports.KendoVueForm=t(require("vue"),require("@progress/kendo-licensing")):e.KendoVueForm=t(e.Vue,e.KendoLicensing)}(window,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t),n.d(t,"classNames",(function(){return o})),n.d(t,"guid",(function(){return i})),n.d(t,"Keys",(function(){return u})),n.d(t,"noop",(function(){return M})),n.d(t,"isObject",(function(){return r})),n.d(t,"getListeners",(function(){return D})),n.d(t,"hasListener",(function(){return x})),n.d(t,"canUseDOM",(function(){return s})),n.d(t,"focusFirstFocusableChild",(function(){return a})),n.d(t,"clone",(function(){return w})),n.d(t,"Draggable",(function(){return k})),n.d(t,"cloneArray",(function(){return $})),n.d(t,"cloneValue",(function(){return S})),n.d(t,"cloneObject",(function(){return B})),n.d(t,"cloneDate",(function(){return P})),n.d(t,"getTemplate",(function(){return N})),n.d(t,"templateRendering",(function(){return H})),n.d(t,"templateDefinition",(function(){return L})),n.d(t,"getTabIndex",(function(){return U})),n.d(t,"getDefaultSlots",(function(){return O})),n.d(t,"isRtl",(function(){return W})),n.d(t,"getDir",(function(){return G})),n.d(t,"getter",(function(){return E})),n.d(t,"setter",(function(){return C})),n.d(t,"validatePackage",(function(){return Y})),n.d(t,"kendoThemeMaps",(function(){return q}));var r=function(e){return"object"==typeof e},o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?o.apply(void 0,e):r(e)?Object.keys(e).map((function(t,n){return e[n]||e[t]&&t||null})).filter((function(e){return null!==e})).join(" "):e})).filter((function(e){return!!e})).join(" ")},i=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n},u={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},s=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),a=function(e){if(e){var t=e.querySelectorAll('input, [tabindex]:not([tabindex="-1"])');t.length&&t[0].focus&&t[0].focus()}},d=n(0),l=function(e,t){return function(n){return t(e(n))}},c=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},f=function(e,t,n){return e&&e.removeEventListener&&e.removeEventListener(t,n)},h=function(){},m=function(e){return e.preventDefault()},p=/touch/;function v(e){return e.type.match(p)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,type:e.type,originalEvent:e,isTouch:!0}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}var y=function(e){var t=this,n=e.press;void 0===n&&(n=h);var r=e.drag;void 0===r&&(r=h);var o=e.release;void 0===o&&(o=h);var i=e.mouseOnly;void 0===i&&(i=!1),this._pressHandler=l(v,n),this._dragHandler=l(v,r),this._releaseHandler=l(v,o),this._ignoreMouse=!1,this._mouseOnly=i,this._touchstart=function(e){1===e.touches.length&&t._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&t._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(t._releaseHandler(e),t._ignoreMouse=!0,setTimeout(t._restoreMouse,2e3))},this._restoreMouse=function(){t._ignoreMouse=!1},this._mousedown=function(e){var n=e.which;n&&n>1||t._ignoreMouse||(c(t.document,"mousemove",t._mousemove),c(t.document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){f(t.document,"mousemove",t._mousemove),f(t.document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(c(t.document,"pointermove",t._pointermove),c(t.document,"pointerup",t._pointerup),c(t.document,"pointercancel",t._pointerup),c(t.document,"contextmenu",m),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(f(t.document,"pointermove",t._pointermove),f(t.document,"pointerup",t._pointerup),f(t.document,"pointercancel",t._pointerup),f(t.document,"contextmenu",m),t._releaseHandler(e))}},g={document:{configurable:!0}};y.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},g.document.get=function(){return this._element?this._element.ownerDocument:document},y.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},y.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?c(e,"pointerdown",this._pointerdown):(c(e,"mousedown",this._mousedown),this._mouseOnly||(c(e,"touchstart",this._touchstart),c(e,"touchmove",this._touchmove),c(e,"touchend",this._touchend)))},y.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return f(e,"pointerdown",this._pointerdown),f(this.document,"pointermove",this._pointermove),f(this.document,"pointerup",this._pointerup),f(this.document,"contextmenu",m),void f(this.document,"pointercancel",this._pointerup);f(e,"mousedown",this._mousedown),this._mouseOnly||(f(e,"touchstart",this._touchstart),f(e,"touchmove",this._touchmove),f(e,"touchend",this._touchend))},y.prototype._usePointers=function(){return!this._mouseOnly&&y.supportPointerEvent()},y.prototype.update=function(e){var t=e.press;void 0===t&&(t=h);var n=e.drag;void 0===n&&(n=h);var r=e.release;void 0===r&&(r=h);var o=e.mouseOnly;void 0===o&&(o=!1),this._pressHandler=l(v,t),this._dragHandler=l(v,n),this._releaseHandler=l(v,r),this._mouseOnly=o},y.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},Object.defineProperties(y.prototype,g),y.default=y;var F,b=y;function O(e){var t=e.$slots.default;return e.v3&&t&&"function"==typeof t?t():t}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j=d.h,k=(_(F={emits:{press:null,drag:null,release:null},inheritAttrs:!1,created:function(){this.element=null,this.draggable=new b({press:this.press,drag:this.drag,release:this.release})},setup:j?function(){return{v3:!!j}}:void 0,mounted:function(){this.$el&&(this.element=3===this.$el.nodeType?this.$el.nextElementSibling:this.$el,this.draggable.bindTo(this.element))},destroyed:j?void 0:function(){this.draggable.destroy()},unmounted:function(){this.draggable.destroy()},methods:{press:function(e){this.element&&this.$emit("press",e,this.element)},drag:function(e){this.element&&this.$emit("drag",e,this.element)},release:function(e){this.element&&this.$emit("release",e,this.element)}}},"setup",j?function(){return{v3:!!j}}:void 0),_(F,"render",(function(e){return O(this)})),F),P=function(e){return e?new Date(e.getTime()):null};function w(e){var t={};return B(e,t),t}function B(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[n]=S(r,t[n])}}function S(e,t){if(Array.isArray(e))return $(e);if(e instanceof Date)return P(e);if(e&&r(e)){var n=t||{};return B(e,n),n}return e}function $(e){return e.map((function(e){return S(e,void 0)}))}var M=function(){},V=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,A={};function E(e){if(A[e])return A[e];var t=[];return e.replace(V,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),A[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},A[e]}A.undefined=function(){};var T={};function C(e){if(T[e])return T[e];var t=[];return e.replace(V,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),T[e]=function(e,n){for(var r=e,o=t.length-1,i=0;i<o&&r;i++)r=r[t[i]]=r[t[i]]||{};r[t[o]]=n},T[e]}function x(e){return this.v3?Object.keys(this.$attrs).map((function(e){return e.toLowerCase()})).some((function(t){return t.endsWith(e.toLowerCase())})):this.$listeners[e]}function D(){if(this.v3){var e={};for(var t in this.$attrs)t.startsWith("on")&&(e[t]=this.$attrs[t]);return e}return this.$listeners}T.undefined=function(e){return e};var R=function(){return(R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},I=d.h,L={type:[String,Function,Object,Boolean],default:function(){}};function H(e,t){if(e||!1===e){var n=I?this.$slots[e]||(e.toLowerCase?this.$slots[e.toLowerCase()]:null):this.$scopedSlots[e]||(e.toLowerCase?this.$scopedSlots[e.toLowerCase()]:null);return"string"==typeof e&&n?{kt:!0,type:"slot",render:n,listeners:t}:"string"==typeof e||r(e)||"function"==typeof e&&e.component?{kt:!0,type:"component",render:e,listeners:t}:{kt:!0,type:"renderFunction",render:e,listeners:t}}}function N(e){var t,n,r,o=e.h,i=e.template,u=e.defaultRendering,s=e.defaultSlots,a=e.additionalProps,d=e.additionalListeners,l=e.swapDefaultSlots;if(!i||i&&!0===i.render)return u;if(I){var c=u?u.props:{};t=R(R({},K(d)),i.listeners),n=R(R(R({},c),a),t),r=R(R({},n),t)}else{var f=u&&u.componentOptions,h=f?u.componentOptions.listeners:{},m=f?u.componentOptions.propsData:{};t=R(R(R(R({},h),d),K(d)),i.listeners),r={props:n=R(R(R({},m),a),t),on:t}}if("slot"===i.type){var p=i.render({props:n,listeners:t,methods:t,defaultSlots:s});return p?p[0]:void 0}return"renderFunction"===i.type?l?i.render?i.render(o,u,s,n,t):void 0:i.render?i.render(o,u,n,t,s):void 0:o(i.render,r,I?function(){return[s]}:[s])}function K(e){if(!e)return e;for(var t={},n=Object.keys(e),r=0;r<n.length;r++){var o=n[r];t["on"+o.charAt(0).toUpperCase()+o.slice(1)]=e[o]}return t}var U=function(e,t,n){var r="string"==typeof e?parseInt(e,void 0):e;if(NaN!==r)return void 0!==r?r:t?n?void 0:-1:0};function W(e){return Boolean(s&&e&&"rtl"===getComputedStyle(e).direction)}function G(e,t){if(!t&&s&&e){var n=window.getComputedStyle(e).direction;if(n)return n}return t}var X=n(3);function Y(e){if(void 0!==X)X.validatePackage(e);else{var t="License activation failed for "+e.name+"\n";t+="The @progress/kendo-licensing script is not loaded.\n",t+="See "+e.licensingDocsUrl+" for more information.\n",console.warn(t)}}var q={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata=void 0,t.packageMetadata={name:"@progress/kendo-vue-form",productName:"Kendo UI for Vue",productCodes:["KENDOUIVUE","KENDOUICOMPLETE"],publishDate:1655213597,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"}},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormElementVue2=t.FormElement=t.FieldWrapperVue2=t.FieldWrapper=t.FormVue2=t.Form=t.FieldVue2=t.Field=t.FieldArrayVue2=t.FieldArray=void 0;var r=n(5);Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return r.Field}}),Object.defineProperty(t,"FieldVue2",{enumerable:!0,get:function(){return r.FieldVue2}});var o=n(6);Object.defineProperty(t,"Form",{enumerable:!0,get:function(){return o.Form}}),Object.defineProperty(t,"FormVue2",{enumerable:!0,get:function(){return o.FormVue2}});var i=n(7);Object.defineProperty(t,"FieldArray",{enumerable:!0,get:function(){return i.FieldArray}}),Object.defineProperty(t,"FieldArrayVue2",{enumerable:!0,get:function(){return i.FieldArrayVue2}});var u=n(8);Object.defineProperty(t,"FieldWrapper",{enumerable:!0,get:function(){return u.FieldWrapper}}),Object.defineProperty(t,"FieldWrapperVue2",{enumerable:!0,get:function(){return u.FieldWrapperVue2}});var s=n(9);Object.defineProperty(t,"FormElement",{enumerable:!0,get:function(){return s.FormElement}}),Object.defineProperty(t,"FormElementVue2",{enumerable:!0,get:function(){return s.FormElementVue2}})},function(e,t,n){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldVue2=t.Field=void 0;var a=u(n(0)).h,d=n(1),l={name:"KendoField",props:{component:[String,Number,Boolean,Object],validator:[Function,Array],name:String,changeOnInput:{type:Boolean,default:!0}},created:function(){if(this.kendoForm)return this.kendoForm.registerField(this.$props.name,this.$props.validator)},inject:{kendoForm:{default:null}},methods:{handleOnChange:function(e){var t=e?void 0!==e.value?e.value:e.target?e.target.value:e.target:e;this.kendoForm.onChange(this.$props.name,{value:t}),this.$emit("change",e)},handleOnInput:function(e){var t=e?void 0!==e.value?e.value:e.target?e.target.value:e.target:e;this.changeOnInput&&this.kendoForm.onChange(this.$props.name,{value:t}),this.$emit("input",e)},onNativeComponentChange:function(e){this.kendoForm.onChange(this.$props.name,{value:e.target.value})},handleOnBlur:function(){this.kendoForm.onBlur(this.$props.name)},handleOnFocus:function(){this.kendoForm.onFocus(this.$props.name)}},setup:a?function(){return{v3:!!a}}:void 0,render:function(e){var t=a||e,n=d.getDefaultSlots(this),o=this.$props,i=o.name,u=o.component,l=(o.validator,o.id);s(o,["name","component","validator","id"]);if(!this.kendoForm)return null;var c=this.kendoForm.values[i];if("string"==typeof u&&"input"===u)return t(u,r(r({attrs:this.$attrs},this.$attrs),{onChange:this.onNativeComponentChange,onBlur:this.handleOnBlur,onFocus:this.handleOnFocus,on:this.v3?void 0:{change:this.handleOnChange,blur:this.handleOnBlur,focus:this.handleOnFocus},domProps:this.v3?void 0:{value:c||""},name:i,value:c||""}));if(u){var f=u?u.kt?u:d.templateRendering.call(this,u,d.getListeners.call(this)):null;return d.getTemplate.call(this,{h:t,template:f,additionalProps:r({value:c,validationMessage:this.kendoForm.errors[i],touched:this.kendoForm.touchedByField[i],modified:this.kendoForm.modifiedByField[i],visited:this.kendoForm.visitedByField[i],valid:!(Boolean(this.kendoForm.errors[i])&&this.kendoForm.touchedByField[i]),name:i,id:l},this.$attrs),additionalListeners:{change:this.handleOnChange,input:this.handleOnInput,blur:this.handleOnBlur,focus:this.handleOnFocus},defaultSlots:n})}}};t.FieldVue2=l;var c=l;t.Field=c},function(e,t,n){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],u=0,s=i.length;u<s;u++,o++)r[o]=i[u];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.FormVue2=t.Form=void 0;var a=n(1),d=n(2),l=u(n(0)).h,c=n(1),f={name:"KendoForm",inheritAttrs:!1,props:{renderForm:[Object,Function],initialValues:Object,validator:Function,ignoreModified:Boolean},emits:{submitclick:null,submit:null},created:function(){this._accumulatorTimeout=void 0,a.validatePackage(d.packageMetadata),this.form.values=a.clone(this.$props.initialValues)},mounted:function(){this.form.errors=this.getErrors(),this.form.allowSubmit=this.allowSubmit(),this.form.valid=this.isValid()},destroyed:l?void 0:function(){this.onDestroy()},unmounted:function(){this.onDestroy()},data:function(){return{validatorsByField:{},fields:[],unmounted:!1,form:{id:this.id,errors:{},values:{},modifiedByField:{},touchedByField:{},visitedByField:{},valid:!1,modified:!1,touched:!1,visited:!1,submitted:!1,valueGetter:this.valueGetter,allowSubmit:!1,onChange:this.onChange,onSubmit:this.onSubmit,onFormReset:this.resetForm,registerField:this.onFieldRegister,onFocus:this.onFocus,onBlur:this.onBlur,onUnshift:this.onUnshift,onPush:this.onPush,onInsert:this.onInsert,onPop:this.onPop,onRemove:this.onRemove,onReplace:this.onReplace,onMove:this.onMove}}},provide:function(){return{kendoForm:this.$data.form}},watch:{"form.values":function(){this.form.errors=this.getErrors(),this.form.allowSubmit=this.allowSubmit(),this.form.valid=this.isValid()},"form.touchedByField":function(e){this.form.touched=this.isFormTouched(e,this.fields),this.form.allowSubmit=this.allowSubmit()},"form.modifiedByField":function(e){this.form.modified=this.isFormModified(e,this.fields),this.form.allowSubmit=this.allowSubmit()},"form.visitedByField":function(e){this.form.visited=this.isFormVisited(e,this.fields)}},methods:{isValid:function(){return this.isFormValid(this.form.errors)},formErrors:function(){if(this.$props.validator)return this.$props.validator(this.form.values,this.valueGetter)},getErrors:function(){var e=this,t={},n=this.validatorsByField;return Object.keys(this.fields).forEach((function(r){if(t[r]="",n[r]){var o=[];n[r].forEach((function(e){Array.isArray(e)?o.push.apply(o,e):o.push(e)})),o.find((function(n){if(n){var o=n(e.valueGetter(r),e.valueGetter,{name:r});if(o)return t[r]=o,!0}return!1}))}})),this.formErrors()&&a.cloneObject(this.formErrors(),t),t},accumulatedForceUpdate:function(){var e=this;this._accumulatorTimeout&&clearTimeout(this._accumulatorTimeout),this._accumulatorTimeout=window.setTimeout((function(){e._accumulatorTimeout=void 0}),0)},resetForm:function(){this.form.values=a.clone(this.$props.initialValues),this.id=a.guid(),this.form.touchedByField={},this.form.visitedByField={},this.form.modifiedByField={},this.form.submitted=!1},onReset:function(){this.resetForm()},addField:function(e){this.fields[e]=!0},onSubmit:function(e){var t={},n=this.fields;e&&("function"==typeof e.preventDefault&&e.preventDefault(),"function"==typeof e.stopPropagation&&e.stopPropagation()),Object.keys(n).forEach((function(e){t[e]=!0})),this.form.visitedByField=r({},t),this.form.touchedByField=r({},t);var o=this.form.values,i=this.isValid(),u=this.isFormModified(this.form.modifiedByField,n);this.$emit("submitclick",{values:o,isValid:i,isModified:u,event:e}),i&&(this.$props.ignoreModified||u)&&(this.form.submitted=!0,this.$emit("submit",o,e))},onChange:function(e,t){var n,o=t.value;this.addField(e),this.form.modifiedByField[e]||(this.form.modifiedByField=r(r({},this.form.modifiedByField),((n={})[e]=!0,n))),this.valueSetter(e,o)},onFocus:function(e){var t;this.form.visitedByField[e]||(this.form.visitedByField=r(r({},this.form.visitedByField),((t={})[e]=!0,t)))},onBlur:function(e){var t;this.form.touchedByField[e]||(this.onFocus(e),this.form.touchedByField=r(r({},this.form.touchedByField),((t={})[e]=!0,t)))},onFieldRegister:function(e,t){var n,o=this;this.addField(e);var i=this.validatorsByField[e]||[],u=i.length;return this.validatorsByField=r(r({},this.validatorsByField),((n={})[e]=s(i,[t]),n)),this.accumulatedForceUpdate(),function(){var t;if(!o._unmounted){var n=s(o.validatorsByField[e]||[]),i=Boolean(n[u]);n[u]=void 0,o.validatorsByField=r(r({},o.validatorsByField),((t={})[e]=n,t)),i&&o.accumulatedForceUpdate()}}},isFormValid:function(e){return!Object.keys(e).some((function(t){return Boolean(e[t])}))},isFormModified:function(e,t){return Object.keys(t).some((function(t){return e[t]}))},isFormHasNotTouched:function(e,t){return Object.keys(t).some((function(t){return!e[t]}))},isFormTouched:function(e,t){return Object.keys(t).some((function(t){return e[t]}))},isFormVisited:function(e,t){return Object.keys(t).some((function(t){return e[t]}))},formHasNotTouched:function(){return this.isFormHasNotTouched(this.form.touchedByField,this.fields)},allowSubmit:function(){return this.formHasNotTouched()&&!this.isValid()||this.isValid()&&(this.$props.ignoreModified||this.isFormModified(this.form.modifiedByField,this.fields))},valueGetter:function(e){return this.form.values[e]},valueSetter:function(e,t){var n;this.form.values=r(r({},this.form.values),((n={})[e]=t,n))},onArrayAction:function(e){var t;this.addField(e),this.form.modifiedByField[e]||(this.form.modifiedByField=r(r({},this.form.modifiedByField),((t={})[e]=!0,t))),this.onBlur(e,!0)},onInsert:function(e,t){this.onArrayAction(e);var n=s(this.valueGetter(e)||[]);n.splice(t.index,0,t.value),this.valueSetter(e,n)},onUnshift:function(e,t){this.onInsert(e,{value:t.value,index:0})},onPush:function(e,t){this.onArrayAction(e);var n=s(this.valueGetter(e)||[],[t.value]);this.valueSetter(e,n)},onPop:function(e){this.onArrayAction(e);var t=s(this.valueGetter(e)||[]),n=t.pop();return this.valueSetter(e,t),n},onRemove:function(e,t){this.onArrayAction(e);var n=s(this.valueGetter(e)||[]),r=n.splice(t.index,1);return this.valueSetter(e,n),r},onReplace:function(e,t){this.onArrayAction(e);var n=s(this.valueGetter(e)||[]);n.splice(t.index,1,t.value),this.valueSetter(e,n)},onMove:function(e,t){this.onArrayAction(e);var n=s(this.valueGetter(e)||[]),r=n[t.prevIndex];n.splice(t.prevIndex,1),n.splice(t.nextIndex,0,r),this.valueSetter(e,n)},onDestroy:function(){this.unmounted=!0,this._accumulatorTimeout&&clearTimeout(this._accumulatorTimeout)}},setup:l?function(){return{v3:!!l}}:void 0,render:function(e){return c.getDefaultSlots(this)}};t.FormVue2=f;var h=f;t.Form=h},function(e,t,n){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldArrayVue2=t.FieldArray=void 0;var s=u(n(0)).h,a=n(1),d={name:"KendoFieldArray",props:{value:[String,Number,Boolean,Object,Array],component:[String,Number,Boolean,Object],validationMessage:String,touched:Boolean,modified:Boolean,validator:[Function,Array],visited:Boolean,valid:Boolean,name:String,id:String},created:function(){if(this.kendoForm)return this.kendoForm.registerField(this.$props.name,this.$props.validator)},methods:{onUnshift:function(e){this.kendoForm.onUnshift(this.$props.name,e)},onPush:function(e){this.kendoForm.onPush(this.$props.name,e)},onInsert:function(e){this.kendoForm.onInsert(this.$props.name,e)},onPop:function(){this.kendoForm.onPop(this.$props.name)},onRemove:function(e){this.kendoForm.onRemove(this.$props.name,e)},onReplace:function(e){this.kendoForm.onReplace(this.$props.name,e)},onMove:function(e){this.kendoForm.onMove(this.$props.name,e)}},setup:s?function(){return{v3:!!s}}:void 0,inject:{kendoForm:{default:null}},render:function(e){var t=s||e,n=this.$props,o=n.name,i=n.component,u=n.id;if(!this.kendoForm)return null;var d=this.kendoForm.values[o];if(i){var l=i?a.templateRendering.call(this,i,a.getListeners.call(this)):null;return a.getTemplate.call(this,{h:t,template:l,additionalProps:r({value:d,validationMessage:this.kendoForm.errors[o],touched:this.kendoForm.touchedByField[o],modified:this.kendoForm.modifiedByField[o],visited:this.kendoForm.visitedByField[o],valid:!(Boolean(this.kendoForm.errors[o])&&this.kendoForm.touchedByField[o]),name:o,id:u},this.$attrs),additionalListeners:{unshift:this.onUnshift,push:this.onPush,insert:this.onInsert,pop:this.onPop,remove:this.onRemove,replace:this.onReplace,move:this.onMove}})}}};t.FieldArrayVue2=d;var l=d;t.FieldArray=l},function(e,t,n){"use strict";var r=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldWrapperVue2=t.FieldWrapper=void 0;var u=i(n(0)).h,s=n(2),a=n(1),d={name:"KendoFieldWrapper",props:{dir:String},created:function(){a.validatePackage(s.packageMetadata)},computed:{fieldClassName:function(){return{"k-form-field":!0,"k-rtl":"rtl"===this.$props.dir}}},setup:u?function(){return{v3:!!u}}:void 0,render:function(e){var t=u||e,n=a.getDefaultSlots(this);return t("div",{class:this.fieldClassName},[n])}};t.FieldWrapperVue2=d;var l=d;t.FieldWrapper=l},function(e,t,n){"use strict";var r=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FormElementVue2=t.FormElement=void 0;var u=i(n(0)).h,s=n(2),a=n(1),d={name:"KendoFormElement",props:{horizontal:Boolean},created:function(){a.validatePackage(s.packageMetadata)},inject:{kendoForm:{default:null}},computed:{formElementClassName:function(){return{"k-form":!0,"k-form-horizontal":!0===this.$props.horizontal}}},methods:{handleSubmit:function(e){this.kendoForm&&this.kendoForm.onSubmit(e)}},setup:u?function(){return{v3:!!u}}:void 0,render:function(e){var t=u||e,n=a.getDefaultSlots(this);return t("form",{class:this.formElementClassName,onSubmit:this.handleSubmit,on:this.v3?void 0:{submit:this.handleSubmit}},[n])}};t.FormElementVue2=d;var l=d;t.FormElement=l}])}));
|
package/dist/es/Field.d.ts
CHANGED
|
@@ -34,8 +34,11 @@ export interface FieldComputed {
|
|
|
34
34
|
export interface FieldAll extends FieldMethods, FieldState, FieldData, FieldComputed, FormContextType, Vue2type {
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* @hidden
|
|
38
38
|
*/
|
|
39
39
|
declare const FieldVue2: ComponentOptions<Vue2type, DefaultData<FieldData>, DefaultMethods<FieldAll>, FieldComputed, RecordPropsDefinition<FieldProps>>;
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
40
43
|
declare let Field: DefineComponent<FieldProps, any, FieldData, FieldComputed, FieldMethods, {}, {}, {}, string, FieldProps, FieldProps, {}>;
|
|
41
44
|
export { Field, FieldVue2 };
|
package/dist/es/Field.js
CHANGED
|
@@ -33,7 +33,7 @@ var allVue = Vue;
|
|
|
33
33
|
var gh = allVue.h;
|
|
34
34
|
import { getDefaultSlots, getListeners, getTemplate, templateRendering } from '@progress/kendo-vue-common';
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* @hidden
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
39
|
var FieldVue2 = {
|
|
@@ -168,5 +168,9 @@ var FieldVue2 = {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
|
+
/**
|
|
172
|
+
* @hidden
|
|
173
|
+
*/
|
|
174
|
+
|
|
171
175
|
var Field = FieldVue2;
|
|
172
176
|
export { Field, FieldVue2 };
|
package/dist/es/FieldArray.d.ts
CHANGED
|
@@ -40,8 +40,11 @@ export interface FieldArrayComputed {
|
|
|
40
40
|
export interface FieldArrayAll extends FieldArrayMethods, FieldArrayState, FieldArrayData, FieldArrayComputed, Vue2type {
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* @hidden
|
|
44
44
|
*/
|
|
45
45
|
declare const FieldArrayVue2: ComponentOptions<Vue2type, DefaultData<FieldArrayData>, DefaultMethods<FieldArrayAll>, FieldArrayComputed, RecordPropsDefinition<FieldArrayProps>>;
|
|
46
|
+
/**
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
46
49
|
declare const FieldArray: DefineComponent<FieldArrayProps, any, FieldArrayData, FieldArrayComputed, FieldArrayMethods, {}, {}, {}, string, FieldArrayProps, FieldArrayProps, {}>;
|
|
47
50
|
export { FieldArray, FieldArrayVue2 };
|
package/dist/es/FieldArray.js
CHANGED
|
@@ -20,7 +20,7 @@ var allVue = Vue;
|
|
|
20
20
|
var gh = allVue.h;
|
|
21
21
|
import { getListeners, getTemplate, templateRendering } from '@progress/kendo-vue-common';
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* @hidden
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
var FieldArrayVue2 = {
|
|
@@ -129,5 +129,9 @@ var FieldArrayVue2 = {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
|
+
/**
|
|
133
|
+
* @hidden
|
|
134
|
+
*/
|
|
135
|
+
|
|
132
136
|
var FieldArray = FieldArrayVue2;
|
|
133
137
|
export { FieldArray, FieldArrayVue2 };
|
|
@@ -51,8 +51,11 @@ export interface FieldWrapperComputed {
|
|
|
51
51
|
export interface FieldWrapperAll extends FieldWrapperMethods, FieldWrapperState, FieldWrapperData, FieldWrapperComputed, Vue2type {
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* @hidden
|
|
55
55
|
*/
|
|
56
56
|
declare const FieldWrapperVue2: ComponentOptions<Vue2type, DefaultData<FieldWrapperData>, DefaultMethods<FieldWrapperAll>, FieldWrapperComputed, RecordPropsDefinition<FieldWrapperProps>>;
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
57
60
|
declare let FieldWrapper: DefineComponent<FieldWrapperProps, any, FieldWrapperData, FieldWrapperComputed, FieldWrapperMethods, {}, {}, {}, string, FieldWrapperProps, FieldWrapperProps, {}>;
|
|
58
61
|
export { FieldWrapper, FieldWrapperVue2 };
|
package/dist/es/FieldWrapper.js
CHANGED
|
@@ -5,7 +5,7 @@ var gh = allVue.h;
|
|
|
5
5
|
import { packageMetadata } from './package-metadata';
|
|
6
6
|
import { getDefaultSlots, validatePackage } from '@progress/kendo-vue-common';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* @hidden
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var FieldWrapperVue2 = {
|
|
@@ -39,5 +39,9 @@ var FieldWrapperVue2 = {
|
|
|
39
39
|
}, [defaultSlots]);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* @hidden
|
|
44
|
+
*/
|
|
45
|
+
|
|
42
46
|
var FieldWrapper = FieldWrapperVue2;
|
|
43
47
|
export { FieldWrapper, FieldWrapperVue2 };
|
package/dist/es/Form.d.ts
CHANGED
|
@@ -52,8 +52,11 @@ export interface FormComputed {
|
|
|
52
52
|
export interface FormAll extends FormMethods, FormState, FormData, FormComputed, Vue2type {
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* @hidden
|
|
56
56
|
*/
|
|
57
57
|
declare const FormVue2: ComponentOptions<Vue2type, DefaultData<FormData>, DefaultMethods<FormAll>, FormComputed, RecordPropsDefinition<FormProps>>;
|
|
58
|
+
/**
|
|
59
|
+
* @hidden
|
|
60
|
+
*/
|
|
58
61
|
declare const Form: DefineComponent<FormProps, any, FormData, FormComputed, FormMethods, {}, {}, {}, string, FormProps, FormProps, {}>;
|
|
59
62
|
export { Form, FormVue2 };
|
package/dist/es/Form.js
CHANGED
|
@@ -41,7 +41,7 @@ import { getDefaultSlots } from '@progress/kendo-vue-common';
|
|
|
41
41
|
|
|
42
42
|
var FORCEUPDATE_ACCUMULATOR_TIMEOUT = 0;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* @hidden
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
47
|
var FormVue2 = {
|
|
@@ -462,5 +462,9 @@ var FormVue2 = {
|
|
|
462
462
|
return defaultSlots;
|
|
463
463
|
}
|
|
464
464
|
};
|
|
465
|
+
/**
|
|
466
|
+
* @hidden
|
|
467
|
+
*/
|
|
468
|
+
|
|
465
469
|
var Form = FormVue2;
|
|
466
470
|
export { Form, FormVue2 };
|
package/dist/es/FormElement.d.ts
CHANGED
|
@@ -53,8 +53,11 @@ export interface FormElementComputed {
|
|
|
53
53
|
export interface FormElementAll extends FormElementMethods, FormElementState, FormElementData, FormElementComputed, FormContextType, Vue2type {
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* @hidden
|
|
57
57
|
*/
|
|
58
58
|
declare const FormElementVue2: ComponentOptions<Vue2type, DefaultData<FormElementData>, DefaultMethods<FormElementAll>, FormElementComputed, RecordPropsDefinition<FormElementProps>>;
|
|
59
|
+
/**
|
|
60
|
+
* @hidden
|
|
61
|
+
*/
|
|
59
62
|
declare let FormElement: DefineComponent<FormElementProps, any, FormElementData, FormElementComputed, FormElementMethods, {}, {}, {}, string, FormElementProps, FormElementProps, {}>;
|
|
60
63
|
export { FormElement, FormElementVue2 };
|
package/dist/es/FormElement.js
CHANGED
|
@@ -5,7 +5,7 @@ var gh = allVue.h;
|
|
|
5
5
|
import { packageMetadata } from './package-metadata';
|
|
6
6
|
import { getDefaultSlots, validatePackage } from '@progress/kendo-vue-common';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* @hidden
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var FormElementVue2 = {
|
|
@@ -55,5 +55,9 @@ var FormElementVue2 = {
|
|
|
55
55
|
}, [defaultSlots]);
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* @hidden
|
|
60
|
+
*/
|
|
61
|
+
|
|
58
62
|
var FormElement = FormElementVue2;
|
|
59
63
|
export { FormElement, FormElementVue2 };
|
|
@@ -2,9 +2,20 @@
|
|
|
2
2
|
import { DefineComponent } from 'vue';
|
|
3
3
|
// @ts-ignore
|
|
4
4
|
import * as Vue from 'vue';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
5
9
|
// @ts-ignore
|
|
6
10
|
type Vue2type = Vue.default;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
7
15
|
// @ts-ignore
|
|
8
16
|
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
9
20
|
// @ts-ignore
|
|
10
21
|
export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
|
|
@@ -9,7 +9,7 @@ export interface FieldArrayProps {
|
|
|
9
9
|
name: string;
|
|
10
10
|
/**
|
|
11
11
|
* Can be set to a Vue component.
|
|
12
|
-
* [`FieldArrayRenderProps`]({% slug
|
|
12
|
+
* [`FieldArrayRenderProps`]({% slug api_form_fieldarrayprops %}).
|
|
13
13
|
*/
|
|
14
14
|
component: any;
|
|
15
15
|
/**
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the props that are passed from the Form component to the components nested inside it.
|
|
3
|
+
* To use the [KendoFrom Injected Property]({% slug api_form_kendoform_injected_property %}) it should be
|
|
4
|
+
* [injected](https://v3.vuejs.org/guide/component-provide-inject.html) it in the component that defines the Form content using the below code.
|
|
5
|
+
*
|
|
6
|
+
* ```js-no-run
|
|
7
|
+
* ...........
|
|
8
|
+
* inject: {
|
|
9
|
+
* kendoForm: { default: {} },
|
|
10
|
+
* }
|
|
11
|
+
* ...........
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export interface FieldInjectedProps {
|
|
15
|
+
/**
|
|
16
|
+
* Indicates if the Form is ready to be submitted.
|
|
17
|
+
* If `allowSubmit` is set to `true` and the Form is valid, the user will be able to submit the form.
|
|
18
|
+
* If `allowSubmit` is set to `true` and the Form is not valid, the user will be able to set all fields
|
|
19
|
+
* `touched` and `visited` state to true.
|
|
20
|
+
* Useful for toggling the disabled state of the **Submit** button.
|
|
21
|
+
*/
|
|
22
|
+
allowSubmit?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The key-value pair containing the current errors by field path, combined from both field and form level validators.
|
|
25
|
+
*/
|
|
26
|
+
errors?: object;
|
|
27
|
+
/**
|
|
28
|
+
* Indicates if the Form is modified. If any field is modified, `modified` is set to `true`.
|
|
29
|
+
* The modified state of field is set to `true` when the `onChange`
|
|
30
|
+
* callback of the Field component is called for first time.
|
|
31
|
+
*/
|
|
32
|
+
modified: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* An object that holds the `modified` fields.
|
|
35
|
+
*/
|
|
36
|
+
modifiedByField: object;
|
|
37
|
+
/**
|
|
38
|
+
* Indicates if the Form is successfuly submitted.
|
|
39
|
+
* Useful for detecting if user is leaving the form before saving changes.
|
|
40
|
+
*/
|
|
41
|
+
submitted: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Indicates if the Form is touched.
|
|
44
|
+
* If any field is touched, `touched` is set to `true`.
|
|
45
|
+
* The touched state of field is set to `true` when the `onBlur`
|
|
46
|
+
* callback of the Field component is called or when the user tries to submit the form.
|
|
47
|
+
*/
|
|
48
|
+
touched: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* An object that holds the `touched` fields.
|
|
51
|
+
*/
|
|
52
|
+
touchedByField: object;
|
|
53
|
+
/**
|
|
54
|
+
* Indicates if the Form is valid.
|
|
55
|
+
* If any field is invalid, `valid` is set to `false`.
|
|
56
|
+
*/
|
|
57
|
+
valid: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* A callback for getting the value of a field without using the Field component
|
|
60
|
+
* ([see example]({% slug common_scenarios_form %}#toc-reading-the-field-state)).
|
|
61
|
+
* Useful for creating and modifying the UI based on the field values.
|
|
62
|
+
*/
|
|
63
|
+
valueGetter: (name: string) => any;
|
|
64
|
+
/**
|
|
65
|
+
* Indicates if the Form is visited.
|
|
66
|
+
* If any field is visited, `visited` is set to `true`.
|
|
67
|
+
* The visited state of field is set to `true` when the `onFocus`
|
|
68
|
+
* callback of the Field component is called or when the user tries to submit the form.
|
|
69
|
+
*/
|
|
70
|
+
visited: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* An object that holds the `visited` fields.
|
|
73
|
+
*/
|
|
74
|
+
visitedByField: object;
|
|
75
|
+
/**
|
|
76
|
+
* A callback for resetting the Form.
|
|
77
|
+
*/
|
|
78
|
+
onFormReset: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* A callback for submitting the Form.
|
|
81
|
+
* Can be passed to the `onClick` property of the **Submit** button.
|
|
82
|
+
*/
|
|
83
|
+
onSubmit: (event: any) => void;
|
|
84
|
+
/**
|
|
85
|
+
* A callback you have to call when the rendered component is blurred.
|
|
86
|
+
* Responsible for setting the touched state of the Field.
|
|
87
|
+
*/
|
|
88
|
+
onBlur: () => void;
|
|
89
|
+
/**
|
|
90
|
+
* A callback you have to call when the value of the rendered component is changed
|
|
91
|
+
* ([see example]({% slug common_scenarios_form %}#toc-changing-the-field-value)).
|
|
92
|
+
* The `value` property of the event takes precedence over `target.value`.
|
|
93
|
+
*/
|
|
94
|
+
onChange: (event: {
|
|
95
|
+
target?: any;
|
|
96
|
+
value?: any;
|
|
97
|
+
}) => void;
|
|
98
|
+
/**
|
|
99
|
+
* A callback you have to call when the rendered component is focused.
|
|
100
|
+
* Responsible for setting the visited state of the Field.
|
|
101
|
+
*/
|
|
102
|
+
onFocus: () => void;
|
|
103
|
+
/**
|
|
104
|
+
* ## Functions used in FieldArray component
|
|
105
|
+
*/
|
|
106
|
+
/**
|
|
107
|
+
* A callback to insert value at given index of the array.
|
|
108
|
+
*/
|
|
109
|
+
onInsert: (options: {
|
|
110
|
+
index: number;
|
|
111
|
+
value: any;
|
|
112
|
+
}) => void;
|
|
113
|
+
/**
|
|
114
|
+
* A callback to move a value from one index to another. Useful for drag and drop reordering.
|
|
115
|
+
*/
|
|
116
|
+
onMove: (options: {
|
|
117
|
+
nextIndex: number;
|
|
118
|
+
prevIndex: number;
|
|
119
|
+
}) => void;
|
|
120
|
+
/**
|
|
121
|
+
* A callback to remove a value from the end of the array. The value is returned.
|
|
122
|
+
*/
|
|
123
|
+
onPop: () => any;
|
|
124
|
+
/**
|
|
125
|
+
* A callback to add a value to the end of the array.
|
|
126
|
+
*/
|
|
127
|
+
onPush: (options: {
|
|
128
|
+
value: any;
|
|
129
|
+
}) => void;
|
|
130
|
+
/**
|
|
131
|
+
* A callback to remove a value from given index of the array.
|
|
132
|
+
*/
|
|
133
|
+
onRemove: (options: {
|
|
134
|
+
index: number;
|
|
135
|
+
}) => any;
|
|
136
|
+
/**
|
|
137
|
+
* A callback to replace value at given index of the array.
|
|
138
|
+
*/
|
|
139
|
+
onReplace: (options: {
|
|
140
|
+
index: number;
|
|
141
|
+
value: any;
|
|
142
|
+
}) => void;
|
|
143
|
+
/**
|
|
144
|
+
* A callback to add a value to the beginning of the array.
|
|
145
|
+
*/
|
|
146
|
+
onUnshift: (options: {
|
|
147
|
+
value: any;
|
|
148
|
+
}) => number;
|
|
149
|
+
}
|
|
File without changes
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-vue-form',
|
|
6
6
|
productName: 'Kendo UI for Vue',
|
|
7
7
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1655213597,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
11
11
|
};
|
package/dist/npm/Field.d.ts
CHANGED
|
@@ -34,8 +34,11 @@ export interface FieldComputed {
|
|
|
34
34
|
export interface FieldAll extends FieldMethods, FieldState, FieldData, FieldComputed, FormContextType, Vue2type {
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* @hidden
|
|
38
38
|
*/
|
|
39
39
|
declare const FieldVue2: ComponentOptions<Vue2type, DefaultData<FieldData>, DefaultMethods<FieldAll>, FieldComputed, RecordPropsDefinition<FieldProps>>;
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
40
43
|
declare let Field: DefineComponent<FieldProps, any, FieldData, FieldComputed, FieldMethods, {}, {}, {}, string, FieldProps, FieldProps, {}>;
|
|
41
44
|
export { Field, FieldVue2 };
|
package/dist/npm/Field.js
CHANGED
|
@@ -41,7 +41,7 @@ var gh = allVue.h;
|
|
|
41
41
|
|
|
42
42
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* @hidden
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
47
|
|
|
@@ -178,5 +178,9 @@ var FieldVue2 = {
|
|
|
178
178
|
}
|
|
179
179
|
};
|
|
180
180
|
exports.FieldVue2 = FieldVue2;
|
|
181
|
+
/**
|
|
182
|
+
* @hidden
|
|
183
|
+
*/
|
|
184
|
+
|
|
181
185
|
var Field = FieldVue2;
|
|
182
186
|
exports.Field = Field;
|
package/dist/npm/FieldArray.d.ts
CHANGED
|
@@ -40,8 +40,11 @@ export interface FieldArrayComputed {
|
|
|
40
40
|
export interface FieldArrayAll extends FieldArrayMethods, FieldArrayState, FieldArrayData, FieldArrayComputed, Vue2type {
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* @hidden
|
|
44
44
|
*/
|
|
45
45
|
declare const FieldArrayVue2: ComponentOptions<Vue2type, DefaultData<FieldArrayData>, DefaultMethods<FieldArrayAll>, FieldArrayComputed, RecordPropsDefinition<FieldArrayProps>>;
|
|
46
|
+
/**
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
46
49
|
declare const FieldArray: DefineComponent<FieldArrayProps, any, FieldArrayData, FieldArrayComputed, FieldArrayMethods, {}, {}, {}, string, FieldArrayProps, FieldArrayProps, {}>;
|
|
47
50
|
export { FieldArray, FieldArrayVue2 };
|
package/dist/npm/FieldArray.js
CHANGED
|
@@ -28,7 +28,7 @@ var gh = allVue.h;
|
|
|
28
28
|
|
|
29
29
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* @hidden
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
|
|
@@ -139,5 +139,9 @@ var FieldArrayVue2 = {
|
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
exports.FieldArrayVue2 = FieldArrayVue2;
|
|
142
|
+
/**
|
|
143
|
+
* @hidden
|
|
144
|
+
*/
|
|
145
|
+
|
|
142
146
|
var FieldArray = FieldArrayVue2;
|
|
143
147
|
exports.FieldArray = FieldArray;
|
|
@@ -51,8 +51,11 @@ export interface FieldWrapperComputed {
|
|
|
51
51
|
export interface FieldWrapperAll extends FieldWrapperMethods, FieldWrapperState, FieldWrapperData, FieldWrapperComputed, Vue2type {
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* @hidden
|
|
55
55
|
*/
|
|
56
56
|
declare const FieldWrapperVue2: ComponentOptions<Vue2type, DefaultData<FieldWrapperData>, DefaultMethods<FieldWrapperAll>, FieldWrapperComputed, RecordPropsDefinition<FieldWrapperProps>>;
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
57
60
|
declare let FieldWrapper: DefineComponent<FieldWrapperProps, any, FieldWrapperData, FieldWrapperComputed, FieldWrapperMethods, {}, {}, {}, string, FieldWrapperProps, FieldWrapperProps, {}>;
|
|
58
61
|
export { FieldWrapper, FieldWrapperVue2 };
|
package/dist/npm/FieldWrapper.js
CHANGED
|
@@ -14,7 +14,7 @@ var package_metadata_1 = require("./package-metadata");
|
|
|
14
14
|
|
|
15
15
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* @hidden
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
|
|
@@ -50,5 +50,9 @@ var FieldWrapperVue2 = {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
exports.FieldWrapperVue2 = FieldWrapperVue2;
|
|
53
|
+
/**
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
56
|
+
|
|
53
57
|
var FieldWrapper = FieldWrapperVue2;
|
|
54
58
|
exports.FieldWrapper = FieldWrapper;
|
package/dist/npm/Form.d.ts
CHANGED
|
@@ -52,8 +52,11 @@ export interface FormComputed {
|
|
|
52
52
|
export interface FormAll extends FormMethods, FormState, FormData, FormComputed, Vue2type {
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* @hidden
|
|
56
56
|
*/
|
|
57
57
|
declare const FormVue2: ComponentOptions<Vue2type, DefaultData<FormData>, DefaultMethods<FormAll>, FormComputed, RecordPropsDefinition<FormProps>>;
|
|
58
|
+
/**
|
|
59
|
+
* @hidden
|
|
60
|
+
*/
|
|
58
61
|
declare const Form: DefineComponent<FormProps, any, FormData, FormComputed, FormMethods, {}, {}, {}, string, FormProps, FormProps, {}>;
|
|
59
62
|
export { Form, FormVue2 };
|
package/dist/npm/Form.js
CHANGED
|
@@ -53,7 +53,7 @@ var kendo_vue_common_2 = require("@progress/kendo-vue-common");
|
|
|
53
53
|
|
|
54
54
|
var FORCEUPDATE_ACCUMULATOR_TIMEOUT = 0;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* @hidden
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
59
|
var FormVue2 = {
|
|
@@ -475,5 +475,9 @@ var FormVue2 = {
|
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
477
|
exports.FormVue2 = FormVue2;
|
|
478
|
+
/**
|
|
479
|
+
* @hidden
|
|
480
|
+
*/
|
|
481
|
+
|
|
478
482
|
var Form = FormVue2;
|
|
479
483
|
exports.Form = Form;
|
|
@@ -53,8 +53,11 @@ export interface FormElementComputed {
|
|
|
53
53
|
export interface FormElementAll extends FormElementMethods, FormElementState, FormElementData, FormElementComputed, FormContextType, Vue2type {
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* @hidden
|
|
57
57
|
*/
|
|
58
58
|
declare const FormElementVue2: ComponentOptions<Vue2type, DefaultData<FormElementData>, DefaultMethods<FormElementAll>, FormElementComputed, RecordPropsDefinition<FormElementProps>>;
|
|
59
|
+
/**
|
|
60
|
+
* @hidden
|
|
61
|
+
*/
|
|
59
62
|
declare let FormElement: DefineComponent<FormElementProps, any, FormElementData, FormElementComputed, FormElementMethods, {}, {}, {}, string, FormElementProps, FormElementProps, {}>;
|
|
60
63
|
export { FormElement, FormElementVue2 };
|
package/dist/npm/FormElement.js
CHANGED
|
@@ -14,7 +14,7 @@ var package_metadata_1 = require("./package-metadata");
|
|
|
14
14
|
|
|
15
15
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* @hidden
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
|
|
@@ -66,5 +66,9 @@ var FormElementVue2 = {
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
exports.FormElementVue2 = FormElementVue2;
|
|
69
|
+
/**
|
|
70
|
+
* @hidden
|
|
71
|
+
*/
|
|
72
|
+
|
|
69
73
|
var FormElement = FormElementVue2;
|
|
70
74
|
exports.FormElement = FormElement;
|
|
@@ -2,9 +2,20 @@
|
|
|
2
2
|
import { DefineComponent } from 'vue';
|
|
3
3
|
// @ts-ignore
|
|
4
4
|
import * as Vue from 'vue';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
5
9
|
// @ts-ignore
|
|
6
10
|
type Vue2type = Vue.default;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
7
15
|
// @ts-ignore
|
|
8
16
|
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
9
20
|
// @ts-ignore
|
|
10
21
|
export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
|
|
@@ -9,7 +9,7 @@ export interface FieldArrayProps {
|
|
|
9
9
|
name: string;
|
|
10
10
|
/**
|
|
11
11
|
* Can be set to a Vue component.
|
|
12
|
-
* [`FieldArrayRenderProps`]({% slug
|
|
12
|
+
* [`FieldArrayRenderProps`]({% slug api_form_fieldarrayprops %}).
|
|
13
13
|
*/
|
|
14
14
|
component: any;
|
|
15
15
|
/**
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the props that are passed from the Form component to the components nested inside it.
|
|
3
|
+
* To use the [KendoFrom Injected Property]({% slug api_form_kendoform_injected_property %}) it should be
|
|
4
|
+
* [injected](https://v3.vuejs.org/guide/component-provide-inject.html) it in the component that defines the Form content using the below code.
|
|
5
|
+
*
|
|
6
|
+
* ```js-no-run
|
|
7
|
+
* ...........
|
|
8
|
+
* inject: {
|
|
9
|
+
* kendoForm: { default: {} },
|
|
10
|
+
* }
|
|
11
|
+
* ...........
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export interface FieldInjectedProps {
|
|
15
|
+
/**
|
|
16
|
+
* Indicates if the Form is ready to be submitted.
|
|
17
|
+
* If `allowSubmit` is set to `true` and the Form is valid, the user will be able to submit the form.
|
|
18
|
+
* If `allowSubmit` is set to `true` and the Form is not valid, the user will be able to set all fields
|
|
19
|
+
* `touched` and `visited` state to true.
|
|
20
|
+
* Useful for toggling the disabled state of the **Submit** button.
|
|
21
|
+
*/
|
|
22
|
+
allowSubmit?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The key-value pair containing the current errors by field path, combined from both field and form level validators.
|
|
25
|
+
*/
|
|
26
|
+
errors?: object;
|
|
27
|
+
/**
|
|
28
|
+
* Indicates if the Form is modified. If any field is modified, `modified` is set to `true`.
|
|
29
|
+
* The modified state of field is set to `true` when the `onChange`
|
|
30
|
+
* callback of the Field component is called for first time.
|
|
31
|
+
*/
|
|
32
|
+
modified: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* An object that holds the `modified` fields.
|
|
35
|
+
*/
|
|
36
|
+
modifiedByField: object;
|
|
37
|
+
/**
|
|
38
|
+
* Indicates if the Form is successfuly submitted.
|
|
39
|
+
* Useful for detecting if user is leaving the form before saving changes.
|
|
40
|
+
*/
|
|
41
|
+
submitted: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Indicates if the Form is touched.
|
|
44
|
+
* If any field is touched, `touched` is set to `true`.
|
|
45
|
+
* The touched state of field is set to `true` when the `onBlur`
|
|
46
|
+
* callback of the Field component is called or when the user tries to submit the form.
|
|
47
|
+
*/
|
|
48
|
+
touched: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* An object that holds the `touched` fields.
|
|
51
|
+
*/
|
|
52
|
+
touchedByField: object;
|
|
53
|
+
/**
|
|
54
|
+
* Indicates if the Form is valid.
|
|
55
|
+
* If any field is invalid, `valid` is set to `false`.
|
|
56
|
+
*/
|
|
57
|
+
valid: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* A callback for getting the value of a field without using the Field component
|
|
60
|
+
* ([see example]({% slug common_scenarios_form %}#toc-reading-the-field-state)).
|
|
61
|
+
* Useful for creating and modifying the UI based on the field values.
|
|
62
|
+
*/
|
|
63
|
+
valueGetter: (name: string) => any;
|
|
64
|
+
/**
|
|
65
|
+
* Indicates if the Form is visited.
|
|
66
|
+
* If any field is visited, `visited` is set to `true`.
|
|
67
|
+
* The visited state of field is set to `true` when the `onFocus`
|
|
68
|
+
* callback of the Field component is called or when the user tries to submit the form.
|
|
69
|
+
*/
|
|
70
|
+
visited: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* An object that holds the `visited` fields.
|
|
73
|
+
*/
|
|
74
|
+
visitedByField: object;
|
|
75
|
+
/**
|
|
76
|
+
* A callback for resetting the Form.
|
|
77
|
+
*/
|
|
78
|
+
onFormReset: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* A callback for submitting the Form.
|
|
81
|
+
* Can be passed to the `onClick` property of the **Submit** button.
|
|
82
|
+
*/
|
|
83
|
+
onSubmit: (event: any) => void;
|
|
84
|
+
/**
|
|
85
|
+
* A callback you have to call when the rendered component is blurred.
|
|
86
|
+
* Responsible for setting the touched state of the Field.
|
|
87
|
+
*/
|
|
88
|
+
onBlur: () => void;
|
|
89
|
+
/**
|
|
90
|
+
* A callback you have to call when the value of the rendered component is changed
|
|
91
|
+
* ([see example]({% slug common_scenarios_form %}#toc-changing-the-field-value)).
|
|
92
|
+
* The `value` property of the event takes precedence over `target.value`.
|
|
93
|
+
*/
|
|
94
|
+
onChange: (event: {
|
|
95
|
+
target?: any;
|
|
96
|
+
value?: any;
|
|
97
|
+
}) => void;
|
|
98
|
+
/**
|
|
99
|
+
* A callback you have to call when the rendered component is focused.
|
|
100
|
+
* Responsible for setting the visited state of the Field.
|
|
101
|
+
*/
|
|
102
|
+
onFocus: () => void;
|
|
103
|
+
/**
|
|
104
|
+
* ## Functions used in FieldArray component
|
|
105
|
+
*/
|
|
106
|
+
/**
|
|
107
|
+
* A callback to insert value at given index of the array.
|
|
108
|
+
*/
|
|
109
|
+
onInsert: (options: {
|
|
110
|
+
index: number;
|
|
111
|
+
value: any;
|
|
112
|
+
}) => void;
|
|
113
|
+
/**
|
|
114
|
+
* A callback to move a value from one index to another. Useful for drag and drop reordering.
|
|
115
|
+
*/
|
|
116
|
+
onMove: (options: {
|
|
117
|
+
nextIndex: number;
|
|
118
|
+
prevIndex: number;
|
|
119
|
+
}) => void;
|
|
120
|
+
/**
|
|
121
|
+
* A callback to remove a value from the end of the array. The value is returned.
|
|
122
|
+
*/
|
|
123
|
+
onPop: () => any;
|
|
124
|
+
/**
|
|
125
|
+
* A callback to add a value to the end of the array.
|
|
126
|
+
*/
|
|
127
|
+
onPush: (options: {
|
|
128
|
+
value: any;
|
|
129
|
+
}) => void;
|
|
130
|
+
/**
|
|
131
|
+
* A callback to remove a value from given index of the array.
|
|
132
|
+
*/
|
|
133
|
+
onRemove: (options: {
|
|
134
|
+
index: number;
|
|
135
|
+
}) => any;
|
|
136
|
+
/**
|
|
137
|
+
* A callback to replace value at given index of the array.
|
|
138
|
+
*/
|
|
139
|
+
onReplace: (options: {
|
|
140
|
+
index: number;
|
|
141
|
+
value: any;
|
|
142
|
+
}) => void;
|
|
143
|
+
/**
|
|
144
|
+
* A callback to add a value to the beginning of the array.
|
|
145
|
+
*/
|
|
146
|
+
onUnshift: (options: {
|
|
147
|
+
value: any;
|
|
148
|
+
}) => number;
|
|
149
|
+
}
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-vue-form',
|
|
9
9
|
productName: 'Kendo UI for Vue',
|
|
10
10
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1655213597,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
14
14
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-form",
|
|
3
3
|
"description": "Kendo UI for Vue Form package",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.5-dev.202206141337",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/telerik/kendo-vue.git"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"vue": "^2.6.12 || ^3.0.2"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@progress/kendo-vue-common": "3.3.
|
|
36
|
+
"@progress/kendo-vue-common": "3.3.5-dev.202206141337"
|
|
37
37
|
},
|
|
38
38
|
"@progress": {
|
|
39
39
|
"friendlyName": "Form",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
"@progress/kendo-date-math": "^1.4.1",
|
|
50
50
|
"@progress/kendo-drawing": "^1.8.0",
|
|
51
51
|
"@progress/kendo-licensing": "^1.1.0",
|
|
52
|
-
"@progress/kendo-vue-buttons": "3.3.
|
|
53
|
-
"@progress/kendo-vue-data-tools": "3.3.
|
|
54
|
-
"@progress/kendo-vue-dateinputs": "3.3.
|
|
55
|
-
"@progress/kendo-vue-dropdowns": "3.3.
|
|
56
|
-
"@progress/kendo-vue-grid": "3.3.
|
|
57
|
-
"@progress/kendo-vue-inputs": "3.3.
|
|
58
|
-
"@progress/kendo-vue-intl": "3.3.
|
|
59
|
-
"@progress/kendo-vue-labels": "3.3.
|
|
60
|
-
"@progress/kendo-vue-layout": "3.3.
|
|
61
|
-
"@progress/kendo-vue-upload": "3.3.
|
|
52
|
+
"@progress/kendo-vue-buttons": "3.3.5-dev.202206141337",
|
|
53
|
+
"@progress/kendo-vue-data-tools": "3.3.5-dev.202206141337",
|
|
54
|
+
"@progress/kendo-vue-dateinputs": "3.3.5-dev.202206141337",
|
|
55
|
+
"@progress/kendo-vue-dropdowns": "3.3.5-dev.202206141337",
|
|
56
|
+
"@progress/kendo-vue-grid": "3.3.5-dev.202206141337",
|
|
57
|
+
"@progress/kendo-vue-inputs": "3.3.5-dev.202206141337",
|
|
58
|
+
"@progress/kendo-vue-intl": "3.3.5-dev.202206141337",
|
|
59
|
+
"@progress/kendo-vue-labels": "3.3.5-dev.202206141337",
|
|
60
|
+
"@progress/kendo-vue-layout": "3.3.5-dev.202206141337",
|
|
61
|
+
"@progress/kendo-vue-upload": "3.3.5-dev.202206141337"
|
|
62
62
|
}
|
|
63
63
|
}
|