New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@progress/kendo-angular-popup

Package Overview
Dependencies
Maintainers
1
Versions
934
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 2.0.2-flatmeta.2 to 2.0.2

2

dist/systemjs/kendo-angular-popup.js

@@ -1,1 +0,1 @@

System.register("@progress/kendo-angular-popup",["tslib","@angular/core","rxjs/observable/fromPromise","@angular/common","rxjs/observable/fromEvent","@progress/kendo-popup-common","rxjs/operators/auditTime","rxjs/observable/merge"],function(t){var e,n,o,i,r,s,a,c;function p(t){return t.__useDefault?t.default:t}return{setters:[function(t){e=p(t)},function(t){n=p(t)},function(t){o=p(t)},function(t){i=p(t)},function(t){r=p(t)},function(t){s=p(t)},function(t){a=p(t)},function(t){c=p(t)}],execute:function(){!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=t,n.c=e,n.p="",n(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,function(e){for(var n in e)t(n,e[n])}(n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(4);e.POPUP_CONTAINER=new i.InjectionToken("Popup Container");var s=function(){function t(t,e,n,o){this.applicationRef=t,this.componentFactoryResolver=e,this.injector=n,this.container=o}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),n=e.component,o=e.nodes,i=this.appendPopup(o,t.appendTo),r=i.instance;return this.projectComponentInputs(i,t),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}},t.prototype.appendPopup=function(t,e){var n=this.createComponent(r.PopupComponent,t,e);return e||this.rootViewContainerNode.appendChild(this.getComponentRootNode(n)),n},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,n){var o=this.getComponentFactory(t);if(n)return n.createComponent(o,void 0,this.injector,e);var i=o.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 i.TemplateRef}).map(function(n){t.instance[n]=e[n]}),t},t.prototype.contentFrom=function(t){if(!t||t instanceof i.TemplateRef)return{component:null,nodes:[[]]};var e=this.createComponent(t);return{component:e,nodes:[e?[e.location.nativeElement]:[]]}},t=o.__decorate([i.Injectable(),o.__param(3,i.Inject(e.POPUP_CONTAINER)),o.__param(3,i.Optional()),o.__metadata("design:paramtypes",[i.ApplicationRef,i.ComponentFactoryResolver,i.Injector,i.ElementRef])],t)}();e.PopupService=s},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(5),s=n(6),a=n(7),c=n(10),p=n(11),l=n(14),u=n(9),f={left:-1e4,top:0},d="k-animation-container",h=function(){function t(t,e,n,o,r,s,a,c,p){this.container=t,this._alignService=e,this.domService=n,this._cdr=o,this._positionService=r,this._resizeService=s,this._scrollableService=a,this._renderer=c,this._zone=p,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=f,this.anchorViewportLeave=new i.EventEmitter,this.close=new i.EventEmitter,this.open=new i.EventEmitter,this.direction="down",this.resolvedPromise=Promise.resolve(null),this._renderer.addClass(t.nativeElement,d),this.updateFixedClass()}return t.prototype.ngOnInit=function(){this.repositionCallback=this.reposition.bind(this),this._resizeService.subscribe(this.repositionCallback),this._scrollableService.forElement(this.anchor||this.container).subscribe(this.onScroll.bind(this)),this.currentOffset=f,this.setZIndex(),this.copyFontStyles(),this.updateFixedClass()},t.prototype.ngOnChanges=function(t){t.copyAnchorStyles&&this.copyFontStyles(),t.positionMode&&this.updateFixedClass()},t.prototype.ngAfterViewInit=function(){this.reposition()},t.prototype.ngAfterViewChecked=function(){var t=this;this._zone.runOutsideAngular(function(){t.repositionSubscription&&t.repositionSubscription.unsubscribe(),t.repositionSubscription=r.fromPromise(t.resolvedPromise).subscribe(t.repositionCallback)})},t.prototype.ngOnDestroy=function(){this.anchorViewportLeave.complete(),this.close.emit(),this.close.complete(),this._resizeService.unsubscribe(),this._scrollableService.unsubscribe(),this.repositionSubscription&&this.repositionSubscription.unsubscribe()},t.prototype.triggerOpen=function(t){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._currentOffset&&!u.isDifferentOffset(this._currentOffset,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(){if(u.isDocumentAvailable()){var t=this.position(),e=t.flipped,n=t.offset,o=this.getDirection(e);this.currentOffset=n,this.direction!==o&&(this.direction=o,this._cdr.detectChanges())}},t.prototype.position=function(){var t=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:t,element:this.container,elementAlign:this.popupAlign})},t.prototype.getDirection=function(t){return this.animate?t?"up":"down":"none"},t.prototype.onScroll=function(t){var e=this,n=this.anchorViewportLeave.observers.length;t||!n?this.reposition():n&&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,"k-animation-container-fixed")},t.prototype.setContainerStyle=function(t,e){this._renderer.setStyle(this.container.nativeElement,t,e)},o.__decorate([i.Input(),o.__metadata("design:type",Boolean)],t.prototype,"animate",void 0),o.__decorate([i.Input(),o.__metadata("design:type",i.ElementRef)],t.prototype,"anchor",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],t.prototype,"anchorAlign",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],t.prototype,"collision",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],t.prototype,"popupAlign",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Boolean)],t.prototype,"copyAnchorStyles",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],t.prototype,"popupClass",void 0),o.__decorate([i.Input(),o.__metadata("design:type",String)],t.prototype,"positionMode",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],t.prototype,"offset",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],t.prototype,"anchorViewportLeave",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],t.prototype,"close",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],t.prototype,"open",void 0),t=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:[s.AlignService,a.DOMService,c.PositionService,p.ResizeService,l.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,s.AlignService,a.DOMService,i.ChangeDetectorRef,c.PositionService,p.ResizeService,l.ScrollableService,i.Renderer2,i.NgZone])],t)}();e.PopupComponent=h},function(t,e){t.exports=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(7),s=n(9),a=function(){function t(t){this._dom=t}return t.prototype.alignElement=function(t){var e=t.anchor,n=t.element,o=t.anchorAlign,i=t.elementAlign,r=t.offset,s="fixed"===t.positionMode||!this._dom.hasOffsetParent(n)?this.absoluteRect(e,n,r):this.relativeRect(e,n,r);return this._dom.align({anchorAlign:o,anchorRect:s,elementAlign:i,elementRect:this._dom.offset(n)})},t.prototype.absoluteRect=function(t,e,n){return this._dom.removeScroll(this._dom.addScroll(s.removeStackingOffset(s.eitherRect(this._dom.offset(t),n),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,n){return s.eitherRect(this._dom.position(t,e),n)},t=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[r.DOMService])],t)}();e.AlignService=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(8),s=n(9),a=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],c=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 r.addScroll(t,e)},t.prototype.align=function(t){return r.align(t)},t.prototype.boundingOffset=function(t){return r.boundingOffset(this.nativeElement(t))},t.prototype.getFontStyles=function(t){var e=this.getWindow();if(!e||!t)return[];var n=e.getComputedStyle(this.nativeElement(t));return a.map(function(t){return{key:t,value:n[t]}})},t.prototype.getWindow=function(){return s.isWindowAvailable()?window:null},t.prototype.hasOffsetParent=function(t){return!!t&&!!this.nativeElement(t).offsetParent},t.prototype.offset=function(t){return t?r.offset(this.nativeElement(t)):null},t.prototype.offsetAtPoint=function(t,e){if(!t)return null;var n=this.nativeElement(t),o=n.style,i=o.left,s=o.top;n.style.left=e.left+"px",n.style.top=e.top+"px";var a=r.offset(n);return n.style.left=i,n.style.top=s,a},t.prototype.nativeElement=function(t){return t?t.nativeElement||t:null},t.prototype.position=function(t,e){return t&&e?r.positionWithScroll(this.nativeElement(t),this.nativeElement(e)):null},t.prototype.removeScroll=function(t,e){return r.removeScroll(t,e)},t.prototype.restrictToView=function(t){return r.restrictToView(t)},t.prototype.scrollPosition=function(t){return r.scrollPosition(this.nativeElement(t))},t.prototype.scrollableParents=function(t){return s.scrollableParents(this.nativeElement(t))},t.prototype.stackingElementOffset=function(t){var e=this.getRelativeContextElement(t);return e?r.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||!s.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 r.getWindowViewPort(this.nativeElement(t))},t.prototype.zIndex=function(t,e){return s.zIndex(this.nativeElement(t),this.nativeElement(e))},t.prototype.zoomLevel=function(){return s.isDocumentAvailable()&&s.isWindowAvailable()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},t.prototype.isZoomed=function(){return this.zoomLevel()>1},t=o.__decorate([i.Injectable()],t)}();e.DOMService=c},function(t,e){t.exports=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(8);e.eitherRect=function(t,e){return t||{height:0,left:e.left,top:e.top,width:0}},e.replaceOffset=function(t,e){return e?{height:t.height,left:e.left,top:e.top,width:t.width}:t},e.removeStackingOffset=function(t,e){return e?{height:t.height,left:t.left-e.left,top:t.top-e.top,width:t.width}:t},e.isDifferentOffset=function(t,e){var n=t.left,o=t.top,i=e.left,r=e.top;return Math.abs(n-i)>=1||Math.abs(o-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""+(o=t).style.overflow+o.style.overflowX+o.style.overflowY||(e=t,""+(n=window.getComputedStyle(e)).overflow+n.overflowX+n.overflowY);var e,n,o};e.scrollableParents=function(t){var n=[];if(!e.isDocumentAvailable()||!e.isWindowAvailable())return n;for(var o=t.parentElement;o;)e.OVERFLOW_REGEXP.test(i(o))&&n.push(o),o=o.parentElement;return n.push(window),n},e.FRAME_DURATION=1e3/60,e.hasRelativeStackingContext=function(){if(!e.isDocumentAvailable())return!1;var t=document.createElement("div");t.style.transform="matrix(10, 0, 0, 10, 0, 0)",t.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(t);var n=10!==t.children[0].getBoundingClientRect().top;return document.body.removeChild(t),n},e.HAS_RELATIVE_STACKING_CONTEXT=e.hasRelativeStackingContext(),e.zIndex=function(t,n){if(!t||!e.isDocumentAvailable()||!e.isWindowAvailable())return null;var i=o.siblingContainer(t,n);if(!i)return null;var r=[t].concat(o.parents(t,i)).reduce(function(t,e){var n=e.style.zIndex||window.getComputedStyle(e).zIndex,o=parseInt(n,10);return o>t?o:t},0);return r?r+1:null}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(7),s=n(9),a=function(){function t(t){this._dom=t}return t.prototype.positionElement=function(t){var e=t.anchor,n=t.currentLocation,o=t.element,i=t.anchorAlign,r=t.elementAlign,a=t.collisions,c=this._dom,p=c.restrictToView({anchorAlign:i,anchorRect:s.eitherRect(c.offset(e),n),collisions:a,elementAlign:r,elementRect:c.offsetAtPoint(o,n),viewPort:t.viewPort||c.windowViewPort(o)});return{flipped:p.flipped,offset:c.addOffset(n,p.offset)}},t=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[r.DOMService])],t)}();e.PositionService=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(12),s=n(13),a=n(9),c=n(7),p=function(){function t(t,e){this._dom=t,this._zone=e}return t.prototype.subscribe=function(t){var e=this;a.isDocumentAvailable()&&this._zone.runOutsideAngular(function(){e.subscription=r.fromEvent(e._dom.getWindow(),"resize").pipe(s.auditTime(a.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=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[c.DOMService,i.NgZone])],t)}();e.ResizeService=p},function(t,e){t.exports=r},function(t,e){t.exports=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(12),s=n(15),a=n(13),c=n(7),p=n(9);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 n=this._dom.nativeElement(this.element),o=this._dom.scrollableParents(this.element);this._zone.runOutsideAngular(function(){var i=o.map(function(t){return r.fromEvent(t,"scroll").pipe(a.auditTime(p.FRAME_DURATION))});e.subscription=s.merge.apply(void 0,i).subscribe(function(o){t(e.isVisible(n,o.target))})})}},t.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.isVisible=function(t,n){var o=this._dom.boundingOffset(t),i=this._dom.boundingOffset(n);return!(i.top-o.bottom>e.THRESHOLD_DIFF)&&(!(i.bottom-o.bottom<-e.THRESHOLD_DIFF)&&(!(i.right-o.right<-e.THRESHOLD_DIFF)&&!(i.left-o.left>e.THRESHOLD_DIFF)))},t=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[c.DOMService,i.NgZone])],t)}();e.ScrollableService=l},function(t,e){t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(17),s=n(4),a=n(1),c=[s.PopupComponent],p=function(){function t(){}return t=o.__decorate([i.NgModule({declarations:[c],entryComponents:[c],exports:[c],imports:[r.CommonModule],providers:[a.PopupService]})],t)}();e.PopupModule=p},function(t,e){t.exports=i}])}}});
System.register("@progress/kendo-angular-popup",["tslib","rxjs/observable/fromPromise","@angular/core","@angular/common","@progress/kendo-popup-common","rxjs/observable/fromEvent","rxjs/operators/auditTime","rxjs/observable/merge"],function(t){var e,n,o,i,r,s,a,c;function p(t){return t.__useDefault?t.default:t}return{setters:[function(t){e=p(t)},function(t){n=p(t)},function(t){o=p(t)},function(t){i=p(t)},function(t){r=p(t)},function(t){s=p(t)},function(t){a=p(t)},function(t){c=p(t)}],execute:function(){!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=t,n.c=e,n.p="",n(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,function(e){for(var n in e)t(n,e[n])}(n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(4);e.POPUP_CONTAINER=new i.InjectionToken("Popup Container");var s=function(){function t(t,e,n,o){this.applicationRef=t,this.componentFactoryResolver=e,this.injector=n,this.container=o}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),n=e.component,o=e.nodes,i=this.appendPopup(o,t.appendTo),r=i.instance;return this.projectComponentInputs(i,t),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}},t.prototype.appendPopup=function(t,e){var n=this.createComponent(r.PopupComponent,t,e);return e||this.rootViewContainerNode.appendChild(this.getComponentRootNode(n)),n},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,n){var o=this.getComponentFactory(t);if(n)return n.createComponent(o,void 0,this.injector,e);var i=o.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 i.TemplateRef}).map(function(n){t.instance[n]=e[n]}),t},t.prototype.contentFrom=function(t){if(!t||t instanceof i.TemplateRef)return{component:null,nodes:[[]]};var e=this.createComponent(t);return{component:e,nodes:[e?[e.location.nativeElement]:[]]}},t=o.__decorate([i.Injectable(),o.__param(3,i.Inject(e.POPUP_CONTAINER)),o.__param(3,i.Optional()),o.__metadata("design:paramtypes",[i.ApplicationRef,i.ComponentFactoryResolver,i.Injector,i.ElementRef])],t)}();e.PopupService=s},function(t,n){t.exports=e},function(t,e){t.exports=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(5),s=n(6),a=n(7),c=n(10),p=n(11),l=n(14),u=n(9),f={left:-1e4,top:0},d="k-animation-container",h=function(){function t(t,e,n,o,r,s,a,c,p){this.container=t,this._alignService=e,this.domService=n,this._cdr=o,this._positionService=r,this._resizeService=s,this._scrollableService=a,this._renderer=c,this._zone=p,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=f,this.anchorViewportLeave=new i.EventEmitter,this.close=new i.EventEmitter,this.open=new i.EventEmitter,this.direction="down",this.resolvedPromise=Promise.resolve(null),this._renderer.addClass(t.nativeElement,d),this.updateFixedClass()}return t.prototype.ngOnInit=function(){this.repositionCallback=this.reposition.bind(this),this._resizeService.subscribe(this.repositionCallback),this._scrollableService.forElement(this.anchor||this.container).subscribe(this.onScroll.bind(this)),this.currentOffset=f,this.setZIndex(),this.copyFontStyles(),this.updateFixedClass()},t.prototype.ngOnChanges=function(t){t.copyAnchorStyles&&this.copyFontStyles(),t.positionMode&&this.updateFixedClass()},t.prototype.ngAfterViewInit=function(){this.reposition()},t.prototype.ngAfterViewChecked=function(){var t=this;this._zone.runOutsideAngular(function(){t.repositionSubscription&&t.repositionSubscription.unsubscribe(),t.repositionSubscription=r.fromPromise(t.resolvedPromise).subscribe(t.repositionCallback)})},t.prototype.ngOnDestroy=function(){this.anchorViewportLeave.complete(),this.close.emit(),this.close.complete(),this._resizeService.unsubscribe(),this._scrollableService.unsubscribe(),this.repositionSubscription&&this.repositionSubscription.unsubscribe()},t.prototype.triggerOpen=function(t){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._currentOffset&&!u.isDifferentOffset(this._currentOffset,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(){if(u.isDocumentAvailable()){var t=this.position(),e=t.flipped,n=t.offset,o=this.getDirection(e);this.currentOffset=n,this.direction!==o&&(this.direction=o,this._cdr.detectChanges())}},t.prototype.position=function(){var t=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:t,element:this.container,elementAlign:this.popupAlign})},t.prototype.getDirection=function(t){return this.animate?t?"up":"down":"none"},t.prototype.onScroll=function(t){var e=this,n=this.anchorViewportLeave.observers.length;t||!n?this.reposition():n&&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,"k-animation-container-fixed")},t.prototype.setContainerStyle=function(t,e){this._renderer.setStyle(this.container.nativeElement,t,e)},o.__decorate([i.Input(),o.__metadata("design:type",Boolean)],t.prototype,"animate",void 0),o.__decorate([i.Input(),o.__metadata("design:type",i.ElementRef)],t.prototype,"anchor",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],t.prototype,"anchorAlign",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],t.prototype,"collision",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],t.prototype,"popupAlign",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Boolean)],t.prototype,"copyAnchorStyles",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],t.prototype,"popupClass",void 0),o.__decorate([i.Input(),o.__metadata("design:type",String)],t.prototype,"positionMode",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],t.prototype,"offset",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],t.prototype,"anchorViewportLeave",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],t.prototype,"close",void 0),o.__decorate([i.Output(),o.__metadata("design:type",i.EventEmitter)],t.prototype,"open",void 0),t=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:[s.AlignService,a.DOMService,c.PositionService,p.ResizeService,l.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,s.AlignService,a.DOMService,i.ChangeDetectorRef,c.PositionService,p.ResizeService,l.ScrollableService,i.Renderer2,i.NgZone])],t)}();e.PopupComponent=h},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(7),s=n(9),a=function(){function t(t){this._dom=t}return t.prototype.alignElement=function(t){var e=t.anchor,n=t.element,o=t.anchorAlign,i=t.elementAlign,r=t.offset,s="fixed"===t.positionMode||!this._dom.hasOffsetParent(n)?this.absoluteRect(e,n,r):this.relativeRect(e,n,r);return this._dom.align({anchorAlign:o,anchorRect:s,elementAlign:i,elementRect:this._dom.offset(n)})},t.prototype.absoluteRect=function(t,e,n){return this._dom.removeScroll(this._dom.addScroll(s.removeStackingOffset(s.eitherRect(this._dom.offset(t),n),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,n){return s.eitherRect(this._dom.position(t,e),n)},t=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[r.DOMService])],t)}();e.AlignService=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(8),s=n(9),a=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],c=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 r.addScroll(t,e)},t.prototype.align=function(t){return r.align(t)},t.prototype.boundingOffset=function(t){return r.boundingOffset(this.nativeElement(t))},t.prototype.getFontStyles=function(t){var e=this.getWindow();if(!e||!t)return[];var n=e.getComputedStyle(this.nativeElement(t));return a.map(function(t){return{key:t,value:n[t]}})},t.prototype.getWindow=function(){return s.isWindowAvailable()?window:null},t.prototype.hasOffsetParent=function(t){return!!t&&!!this.nativeElement(t).offsetParent},t.prototype.offset=function(t){return t?r.offset(this.nativeElement(t)):null},t.prototype.offsetAtPoint=function(t,e){if(!t)return null;var n=this.nativeElement(t),o=n.style,i=o.left,s=o.top;n.style.left=e.left+"px",n.style.top=e.top+"px";var a=r.offset(n);return n.style.left=i,n.style.top=s,a},t.prototype.nativeElement=function(t){return t?t.nativeElement||t:null},t.prototype.position=function(t,e){return t&&e?r.positionWithScroll(this.nativeElement(t),this.nativeElement(e)):null},t.prototype.removeScroll=function(t,e){return r.removeScroll(t,e)},t.prototype.restrictToView=function(t){return r.restrictToView(t)},t.prototype.scrollPosition=function(t){return r.scrollPosition(this.nativeElement(t))},t.prototype.scrollableParents=function(t){return s.scrollableParents(this.nativeElement(t))},t.prototype.stackingElementOffset=function(t){var e=this.getRelativeContextElement(t);return e?r.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||!s.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 r.getWindowViewPort(this.nativeElement(t))},t.prototype.zIndex=function(t,e){return s.zIndex(this.nativeElement(t),this.nativeElement(e))},t.prototype.zoomLevel=function(){return s.isDocumentAvailable()&&s.isWindowAvailable()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},t.prototype.isZoomed=function(){return this.zoomLevel()>1},t=o.__decorate([i.Injectable()],t)}();e.DOMService=c},function(t,e){t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(8);e.eitherRect=function(t,e){return t||{height:0,left:e.left,top:e.top,width:0}},e.replaceOffset=function(t,e){return e?{height:t.height,left:e.left,top:e.top,width:t.width}:t},e.removeStackingOffset=function(t,e){return e?{height:t.height,left:t.left-e.left,top:t.top-e.top,width:t.width}:t},e.isDifferentOffset=function(t,e){var n=t.left,o=t.top,i=e.left,r=e.top;return Math.abs(n-i)>=1||Math.abs(o-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""+(o=t).style.overflow+o.style.overflowX+o.style.overflowY||(e=t,""+(n=window.getComputedStyle(e)).overflow+n.overflowX+n.overflowY);var e,n,o};e.scrollableParents=function(t){var n=[];if(!e.isDocumentAvailable()||!e.isWindowAvailable())return n;for(var o=t.parentElement;o;)e.OVERFLOW_REGEXP.test(i(o))&&n.push(o),o=o.parentElement;return n.push(window),n},e.FRAME_DURATION=1e3/60,e.hasRelativeStackingContext=function(){if(!e.isDocumentAvailable())return!1;var t=document.createElement("div");t.style.transform="matrix(10, 0, 0, 10, 0, 0)",t.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(t);var n=10!==t.children[0].getBoundingClientRect().top;return document.body.removeChild(t),n},e.HAS_RELATIVE_STACKING_CONTEXT=e.hasRelativeStackingContext(),e.zIndex=function(t,n){if(!t||!e.isDocumentAvailable()||!e.isWindowAvailable())return null;var i=o.siblingContainer(t,n);if(!i)return null;var r=[t].concat(o.parents(t,i)).reduce(function(t,e){var n=e.style.zIndex||window.getComputedStyle(e).zIndex,o=parseInt(n,10);return o>t?o:t},0);return r?r+1:null}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(7),s=n(9),a=function(){function t(t){this._dom=t}return t.prototype.positionElement=function(t){var e=t.anchor,n=t.currentLocation,o=t.element,i=t.anchorAlign,r=t.elementAlign,a=t.collisions,c=this._dom,p=c.restrictToView({anchorAlign:i,anchorRect:s.eitherRect(c.offset(e),n),collisions:a,elementAlign:r,elementRect:c.offsetAtPoint(o,n),viewPort:t.viewPort||c.windowViewPort(o)});return{flipped:p.flipped,offset:c.addOffset(n,p.offset)}},t=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[r.DOMService])],t)}();e.PositionService=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(12),s=n(13),a=n(9),c=n(7),p=function(){function t(t,e){this._dom=t,this._zone=e}return t.prototype.subscribe=function(t){var e=this;a.isDocumentAvailable()&&this._zone.runOutsideAngular(function(){e.subscription=r.fromEvent(e._dom.getWindow(),"resize").pipe(s.auditTime(a.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=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[c.DOMService,i.NgZone])],t)}();e.ResizeService=p},function(t,e){t.exports=s},function(t,e){t.exports=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(12),s=n(15),a=n(13),c=n(7),p=n(9);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 n=this._dom.nativeElement(this.element),o=this._dom.scrollableParents(this.element);this._zone.runOutsideAngular(function(){var i=o.map(function(t){return r.fromEvent(t,"scroll").pipe(a.auditTime(p.FRAME_DURATION))});e.subscription=s.merge.apply(void 0,i).subscribe(function(o){t(e.isVisible(n,o.target))})})}},t.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.isVisible=function(t,n){var o=this._dom.boundingOffset(t),i=this._dom.boundingOffset(n);return!(i.top-o.bottom>e.THRESHOLD_DIFF)&&(!(i.bottom-o.bottom<-e.THRESHOLD_DIFF)&&(!(i.right-o.right<-e.THRESHOLD_DIFF)&&!(i.left-o.left>e.THRESHOLD_DIFF)))},t=o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[c.DOMService,i.NgZone])],t)}();e.ScrollableService=l},function(t,e){t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(3),r=n(17),s=n(4),a=n(1),c=[s.PopupComponent],p=function(){function t(){}return t=o.__decorate([i.NgModule({declarations:[c],entryComponents:[c],exports:[c],imports:[r.CommonModule],providers:[a.PopupService]})],t)}();e.PopupModule=p},function(t,e){t.exports=i}])}}});

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

"license": "SEE LICENSE in LICENSE.md",
"version": "2.0.2-flatmeta.2",
"version": "2.0.2",
"main": "dist/npm/index.js",

@@ -127,2 +127,2 @@ "module": "dist/es/index.js",

}
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc