@progress/kendo-vue-tooltip 2.7.1-dev.202112201220 → 2.7.2

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:{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,parentTitle:{type:Boolean,default:!1}},data:function(){return{top:0,left:0,targetElement: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}},created:function(){l.validatePackage(c.packageMetadata),this.top=0,this.left=0,this.willOpen=!1},mounted:function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},destroyed:function(){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove),this.element&&this.element.remove()},updated:function(){if(this.$props.targetElement&&this.showToolTip({target:this.$props.targetElement}),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.state.targetElement,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.targetElement){var e=this.$props.appendTo?this.$props.appendTo:this.targetElement.ownerDocument.body;this.element.parentElement!==e&&this.targetElement.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);if(!1===this.$props.open)return null;var 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.targetElement}}),p=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.targetElement&&this.title&&this.targetElement.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]):{tooltip:d}},methods:{handleMouseOut:function(t){var e=this.targetElement?this.targetElement.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.targetElement&&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.targetElement=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.$props.targetElement||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.targetElement=n,e.currentOpen=!0,e.title=o.title,e.setUpdateInterval())}),this.$props.openDelay):(this.targetElement=n,this.currentOpen=!0,this.title=o.title,this.setUpdateInterval()),this.title!==o.title&&this.$emit("open",{event:t,compoponent:this})):this.currentOpen&&this.onClose(t)},setUpdateInterval:function(){this.$props.updateInterval&&(this.updateIntervalId=setInterval(this.onIntervalUpdate,this.$props.updateInterval))},onIntervalUpdate:function(){var t=this.targetElement;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.targetElement);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:1640002656,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 E})),n.d(e,"Draggable",(function(){return O})),n.d(e,"cloneArray",(function(){return P})),n.d(e,"cloneValue",(function(){return k})),n.d(e,"cloneObject",(function(){return $})),n.d(e,"cloneDate",(function(){return T})),n.d(e,"getTemplate",(function(){return R})),n.d(e,"templateRendering",(function(){return K})),n.d(e,"getTabIndex",(function(){return A})),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 M})),n.d(e,"setter",(function(){return S})),n.d(e,"validatePackage",(function(){return V}));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,O=(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),T=function(t){return t?new Date(t.getTime()):null};function E(t){var e={};return $(t,e),e}function $(t,e){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];e[n]=k(o,e[n])}}function k(t,e){if(Array.isArray(t))return P(t);if(t instanceof Date)return T(t);if(t&&"object"==typeof t){var n=e||{};return $(t,n),n}return t}function P(t){return t.map((function(t){return k(t,void 0)}))}var j=function(){},C=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,I={};function M(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){for(var n=t,o=0;o<e.length&&n;o++)n=n[e[o]];return n},I[t]}I.undefined=function(){};var x={};function S(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,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},x[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}x.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 K(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({},U(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),U(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 U(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 A=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 F=n(1);function V(t){if(void 0!==F)F.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.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)}}}])}));
@@ -18,6 +18,8 @@ interface TooltipData {
18
18
  */
19
19
  export interface TooltipComputed {
20
20
  [key: string]: any;
21
+ computedTarget: any;
22
+ computedOpen: any;
21
23
  }
22
24
  /**
23
25
  * @hidden
@@ -27,6 +27,14 @@ var Tooltip = {
27
27
  name: 'KendoTooltip',
28
28
  inheritAttrs: false,
29
29
  props: {
30
+ showCallout: {
31
+ type: Boolean,
32
+ default: true
33
+ },
34
+ setCalloutOnPositionAuto: {
35
+ type: Number,
36
+ default: undefined
37
+ },
30
38
  anchorElement: {
31
39
  type: String,
32
40
  default: 'pointer',
@@ -56,6 +64,7 @@ var Tooltip = {
56
64
  wrapperStyle: Object,
57
65
  tooltipClassName: String,
58
66
  tooltipStyle: Object,
67
+ targetElement: Object,
59
68
  parentTitle: {
60
69
  type: Boolean,
61
70
  default: false
@@ -65,7 +74,7 @@ var Tooltip = {
65
74
  return {
66
75
  top: 0,
67
76
  left: 0,
68
- targetElement: null,
77
+ currentTargetElement: null,
69
78
  currentOpen: false,
70
79
  title: ''
71
80
  };
@@ -79,6 +88,17 @@ var Tooltip = {
79
88
  'k-animation-container-fixed': true,
80
89
  'k-animation-container-shown': true
81
90
  }, _a[this.$props.className] = true, _a;
91
+ },
92
+ computedTarget: function computedTarget() {
93
+ return this.targetElement !== undefined ? this.targetElement : this.currentTargetElement;
94
+ },
95
+ computedOpen: function computedOpen() {
96
+ return this.open !== undefined ? this.open : this.currentOpen;
97
+ }
98
+ },
99
+ inject: {
100
+ kendoContext: {
101
+ default: null
82
102
  }
83
103
  },
84
104
  created: function created() {
@@ -86,31 +106,21 @@ var Tooltip = {
86
106
  this.top = 0;
87
107
  this.left = 0;
88
108
  this.willOpen = false;
109
+ this.context = this.kendoContext || undefined;
89
110
  },
90
111
  mounted: function mounted() {
91
112
  if (document) {
92
113
  document.body.addEventListener('mousemove', this.handleBodyMousemove);
93
114
  }
94
115
  },
95
- destroyed: function destroyed() {
96
- clearTimeout(this.openTimeoutId);
97
- clearInterval(this.updateIntervalId);
98
-
99
- if (document) {
100
- document.body.removeEventListener('mousemove', this.handleBodyMousemove);
101
- }
102
-
103
- if (this.element) {
104
- this.element.remove();
105
- }
116
+ destroyed: !!gh ? undefined : function () {
117
+ this.destroyElement();
118
+ },
119
+ // @ts-ignore
120
+ unmounted: function unmounted() {
121
+ this.destroyElement();
106
122
  },
107
123
  updated: function updated() {
108
- if (this.$props.targetElement) {
109
- this.showToolTip({
110
- target: this.$props.targetElement
111
- });
112
- }
113
-
114
124
  this.element = this.v3 ? this.elementRef : this.$refs.element;
115
125
 
116
126
  if (!this.element) {
@@ -122,7 +132,7 @@ var Tooltip = {
122
132
  if (this.$props.onPosition) {
123
133
  position = this.$props.onPosition.call(undefined, {
124
134
  element: this.element,
125
- targetElement: this.state.targetElement,
135
+ targetElement: this.computedTarget,
126
136
  mouseTop: this.top,
127
137
  mouseLeft: this.left,
128
138
  anchorElement: this.$props.anchorElement,
@@ -136,11 +146,11 @@ var Tooltip = {
136
146
  this.element.style.left = position.left + 'px';
137
147
  this.element.style.top = position.top + 'px';
138
148
 
139
- if (this.targetElement) {
140
- var appendToElement = this.$props.appendTo ? this.$props.appendTo : this.targetElement.ownerDocument.body;
149
+ if (this.computedTarget) {
150
+ var appendToElement = this.$props.appendTo ? this.$props.appendTo : this.computedTarget.ownerDocument.body;
141
151
 
142
152
  if (this.element.parentElement !== appendToElement) {
143
- this.targetElement.ownerDocument.body.append(this.element);
153
+ this.computedTarget.ownerDocument.body.append(this.element);
144
154
  }
145
155
  }
146
156
 
@@ -169,11 +179,6 @@ var Tooltip = {
169
179
 
170
180
  var h = gh || createElement;
171
181
  var defaultSlot = getDefaultSlots(this);
172
-
173
- if (this.$props.open === false) {
174
- return null;
175
- }
176
-
177
182
  var currentZIndex = this.getCurrentZIndex();
178
183
  var content = this.$props.content ? templateRendering.call(this, this.$props.content, getListeners.call(this)) : undefined;
179
184
  var contentDefaultRendering = this.title;
@@ -183,10 +188,10 @@ var Tooltip = {
183
188
  defaultRendering: contentDefaultRendering,
184
189
  additionalProps: {
185
190
  title: this.title,
186
- target: this.targetElement
191
+ target: this.computedTarget
187
192
  }
188
193
  });
189
- var innerToolTip = h("div", {
194
+ var innerToolTip = this.computedOpen && h("div", {
190
195
  "class": classNames('k-tooltip', this.$props.tooltipClassName),
191
196
  style: __assign({
192
197
  position: 'relative'
@@ -198,7 +203,7 @@ var Tooltip = {
198
203
  _this.calloutRef = el;
199
204
  } : 'callout'
200
205
  })]);
201
- var tooltip = this.targetElement && this.title && this.targetElement.ownerDocument && h("div", {
206
+ var tooltip = this.computedTarget && this.title && this.computedTarget.ownerDocument && h("div", {
202
207
  ref: this.v3 ? function (el) {
203
208
  _this.elementRef = el;
204
209
  } : 'element',
@@ -222,14 +227,24 @@ var Tooltip = {
222
227
  onMouseout: this.handleMouseOut
223
228
  }, [tooltip, defaultSlot]);
224
229
  } else {
225
- return {
226
- tooltip: tooltip
227
- };
230
+ return tooltip;
228
231
  }
229
232
  },
230
233
  methods: {
234
+ destroyElement: function destroyElement() {
235
+ clearTimeout(this.openTimeoutId);
236
+ clearInterval(this.updateIntervalId);
237
+
238
+ if (document) {
239
+ document.body.removeEventListener('mousemove', this.handleBodyMousemove);
240
+ }
241
+
242
+ if (this.element) {
243
+ this.element.remove();
244
+ }
245
+ },
231
246
  handleMouseOut: function handleMouseOut(event) {
232
- var currentDocument = this.targetElement ? this.targetElement.ownerDocument : document;
247
+ var currentDocument = this.computedTarget ? this.computedTarget.ownerDocument : document;
233
248
  var element = currentDocument && currentDocument.elementFromPoint(event.clientX, event.clientY);
234
249
 
235
250
  if (isTooltipElement(element)) {
@@ -247,7 +262,7 @@ var Tooltip = {
247
262
  handleMouseOver: function handleMouseOver(event) {
248
263
  var target = event.target;
249
264
 
250
- if (!this.isVisible(target) || isTooltipElement(target) || target === this.targetElement) {
265
+ if (!this.isVisible(target) || isTooltipElement(target) || target === this.computedTarget) {
251
266
  return;
252
267
  }
253
268
 
@@ -262,7 +277,7 @@ var Tooltip = {
262
277
  event: event,
263
278
  component: this
264
279
  });
265
- this.targetElement = null;
280
+ this.currentTargetElement = null;
266
281
  this.currentOpen = false;
267
282
  this.title = '';
268
283
  },
@@ -281,11 +296,11 @@ var Tooltip = {
281
296
  });
282
297
  }
283
298
 
284
- var target = this.$props.targetElement || event.target;
299
+ var target = this.computedTarget || event.target;
285
300
  var titleResult = this.getTitle(target);
286
301
 
287
302
  if (!titleResult.title) {
288
- if (this.currentOpen) {
303
+ if (this.computedOpen) {
289
304
  this.onClose(event);
290
305
  }
291
306
 
@@ -300,14 +315,14 @@ var Tooltip = {
300
315
  this.willOpen = true;
301
316
 
302
317
  if (!this.$props.openDelay) {
303
- this.targetElement = target;
318
+ this.currentTargetElement = target;
304
319
  this.currentOpen = true;
305
320
  this.title = titleResult.title;
306
321
  this.setUpdateInterval();
307
322
  } else {
308
323
  this.openTimeoutId = window.setTimeout(function () {
309
324
  if (_this.willOpen) {
310
- _this.targetElement = target;
325
+ _this.currentTargetElement = target;
311
326
  _this.currentOpen = true;
312
327
  _this.title = titleResult.title;
313
328
 
@@ -329,7 +344,7 @@ var Tooltip = {
329
344
  }
330
345
  },
331
346
  onIntervalUpdate: function onIntervalUpdate() {
332
- var target = this.targetElement;
347
+ var target = this.computedTarget;
333
348
 
334
349
  if (!target) {
335
350
  return;
@@ -351,7 +366,7 @@ var Tooltip = {
351
366
  return !this.$props.filter || this.$props.filter(element);
352
367
  },
353
368
  setPosition: function setPosition(element) {
354
- var domRect = getDomRect(this.targetElement);
369
+ var domRect = getDomRect(this.computedTarget);
355
370
  var left = getLeftPosition(this.left, element.offsetWidth, domRect, this.$props.anchorElement, this.$props.position);
356
371
  var top = getTopPosition(this.top, domRect, element.offsetHeight, this.$props.anchorElement, this.$props.position);
357
372
  return {
@@ -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: 1640002656,
8
+ publishDate: 1641397077,
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
  };
@@ -18,6 +18,8 @@ interface TooltipData {
18
18
  */
19
19
  export interface TooltipComputed {
20
20
  [key: string]: any;
21
+ computedTarget: any;
22
+ computedOpen: any;
21
23
  }
22
24
  /**
23
25
  * @hidden
@@ -38,6 +38,14 @@ var Tooltip = {
38
38
  name: 'KendoTooltip',
39
39
  inheritAttrs: false,
40
40
  props: {
41
+ showCallout: {
42
+ type: Boolean,
43
+ default: true
44
+ },
45
+ setCalloutOnPositionAuto: {
46
+ type: Number,
47
+ default: undefined
48
+ },
41
49
  anchorElement: {
42
50
  type: String,
43
51
  default: 'pointer',
@@ -67,6 +75,7 @@ var Tooltip = {
67
75
  wrapperStyle: Object,
68
76
  tooltipClassName: String,
69
77
  tooltipStyle: Object,
78
+ targetElement: Object,
70
79
  parentTitle: {
71
80
  type: Boolean,
72
81
  default: false
@@ -76,7 +85,7 @@ var Tooltip = {
76
85
  return {
77
86
  top: 0,
78
87
  left: 0,
79
- targetElement: null,
88
+ currentTargetElement: null,
80
89
  currentOpen: false,
81
90
  title: ''
82
91
  };
@@ -90,6 +99,17 @@ var Tooltip = {
90
99
  'k-animation-container-fixed': true,
91
100
  'k-animation-container-shown': true
92
101
  }, _a[this.$props.className] = true, _a;
102
+ },
103
+ computedTarget: function computedTarget() {
104
+ return this.targetElement !== undefined ? this.targetElement : this.currentTargetElement;
105
+ },
106
+ computedOpen: function computedOpen() {
107
+ return this.open !== undefined ? this.open : this.currentOpen;
108
+ }
109
+ },
110
+ inject: {
111
+ kendoContext: {
112
+ default: null
93
113
  }
94
114
  },
95
115
  created: function created() {
@@ -97,31 +117,21 @@ var Tooltip = {
97
117
  this.top = 0;
98
118
  this.left = 0;
99
119
  this.willOpen = false;
120
+ this.context = this.kendoContext || undefined;
100
121
  },
101
122
  mounted: function mounted() {
102
123
  if (document) {
103
124
  document.body.addEventListener('mousemove', this.handleBodyMousemove);
104
125
  }
105
126
  },
106
- destroyed: function destroyed() {
107
- clearTimeout(this.openTimeoutId);
108
- clearInterval(this.updateIntervalId);
109
-
110
- if (document) {
111
- document.body.removeEventListener('mousemove', this.handleBodyMousemove);
112
- }
113
-
114
- if (this.element) {
115
- this.element.remove();
116
- }
127
+ destroyed: !!gh ? undefined : function () {
128
+ this.destroyElement();
129
+ },
130
+ // @ts-ignore
131
+ unmounted: function unmounted() {
132
+ this.destroyElement();
117
133
  },
118
134
  updated: function updated() {
119
- if (this.$props.targetElement) {
120
- this.showToolTip({
121
- target: this.$props.targetElement
122
- });
123
- }
124
-
125
135
  this.element = this.v3 ? this.elementRef : this.$refs.element;
126
136
 
127
137
  if (!this.element) {
@@ -133,7 +143,7 @@ var Tooltip = {
133
143
  if (this.$props.onPosition) {
134
144
  position = this.$props.onPosition.call(undefined, {
135
145
  element: this.element,
136
- targetElement: this.state.targetElement,
146
+ targetElement: this.computedTarget,
137
147
  mouseTop: this.top,
138
148
  mouseLeft: this.left,
139
149
  anchorElement: this.$props.anchorElement,
@@ -147,11 +157,11 @@ var Tooltip = {
147
157
  this.element.style.left = position.left + 'px';
148
158
  this.element.style.top = position.top + 'px';
149
159
 
150
- if (this.targetElement) {
151
- var appendToElement = this.$props.appendTo ? this.$props.appendTo : this.targetElement.ownerDocument.body;
160
+ if (this.computedTarget) {
161
+ var appendToElement = this.$props.appendTo ? this.$props.appendTo : this.computedTarget.ownerDocument.body;
152
162
 
153
163
  if (this.element.parentElement !== appendToElement) {
154
- this.targetElement.ownerDocument.body.append(this.element);
164
+ this.computedTarget.ownerDocument.body.append(this.element);
155
165
  }
156
166
  }
157
167
 
@@ -180,11 +190,6 @@ var Tooltip = {
180
190
 
181
191
  var h = gh || createElement;
182
192
  var defaultSlot = kendo_vue_common_1.getDefaultSlots(this);
183
-
184
- if (this.$props.open === false) {
185
- return null;
186
- }
187
-
188
193
  var currentZIndex = this.getCurrentZIndex();
189
194
  var content = this.$props.content ? kendo_vue_common_1.templateRendering.call(this, this.$props.content, kendo_vue_common_1.getListeners.call(this)) : undefined;
190
195
  var contentDefaultRendering = this.title;
@@ -194,10 +199,10 @@ var Tooltip = {
194
199
  defaultRendering: contentDefaultRendering,
195
200
  additionalProps: {
196
201
  title: this.title,
197
- target: this.targetElement
202
+ target: this.computedTarget
198
203
  }
199
204
  });
200
- var innerToolTip = h("div", {
205
+ var innerToolTip = this.computedOpen && h("div", {
201
206
  "class": kendo_vue_common_1.classNames('k-tooltip', this.$props.tooltipClassName),
202
207
  style: __assign({
203
208
  position: 'relative'
@@ -209,7 +214,7 @@ var Tooltip = {
209
214
  _this.calloutRef = el;
210
215
  } : 'callout'
211
216
  })]);
212
- var tooltip = this.targetElement && this.title && this.targetElement.ownerDocument && h("div", {
217
+ var tooltip = this.computedTarget && this.title && this.computedTarget.ownerDocument && h("div", {
213
218
  ref: this.v3 ? function (el) {
214
219
  _this.elementRef = el;
215
220
  } : 'element',
@@ -233,14 +238,24 @@ var Tooltip = {
233
238
  onMouseout: this.handleMouseOut
234
239
  }, [tooltip, defaultSlot]);
235
240
  } else {
236
- return {
237
- tooltip: tooltip
238
- };
241
+ return tooltip;
239
242
  }
240
243
  },
241
244
  methods: {
245
+ destroyElement: function destroyElement() {
246
+ clearTimeout(this.openTimeoutId);
247
+ clearInterval(this.updateIntervalId);
248
+
249
+ if (document) {
250
+ document.body.removeEventListener('mousemove', this.handleBodyMousemove);
251
+ }
252
+
253
+ if (this.element) {
254
+ this.element.remove();
255
+ }
256
+ },
242
257
  handleMouseOut: function handleMouseOut(event) {
243
- var currentDocument = this.targetElement ? this.targetElement.ownerDocument : document;
258
+ var currentDocument = this.computedTarget ? this.computedTarget.ownerDocument : document;
244
259
  var element = currentDocument && currentDocument.elementFromPoint(event.clientX, event.clientY);
245
260
 
246
261
  if (utils_1.isTooltipElement(element)) {
@@ -258,7 +273,7 @@ var Tooltip = {
258
273
  handleMouseOver: function handleMouseOver(event) {
259
274
  var target = event.target;
260
275
 
261
- if (!this.isVisible(target) || utils_1.isTooltipElement(target) || target === this.targetElement) {
276
+ if (!this.isVisible(target) || utils_1.isTooltipElement(target) || target === this.computedTarget) {
262
277
  return;
263
278
  }
264
279
 
@@ -273,7 +288,7 @@ var Tooltip = {
273
288
  event: event,
274
289
  component: this
275
290
  });
276
- this.targetElement = null;
291
+ this.currentTargetElement = null;
277
292
  this.currentOpen = false;
278
293
  this.title = '';
279
294
  },
@@ -292,11 +307,11 @@ var Tooltip = {
292
307
  });
293
308
  }
294
309
 
295
- var target = this.$props.targetElement || event.target;
310
+ var target = this.computedTarget || event.target;
296
311
  var titleResult = this.getTitle(target);
297
312
 
298
313
  if (!titleResult.title) {
299
- if (this.currentOpen) {
314
+ if (this.computedOpen) {
300
315
  this.onClose(event);
301
316
  }
302
317
 
@@ -311,14 +326,14 @@ var Tooltip = {
311
326
  this.willOpen = true;
312
327
 
313
328
  if (!this.$props.openDelay) {
314
- this.targetElement = target;
329
+ this.currentTargetElement = target;
315
330
  this.currentOpen = true;
316
331
  this.title = titleResult.title;
317
332
  this.setUpdateInterval();
318
333
  } else {
319
334
  this.openTimeoutId = window.setTimeout(function () {
320
335
  if (_this.willOpen) {
321
- _this.targetElement = target;
336
+ _this.currentTargetElement = target;
322
337
  _this.currentOpen = true;
323
338
  _this.title = titleResult.title;
324
339
 
@@ -340,7 +355,7 @@ var Tooltip = {
340
355
  }
341
356
  },
342
357
  onIntervalUpdate: function onIntervalUpdate() {
343
- var target = this.targetElement;
358
+ var target = this.computedTarget;
344
359
 
345
360
  if (!target) {
346
361
  return;
@@ -362,7 +377,7 @@ var Tooltip = {
362
377
  return !this.$props.filter || this.$props.filter(element);
363
378
  },
364
379
  setPosition: function setPosition(element) {
365
- var domRect = utils_1.getDomRect(this.targetElement);
380
+ var domRect = utils_1.getDomRect(this.computedTarget);
366
381
  var left = utils_1.getLeftPosition(this.left, element.offsetWidth, domRect, this.$props.anchorElement, this.$props.position);
367
382
  var top = utils_1.getTopPosition(this.top, domRect, element.offsetHeight, this.$props.anchorElement, this.$props.position);
368
383
  return {
@@ -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: 1640002656,
11
+ publishDate: 1641397077,
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.1-dev.202112201220",
3
+ "version": "2.7.2",
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.1-dev.202112201220"
36
+ "@progress/kendo-vue-common": "2.7.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@progress/kendo-licensing": "^1.0.1",
40
- "@progress/kendo-vue-dialogs": "2.7.1-dev.202112201220",
41
- "@progress/kendo-vue-grid": "2.7.1-dev.202112201220",
42
- "@progress/kendo-vue-intl": "2.7.1-dev.202112201220"
40
+ "@progress/kendo-vue-dialogs": "2.7.2",
41
+ "@progress/kendo-vue-grid": "2.7.2",
42
+ "@progress/kendo-vue-intl": "2.7.2"
43
43
  },
44
44
  "@progress": {
45
45
  "friendlyName": "Tooltip",