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