Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@progress/kendo-angular-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
836
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progress/kendo-angular-tooltip - npm Package Compare versions

Comparing version 2.1.4-dev.202006231516 to 2.1.4

2

dist/systemjs/kendo-angular-tooltip.js

@@ -5,2 +5,2 @@ /**-----------------------------------------------------------------------------------------

*-------------------------------------------------------------------------------------------*/
System.register("@progress/kendo-angular-tooltip",["tslib","@angular/core","@angular/common","@progress/kendo-angular-popup","rxjs/operators","rxjs","@progress/kendo-angular-l10n"],function(s){var r,p,a,l,c,u,h;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){r=e(t)},function(t){p=e(t)},function(t){a=e(t)},function(t){l=e(t)},function(t){c=e(t)},function(t){u=e(t)},function(t){h=e(t)}],execute:function(){function i(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var o,n;n={},i.m=o=[function(t,e){t.exports=p},function(t,e){t.exports=r},function(t,e,o){"use strict";function n(t){return 9===t.nodeType}Object.defineProperty(e,"__esModule",{value:!0}),e.align=function(t,e){var o={},i={},n={};switch(t){case"top":o={horizontal:"center",vertical:"top"},i={horizontal:"center",vertical:"bottom"},n={horizontal:0,vertical:e};break;case"bottom":o={horizontal:"center",vertical:"bottom"},i={horizontal:"center",vertical:"top"},n={horizontal:0,vertical:e};break;case"right":o={horizontal:"right",vertical:"center"},i={horizontal:"left",vertical:"center"},n={horizontal:e,vertical:0};break;case"left":o={horizontal:"left",vertical:"center"},i={horizontal:"right",vertical:"center"},n={horizontal:e,vertical:0}}return{anchorAlign:o,popupAlign:i,popupMargin:n}},e.collision=function(t,e){return t||("top"===e||"bottom"===e?{horizontal:"fit",vertical:"flip"}:{horizontal:"flip",vertical:"fit"})},e.closest=function(t,e){if(t.closest)return t.closest(e);for(var o=Element.prototype.matches?function(t,e){return t.matches(e)}:function(t,e){return t.msMatchesSelector(e)},i=t;i&&!n(i);){if(o(i,e))return i;i=i.parentNode}},e.contains=function(t,e){return!!t&&!n(t)&&(t.contains?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY):void 0)},e.hasParent=function(t,e){for(;t&&t!==e;)t=t.parentNode;return t},e.getCenterOffset=function(t,e,o){var i=t.getBoundingClientRect();return i[e]+i[o]/2},e.containsItem=function(t,e){return-1!==t.indexOf(e)}},function(t,e){t.exports=h},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1),n=o(0),r=o(3),d=o(2),s=(Object.defineProperty(p.prototype,"cssClasses",{get:function(){return"k-widget k-tooltip"},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"className",{get:function(){return this.closable},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"cssPosition",{get:function(){return"relative"},enumerable:!0,configurable:!0}),p.prototype.ngOnInit=function(){var o=this;this.dynamicRTLSubscription=this.localizationService.changes.subscribe(function(t){var e=t.rtl;return o.direction=e?"rtl":"ltr"})},p.prototype.ngOnDestroy=function(){this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe()},Object.defineProperty(p.prototype,"closeButtonTitle",{get:function(){return this.closeTitle||this.localizationService.get("closeTitle")},enumerable:!0,configurable:!0}),p.prototype.calloutPositionClass=function(){return{top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"}[this.position]},p.prototype.onCloseClick=function(t){t.preventDefault(),this.close.emit()},p.prototype.updateCalloutPosition=function(t,e){var o,i,n,r,s,p,a,l,c,u,h;this.callout&&(n=(i="top"===t||"bottom"===t)?"width":"height",r=i?"left":"top",s=i?"marginLeft":"marginTop",p=(o=this.content.nativeElement.querySelector(".k-callout")).getBoundingClientRect()[n],a=d.getCenterOffset(this.anchor.nativeElement,r,n),l=d.getCenterOffset(this.content.nativeElement,r,n),(1<(c=Math.abs(l-a))||0===c||0===Math.round(c))&&(u=l-a+p/2,o.style[s]=-u+"px"),h=this.calloutStyles(t,p,e),Object.keys(h).forEach(function(t){o.style[t]=h[t]}))},i.__decorate([n.HostBinding("attr.dir"),i.__metadata("design:type",String)],p.prototype,"direction",void 0),i.__decorate([n.Output(),i.__metadata("design:type",n.EventEmitter)],p.prototype,"close",void 0),i.__decorate([n.HostBinding("class"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],p.prototype,"cssClasses",null),i.__decorate([n.HostBinding("class.k-tooltip-closable"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],p.prototype,"className",null),i.__decorate([n.HostBinding("style.position"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],p.prototype,"cssPosition",null),i.__decorate([n.HostBinding("style.width.px"),n.Input(),i.__metadata("design:type",Number)],p.prototype,"tooltipWidth",void 0),i.__decorate([n.HostBinding("style.height.px"),n.Input(),i.__metadata("design:type",Number)],p.prototype,"tooltipHeight",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],p.prototype,"titleTemplate",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.ElementRef)],p.prototype,"anchor",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],p.prototype,"closable",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],p.prototype,"templateRef",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],p.prototype,"templateString",void 0),i.__decorate([n.Component({selector:"kendo-tooltip",template:'\n <ng-container kendoTooltipLocalizedMessages\n i18n-closeTitle="kendo.tooltip.closeTitle|The title of the close button"\n closeTitle="Close"\n >\n </ng-container>\n\n <div class="k-tooltip-content">\n <div class="k-tooltip-title" *ngIf="titleTemplate">\n <ng-template\n [ngIf]="titleTemplate"\n [ngTemplateOutlet]="titleTemplate"\n [ngTemplateOutletContext]="{ $implicit: anchor, anchor: anchor }">\n </ng-template>\n </div>\n\n <ng-template\n [ngIf]="templateRef"\n [ngTemplateOutlet]="templateRef"\n [ngTemplateOutletContext]="{ $implicit: anchor, anchor: anchor }">\n </ng-template>\n <ng-template\n [ngIf]="templateString">\n {{ templateString }}\n </ng-template>\n </div>\n\n <div *ngIf="closable" class="k-tooltip-button" (click)="onCloseClick($event)">\n <a href="#" class="k-icon k-i-close" [attr.title]="closeButtonTitle"></a>\n </div>\n\n <div class="k-callout" *ngIf="callout" [ngClass]="calloutPositionClass()"></div>\n ',providers:[r.LocalizationService,{provide:r.L10N_PREFIX,useValue:"kendo.tooltip"}]}),i.__metadata("design:paramtypes",[n.ElementRef,r.LocalizationService])],p));function p(t,e){this.content=t,this.localizationService=e,this.close=new n.EventEmitter,this.tooltipWidth=null,this.tooltipHeight=null,this.callout=!0,this.calloutStyles=function(t,e,o){var i={},n="top"===t||"bottom"===t;return o?("top"===t?i.bottom="unset":"bottom"===t?i.top="unset":"left"===t?i.right="unset":"right"===t&&(i.left="unset"),i[t]=-e+"px",i.transform=n?"rotateX(180deg)":"rotateY(180deg)"):i.transform=n?"rotateX(0deg)":"rotateY(0deg)",i},this.direction=e.rtl?"rtl":"ltr"}e.TooltipContentComponent=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1),n=o(0);e.TOOLTIP_SETTINGS=new n.InjectionToken("kendo-ui-tooltip-settings");var r=i.__decorate([n.Injectable()],function(){});e.TooltipSettings=r},function(t,e){t.exports=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1),n=o(0),p=o(12),a=o(11),r=o(6),s=o(5),l=o(4),c=o(2),u=(Object.defineProperty(h.prototype,"tooltipTemplate",{get:function(){return this.template},set:function(t){this.template=t},enumerable:!0,configurable:!0}),h.prototype.show=function(t){var e=this;if(!this.popupRef)if(t instanceof Element&&(t={nativeElement:t}),this.anchor=t,"hover"===this.showOn){if(this.popupRef)return;clearTimeout(this.showTimeout),this.showTimeout=window.setTimeout(function(){return e.showContent(e.anchor)},this.showAfter)}else this.hideElementTitle(this.anchor),this.showContent(this.anchor)},h.prototype.hide=function(){clearTimeout(this.showTimeout);var t=this.anchor&&this.anchor.nativeElement;t&&t.getAttribute("data-title")&&(t.getAttribute("title")||t.setAttribute("title",t.getAttribute("data-title")),t.setAttribute("data-title","")),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe(),this.closeClickSubscription&&this.closeClickSubscription.unsubscribe(),this.closePopup()},h.prototype.toggle=function(t,e){var o=this.anchor&&this.anchor.nativeElement;t instanceof Element&&(t={nativeElement:t}),o!==t.nativeElement&&this.hide(),o===t.nativeElement&&"click"===this.showOn&&this.hide(),void 0===e&&(e=!this.popupRef),e?this.show(t):this.hide()},h.prototype.ngOnInit=function(){void 0===this.showOn&&(this.showOn="hover"),this.verifyProperties()},h.prototype.ngOnChanges=function(t){t.showOn&&this.subscribeClick()},h.prototype.ngAfterViewChecked=function(){this.popupRef&&this.anchor&&!c.hasParent(this.anchor.nativeElement||this.anchor,this.tooltipWrapper.nativeElement)&&(this.anchor=null,this.hide())},h.prototype.ngOnDestroy=function(){this.hide(),this.template=null,this.anchorTitleSubscription.unsubscribe(),this.mouseOverSubscription.unsubscribe(),this.mouseOutSubscription.unsubscribe(),this.mouseClickSubscription&&this.mouseClickSubscription.unsubscribe(),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe(),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe()},h.prototype.showContent=function(t){var e=this;(t.nativeElement.getAttribute("data-title")||this.template)&&(this.ngZone.run(function(){e.openPopup(t),e.bindContent(e.popupRef.content,t)}),this.popupRef.popupAnchorViewportLeave.pipe(p.take(1)).subscribe(function(){return e.hide()}))},h.prototype.bindContent=function(t,e){var o=this,i=t.instance;this.closeClickSubscription=i.close.subscribe(function(){o.hide()}),this.template?i.templateRef=this.template:i.templateString=this.anchor.nativeElement.getAttribute("data-title"),this.titleTemplate&&(i.titleTemplate=this.titleTemplate),i.closeTitle=this.closeTitle,i.anchor=e,i.callout=this.callout,i.closable=this.closable,i.position=this.position,i.tooltipWidth=this.tooltipWidth,i.tooltipHeight=this.tooltipHeight,this.popupRef.content.changeDetectorRef.detectChanges()},h.prototype.hideElementTitle=function(t){var e=t.nativeElement;e.getAttribute("title")&&(e.setAttribute("data-title",e.getAttribute("title")),e.setAttribute("title",""))},h.prototype.openPopup=function(t){var i=this,e=c.align(this.position,this.offset),o=e.anchorAlign,n=e.popupAlign,r=e.popupMargin;this.popupRef=this.popupService.open({anchor:t,anchorAlign:o,animate:!1,content:l.TooltipContentComponent,collision:c.collision(this.collision,this.position),margin:r,popupAlign:n,popupClass:"k-popup-transparent"}),this.renderer.addClass(this.popupRef.popupElement,"k-tooltip-wrapper"),this.tooltipClass&&this.renderer.addClass(this.popupRef.popupElement,this.tooltipClass);var s=this.popupRef.content.instance;s.callout&&(this.popupPositionChangeSubscription=this.popupRef.popupPositionChange.subscribe(function(t){var e=t.flip,o=!0===e.horizontal||!0===e.vertical;s.updateCalloutPosition(i.position,o)})),"hover"===this.showOn&&this.ngZone.runOutsideAngular(function(){var t=i.popupRef.popupElement;i.popupMouseOutSubscription=a.fromEvent(t,"mouseout").subscribe(function(t){return i.onMouseOut(t)})})},h.prototype.closePopup=function(){this.popupRef&&(this.popupRef.close(),this.popupRef=null),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe()},h.prototype.subscribeClick=function(){var e=this;this.mouseClickSubscription&&this.mouseClickSubscription.unsubscribe(),"click"===this.showOn&&(this.mouseClickSubscription=a.fromEvent(document,"click").pipe(p.filter(function(){return""!==e.filter})).subscribe(function(t){return e.onMouseClick(t,e.tooltipWrapper.nativeElement)}))},h.prototype.onMouseClick=function(t,e){var o=t.target,i=c.closest(o,this.filter),n=this.popupRef&&this.popupRef.popupElement;if(n){if(n.contains(o))return;if(this.closable)return}e.contains(o)&&i?this.toggle(i,!0):n&&this.hide()},h.prototype.onMouseOver=function(t){var e=c.closest(t.target,this.filter);"hover"===this.showOn&&e&&this.toggle(e,!0)},h.prototype.onMouseOut=function(t){var e,o;"hover"!==this.showOn||this.closable||(e=this.popupRef&&this.popupRef.popupElement,(o=t.relatedTarget)&&this.anchor&&c.contains(this.anchor.nativeElement,o)||o&&c.contains(e,o)||this.hide())},h.prototype.verifyProperties=function(){if(n.isDevMode()){if(!c.containsItem(this.validPositions,this.position))throw new Error("Invalid value provided for position property.The available options are 'top', 'bottom', 'left', or 'right'.");if(!c.containsItem(this.validShowOptions,this.showOn))throw new Error("Invalid value provided for showOn property.The available options are 'hover' or 'none'.")}},i.__decorate([n.Input(),i.__metadata("design:type",String)],h.prototype,"filter",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],h.prototype,"position",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],h.prototype,"titleTemplate",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],h.prototype,"showOn",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],h.prototype,"showAfter",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],h.prototype,"callout",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],h.prototype,"closable",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],h.prototype,"offset",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],h.prototype,"tooltipWidth",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],h.prototype,"tooltipHeight",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],h.prototype,"tooltipClass",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Object)],h.prototype,"collision",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],h.prototype,"closeTitle",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef),i.__metadata("design:paramtypes",[n.TemplateRef])],h.prototype,"tooltipTemplate",null),i.__decorate([n.Directive({selector:"[kendoTooltip]",exportAs:"kendoTooltip"}),i.__param(4,n.Optional()),i.__param(5,n.Optional()),i.__param(5,n.Inject(s.TOOLTIP_SETTINGS)),i.__metadata("design:paramtypes",[n.ElementRef,n.NgZone,n.Renderer2,r.PopupService,s.TooltipSettings,s.TooltipSettings])],h));function h(t,e,o,i,n,r){var s=this;this.tooltipWrapper=t,this.ngZone=e,this.renderer=o,this.popupService=i,this.filter="[title]",this.position="top",this.showAfter=100,this.callout=!0,this.closable=!1,this.offset=6,this.anchor=null,this.validPositions=["top","bottom","right","left"],this.validShowOptions=["hover","click","none"],Object.assign(this,n,r),this.ngZone.runOutsideAngular(function(){var t=s.tooltipWrapper.nativeElement;s.anchorTitleSubscription=a.fromEvent(t,"mouseover").pipe(p.filter(function(){return""!==s.filter})).subscribe(function(t){var e=c.closest(t.target,s.filter);e&&s.hideElementTitle({nativeElement:e})}),s.mouseOverSubscription=a.fromEvent(t,"mouseover").pipe(p.debounceTime(100),p.filter(function(){return""!==s.filter})).subscribe(function(t){return s.onMouseOver(t)}),s.mouseOutSubscription=a.fromEvent(t,"mouseout").pipe(p.debounceTime(100)).subscribe(function(t){return s.onMouseOut(t)})})}e.TooltipDirective=u},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,n,r=o(1),s=o(0),p=o(3),a=(i=p.ComponentMessages,r.__extends(l,i),n=l,r.__decorate([s.Input(),r.__metadata("design:type",String)],l.prototype,"closeTitle",void 0),n=r.__decorate([s.Directive({providers:[{provide:p.ComponentMessages,useExisting:s.forwardRef(function(){return n})}],selector:"[kendoTooltipLocalizedMessages]"}),r.__metadata("design:paramtypes",[p.LocalizationService])],l));function l(t){var e=i.call(this)||this;return e.service=t,e}e.LocalizedMessagesDirective=a},function(t,e){t.exports=a},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1),n=o(0),r=o(9),s=o(7),p=o(6),a=o(4),l=o(8),c=[s.TooltipDirective,a.TooltipContentComponent,l.LocalizedMessagesDirective],u=[p.PopupModule],h=i.__decorate([n.NgModule({declarations:[c],entryComponents:[a.TooltipContentComponent],imports:[r.CommonModule].concat(u),exports:[c]})],function(){});e.TooltipModule=h},function(t,e){t.exports=u},function(t,e){t.exports=c},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(7);e.TooltipDirective=i.TooltipDirective;var n=o(10);e.TooltipModule=n.TooltipModule;var r=o(5);e.TooltipSettings=r.TooltipSettings,e.TOOLTIP_SETTINGS=r.TOOLTIP_SETTINGS,function(t){for(var e in t)s(e,t[e])}(e)}],i.c=n,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=13)}}});
System.register("@progress/kendo-angular-tooltip",["tslib","@angular/core","@angular/common","@progress/kendo-angular-popup","rxjs","rxjs/operators","@progress/kendo-angular-l10n"],function(s){var r,p,a,l,c,u,h;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){r=e(t)},function(t){p=e(t)},function(t){a=e(t)},function(t){l=e(t)},function(t){c=e(t)},function(t){u=e(t)},function(t){h=e(t)}],execute:function(){function i(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var o,n;n={},i.m=o=[function(t,e){t.exports=p},function(t,e){t.exports=r},function(t,e,o){"use strict";function n(t){return 9===t.nodeType}Object.defineProperty(e,"__esModule",{value:!0}),e.align=function(t,e){var o={},i={},n={};switch(t){case"top":o={horizontal:"center",vertical:"top"},i={horizontal:"center",vertical:"bottom"},n={horizontal:0,vertical:e};break;case"bottom":o={horizontal:"center",vertical:"bottom"},i={horizontal:"center",vertical:"top"},n={horizontal:0,vertical:e};break;case"right":o={horizontal:"right",vertical:"center"},i={horizontal:"left",vertical:"center"},n={horizontal:e,vertical:0};break;case"left":o={horizontal:"left",vertical:"center"},i={horizontal:"right",vertical:"center"},n={horizontal:e,vertical:0}}return{anchorAlign:o,popupAlign:i,popupMargin:n}},e.collision=function(t,e){return t||("top"===e||"bottom"===e?{horizontal:"fit",vertical:"flip"}:{horizontal:"flip",vertical:"fit"})},e.closest=function(t,e){if(t.closest)return t.closest(e);for(var o=Element.prototype.matches?function(t,e){return t.matches(e)}:function(t,e){return t.msMatchesSelector(e)},i=t;i&&!n(i);){if(o(i,e))return i;i=i.parentNode}},e.contains=function(t,e){return!!t&&!n(t)&&(t.contains?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY):void 0)},e.hasParent=function(t,e){for(;t&&t!==e;)t=t.parentNode;return t},e.getCenterOffset=function(t,e,o){var i=t.getBoundingClientRect();return i[e]+i[o]/2},e.containsItem=function(t,e){return-1!==t.indexOf(e)}},function(t,e){t.exports=h},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1),n=o(0),r=o(3),d=o(2),s=(Object.defineProperty(p.prototype,"cssClasses",{get:function(){return"k-widget k-tooltip"},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"className",{get:function(){return this.closable},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"cssPosition",{get:function(){return"relative"},enumerable:!0,configurable:!0}),p.prototype.ngOnInit=function(){var o=this;this.dynamicRTLSubscription=this.localizationService.changes.subscribe(function(t){var e=t.rtl;return o.direction=e?"rtl":"ltr"})},p.prototype.ngOnDestroy=function(){this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe()},Object.defineProperty(p.prototype,"closeButtonTitle",{get:function(){return this.closeTitle||this.localizationService.get("closeTitle")},enumerable:!0,configurable:!0}),p.prototype.calloutPositionClass=function(){return{top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"}[this.position]},p.prototype.onCloseClick=function(t){t.preventDefault(),this.close.emit()},p.prototype.updateCalloutPosition=function(t,e){var o,i,n,r,s,p,a,l,c,u,h;this.callout&&(n=(i="top"===t||"bottom"===t)?"width":"height",r=i?"left":"top",s=i?"marginLeft":"marginTop",p=(o=this.content.nativeElement.querySelector(".k-callout")).getBoundingClientRect()[n],a=d.getCenterOffset(this.anchor.nativeElement,r,n),l=d.getCenterOffset(this.content.nativeElement,r,n),(1<(c=Math.abs(l-a))||0===c||0===Math.round(c))&&(u=l-a+p/2,o.style[s]=-u+"px"),h=this.calloutStyles(t,p,e),Object.keys(h).forEach(function(t){o.style[t]=h[t]}))},i.__decorate([n.HostBinding("attr.dir"),i.__metadata("design:type",String)],p.prototype,"direction",void 0),i.__decorate([n.Output(),i.__metadata("design:type",n.EventEmitter)],p.prototype,"close",void 0),i.__decorate([n.HostBinding("class"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],p.prototype,"cssClasses",null),i.__decorate([n.HostBinding("class.k-tooltip-closable"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],p.prototype,"className",null),i.__decorate([n.HostBinding("style.position"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],p.prototype,"cssPosition",null),i.__decorate([n.HostBinding("style.width.px"),n.Input(),i.__metadata("design:type",Number)],p.prototype,"tooltipWidth",void 0),i.__decorate([n.HostBinding("style.height.px"),n.Input(),i.__metadata("design:type",Number)],p.prototype,"tooltipHeight",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],p.prototype,"titleTemplate",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.ElementRef)],p.prototype,"anchor",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],p.prototype,"closable",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],p.prototype,"templateRef",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],p.prototype,"templateString",void 0),i.__decorate([n.Component({selector:"kendo-tooltip",template:'\n <ng-container kendoTooltipLocalizedMessages\n i18n-closeTitle="kendo.tooltip.closeTitle|The title of the close button"\n closeTitle="Close"\n >\n </ng-container>\n\n <div class="k-tooltip-content">\n <div class="k-tooltip-title" *ngIf="titleTemplate">\n <ng-template\n [ngIf]="titleTemplate"\n [ngTemplateOutlet]="titleTemplate"\n [ngTemplateOutletContext]="{ $implicit: anchor, anchor: anchor }">\n </ng-template>\n </div>\n\n <ng-template\n [ngIf]="templateRef"\n [ngTemplateOutlet]="templateRef"\n [ngTemplateOutletContext]="{ $implicit: anchor, anchor: anchor }">\n </ng-template>\n <ng-template\n [ngIf]="templateString">\n {{ templateString }}\n </ng-template>\n </div>\n\n <div *ngIf="closable" class="k-tooltip-button" (click)="onCloseClick($event)">\n <a href="#" class="k-icon k-i-close" [attr.title]="closeButtonTitle"></a>\n </div>\n\n <div class="k-callout" *ngIf="callout" [ngClass]="calloutPositionClass()"></div>\n ',providers:[r.LocalizationService,{provide:r.L10N_PREFIX,useValue:"kendo.tooltip"}]}),i.__metadata("design:paramtypes",[n.ElementRef,r.LocalizationService])],p));function p(t,e){this.content=t,this.localizationService=e,this.close=new n.EventEmitter,this.tooltipWidth=null,this.tooltipHeight=null,this.callout=!0,this.calloutStyles=function(t,e,o){var i={},n="top"===t||"bottom"===t;return o?("top"===t?i.bottom="unset":"bottom"===t?i.top="unset":"left"===t?i.right="unset":"right"===t&&(i.left="unset"),i[t]=-e+"px",i.transform=n?"rotateX(180deg)":"rotateY(180deg)"):i.transform=n?"rotateX(0deg)":"rotateY(0deg)",i},this.direction=e.rtl?"rtl":"ltr"}e.TooltipContentComponent=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1),n=o(0);e.TOOLTIP_SETTINGS=new n.InjectionToken("kendo-ui-tooltip-settings");var r=i.__decorate([n.Injectable()],function(){});e.TooltipSettings=r},function(t,e){t.exports=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1),n=o(0),p=o(12),a=o(11),r=o(6),s=o(5),l=o(4),c=o(2),u=(Object.defineProperty(h.prototype,"tooltipTemplate",{get:function(){return this.template},set:function(t){this.template=t},enumerable:!0,configurable:!0}),h.prototype.show=function(t){var e=this;if(!this.popupRef)if(t instanceof Element&&(t={nativeElement:t}),this.anchor=t,"hover"===this.showOn){if(this.popupRef)return;clearTimeout(this.showTimeout),this.showTimeout=window.setTimeout(function(){return e.showContent(e.anchor)},this.showAfter)}else this.hideElementTitle(this.anchor),this.showContent(this.anchor)},h.prototype.hide=function(){clearTimeout(this.showTimeout);var t=this.anchor&&this.anchor.nativeElement;t&&t.getAttribute("data-title")&&(t.getAttribute("title")||t.setAttribute("title",t.getAttribute("data-title")),t.setAttribute("data-title","")),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe(),this.closeClickSubscription&&this.closeClickSubscription.unsubscribe(),this.closePopup()},h.prototype.toggle=function(t,e){var o=this.anchor&&this.anchor.nativeElement;t instanceof Element&&(t={nativeElement:t}),o!==t.nativeElement&&this.hide(),o===t.nativeElement&&"click"===this.showOn&&this.hide(),void 0===e&&(e=!this.popupRef),e?this.show(t):this.hide()},h.prototype.ngOnInit=function(){void 0===this.showOn&&(this.showOn="hover"),this.verifyProperties()},h.prototype.ngOnChanges=function(t){t.showOn&&this.subscribeClick()},h.prototype.ngAfterViewChecked=function(){this.popupRef&&this.anchor&&!c.hasParent(this.anchor.nativeElement||this.anchor,this.tooltipWrapper.nativeElement)&&(this.anchor=null,this.hide())},h.prototype.ngOnDestroy=function(){this.hide(),this.template=null,this.anchorTitleSubscription.unsubscribe(),this.mouseOverSubscription.unsubscribe(),this.mouseOutSubscription.unsubscribe(),this.mouseClickSubscription&&this.mouseClickSubscription.unsubscribe(),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe(),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe()},h.prototype.showContent=function(t){var e=this;(t.nativeElement.getAttribute("data-title")||this.template)&&(this.ngZone.run(function(){e.openPopup(t),e.bindContent(e.popupRef.content,t)}),this.popupRef.popupAnchorViewportLeave.pipe(p.take(1)).subscribe(function(){return e.hide()}))},h.prototype.bindContent=function(t,e){var o=this,i=t.instance;this.closeClickSubscription=i.close.subscribe(function(){o.hide()}),this.template?i.templateRef=this.template:i.templateString=this.anchor.nativeElement.getAttribute("data-title"),this.titleTemplate&&(i.titleTemplate=this.titleTemplate),i.closeTitle=this.closeTitle,i.anchor=e,i.callout=this.callout,i.closable=this.closable,i.position=this.position,i.tooltipWidth=this.tooltipWidth,i.tooltipHeight=this.tooltipHeight,this.popupRef.content.changeDetectorRef.detectChanges()},h.prototype.hideElementTitle=function(t){var e=t.nativeElement;e.getAttribute("title")&&(e.setAttribute("data-title",e.getAttribute("title")),e.setAttribute("title",""))},h.prototype.openPopup=function(t){var i=this,e=c.align(this.position,this.offset),o=e.anchorAlign,n=e.popupAlign,r=e.popupMargin;this.popupRef=this.popupService.open({anchor:t,anchorAlign:o,animate:!1,content:l.TooltipContentComponent,collision:c.collision(this.collision,this.position),margin:r,popupAlign:n,popupClass:"k-popup-transparent"}),this.renderer.addClass(this.popupRef.popupElement,"k-tooltip-wrapper"),this.tooltipClass&&this.renderer.addClass(this.popupRef.popupElement,this.tooltipClass);var s=this.popupRef.content.instance;s.callout&&(this.popupPositionChangeSubscription=this.popupRef.popupPositionChange.subscribe(function(t){var e=t.flip,o=!0===e.horizontal||!0===e.vertical;s.updateCalloutPosition(i.position,o)})),"hover"===this.showOn&&this.ngZone.runOutsideAngular(function(){var t=i.popupRef.popupElement;i.popupMouseOutSubscription=a.fromEvent(t,"mouseout").subscribe(function(t){return i.onMouseOut(t)})})},h.prototype.closePopup=function(){this.popupRef&&(this.popupRef.close(),this.popupRef=null),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe()},h.prototype.subscribeClick=function(){var e=this;this.mouseClickSubscription&&this.mouseClickSubscription.unsubscribe(),"click"===this.showOn&&(this.mouseClickSubscription=a.fromEvent(document,"click").pipe(p.filter(function(){return""!==e.filter})).subscribe(function(t){return e.onMouseClick(t,e.tooltipWrapper.nativeElement)}))},h.prototype.onMouseClick=function(t,e){var o=t.target,i=c.closest(o,this.filter),n=this.popupRef&&this.popupRef.popupElement;if(n){if(n.contains(o))return;if(this.closable)return}e.contains(o)&&i?this.toggle(i,!0):n&&this.hide()},h.prototype.onMouseOver=function(t){var e=c.closest(t.target,this.filter);"hover"===this.showOn&&e&&this.toggle(e,!0)},h.prototype.onMouseOut=function(t){var e,o;"hover"!==this.showOn||this.closable||(e=this.popupRef&&this.popupRef.popupElement,(o=t.relatedTarget)&&this.anchor&&c.contains(this.anchor.nativeElement,o)||o&&c.contains(e,o)||this.hide())},h.prototype.verifyProperties=function(){if(n.isDevMode()){if(!c.containsItem(this.validPositions,this.position))throw new Error("Invalid value provided for position property.The available options are 'top', 'bottom', 'left', or 'right'.");if(!c.containsItem(this.validShowOptions,this.showOn))throw new Error("Invalid value provided for showOn property.The available options are 'hover' or 'none'.")}},i.__decorate([n.Input(),i.__metadata("design:type",String)],h.prototype,"filter",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],h.prototype,"position",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],h.prototype,"titleTemplate",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],h.prototype,"showOn",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],h.prototype,"showAfter",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],h.prototype,"callout",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],h.prototype,"closable",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],h.prototype,"offset",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],h.prototype,"tooltipWidth",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],h.prototype,"tooltipHeight",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],h.prototype,"tooltipClass",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Object)],h.prototype,"collision",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],h.prototype,"closeTitle",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef),i.__metadata("design:paramtypes",[n.TemplateRef])],h.prototype,"tooltipTemplate",null),i.__decorate([n.Directive({selector:"[kendoTooltip]",exportAs:"kendoTooltip"}),i.__param(4,n.Optional()),i.__param(5,n.Optional()),i.__param(5,n.Inject(s.TOOLTIP_SETTINGS)),i.__metadata("design:paramtypes",[n.ElementRef,n.NgZone,n.Renderer2,r.PopupService,s.TooltipSettings,s.TooltipSettings])],h));function h(t,e,o,i,n,r){var s=this;this.tooltipWrapper=t,this.ngZone=e,this.renderer=o,this.popupService=i,this.filter="[title]",this.position="top",this.showAfter=100,this.callout=!0,this.closable=!1,this.offset=6,this.anchor=null,this.validPositions=["top","bottom","right","left"],this.validShowOptions=["hover","click","none"],Object.assign(this,n,r),this.ngZone.runOutsideAngular(function(){var t=s.tooltipWrapper.nativeElement;s.anchorTitleSubscription=a.fromEvent(t,"mouseover").pipe(p.filter(function(){return""!==s.filter})).subscribe(function(t){var e=c.closest(t.target,s.filter);e&&s.hideElementTitle({nativeElement:e})}),s.mouseOverSubscription=a.fromEvent(t,"mouseover").pipe(p.debounceTime(100),p.filter(function(){return""!==s.filter})).subscribe(function(t){return s.onMouseOver(t)}),s.mouseOutSubscription=a.fromEvent(t,"mouseout").pipe(p.debounceTime(100)).subscribe(function(t){return s.onMouseOut(t)})})}e.TooltipDirective=u},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,n,r=o(1),s=o(0),p=o(3),a=(i=p.ComponentMessages,r.__extends(l,i),n=l,r.__decorate([s.Input(),r.__metadata("design:type",String)],l.prototype,"closeTitle",void 0),n=r.__decorate([s.Directive({providers:[{provide:p.ComponentMessages,useExisting:s.forwardRef(function(){return n})}],selector:"[kendoTooltipLocalizedMessages]"}),r.__metadata("design:paramtypes",[p.LocalizationService])],l));function l(t){var e=i.call(this)||this;return e.service=t,e}e.LocalizedMessagesDirective=a},function(t,e){t.exports=a},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1),n=o(0),r=o(9),s=o(7),p=o(6),a=o(4),l=o(8),c=[s.TooltipDirective,a.TooltipContentComponent,l.LocalizedMessagesDirective],u=[p.PopupModule],h=i.__decorate([n.NgModule({declarations:[c],entryComponents:[a.TooltipContentComponent],imports:[r.CommonModule].concat(u),exports:[c]})],function(){});e.TooltipModule=h},function(t,e){t.exports=c},function(t,e){t.exports=u},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(7);e.TooltipDirective=i.TooltipDirective;var n=o(10);e.TooltipModule=n.TooltipModule;var r=o(5);e.TooltipSettings=r.TooltipSettings,e.TOOLTIP_SETTINGS=r.TOOLTIP_SETTINGS,function(t){for(var e in t)s(e,t[e])}(e)}],i.c=n,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=13)}}});

@@ -6,3 +6,3 @@ {

"license": "SEE LICENSE IN LICENSE.md",
"version": "2.1.4-dev.202006231516",
"version": "2.1.4",
"main": "dist/npm/index.js",

@@ -9,0 +9,0 @@ "module": "dist/fesm5/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc