UNPKG

2.65 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("primeng/dom")):"function"==typeof define&&define.amd?define("primeng/blockui",["exports","@angular/core","@angular/common","primeng/dom"],t):t(((e=e||self).primeng=e.primeng||{},e.primeng.blockui={}),e.ng.core,e.ng.common,e.primeng.dom)}(this,(function(e,t,n,o){"use strict";var i=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,l=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(l=(r<3?i(l):r>3?i(t,n,l):i(t,n))||l);return r>3&&l&&Object.defineProperty(t,n,l),l},r=function(){function e(e){this.el=e,this.autoZIndex=!0,this.baseZIndex=0}return Object.defineProperty(e.prototype,"blocked",{get:function(){return this._blocked},set:function(e){this._blocked=e,this.mask&&this.mask.nativeElement&&(this._blocked?this.block():this.unblock())},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){if(this.target&&!this.target.getBlockableElement)throw"Target of BlockUI must implement BlockableUI interface"},e.prototype.block=function(){if(this.target){this.target.getBlockableElement().appendChild(this.mask.nativeElement);var e=this.target.style||{};e.position="relative",this.target.style=e}else document.body.appendChild(this.mask.nativeElement);this.autoZIndex&&(this.mask.nativeElement.style.zIndex=String(this.baseZIndex+ ++o.DomHandler.zindex))},e.prototype.unblock=function(){this.el.nativeElement.appendChild(this.mask.nativeElement)},e.prototype.ngOnDestroy=function(){this.unblock()},e.ctorParameters=function(){return[{type:t.ElementRef}]},i([t.Input()],e.prototype,"target",void 0),i([t.Input()],e.prototype,"autoZIndex",void 0),i([t.Input()],e.prototype,"baseZIndex",void 0),i([t.Input()],e.prototype,"styleClass",void 0),i([t.ViewChild("mask")],e.prototype,"mask",void 0),i([t.Input()],e.prototype,"blocked",null),e=i([t.Component({selector:"p-blockUI",template:"\n <div #mask [class]=\"styleClass\" [ngClass]=\"{'ui-blockui-document':!target, 'ui-blockui ui-widget-overlay': true}\" [ngStyle]=\"{display: blocked ? 'block' : 'none'}\">\n <ng-content></ng-content>\n </div>\n ",changeDetection:t.ChangeDetectionStrategy.Default})],e)}(),l=function(){function e(){}return e=i([t.NgModule({imports:[n.CommonModule],exports:[r],declarations:[r]})],e)}();e.BlockUI=r,e.BlockUIModule=l,Object.defineProperty(e,"__esModule",{value:!0})}));
2//# sourceMappingURL=primeng-blockui.umd.min.js.map
\No newline at end of file