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