You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/npm/ng-packs/dist/theme-shared/bundles/abp-ng.theme.shared.umd.min.js

2 lines
36 KiB

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@abp/ng.core"),require("@angular/core"),require("primeng/components/common/messageservice"),require("primeng/toast"),require("rxjs"),require("rxjs/operators"),require("@angular/router"),require("@ngxs/store"),require("@angular/forms"),require("@ngx-validate/core"),require("snq"),require("@angular/common/http"),require("@ngxs/router-plugin"),require("@angular/animations")):"function"==typeof define&&define.amd?define("@abp/ng.theme.shared",["exports","@abp/ng.core","@angular/core","primeng/components/common/messageservice","primeng/toast","rxjs","rxjs/operators","@angular/router","@ngxs/store","@angular/forms","@ngx-validate/core","snq","@angular/common/http","@ngxs/router-plugin","@angular/animations"],e):e(((t=t||self).abp=t.abp||{},t.abp.ng=t.abp.ng||{},t.abp.ng.theme=t.abp.ng.theme||{},t.abp.ng.theme.shared={}),t.ng_core,t.ng.core,t.messageservice,t.toast,t.rxjs,t.rxjs.operators,t.ng.router,t.store,t.ng.forms,t.core$1,t.snq,t.ng.common.http,t.routerPlugin,t.ng.animations)}(this,function(t,e,n,o,i,r,a,s,p,c,l,u,d,m,f){"use strict";u=u&&u.hasOwnProperty("default")?u.default:u;var b=function(t,e){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function h(t,e){function n(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var g=function(){return(g=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function y(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function v(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}var w=function(){function t(t,e){this.router=t,this.store=e,this.segments=[],this.show=!!this.store.selectSnapshot(function(t){return t.LeptonLayoutState})}return t.prototype.ngOnInit=function(){var t=this.router.url.split("/").filter(function(t){return t}),n=this.store.selectSnapshot(e.ConfigState.getRoute(t[0]));if(this.segments.push(n.name),t.length>1)for(var o=v(t).slice(1),i=n,r=function(t){var e=o[t];i=i.children.find(function(t){return t.path===e}),a.segments.push(i.name)},a=this,s=0;s<o.length;s++)r(s)},t.decorators=[{type:n.Component,args:[{selector:"abp-breadcrumb",template:'\n <ol *ngIf="show" class="breadcrumb">\n <li class="breadcrumb-item">\n <a routerLink="/"><i class="fa fa-home"></i> </a>\n </li>\n <li\n *ngFor="let segment of segments; let last = last"\n class="breadcrumb-item"\n [class.active]="last"\n aria-current="page"\n >\n {{ segment | abpLocalization }}\n </li>\n </ol>\n '}]}],t.ctorParameters=function(){return[{type:s.Router},{type:p.Store}]},t}();var C=function(){function t(){this.buttonClass="btn btn-primary",this.type="button",this.loading=!1,this.disabled=!1}return Object.defineProperty(t.prototype,"icon",{get:function(){return""+(this.loading?"fa fa-pulse fa-spinner":this.iconClass||"d-none")},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Component,args:[{selector:"abp-button",template:'\n <button [attr.type]="type" [ngClass]="buttonClass" [disabled]="loading || disabled">\n <i [ngClass]="icon" class="mr-1"></i><ng-content></ng-content>\n </button>\n '}]}],t.propDecorators={buttonClass:[{type:n.Input}],type:[{type:n.Input}],iconClass:[{type:n.Input}],loading:[{type:n.Input}],disabled:[{type:n.Input}]},t}();var I=function(){function t(t){this.messageService=t,this.key="abpToast",this.sticky=!1}return t.prototype.info=function(t,e,n){return this.show(t,e,"info",n)},t.prototype.success=function(t,e,n){return this.show(t,e,"success",n)},t.prototype.warn=function(t,e,n){return this.show(t,e,"warn",n)},t.prototype.error=function(t,e,n){return this.show(t,e,"error",n)},t.prototype.show=function(t,e,n,o){return this.messageService.clear(this.key),this.messageService.add(g({severity:n,detail:t||"",summary:e||""},o,{key:this.key},void 0===(o||{}).sticky&&{sticky:this.sticky})),this.status$=new r.Subject,this.status$},t.prototype.clear=function(t){this.messageService.clear(this.key),this.status$.next(t||"dismiss"),this.status$.complete()},t}();var x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.addAll=function(t){var e=this;this.messageService.addAll(t.map(function(t){return g({key:e.key},t)}))},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(o.MessageService))},token:e,providedIn:"root"}),e}(I),S=(c.Validators.minLength,c.Validators.required),k=function(){function t(t,e,o){this.fb=t,this.store=e,this.toasterService=o,this.visibleChange=new n.EventEmitter,this.modalBusy=!1}return Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(t){this._visible=t,this.visibleChange.emit(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.form=this.fb.group({password:["",S],newPassword:["",S],repeatNewPassword:["",S]},{validators:[l.comparePasswords(["newPassword","repeatNewPassword"])]})},t.prototype.onSubmit=function(){var t=this;this.form.invalid||(this.modalBusy=!0,this.store.dispatch(new e.ChangePassword({currentPassword:this.form.get("password").value,newPassword:this.form.get("newPassword").value})).pipe(a.finalize(function(){t.modalBusy=!1})).subscribe({next:function(){t.visible=!1,t.form.reset()},error:function(e){t.toasterService.error(u(function(){return e.error.error.message},"AbpAccount::DefaultErrorMessage"),"Error",{life:7e3})}}))},t.prototype.openModal=function(){this.visible=!0},t.prototype.ngOnChanges=function(t){var e=t.visible;e&&(e.currentValue?this.openModal():!1===e.currentValue&&this.visible&&(this.visible=!1))},t.decorators=[{type:n.Component,args:[{selector:"abp-change-password",template:'<abp-modal [(visible)]="visible" [busy]="modalBusy">\n <ng-template #abpHeader>\n <h4>{{ \'AbpIdentity::ChangePassword\' | abpLocalization }}</h4>\n </ng-template>\n <ng-template #abpBody>\n <form [formGroup]="form" (ngSubmit)="onSubmit()">\n <div class="form-group">\n <label for="current-password">{{ \'AbpIdentity::DisplayName:CurrentPassword\' | abpLocalization }}</label\n ><span> * </span\n ><input type="password" id="current-password" class="form-control" formControlName="password" autofocus />\n </div>\n <div class="form-group">\n <label for="new-password">{{ \'AbpIdentity::DisplayName:NewPassword\' | abpLocalization }}</label\n ><span> * </span><input type="password" id="new-password" class="form-control" formControlName="newPassword" />\n </div>\n <div class="form-group" [class.is-invalid]="form.errors?.passwordMismatch">\n <label for="confirm-new-password">{{ \'AbpIdentity::DisplayName:NewPasswordConfirm\' | abpLocalization }}</label\n ><span> * </span\n ><input type="password" id="confirm-new-password" class="form-control" formControlName="repeatNewPassword" />\n <div *ngIf="form.errors?.passwordMismatch" class="invalid-feedback">\n {{ \'AbpIdentity::Identity.PasswordConfirmationFailed\' | abpLocalization }}\n </div>\n </div>\n </form>\n </ng-template>\n <ng-template #abpFooter>\n <button type="button" class="btn btn-secondary color-white" #abpClose>\n {{ \'AbpIdentity::Cancel\' | abpLocalization }}\n </button>\n <abp-button iconClass="fa fa-check" buttonClass="btn btn-primary color-white" (click)="onSubmit()">{{ \'AbpIdentity::Save\' | abpLocalization }}</abp-button>\n </ng-template>\n</abp-modal>\n'}]}],t.ctorParameters=function(){return[{type:c.FormBuilder},{type:p.Store},{type:x}]},t.propDecorators={visible:[{type:n.Input}],visibleChange:[{type:n.Output}],modalContent:[{type:n.ViewChild,args:["modalContent",{static:!1}]}]},t}();var E=new r.ReplaySubject(1),L=function(){function t(t,e){var o=this;this.el=t,this.cdRef=e,this.options={},this.plugins=[],this.responsive=!0,this.onDataSelect=new n.EventEmitter,this.initialized=new r.BehaviorSubject(this),this.onCanvasClick=function(t){if(o.chart){var e=o.chart.getElementAtEvent(t),n=o.chart.getDatasetAtEvent(t);e&&e[0]&&n&&o.onDataSelect.emit({originalEvent:t,element:e[0],dataset:n})}},this.initChart=function(){var t=o.options||{};t.responsive=o.responsive,t.responsive&&(o.height||o.width)&&(t.maintainAspectRatio=!1),o.chart=new Chart(o.el.nativeElement.children[0].children[0],{type:o.type,data:o.data,options:o.options,plugins:o.plugins}),o.cdRef.detectChanges()},this.generateLegend=function(){if(o.chart)return o.chart.generateLegend()},this.refresh=function(){o.chart&&(o.chart.update(),o.cdRef.detectChanges())},this.reinit=function(){o.chart&&(o.chart.destroy(),o.initChart())}}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(t){this._data=t,this.reinit()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canvas",{get:function(){return this.el.nativeElement.children[0].children[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"base64Image",{get:function(){return this.chart.toBase64Image()},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var t=this;E.subscribe(function(){try{Chart}catch(t){return void console.error("Chart is not found. Import the Chart from app.module like shown below:\n import('chart.js');\n ")}t.initChart(),t._initialized=!0})},t.prototype.ngOnDestroy=function(){this.chart&&(this.chart.destroy(),this._initialized=!1,this.chart=null)},t.decorators=[{type:n.Component,args:[{selector:"abp-chart",template:'<div\n style="position:relative"\n [style.width]="responsive && !width ? null : width"\n [style.height]="responsive && !height ? null : height"\n>\n <canvas\n [attr.width]="responsive && !width ? null : width"\n [attr.height]="responsive && !height ? null : height"\n (click)="onCanvasClick($event)"\n ></canvas>\n</div>\n'}]}],t.ctorParameters=function(){return[{type:n.ElementRef},{type:n.ChangeDetectorRef}]},t.propDecorators={type:[{type:n.Input}],options:[{type:n.Input}],plugins:[{type:n.Input}],width:[{type:n.Input}],height:[{type:n.Input}],responsive:[{type:n.Input}],onDataSelect:[{type:n.Output}],initialized:[{type:n.Output}],data:[{type:n.Input}]},t}();var P=function(t){function e(e){var n=t.call(this,e)||this;return n.messageService=e,n.key="abpConfirmation",n.sticky=!0,n.destroy$=new r.Subject,n}return h(e,t),e.prototype.show=function(e,n,o,i){return this.listenToEscape(),t.prototype.show.call(this,e,n,o,i)},e.prototype.clear=function(e){t.prototype.clear.call(this,e),this.destroy$.next()},e.prototype.listenToEscape=function(){var t=this;r.fromEvent(document,"keyup").pipe(a.takeUntil(this.destroy$),a.debounceTime(150),a.filter(function(t){return t&&"Escape"===t.code})).subscribe(function(e){t.clear()})},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:o.MessageService}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(o.MessageService))},token:e,providedIn:"root"}),e}(I);var j=function(){function t(t){this.confirmationService=t,this.confirm="confirm",this.reject="reject",this.dismiss="dismiss"}return t.prototype.close=function(t){this.confirmationService.clear(t)},t.decorators=[{type:n.Component,args:[{selector:"abp-confirmation",template:'\n <p-toast\n position="center"\n key="abpConfirmation"\n (onClose)="close(dismiss)"\n [modal]="true"\n [baseZIndex]="1000"\n styleClass="abp-confirm"\n >\n <ng-template let-message pTemplate="message">\n <i class="fa fa-exclamation-circle abp-confirm-icon"></i>\n <div *ngIf="message.summary" class="abp-confirm-summary">\n {{ message.summary | abpLocalization: message.titleLocalizationParams }}\n </div>\n <div class="abp-confirm-body">\n {{ message.detail | abpLocalization: message.messageLocalizationParams }}\n </div>\n\n <div class="abp-confirm-footer justify-content-center">\n <button *ngIf="!message.hideCancelBtn" type="button" class="btn btn-sm btn-primary" (click)="close(reject)">\n {{ message.cancelCopy || \'AbpIdentity::Cancel\' | abpLocalization }}\n </button>\n <button\n *ngIf="!message.hideYesBtn"\n type="button"\n class="btn btn-sm btn-primary"\n (click)="close(confirm)"\n autofocus\n >\n <span>{{ message.yesCopy || \'AbpIdentity::Yes\' | abpLocalization }}</span>\n </button>\n </div>\n </ng-template>\n </p-toast>\n '}]}],t.ctorParameters=function(){return[{type:P}]},t}();var O=function(){function t(){this.title="Oops!",this.details="Sorry, an error has occured."}return t.prototype.destroy=function(){this.renderer.removeChild(this.host,this.elementRef.nativeElement)},t.decorators=[{type:n.Component,args:[{selector:"abp-error",template:'\n <div class="error">\n <button id="abp-close-button mr-2" type="button" class="close" (click)="destroy()">\n <span aria-hidden="true">&times;</span>\n </button>\n <div class="row centered">\n <div class="col-md-12">\n <div class="error-template">\n <h1>\n {{ title | abpLocalization }}\n </h1>\n <div class="error-details">\n {{ details | abpLocalization }}\n </div>\n <div class="error-actions">\n <a (click)="destroy()" routerLink="/" class="btn btn-primary btn-md mt-2"\n ><span class="glyphicon glyphicon-home"></span> {{ \'::Menu:Home\' | abpLocalization }}\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n ',styles:[".error{position:fixed;top:0;background-color:#fff;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}"]}]}],t}();var z=function(){function t(t,n,o){var i=this;this.actions=t,this.router=n,this.cdRef=o,this.containerClass="abp-loader-bar",this.color="#77b6ff",this.isLoading=!1,this.filter=function(t){return t.payload.url.indexOf("openid-configuration")<0},this.progressLevel=0,t.pipe(p.ofActionSuccessful(e.StartLoader,e.StopLoader),a.filter(this.filter),l.takeUntilDestroy(this)).subscribe(function(t){t instanceof e.StartLoader?i.startLoading():i.stopLoading()}),n.events.pipe(a.filter(function(t){return t instanceof s.NavigationStart||t instanceof s.NavigationEnd||t instanceof s.NavigationError}),l.takeUntilDestroy(this)).subscribe(function(t){t instanceof s.NavigationStart?i.startLoading():i.stopLoading()})}return Object.defineProperty(t.prototype,"boxShadow",{get:function(){return"0 0 10px rgba("+this.color+", 0.5)"},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.interval.unsubscribe()},t.prototype.startLoading=function(){var t=this;this.isLoading||0!==this.progressLevel||(this.isLoading=!0,this.interval=r.interval(350).subscribe(function(){t.progressLevel<75?t.progressLevel+=10*Math.random():t.progressLevel<90?t.progressLevel+=.4:t.progressLevel<100?t.progressLevel+=.1:t.interval.unsubscribe(),t.cdRef.detectChanges()}))},t.prototype.stopLoading=function(){var t=this;this.interval.unsubscribe(),this.progressLevel=100,this.isLoading=!1,this.timer&&!this.timer.closed||(this.timer=r.timer(820).subscribe(function(){t.progressLevel=0,t.cdRef.detectChanges()}))},t.decorators=[{type:n.Component,args:[{selector:"abp-loader-bar",template:'\n <div id="abp-loader-bar" [ngClass]="containerClass" [class.is-loading]="isLoading">\n <div\n class="abp-progress"\n [style.width.vw]="progressLevel"\n [ngStyle]="{\n \'background-color\': color,\n \'box-shadow\': boxShadow\n }"\n ></div>\n </div>\n ',styles:[".abp-loader-bar{left:0;opacity:0;position:fixed;top:0;transition:opacity .4s linear .4s;z-index:99999}.abp-loader-bar.is-loading{opacity:1;transition:none}.abp-loader-bar .abp-progress{height:3px;left:0;position:fixed;top:0;transition:width .4s}"]}]}],t.ctorParameters=function(){return[{type:p.Actions},{type:s.Router},{type:n.ChangeDetectorRef}]},t.propDecorators={containerClass:[{type:n.Input}],color:[{type:n.Input}],isLoading:[{type:n.Input}],filter:[{type:n.Input}]},t}();var A=function(){function t(t,e){this.renderer=t,this.confirmationService=e,this.centered=!1,this.modalClass="",this.size="lg",this.visibleChange=new n.EventEmitter,this.init=new n.EventEmitter,this.show=new n.EventEmitter,this.hide=new n.EventEmitter,this._visible=!1,this._busy=!1,this.showModal=!1,this.isOpenConfirmation=!1,this.closable=!1,this.destroy$=new r.Subject}return Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(t){var e=this;"boolean"==typeof t&&(this.modalContent?t?(this.setVisible(t),this.listen()):(this.closable=!1,this.renderer.addClass(this.modalContent.nativeElement,"fade-out-top"),setTimeout(function(){e.setVisible(t),e.ngOnDestroy()},190)):t&&setTimeout(function(){e.showModal=t,e.visible=t},0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"busy",{get:function(){return this._busy},set:function(t){this.abpSubmit&&this.abpSubmit instanceof C&&(this.abpSubmit.loading=t),this._busy=t},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.destroy$.next()},t.prototype.setVisible=function(t){var e=this;this._visible=t,this.visibleChange.emit(t),this.showModal=t,t?(r.timer(300).pipe(a.take(1)).subscribe(function(t){return e.closable=!0}),this.renderer.addClass(document.body,"modal-open"),this.show.emit()):(this.closable=!1,this.renderer.removeClass(document.body,"modal-open"),this.hide.emit())},t.prototype.listen=function(){var t=this;r.fromEvent(document,"keyup").pipe(a.takeUntil(this.destroy$),a.debounceTime(150),a.filter(function(e){return e&&"Escape"===e.code&&t.closable})).subscribe(function(e){t.close()}),setTimeout(function(){t.abpClose&&r.fromEvent(t.abpClose.nativeElement,"click").pipe(a.takeUntil(t.destroy$),a.filter(function(){return!(!t.closable||!t.modalContent)})).subscribe(function(){return t.close()})},0),this.init.emit()},t.prototype.close=function(){var t=this;if(this.closable&&!this.busy)if(function(t){return t.findIndex(function(t){return(t.className||"").indexOf("ng-dirty")>-1})>-1}(function t(e){return Array.from(e).reduce(function(e,n){return function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(v(arguments[e]));return t}(e,n.childNodes&&n.childNodes.length?t(n.childNodes):[n])},[])}(this.modalContent.nativeElement.querySelector("#abp-modal-body").childNodes))){if(this.isOpenConfirmation)return;this.isOpenConfirmation=!0,this.confirmationService.warn("AbpAccount::AreYouSureYouWantToCancelEditingWarningMessage","AbpAccount::AreYouSure").subscribe(function(e){r.timer(200).subscribe(function(){t.isOpenConfirmation=!1}),"confirm"===e&&(t.visible=!1)})}else this.visible=!1},t.decorators=[{type:n.Component,args:[{selector:"abp-modal",template:'<div\n *ngIf="showModal"\n (click)="close()"\n id="abp-modal"\n class="modal fade {{ modalClass }} d-block show"\n [style.padding-right.px]="\'15\'"\n>\n <div\n id="abp-modal-container"\n class="modal-dialog modal-{{ size }} fade-in-top"\n tabindex="-1"\n [class.modal-dialog-centered]="centered"\n #abpModalContent\n >\n <div #content id="abp-modal-content" class="modal-content" (click)="$event.stopPropagation()">\n <div id="abp-modal-header" class="modal-header">\n <ng-container *ngTemplateOutlet="abpHeader"></ng-container>\n\n <button id="abp-modal-close-button" type="button" class="close" (click)="close()">\n <span aria-hidden="true">&times;</span>\n </button>\n </div>\n <div\n id="abp-modal-body"\n class="modal-body"\n [style.height]="height || undefined"\n [style.minHeight]="minHeight || undefined"\n >\n <ng-container *ngTemplateOutlet="abpBody"></ng-container>\n </div>\n <div id="abp-modal-footer" class="modal-footer">\n <ng-container *ngTemplateOutlet="abpFooter"></ng-container>\n </div>\n </div>\n </div>\n\n <ng-content></ng-content>\n</div>\n'}]}],t.ctorParameters=function(){return[{type:n.Renderer2},{type:P}]},t.propDecorators={visible:[{type:n.Input}],busy:[{type:n.Input}],centered:[{type:n.Input}],modalClass:[{type:n.Input}],size:[{type:n.Input}],height:[{type:n.Input}],minHeight:[{type:n.Input}],visibleChange:[{type:n.Output}],init:[{type:n.Output}],abpHeader:[{type:n.ContentChild,args:["abpHeader",{static:!1}]}],abpBody:[{type:n.ContentChild,args:["abpBody",{static:!1}]}],abpFooter:[{type:n.ContentChild,args:["abpFooter",{static:!1}]}],abpClose:[{type:n.ContentChild,args:["abpClose",{static:!1,read:n.ElementRef}]}],abpSubmit:[{type:n.ContentChild,args:[C,{static:!1,read:C}]}],modalContent:[{type:n.ViewChild,args:["abpModalContent",{static:!1}]}],abpButtons:[{type:n.ViewChildren,args:["abp-button"]}],show:[{type:n.Output}],hide:[{type:n.Output}]},t}();var R=c.Validators.maxLength,N=c.Validators.required,D=c.Validators.email,M=function(){function t(t,e){this.fb=t,this.store=e,this.visibleChange=new n.EventEmitter,this.modalBusy=!1}return Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(t){this._visible=t,this.visibleChange.emit(t)},enumerable:!0,configurable:!0}),t.prototype.buildForm=function(){var t=this;this.store.dispatch(new e.GetProfile).pipe(a.withLatestFrom(this.profile$),a.take(1)).subscribe(function(e){var n=v(e,2)[1];t.form=t.fb.group({userName:[n.userName,[N,R(256)]],email:[n.email,[N,D,R(256)]],name:[n.name||"",[R(64)]],surname:[n.surname||"",[R(64)]],phoneNumber:[n.phoneNumber||"",[R(16)]]})})},t.prototype.submit=function(){var t=this;this.form.invalid||(this.modalBusy=!0,this.store.dispatch(new e.UpdateProfile(this.form.value)).subscribe(function(){t.modalBusy=!1,t.visible=!1,t.form.reset()}))},t.prototype.openModal=function(){this.buildForm(),this.visible=!0},t.prototype.ngOnChanges=function(t){var e=t.visible;e&&(e.currentValue?this.openModal():!1===e.currentValue&&this.visible&&(this.visible=!1))},t.decorators=[{type:n.Component,args:[{selector:"abp-profile",template:'<abp-modal [(visible)]="visible" [busy]="modalBusy">\n <ng-template #abpHeader>\n <h4>{{ \'AbpIdentity::PersonalInfo\' | abpLocalization }}</h4>\n </ng-template>\n <ng-template #abpBody>\n <form novalidate *ngIf="form" [formGroup]="form" (ngSubmit)="submit()">\n <div class="form-group">\n <label for="username">{{ \'AbpIdentity::DisplayName:UserName\' | abpLocalization }}</label\n ><span> * </span><input type="text" id="username" class="form-control" formControlName="userName" autofocus />\n </div>\n <div class="row">\n <div class="col col-md-6">\n <div class="form-group">\n <label for="name">{{ \'AbpIdentity::DisplayName:Name\' | abpLocalization }}</label\n ><input type="text" id="name" class="form-control" formControlName="name" />\n </div>\n </div>\n <div class="col col-md-6">\n <div class="form-group">\n <label for="surname">{{ \'AbpIdentity::DisplayName:Surname\' | abpLocalization }}</label\n ><input type="text" id="surname" class="form-control" formControlName="surname" />\n </div>\n </div>\n </div>\n <div class="form-group">\n <label for="email-address">{{ \'AbpIdentity::DisplayName:Email\' | abpLocalization }}</label\n ><span> * </span><input type="text" id="email-address" class="form-control" formControlName="email" />\n </div>\n <div class="form-group">\n <label for="phone-number">{{ \'AbpIdentity::DisplayName:PhoneNumber\' | abpLocalization }}</label\n ><input type="text" id="phone-number" class="form-control" formControlName="phoneNumber" />\n </div>\n </form>\n </ng-template>\n <ng-template #abpFooter>\n <button #abpClose type="button" class="btn btn-secondary color-white">\n {{ \'AbpIdentity::Cancel\' | abpLocalization }}\n </button>\n <abp-button iconClass="fa fa-check" buttonClass="btn btn-primary color-white" (click)="submit()">{{ \'AbpIdentity::Save\' | abpLocalization }}</abp-button>\n </ng-template>\n</abp-modal>\n'}]}],t.ctorParameters=function(){return[{type:c.FormBuilder},{type:p.Store}]},t.propDecorators={visible:[{type:n.Input}],visibleChange:[{type:n.Output}]},function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);r>3&&a&&Object.defineProperty(e,n,a)}([p.Select(e.ProfileState.getProfile),y("design:type",r.Observable)],t.prototype,"profile$",void 0),t}();var T=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"abp-toast",template:'\n <p-toast position="bottom-right" key="abpToast" styleClass="abp-toast" [baseZIndex]="1000">\n <ng-template let-message pTemplate="message">\n <span\n class="ui-toast-icon pi"\n [ngClass]="{\n \'pi-info-circle\': message.severity == \'info\',\n \'pi-exclamation-triangle\': message.severity == \'warn\',\n \'pi-times\': message.severity == \'error\',\n \'pi-check\': message.severity == \'success\'\n }"\n ></span>\n <div class="ui-toast-message-text-content">\n <div class="ui-toast-summary">{{ message.summary | abpLocalization: message.titleLocalizationParams }}</div>\n <div class="ui-toast-detail">{{ message.detail | abpLocalization: message.messageLocalizationParams }}</div>\n </div>\n </ng-template>\n </p-toast>\n '}]}],t}(),_='\n.is-invalid .form-control {\n border-color: #dc3545;\n border-style: solid !important;\n}\n\n.is-invalid .invalid-feedback,\n.is-invalid + * .invalid-feedback {\n display: block;\n}\n\n.data-tables-filter {\n text-align: right;\n}\n\n.pointer {\n cursor: pointer;\n}\n\n.navbar .dropdown-submenu a::after {\n transform: rotate(-90deg);\n position: absolute;\n right: 16px;\n top: 18px;\n}\n\n.navbar .dropdown-menu {\n min-width: 215px;\n}\n\n.modal {\n background-color: rgba(0, 0, 0, .6);\n}\n\n.abp-ellipsis-inline {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.abp-ellipsis {\n overflow: hidden !important;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.abp-toast .ui-toast-message {\n box-sizing: border-box !important;\n border: 2px solid transparent !important;\n border-radius: 4px !important;\n background-color: #f4f4f7 !important;\n color: #1b1d29 !important;\n}\n\n.abp-toast .ui-toast-message-content {\n padding: 10px !important;\n}\n\n.abp-toast .ui-toast-message-content .ui-toast-icon {\n top: 0 !important;\n left: 0 !important;\n padding: 10px !important;\n}\n\n.abp-toast .ui-toast-summary {\n margin: 0 !important;\n font-weight: 700 !important;\n}\n\n.abp-toast .ui-toast-message.ui-toast-message-error {\n border-color: #ba1659 !important;\n}\n\n.abp-toast .ui-toast-message.ui-toast-message-error .ui-toast-message-content .ui-toast-icon {\n color: #ba1659 !important;\n}\n\n.abp-toast .ui-toast-message.ui-toast-message-warning {\n border-color: #ed5d98 !important;\n}\n\n.abp-toast .ui-toast-message.ui-toast-message-warning .ui-toast-message-content .ui-toast-icon {\n color: #ed5d98 !important;\n}\n\n.abp-toast .ui-toast-message.ui-toast-message-success {\n border-color: #1c9174 !important;\n}\n\n.abp-toast .ui-toast-message.ui-toast-message-success .ui-toast-message-content .ui-toast-icon {\n color: #1c9174 !important;\n}\n\n.abp-toast .ui-toast-message.ui-toast-message-info {\n border-color: #fccb31 !important;\n}\n\n.abp-toast .ui-toast-message.ui-toast-message-info .ui-toast-message-content .ui-toast-icon {\n color: #fccb31 !important;\n}\n\n.abp-confirm .ui-toast-message {\n box-sizing: border-box !important;\n padding: 0px !important;\n border:0 none !important;\n border-radius: 4px !important;\n background-color: #fff !important;\n color: rgba(0, 0, 0, .65) !important;\n font-family: "Poppins", sans-serif;\n text-align: center !important;\n}\n\n.abp-confirm .ui-toast-message-content {\n padding: 0px !important;\n}\n\n.abp-confirm .abp-confirm-icon {\n margin: 32px 50px 5px !important;\n color: #f8bb86 !important;\n font-size: 52px !important;\n}\n\n.abp-confirm .ui-toast-close-icon {\n display: none !important;\n}\n\n.abp-confirm .abp-confirm-summary {\n display: block !important;\n margin-bottom: 13px !important;\n padding: 13px 16px 0px !important;\n font-weight: 600 !important;\n font-size: 18px !important;\n}\n\n.abp-confirm .abp-confirm-body {\n display: inline-block !important;\n padding: 0px 10px !important;\n}\n\n.abp-confirm .abp-confirm-footer {\n display: block !important;\n margin-top: 30px !important;\n padding: 16px !important;\n background-color: #f4f4f7 !important;\n text-align: right !important;\n}\n\n.abp-confirm .abp-confirm-footer .btn {\n margin-left: 10px !important;\n}\n\n.ui-widget-overlay {\n z-index: 1000;\n}\n\n/* <animations */\n\n.fade-in-top {\n animation: fadeInTop 0.2s ease-in-out;\n}\n\n.fade-out-top {\n animation: fadeOutTop 0.2s ease-in-out;\n}\n\n\n@keyframes fadeInTop {\n from {\n transform: translateY(-5px);\n opacity: 0;\n }\n\n to {\n transform: translateY(5px);\n opacity: 1;\n }\n}\n\n@keyframes fadeOutTop {\n to {\n transform: translateY(-5px);\n opacity: 0;\n }\n}\n\n/* </animations */\n\n',B={defaultError:{message:"An error has occurred!",details:"Error detail not sent by server."},defaultError401:{message:"You are not authenticated!",details:"You should be authenticated (sign in) in order to perform this operation."},defaultError403:{message:"You are not authorized!",details:"You are not allowed to perform this operation."},defaultError404:{message:"Resource not found!",details:"The resource requested could not found on the server."}},F=function(){function t(t,n,o,i,r,a,s){var c=this;this.actions=t,this.store=n,this.confirmationService=o,this.appRef=i,this.cfRes=r,this.rendererFactory=a,this.injector=s,t.pipe(p.ofActionSuccessful(e.RestOccurError)).subscribe(function(t){var e=t.payload,n=void 0===e?{}:e,o=u(function(){return n.error.error},B.defaultError.message);if(n instanceof d.HttpErrorResponse&&n.headers.get("_AbpErrorFormat")){var i=c.showError(null,null,o);401===n.status&&i.subscribe(function(){c.navigateToLogin()})}else switch(n.status){case 401:c.showError(B.defaultError401.details,B.defaultError401.message).subscribe(function(){return c.navigateToLogin()});break;case 403:c.createErrorComponent({title:B.defaultError403.message,details:B.defaultError403.details});break;case 404:c.showError(B.defaultError404.details,B.defaultError404.message);break;case 500:c.createErrorComponent({title:"500",details:"AbpAccount::InternalServerErrorMessage"});break;case 0:"Unknown Error"===n.statusText&&c.createErrorComponent({title:"Unknown Error",details:"AbpAccount::InternalServerErrorMessage"});break;default:c.showError(B.defaultError.details,B.defaultError.message)}})}return t.prototype.showError=function(t,e,n){return n&&(n.details?(t=n.details,e=n.message):t=n.message||B.defaultError.message),this.confirmationService.error(t,e,{hideCancelBtn:!0,yesCopy:"OK"})},t.prototype.navigateToLogin=function(){this.store.dispatch(new m.Navigate(["/account/login"],null,{state:{redirectUrl:this.store.selectSnapshot(m.RouterState).state.url}}))},t.prototype.createErrorComponent=function(t){var e=this.rendererFactory.createRenderer(null,null),n=e.selectRootElement("app-root",!0),o=this.cfRes.resolveComponentFactory(O).create(this.injector);for(var i in o.instance)o.instance.hasOwnProperty(i)&&(o.instance[i]=t[i]);this.appRef.attachView(o.hostView),e.appendChild(n,o.hostView.rootNodes[0]),o.instance.renderer=e,o.instance.elementRef=o.location,o.instance.host=n},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:p.Actions},{type:p.Store},{type:P},{type:n.ApplicationRef},{type:n.ComponentFactoryResolver},{type:n.RendererFactory2},{type:n.Injector}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(p.Actions),n.ɵɵinject(p.Store),n.ɵɵinject(P),n.ɵɵinject(n.ApplicationRef),n.ɵɵinject(n.ComponentFactoryResolver),n.ɵɵinject(n.RendererFactory2),n.ɵɵinject(n.INJECTOR))},token:t,providedIn:"root"}),t}();var q=function(){function t(){this.colspan=2,this.localizationResource="AbpAccount",this.localizationProp="NoDataAvailableInDatatable"}return Object.defineProperty(t.prototype,"emptyMessage",{get:function(){return this.message||this.localizationResource+"::"+this.localizationProp},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Component,args:[{selector:"[abp-table-empty-message]",template:'\n <td class="text-center" [attr.colspan]="colspan">\n {{ emptyMessage | abpLocalization }}\n </td>\n '}]}],t.propDecorators={colspan:[{type:n.Input}],message:[{type:n.Input}],localizationResource:[{type:n.Input}],localizationProp:[{type:n.Input}]},t}();function V(t){return function(){import("chart.js").then(function(){return E.next(!0)});var n=t.get(e.LazyLoadService);return r.forkJoin(n.load(null,"style",_,"head","afterbegin")).pipe(a.take(1))}}var $,Y,H=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[{provide:n.APP_INITIALIZER,multi:!0,deps:[n.Injector,F],useFactory:V},{provide:o.MessageService,useClass:o.MessageService}]}},t.decorators=[{type:n.NgModule,args:[{imports:[e.CoreModule,i.ToastModule],declarations:[w,C,k,L,j,O,z,A,M,q,T],exports:[w,C,k,L,j,z,A,M,q,T],entryComponents:[O]}]}],t}(),U=f.trigger("collapse",[f.state("open",f.style({height:"*",overflow:"hidden"})),f.state("close",f.style({height:"0px",overflow:"hidden"})),f.transition("open <=> close",f.animate("{{duration}}ms"),{params:{duration:"350"}})]),G=f.trigger("fade",[f.state("void",f.style({opacity:1})),f.transition(":enter",[f.style({opacity:0}),f.animate(250)]),f.transition(":leave",f.animate(250,f.style({opacity:0})))]),J=f.trigger("fadeInOut",[f.state("out",f.style({opacity:0})),f.state("in",f.style({opacity:1})),f.transition("in <=> out",[f.animate(250)])]),W=f.trigger("fadeIn",[f.state("*",f.style({opacity:1})),f.transition("* => *",[f.style({opacity:0}),f.animate(250)]),f.transition(":enter",[f.style({opacity:0}),f.animate(250)])]),Z=f.trigger("routeAnimations",[f.state("void",f.style({"margin-top":"20px",opacity:"0"})),f.state("*",f.style({"margin-top":"0px",opacity:"1"})),f.transition(":enter",[f.animate("0.2s ease-out",f.style({opacity:"1","margin-top":"0px"}))])]);!function(t){function e(){}t.Options=e}($||($={})),function(t){function e(){}function n(){}t.Response=e,t.Data=function(){},t.Filter=n}(Y||(Y={})),function(e){function n(){}(t.Toaster||(t.Toaster={})).Options=n}(),t.BreadcrumbComponent=w,t.ButtonComponent=C,t.ChangePasswordComponent=k,t.ChartComponent=L,t.ConfirmationComponent=j,t.ConfirmationService=P,t.LoaderBarComponent=z,t.ModalComponent=A,t.ProfileComponent=M,t.TableEmptyMessageComponent=q,t.ThemeSharedModule=H,t.ToastComponent=T,t.ToasterService=x,t.appendScript=V,t.chartJsLoaded$=E,t.collapse=U,t.fade=G,t.fadeIn=W,t.fadeWithStates=J,t.getRandomBackgroundColor=function(t){for(var e=[],n=0;n<t;n++){var o=(n+5)*(n+5)*474%255,i=(n+5)*(n+5)*1600%255,r=(n+5)*(n+5)*84065%255;e.push("rgba("+o+", "+i+", "+r+", 0.7)")}return e},t.slideFromBottom=Z,t.ɵa=w,t.ɵb=C,t.ɵc=k,t.ɵd=x,t.ɵe=I,t.ɵf=L,t.ɵg=j,t.ɵh=P,t.ɵi=O,t.ɵj=z,t.ɵk=A,t.ɵl=M,t.ɵm=q,t.ɵn=T,t.ɵo=F,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=abp-ng.theme.shared.umd.min.js.map