@progress/kendo-vue-tooltip 2.7.2 → 2.8.0-dev.202201121019

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.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define(["vue","@progress/kendo-licensing"],e):"object"==typeof exports?exports.KendoVueTooltip=e(require("vue"),require("@progress/kendo-licensing")):t.KendoVueTooltip=e(t.Vue,t.KendoLicensing)}(window,(function(t,e){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},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,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tooltip=void 0;var o=n(3);Object.defineProperty(e,"Tooltip",{enumerable:!0,get:function(){return o.Tooltip}})},function(t,e,n){"use strict";var o=function(){return(o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]},r=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&i(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.TooltipVue3=e.Tooltip=void 0;var u=s(n(0)).h,l=n(6),a=n(4),c=n(5),p={name:"KendoTooltip",inheritAttrs:!1,props:{showCallout:{type:Boolean,default:!0},setCalloutOnPositionAuto:{type:Number,default:void 0},anchorElement:{type:String,default:"pointer",validator:function(t){return["pointer","target"].includes(t)}},content:[String,Object,Function],filter:Function,openDelay:{type:Number,default:400},open:{type:Boolean,default:void 0},position:{type:String,default:"auto",validator:function(t){return["right","left","top","bottom","auto"].includes(t)}},updateInterval:Number,className:String,wrapperStyle:Object,tooltipClassName:String,tooltipStyle:Object,targetElement:Object,parentTitle:{type:Boolean,default:!1}},data:function(){return{top:0,left:0,currentTargetElement:null,currentOpen:!1,title:""}},computed:{wrapperClass:function(){var t;return(t={"k-animation-container":!0,"k-animation-container-fixed":!0,"k-animation-container-shown":!0})[this.$props.className]=!0,t},computedTarget:function(){return void 0!==this.targetElement?this.targetElement:this.currentTargetElement},computedOpen:function(){return void 0!==this.open?this.open:this.currentOpen}},inject:{kendoContext:{default:null}},created:function(){l.validatePackage(c.packageMetadata),this.top=0,this.left=0,this.willOpen=!1,this.context=this.kendoContext||void 0},mounted:function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},destroyed:u?void 0:function(){this.destroyElement()},unmounted:function(){this.destroyElement()},updated:function(){if(this.element=this.v3?this.elementRef:this.$refs.element,this.element){var t;if(t=this.$props.onPosition?this.$props.onPosition.call(void 0,{element:this.element,targetElement:this.computedTarget,mouseTop:this.top,mouseLeft:this.left,anchorElement:this.$props.anchorElement,position:this.$props.position,target:this}):this.setPosition(this.element),this.element.style.left=t.left+"px",this.element.style.top=t.top+"px",this.computedTarget){var e=this.$props.appendTo?this.$props.appendTo:this.computedTarget.ownerDocument.body;this.element.parentElement!==e&&this.computedTarget.ownerDocument.body.append(this.element)}this.callout=this.v3?this.calloutRef:this.$refs.callout,this.callout&&(this.callout.className=this.calloutClassName(),"auto"===this.$props.position&&(this.left<window.screen.availWidth/2?this.callout.style.left=this.$props.setCalloutOnPositionAuto||"25%":this.callout.style.left=this.$props.setCalloutOnPositionAuto||"75%"))}},setup:u?function(){return{v3:!!u}}:void 0,render:function(t){var e=this,n=u||t,i=l.getDefaultSlots(this),r=this.getCurrentZIndex(),s=this.$props.content?l.templateRendering.call(this,this.$props.content,l.getListeners.call(this)):void 0,a=this.title,c=l.getTemplate.call(this,{h:n,template:s,defaultRendering:a,additionalProps:{title:this.title,target:this.computedTarget}}),p=this.computedOpen&&n("div",{class:l.classNames("k-tooltip",this.$props.tooltipClassName),style:o({position:"relative"},this.$props.tooltipStyle)},[n("div",{class:"k-tooltip-content"},[c]),this.$props.showCallout&&n("div",{ref:this.v3?function(t){e.calloutRef=t}:"callout"})]),d=this.computedTarget&&this.title&&this.computedTarget.ownerDocument&&n("div",{ref:this.v3?function(t){e.elementRef=t}:"element",class:this.wrapperClass,style:o({zIndex:r},this.$props.wrapperStyle),tabIndex:0,attrs:this.v3?void 0:{tabIndex:0}},[p]);return i?n("div",{onMouseover:this.handleMouseOver,on:this.v3?void 0:{mouseover:this.handleMouseOver,mouseout:this.handleMouseOut},onMouseout:this.handleMouseOut},[d,i]):d},methods:{destroyElement:function(){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove),this.element&&this.element.remove()},handleMouseOut:function(t){var e=this.computedTarget?this.computedTarget.ownerDocument:document,n=e&&e.elementFromPoint(t.clientX,t.clientY);a.isTooltipElement(n)||this.$props.open||(clearInterval(this.updateIntervalId),this.willOpen=!1,this.onClose(t))},handleMouseOver:function(t){var e=t.target;this.isVisible(e)&&!a.isTooltipElement(e)&&e!==this.computedTarget&&this.showToolTip(t)},handleBodyMousemove:function(t){this.top=t.clientY,this.left=t.clientX},onClose:function(t){this.$emit("close",{event:t,component:this}),this.currentTargetElement=null,this.currentOpen=!1,this.title=""},showToolTip:function(t){var e=this;clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),t.target.hasChildNodes()&&t.target.childNodes.forEach((function(e){"title"===e.nodeName&&(t.target.titleExpando=e.innerHTML,e.remove())}));var n=this.computedTarget||t.target,o=this.getTitle(n);o.title?(o.element&&(o.element.titleExpando=o.title,o.element.title=""),this.willOpen=!0,this.$props.openDelay?this.openTimeoutId=window.setTimeout((function(){e.willOpen&&(e.currentTargetElement=n,e.currentOpen=!0,e.title=o.title,e.setUpdateInterval())}),this.$props.openDelay):(this.currentTargetElement=n,this.currentOpen=!0,this.title=o.title,this.setUpdateInterval()),this.title!==o.title&&this.$emit("open",{event:t,compoponent:this})):this.computedOpen&&this.onClose(t)},setUpdateInterval:function(){this.$props.updateInterval&&(this.updateIntervalId=setInterval(this.onIntervalUpdate,this.$props.updateInterval))},onIntervalUpdate:function(){var t=this.computedTarget;t&&(null===t.parentElement?this.onClose({target:t}):this.showToolTip({target:t}))},isVisible:function(t){return!this.$props.filter||this.$props.filter(t)},setPosition:function(t){var e=a.getDomRect(this.computedTarget);return{left:a.getLeftPosition(this.left,t.offsetWidth,e,this.$props.anchorElement,this.$props.position),top:a.getTopPosition(this.top,e,t.offsetHeight,this.$props.anchorElement,this.$props.position)}},getTitle:function(t){for(;t;){if(null!==t.getAttribute("title")||t.titleExpando)return{title:t.getAttribute("title")||t.titleExpando,element:t};t=this.$props.parentTitle&&t.parentElement||null}return{title:"",element:t}},calloutClassName:function(){switch(this.$props.position){case"bottom":return"k-callout k-callout-n";case"left":return"k-callout k-callout-e";case"right":return"k-callout k-callout-w";case"top":return"k-callout k-callout-s";default:return this.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},getCurrentZIndex:function(){return this.context?this.context:100}}};e.Tooltip=p;var d=p;e.TooltipVue3=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTooltipElement=e.toolTipSelectors=e.getDomRect=e.getTopPosition=e.getLeftPosition=void 0;e.getLeftPosition=function(t,e,n,o,i){switch(i){case"bottom":return"pointer"===o?t-e/2:n.left-e/2+n.width/2;case"left":return"pointer"===o?t-e-10:n.left-e-10;case"right":return"pointer"===o?t+10:n.right+10;case"top":return"pointer"===o?t-e/2:n.left-e/2+n.width/2;default:return"pointer"===o?t<window.screen.availWidth/2?t-10:t-e+10:t<window.screen.availWidth/2?n.left:n.right-e}},e.getTopPosition=function(t,e,n,o,i){switch(i){case"bottom":return"pointer"===o?t+10:e.bottom+10;case"left":case"right":return"pointer"===o?t-n/2:e.top-n/2+e.height/2;case"top":return"pointer"===o?t-n-10:e.top-n-10;default:return"pointer"===o?t<window.innerHeight/2?t+10:t-n-10:t<window.innerHeight/2?e.bottom+10:e.top-n-10}},e.getDomRect=function(t){return null!==t?t.getBoundingClientRect():document.body.getBoundingClientRect()},e.toolTipSelectors=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],e.isTooltipElement=function(t){if(null===t)return!1;for(var n=t;n;){if(null!==n&&n.classList&&n.classList.contains("k-tooltip"))return!0;n=null!==n.parentNode&&n.parentNode}return e.toolTipSelectors.filter((function(e){return e===t.className})).length>0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata=void 0,e.packageMetadata={name:"@progress/kendo-vue-tooltip",productName:"Kendo UI for Vue",productCodes:["KENDOUIVUE","KENDOUICOMPLETE"],publishDate:1641397077,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(t,e,n){"use strict";n.r(e),n.d(e,"classNames",(function(){return o})),n.d(e,"guid",(function(){return i})),n.d(e,"Keys",(function(){return r})),n.d(e,"noop",(function(){return j})),n.d(e,"getListeners",(function(){return L})),n.d(e,"hasListener",(function(){return D})),n.d(e,"canUseDOM",(function(){return s})),n.d(e,"focusFirstFocusableChild",(function(){return u})),n.d(e,"clone",(function(){return $})),n.d(e,"Draggable",(function(){return T})),n.d(e,"cloneArray",(function(){return P})),n.d(e,"cloneValue",(function(){return E})),n.d(e,"cloneObject",(function(){return k})),n.d(e,"cloneDate",(function(){return O})),n.d(e,"getTemplate",(function(){return K})),n.d(e,"templateRendering",(function(){return A})),n.d(e,"getTabIndex",(function(){return U})),n.d(e,"getDefaultSlots",(function(){return _})),n.d(e,"isRtl",(function(){return X})),n.d(e,"getDir",(function(){return Y})),n.d(e,"getter",(function(){return I})),n.d(e,"setter",(function(){return S})),n.d(e,"validatePackage",(function(){return F}));var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter((function(t){return!0!==t&&!!t})).map((function(t){return Array.isArray(t)?o.apply(void 0,t):"object"==typeof t?Object.keys(t).map((function(e,n){return t[n]||t[e]&&e||null})).filter((function(t){return null!==t})).join(" "):t})).filter((function(t){return!!t})).join(" ")},i=function(){var t,e,n="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(n+="-"),n+=(12===t?4:16===t?3&e|8:e).toString(16);return n},r={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),u=function(t){if(t){var e=t.querySelectorAll('input, [tabindex]:not([tabindex="-1"])');e.length&&e[0].focus&&e[0].focus()}},l=n(0),a=function(t,e){return function(n){return e(t(n))}},c=function(t,e,n){return t.addEventListener&&t.addEventListener(e,n)},p=function(t,e,n){return t&&t.removeEventListener&&t.removeEventListener(e,n)},d=function(){},h=function(t){return t.preventDefault()},f=/touch/;function m(t){return t.type.match(f)?{pageX:t.changedTouches[0].pageX,pageY:t.changedTouches[0].pageY,clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY,type:t.type,originalEvent:t,isTouch:!0}:{pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY,offsetX:t.offsetX,offsetY:t.offsetY,type:t.type,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,originalEvent:t}}var v=function(t){var e=this,n=t.press;void 0===n&&(n=d);var o=t.drag;void 0===o&&(o=d);var i=t.release;void 0===i&&(i=d);var r=t.mouseOnly;void 0===r&&(r=!1),this._pressHandler=a(m,n),this._dragHandler=a(m,o),this._releaseHandler=a(m,i),this._ignoreMouse=!1,this._mouseOnly=r,this._touchstart=function(t){1===t.touches.length&&e._pressHandler(t)},this._touchmove=function(t){1===t.touches.length&&e._dragHandler(t)},this._touchend=function(t){0===t.touches.length&&1===t.changedTouches.length&&(e._releaseHandler(t),e._ignoreMouse=!0,setTimeout(e._restoreMouse,2e3))},this._restoreMouse=function(){e._ignoreMouse=!1},this._mousedown=function(t){var n=t.which;n&&n>1||e._ignoreMouse||(c(document,"mousemove",e._mousemove),c(document,"mouseup",e._mouseup),e._pressHandler(t))},this._mousemove=function(t){e._dragHandler(t)},this._mouseup=function(t){p(document,"mousemove",e._mousemove),p(document,"mouseup",e._mouseup),e._releaseHandler(t)},this._pointerdown=function(t){t.isPrimary&&0===t.button&&(c(document,"pointermove",e._pointermove),c(document,"pointerup",e._pointerup),c(document,"pointercancel",e._pointerup),c(document,"contextmenu",h),e._pressHandler(t))},this._pointermove=function(t){t.isPrimary&&e._dragHandler(t)},this._pointerup=function(t){t.isPrimary&&(p(document,"pointermove",e._pointermove),p(document,"pointerup",e._pointerup),p(document,"pointercancel",e._pointerup),p(document,"contextmenu",h),e._releaseHandler(t))}};v.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},v.prototype.bindTo=function(t){t!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=t,this._bindToCurrent())},v.prototype._bindToCurrent=function(){var t=this._element;this._usePointers()?c(t,"pointerdown",this._pointerdown):(c(t,"mousedown",this._mousedown),this._mouseOnly||(c(t,"touchstart",this._touchstart),c(t,"touchmove",this._touchmove),c(t,"touchend",this._touchend)))},v.prototype._unbindFromCurrent=function(){var t=this._element;if(this._usePointers())return p(t,"pointerdown",this._pointerdown),p(document,"pointermove",this._pointermove),p(document,"pointerup",this._pointerup),p(document,"contextmenu",h),void p(document,"pointercancel",this._pointerup);p(t,"mousedown",this._mousedown),this._mouseOnly||(p(t,"touchstart",this._touchstart),p(t,"touchmove",this._touchmove),p(t,"touchend",this._touchend))},v.prototype._usePointers=function(){return!this._mouseOnly&&v.supportPointerEvent()},v.prototype.update=function(t){var e=t.press;void 0===e&&(e=d);var n=t.drag;void 0===n&&(n=d);var o=t.release;void 0===o&&(o=d);var i=t.mouseOnly;void 0===i&&(i=!1),this._pressHandler=a(m,e),this._dragHandler=a(m,n),this._releaseHandler=a(m,o),this._mouseOnly=i},v.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},v.default=v;var g,y=v;function _(t){var e=t.$slots.default;return t.v3&&e&&"function"==typeof e?e():e}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w=l.h,T=(b(g={emits:{press:null,drag:null,release:null},inheritAttrs:!1,created:function(){this.element=null,this.draggable=new y({press:this.press,drag:this.drag,release:this.release})},setup:w?function(){return{v3:!!w}}:void 0,mounted:function(){this.$el&&(this.element=3===this.$el.nodeType?this.$el.nextElementSibling:this.$el,this.draggable.bindTo(this.element))},destroyed:w?void 0:function(){this.draggable.destroy()},unmounted:function(){this.draggable.destroy()},methods:{press:function(t){this.element&&this.$emit("press",t,this.element)},drag:function(t){this.element&&this.$emit("drag",t,this.element)},release:function(t){this.element&&this.$emit("release",t,this.element)}}},"setup",w?function(){return{v3:!!w}}:void 0),b(g,"render",(function(t){return _(this)})),g),O=function(t){return t?new Date(t.getTime()):null};function $(t){var e={};return k(t,e),e}function k(t,e){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];e[n]=E(o,e[n])}}function E(t,e){if(Array.isArray(t))return P(t);if(t instanceof Date)return O(t);if(t&&"object"==typeof t){var n=e||{};return k(t,n),n}return t}function P(t){return t.map((function(t){return E(t,void 0)}))}var j=function(){},C=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,x={};function I(t){if(x[t])return x[t];var e=[];return t.replace(C,(function(t,n,o,i){e.push(void 0!==n?n:o||i)})),x[t]=function(t){for(var n=t,o=0;o<e.length&&n;o++)n=n[e[o]];return n},x[t]}x.undefined=function(){};var M={};function S(t){if(M[t])return M[t];var e=[];return t.replace(C,(function(t,n,o,i){e.push(void 0!==n?n:o||i)})),M[t]=function(t,n){for(var o=t,i=e.length-1,r=0;r<i&&o;r++)o=o[e[r]]=o[e[r]]||{};o[e[i]]=n},M[t]}function D(t){return this.v3?Object.keys(this.$attrs).map((function(t){return t.toLowerCase()})).some((function(e){return e.endsWith(t.toLowerCase())})):this.$listeners[t]}function L(){if(this.v3){var t={};for(var e in this.$attrs)e.startsWith("on")&&(t[e]=this.$attrs[e]);return t}return this.$listeners}M.undefined=function(t){return t};var N=function(){return(N=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},H=l.h;function A(t,e){if(t){var n=H?this.$slots[t]||(t.toLowerCase?this.$slots[t.toLowerCase()]:null):this.$scopedSlots[t]||(t.toLowerCase?this.$scopedSlots[t.toLowerCase()]:null);return"string"==typeof t&&n?{type:"slot",render:n,listeners:e}:"string"==typeof t||"object"==typeof t||"function"==typeof t&&t.component?{type:"component",render:t,listeners:e}:{type:"renderFunction",render:t,listeners:e}}}function K(t){var e,n,o,i=t.h,r=t.template,s=t.defaultRendering,u=t.defaultSlots,l=t.additionalProps,a=t.additionalListeners,c=t.swapDefaultSlots;if(!r)return s;if(H){var p=s?s.props:{};e=N(N({},R(a)),r.listeners),n=N(N(N({},p),l),e),o=N(N({},n),e)}else{var d=s&&s.componentOptions,h=d?s.componentOptions.listeners:{},f=d?s.componentOptions.propsData:{};e=N(N(N(N({},h),a),R(a)),r.listeners),o={props:n=N(N(N({},f),l),e),on:e}}if("slot"===r.type){var m=r.render({props:n,listeners:e,methods:e,defaultSlots:u});return m?m[0]:void 0}return"renderFunction"===r.type?c?r.render(i,s,u,n,e):r.render(i,s,n,e,u):i(r.render,o,H?function(){return[u]}:[u])}function R(t){if(!t)return t;for(var e={},n=Object.keys(t),o=0;o<n.length;o++){var i=n[o];e["on"+i.charAt(0).toUpperCase()+i.slice(1)]=t[i]}return e}var U=function(t,e,n){var o="string"==typeof t?parseInt(t,void 0):t;if(NaN!==o)return void 0!==o?o:e?n?void 0:-1:0};function X(t){return Boolean(s&&t&&"rtl"===getComputedStyle(t).direction)}function Y(t,e){if(!e&&s&&t){var n=window.getComputedStyle(t).direction;if(n)return n}return e}var B=n(1);function F(t){if(void 0!==B)B.validatePackage(t);else{var e="License activation failed for "+t.name+"\n";e+="The @progress/kendo-licensing script is not loaded.\n",e+="See "+t.licensingDocsUrl+" for more information.\n",console.warn(e)}}}])}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define(["vue","@progress/kendo-licensing"],e):"object"==typeof exports?exports.KendoVueTooltip=e(require("vue"),require("@progress/kendo-licensing")):t.KendoVueTooltip=e(t.Vue,t.KendoLicensing)}(window,(function(t,e){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},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,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TooltipVue2=e.Tooltip=void 0;var o=n(3);Object.defineProperty(e,"Tooltip",{enumerable:!0,get:function(){return o.Tooltip}}),Object.defineProperty(e,"TooltipVue2",{enumerable:!0,get:function(){return o.TooltipVue2}})},function(t,e,n){"use strict";var o=function(){return(o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]},r=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&i(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.TooltipVue2=e.Tooltip=void 0;var u=s(n(0)).h,l=n(6),a=n(4),c=n(5),p={name:"KendoTooltip",inheritAttrs:!1,props:{showCallout:{type:Boolean,default:!0},setCalloutOnPositionAuto:{type:Number,default:void 0},anchorElement:{type:String,default:"pointer",validator:function(t){return["pointer","target"].includes(t)}},content:[String,Object,Function],filter:Function,openDelay:{type:Number,default:400},open:{type:Boolean,default:void 0},position:{type:String,default:"auto",validator:function(t){return["right","left","top","bottom","auto"].includes(t)}},updatePosition:{type:Function,default:void 0},updateInterval:Number,className:String,wrapperStyle:Object,tooltipClassName:String,tooltipStyle:Object,targetElement:[Object,HTMLAnchorElement],parentTitle:{type:Boolean,default:!1}},data:function(){return{top:0,left:0,currentTargetElement:null,currentOpen:!1,title:""}},computed:{wrapperClass:function(){var t;return(t={"k-animation-container":!0,"k-animation-container-fixed":!0,"k-animation-container-shown":!0})[this.$props.className]=!0,t},computedTarget:function(){return void 0!==this.targetElement?this.targetElement:this.currentTargetElement},computedOpen:function(){return void 0!==this.open?this.open:this.currentOpen}},inject:{kendoContext:{default:null}},created:function(){l.validatePackage(c.packageMetadata),this.top=0,this.left=0,this.willOpen=!1,this.context=this.kendoContext||void 0},mounted:function(){this.element=this.v3?this.elementRef:this.$refs.element,document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},destroyed:u?void 0:function(){this.destroyElement()},unmounted:function(){this.destroyElement()},updated:function(){if(this.$props.open&&this.$props.targetElement&&this.showToolTip({target:this.$props.targetElement}),this.element=this.v3?this.elementRef:this.$refs.element,this.element){if(this.resetPosition(),this.computedTarget){var t=this.$props.appendTo?this.$props.appendTo:this.computedTarget.ownerDocument.body;this.element.parentElement!==t&&this.computedTarget.ownerDocument.body.append(this.element)}this.callout=this.v3?this.calloutRef:this.$refs.callout,this.callout&&(this.callout.className=this.calloutClassName(),"auto"===this.$props.position&&(this.left<window.screen.availWidth/2?this.callout.style.left=this.$props.setCalloutOnPositionAuto||"25%":this.callout.style.left=this.$props.setCalloutOnPositionAuto||"75%"))}},setup:u?function(){return{v3:!!u}}:void 0,render:function(t){var e=this,n=u||t,i=l.getDefaultSlots(this),r=this.getCurrentZIndex(),s=this.$props.content?l.templateRendering.call(this,this.$props.content,l.getListeners.call(this)):void 0,a=this.title,c=l.getTemplate.call(this,{h:n,template:s,defaultRendering:a,additionalProps:{title:this.title,target:this.computedTarget}}),p=this.computedOpen&&n("div",{class:l.classNames("k-tooltip",this.$props.tooltipClassName),style:o({position:"relative"},this.$props.tooltipStyle)},[n("div",{class:"k-tooltip-content"},[c]),this.$props.showCallout&&n("div",{ref:this.v3?function(t){e.calloutRef=t}:"callout"})]),d=this.computedTarget&&this.title&&this.computedTarget.ownerDocument&&n("div",{ref:this.v3?function(t){e.elementRef=t}:"element",class:this.wrapperClass,style:o({zIndex:r},this.$props.wrapperStyle),tabIndex:0,attrs:this.v3?void 0:{tabIndex:0}},[p]);return i?n("div",{onMouseover:this.handleMouseOver,on:this.v3?void 0:{mouseover:this.handleMouseOver,mouseout:this.handleMouseOut},onMouseout:this.handleMouseOut},[d,i]):d},methods:{destroyElement:function(){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove),this.element&&this.element.remove()},handleMouseOut:function(t){var e=this.computedTarget?this.computedTarget.ownerDocument:document,n=e&&e.elementFromPoint(t.clientX,t.clientY);a.isTooltipElement(n)||this.$props.open||(clearInterval(this.updateIntervalId),this.willOpen=!1,this.onClose(t))},handleMouseOver:function(t){var e=t.target;this.isVisible(e)&&!a.isTooltipElement(e)&&e!==this.computedTarget&&this.showToolTip(t)},handleBodyMousemove:function(t){this.top=t.clientY,this.left=t.clientX},onClose:function(t){this.$emit("close",{event:t,component:this}),this.currentTargetElement=null,this.currentOpen=!1,this.title=""},showToolTip:function(t){var e=this;clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),t.target.hasChildNodes()&&t.target.childNodes.forEach((function(e){"title"===e.nodeName&&(t.target.titleExpando=e.innerHTML,e.remove())}));var n=this.computedTarget||t.target,o=this.getTitle(n);o.title?(o.element&&(o.element.titleExpando=o.title,o.element.title=""),this.willOpen=!0,this.$props.openDelay?this.openTimeoutId=window.setTimeout((function(){e.willOpen&&(e.currentTargetElement=n,e.currentOpen=!0,e.title=o.title,e.setUpdateInterval())}),this.$props.openDelay):(this.currentTargetElement=n,this.currentOpen=!0,this.title=o.title,this.setUpdateInterval()),this.title!==o.title&&this.$emit("open",{event:t,compoponent:this})):this.computedOpen&&this.onClose(t)},setUpdateInterval:function(){this.$props.updateInterval&&(this.updateIntervalId=setInterval(this.onIntervalUpdate,this.$props.updateInterval))},onIntervalUpdate:function(){var t=this.computedTarget;t&&(null===t.parentElement?this.onClose({target:t}):this.showToolTip({target:t}))},resetPosition:function(){if(this.element){var t=void 0;t=this.$props.updatePosition?this.$props.updatePosition({element:this.element,targetElement:this.computedTarget,mouseTop:this.top,mouseLeft:this.left,anchorElement:this.$props.anchorElement,position:this.$props.position,target:this}):this.setPosition(this.element),this.element.style.left=t.left+"px",this.element.style.top=t.top+"px"}},isVisible:function(t){return!this.$props.filter||this.$props.filter(t)},setPosition:function(t){var e=a.getDomRect(this.computedTarget);return{left:a.getLeftPosition(this.left,t.offsetWidth,e,this.$props.anchorElement,this.$props.position),top:a.getTopPosition(this.top,e,t.offsetHeight,this.$props.anchorElement,this.$props.position)}},getTitle:function(t){for(;t;){if(null!==t.getAttribute("title")||t.titleExpando)return{title:t.getAttribute("title")||t.titleExpando,element:t};t=this.$props.parentTitle&&t.parentElement||null}return{title:"",element:t}},calloutClassName:function(){switch(this.$props.position){case"bottom":return"k-callout k-callout-n";case"left":return"k-callout k-callout-e";case"right":return"k-callout k-callout-w";case"top":return"k-callout k-callout-s";default:return this.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},getCurrentZIndex:function(){return this.context?this.context:100}}};e.TooltipVue2=p;var d=p;e.Tooltip=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTooltipElement=e.toolTipSelectors=e.getDomRect=e.getTopPosition=e.getLeftPosition=void 0;e.getLeftPosition=function(t,e,n,o,i){switch(i){case"bottom":return"pointer"===o?t-e/2:n.left-e/2+n.width/2;case"left":return"pointer"===o?t-e-10:n.left-e-10;case"right":return"pointer"===o?t+10:n.right+10;case"top":return"pointer"===o?t-e/2:n.left-e/2+n.width/2;default:return"pointer"===o?t<window.screen.availWidth/2?t-10:t-e+10:t<window.screen.availWidth/2?n.left:n.right-e}},e.getTopPosition=function(t,e,n,o,i){switch(i){case"bottom":return"pointer"===o?t+10:e.bottom+10;case"left":case"right":return"pointer"===o?t-n/2:e.top-n/2+e.height/2;case"top":return"pointer"===o?t-n-10:e.top-n-10;default:return"pointer"===o?t<window.innerHeight/2?t+10:t-n-10:t<window.innerHeight/2?e.bottom+10:e.top-n-10}},e.getDomRect=function(t){return null!==t?t.getBoundingClientRect():document.body.getBoundingClientRect()},e.toolTipSelectors=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],e.isTooltipElement=function(t){if(null===t)return!1;for(var n=t;n;){if(null!==n&&n.classList&&n.classList.contains("k-tooltip"))return!0;n=null!==n.parentNode&&n.parentNode}return e.toolTipSelectors.filter((function(e){return e===t.className})).length>0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata=void 0,e.packageMetadata={name:"@progress/kendo-vue-tooltip",productName:"Kendo UI for Vue",productCodes:["KENDOUIVUE","KENDOUICOMPLETE"],publishDate:1641982523,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(t,e,n){"use strict";n.r(e),n.d(e,"classNames",(function(){return o})),n.d(e,"guid",(function(){return i})),n.d(e,"Keys",(function(){return r})),n.d(e,"noop",(function(){return j})),n.d(e,"getListeners",(function(){return L})),n.d(e,"hasListener",(function(){return D})),n.d(e,"canUseDOM",(function(){return s})),n.d(e,"focusFirstFocusableChild",(function(){return u})),n.d(e,"clone",(function(){return $})),n.d(e,"Draggable",(function(){return T})),n.d(e,"cloneArray",(function(){return k})),n.d(e,"cloneValue",(function(){return P})),n.d(e,"cloneObject",(function(){return E})),n.d(e,"cloneDate",(function(){return O})),n.d(e,"getTemplate",(function(){return R})),n.d(e,"templateRendering",(function(){return A})),n.d(e,"getTabIndex",(function(){return U})),n.d(e,"getDefaultSlots",(function(){return b})),n.d(e,"isRtl",(function(){return V})),n.d(e,"getDir",(function(){return X})),n.d(e,"getter",(function(){return x})),n.d(e,"setter",(function(){return S})),n.d(e,"validatePackage",(function(){return F})),n.d(e,"kendoThemeMaps",(function(){return B}));var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter((function(t){return!0!==t&&!!t})).map((function(t){return Array.isArray(t)?o.apply(void 0,t):"object"==typeof t?Object.keys(t).map((function(e,n){return t[n]||t[e]&&e||null})).filter((function(t){return null!==t})).join(" "):t})).filter((function(t){return!!t})).join(" ")},i=function(){var t,e,n="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(n+="-"),n+=(12===t?4:16===t?3&e|8:e).toString(16);return n},r={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),u=function(t){if(t){var e=t.querySelectorAll('input, [tabindex]:not([tabindex="-1"])');e.length&&e[0].focus&&e[0].focus()}},l=n(0),a=function(t,e){return function(n){return e(t(n))}},c=function(t,e,n){return t.addEventListener&&t.addEventListener(e,n)},p=function(t,e,n){return t&&t.removeEventListener&&t.removeEventListener(e,n)},d=function(){},h=function(t){return t.preventDefault()},f=/touch/;function m(t){return t.type.match(f)?{pageX:t.changedTouches[0].pageX,pageY:t.changedTouches[0].pageY,clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY,type:t.type,originalEvent:t,isTouch:!0}:{pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY,offsetX:t.offsetX,offsetY:t.offsetY,type:t.type,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,originalEvent:t}}var v=function(t){var e=this,n=t.press;void 0===n&&(n=d);var o=t.drag;void 0===o&&(o=d);var i=t.release;void 0===i&&(i=d);var r=t.mouseOnly;void 0===r&&(r=!1),this._pressHandler=a(m,n),this._dragHandler=a(m,o),this._releaseHandler=a(m,i),this._ignoreMouse=!1,this._mouseOnly=r,this._touchstart=function(t){1===t.touches.length&&e._pressHandler(t)},this._touchmove=function(t){1===t.touches.length&&e._dragHandler(t)},this._touchend=function(t){0===t.touches.length&&1===t.changedTouches.length&&(e._releaseHandler(t),e._ignoreMouse=!0,setTimeout(e._restoreMouse,2e3))},this._restoreMouse=function(){e._ignoreMouse=!1},this._mousedown=function(t){var n=t.which;n&&n>1||e._ignoreMouse||(c(document,"mousemove",e._mousemove),c(document,"mouseup",e._mouseup),e._pressHandler(t))},this._mousemove=function(t){e._dragHandler(t)},this._mouseup=function(t){p(document,"mousemove",e._mousemove),p(document,"mouseup",e._mouseup),e._releaseHandler(t)},this._pointerdown=function(t){t.isPrimary&&0===t.button&&(c(document,"pointermove",e._pointermove),c(document,"pointerup",e._pointerup),c(document,"pointercancel",e._pointerup),c(document,"contextmenu",h),e._pressHandler(t))},this._pointermove=function(t){t.isPrimary&&e._dragHandler(t)},this._pointerup=function(t){t.isPrimary&&(p(document,"pointermove",e._pointermove),p(document,"pointerup",e._pointerup),p(document,"pointercancel",e._pointerup),p(document,"contextmenu",h),e._releaseHandler(t))}};v.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},v.prototype.bindTo=function(t){t!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=t,this._bindToCurrent())},v.prototype._bindToCurrent=function(){var t=this._element;this._usePointers()?c(t,"pointerdown",this._pointerdown):(c(t,"mousedown",this._mousedown),this._mouseOnly||(c(t,"touchstart",this._touchstart),c(t,"touchmove",this._touchmove),c(t,"touchend",this._touchend)))},v.prototype._unbindFromCurrent=function(){var t=this._element;if(this._usePointers())return p(t,"pointerdown",this._pointerdown),p(document,"pointermove",this._pointermove),p(document,"pointerup",this._pointerup),p(document,"contextmenu",h),void p(document,"pointercancel",this._pointerup);p(t,"mousedown",this._mousedown),this._mouseOnly||(p(t,"touchstart",this._touchstart),p(t,"touchmove",this._touchmove),p(t,"touchend",this._touchend))},v.prototype._usePointers=function(){return!this._mouseOnly&&v.supportPointerEvent()},v.prototype.update=function(t){var e=t.press;void 0===e&&(e=d);var n=t.drag;void 0===n&&(n=d);var o=t.release;void 0===o&&(o=d);var i=t.mouseOnly;void 0===i&&(i=!1),this._pressHandler=a(m,e),this._dragHandler=a(m,n),this._releaseHandler=a(m,o),this._mouseOnly=i},v.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},v.default=v;var g,y=v;function b(t){var e=t.$slots.default;return t.v3&&e&&"function"==typeof e?e():e}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w=l.h,T=(_(g={emits:{press:null,drag:null,release:null},inheritAttrs:!1,created:function(){this.element=null,this.draggable=new y({press:this.press,drag:this.drag,release:this.release})},setup:w?function(){return{v3:!!w}}:void 0,mounted:function(){this.$el&&(this.element=3===this.$el.nodeType?this.$el.nextElementSibling:this.$el,this.draggable.bindTo(this.element))},destroyed:w?void 0:function(){this.draggable.destroy()},unmounted:function(){this.draggable.destroy()},methods:{press:function(t){this.element&&this.$emit("press",t,this.element)},drag:function(t){this.element&&this.$emit("drag",t,this.element)},release:function(t){this.element&&this.$emit("release",t,this.element)}}},"setup",w?function(){return{v3:!!w}}:void 0),_(g,"render",(function(t){return b(this)})),g),O=function(t){return t?new Date(t.getTime()):null};function $(t){var e={};return E(t,e),e}function E(t,e){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];e[n]=P(o,e[n])}}function P(t,e){if(Array.isArray(t))return k(t);if(t instanceof Date)return O(t);if(t&&"object"==typeof t){var n=e||{};return E(t,n),n}return t}function k(t){return t.map((function(t){return P(t,void 0)}))}var j=function(){},C=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,M={};function x(t){if(M[t])return M[t];var e=[];return t.replace(C,(function(t,n,o,i){e.push(void 0!==n?n:o||i)})),M[t]=function(t){for(var n=t,o=0;o<e.length&&n;o++)n=n[e[o]];return n},M[t]}M.undefined=function(){};var I={};function S(t){if(I[t])return I[t];var e=[];return t.replace(C,(function(t,n,o,i){e.push(void 0!==n?n:o||i)})),I[t]=function(t,n){for(var o=t,i=e.length-1,r=0;r<i&&o;r++)o=o[e[r]]=o[e[r]]||{};o[e[i]]=n},I[t]}function D(t){return this.v3?Object.keys(this.$attrs).map((function(t){return t.toLowerCase()})).some((function(e){return e.endsWith(t.toLowerCase())})):this.$listeners[t]}function L(){if(this.v3){var t={};for(var e in this.$attrs)e.startsWith("on")&&(t[e]=this.$attrs[e]);return t}return this.$listeners}I.undefined=function(t){return t};var N=function(){return(N=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},H=l.h;function A(t,e){if(t){var n=H?this.$slots[t]||(t.toLowerCase?this.$slots[t.toLowerCase()]:null):this.$scopedSlots[t]||(t.toLowerCase?this.$scopedSlots[t.toLowerCase()]:null);return"string"==typeof t&&n?{type:"slot",render:n,listeners:e}:"string"==typeof t||"object"==typeof t||"function"==typeof t&&t.component?{type:"component",render:t,listeners:e}:{type:"renderFunction",render:t,listeners:e}}}function R(t){var e,n,o,i=t.h,r=t.template,s=t.defaultRendering,u=t.defaultSlots,l=t.additionalProps,a=t.additionalListeners,c=t.swapDefaultSlots;if(!r)return s;if(H){var p=s?s.props:{};e=N(N({},K(a)),r.listeners),n=N(N(N({},p),l),e),o=N(N({},n),e)}else{var d=s&&s.componentOptions,h=d?s.componentOptions.listeners:{},f=d?s.componentOptions.propsData:{};e=N(N(N(N({},h),a),K(a)),r.listeners),o={props:n=N(N(N({},f),l),e),on:e}}if("slot"===r.type){var m=r.render({props:n,listeners:e,methods:e,defaultSlots:u});return m?m[0]:void 0}return"renderFunction"===r.type?c?r.render(i,s,u,n,e):r.render(i,s,n,e,u):i(r.render,o,H?function(){return[u]}:[u])}function K(t){if(!t)return t;for(var e={},n=Object.keys(t),o=0;o<n.length;o++){var i=n[o];e["on"+i.charAt(0).toUpperCase()+i.slice(1)]=t[i]}return e}var U=function(t,e,n){var o="string"==typeof t?parseInt(t,void 0):t;if(NaN!==o)return void 0!==o?o:e?n?void 0:-1:0};function V(t){return Boolean(s&&t&&"rtl"===getComputedStyle(t).direction)}function X(t,e){if(!e&&s&&t){var n=window.getComputedStyle(t).direction;if(n)return n}return e}var Y=n(1);function F(t){if(void 0!==Y)Y.validatePackage(t);else{var e="License activation failed for "+t.name+"\n";e+="The @progress/kendo-licensing script is not loaded.\n",e+="See "+t.licensingDocsUrl+" for more information.\n",console.warn(e)}}var B={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"}}}])}));
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from './additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -40,8 +39,8 @@ export interface TooltipState {
40
39
  /**
41
40
  * @hidden
42
41
  */
43
- export interface TooltipAll extends Vue, TooltipMethods, TooltipData, TooltipComputed, TooltipState {
42
+ export interface TooltipAll extends Vue2type, TooltipMethods, TooltipData, TooltipComputed, TooltipState {
44
43
  }
45
- declare let Tooltip: ComponentOptions<TooltipAll, DefaultData<TooltipData>, DefaultMethods<TooltipAll>, TooltipComputed, RecordPropsDefinition<TooltipProps>>;
46
- declare const TooltipVue3: DefineComponent<TooltipProps, any, TooltipData, TooltipComputed, TooltipMethods, {}, {}, {}, string, TooltipProps, TooltipProps, {}>;
47
- export { Tooltip, TooltipVue3 };
44
+ declare let TooltipVue2: ComponentOptions<TooltipAll, DefaultData<TooltipData>, DefaultMethods<TooltipAll>, TooltipComputed, RecordPropsDefinition<TooltipProps>>;
45
+ declare const Tooltip: DefineComponent<TooltipProps, any, TooltipData, TooltipComputed, TooltipMethods, {}, {}, {}, string, TooltipProps, TooltipProps, {}>;
46
+ export { Tooltip, TooltipVue2 };
@@ -23,7 +23,7 @@ import { getLeftPosition, getTopPosition, getDomRect, isTooltipElement } from '.
23
23
  import { packageMetadata } from './package-metadata';
24
24
  var DEFAULT_TOOLTIP_ZINDEX = 100; // tslint:enable:max-line-length
25
25
 
26
- var Tooltip = {
26
+ var TooltipVue2 = {
27
27
  name: 'KendoTooltip',
28
28
  inheritAttrs: false,
29
29
  props: {
@@ -59,12 +59,16 @@ var Tooltip = {
59
59
  return ['right', 'left', 'top', 'bottom', 'auto'].includes(value);
60
60
  }
61
61
  },
62
+ updatePosition: {
63
+ type: Function,
64
+ default: undefined
65
+ },
62
66
  updateInterval: Number,
63
67
  className: String,
64
68
  wrapperStyle: Object,
65
69
  tooltipClassName: String,
66
70
  tooltipStyle: Object,
67
- targetElement: Object,
71
+ targetElement: [Object, HTMLAnchorElement],
68
72
  parentTitle: {
69
73
  type: Boolean,
70
74
  default: false
@@ -109,6 +113,8 @@ var Tooltip = {
109
113
  this.context = this.kendoContext || undefined;
110
114
  },
111
115
  mounted: function mounted() {
116
+ this.element = this.v3 ? this.elementRef : this.$refs.element;
117
+
112
118
  if (document) {
113
119
  document.body.addEventListener('mousemove', this.handleBodyMousemove);
114
120
  }
@@ -121,30 +127,19 @@ var Tooltip = {
121
127
  this.destroyElement();
122
128
  },
123
129
  updated: function updated() {
130
+ if (this.$props.open && this.$props.targetElement) {
131
+ this.showToolTip({
132
+ target: this.$props.targetElement
133
+ });
134
+ }
135
+
124
136
  this.element = this.v3 ? this.elementRef : this.$refs.element;
125
137
 
126
138
  if (!this.element) {
127
139
  return;
128
140
  }
129
141
 
130
- var position;
131
-
132
- if (this.$props.onPosition) {
133
- position = this.$props.onPosition.call(undefined, {
134
- element: this.element,
135
- targetElement: this.computedTarget,
136
- mouseTop: this.top,
137
- mouseLeft: this.left,
138
- anchorElement: this.$props.anchorElement,
139
- position: this.$props.position,
140
- target: this
141
- });
142
- } else {
143
- position = this.setPosition(this.element);
144
- }
145
-
146
- this.element.style.left = position.left + 'px';
147
- this.element.style.top = position.top + 'px';
142
+ this.resetPosition();
148
143
 
149
144
  if (this.computedTarget) {
150
145
  var appendToElement = this.$props.appendTo ? this.$props.appendTo : this.computedTarget.ownerDocument.body;
@@ -362,6 +357,28 @@ var Tooltip = {
362
357
  });
363
358
  }
364
359
  },
360
+ resetPosition: function resetPosition() {
361
+ if (this.element) {
362
+ var position = void 0;
363
+
364
+ if (this.$props.updatePosition) {
365
+ position = this.$props.updatePosition({
366
+ element: this.element,
367
+ targetElement: this.computedTarget,
368
+ mouseTop: this.top,
369
+ mouseLeft: this.left,
370
+ anchorElement: this.$props.anchorElement,
371
+ position: this.$props.position,
372
+ target: this
373
+ });
374
+ } else {
375
+ position = this.setPosition(this.element);
376
+ }
377
+
378
+ this.element.style.left = position.left + 'px';
379
+ this.element.style.top = position.top + 'px';
380
+ }
381
+ },
365
382
  isVisible: function isVisible(element) {
366
383
  return !this.$props.filter || this.$props.filter(element);
367
384
  },
@@ -415,5 +432,5 @@ var Tooltip = {
415
432
  }
416
433
  }
417
434
  };
418
- var TooltipVue3 = Tooltip;
419
- export { Tooltip, TooltipVue3 };
435
+ var Tooltip = TooltipVue2;
436
+ export { Tooltip, TooltipVue2 };
@@ -73,6 +73,14 @@ export interface TooltipProps {
73
73
  * Specifies the styles which are set to the Tooltip DOM element.
74
74
  */
75
75
  tooltipStyle?: any;
76
+ /**
77
+ * Callback called when the Tooltip calculates it's position. Useful to modify the default position behavior.
78
+ * Require to return the `top` and `left` position of the Tooltip.
79
+ */
80
+ updatePosition?: (event: TooltipPositionEvent) => {
81
+ top: number;
82
+ left: number;
83
+ };
76
84
  /**
77
85
  * Fires when the Tooltip is shown.
78
86
  */
@@ -81,14 +89,6 @@ export interface TooltipProps {
81
89
  * Fires when the Tooltip is hidden.
82
90
  */
83
91
  onClose?: (event: TooltipEvent) => void;
84
- /**
85
- * Callback called when the Tooltip calculates it's position. Useful to modify the default position behavior.
86
- * Require to return the `top` and `left` position of the Tooltip.
87
- */
88
- onPosition?: (event: TooltipPositionEvent) => {
89
- top: number;
90
- left: number;
91
- };
92
92
  /**
93
93
  * Represents a callback function which determines if a Tooltip will be displayed ([see example]({% slug filter_elements_tooltip %})).
94
94
  */
@@ -1,3 +1,9 @@
1
1
  // @ts-ignore
2
2
  import { DefineComponent } from 'vue';
3
- export { DefineComponent };
3
+ // @ts-ignore
4
+ import * as Vue from 'vue';
5
+ // @ts-ignore
6
+ type Vue2type = Vue.default;
7
+ // @ts-ignore
8
+ import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
9
+ export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
package/dist/es/main.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Tooltip } from './Tooltip';
1
+ import { Tooltip, TooltipVue2 } from './Tooltip';
2
2
  import { TooltipProps } from './TooltipProps';
3
3
  import { TooltipEvent, TooltipPositionEvent } from './events';
4
4
  import { TooltipPosition } from './utils';
5
- export { Tooltip, TooltipEvent, TooltipPositionEvent, TooltipProps, TooltipPosition };
5
+ export { Tooltip, TooltipVue2, TooltipEvent, TooltipPositionEvent, TooltipProps, TooltipPosition };
package/dist/es/main.js CHANGED
@@ -1,2 +1,2 @@
1
- import { Tooltip } from './Tooltip';
2
- export { Tooltip };
1
+ import { Tooltip, TooltipVue2 } from './Tooltip';
2
+ export { Tooltip, TooltipVue2 };
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-tooltip',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1641397077,
8
+ publishDate: 1641982523,
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
  };
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from './additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -40,8 +39,8 @@ export interface TooltipState {
40
39
  /**
41
40
  * @hidden
42
41
  */
43
- export interface TooltipAll extends Vue, TooltipMethods, TooltipData, TooltipComputed, TooltipState {
42
+ export interface TooltipAll extends Vue2type, TooltipMethods, TooltipData, TooltipComputed, TooltipState {
44
43
  }
45
- declare let Tooltip: ComponentOptions<TooltipAll, DefaultData<TooltipData>, DefaultMethods<TooltipAll>, TooltipComputed, RecordPropsDefinition<TooltipProps>>;
46
- declare const TooltipVue3: DefineComponent<TooltipProps, any, TooltipData, TooltipComputed, TooltipMethods, {}, {}, {}, string, TooltipProps, TooltipProps, {}>;
47
- export { Tooltip, TooltipVue3 };
44
+ declare let TooltipVue2: ComponentOptions<TooltipAll, DefaultData<TooltipData>, DefaultMethods<TooltipAll>, TooltipComputed, RecordPropsDefinition<TooltipProps>>;
45
+ declare const Tooltip: DefineComponent<TooltipProps, any, TooltipData, TooltipComputed, TooltipMethods, {}, {}, {}, string, TooltipProps, TooltipProps, {}>;
46
+ export { Tooltip, TooltipVue2 };
@@ -19,7 +19,7 @@ var __assign = undefined && undefined.__assign || function () {
19
19
  Object.defineProperty(exports, "__esModule", {
20
20
  value: true
21
21
  });
22
- exports.TooltipVue3 = exports.Tooltip = void 0; // @ts-ignore
22
+ exports.TooltipVue2 = exports.Tooltip = void 0; // @ts-ignore
23
23
 
24
24
  var Vue = require("vue");
25
25
 
@@ -34,7 +34,7 @@ var package_metadata_1 = require("./package-metadata");
34
34
 
35
35
  var DEFAULT_TOOLTIP_ZINDEX = 100; // tslint:enable:max-line-length
36
36
 
37
- var Tooltip = {
37
+ var TooltipVue2 = {
38
38
  name: 'KendoTooltip',
39
39
  inheritAttrs: false,
40
40
  props: {
@@ -70,12 +70,16 @@ var Tooltip = {
70
70
  return ['right', 'left', 'top', 'bottom', 'auto'].includes(value);
71
71
  }
72
72
  },
73
+ updatePosition: {
74
+ type: Function,
75
+ default: undefined
76
+ },
73
77
  updateInterval: Number,
74
78
  className: String,
75
79
  wrapperStyle: Object,
76
80
  tooltipClassName: String,
77
81
  tooltipStyle: Object,
78
- targetElement: Object,
82
+ targetElement: [Object, HTMLAnchorElement],
79
83
  parentTitle: {
80
84
  type: Boolean,
81
85
  default: false
@@ -120,6 +124,8 @@ var Tooltip = {
120
124
  this.context = this.kendoContext || undefined;
121
125
  },
122
126
  mounted: function mounted() {
127
+ this.element = this.v3 ? this.elementRef : this.$refs.element;
128
+
123
129
  if (document) {
124
130
  document.body.addEventListener('mousemove', this.handleBodyMousemove);
125
131
  }
@@ -132,30 +138,19 @@ var Tooltip = {
132
138
  this.destroyElement();
133
139
  },
134
140
  updated: function updated() {
141
+ if (this.$props.open && this.$props.targetElement) {
142
+ this.showToolTip({
143
+ target: this.$props.targetElement
144
+ });
145
+ }
146
+
135
147
  this.element = this.v3 ? this.elementRef : this.$refs.element;
136
148
 
137
149
  if (!this.element) {
138
150
  return;
139
151
  }
140
152
 
141
- var position;
142
-
143
- if (this.$props.onPosition) {
144
- position = this.$props.onPosition.call(undefined, {
145
- element: this.element,
146
- targetElement: this.computedTarget,
147
- mouseTop: this.top,
148
- mouseLeft: this.left,
149
- anchorElement: this.$props.anchorElement,
150
- position: this.$props.position,
151
- target: this
152
- });
153
- } else {
154
- position = this.setPosition(this.element);
155
- }
156
-
157
- this.element.style.left = position.left + 'px';
158
- this.element.style.top = position.top + 'px';
153
+ this.resetPosition();
159
154
 
160
155
  if (this.computedTarget) {
161
156
  var appendToElement = this.$props.appendTo ? this.$props.appendTo : this.computedTarget.ownerDocument.body;
@@ -373,6 +368,28 @@ var Tooltip = {
373
368
  });
374
369
  }
375
370
  },
371
+ resetPosition: function resetPosition() {
372
+ if (this.element) {
373
+ var position = void 0;
374
+
375
+ if (this.$props.updatePosition) {
376
+ position = this.$props.updatePosition({
377
+ element: this.element,
378
+ targetElement: this.computedTarget,
379
+ mouseTop: this.top,
380
+ mouseLeft: this.left,
381
+ anchorElement: this.$props.anchorElement,
382
+ position: this.$props.position,
383
+ target: this
384
+ });
385
+ } else {
386
+ position = this.setPosition(this.element);
387
+ }
388
+
389
+ this.element.style.left = position.left + 'px';
390
+ this.element.style.top = position.top + 'px';
391
+ }
392
+ },
376
393
  isVisible: function isVisible(element) {
377
394
  return !this.$props.filter || this.$props.filter(element);
378
395
  },
@@ -426,6 +443,6 @@ var Tooltip = {
426
443
  }
427
444
  }
428
445
  };
429
- exports.Tooltip = Tooltip;
430
- var TooltipVue3 = Tooltip;
431
- exports.TooltipVue3 = TooltipVue3;
446
+ exports.TooltipVue2 = TooltipVue2;
447
+ var Tooltip = TooltipVue2;
448
+ exports.Tooltip = Tooltip;
@@ -73,6 +73,14 @@ export interface TooltipProps {
73
73
  * Specifies the styles which are set to the Tooltip DOM element.
74
74
  */
75
75
  tooltipStyle?: any;
76
+ /**
77
+ * Callback called when the Tooltip calculates it's position. Useful to modify the default position behavior.
78
+ * Require to return the `top` and `left` position of the Tooltip.
79
+ */
80
+ updatePosition?: (event: TooltipPositionEvent) => {
81
+ top: number;
82
+ left: number;
83
+ };
76
84
  /**
77
85
  * Fires when the Tooltip is shown.
78
86
  */
@@ -81,14 +89,6 @@ export interface TooltipProps {
81
89
  * Fires when the Tooltip is hidden.
82
90
  */
83
91
  onClose?: (event: TooltipEvent) => void;
84
- /**
85
- * Callback called when the Tooltip calculates it's position. Useful to modify the default position behavior.
86
- * Require to return the `top` and `left` position of the Tooltip.
87
- */
88
- onPosition?: (event: TooltipPositionEvent) => {
89
- top: number;
90
- left: number;
91
- };
92
92
  /**
93
93
  * Represents a callback function which determines if a Tooltip will be displayed ([see example]({% slug filter_elements_tooltip %})).
94
94
  */
@@ -1,3 +1,9 @@
1
1
  // @ts-ignore
2
2
  import { DefineComponent } from 'vue';
3
- export { DefineComponent };
3
+ // @ts-ignore
4
+ import * as Vue from 'vue';
5
+ // @ts-ignore
6
+ type Vue2type = Vue.default;
7
+ // @ts-ignore
8
+ import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
9
+ export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
@@ -1,5 +1,5 @@
1
- import { Tooltip } from './Tooltip';
1
+ import { Tooltip, TooltipVue2 } from './Tooltip';
2
2
  import { TooltipProps } from './TooltipProps';
3
3
  import { TooltipEvent, TooltipPositionEvent } from './events';
4
4
  import { TooltipPosition } from './utils';
5
- export { Tooltip, TooltipEvent, TooltipPositionEvent, TooltipProps, TooltipPosition };
5
+ export { Tooltip, TooltipVue2, TooltipEvent, TooltipPositionEvent, TooltipProps, TooltipPosition };
package/dist/npm/main.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tooltip = void 0;
3
+ exports.TooltipVue2 = exports.Tooltip = void 0;
4
4
  var Tooltip_1 = require("./Tooltip");
5
5
  Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
6
+ Object.defineProperty(exports, "TooltipVue2", { enumerable: true, get: function () { return Tooltip_1.TooltipVue2; } });
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-tooltip',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1641397077,
11
+ publishDate: 1641982523,
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-tooltip",
3
- "version": "2.7.2",
3
+ "version": "2.8.0-dev.202201121019",
4
4
  "description": "Kendo UI for Vue Tooltip package",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,13 +33,13 @@
33
33
  "vue": "^2.6.12 || ^3.0.2"
34
34
  },
35
35
  "dependencies": {
36
- "@progress/kendo-vue-common": "2.7.2"
36
+ "@progress/kendo-vue-common": "2.8.0-dev.202201121019"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@progress/kendo-licensing": "^1.0.1",
40
- "@progress/kendo-vue-dialogs": "2.7.2",
41
- "@progress/kendo-vue-grid": "2.7.2",
42
- "@progress/kendo-vue-intl": "2.7.2"
40
+ "@progress/kendo-vue-dialogs": "2.8.0-dev.202201121019",
41
+ "@progress/kendo-vue-grid": "2.8.0-dev.202201121019",
42
+ "@progress/kendo-vue-intl": "2.8.0-dev.202201121019"
43
43
  },
44
44
  "@progress": {
45
45
  "friendlyName": "Tooltip",