@progress/kendo-angular-tooltip
Advanced tools
Comparing version 2.1.5 to 2.1.6-dev.202011110826
@@ -5,2 +5,2 @@ /**----------------------------------------------------------------------------------------- | ||
*-------------------------------------------------------------------------------------------*/ | ||
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)}}}); | ||
System.register("@progress/kendo-angular-tooltip",["tslib","@angular/core","@angular/common","@progress/kendo-angular-popup","rxjs/operators","rxjs","@progress/kendo-angular-l10n"],function(r){var s,p,a,l,c,u,h;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){s=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=s},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){t=t.getBoundingClientRect();return t[e]+t[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),l=o(2),r=(Object.defineProperty(s.prototype,"cssClasses",{get:function(){return"k-widget k-tooltip"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"className",{get:function(){return this.closable},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cssPosition",{get:function(){return"relative"},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){var e=this;this.dynamicRTLSubscription=this.localizationService.changes.subscribe(function(t){t=t.rtl;return e.direction=t?"rtl":"ltr"})},s.prototype.ngOnDestroy=function(){this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe()},Object.defineProperty(s.prototype,"closeButtonTitle",{get:function(){return this.closeTitle||this.localizationService.get("closeTitle")},enumerable:!0,configurable:!0}),s.prototype.calloutPositionClass=function(){return{top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"}[this.position]},s.prototype.onCloseClick=function(t){t.preventDefault(),this.close.emit()},s.prototype.updateCalloutPosition=function(t,e){var o,i,n,r,s,p,a;this.callout&&(s=(p="top"===t||"bottom"===t)?"width":"height",r=p?"left":"top",i=p?"marginLeft":"marginTop",n=(o=this.content.nativeElement.querySelector(".k-callout")).getBoundingClientRect()[s],p=l.getCenterOffset(this.anchor.nativeElement,r,s),r=l.getCenterOffset(this.content.nativeElement,r,s),(1<(s=Math.abs(r-p))||0===s||0===Math.round(s))&&(p=r-p+n/2,o.style[i]=-p+"px"),a=this.calloutStyles(t,n,e),Object.keys(a).forEach(function(t){o.style[t]=a[t]}))},i.__decorate([n.HostBinding("attr.dir"),i.__metadata("design:type",String)],s.prototype,"direction",void 0),i.__decorate([n.Output(),i.__metadata("design:type",n.EventEmitter)],s.prototype,"close",void 0),i.__decorate([n.HostBinding("class"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],s.prototype,"cssClasses",null),i.__decorate([n.HostBinding("class.k-tooltip-closable"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],s.prototype,"className",null),i.__decorate([n.HostBinding("style.position"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],s.prototype,"cssPosition",null),i.__decorate([n.HostBinding("style.width.px"),n.Input(),i.__metadata("design:type",Number)],s.prototype,"tooltipWidth",void 0),i.__decorate([n.HostBinding("style.height.px"),n.Input(),i.__metadata("design:type",Number)],s.prototype,"tooltipHeight",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],s.prototype,"titleTemplate",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.ElementRef)],s.prototype,"anchor",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],s.prototype,"closable",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],s.prototype,"templateRef",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],s.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])],s));function s(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=r},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1),o=o(0);e.TOOLTIP_SETTINGS=new o.InjectionToken("kendo-ui-tooltip-settings");o=i.__decorate([o.Injectable()],function(){});e.TooltipSettings=o},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),s=(Object.defineProperty(u.prototype,"tooltipTemplate",{get:function(){return this.template},set:function(t){this.template=t},enumerable:!0,configurable:!0}),u.prototype.show=function(t){var e=this;this.popupRef||(t instanceof Element&&(t={nativeElement:t}),this.anchor=t,"hover"===this.showOn?this.popupRef||(clearTimeout(this.showTimeout),this.showTimeout=window.setTimeout(function(){return e.showContent(e.anchor)},this.showAfter)):(this.hideElementTitle(this.anchor),this.showContent(this.anchor)))},u.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()},u.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()},u.prototype.ngOnInit=function(){void 0===this.showOn&&(this.showOn="hover"),this.verifyProperties()},u.prototype.ngOnChanges=function(t){t.showOn&&this.subscribeClick()},u.prototype.ngAfterViewChecked=function(){this.popupRef&&this.anchor&&!c.hasParent(this.anchor.nativeElement||this.anchor,this.tooltipWrapper.nativeElement)&&(this.anchor=null,this.hide())},u.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()},u.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()}))},u.prototype.bindContent=function(t,e){var o=this,t=t.instance;this.closeClickSubscription=t.close.subscribe(function(){o.hide()}),this.template?t.templateRef=this.template:t.templateString=this.anchor.nativeElement.getAttribute("data-title"),this.titleTemplate&&(t.titleTemplate=this.titleTemplate),t.closeTitle=this.closeTitle,t.anchor=e,t.callout=this.callout,t.closable=this.closable,t.position=this.position,t.tooltipWidth=this.tooltipWidth,t.tooltipHeight=this.tooltipHeight,this.popupRef.content.changeDetectorRef.detectChanges()},u.prototype.hideElementTitle=function(t){t=t.nativeElement;t.getAttribute("title")&&(t.setAttribute("data-title",t.getAttribute("title")),t.setAttribute("title",""))},u.prototype.openPopup=function(t){var e=this,o=c.align(this.position,this.offset),i=o.anchorAlign,n=o.popupAlign,o=o.popupMargin;this.popupRef=this.popupService.open({anchor:t,anchorAlign:i,animate:!1,content:l.TooltipContentComponent,collision:c.collision(this.collision,this.position),margin:o,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 r=this.popupRef.content.instance;r.callout&&(this.popupPositionChangeSubscription=this.popupRef.popupPositionChange.subscribe(function(t){t=t.flip,t=!0===t.horizontal||!0===t.vertical;r.updateCalloutPosition(e.position,t)})),"hover"===this.showOn&&this.ngZone.runOutsideAngular(function(){var t=e.popupRef.popupElement;e.popupMouseOutSubscription=a.fromEvent(t,"mouseout").subscribe(function(t){return e.onMouseOut(t)})})},u.prototype.closePopup=function(){this.popupRef&&(this.popupRef.close(),this.popupRef=null),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe()},u.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)}))},u.prototype.onMouseClick=function(t,e){var o=t.target,i=c.closest(o,this.filter),t=this.popupRef&&this.popupRef.popupElement;if(t){if(t.contains(o))return;if(this.closable)return}e.contains(o)&&i?this.toggle(i,!0):t&&this.hide()},u.prototype.onMouseOver=function(t){t=c.closest(t.target,this.filter);"hover"===this.showOn&&t&&this.toggle(t,!0)},u.prototype.onMouseOut=function(t){var e;"hover"!==this.showOn||this.closable||(e=this.popupRef&&this.popupRef.popupElement,(t=t.relatedTarget)&&this.anchor&&c.contains(this.anchor.nativeElement,t)||t&&c.contains(e,t)||this.hide())},u.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)],u.prototype,"filter",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],u.prototype,"position",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],u.prototype,"titleTemplate",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],u.prototype,"showOn",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],u.prototype,"showAfter",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],u.prototype,"callout",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],u.prototype,"closable",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],u.prototype,"offset",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],u.prototype,"tooltipWidth",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],u.prototype,"tooltipHeight",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],u.prototype,"tooltipClass",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Object)],u.prototype,"collision",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],u.prototype,"closeTitle",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef),i.__metadata("design:paramtypes",[n.TemplateRef])],u.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])],u));function u(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){t=c.closest(t.target,s.filter);t&&s.hideElementTitle({nativeElement:t})}),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=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,n,r=o(1),s=o(0),o=o(3),o=(i=o.ComponentMessages,r.__extends(p,i),n=p,r.__decorate([s.Input(),r.__metadata("design:type",String)],p.prototype,"closeTitle",void 0),n=r.__decorate([s.Directive({providers:[{provide:o.ComponentMessages,useExisting:s.forwardRef(function(){return n})}],selector:"[kendoTooltipLocalizedMessages]"}),r.__metadata("design:paramtypes",[o.LocalizationService])],p));function p(t){var e=i.call(this)||this;return e.service=t,e}e.LocalizedMessagesDirective=o},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),o=o(8),o=[s.TooltipDirective,a.TooltipContentComponent,o.LocalizedMessagesDirective],p=[p.PopupModule],o=i.__decorate([n.NgModule({declarations:[o],entryComponents:[a.TooltipContentComponent],imports:[r.CommonModule].concat(p),exports:[o]})],function(){});e.TooltipModule=o},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;i=o(10);e.TooltipModule=i.TooltipModule;o=o(5);e.TooltipSettings=o.TooltipSettings,e.TOOLTIP_SETTINGS=o.TOOLTIP_SETTINGS,function(t){for(var e in t)r(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.5", | ||
"version": "2.1.6-dev.202011110826", | ||
"main": "dist/npm/index.js", | ||
@@ -37,4 +37,4 @@ "module": "dist/fesm5/index.js", | ||
"peerDependencies": { | ||
"@angular/common": "6 - 10", | ||
"@angular/core": "6 - 10", | ||
"@angular/common": "6 - 11", | ||
"@angular/core": "6 - 11", | ||
"@progress/kendo-angular-l10n": "^2.0.0", | ||
@@ -41,0 +41,0 @@ "@progress/kendo-angular-popup": "^3.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
339924
4