@progress/kendo-angular-tooltip
Advanced tools
Comparing version 1.0.1-dev.201809260754 to 1.0.1
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-angular-tooltip",["tslib","@angular/core","@angular/common","@progress/kendo-angular-popup","rxjs/operators/take","rxjs/observable/fromEvent","rxjs/operators/debounceTime","rxjs/operators/filter","@progress/kendo-angular-l10n"],function(s){var o,i,n,r,p,a,l,u,c;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){o=e(t)},function(t){i=e(t)},function(t){n=e(t)},function(t){r=e(t)},function(t){p=e(t)},function(t){a=e(t)},function(t){l=e(t)},function(t){u=e(t)},function(t){c=e(t)}],execute:function(){!function(o){var i={};function n(t){if(i[t])return i[t].exports;var e=i[t]={exports:{},id:t,loaded:!1};return o[t].call(e.exports,e,e.exports,n),e.loaded=!0,e.exports}n.m=o,n.c=i,n.p="",n(0)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1);e.TooltipDirective=i.TooltipDirective;var n=o(13);e.TooltipModule=n.TooltipModule;var r=o(9);e.TooltipSettings=r.TooltipSettings,e.TOOLTIP_SETTINGS=r.TOOLTIP_SETTINGS,function(t){for(var e in t)s(e,t[e])}(e)},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(2),n=o(3),r=o(4),a=o(5),l=o(6),u=o(7),s=o(8),p=o(9),c=o(10),h=o(11),d=o(12),f=function(){function t(t,e,o,i,n,r,s){var p=this;this.tooltipWrapper=t,this.ngZone=e,this.renderer=o,this.popupService=i,this.localizationService=n,this.filter="[title]",this.position="top",this.showOn="hover",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"],this.direction=n.rtl?"rtl":"ltr",Object.assign(this,r,s),this.ngZone.runOutsideAngular(function(){var t=p.tooltipWrapper.nativeElement;p.anchorTitleSubscription=a.fromEvent(t,"mouseover").pipe(u.filter(function(){return""!==p.filter})).subscribe(function(t){var e=h.closest(t.target,p.filter);e&&p.hideElementTitle(e)}),p.mouseOverSubscription=a.fromEvent(t,"mouseover").pipe(l.debounceTime(100),u.filter(function(){return""!==p.filter})).subscribe(function(t){return p.onMouseOver(t)}),p.mouseOutSubscription=a.fromEvent(t,"mouseout").pipe(l.debounceTime(100)).subscribe(function(t){return p.onMouseOut(t)})})}return Object.defineProperty(t.prototype,"tooltipTemplate",{get:function(){return this.template},set:function(t){this.template=t},enumerable:!0,configurable:!0}),t.prototype.show=function(t){var e=this;if(!this.popupRef){var o={nativeElement:t};if(this.anchor=t,"hover"===this.showOn){if(this.popupRef)return;clearTimeout(this.showTimeout),this.showTimeout=window.setTimeout(function(){return e.showContent(o)},this.showAfter)}else this.hideElementTitle(this.anchor),this.showContent(o)}},t.prototype.hide=function(){clearTimeout(this.showTimeout),this.anchor&&this.anchor.getAttribute("data-title")&&(this.anchor.setAttribute("title",this.anchor.getAttribute("data-title")),this.anchor.setAttribute("data-title","")),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe(),this.closeClickSubscription&&this.closeClickSubscription.unsubscribe(),this.closePopup()},t.prototype.toggle=function(t,e){this.anchor!==t&&this.hide(),this.anchor===t&&"click"===this.showOn&&this.hide(),void 0===e&&(e=!this.popupRef),e?this.show(t):this.hide()},t.prototype.ngOnInit=function(){var o=this;this.verifyProperties(),this.dynamicRTLSubscription=this.localizationService.changes.subscribe(function(t){var e=t.rtl;return o.direction=e?"rtl":"ltr"})},t.prototype.ngOnChanges=function(t){t.showOn&&this.subscribeClick()},t.prototype.ngAfterViewChecked=function(){this.popupRef&&this.anchor&&!h.hasParent(this.anchor.nativeElement||this.anchor,this.tooltipWrapper.nativeElement)&&(this.anchor=null,this.hide())},t.prototype.ngOnDestroy=function(){this.hide(),this.template=null,this.anchorTitleSubscription.unsubscribe(),this.mouseOverSubscription.unsubscribe(),this.mouseOutSubscription.unsubscribe(),this.mouseClickSubscription&&this.mouseClickSubscription.unsubscribe(),this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe(),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe(),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe()},t.prototype.showContent=function(t){var e,o=this;(t.nativeElement.getAttribute("data-title")||this.template)&&(this.ngZone.run(function(){o.openPopup(t),e=o.popupRef.content,o.bindContent(e,t)}),this.popupRef.popupAnchorViewportLeave.pipe(r.take(1)).subscribe(function(){return o.hide()}))},t.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.getAttribute("data-title"),this.titleTemplate&&(i.titleTemplate=this.titleTemplate),i.anchor=e,i.callout=this.callout,i.closable=this.closable,i.position=this.position,i.tooltipWidth=this.tooltipWidth,i.tooltipHeight=this.tooltipHeight},t.prototype.hideElementTitle=function(t){t.getAttribute("title")&&(t.setAttribute("data-title",t.getAttribute("title")),t.setAttribute("title",""))},t.prototype.openPopup=function(t){var i=this,e=h.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:c.TooltipContentComponent,collision:h.collision(this.collision,this.position),margin:r,popupAlign:n,popupClass:"k-popup-transparent"}),this.renderer.addClass(this.popupRef.popupElement,"k-tooltip-wrapper");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)})})},t.prototype.closePopup=function(){this.popupRef&&(this.popupRef.close(),this.popupRef=null,this.popupPositionChangeSubscription.unsubscribe())},t.prototype.subscribeClick=function(){var e=this;this.mouseClickSubscription&&this.mouseClickSubscription.unsubscribe(),"click"===this.showOn&&(this.mouseClickSubscription=a.fromEvent(document,"click").pipe(u.filter(function(){return""!==e.filter})).subscribe(function(t){return e.onMouseClick(t,e.tooltipWrapper.nativeElement)}))},t.prototype.onMouseClick=function(t,e){var o=t.target,i=h.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()},t.prototype.onMouseOver=function(t){var e=h.closest(t.target,this.filter);"hover"===this.showOn&&e&&this.toggle(e,!0)},t.prototype.onMouseOut=function(t){if("hover"===this.showOn&&!this.closable){var e=this.popupRef&&this.popupRef.popupElement,o=t.relatedTarget;o&&h.contains(this.anchor,o)||o&&h.contains(e,o)||this.hide()}},t.prototype.verifyProperties=function(){if(n.isDevMode()){if(!h.containsItem(this.validPositions,this.position))throw new Error("Invalid value provided for position property.The available options are 'top', 'bottom', 'left', or 'right'.");if(!h.containsItem(this.validShowOptions,this.showOn))throw new Error("Invalid value provided for showOn property.The available options are 'hover' or 'none'.")}},i.__decorate([n.HostBinding("attr.dir"),i.__metadata("design:type",String)],t.prototype,"direction",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],t.prototype,"filter",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],t.prototype,"position",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],t.prototype,"titleTemplate",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],t.prototype,"showOn",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],t.prototype,"showAfter",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],t.prototype,"callout",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],t.prototype,"closable",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],t.prototype,"offset",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],t.prototype,"tooltipWidth",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],t.prototype,"tooltipHeight",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Object)],t.prototype,"collision",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef),i.__metadata("design:paramtypes",[n.TemplateRef])],t.prototype,"tooltipTemplate",null),t=i.__decorate([n.Directive({selector:"[kendoTooltip]",exportAs:"kendoTooltip",providers:[d.LocalizationService,{provide:d.L10N_PREFIX,useValue:"kendo.tooltip"}]}),i.__param(5,n.Optional()),i.__param(6,n.Optional()),i.__param(6,n.Inject(p.TOOLTIP_SETTINGS)),i.__metadata("design:paramtypes",[n.ElementRef,n.NgZone,n.Renderer2,s.PopupService,d.LocalizationService,p.TooltipSettings,p.TooltipSettings])],t)}();e.TooltipDirective=f},function(t,e){t.exports=o},function(t,e){t.exports=i},function(t,e){t.exports=p},function(t,e){t.exports=a},function(t,e){t.exports=l},function(t,e){t.exports=u},function(t,e){t.exports=r},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(2),n=o(3);e.TOOLTIP_SETTINGS=new n.InjectionToken("kendo-ui-tooltip-settings");var r=function(){function t(){}return t=i.__decorate([n.Injectable()],t)}();e.TooltipSettings=r},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(2),n=o(3),h=o(11),r=function(){function t(t){this.content=t,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 i.transform=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",n?"rotateX(180deg)":"rotateY(180deg)"):n?"rotateX(0deg)":"rotateY(0deg)",i}}return Object.defineProperty(t.prototype,"cssClasses",{get:function(){return"k-widget k-tooltip"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this.closable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cssPosition",{get:function(){return"relative"},enumerable:!0,configurable:!0}),t.prototype.calloutPositionClass=function(){return{top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"}[this.position]},t.prototype.onCloseClick=function(t){t.preventDefault(),this.close.emit()},t.prototype.updateCalloutPosition=function(t,e){var o="top"===t||"bottom"===t,i=o?"width":"height",n=o?"left":"top",r=o?"marginLeft":"marginTop",s=this.content.nativeElement.lastElementChild,p=s.getBoundingClientRect()[i],a=h.getCenterOffset(this.anchor,n,i),l=h.getCenterOffset(this.content,n,i);if(1<Math.abs(l-a)){var u=l-a+p/2;s.style[r]=-u+"px"}var c=this.calloutStyles(t,p,e);Object.keys(c).forEach(function(t){s.style[t]=c[t]})},i.__decorate([n.Output(),i.__metadata("design:type",n.EventEmitter)],t.prototype,"close",void 0),i.__decorate([n.HostBinding("class"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"cssClasses",null),i.__decorate([n.HostBinding("class.k-tooltip-closable"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"className",null),i.__decorate([n.HostBinding("style.position"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"cssPosition",null),i.__decorate([n.HostBinding("style.width.px"),n.Input(),i.__metadata("design:type",Number)],t.prototype,"tooltipWidth",void 0),i.__decorate([n.HostBinding("style.height.px"),n.Input(),i.__metadata("design:type",Number)],t.prototype,"tooltipHeight",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],t.prototype,"titleTemplate",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.ElementRef)],t.prototype,"anchor",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],t.prototype,"closable",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],t.prototype,"templateRef",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],t.prototype,"templateString",void 0),t=i.__decorate([n.Component({template:'\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 <div *ngIf="closable" class="k-tooltip-button" (click)="onCloseClick($event)">\n <a href="#" class="k-icon k-i-close" title="Close"></a>\n </div>\n\n <div class="k-tooltip-content">\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 <div class="k-callout" *ngIf="callout" [ngClass]="calloutPositionClass()"></div>\n '}),i.__metadata("design:paramtypes",[n.ElementRef])],t)}();e.TooltipContentComponent=r},function(t,e){"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.nativeElement.getBoundingClientRect();return i[e]+i[o]/2},e.containsItem=function(t,e){return-1!==t.indexOf(e)}},function(t,e){t.exports=c},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(2),n=o(3),r=o(14),s=o(1),p=o(8),a=o(10),l=[s.TooltipDirective,a.TooltipContentComponent],u=[p.PopupModule],c=function(){function t(){}return t=i.__decorate([n.NgModule({declarations:[l],entryComponents:[a.TooltipContentComponent],imports:[r.CommonModule].concat(u),exports:[l]})],t)}();e.TooltipModule=c},function(t,e){t.exports=n}])}}}); | ||
System.register("@progress/kendo-angular-tooltip",["@angular/core","tslib","rxjs/operators/take","rxjs/observable/fromEvent","rxjs/operators/debounceTime","rxjs/operators/filter","@progress/kendo-angular-popup","@progress/kendo-angular-l10n","@angular/common"],function(s){var o,i,n,r,p,a,l,u,c;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){o=e(t)},function(t){i=e(t)},function(t){n=e(t)},function(t){r=e(t)},function(t){p=e(t)},function(t){a=e(t)},function(t){l=e(t)},function(t){u=e(t)},function(t){c=e(t)}],execute:function(){!function(o){var i={};function n(t){if(i[t])return i[t].exports;var e=i[t]={exports:{},id:t,loaded:!1};return o[t].call(e.exports,e,e.exports,n),e.loaded=!0,e.exports}n.m=o,n.c=i,n.p="",n(0)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1);e.TooltipDirective=i.TooltipDirective;var n=o(13);e.TooltipModule=n.TooltipModule;var r=o(9);e.TooltipSettings=r.TooltipSettings,e.TOOLTIP_SETTINGS=r.TOOLTIP_SETTINGS,function(t){for(var e in t)s(e,t[e])}(e)},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(2),n=o(3),r=o(4),a=o(5),l=o(6),u=o(7),s=o(8),p=o(9),c=o(10),h=o(11),d=o(12),f=function(){function t(t,e,o,i,n,r,s){var p=this;this.tooltipWrapper=t,this.ngZone=e,this.renderer=o,this.popupService=i,this.localizationService=n,this.filter="[title]",this.position="top",this.showOn="hover",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"],this.direction=n.rtl?"rtl":"ltr",Object.assign(this,r,s),this.ngZone.runOutsideAngular(function(){var t=p.tooltipWrapper.nativeElement;p.anchorTitleSubscription=a.fromEvent(t,"mouseover").pipe(u.filter(function(){return""!==p.filter})).subscribe(function(t){var e=h.closest(t.target,p.filter);e&&p.hideElementTitle(e)}),p.mouseOverSubscription=a.fromEvent(t,"mouseover").pipe(l.debounceTime(100),u.filter(function(){return""!==p.filter})).subscribe(function(t){return p.onMouseOver(t)}),p.mouseOutSubscription=a.fromEvent(t,"mouseout").pipe(l.debounceTime(100)).subscribe(function(t){return p.onMouseOut(t)})})}return Object.defineProperty(t.prototype,"tooltipTemplate",{get:function(){return this.template},set:function(t){this.template=t},enumerable:!0,configurable:!0}),t.prototype.show=function(t){var e=this;if(!this.popupRef){var o={nativeElement:t};if(this.anchor=t,"hover"===this.showOn){if(this.popupRef)return;clearTimeout(this.showTimeout),this.showTimeout=window.setTimeout(function(){return e.showContent(o)},this.showAfter)}else this.hideElementTitle(this.anchor),this.showContent(o)}},t.prototype.hide=function(){clearTimeout(this.showTimeout),this.anchor&&this.anchor.getAttribute("data-title")&&(this.anchor.setAttribute("title",this.anchor.getAttribute("data-title")),this.anchor.setAttribute("data-title","")),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe(),this.closeClickSubscription&&this.closeClickSubscription.unsubscribe(),this.closePopup()},t.prototype.toggle=function(t,e){this.anchor!==t&&this.hide(),this.anchor===t&&"click"===this.showOn&&this.hide(),void 0===e&&(e=!this.popupRef),e?this.show(t):this.hide()},t.prototype.ngOnInit=function(){var o=this;this.verifyProperties(),this.dynamicRTLSubscription=this.localizationService.changes.subscribe(function(t){var e=t.rtl;return o.direction=e?"rtl":"ltr"})},t.prototype.ngOnChanges=function(t){t.showOn&&this.subscribeClick()},t.prototype.ngAfterViewChecked=function(){this.popupRef&&this.anchor&&!h.hasParent(this.anchor.nativeElement||this.anchor,this.tooltipWrapper.nativeElement)&&(this.anchor=null,this.hide())},t.prototype.ngOnDestroy=function(){this.hide(),this.template=null,this.anchorTitleSubscription.unsubscribe(),this.mouseOverSubscription.unsubscribe(),this.mouseOutSubscription.unsubscribe(),this.mouseClickSubscription&&this.mouseClickSubscription.unsubscribe(),this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe(),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe(),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe()},t.prototype.showContent=function(t){var e,o=this;(t.nativeElement.getAttribute("data-title")||this.template)&&(this.ngZone.run(function(){o.openPopup(t),e=o.popupRef.content,o.bindContent(e,t)}),this.popupRef.popupAnchorViewportLeave.pipe(r.take(1)).subscribe(function(){return o.hide()}))},t.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.getAttribute("data-title"),this.titleTemplate&&(i.titleTemplate=this.titleTemplate),i.anchor=e,i.callout=this.callout,i.closable=this.closable,i.position=this.position,i.tooltipWidth=this.tooltipWidth,i.tooltipHeight=this.tooltipHeight},t.prototype.hideElementTitle=function(t){t.getAttribute("title")&&(t.setAttribute("data-title",t.getAttribute("title")),t.setAttribute("title",""))},t.prototype.openPopup=function(t){var i=this,e=h.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:c.TooltipContentComponent,collision:h.collision(this.collision,this.position),margin:r,popupAlign:n,popupClass:"k-popup-transparent"}),this.renderer.addClass(this.popupRef.popupElement,"k-tooltip-wrapper");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)})})},t.prototype.closePopup=function(){this.popupRef&&(this.popupRef.close(),this.popupRef=null,this.popupPositionChangeSubscription.unsubscribe())},t.prototype.subscribeClick=function(){var e=this;this.mouseClickSubscription&&this.mouseClickSubscription.unsubscribe(),"click"===this.showOn&&(this.mouseClickSubscription=a.fromEvent(document,"click").pipe(u.filter(function(){return""!==e.filter})).subscribe(function(t){return e.onMouseClick(t,e.tooltipWrapper.nativeElement)}))},t.prototype.onMouseClick=function(t,e){var o=t.target,i=h.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()},t.prototype.onMouseOver=function(t){var e=h.closest(t.target,this.filter);"hover"===this.showOn&&e&&this.toggle(e,!0)},t.prototype.onMouseOut=function(t){if("hover"===this.showOn&&!this.closable){var e=this.popupRef&&this.popupRef.popupElement,o=t.relatedTarget;o&&h.contains(this.anchor,o)||o&&h.contains(e,o)||this.hide()}},t.prototype.verifyProperties=function(){if(n.isDevMode()){if(!h.containsItem(this.validPositions,this.position))throw new Error("Invalid value provided for position property.The available options are 'top', 'bottom', 'left', or 'right'.");if(!h.containsItem(this.validShowOptions,this.showOn))throw new Error("Invalid value provided for showOn property.The available options are 'hover' or 'none'.")}},i.__decorate([n.HostBinding("attr.dir"),i.__metadata("design:type",String)],t.prototype,"direction",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],t.prototype,"filter",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],t.prototype,"position",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],t.prototype,"titleTemplate",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],t.prototype,"showOn",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],t.prototype,"showAfter",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],t.prototype,"callout",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],t.prototype,"closable",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],t.prototype,"offset",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],t.prototype,"tooltipWidth",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Number)],t.prototype,"tooltipHeight",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Object)],t.prototype,"collision",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef),i.__metadata("design:paramtypes",[n.TemplateRef])],t.prototype,"tooltipTemplate",null),t=i.__decorate([n.Directive({selector:"[kendoTooltip]",exportAs:"kendoTooltip",providers:[d.LocalizationService,{provide:d.L10N_PREFIX,useValue:"kendo.tooltip"}]}),i.__param(5,n.Optional()),i.__param(6,n.Optional()),i.__param(6,n.Inject(p.TOOLTIP_SETTINGS)),i.__metadata("design:paramtypes",[n.ElementRef,n.NgZone,n.Renderer2,s.PopupService,d.LocalizationService,p.TooltipSettings,p.TooltipSettings])],t)}();e.TooltipDirective=f},function(t,e){t.exports=i},function(t,e){t.exports=o},function(t,e){t.exports=n},function(t,e){t.exports=r},function(t,e){t.exports=p},function(t,e){t.exports=a},function(t,e){t.exports=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(2),n=o(3);e.TOOLTIP_SETTINGS=new n.InjectionToken("kendo-ui-tooltip-settings");var r=function(){function t(){}return t=i.__decorate([n.Injectable()],t)}();e.TooltipSettings=r},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(2),n=o(3),h=o(11),r=function(){function t(t){this.content=t,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 i.transform=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",n?"rotateX(180deg)":"rotateY(180deg)"):n?"rotateX(0deg)":"rotateY(0deg)",i}}return Object.defineProperty(t.prototype,"cssClasses",{get:function(){return"k-widget k-tooltip"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this.closable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cssPosition",{get:function(){return"relative"},enumerable:!0,configurable:!0}),t.prototype.calloutPositionClass=function(){return{top:"k-callout-s",left:"k-callout-e",bottom:"k-callout-n",right:"k-callout-w"}[this.position]},t.prototype.onCloseClick=function(t){t.preventDefault(),this.close.emit()},t.prototype.updateCalloutPosition=function(t,e){var o="top"===t||"bottom"===t,i=o?"width":"height",n=o?"left":"top",r=o?"marginLeft":"marginTop",s=this.content.nativeElement.lastElementChild,p=s.getBoundingClientRect()[i],a=h.getCenterOffset(this.anchor,n,i),l=h.getCenterOffset(this.content,n,i);if(1<Math.abs(l-a)){var u=l-a+p/2;s.style[r]=-u+"px"}var c=this.calloutStyles(t,p,e);Object.keys(c).forEach(function(t){s.style[t]=c[t]})},i.__decorate([n.Output(),i.__metadata("design:type",n.EventEmitter)],t.prototype,"close",void 0),i.__decorate([n.HostBinding("class"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"cssClasses",null),i.__decorate([n.HostBinding("class.k-tooltip-closable"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"className",null),i.__decorate([n.HostBinding("style.position"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"cssPosition",null),i.__decorate([n.HostBinding("style.width.px"),n.Input(),i.__metadata("design:type",Number)],t.prototype,"tooltipWidth",void 0),i.__decorate([n.HostBinding("style.height.px"),n.Input(),i.__metadata("design:type",Number)],t.prototype,"tooltipHeight",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],t.prototype,"titleTemplate",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.ElementRef)],t.prototype,"anchor",void 0),i.__decorate([n.Input(),i.__metadata("design:type",Boolean)],t.prototype,"closable",void 0),i.__decorate([n.Input(),i.__metadata("design:type",n.TemplateRef)],t.prototype,"templateRef",void 0),i.__decorate([n.Input(),i.__metadata("design:type",String)],t.prototype,"templateString",void 0),t=i.__decorate([n.Component({template:'\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 <div *ngIf="closable" class="k-tooltip-button" (click)="onCloseClick($event)">\n <a href="#" class="k-icon k-i-close" title="Close"></a>\n </div>\n\n <div class="k-tooltip-content">\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 <div class="k-callout" *ngIf="callout" [ngClass]="calloutPositionClass()"></div>\n '}),i.__metadata("design:paramtypes",[n.ElementRef])],t)}();e.TooltipContentComponent=r},function(t,e){"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.nativeElement.getBoundingClientRect();return i[e]+i[o]/2},e.containsItem=function(t,e){return-1!==t.indexOf(e)}},function(t,e){t.exports=u},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(2),n=o(3),r=o(14),s=o(1),p=o(8),a=o(10),l=[s.TooltipDirective,a.TooltipContentComponent],u=[p.PopupModule],c=function(){function t(){}return t=i.__decorate([n.NgModule({declarations:[l],entryComponents:[a.TooltipContentComponent],imports:[r.CommonModule].concat(u),exports:[l]})],t)}();e.TooltipModule=c},function(t,e){t.exports=c}])}}}); |
@@ -6,3 +6,3 @@ { | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
"version": "1.0.1-dev.201809260754", | ||
"version": "1.0.1", | ||
"main": "dist/npm/index.js", | ||
@@ -9,0 +9,0 @@ "module": "dist/es/index.js", |
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
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
3
204632