@volo/abp.ng.identity 5.0.0-rc.1 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/config/handlers/link-login.handler.d.ts +3 -2
- package/config/package.json +5 -5
- package/esm2020/config/components/identity-settings.component.mjs +94 -0
- package/esm2020/config/components/index.mjs +3 -0
- package/esm2020/config/components/my-link-users-modal.component.mjs +136 -0
- package/esm2020/config/enums/index.mjs +4 -0
- package/esm2020/config/enums/policy-names.mjs +2 -0
- package/esm2020/config/enums/route-names.mjs +2 -0
- package/esm2020/config/enums/setting-tab-names.mjs +2 -0
- package/esm2020/config/handlers/link-login.handler.mjs +70 -0
- package/esm2020/config/identity-config.module.mjs +37 -0
- package/esm2020/config/models/identity-settings.mjs +2 -0
- package/esm2020/config/models/index.mjs +2 -0
- package/esm2020/config/providers/index.mjs +3 -0
- package/esm2020/config/providers/route.provider.mjs +56 -0
- package/esm2020/config/providers/setting-tab.provider.mjs +24 -0
- package/esm2020/config/public-api.mjs +8 -0
- package/esm2020/config/services/identity-config.service.mjs +32 -0
- package/esm2020/config/services/identity-link-login.service.mjs +40 -0
- package/esm2020/config/services/index.mjs +3 -0
- package/esm2020/config/utils/factories.mjs +14 -0
- package/esm2020/config/volo-abp.ng.identity-config.mjs +5 -0
- package/esm2020/lib/components/claim-modal/claim-modal.component.mjs +92 -0
- package/esm2020/lib/components/claims/claims.component.mjs +114 -0
- package/esm2020/lib/components/index.mjs +12 -0
- package/esm2020/lib/components/organization-units/abstract-organization-unit/abstract-organization-unit.component.mjs +77 -0
- package/esm2020/lib/components/organization-units/organization-members/organization-members-modal-body.component.mjs +110 -0
- package/esm2020/lib/components/organization-units/organization-members/organization-members.component.mjs +50 -0
- package/esm2020/lib/components/organization-units/organization-roles/organization-roles-modal-body.component.mjs +78 -0
- package/esm2020/lib/components/organization-units/organization-roles/organization-roles.component.mjs +50 -0
- package/esm2020/lib/components/organization-units/organization-units.component.mjs +147 -0
- package/esm2020/lib/components/roles/roles.component.mjs +125 -0
- package/esm2020/lib/components/security-logs/security-logs.component.mjs +52 -0
- package/esm2020/lib/components/users/users.component.mjs +247 -0
- package/esm2020/lib/defaults/default-claims-entity-actions.mjs +22 -0
- package/esm2020/lib/defaults/default-claims-entity-props.mjs +49 -0
- package/esm2020/lib/defaults/default-claims-form-props.mjs +52 -0
- package/esm2020/lib/defaults/default-claims-toolbar-actions.mjs +14 -0
- package/esm2020/lib/defaults/default-organization-members-entity-actions.mjs +14 -0
- package/esm2020/lib/defaults/default-organization-members-entity-props.mjs +23 -0
- package/esm2020/lib/defaults/default-organization-roles-entity-actions.mjs +14 -0
- package/esm2020/lib/defaults/default-organization-roles-entity-props.mjs +10 -0
- package/esm2020/lib/defaults/default-organization-units-form-props.mjs +13 -0
- package/esm2020/lib/defaults/default-organization-units-toolbar-actions.mjs +3 -0
- package/esm2020/lib/defaults/default-roles-entity-actions.mjs +48 -0
- package/esm2020/lib/defaults/default-roles-entity-props.mjs +24 -0
- package/esm2020/lib/defaults/default-roles-form-props.mjs +28 -0
- package/esm2020/lib/defaults/default-roles-toolbar-actions.mjs +14 -0
- package/esm2020/lib/defaults/default-security-logs-entity-actions.mjs +3 -0
- package/esm2020/lib/defaults/default-security-logs-entity-props.mjs +131 -0
- package/esm2020/lib/defaults/default-security-logs-toolbar-actions.mjs +3 -0
- package/esm2020/lib/defaults/default-users-entity-actions.mjs +104 -0
- package/esm2020/lib/defaults/default-users-entity-props.mjs +116 -0
- package/esm2020/lib/defaults/default-users-form-props.mjs +64 -0
- package/esm2020/lib/defaults/default-users-toolbar-actions.mjs +14 -0
- package/esm2020/lib/enums/components.mjs +2 -0
- package/esm2020/lib/enums/index.mjs +3 -0
- package/esm2020/lib/enums/two-factor-behaviour.mjs +9 -0
- package/esm2020/lib/guards/extensions.guard.mjs +38 -0
- package/esm2020/lib/guards/index.mjs +2 -0
- package/esm2020/lib/identity-routing.module.mjs +89 -0
- package/esm2020/lib/identity.module.mjs +155 -0
- package/esm2020/lib/models/config-options.mjs +2 -0
- package/esm2020/lib/models/identity.mjs +2 -0
- package/esm2020/lib/models/index.mjs +3 -0
- package/esm2020/lib/tokens/extensions.token.mjs +63 -0
- package/esm2020/lib/tokens/index.mjs +2 -0
- package/esm2020/proxy/lib/index.mjs +3 -0
- package/esm2020/proxy/lib/proxy/identity/identity-claim-type.service.mjs +42 -0
- package/esm2020/proxy/lib/proxy/identity/identity-claim-value-type.enum.mjs +10 -0
- package/esm2020/proxy/lib/proxy/identity/identity-role.service.mjs +59 -0
- package/esm2020/proxy/lib/proxy/identity/identity-security-log.service.mjs +37 -0
- package/esm2020/proxy/lib/proxy/identity/identity-settings.service.mjs +28 -0
- package/esm2020/proxy/lib/proxy/identity/identity-user-lookup.service.mjs +37 -0
- package/esm2020/proxy/lib/proxy/identity/identity-user.service.mjs +113 -0
- package/esm2020/proxy/lib/proxy/identity/index.mjs +10 -0
- package/esm2020/proxy/lib/proxy/identity/models.mjs +2 -0
- package/esm2020/proxy/lib/proxy/identity/organization-unit.service.mjs +90 -0
- package/esm2020/proxy/lib/proxy/users/index.mjs +2 -0
- package/esm2020/proxy/lib/proxy/users/models.mjs +2 -0
- package/esm2020/proxy/public-api.mjs +2 -0
- package/esm2020/proxy/volo-abp.ng.identity-proxy.mjs +5 -0
- package/esm2020/public-api.mjs +7 -0
- package/esm2020/volo-abp.ng.identity.mjs +5 -0
- package/fesm2015/volo-abp.ng.identity-config.mjs +464 -0
- package/fesm2015/volo-abp.ng.identity-config.mjs.map +1 -0
- package/fesm2015/{volo-abp.ng.identity-proxy.js → volo-abp.ng.identity-proxy.mjs} +24 -24
- package/fesm2015/volo-abp.ng.identity-proxy.mjs.map +1 -0
- package/fesm2015/volo-abp.ng.identity.mjs +2032 -0
- package/fesm2015/volo-abp.ng.identity.mjs.map +1 -0
- package/fesm2020/volo-abp.ng.identity-config.mjs +466 -0
- package/fesm2020/volo-abp.ng.identity-config.mjs.map +1 -0
- package/fesm2020/volo-abp.ng.identity-proxy.mjs +398 -0
- package/fesm2020/volo-abp.ng.identity-proxy.mjs.map +1 -0
- package/fesm2020/volo-abp.ng.identity.mjs +2045 -0
- package/fesm2020/volo-abp.ng.identity.mjs.map +1 -0
- package/package.json +42 -13
- package/proxy/package.json +5 -5
- package/proxy/src/lib/proxy/README.md +17 -0
- package/bundles/volo-abp.ng.identity-config.umd.js +0 -1
- package/bundles/volo-abp.ng.identity-proxy.umd.js +0 -1
- package/bundles/volo-abp.ng.identity.umd.js +0 -16
- package/esm2015/config/components/identity-settings.component.js +0 -1
- package/esm2015/config/components/index.js +0 -1
- package/esm2015/config/components/my-link-users-modal.component.js +0 -1
- package/esm2015/config/enums/index.js +0 -1
- package/esm2015/config/enums/policy-names.js +0 -1
- package/esm2015/config/enums/route-names.js +0 -1
- package/esm2015/config/enums/setting-tab-names.js +0 -1
- package/esm2015/config/handlers/link-login.handler.js +0 -1
- package/esm2015/config/identity-config.module.js +0 -1
- package/esm2015/config/models/identity-settings.js +0 -1
- package/esm2015/config/models/index.js +0 -1
- package/esm2015/config/providers/index.js +0 -1
- package/esm2015/config/providers/route.provider.js +0 -1
- package/esm2015/config/providers/setting-tab.provider.js +0 -1
- package/esm2015/config/public-api.js +0 -1
- package/esm2015/config/services/identity-config.service.js +0 -1
- package/esm2015/config/services/identity-link-login.service.js +0 -1
- package/esm2015/config/services/index.js +0 -1
- package/esm2015/config/utils/factories.js +0 -1
- package/esm2015/config/volo-abp.ng.identity-config.js +0 -1
- package/esm2015/lib/components/claim-modal/claim-modal.component.js +0 -1
- package/esm2015/lib/components/claims/claims.component.js +0 -1
- package/esm2015/lib/components/index.js +0 -1
- package/esm2015/lib/components/organization-units/abstract-organization-unit/abstract-organization-unit.component.js +0 -1
- package/esm2015/lib/components/organization-units/organization-members/organization-members-modal-body.component.js +0 -1
- package/esm2015/lib/components/organization-units/organization-members/organization-members.component.js +0 -1
- package/esm2015/lib/components/organization-units/organization-roles/organization-roles-modal-body.component.js +0 -1
- package/esm2015/lib/components/organization-units/organization-roles/organization-roles.component.js +0 -1
- package/esm2015/lib/components/organization-units/organization-units.component.js +0 -1
- package/esm2015/lib/components/roles/roles.component.js +0 -1
- package/esm2015/lib/components/security-logs/security-logs.component.js +0 -1
- package/esm2015/lib/components/users/users.component.js +0 -1
- package/esm2015/lib/defaults/default-claims-entity-actions.js +0 -1
- package/esm2015/lib/defaults/default-claims-entity-props.js +0 -1
- package/esm2015/lib/defaults/default-claims-form-props.js +0 -1
- package/esm2015/lib/defaults/default-claims-toolbar-actions.js +0 -1
- package/esm2015/lib/defaults/default-organization-members-entity-actions.js +0 -1
- package/esm2015/lib/defaults/default-organization-members-entity-props.js +0 -1
- package/esm2015/lib/defaults/default-organization-roles-entity-actions.js +0 -1
- package/esm2015/lib/defaults/default-organization-roles-entity-props.js +0 -1
- package/esm2015/lib/defaults/default-organization-units-form-props.js +0 -1
- package/esm2015/lib/defaults/default-organization-units-toolbar-actions.js +0 -1
- package/esm2015/lib/defaults/default-roles-entity-actions.js +0 -1
- package/esm2015/lib/defaults/default-roles-entity-props.js +0 -1
- package/esm2015/lib/defaults/default-roles-form-props.js +0 -1
- package/esm2015/lib/defaults/default-roles-toolbar-actions.js +0 -1
- package/esm2015/lib/defaults/default-security-logs-entity-actions.js +0 -1
- package/esm2015/lib/defaults/default-security-logs-entity-props.js +0 -1
- package/esm2015/lib/defaults/default-security-logs-toolbar-actions.js +0 -1
- package/esm2015/lib/defaults/default-users-entity-actions.js +0 -1
- package/esm2015/lib/defaults/default-users-entity-props.js +0 -1
- package/esm2015/lib/defaults/default-users-form-props.js +0 -1
- package/esm2015/lib/defaults/default-users-toolbar-actions.js +0 -1
- package/esm2015/lib/enums/components.js +0 -1
- package/esm2015/lib/enums/index.js +0 -1
- package/esm2015/lib/enums/two-factor-behaviour.js +0 -1
- package/esm2015/lib/guards/extensions.guard.js +0 -1
- package/esm2015/lib/guards/index.js +0 -1
- package/esm2015/lib/identity-routing.module.js +0 -1
- package/esm2015/lib/identity.module.js +0 -1
- package/esm2015/lib/models/config-options.js +0 -1
- package/esm2015/lib/models/identity.js +0 -1
- package/esm2015/lib/models/index.js +0 -1
- package/esm2015/lib/tokens/extensions.token.js +0 -1
- package/esm2015/lib/tokens/index.js +0 -1
- package/esm2015/proxy/lib/index.js +0 -1
- package/esm2015/proxy/lib/proxy/identity/identity-claim-type.service.js +0 -1
- package/esm2015/proxy/lib/proxy/identity/identity-claim-value-type.enum.js +0 -1
- package/esm2015/proxy/lib/proxy/identity/identity-role.service.js +0 -1
- package/esm2015/proxy/lib/proxy/identity/identity-security-log.service.js +0 -1
- package/esm2015/proxy/lib/proxy/identity/identity-settings.service.js +0 -1
- package/esm2015/proxy/lib/proxy/identity/identity-user-lookup.service.js +0 -1
- package/esm2015/proxy/lib/proxy/identity/identity-user.service.js +0 -1
- package/esm2015/proxy/lib/proxy/identity/index.js +0 -1
- package/esm2015/proxy/lib/proxy/identity/models.js +0 -1
- package/esm2015/proxy/lib/proxy/identity/organization-unit.service.js +0 -1
- package/esm2015/proxy/lib/proxy/users/index.js +0 -1
- package/esm2015/proxy/lib/proxy/users/models.js +0 -1
- package/esm2015/proxy/public-api.js +0 -1
- package/esm2015/proxy/volo-abp.ng.identity-proxy.js +0 -1
- package/esm2015/public-api.js +0 -1
- package/esm2015/volo-abp.ng.identity.js +0 -1
- package/fesm2015/volo-abp.ng.identity-config.js +0 -448
- package/fesm2015/volo-abp.ng.identity.js +0 -1995
|
@@ -0,0 +1,2032 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, ViewChild, InjectionToken, LOCALE_ID, Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import { take, finalize, tap, switchMap, map, mapTo } from 'rxjs/operators';
|
|
4
|
+
import * as i3 from '@volo/abp.ng.identity/proxy';
|
|
5
|
+
import { OrganizationUnitService } from '@volo/abp.ng.identity/proxy';
|
|
6
|
+
import * as i2 from '@abp/ng.theme.shared';
|
|
7
|
+
import { Confirmation, ConfirmationService, getPasswordValidators, ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
8
|
+
import * as i4 from '@angular/forms';
|
|
9
|
+
import { FormControl, Validators } from '@angular/forms';
|
|
10
|
+
import * as i1 from '@abp/ng.core';
|
|
11
|
+
import { ListService, mapEnumToOptions, generatePassword, LocalizationService, escapeHtmlChars, ConfigStateService, getShortDateShortTimeFormat, RouterOutletComponent, AuthGuard, PermissionGuard, ReplaceableRouteContainerComponent, LazyModuleFactory, CoreModule } from '@abp/ng.core';
|
|
12
|
+
import * as i5 from '@angular/common';
|
|
13
|
+
import { formatDate } from '@angular/common';
|
|
14
|
+
import * as i6$1 from '@abp/ng.theme.shared/extensions';
|
|
15
|
+
import { FormPropData, generateFormFromProps, EXTENSIONS_IDENTIFIER, DateAdapter, EntityAction, EntityProp, FormProp, ToolbarAction, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps, UiExtensionsModule } from '@abp/ng.theme.shared/extensions';
|
|
16
|
+
import * as i4$1 from '@abp/ng.components/page';
|
|
17
|
+
import { PageModule } from '@abp/ng.components/page';
|
|
18
|
+
import * as i6 from '@volo/abp.commercial.ng.ui';
|
|
19
|
+
import { SHOW_ENTITY_HISTORY, CommercialUiModule, AdvancedEntityFiltersModule } from '@volo/abp.commercial.ng.ui';
|
|
20
|
+
import * as i13 from '@ngx-validate/core';
|
|
21
|
+
import { NgxValidateCoreModule } from '@ngx-validate/core';
|
|
22
|
+
import { __rest } from 'tslib';
|
|
23
|
+
import * as i5$1 from '@abp/ng.components/tree';
|
|
24
|
+
import { TreeAdapter, TreeModule } from '@abp/ng.components/tree';
|
|
25
|
+
import * as i8 from '@ng-bootstrap/ng-bootstrap';
|
|
26
|
+
import { NgbDateAdapter, NgbNavModule, NgbDropdownModule, NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
|
|
27
|
+
import * as i7 from '@abp/ng.permission-management';
|
|
28
|
+
import { PermissionManagementModule } from '@abp/ng.permission-management';
|
|
29
|
+
import { of } from 'rxjs';
|
|
30
|
+
import { ImpersonationService } from '@volo/abp.commercial.ng.ui/config';
|
|
31
|
+
import * as i1$1 from '@angular/router';
|
|
32
|
+
import { RouterModule } from '@angular/router';
|
|
33
|
+
|
|
34
|
+
class ClaimModalComponent {
|
|
35
|
+
constructor(roleService, userService) {
|
|
36
|
+
this.roleService = roleService;
|
|
37
|
+
this.userService = userService;
|
|
38
|
+
this.visibleChange = new EventEmitter();
|
|
39
|
+
this.modalBusy = false;
|
|
40
|
+
}
|
|
41
|
+
get visible() {
|
|
42
|
+
return this._visible;
|
|
43
|
+
}
|
|
44
|
+
set visible(value) {
|
|
45
|
+
if (this._visible === value)
|
|
46
|
+
return;
|
|
47
|
+
this._visible = value;
|
|
48
|
+
this.visibleChange.emit(value);
|
|
49
|
+
}
|
|
50
|
+
ngOnChanges({ visible, subject }) {
|
|
51
|
+
if (subject && subject.currentValue) {
|
|
52
|
+
this.service = subject.currentValue.type === 'roles' ? this.roleService : this.userService;
|
|
53
|
+
}
|
|
54
|
+
if (!visible)
|
|
55
|
+
return;
|
|
56
|
+
if (visible.currentValue)
|
|
57
|
+
this.initModal();
|
|
58
|
+
else {
|
|
59
|
+
this.newClaimType = null;
|
|
60
|
+
this.newClaimValue = null;
|
|
61
|
+
this.subjectClaims = null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
initModal() {
|
|
65
|
+
this.getClaimTypeNames();
|
|
66
|
+
this.getSubjectClaims(this.subject);
|
|
67
|
+
}
|
|
68
|
+
getClaimTypeNames() {
|
|
69
|
+
this.service.getAllClaimTypes().subscribe(claimTypes => (this.claimTypes = claimTypes));
|
|
70
|
+
}
|
|
71
|
+
getSubjectClaims(subject) {
|
|
72
|
+
this.service.getClaims(subject.id)
|
|
73
|
+
.pipe(take(1))
|
|
74
|
+
.subscribe(claims => (this.subjectClaims = claims));
|
|
75
|
+
}
|
|
76
|
+
addClaim() {
|
|
77
|
+
if (!this.newClaimType || !this.newClaimValue)
|
|
78
|
+
return;
|
|
79
|
+
let claim = {
|
|
80
|
+
claimType: this.newClaimType,
|
|
81
|
+
claimValue: this.newClaimValue,
|
|
82
|
+
};
|
|
83
|
+
const key = this.subject.type === 'roles' ? 'roleId' : 'userId';
|
|
84
|
+
claim = Object.assign({ [key]: this.subject.id }, claim);
|
|
85
|
+
this.subjectClaims.push(claim);
|
|
86
|
+
this.newClaimType = '';
|
|
87
|
+
this.newClaimValue = '';
|
|
88
|
+
}
|
|
89
|
+
removeClaim(index) {
|
|
90
|
+
if (!this.subjectClaims[index])
|
|
91
|
+
return;
|
|
92
|
+
this.subjectClaims = this.subjectClaims.filter((_, i) => i !== index);
|
|
93
|
+
}
|
|
94
|
+
save() {
|
|
95
|
+
if (this.modalBusy)
|
|
96
|
+
return;
|
|
97
|
+
this.modalBusy = true;
|
|
98
|
+
this.service
|
|
99
|
+
.updateClaims(this.subject.id, this.subjectClaims)
|
|
100
|
+
.pipe(take(1), finalize(() => (this.modalBusy = false)))
|
|
101
|
+
.subscribe(() => (this.visible = false));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
ClaimModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ClaimModalComponent, deps: [{ token: i3.IdentityRoleService }, { token: i3.IdentityUserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
105
|
+
ClaimModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: ClaimModalComponent, selector: "abp-claim-modal", inputs: { subject: "subject", visible: "visible" }, outputs: { visibleChange: "visibleChange" }, usesOnChanges: true, ngImport: i0, template: "<abp-modal [(visible)]=\"visible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">{{ 'AbpIdentity::Claims' | abpLocalization }}</h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <form (ngSubmit)=\"addClaim()\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-6\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"claimTypeSelect\">{{\r\n 'AbpIdentity::Type' | abpLocalization\r\n }}</label\r\n ><select\r\n autofocus\r\n id=\"claimTypeSelect\"\r\n class=\"form-select form-control\"\r\n [(ngModel)]=\"newClaimType\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n >\r\n <option *ngFor=\"let type of claimTypes\" [ngValue]=\"type.name\">{{ type.name }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col col-sm-6\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"newClaimValue\">Value</label>\r\n <input\r\n required\r\n id=\"newClaimValue\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"newClaimValue\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col col-sm-12 align-self-center d-grid\">\r\n <button class=\"btn btn-success\" type=\"button\" (click)=\"addClaim()\">\r\n <i class=\"fa fa-plus\"></i>\r\n {{ 'AbpIdentity::AddClaim' | abpLocalization }}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n\r\n <div class=\"willBeHidden\" *ngIf=\"subjectClaims && subjectClaims.length\">\r\n <div class=\"input-group mb-3\" *ngFor=\"let claim of subjectClaims; let i = index\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text mw-100 fs-9\">{{ claim.claimType }}</label>\r\n </div>\r\n <input\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"subjectClaims[i].claimValue\"\r\n required\r\n />\r\n <div class=\"input-group-append\">\r\n <button class=\"btn btn-danger deleteClaim\" (click)=\"removeClaim(i)\">\r\n <i class=\"fa fa-trash\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", components: [{ type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ModalCloseDirective, selector: "[abpClose]" }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ClaimModalComponent, decorators: [{
|
|
107
|
+
type: Component,
|
|
108
|
+
args: [{ selector: 'abp-claim-modal', template: "<abp-modal [(visible)]=\"visible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">{{ 'AbpIdentity::Claims' | abpLocalization }}</h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <form (ngSubmit)=\"addClaim()\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-6\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"claimTypeSelect\">{{\r\n 'AbpIdentity::Type' | abpLocalization\r\n }}</label\r\n ><select\r\n autofocus\r\n id=\"claimTypeSelect\"\r\n class=\"form-select form-control\"\r\n [(ngModel)]=\"newClaimType\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n >\r\n <option *ngFor=\"let type of claimTypes\" [ngValue]=\"type.name\">{{ type.name }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col col-sm-6\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"newClaimValue\">Value</label>\r\n <input\r\n required\r\n id=\"newClaimValue\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"newClaimValue\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col col-sm-12 align-self-center d-grid\">\r\n <button class=\"btn btn-success\" type=\"button\" (click)=\"addClaim()\">\r\n <i class=\"fa fa-plus\"></i>\r\n {{ 'AbpIdentity::AddClaim' | abpLocalization }}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n\r\n <div class=\"willBeHidden\" *ngIf=\"subjectClaims && subjectClaims.length\">\r\n <div class=\"input-group mb-3\" *ngFor=\"let claim of subjectClaims; let i = index\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text mw-100 fs-9\">{{ claim.claimType }}</label>\r\n </div>\r\n <input\r\n type=\"text\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"subjectClaims[i].claimValue\"\r\n required\r\n />\r\n <div class=\"input-group-append\">\r\n <button class=\"btn btn-danger deleteClaim\" (click)=\"removeClaim(i)\">\r\n <i class=\"fa fa-trash\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
109
|
+
}], ctorParameters: function () { return [{ type: i3.IdentityRoleService }, { type: i3.IdentityUserService }]; }, propDecorators: { subject: [{
|
|
110
|
+
type: Input
|
|
111
|
+
}], visible: [{
|
|
112
|
+
type: Input
|
|
113
|
+
}], visibleChange: [{
|
|
114
|
+
type: Output
|
|
115
|
+
}] } });
|
|
116
|
+
|
|
117
|
+
class ClaimsComponent {
|
|
118
|
+
constructor(list, confirmationService, injector, service) {
|
|
119
|
+
this.list = list;
|
|
120
|
+
this.confirmationService = confirmationService;
|
|
121
|
+
this.injector = injector;
|
|
122
|
+
this.service = service;
|
|
123
|
+
this.data = { items: [], totalCount: 0 };
|
|
124
|
+
this.modalBusy = false;
|
|
125
|
+
this.trackByFn = (index, item) => Object.keys(item)[0] || index;
|
|
126
|
+
}
|
|
127
|
+
ngOnInit() {
|
|
128
|
+
this.hookToQuery();
|
|
129
|
+
}
|
|
130
|
+
hookToQuery() {
|
|
131
|
+
this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res));
|
|
132
|
+
}
|
|
133
|
+
buildForm() {
|
|
134
|
+
const data = new FormPropData(this.injector, this.selected);
|
|
135
|
+
this.form = generateFormFromProps(data);
|
|
136
|
+
}
|
|
137
|
+
getTypeName(valueType) {
|
|
138
|
+
switch (valueType) {
|
|
139
|
+
case 0:
|
|
140
|
+
return 'String';
|
|
141
|
+
case 1:
|
|
142
|
+
return 'Int';
|
|
143
|
+
case 2:
|
|
144
|
+
return 'Boolean';
|
|
145
|
+
case 3:
|
|
146
|
+
return 'DateTime';
|
|
147
|
+
default:
|
|
148
|
+
return valueType;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
openModal() {
|
|
152
|
+
this.buildForm();
|
|
153
|
+
this.isModalVisible = true;
|
|
154
|
+
}
|
|
155
|
+
onAdd() {
|
|
156
|
+
this.selected = {};
|
|
157
|
+
this.openModal();
|
|
158
|
+
}
|
|
159
|
+
onEdit(id) {
|
|
160
|
+
this.service.get(id).subscribe(res => {
|
|
161
|
+
this.selected = res;
|
|
162
|
+
this.openModal();
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
save() {
|
|
166
|
+
if (!this.form.valid || this.modalBusy)
|
|
167
|
+
return;
|
|
168
|
+
this.modalBusy = true;
|
|
169
|
+
const { id } = this.selected;
|
|
170
|
+
(id
|
|
171
|
+
? this.service.update(id, Object.assign(Object.assign({}, this.selected), this.form.value))
|
|
172
|
+
: this.service.create(this.form.value))
|
|
173
|
+
.pipe(finalize(() => (this.modalBusy = false)))
|
|
174
|
+
.subscribe(() => {
|
|
175
|
+
this.list.get();
|
|
176
|
+
this.isModalVisible = false;
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
delete(id, name) {
|
|
180
|
+
this.confirmationService
|
|
181
|
+
.warn('AbpIdentity::ClaimTypeDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
|
|
182
|
+
messageLocalizationParams: [name],
|
|
183
|
+
})
|
|
184
|
+
.subscribe((status) => {
|
|
185
|
+
if (status === Confirmation.Status.confirm) {
|
|
186
|
+
this.service.delete(id).subscribe(() => this.list.get());
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
ClaimsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ClaimsComponent, deps: [{ token: i1.ListService }, { token: i2.ConfirmationService }, { token: i0.Injector }, { token: i3.IdentityClaimTypeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
192
|
+
ClaimsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: ClaimsComponent, selector: "abp-claims", providers: [
|
|
193
|
+
ListService,
|
|
194
|
+
{
|
|
195
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
196
|
+
useValue: "Identity.ClaimsComponent" /* Claims */,
|
|
197
|
+
},
|
|
198
|
+
], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'AbpIdentity::ClaimTypes' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-claim-types-wrapper\">\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpIdentity\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewClaimType') | abpLocalization }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <div class=\"mt-2 fade-in-top\">\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"form?.invalid\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", components: [{ type: i4$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { type: i6$1.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i6$1.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i13.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { type: i2.ModalCloseDirective, selector: "[abpClose]" }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ClaimsComponent, decorators: [{
|
|
200
|
+
type: Component,
|
|
201
|
+
args: [{ selector: 'abp-claims', providers: [
|
|
202
|
+
ListService,
|
|
203
|
+
{
|
|
204
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
205
|
+
useValue: "Identity.ClaimsComponent" /* Claims */,
|
|
206
|
+
},
|
|
207
|
+
], template: "<abp-page [title]=\"'AbpIdentity::ClaimTypes' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-claim-types-wrapper\">\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpIdentity\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewClaimType') | abpLocalization }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <div class=\"mt-2 fade-in-top\">\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"form?.invalid\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
208
|
+
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: i2.ConfirmationService }, { type: i0.Injector }, { type: i3.IdentityClaimTypeService }]; }, propDecorators: { modalContent: [{
|
|
209
|
+
type: ViewChild,
|
|
210
|
+
args: ['modalContent']
|
|
211
|
+
}] } });
|
|
212
|
+
|
|
213
|
+
const ORGANIZATION_UNIT_CONFIG = new InjectionToken('ORGANIZATION_UNIT_CONFIG');
|
|
214
|
+
class AbstractOrganizationUnitComponent {
|
|
215
|
+
constructor(injector) {
|
|
216
|
+
this.injector = injector;
|
|
217
|
+
this.currentOrganizationUnits = { items: [] };
|
|
218
|
+
this.checkedUnits = {};
|
|
219
|
+
this.isCheckboxDisabled = (id) => {
|
|
220
|
+
return this.currentOrganizationUnits.items.findIndex((item) => item.id === id) > -1;
|
|
221
|
+
};
|
|
222
|
+
this.list = injector.get(ListService);
|
|
223
|
+
this.list.maxResultCount = 1000;
|
|
224
|
+
this.organizationUnitService = injector.get(OrganizationUnitService);
|
|
225
|
+
this.confirmation = injector.get(ConfirmationService);
|
|
226
|
+
this.config = injector.get(ORGANIZATION_UNIT_CONFIG, {});
|
|
227
|
+
}
|
|
228
|
+
ngOnChanges({ selectedOrganizationUnit }) {
|
|
229
|
+
if (selectedOrganizationUnit === null || selectedOrganizationUnit === void 0 ? void 0 : selectedOrganizationUnit.firstChange) {
|
|
230
|
+
this.hookToQuery();
|
|
231
|
+
}
|
|
232
|
+
else if (selectedOrganizationUnit === null || selectedOrganizationUnit === void 0 ? void 0 : selectedOrganizationUnit.currentValue) {
|
|
233
|
+
this.list.get();
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
hookToQuery() {
|
|
237
|
+
this.list
|
|
238
|
+
.hookToQuery(query => this.organizationUnitService[this.config.getCurrentUnitsMethodName](this.selectedOrganizationUnit.id, query))
|
|
239
|
+
.subscribe((response) => {
|
|
240
|
+
this.currentOrganizationUnits = response;
|
|
241
|
+
this.checkedUnits = {};
|
|
242
|
+
response.items.forEach((item) => {
|
|
243
|
+
this.checkedUnits[item.id] = true;
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
addUnits() {
|
|
248
|
+
this.isModalBusy = true;
|
|
249
|
+
this.organizationUnitService[this.config.addUnitsMethodName](this.selectedOrganizationUnit.id, {
|
|
250
|
+
[this.config.addUnitsBodyPropName]: Object.keys(this.checkedUnits),
|
|
251
|
+
})
|
|
252
|
+
.pipe(finalize(() => (this.isModalBusy = false)))
|
|
253
|
+
.subscribe(() => {
|
|
254
|
+
this.isModalVisible = false;
|
|
255
|
+
this.list.get();
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
delete(unitId, unitName) {
|
|
259
|
+
this.confirmation
|
|
260
|
+
.warn(this.config.deletionLocalizationKey, 'AbpIdentity::AreYouSure', {
|
|
261
|
+
messageLocalizationParams: [unitName, this.selectedOrganizationUnit.displayName],
|
|
262
|
+
})
|
|
263
|
+
.subscribe((status) => {
|
|
264
|
+
if (status === Confirmation.Status.confirm) {
|
|
265
|
+
this.organizationUnitService[this.config.deleteMethodName](this.selectedOrganizationUnit.id, unitId).subscribe(() => this.list.get());
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
openModal() {
|
|
270
|
+
this.isModalVisible = true;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
AbstractOrganizationUnitComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AbstractOrganizationUnitComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
274
|
+
AbstractOrganizationUnitComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AbstractOrganizationUnitComponent, selector: "ng-component", inputs: { selectedOrganizationUnit: "selectedOrganizationUnit" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AbstractOrganizationUnitComponent, decorators: [{
|
|
276
|
+
type: Component,
|
|
277
|
+
args: [{
|
|
278
|
+
template: '',
|
|
279
|
+
}]
|
|
280
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { selectedOrganizationUnit: [{
|
|
281
|
+
type: Input
|
|
282
|
+
}] } });
|
|
283
|
+
|
|
284
|
+
class OrganizationMembersModalBodyComponent {
|
|
285
|
+
constructor(list, userService) {
|
|
286
|
+
this.list = list;
|
|
287
|
+
this.userService = userService;
|
|
288
|
+
this.allUnits = { items: [] };
|
|
289
|
+
}
|
|
290
|
+
ngOnInit() {
|
|
291
|
+
this.hookToQuery();
|
|
292
|
+
}
|
|
293
|
+
hookToQuery() {
|
|
294
|
+
this.list
|
|
295
|
+
.hookToQuery(query => this.userService.getList(query))
|
|
296
|
+
.subscribe(response => {
|
|
297
|
+
this.allUnits = response;
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
OrganizationMembersModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: OrganizationMembersModalBodyComponent, deps: [{ token: i1.ListService }, { token: i3.IdentityUserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
302
|
+
OrganizationMembersModalBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: OrganizationMembersModalBodyComponent, selector: "abp-organization-members-modal-body", inputs: { checkedUnits: "checkedUnits", isCheckboxDisabled: "isCheckboxDisabled" }, providers: [ListService], ngImport: i0, template: `
|
|
303
|
+
<div id="data-tables-table-filter" class="data-tables-filter">
|
|
304
|
+
<div class="input-group">
|
|
305
|
+
<input
|
|
306
|
+
type="search"
|
|
307
|
+
class="form-control"
|
|
308
|
+
[placeholder]="'AbpUi::PagerSearch' | abpLocalization"
|
|
309
|
+
[(ngModel)]="list.filter"
|
|
310
|
+
/>
|
|
311
|
+
<div class="input-group-append">
|
|
312
|
+
<button class="btn btn-sm btn-primary" (click)="list.get()">
|
|
313
|
+
<i class="fas fa-search"></i>
|
|
314
|
+
</button>
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
|
|
319
|
+
<div class="card">
|
|
320
|
+
<abp-extensible-table
|
|
321
|
+
actionsText=""
|
|
322
|
+
[data]="allUnits.items"
|
|
323
|
+
[recordsTotal]="allUnits.totalCount"
|
|
324
|
+
[actionsColumnWidth]="38"
|
|
325
|
+
[actionsTemplate]="customAction"
|
|
326
|
+
[list]="list"
|
|
327
|
+
></abp-extensible-table>
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
<ng-template #customAction let-row>
|
|
331
|
+
<input
|
|
332
|
+
type="checkbox"
|
|
333
|
+
[(ngModel)]="checkedUnits[row.id]"
|
|
334
|
+
[disabled]="isCheckboxDisabled(row.id)"
|
|
335
|
+
/>
|
|
336
|
+
</ng-template>
|
|
337
|
+
`, isInline: true, components: [{ type: i6$1.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }], directives: [{ type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: OrganizationMembersModalBodyComponent, decorators: [{
|
|
339
|
+
type: Component,
|
|
340
|
+
args: [{
|
|
341
|
+
selector: 'abp-organization-members-modal-body',
|
|
342
|
+
template: `
|
|
343
|
+
<div id="data-tables-table-filter" class="data-tables-filter">
|
|
344
|
+
<div class="input-group">
|
|
345
|
+
<input
|
|
346
|
+
type="search"
|
|
347
|
+
class="form-control"
|
|
348
|
+
[placeholder]="'AbpUi::PagerSearch' | abpLocalization"
|
|
349
|
+
[(ngModel)]="list.filter"
|
|
350
|
+
/>
|
|
351
|
+
<div class="input-group-append">
|
|
352
|
+
<button class="btn btn-sm btn-primary" (click)="list.get()">
|
|
353
|
+
<i class="fas fa-search"></i>
|
|
354
|
+
</button>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
|
|
359
|
+
<div class="card">
|
|
360
|
+
<abp-extensible-table
|
|
361
|
+
actionsText=""
|
|
362
|
+
[data]="allUnits.items"
|
|
363
|
+
[recordsTotal]="allUnits.totalCount"
|
|
364
|
+
[actionsColumnWidth]="38"
|
|
365
|
+
[actionsTemplate]="customAction"
|
|
366
|
+
[list]="list"
|
|
367
|
+
></abp-extensible-table>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
<ng-template #customAction let-row>
|
|
371
|
+
<input
|
|
372
|
+
type="checkbox"
|
|
373
|
+
[(ngModel)]="checkedUnits[row.id]"
|
|
374
|
+
[disabled]="isCheckboxDisabled(row.id)"
|
|
375
|
+
/>
|
|
376
|
+
</ng-template>
|
|
377
|
+
`,
|
|
378
|
+
providers: [ListService],
|
|
379
|
+
}]
|
|
380
|
+
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: i3.IdentityUserService }]; }, propDecorators: { checkedUnits: [{
|
|
381
|
+
type: Input
|
|
382
|
+
}], isCheckboxDisabled: [{
|
|
383
|
+
type: Input
|
|
384
|
+
}] } });
|
|
385
|
+
|
|
386
|
+
class OrganizationMembersComponent extends AbstractOrganizationUnitComponent {
|
|
387
|
+
}
|
|
388
|
+
OrganizationMembersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: OrganizationMembersComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
389
|
+
OrganizationMembersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: OrganizationMembersComponent, selector: "abp-organization-members", providers: [
|
|
390
|
+
ListService,
|
|
391
|
+
{
|
|
392
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
393
|
+
useValue: "Identity.OrganizationMembersComponent" /* OrganizationMembers */,
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
provide: ORGANIZATION_UNIT_CONFIG,
|
|
397
|
+
useValue: {
|
|
398
|
+
getCurrentUnitsMethodName: 'getMembers',
|
|
399
|
+
addUnitsMethodName: 'addMembers',
|
|
400
|
+
addUnitsBodyPropName: 'userIds',
|
|
401
|
+
deleteMethodName: 'removeMember',
|
|
402
|
+
deletionLocalizationKey: 'AbpIdentity::RemoveUserFromOuWarningMessage',
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"text-end\">\r\n <button class=\"btn btn-sm btn-primary mb-2\" (click)=\"openModal()\">\r\n <i class=\"fas fa-plus me-1\"></i> {{ 'AbpIdentity::AddMember' | abpLocalization }}\r\n </button>\r\n</div>\r\n\r\n<abp-extensible-table\r\n [data]=\"currentOrganizationUnits.items\"\r\n [recordsTotal]=\"currentOrganizationUnits.totalCount\"\r\n [list]=\"list\"\r\n></abp-extensible-table>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"isModalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::SelectUsers' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <abp-organization-members-modal-body\r\n [checkedUnits]=\"checkedUnits\"\r\n [isCheckboxDisabled]=\"isCheckboxDisabled\"\r\n ></abp-organization-members-modal-body>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"addUnits()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", components: [{ type: i6$1.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: OrganizationMembersModalBodyComponent, selector: "abp-organization-members-modal-body", inputs: ["checkedUnits", "isCheckboxDisabled"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }], directives: [{ type: i2.ModalCloseDirective, selector: "[abpClose]" }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: OrganizationMembersComponent, decorators: [{
|
|
407
|
+
type: Component,
|
|
408
|
+
args: [{ selector: 'abp-organization-members', providers: [
|
|
409
|
+
ListService,
|
|
410
|
+
{
|
|
411
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
412
|
+
useValue: "Identity.OrganizationMembersComponent" /* OrganizationMembers */,
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
provide: ORGANIZATION_UNIT_CONFIG,
|
|
416
|
+
useValue: {
|
|
417
|
+
getCurrentUnitsMethodName: 'getMembers',
|
|
418
|
+
addUnitsMethodName: 'addMembers',
|
|
419
|
+
addUnitsBodyPropName: 'userIds',
|
|
420
|
+
deleteMethodName: 'removeMember',
|
|
421
|
+
deletionLocalizationKey: 'AbpIdentity::RemoveUserFromOuWarningMessage',
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
], template: "<div class=\"text-end\">\r\n <button class=\"btn btn-sm btn-primary mb-2\" (click)=\"openModal()\">\r\n <i class=\"fas fa-plus me-1\"></i> {{ 'AbpIdentity::AddMember' | abpLocalization }}\r\n </button>\r\n</div>\r\n\r\n<abp-extensible-table\r\n [data]=\"currentOrganizationUnits.items\"\r\n [recordsTotal]=\"currentOrganizationUnits.totalCount\"\r\n [list]=\"list\"\r\n></abp-extensible-table>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"isModalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::SelectUsers' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <abp-organization-members-modal-body\r\n [checkedUnits]=\"checkedUnits\"\r\n [isCheckboxDisabled]=\"isCheckboxDisabled\"\r\n ></abp-organization-members-modal-body>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"addUnits()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
425
|
+
}] });
|
|
426
|
+
|
|
427
|
+
class OrganizationRolesModalBodyComponent {
|
|
428
|
+
constructor(list, roleService) {
|
|
429
|
+
this.list = list;
|
|
430
|
+
this.roleService = roleService;
|
|
431
|
+
this.allUnits = { items: [] };
|
|
432
|
+
}
|
|
433
|
+
ngOnInit() {
|
|
434
|
+
this.hookToQuery();
|
|
435
|
+
}
|
|
436
|
+
hookToQuery() {
|
|
437
|
+
this.list
|
|
438
|
+
.hookToQuery(query => this.roleService.getList(query))
|
|
439
|
+
.subscribe(response => {
|
|
440
|
+
this.allUnits = response;
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
OrganizationRolesModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: OrganizationRolesModalBodyComponent, deps: [{ token: i1.ListService }, { token: i3.IdentityRoleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
445
|
+
OrganizationRolesModalBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: OrganizationRolesModalBodyComponent, selector: "abp-organization-roles-modal-body", inputs: { checkedUnits: "checkedUnits", isCheckboxDisabled: "isCheckboxDisabled" }, providers: [ListService], ngImport: i0, template: `
|
|
446
|
+
<div class="card">
|
|
447
|
+
<abp-extensible-table
|
|
448
|
+
actionsText=""
|
|
449
|
+
[data]="allUnits.items"
|
|
450
|
+
[recordsTotal]="allUnits.totalCount"
|
|
451
|
+
[actionsColumnWidth]="38"
|
|
452
|
+
[actionsTemplate]="customAction"
|
|
453
|
+
[list]="list"
|
|
454
|
+
></abp-extensible-table>
|
|
455
|
+
</div>
|
|
456
|
+
|
|
457
|
+
<ng-template #customAction let-row>
|
|
458
|
+
<input
|
|
459
|
+
type="checkbox"
|
|
460
|
+
[(ngModel)]="checkedUnits[row.id]"
|
|
461
|
+
[disabled]="isCheckboxDisabled(row.id)"
|
|
462
|
+
/>
|
|
463
|
+
</ng-template>
|
|
464
|
+
`, isInline: true, components: [{ type: i6$1.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }], directives: [{ type: i4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: OrganizationRolesModalBodyComponent, decorators: [{
|
|
466
|
+
type: Component,
|
|
467
|
+
args: [{
|
|
468
|
+
selector: 'abp-organization-roles-modal-body',
|
|
469
|
+
template: `
|
|
470
|
+
<div class="card">
|
|
471
|
+
<abp-extensible-table
|
|
472
|
+
actionsText=""
|
|
473
|
+
[data]="allUnits.items"
|
|
474
|
+
[recordsTotal]="allUnits.totalCount"
|
|
475
|
+
[actionsColumnWidth]="38"
|
|
476
|
+
[actionsTemplate]="customAction"
|
|
477
|
+
[list]="list"
|
|
478
|
+
></abp-extensible-table>
|
|
479
|
+
</div>
|
|
480
|
+
|
|
481
|
+
<ng-template #customAction let-row>
|
|
482
|
+
<input
|
|
483
|
+
type="checkbox"
|
|
484
|
+
[(ngModel)]="checkedUnits[row.id]"
|
|
485
|
+
[disabled]="isCheckboxDisabled(row.id)"
|
|
486
|
+
/>
|
|
487
|
+
</ng-template>
|
|
488
|
+
`,
|
|
489
|
+
providers: [ListService],
|
|
490
|
+
}]
|
|
491
|
+
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: i3.IdentityRoleService }]; }, propDecorators: { checkedUnits: [{
|
|
492
|
+
type: Input
|
|
493
|
+
}], isCheckboxDisabled: [{
|
|
494
|
+
type: Input
|
|
495
|
+
}] } });
|
|
496
|
+
|
|
497
|
+
class OrganizationRolesComponent extends AbstractOrganizationUnitComponent {
|
|
498
|
+
}
|
|
499
|
+
OrganizationRolesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: OrganizationRolesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
500
|
+
OrganizationRolesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: OrganizationRolesComponent, selector: "abp-organization-roles", providers: [
|
|
501
|
+
ListService,
|
|
502
|
+
{
|
|
503
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
504
|
+
useValue: "Identity.OrganizationRolesComponent" /* OrganizationRoles */,
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
provide: ORGANIZATION_UNIT_CONFIG,
|
|
508
|
+
useValue: {
|
|
509
|
+
getCurrentUnitsMethodName: 'getRoles',
|
|
510
|
+
addUnitsMethodName: 'addRoles',
|
|
511
|
+
addUnitsBodyPropName: 'roleIds',
|
|
512
|
+
deleteMethodName: 'removeRole',
|
|
513
|
+
deletionLocalizationKey: 'AbpIdentity::RemoveRoleFromOuWarningMessage',
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"text-end\">\r\n <button class=\"btn btn-sm btn-primary mb-2\" (click)=\"openModal()\">\r\n <i class=\"fas fa-plus me-1\"></i> {{ 'AbpIdentity::AddRole' | abpLocalization }}\r\n </button>\r\n</div>\r\n\r\n<abp-extensible-table\r\n [data]=\"currentOrganizationUnits.items\"\r\n [recordsTotal]=\"currentOrganizationUnits.totalCount\"\r\n [list]=\"list\"\r\n></abp-extensible-table>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"isModalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::SelectRoles' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <abp-organization-roles-modal-body\r\n [checkedUnits]=\"checkedUnits\"\r\n [isCheckboxDisabled]=\"isCheckboxDisabled\"\r\n ></abp-organization-roles-modal-body>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"addUnits()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", components: [{ type: i6$1.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: OrganizationRolesModalBodyComponent, selector: "abp-organization-roles-modal-body", inputs: ["checkedUnits", "isCheckboxDisabled"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }], directives: [{ type: i2.ModalCloseDirective, selector: "[abpClose]" }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: OrganizationRolesComponent, decorators: [{
|
|
518
|
+
type: Component,
|
|
519
|
+
args: [{ selector: 'abp-organization-roles', providers: [
|
|
520
|
+
ListService,
|
|
521
|
+
{
|
|
522
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
523
|
+
useValue: "Identity.OrganizationRolesComponent" /* OrganizationRoles */,
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
provide: ORGANIZATION_UNIT_CONFIG,
|
|
527
|
+
useValue: {
|
|
528
|
+
getCurrentUnitsMethodName: 'getRoles',
|
|
529
|
+
addUnitsMethodName: 'addRoles',
|
|
530
|
+
addUnitsBodyPropName: 'roleIds',
|
|
531
|
+
deleteMethodName: 'removeRole',
|
|
532
|
+
deletionLocalizationKey: 'AbpIdentity::RemoveRoleFromOuWarningMessage',
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
], template: "<div class=\"text-end\">\r\n <button class=\"btn btn-sm btn-primary mb-2\" (click)=\"openModal()\">\r\n <i class=\"fas fa-plus me-1\"></i> {{ 'AbpIdentity::AddRole' | abpLocalization }}\r\n </button>\r\n</div>\r\n\r\n<abp-extensible-table\r\n [data]=\"currentOrganizationUnits.items\"\r\n [recordsTotal]=\"currentOrganizationUnits.totalCount\"\r\n [list]=\"list\"\r\n></abp-extensible-table>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"isModalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::SelectRoles' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <abp-organization-roles-modal-body\r\n [checkedUnits]=\"checkedUnits\"\r\n [isCheckboxDisabled]=\"isCheckboxDisabled\"\r\n ></abp-organization-roles-modal-body>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"addUnits()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
536
|
+
}] });
|
|
537
|
+
|
|
538
|
+
class OrganizationUnitsComponent {
|
|
539
|
+
constructor(injector, service, fb, confirmation) {
|
|
540
|
+
this.injector = injector;
|
|
541
|
+
this.service = service;
|
|
542
|
+
this.fb = fb;
|
|
543
|
+
this.confirmation = confirmation;
|
|
544
|
+
this.organizationUnits = [];
|
|
545
|
+
this.nodes = [];
|
|
546
|
+
this.expandedKeys = [];
|
|
547
|
+
this.organizationMembersKey = "Identity.OrganizationMembersComponent" /* OrganizationMembers */;
|
|
548
|
+
this.organizationRolesKey = "Identity.OrganizationRolesComponent" /* OrganizationRoles */;
|
|
549
|
+
this.get = () => {
|
|
550
|
+
this.loading = true;
|
|
551
|
+
this.service
|
|
552
|
+
.getListAll()
|
|
553
|
+
.pipe(finalize(() => (this.loading = false)))
|
|
554
|
+
.subscribe((res) => {
|
|
555
|
+
this.organizationUnits = res.items;
|
|
556
|
+
this.treeAdapter = new TreeAdapter(res.items);
|
|
557
|
+
this.nodes = this.treeAdapter.getTree();
|
|
558
|
+
this.expandedKeys = [...this.expandedKeys];
|
|
559
|
+
});
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
ngOnInit() {
|
|
563
|
+
this.get();
|
|
564
|
+
}
|
|
565
|
+
buildForm(selected = {}) {
|
|
566
|
+
const data = new FormPropData(this.injector, selected);
|
|
567
|
+
this.nodeForm = generateFormFromProps(data);
|
|
568
|
+
this.nodeForm.addControl('parentId', new FormControl(undefined));
|
|
569
|
+
this.nodeForm.addControl('id', new FormControl(undefined));
|
|
570
|
+
}
|
|
571
|
+
add() {
|
|
572
|
+
this.buildForm();
|
|
573
|
+
this.isNodeModalVisible = true;
|
|
574
|
+
}
|
|
575
|
+
edit(selected) {
|
|
576
|
+
this.buildForm(selected);
|
|
577
|
+
this.nodeForm.patchValue({
|
|
578
|
+
parentId: '',
|
|
579
|
+
displayName: selected.displayName,
|
|
580
|
+
id: selected.id,
|
|
581
|
+
});
|
|
582
|
+
this.isNodeModalVisible = true;
|
|
583
|
+
}
|
|
584
|
+
addSubUnit({ id }) {
|
|
585
|
+
this.buildForm();
|
|
586
|
+
this.nodeForm.patchValue({ parentId: id, displayName: '', id: undefined });
|
|
587
|
+
this.isNodeModalVisible = true;
|
|
588
|
+
this.expandedKeys = this.expandedKeys.concat(id);
|
|
589
|
+
}
|
|
590
|
+
save() {
|
|
591
|
+
if (this.nodeForm.invalid)
|
|
592
|
+
return;
|
|
593
|
+
const _a = this.nodeForm.value, { id } = _a, form = __rest(_a, ["id"]);
|
|
594
|
+
const request = id
|
|
595
|
+
? this.service.update(id, {
|
|
596
|
+
displayName: form.displayName,
|
|
597
|
+
})
|
|
598
|
+
: this.service.create(form);
|
|
599
|
+
this.isModalBusy = true;
|
|
600
|
+
request.pipe(finalize(() => (this.isModalBusy = false))).subscribe(() => {
|
|
601
|
+
this.get();
|
|
602
|
+
this.isNodeModalVisible = false;
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
delete({ id, displayName }) {
|
|
606
|
+
this.confirmation
|
|
607
|
+
.warn('AbpIdentity::OrganizationUnitDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
|
|
608
|
+
messageLocalizationParams: [displayName],
|
|
609
|
+
})
|
|
610
|
+
.subscribe((status) => {
|
|
611
|
+
if (status === Confirmation.Status.confirm) {
|
|
612
|
+
this.service
|
|
613
|
+
.delete(id)
|
|
614
|
+
.pipe(tap(_ => {
|
|
615
|
+
var _a;
|
|
616
|
+
if (id === ((_a = this.selectedUnit) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
617
|
+
this.selectedUnit = null;
|
|
618
|
+
}
|
|
619
|
+
}))
|
|
620
|
+
.subscribe(() => this.get());
|
|
621
|
+
}
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
getParentName(parentId) {
|
|
625
|
+
const parent = this.organizationUnits.find(unit => unit.id === parentId);
|
|
626
|
+
if (!parent)
|
|
627
|
+
return '';
|
|
628
|
+
return parent.displayName;
|
|
629
|
+
}
|
|
630
|
+
onDrop(event) {
|
|
631
|
+
if (!event.node)
|
|
632
|
+
return;
|
|
633
|
+
let parentId = event.node.key;
|
|
634
|
+
if (!event.node.origin.parentId && event.pos === -1) {
|
|
635
|
+
parentId = null;
|
|
636
|
+
}
|
|
637
|
+
this.move(event.dragNode.key, parentId);
|
|
638
|
+
}
|
|
639
|
+
move(id, newParentId) {
|
|
640
|
+
this.service.move(id, { newParentId }).subscribe(this.get);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
OrganizationUnitsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: OrganizationUnitsComponent, deps: [{ token: i0.Injector }, { token: i3.OrganizationUnitService }, { token: i4.FormBuilder }, { token: i2.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
644
|
+
OrganizationUnitsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: OrganizationUnitsComponent, selector: "abp-organization-units", providers: [
|
|
645
|
+
{
|
|
646
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
647
|
+
useValue: "Identity.OrganizationUnitsComponent" /* OrganizationUnits */,
|
|
648
|
+
},
|
|
649
|
+
], ngImport: i0, template: "<abp-page\r\n [title]=\"'AbpIdentity::OrganizationUnits' | abpLocalization\"\r\n [toolbar]=\"organizationUnits\"\r\n>\r\n <div class=\"row\">\r\n <div *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageOU'\" class=\"col-12 col-lg-6 col-xl-5\">\r\n <div class=\"card\">\r\n <div class=\"card-header d-flex justify-content-between\">\r\n <h5>\r\n {{ 'AbpIdentity::OrganizationTree' | abpLocalization }}\r\n </h5>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"add()\">\r\n <i class=\"fas fa-plus me-1\"></i> {{ 'AbpIdentity::AddRootUnit' | abpLocalization }}\r\n </button>\r\n </div>\r\n <div class=\"card-body\" [abpLoading]=\"loading\">\r\n <abp-tree\r\n [nodes]=\"nodes\"\r\n [(expandedKeys)]=\"expandedKeys\"\r\n [(selectedNode)]=\"selectedUnit\"\r\n [draggable]=\"true\"\r\n (dropOver)=\"onDrop($event)\"\r\n >\r\n <ng-template abpTreeNodeTemplate let-node>\r\n <i class=\"fas fa-folder fs-15px text-primary me-1\"></i>\r\n {{ node.title }}\r\n </ng-template>\r\n\r\n <ng-template #menu let-node>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"edit(node.origin.entity)\">\r\n {{ 'AbpIdentity::Edit' | abpLocalization }}\r\n </li>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"addSubUnit(node.origin.entity)\">\r\n {{ 'AbpIdentity::AddSubUnit' | abpLocalization }}\r\n </li>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"delete(node.origin.entity)\">\r\n {{ 'AbpIdentity::Delete' | abpLocalization }}\r\n </li>\r\n </ng-template>\r\n </abp-tree>\r\n <p *ngIf=\"!loading && !nodes?.length\" class=\"text-muted\">\r\n {{ 'AbpIdentity::NoOrganizationUnits' | abpLocalization }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n *abpPermission=\"\r\n 'AbpIdentity.OrganizationUnits.ManageMembers || AbpIdentity.OrganizationUnits.ManageRoles'\r\n \"\r\n class=\"col-12 col-lg-6 col-xl-7\"\r\n >\r\n <div class=\"card\">\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li ngbNavItem *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageMembers'\">\r\n <a ngbNavLink>{{ 'AbpIdentity::Members' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngIf=\"selectedUnit; else selectUnitMsg\">\r\n <abp-organization-members\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n selectedOrganizationUnit: { value: selectedUnit }\r\n },\r\n componentKey: organizationMembersKey\r\n }\"\r\n [selectedOrganizationUnit]=\"selectedUnit\"\r\n ></abp-organization-members>\r\n </ng-container>\r\n <ng-template #selectUnitMsg>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::SelectAnOrganizationUnitToSeeMembers' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageRoles'\">\r\n <a ngbNavLink>{{ 'AbpIdentity::Roles' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngIf=\"selectedUnit; else selectUnitMsg\">\r\n <abp-organization-roles\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n selectedOrganizationUnit: { value: selectedUnit }\r\n },\r\n componentKey: organizationRolesKey\r\n }\"\r\n [selectedOrganizationUnit]=\"selectedUnit\"\r\n ></abp-organization-roles>\r\n </ng-container>\r\n <ng-template #selectUnitMsg>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::SelectAnOrganizationUnitToSeeRoles' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n <div [ngbNavOutlet]=\"nav\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n<abp-modal [(visible)]=\"isNodeModalVisible\" [busy]=\"isModalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{\r\n (nodeForm.get('id').value\r\n ? 'AbpIdentity::EditOrganizationUnit'\r\n : 'AbpIdentity::NewOrganizationUnit'\r\n ) | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"mb-3\" *ngIf=\"nodeForm.get('parentId').value as parentId\">\r\n <strong>{{\r\n 'AbpIdentity::OrganizationUnit:Parent{0}' | abpLocalization: getParentName(parentId)\r\n }}</strong>\r\n </div>\r\n <form [formGroup]=\"nodeForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selectedUnit\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"nodeForm?.invalid\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", styles: [".fs-15px{font-size:15px}\n"], components: [{ type: i4$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { type: i5$1.TreeComponent, selector: "abp-tree", inputs: ["noAnimation", "draggable", "checkable", "checkStrictly", "checkedKeys", "nodes", "expandedKeys", "selectedNode", "isNodeSelected", "beforeDrop"], outputs: ["checkedKeysChange", "expandedKeysChange", "selectedNodeChange", "dropOver"] }, { type: OrganizationMembersComponent, selector: "abp-organization-members" }, { type: OrganizationRolesComponent, selector: "abp-organization-roles" }, { type: i8.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i6$1.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }], directives: [{ type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i2.LoadingDirective, selector: "[abpLoading]", inputs: ["abpLoading", "abpLoadingTargetElement", "abpLoadingDelay"] }, { type: i5$1.TreeNodeTemplateDirective, selector: "[abpTreeNodeTemplate],[abp-tree-node-template]" }, { type: i8.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { type: i8.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { type: i8.NgbNavLink, selector: "a[ngbNavLink]" }, { type: i8.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i13.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { type: i2.ModalCloseDirective, selector: "[abpClose]" }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
650
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: OrganizationUnitsComponent, decorators: [{
|
|
651
|
+
type: Component,
|
|
652
|
+
args: [{ selector: 'abp-organization-units', providers: [
|
|
653
|
+
{
|
|
654
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
655
|
+
useValue: "Identity.OrganizationUnitsComponent" /* OrganizationUnits */,
|
|
656
|
+
},
|
|
657
|
+
], styles: [
|
|
658
|
+
`
|
|
659
|
+
.fs-15px {
|
|
660
|
+
font-size: 15px;
|
|
661
|
+
}
|
|
662
|
+
`,
|
|
663
|
+
], template: "<abp-page\r\n [title]=\"'AbpIdentity::OrganizationUnits' | abpLocalization\"\r\n [toolbar]=\"organizationUnits\"\r\n>\r\n <div class=\"row\">\r\n <div *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageOU'\" class=\"col-12 col-lg-6 col-xl-5\">\r\n <div class=\"card\">\r\n <div class=\"card-header d-flex justify-content-between\">\r\n <h5>\r\n {{ 'AbpIdentity::OrganizationTree' | abpLocalization }}\r\n </h5>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"add()\">\r\n <i class=\"fas fa-plus me-1\"></i> {{ 'AbpIdentity::AddRootUnit' | abpLocalization }}\r\n </button>\r\n </div>\r\n <div class=\"card-body\" [abpLoading]=\"loading\">\r\n <abp-tree\r\n [nodes]=\"nodes\"\r\n [(expandedKeys)]=\"expandedKeys\"\r\n [(selectedNode)]=\"selectedUnit\"\r\n [draggable]=\"true\"\r\n (dropOver)=\"onDrop($event)\"\r\n >\r\n <ng-template abpTreeNodeTemplate let-node>\r\n <i class=\"fas fa-folder fs-15px text-primary me-1\"></i>\r\n {{ node.title }}\r\n </ng-template>\r\n\r\n <ng-template #menu let-node>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"edit(node.origin.entity)\">\r\n {{ 'AbpIdentity::Edit' | abpLocalization }}\r\n </li>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"addSubUnit(node.origin.entity)\">\r\n {{ 'AbpIdentity::AddSubUnit' | abpLocalization }}\r\n </li>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"delete(node.origin.entity)\">\r\n {{ 'AbpIdentity::Delete' | abpLocalization }}\r\n </li>\r\n </ng-template>\r\n </abp-tree>\r\n <p *ngIf=\"!loading && !nodes?.length\" class=\"text-muted\">\r\n {{ 'AbpIdentity::NoOrganizationUnits' | abpLocalization }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n *abpPermission=\"\r\n 'AbpIdentity.OrganizationUnits.ManageMembers || AbpIdentity.OrganizationUnits.ManageRoles'\r\n \"\r\n class=\"col-12 col-lg-6 col-xl-7\"\r\n >\r\n <div class=\"card\">\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li ngbNavItem *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageMembers'\">\r\n <a ngbNavLink>{{ 'AbpIdentity::Members' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngIf=\"selectedUnit; else selectUnitMsg\">\r\n <abp-organization-members\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n selectedOrganizationUnit: { value: selectedUnit }\r\n },\r\n componentKey: organizationMembersKey\r\n }\"\r\n [selectedOrganizationUnit]=\"selectedUnit\"\r\n ></abp-organization-members>\r\n </ng-container>\r\n <ng-template #selectUnitMsg>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::SelectAnOrganizationUnitToSeeMembers' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageRoles'\">\r\n <a ngbNavLink>{{ 'AbpIdentity::Roles' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngIf=\"selectedUnit; else selectUnitMsg\">\r\n <abp-organization-roles\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n selectedOrganizationUnit: { value: selectedUnit }\r\n },\r\n componentKey: organizationRolesKey\r\n }\"\r\n [selectedOrganizationUnit]=\"selectedUnit\"\r\n ></abp-organization-roles>\r\n </ng-container>\r\n <ng-template #selectUnitMsg>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::SelectAnOrganizationUnitToSeeRoles' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n <div [ngbNavOutlet]=\"nav\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n<abp-modal [(visible)]=\"isNodeModalVisible\" [busy]=\"isModalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{\r\n (nodeForm.get('id').value\r\n ? 'AbpIdentity::EditOrganizationUnit'\r\n : 'AbpIdentity::NewOrganizationUnit'\r\n ) | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"mb-3\" *ngIf=\"nodeForm.get('parentId').value as parentId\">\r\n <strong>{{\r\n 'AbpIdentity::OrganizationUnit:Parent{0}' | abpLocalization: getParentName(parentId)\r\n }}</strong>\r\n </div>\r\n <form [formGroup]=\"nodeForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selectedUnit\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"nodeForm?.invalid\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
664
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i3.OrganizationUnitService }, { type: i4.FormBuilder }, { type: i2.ConfirmationService }]; } });
|
|
665
|
+
|
|
666
|
+
class RolesComponent {
|
|
667
|
+
constructor(list, confirmationService, service, injector) {
|
|
668
|
+
this.list = list;
|
|
669
|
+
this.confirmationService = confirmationService;
|
|
670
|
+
this.service = service;
|
|
671
|
+
this.injector = injector;
|
|
672
|
+
this.data = { items: [], totalCount: 0 };
|
|
673
|
+
this.visiblePermissions = false;
|
|
674
|
+
this.modalBusy = false;
|
|
675
|
+
this.visibleClaims = false;
|
|
676
|
+
this.claimSubject = {};
|
|
677
|
+
this.onVisiblePermissionChange = (value) => {
|
|
678
|
+
this.visiblePermissions = value;
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
createForm() {
|
|
682
|
+
const data = new FormPropData(this.injector, this.selected);
|
|
683
|
+
this.form = generateFormFromProps(data);
|
|
684
|
+
}
|
|
685
|
+
hookToQuery() {
|
|
686
|
+
this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res));
|
|
687
|
+
}
|
|
688
|
+
ngOnInit() {
|
|
689
|
+
this.hookToQuery();
|
|
690
|
+
}
|
|
691
|
+
openModal() {
|
|
692
|
+
this.createForm();
|
|
693
|
+
this.isModalVisible = true;
|
|
694
|
+
}
|
|
695
|
+
onAdd() {
|
|
696
|
+
this.selected = {};
|
|
697
|
+
this.openModal();
|
|
698
|
+
}
|
|
699
|
+
onEdit(id) {
|
|
700
|
+
this.service
|
|
701
|
+
.get(id)
|
|
702
|
+
.pipe(take(1))
|
|
703
|
+
.subscribe(selectedRole => {
|
|
704
|
+
this.selected = selectedRole;
|
|
705
|
+
this.openModal();
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
save() {
|
|
709
|
+
if (!this.form.valid)
|
|
710
|
+
return;
|
|
711
|
+
this.modalBusy = true;
|
|
712
|
+
const { id } = this.selected;
|
|
713
|
+
(id
|
|
714
|
+
? this.service.update(id, Object.assign(Object.assign(Object.assign({}, this.selected), this.form.value), { id: this.selected.id, concurrencyStamp: this.selected.concurrencyStamp }))
|
|
715
|
+
: this.service.create(this.form.value))
|
|
716
|
+
.pipe(finalize(() => (this.modalBusy = false)))
|
|
717
|
+
.subscribe(() => {
|
|
718
|
+
this.list.get();
|
|
719
|
+
this.isModalVisible = false;
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
delete(id, name) {
|
|
723
|
+
this.confirmationService
|
|
724
|
+
.warn('AbpIdentity::RoleDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
|
|
725
|
+
messageLocalizationParams: [name],
|
|
726
|
+
})
|
|
727
|
+
.subscribe((status) => {
|
|
728
|
+
if (status === Confirmation.Status.confirm) {
|
|
729
|
+
this.service.delete(id).subscribe(() => this.list.get());
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
onManageClaims(id) {
|
|
734
|
+
this.claimSubject = {
|
|
735
|
+
id,
|
|
736
|
+
type: 'roles',
|
|
737
|
+
};
|
|
738
|
+
this.visibleClaims = true;
|
|
739
|
+
}
|
|
740
|
+
openPermissionsModal(providerKey) {
|
|
741
|
+
this.providerKey = providerKey;
|
|
742
|
+
setTimeout(() => {
|
|
743
|
+
this.visiblePermissions = true;
|
|
744
|
+
}, 0);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
RolesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RolesComponent, deps: [{ token: i1.ListService }, { token: i2.ConfirmationService }, { token: i3.IdentityRoleService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
748
|
+
RolesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: RolesComponent, selector: "abp-roles", providers: [
|
|
749
|
+
ListService,
|
|
750
|
+
{
|
|
751
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
752
|
+
useValue: "Identity.RolesComponent" /* Roles */,
|
|
753
|
+
},
|
|
754
|
+
], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'AbpIdentity::Roles' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-roles-wrapper\">\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpIdentity\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"form?.invalid\" (click)=\"save()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'R' },\r\n providerKey: { value: providerKey },\r\n hideBadges: { value: true },\r\n visible: { value: visiblePermissions, twoWay: true }\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent'\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n [providerKey]=\"providerKey\"\r\n providerName=\"R\"\r\n [hideBadges]=\"true\"\r\n>\r\n</abp-permission-management>\r\n\r\n<abp-claim-modal [(visible)]=\"visibleClaims\" [subject]=\"claimSubject\"></abp-claim-modal>\r\n", components: [{ type: i4$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { type: i6$1.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i6$1.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { type: i7.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }, { type: ClaimModalComponent, selector: "abp-claim-modal", inputs: ["subject", "visible"], outputs: ["visibleChange"] }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i13.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { type: i2.ModalCloseDirective, selector: "[abpClose]" }, { type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RolesComponent, decorators: [{
|
|
756
|
+
type: Component,
|
|
757
|
+
args: [{ selector: 'abp-roles', providers: [
|
|
758
|
+
ListService,
|
|
759
|
+
{
|
|
760
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
761
|
+
useValue: "Identity.RolesComponent" /* Roles */,
|
|
762
|
+
},
|
|
763
|
+
], template: "<abp-page [title]=\"'AbpIdentity::Roles' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-roles-wrapper\">\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpIdentity\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"form?.invalid\" (click)=\"save()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'R' },\r\n providerKey: { value: providerKey },\r\n hideBadges: { value: true },\r\n visible: { value: visiblePermissions, twoWay: true }\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent'\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n [providerKey]=\"providerKey\"\r\n providerName=\"R\"\r\n [hideBadges]=\"true\"\r\n>\r\n</abp-permission-management>\r\n\r\n<abp-claim-modal [(visible)]=\"visibleClaims\" [subject]=\"claimSubject\"></abp-claim-modal>\r\n" }]
|
|
764
|
+
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: i2.ConfirmationService }, { type: i3.IdentityRoleService }, { type: i0.Injector }]; }, propDecorators: { modalContent: [{
|
|
765
|
+
type: ViewChild,
|
|
766
|
+
args: ['modalContent']
|
|
767
|
+
}] } });
|
|
768
|
+
|
|
769
|
+
class SecurityLogsComponent {
|
|
770
|
+
constructor(list, service) {
|
|
771
|
+
this.list = list;
|
|
772
|
+
this.service = service;
|
|
773
|
+
this.data = { items: [], totalCount: 0 };
|
|
774
|
+
this.filter = {};
|
|
775
|
+
}
|
|
776
|
+
ngOnInit() {
|
|
777
|
+
this.hookToQuery();
|
|
778
|
+
}
|
|
779
|
+
hookToQuery() {
|
|
780
|
+
this.list
|
|
781
|
+
.hookToQuery(query => this.service.getList(Object.assign(Object.assign({}, query), this.filter)))
|
|
782
|
+
.subscribe(res => (this.data = res));
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
SecurityLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: SecurityLogsComponent, deps: [{ token: i1.ListService }, { token: i3.IdentitySecurityLogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
786
|
+
SecurityLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: SecurityLogsComponent, selector: "abp-security-logs", providers: [
|
|
787
|
+
ListService,
|
|
788
|
+
{
|
|
789
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
790
|
+
useValue: "Identity.SecurityLogs" /* SecurityLogs */,
|
|
791
|
+
},
|
|
792
|
+
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
793
|
+
], ngImport: i0, template: "<div id=\"wrapper\">\r\n <abp-page [title]=\"'AbpIdentity::SecurityLogs' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div class=\"card\">\r\n <div class=\"card-body pb-lg-3\">\r\n <div class=\"row\" (keyup.enter)=\"list.get()\">\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:StartTime' | abpLocalization }}</label>\r\n <input\r\n #startDate=\"ngbDatepicker\"\r\n class=\"form-control\"\r\n name=\"start-date\"\r\n readonly\r\n [(ngModel)]=\"filter.startTime\"\r\n [dayTemplate]=\"startDateTemplate\"\r\n ngbDatepicker\r\n (click)=\"startDate.toggle()\"\r\n />\r\n <ng-template\r\n #startDateTemplate\r\n let-date\r\n let-focused=\"focused\"\r\n let-selected=\"selected\"\r\n let-currentMonth=\"currentMonth\"\r\n >\r\n <div\r\n class=\"btn-light custom-day\"\r\n [class.bg-primary]=\"selected\"\r\n [class.text-white]=\"selected\"\r\n [class.text-muted]=\"currentMonth !== date.month\"\r\n [class.ng-range]=\"date.after(filter.startTime) && date.before(filter.endTime)\"\r\n [class.ng-range-end]=\"date.equals(filter.endTime)\"\r\n >\r\n {{ date.day }}\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:EndTime' | abpLocalization }}</label>\r\n <input\r\n #endDate=\"ngbDatepicker\"\r\n class=\"form-control\"\r\n name=\"end-date\"\r\n readonly\r\n [(ngModel)]=\"filter.endTime\"\r\n [dayTemplate]=\"endDateTemplate\"\r\n ngbDatepicker\r\n (click)=\"endDate.toggle()\"\r\n />\r\n <ng-template\r\n #endDateTemplate\r\n let-date\r\n let-focused=\"focused\"\r\n let-selected=\"selected\"\r\n let-currentMonth=\"currentMonth\"\r\n >\r\n <div\r\n class=\"btn-light custom-day\"\r\n [class.bg-primary]=\"selected\"\r\n [class.text-white]=\"selected\"\r\n [class.text-muted]=\"currentMonth !== date.month\"\r\n [class.ng-range]=\"date.after(filter.startTime) && date.before(filter.endTime)\"\r\n [class.ng-range-end]=\"date.equals(filter.startTime)\"\r\n >\r\n {{ date.day }}\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:Application' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.applicationName\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:Identity' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.identity\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:UserName' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.userName\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:Action' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.action\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:Client' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.clientId\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:CorrelationId' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.correlationId\" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-6 col-lg-3 d-grid\">\r\n <button (click)=\"list.get()\" class=\"mt-md-2 mb-md-2 btn btn-primary\">\r\n <i class=\"fas fa-search\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card\">\r\n <div class=\"card-body p-0\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n </abp-page>\r\n</div>\r\n", components: [{ type: i4$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { type: i6$1.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }], directives: [{ type: i8.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
794
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: SecurityLogsComponent, decorators: [{
|
|
795
|
+
type: Component,
|
|
796
|
+
args: [{ selector: 'abp-security-logs', providers: [
|
|
797
|
+
ListService,
|
|
798
|
+
{
|
|
799
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
800
|
+
useValue: "Identity.SecurityLogs" /* SecurityLogs */,
|
|
801
|
+
},
|
|
802
|
+
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
803
|
+
], template: "<div id=\"wrapper\">\r\n <abp-page [title]=\"'AbpIdentity::SecurityLogs' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div class=\"card\">\r\n <div class=\"card-body pb-lg-3\">\r\n <div class=\"row\" (keyup.enter)=\"list.get()\">\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:StartTime' | abpLocalization }}</label>\r\n <input\r\n #startDate=\"ngbDatepicker\"\r\n class=\"form-control\"\r\n name=\"start-date\"\r\n readonly\r\n [(ngModel)]=\"filter.startTime\"\r\n [dayTemplate]=\"startDateTemplate\"\r\n ngbDatepicker\r\n (click)=\"startDate.toggle()\"\r\n />\r\n <ng-template\r\n #startDateTemplate\r\n let-date\r\n let-focused=\"focused\"\r\n let-selected=\"selected\"\r\n let-currentMonth=\"currentMonth\"\r\n >\r\n <div\r\n class=\"btn-light custom-day\"\r\n [class.bg-primary]=\"selected\"\r\n [class.text-white]=\"selected\"\r\n [class.text-muted]=\"currentMonth !== date.month\"\r\n [class.ng-range]=\"date.after(filter.startTime) && date.before(filter.endTime)\"\r\n [class.ng-range-end]=\"date.equals(filter.endTime)\"\r\n >\r\n {{ date.day }}\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:EndTime' | abpLocalization }}</label>\r\n <input\r\n #endDate=\"ngbDatepicker\"\r\n class=\"form-control\"\r\n name=\"end-date\"\r\n readonly\r\n [(ngModel)]=\"filter.endTime\"\r\n [dayTemplate]=\"endDateTemplate\"\r\n ngbDatepicker\r\n (click)=\"endDate.toggle()\"\r\n />\r\n <ng-template\r\n #endDateTemplate\r\n let-date\r\n let-focused=\"focused\"\r\n let-selected=\"selected\"\r\n let-currentMonth=\"currentMonth\"\r\n >\r\n <div\r\n class=\"btn-light custom-day\"\r\n [class.bg-primary]=\"selected\"\r\n [class.text-white]=\"selected\"\r\n [class.text-muted]=\"currentMonth !== date.month\"\r\n [class.ng-range]=\"date.after(filter.startTime) && date.before(filter.endTime)\"\r\n [class.ng-range-end]=\"date.equals(filter.startTime)\"\r\n >\r\n {{ date.day }}\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:Application' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.applicationName\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:Identity' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.identity\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:UserName' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.userName\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:Action' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.action\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:Client' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.clientId\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6 col-lg-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{ 'AbpIdentity::SecurityLogs:CorrelationId' | abpLocalization }}</label>\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filter.correlationId\" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-6 col-lg-3 d-grid\">\r\n <button (click)=\"list.get()\" class=\"mt-md-2 mb-md-2 btn btn-primary\">\r\n <i class=\"fas fa-search\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card\">\r\n <div class=\"card-body p-0\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n </abp-page>\r\n</div>\r\n" }]
|
|
804
|
+
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: i3.IdentitySecurityLogService }]; } });
|
|
805
|
+
|
|
806
|
+
var eIdentityTwoFactorBehaviour;
|
|
807
|
+
(function (eIdentityTwoFactorBehaviour) {
|
|
808
|
+
eIdentityTwoFactorBehaviour[eIdentityTwoFactorBehaviour["Optional"] = 0] = "Optional";
|
|
809
|
+
eIdentityTwoFactorBehaviour[eIdentityTwoFactorBehaviour["Disabled"] = 1] = "Disabled";
|
|
810
|
+
eIdentityTwoFactorBehaviour[eIdentityTwoFactorBehaviour["Forced"] = 2] = "Forced";
|
|
811
|
+
})(eIdentityTwoFactorBehaviour || (eIdentityTwoFactorBehaviour = {}));
|
|
812
|
+
const identityTwoFactorBehaviourOptions = mapEnumToOptions(eIdentityTwoFactorBehaviour);
|
|
813
|
+
|
|
814
|
+
class UsersComponent {
|
|
815
|
+
constructor(list, confirmationService, service, fb, toasterService, injector, configState, roleService, organizationUnitService) {
|
|
816
|
+
this.list = list;
|
|
817
|
+
this.confirmationService = confirmationService;
|
|
818
|
+
this.service = service;
|
|
819
|
+
this.fb = fb;
|
|
820
|
+
this.toasterService = toasterService;
|
|
821
|
+
this.injector = injector;
|
|
822
|
+
this.configState = configState;
|
|
823
|
+
this.roleService = roleService;
|
|
824
|
+
this.organizationUnitService = organizationUnitService;
|
|
825
|
+
this.data = { items: [], totalCount: 0 };
|
|
826
|
+
this.setPasswordForm = this.fb.group({
|
|
827
|
+
newPassword: ['', [Validators.required, ...getPasswordValidators(this.injector)]],
|
|
828
|
+
});
|
|
829
|
+
this.visiblePermissions = false;
|
|
830
|
+
this.modalBusy = false;
|
|
831
|
+
this.visibleClaims = false;
|
|
832
|
+
this.claimSubject = {};
|
|
833
|
+
this.filters = {};
|
|
834
|
+
this.organization = {
|
|
835
|
+
response: {},
|
|
836
|
+
nodes: [],
|
|
837
|
+
checkedKeys: [],
|
|
838
|
+
expandedKeys: [],
|
|
839
|
+
selectFn: () => false,
|
|
840
|
+
};
|
|
841
|
+
this.twoFactor = {
|
|
842
|
+
isModalVisible: false,
|
|
843
|
+
checkboxValue: false,
|
|
844
|
+
isOptional: false,
|
|
845
|
+
};
|
|
846
|
+
this.lockForm = this.fb.group({
|
|
847
|
+
lockoutEnd: [new Date(), [Validators.required]],
|
|
848
|
+
});
|
|
849
|
+
this.dateTimePickerProps = {
|
|
850
|
+
defaultValue: new Date(),
|
|
851
|
+
displayName: 'AbpIdentity::DisplayName:LockoutEnd',
|
|
852
|
+
validators: () => [Validators.required],
|
|
853
|
+
name: 'lockoutEnd',
|
|
854
|
+
id: 'lockout-end',
|
|
855
|
+
type: "dateTime" /* DateTime */,
|
|
856
|
+
};
|
|
857
|
+
this.trackByFn = (index, item) => Object.keys(item)[0] || index;
|
|
858
|
+
this.onVisiblePermissionChange = (value) => {
|
|
859
|
+
this.visiblePermissions = value;
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
get roleGroups() {
|
|
863
|
+
var _a;
|
|
864
|
+
return ((_a = this.form.get('roleNames')) === null || _a === void 0 ? void 0 : _a.controls) || [];
|
|
865
|
+
}
|
|
866
|
+
ngOnInit() {
|
|
867
|
+
const { key } = identityTwoFactorBehaviourOptions[0];
|
|
868
|
+
this.twoFactor.isOptional =
|
|
869
|
+
this.configState.getFeature('Identity.TwoFactor') === key &&
|
|
870
|
+
this.configState.getSetting('Abp.Identity.TwoFactor.Behaviour') === key;
|
|
871
|
+
this.hookToQuery();
|
|
872
|
+
}
|
|
873
|
+
clearFilters() {
|
|
874
|
+
this.filters = {};
|
|
875
|
+
}
|
|
876
|
+
hookToQuery() {
|
|
877
|
+
this.list
|
|
878
|
+
.hookToQuery(query => this.service.getList(Object.assign(Object.assign({}, query), this.filters)))
|
|
879
|
+
.subscribe(res => (this.data = res));
|
|
880
|
+
}
|
|
881
|
+
buildForm() {
|
|
882
|
+
const data = new FormPropData(this.injector, this.selected);
|
|
883
|
+
this.form = generateFormFromProps(data);
|
|
884
|
+
this.service.getAssignableRoles().subscribe(({ items }) => {
|
|
885
|
+
this.roles = items;
|
|
886
|
+
this.form.addControl('roleNames', this.fb.array(this.roles.map(role => {
|
|
887
|
+
var _a;
|
|
888
|
+
return this.fb.group({
|
|
889
|
+
[role.name]: [
|
|
890
|
+
this.selected.id
|
|
891
|
+
? !!((_a = this.selectedUserRoles) === null || _a === void 0 ? void 0 : _a.find(userRole => userRole.id === role.id))
|
|
892
|
+
: role.isDefault,
|
|
893
|
+
],
|
|
894
|
+
});
|
|
895
|
+
})));
|
|
896
|
+
});
|
|
897
|
+
this.service.getAvailableOrganizationUnits().subscribe(res => {
|
|
898
|
+
this.organization.response = res;
|
|
899
|
+
this.organization.nodes = new TreeAdapter(res.items).getTree();
|
|
900
|
+
this.organization.expandedKeys = res.items.map(item => item.id);
|
|
901
|
+
this.organization.checkedKeys = this.selectedOrganizationUnits.map(unit => unit.id);
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
openModal() {
|
|
905
|
+
this.buildForm();
|
|
906
|
+
this.isModalVisible = true;
|
|
907
|
+
}
|
|
908
|
+
onAdd() {
|
|
909
|
+
this.selected = {};
|
|
910
|
+
this.selectedUserRoles = [];
|
|
911
|
+
this.selectedOrganizationUnits = [];
|
|
912
|
+
this.openModal();
|
|
913
|
+
}
|
|
914
|
+
onEdit(id) {
|
|
915
|
+
this.service
|
|
916
|
+
.get(id)
|
|
917
|
+
.pipe(tap(selectedUser => (this.selected = selectedUser)), switchMap(() => this.service.getRoles(id)), tap(res => (this.selectedUserRoles = res.items || [])), switchMap(() => this.service.getOrganizationUnits(id)), tap(res => (this.selectedOrganizationUnits = res)), take(1))
|
|
918
|
+
.subscribe(() => this.openModal());
|
|
919
|
+
}
|
|
920
|
+
save() {
|
|
921
|
+
var _a;
|
|
922
|
+
if (!this.form.valid)
|
|
923
|
+
return;
|
|
924
|
+
this.modalBusy = true;
|
|
925
|
+
const { roleNames } = this.form.value;
|
|
926
|
+
const mappedRoleNames = ((_a = roleNames === null || roleNames === void 0 ? void 0 : roleNames.filter(role => !!role[Object.keys(role)[0]])) === null || _a === void 0 ? void 0 : _a.map(role => Object.keys(role)[0])) ||
|
|
927
|
+
[];
|
|
928
|
+
const { id } = this.selected;
|
|
929
|
+
(id
|
|
930
|
+
? this.service.update(id, Object.assign(Object.assign(Object.assign({}, this.selected), this.form.value), { roleNames: mappedRoleNames, organizationUnitIds: this.organization.checkedKeys }))
|
|
931
|
+
: this.service.create(Object.assign(Object.assign({}, this.form.value), { roleNames: mappedRoleNames, organizationUnitIds: this.organization.checkedKeys })))
|
|
932
|
+
.pipe(finalize(() => (this.modalBusy = false)))
|
|
933
|
+
.subscribe(() => {
|
|
934
|
+
this.list.get();
|
|
935
|
+
this.isModalVisible = false;
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
delete(id, userName) {
|
|
939
|
+
this.confirmationService
|
|
940
|
+
.warn('AbpIdentity::UserDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
|
|
941
|
+
messageLocalizationParams: [userName],
|
|
942
|
+
})
|
|
943
|
+
.subscribe((status) => {
|
|
944
|
+
if (status === Confirmation.Status.confirm) {
|
|
945
|
+
this.service.delete(id).subscribe(() => this.list.get());
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
onManageClaims(id) {
|
|
950
|
+
this.claimSubject = {
|
|
951
|
+
id,
|
|
952
|
+
type: 'users',
|
|
953
|
+
};
|
|
954
|
+
this.visibleClaims = true;
|
|
955
|
+
}
|
|
956
|
+
unlock(id) {
|
|
957
|
+
this.service.unlock(id).subscribe(() => {
|
|
958
|
+
this.toasterService.success('AbpIdentity::UserUnlocked');
|
|
959
|
+
this.list.get();
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
openPermissionsModal(providerKey) {
|
|
963
|
+
this.providerKey = providerKey;
|
|
964
|
+
setTimeout(() => {
|
|
965
|
+
this.visiblePermissions = true;
|
|
966
|
+
}, 0);
|
|
967
|
+
}
|
|
968
|
+
setPassword() {
|
|
969
|
+
if (this.setPasswordForm.invalid)
|
|
970
|
+
return;
|
|
971
|
+
this.modalBusy = true;
|
|
972
|
+
this.service
|
|
973
|
+
.updatePassword(this.selected.id, this.setPasswordForm.value)
|
|
974
|
+
.pipe(finalize(() => (this.modalBusy = false)))
|
|
975
|
+
.subscribe(() => {
|
|
976
|
+
this.isSetPasswordModalVisible = false;
|
|
977
|
+
this.selected = {};
|
|
978
|
+
this.setPasswordForm.reset();
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
generatePassword() {
|
|
982
|
+
this.setPasswordForm.get('newPassword').setValue(generatePassword());
|
|
983
|
+
}
|
|
984
|
+
lock() {
|
|
985
|
+
const { lockoutEnd } = this.lockForm.value;
|
|
986
|
+
this.modalBusy = true;
|
|
987
|
+
this.service
|
|
988
|
+
.lock(this.selected.id, lockoutEnd)
|
|
989
|
+
.pipe(finalize(() => (this.modalBusy = false)))
|
|
990
|
+
.subscribe(() => {
|
|
991
|
+
this.isLockModalVisible = false;
|
|
992
|
+
this.lockForm.reset({
|
|
993
|
+
lockoutEnd: new Date(),
|
|
994
|
+
});
|
|
995
|
+
this.list.get();
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
setTwoFactor() {
|
|
999
|
+
this.modalBusy = true;
|
|
1000
|
+
this.service
|
|
1001
|
+
.setTwoFactorEnabled(this.selected.id, this.twoFactor.checkboxValue)
|
|
1002
|
+
.pipe(finalize(() => (this.modalBusy = false)))
|
|
1003
|
+
.subscribe(() => (this.twoFactor.isModalVisible = false));
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
UsersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: UsersComponent, deps: [{ token: i1.ListService }, { token: i2.ConfirmationService }, { token: i3.IdentityUserService }, { token: i4.FormBuilder }, { token: i2.ToasterService }, { token: i0.Injector }, { token: i1.ConfigStateService }, { token: i3.IdentityRoleService }, { token: i3.OrganizationUnitService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1007
|
+
UsersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: UsersComponent, selector: "abp-users", providers: [
|
|
1008
|
+
ListService,
|
|
1009
|
+
{
|
|
1010
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
1011
|
+
useValue: "Identity.UsersComponent" /* Users */,
|
|
1012
|
+
},
|
|
1013
|
+
], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'AbpIdentity::Users' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-users-wrapper\">\r\n <abp-advanced-entity-filters [list]=\"list\" localizationSourceName=\"AbpIdentity\">\r\n <abp-advanced-entity-filters-form>\r\n <form #filterForm (keyup.enter)=\"list.get()\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-sm-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"roleIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::Role' | abpLocalization }}\r\n </label>\r\n <abp-lookup-select\r\n cid=\"roleIdFilter\"\r\n lookupNameProp=\"name\"\r\n [getFn]=\"roleService.getList\"\r\n [(ngModel)]=\"filters.roleId\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n ></abp-lookup-select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::OrganizationUnit' | abpLocalization }}\r\n </label>\r\n <abp-lookup-select\r\n cid=\"organizationUnitIdFilter\"\r\n [getFn]=\"organizationUnitService.getList\"\r\n [(ngModel)]=\"filters.organizationUnitId\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n ></abp-lookup-select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::UserName' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"UserName\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.userName\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"PhoneNumber\" class=\"form-label\">\r\n {{ 'AbpIdentity::PhoneNumber' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"PhoneNumber\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.phoneNumber\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"EmailAddress\" class=\"form-label\">\r\n {{ 'AbpIdentity::EmailAddress' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"EmailAddress\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.emailAddress\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"d-flex col-3\">\r\n <div class=\"align-self-center\">\r\n <div class=\"form-check\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n id=\"is-locked-out\"\r\n [(ngModel)]=\"filters.isLockedOut\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n <label class=\"form-check-label\" for=\"is-locked-out\">{{\r\n 'AbpIdentity::Lock' | abpLocalization\r\n }}</label>\r\n </div>\r\n </div>\r\n <div class=\"align-self-center ms-3\">\r\n <div class=\"form-check\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n id=\"not-active\"\r\n [(ngModel)]=\"filters.notActive\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n <label class=\"form-check-label\" for=\"not-active\">{{\r\n 'AbpIdentity::NotActive' | abpLocalization\r\n }}</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-auto align-self-end mb-3\">\r\n <div class=\"row\">\r\n <div class=\"col-6 col-sm-auto d-grid\">\r\n <button type=\"button\" class=\"btn btn-outline-primary\" (click)=\"clearFilters()\">\r\n <span>{{ 'AbpUi::Clear' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n <div class=\"col-6 col-sm-auto d-grid\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"list.get()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </abp-advanced-entity-filters-form>\r\n </abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\" (disappear)=\"form = null\">\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewUser') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <ul id=\"user-nav-tabs\" ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li id=\"user-informations\" ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::UserInformations' | abpLocalization }}</a>\r\n <ng-template ngbNavContent\r\n ><abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form\r\n ></ng-template>\r\n </li>\r\n <li id=\"user-roles\" ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::Roles' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <div\r\n *ngFor=\"let roleGroup of roleGroups; let i = index; trackBy: trackByFn\"\r\n class=\"form-check mb-2\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n [attr.id]=\"'roles-' + i\"\r\n [formControl]=\"roleGroup.controls[roles[i].name]\"\r\n />\r\n <label class=\"form-check-label\" [attr.for]=\"'roles-' + i\">{{ roles[i].name }}</label>\r\n </div></ng-template\r\n >\r\n </li>\r\n <li id=\"user-organization-units\" ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::OrganizationUnits' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-tree\r\n *ngIf=\"organization.nodes?.length; else noDataMessage\"\r\n [checkStrictly]=\"true\"\r\n [checkable]=\"true\"\r\n [nodes]=\"organization.nodes\"\r\n [isNodeSelected]=\"organization.selectFn\"\r\n [(checkedKeys)]=\"organization.checkedKeys\"\r\n [(expandedKeys)]=\"organization.expandedKeys\"\r\n ></abp-tree>\r\n\r\n <ng-template #noDataMessage>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::NoOrganizationUnits' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 fade-in-top\"></div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"form?.invalid\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'U' },\r\n providerKey: { value: providerKey },\r\n hideBadges: { value: true },\r\n visible: { value: visiblePermissions, twoWay: true }\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent'\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n [providerKey]=\"providerKey\"\r\n [hideBadges]=\"true\"\r\n providerName=\"U\"\r\n>\r\n</abp-permission-management>\r\n\r\n<abp-claim-modal [(visible)]=\"visibleClaims\" [subject]=\"claimSubject\"></abp-claim-modal>\r\n\r\n<abp-modal [(visible)]=\"isSetPasswordModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::SetPassword' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"setPasswordForm\" (ngSubmit)=\"setPassword()\" validateOnSubmit>\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"new-password\">{{\r\n 'AbpIdentity::Password' | abpLocalization\r\n }}</label>\r\n <div class=\"input-group\">\r\n <div class=\"col-10 p-0\">\r\n <input\r\n type=\"text\"\r\n id=\"new-password\"\r\n class=\"form-control\"\r\n formControlName=\"newPassword\"\r\n autofocus\r\n />\r\n </div>\r\n\r\n <button\r\n class=\"btn btn-secondary\"\r\n id=\"generate-random-password-button\"\r\n type=\"button\"\r\n (click)=\"generatePassword()\"\r\n >\r\n <i class=\"fa fa-refresh\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n (click)=\"setPassword()\"\r\n [disabled]=\"setPasswordForm?.invalid\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-modal [(visible)]=\"isLockModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::Lock' | abpLocalization }} - {{ selected.userName }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"lockForm\" (ngSubmit)=\"lock()\" validateOnSubmit>\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"mb-3\" [formGroup]=\"lockForm\">\r\n <abp-date-time-picker [prop]=\"dateTimePickerProps\"></abp-date-time-picker>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n (click)=\"lock()\"\r\n [disabled]=\"lockForm?.invalid || modalBusy\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-modal [(visible)]=\"twoFactor.isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::TwoFactor' | abpLocalization }} - {{ selected.userName }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n id=\"two-factor-enabled\"\r\n [(ngModel)]=\"twoFactor.checkboxValue\"\r\n />\r\n <label class=\"form-check-label\" for=\"two-factor-enabled\">{{\r\n 'AbpIdentity::DisplayName:TwoFactorEnabled' | abpLocalization\r\n }}</label>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"setTwoFactor()\" [disabled]=\"modalBusy\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", styles: [".mh-35{max-height:35px}\n"], components: [{ type: i4$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { type: i6.AdvancedEntityFiltersFormComponent, selector: "abp-advanced-entity-filters-form" }, { type: i6.LookupSelectComponent, selector: "abp-lookup-select", inputs: ["maxResultCount"] }, { type: i6$1.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i6$1.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i5$1.TreeComponent, selector: "abp-tree", inputs: ["noAnimation", "draggable", "checkable", "checkStrictly", "checkedKeys", "nodes", "expandedKeys", "selectedNode", "isNodeSelected", "beforeDrop"], outputs: ["checkedKeysChange", "expandedKeysChange", "selectedNodeChange", "dropOver"] }, { type: i8.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { type: i7.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }, { type: ClaimModalComponent, selector: "abp-claim-modal", inputs: ["subject", "visible"], outputs: ["visibleChange"] }, { type: i6$1.DateTimePickerComponent, selector: "abp-date-time-picker", inputs: ["prop", "meridian"], exportAs: ["abpDateTimePicker"] }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i13.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { type: i8.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { type: i8.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { type: i8.NgbNavLink, selector: "a[ngbNavLink]" }, { type: i8.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i13.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { type: i2.ModalCloseDirective, selector: "[abpClose]" }, { type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }], pipes: { "abpLocalization": i1.LocalizationPipe } });
|
|
1014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: UsersComponent, decorators: [{
|
|
1015
|
+
type: Component,
|
|
1016
|
+
args: [{ selector: 'abp-users', providers: [
|
|
1017
|
+
ListService,
|
|
1018
|
+
{
|
|
1019
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
1020
|
+
useValue: "Identity.UsersComponent" /* Users */,
|
|
1021
|
+
},
|
|
1022
|
+
], styles: [
|
|
1023
|
+
`
|
|
1024
|
+
.mh-35 {
|
|
1025
|
+
max-height: 35px;
|
|
1026
|
+
}
|
|
1027
|
+
`,
|
|
1028
|
+
], template: "<abp-page [title]=\"'AbpIdentity::Users' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-users-wrapper\">\r\n <abp-advanced-entity-filters [list]=\"list\" localizationSourceName=\"AbpIdentity\">\r\n <abp-advanced-entity-filters-form>\r\n <form #filterForm (keyup.enter)=\"list.get()\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-sm-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"roleIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::Role' | abpLocalization }}\r\n </label>\r\n <abp-lookup-select\r\n cid=\"roleIdFilter\"\r\n lookupNameProp=\"name\"\r\n [getFn]=\"roleService.getList\"\r\n [(ngModel)]=\"filters.roleId\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n ></abp-lookup-select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::OrganizationUnit' | abpLocalization }}\r\n </label>\r\n <abp-lookup-select\r\n cid=\"organizationUnitIdFilter\"\r\n [getFn]=\"organizationUnitService.getList\"\r\n [(ngModel)]=\"filters.organizationUnitId\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n ></abp-lookup-select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::UserName' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"UserName\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.userName\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"PhoneNumber\" class=\"form-label\">\r\n {{ 'AbpIdentity::PhoneNumber' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"PhoneNumber\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.phoneNumber\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"EmailAddress\" class=\"form-label\">\r\n {{ 'AbpIdentity::EmailAddress' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"EmailAddress\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.emailAddress\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"d-flex col-3\">\r\n <div class=\"align-self-center\">\r\n <div class=\"form-check\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n id=\"is-locked-out\"\r\n [(ngModel)]=\"filters.isLockedOut\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n <label class=\"form-check-label\" for=\"is-locked-out\">{{\r\n 'AbpIdentity::Lock' | abpLocalization\r\n }}</label>\r\n </div>\r\n </div>\r\n <div class=\"align-self-center ms-3\">\r\n <div class=\"form-check\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n id=\"not-active\"\r\n [(ngModel)]=\"filters.notActive\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n <label class=\"form-check-label\" for=\"not-active\">{{\r\n 'AbpIdentity::NotActive' | abpLocalization\r\n }}</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-auto align-self-end mb-3\">\r\n <div class=\"row\">\r\n <div class=\"col-6 col-sm-auto d-grid\">\r\n <button type=\"button\" class=\"btn btn-outline-primary\" (click)=\"clearFilters()\">\r\n <span>{{ 'AbpUi::Clear' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n <div class=\"col-6 col-sm-auto d-grid\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"list.get()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </abp-advanced-entity-filters-form>\r\n </abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\" (disappear)=\"form = null\">\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewUser') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <ul id=\"user-nav-tabs\" ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li id=\"user-informations\" ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::UserInformations' | abpLocalization }}</a>\r\n <ng-template ngbNavContent\r\n ><abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form\r\n ></ng-template>\r\n </li>\r\n <li id=\"user-roles\" ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::Roles' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <div\r\n *ngFor=\"let roleGroup of roleGroups; let i = index; trackBy: trackByFn\"\r\n class=\"form-check mb-2\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n [attr.id]=\"'roles-' + i\"\r\n [formControl]=\"roleGroup.controls[roles[i].name]\"\r\n />\r\n <label class=\"form-check-label\" [attr.for]=\"'roles-' + i\">{{ roles[i].name }}</label>\r\n </div></ng-template\r\n >\r\n </li>\r\n <li id=\"user-organization-units\" ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::OrganizationUnits' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-tree\r\n *ngIf=\"organization.nodes?.length; else noDataMessage\"\r\n [checkStrictly]=\"true\"\r\n [checkable]=\"true\"\r\n [nodes]=\"organization.nodes\"\r\n [isNodeSelected]=\"organization.selectFn\"\r\n [(checkedKeys)]=\"organization.checkedKeys\"\r\n [(expandedKeys)]=\"organization.expandedKeys\"\r\n ></abp-tree>\r\n\r\n <ng-template #noDataMessage>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::NoOrganizationUnits' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 fade-in-top\"></div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"form?.invalid\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'U' },\r\n providerKey: { value: providerKey },\r\n hideBadges: { value: true },\r\n visible: { value: visiblePermissions, twoWay: true }\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent'\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n [providerKey]=\"providerKey\"\r\n [hideBadges]=\"true\"\r\n providerName=\"U\"\r\n>\r\n</abp-permission-management>\r\n\r\n<abp-claim-modal [(visible)]=\"visibleClaims\" [subject]=\"claimSubject\"></abp-claim-modal>\r\n\r\n<abp-modal [(visible)]=\"isSetPasswordModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::SetPassword' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"setPasswordForm\" (ngSubmit)=\"setPassword()\" validateOnSubmit>\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"new-password\">{{\r\n 'AbpIdentity::Password' | abpLocalization\r\n }}</label>\r\n <div class=\"input-group\">\r\n <div class=\"col-10 p-0\">\r\n <input\r\n type=\"text\"\r\n id=\"new-password\"\r\n class=\"form-control\"\r\n formControlName=\"newPassword\"\r\n autofocus\r\n />\r\n </div>\r\n\r\n <button\r\n class=\"btn btn-secondary\"\r\n id=\"generate-random-password-button\"\r\n type=\"button\"\r\n (click)=\"generatePassword()\"\r\n >\r\n <i class=\"fa fa-refresh\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n (click)=\"setPassword()\"\r\n [disabled]=\"setPasswordForm?.invalid\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-modal [(visible)]=\"isLockModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::Lock' | abpLocalization }} - {{ selected.userName }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"lockForm\" (ngSubmit)=\"lock()\" validateOnSubmit>\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"mb-3\" [formGroup]=\"lockForm\">\r\n <abp-date-time-picker [prop]=\"dateTimePickerProps\"></abp-date-time-picker>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n (click)=\"lock()\"\r\n [disabled]=\"lockForm?.invalid || modalBusy\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-modal [(visible)]=\"twoFactor.isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::TwoFactor' | abpLocalization }} - {{ selected.userName }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n id=\"two-factor-enabled\"\r\n [(ngModel)]=\"twoFactor.checkboxValue\"\r\n />\r\n <label class=\"form-check-label\" for=\"two-factor-enabled\">{{\r\n 'AbpIdentity::DisplayName:TwoFactorEnabled' | abpLocalization\r\n }}</label>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"setTwoFactor()\" [disabled]=\"modalBusy\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
1029
|
+
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: i2.ConfirmationService }, { type: i3.IdentityUserService }, { type: i4.FormBuilder }, { type: i2.ToasterService }, { type: i0.Injector }, { type: i1.ConfigStateService }, { type: i3.IdentityRoleService }, { type: i3.OrganizationUnitService }]; }, propDecorators: { modalContent: [{
|
|
1030
|
+
type: ViewChild,
|
|
1031
|
+
args: ['modalContent']
|
|
1032
|
+
}] } });
|
|
1033
|
+
|
|
1034
|
+
const DEFAULT_CLAIMS_ENTITY_ACTIONS = EntityAction.createMany([
|
|
1035
|
+
{
|
|
1036
|
+
text: 'AbpIdentity::Edit',
|
|
1037
|
+
action: data => {
|
|
1038
|
+
const component = data.getInjected(ClaimsComponent);
|
|
1039
|
+
component.onEdit(data.record.id);
|
|
1040
|
+
},
|
|
1041
|
+
permission: 'AbpIdentity.ClaimTypes.Update',
|
|
1042
|
+
visible: data => !data.record.isStatic,
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
text: 'AbpIdentity::Delete',
|
|
1046
|
+
action: data => {
|
|
1047
|
+
const component = data.getInjected(ClaimsComponent);
|
|
1048
|
+
component.delete(data.record.id, data.record.name);
|
|
1049
|
+
},
|
|
1050
|
+
permission: 'AbpIdentity.ClaimTypes.Delete',
|
|
1051
|
+
},
|
|
1052
|
+
]);
|
|
1053
|
+
|
|
1054
|
+
const DEFAULT_CLAIMS_ENTITY_PROPS = EntityProp.createMany([
|
|
1055
|
+
{
|
|
1056
|
+
type: "string" /* String */,
|
|
1057
|
+
name: 'name',
|
|
1058
|
+
displayName: 'AbpIdentity::Name',
|
|
1059
|
+
sortable: true,
|
|
1060
|
+
columnWidth: 250,
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
type: "string" /* String */,
|
|
1064
|
+
name: 'valueType',
|
|
1065
|
+
displayName: 'AbpIdentity::ValueType',
|
|
1066
|
+
sortable: true,
|
|
1067
|
+
columnWidth: 200,
|
|
1068
|
+
valueResolver: data => of(data.getInjected(ClaimsComponent).getTypeName(data.record.valueType)),
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
type: "string" /* String */,
|
|
1072
|
+
name: 'description',
|
|
1073
|
+
displayName: 'AbpIdentity::Description',
|
|
1074
|
+
sortable: true,
|
|
1075
|
+
columnWidth: 250,
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
type: "string" /* String */,
|
|
1079
|
+
name: 'regex',
|
|
1080
|
+
displayName: 'AbpIdentity::Regex',
|
|
1081
|
+
sortable: true,
|
|
1082
|
+
columnWidth: 200,
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
type: "boolean" /* Boolean */,
|
|
1086
|
+
name: 'required',
|
|
1087
|
+
displayName: 'AbpIdentity::Required',
|
|
1088
|
+
sortable: true,
|
|
1089
|
+
columnWidth: 150,
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
type: "boolean" /* Boolean */,
|
|
1093
|
+
name: 'isStatic',
|
|
1094
|
+
displayName: 'AbpIdentity::IsStatic',
|
|
1095
|
+
sortable: true,
|
|
1096
|
+
columnWidth: 150,
|
|
1097
|
+
},
|
|
1098
|
+
]);
|
|
1099
|
+
|
|
1100
|
+
const DEFAULT_CLAIMS_CREATE_FORM_PROPS = FormProp.createMany([
|
|
1101
|
+
{
|
|
1102
|
+
type: "string" /* String */,
|
|
1103
|
+
name: 'name',
|
|
1104
|
+
displayName: 'AbpIdentity::Name',
|
|
1105
|
+
id: 'name',
|
|
1106
|
+
validators: () => [Validators.required, Validators.maxLength(256)],
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
type: "boolean" /* Boolean */,
|
|
1110
|
+
name: 'required',
|
|
1111
|
+
displayName: 'AbpIdentity::Required',
|
|
1112
|
+
id: 'required',
|
|
1113
|
+
defaultValue: false,
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
type: "string" /* String */,
|
|
1117
|
+
name: 'regex',
|
|
1118
|
+
displayName: 'AbpIdentity::Regex',
|
|
1119
|
+
id: 'regex',
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
type: "string" /* String */,
|
|
1123
|
+
name: 'regexDescription',
|
|
1124
|
+
displayName: 'AbpIdentity::RegexDescription',
|
|
1125
|
+
id: 'regex-description',
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
type: "string" /* String */,
|
|
1129
|
+
name: 'description',
|
|
1130
|
+
displayName: 'AbpIdentity::Description',
|
|
1131
|
+
id: 'description',
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
type: "number" /* Number */,
|
|
1135
|
+
name: 'valueType',
|
|
1136
|
+
displayName: 'AbpIdentity::ValueType',
|
|
1137
|
+
id: 'value-type',
|
|
1138
|
+
defaultValue: 0,
|
|
1139
|
+
options: () => of([
|
|
1140
|
+
{ key: 'String', value: 0 },
|
|
1141
|
+
{ key: 'Int', value: 1 },
|
|
1142
|
+
{ key: 'Boolean', value: 2 },
|
|
1143
|
+
{ key: 'DateTime', value: 3 },
|
|
1144
|
+
]),
|
|
1145
|
+
},
|
|
1146
|
+
]);
|
|
1147
|
+
const DEFAULT_CLAIMS_EDIT_FORM_PROPS = DEFAULT_CLAIMS_CREATE_FORM_PROPS;
|
|
1148
|
+
|
|
1149
|
+
const DEFAULT_CLAIMS_TOOLBAR_ACTIONS = ToolbarAction.createMany([
|
|
1150
|
+
{
|
|
1151
|
+
text: 'AbpIdentity::NewClaimType',
|
|
1152
|
+
action: data => {
|
|
1153
|
+
const component = data.getInjected(ClaimsComponent);
|
|
1154
|
+
component.onAdd();
|
|
1155
|
+
},
|
|
1156
|
+
permission: 'AbpIdentity.ClaimTypes.Create',
|
|
1157
|
+
icon: 'fa fa-plus',
|
|
1158
|
+
},
|
|
1159
|
+
]);
|
|
1160
|
+
|
|
1161
|
+
/* tslint:disable:max-line-length */
|
|
1162
|
+
const DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS = EntityAction.createMany([
|
|
1163
|
+
{
|
|
1164
|
+
text: 'AbpIdentity::Delete',
|
|
1165
|
+
action: data => {
|
|
1166
|
+
const component = data.getInjected(OrganizationMembersComponent);
|
|
1167
|
+
component.delete(data.record.id, data.record.name);
|
|
1168
|
+
},
|
|
1169
|
+
permission: 'AbpIdentity.OrganizationUnits.ManageMembers',
|
|
1170
|
+
},
|
|
1171
|
+
]);
|
|
1172
|
+
|
|
1173
|
+
const DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS = EntityProp.createMany([
|
|
1174
|
+
{
|
|
1175
|
+
type: "string" /* String */,
|
|
1176
|
+
name: 'userName',
|
|
1177
|
+
displayName: 'AbpIdentity::UserName',
|
|
1178
|
+
sortable: true,
|
|
1179
|
+
columnWidth: 180,
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
type: "string" /* String */,
|
|
1183
|
+
name: 'email',
|
|
1184
|
+
displayName: 'AbpIdentity::EmailAddress',
|
|
1185
|
+
sortable: true,
|
|
1186
|
+
columnWidth: 200,
|
|
1187
|
+
valueResolver: data => {
|
|
1188
|
+
const { email, emailConfirmed } = data.record;
|
|
1189
|
+
return of((email || '') + (emailConfirmed ? `<i class="fa fa-check text-success ms-1"></i>` : ''));
|
|
1190
|
+
},
|
|
1191
|
+
},
|
|
1192
|
+
]);
|
|
1193
|
+
|
|
1194
|
+
/* tslint:disable:max-line-length */
|
|
1195
|
+
const DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS = EntityAction.createMany([
|
|
1196
|
+
{
|
|
1197
|
+
text: 'AbpIdentity::Delete',
|
|
1198
|
+
action: data => {
|
|
1199
|
+
const component = data.getInjected(OrganizationRolesComponent);
|
|
1200
|
+
component.delete(data.record.id, data.record.name);
|
|
1201
|
+
},
|
|
1202
|
+
permission: 'AbpIdentity.OrganizationUnits.ManageRoles',
|
|
1203
|
+
},
|
|
1204
|
+
]);
|
|
1205
|
+
|
|
1206
|
+
const DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS = EntityProp.createMany([
|
|
1207
|
+
{
|
|
1208
|
+
type: "string" /* String */,
|
|
1209
|
+
name: 'name',
|
|
1210
|
+
displayName: 'AbpIdentity::RoleName',
|
|
1211
|
+
sortable: true,
|
|
1212
|
+
},
|
|
1213
|
+
]);
|
|
1214
|
+
|
|
1215
|
+
const DEFAULT_ORGANIZATION_UNITS_CREATE_FORM_PROPS = FormProp.createMany([
|
|
1216
|
+
{
|
|
1217
|
+
type: "string" /* String */,
|
|
1218
|
+
name: 'displayName',
|
|
1219
|
+
displayName: 'AbpIdentity::DisplayName',
|
|
1220
|
+
id: 'organization-unit-display-name',
|
|
1221
|
+
validators: () => [Validators.required, Validators.maxLength(256)],
|
|
1222
|
+
},
|
|
1223
|
+
]);
|
|
1224
|
+
const DEFAULT_ORGANIZATION_UNITS_EDIT_FORM_PROPS = DEFAULT_ORGANIZATION_UNITS_CREATE_FORM_PROPS;
|
|
1225
|
+
|
|
1226
|
+
const DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS = ToolbarAction.createMany([]);
|
|
1227
|
+
|
|
1228
|
+
const DEFAULT_ROLES_ENTITY_ACTIONS = EntityAction.createMany([
|
|
1229
|
+
{
|
|
1230
|
+
text: 'AbpIdentity::Edit',
|
|
1231
|
+
action: data => {
|
|
1232
|
+
const component = data.getInjected(RolesComponent);
|
|
1233
|
+
component.onEdit(data.record.id);
|
|
1234
|
+
},
|
|
1235
|
+
permission: 'AbpIdentity.Roles.Update',
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
text: 'AbpIdentity::Claims',
|
|
1239
|
+
action: data => {
|
|
1240
|
+
const component = data.getInjected(RolesComponent);
|
|
1241
|
+
component.onManageClaims(data.record.id);
|
|
1242
|
+
},
|
|
1243
|
+
permission: 'AbpIdentity.Roles.Update',
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
text: 'AbpIdentity::Permissions',
|
|
1247
|
+
action: data => {
|
|
1248
|
+
const component = data.getInjected(RolesComponent);
|
|
1249
|
+
component.openPermissionsModal(data.record.name);
|
|
1250
|
+
},
|
|
1251
|
+
permission: 'AbpIdentity.Roles.ManagePermissions',
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
text: 'AbpIdentity::ChangeHistory',
|
|
1255
|
+
action: data => {
|
|
1256
|
+
const showHistory = data.getInjected(SHOW_ENTITY_HISTORY);
|
|
1257
|
+
showHistory(data.record.id, 'Volo.Abp.Identity.IdentityRole');
|
|
1258
|
+
},
|
|
1259
|
+
permission: 'AbpIdentity.Roles.ViewChangeHistory',
|
|
1260
|
+
visible: data => Boolean(data.getInjected(SHOW_ENTITY_HISTORY, null)),
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
text: 'AbpIdentity::Delete',
|
|
1264
|
+
action: data => {
|
|
1265
|
+
const component = data.getInjected(RolesComponent);
|
|
1266
|
+
component.delete(data.record.id, data.record.name);
|
|
1267
|
+
},
|
|
1268
|
+
permission: 'AbpIdentity.Roles.Delete',
|
|
1269
|
+
visible: data => !data.record.isStatic,
|
|
1270
|
+
},
|
|
1271
|
+
]);
|
|
1272
|
+
|
|
1273
|
+
const DEFAULT_ROLES_ENTITY_PROPS = EntityProp.createMany([
|
|
1274
|
+
{
|
|
1275
|
+
type: "string" /* String */,
|
|
1276
|
+
name: 'name',
|
|
1277
|
+
displayName: 'AbpIdentity::RoleName',
|
|
1278
|
+
sortable: true,
|
|
1279
|
+
valueResolver: data => {
|
|
1280
|
+
const l10n = data.getInjected(LocalizationService);
|
|
1281
|
+
const t = l10n.instant.bind(l10n);
|
|
1282
|
+
const { isDefault, isPublic, name } = data.record;
|
|
1283
|
+
return of(escapeHtmlChars(name) +
|
|
1284
|
+
(isDefault
|
|
1285
|
+
? `<span class="badge rounded-pill bg-success ms-1">${t('AbpIdentity::DisplayName:IsDefault')}</span>`
|
|
1286
|
+
: '') +
|
|
1287
|
+
(isPublic
|
|
1288
|
+
? `<span class="badge rounded-pill bg-info ms-1">${t('AbpIdentity::DisplayName:IsPublic')}</span>`
|
|
1289
|
+
: ''));
|
|
1290
|
+
},
|
|
1291
|
+
},
|
|
1292
|
+
]);
|
|
1293
|
+
|
|
1294
|
+
const DEFAULT_ROLES_CREATE_FORM_PROPS = FormProp.createMany([
|
|
1295
|
+
{
|
|
1296
|
+
type: "string" /* String */,
|
|
1297
|
+
name: 'name',
|
|
1298
|
+
displayName: 'AbpIdentity::RoleName',
|
|
1299
|
+
id: 'role-name',
|
|
1300
|
+
disabled: (data) => data.record && data.record.isStatic,
|
|
1301
|
+
validators: () => [Validators.required],
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
type: "boolean" /* Boolean */,
|
|
1305
|
+
name: 'isDefault',
|
|
1306
|
+
displayName: 'AbpIdentity::DisplayName:IsDefault',
|
|
1307
|
+
id: 'role-is-default',
|
|
1308
|
+
defaultValue: false,
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
type: "boolean" /* Boolean */,
|
|
1312
|
+
name: 'isPublic',
|
|
1313
|
+
displayName: 'AbpIdentity::DisplayName:IsPublic',
|
|
1314
|
+
id: 'role-is-public',
|
|
1315
|
+
defaultValue: false,
|
|
1316
|
+
},
|
|
1317
|
+
]);
|
|
1318
|
+
const DEFAULT_ROLES_EDIT_FORM_PROPS = DEFAULT_ROLES_CREATE_FORM_PROPS;
|
|
1319
|
+
|
|
1320
|
+
const DEFAULT_ROLES_TOOLBAR_ACTIONS = ToolbarAction.createMany([
|
|
1321
|
+
{
|
|
1322
|
+
text: 'AbpIdentity::NewRole',
|
|
1323
|
+
action: data => {
|
|
1324
|
+
const component = data.getInjected(RolesComponent);
|
|
1325
|
+
component.onAdd();
|
|
1326
|
+
},
|
|
1327
|
+
permission: 'AbpIdentity.Roles.Create',
|
|
1328
|
+
icon: 'fa fa-plus',
|
|
1329
|
+
},
|
|
1330
|
+
]);
|
|
1331
|
+
|
|
1332
|
+
const DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS = EntityAction.createMany([]);
|
|
1333
|
+
|
|
1334
|
+
const DEFAULT_SECURITY_LOGS_ENTITY_PROPS = EntityProp.createMany([
|
|
1335
|
+
{
|
|
1336
|
+
type: "string" /* String */,
|
|
1337
|
+
name: 'creationTime',
|
|
1338
|
+
displayName: 'AbpIdentity::SecurityLogs:Time',
|
|
1339
|
+
sortable: true,
|
|
1340
|
+
columnWidth: 180,
|
|
1341
|
+
valueResolver: data => {
|
|
1342
|
+
const config = data.getInjected(ConfigStateService);
|
|
1343
|
+
const localeId = data.getInjected(LOCALE_ID);
|
|
1344
|
+
return of(formatDate(data.record.creationTime, getShortDateShortTimeFormat(config), localeId));
|
|
1345
|
+
},
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
type: "string" /* String */,
|
|
1349
|
+
name: 'action',
|
|
1350
|
+
displayName: 'AbpIdentity::SecurityLogs:Action',
|
|
1351
|
+
sortable: true,
|
|
1352
|
+
columnWidth: 180,
|
|
1353
|
+
valueResolver: data => {
|
|
1354
|
+
return of(`<div style="max-width: 160px" class="pointer abp-ellipsis-inline">${data.record.action || ''}</div>`);
|
|
1355
|
+
},
|
|
1356
|
+
action: data => {
|
|
1357
|
+
const component = data.getInjected(SecurityLogsComponent);
|
|
1358
|
+
component.filter.action = data.record.action;
|
|
1359
|
+
component.list.get();
|
|
1360
|
+
},
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
type: "string" /* String */,
|
|
1364
|
+
name: 'clientIpAddress',
|
|
1365
|
+
displayName: 'AbpIdentity::SecurityLogs:IpAddress',
|
|
1366
|
+
sortable: false,
|
|
1367
|
+
columnWidth: 200,
|
|
1368
|
+
valueResolver: data => {
|
|
1369
|
+
return of(`<div style="max-width: 180px" class="abp-ellipsis-inline">${data.record.clientIpAddress || ''}</div>`);
|
|
1370
|
+
},
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
type: "string" /* String */,
|
|
1374
|
+
name: 'browserInfo',
|
|
1375
|
+
displayName: 'AbpIdentity::SecurityLogs:Browser',
|
|
1376
|
+
sortable: false,
|
|
1377
|
+
columnWidth: 200,
|
|
1378
|
+
valueResolver: data => {
|
|
1379
|
+
return of(`<div style="max-width: 180px" class="abp-ellipsis-inline">${data.record.browserInfo || ''}</div>`);
|
|
1380
|
+
},
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
type: "string" /* String */,
|
|
1384
|
+
name: 'applicationName',
|
|
1385
|
+
displayName: 'AbpIdentity::SecurityLogs:Application',
|
|
1386
|
+
sortable: true,
|
|
1387
|
+
columnWidth: 150,
|
|
1388
|
+
valueResolver: data => {
|
|
1389
|
+
return of(`<div style="max-width: 135px" class="pointer abp-ellipsis-inline">${data.record.applicationName || ''}</div>`);
|
|
1390
|
+
},
|
|
1391
|
+
action: data => {
|
|
1392
|
+
const component = data.getInjected(SecurityLogsComponent);
|
|
1393
|
+
component.filter.applicationName = data.record.applicationName;
|
|
1394
|
+
component.list.get();
|
|
1395
|
+
},
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
type: "string" /* String */,
|
|
1399
|
+
name: 'identity',
|
|
1400
|
+
displayName: 'AbpIdentity::SecurityLogs:Identity',
|
|
1401
|
+
sortable: true,
|
|
1402
|
+
columnWidth: 150,
|
|
1403
|
+
valueResolver: data => {
|
|
1404
|
+
return of(`<div style="max-width: 135px" class="pointer abp-ellipsis-inline">${data.record.identity || ''}</div>`);
|
|
1405
|
+
},
|
|
1406
|
+
action: data => {
|
|
1407
|
+
const component = data.getInjected(SecurityLogsComponent);
|
|
1408
|
+
component.filter.identity = data.record.identity;
|
|
1409
|
+
component.list.get();
|
|
1410
|
+
},
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
type: "string" /* String */,
|
|
1414
|
+
name: 'userName',
|
|
1415
|
+
displayName: 'AbpIdentity::SecurityLogs:UserName',
|
|
1416
|
+
sortable: true,
|
|
1417
|
+
columnWidth: 150,
|
|
1418
|
+
valueResolver: data => {
|
|
1419
|
+
return of(`<div style="max-width: 135px" class="pointer abp-ellipsis-inline">${data.record.userName || ''}</div>`);
|
|
1420
|
+
},
|
|
1421
|
+
action: data => {
|
|
1422
|
+
const component = data.getInjected(SecurityLogsComponent);
|
|
1423
|
+
component.filter.userName = data.record.userName;
|
|
1424
|
+
component.list.get();
|
|
1425
|
+
},
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
type: "string" /* String */,
|
|
1429
|
+
name: 'clientId',
|
|
1430
|
+
displayName: 'AbpIdentity::SecurityLogs:Client',
|
|
1431
|
+
sortable: true,
|
|
1432
|
+
columnWidth: 320,
|
|
1433
|
+
valueResolver: data => {
|
|
1434
|
+
return of(`<div class="pointer">${data.record.clientId || ''}</div>`);
|
|
1435
|
+
},
|
|
1436
|
+
action: data => {
|
|
1437
|
+
const component = data.getInjected(SecurityLogsComponent);
|
|
1438
|
+
component.filter.clientId = data.record.clientId;
|
|
1439
|
+
component.list.get();
|
|
1440
|
+
},
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
type: "string" /* String */,
|
|
1444
|
+
name: 'correlationId',
|
|
1445
|
+
displayName: 'AbpIdentity::SecurityLogs:CorrelationId',
|
|
1446
|
+
sortable: true,
|
|
1447
|
+
columnWidth: 320,
|
|
1448
|
+
valueResolver: data => {
|
|
1449
|
+
return of(`<div class="pointer">${data.record.correlationId || ''}</div>`);
|
|
1450
|
+
},
|
|
1451
|
+
action: data => {
|
|
1452
|
+
const component = data.getInjected(SecurityLogsComponent);
|
|
1453
|
+
component.filter.correlationId = data.record.correlationId;
|
|
1454
|
+
component.list.get();
|
|
1455
|
+
},
|
|
1456
|
+
},
|
|
1457
|
+
]);
|
|
1458
|
+
|
|
1459
|
+
const DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS = ToolbarAction.createMany([]);
|
|
1460
|
+
|
|
1461
|
+
const DEFAULT_USERS_ENTITY_ACTIONS = EntityAction.createMany([
|
|
1462
|
+
{
|
|
1463
|
+
text: 'AbpIdentity::Edit',
|
|
1464
|
+
action: data => {
|
|
1465
|
+
const component = data.getInjected(UsersComponent);
|
|
1466
|
+
component.onEdit(data.record.id);
|
|
1467
|
+
},
|
|
1468
|
+
permission: 'AbpIdentity.Users.Update',
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
text: 'AbpIdentity::Claims',
|
|
1472
|
+
action: data => {
|
|
1473
|
+
const component = data.getInjected(UsersComponent);
|
|
1474
|
+
component.onManageClaims(data.record.id);
|
|
1475
|
+
},
|
|
1476
|
+
permission: 'AbpIdentity.Users.Update',
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
text: 'AbpIdentity::Lock',
|
|
1480
|
+
action: data => {
|
|
1481
|
+
const component = data.getInjected(UsersComponent);
|
|
1482
|
+
component.selected = data.record;
|
|
1483
|
+
component.isLockModalVisible = true;
|
|
1484
|
+
},
|
|
1485
|
+
permission: 'AbpIdentity.Users.Update',
|
|
1486
|
+
visible: data => !data.record.isLockedOut && data.record.lockoutEnabled,
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
text: 'AbpIdentity::Unlock',
|
|
1490
|
+
action: data => {
|
|
1491
|
+
const component = data.getInjected(UsersComponent);
|
|
1492
|
+
component.unlock(data.record.id);
|
|
1493
|
+
},
|
|
1494
|
+
permission: 'AbpIdentity.Users.Update',
|
|
1495
|
+
visible: data => data.record.isLockedOut,
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
text: 'AbpIdentity::Permissions',
|
|
1499
|
+
action: data => {
|
|
1500
|
+
const component = data.getInjected(UsersComponent);
|
|
1501
|
+
component.openPermissionsModal(data.record.id);
|
|
1502
|
+
},
|
|
1503
|
+
permission: 'AbpIdentity.Users.ManagePermissions',
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
text: 'AbpIdentity::ChangeHistory',
|
|
1507
|
+
action: data => {
|
|
1508
|
+
const showHistory = data.getInjected(SHOW_ENTITY_HISTORY);
|
|
1509
|
+
showHistory(data.record.id, 'Volo.Abp.Identity.IdentityUser');
|
|
1510
|
+
},
|
|
1511
|
+
permission: 'AbpIdentity.Users.ViewChangeHistory',
|
|
1512
|
+
visible: data => Boolean(data.getInjected(SHOW_ENTITY_HISTORY, null)),
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
text: 'AbpIdentity::SetPassword',
|
|
1516
|
+
action: data => {
|
|
1517
|
+
const component = data.getInjected(UsersComponent);
|
|
1518
|
+
component.selected = data.record;
|
|
1519
|
+
component.isSetPasswordModalVisible = true;
|
|
1520
|
+
},
|
|
1521
|
+
permission: 'AbpIdentity.Users.Update',
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
text: 'AbpIdentity::TwoFactor',
|
|
1525
|
+
action: data => {
|
|
1526
|
+
const component = data.getInjected(UsersComponent);
|
|
1527
|
+
component.selected = data.record;
|
|
1528
|
+
component.service.getTwoFactorEnabled(data.record.id).subscribe(res => {
|
|
1529
|
+
component.twoFactor.checkboxValue = res;
|
|
1530
|
+
component.twoFactor.isModalVisible = true;
|
|
1531
|
+
});
|
|
1532
|
+
},
|
|
1533
|
+
permission: 'AbpIdentity.Users.Update',
|
|
1534
|
+
visible: data => data.getInjected(UsersComponent).twoFactor.isOptional,
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
text: 'AbpIdentity::LoginWithThisUser',
|
|
1538
|
+
permission: 'AbpIdentity.Users.Impersonation',
|
|
1539
|
+
action: data => {
|
|
1540
|
+
const impersonation = data.getInjected(ImpersonationService);
|
|
1541
|
+
impersonation.impersonateUser(data.record.id).subscribe();
|
|
1542
|
+
},
|
|
1543
|
+
visible: data => {
|
|
1544
|
+
const configState = data.getInjected(ConfigStateService);
|
|
1545
|
+
const currentUserId = configState.getDeep('currentUser.id');
|
|
1546
|
+
const currentImpersonatorUserId = configState.getDeep('currentUser.impersonatorUserId');
|
|
1547
|
+
return data.record.id !== currentUserId && currentImpersonatorUserId === null;
|
|
1548
|
+
},
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
text: 'AbpIdentity::Delete',
|
|
1552
|
+
action: data => {
|
|
1553
|
+
const component = data.getInjected(UsersComponent);
|
|
1554
|
+
component.delete(data.record.id, data.record.name || data.record.userName);
|
|
1555
|
+
},
|
|
1556
|
+
permission: 'AbpIdentity.Users.Delete',
|
|
1557
|
+
},
|
|
1558
|
+
]);
|
|
1559
|
+
|
|
1560
|
+
const DEFAULT_USERS_ENTITY_PROPS = EntityProp.createMany([
|
|
1561
|
+
{
|
|
1562
|
+
type: "string" /* String */,
|
|
1563
|
+
name: 'userName',
|
|
1564
|
+
displayName: 'AbpIdentity::UserName',
|
|
1565
|
+
sortable: true,
|
|
1566
|
+
columnWidth: 250,
|
|
1567
|
+
valueResolver: data => {
|
|
1568
|
+
const l10n = data.getInjected(LocalizationService);
|
|
1569
|
+
const t = l10n.instant.bind(l10n);
|
|
1570
|
+
const lockOutIcon = `<i title="${t('AbpIdentity::ThisUserIsLockedOutMessage')}" class="fas fa-lock text-danger me-1"></i>`;
|
|
1571
|
+
const inactiveIcon = `<i title="${t('AbpIdentity::ThisUserIsNotActiveMessage')}" class="fas fa-ban text-danger me-1"></i>`;
|
|
1572
|
+
return of(`
|
|
1573
|
+
${data.record.isLockedOut ? lockOutIcon : ''}
|
|
1574
|
+
${!data.record.isActive ? inactiveIcon : ''}
|
|
1575
|
+
<span class="${data.record.isLockedOut || !data.record.isActive ? 'opc-65' : ''}">${escapeHtmlChars(data.record.userName)}</span>`);
|
|
1576
|
+
},
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
type: "string" /* String */,
|
|
1580
|
+
name: 'email',
|
|
1581
|
+
displayName: 'AbpIdentity::EmailAddress',
|
|
1582
|
+
sortable: true,
|
|
1583
|
+
columnWidth: 250,
|
|
1584
|
+
valueResolver: data => {
|
|
1585
|
+
const { email, emailConfirmed } = data.record;
|
|
1586
|
+
return of((email || '') + (emailConfirmed ? `<i class="fa fa-check text-success ms-1"></i>` : ''));
|
|
1587
|
+
},
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
type: "string" /* String */,
|
|
1591
|
+
name: 'roleNames',
|
|
1592
|
+
displayName: 'AbpIdentity::Roles',
|
|
1593
|
+
columnWidth: 250,
|
|
1594
|
+
valueResolver: data => of(data.record.roleNames.join(', ')),
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
type: "string" /* String */,
|
|
1598
|
+
name: 'phoneNumber',
|
|
1599
|
+
displayName: 'AbpIdentity::PhoneNumber',
|
|
1600
|
+
sortable: true,
|
|
1601
|
+
columnWidth: 250,
|
|
1602
|
+
valueResolver: data => {
|
|
1603
|
+
const { phoneNumber, phoneNumberConfirmed } = data.record;
|
|
1604
|
+
return of((escapeHtmlChars(phoneNumber) || '') +
|
|
1605
|
+
(phoneNumberConfirmed ? `<i class="fa fa-check text-success ms-1"></i>` : ''));
|
|
1606
|
+
},
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
type: "string" /* String */,
|
|
1610
|
+
name: 'name',
|
|
1611
|
+
displayName: 'AbpIdentity::Name',
|
|
1612
|
+
sortable: true,
|
|
1613
|
+
columnWidth: 250,
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
type: "string" /* String */,
|
|
1617
|
+
name: 'surname',
|
|
1618
|
+
displayName: 'AbpIdentity::Surname',
|
|
1619
|
+
sortable: true,
|
|
1620
|
+
columnWidth: 250,
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
type: "boolean" /* Boolean */,
|
|
1624
|
+
name: 'isActive',
|
|
1625
|
+
displayName: 'AbpIdentity::DisplayName:IsActive',
|
|
1626
|
+
sortable: true,
|
|
1627
|
+
columnWidth: 100,
|
|
1628
|
+
},
|
|
1629
|
+
{
|
|
1630
|
+
type: "boolean" /* Boolean */,
|
|
1631
|
+
name: 'isLockedOut',
|
|
1632
|
+
displayName: 'AbpIdentity::DisplayName:LockoutEnabled',
|
|
1633
|
+
sortable: false,
|
|
1634
|
+
columnWidth: 100,
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
type: "boolean" /* Boolean */,
|
|
1638
|
+
name: 'emailConfirmed',
|
|
1639
|
+
displayName: 'AbpIdentity::DisplayName:EmailConfirmed',
|
|
1640
|
+
sortable: true,
|
|
1641
|
+
columnWidth: 100,
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
type: "boolean" /* Boolean */,
|
|
1645
|
+
name: 'twoFactorEnabled',
|
|
1646
|
+
displayName: 'AbpIdentity::DisplayName:TwoFactorEnabled',
|
|
1647
|
+
sortable: true,
|
|
1648
|
+
columnWidth: 100,
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
type: "number" /* Number */,
|
|
1652
|
+
name: 'accessFailedCount',
|
|
1653
|
+
displayName: 'AbpIdentity::DisplayName:AccessFailedCount',
|
|
1654
|
+
sortable: true,
|
|
1655
|
+
columnWidth: 100,
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
type: "dateTime" /* DateTime */,
|
|
1659
|
+
name: 'creationTime',
|
|
1660
|
+
displayName: 'AbpIdentity::CreationTime',
|
|
1661
|
+
sortable: true,
|
|
1662
|
+
columnWidth: 200,
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
type: "dateTime" /* DateTime */,
|
|
1666
|
+
name: 'lastModificationTime',
|
|
1667
|
+
displayName: 'AbpIdentity::LastModificationTime',
|
|
1668
|
+
sortable: true,
|
|
1669
|
+
columnWidth: 200,
|
|
1670
|
+
},
|
|
1671
|
+
]);
|
|
1672
|
+
|
|
1673
|
+
const DEFAULT_USERS_CREATE_FORM_PROPS = FormProp.createMany([
|
|
1674
|
+
{
|
|
1675
|
+
type: "string" /* String */,
|
|
1676
|
+
name: 'userName',
|
|
1677
|
+
displayName: 'AbpIdentity::UserName',
|
|
1678
|
+
id: 'user-name',
|
|
1679
|
+
validators: () => [Validators.required, Validators.maxLength(256)],
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
type: "password" /* Password */,
|
|
1683
|
+
name: 'password',
|
|
1684
|
+
displayName: 'AbpIdentity::Password',
|
|
1685
|
+
id: 'password',
|
|
1686
|
+
autocomplete: 'new-password',
|
|
1687
|
+
validators: data => [Validators.required, ...getPasswordValidators({ get: data.getInjected })],
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
type: "string" /* String */,
|
|
1691
|
+
name: 'name',
|
|
1692
|
+
displayName: 'AbpIdentity::DisplayName:Name',
|
|
1693
|
+
id: 'name',
|
|
1694
|
+
validators: () => [Validators.maxLength(64)],
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
type: "string" /* String */,
|
|
1698
|
+
name: 'surname',
|
|
1699
|
+
displayName: 'AbpIdentity::DisplayName:Surname',
|
|
1700
|
+
id: 'surname',
|
|
1701
|
+
validators: () => [Validators.maxLength(64)],
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
type: "email" /* Email */,
|
|
1705
|
+
name: 'email',
|
|
1706
|
+
displayName: 'AbpIdentity::EmailAddress',
|
|
1707
|
+
id: 'email',
|
|
1708
|
+
validators: () => [Validators.required, Validators.maxLength(256), Validators.email],
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
type: "string" /* String */,
|
|
1712
|
+
name: 'phoneNumber',
|
|
1713
|
+
displayName: 'AbpIdentity::PhoneNumber',
|
|
1714
|
+
id: 'phone-number',
|
|
1715
|
+
validators: () => [Validators.maxLength(16)],
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
type: "boolean" /* Boolean */,
|
|
1719
|
+
name: 'isActive',
|
|
1720
|
+
displayName: 'AbpIdentity::DisplayName:IsActive',
|
|
1721
|
+
id: 'active-checkbox',
|
|
1722
|
+
defaultValue: true,
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
type: "boolean" /* Boolean */,
|
|
1726
|
+
name: 'lockoutEnabled',
|
|
1727
|
+
displayName: 'AbpIdentity::DisplayName:LockoutEnabled',
|
|
1728
|
+
id: 'lockout-checkbox',
|
|
1729
|
+
defaultValue: true,
|
|
1730
|
+
},
|
|
1731
|
+
]);
|
|
1732
|
+
const DEFAULT_USERS_EDIT_FORM_PROPS = DEFAULT_USERS_CREATE_FORM_PROPS.filter(prop => prop.name !== 'password');
|
|
1733
|
+
|
|
1734
|
+
const DEFAULT_USERS_TOOLBAR_ACTIONS = ToolbarAction.createMany([
|
|
1735
|
+
{
|
|
1736
|
+
text: 'AbpIdentity::NewUser',
|
|
1737
|
+
action: data => {
|
|
1738
|
+
const component = data.getInjected(UsersComponent);
|
|
1739
|
+
component.onAdd();
|
|
1740
|
+
},
|
|
1741
|
+
permission: 'AbpIdentity.Users.Create',
|
|
1742
|
+
icon: 'fa fa-plus',
|
|
1743
|
+
},
|
|
1744
|
+
]);
|
|
1745
|
+
|
|
1746
|
+
const DEFAULT_IDENTITY_ENTITY_ACTIONS = {
|
|
1747
|
+
["Identity.ClaimsComponent" /* Claims */]: DEFAULT_CLAIMS_ENTITY_ACTIONS,
|
|
1748
|
+
["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_ENTITY_ACTIONS,
|
|
1749
|
+
["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_ENTITY_ACTIONS,
|
|
1750
|
+
["Identity.OrganizationMembersComponent" /* OrganizationMembers */]: DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS,
|
|
1751
|
+
["Identity.OrganizationRolesComponent" /* OrganizationRoles */]: DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS,
|
|
1752
|
+
["Identity.SecurityLogs" /* SecurityLogs */]: DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS,
|
|
1753
|
+
};
|
|
1754
|
+
const DEFAULT_IDENTITY_TOOLBAR_ACTIONS = {
|
|
1755
|
+
["Identity.ClaimsComponent" /* Claims */]: DEFAULT_CLAIMS_TOOLBAR_ACTIONS,
|
|
1756
|
+
["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_TOOLBAR_ACTIONS,
|
|
1757
|
+
["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_TOOLBAR_ACTIONS,
|
|
1758
|
+
["Identity.OrganizationUnitsComponent" /* OrganizationUnits */]: DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS,
|
|
1759
|
+
["Identity.SecurityLogs" /* SecurityLogs */]: DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS,
|
|
1760
|
+
};
|
|
1761
|
+
const DEFAULT_IDENTITY_ENTITY_PROPS = {
|
|
1762
|
+
["Identity.ClaimsComponent" /* Claims */]: DEFAULT_CLAIMS_ENTITY_PROPS,
|
|
1763
|
+
["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_ENTITY_PROPS,
|
|
1764
|
+
["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_ENTITY_PROPS,
|
|
1765
|
+
["Identity.OrganizationMembersComponent" /* OrganizationMembers */]: DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS,
|
|
1766
|
+
["Identity.OrganizationRolesComponent" /* OrganizationRoles */]: DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS,
|
|
1767
|
+
["Identity.SecurityLogs" /* SecurityLogs */]: DEFAULT_SECURITY_LOGS_ENTITY_PROPS,
|
|
1768
|
+
};
|
|
1769
|
+
const DEFAULT_IDENTITY_CREATE_FORM_PROPS = {
|
|
1770
|
+
["Identity.ClaimsComponent" /* Claims */]: DEFAULT_CLAIMS_CREATE_FORM_PROPS,
|
|
1771
|
+
["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_CREATE_FORM_PROPS,
|
|
1772
|
+
["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_CREATE_FORM_PROPS,
|
|
1773
|
+
["Identity.OrganizationUnitsComponent" /* OrganizationUnits */]: DEFAULT_ORGANIZATION_UNITS_CREATE_FORM_PROPS,
|
|
1774
|
+
};
|
|
1775
|
+
const DEFAULT_IDENTITY_EDIT_FORM_PROPS = {
|
|
1776
|
+
["Identity.ClaimsComponent" /* Claims */]: DEFAULT_CLAIMS_EDIT_FORM_PROPS,
|
|
1777
|
+
["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_EDIT_FORM_PROPS,
|
|
1778
|
+
["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_EDIT_FORM_PROPS,
|
|
1779
|
+
["Identity.OrganizationUnitsComponent" /* OrganizationUnits */]: DEFAULT_ORGANIZATION_UNITS_EDIT_FORM_PROPS,
|
|
1780
|
+
};
|
|
1781
|
+
const IDENTITY_ENTITY_ACTION_CONTRIBUTORS = new InjectionToken('IDENTITY_ENTITY_ACTION_CONTRIBUTORS');
|
|
1782
|
+
const IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS = new InjectionToken('IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS');
|
|
1783
|
+
const IDENTITY_ENTITY_PROP_CONTRIBUTORS = new InjectionToken('IDENTITY_ENTITY_PROP_CONTRIBUTORS');
|
|
1784
|
+
const IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS = new InjectionToken('IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS');
|
|
1785
|
+
const IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS = new InjectionToken('IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS');
|
|
1786
|
+
|
|
1787
|
+
class IdentityExtensionsGuard {
|
|
1788
|
+
constructor(injector) {
|
|
1789
|
+
this.injector = injector;
|
|
1790
|
+
}
|
|
1791
|
+
canActivate() {
|
|
1792
|
+
const extensions = this.injector.get(ExtensionsService);
|
|
1793
|
+
const actionContributors = this.injector.get(IDENTITY_ENTITY_ACTION_CONTRIBUTORS, null) || {};
|
|
1794
|
+
const toolbarContributors = this.injector.get(IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, null) || {};
|
|
1795
|
+
const propContributors = this.injector.get(IDENTITY_ENTITY_PROP_CONTRIBUTORS, null) || {};
|
|
1796
|
+
const createFormContributors = this.injector.get(IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, null) || {};
|
|
1797
|
+
const editFormContributors = this.injector.get(IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, null) || {};
|
|
1798
|
+
const configState = this.injector.get(ConfigStateService);
|
|
1799
|
+
return getObjectExtensionEntitiesFromStore(configState, 'Identity').pipe(map(entities => ({
|
|
1800
|
+
["Identity.ClaimsComponent" /* Claims */]: entities.ClaimType,
|
|
1801
|
+
["Identity.RolesComponent" /* Roles */]: entities.Role,
|
|
1802
|
+
["Identity.UsersComponent" /* Users */]: entities.User,
|
|
1803
|
+
["Identity.OrganizationUnitsComponent" /* OrganizationUnits */]: entities.OrganizationUnit,
|
|
1804
|
+
})), mapEntitiesToContributors(configState, 'AbpIdentity'), tap(objectExtensionContributors => {
|
|
1805
|
+
mergeWithDefaultActions(extensions.entityActions, DEFAULT_IDENTITY_ENTITY_ACTIONS, actionContributors);
|
|
1806
|
+
mergeWithDefaultActions(extensions.toolbarActions, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, toolbarContributors);
|
|
1807
|
+
mergeWithDefaultProps(extensions.entityProps, DEFAULT_IDENTITY_ENTITY_PROPS, objectExtensionContributors.prop, propContributors);
|
|
1808
|
+
mergeWithDefaultProps(extensions.createFormProps, DEFAULT_IDENTITY_CREATE_FORM_PROPS, objectExtensionContributors.createForm, createFormContributors);
|
|
1809
|
+
mergeWithDefaultProps(extensions.editFormProps, DEFAULT_IDENTITY_EDIT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
|
|
1810
|
+
}), mapTo(true));
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
IdentityExtensionsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityExtensionsGuard, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1814
|
+
IdentityExtensionsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityExtensionsGuard });
|
|
1815
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityExtensionsGuard, decorators: [{
|
|
1816
|
+
type: Injectable
|
|
1817
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
1818
|
+
|
|
1819
|
+
const routes = [
|
|
1820
|
+
{ path: '', redirectTo: 'roles', pathMatch: 'full' },
|
|
1821
|
+
{
|
|
1822
|
+
path: '',
|
|
1823
|
+
component: RouterOutletComponent,
|
|
1824
|
+
canActivate: [AuthGuard, PermissionGuard, IdentityExtensionsGuard],
|
|
1825
|
+
children: [
|
|
1826
|
+
{
|
|
1827
|
+
path: 'roles',
|
|
1828
|
+
component: ReplaceableRouteContainerComponent,
|
|
1829
|
+
data: {
|
|
1830
|
+
requiredPolicy: 'AbpIdentity.Roles',
|
|
1831
|
+
replaceableComponent: {
|
|
1832
|
+
key: "Identity.RolesComponent" /* Roles */,
|
|
1833
|
+
defaultComponent: RolesComponent,
|
|
1834
|
+
},
|
|
1835
|
+
},
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
path: 'users',
|
|
1839
|
+
component: ReplaceableRouteContainerComponent,
|
|
1840
|
+
data: {
|
|
1841
|
+
requiredPolicy: 'AbpIdentity.Users',
|
|
1842
|
+
replaceableComponent: {
|
|
1843
|
+
key: "Identity.UsersComponent" /* Users */,
|
|
1844
|
+
defaultComponent: UsersComponent,
|
|
1845
|
+
},
|
|
1846
|
+
},
|
|
1847
|
+
},
|
|
1848
|
+
{
|
|
1849
|
+
path: 'claim-types',
|
|
1850
|
+
component: ReplaceableRouteContainerComponent,
|
|
1851
|
+
data: {
|
|
1852
|
+
requiredPolicy: 'AbpIdentity.ClaimTypes',
|
|
1853
|
+
replaceableComponent: {
|
|
1854
|
+
key: "Identity.ClaimsComponent" /* Claims */,
|
|
1855
|
+
defaultComponent: ClaimsComponent,
|
|
1856
|
+
},
|
|
1857
|
+
},
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
path: 'organization-units',
|
|
1861
|
+
component: ReplaceableRouteContainerComponent,
|
|
1862
|
+
data: {
|
|
1863
|
+
requiredPolicy: 'AbpIdentity.OrganizationUnits',
|
|
1864
|
+
replaceableComponent: {
|
|
1865
|
+
key: "Identity.OrganizationUnitsComponent" /* OrganizationUnits */,
|
|
1866
|
+
defaultComponent: OrganizationUnitsComponent,
|
|
1867
|
+
},
|
|
1868
|
+
},
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
path: 'security-logs',
|
|
1872
|
+
component: ReplaceableRouteContainerComponent,
|
|
1873
|
+
data: {
|
|
1874
|
+
requiredPolicy: 'AbpIdentity.SecurityLogs',
|
|
1875
|
+
replaceableComponent: {
|
|
1876
|
+
key: "Identity.SecurityLogs" /* SecurityLogs */,
|
|
1877
|
+
defaultComponent: SecurityLogsComponent,
|
|
1878
|
+
},
|
|
1879
|
+
},
|
|
1880
|
+
},
|
|
1881
|
+
],
|
|
1882
|
+
},
|
|
1883
|
+
];
|
|
1884
|
+
class IdentityRoutingModule {
|
|
1885
|
+
}
|
|
1886
|
+
IdentityRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1887
|
+
IdentityRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] });
|
|
1888
|
+
IdentityRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityRoutingModule, imports: [[RouterModule.forChild(routes)], RouterModule] });
|
|
1889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityRoutingModule, decorators: [{
|
|
1890
|
+
type: NgModule,
|
|
1891
|
+
args: [{
|
|
1892
|
+
imports: [RouterModule.forChild(routes)],
|
|
1893
|
+
exports: [RouterModule],
|
|
1894
|
+
}]
|
|
1895
|
+
}] });
|
|
1896
|
+
|
|
1897
|
+
/* tslint:disable:max-line-length */
|
|
1898
|
+
class IdentityModule {
|
|
1899
|
+
static forChild(options = {}) {
|
|
1900
|
+
return {
|
|
1901
|
+
ngModule: IdentityModule,
|
|
1902
|
+
providers: [
|
|
1903
|
+
{
|
|
1904
|
+
provide: IDENTITY_ENTITY_ACTION_CONTRIBUTORS,
|
|
1905
|
+
useValue: options.entityActionContributors,
|
|
1906
|
+
},
|
|
1907
|
+
{
|
|
1908
|
+
provide: IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS,
|
|
1909
|
+
useValue: options.toolbarActionContributors,
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
provide: IDENTITY_ENTITY_PROP_CONTRIBUTORS,
|
|
1913
|
+
useValue: options.entityPropContributors,
|
|
1914
|
+
},
|
|
1915
|
+
{
|
|
1916
|
+
provide: IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS,
|
|
1917
|
+
useValue: options.createFormPropContributors,
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
provide: IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS,
|
|
1921
|
+
useValue: options.editFormPropContributors,
|
|
1922
|
+
},
|
|
1923
|
+
IdentityExtensionsGuard,
|
|
1924
|
+
],
|
|
1925
|
+
};
|
|
1926
|
+
}
|
|
1927
|
+
static forLazy(options = {}) {
|
|
1928
|
+
return new LazyModuleFactory(IdentityModule.forChild(options));
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
IdentityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1932
|
+
IdentityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityModule, declarations: [RolesComponent,
|
|
1933
|
+
UsersComponent,
|
|
1934
|
+
ClaimModalComponent,
|
|
1935
|
+
ClaimsComponent,
|
|
1936
|
+
OrganizationUnitsComponent,
|
|
1937
|
+
OrganizationMembersComponent,
|
|
1938
|
+
OrganizationMembersModalBodyComponent,
|
|
1939
|
+
OrganizationRolesComponent,
|
|
1940
|
+
OrganizationRolesModalBodyComponent,
|
|
1941
|
+
AbstractOrganizationUnitComponent,
|
|
1942
|
+
SecurityLogsComponent], imports: [CoreModule,
|
|
1943
|
+
CommercialUiModule,
|
|
1944
|
+
IdentityRoutingModule,
|
|
1945
|
+
NgbNavModule,
|
|
1946
|
+
ThemeSharedModule,
|
|
1947
|
+
NgbDropdownModule,
|
|
1948
|
+
NgbDatepickerModule,
|
|
1949
|
+
PermissionManagementModule,
|
|
1950
|
+
NgxValidateCoreModule,
|
|
1951
|
+
TreeModule,
|
|
1952
|
+
PageModule,
|
|
1953
|
+
AdvancedEntityFiltersModule,
|
|
1954
|
+
UiExtensionsModule], exports: [RolesComponent,
|
|
1955
|
+
UsersComponent,
|
|
1956
|
+
ClaimModalComponent,
|
|
1957
|
+
ClaimsComponent,
|
|
1958
|
+
OrganizationUnitsComponent,
|
|
1959
|
+
OrganizationMembersComponent,
|
|
1960
|
+
OrganizationMembersModalBodyComponent,
|
|
1961
|
+
OrganizationRolesComponent,
|
|
1962
|
+
OrganizationRolesModalBodyComponent,
|
|
1963
|
+
AbstractOrganizationUnitComponent,
|
|
1964
|
+
SecurityLogsComponent] });
|
|
1965
|
+
IdentityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityModule, imports: [[
|
|
1966
|
+
CoreModule,
|
|
1967
|
+
CommercialUiModule,
|
|
1968
|
+
IdentityRoutingModule,
|
|
1969
|
+
NgbNavModule,
|
|
1970
|
+
ThemeSharedModule,
|
|
1971
|
+
NgbDropdownModule,
|
|
1972
|
+
NgbDatepickerModule,
|
|
1973
|
+
PermissionManagementModule,
|
|
1974
|
+
NgxValidateCoreModule,
|
|
1975
|
+
TreeModule,
|
|
1976
|
+
PageModule,
|
|
1977
|
+
AdvancedEntityFiltersModule,
|
|
1978
|
+
UiExtensionsModule,
|
|
1979
|
+
]] });
|
|
1980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IdentityModule, decorators: [{
|
|
1981
|
+
type: NgModule,
|
|
1982
|
+
args: [{
|
|
1983
|
+
declarations: [
|
|
1984
|
+
RolesComponent,
|
|
1985
|
+
UsersComponent,
|
|
1986
|
+
ClaimModalComponent,
|
|
1987
|
+
ClaimsComponent,
|
|
1988
|
+
OrganizationUnitsComponent,
|
|
1989
|
+
OrganizationMembersComponent,
|
|
1990
|
+
OrganizationMembersModalBodyComponent,
|
|
1991
|
+
OrganizationRolesComponent,
|
|
1992
|
+
OrganizationRolesModalBodyComponent,
|
|
1993
|
+
AbstractOrganizationUnitComponent,
|
|
1994
|
+
SecurityLogsComponent,
|
|
1995
|
+
],
|
|
1996
|
+
exports: [
|
|
1997
|
+
RolesComponent,
|
|
1998
|
+
UsersComponent,
|
|
1999
|
+
ClaimModalComponent,
|
|
2000
|
+
ClaimsComponent,
|
|
2001
|
+
OrganizationUnitsComponent,
|
|
2002
|
+
OrganizationMembersComponent,
|
|
2003
|
+
OrganizationMembersModalBodyComponent,
|
|
2004
|
+
OrganizationRolesComponent,
|
|
2005
|
+
OrganizationRolesModalBodyComponent,
|
|
2006
|
+
AbstractOrganizationUnitComponent,
|
|
2007
|
+
SecurityLogsComponent,
|
|
2008
|
+
],
|
|
2009
|
+
imports: [
|
|
2010
|
+
CoreModule,
|
|
2011
|
+
CommercialUiModule,
|
|
2012
|
+
IdentityRoutingModule,
|
|
2013
|
+
NgbNavModule,
|
|
2014
|
+
ThemeSharedModule,
|
|
2015
|
+
NgbDropdownModule,
|
|
2016
|
+
NgbDatepickerModule,
|
|
2017
|
+
PermissionManagementModule,
|
|
2018
|
+
NgxValidateCoreModule,
|
|
2019
|
+
TreeModule,
|
|
2020
|
+
PageModule,
|
|
2021
|
+
AdvancedEntityFiltersModule,
|
|
2022
|
+
UiExtensionsModule,
|
|
2023
|
+
],
|
|
2024
|
+
}]
|
|
2025
|
+
}] });
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* Generated bundle index. Do not edit.
|
|
2029
|
+
*/
|
|
2030
|
+
|
|
2031
|
+
export { AbstractOrganizationUnitComponent, ClaimModalComponent, ClaimsComponent, DEFAULT_IDENTITY_CREATE_FORM_PROPS, DEFAULT_IDENTITY_EDIT_FORM_PROPS, DEFAULT_IDENTITY_ENTITY_ACTIONS, DEFAULT_IDENTITY_ENTITY_PROPS, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, IDENTITY_ENTITY_ACTION_CONTRIBUTORS, IDENTITY_ENTITY_PROP_CONTRIBUTORS, IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, IdentityExtensionsGuard, IdentityModule, ORGANIZATION_UNIT_CONFIG, OrganizationMembersComponent, OrganizationMembersModalBodyComponent, OrganizationRolesComponent, OrganizationRolesModalBodyComponent, OrganizationUnitsComponent, RolesComponent, SecurityLogsComponent, UsersComponent, eIdentityTwoFactorBehaviour, identityTwoFactorBehaviourOptions };
|
|
2032
|
+
//# sourceMappingURL=volo-abp.ng.identity.mjs.map
|