@progress/kendo-angular-tooltip
Advanced tools
Comparing version 0.1.1-dev.201805010850 to 0.1.1-dev.201805020750
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("@angular/core"),require("rxjs/operators/take"),require("rxjs/observable/fromEvent"),require("rxjs/operators"),require("rxjs/observable/fromPromise"),require("rxjs/operators/auditTime"),require("rxjs/observable/merge"),require("@angular/animations"),require("@angular/common"),require("@progress/kendo-angular-l10n")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","rxjs/operators/take","rxjs/observable/fromEvent","rxjs/operators","rxjs/observable/fromPromise","rxjs/operators/auditTime","rxjs/observable/merge","@angular/animations","@angular/common","@progress/kendo-angular-l10n"],e):"object"==typeof exports?exports.KendoAngularTooltip=e(require("tslib"),require("@angular/core"),require("rxjs/operators/take"),require("rxjs/observable/fromEvent"),require("rxjs/operators"),require("rxjs/observable/fromPromise"),require("rxjs/operators/auditTime"),require("rxjs/observable/merge"),require("@angular/animations"),require("@angular/common"),require("@progress/kendo-angular-l10n")):t.KendoAngularTooltip=e(t.tslib,t["@angular/core"],t["rxjs/operators/take"],t["rxjs/observable/fromEvent"],t["rxjs/operators"],t["rxjs/observable/fromPromise"],t["rxjs/operators/auditTime"],t["rxjs/observable/merge"],t["@angular/animations"],t["@angular/common"],t["@progress/kendo-angular-l10n"])}(this,function(t,e,o,n,i,r,s,a,p,l,u){return function(t){function e(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(1);e.TooltipDirective=n.TooltipDirective;var i=o(29);e.TooltipModule=i.TooltipModule;var r=o(25);e.TooltipSettings=r.TooltipSettings,e.TOOLTIP_SETTINGS=r.TOOLTIP_SETTINGS},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(3),r=o(4),s=o(5),a=o(6),p=o(7),l=o(25),u=o(26),c=o(27),h=o(28),f=function(){function t(t,e,o,n,i){var r=this;this.tooltipWrapper=t,this.ngZone=e,this.popupService=o,this.localizationService=n,this.filter="[title]",this.position="top",this.showOn="hover",this.showAfter=100,this.callout=!0,this.offset=6,this.collision={horizontal:"fit",vertical:"flip"},this.anchor=null,this.direction=n.rtl?"rtl":"ltr",i&&(this.position=i.position,this.callout=i.callout,this.showOn=i.showOn),this.ngZone.runOutsideAngular(function(){var t=r.tooltipWrapper.nativeElement;r.anchorTitleSubscription=s.fromEvent(t,"mouseover").subscribe(function(t){if(""!==r.filter){var e=c.closest(t.target,r.filter);e&&r._hideElementTitle(e)}}),r.mouseOverSubscription=s.fromEvent(t,"mouseover").pipe(a.debounceTime(100)).subscribe(function(t){return r._onMouseOver(t)}),r.mouseOutSubscription=s.fromEvent(t,"mouseout").pipe(a.debounceTime(100)).subscribe(function(t){return r._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,o={nativeElement:t};if(this.anchor=t,"hover"===this.showOn){if(this.popupRef)return;clearTimeout(this.showTimeout),this.showTimeout=window.setTimeout(function(){return e._show(o)},this.showAfter)}else this._hideElementTitle(this.anchor),this._show(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._closePopup()},t.prototype.toggle=function(t,e){this.anchor!==t&&this.hide(),"undefined"==typeof e&&(e=!this.popupRef),e?this.show(t):this.hide()},t.prototype.ngOnInit=function(){var t=this;this.dynamicRTLSubscription=this.localizationService.changes.subscribe(function(e){var o=e.rtl;return t.direction=o?"rtl":"ltr"})},t.prototype.ngOnDestroy=function(){this.hide(),this.template=null,this.anchorTitleSubscription.unsubscribe(),this.mouseOverSubscription.unsubscribe(),this.mouseOutSubscription.unsubscribe(),this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe(),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe(),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe()},t.prototype._show=function(t){var e=this;if(t.nativeElement.getAttribute("data-title")||this.template){var o;this.ngZone.run(function(){e._openPopup(t),o=e.popupRef.content,e._bindContent(o,t)}),this.popupRef.popupAnchorViewportLeave.pipe(r.take(1)).subscribe(function(){return e.hide()})}},t.prototype._bindContent=function(t,e){var o=t.instance;this.template?o.templateRef=this.template:o.templateString=this.anchor.getAttribute("data-title"),o.anchor=e,o.callout=this.callout,o.position=this.position,o.tooltipWidth=this.tooltipWidth,o.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 e=this,o=c.align(this.position,this.offset),n=o.anchorAlign,i=o.popupAlign,r=o.popupMargin;this.popupRef=this.popupService.open({anchor:t,anchorAlign:n,animate:!1,content:u.TooltipContentComponent,collision:this.collision,margin:r,popupAlign:i,popupClass:"k-popup-transparent"});var a=this.popupRef.content.instance;a.callout&&(this.popupPositionChangeSubscription=this.popupRef.popupPositionChange.subscribe(function(){return a.updateCalloutPosition(e.position)})),"hover"===this.showOn&&this.ngZone.runOutsideAngular(function(){var t=e.popupRef.popupElement;e.popupMouseOutSubscription=s.fromEvent(t,"mouseout").subscribe(function(t){return e._onMouseOut(t)})})},t.prototype._closePopup=function(){var t=this;this.popupRef&&(this.ngZone.run(function(){return t.popupRef.close()}),this.popupRef=null,this.popupPositionChangeSubscription.unsubscribe())},t.prototype._onMouseOver=function(t){if("hover"===this.showOn&&""!==this.filter){var e=c.closest(t.target,this.filter);e&&this.toggle(e,!0)}},t.prototype._onMouseOut=function(t){if("hover"===this.showOn){var e=this.popupRef&&this.popupRef.popupElement,o=t.relatedTarget;o&&c.contains(this.anchor,o)||o&&c.contains(e,o)||this.hide()}},n.__decorate([i.HostBinding("attr.dir"),n.__metadata("design:type",String)],t.prototype,"direction",void 0),n.__decorate([i.Input(),n.__metadata("design:type",String)],t.prototype,"filter",void 0),n.__decorate([i.Input(),n.__metadata("design:type",String)],t.prototype,"position",void 0),n.__decorate([i.Input(),n.__metadata("design:type",String)],t.prototype,"showOn",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Number)],t.prototype,"showAfter",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Boolean)],t.prototype,"callout",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Number)],t.prototype,"offset",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Number)],t.prototype,"tooltipWidth",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Number)],t.prototype,"tooltipHeight",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Object)],t.prototype,"collision",void 0),n.__decorate([i.Input(),n.__metadata("design:type",i.TemplateRef),n.__metadata("design:paramtypes",[i.TemplateRef])],t.prototype,"tooltipTemplate",null),t=n.__decorate([i.Directive({selector:"[kendoTooltip]",exportAs:"kendoTooltip",providers:[h.LocalizationService,{provide:h.L10N_PREFIX,useValue:"kendo.tooltip"}]}),n.__param(4,i.Optional()),n.__param(4,i.Inject(l.TOOLTIP_SETTINGS)),n.__metadata("design:paramtypes",[i.ElementRef,i.NgZone,p.PopupService,h.LocalizationService,l.TooltipSettings])],t)}();e.TooltipDirective=f},function(e,o){e.exports=t},function(t,o){t.exports=e},function(t,e){t.exports=o},function(t,e){t.exports=n},function(t,e){t.exports=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2);n.__exportStar(o(8),e);var i=o(12);e.ɵa=i.AlignService;var r=o(21);e.ɵc=r.AnimationService;var s=o(13);e.ɵb=s.DOMService;var a=o(16);e.ɵd=a.PositionService;var p=o(17);e.ɵe=p.ResizeService;var l=o(19);e.ɵf=l.ScrollableService},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(9);e.PopupService=n.PopupService,e.POPUP_CONTAINER=n.POPUP_CONTAINER;var i=o(10);e.PopupComponent=i.PopupComponent;var r=o(23);e.PopupModule=r.PopupModule},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(10),r=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)};e.POPUP_CONTAINER=new n.InjectionToken("Popup Container");var s=function(){function t(t,e,o,n){this.applicationRef=t,this.componentFactoryResolver=e,this.injector=o,this.container=n}return Object.defineProperty(t.prototype,"rootViewContainer",{get:function(){var t=this.applicationRef.components||[];if(t[0])return t[0];throw new Error("\n View Container not found! Inject the POPUP_CONTAINER or define a specific ViewContainerRef via the appendTo option.\n See http://www.telerik.com/kendo-angular-ui/components/popup/api/POPUP_CONTAINER/ for more details.\n ")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rootViewContainerNode",{get:function(){return this.container?this.container.nativeElement:this.getComponentRootNode(this.rootViewContainer)},enumerable:!0,configurable:!0}),t.prototype.open=function(t){void 0===t&&(t={});var e=this.contentFrom(t.content),o=e.component,n=e.nodes,i=this.appendPopup(n,t.appendTo),s=i.instance;this.projectComponentInputs(i,t),i.changeDetectorRef.detectChanges(),o&&o.changeDetectorRef.detectChanges();var a=this.getComponentRootNode(i);return{close:function(){o?o.destroy():(i.instance.content=null,i.changeDetectorRef.detectChanges()),i.destroy(),r(a)},content:o,popup:i,popupAnchorViewportLeave:s.anchorViewportLeave,popupClose:s.close,popupElement:a,popupOpen:s.open,popupPositionChange:s.positionChange}},t.prototype.appendPopup=function(t,e){var o=this.createComponent(i.PopupComponent,t,e);return e||this.rootViewContainerNode.appendChild(this.getComponentRootNode(o)),o},t.prototype.getComponentRootNode=function(t){return t.hostView.rootNodes[0]},t.prototype.getComponentFactory=function(t){return this.componentFactoryResolver.resolveComponentFactory(t)},t.prototype.createComponent=function(t,e,o){var n=this.getComponentFactory(t);if(o)return o.createComponent(n,void 0,this.injector,e);var i=n.create(this.injector,e);return this.applicationRef.attachView(i.hostView),i},t.prototype.projectComponentInputs=function(t,e){return Object.getOwnPropertyNames(e).filter(function(t){return"content"!==t||e.content instanceof n.TemplateRef}).map(function(o){t.instance[o]=e[o]}),t},t.prototype.contentFrom=function(t){if(!t||t instanceof n.TemplateRef)return{component:null,nodes:[[]]};var e=this.createComponent(t),o=e?[e.location.nativeElement]:[];return{component:e,nodes:[o]}},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:n.ApplicationRef},{type:n.ComponentFactoryResolver},{type:n.Injector},{type:n.ElementRef,decorators:[{type:n.Inject,args:[e.POPUP_CONTAINER]},{type:n.Optional}]}]},t}();e.PopupService=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(11),r=o(12),s=o(13),a=o(16),p=o(17),l=o(19),u=o(21),c=o(15),h={left:-1e4,top:0},f="k-animation-container",d="k-animation-container-fixed",m=function(t){return t.observers.length>0},v=function(){function t(t,e,o,i,r,s,a,p,l){this.container=t,this._alignService=e,this.domService=o,this._positionService=i,this._resizeService=r,this._scrollableService=s,this.animationService=a,this._renderer=p,this._zone=l,this.animate=!0,this.anchorAlign={horizontal:"left",vertical:"bottom"},this.collision={horizontal:"fit",vertical:"flip"},this.popupAlign={horizontal:"left",vertical:"top"},this.copyAnchorStyles=!1,this.positionMode="fixed",this.offset=h,this.anchorViewportLeave=new n.EventEmitter,this.close=new n.EventEmitter,this.open=new n.EventEmitter,this.positionChange=new n.EventEmitter,this.resolvedPromise=Promise.resolve(null),this._renderer.addClass(t.nativeElement,f),this.updateFixedClass()}return t.prototype.ngOnInit=function(){this.repositionCallback=this.reposition.bind(this),this._resizeService.subscribe(this.repositionCallback),this.animationSubscriptions=this.animationService.start.subscribe(this.onAnimationStart.bind(this)).add(this.animationService.end.subscribe(this.onAnimationEnd.bind(this))),this._scrollableService.forElement(this.anchor||this.container).subscribe(this.onScroll.bind(this)),this.currentOffset=h,this.setZIndex(),this.copyFontStyles(),this.updateFixedClass()},t.prototype.ngOnChanges=function(t){t.copyAnchorStyles&&this.copyFontStyles(),t.positionMode&&this.updateFixedClass()},t.prototype.ngAfterViewInit=function(){var t=this;this.reposition(),this.animate||this.resolvedPromise.then(function(){t.onAnimationEnd()})},t.prototype.ngAfterViewChecked=function(){var t=this;this._zone.runOutsideAngular(function(){t.repositionSubscription&&t.repositionSubscription.unsubscribe(),t.repositionSubscription=i.fromPromise(t.resolvedPromise).subscribe(t.repositionCallback)})},t.prototype.ngOnDestroy=function(){this.anchorViewportLeave.complete(),this.positionChange.complete(),this.close.emit(),this.close.complete(),this._resizeService.unsubscribe(),this._scrollableService.unsubscribe(),this.repositionSubscription&&this.repositionSubscription.unsubscribe(),this.animationSubscriptions.unsubscribe()},t.prototype.onAnimationStart=function(){this._renderer.removeClass(this.container.nativeElement,"k-animation-container-shown")},t.prototype.onAnimationEnd=function(){this._renderer.addClass(this.container.nativeElement,"k-animation-container-shown"),this.open.emit(),this.open.complete()},Object.defineProperty(t.prototype,"currentOffset",{get:function(){return this._currentOffset},set:function(t){this.setContainerStyle("left",t.left+"px"),this.setContainerStyle("top",t.top+"px"),this._currentOffset=t},enumerable:!0,configurable:!0}),t.prototype.setZIndex=function(){this.anchor&&this.setContainerStyle("z-index",String(this.domService.zIndex(this.anchor,this.container)))},t.prototype.reposition=function(){var t=this;if(c.isDocumentAvailable()){var e=this.position(),o=e.flip,n=e.offset;this._currentOffset&&!c.isDifferentOffset(this._currentOffset,n)||(this.currentOffset=n,m(this.positionChange)&&this._zone.run(function(){return t.positionChange.emit(n)})),this.animate&&this.animationService.play(this.contentContainer.nativeElement,this.animate,o)}},t.prototype.position=function(){var t=this._alignService.alignElement({anchor:this.anchor,anchorAlign:this.anchorAlign,element:this.container,elementAlign:this.popupAlign,margin:this.margin,offset:this.offset,positionMode:this.positionMode});return this._positionService.positionElement({anchor:this.anchor,anchorAlign:this.anchorAlign,collisions:this.collision,currentLocation:t,element:this.container,elementAlign:this.popupAlign,margin:this.margin})},t.prototype.onScroll=function(t){var e=this,o=m(this.anchorViewportLeave);t||!o?this.reposition():o&&this._zone.run(function(){e.anchorViewportLeave.emit()})},t.prototype.copyFontStyles=function(){var t=this;this.anchor&&this.copyAnchorStyles&&this.domService.getFontStyles(this.anchor).forEach(function(e){return t.setContainerStyle(e.key,e.value)})},t.prototype.updateFixedClass=function(){var t="fixed"===this.positionMode?"addClass":"removeClass";this._renderer[t](this.container.nativeElement,d)},t.prototype.setContainerStyle=function(t,e){this._renderer.setStyle(this.container.nativeElement,t,e)},t.decorators=[{type:n.Component,args:[{exportAs:"kendo-popup",providers:[r.AlignService,u.AnimationService,s.DOMService,a.PositionService,p.ResizeService,l.ScrollableService],selector:"kendo-popup",template:'\n <div class="k-popup" [ngClass]="popupClass" #container>\n <ng-content></ng-content>\n <ng-template [ngTemplateOutlet]="content" [ngIf]="content"></ng-template>\n </div>\n '}]}],t.ctorParameters=function(){return[{type:n.ElementRef},{type:r.AlignService},{type:s.DOMService},{type:a.PositionService},{type:p.ResizeService},{type:l.ScrollableService},{type:u.AnimationService},{type:n.Renderer2},{type:n.NgZone}]},t.propDecorators={animate:[{type:n.Input}],anchor:[{type:n.Input}],anchorAlign:[{type:n.Input}],collision:[{type:n.Input}],popupAlign:[{type:n.Input}],copyAnchorStyles:[{type:n.Input}],popupClass:[{type:n.Input}],positionMode:[{type:n.Input}],offset:[{type:n.Input}],margin:[{type:n.Input}],anchorViewportLeave:[{type:n.Output}],close:[{type:n.Output}],open:[{type:n.Output}],positionChange:[{type:n.Output}],contentContainer:[{type:n.ViewChild,args:["container"]}]},t}();e.PopupComponent=v},function(t,e){t.exports=r},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(13),r=o(15),s=function(){function t(t){this._dom=t}return t.prototype.alignElement=function(t){var e=t.anchor,o=t.element,n=t.anchorAlign,i=t.elementAlign,r=t.margin,s=t.offset,a=t.positionMode,p="fixed"===a||!this._dom.hasOffsetParent(o),l=p?this.absoluteRect(e,o,s):this.relativeRect(e,o,s);return this._dom.align({anchorAlign:n,anchorRect:l,elementAlign:i,elementRect:this._dom.offset(o),margin:r})},t.prototype.absoluteRect=function(t,e,o){return this._dom.removeScroll(this._dom.addScroll(r.removeStackingOffset(r.eitherRect(this._dom.offset(t),o),this._dom.stackingElementOffset(e)),this._dom.stackingElementScroll(e)),this.elementScrollPosition(t,e))},t.prototype.elementScrollPosition=function(t,e){return t?{x:0,y:0}:this._dom.scrollPosition(e)},t.prototype.relativeRect=function(t,e,o){return r.eitherRect(this._dom.position(t,e),o)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:i.DOMService}]},t}();e.AlignService=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(14),r=o(15),s=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],a=function(){function t(){}return t.prototype.addOffset=function(t,e){return{left:t.left+e.left,top:t.top+e.top}},t.prototype.addScroll=function(t,e){return i.addScroll(t,e)},t.prototype.align=function(t){return i.align(t)},t.prototype.boundingOffset=function(t){return i.boundingOffset(this.nativeElement(t))},t.prototype.getFontStyles=function(t){var e=this.getWindow();if(!e||!t)return[];var o=e.getComputedStyle(this.nativeElement(t));return s.map(function(t){return{key:t,value:o[t]}})},t.prototype.getWindow=function(){return r.isWindowAvailable()?window:null},t.prototype.hasOffsetParent=function(t){return!!t&&!!this.nativeElement(t).offsetParent},t.prototype.offset=function(t){return t?i.offset(this.nativeElement(t)):null},t.prototype.offsetAtPoint=function(t,e){if(!t)return null;var o=this.nativeElement(t),n=o.style,r=n.left,s=n.top;o.style.left=e.left+"px",o.style.top=e.top+"px";var a=i.offset(o);return o.style.left=r,o.style.top=s,a},t.prototype.nativeElement=function(t){return t?t.nativeElement||t:null},t.prototype.position=function(t,e){return t&&e?i.positionWithScroll(this.nativeElement(t),this.nativeElement(e)):null},t.prototype.removeScroll=function(t,e){return i.removeScroll(t,e)},t.prototype.restrictToView=function(t){return i.restrictToView(t)},t.prototype.scrollPosition=function(t){return i.scrollPosition(this.nativeElement(t))},t.prototype.scrollableParents=function(t){return r.scrollableParents(this.nativeElement(t))},t.prototype.stackingElementOffset=function(t){var e=this.getRelativeContextElement(t);return e?i.offset(e):null},t.prototype.stackingElementScroll=function(t){var e=this.getRelativeContextElement(t);return e?{x:e.scrollLeft,y:e.scrollTop}:{x:0,y:0}},t.prototype.getRelativeContextElement=function(t){if(!t||!r.HAS_RELATIVE_STACKING_CONTEXT)return null;for(var e=this.nativeElement(t).parentElement;e;){if("none"!==window.getComputedStyle(e).transform)return e;e=e.parentElement}return null},t.prototype.useRelativePosition=function(t){return!!this.getRelativeContextElement(t)},t.prototype.windowViewPort=function(t){return i.getWindowViewPort(this.nativeElement(t))},t.prototype.zIndex=function(t,e){return r.zIndex(this.nativeElement(t),this.nativeElement(e))},t.prototype.zoomLevel=function(){return r.isDocumentAvailable()&&r.isWindowAvailable()?parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1:1},t.prototype.isZoomed=function(){return this.zoomLevel()>1},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[]},t}();e.DOMService=a},function(t,e){"use strict";function o(t,e){return{top:t.top+e.y,left:t.left+e.x,height:t.height,width:t.width}}function n(t,e,o){var n=t.top,i=t.left;return o&&(i=0,n=0),{top:n+e.top,left:i+e.left,height:t.height,width:t.width}}function i(t){var e=c(t),o=g(t);return{x:o.pageXOffset||e.scrollLeft||0,y:o.pageYOffset||e.scrollTop||0}}function r(t){var e=h(t);return e?y(e):{x:0,y:0}}function s(t,e){return{top:t.top-e.y,left:t.left-e.x,height:t.height,width:t.width}}function a(t){var e=g(t);return{height:e.innerHeight,width:e.innerWidth}}Object.defineProperty(e,"__esModule",{value:!0});var p={bottom:"bottom",center:"center",middle:"middle",left:"left",right:"right",top:"top"},l=function(t){var e=t.anchorRect,o=t.anchorAlign,n=t.elementRect,i=t.elementAlign,r=t.margin;void 0===r&&(r={});var s=o.horizontal,a=o.vertical,l=i.horizontal,u=i.vertical,c=r.horizontal||0,h=r.vertical||0,f=e.top,d=e.left;return a===p.bottom&&(f+=e.height),a!==p.center&&a!==p.middle||(f+=Math.round(e.height/2)),u===p.bottom&&(f-=n.height,h*=-1),u!==p.center&&u!==p.middle||(f-=Math.round(n.height/2),h*=-1),s===p.right&&(d+=e.width),s!==p.center&&s!==p.middle||(d+=Math.round(e.width/2)),l===p.right&&(d-=n.width,c*=-1),l!==p.center&&l!==p.middle||(d-=Math.round(n.width/2),c*=-1),{top:f+h,left:d+c}},u=function(t){if(!t.getBoundingClientRect)return{bottom:t.innerHeight,left:0,right:t.innerWidth,top:0};var e=t.getBoundingClientRect(),o=e.bottom,n=e.left,i=e.right,r=e.top;return{bottom:o,left:n,right:i,top:r}},c=function(t){return t.ownerDocument.documentElement},h=function(t){for(var e=t.offsetParent;e&&"static"===e.style.position;)e=e.offsetParent;return e||c(t)},f=function(t){return h(t)===t.ownerDocument.body},d=function(t){var e=t.style,o=e.display,n=e.left,i=e.position;t.style.display="",t.style.left="-10000px",t.style.position="absolute";var r=t.getBoundingClientRect();return t.style.display=o,t.style.left=n,t.style.position=i,r},m=function(t){var e=t.getBoundingClientRect(),o=e.left,n=e.top;return e.height||e.width||(e=d(t)),{top:n,left:o,height:e.height,width:e.width}},v=function(t,e){for(var o=[],n=t.parentNode;n&&(o.push(n),n!==e);)n=n.parentNode;return o},g=function(t){return t.ownerDocument.defaultView},y=function(t){return t===(t.ownerDocument||{}).body?i(t):{x:t.scrollLeft,y:t.scrollTop}},b=function(t,e){var o=g(t),n=o.getComputedStyle(t),i=m(t),r=e||h(t),s=t.ownerDocument,a=r!==s.body&&r!==s.documentElement,p={top:0,left:0};if("fixed"!==n.position&&a){var l=o.getComputedStyle(r);p=m(r),p.top+=parseInt(l.borderTopWidth,10),p.left+=parseInt(l.borderLeftWidth,10)}return{top:i.top-p.top,left:i.left-p.left,height:i.height,width:i.width}},_=function(t,e){return t?y(t):r(e)},S=function(t,e){var o=e?h(e):null,n=b(t,o),i=n.top,r=n.left,s=n.height,a=n.width,p=_(o,t),l=p.x,u=p.y;return{top:i+u,left:r+l,height:s,width:a}},w={fit:"fit",flip:"flip"},P=function(t,e,o){var n=0;return t+e>o&&(n=o-(t+e)),t<0&&(n=-t),n},O=function(t){var e=t.offset,o=t.size,n=t.anchorSize,i=t.viewPortSize,r=t.anchorAlignPoint,s=t.elementAlignPoint,a=t.margin,l=0,u=s===p.center||s===p.middle,c=r===p.center||r===p.middle,h=2*a;return s!==r&&!u&&!c&&e>-1&&(e+o>i&&(l+=-(n+o+h)),e+l<0&&(l=0)),l},C=function(t){var e=t.anchorRect,o=t.anchorAlign,n=t.elementRect,i=t.elementAlign,r=t.collisions,s=t.viewPort,a=t.margin;void 0===a&&(a={});var p=n.top,l=n.left,u=n.height,c=n.width,h=s.height,f=s.width,d=a.horizontal||0,m=a.vertical||0,v=0,g=0,y=r.horizontal===w.flip,b=r.vertical===w.flip;r.vertical===w.fit&&(g+=P(p,u,h)),r.horizontal===w.fit&&(v+=P(l,c,f)),b&&(g+=O({margin:m,offset:p,size:u,anchorSize:e.height,viewPortSize:h,anchorAlignPoint:o.vertical,elementAlignPoint:i.vertical})),y&&(v+=O({margin:d,offset:l,size:c,anchorSize:e.width,viewPortSize:f,anchorAlignPoint:o.horizontal,elementAlignPoint:i.horizontal}));var _=y&&0!==v,S=b&&0!==g;return{flipped:_||S,flip:{horizontal:_,vertical:S},offset:{left:v,top:g}}},E=function(t){for(var e=[],o=t.parentNode.firstElementChild;o;)o!==t&&e.push(o),o=o.nextElementSibling;return e},A=function(t,e){for(var o,n,i=v(t),r=e;r&&(o=E(r),!(n=i.reduce(function(t,e){return t.concat(o.filter(function(t){return t===e}))},[])[0]));)r=r.parentElement;return n};e.align=l,e.addScroll=o,e.applyLocationOffset=n,e.boundingOffset=u,e.isBodyOffset=f,e.offsetParent=h,e.offset=m,e.parents=v,e.parentScrollPosition=r,e.position=b,e.positionWithScroll=S,e.removeScroll=s,e.restrictToView=C,e.scrollPosition=i,e.siblingContainer=A,e.siblings=E,e.getDocumentElement=c,e.getWindow=g,e.getWindowViewPort=a,e.AlignPoint=p,e.Collision=w},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(14);e.eitherRect=function(t,e){return t?t:{height:0,left:e.left,top:e.top,width:0}},e.replaceOffset=function(t,e){if(!e)return t;var o={height:t.height,left:e.left,top:e.top,width:t.width};return o},e.removeStackingOffset=function(t,e){if(!e)return t;var o={height:t.height,left:t.left-e.left,top:t.top-e.top,width:t.width};return o},e.isDifferentOffset=function(t,e){var o=t.left,n=t.top,i=e.left,r=e.top;return Math.abs(o-i)>=1||Math.abs(n-r)>=1},e.isDocumentAvailable=function(){return"undefined"!=typeof document&&!!document.body},e.isWindowAvailable=function(){return"undefined"!=typeof window},e.hasBoundingRect=function(t){return!!t.getBoundingClientRect},e.OVERFLOW_REGEXP=/auto|scroll/;var i=function(t){return""+t.style.overflow+t.style.overflowX+t.style.overflowY},r=function(t){var e=window.getComputedStyle(t);return""+e.overflow+e.overflowX+e.overflowY},s=function(t){return i(t)||r(t)};e.scrollableParents=function(t){var o=[];if(!e.isDocumentAvailable()||!e.isWindowAvailable())return o;for(var n=t.parentElement;n;)e.OVERFLOW_REGEXP.test(s(n))&&o.push(n),n=n.parentElement;return o.push(window),o},e.FRAME_DURATION=1e3/60,e.hasRelativeStackingContext=function(){if(!e.isDocumentAvailable())return!1;var t=10,o=document.createElement("div");o.style.transform="matrix(10, 0, 0, 10, 0, 0)",o.innerHTML='<div style="position: fixed; top: '+t+'px;">child</div>',document.body.appendChild(o);var n=o.children[0].getBoundingClientRect().top!==t;return document.body.removeChild(o),n},e.HAS_RELATIVE_STACKING_CONTEXT=e.hasRelativeStackingContext(),e.zIndex=function(t,o){if(!t||!e.isDocumentAvailable()||!e.isWindowAvailable())return null;var i=n.siblingContainer(t,o);if(!i)return null;var r=[t].concat(n.parents(t,i)).reduce(function(t,e){var o=e.style.zIndex||window.getComputedStyle(e).zIndex,n=parseInt(o,10);return n>t?n:t},0);return r?r+1:null}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(13),r=o(15),s=function(){function t(t){this._dom=t}return t.prototype.positionElement=function(t){var e=t.anchor,o=t.currentLocation,n=t.element,i=t.anchorAlign,s=t.elementAlign,a=t.collisions,p=t.margin,l=this._dom,u=l.restrictToView({anchorAlign:i,anchorRect:r.eitherRect(l.offset(e),o),collisions:a,elementAlign:s,elementRect:l.offsetAtPoint(n,o),margin:p,viewPort:t.viewPort||l.windowViewPort(n)});return{flip:u.flip,flipped:u.flipped,offset:l.addOffset(o,u.offset)}},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:i.DOMService}]},t}();e.PositionService=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(5),r=o(18),s=o(15),a=o(13),p=function(){function t(t,e){this._dom=t,this._zone=e}return t.prototype.subscribe=function(t){var e=this;s.isDocumentAvailable()&&this._zone.runOutsideAngular(function(){e.subscription=i.fromEvent(e._dom.getWindow(),"resize").pipe(r.auditTime(s.FRAME_DURATION)).subscribe(function(){return t()})})},t.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.isUnsubscribed=function(){return this.subscription&&this.subscription.closed},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:a.DOMService},{type:n.NgZone}]},t}();e.ResizeService=p},function(t,e){t.exports=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(5),r=o(20),s=o(18),a=o(13),p=o(15);e.THRESHOLD_DIFF=1;var l=function(){function t(t,e){this._dom=t,this._zone=e}return t.prototype.forElement=function(t){return this.unsubscribe(),this.element=t,this},t.prototype.subscribe=function(t){var e=this;if(t&&p.isDocumentAvailable()&&this.element){var o=this._dom.nativeElement(this.element),n=this._dom.scrollableParents(this.element);this._zone.runOutsideAngular(function(){var a=n.map(function(t){return i.fromEvent(t,"scroll").pipe(s.auditTime(p.FRAME_DURATION))}),l=function(n){t(e.isVisible(o,n.target))};e.subscription=r.merge.apply(void 0,a).subscribe(l)})}},t.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.isVisible=function(t,o){var n=this._dom.boundingOffset(t),i=this._dom.boundingOffset(o);return!(i.top-n.bottom>e.THRESHOLD_DIFF)&&(!(i.bottom-n.bottom<-e.THRESHOLD_DIFF)&&(!(i.right-n.right<-e.THRESHOLD_DIFF)&&!(i.left-n.left>e.THRESHOLD_DIFF)))},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:a.DOMService},{type:n.NgZone}]},t}();e.ScrollableService=l},function(t,e){t.exports=a},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(22),r="left",s="right",a="down",p="up",l="slide",u=100,c={};c.expand=function(t){var e,o=t===p||t===a?"scaleY":"scaleX",n=0,i=1;return e=t===a?"top":t===r?s:t===s?r:"bottom",{start:{transform:o+"("+n+")",transformOrigin:e},end:{transform:o+"("+i+")"}}},c.slide=function(t){var e=t===r||t===s?"translateX":"translateY",o=t===s||t===a?-100:100,n=0;return{start:{transform:e+"("+o+"%)"},end:{transform:e+"("+n+"%)"}}},c.fade=function(){return{start:{opacity:0},end:{opacity:1}}},c.zoom=function(){var t=0,e=1;return{start:{transform:"scale("+t+")"},end:{transform:"scale("+e+")"}}};var h=function(){function t(t){this.animationBuilder=t,this.start=new n.EventEmitter,this.end=new n.EventEmitter}return t.prototype.play=function(t,e,o){if(!this.flip||this.flip.horizontal!==o.horizontal||this.flip.vertical!==o.vertical){this.flip=o;var i=e.type||l,r=c[i];if(r){var s=this.getDirection(o,e),a=r(s);this.playStates(t,a,e)}else if(n.isDevMode())throw new Error('Unsupported animation type: "'+i+'". The supported types are slide, expand, fade and zoom.')}},t.prototype.ngOnDestroy=function(){this.stopPlayer()},t.prototype.playStates=function(t,e,o){var n=this;this.stopPlayer();var r=o.duration||u,s=this.animationBuilder.build([i.style(e.start),i.animate(r+"ms ease-in",i.style(e.end))]),a=this.player=s.create(t);a.onDone(function(){n.end.emit(),n.stopPlayer()}),this.start.emit(),a.play()},t.prototype.getDirection=function(t,e){var o=e.direction||a;return t.horizontal&&(o===r?o=s:o===s&&(o=r)),t.vertical&&(o===a?o=p:o===p&&(o=a)),o},t.prototype.stopPlayer=function(){this.player&&(this.player.destroy(),this.player=null)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:i.AnimationBuilder}]},t}();e.AnimationService=h},function(t,e){t.exports=p},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(24),r=o(10),s=o(9),a=[r.PopupComponent],p=function(){function t(){}return t.decorators=[{ | ||
type:n.NgModule,args:[{declarations:[a],entryComponents:[a],exports:[a],imports:[i.CommonModule],providers:[s.PopupService]}]}],t.ctorParameters=function(){return[]},t}();e.PopupModule=p},function(t,e){t.exports=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(3);e.TOOLTIP_SETTINGS=new i.InjectionToken("kendo-ui-tooltip-settings");var r=function(){function t(){this.callout=!0,this.position="top",this.showOn="hover"}return t=n.__decorate([i.Injectable()],t)}();e.TooltipSettings=r},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(3),r=o(27),s=function(){function t(t){this.content=t,this.tooltipWidth=null,this.tooltipHeight=null,this.callout=!0}return Object.defineProperty(t.prototype,"elementClass",{get:function(){return!0},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.updateCalloutPosition=function(t){var e=""+t=="top"||""+t=="bottom",o=e?"width":"height",n=e?"left":"top",i=e?"marginLeft":"marginTop",s=this.content.nativeElement.lastElementChild,a=s.getBoundingClientRect()[o],p=r.getCenterOffset(this.anchor,n,o),l=r.getCenterOffset(this.content,n,o);if(Math.abs(l-p)>1){var u=l-p+a/2;s.style[i]=-u+"px"}},n.__decorate([i.HostBinding("class.k-tooltip"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],t.prototype,"elementClass",null),n.__decorate([i.HostBinding("style.position"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],t.prototype,"cssPosition",null),n.__decorate([i.HostBinding("style.width.px"),i.Input(),n.__metadata("design:type",Number)],t.prototype,"tooltipWidth",void 0),n.__decorate([i.HostBinding("style.height.px"),i.Input(),n.__metadata("design:type",Number)],t.prototype,"tooltipHeight",void 0),n.__decorate([i.Input(),n.__metadata("design:type",i.ElementRef)],t.prototype,"anchor",void 0),n.__decorate([i.Input(),n.__metadata("design:type",i.TemplateRef)],t.prototype,"templateRef",void 0),n.__decorate([i.Input(),n.__metadata("design:type",String)],t.prototype,"templateString",void 0),t=n.__decorate([i.Component({template:'\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 '}),n.__metadata("design:paramtypes",[i.ElementRef])],t)}();e.TooltipContentComponent=s},function(t,e){"use strict";function o(t,e){var o={},n={},i={};switch(t){case"top":o={horizontal:"center",vertical:"top"},n={horizontal:"center",vertical:"bottom"},i={horizontal:0,vertical:e};break;case"bottom":o={horizontal:"center",vertical:"bottom"},n={horizontal:"center",vertical:"top"},i={horizontal:0,vertical:e};break;case"right":o={horizontal:"right",vertical:"center"},n={horizontal:"left",vertical:"center"},i={horizontal:e,vertical:0};break;case"left":o={horizontal:"left",vertical:"center"},n={horizontal:"right",vertical:"center"},i={horizontal:e,vertical:0}}return{anchorAlign:o,popupAlign:n,popupMargin:i}}function n(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)},n=t;n;){if(o(n,e))return n;n=n.parentElement}}function i(t,e){return t&&t.contains(e)}function r(t,e,o){var n=t.nativeElement.getBoundingClientRect();return n[e]+n[o]/2}Object.defineProperty(e,"__esModule",{value:!0}),e.align=o,e.closest=n,e.contains=i,e.getCenterOffset=r},function(t,e){t.exports=u},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(3),r=o(24),s=o(1),a=o(7),p=o(26),l=[s.TooltipDirective,p.TooltipContentComponent],u=[a.PopupModule],c=function(){function t(){}return t=n.__decorate([i.NgModule({declarations:[l],entryComponents:[p.TooltipContentComponent],imports:[r.CommonModule].concat(u),exports:[l]})],t)}();e.TooltipModule=c}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("@angular/core"),require("rxjs/operators/take"),require("rxjs/observable/fromEvent"),require("rxjs/operators"),require("rxjs/observable/fromPromise"),require("rxjs/operators/auditTime"),require("rxjs/observable/merge"),require("@angular/animations"),require("@angular/common"),require("@progress/kendo-angular-l10n")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","rxjs/operators/take","rxjs/observable/fromEvent","rxjs/operators","rxjs/observable/fromPromise","rxjs/operators/auditTime","rxjs/observable/merge","@angular/animations","@angular/common","@progress/kendo-angular-l10n"],e):"object"==typeof exports?exports.KendoAngularTooltip=e(require("tslib"),require("@angular/core"),require("rxjs/operators/take"),require("rxjs/observable/fromEvent"),require("rxjs/operators"),require("rxjs/observable/fromPromise"),require("rxjs/operators/auditTime"),require("rxjs/observable/merge"),require("@angular/animations"),require("@angular/common"),require("@progress/kendo-angular-l10n")):t.KendoAngularTooltip=e(t.tslib,t["@angular/core"],t["rxjs/operators/take"],t["rxjs/observable/fromEvent"],t["rxjs/operators"],t["rxjs/observable/fromPromise"],t["rxjs/operators/auditTime"],t["rxjs/observable/merge"],t["@angular/animations"],t["@angular/common"],t["@progress/kendo-angular-l10n"])}(this,function(t,e,o,n,i,r,s,a,p,l,c){return function(t){function e(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(1);e.TooltipDirective=n.TooltipDirective;var i=o(29);e.TooltipModule=i.TooltipModule;var r=o(25);e.TooltipSettings=r.TooltipSettings,e.TOOLTIP_SETTINGS=r.TOOLTIP_SETTINGS},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(3),r=o(4),s=o(5),a=o(6),p=o(7),l=o(25),c=o(26),u=o(27),h=o(28),f=function(){function t(t,e,o,n,i){var r=this;this.tooltipWrapper=t,this.ngZone=e,this.popupService=o,this.localizationService=n,this.filter="[title]",this.position="top",this.showOn="hover",this.showAfter=100,this.callout=!0,this.offset=6,this.collision={horizontal:"fit",vertical:"flip"},this.anchor=null,this.validPositions=["top","bottom","right","left"],this.validShowOptions=["hover","click","none"],this.direction=n.rtl?"rtl":"ltr",i&&(this.position=i.position,this.callout=i.callout,this.showOn=i.showOn),this.ngZone.runOutsideAngular(function(){var t=r.tooltipWrapper.nativeElement;r.anchorTitleSubscription=s.fromEvent(t,"mouseover").subscribe(function(t){if(""!==r.filter){var e=u.closest(t.target,r.filter);e&&r._hideElementTitle(e)}}),r.mouseOverSubscription=s.fromEvent(t,"mouseover").pipe(a.debounceTime(100)).subscribe(function(t){return r._onMouseOver(t)}),r.mouseOutSubscription=s.fromEvent(t,"mouseout").pipe(a.debounceTime(100)).subscribe(function(t){return r._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,o={nativeElement:t};if(this.anchor=t,"hover"===this.showOn){if(this.popupRef)return;clearTimeout(this.showTimeout),this.showTimeout=window.setTimeout(function(){return e._show(o)},this.showAfter)}else this._hideElementTitle(this.anchor),this._show(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._closePopup()},t.prototype.toggle=function(t,e){this.anchor!==t&&this.hide(),"undefined"==typeof e&&(e=!this.popupRef),e?this.show(t):this.hide()},t.prototype.ngOnInit=function(){var t=this;this._verifyProperties(),this.dynamicRTLSubscription=this.localizationService.changes.subscribe(function(e){var o=e.rtl;return t.direction=o?"rtl":"ltr"})},t.prototype.ngOnDestroy=function(){this.hide(),this.template=null,this.anchorTitleSubscription.unsubscribe(),this.mouseOverSubscription.unsubscribe(),this.mouseOutSubscription.unsubscribe(),this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe(),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe(),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe()},t.prototype._show=function(t){var e=this;if(t.nativeElement.getAttribute("data-title")||this.template){var o;this.ngZone.run(function(){e._openPopup(t),o=e.popupRef.content,e._bindContent(o,t)}),this.popupRef.popupAnchorViewportLeave.pipe(r.take(1)).subscribe(function(){return e.hide()})}},t.prototype._bindContent=function(t,e){var o=t.instance;this.template?o.templateRef=this.template:o.templateString=this.anchor.getAttribute("data-title"),o.anchor=e,o.callout=this.callout,o.position=this.position,o.tooltipWidth=this.tooltipWidth,o.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 e=this,o=u.align(this.position,this.offset),n=o.anchorAlign,i=o.popupAlign,r=o.popupMargin;this.popupRef=this.popupService.open({anchor:t,anchorAlign:n,animate:!1,content:c.TooltipContentComponent,collision:this.collision,margin:r,popupAlign:i,popupClass:"k-popup-transparent"});var a=this.popupRef.content.instance;a.callout&&(this.popupPositionChangeSubscription=this.popupRef.popupPositionChange.subscribe(function(){return a.updateCalloutPosition(e.position)})),"hover"===this.showOn&&this.ngZone.runOutsideAngular(function(){var t=e.popupRef.popupElement;e.popupMouseOutSubscription=s.fromEvent(t,"mouseout").subscribe(function(t){return e._onMouseOut(t)})})},t.prototype._closePopup=function(){var t=this;this.popupRef&&(this.ngZone.run(function(){return t.popupRef.close()}),this.popupRef=null,this.popupPositionChangeSubscription.unsubscribe())},t.prototype._onMouseOver=function(t){if("hover"===this.showOn&&""!==this.filter){var e=u.closest(t.target,this.filter);e&&this.toggle(e,!0)}},t.prototype._onMouseOut=function(t){if("hover"===this.showOn){var e=this.popupRef&&this.popupRef.popupElement,o=t.relatedTarget;o&&u.contains(this.anchor,o)||o&&u.contains(e,o)||this.hide()}},t.prototype._verifyProperties=function(){if(i.isDevMode()){if(!u.containsItem(this.validPositions,this.position))throw new Error("Invalid value provided for position property.The available options are 'top', 'bottom', 'left', or 'right'.");if(!u.containsItem(this.validShowOptions,this.showOn))throw new Error("Invalid value provided for showOn property.The available options are 'hover', 'click', or 'none'.")}},n.__decorate([i.HostBinding("attr.dir"),n.__metadata("design:type",String)],t.prototype,"direction",void 0),n.__decorate([i.Input(),n.__metadata("design:type",String)],t.prototype,"filter",void 0),n.__decorate([i.Input(),n.__metadata("design:type",String)],t.prototype,"position",void 0),n.__decorate([i.Input(),n.__metadata("design:type",String)],t.prototype,"showOn",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Number)],t.prototype,"showAfter",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Boolean)],t.prototype,"callout",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Number)],t.prototype,"offset",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Number)],t.prototype,"tooltipWidth",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Number)],t.prototype,"tooltipHeight",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Object)],t.prototype,"collision",void 0),n.__decorate([i.Input(),n.__metadata("design:type",i.TemplateRef),n.__metadata("design:paramtypes",[i.TemplateRef])],t.prototype,"tooltipTemplate",null),t=n.__decorate([i.Directive({selector:"[kendoTooltip]",exportAs:"kendoTooltip",providers:[h.LocalizationService,{provide:h.L10N_PREFIX,useValue:"kendo.tooltip"}]}),n.__param(4,i.Optional()),n.__param(4,i.Inject(l.TOOLTIP_SETTINGS)),n.__metadata("design:paramtypes",[i.ElementRef,i.NgZone,p.PopupService,h.LocalizationService,l.TooltipSettings])],t)}();e.TooltipDirective=f},function(e,o){e.exports=t},function(t,o){t.exports=e},function(t,e){t.exports=o},function(t,e){t.exports=n},function(t,e){t.exports=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2);n.__exportStar(o(8),e);var i=o(12);e.ɵa=i.AlignService;var r=o(21);e.ɵc=r.AnimationService;var s=o(13);e.ɵb=s.DOMService;var a=o(16);e.ɵd=a.PositionService;var p=o(17);e.ɵe=p.ResizeService;var l=o(19);e.ɵf=l.ScrollableService},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(9);e.PopupService=n.PopupService,e.POPUP_CONTAINER=n.POPUP_CONTAINER;var i=o(10);e.PopupComponent=i.PopupComponent;var r=o(23);e.PopupModule=r.PopupModule},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(10),r=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)};e.POPUP_CONTAINER=new n.InjectionToken("Popup Container");var s=function(){function t(t,e,o,n){this.applicationRef=t,this.componentFactoryResolver=e,this.injector=o,this.container=n}return Object.defineProperty(t.prototype,"rootViewContainer",{get:function(){var t=this.applicationRef.components||[];if(t[0])return t[0];throw new Error("\n View Container not found! Inject the POPUP_CONTAINER or define a specific ViewContainerRef via the appendTo option.\n See http://www.telerik.com/kendo-angular-ui/components/popup/api/POPUP_CONTAINER/ for more details.\n ")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rootViewContainerNode",{get:function(){return this.container?this.container.nativeElement:this.getComponentRootNode(this.rootViewContainer)},enumerable:!0,configurable:!0}),t.prototype.open=function(t){void 0===t&&(t={});var e=this.contentFrom(t.content),o=e.component,n=e.nodes,i=this.appendPopup(n,t.appendTo),s=i.instance;this.projectComponentInputs(i,t),i.changeDetectorRef.detectChanges(),o&&o.changeDetectorRef.detectChanges();var a=this.getComponentRootNode(i);return{close:function(){o?o.destroy():(i.instance.content=null,i.changeDetectorRef.detectChanges()),i.destroy(),r(a)},content:o,popup:i,popupAnchorViewportLeave:s.anchorViewportLeave,popupClose:s.close,popupElement:a,popupOpen:s.open,popupPositionChange:s.positionChange}},t.prototype.appendPopup=function(t,e){var o=this.createComponent(i.PopupComponent,t,e);return e||this.rootViewContainerNode.appendChild(this.getComponentRootNode(o)),o},t.prototype.getComponentRootNode=function(t){return t.hostView.rootNodes[0]},t.prototype.getComponentFactory=function(t){return this.componentFactoryResolver.resolveComponentFactory(t)},t.prototype.createComponent=function(t,e,o){var n=this.getComponentFactory(t);if(o)return o.createComponent(n,void 0,this.injector,e);var i=n.create(this.injector,e);return this.applicationRef.attachView(i.hostView),i},t.prototype.projectComponentInputs=function(t,e){return Object.getOwnPropertyNames(e).filter(function(t){return"content"!==t||e.content instanceof n.TemplateRef}).map(function(o){t.instance[o]=e[o]}),t},t.prototype.contentFrom=function(t){if(!t||t instanceof n.TemplateRef)return{component:null,nodes:[[]]};var e=this.createComponent(t),o=e?[e.location.nativeElement]:[];return{component:e,nodes:[o]}},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:n.ApplicationRef},{type:n.ComponentFactoryResolver},{type:n.Injector},{type:n.ElementRef,decorators:[{type:n.Inject,args:[e.POPUP_CONTAINER]},{type:n.Optional}]}]},t}();e.PopupService=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(11),r=o(12),s=o(13),a=o(16),p=o(17),l=o(19),c=o(21),u=o(15),h={left:-1e4,top:0},f="k-animation-container",d="k-animation-container-fixed",m=function(t){return t.observers.length>0},v=function(){function t(t,e,o,i,r,s,a,p,l){this.container=t,this._alignService=e,this.domService=o,this._positionService=i,this._resizeService=r,this._scrollableService=s,this.animationService=a,this._renderer=p,this._zone=l,this.animate=!0,this.anchorAlign={horizontal:"left",vertical:"bottom"},this.collision={horizontal:"fit",vertical:"flip"},this.popupAlign={horizontal:"left",vertical:"top"},this.copyAnchorStyles=!1,this.positionMode="fixed",this.offset=h,this.anchorViewportLeave=new n.EventEmitter,this.close=new n.EventEmitter,this.open=new n.EventEmitter,this.positionChange=new n.EventEmitter,this.resolvedPromise=Promise.resolve(null),this._renderer.addClass(t.nativeElement,f),this.updateFixedClass()}return t.prototype.ngOnInit=function(){this.repositionCallback=this.reposition.bind(this),this._resizeService.subscribe(this.repositionCallback),this.animationSubscriptions=this.animationService.start.subscribe(this.onAnimationStart.bind(this)).add(this.animationService.end.subscribe(this.onAnimationEnd.bind(this))),this._scrollableService.forElement(this.anchor||this.container).subscribe(this.onScroll.bind(this)),this.currentOffset=h,this.setZIndex(),this.copyFontStyles(),this.updateFixedClass()},t.prototype.ngOnChanges=function(t){t.copyAnchorStyles&&this.copyFontStyles(),t.positionMode&&this.updateFixedClass()},t.prototype.ngAfterViewInit=function(){var t=this;this.reposition(),this.animate||this.resolvedPromise.then(function(){t.onAnimationEnd()})},t.prototype.ngAfterViewChecked=function(){var t=this;this._zone.runOutsideAngular(function(){t.repositionSubscription&&t.repositionSubscription.unsubscribe(),t.repositionSubscription=i.fromPromise(t.resolvedPromise).subscribe(t.repositionCallback)})},t.prototype.ngOnDestroy=function(){this.anchorViewportLeave.complete(),this.positionChange.complete(),this.close.emit(),this.close.complete(),this._resizeService.unsubscribe(),this._scrollableService.unsubscribe(),this.repositionSubscription&&this.repositionSubscription.unsubscribe(),this.animationSubscriptions.unsubscribe()},t.prototype.onAnimationStart=function(){this._renderer.removeClass(this.container.nativeElement,"k-animation-container-shown")},t.prototype.onAnimationEnd=function(){this._renderer.addClass(this.container.nativeElement,"k-animation-container-shown"),this.open.emit(),this.open.complete()},Object.defineProperty(t.prototype,"currentOffset",{get:function(){return this._currentOffset},set:function(t){this.setContainerStyle("left",t.left+"px"),this.setContainerStyle("top",t.top+"px"),this._currentOffset=t},enumerable:!0,configurable:!0}),t.prototype.setZIndex=function(){this.anchor&&this.setContainerStyle("z-index",String(this.domService.zIndex(this.anchor,this.container)))},t.prototype.reposition=function(){var t=this;if(u.isDocumentAvailable()){var e=this.position(),o=e.flip,n=e.offset;this._currentOffset&&!u.isDifferentOffset(this._currentOffset,n)||(this.currentOffset=n,m(this.positionChange)&&this._zone.run(function(){return t.positionChange.emit(n)})),this.animate&&this.animationService.play(this.contentContainer.nativeElement,this.animate,o)}},t.prototype.position=function(){var t=this._alignService.alignElement({anchor:this.anchor,anchorAlign:this.anchorAlign,element:this.container,elementAlign:this.popupAlign,margin:this.margin,offset:this.offset,positionMode:this.positionMode});return this._positionService.positionElement({anchor:this.anchor,anchorAlign:this.anchorAlign,collisions:this.collision,currentLocation:t,element:this.container,elementAlign:this.popupAlign,margin:this.margin})},t.prototype.onScroll=function(t){var e=this,o=m(this.anchorViewportLeave);t||!o?this.reposition():o&&this._zone.run(function(){e.anchorViewportLeave.emit()})},t.prototype.copyFontStyles=function(){var t=this;this.anchor&&this.copyAnchorStyles&&this.domService.getFontStyles(this.anchor).forEach(function(e){return t.setContainerStyle(e.key,e.value)})},t.prototype.updateFixedClass=function(){var t="fixed"===this.positionMode?"addClass":"removeClass";this._renderer[t](this.container.nativeElement,d)},t.prototype.setContainerStyle=function(t,e){this._renderer.setStyle(this.container.nativeElement,t,e)},t.decorators=[{type:n.Component,args:[{exportAs:"kendo-popup",providers:[r.AlignService,c.AnimationService,s.DOMService,a.PositionService,p.ResizeService,l.ScrollableService],selector:"kendo-popup",template:'\n <div class="k-popup" [ngClass]="popupClass" #container>\n <ng-content></ng-content>\n <ng-template [ngTemplateOutlet]="content" [ngIf]="content"></ng-template>\n </div>\n '}]}],t.ctorParameters=function(){return[{type:n.ElementRef},{type:r.AlignService},{type:s.DOMService},{type:a.PositionService},{type:p.ResizeService},{type:l.ScrollableService},{type:c.AnimationService},{type:n.Renderer2},{type:n.NgZone}]},t.propDecorators={animate:[{type:n.Input}],anchor:[{type:n.Input}],anchorAlign:[{type:n.Input}],collision:[{type:n.Input}],popupAlign:[{type:n.Input}],copyAnchorStyles:[{type:n.Input}],popupClass:[{type:n.Input}],positionMode:[{type:n.Input}],offset:[{type:n.Input}],margin:[{type:n.Input}],anchorViewportLeave:[{type:n.Output}],close:[{type:n.Output}],open:[{type:n.Output}],positionChange:[{type:n.Output}],contentContainer:[{type:n.ViewChild,args:["container"]}]},t}();e.PopupComponent=v},function(t,e){t.exports=r},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(13),r=o(15),s=function(){function t(t){this._dom=t}return t.prototype.alignElement=function(t){var e=t.anchor,o=t.element,n=t.anchorAlign,i=t.elementAlign,r=t.margin,s=t.offset,a=t.positionMode,p="fixed"===a||!this._dom.hasOffsetParent(o),l=p?this.absoluteRect(e,o,s):this.relativeRect(e,o,s);return this._dom.align({anchorAlign:n,anchorRect:l,elementAlign:i,elementRect:this._dom.offset(o),margin:r})},t.prototype.absoluteRect=function(t,e,o){return this._dom.removeScroll(this._dom.addScroll(r.removeStackingOffset(r.eitherRect(this._dom.offset(t),o),this._dom.stackingElementOffset(e)),this._dom.stackingElementScroll(e)),this.elementScrollPosition(t,e))},t.prototype.elementScrollPosition=function(t,e){return t?{x:0,y:0}:this._dom.scrollPosition(e)},t.prototype.relativeRect=function(t,e,o){return r.eitherRect(this._dom.position(t,e),o)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:i.DOMService}]},t}();e.AlignService=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(14),r=o(15),s=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],a=function(){function t(){}return t.prototype.addOffset=function(t,e){return{left:t.left+e.left,top:t.top+e.top}},t.prototype.addScroll=function(t,e){return i.addScroll(t,e)},t.prototype.align=function(t){return i.align(t)},t.prototype.boundingOffset=function(t){return i.boundingOffset(this.nativeElement(t))},t.prototype.getFontStyles=function(t){var e=this.getWindow();if(!e||!t)return[];var o=e.getComputedStyle(this.nativeElement(t));return s.map(function(t){return{key:t,value:o[t]}})},t.prototype.getWindow=function(){return r.isWindowAvailable()?window:null},t.prototype.hasOffsetParent=function(t){return!!t&&!!this.nativeElement(t).offsetParent},t.prototype.offset=function(t){return t?i.offset(this.nativeElement(t)):null},t.prototype.offsetAtPoint=function(t,e){if(!t)return null;var o=this.nativeElement(t),n=o.style,r=n.left,s=n.top;o.style.left=e.left+"px",o.style.top=e.top+"px";var a=i.offset(o);return o.style.left=r,o.style.top=s,a},t.prototype.nativeElement=function(t){return t?t.nativeElement||t:null},t.prototype.position=function(t,e){return t&&e?i.positionWithScroll(this.nativeElement(t),this.nativeElement(e)):null},t.prototype.removeScroll=function(t,e){return i.removeScroll(t,e)},t.prototype.restrictToView=function(t){return i.restrictToView(t)},t.prototype.scrollPosition=function(t){return i.scrollPosition(this.nativeElement(t))},t.prototype.scrollableParents=function(t){return r.scrollableParents(this.nativeElement(t))},t.prototype.stackingElementOffset=function(t){var e=this.getRelativeContextElement(t);return e?i.offset(e):null},t.prototype.stackingElementScroll=function(t){var e=this.getRelativeContextElement(t);return e?{x:e.scrollLeft,y:e.scrollTop}:{x:0,y:0}},t.prototype.getRelativeContextElement=function(t){if(!t||!r.HAS_RELATIVE_STACKING_CONTEXT)return null;for(var e=this.nativeElement(t).parentElement;e;){if("none"!==window.getComputedStyle(e).transform)return e;e=e.parentElement}return null},t.prototype.useRelativePosition=function(t){return!!this.getRelativeContextElement(t)},t.prototype.windowViewPort=function(t){return i.getWindowViewPort(this.nativeElement(t))},t.prototype.zIndex=function(t,e){return r.zIndex(this.nativeElement(t),this.nativeElement(e))},t.prototype.zoomLevel=function(){return r.isDocumentAvailable()&&r.isWindowAvailable()?parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1:1},t.prototype.isZoomed=function(){return this.zoomLevel()>1},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[]},t}();e.DOMService=a},function(t,e){"use strict";function o(t,e){return{top:t.top+e.y,left:t.left+e.x,height:t.height,width:t.width}}function n(t,e,o){var n=t.top,i=t.left;return o&&(i=0,n=0),{top:n+e.top,left:i+e.left,height:t.height,width:t.width}}function i(t){var e=u(t),o=g(t);return{x:o.pageXOffset||e.scrollLeft||0,y:o.pageYOffset||e.scrollTop||0}}function r(t){var e=h(t);return e?y(e):{x:0,y:0}}function s(t,e){return{top:t.top-e.y,left:t.left-e.x,height:t.height,width:t.width}}function a(t){var e=g(t);return{height:e.innerHeight,width:e.innerWidth}}Object.defineProperty(e,"__esModule",{value:!0});var p={bottom:"bottom",center:"center",middle:"middle",left:"left",right:"right",top:"top"},l=function(t){var e=t.anchorRect,o=t.anchorAlign,n=t.elementRect,i=t.elementAlign,r=t.margin;void 0===r&&(r={});var s=o.horizontal,a=o.vertical,l=i.horizontal,c=i.vertical,u=r.horizontal||0,h=r.vertical||0,f=e.top,d=e.left;return a===p.bottom&&(f+=e.height),a!==p.center&&a!==p.middle||(f+=Math.round(e.height/2)),c===p.bottom&&(f-=n.height,h*=-1),c!==p.center&&c!==p.middle||(f-=Math.round(n.height/2),h*=-1),s===p.right&&(d+=e.width),s!==p.center&&s!==p.middle||(d+=Math.round(e.width/2)),l===p.right&&(d-=n.width,u*=-1),l!==p.center&&l!==p.middle||(d-=Math.round(n.width/2),u*=-1),{top:f+h,left:d+u}},c=function(t){if(!t.getBoundingClientRect)return{bottom:t.innerHeight,left:0,right:t.innerWidth,top:0};var e=t.getBoundingClientRect(),o=e.bottom,n=e.left,i=e.right,r=e.top;return{bottom:o,left:n,right:i,top:r}},u=function(t){return t.ownerDocument.documentElement},h=function(t){for(var e=t.offsetParent;e&&"static"===e.style.position;)e=e.offsetParent;return e||u(t)},f=function(t){return h(t)===t.ownerDocument.body},d=function(t){var e=t.style,o=e.display,n=e.left,i=e.position;t.style.display="",t.style.left="-10000px",t.style.position="absolute";var r=t.getBoundingClientRect();return t.style.display=o,t.style.left=n,t.style.position=i,r},m=function(t){var e=t.getBoundingClientRect(),o=e.left,n=e.top;return e.height||e.width||(e=d(t)),{top:n,left:o,height:e.height,width:e.width}},v=function(t,e){for(var o=[],n=t.parentNode;n&&(o.push(n),n!==e);)n=n.parentNode;return o},g=function(t){return t.ownerDocument.defaultView},y=function(t){return t===(t.ownerDocument||{}).body?i(t):{x:t.scrollLeft,y:t.scrollTop}},b=function(t,e){var o=g(t),n=o.getComputedStyle(t),i=m(t),r=e||h(t),s=t.ownerDocument,a=r!==s.body&&r!==s.documentElement,p={top:0,left:0};if("fixed"!==n.position&&a){var l=o.getComputedStyle(r);p=m(r),p.top+=parseInt(l.borderTopWidth,10),p.left+=parseInt(l.borderLeftWidth,10)}return{top:i.top-p.top,left:i.left-p.left,height:i.height,width:i.width}},_=function(t,e){return t?y(t):r(e)},S=function(t,e){var o=e?h(e):null,n=b(t,o),i=n.top,r=n.left,s=n.height,a=n.width,p=_(o,t),l=p.x,c=p.y;return{top:i+c,left:r+l,height:s,width:a}},w={fit:"fit",flip:"flip"},P=function(t,e,o){var n=0;return t+e>o&&(n=o-(t+e)),t<0&&(n=-t),n},O=function(t){var e=t.offset,o=t.size,n=t.anchorSize,i=t.viewPortSize,r=t.anchorAlignPoint,s=t.elementAlignPoint,a=t.margin,l=0,c=s===p.center||s===p.middle,u=r===p.center||r===p.middle,h=2*a;return s!==r&&!c&&!u&&e>-1&&(e+o>i&&(l+=-(n+o+h)),e+l<0&&(l=0)),l},C=function(t){var e=t.anchorRect,o=t.anchorAlign,n=t.elementRect,i=t.elementAlign,r=t.collisions,s=t.viewPort,a=t.margin;void 0===a&&(a={});var p=n.top,l=n.left,c=n.height,u=n.width,h=s.height,f=s.width,d=a.horizontal||0,m=a.vertical||0,v=0,g=0,y=r.horizontal===w.flip,b=r.vertical===w.flip;r.vertical===w.fit&&(g+=P(p,c,h)),r.horizontal===w.fit&&(v+=P(l,u,f)),b&&(g+=O({margin:m,offset:p,size:c,anchorSize:e.height,viewPortSize:h,anchorAlignPoint:o.vertical,elementAlignPoint:i.vertical})),y&&(v+=O({margin:d,offset:l,size:u,anchorSize:e.width,viewPortSize:f,anchorAlignPoint:o.horizontal,elementAlignPoint:i.horizontal}));var _=y&&0!==v,S=b&&0!==g;return{flipped:_||S,flip:{horizontal:_,vertical:S},offset:{left:v,top:g}}},E=function(t){for(var e=[],o=t.parentNode.firstElementChild;o;)o!==t&&e.push(o),o=o.nextElementSibling;return e},A=function(t,e){for(var o,n,i=v(t),r=e;r&&(o=E(r),!(n=i.reduce(function(t,e){return t.concat(o.filter(function(t){return t===e}))},[])[0]));)r=r.parentElement;return n};e.align=l,e.addScroll=o,e.applyLocationOffset=n,e.boundingOffset=c,e.isBodyOffset=f,e.offsetParent=h,e.offset=m,e.parents=v,e.parentScrollPosition=r,e.position=b,e.positionWithScroll=S,e.removeScroll=s,e.restrictToView=C,e.scrollPosition=i,e.siblingContainer=A,e.siblings=E,e.getDocumentElement=u,e.getWindow=g,e.getWindowViewPort=a,e.AlignPoint=p,e.Collision=w},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(14);e.eitherRect=function(t,e){return t?t:{height:0,left:e.left,top:e.top,width:0}},e.replaceOffset=function(t,e){if(!e)return t;var o={height:t.height,left:e.left,top:e.top,width:t.width};return o},e.removeStackingOffset=function(t,e){if(!e)return t;var o={height:t.height,left:t.left-e.left,top:t.top-e.top,width:t.width};return o},e.isDifferentOffset=function(t,e){var o=t.left,n=t.top,i=e.left,r=e.top;return Math.abs(o-i)>=1||Math.abs(n-r)>=1},e.isDocumentAvailable=function(){return"undefined"!=typeof document&&!!document.body},e.isWindowAvailable=function(){return"undefined"!=typeof window},e.hasBoundingRect=function(t){return!!t.getBoundingClientRect},e.OVERFLOW_REGEXP=/auto|scroll/;var i=function(t){return""+t.style.overflow+t.style.overflowX+t.style.overflowY},r=function(t){var e=window.getComputedStyle(t);return""+e.overflow+e.overflowX+e.overflowY},s=function(t){return i(t)||r(t)};e.scrollableParents=function(t){var o=[];if(!e.isDocumentAvailable()||!e.isWindowAvailable())return o;for(var n=t.parentElement;n;)e.OVERFLOW_REGEXP.test(s(n))&&o.push(n),n=n.parentElement;return o.push(window),o},e.FRAME_DURATION=1e3/60,e.hasRelativeStackingContext=function(){if(!e.isDocumentAvailable())return!1;var t=10,o=document.createElement("div");o.style.transform="matrix(10, 0, 0, 10, 0, 0)",o.innerHTML='<div style="position: fixed; top: '+t+'px;">child</div>',document.body.appendChild(o);var n=o.children[0].getBoundingClientRect().top!==t;return document.body.removeChild(o),n},e.HAS_RELATIVE_STACKING_CONTEXT=e.hasRelativeStackingContext(),e.zIndex=function(t,o){if(!t||!e.isDocumentAvailable()||!e.isWindowAvailable())return null;var i=n.siblingContainer(t,o);if(!i)return null;var r=[t].concat(n.parents(t,i)).reduce(function(t,e){var o=e.style.zIndex||window.getComputedStyle(e).zIndex,n=parseInt(o,10);return n>t?n:t},0);return r?r+1:null}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(13),r=o(15),s=function(){function t(t){this._dom=t}return t.prototype.positionElement=function(t){var e=t.anchor,o=t.currentLocation,n=t.element,i=t.anchorAlign,s=t.elementAlign,a=t.collisions,p=t.margin,l=this._dom,c=l.restrictToView({anchorAlign:i,anchorRect:r.eitherRect(l.offset(e),o),collisions:a,elementAlign:s,elementRect:l.offsetAtPoint(n,o),margin:p,viewPort:t.viewPort||l.windowViewPort(n)});return{flip:c.flip,flipped:c.flipped,offset:l.addOffset(o,c.offset)}},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:i.DOMService}]},t}();e.PositionService=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(5),r=o(18),s=o(15),a=o(13),p=function(){function t(t,e){this._dom=t,this._zone=e}return t.prototype.subscribe=function(t){var e=this;s.isDocumentAvailable()&&this._zone.runOutsideAngular(function(){e.subscription=i.fromEvent(e._dom.getWindow(),"resize").pipe(r.auditTime(s.FRAME_DURATION)).subscribe(function(){return t()})})},t.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.isUnsubscribed=function(){return this.subscription&&this.subscription.closed},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:a.DOMService},{type:n.NgZone}]},t}();e.ResizeService=p},function(t,e){t.exports=s},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(5),r=o(20),s=o(18),a=o(13),p=o(15);e.THRESHOLD_DIFF=1;var l=function(){function t(t,e){this._dom=t,this._zone=e}return t.prototype.forElement=function(t){return this.unsubscribe(),this.element=t,this},t.prototype.subscribe=function(t){var e=this;if(t&&p.isDocumentAvailable()&&this.element){var o=this._dom.nativeElement(this.element),n=this._dom.scrollableParents(this.element);this._zone.runOutsideAngular(function(){var a=n.map(function(t){return i.fromEvent(t,"scroll").pipe(s.auditTime(p.FRAME_DURATION))}),l=function(n){t(e.isVisible(o,n.target))};e.subscription=r.merge.apply(void 0,a).subscribe(l)})}},t.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.isVisible=function(t,o){var n=this._dom.boundingOffset(t),i=this._dom.boundingOffset(o);return!(i.top-n.bottom>e.THRESHOLD_DIFF)&&(!(i.bottom-n.bottom<-e.THRESHOLD_DIFF)&&(!(i.right-n.right<-e.THRESHOLD_DIFF)&&!(i.left-n.left>e.THRESHOLD_DIFF)))},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:a.DOMService},{type:n.NgZone}]},t}();e.ScrollableService=l},function(t,e){t.exports=a},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(22),r="left",s="right",a="down",p="up",l="slide",c=100,u={};u.expand=function(t){var e,o=t===p||t===a?"scaleY":"scaleX",n=0,i=1;return e=t===a?"top":t===r?s:t===s?r:"bottom",{start:{transform:o+"("+n+")",transformOrigin:e},end:{transform:o+"("+i+")"}}},u.slide=function(t){var e=t===r||t===s?"translateX":"translateY",o=t===s||t===a?-100:100,n=0;return{start:{transform:e+"("+o+"%)"},end:{transform:e+"("+n+"%)"}}},u.fade=function(){return{start:{opacity:0},end:{opacity:1}}},u.zoom=function(){var t=0,e=1;return{start:{transform:"scale("+t+")"},end:{transform:"scale("+e+")"}}};var h=function(){function t(t){this.animationBuilder=t,this.start=new n.EventEmitter,this.end=new n.EventEmitter}return t.prototype.play=function(t,e,o){if(!this.flip||this.flip.horizontal!==o.horizontal||this.flip.vertical!==o.vertical){this.flip=o;var i=e.type||l,r=u[i];if(r){var s=this.getDirection(o,e),a=r(s);this.playStates(t,a,e)}else if(n.isDevMode())throw new Error('Unsupported animation type: "'+i+'". The supported types are slide, expand, fade and zoom.')}},t.prototype.ngOnDestroy=function(){this.stopPlayer()},t.prototype.playStates=function(t,e,o){var n=this;this.stopPlayer();var r=o.duration||c,s=this.animationBuilder.build([i.style(e.start),i.animate(r+"ms ease-in",i.style(e.end))]),a=this.player=s.create(t);a.onDone(function(){n.end.emit(),n.stopPlayer()}),this.start.emit(),a.play()},t.prototype.getDirection=function(t,e){ | ||
var o=e.direction||a;return t.horizontal&&(o===r?o=s:o===s&&(o=r)),t.vertical&&(o===a?o=p:o===p&&(o=a)),o},t.prototype.stopPlayer=function(){this.player&&(this.player.destroy(),this.player=null)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:i.AnimationBuilder}]},t}();e.AnimationService=h},function(t,e){t.exports=p},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(3),i=o(24),r=o(10),s=o(9),a=[r.PopupComponent],p=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[a],entryComponents:[a],exports:[a],imports:[i.CommonModule],providers:[s.PopupService]}]}],t.ctorParameters=function(){return[]},t}();e.PopupModule=p},function(t,e){t.exports=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(3);e.TOOLTIP_SETTINGS=new i.InjectionToken("kendo-ui-tooltip-settings");var r=function(){function t(){this.callout=!0,this.position="top",this.showOn="hover"}return t=n.__decorate([i.Injectable()],t)}();e.TooltipSettings=r},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(3),r=o(27),s=function(){function t(t){this.content=t,this.tooltipWidth=null,this.tooltipHeight=null,this.callout=!0}return Object.defineProperty(t.prototype,"elementClass",{get:function(){return!0},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.updateCalloutPosition=function(t){var e=""+t=="top"||""+t=="bottom",o=e?"width":"height",n=e?"left":"top",i=e?"marginLeft":"marginTop",s=this.content.nativeElement.lastElementChild,a=s.getBoundingClientRect()[o],p=r.getCenterOffset(this.anchor,n,o),l=r.getCenterOffset(this.content,n,o);if(Math.abs(l-p)>1){var c=l-p+a/2;s.style[i]=-c+"px"}},n.__decorate([i.HostBinding("class.k-tooltip"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],t.prototype,"elementClass",null),n.__decorate([i.HostBinding("style.position"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],t.prototype,"cssPosition",null),n.__decorate([i.HostBinding("style.width.px"),i.Input(),n.__metadata("design:type",Number)],t.prototype,"tooltipWidth",void 0),n.__decorate([i.HostBinding("style.height.px"),i.Input(),n.__metadata("design:type",Number)],t.prototype,"tooltipHeight",void 0),n.__decorate([i.Input(),n.__metadata("design:type",i.ElementRef)],t.prototype,"anchor",void 0),n.__decorate([i.Input(),n.__metadata("design:type",i.TemplateRef)],t.prototype,"templateRef",void 0),n.__decorate([i.Input(),n.__metadata("design:type",String)],t.prototype,"templateString",void 0),t=n.__decorate([i.Component({template:'\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 '}),n.__metadata("design:paramtypes",[i.ElementRef])],t)}();e.TooltipContentComponent=s},function(t,e){"use strict";function o(t,e){var o={},n={},i={};switch(t){case"top":o={horizontal:"center",vertical:"top"},n={horizontal:"center",vertical:"bottom"},i={horizontal:0,vertical:e};break;case"bottom":o={horizontal:"center",vertical:"bottom"},n={horizontal:"center",vertical:"top"},i={horizontal:0,vertical:e};break;case"right":o={horizontal:"right",vertical:"center"},n={horizontal:"left",vertical:"center"},i={horizontal:e,vertical:0};break;case"left":o={horizontal:"left",vertical:"center"},n={horizontal:"right",vertical:"center"},i={horizontal:e,vertical:0}}return{anchorAlign:o,popupAlign:n,popupMargin:i}}function n(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)},n=t;n;){if(o(n,e))return n;n=n.parentElement}}function i(t,e){return t&&t.contains(e)}function r(t,e,o){var n=t.nativeElement.getBoundingClientRect();return n[e]+n[o]/2}function s(t,e){return t.indexOf(e)!==-1}Object.defineProperty(e,"__esModule",{value:!0}),e.align=o,e.closest=n,e.contains=i,e.getCenterOffset=r,e.containsItem=s},function(t,e){t.exports=c},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(3),r=o(24),s=o(1),a=o(7),p=o(26),l=[s.TooltipDirective,p.TooltipContentComponent],c=[a.PopupModule],u=function(){function t(){}return t=n.__decorate([i.NgModule({declarations:[l],entryComponents:[p.TooltipContentComponent],imports:[r.CommonModule].concat(c),exports:[l]})],t)}();e.TooltipModule=u}])}); |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"metadata":{"TooltipDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTooltip]","exportAs":"kendoTooltip","providers":[{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService"},{"provide":{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"L10N_PREFIX"},"useValue":"kendo.tooltip"}]}]}],"members":{"direction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.dir"]}]}],"filter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"showOn":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"showAfter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"callout":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"offset":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"collision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"TOOLTIP_SETTINGS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone"},{"__symbolic":"reference","module":"@progress/kendo-angular-popup","name":"PopupService"},{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService"},{"__symbolic":"reference","name":"TooltipSettings"}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_show":[{"__symbolic":"method"}],"_bindContent":[{"__symbolic":"method"}],"_hideElementTitle":[{"__symbolic":"method"}],"_openPopup":[{"__symbolic":"method"}],"_closePopup":[{"__symbolic":"method"}],"_onMouseOver":[{"__symbolic":"method"}],"_onMouseOut":[{"__symbolic":"method"}]}},"TooltipModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","name":"TooltipDirective"},{"__symbolic":"reference","name":"ɵa"}]],"entryComponents":[{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"@progress/kendo-angular-popup","name":"PopupModule"}],"exports":[[{"__symbolic":"reference","name":"TooltipDirective"},{"__symbolic":"reference","name":"ɵa"}]]}]}],"members":{}},"TooltipSettings":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{}},"TOOLTIP_SETTINGS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["kendo-ui-tooltip-settings"]},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"template":"\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 "}]}],"members":{"elementClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-tooltip"]}]}],"cssPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.position"]}]}],"tooltipWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.width.px"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.height.px"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"anchor":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"templateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"templateString":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"calloutPositionClass":[{"__symbolic":"method"}],"updateCalloutPosition":[{"__symbolic":"method"}]}}},"origins":{"TooltipDirective":"./tooltip/tooltip.directive","TooltipModule":"./tooltip.module","TooltipSettings":"./tooltip/tooltip.settings","TOOLTIP_SETTINGS":"./tooltip/tooltip.settings","ɵa":"./tooltip/tooltip.content.component"},"importAs":"@progress/kendo-angular-component-base"} | ||
{"__symbolic":"module","version":3,"metadata":{"TooltipDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTooltip]","exportAs":"kendoTooltip","providers":[{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService"},{"provide":{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"L10N_PREFIX"},"useValue":"kendo.tooltip"}]}]}],"members":{"direction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.dir"]}]}],"filter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"showOn":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"showAfter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"callout":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"offset":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"collision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"TOOLTIP_SETTINGS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone"},{"__symbolic":"reference","module":"@progress/kendo-angular-popup","name":"PopupService"},{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService"},{"__symbolic":"reference","name":"TooltipSettings"}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_show":[{"__symbolic":"method"}],"_bindContent":[{"__symbolic":"method"}],"_hideElementTitle":[{"__symbolic":"method"}],"_openPopup":[{"__symbolic":"method"}],"_closePopup":[{"__symbolic":"method"}],"_onMouseOver":[{"__symbolic":"method"}],"_onMouseOut":[{"__symbolic":"method"}],"_verifyProperties":[{"__symbolic":"method"}]}},"TooltipModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","name":"TooltipDirective"},{"__symbolic":"reference","name":"ɵa"}]],"entryComponents":[{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"@progress/kendo-angular-popup","name":"PopupModule"}],"exports":[[{"__symbolic":"reference","name":"TooltipDirective"},{"__symbolic":"reference","name":"ɵa"}]]}]}],"members":{}},"TooltipSettings":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{}},"TOOLTIP_SETTINGS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["kendo-ui-tooltip-settings"]},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"template":"\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 "}]}],"members":{"elementClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-tooltip"]}]}],"cssPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.position"]}]}],"tooltipWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.width.px"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.height.px"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"anchor":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"templateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"templateString":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"calloutPositionClass":[{"__symbolic":"method"}],"updateCalloutPosition":[{"__symbolic":"method"}]}}},"origins":{"TooltipDirective":"./tooltip/tooltip.directive","TooltipModule":"./tooltip.module","TooltipSettings":"./tooltip/tooltip.settings","TOOLTIP_SETTINGS":"./tooltip/tooltip.settings","ɵa":"./tooltip/tooltip.content.component"},"importAs":"@progress/kendo-angular-component-base"} |
@@ -29,4 +29,5 @@ /** | ||
* platformBrowserDynamic().bootstrapModule(AppModule); | ||
* ``` | ||
*/ | ||
export declare class TooltipModule { | ||
} |
@@ -36,2 +36,3 @@ import { NgModule } from '@angular/core'; | ||
* platformBrowserDynamic().bootstrapModule(AppModule); | ||
* ``` | ||
*/ | ||
@@ -38,0 +39,0 @@ var TooltipModule = /** @class */ (function () { |
@@ -96,2 +96,4 @@ import { TemplateRef, OnDestroy, ElementRef, NgZone } from '@angular/core'; | ||
private dynamicRTLSubscription; | ||
private validPositions; | ||
private validShowOptions; | ||
constructor(tooltipWrapper: ElementRef, ngZone: NgZone, popupService: PopupService, localizationService: LocalizationService, settings: TooltipSettings); | ||
@@ -123,2 +125,3 @@ /** | ||
private _onMouseOut(e); | ||
private _verifyProperties(); | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Directive, Input, HostBinding, Optional, Inject, ElementRef, NgZone } from '@angular/core'; | ||
import { Directive, Input, HostBinding, Optional, Inject, ElementRef, NgZone, isDevMode } from '@angular/core'; | ||
import { take } from 'rxjs/operators/take'; | ||
@@ -8,3 +8,3 @@ import { fromEvent } from 'rxjs/observable/fromEvent'; | ||
import { TooltipContentComponent } from '../tooltip/tooltip.content.component'; | ||
import { align, closest, contains } from '../utils'; | ||
import { align, closest, contains, containsItem } from '../utils'; | ||
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n'; | ||
@@ -77,2 +77,4 @@ /** | ||
this.anchor = null; | ||
this.validPositions = ['top', 'bottom', 'right', 'left']; | ||
this.validShowOptions = ['hover', 'click', 'none']; | ||
this.direction = localizationService.rtl ? 'rtl' : 'ltr'; | ||
@@ -170,2 +172,3 @@ if (settings) { | ||
var _this = this; | ||
this._verifyProperties(); | ||
this.dynamicRTLSubscription = this.localizationService.changes | ||
@@ -290,2 +293,13 @@ .subscribe(function (_a) { | ||
}; | ||
TooltipDirective.prototype._verifyProperties = function () { | ||
if (!isDevMode()) { | ||
return; | ||
} | ||
if (!containsItem(this.validPositions, this.position)) { | ||
throw new Error("Invalid value provided for position property.The available options are 'top', 'bottom', 'left', or 'right'."); | ||
} | ||
if (!containsItem(this.validShowOptions, this.showOn)) { | ||
throw new Error("Invalid value provided for showOn property.The available options are 'hover', 'click', or 'none'."); | ||
} | ||
}; | ||
TooltipDirective.decorators = [ | ||
@@ -292,0 +306,0 @@ { type: Directive, args: [{ |
@@ -18,1 +18,5 @@ import { Position } from './models/position.type'; | ||
export declare function getCenterOffset(item: any, dir: string, size: string): number; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare function containsItem(collection: any, item: any): boolean; |
@@ -68,1 +68,7 @@ /** | ||
} | ||
/** | ||
* @hidden | ||
*/ | ||
export function containsItem(collection, item) { | ||
return collection.indexOf(item) !== -1; | ||
} |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"metadata":{"TooltipDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTooltip]","exportAs":"kendoTooltip","providers":[{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService"},{"provide":{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"L10N_PREFIX"},"useValue":"kendo.tooltip"}]}]}],"members":{"direction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.dir"]}]}],"filter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"showOn":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"showAfter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"callout":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"offset":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"collision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"TOOLTIP_SETTINGS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone"},{"__symbolic":"reference","module":"@progress/kendo-angular-popup","name":"PopupService"},{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService"},{"__symbolic":"reference","name":"TooltipSettings"}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_show":[{"__symbolic":"method"}],"_bindContent":[{"__symbolic":"method"}],"_hideElementTitle":[{"__symbolic":"method"}],"_openPopup":[{"__symbolic":"method"}],"_closePopup":[{"__symbolic":"method"}],"_onMouseOver":[{"__symbolic":"method"}],"_onMouseOut":[{"__symbolic":"method"}]}},"TooltipModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","name":"TooltipDirective"},{"__symbolic":"reference","name":"ɵa"}]],"entryComponents":[{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"@progress/kendo-angular-popup","name":"PopupModule"}],"exports":[[{"__symbolic":"reference","name":"TooltipDirective"},{"__symbolic":"reference","name":"ɵa"}]]}]}],"members":{}},"TooltipSettings":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{}},"TOOLTIP_SETTINGS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["kendo-ui-tooltip-settings"]},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"template":"\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 "}]}],"members":{"elementClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-tooltip"]}]}],"cssPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.position"]}]}],"tooltipWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.width.px"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.height.px"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"anchor":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"templateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"templateString":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"calloutPositionClass":[{"__symbolic":"method"}],"updateCalloutPosition":[{"__symbolic":"method"}]}}},"origins":{"TooltipDirective":"./tooltip/tooltip.directive","TooltipModule":"./tooltip.module","TooltipSettings":"./tooltip/tooltip.settings","TOOLTIP_SETTINGS":"./tooltip/tooltip.settings","ɵa":"./tooltip/tooltip.content.component"},"importAs":"@progress/kendo-angular-component-base"} | ||
{"__symbolic":"module","version":3,"metadata":{"TooltipDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[kendoTooltip]","exportAs":"kendoTooltip","providers":[{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService"},{"provide":{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"L10N_PREFIX"},"useValue":"kendo.tooltip"}]}]}],"members":{"direction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["attr.dir"]}]}],"filter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"showOn":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"showAfter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"callout":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"offset":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"collision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"TOOLTIP_SETTINGS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone"},{"__symbolic":"reference","module":"@progress/kendo-angular-popup","name":"PopupService"},{"__symbolic":"reference","module":"@progress/kendo-angular-l10n","name":"LocalizationService"},{"__symbolic":"reference","name":"TooltipSettings"}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_show":[{"__symbolic":"method"}],"_bindContent":[{"__symbolic":"method"}],"_hideElementTitle":[{"__symbolic":"method"}],"_openPopup":[{"__symbolic":"method"}],"_closePopup":[{"__symbolic":"method"}],"_onMouseOver":[{"__symbolic":"method"}],"_onMouseOut":[{"__symbolic":"method"}],"_verifyProperties":[{"__symbolic":"method"}]}},"TooltipModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[[{"__symbolic":"reference","name":"TooltipDirective"},{"__symbolic":"reference","name":"ɵa"}]],"entryComponents":[{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"@progress/kendo-angular-popup","name":"PopupModule"}],"exports":[[{"__symbolic":"reference","name":"TooltipDirective"},{"__symbolic":"reference","name":"ɵa"}]]}]}],"members":{}},"TooltipSettings":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{}},"TOOLTIP_SETTINGS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["kendo-ui-tooltip-settings"]},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"template":"\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 "}]}],"members":{"elementClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.k-tooltip"]}]}],"cssPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.position"]}]}],"tooltipWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.width.px"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltipHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["style.height.px"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"anchor":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"templateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"templateString":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"calloutPositionClass":[{"__symbolic":"method"}],"updateCalloutPosition":[{"__symbolic":"method"}]}}},"origins":{"TooltipDirective":"./tooltip/tooltip.directive","TooltipModule":"./tooltip.module","TooltipSettings":"./tooltip/tooltip.settings","TOOLTIP_SETTINGS":"./tooltip/tooltip.settings","ɵa":"./tooltip/tooltip.content.component"},"importAs":"@progress/kendo-angular-component-base"} |
@@ -29,4 +29,5 @@ /** | ||
* platformBrowserDynamic().bootstrapModule(AppModule); | ||
* ``` | ||
*/ | ||
export declare class TooltipModule { | ||
} |
@@ -36,2 +36,3 @@ import { NgModule } from '@angular/core'; | ||
* platformBrowserDynamic().bootstrapModule(AppModule); | ||
* ``` | ||
*/ | ||
@@ -38,0 +39,0 @@ export class TooltipModule { |
@@ -96,2 +96,4 @@ import { TemplateRef, OnDestroy, ElementRef, NgZone } from '@angular/core'; | ||
private dynamicRTLSubscription; | ||
private validPositions; | ||
private validShowOptions; | ||
constructor(tooltipWrapper: ElementRef, ngZone: NgZone, popupService: PopupService, localizationService: LocalizationService, settings: TooltipSettings); | ||
@@ -123,2 +125,3 @@ /** | ||
private _onMouseOut(e); | ||
private _verifyProperties(); | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Directive, Input, HostBinding, Optional, Inject, ElementRef, NgZone } from '@angular/core'; | ||
import { Directive, Input, HostBinding, Optional, Inject, ElementRef, NgZone, isDevMode } from '@angular/core'; | ||
import { take } from 'rxjs/operators/take'; | ||
@@ -8,3 +8,3 @@ import { fromEvent } from 'rxjs/observable/fromEvent'; | ||
import { TooltipContentComponent } from '../tooltip/tooltip.content.component'; | ||
import { align, closest, contains } from '../utils'; | ||
import { align, closest, contains, containsItem } from '../utils'; | ||
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n'; | ||
@@ -76,2 +76,4 @@ /** | ||
this.anchor = null; | ||
this.validPositions = ['top', 'bottom', 'right', 'left']; | ||
this.validShowOptions = ['hover', 'click', 'none']; | ||
this.direction = localizationService.rtl ? 'rtl' : 'ltr'; | ||
@@ -163,2 +165,3 @@ if (settings) { | ||
ngOnInit() { | ||
this._verifyProperties(); | ||
this.dynamicRTLSubscription = this.localizationService.changes | ||
@@ -277,2 +280,13 @@ .subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'); | ||
} | ||
_verifyProperties() { | ||
if (!isDevMode()) { | ||
return; | ||
} | ||
if (!containsItem(this.validPositions, this.position)) { | ||
throw new Error(`Invalid value provided for position property.The available options are 'top', 'bottom', 'left', or 'right'.`); | ||
} | ||
if (!containsItem(this.validShowOptions, this.showOn)) { | ||
throw new Error(`Invalid value provided for showOn property.The available options are 'hover', 'click', or 'none'.`); | ||
} | ||
} | ||
} | ||
@@ -279,0 +293,0 @@ TooltipDirective.decorators = [ |
@@ -18,1 +18,5 @@ import { Position } from './models/position.type'; | ||
export declare function getCenterOffset(item: any, dir: string, size: string): number; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare function containsItem(collection: any, item: any): boolean; |
@@ -68,1 +68,7 @@ /** | ||
} | ||
/** | ||
* @hidden | ||
*/ | ||
export function containsItem(collection, item) { | ||
return collection.indexOf(item) !== -1; | ||
} |
@@ -38,2 +38,3 @@ "use strict"; | ||
* platformBrowserDynamic().bootstrapModule(AppModule); | ||
* ``` | ||
*/ | ||
@@ -40,0 +41,0 @@ var TooltipModule = /** @class */ (function () { |
@@ -78,2 +78,4 @@ "use strict"; | ||
this.anchor = null; | ||
this.validPositions = ['top', 'bottom', 'right', 'left']; | ||
this.validShowOptions = ['hover', 'click', 'none']; | ||
this.direction = localizationService.rtl ? 'rtl' : 'ltr'; | ||
@@ -171,2 +173,3 @@ if (settings) { | ||
var _this = this; | ||
this._verifyProperties(); | ||
this.dynamicRTLSubscription = this.localizationService.changes | ||
@@ -291,2 +294,13 @@ .subscribe(function (_a) { | ||
}; | ||
TooltipDirective.prototype._verifyProperties = function () { | ||
if (!core_1.isDevMode()) { | ||
return; | ||
} | ||
if (!utils_1.containsItem(this.validPositions, this.position)) { | ||
throw new Error("Invalid value provided for position property.The available options are 'top', 'bottom', 'left', or 'right'."); | ||
} | ||
if (!utils_1.containsItem(this.validShowOptions, this.showOn)) { | ||
throw new Error("Invalid value provided for showOn property.The available options are 'hover', 'click', or 'none'."); | ||
} | ||
}; | ||
TooltipDirective.decorators = [ | ||
@@ -293,0 +307,0 @@ { type: core_1.Directive, args: [{ |
@@ -74,1 +74,8 @@ "use strict"; | ||
exports.getCenterOffset = getCenterOffset; | ||
/** | ||
* @hidden | ||
*/ | ||
function containsItem(collection, item) { | ||
return collection.indexOf(item) !== -1; | ||
} | ||
exports.containsItem = containsItem; |
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-angular-tooltip",["rxjs/operators/take","tslib","@angular/core","rxjs/observable/fromEvent","@progress/kendo-angular-popup","rxjs/operators","@progress/kendo-angular-l10n","@angular/common"],function(p){var o,i,n,r,s,a,u,l;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){s=e(t)},function(t){a=e(t)},function(t){u=e(t)},function(t){l=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(12);e.TooltipModule=n.TooltipModule;var r=o(8);e.TooltipSettings=r.TooltipSettings,e.TOOLTIP_SETTINGS=r.TOOLTIP_SETTINGS,function(t){for(var e in t)p(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),s=o(5),p=o(6),a=o(7),u=o(8),l=o(9),c=o(10),h=o(11),d=function(){function t(t,e,o,i,n){var r=this;this.tooltipWrapper=t,this.ngZone=e,this.popupService=o,this.localizationService=i,this.filter="[title]",this.position="top",this.showOn="hover",this.showAfter=100,this.callout=!0,this.offset=6,this.collision={horizontal:"fit",vertical:"flip"},this.anchor=null,this.direction=i.rtl?"rtl":"ltr",n&&(this.position=n.position,this.callout=n.callout,this.showOn=n.showOn),this.ngZone.runOutsideAngular(function(){var t=r.tooltipWrapper.nativeElement;r.anchorTitleSubscription=s.fromEvent(t,"mouseover").subscribe(function(t){if(""!==r.filter){var e=c.closest(t.target,r.filter);e&&r._hideElementTitle(e)}}),r.mouseOverSubscription=s.fromEvent(t,"mouseover").pipe(p.debounceTime(100)).subscribe(function(t){return r._onMouseOver(t)}),r.mouseOutSubscription=s.fromEvent(t,"mouseout").pipe(p.debounceTime(100)).subscribe(function(t){return r._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,o={nativeElement:t};if(this.anchor=t,"hover"===this.showOn){if(this.popupRef)return;clearTimeout(this.showTimeout),this.showTimeout=window.setTimeout(function(){return e._show(o)},this.showAfter)}else this._hideElementTitle(this.anchor),this._show(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._closePopup()},t.prototype.toggle=function(t,e){this.anchor!==t&&this.hide(),void 0===e&&(e=!this.popupRef),e?this.show(t):this.hide()},t.prototype.ngOnInit=function(){var o=this;this.dynamicRTLSubscription=this.localizationService.changes.subscribe(function(t){var e=t.rtl;return o.direction=e?"rtl":"ltr"})},t.prototype.ngOnDestroy=function(){this.hide(),this.template=null,this.anchorTitleSubscription.unsubscribe(),this.mouseOverSubscription.unsubscribe(),this.mouseOutSubscription.unsubscribe(),this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe(),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe(),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe()},t.prototype._show=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=t.instance;this.template?o.templateRef=this.template:o.templateString=this.anchor.getAttribute("data-title"),o.anchor=e,o.callout=this.callout,o.position=this.position,o.tooltipWidth=this.tooltipWidth,o.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 e=this,o=c.align(this.position,this.offset),i=o.anchorAlign,n=o.popupAlign,r=o.popupMargin;this.popupRef=this.popupService.open({anchor:t,anchorAlign:i,animate:!1,content:l.TooltipContentComponent,collision:this.collision,margin:r,popupAlign:n,popupClass:"k-popup-transparent"});var p=this.popupRef.content.instance;p.callout&&(this.popupPositionChangeSubscription=this.popupRef.popupPositionChange.subscribe(function(){return p.updateCalloutPosition(e.position)})),"hover"===this.showOn&&this.ngZone.runOutsideAngular(function(){var t=e.popupRef.popupElement;e.popupMouseOutSubscription=s.fromEvent(t,"mouseout").subscribe(function(t){return e._onMouseOut(t)})})},t.prototype._closePopup=function(){var t=this;this.popupRef&&(this.ngZone.run(function(){return t.popupRef.close()}),this.popupRef=null,this.popupPositionChangeSubscription.unsubscribe())},t.prototype._onMouseOver=function(t){if("hover"===this.showOn&&""!==this.filter){var e=c.closest(t.target,this.filter);e&&this.toggle(e,!0)}},t.prototype._onMouseOut=function(t){if("hover"===this.showOn){var e=this.popupRef&&this.popupRef.popupElement,o=t.relatedTarget;o&&c.contains(this.anchor,o)||o&&c.contains(e,o)||this.hide()}},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",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",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:[h.LocalizationService,{provide:h.L10N_PREFIX,useValue:"kendo.tooltip"}]}),i.__param(4,n.Optional()),i.__param(4,n.Inject(u.TOOLTIP_SETTINGS)),i.__metadata("design:paramtypes",[n.ElementRef,n.NgZone,a.PopupService,h.LocalizationService,u.TooltipSettings])],t)}();e.TooltipDirective=d},function(t,e){t.exports=i},function(t,e){t.exports=n},function(t,e){t.exports=o},function(t,e){t.exports=r},function(t,e){t.exports=a},function(t,e){t.exports=s},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(){this.callout=!0,this.position="top",this.showOn="hover"}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),l=o(10),r=function(){function t(t){this.content=t,this.tooltipWidth=null,this.tooltipHeight=null,this.callout=!0}return Object.defineProperty(t.prototype,"elementClass",{get:function(){return!0},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.updateCalloutPosition=function(t){var e=""+t=="top"||""+t=="bottom",o=e?"width":"height",i=e?"left":"top",n=e?"marginLeft":"marginTop",r=this.content.nativeElement.lastElementChild,p=r.getBoundingClientRect()[o],s=l.getCenterOffset(this.anchor,i,o),a=l.getCenterOffset(this.content,i,o);if(1<Math.abs(a-s)){var u=a-s+p/2;r.style[n]=-u+"px"}},i.__decorate([n.HostBinding("class.k-tooltip"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"elementClass",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.ElementRef)],t.prototype,"anchor",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-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";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.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;){if(o(i,e))return i;i=i.parentElement}},e.contains=function(t,e){return t&&t.contains(e)},e.getCenterOffset=function(t,e,o){var i=t.nativeElement.getBoundingClientRect();return i[e]+i[o]/2}},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(13),p=o(1),s=o(7),a=o(9),u=[p.TooltipDirective,a.TooltipContentComponent],l=[s.PopupModule],c=function(){function t(){}return t=i.__decorate([n.NgModule({declarations:[u],entryComponents:[a.TooltipContentComponent],imports:[r.CommonModule].concat(l),exports:[u]})],t)}();e.TooltipModule=c},function(t,e){t.exports=l}])}}}); | ||
System.register("@progress/kendo-angular-tooltip",["@angular/core","@angular/common","tslib","@progress/kendo-angular-popup","rxjs/operators/take","rxjs/operators","rxjs/observable/fromEvent","@progress/kendo-angular-l10n"],function(p){var o,i,n,r,s,a,u,l;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){s=e(t)},function(t){a=e(t)},function(t){u=e(t)},function(t){l=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(12);e.TooltipModule=n.TooltipModule;var r=o(8);e.TooltipSettings=r.TooltipSettings,e.TOOLTIP_SETTINGS=r.TOOLTIP_SETTINGS,function(t){for(var e in t)p(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),s=o(5),p=o(6),a=o(7),u=o(8),l=o(9),c=o(10),h=o(11),d=function(){function t(t,e,o,i,n){var r=this;this.tooltipWrapper=t,this.ngZone=e,this.popupService=o,this.localizationService=i,this.filter="[title]",this.position="top",this.showOn="hover",this.showAfter=100,this.callout=!0,this.offset=6,this.collision={horizontal:"fit",vertical:"flip"},this.anchor=null,this.validPositions=["top","bottom","right","left"],this.validShowOptions=["hover","click","none"],this.direction=i.rtl?"rtl":"ltr",n&&(this.position=n.position,this.callout=n.callout,this.showOn=n.showOn),this.ngZone.runOutsideAngular(function(){var t=r.tooltipWrapper.nativeElement;r.anchorTitleSubscription=s.fromEvent(t,"mouseover").subscribe(function(t){if(""!==r.filter){var e=c.closest(t.target,r.filter);e&&r._hideElementTitle(e)}}),r.mouseOverSubscription=s.fromEvent(t,"mouseover").pipe(p.debounceTime(100)).subscribe(function(t){return r._onMouseOver(t)}),r.mouseOutSubscription=s.fromEvent(t,"mouseout").pipe(p.debounceTime(100)).subscribe(function(t){return r._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,o={nativeElement:t};if(this.anchor=t,"hover"===this.showOn){if(this.popupRef)return;clearTimeout(this.showTimeout),this.showTimeout=window.setTimeout(function(){return e._show(o)},this.showAfter)}else this._hideElementTitle(this.anchor),this._show(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._closePopup()},t.prototype.toggle=function(t,e){this.anchor!==t&&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.ngOnDestroy=function(){this.hide(),this.template=null,this.anchorTitleSubscription.unsubscribe(),this.mouseOverSubscription.unsubscribe(),this.mouseOutSubscription.unsubscribe(),this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe(),this.popupPositionChangeSubscription&&this.popupPositionChangeSubscription.unsubscribe(),this.popupMouseOutSubscription&&this.popupMouseOutSubscription.unsubscribe()},t.prototype._show=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=t.instance;this.template?o.templateRef=this.template:o.templateString=this.anchor.getAttribute("data-title"),o.anchor=e,o.callout=this.callout,o.position=this.position,o.tooltipWidth=this.tooltipWidth,o.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 e=this,o=c.align(this.position,this.offset),i=o.anchorAlign,n=o.popupAlign,r=o.popupMargin;this.popupRef=this.popupService.open({anchor:t,anchorAlign:i,animate:!1,content:l.TooltipContentComponent,collision:this.collision,margin:r,popupAlign:n,popupClass:"k-popup-transparent"});var p=this.popupRef.content.instance;p.callout&&(this.popupPositionChangeSubscription=this.popupRef.popupPositionChange.subscribe(function(){return p.updateCalloutPosition(e.position)})),"hover"===this.showOn&&this.ngZone.runOutsideAngular(function(){var t=e.popupRef.popupElement;e.popupMouseOutSubscription=s.fromEvent(t,"mouseout").subscribe(function(t){return e._onMouseOut(t)})})},t.prototype._closePopup=function(){var t=this;this.popupRef&&(this.ngZone.run(function(){return t.popupRef.close()}),this.popupRef=null,this.popupPositionChangeSubscription.unsubscribe())},t.prototype._onMouseOver=function(t){if("hover"===this.showOn&&""!==this.filter){var e=c.closest(t.target,this.filter);e&&this.toggle(e,!0)}},t.prototype._onMouseOut=function(t){if("hover"===this.showOn){var e=this.popupRef&&this.popupRef.popupElement,o=t.relatedTarget;o&&c.contains(this.anchor,o)||o&&c.contains(e,o)||this.hide()}},t.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', 'click', 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",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",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:[h.LocalizationService,{provide:h.L10N_PREFIX,useValue:"kendo.tooltip"}]}),i.__param(4,n.Optional()),i.__param(4,n.Inject(u.TOOLTIP_SETTINGS)),i.__metadata("design:paramtypes",[n.ElementRef,n.NgZone,a.PopupService,h.LocalizationService,u.TooltipSettings])],t)}();e.TooltipDirective=d},function(t,e){t.exports=n},function(t,e){t.exports=o},function(t,e){t.exports=s},function(t,e){t.exports=u},function(t,e){t.exports=a},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(){this.callout=!0,this.position="top",this.showOn="hover"}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),l=o(10),r=function(){function t(t){this.content=t,this.tooltipWidth=null,this.tooltipHeight=null,this.callout=!0}return Object.defineProperty(t.prototype,"elementClass",{get:function(){return!0},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.updateCalloutPosition=function(t){var e=""+t=="top"||""+t=="bottom",o=e?"width":"height",i=e?"left":"top",n=e?"marginLeft":"marginTop",r=this.content.nativeElement.lastElementChild,p=r.getBoundingClientRect()[o],s=l.getCenterOffset(this.anchor,i,o),a=l.getCenterOffset(this.content,i,o);if(1<Math.abs(a-s)){var u=a-s+p/2;r.style[n]=-u+"px"}},i.__decorate([n.HostBinding("class.k-tooltip"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"elementClass",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.ElementRef)],t.prototype,"anchor",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-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";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.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;){if(o(i,e))return i;i=i.parentElement}},e.contains=function(t,e){return t&&t.contains(e)},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=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(2),n=o(3),r=o(13),p=o(1),s=o(7),a=o(9),u=[p.TooltipDirective,a.TooltipContentComponent],l=[s.PopupModule],c=function(){function t(){}return t=i.__decorate([n.NgModule({declarations:[u],entryComponents:[a.TooltipContentComponent],imports:[r.CommonModule].concat(l),exports:[u]})],t)}();e.TooltipModule=c},function(t,e){t.exports=i}])}}}); |
@@ -6,3 +6,3 @@ { | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
"version": "0.1.1-dev.201805010850", | ||
"version": "0.1.1-dev.201805020750", | ||
"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
154158
2505