|
|
|
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@abp/ng.core"),require("@abp/ng.theme.shared"),require("@angular/core"),require("@ngxs/store"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@abp/ng.permission-management",["exports","@abp/ng.core","@abp/ng.theme.shared","@angular/core","@ngxs/store","rxjs","rxjs/operators"],n):n(((e=e||self).abp=e.abp||{},e.abp.ng=e.abp.ng||{},e.abp.ng["permission-management"]={}),e.ng_core,e.ng_theme_shared,e.ng.core,e.store,e.rxjs,e.rxjs.operators)}(this,function(e,n,t,i,r,s,o){"use strict";var a=function(){return(a=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)};function p(e,n,t,i){var r,s=arguments.length,o=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,n,t,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(n,t,o):r(n,t))||o);return s>3&&o&&Object.defineProperty(n,t,o),o}function c(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function l(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,s=t.call(e),o=[];try{for(;(void 0===n||n-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=s.return)&&t.call(s)}finally{if(r)throw r.error}}return o}function u(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(l(arguments[n]));return e}var m=function(){function e(e){this.payload=e}return e.type="[PermissionManagement] Get Permissions",e}();var d=function(){function e(e){this.payload=e}return e.type="[PermissionManagement] Update Permissions",e}();var b=function(){function e(e){this.rest=e}return e.prototype.getPermissions=function(e){var n={method:"GET",url:"/api/abp/permissions",params:e};return this.rest.request(n)},e.prototype.updatePermissions=function(e){var n={method:"PUT",url:"/api/abp/permissions",body:{permissions:e.permissions},params:{providerKey:e.providerKey,providerName:e.providerName}};return this.rest.request(n)},e.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:n.RestService}]},e.ngInjectableDef=i.ɵɵdefineInjectable({factory:function(){return new e(i.ɵɵinject(n.RestService))},token:e,providedIn:"root"}),e}();var f=function(){function e(e){this.permissionManagementService=e}return e.getPermissionGroups=function(e){return e.permissionRes.groups||[]},e.getEntitiyDisplayName=function(e){return e.permissionRes.entityDisplayName},e.prototype.permissionManagementGet=function(e,n){var t=e.patchState,i=n.payload;return this.permissionManagementService.getPermissions(i).pipe(o.tap(function(e){return t({permissionRes:e})}))},e.prototype.permissionManagementUpdate=function(e,n){var t=n.payload;return this.permissionManagementService.updatePermissions(t)},p([r.Action(m),c("design:type",Function),c("design:paramtypes",[Object,m]),c("design:returntype",void 0)],e.prototype,"permissionManagementGet",null),p([r.Action(d),c("design:type",Function),c("design:paramtypes",[Object,d]),c("design:returntype",void 0)],e.prototype,"permissionManagementUpdate",null),p([r.Selector(),c("design:type",Function),c("design:paramtypes",[Object]),c("design:returntype",void 0)],e,"getPermissionGroups",null),p([r.Selector(),c("design:type",Function),c("design:paramtypes",[Object]),c("design:returntype",String)],e,"getEntitiyDisplayName",null),e=p([r.State({name:"PermissionManagementState",defaults:{permissionRes:{}}}),c("design:paramtypes",[b])],e)}();var h=function(){function e(e,n){this.store=e,this.renderer=n,this.visibleChange=new i.EventEmitter,this.permissions=[],this.selectThisTab=!1,this.selectAllTab=!1,this.modalBusy=!1,this.trackByFn=function(e,n){return n.name}}return Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this.selectedGroup&&(this._visible=e,this.v
|