UNPKG

@uex/web-extensions

Version:

## Installation

1 lines 344 kB
function GetMask(t){return isString(t)&&FormMasks[t]?FormMasks[t]:t}function SetupSchemaMask(t){if(t.mask&&t.value&&(t.mask=GetMask(t.mask),t.mask.mask)){var e=[];isArray(t.mask.mask)?e=t.mask.mask:isFunction(t.mask.mask)&&(e=t.mask.mask(t.value)),t.value=conformToMask(t.value,e.filter(function(t){return"[]"!==t}),{guide:!1}).conformedValue}}function GetSchemaInstance(t,e,o){var n=e.controls[t.key];return new FormSchema(t,n,o)}function isEmptyInputValue(t){return null==t||0===t.length}function GetSchemaValidators(t,e,o){void 0===o&&(o=!1);var n=[],r=[],i=t.value?t.value:"";switch(t.validations||(t.validations={}),"date"!=t.type||t.validations.date||Modernizr.inputtypes.date||(t.validations.date=!0),"time"!=t.type||t.validations.time||Modernizr.inputtypes.time||(t.validations.date=!0),"email"==t.type&&(t.validations.email=!0),forEach(t.validations,function(o,r){if(has(FormValidators,r)){var i=FormValidators[r](o,t.key,e);i&&n.push(i)}}),t.type){case"email":r.push(FormValidators.email)}return isEmpty(r)&&r.push(Validators.nullValidator),isEmpty(n)?o?[i,Validators.compose(r)]:Validators.compose(r):o?[i,Validators.compose(r.concat(n))]:Validators.compose(r.concat(n))}import{CUSTOM_ELEMENTS_SCHEMA,ChangeDetectorRef,Component,ComponentFactoryResolver,ContentChild,ContentChildren,Directive,ElementRef,EventEmitter,Host,HostBinding,Inject,Injectable,Input,NO_ERRORS_SCHEMA,NgModule,Optional,Output,ReflectiveInjector,Renderer,SkipSelf,TemplateRef,ViewChild,ViewContainerRef,ViewEncapsulation}from"@angular/core";import{CommonModule}from"@angular/common";import{at,cloneDeep,findIndex,flatten,forEach,groupBy,has,isArray,isBoolean,isDate,isEmpty,isEqual,isFunction,isNumber,isPlainObject,isString,isUndefined,last,map,merge,orderBy,replace,set,snakeCase,uniqueId}from"lodash";import{Headers,HttpModule,RequestMethod,RequestOptions,URLSearchParams}from"@angular/http";import"rxjs/add/operator/timeout";import{animate,state,style,transition,trigger}from"@angular/animations";import{FormBuilder,FormControl,FormsModule,ReactiveFormsModule,Validators}from"@angular/forms";import{FilterByPipe,NgPipesModule,OrderByPipe}from"ngx-pipes";import{TextMaskModule}from"angular2-text-mask";import moment from"moment";import createNumberMask from"text-mask-addons/dist/createNumberMask.js";import{conformToMask}from"text-mask-core/dist/textMaskCore";import*as Cropper from"cropperjs";import{DomSanitizer}from"@angular/platform-browser";import{ActivatedRoute,NavigationEnd,PRIMARY_OUTLET,Router,RouterModule}from"@angular/router";import"rxjs/add/operator/filter";import{QrScannerComponent,QrScannerModule}from"@uex/angular2-qrscanner";var TemplateTheme;!function(t){t[t.DARK=1]="DARK",t[t.LIGHT=2]="LIGHT",t[t.BLUE=3]="BLUE"}(TemplateTheme||(TemplateTheme={}));var TemplateSize;!function(t){t[t.RESPONSIVE=1]="RESPONSIVE",t[t.SMALL=2]="SMALL",t[t.MEDIUM=3]="MEDIUM"}(TemplateSize||(TemplateSize={}));var AppConfig=function(){return function(){}}(),ConfigService=function(){function t(t){this.config=t,this.DEFAULT_CONFIG={theme:TemplateTheme.LIGHT,header:!0,background:{color:"#1C7FBB"}},this._setDefautValues()}return Object.defineProperty(t.prototype,"template",{get:function(){return this.config&&this.config.template?this.config.template:{}},enumerable:!0,configurable:!0}),t.prototype._setDefautValues=function(){var t=this;forEach(this.template,function(e,o){var n=t.DEFAULT_CONFIG;e.background&&(e.background.image||e.background.color)&&delete n.background.color,t.config.template[o]=merge({},n,e)})},t.decorators=[{type:Injectable}],t.ctorParameters=function(){return[{type:AppConfig,decorators:[{type:Optional}]}]},t}(),ButtonComponent=function(){function t(t){this._element=t,this.color="primary",this.mode="raised",this.size=null}return t.prototype.ngAfterViewInit=function(){componentHandler.upgradeElements(this._element.nativeElement)},t.decorators=[{type:Component,args:[{selector:"[uex-button]",template:"<ng-content></ng-content>",styles:["[uex-button][block] { width: 100%; } [uex-button] .fa { line-height: 32px; } .uex-button + .uex-button:not([block]) { margin-left: 10px; } .uex-button + .uex-button[block] { margin-top: 10px; } .uex-button.mdl-button--mini-raised { padding: 0 10px; line-height: 1; min-width: 58px; height: 30px; font-size: 12px; } .uex-button.mdl-button--mini-icon { line-height: 1.4rem !important; } .uex-button.mdl-button--mini-icon .material-icons, .uex-button.mdl-button--mini-icon .fa { top: 0 !important; left: 0 !important; transform: translate(0, 0) !important; font-size: 1.4rem !important; } .uex-button.mdl-button--mini-icon .fa { line-height: 1; } .mdl-button--facebook { color: #3b5999; } .mdl-button--facebook .mdl-ripple { background: white; } .mdl-button--facebook.mdl-button--raised, .mdl-button--facebook.mdl-button--fab { color: white; background-color: #3b5999; } .mdl-button--facebook.mdl-button--raised:focus:not(:active), .mdl-button--facebook.mdl-button--fab:focus:not(:active) { color: white; background-color: #3b5999; } .mdl-button--facebook:focus:not(:active) .mdl-ripple { background-color: white; } .mdl-button--light { color: white; } .mdl-button--light .mdl-ripple { background: #1C7FBB; } .mdl-button--light.mdl-button--raised, .mdl-button--light.mdl-button--fab { color: #1C7FBB; background-color: white; } .mdl-button--light.mdl-button--raised:focus:not(:active), .mdl-button--light.mdl-button--fab:focus:not(:active) { color: #1C7FBB; background-color: white; } .mdl-button--light:focus:not(:active) .mdl-ripple { background-color: #1C7FBB; } "],host:{class:"uex-button mdl-js-ripple-effect mdl-button mdl-js-button","[class.mdl-button--raised]":'mode == "raised"',"[class.mdl-button--icon]":'mode == "icon"',"[class.mdl-button--fab]":'mode == "fab"',"[class.mdl-button--mini-raised]":'mode == "raised" && size == "mini"',"[class.mdl-button--mini-icon]":'mode == "icon" && size == "mini"',"[class.mdl-button--mini-fab]":'mode == "fab" && size == "mini"',"[class.mdl-button--colored]":'color == "colored"',"[class.mdl-button--primary]":'color == "primary"',"[class.mdl-button--accent]":'color == "accent"',"[class.mdl-button--dark]":'color == "dark"',"[class.mdl-button--light]":'color == "light"',"[class.mdl-button--facebook]":'color == "facebook"',"[class.mdl-button--green-lightest]":'color == "green-lightest"',"[class.mdl-button--green-light]":'color == "green-light"',"[class.mdl-button--green]":'color == "green"',"[class.mdl-button--green-dark]":'color == "green-dark"',"[class.mdl-button--green-darkest]":'color == "green-darkest"',"[class.mdl-button--cyan-lightest]":'color == "cyan-lightest"',"[class.mdl-button--cyan-light]":'color == "cyan-light"',"[class.mdl-button--cyan]":'color == "cyan"',"[class.mdl-button--cyan-dark]":'color == "cyan-dark"',"[class.mdl-button--cyan-darkest]":'color == "cyan-darkest"',"[class.mdl-button--blue-lightest]":'color == "blue-lightest"',"[class.mdl-button--blue-light]":'color == "blue-light"',"[class.mdl-button--blue]":'color == "blue"',"[class.mdl-button--blue-dark]":'color == "blue-dark"',"[class.mdl-button--blue-darkest]":'color == "blue-darkest"',"[class.mdl-button--red-lightest]":'color == "red-lightest"',"[class.mdl-button--red-light]":'color == "red-light"',"[class.mdl-button--red]":'color == "red"',"[class.mdl-button--red-dark]":'color == "red-dark"',"[class.mdl-button--red-darkest]":'color == "red-darkest"',"[class.mdl-button--orange-lightest]":'color == "orange-lightest"',"[class.mdl-button--orange-light]":'color == "orange-light"',"[class.mdl-button--orange]":'color == "orange"',"[class.mdl-button--orange-dark]":'color == "orange-dark"',"[class.mdl-button--orange-darkest]":'color == "orange-darkest"',"[class.mdl-button--yellow-lightest]":'color == "yellow-lightest"',"[class.mdl-button--yellow-light]":'color == "yellow-light"',"[class.mdl-button--yellow]":'color == "yellow"',"[class.mdl-button--yellow-dark]":'color == "yellow-dark"',"[class.mdl-button--yellow-darkest]":'color == "yellow-darkest"',"[class.mdl-button--purple-lightest]":'color == "purple-lightest"',"[class.mdl-button--purple-light]":'color == "purple-light"',"[class.mdl-button--purple]":'color == "purple"',"[class.mdl-button--purple-dark]":'color == "purple-dark"',"[class.mdl-button--purple-darkest]":'color == "purple-darkest"',"[class.mdl-button--pink-lightest]":'color == "pink-lightest"',"[class.mdl-button--pink-light]":'color == "pink-light"',"[class.mdl-button--pink]":'color == "pink"',"[class.mdl-button--pink-dark]":'color == "pink-dark"',"[class.mdl-button--pink-darkest]":'color == "pink-darkest"'},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:ElementRef}]},t.propDecorators={color:[{type:Input}],mode:[{type:Input}],size:[{type:Input}]},t}(),ButtonModule=function(){function t(){}return t.decorators=[{type:NgModule,args:[{declarations:[ButtonComponent],exports:[ButtonComponent],schemas:[CUSTOM_ELEMENTS_SCHEMA]}]}],t.ctorParameters=function(){return[]},t}(),CameraComponent=function(){function t(t){this._changeDetectorRef=t,this.status={support:!0,permission:!0,error:!1},this.onReady=new EventEmitter,this._navigator=navigator}return t.prototype.ngOnInit=function(){var t=this;this._navigator.mediaDevices&&this._navigator.mediaDevices.getUserMedia?this._navigator.mediaDevices.getUserMedia({video:!0}).then(function(e){return t._play(e)}).catch(function(e){return t._onError(e)}):this._navigator.getUserMedia?this._navigator.getUserMedia({video:!0},function(e){return t._play(e)},function(e){return t._onError(e)}):this._navigator.webkitGetUserMedia?this._navigator.webkitGetUserMedia({video:!0},function(e){return t._play(e)},function(e){return t._onError(e)}):this._navigator.mozGetUserMedia?this._navigator.mozGetUserMedia({video:!0},function(e){return t._play(e)},function(e){return t._onError(e)}):(this.status.support=!1,this._onError())},t.prototype.ngOnDestroy=function(){this._pause()},t.prototype.takePicture=function(){if(!this.cameraWrapper)return null;var t=this._getCanvas(this.cameraWrapper.nativeElement);return this.picture=t.toDataURL("image/jpeg"),this.picture},t.prototype._getCanvas=function(t){var e=document.createElement("canvas");return e.width=this.cameraWrapper.nativeElement.videoWidth,e.height=this.cameraWrapper.nativeElement.videoHeight,e.getContext("2d").drawImage(t,0,0),e},t.prototype._play=function(t){if(this.cameraWrapper){this.stream=t,this.cameraWrapper.nativeElement.src=window.URL.createObjectURL(t),this.cameraWrapper.nativeElement.play();this.stream.getTracks();this._onSuccess()}},t.prototype._pause=function(){if(this.cameraWrapper&&this.stream){var t=this.stream.getTracks();t&&t.forEach(function(t){return t.stop()}),this.cameraWrapper.nativeElement.pause()}},t.prototype._onSuccess=function(){this.onReady.emit(this.status)},t.prototype._onError=function(t){!t||"PermissionDeniedError"!=t.name&&"NotAllowedError"!=t.name||(this.status.permission=!1),this.status.error=!0,this.onReady.emit(this.status)},t.decorators=[{type:Component,args:[{selector:"uex-camera",template:'<video #cameraWrapper class="uex-camera-wrapper"></video> ',styles:["uex-camera { display: table; max-width: 100%; } uex-camera .uex-camera-wrapper { max-width: 100%; } "],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:ChangeDetectorRef}]},t.propDecorators={cameraWrapper:[{type:ViewChild,args:["cameraWrapper"]}]},t}(),CameraModule=function(){function t(){}return t.decorators=[{type:NgModule,args:[{declarations:[CameraComponent],imports:[CommonModule],exports:[CameraComponent]}]}],t.ctorParameters=function(){return[]},t}(),CardComponent=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-card",template:'<div class="mdl-card mdl-shadow--2dp"> <ng-content></ng-content> </div> ',styles:["uex-card { display: block; width: 100%; } uex-card .mdl-card { position: static; width: 100%; min-height: 0; } *:not(.uex-grid-item) > uex-card { padding: 5px; } *:not(.uex-grid-item) > uex-card + .uex-grid { margin-top: -5px; } "],host:{class:"uex-card"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t}(),CardHeaderComponent=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-card-header",template:"<ng-content></ng-content> ",styles:["uex-card-header.mdl-card__title { flex-wrap: wrap; } "],host:{class:"mdl-card__title"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t}(),CardMediaComponent=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-card-media",template:"<ng-content></ng-content>",styles:["uex-card-media { display: block; } uex-card-media .mdl-card__media { width: 100%; } "],host:{class:"mdl-card__media"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t}(),CardContentComponent=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-card-content",template:"<ng-content></ng-content> ",styles:["uex-card-content { display: block; } uex-card-content.mdl-card__content { width: 100%; padding: 15px; font-size: 1em; overflow: visible; } uex-card-header + uex-card-content.mdl-card__content, uex-card-media + uex-card-content.mdl-card__content { padding-top: 0; } "],host:{class:"mdl-card__content mdl-card__supporting-text"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t}(),CardFooterComponent=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-card-footer",template:'<ng-content></ng-content> <div class="mdl-card__action-left"> <ng-content select="[left]"></ng-content> </div> <div class="mdl-card__action-right"> <ng-content select="[right]"></ng-content> </div> ',styles:["uex-card-footer { display: block; } uex-card-footer.mdl-card__actions { display: table; width: 100%; padding: 15px; } uex-card-footer.mdl-card__actions .mdl-card__action-left { float: left; text-align: left; } uex-card-footer.mdl-card__actions .mdl-card__action-right { float: right; text-align: right; } uex-card-header + uex-card-footer.mdl-card__actions, uex-card-media + uex-card-footer.mdl-card__actions, uex-card-content + uex-card-footer.mdl-card__actions { padding-top: 0; } "],host:{class:"mdl-card__actions"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t}(),CardTitleComponent=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-card-title",template:"<ng-content></ng-content>",styles:["uex-card-title.mdl-card__title-text { width: 100%; color: #444444; } "],host:{class:"mdl-card__title-text"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t}(),CardSubtitleComponent=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-card-subtitle",template:"<ng-content></ng-content>",styles:["uex-card-subtitle.mdl-card__subtitle-text { width: 100%; color: #777777; } uex-card-title.mdl-card__title-text + uex-card-subtitle.mdl-card__subtitle-text { margin-top: 15px; } "],host:{class:"mdl-card__subtitle-text"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t}(),CardMenuComponent=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-card-menu",template:"<ng-content></ng-content>",host:{class:"mdl-card__menu"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t}(),CardModule=function(){function t(){}return t.decorators=[{type:NgModule,args:[{declarations:[CardComponent,CardHeaderComponent,CardMediaComponent,CardContentComponent,CardFooterComponent,CardTitleComponent,CardSubtitleComponent,CardMenuComponent],exports:[CardComponent,CardHeaderComponent,CardMediaComponent,CardContentComponent,CardFooterComponent,CardTitleComponent,CardSubtitleComponent,CardMenuComponent],schemas:[CUSTOM_ELEMENTS_SCHEMA,NO_ERRORS_SCHEMA]}]}],t.ctorParameters=function(){return[]},t}(),ContainerComponent=function(){function t(){}return t.decorators=[{type:Component,args:[{selector:"uex-container",template:'<div class="uex-container" [class.uex-container-small]="size == \'small\'" [class.uex-container-medium]="size == \'medium\'" [class.uex-container-large]="size == \'large\'" [class.uex-container-xlarge]="size == \'xlarge\'" [class.uex-container-responsive]="size == \'responsive\'" > <ng-content></ng-content> </div> ',styles:["uex-container .uex-container { width: 400px; max-width: 100%; margin: 0 auto; } uex-container .uex-container.uex-container-small { width: 300px; } uex-container .uex-container.uex-container-medium { width: 700px; } uex-container .uex-container.uex-container-large { width: 990px; } uex-container .uex-container.uex-container-xlarge { width: 1200px; } uex-container .uex-container.uex-container-responsive { width: 100%; } "],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t.propDecorators={size:[{type:Input,args:["size"]}]},t}(),ContainerModule=function(){function t(){}return t.decorators=[{type:NgModule,args:[{declarations:[ContainerComponent],exports:[ContainerComponent],schemas:[CUSTOM_ELEMENTS_SCHEMA]}]}],t.ctorParameters=function(){return[]},t}(),ToastService=function(){function t(){this.onOpen=new EventEmitter,this.onClose=new EventEmitter,this.visible=!1,this.duration=5e3,this.showAction=!1}return t.prototype.open=function(t){var e=this;this._clearTimeout(),this.message=t.message,this.duration=t.duration?t.duration:5e3,this.actionText=t.actionText,this.showAction=!!isBoolean(t.showAction)&&t.showAction,this.visible=!0,this.onOpen.emit(),this.duration>0&&(this._durationTimeout=setTimeout(function(){e.close()},this.duration))},t.prototype.close=function(){this._clearTimeout(),this.visible=!1,this.message=null,this.duration=5e3,this.actionText=null,this.showAction=!0,this.onClose.emit()},t.prototype._clearTimeout=function(){this._durationTimeout&&clearTimeout(this._durationTimeout)},t.decorators=[{type:Injectable}],t.ctorParameters=function(){return[]},t}(),ToastComponent=function(){function t(t){var e=this;this.toastService=t,this.visible=!1,t.onOpen.subscribe(function(){e.message=t.message,e.actionText=t.actionText,e.visible=t.visible}),t.onClose.subscribe(function(){e.message=t.message,e.actionText=t.actionText,e.visible=t.visible})}return t.prototype.hasAction=function(){return this.toastService.showAction},t.prototype.onClick=function(){this.toastService.close()},t.decorators=[{type:Component,args:[{selector:"uex-toast",template:'<div class="mdl-snackbar__text">{{message}}</div> <button class="mdl-snackbar__action" type="button" (click)="onClick()" *ngIf="hasAction()">{{actionText}}</button> ',styles:["uex-toast { z-index: 11000 !important; } uex-toast .mdl-snackbar__action { color: #FFFFFF; } "],host:{class:"uex-toast mdl-snackbar","[class.mdl-snackbar--active]":"visible"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:ToastService}]},t}(),ToastModule=function(){function t(){}return t.decorators=[{type:NgModule,args:[{declarations:[ToastComponent],imports:[CommonModule],exports:[ToastComponent],providers:[ToastService],schemas:[CUSTOM_ELEMENTS_SCHEMA]}]}],t.ctorParameters=function(){return[]},t}(),DisabledDirective=function(){function t(){}return t.decorators=[{type:Directive,args:[{selector:"[uexDisabled]",host:{"[attr.disabled]":"disabled ? true : null"}}]}],t.ctorParameters=function(){return[]},t.propDecorators={disabled:[{type:Input,args:["uexDisabled"]}]},t}(),MDLDirective=function(){function t(t){this.element=t}return t.prototype.ngAfterViewInit=function(){componentHandler.upgradeElements(this.element.nativeElement)},t.decorators=[{type:Directive,args:[{selector:"[mdl]"}]}],t.ctorParameters=function(){return[{type:ElementRef}]},t}(),PortalDirective=function(){function t(t){this.viewContainerRef=t}return Object.defineProperty(t.prototype,"portal",{set:function(t){t&&this.viewContainerRef.createEmbeddedView(t)},enumerable:!0,configurable:!0}),t.decorators=[{type:Directive,args:[{selector:"[uex-portal]"}]}],t.ctorParameters=function(){return[{type:ViewContainerRef}]},t.propDecorators={portal:[{type:Input,args:["uex-portal"]}]},t}(),BaseModel=function(){function t(t,e){this.http=t,this.toastService=e,this.path="",this.timeout=3e4}return t.prototype.buildResource=function(t){var e=this;t=this.setResourceParamsDefaults(t);return function(o){void 0===o&&(o={});var n=e.getPath(t);t.method!=RequestMethod.Get&&(t.cache=null);var r=snakeCase(e.constructor.name.replace("Model","")),i=t.cache?r+"_"+t.cache.name:null;return new Promise(function(r,a){var l=e.url+e.path+e.parseResourcePath(n,o),s=e.getLogoutOnUnauthorized(t,o),p=e.getOptions(t,o),c={enabled:!!t.cache,replace:!0,name:i,params:o},u=t.timeout?t.timeout:e.timeout;e.http.request(l,p).timeout(u).subscribe(function(o){return r(e.handleSuccess(o,c,t.responseInterceptor))},function(o){return a(e.handleError(o,c,s,t.responseInterceptor))})})}},t.prototype.getPath=function(t){var e=t.path?t.path:"",o=t.path?t.path.match(/\{([^\{\}]*)\}/g):[],n={template:e||"",keys:o||[]};return n.keys.forEach(function(t,e){n.template=n.template.replace(t,"{$"+(e+1)+"}"),n.keys[e]=t.replace(/[\{\}]/g,"")}),n},t.prototype.parseResourcePath=function(t,e){var o=t.template,n=this;return t.keys.forEach(function(t,r){var i="?"==t[0]||"?"==t[1],a="!"==t[0]||"!"==t[1],l=i||a?t.replace(/[\?\!]/g,""):t,s=n.findParamsKey(e,l.split("."),a),p=""==s&&i&&o.indexOf("/{$"+(r+1)+"}")>-1?"/{$"+(r+1)+"}":"{$"+(r+1)+"}";o=o.replace(p,s)}),o},t.prototype.headerInterceptor=function(t,e,o){return t},t.prototype.clearSession=function(){},t.prototype.getOptions=function(t,e){var o,n;t.method==RequestMethod.Get?(o=new URLSearchParams,this.setParams(o,e),n=!1):(o=e,n=!0);var r=new RequestOptions({method:t.method,headers:this.getHeaders(t,e),body:n?o:null,search:n?null:o,withCredentials:t.withCredentials});return isEmpty(t.requestInterceptor)?r:t.requestInterceptor(r)},t.prototype.getHeaders=function(t,e){var o={Accept:"application/json","Content-Type":"application/json","Access-Control-Allow-Origin":"*"};return new Headers(isFunction(this.headerInterceptor)?this.headerInterceptor(o,t,e):o)},t.prototype.getLogoutOnUnauthorized=function(t,e){var o=!0;return!isEmpty(t)&&isBoolean(t.logoutOnUnauthorized)?o=t.logoutOnUnauthorized:!isEmpty(e)&&isBoolean(e.logoutOnUnauthorized)&&(o=e.logoutOnUnauthorized),o},t.prototype.setParams=function(t,e,o){var n=0;if(isPlainObject(e))for(var r in e){s=e[r];if(!isEmpty(s)||isBoolean(s)||isNumber(s)){p=o?o+"["+r+"]":r;if(isPlainObject(s)||isArray(s)){if(!this.setParams(t,s,p))continue;n++}else t.set(p,s),n++}}else if(isArray(e)&&o)for(var i=0,a=0,l=e;a<l.length;a++){var s=l[a];if(!isEmpty(s)||isBoolean(s)||isNumber(s)){var p=o+"["+i+"]";if(isPlainObject(s)||isArray(s)){if(!this.setParams(t,s,p))continue;n++}else t.set(p,s),n++;i++}}return n>0},t.prototype.findParamsKey=function(t,e,o){var n="";return t instanceof Object&&(e.length>1?n=this.findParamsKey(t[e[0]],e.splice(1),o):t[e[0]]&&(n=t[e[0]],o&&delete t[e[0]])),n||""},t.prototype.setResourceParamsDefaults=function(t){return Object.assign({method:RequestMethod.Get,path:"",requestInterceptor:null,responseInterceptor:null,withCredentials:!1,logoutOnUnauthorized:!0},t)},t.prototype.handleSuccess=function(t,e,o){var n;return!e.enabled||e.enabled&&e.replace?n={data:isFunction(t.json)?t.json():t,cached:!1,status:t.status,statusText:t.statusText}:(n=t).cached=!0,isFunction(o)?o(n):n},t.prototype.handleError=function(t,e,o,n){var r;return 401==t.status&&o?(this.clearSession(),self.location.reload()):403==t.status&&this.toastService.open({message:"Você não tem autorização para utilizar esse recurso."}),!e.enabled||e.enabled&&e.replace?("TimeoutError"==t.name&&(t.statusText="TimeoutError",t.status=504),r={data:t&&isFunction(t.json)?t.json():{},cached:!1,status:t.status,statusText:t.statusText}):r={data:{},cached:!0,status:0,statusText:t.message},isFunction(n)?n(r):r},t}(),BaseEnum=function(){function t(t){this.enumerators=t;for(var e in this.enumerators)this[e]=this.enumerators[e][0],this[this.enumerators[e][0]]=e}return t.prototype.toArray=function(t,e){void 0===t&&(t="value"),void 0===e&&(e="label");var o=[];return forEach(this.enumerators,function(n,r){var i={};set(i,e,n[1]),set(i,t,n[0]),o.push(i)}),o},t.prototype.getKeys=function(){var t=[];return forEach(this.enumerators,function(e,o){t.push(o)}),t},t.prototype.getValues=function(){var t=[];return forEach(this.enumerators,function(e,o){t.push(e[0])}),t},t.prototype.humanize=function(t){var e="";return forEach(this.enumerators,function(o,n){o[0]==t&&(e=o[1])}),e},t}(),GenericModule=function(){function t(){}return t.decorators=[{type:NgModule,args:[{declarations:[DisabledDirective,MDLDirective,PortalDirective],imports:[CommonModule,HttpModule,ToastModule],exports:[DisabledDirective,MDLDirective,PortalDirective]}]}],t.ctorParameters=function(){return[]},t}(),IconComponent=function(){function t(t){this.elementRef=t,this.mode="md"}return t.prototype.ngOnInit=function(){this.setClass()},t.prototype.ngOnChanges=function(){this.setClass()},t.prototype.getValue=function(){switch(this.mode){case"fa":return null;default:return this.name}},t.prototype.setClass=function(){var t=/fa\-[a-z0-9\-]*/,e=["fa","material-icons","uex-icon"],o=this.elementRef.nativeElement.className.split(" ").filter(function(o){return o&&!t.test(o)&&-1==e.indexOf(o)});switch(o.push("uex-icon"),this.mode){case"fa":o.push("fa fa-fw fa-"+this.name);break;default:o.push("material-icons")}var n=this.getSizeClass();n&&o.push(n),this.elementRef.nativeElement.className=o.join(" ")},t.prototype.getSizeClass=function(){switch(this.size){case"2x":return"size-2x";case"3x":return"size-3x";case"4x":return"size-4x";case"5x":return"size-5x";default:return null}},t.decorators=[{type:Component,args:[{selector:"uex-icon",template:"{{getValue()}}",styles:["uex-icon { display: inline-block; } uex-icon.size-2x { font-size: 2em; } uex-icon.size-3x { font-size: 3em; } uex-icon.size-4x { font-size: 4em; } uex-icon.size-5x { font-size: 5em; } "],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:ElementRef}]},t.propDecorators={mode:[{type:Input}],size:[{type:Input}],name:[{type:Input}]},t}(),IconModule=function(){function t(){}return t.decorators=[{type:NgModule,args:[{declarations:[IconComponent],imports:[CommonModule],exports:[IconComponent],schemas:[CUSTOM_ELEMENTS_SCHEMA]}]}],t.ctorParameters=function(){return[]},t}(),DialogBase=function(){function t(t,e,o){this._dialogs=t,this._data=e,this.index=o,this.destroyed=!1,this.onOpen=new EventEmitter,this.onDismiss=new EventEmitter,this.onClose=new EventEmitter,this.onDestroy=new EventEmitter,this.onReturnValue=new EventEmitter,t.push(this)}return Object.defineProperty(t.prototype,"visible",{get:function(){return!!this.ready&&this.componentInstance.visible},set:function(t){this.ready&&(this.componentInstance.visible=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){return!!this.componentInstance&&this.componentInstance.ready},set:function(t){this.componentInstance&&(this.componentInstance.ready=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return this._data.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){var t=new DialogParamsBase;return t.params=this._data.params,t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settings",{get:function(){var t=this._data.settings;return t||(t={}),t.backdrop&&t.backdrop.onClick||(t.backdrop||(t.backdrop={}),t.backdrop.onClick="close"),t.keyboard&&t.keyboard.onEscape||(t.keyboard||(t.keyboard={}),t.keyboard.onEscape="none"),t.header&&t.header.closable&&t.header.closeClick||(t.header||(t.header={title:null}),t.header.closable&&(t.header.closeClick="close")),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"zindex",{get:function(){return this._data.zindex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"content_zindex",{get:function(){return this._data.content_zindex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backdrop_zindex",{get:function(){return this._data.backdrop_zindex},enumerable:!0,configurable:!0}),t.prototype.sizeClass=function(){switch(this.settings.size){case"xs":return"dialog-xs";case"sm":return"dialog-sm";case"md":return"dialog-md";case"lg":return"dialog-lg";case"responsive":return"dialog-responsive";default:return"dialog-md"}},t.prototype.open=function(){var t=this;this.destroyed?console.warn("Is't possible to open a destroyed dialog."):this.ready?(this.componentInstance.visible=!0,this.onOpen.emit()):setTimeout(function(){return t.open()},100)},t.prototype.dismiss=function(){var t=this;this.ready?(this.componentInstance.visible=!1,this.onDismiss.emit()):setTimeout(function(){return t.dismiss()},100)},t.prototype.close=function(){var t=this;this.ready?(this.dismiss(),setTimeout(function(){return t._destroy()},300)):setTimeout(function(){return t.close()},100)},t.prototype.returnValue=function(t){this.onReturnValue.emit(t)},t.prototype._destroy=function(){var t,e=this;this._dialogs.forEach(function(o,n){o.index==e.index&&(t=n)}),t>=0&&(this._dialogs.splice(t,1),this.onClose.emit(),this.destroyed=!0)},t.decorators=[{type:Injectable}],t.ctorParameters=function(){return[{type:Array},null,null]},t}(),DialogRefBase=function(){function t(){}return t.decorators=[{type:Injectable}],t.ctorParameters=function(){return[]},t}(),DialogParamsBase=function(){function t(){}return t.prototype.get=function(t){return this.params?this.params[t]:null},t.decorators=[{type:Injectable}],t.ctorParameters=function(){return[]},t}(),DialogLoadingComponent=function(){function t(t,e){this._dialogRef=t,this._dialogParams=e,this.dialog=this._dialogRef.dialog,this.message=this._dialogParams.get("message"),isEmpty(this.message)&&(this.message="Carregando...")}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-dialog-loading",template:'<uex-dialog-content> <div media> <div media-left> <div mdl class="mdl-spinner mdl-spinner--single-color mdl-js-spinner is-active"></div> \x3c!--<uex-icon name="" size="3x" text-cyan></uex-icon>--\x3e </div> <div media-body> <h1>{{message}}</h1> </div> </div> </uex-dialog-content> ',styles:["uex-dialog-content.mdl-dialog__content { padding: 24px; } uex-dialog-content.mdl-dialog__content [media-left] { padding-right: 30px; } uex-dialog-content.mdl-dialog__content [media-body] h1 { margin: 0; font-size: 1.2em; } "],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:DialogRefBase},{type:DialogParamsBase}]},t}(),DialogAlertComponent=function(){function t(t,e){this._dialogRef=t,this._dialogParams=e,this.dialog=this._dialogRef.dialog}return Object.defineProperty(t.prototype,"title",{get:function(){return this._dialogParams.get("title")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitle",{get:function(){return this._dialogParams.get("subtitle")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this._dialogParams.get("message")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonText",{get:function(){var t=this._dialogParams.get("buttonText");return t||"Ok"},enumerable:!0,configurable:!0}),t.prototype.close=function(){this.dialog.close()},t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-dialog-alert",template:'<uex-dialog-header *ngIf="title || subtitle"> <uex-dialog-title *ngIf="title">{{title}}</uex-dialog-title> <uex-dialog-subtitle *ngIf="subtitle">{{subtitle}}</uex-dialog-subtitle> </uex-dialog-header> <uex-dialog-content *ngIf="message"> <p text-muted>{{message}}</p> </uex-dialog-content> <uex-dialog-footer text-right> <button uex-button mode="clear" (click)="close()">{{buttonText}}</button> </uex-dialog-footer> ',styles:["uex-dialog-content.mdl-dialog__content { padding: 24px; } uex-dialog-content.mdl-dialog__content [media-left] { padding-right: 30px; } uex-dialog-content.mdl-dialog__content [media-body] h1 { margin: 0; font-size: 1.2em; } "],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:DialogRefBase},{type:DialogParamsBase}]},t}(),DialogConfirmComponent=function(){function t(t,e){this._dialogRef=t,this._dialogParams=e,this.dialog=this._dialogRef.dialog}return Object.defineProperty(t.prototype,"title",{get:function(){return this._dialogParams.get("title")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitle",{get:function(){return this._dialogParams.get("subtitle")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this._dialogParams.get("message")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"resolveButtonText",{get:function(){var t=this._dialogParams.get("resolveButtonText");return t||"Ok"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rejectButtonText",{get:function(){var t=this._dialogParams.get("rejectButtonText");return t||"Cancelar"},enumerable:!0,configurable:!0}),t.prototype.resolve=function(){this.dialog.returnValue(!0)},t.prototype.reject=function(){this.dialog.returnValue(!1)},t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-dialog-confirm",template:'<uex-dialog-header *ngIf="title || subtitle"> <uex-dialog-title *ngIf="title">{{title}}</uex-dialog-title> <uex-dialog-subtitle *ngIf="subtitle">{{subtitle}}</uex-dialog-subtitle> </uex-dialog-header> <uex-dialog-content *ngIf="message"> <p text-muted>{{message}}</p> </uex-dialog-content> <uex-dialog-footer text-right> <button uex-button mode="clear" (click)="resolve()">{{resolveButtonText}}</button> <button uex-button mode="clear" color="red" (click)="reject()">{{rejectButtonText}}</button> </uex-dialog-footer> ',styles:["uex-dialog-content.mdl-dialog__content { padding: 24px; } uex-dialog-content.mdl-dialog__content [media-left] { padding-right: 30px; } uex-dialog-content.mdl-dialog__content [media-body] h1 { margin: 0; font-size: 1.2em; } "],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:DialogRefBase},{type:DialogParamsBase}]},t}(),__extends=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),DialogService=function(){function t(t){var e=this;this.compiler=t,this.dialogs=[],this.current_index=0,this.zindex=10010,this.content_zindex=10020,this.backdrop_zindex=1e4,document.addEventListener("keyup",function(t){var o=t.which||t.keyCode;if([13,27].indexOf(o)>-1){var n=e.dialogs.filter(function(t){return t.visible});if(n.length>0){var r=last(n);switch(r.settings.keyboard.onEscape){case"close":t.preventDefault(),r.close();break;case"dismiss":t.preventDefault(),r.dismiss();break;default:return}}}})}return t.prototype.create=function(t,e,o){e&&isPlainObject(e)||(e={});var n={component:this.compiler.resolveComponentFactory(t),params:e,settings:o,zindex:this.zindex,content_zindex:this.content_zindex,backdrop_zindex:this.backdrop_zindex};this.zindex+=100,this.content_zindex+=100,this.backdrop_zindex+=100;var r=new Dialog(this.dialogs,n,this.current_index);return this.current_index++,r},t.prototype.open=function(t,e,o){e&&isPlainObject(e)||(e={});var n=this.create(t,e,o);return n.open(),n},t.prototype.loading=function(t){return this.open(DialogLoadingComponent,{message:t},{size:"xs",backdrop:{onClick:"none"}})},t.prototype.alert=function(t){var e=t.size?t.size:"xs";return delete t.size,this.open(DialogAlertComponent,t,{size:e})},t.prototype.confirm=function(t,e){var o=t.size?t.size:"xs";delete t.size;var n=this.open(DialogConfirmComponent,t,{size:o,backdrop:{onClick:"none"}});return n.onReturnValue.subscribe(function(t){e(t),n.close()}),n},t.decorators=[{type:Injectable}],t.ctorParameters=function(){return[{type:ComponentFactoryResolver}]},t}(),Dialog=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(DialogBase),DialogRef=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(DialogRefBase),DialogParams=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(DialogParamsBase),DialogWrapperComponent=function(){function t(t){this.dialogService=t}return Object.defineProperty(t.prototype,"dialogs",{get:function(){return this.dialogService.dialogs},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-dialog-wrapper",template:'<ng-container *ngFor="let dialog of dialogs"> <uex-dialog [dialog]="dialog"></uex-dialog> </ng-container> ',styles:[""],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:DialogService}]},t}(),DialogComponent=function(){function t(){this.visible=!1,this.ready=!1}return t.prototype.ngOnInit=function(){var t,e=new DialogRef,o=this.dialog.params;e.dialog=this.dialog,t=ReflectiveInjector.resolveAndCreate([{provide:DialogRefBase,useValue:e},{provide:DialogRef,useValue:e},{provide:DialogParamsBase,useValue:o},{provide:DialogParams,useValue:o}]),this.dialog.componentRef=this.content.createComponent(this.dialog.component,null,t),this.dialog.componentInstance=this,this.ready=!0},t.prototype.getState=function(){return this.ready?this.visible?"shown":"hidden":"initial"},t.prototype.backdropClick=function(t){var e=t.target;if(!e||e.classList.contains("uex-dialog-wrapper"))switch(this.dialog.settings.backdrop.onClick){case"close":this.dialog.close();break;case"dismiss":this.dialog.dismiss();break;case"none":break;default:this.dialog.close()}},t.prototype.headerCloseClick=function(){if(this.dialog.settings.header.closable)switch(this.dialog.settings.header.closeClick){case"close":this.dialog.close();break;case"dismiss":this.dialog.dismiss();break;default:this.dialog.close()}},t.prototype.getSizeClass=function(){return this.dialog.sizeClass()},t.prototype.getWrapperStyle=function(){return{"z-index":this.dialog.zindex}},t.prototype.getContentStyle=function(){return{"z-index":this.dialog.content_zindex}},t.prototype.getBackdropStyle=function(){return{"z-index":this.dialog.backdrop_zindex}},t.decorators=[{type:Component,args:[{selector:"uex-dialog",template:'<div class="uex-dialog-wrapper" [ngStyle]="getWrapperStyle()" [@wrapper]="getState()" (click)="backdropClick($event)"> <div class="uex-dialog-content mdl-shadow--2dp" [ngStyle]="getContentStyle()" [ngClass]="getSizeClass()"> <uex-dialog-header *ngIf="dialog.settings?.header?.title"> <uex-dialog-title>{{dialog.settings.header.title}}</uex-dialog-title> <uex-dialog-subtitle *ngIf="dialog.settings.header.subtitle">{{dialog.settings.header.subtitle}}</uex-dialog-subtitle> <uex-dialog-close *ngIf="dialog.settings.header.closable" (click)="headerCloseClick()"></uex-dialog-close> </uex-dialog-header> <ng-container #content></ng-container> </div> </div> <div class="uex-dialog-backdrop" [ngStyle]="getBackdropStyle()" [@backdrop]="getState()"></div> \x3c!--mdl-dialog__actions--\x3e ',styles:[".uex-dialog-wrapper { position: fixed; width: 100%; height: 100%; display: block; padding: 15px; opacity: 1; overflow: auto; transform: translateY(0); } .uex-dialog-wrapper .uex-dialog-content { position: absolute; max-width: calc(100% - 30px); top: 0; left: 50%; margin: 50px 0; transform: translateX(-50%); background: #FFFFFF; } .uex-dialog-wrapper .uex-dialog-content.dialog-responsive { width: 100%; } .uex-dialog-wrapper .uex-dialog-content.dialog-lg { width: 1200px; } .uex-dialog-wrapper .uex-dialog-content.dialog-md { width: 900px; } .uex-dialog-wrapper .uex-dialog-content.dialog-sm { width: 600px; } .uex-dialog-wrapper .uex-dialog-content.dialog-xs { width: 300px; } @media screen and (max-width: 768px) { .uex-dialog-wrapper .uex-dialog-content { margin: 15px 0; } } .uex-dialog-backdrop { position: fixed; top: 0; left: 0; bottom: 0; right: 0; background: rgba(0, 0, 0, 0.35); display: block; opacity: 1; } "],encapsulation:ViewEncapsulation.None,animations:[trigger("wrapper",[state("initial",style({transform:"translateY(-25%)",opacity:0,display:"none",overflow:"hidden"})),state("hidden",style({transform:"translateY(-25%)",opacity:0,display:"none",overflow:"hidden"})),state("shown",style({transform:"translateY(0)",opacity:1,display:"block",overflow:"auto"})),transition("hidden => shown",animate(".1s")),transition("shown => hidden",animate(".1s"))]),trigger("backdrop",[state("initial",style({opacity:0,display:"none"})),state("hidden",style({opacity:0,display:"none"})),state("shown",style({opacity:1,display:"block"})),transition("hidden => shown",animate(".1s")),transition("shown => hidden",animate(".1s"))])]}]}],t.ctorParameters=function(){return[]},t.propDecorators={content:[{type:ViewChild,args:["content",{read:ViewContainerRef}]}],dialog:[{type:Input,args:["dialog"]}]},t}(),DialogHeaderComponent=function(){function t(t){this.elementRef=t}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-dialog-header",template:'<div class="uex-dialog-header-content"> <ng-content></ng-content> </div> <div class="uex-dialog-header-action"> <ng-content select="uex-dialog-close"></ng-content> </div> ',styles:["uex-dialog-header { display: table; width: 100%; padding: 20px 20px 0; } uex-dialog-header .uex-dialog-header-content { display: table-cell; width: 100%; vertical-align: middle; } uex-dialog-header .uex-dialog-header-action { display: block; float: left; vertical-align: middle; } uex-dialog-header:after { display: table; content: ''; clear: both; } "],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:ElementRef}]},t}(),DialogTitleComponent=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-dialog-title",template:"<h2> <ng-content></ng-content> </h2> ",styles:["uex-dialog-title { display: table; width: 100%; margin-bottom: 5px; } uex-dialog-title > h2 { margin: 0; font-size: 1.6em; line-height: 1.2; color: #444444; } "],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t}(),DialogSubtitleComponent=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-dialog-subtitle",template:"<h3> <ng-content></ng-content> </h3> ",styles:["uex-dialog-subtitle { display: table; width: 100%; } uex-dialog-subtitle > h3 { margin: 0; font-size: 1.2em; line-height: 1.2em; color: #777777; } "],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t}(),DialogCloseComponent=function(){function t(){this.clickEvent=new EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.onClick=function(t){this.clickEvent.emit(t)},t.decorators=[{type:Component,args:[{selector:"uex-dialog-close",template:'<button type="button" uex-button mode="icon" color="dark" (click)="onClick($event)"> <uex-icon name="close"></uex-icon> </button> ',styles:["uex-dialog-close .uex-button { color: #444444; } uex-dialog-close .uex-button:disabled, uex-dialog-close .uex-button.disabled { color: #777777; } "],encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[]},t.propDecorators={clickEvent:[{type:Output,args:["click"]}]},t}(),DialogContentComponent=function(){function t(t){this.elementRef=t}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-dialog-content",template:"<ng-content></ng-content> ",styles:["uex-dialog-content { display: block; width: 100%; } "],host:{class:"mdl-dialog__content"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:ElementRef}]},t}(),DialogFooterComponent=function(){function t(t){this.elementRef=t}return t.prototype.ngOnInit=function(){},t.decorators=[{type:Component,args:[{selector:"uex-dialog-footer",template:"<ng-content></ng-content> ",styles:["uex-dialog-footer.mdl-dialog__actions { padding: 0 8px 8px 20px; } uex-dialog-footer.mdl-dialog__actions .uex-button + .uex-button:not([block]) { margin-left: 0; margin-right: 8px; } "],host:{class:"mdl-dialog__actions"},encapsulation:ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:ElementRef}]},t}(),DialogModule=function(){function t(){}return t.decorators=[{type:NgModule,args:[{declarations:[DialogWrapperComponent,DialogComponent,DialogLoadingComponent,DialogAlertComponent,DialogConfirmComponent,DialogHeaderComponent,DialogTitleComponent,DialogSubtitleComponent,DialogCloseComponent,DialogContentComponent,DialogFooterComponent],entryComponents:[DialogComponent,DialogLoadingComponent,DialogAlertComponent,DialogConfirmComponent],imports:[CommonModule,ButtonModule,GenericModule,IconModule],exports:[DialogWrapperComponent,DialogHeaderComponent,DialogTitleComponent,DialogSubtitleComponent,DialogCloseComponent,DialogContentComponent,DialogFooterComponent],providers:[DialogService,DialogRefBase,DialogParamsBase,DialogRef,DialogParams],schemas:[CUSTOM_ELEMENTS_SCHEMA]}]}],t.ctorParameters=function(){return[]},t}(),DrawerBase=function(){function t(t,e,o){this._drawers=t,this._data=e,this.index=o,this.destroyed=!1,this.onOpen=new EventEmitter,this.onDismiss=new EventEmitter,this.onClose=new EventEmitter,this.onDestroy=new EventEmitter,this.onReturnValue=new EventEmitter,t.push(this)}return Object.defineProperty(t.prototype,"visible",{get:function(){return!!this.ready&&this.componentInstance.visible},set:function(t){this.ready&&(this.componentInstance.visible=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){return!!this.componentInstance&&this.componentInstance.ready},set:function(t){this.componentInstance&&(this.componentInstance.ready=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return this._data.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){var t=new DrawerParamsBase;return t.params=this._data.params,t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settings",{get:function(){var t=this._data.settings;return t||(t={}),t.backdrop&&t.backdrop.onClick||(t.backdrop||(t.backdrop={}),t.backdrop.onClick="close"),t.header&&t.header.closable&&t.header.closeClick||(t.header||(t.header={title:null}),t.header.closable&&(t.header.closeClick="close")),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"zindex",{get:function(){return this._data.zindex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"content_zindex",{get:function(){return this._data.content_zindex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backdrop_zindex",{get:function(){return this._data.backdrop_zindex},enumerable:!0,configurable:!0}),t.prototype.sizeClass=function(){switch(this.settings.size){case"xs":return"drawer-xs";case"sm":return"drawer-sm";case"md":return"drawer-md";case"lg":return"drawer-lg";case"responsive":return"drawer-responsive";default:return"drawer-md"}},t.prototype.open=function(){var t=this;this.destroyed?console.warn("Is't possible to open a destroyed drawer."):this.ready?(this.componentInstance.visible=!0,this.onOpen.emit()):setTimeout(function(){return t.open()},100)},t.prototype.dismiss=function(){var t=this;this.ready?(this.componentInstance.visible=!1,this.onDismiss.emit()):setTimeout(function(){return t.dismiss()},100)},t.prototype.close=function(){var t=this;this.ready?(this.dismiss(),setTimeout(function(){return t._destroy()},300)):setTimeout(function(){return t.close()},100)},t.prototype.returnValue=function(t){this.onReturnValue.emit(t)},t.prototype._destroy=function(){var t,e=this;this._drawers.forEach(function(o,n){o.index==e.index&&(t=n)}),t>=0&&(this._drawers.splice(t,1),this.onClose.emit(),this.destroyed=!0)},t.decorators=[{type:Injectable}],t.ctorParameters=function(){return[{type:Array},null,null]},t}(),DrawerRefBase=function(){function t(){}return t.decorators=[{type:Injectable}],t.ctorParameters=function(){return[]},t}(),DrawerParamsBase=function(){function t(){}return t.prototype.get=function(t){return this.params?this.params[t]:null},t.decorators=[{type:Injectable}],t.ctorParameters=function(){return[]},t}(),__extends$1=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),DrawerService=function(){function t(t){this.compiler=t,this.drawers=[],this.current_index=0,this.zindex=10010,this.content_zindex=10020,this.backdrop_zindex=1e4}return t.prototype.create=function(t,e,o){e&&isPlainObject(e)||(e={});var n={component:this.compiler.resolveComponentFactory(t),params:e,settings:o,zindex:this.zindex,content_zindex:this.content_zindex,backdrop_zindex:this.backdrop_zindex};this.zindex+=100,this.content_zindex+=100,this.backdrop_zindex+=100;var r=new Drawer(this.drawers,n,this.current_index);return this.current_index++,r},t.prototype.open=function(t,e,o){e&&isPlainObject(e)||(e={});var n=this.create(t,e,o);return n.open(),n},t.decorators=[{type:Injectable}],t.ctorParameters=function(){return[{type:ComponentFactoryResolver}]},t}(),Drawer=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1(e,t),e}(DrawerBase),DrawerRef=func