@progress/kendo-angular-popup
Advanced tools
Comparing version 1.2.3-dev.201710121524 to 1.2.3
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-angular-popup",["tslib","@angular/core","@angular/common","rxjs/add/observable/fromEvent","rxjs/add/operator/auditTime","rxjs/Observable","@progress/kendo-popup-common","rxjs/add/observable/merge"],function(e){function t(t){for(var n in t)e(n,t[n])}function n(e){return e.__useDefault?e.default:e}var o,i,r,s,a,c,p,l;return{setters:[function(e){o=n(e)},function(e){i=n(e)},function(e){r=n(e)},function(e){s=n(e)},function(e){a=n(e)},function(e){c=n(e)},function(e){p=n(e)},function(e){l=n(e)}],execute:function(){!function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};t.m=e,t.c=n,t.p="",t(0)}([function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=o(1);n.PopupService=i.PopupService,n.POPUP_CONTAINER=i.POPUP_CONTAINER;var r=o(4);n.PopupComponent=r.PopupComponent;var s=o(16);n.PopupModule=s.PopupModule,t(n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(4);t.POPUP_CONTAINER=new i.InjectionToken("Popup Container");var s=function(){function e(e,t,n,o){this.applicationRef=e,this.componentFactoryResolver=t,this.injector=n,this.container=o}return Object.defineProperty(e.prototype,"rootViewContainer",{get:function(){var e=this.applicationRef.components||[];if(e[0])return e[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(e.prototype,"rootViewContainerNode",{get:function(){return this.container?this.container.nativeElement:this.getComponentRootNode(this.rootViewContainer)},enumerable:!0,configurable:!0}),e.prototype.open=function(e){void 0===e&&(e={});var t=this.contentFrom(e.content),n=t.component,o=t.nodes,i=this.appendPopup(o,e.appendTo),r=i.instance;return this.projectComponentInputs(i,e),i.changeDetectorRef.detectChanges(),n&&n.changeDetectorRef.detectChanges(),{close:function(){n?n.destroy():(i.instance.content=null,i.changeDetectorRef.detectChanges()),i.destroy()},content:n,popup:i,popupAnchorViewportLeave:r.anchorViewportLeave,popupClose:r.close,popupElement:this.getComponentRootNode(i),popupOpen:r.open}},e.prototype.appendPopup=function(e,t){var n=this.createComponent(r.PopupComponent,e,t);return t||this.rootViewContainerNode.appendChild(this.getComponentRootNode(n)),n},e.prototype.getComponentRootNode=function(e){return e.hostView.rootNodes[0]},e.prototype.getComponentFactory=function(e){return this.componentFactoryResolver.resolveComponentFactory(e)},e.prototype.createComponent=function(e,t,n){var o=this.getComponentFactory(e);if(n)return n.createComponent(o,void 0,this.injector,t);var i=o.create(this.injector,t);return this.applicationRef.attachView(i.hostView),i},e.prototype.projectComponentInputs=function(e,t){return Object.getOwnPropertyNames(t).filter(function(e){return"content"!==e||t.content instanceof i.TemplateRef}).map(function(n){e.instance[n]=t[n]}),e},e.prototype.contentFrom=function(e){if(!e||e instanceof i.TemplateRef)return{component:null,nodes:[[]]};var t=this.createComponent(e);return{component:t,nodes:[t?[t.location.nativeElement]:[]]}},e}();s=o.__decorate([i.Injectable(),o.__param(3,i.Inject(t.POPUP_CONTAINER)),o.__param(3,i.Optional()),o.__metadata("design:paramtypes",[i.ApplicationRef,i.ComponentFactoryResolver,i.Injector,i.ElementRef])],s),t.PopupService=s},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(5),s=n(6),a=n(9),c=n(10),p=n(14),l=n(8),u={left:-1e4,top:0},f="k-animation-container",d=function(){function e(e,t,n,o,r,s,a,c){this.container=e,this._alignService=t,this._domService=n,this._cdr=o,this._positionService=r,this._resizeService=s,this._scrollableService=a,this._renderer=c,this.animate=!0,this.anchorAlign={horizontal:"left",vertical:"bottom"},this.collision={horizontal:"fit",vertical:"flip"},this.popupAlign={horizontal:"left",vertical:"top"},this.positionMode="fixed",this.offset=u,this.anchorViewportLeave=new i.EventEmitter,this.close=new i.EventEmitter,this.open=new i.EventEmitter,this.direction="down",this.currentOffset=u,this.resolvedPromised=Promise.resolve(null),this._renderer.addClass(e.nativeElement,f),this.updateFixedClass()}return Object.defineProperty(e.prototype,"offsetLeft",{get:function(){return this.currentOffset.left},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsetTop",{get:function(){return this.currentOffset.top},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getZIndex",{get:function(){return this.anchor?this.hostZIndex:null},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this.reposition.bind(this);this._resizeService.subscribe(e),this._scrollableService.forElement(this.anchor||this.container).subscribe(this.onScroll.bind(this)),this.hostZIndex=this._domService.zIndex(this.anchor,this.container),this.updateFixedClass()},e.prototype.ngOnChanges=function(e){e.positionMode&&this.updateFixedClass()},e.prototype.ngAfterViewChecked=function(){var e=this;if(l.isDocumentAvailable()){var t=this.position(),n=t.flipped,o=t.offset,i=this.getDirection(n);(this.direction!==i||l.isDifferentOffset(this.currentOffset,o))&&this.resolvedPromised.then(function(){e.currentOffset=o,e.direction=i,e._cdr.markForCheck()})}},e.prototype.ngOnDestroy=function(){this.anchorViewportLeave.complete(),this.close.emit(),this.close.complete(),this._resizeService.unsubscribe(),this._scrollableService.unsubscribe()},e.prototype.triggerOpen=function(e){this._renderer.addClass(this.container.nativeElement,"k-animation-container-shown"),this.open.emit(),this.open.complete()},e.prototype.reposition=function(){if(l.isDocumentAvailable()){var e=this.position(),t=e.flipped,n=e.offset;this.direction=this.getDirection(t),this.currentOffset=n}},e.prototype.position=function(){var e=this._alignService.alignElement({anchor:this.anchor,anchorAlign:this.anchorAlign,element:this.container,elementAlign:this.popupAlign,offset:this.offset,positionMode:this.positionMode});return this._positionService.positionElement({anchor:this.anchor,anchorAlign:this.anchorAlign,collisions:this.collision,currentLocation:e,element:this.container,elementAlign:this.popupAlign,positionMode:this.positionMode})},e.prototype.getDirection=function(e){return this.animate?e?"up":"down":"none"},e.prototype.onScroll=function(e){e?this.reposition():this.anchorViewportLeave.emit()},e.prototype.updateFixedClass=function(){var e=this.container.nativeElement,t="fixed"===this.positionMode?"addClass":"removeClass";this._renderer[t](e,"k-animation-container-fixed")},e}();o.__decorate([i.Input(),o.__metadata("design:type",Boolean)],d.prototype,"animate",void 0),o.__decorate([i.Input(),o.__metadata("design:type",i.ElementRef)],d.prototype,"anchor",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"anchorAlign",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"collision",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"popupAlign",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"popupClass",void 0),o.__decorate([i.Input(),o.__metadata("design:type",String)],d.prototype,"positionMode",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"offset",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],d.prototype,"anchorViewportLeave",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],d.prototype,"close",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],d.prototype,"open",void 0),o.__decorate([i.HostBinding("style.left.px"),o.__metadata("design:type",Number),o.__metadata("design:paramtypes",[])],d.prototype,"offsetLeft",null),o.__decorate([i.HostBinding("style.top.px"),o.__metadata("design:type",Number),o.__metadata("design:paramtypes",[])],d.prototype,"offsetTop",null),o.__decorate([i.HostBinding("style.z-index"),o.__metadata("design:type",Number),o.__metadata("design:paramtypes",[])],d.prototype,"getZIndex",null),d=o.__decorate([i.Component({animations:[i.trigger("toggle",[i.transition("void => down, up => down",[i.style({transform:"translateY(-100%)"}),i.animate("0.1s ease-in",i.style({transform:"translateY(0)"}))]),i.transition("down => void",[i.style({transform:"translateY(0)"}),i.animate("0.1s ease-in",i.style({transform:"translateY(-100%)"}))]),i.transition("void => up, down => up",[i.style({transform:"translateY(100%)"}),i.animate("0.1s ease-in",i.style({transform:"translateY(0)"}))]),i.transition("up => void",[i.style({transform:"translateY(0)"}),i.animate("0.1s ease-in",i.style({transform:"translateY(100%)"}))])])],exportAs:"kendo-popup",providers:[r.AlignService,s.DOMService,a.PositionService,c.ResizeService,p.ScrollableService],selector:"kendo-popup",template:'\n <div class="k-popup" [ngClass]="popupClass" [@toggle]="direction" (@toggle.done)="triggerOpen($event)">\n <ng-content></ng-content>\n <ng-template [ngTemplateOutlet]="content" [ngIf]="content"></ng-template>\n </div>\n '}),o.__metadata("design:paramtypes",[i.ElementRef,r.AlignService,s.DOMService,i.ChangeDetectorRef,a.PositionService,c.ResizeService,p.ScrollableService,i.Renderer2])],d),t.PopupComponent=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(6),s=n(8),a=function(){function e(e){this._dom=e}return e.prototype.alignElement=function(e){var t=e.anchor,n=e.element,o=e.anchorAlign,i=e.elementAlign,r=e.offset,s="fixed"===e.positionMode||!this._dom.hasOffsetParent(n)?this.absoluteRect(t,n,r):this.relativeRect(t,n,r);return this._dom.align({anchorAlign:o,anchorRect:s,elementAlign:i,elementRect:this._dom.offset(n)})},e.prototype.absoluteRect=function(e,t,n){return this._dom.removeScroll(this._dom.addScroll(s.removeStackingOffset(s.eitherRect(this._dom.offset(e),n),this._dom.stackingElementOffset(t)),this._dom.stackingElementScroll(t)),this.elementScrollPosition(e,t))},e.prototype.elementScrollPosition=function(e,t){return e?{x:0,y:0}:this._dom.scrollPosition(t)},e.prototype.relativeRect=function(e,t,n){return s.eitherRect(this._dom.position(e,t),n)},e}();a=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[r.DOMService])],a),t.AlignService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(7),s=n(8),a=function(){function e(){}return e.prototype.addOffset=function(e,t){return{left:e.left+t.left,top:e.top+t.top}},e.prototype.align=function(e){return r.align(e)},e.prototype.boundingOffset=function(e){return r.boundingOffset(this.nativeElement(e))},e.prototype.getWindow=function(){return s.isWindowAvailable()?window:null},e.prototype.isBodyOffset=function(e){return r.isBodyOffset(this.nativeElement(e))},e.prototype.hasOffsetParent=function(e){return!!e&&!!this.nativeElement(e).offsetParent},e.prototype.offset=function(e){return e?r.offset(this.nativeElement(e)):null},e.prototype.staticOffset=function(e){if(!e)return null;var t=this.nativeElement(e),n=t.style,o=n.left,i=n.top;t.style.left="0px",t.style.top="0px";var s=r.offset(t);return t.style.left=o,t.style.top=i,s},e.prototype.nativeElement=function(e){return e?e.nativeElement||e:null},e.prototype.position=function(e,t){if(!e||!t)return null;var n=this.nativeElement(e),o=r.siblingContainer(n,this.nativeElement(t));return r.positionWithScroll(n,o)},e.prototype.relativeOffset=function(e,t){return r.applyLocationOffset(this.offset(e),t,this.isBodyOffset(e))},e.prototype.addScroll=function(e,t){return r.addScroll(e,t)},e.prototype.removeScroll=function(e,t){return r.removeScroll(e,t)},e.prototype.restrictToView=function(e){return r.restrictToView(e)},e.prototype.scrollPosition=function(e){return r.scrollPosition(this.nativeElement(e))},e.prototype.scrollableParents=function(e){return s.scrollableParents(this.nativeElement(e))},e.prototype.stackingElementOffset=function(e){var t=this.getRelativeContextElement(e);return t?r.offset(t):null},e.prototype.stackingElementScroll=function(e){var t=this.getRelativeContextElement(e);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}},e.prototype.stackingElementViewPort=function(e){var t=this.getRelativeContextElement(e);return t?{height:t.scrollHeight,width:t.scrollWidth}:null},e.prototype.getRelativeContextElement=function(e){if(!e||!s.HAS_RELATIVE_STACKING_CONTEXT)return null;for(var t=this.nativeElement(e).parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},e.prototype.useRelativePosition=function(e){return!!this.getRelativeContextElement(e)},e.prototype.windowViewPort=function(e){return r.getWindowViewPort(this.nativeElement(e))},e.prototype.zIndex=function(e,t){return s.zIndex(this.nativeElement(e),this.nativeElement(t))},e.prototype.zoomLevel=function(){return s.isDocumentAvailable()&&s.isWindowAvailable()?parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2)):1},e.prototype.isZoomed=function(){return this.zoomLevel()>1},e}();a=o.__decorate([i.Injectable()],a),t.DOMService=a},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(7);t.eitherRect=function(e,t){return e||{height:0,left:t.left,top:t.top,width:0}},t.replaceOffset=function(e,t){return t?{height:e.height,left:t.left,top:t.top,width:e.width}:e},t.removeStackingOffset=function(e,t){return t?{height:e.height,left:e.left-t.left,top:e.top-t.top,width:e.width}:e},t.isDifferentOffset=function(e,t){var n=e.left,o=e.top,i=t.left,r=t.top;return Math.abs(n-i)>=1||Math.abs(o-r)>=1},t.isDocumentAvailable=function(){return"undefined"!=typeof document&&!!document.body},t.isWindowAvailable=function(){return"undefined"!=typeof window},t.hasBoundingRect=function(e){return!!e.getBoundingClientRect},t.OVERFLOW_REGEXP=/auto|scroll/;var i=function(e){var t=window.getComputedStyle(e);return""+t.overflow+t.overflowX+t.overflowY};t.scrollableParents=function(e){var n=[];if(!t.isDocumentAvailable()||!t.isWindowAvailable())return n;for(var o=e.parentElement;o;)t.OVERFLOW_REGEXP.test(i(o))&&n.push(o),o=o.parentElement;return n.push(window),n},t.FRAME_DURATION=1e3/60,t.hasRelativeStackingContext=function(){if(!t.isDocumentAvailable())return!1;var e=document.createElement("div");e.style.transform="matrix(10, 0, 0, 10, 0, 0)",e.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(e);var n=10!==e.children[0].getBoundingClientRect().top;return document.body.removeChild(e),n},t.HAS_RELATIVE_STACKING_CONTEXT=t.hasRelativeStackingContext(),t.zIndex=function(e,n){if(!e||!t.isDocumentAvailable()||!t.isWindowAvailable())return null;var i=o.siblingContainer(e,n);if(!i)return null;var r=[e].concat(o.parents(e,i)).reduce(function(e,t){var n=t.style.zIndex||window.getComputedStyle(t).zIndex,o=parseInt(n,10);return o>e?o:e},0);return r?r+1:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(6),s=n(8),a=function(){function e(e){this._dom=e}return e.prototype.positionElement=function(e){var t=e.anchor,n=e.currentLocation,o=e.positionMode,i=e.element,r=e.anchorAlign,a=e.elementAlign,c=e.collisions,p=this._dom,l=e.viewPort||p.stackingElementViewPort(i)||p.windowViewPort(i),u=s.eitherRect(p.offset(t),n),f=s.replaceOffset(p.staticOffset(i),n),d=this.elementRect(i,f,o),m=p.restrictToView({anchorAlign:r,anchorRect:u,collisions:c,elementAlign:a,elementRect:d,viewPort:l});return{flipped:m.flipped,offset:p.addOffset(f,m.offset)}},e.prototype.elementRect=function(e,t,n){return"fixed"===n?t:this._dom.removeScroll(t,this._dom.scrollPosition(e))},e}();a=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[r.DOMService])],a),t.PositionService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(11);n(12),n(13);var s=n(8),a=n(6),c=function(){function e(e,t){this._dom=e,this._zone=t}return e.prototype.subscribe=function(e){var t=this;s.isDocumentAvailable()&&this._zone.runOutsideAngular(function(){t.subscription=r.Observable.fromEvent(t._dom.getWindow(),"resize").auditTime(s.FRAME_DURATION).subscribe(function(){return t._zone.run(function(){return e()})})})},e.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.isUnsubscribed=function(){return this.subscription&&this.subscription.closed},e}();c=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[a.DOMService,i.NgZone])],c),t.ResizeService=c},function(e,t){e.exports=c},function(e,t){e.exports=s},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(11);n(12),n(15),n(13);var s=n(6),a=n(8),c=function(){function e(e,t){this._dom=e,this._zone=t}return e.prototype.forElement=function(e){return this.unsubscribe(),this.element=e,this},e.prototype.subscribe=function(e){var t=this;if(e&&a.isDocumentAvailable()&&this.element){var n=this._dom.nativeElement(this.element),o=this._dom.scrollableParents(this.element);this._zone.runOutsideAngular(function(){var i=o.map(function(e){return r.Observable.fromEvent(e,"scroll").auditTime(a.FRAME_DURATION)});t.subscription=r.Observable.merge.apply(r.Observable,i).subscribe(function(o){return t._zone.run(function(){return e(t.isVisible(n,o.target))})})})}},e.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.isVisible=function(e,t){var n=this._dom.boundingOffset(e),o=this._dom.boundingOffset(t);return!(n.bottom<o.top)&&(!(n.bottom>o.bottom)&&(!(n.right>o.right)&&!(n.left<o.left)))},e}();c=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[s.DOMService,i.NgZone])],c),t.ScrollableService=c},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(17),s=n(4),a=n(1),c=[s.PopupComponent],p=function(){return function(){}}();p=o.__decorate([i.NgModule({declarations:[c],entryComponents:[c],exports:[c],imports:[r.CommonModule],providers:[a.PopupService]})],p),t.PopupModule=p},function(e,t){e.exports=r}])}}}); | ||
System.register("@progress/kendo-angular-popup",["tslib","@angular/core","@angular/common","rxjs/Observable","@progress/kendo-popup-common","rxjs/add/observable/fromEvent","rxjs/add/operator/auditTime","rxjs/add/observable/merge"],function(e){function t(t){for(var n in t)e(n,t[n])}function n(e){return e.__useDefault?e.default:e}var o,i,r,s,a,c,p,l;return{setters:[function(e){o=n(e)},function(e){i=n(e)},function(e){r=n(e)},function(e){s=n(e)},function(e){a=n(e)},function(e){c=n(e)},function(e){p=n(e)},function(e){l=n(e)}],execute:function(){!function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};t.m=e,t.c=n,t.p="",t(0)}([function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=o(1);n.PopupService=i.PopupService,n.POPUP_CONTAINER=i.POPUP_CONTAINER;var r=o(4);n.PopupComponent=r.PopupComponent;var s=o(16);n.PopupModule=s.PopupModule,t(n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(4);t.POPUP_CONTAINER=new i.InjectionToken("Popup Container");var s=function(){function e(e,t,n,o){this.applicationRef=e,this.componentFactoryResolver=t,this.injector=n,this.container=o}return Object.defineProperty(e.prototype,"rootViewContainer",{get:function(){var e=this.applicationRef.components||[];if(e[0])return e[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(e.prototype,"rootViewContainerNode",{get:function(){return this.container?this.container.nativeElement:this.getComponentRootNode(this.rootViewContainer)},enumerable:!0,configurable:!0}),e.prototype.open=function(e){void 0===e&&(e={});var t=this.contentFrom(e.content),n=t.component,o=t.nodes,i=this.appendPopup(o,e.appendTo),r=i.instance;return this.projectComponentInputs(i,e),i.changeDetectorRef.detectChanges(),n&&n.changeDetectorRef.detectChanges(),{close:function(){n?n.destroy():(i.instance.content=null,i.changeDetectorRef.detectChanges()),i.destroy()},content:n,popup:i,popupAnchorViewportLeave:r.anchorViewportLeave,popupClose:r.close,popupElement:this.getComponentRootNode(i),popupOpen:r.open}},e.prototype.appendPopup=function(e,t){var n=this.createComponent(r.PopupComponent,e,t);return t||this.rootViewContainerNode.appendChild(this.getComponentRootNode(n)),n},e.prototype.getComponentRootNode=function(e){return e.hostView.rootNodes[0]},e.prototype.getComponentFactory=function(e){return this.componentFactoryResolver.resolveComponentFactory(e)},e.prototype.createComponent=function(e,t,n){var o=this.getComponentFactory(e);if(n)return n.createComponent(o,void 0,this.injector,t);var i=o.create(this.injector,t);return this.applicationRef.attachView(i.hostView),i},e.prototype.projectComponentInputs=function(e,t){return Object.getOwnPropertyNames(t).filter(function(e){return"content"!==e||t.content instanceof i.TemplateRef}).map(function(n){e.instance[n]=t[n]}),e},e.prototype.contentFrom=function(e){if(!e||e instanceof i.TemplateRef)return{component:null,nodes:[[]]};var t=this.createComponent(e);return{component:t,nodes:[t?[t.location.nativeElement]:[]]}},e}();s=o.__decorate([i.Injectable(),o.__param(3,i.Inject(t.POPUP_CONTAINER)),o.__param(3,i.Optional()),o.__metadata("design:paramtypes",[i.ApplicationRef,i.ComponentFactoryResolver,i.Injector,i.ElementRef])],s),t.PopupService=s},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(5),s=n(6),a=n(9),c=n(10),p=n(14),l=n(8),u={left:-1e4,top:0},f="k-animation-container",d=function(){function e(e,t,n,o,r,s,a,c){this.container=e,this._alignService=t,this._domService=n,this._cdr=o,this._positionService=r,this._resizeService=s,this._scrollableService=a,this._renderer=c,this.animate=!0,this.anchorAlign={horizontal:"left",vertical:"bottom"},this.collision={horizontal:"fit",vertical:"flip"},this.popupAlign={horizontal:"left",vertical:"top"},this.positionMode="fixed",this.offset=u,this.anchorViewportLeave=new i.EventEmitter,this.close=new i.EventEmitter,this.open=new i.EventEmitter,this.direction="down",this.currentOffset=u,this.resolvedPromised=Promise.resolve(null),this._renderer.addClass(e.nativeElement,f),this.updateFixedClass()}return Object.defineProperty(e.prototype,"offsetLeft",{get:function(){return this.currentOffset.left},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsetTop",{get:function(){return this.currentOffset.top},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getZIndex",{get:function(){return this.anchor?this.hostZIndex:null},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this.reposition.bind(this);this._resizeService.subscribe(e),this._scrollableService.forElement(this.anchor||this.container).subscribe(this.onScroll.bind(this)),this.hostZIndex=this._domService.zIndex(this.anchor,this.container),this.updateFixedClass()},e.prototype.ngOnChanges=function(e){e.positionMode&&this.updateFixedClass()},e.prototype.ngAfterViewChecked=function(){var e=this;if(l.isDocumentAvailable()){var t=this.position(),n=t.flipped,o=t.offset,i=this.getDirection(n);(this.direction!==i||l.isDifferentOffset(this.currentOffset,o))&&this.resolvedPromised.then(function(){e.currentOffset=o,e.direction=i,e._cdr.markForCheck()})}},e.prototype.ngOnDestroy=function(){this.anchorViewportLeave.complete(),this.close.emit(),this.close.complete(),this._resizeService.unsubscribe(),this._scrollableService.unsubscribe()},e.prototype.triggerOpen=function(e){this._renderer.addClass(this.container.nativeElement,"k-animation-container-shown"),this.open.emit(),this.open.complete()},e.prototype.reposition=function(){if(l.isDocumentAvailable()){var e=this.position(),t=e.flipped,n=e.offset;this.direction=this.getDirection(t),this.currentOffset=n}},e.prototype.position=function(){var e=this._alignService.alignElement({anchor:this.anchor,anchorAlign:this.anchorAlign,element:this.container,elementAlign:this.popupAlign,offset:this.offset,positionMode:this.positionMode});return this._positionService.positionElement({anchor:this.anchor,anchorAlign:this.anchorAlign,collisions:this.collision,currentLocation:e,element:this.container,elementAlign:this.popupAlign,positionMode:this.positionMode})},e.prototype.getDirection=function(e){return this.animate?e?"up":"down":"none"},e.prototype.onScroll=function(e){e?this.reposition():this.anchorViewportLeave.emit()},e.prototype.updateFixedClass=function(){var e=this.container.nativeElement,t="fixed"===this.positionMode?"addClass":"removeClass";this._renderer[t](e,"k-animation-container-fixed")},e}();o.__decorate([i.Input(),o.__metadata("design:type",Boolean)],d.prototype,"animate",void 0),o.__decorate([i.Input(),o.__metadata("design:type",i.ElementRef)],d.prototype,"anchor",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"anchorAlign",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"collision",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"popupAlign",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"popupClass",void 0),o.__decorate([i.Input(),o.__metadata("design:type",String)],d.prototype,"positionMode",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"offset",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],d.prototype,"anchorViewportLeave",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],d.prototype,"close",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],d.prototype,"open",void 0),o.__decorate([i.HostBinding("style.left.px"),o.__metadata("design:type",Number),o.__metadata("design:paramtypes",[])],d.prototype,"offsetLeft",null),o.__decorate([i.HostBinding("style.top.px"),o.__metadata("design:type",Number),o.__metadata("design:paramtypes",[])],d.prototype,"offsetTop",null),o.__decorate([i.HostBinding("style.z-index"),o.__metadata("design:type",Number),o.__metadata("design:paramtypes",[])],d.prototype,"getZIndex",null),d=o.__decorate([i.Component({animations:[i.trigger("toggle",[i.transition("void => down, up => down",[i.style({transform:"translateY(-100%)"}),i.animate("0.1s ease-in",i.style({transform:"translateY(0)"}))]),i.transition("down => void",[i.style({transform:"translateY(0)"}),i.animate("0.1s ease-in",i.style({transform:"translateY(-100%)"}))]),i.transition("void => up, down => up",[i.style({transform:"translateY(100%)"}),i.animate("0.1s ease-in",i.style({transform:"translateY(0)"}))]),i.transition("up => void",[i.style({transform:"translateY(0)"}),i.animate("0.1s ease-in",i.style({transform:"translateY(100%)"}))])])],exportAs:"kendo-popup",providers:[r.AlignService,s.DOMService,a.PositionService,c.ResizeService,p.ScrollableService],selector:"kendo-popup",template:'\n <div class="k-popup" [ngClass]="popupClass" [@toggle]="direction" (@toggle.done)="triggerOpen($event)">\n <ng-content></ng-content>\n <ng-template [ngTemplateOutlet]="content" [ngIf]="content"></ng-template>\n </div>\n '}),o.__metadata("design:paramtypes",[i.ElementRef,r.AlignService,s.DOMService,i.ChangeDetectorRef,a.PositionService,c.ResizeService,p.ScrollableService,i.Renderer2])],d),t.PopupComponent=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(6),s=n(8),a=function(){function e(e){this._dom=e}return e.prototype.alignElement=function(e){var t=e.anchor,n=e.element,o=e.anchorAlign,i=e.elementAlign,r=e.offset,s="fixed"===e.positionMode||!this._dom.hasOffsetParent(n)?this.absoluteRect(t,n,r):this.relativeRect(t,n,r);return this._dom.align({anchorAlign:o,anchorRect:s,elementAlign:i,elementRect:this._dom.offset(n)})},e.prototype.absoluteRect=function(e,t,n){return this._dom.removeScroll(this._dom.addScroll(s.removeStackingOffset(s.eitherRect(this._dom.offset(e),n),this._dom.stackingElementOffset(t)),this._dom.stackingElementScroll(t)),this.elementScrollPosition(e,t))},e.prototype.elementScrollPosition=function(e,t){return e?{x:0,y:0}:this._dom.scrollPosition(t)},e.prototype.relativeRect=function(e,t,n){return s.eitherRect(this._dom.position(e,t),n)},e}();a=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[r.DOMService])],a),t.AlignService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(7),s=n(8),a=function(){function e(){}return e.prototype.addOffset=function(e,t){return{left:e.left+t.left,top:e.top+t.top}},e.prototype.align=function(e){return r.align(e)},e.prototype.boundingOffset=function(e){return r.boundingOffset(this.nativeElement(e))},e.prototype.getWindow=function(){return s.isWindowAvailable()?window:null},e.prototype.isBodyOffset=function(e){return r.isBodyOffset(this.nativeElement(e))},e.prototype.hasOffsetParent=function(e){return!!e&&!!this.nativeElement(e).offsetParent},e.prototype.offset=function(e){return e?r.offset(this.nativeElement(e)):null},e.prototype.staticOffset=function(e){if(!e)return null;var t=this.nativeElement(e),n=t.style,o=n.left,i=n.top;t.style.left="0px",t.style.top="0px";var s=r.offset(t);return t.style.left=o,t.style.top=i,s},e.prototype.nativeElement=function(e){return e?e.nativeElement||e:null},e.prototype.position=function(e,t){if(!e||!t)return null;var n=this.nativeElement(e),o=r.siblingContainer(n,this.nativeElement(t));return r.positionWithScroll(n,o)},e.prototype.relativeOffset=function(e,t){return r.applyLocationOffset(this.offset(e),t,this.isBodyOffset(e))},e.prototype.addScroll=function(e,t){return r.addScroll(e,t)},e.prototype.removeScroll=function(e,t){return r.removeScroll(e,t)},e.prototype.restrictToView=function(e){return r.restrictToView(e)},e.prototype.scrollPosition=function(e){return r.scrollPosition(this.nativeElement(e))},e.prototype.scrollableParents=function(e){return s.scrollableParents(this.nativeElement(e))},e.prototype.stackingElementOffset=function(e){var t=this.getRelativeContextElement(e);return t?r.offset(t):null},e.prototype.stackingElementScroll=function(e){var t=this.getRelativeContextElement(e);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}},e.prototype.stackingElementViewPort=function(e){var t=this.getRelativeContextElement(e);return t?{height:t.scrollHeight,width:t.scrollWidth}:null},e.prototype.getRelativeContextElement=function(e){if(!e||!s.HAS_RELATIVE_STACKING_CONTEXT)return null;for(var t=this.nativeElement(e).parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},e.prototype.useRelativePosition=function(e){return!!this.getRelativeContextElement(e)},e.prototype.windowViewPort=function(e){return r.getWindowViewPort(this.nativeElement(e))},e.prototype.zIndex=function(e,t){return s.zIndex(this.nativeElement(e),this.nativeElement(t))},e.prototype.zoomLevel=function(){return s.isDocumentAvailable()&&s.isWindowAvailable()?parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2)):1},e.prototype.isZoomed=function(){return this.zoomLevel()>1},e}();a=o.__decorate([i.Injectable()],a),t.DOMService=a},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(7);t.eitherRect=function(e,t){return e||{height:0,left:t.left,top:t.top,width:0}},t.replaceOffset=function(e,t){return t?{height:e.height,left:t.left,top:t.top,width:e.width}:e},t.removeStackingOffset=function(e,t){return t?{height:e.height,left:e.left-t.left,top:e.top-t.top,width:e.width}:e},t.isDifferentOffset=function(e,t){var n=e.left,o=e.top,i=t.left,r=t.top;return Math.abs(n-i)>=1||Math.abs(o-r)>=1},t.isDocumentAvailable=function(){return"undefined"!=typeof document&&!!document.body},t.isWindowAvailable=function(){return"undefined"!=typeof window},t.hasBoundingRect=function(e){return!!e.getBoundingClientRect},t.OVERFLOW_REGEXP=/auto|scroll/;var i=function(e){var t=window.getComputedStyle(e);return""+t.overflow+t.overflowX+t.overflowY};t.scrollableParents=function(e){var n=[];if(!t.isDocumentAvailable()||!t.isWindowAvailable())return n;for(var o=e.parentElement;o;)t.OVERFLOW_REGEXP.test(i(o))&&n.push(o),o=o.parentElement;return n.push(window),n},t.FRAME_DURATION=1e3/60,t.hasRelativeStackingContext=function(){if(!t.isDocumentAvailable())return!1;var e=document.createElement("div");e.style.transform="matrix(10, 0, 0, 10, 0, 0)",e.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(e);var n=10!==e.children[0].getBoundingClientRect().top;return document.body.removeChild(e),n},t.HAS_RELATIVE_STACKING_CONTEXT=t.hasRelativeStackingContext(),t.zIndex=function(e,n){if(!e||!t.isDocumentAvailable()||!t.isWindowAvailable())return null;var i=o.siblingContainer(e,n);if(!i)return null;var r=[e].concat(o.parents(e,i)).reduce(function(e,t){var n=t.style.zIndex||window.getComputedStyle(t).zIndex,o=parseInt(n,10);return o>e?o:e},0);return r?r+1:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(6),s=n(8),a=function(){function e(e){this._dom=e}return e.prototype.positionElement=function(e){var t=e.anchor,n=e.currentLocation,o=e.positionMode,i=e.element,r=e.anchorAlign,a=e.elementAlign,c=e.collisions,p=this._dom,l=e.viewPort||p.stackingElementViewPort(i)||p.windowViewPort(i),u=s.eitherRect(p.offset(t),n),f=s.replaceOffset(p.staticOffset(i),n),d=this.elementRect(i,f,o),m=p.restrictToView({anchorAlign:r,anchorRect:u,collisions:c,elementAlign:a,elementRect:d,viewPort:l});return{flipped:m.flipped,offset:p.addOffset(f,m.offset)}},e.prototype.elementRect=function(e,t,n){return"fixed"===n?t:this._dom.removeScroll(t,this._dom.scrollPosition(e))},e}();a=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[r.DOMService])],a),t.PositionService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(11);n(12),n(13);var s=n(8),a=n(6),c=function(){function e(e,t){this._dom=e,this._zone=t}return e.prototype.subscribe=function(e){var t=this;s.isDocumentAvailable()&&this._zone.runOutsideAngular(function(){t.subscription=r.Observable.fromEvent(t._dom.getWindow(),"resize").auditTime(s.FRAME_DURATION).subscribe(function(){return t._zone.run(function(){return e()})})})},e.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.isUnsubscribed=function(){return this.subscription&&this.subscription.closed},e}();c=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[a.DOMService,i.NgZone])],c),t.ResizeService=c},function(e,t){e.exports=s},function(e,t){e.exports=c},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(11);n(12),n(15),n(13);var s=n(6),a=n(8),c=function(){function e(e,t){this._dom=e,this._zone=t}return e.prototype.forElement=function(e){return this.unsubscribe(),this.element=e,this},e.prototype.subscribe=function(e){var t=this;if(e&&a.isDocumentAvailable()&&this.element){var n=this._dom.nativeElement(this.element),o=this._dom.scrollableParents(this.element);this._zone.runOutsideAngular(function(){var i=o.map(function(e){return r.Observable.fromEvent(e,"scroll").auditTime(a.FRAME_DURATION)});t.subscription=r.Observable.merge.apply(r.Observable,i).subscribe(function(o){return t._zone.run(function(){return e(t.isVisible(n,o.target))})})})}},e.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.isVisible=function(e,t){var n=this._dom.boundingOffset(e),o=this._dom.boundingOffset(t);return!(n.bottom<o.top)&&(!(n.bottom>o.bottom)&&(!(n.right>o.right)&&!(n.left<o.left)))},e}();c=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[s.DOMService,i.NgZone])],c),t.ScrollableService=c},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(17),s=n(4),a=n(1),c=[s.PopupComponent],p=function(){return function(){}}();p=o.__decorate([i.NgModule({declarations:[c],entryComponents:[c],exports:[c],imports:[r.CommonModule],providers:[a.PopupService]})],p),t.PopupModule=p},function(e,t){e.exports=r}])}}}); |
{ | ||
"name": "@progress/kendo-angular-popup", | ||
"description": "Kendo UI Angular 2 Popup component", | ||
"version": "1.2.3-dev.201710121524", | ||
"version": "1.2.3", | ||
"main": "dist/npm/main.js", | ||
@@ -6,0 +6,0 @@ "module": "dist/es/main.js", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2
315442
49