@progress/kendo-vue-tooltip 7.1.0-develop.5 → 7.1.0-develop.7
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.
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vue"),require("@progress/kendo-vue-common")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).KendoVueTooltip={},t.Vue,t.KendoVueCommon)}(this,(function(t,e,o){"use strict";const i=10,n=10,s=(t,e,n,s,l)=>{switch(l){case"bottom":case"top":return"pointer"===s?t-e/2:n.left-e/2+n.width/2;case"left":return"pointer"===s?t-e-i:n.left-e-i;case"right":return"pointer"===s?t+i:n.right+i;default:return"pointer"===s?o.canUseDOM&&t<window.screen.availWidth/2?t-i:t-e+i:o.canUseDOM&&t<window.screen.availWidth/2?n.left:n.right-e}},l=(t,e,s,l,r)=>{switch(r){case"bottom":return"pointer"===l?t+n:e.bottom+n;case"left":case"right":return"pointer"===l?t-s/2:e.top-s/2+e.height/2;case"top":return"pointer"===l?t-s-n:e.top-s-n;default:return"pointer"===l?o.canUseDOM&&t<window.innerHeight/2?t+i:t-s-i:o.canUseDOM&&t<window.innerHeight/2?e.bottom+n:e.top-s-n}},r=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-x","k-svg-icon k-svg-i-x"],a=t=>{if(null===t)return!1;let e=t;for(;e;){if(null!==e&&e.classList&&e.classList.contains("k-tooltip"))return!0;e=null!==e.parentNode&&e.parentNode}return r.filter((e=>e===t.className)).length>0},p={name:"@progress/kendo-vue-tooltip",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1639571344,version:"7.1.0-develop.
|
|
15
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vue"),require("@progress/kendo-vue-common")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).KendoVueTooltip={},t.Vue,t.KendoVueCommon)}(this,(function(t,e,o){"use strict";const i=10,n=10,s=(t,e,n,s,l)=>{switch(l){case"bottom":case"top":return"pointer"===s?t-e/2:n.left-e/2+n.width/2;case"left":return"pointer"===s?t-e-i:n.left-e-i;case"right":return"pointer"===s?t+i:n.right+i;default:return"pointer"===s?o.canUseDOM&&t<window.screen.availWidth/2?t-i:t-e+i:o.canUseDOM&&t<window.screen.availWidth/2?n.left:n.right-e}},l=(t,e,s,l,r)=>{switch(r){case"bottom":return"pointer"===l?t+n:e.bottom+n;case"left":case"right":return"pointer"===l?t-s/2:e.top-s/2+e.height/2;case"top":return"pointer"===l?t-s-n:e.top-s-n;default:return"pointer"===l?o.canUseDOM&&t<window.innerHeight/2?t+i:t-s-i:o.canUseDOM&&t<window.innerHeight/2?e.bottom+n:e.top-s-n}},r=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-x","k-svg-icon k-svg-i-x"],a=t=>{if(null===t)return!1;let e=t;for(;e;){if(null!==e&&e.classList&&e.classList.contains("k-tooltip"))return!0;e=null!==e.parentNode&&e.parentNode}return r.filter((e=>e===t.className)).length>0},p={name:"@progress/kendo-vue-tooltip",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1639571344,version:"7.1.0-develop.7",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"},u="_tb_active",h=e.defineComponent({name:"KendoTooltip",inheritAttrs:!1,props:{showCallout:{type:Boolean,default:!0},setCalloutOnPositionAuto:{type:String,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:{type:void 0},parentTitle:{type:Boolean,default:!1}},data:()=>({top:0,left:0,currentTargetElement:null,currentOpen:!1,title:""}),computed:{wrapperClass(){return{"k-animation-container":!0,"k-animation-container-fixed":!0,"k-animation-container-shown":!0,[this.$props.className]:!0}},computedTarget(){return void 0!==this.targetElement?this.targetElement:this.currentTargetElement},computedOpen(){return void 0!==this.open?this.open:this.currentOpen}},inject:{kCurrentZIndex:{default:null}},created(){o.validatePackage(p),this.top=0,this.left=0,this.willOpen=!1},mounted(){this.element=o.getRef(this,"element"),document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},unmounted(){this.destroyElement()},updated(){if(this.$props.open&&this.$props.targetElement&&this.showToolTip({target:this.$props.targetElement}),this.element=o.getRef(this,"element"),this.element){if(this.resetPosition(),this.computedTarget){const 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.calloutRef,this.callout&&(this.callout.className=this.calloutClassName(),"auto"===this.$props.position&&o.canUseDOM&&(this.left<window.screen.availWidth/2?this.callout.style.left=this.$props.setCalloutOnPositionAuto||"25%":this.callout.style.left=this.$props.setCalloutOnPositionAuto||"75%"))}},render(){const t=o.getDefaultSlots(this),i=this.getCurrentZIndex(),n=this.$props.content?o.templateRendering.call(this,this.$props.content,o.getListeners.call(this)):void 0,s=this.title;let l=o.guid()+u;this.computedTarget&&(this.computedTarget.hasAttribute("id")&&(l=this.computedTarget.getAttribute("id")+u),this.computedTarget.setAttribute("aria-describedby",l));const r=o.getTemplate.call(this,{h:e.h,template:n,defaultRendering:s,additionalProps:{title:this.title,target:this.computedTarget}}),a=this.computedOpen&&e.createVNode("div",{class:o.classNames("k-tooltip",this.$props.tooltipClassName),role:"tooltip",id:l,style:{position:"relative",...this.$props.tooltipStyle}},[e.createVNode("div",{class:"k-tooltip-content"},[r]),this.$props.showCallout&&e.createVNode("div",{ref:o.setRef(this,"callout")},null)]),p=this.computedTarget&&this.title&&this.computedTarget.ownerDocument&&e.createVNode("div",{ref:o.setRef(this,"element"),class:this.wrapperClass,style:{zIndex:i,...this.$props.wrapperStyle},tabindex:0,onMouseleave:this.handleTooltipMouseOut},[e.createVNode("div",{class:"k-child-animation-container"},[a])]);return t?e.createVNode("div",{onMouseover:this.handleMouseOver,onMouseout:this.handleMouseOut},[p,t]):p},methods:{destroyElement(){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove),this.element&&this.element.remove()},handleTooltipMouseOut(t){this.onClose(t)},handleMouseOut(t){const e=this.computedTarget?this.computedTarget.ownerDocument:document;let o=e&&e.elementFromPoint(t.clientX,t.clientY);this.willOpen=!1,!a(o)&&this.computedTarget===t.target&&(this.$props.open||(clearInterval(this.updateIntervalId),this.onClose(t)))},handleMouseOver(t){const e=t.target;!this.isVisible(e)||a(e)||e===this.computedTarget||this.showToolTip(t)},handleBodyMousemove(t){this.top=t.clientY,this.left=t.clientX},onClose(t){this.$emit("close",{event:t,component:this}),this.computedTarget.removeAttribute("aria-describedby"),this.currentTargetElement=null,this.currentOpen=!1,this.title=""},showToolTip(t){clearTimeout(this.openTimeoutId),clearInterval(this.updateIntervalId),t.target.hasChildNodes()&&t.target.childNodes.forEach((e=>{"title"===e.nodeName&&(t.target.titleExpando=e.innerHTML,e.remove())}));const e=this.computedTarget||t.target;let i=this.getTitle(e);i.title?(i.element&&(i.element.titleExpando=i.title,i.element.title=""),this.willOpen=!0,this.$props.openDelay?o.canUseDOM&&(this.openTimeoutId=window.setTimeout((()=>{this.willOpen&&(this.currentTargetElement=e,this.currentOpen=!0,this.title=i.title,this.setUpdateInterval())}),this.$props.openDelay)):(this.currentTargetElement=e,this.currentOpen=!0,this.title=i.title,this.setUpdateInterval()),this.title!==i.title&&this.$emit("open",{event:t,compoponent:this})):this.computedOpen&&this.onClose(t)},setUpdateInterval(){this.$props.updateInterval&&(this.updateIntervalId=setInterval(this.onIntervalUpdate,this.$props.updateInterval))},onIntervalUpdate(){const t=this.computedTarget;t&&(null===t.parentElement?this.onClose({target:t}):this.showToolTip({target:t}))},resetPosition(){if(this.element){let t=this.setPosition(this.element);this.$props.updatePosition&&(t=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,defaultPosition:t})),this.element.style.left=t.left+"px",this.element.style.top=t.top+"px"}},isVisible(t){return!this.$props.filter||this.$props.filter(t)},setPosition(t){let e=(t=>null!==t?t.getBoundingClientRect():document.body.getBoundingClientRect())(this.parentTitle?this.getTitle(this.computedTarget).element:this.computedTarget);return{left:s(this.left,t.offsetWidth,e,this.$props.anchorElement,this.$props.position),top:l(this.top,e,t.offsetHeight,this.$props.anchorElement,this.$props.position)}},getTitle(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(){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 o.canUseDOM&&this.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},getCurrentZIndex(){return this.kCurrentZIndex?this.kCurrentZIndex:100}}});t.Tooltip=h}));
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-tooltip",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-tooltip",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1770355622,version:"7.1.0-develop.7",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"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "7.1.0-develop.
|
|
13
|
+
publishDate: 1770355622,
|
|
14
|
+
version: "7.1.0-develop.7",
|
|
15
15
|
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"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-tooltip",
|
|
3
|
-
"version": "7.1.0-develop.
|
|
3
|
+
"version": "7.1.0-develop.7",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@progress/kendo-licensing": "^1.7.2",
|
|
22
|
-
"@progress/kendo-vue-common": "7.1.0-develop.
|
|
22
|
+
"@progress/kendo-vue-common": "7.1.0-develop.7",
|
|
23
23
|
"vue": "^3.0.2"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"package": {
|
|
40
40
|
"productName": "Kendo UI for Vue",
|
|
41
41
|
"productCode": "KENDOUIVUE",
|
|
42
|
-
"publishDate":
|
|
42
|
+
"publishDate": 1770355622,
|
|
43
43
|
"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"
|
|
44
44
|
}
|
|
45
45
|
},
|