@progress/kendo-angular-popup 5.0.0-next.202204060712 → 5.0.1-dev.202210121049
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -5,14 +5,27 @@
|
|
|
5
5
|
## Kendo UI for Angular Popup Component
|
|
6
6
|
|
|
7
7
|
> **Important**
|
|
8
|
-
> * This package is part of [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup)—a commercial library.
|
|
8
|
+
> * This package is part of [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup)—a commercial library designed and built for developing business applications with Angular. Every UI component in the Kendo UI for Angular suite has been built from the ground-up specifically for Angular.
|
|
9
9
|
> * You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Angular My License page](https://www.telerik.com/kendo-angular-ui/my-license?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup).
|
|
10
10
|
> * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup). Doing so indicates that you [accept the Kendo UI for Angular License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup).
|
|
11
11
|
> * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular dev team!
|
|
12
12
|
>
|
|
13
13
|
> [Start using Kendo UI for Angular](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup) and speed up your development process!
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## Angular Popup Component
|
|
16
|
+
|
|
17
|
+
The Kendo UI for Angular Popup ovelays content next to a specific anchor HTML element. This Angular Popup component is build natively for Angular so you get the best possible performance and integration with other Angular components.
|
|
18
|
+
|
|
19
|
+
<img src="https://d585tldpucybw.cloudfront.net/sfimages/default-source/component-pages/angular/angular-popup-animations.gif" alt="Angulr PopupExample">
|
|
20
|
+
|
|
21
|
+
### Key Features
|
|
22
|
+
|
|
23
|
+
* [Animations](https://www.telerik.com/kendo-angular-ui/components/popup/animations/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup)—Customize the animation of the Popup and change its direction, type, and duration, or disable it.
|
|
24
|
+
* [Aligning and Positioning](https://www.telerik.com/kendo-angular-ui/components/popup/aligning-positioning/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup)—Align the Popup components to other components and absolute points as well as to control its position and render a margin according to a specific elements.
|
|
25
|
+
* [Document Scale](https://www.telerik.com/kendo-angular-ui/components/popup/document-scale/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup)—The Angular Popup provides configuration options for declaring the document scale so that it gets properly positioned.
|
|
26
|
+
* [Styling](https://www.telerik.com/kendo-angular-ui/components/popup/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup)—Customize the appearance of the host Popup element and the elements that hold its content as well as copy the anchor font styles of the content-holding element.
|
|
27
|
+
* [Viewport Boundary Detection](https://www.telerik.com/kendo-angular-ui/components/popup/viewport-boundary/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup)—Set the compponent's boundary detection functionality so that when it does not fit in the viewport, it will automatically change its position.
|
|
28
|
+
* [Angular Service](https://www.telerik.com/kendo-angular-ui/components/popup/service/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-popup)—Create Popup instances from TypeScript based on user interactions and without the need to define the component in a template.
|
|
16
29
|
|
|
17
30
|
## Resources
|
|
18
31
|
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-popup-common"),require("@progress/kendo-angular-common"),require("rxjs"),require("rxjs/operators"),require("@angular/animations"),require("@progress/kendo-licensing"),require("@angular/common")):"function"==typeof define&&define.amd?define("KendoAngularPopup",["exports","@angular/core","@progress/kendo-popup-common","@progress/kendo-angular-common","rxjs","rxjs/operators","@angular/animations","@progress/kendo-licensing","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularPopup={},e.ng.core,e.KendoPopupCommon,e.KendoAngularCommon,e.rxjs,e.rxjs.operators,e.ng.animations,e.KendoLicensing,e.ng.common)}(this,function(e,c,r,a,n,o,i,F,t){"use strict";function s(n){if(n&&n.__esModule)return n;var o=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),o.default=n,Object.freeze(o)}var p=s(c),l=s(a),T=s(i),u=s(t);Object.create;function M(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(o=r.next()).done;)s.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function N(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||((o=o||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}Object.create;function m(e,t){return e||{height:0,left:t.left,top:t.top,width:0}}function h(){return"undefined"!=typeof window}function L(e){var t=[];if(!a.isDocumentAvailable()||!h())return t;for(var n,o=e.parentElement;o;)(U.test(Z(n=o)||q(n))||o.hasAttribute("data-scrollable"))&&t.push(o),o=o.parentElement;return t.push(window),t}var U=/auto|scroll/,Z=function(e){return""+e.style.overflow+e.style.overflowX+e.style.overflowY},q=function(e){e=window.getComputedStyle(e);return""+e.overflow+e.overflowX+e.overflowY},K=1e3/60;function f(e,t){return e&&1!==t?{height:e.height/t,left:e.left/t,top:e.top/t,width:e.width/t}:e}d=!(W=function(){if(!a.isDocumentAvailable()&&null!==document.body)return!1;var e=document.createElement("div"),t=(e.style.transform="matrix(10, 0, 0, 10, 0, 0)",e.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(e),10!==e.children[0].getBoundingClientRect().top);return document.body.removeChild(e),t});var W,B,d,X=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return d||(B=W.apply(void 0,N([],M(e))),d=!0),B},y=new c.InjectionToken("Popup Document Scale"),Y=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],g=(v.prototype.addOffset=function(e,t){return{left:e.left+t.left,top:e.top+t.top}},v.prototype.addScroll=function(e,t){return r.addScroll(e,t)},v.prototype.align=function(e){return r.align(e)},v.prototype.boundingOffset=function(e){return r.boundingOffset(e)},v.prototype.getFontStyles=function(e){var t=this.getWindow();if(!t||!e)return[];var n=t.getComputedStyle(e);return Y.map(function(e){return{key:e,value:n[e]}})},v.prototype.getWindow=function(){return h()?window:null},v.prototype.hasOffsetParent=function(e){return!!e&&!!this.nativeElement(e).offsetParent},v.prototype.offset=function(e){return e?r.offset(e):null},v.prototype.offsetAtPoint=function(e,t){if(!e)return null;var e=this.nativeElement(e),n=e.style,o=n.left,i=n.top,n=n.transition,t=(e.style.transition="none",e.style.left=t.left+"px",e.style.top=t.top+"px",r.offset(e));return e.style.left=o,e.style.top=i,e.offsetHeight,e.style.transition=n,t},v.prototype.nativeElement=function(e){return e?e.nativeElement||e:null},v.prototype.position=function(e,t,n){return void 0===n&&(n=1),e&&t?r.positionWithScroll(e,this.nativeElement(t),n):null},v.prototype.removeScroll=function(e,t){return r.removeScroll(e,t)},v.prototype.restrictToView=function(e){return r.restrictToView(e)},v.prototype.scrollPosition=function(e){return r.scrollPosition(this.nativeElement(e))},v.prototype.scrollableParents=L,v.prototype.stackingElementOffset=function(e){e=this.getRelativeContextElement(e);return e?r.offset(e):null},v.prototype.stackingElementScroll=function(e){e=this.getRelativeContextElement(e);return e?{x:e.scrollLeft,y:e.scrollTop}:{x:0,y:0}},v.prototype.getRelativeContextElement=function(e){if(!e||!X())return null;for(var t=this.nativeElement(e).parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},v.prototype.useRelativePosition=function(e){return!!this.getRelativeContextElement(e)},v.prototype.windowViewPort=function(e){return r.getWindowViewPort(this.nativeElement(e))},v.prototype.zIndex=function(e,t){t=this.nativeElement(t);return e&&a.isDocumentAvailable()&&h()&&(t=r.siblingContainer(e,t))&&(e=[e].concat(r.parents(e,t)).reduce(function(e,t){t=t.style.zIndex||window.getComputedStyle(t).zIndex,t=parseInt(t,10);return e<t?t:e},0))?e+1:null},v.prototype.zoomLevel=function(){return a.isDocumentAvailable()&&h()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},v.prototype.isZoomed=function(){return 1<this.zoomLevel()},v);function v(){}g.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:g,deps:[],target:p.ɵɵFactoryTarget.Injectable}),g.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:g}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:g,decorators:[{type:c.Injectable}]});C.prototype.alignElement=function(e){var t=e.anchor,n=e.element,o=e.anchorAlign,i=e.elementAlign,r=e.margin,s=e.offset,e=e.positionMode,a=this.scale||1,e="fixed"===e||!this._dom.hasOffsetParent(n)?this.absoluteRect(t,n,s,a):this.relativeRect(t,n,s,a),t=f(this._dom.offset(n.nativeElement),a);return this._dom.align({anchorAlign:o,anchorRect:e,elementAlign:i,elementRect:t,margin:r})},C.prototype.absoluteRect=function(e,t,n,o){var i=this.elementScrollPosition(e,t),e=m(this._dom.offset(e),n),n=2*o,r=this._dom.stackingElementScroll(t),t=(1!==o&&r&&(r.x/=n,r.y/=n),this._dom.stackingElementOffset(t));return 1!==o&&t&&(t.left/=n,t.top/=n),this._dom.removeScroll(this._dom.addScroll((n=f(e,o),(e=t)?{height:n.height,left:n.left-e.left,top:n.top-e.top,width:n.width}:n),r),i)},C.prototype.elementScrollPosition=function(e,t){return e?{x:0,y:0}:this._dom.scrollPosition(t)},C.prototype.relativeRect=function(e,t,n,o){e=m(this._dom.position(e,t,o),n);return f(e,o)};var b=C;function C(e,t){void 0===t&&(t=1),this._dom=e,this.scale=t}b.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:b,deps:[{token:g},{token:y,optional:!0}],target:p.ɵɵFactoryTarget.Injectable}),b.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:b}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:b,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:g},{type:void 0,decorators:[{type:c.Inject,args:[y]},{type:c.Optional}]}]}});H.prototype.positionElement=function(e){var t=e.anchor,n=e.currentLocation,o=e.element,i=e.anchorAlign,r=e.elementAlign,s=e.collisions,a=e.margin,p=this._dom,c=this.scale||1,l=p.offsetAtPoint(o,n),l=f(l,c),t=f(p.offset(t),c),t=m(t,n),e=e.viewPort||p.windowViewPort(o),o=(e.width=e.width/c,e.height=e.height/c,p.restrictToView({anchorAlign:i,anchorRect:t,collisions:s,elementAlign:r,elementRect:l,margin:a,viewPort:e})),c=p.addOffset(n,o.offset);return{flip:o.flip,flipped:o.flipped,offset:c}};var w=H;function H(e,t){void 0===t&&(t=1),this._dom=e,this.scale=t}w.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:w,deps:[{token:g},{token:y,optional:!0}],target:p.ɵɵFactoryTarget.Injectable}),w.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:w}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:w,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:g},{type:void 0,decorators:[{type:c.Inject,args:[y]},{type:c.Optional}]}]}});S.prototype.subscribe=function(e){var t=this;a.isDocumentAvailable()&&this._zone.runOutsideAngular(function(){t.subscription=n.fromEvent(t._dom.getWindow(),"resize").pipe(o.auditTime(K)).subscribe(function(){return e()})})},S.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},S.prototype.isUnsubscribed=function(){return this.subscription&&this.subscription.closed};var I=S;function S(e,t){this._dom=e,this._zone=t}I.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:I,deps:[{token:g},{token:p.NgZone}],target:p.ɵɵFactoryTarget.Injectable}),I.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:I}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:I,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:g},{type:p.NgZone}]}});A.prototype.forElement=function(e){return this.unsubscribe(),this.element=e,this},A.prototype.subscribe=function(i){var r,s=this;i&&a.isDocumentAvailable()&&this.element&&(r=this._dom.scrollableParents(this.element),this._zone.runOutsideAngular(function(){var e=r.map(function(e){return n.fromEvent(e,"scroll").pipe(o.auditTime(K))});s.subscription=n.merge.apply(void 0,N([],M(e))).subscribe(function(e){var t=e.target,e=0<r.filter(function(e){return e===t}).length,n=t===document,o=t===window;(e||n||o)&&i(s.isVisible(s.element,t))})}))},A.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},A.prototype.isVisible=function(e,t){e=this._dom.boundingOffset(e),t=this._dom.boundingOffset(this._dom.nativeElement(t));return!(1<t.top-e.bottom)&&(!(1<e.top-t.bottom)&&(!(1<e.left-t.right)&&!(1<t.left-e.right)))};var E=A;function A(e,t){this._dom=e,this._zone=t}E.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:E,deps:[{token:g},{token:p.NgZone}],target:p.ɵɵFactoryTarget.Injectable}),E.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:E}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:E,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:g},{type:p.NgZone}]}});var k="left",O="right",P="down",G={expand:function(e){var t="up"===e||e===P?"scaleY":"scaleX",e=e===P?"top":e===k?O:e===O?k:"bottom";return{start:{transform:t+"(0)",transformOrigin:e},end:{transform:t+"(1)"}}},slide:function(e){var t=e===k||e===O?"translateX":"translateY";return{start:{transform:t+"("+(e===O||e===P?-100:100)+"%)"},end:{transform:t+"(0%)"}}},fade:function(){return{start:{opacity:0},end:{opacity:1}}},zoom:function(){return{start:{transform:"scale(0)"},end:{transform:"scale(1)"}}}},V=(_.prototype.play=function(e,t,n){if(!this.flip||this.flip.horizontal!==n.horizontal||this.flip.vertical!==n.vertical){this.flip=n;var o=t.type||"slide",i=G[o];if(i){i=i(this.getDirection(n,t));this.playStates(e,i,t)}else if(c.isDevMode())throw new Error('Unsupported animation type: "'+o+'". The supported types are slide, expand, fade and zoom.')}},_.prototype.ngOnDestroy=function(){this.stopPlayer()},_.prototype.playStates=function(e,t,n){var o=this,n=(this.stopPlayer(),n.duration||100),n=this.animationBuilder.build([i.style(t.start),i.animate(n+"ms ease-in",i.style(t.end))]),t=this.player=n.create(e);t.onDone(function(){o.end.emit(),o.stopPlayer()}),this.start.emit(),t.play()},_.prototype.getDirection=function(e,t){t=t.direction||P;return e.horizontal&&(t===k?t=O:t===O&&(t=k)),e.vertical&&(t===P?t="up":"up"===t&&(t=P)),t},_.prototype.stopPlayer=function(){this.player&&(this.player.destroy(),this.player=null)},_);function _(e){this.animationBuilder=e,this.start=new c.EventEmitter,this.end=new c.EventEmitter}V.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:V,deps:[{token:T.AnimationBuilder}],target:p.ɵɵFactoryTarget.Injectable}),V.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:V}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:V,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:T.AnimationBuilder}]}});var Q={name:"@progress/kendo-angular-popup",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649229078,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"},J={left:-1e4,top:0},j=(R.prototype.ngOnInit=function(){this.reposition=this.reposition.bind(this),this._resizeService.subscribe(this.reposition),this.animationSubscriptions=this.animationService.start.subscribe(this.onAnimationStart.bind(this)),this.animationSubscriptions.add(this.animationService.end.subscribe(this.onAnimationEnd.bind(this))),this._scrollableService.forElement(this.domService.nativeElement(this.anchor)||this.container.nativeElement).subscribe(this.onScroll.bind(this)),this.currentOffset=J,this.setZIndex(),this.copyFontStyles(),this.updateFixedClass(),this.reposition()},R.prototype.ngOnChanges=function(e){e.copyAnchorStyles&&this.copyFontStyles(),e.positionMode&&this.updateFixedClass()},R.prototype.ngAfterViewInit=function(){var e=this;this.animate||this.resolvedPromise.then(function(){e.onAnimationEnd()})},R.prototype.ngAfterViewChecked=function(){var e=this;this.initialCheck?this.initialCheck=!1:this._zone.runOutsideAngular(function(){e.unsubscribeReposition(),e.repositionSubscription=n.from(e.resolvedPromise).subscribe(e.reposition)})},R.prototype.ngOnDestroy=function(){this.anchorViewportLeave.complete(),this.positionChange.complete(),this.close.emit(),this.close.complete(),this._resizeService.unsubscribe(),this._scrollableService.unsubscribe(),this.animationSubscriptions.unsubscribe(),this.unsubscribeReposition()},R.prototype.onResize=function(){this.reposition()},R.prototype.onAnimationStart=function(){this._renderer.removeClass(this.container.nativeElement,"k-animation-container-shown")},R.prototype.onAnimationEnd=function(){this._renderer.addClass(this.container.nativeElement,"k-animation-container-shown"),this.open.emit(),this.open.complete()},Object.defineProperty(R.prototype,"currentOffset",{get:function(){return this._currentOffset},set:function(e){this.setContainerStyle("left",e.left+"px"),this.setContainerStyle("top",e.top+"px"),this._currentOffset=e},enumerable:!1,configurable:!0}),R.prototype.setZIndex=function(){this.anchor&&this.setContainerStyle("z-index",String(this.domService.zIndex(this.domService.nativeElement(this.anchor),this.container)))},R.prototype.reposition=function(){var e,t,n,o,i,r,s=this;a.isDocumentAvailable()&&(n=this.position(),e=n.flip,t=n.offset,(!this.currentOffset||(n=this.currentOffset,o=t,i=n.left,n=n.top,r=t.left,o=t.top,1<=Math.abs(i-r)||1<=Math.abs(n-o)))&&(this.currentOffset=t,a.hasObservers(this.positionChange)&&this._zone.run(function(){return s.positionChange.emit({offset:t,flip:e})})),this.animate&&this.animationService.play(this.contentContainer.nativeElement,this.animate,e),this.resizeSensor.acceptSize())},R.prototype.position=function(){var e=this._alignService.alignElement({anchor:this.domService.nativeElement(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.domService.nativeElement(this.anchor),anchorAlign:this.anchorAlign,collisions:this.collision,currentLocation:e,element:this.container,elementAlign:this.popupAlign,margin:this.margin})},R.prototype.onScroll=function(e){var t=this,n=a.hasObservers(this.anchorViewportLeave);e||!n?this.reposition():n&&this._zone.run(function(){t.anchorViewportLeave.emit()})},R.prototype.copyFontStyles=function(){var t=this;this.anchor&&this.copyAnchorStyles&&this.domService.getFontStyles(this.domService.nativeElement(this.anchor)).forEach(function(e){return t.setContainerStyle(e.key,e.value)})},R.prototype.updateFixedClass=function(){var e="fixed"===this.positionMode?"addClass":"removeClass";this._renderer[e](this.container.nativeElement,"k-animation-container-fixed")},R.prototype.setContainerStyle=function(e,t){this._renderer.setStyle(this.container.nativeElement,e,t)},R.prototype.unsubscribeReposition=function(){this.repositionSubscription&&this.repositionSubscription.unsubscribe()},R);function R(e,t,n,o,i,r,s,a,p){this.container=e,this._alignService=t,this.domService=n,this._positionService=o,this._resizeService=i,this._scrollableService=r,this.animationService=s,this._renderer=a,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=J,this.anchorViewportLeave=new c.EventEmitter,this.close=new c.EventEmitter,this.open=new c.EventEmitter,this.positionChange=new c.EventEmitter,this.resolvedPromise=Promise.resolve(null),this.initialCheck=!0,F.validatePackage(Q),this._renderer.addClass(e.nativeElement,"k-animation-container"),this.updateFixedClass()}j.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:j,deps:[{token:p.ElementRef},{token:b},{token:g},{token:w},{token:I},{token:E},{token:V},{token:p.Renderer2},{token:p.NgZone}],target:p.ɵɵFactoryTarget.Component}),j.ɵcmp=p.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:j,selector:"kendo-popup",inputs:{animate:"animate",anchor:"anchor",anchorAlign:"anchorAlign",collision:"collision",popupAlign:"popupAlign",copyAnchorStyles:"copyAnchorStyles",popupClass:"popupClass",positionMode:"positionMode",offset:"offset",margin:"margin"},outputs:{anchorViewportLeave:"anchorViewportLeave",close:"close",open:"open",positionChange:"positionChange"},providers:[b,V,g,w,I,E],viewQueries:[{propertyName:"contentContainer",first:!0,predicate:["container"],descendants:!0,static:!0},{propertyName:"resizeSensor",first:!0,predicate:a.ResizeSensorComponent,descendants:!0,static:!0}],exportAs:["kendo-popup"],usesOnChanges:!0,ngImport:p,template:'\n <div class="k-popup" [ngClass]="popupClass" #container>\n <ng-content></ng-content>\n <ng-template [ngTemplateOutlet]="content" [ngIf]="content"></ng-template>\n <kendo-resize-sensor [rateLimit]="100" (resize)="onResize()">\n </kendo-resize-sensor>\n </div>\n ',isInline:!0,components:[{type:l.ResizeSensorComponent,selector:"kendo-resize-sensor",inputs:["rateLimit"],outputs:["resize"]}],directives:[{type:u.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:u.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]},{type:u.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:j,decorators:[{type:c.Component,args:[{exportAs:"kendo-popup",providers:[b,V,g,w,I,E],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 <kendo-resize-sensor [rateLimit]="100" (resize)="onResize()">\n </kendo-resize-sensor>\n </div>\n '}]}],ctorParameters:function(){return[{type:p.ElementRef},{type:b},{type:g},{type:w},{type:I},{type:E},{type:V},{type:p.Renderer2},{type:p.NgZone}]},propDecorators:{animate:[{type:c.Input}],anchor:[{type:c.Input}],anchorAlign:[{type:c.Input}],collision:[{type:c.Input}],popupAlign:[{type:c.Input}],copyAnchorStyles:[{type:c.Input}],popupClass:[{type:c.Input}],positionMode:[{type:c.Input}],offset:[{type:c.Input}],margin:[{type:c.Input}],anchorViewportLeave:[{type:c.Output}],close:[{type:c.Output}],open:[{type:c.Output}],positionChange:[{type:c.Output}],contentContainer:[{type:c.ViewChild,args:["container",{static:!0}]}],resizeSensor:[{type:c.ViewChild,args:[a.ResizeSensorComponent,{static:!0}]}]}});var z=new c.InjectionToken("Popup Container"),l=(Object.defineProperty(D.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:!1,configurable:!0}),Object.defineProperty(D.prototype,"rootViewContainerNode",{get:function(){return this.container?this.container.nativeElement:this.getComponentRootNode(this.rootViewContainer)},enumerable:!1,configurable:!0}),D.prototype.open=function(e){var t=this.contentFrom((e=void 0===e?{}:e).content),n=t.component,t=t.nodes,o=this.appendPopup(t,e.appendTo),t=o.instance,i=(this.projectComponentInputs(o,e),o.changeDetectorRef.detectChanges(),n&&n.changeDetectorRef.detectChanges(),this.getComponentRootNode(o));return{close:function(){var e;n&&n.destroy(),o.destroy(),(e=i)&&e.parentNode&&e.parentNode.removeChild(e)},content:n,popup:o,popupAnchorViewportLeave:t.anchorViewportLeave,popupClose:t.close,popupElement:i,popupOpen:t.open,popupPositionChange:t.positionChange}},D.prototype.appendPopup=function(e,t){e=this.createComponent(j,e,t);return t||this.rootViewContainerNode.appendChild(this.getComponentRootNode(e)),e},D.prototype.getComponentRootNode=function(e){return e.location.nativeElement},D.prototype.getComponentFactory=function(e){return this.componentFactoryResolver.resolveComponentFactory(e)},D.prototype.createComponent=function(e,t,n){e=this.getComponentFactory(e);return n?n.createComponent(e,void 0,this.injector,t):(n=e.create(this.injector,t),this.applicationRef.attachView(n.hostView),n)},D.prototype.projectComponentInputs=function(t,n){return Object.getOwnPropertyNames(n).filter(function(e){return"content"!==e||n.content instanceof c.TemplateRef}).map(function(e){t.instance[e]=n[e]}),t},D.prototype.contentFrom=function(e){if(!e||e instanceof c.TemplateRef)return{component:null,nodes:[[]]};e=this.createComponent(e);return{component:e,nodes:[e?[e.location.nativeElement]:[]]}},D);function D(e,t,n,o){this.applicationRef=e,this.componentFactoryResolver=t,this.injector=n,this.container=o}l.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:l,deps:[{token:p.ApplicationRef},{token:p.ComponentFactoryResolver},{token:p.Injector},{token:z,optional:!0}],target:p.ɵɵFactoryTarget.Injectable}),l.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:l}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:l,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:p.ApplicationRef},{type:p.ComponentFactoryResolver},{type:p.Injector},{type:p.ElementRef,decorators:[{type:c.Inject,args:[z]},{type:c.Optional}]}]}});var u=[j],x=function(){};x.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:x,deps:[],target:p.ɵɵFactoryTarget.NgModule}),x.ɵmod=p.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:x,declarations:[j],imports:[t.CommonModule,a.ResizeSensorModule],exports:[j]}),x.ɵinj=p.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:x,providers:[l],imports:[[t.CommonModule,a.ResizeSensorModule]]}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:x,decorators:[{type:c.NgModule,args:[{declarations:[u],entryComponents:[u],exports:[u],imports:[t.CommonModule,a.ResizeSensorModule],providers:[l]}]}]}),e.POPUP_CONTAINER=z,e.PopupComponent=j,e.PopupModule=x,e.PopupService=l,e.SCALE=y,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
5
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-popup-common"),require("@progress/kendo-angular-common"),require("rxjs"),require("rxjs/operators"),require("@angular/animations"),require("@progress/kendo-licensing"),require("@angular/common")):"function"==typeof define&&define.amd?define("KendoAngularPopup",["exports","@angular/core","@progress/kendo-popup-common","@progress/kendo-angular-common","rxjs","rxjs/operators","@angular/animations","@progress/kendo-licensing","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularPopup={},e.ng.core,e.KendoPopupCommon,e.KendoAngularCommon,e.rxjs,e.rxjs.operators,e.ng.animations,e.KendoLicensing,e.ng.common)}(this,function(e,c,r,a,n,o,i,F,t){"use strict";function s(n){var o;return n&&n.__esModule?n:(o=Object.create(null),n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),o.default=n,Object.freeze(o))}var p=s(c),l=s(a),T=s(i),u=s(t);Object.create;function M(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(o=r.next()).done;)s.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function N(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||((o=o||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}Object.create;function m(e,t){return e||{height:0,left:t.left,top:t.top,width:0}}function h(){return"undefined"!=typeof window}function L(e){var t=[];if(a.isDocumentAvailable()&&h()){for(var n,o=e.parentElement;o;)(U.test(Z(n=o)||q(n))||o.hasAttribute("data-scrollable"))&&t.push(o),o=o.parentElement;t.push(window)}return t}var U=/auto|scroll/,Z=function(e){return""+e.style.overflow+e.style.overflowX+e.style.overflowY},q=function(e){e=window.getComputedStyle(e);return""+e.overflow+e.overflowX+e.overflowY};function f(e,t){return e&&1!==t?{height:e.height/t,left:e.left/t,top:e.top/t,width:e.width/t}:e}d=!(K=function(){var e,t;return!(!a.isDocumentAvailable()&&null!==document.body)&&((e=document.createElement("div")).style.transform="matrix(10, 0, 0, 10, 0, 0)",e.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(e),t=10!==e.children[0].getBoundingClientRect().top,document.body.removeChild(e),t)});var K,W,d,B=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return d||(W=K.apply(void 0,N([],M(e))),d=!0),W},y=new c.InjectionToken("Popup Document Scale"),X=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],g=(v.prototype.addOffset=function(e,t){return{left:e.left+t.left,top:e.top+t.top}},v.prototype.addScroll=function(e,t){return r.addScroll(e,t)},v.prototype.align=function(e){return r.align(e)},v.prototype.boundingOffset=function(e){return r.boundingOffset(e)},v.prototype.getFontStyles=function(e){var t,n=this.getWindow();return n&&e?(t=n.getComputedStyle(e),X.map(function(e){return{key:e,value:t[e]}})):[]},v.prototype.getWindow=function(){return h()?window:null},v.prototype.hasOffsetParent=function(e){return!!e&&!!this.nativeElement(e).offsetParent},v.prototype.offset=function(e){return e?r.offset(e):null},v.prototype.offsetAtPoint=function(e,t){var n,o,i;return e?(n=(i=(e=this.nativeElement(e)).style).left,o=i.top,i=i.transition,e.style.transition="none",e.style.left=t.left+"px",e.style.top=t.top+"px",t=r.offset(e),e.style.left=n,e.style.top=o,e.offsetHeight,e.style.transition=i,t):null},v.prototype.nativeElement=function(e){return e?e.nativeElement||e:null},v.prototype.position=function(e,t,n){return void 0===n&&(n=1),e&&t?r.positionWithScroll(e,this.nativeElement(t),n):null},v.prototype.removeScroll=function(e,t){return r.removeScroll(e,t)},v.prototype.restrictToView=function(e){return r.restrictToView(e)},v.prototype.scrollPosition=function(e){return r.scrollPosition(this.nativeElement(e))},v.prototype.scrollableParents=L,v.prototype.stackingElementOffset=function(e){e=this.getRelativeContextElement(e);return e?r.offset(e):null},v.prototype.stackingElementScroll=function(e){e=this.getRelativeContextElement(e);return e?{x:e.scrollLeft,y:e.scrollTop}:{x:0,y:0}},v.prototype.getRelativeContextElement=function(e){if(e&&B())for(var t=this.nativeElement(e).parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},v.prototype.useRelativePosition=function(e){return!!this.getRelativeContextElement(e)},v.prototype.windowViewPort=function(e){return r.getWindowViewPort(this.nativeElement(e))},v.prototype.zIndex=function(e,t){return e=e,t=this.nativeElement(t),e&&a.isDocumentAvailable()&&h()&&(t=r.siblingContainer(e,t))&&(e=[e].concat(r.parents(e,t)).reduce(function(e,t){t=t.style.zIndex||window.getComputedStyle(t).zIndex,t=parseInt(t,10);return e<t?t:e},0))?e+1:null},v.prototype.zoomLevel=function(){return a.isDocumentAvailable()&&h()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},v.prototype.isZoomed=function(){return 1<this.zoomLevel()},v);function v(){}g.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:g,deps:[],target:p.ɵɵFactoryTarget.Injectable}),g.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:g}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:g,decorators:[{type:c.Injectable}]});C.prototype.alignElement=function(e){var t=e.anchor,n=e.element,o=e.anchorAlign,i=e.elementAlign,r=e.margin,s=e.offset,e=e.positionMode,a=this.scale||1,e="fixed"===e||!this._dom.hasOffsetParent(n)?this.absoluteRect(t,n,s,a):this.relativeRect(t,n,s,a),t=f(this._dom.offset(n.nativeElement),a);return this._dom.align({anchorAlign:o,anchorRect:e,elementAlign:i,elementRect:t,margin:r})},C.prototype.absoluteRect=function(e,t,n,o){var i=this.elementScrollPosition(e,t),e=m(this._dom.offset(e),n),n=2*o,r=this._dom.stackingElementScroll(t),t=(1!==o&&r&&(r.x/=n,r.y/=n),this._dom.stackingElementOffset(t));return 1!==o&&t&&(t.left/=n,t.top/=n),this._dom.removeScroll(this._dom.addScroll((n=f(e,o),(e=t)?{height:n.height,left:n.left-e.left,top:n.top-e.top,width:n.width}:n),r),i)},C.prototype.elementScrollPosition=function(e,t){return e?{x:0,y:0}:this._dom.scrollPosition(t)},C.prototype.relativeRect=function(e,t,n,o){e=m(this._dom.position(e,t,o),n);return f(e,o)};var b=C;function C(e,t){void 0===t&&(t=1),this._dom=e,this.scale=t}b.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:b,deps:[{token:g},{token:y,optional:!0}],target:p.ɵɵFactoryTarget.Injectable}),b.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:b}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:b,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:g},{type:void 0,decorators:[{type:c.Inject,args:[y]},{type:c.Optional}]}]}});Y.prototype.positionElement=function(e){var t=e.anchor,n=e.currentLocation,o=e.element,i=e.anchorAlign,r=e.elementAlign,s=e.collisions,a=e.margin,p=this._dom,c=this.scale||1,l=p.offsetAtPoint(o,n),l=f(l,c),t=f(p.offset(t),c),t=m(t,n),e=e.viewPort||p.windowViewPort(o),o=(e.width=e.width/c,e.height=e.height/c,p.restrictToView({anchorAlign:i,anchorRect:t,collisions:s,elementAlign:r,elementRect:l,margin:a,viewPort:e})),c=p.addOffset(n,o.offset);return{flip:o.flip,flipped:o.flipped,offset:c}};var w=Y;function Y(e,t){void 0===t&&(t=1),this._dom=e,this.scale=t}w.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:w,deps:[{token:g},{token:y,optional:!0}],target:p.ɵɵFactoryTarget.Injectable}),w.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:w}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:w,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:g},{type:void 0,decorators:[{type:c.Inject,args:[y]},{type:c.Optional}]}]}});S.prototype.subscribe=function(e){var t=this;a.isDocumentAvailable()&&this._zone.runOutsideAngular(function(){t.subscription=n.fromEvent(t._dom.getWindow(),"resize").pipe(o.auditTime(1e3/60)).subscribe(function(){return e()})})},S.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},S.prototype.isUnsubscribed=function(){return this.subscription&&this.subscription.closed};var I=S;function S(e,t){this._dom=e,this._zone=t}I.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:I,deps:[{token:g},{token:p.NgZone}],target:p.ɵɵFactoryTarget.Injectable}),I.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:I}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:I,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:g},{type:p.NgZone}]}});A.prototype.forElement=function(e){return this.unsubscribe(),this.element=e,this},A.prototype.subscribe=function(i){var r,s=this;i&&a.isDocumentAvailable()&&this.element&&(r=this._dom.scrollableParents(this.element),this._zone.runOutsideAngular(function(){var e=r.map(function(e){return n.fromEvent(e,"scroll").pipe(o.auditTime(1e3/60))});s.subscription=n.merge.apply(void 0,N([],M(e))).subscribe(function(e){var t=e.target,e=0<r.filter(function(e){return e===t}).length,n=t===document,o=t===window;(e||n||o)&&i(s.isVisible(s.element,t))})}))},A.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},A.prototype.isVisible=function(e,t){e=this._dom.boundingOffset(e),t=this._dom.boundingOffset(this._dom.nativeElement(t));return!(1<t.top-e.bottom)&&(!(1<e.top-t.bottom)&&(!(1<e.left-t.right)&&!(1<t.left-e.right)))};var E=A;function A(e,t){this._dom=e,this._zone=t}E.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:E,deps:[{token:g},{token:p.NgZone}],target:p.ɵɵFactoryTarget.Injectable}),E.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:E}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:E,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:g},{type:p.NgZone}]}});var k="left",O="right",P="down",H={expand:function(e){var t="up"===e||e===P?"scaleY":"scaleX",e=e===P?"top":e===k?O:e===O?k:"bottom";return{start:{transform:t+"(0)",transformOrigin:e},end:{transform:t+"(1)"}}},slide:function(e){var t=e===k||e===O?"translateX":"translateY";return{start:{transform:t+"("+(e===O||e===P?-100:100)+"%)"},end:{transform:t+"(0%)"}}},fade:function(){return{start:{opacity:0},end:{opacity:1}}},zoom:function(){return{start:{transform:"scale(0)"},end:{transform:"scale(1)"}}}},V=(_.prototype.play=function(e,t,n){if(!this.flip||this.flip.horizontal!==n.horizontal||this.flip.vertical!==n.vertical){this.flip=n;var o=t.type||"slide",i=H[o];if(i){i=i(this.getDirection(n,t));this.playStates(e,i,t)}else if(c.isDevMode())throw new Error('Unsupported animation type: "'+o+'". The supported types are slide, expand, fade and zoom.')}},_.prototype.ngOnDestroy=function(){this.stopPlayer()},_.prototype.playStates=function(e,t,n){var o=this,n=(this.stopPlayer(),n.duration||100),n=this.animationBuilder.build([i.style(t.start),i.animate(n+"ms ease-in",i.style(t.end))]),t=this.player=n.create(e);t.onDone(function(){o.end.emit(),o.stopPlayer()}),this.start.emit(),t.play()},_.prototype.getDirection=function(e,t){t=t.direction||P;return e.horizontal&&(t===k?t=O:t===O&&(t=k)),e.vertical&&(t===P?t="up":"up"===t&&(t=P)),t},_.prototype.stopPlayer=function(){this.player&&(this.player.destroy(),this.player=null)},_);function _(e){this.animationBuilder=e,this.start=new c.EventEmitter,this.end=new c.EventEmitter}V.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:V,deps:[{token:T.AnimationBuilder}],target:p.ɵɵFactoryTarget.Injectable}),V.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:V}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:V,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:T.AnimationBuilder}]}});var G={name:"@progress/kendo-angular-popup",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1665571768,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"},Q={left:-1e4,top:0},j=(R.prototype.ngOnInit=function(){this.reposition=this.reposition.bind(this),this._resizeService.subscribe(this.reposition),this.animationSubscriptions=this.animationService.start.subscribe(this.onAnimationStart.bind(this)),this.animationSubscriptions.add(this.animationService.end.subscribe(this.onAnimationEnd.bind(this))),this._scrollableService.forElement(this.domService.nativeElement(this.anchor)||this.container.nativeElement).subscribe(this.onScroll.bind(this)),this.currentOffset=Q,this.setZIndex(),this.copyFontStyles(),this.updateFixedClass(),this.reposition()},R.prototype.ngOnChanges=function(e){e.copyAnchorStyles&&this.copyFontStyles(),e.positionMode&&this.updateFixedClass()},R.prototype.ngAfterViewInit=function(){var e=this;this.animate||this.resolvedPromise.then(function(){e.onAnimationEnd()})},R.prototype.ngAfterViewChecked=function(){var e=this;this.initialCheck?this.initialCheck=!1:this._zone.runOutsideAngular(function(){e.unsubscribeReposition(),e.repositionSubscription=n.from(e.resolvedPromise).subscribe(e.reposition)})},R.prototype.ngOnDestroy=function(){this.anchorViewportLeave.complete(),this.positionChange.complete(),this.close.emit(),this.close.complete(),this._resizeService.unsubscribe(),this._scrollableService.unsubscribe(),this.animationSubscriptions.unsubscribe(),this.unsubscribeReposition()},R.prototype.onResize=function(){this.reposition()},R.prototype.onAnimationStart=function(){this._renderer.removeClass(this.container.nativeElement,"k-animation-container-shown")},R.prototype.onAnimationEnd=function(){this._renderer.addClass(this.container.nativeElement,"k-animation-container-shown"),this.open.emit(),this.open.complete()},Object.defineProperty(R.prototype,"currentOffset",{get:function(){return this._currentOffset},set:function(e){this.setContainerStyle("left",e.left+"px"),this.setContainerStyle("top",e.top+"px"),this._currentOffset=e},enumerable:!1,configurable:!0}),R.prototype.setZIndex=function(){this.anchor&&this.setContainerStyle("z-index",String(this.domService.zIndex(this.domService.nativeElement(this.anchor),this.container)))},R.prototype.reposition=function(){var e,t,n,o,i,r,s=this;a.isDocumentAvailable()&&(n=this.position(),e=n.flip,t=n.offset,(!this.currentOffset||(n=this.currentOffset,o=t,i=n.left,n=n.top,r=t.left,o=t.top,1<=Math.abs(i-r)||1<=Math.abs(n-o)))&&(this.currentOffset=t,a.hasObservers(this.positionChange)&&this._zone.run(function(){return s.positionChange.emit({offset:t,flip:e})})),this.animate&&this.animationService.play(this.contentContainer.nativeElement,this.animate,e),this.resizeSensor.acceptSize())},R.prototype.position=function(){var e=this._alignService.alignElement({anchor:this.domService.nativeElement(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.domService.nativeElement(this.anchor),anchorAlign:this.anchorAlign,collisions:this.collision,currentLocation:e,element:this.container,elementAlign:this.popupAlign,margin:this.margin})},R.prototype.onScroll=function(e){var t=this,n=a.hasObservers(this.anchorViewportLeave);e||!n?this.reposition():n&&this._zone.run(function(){t.anchorViewportLeave.emit()})},R.prototype.copyFontStyles=function(){var t=this;this.anchor&&this.copyAnchorStyles&&this.domService.getFontStyles(this.domService.nativeElement(this.anchor)).forEach(function(e){return t.setContainerStyle(e.key,e.value)})},R.prototype.updateFixedClass=function(){var e="fixed"===this.positionMode?"addClass":"removeClass";this._renderer[e](this.container.nativeElement,"k-animation-container-fixed")},R.prototype.setContainerStyle=function(e,t){this._renderer.setStyle(this.container.nativeElement,e,t)},R.prototype.unsubscribeReposition=function(){this.repositionSubscription&&this.repositionSubscription.unsubscribe()},R);function R(e,t,n,o,i,r,s,a,p){this.container=e,this._alignService=t,this.domService=n,this._positionService=o,this._resizeService=i,this._scrollableService=r,this.animationService=s,this._renderer=a,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=Q,this.anchorViewportLeave=new c.EventEmitter,this.close=new c.EventEmitter,this.open=new c.EventEmitter,this.positionChange=new c.EventEmitter,this.resolvedPromise=Promise.resolve(null),this.initialCheck=!0,F.validatePackage(G),this._renderer.addClass(e.nativeElement,"k-animation-container"),this.updateFixedClass()}j.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:j,deps:[{token:p.ElementRef},{token:b},{token:g},{token:w},{token:I},{token:E},{token:V},{token:p.Renderer2},{token:p.NgZone}],target:p.ɵɵFactoryTarget.Component}),j.ɵcmp=p.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:j,selector:"kendo-popup",inputs:{animate:"animate",anchor:"anchor",anchorAlign:"anchorAlign",collision:"collision",popupAlign:"popupAlign",copyAnchorStyles:"copyAnchorStyles",popupClass:"popupClass",positionMode:"positionMode",offset:"offset",margin:"margin"},outputs:{anchorViewportLeave:"anchorViewportLeave",close:"close",open:"open",positionChange:"positionChange"},providers:[b,V,g,w,I,E],viewQueries:[{propertyName:"contentContainer",first:!0,predicate:["container"],descendants:!0,static:!0},{propertyName:"resizeSensor",first:!0,predicate:a.ResizeSensorComponent,descendants:!0,static:!0}],exportAs:["kendo-popup"],usesOnChanges:!0,ngImport:p,template:'\n <div class="k-popup" [ngClass]="popupClass" #container>\n <ng-content></ng-content>\n <ng-template [ngTemplateOutlet]="content" [ngIf]="content"></ng-template>\n <kendo-resize-sensor [rateLimit]="100" (resize)="onResize()">\n </kendo-resize-sensor>\n </div>\n ',isInline:!0,components:[{type:l.ResizeSensorComponent,selector:"kendo-resize-sensor",inputs:["rateLimit"],outputs:["resize"]}],directives:[{type:u.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:u.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]},{type:u.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:j,decorators:[{type:c.Component,args:[{exportAs:"kendo-popup",providers:[b,V,g,w,I,E],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 <kendo-resize-sensor [rateLimit]="100" (resize)="onResize()">\n </kendo-resize-sensor>\n </div>\n '}]}],ctorParameters:function(){return[{type:p.ElementRef},{type:b},{type:g},{type:w},{type:I},{type:E},{type:V},{type:p.Renderer2},{type:p.NgZone}]},propDecorators:{animate:[{type:c.Input}],anchor:[{type:c.Input}],anchorAlign:[{type:c.Input}],collision:[{type:c.Input}],popupAlign:[{type:c.Input}],copyAnchorStyles:[{type:c.Input}],popupClass:[{type:c.Input}],positionMode:[{type:c.Input}],offset:[{type:c.Input}],margin:[{type:c.Input}],anchorViewportLeave:[{type:c.Output}],close:[{type:c.Output}],open:[{type:c.Output}],positionChange:[{type:c.Output}],contentContainer:[{type:c.ViewChild,args:["container",{static:!0}]}],resizeSensor:[{type:c.ViewChild,args:[a.ResizeSensorComponent,{static:!0}]}]}});var z=new c.InjectionToken("Popup Container"),l=(Object.defineProperty(D.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:!1,configurable:!0}),Object.defineProperty(D.prototype,"rootViewContainerNode",{get:function(){return this.container?this.container.nativeElement:this.getComponentRootNode(this.rootViewContainer)},enumerable:!1,configurable:!0}),D.prototype.open=function(e){var t=this.contentFrom((e=void 0===e?{}:e).content),n=t.component,t=t.nodes,o=this.appendPopup(t,e.appendTo),t=o.instance,i=(this.projectComponentInputs(o,e),o.changeDetectorRef.detectChanges(),n&&n.changeDetectorRef.detectChanges(),this.getComponentRootNode(o));return{close:function(){var e;n&&n.destroy(),o.destroy(),(e=i)&&e.parentNode&&e.parentNode.removeChild(e)},content:n,popup:o,popupAnchorViewportLeave:t.anchorViewportLeave,popupClose:t.close,popupElement:i,popupOpen:t.open,popupPositionChange:t.positionChange}},D.prototype.appendPopup=function(e,t){e=this.createComponent(j,e,t);return t||this.rootViewContainerNode.appendChild(this.getComponentRootNode(e)),e},D.prototype.getComponentRootNode=function(e){return e.location.nativeElement},D.prototype.getComponentFactory=function(e){return this.componentFactoryResolver.resolveComponentFactory(e)},D.prototype.createComponent=function(e,t,n){e=this.getComponentFactory(e);return n?n.createComponent(e,void 0,this.injector,t):(n=e.create(this.injector,t),this.applicationRef.attachView(n.hostView),n)},D.prototype.projectComponentInputs=function(t,n){return Object.getOwnPropertyNames(n).filter(function(e){return"content"!==e||n.content instanceof c.TemplateRef}).map(function(e){t.instance[e]=n[e]}),t},D.prototype.contentFrom=function(e){return!e||e instanceof c.TemplateRef?{component:null,nodes:[[]]}:{component:e=this.createComponent(e),nodes:[e?[e.location.nativeElement]:[]]}},D);function D(e,t,n,o){this.applicationRef=e,this.componentFactoryResolver=t,this.injector=n,this.container=o}l.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:l,deps:[{token:p.ApplicationRef},{token:p.ComponentFactoryResolver},{token:p.Injector},{token:z,optional:!0}],target:p.ɵɵFactoryTarget.Injectable}),l.ɵprov=p.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:l}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:l,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:p.ApplicationRef},{type:p.ComponentFactoryResolver},{type:p.Injector},{type:p.ElementRef,decorators:[{type:c.Inject,args:[z]},{type:c.Optional}]}]}});var u=[j],x=function(){};x.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:x,deps:[],target:p.ɵɵFactoryTarget.NgModule}),x.ɵmod=p.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:x,declarations:[j],imports:[t.CommonModule,a.ResizeSensorModule],exports:[j]}),x.ɵinj=p.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:x,providers:[l],imports:[[t.CommonModule,a.ResizeSensorModule]]}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:x,decorators:[{type:c.NgModule,args:[{declarations:[u],entryComponents:[u],exports:[u],imports:[t.CommonModule,a.ResizeSensorModule],providers:[l]}]}]}),e.POPUP_CONTAINER=z,e.PopupComponent=j,e.PopupModule=x,e.PopupService=l,e.SCALE=y,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-popup',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1665571768,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -673,7 +673,7 @@ const packageMetadata = {
|
|
|
673
673
|
name: '@progress/kendo-angular-popup',
|
|
674
674
|
productName: 'Kendo UI for Angular',
|
|
675
675
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
676
|
-
publishDate:
|
|
676
|
+
publishDate: 1665571768,
|
|
677
677
|
version: '',
|
|
678
678
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
679
679
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-popup",
|
|
3
|
-
"version": "5.0.
|
|
4
|
-
"description": "Kendo UI Angular Popup component",
|
|
3
|
+
"version": "5.0.1-dev.202210121049",
|
|
4
|
+
"description": "Kendo UI Angular Popup component - an easily customized popup from the most trusted provider of professional Angular components.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
7
7
|
"homepage": "https://www.telerik.com/kendo-angular-ui/components/",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"tslib": "^2.3.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@angular/animations": "
|
|
31
|
-
"@angular/common": "
|
|
32
|
-
"@angular/core": "
|
|
33
|
-
"@progress/kendo-angular-common": "
|
|
30
|
+
"@angular/animations": "12 - 14",
|
|
31
|
+
"@angular/common": "12 - 14",
|
|
32
|
+
"@angular/core": "12 - 14",
|
|
33
|
+
"@progress/kendo-angular-common": "^3.0.0",
|
|
34
34
|
"@progress/kendo-licensing": "^1.0.2",
|
|
35
35
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
36
36
|
},
|
|
@@ -61,18 +61,16 @@
|
|
|
61
61
|
"release": {
|
|
62
62
|
"debug": false,
|
|
63
63
|
"branchTags": {
|
|
64
|
-
"develop": "dev"
|
|
65
|
-
"ng12-update": "next"
|
|
64
|
+
"develop": "dev"
|
|
66
65
|
},
|
|
67
66
|
"fallbackTags": {
|
|
68
|
-
"dev": "latest"
|
|
69
|
-
"next": "latest"
|
|
67
|
+
"dev": "latest"
|
|
70
68
|
},
|
|
71
|
-
"analyzeCommits": "@
|
|
69
|
+
"analyzeCommits": "@progress/semantic-prerelease/analyzeCommits",
|
|
72
70
|
"generateNotes": "@progress/kendo-angular-tasks/lib/generateNotes",
|
|
73
|
-
"getLastRelease": "@
|
|
74
|
-
"verifyConditions": "@
|
|
75
|
-
"verifyRelease": "@
|
|
71
|
+
"getLastRelease": "@progress/semantic-prerelease/getLastRelease",
|
|
72
|
+
"verifyConditions": "@progress/semantic-prerelease/verifyConditions",
|
|
73
|
+
"verifyRelease": "@progress/semantic-prerelease/verifyRelease"
|
|
76
74
|
},
|
|
77
75
|
"main": "bundles/kendo-angular-popup.umd.js",
|
|
78
76
|
"module": "fesm2015/kendo-angular-popup.js",
|