@abp/ng.identity 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +3 -3
  2. package/abp-ng.identity.d.ts +5 -5
  3. package/bundles/abp-ng.identity-config.umd.js +49 -49
  4. package/bundles/abp-ng.identity-config.umd.js.map +1 -1
  5. package/bundles/abp-ng.identity-proxy.umd.js +136 -136
  6. package/bundles/abp-ng.identity-proxy.umd.js.map +1 -1
  7. package/bundles/abp-ng.identity.umd.js +937 -937
  8. package/bundles/abp-ng.identity.umd.js.map +1 -1
  9. package/config/abp-ng.identity-config.d.ts +5 -5
  10. package/config/enums/index.d.ts +2 -2
  11. package/config/enums/policy-names.d.ts +5 -5
  12. package/config/enums/route-names.d.ts +5 -5
  13. package/config/identity-config.module.d.ts +8 -8
  14. package/config/providers/index.d.ts +1 -1
  15. package/config/providers/route.provider.d.ts +8 -8
  16. package/config/public-api.d.ts +3 -3
  17. package/esm2015/abp-ng.identity.js +4 -4
  18. package/esm2015/config/abp-ng.identity-config.js +4 -4
  19. package/esm2015/config/enums/index.js +3 -3
  20. package/esm2015/config/enums/policy-names.js +2 -2
  21. package/esm2015/config/enums/route-names.js +2 -2
  22. package/esm2015/config/identity-config.module.js +18 -18
  23. package/esm2015/config/providers/index.js +2 -2
  24. package/esm2015/config/providers/route.provider.js +35 -35
  25. package/esm2015/config/public-api.js +4 -4
  26. package/esm2015/lib/components/index.js +3 -3
  27. package/esm2015/lib/components/roles/roles.component.js +112 -112
  28. package/esm2015/lib/components/users/users.component.js +144 -144
  29. package/esm2015/lib/defaults/default-roles-entity-actions.js +30 -30
  30. package/esm2015/lib/defaults/default-roles-entity-props.js +24 -24
  31. package/esm2015/lib/defaults/default-roles-form-props.js +28 -28
  32. package/esm2015/lib/defaults/default-roles-toolbar-actions.js +14 -14
  33. package/esm2015/lib/defaults/default-users-entity-actions.js +29 -29
  34. package/esm2015/lib/defaults/default-users-entity-props.js +35 -35
  35. package/esm2015/lib/defaults/default-users-form-props.js +64 -64
  36. package/esm2015/lib/defaults/default-users-toolbar-actions.js +14 -14
  37. package/esm2015/lib/enums/components.js +2 -2
  38. package/esm2015/lib/enums/index.js +2 -2
  39. package/esm2015/lib/guards/extensions.guard.js +36 -36
  40. package/esm2015/lib/guards/index.js +2 -2
  41. package/esm2015/lib/identity-routing.module.js +53 -53
  42. package/esm2015/lib/identity.module.js +83 -83
  43. package/esm2015/lib/models/config-options.js +2 -2
  44. package/esm2015/lib/models/index.js +2 -2
  45. package/esm2015/lib/tokens/extensions.token.js +35 -35
  46. package/esm2015/lib/tokens/index.js +2 -2
  47. package/esm2015/proxy/abp-ng.identity-proxy.js +4 -4
  48. package/esm2015/proxy/lib/index.js +3 -3
  49. package/esm2015/proxy/lib/proxy/identity/identity-role.service.js +46 -46
  50. package/esm2015/proxy/lib/proxy/identity/identity-user-lookup.service.js +37 -37
  51. package/esm2015/proxy/lib/proxy/identity/identity-user.service.js +63 -63
  52. package/esm2015/proxy/lib/proxy/identity/index.js +5 -5
  53. package/esm2015/proxy/lib/proxy/identity/models.js +2 -2
  54. package/esm2015/proxy/lib/proxy/users/index.js +2 -2
  55. package/esm2015/proxy/lib/proxy/users/models.js +2 -2
  56. package/esm2015/proxy/public-api.js +2 -2
  57. package/esm2015/public-api.js +7 -7
  58. package/fesm2015/abp-ng.identity-config.js +46 -46
  59. package/fesm2015/abp-ng.identity-config.js.map +1 -1
  60. package/fesm2015/abp-ng.identity-proxy.js +130 -130
  61. package/fesm2015/abp-ng.identity-proxy.js.map +1 -1
  62. package/fesm2015/abp-ng.identity.js +590 -590
  63. package/fesm2015/abp-ng.identity.js.map +1 -1
  64. package/lib/components/index.d.ts +2 -2
  65. package/lib/components/roles/roles.component.d.ts +35 -35
  66. package/lib/components/users/users.component.d.ts +41 -41
  67. package/lib/defaults/default-roles-entity-actions.d.ts +3 -3
  68. package/lib/defaults/default-roles-entity-props.d.ts +3 -3
  69. package/lib/defaults/default-roles-form-props.d.ts +4 -4
  70. package/lib/defaults/default-roles-toolbar-actions.d.ts +3 -3
  71. package/lib/defaults/default-users-entity-actions.d.ts +3 -3
  72. package/lib/defaults/default-users-entity-props.d.ts +3 -3
  73. package/lib/defaults/default-users-form-props.d.ts +4 -4
  74. package/lib/defaults/default-users-toolbar-actions.d.ts +3 -3
  75. package/lib/enums/components.d.ts +4 -4
  76. package/lib/enums/index.d.ts +1 -1
  77. package/lib/guards/extensions.guard.d.ts +11 -11
  78. package/lib/guards/index.d.ts +1 -1
  79. package/lib/identity-routing.module.d.ts +7 -7
  80. package/lib/identity.module.d.ts +19 -19
  81. package/lib/models/config-options.d.ts +30 -30
  82. package/lib/models/index.d.ts +1 -1
  83. package/lib/tokens/extensions.token.d.ts +43 -43
  84. package/lib/tokens/index.d.ts +1 -1
  85. package/package.json +4 -4
  86. package/proxy/abp-ng.identity-proxy.d.ts +5 -5
  87. package/proxy/lib/index.d.ts +2 -2
  88. package/proxy/lib/proxy/identity/identity-role.service.d.ts +17 -17
  89. package/proxy/lib/proxy/identity/identity-user-lookup.service.d.ts +16 -16
  90. package/proxy/lib/proxy/identity/identity-user.service.d.ts +21 -21
  91. package/proxy/lib/proxy/identity/index.d.ts +4 -4
  92. package/proxy/lib/proxy/identity/models.d.ts +64 -64
  93. package/proxy/lib/proxy/users/index.d.ts +1 -1
  94. package/proxy/lib/proxy/users/models.d.ts +11 -11
  95. package/proxy/public-api.d.ts +1 -1
  96. package/public-api.d.ts +6 -6
@@ -1,5 +1,5 @@
1
1
  import * as i1 from '@abp/ng.core';
2
- import { ListService, LocalizationService, ConfigStateService, RouterOutletComponent, AuthGuard, PermissionGuard, ReplaceableRouteContainerComponent, LazyModuleFactory, CoreModule } from '@abp/ng.core';
2
+ import { ListService, LocalizationService, escapeHtmlChars, ConfigStateService, RouterOutletComponent, AuthGuard, PermissionGuard, ReplaceableRouteContainerComponent, LazyModuleFactory, CoreModule } from '@abp/ng.core';
3
3
  import * as i3 from '@abp/ng.identity/proxy';
4
4
  import * as i2 from '@abp/ng.theme.shared';
5
5
  import { Confirmation, getPasswordValidators, ThemeSharedModule } from '@abp/ng.theme.shared';
@@ -21,623 +21,623 @@ import { of } from 'rxjs';
21
21
  import * as i1$1 from '@angular/router';
22
22
  import { RouterModule } from '@angular/router';
23
23
 
24
- class RolesComponent {
25
- constructor(list, confirmationService, injector, service) {
26
- this.list = list;
27
- this.confirmationService = confirmationService;
28
- this.injector = injector;
29
- this.service = service;
30
- this.data = { items: [], totalCount: 0 };
31
- this.visiblePermissions = false;
32
- this.modalBusy = false;
33
- this.permissionManagementKey = "PermissionManagement.PermissionManagementComponent" /* PermissionManagement */;
34
- this.onVisiblePermissionChange = event => {
35
- this.visiblePermissions = event;
36
- };
37
- }
38
- ngOnInit() {
39
- this.hookToQuery();
40
- }
41
- buildForm() {
42
- const data = new FormPropData(this.injector, this.selected);
43
- this.form = generateFormFromProps(data);
44
- }
45
- openModal() {
46
- this.buildForm();
47
- this.isModalVisible = true;
48
- }
49
- add() {
50
- this.selected = {};
51
- this.openModal();
52
- }
53
- edit(id) {
54
- this.service.get(id).subscribe(res => {
55
- this.selected = res;
56
- this.openModal();
57
- });
58
- }
59
- save() {
60
- if (!this.form.valid)
61
- return;
62
- this.modalBusy = true;
63
- const { id } = this.selected;
64
- (id
65
- ? this.service.update(id, Object.assign(Object.assign({}, this.selected), this.form.value))
66
- : this.service.create(this.form.value))
67
- .pipe(finalize(() => (this.modalBusy = false)))
68
- .subscribe(() => {
69
- this.isModalVisible = false;
70
- this.list.get();
71
- });
72
- }
73
- delete(id, name) {
74
- this.confirmationService
75
- .warn('AbpIdentity::RoleDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
76
- messageLocalizationParams: [name],
77
- })
78
- .subscribe((status) => {
79
- if (status === Confirmation.Status.confirm) {
80
- this.service.delete(id).subscribe(() => this.list.get());
81
- }
82
- });
83
- }
84
- hookToQuery() {
85
- this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res));
86
- }
87
- openPermissionsModal(providerKey) {
88
- this.providerKey = providerKey;
89
- setTimeout(() => {
90
- this.visiblePermissions = true;
91
- }, 0);
92
- }
93
- sort(data) {
94
- const { prop, dir } = data.sorts[0];
95
- this.list.sortKey = prop;
96
- this.list.sortOrder = dir;
97
- }
98
- }
99
- RolesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RolesComponent, deps: [{ token: i1.ListService }, { token: i2.ConfirmationService }, { token: i0.Injector }, { token: i3.IdentityRoleService }], target: i0.ɵɵFactoryTarget.Component });
100
- RolesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: RolesComponent, selector: "abp-roles", providers: [
101
- ListService,
102
- {
103
- provide: EXTENSIONS_IDENTIFIER,
104
- useValue: "Identity.RolesComponent" /* Roles */,
105
- },
106
- ], ngImport: i0, template: "<div id=\"identity-roles-wrapper\" class=\"card\">\r\n <div class=\"card-header\">\r\n <div class=\"row\">\r\n <div class=\"col col-md-6\">\r\n <h5 class=\"card-title\">{{ 'AbpIdentity::Roles' | abpLocalization }}</h5>\r\n </div>\r\n <div class=\"text-end col col-md-6\">\r\n <abp-page-toolbar [record]=\"data.items\"></abp-page-toolbar>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"card-body\">\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\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"form?.invalid\" (click)=\"save()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-permission-management\r\n #abpPermissionManagement=\"abpPermissionManagement\"\r\n *abpReplaceableTemplate=\"\r\n {\r\n inputs: {\r\n providerName: { value: 'R' },\r\n providerKey: { value: providerKey },\r\n visible: { value: visiblePermissions, twoWay: true },\r\n hideBadges: { value: true }\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: permissionManagementKey\r\n };\r\n let init = initTemplate\r\n \"\r\n (abpInit)=\"init(abpPermissionManagement)\"\r\n>\r\n</abp-permission-management>\r\n", components: [{ type: i4.PageToolbarComponent, selector: "abp-page-toolbar", exportAs: ["abpPageToolbar"] }, { type: i4.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i4.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { type: i5.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }], directives: [{ type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { type: i2.ModalCloseDirective, selector: "[abpClose]" }, { type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }], pipes: { "abpLocalization": i1.LocalizationPipe } });
107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RolesComponent, decorators: [{
108
- type: Component,
109
- args: [{
110
- selector: 'abp-roles',
111
- templateUrl: './roles.component.html',
112
- providers: [
113
- ListService,
114
- {
115
- provide: EXTENSIONS_IDENTIFIER,
116
- useValue: "Identity.RolesComponent" /* Roles */,
117
- },
118
- ],
119
- }]
24
+ class RolesComponent {
25
+ constructor(list, confirmationService, injector, service) {
26
+ this.list = list;
27
+ this.confirmationService = confirmationService;
28
+ this.injector = injector;
29
+ this.service = service;
30
+ this.data = { items: [], totalCount: 0 };
31
+ this.visiblePermissions = false;
32
+ this.modalBusy = false;
33
+ this.permissionManagementKey = "PermissionManagement.PermissionManagementComponent" /* PermissionManagement */;
34
+ this.onVisiblePermissionChange = event => {
35
+ this.visiblePermissions = event;
36
+ };
37
+ }
38
+ ngOnInit() {
39
+ this.hookToQuery();
40
+ }
41
+ buildForm() {
42
+ const data = new FormPropData(this.injector, this.selected);
43
+ this.form = generateFormFromProps(data);
44
+ }
45
+ openModal() {
46
+ this.buildForm();
47
+ this.isModalVisible = true;
48
+ }
49
+ add() {
50
+ this.selected = {};
51
+ this.openModal();
52
+ }
53
+ edit(id) {
54
+ this.service.get(id).subscribe(res => {
55
+ this.selected = res;
56
+ this.openModal();
57
+ });
58
+ }
59
+ save() {
60
+ if (!this.form.valid)
61
+ return;
62
+ this.modalBusy = true;
63
+ const { id } = this.selected;
64
+ (id
65
+ ? this.service.update(id, Object.assign(Object.assign({}, this.selected), this.form.value))
66
+ : this.service.create(this.form.value))
67
+ .pipe(finalize(() => (this.modalBusy = false)))
68
+ .subscribe(() => {
69
+ this.isModalVisible = false;
70
+ this.list.get();
71
+ });
72
+ }
73
+ delete(id, name) {
74
+ this.confirmationService
75
+ .warn('AbpIdentity::RoleDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
76
+ messageLocalizationParams: [name],
77
+ })
78
+ .subscribe((status) => {
79
+ if (status === Confirmation.Status.confirm) {
80
+ this.service.delete(id).subscribe(() => this.list.get());
81
+ }
82
+ });
83
+ }
84
+ hookToQuery() {
85
+ this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res));
86
+ }
87
+ openPermissionsModal(providerKey) {
88
+ this.providerKey = providerKey;
89
+ setTimeout(() => {
90
+ this.visiblePermissions = true;
91
+ }, 0);
92
+ }
93
+ sort(data) {
94
+ const { prop, dir } = data.sorts[0];
95
+ this.list.sortKey = prop;
96
+ this.list.sortOrder = dir;
97
+ }
98
+ }
99
+ RolesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RolesComponent, deps: [{ token: i1.ListService }, { token: i2.ConfirmationService }, { token: i0.Injector }, { token: i3.IdentityRoleService }], target: i0.ɵɵFactoryTarget.Component });
100
+ RolesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: RolesComponent, selector: "abp-roles", providers: [
101
+ ListService,
102
+ {
103
+ provide: EXTENSIONS_IDENTIFIER,
104
+ useValue: "Identity.RolesComponent" /* Roles */,
105
+ },
106
+ ], ngImport: i0, template: "<div id=\"identity-roles-wrapper\" class=\"card\">\n <div class=\"card-header\">\n <div class=\"row\">\n <div class=\"col col-md-6\">\n <h5 class=\"card-title\">{{ 'AbpIdentity::Roles' | abpLocalization }}</h5>\n </div>\n <div class=\"text-end col col-md-6\">\n <abp-page-toolbar [record]=\"data.items\"></abp-page-toolbar>\n </div>\n </div>\n </div>\n\n <div class=\"card-body\">\n <abp-extensible-table\n [data]=\"data.items\"\n [recordsTotal]=\"data.totalCount\"\n [list]=\"list\"\n ></abp-extensible-table>\n </div>\n</div>\n\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\n <ng-template #abpHeader>\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}</h3>\n </ng-template>\n\n <ng-template #abpBody>\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" validateOnSubmit>\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\n </button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"form?.invalid\" (click)=\"save()\">{{\n 'AbpIdentity::Save' | abpLocalization\n }}</abp-button>\n </ng-template>\n</abp-modal>\n\n<abp-permission-management\n #abpPermissionManagement=\"abpPermissionManagement\"\n *abpReplaceableTemplate=\"\n {\n inputs: {\n providerName: { value: 'R' },\n providerKey: { value: providerKey },\n visible: { value: visiblePermissions, twoWay: true },\n hideBadges: { value: true }\n },\n outputs: { visibleChange: onVisiblePermissionChange },\n componentKey: permissionManagementKey\n };\n let init = initTemplate\n \"\n (abpInit)=\"init(abpPermissionManagement)\"\n>\n</abp-permission-management>\n", components: [{ type: i4.PageToolbarComponent, selector: "abp-page-toolbar", exportAs: ["abpPageToolbar"] }, { type: i4.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i4.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { type: i5.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }], directives: [{ type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { type: i2.ModalCloseDirective, selector: "[abpClose]" }, { type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }], pipes: { "abpLocalization": i1.LocalizationPipe } });
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RolesComponent, decorators: [{
108
+ type: Component,
109
+ args: [{
110
+ selector: 'abp-roles',
111
+ templateUrl: './roles.component.html',
112
+ providers: [
113
+ ListService,
114
+ {
115
+ provide: EXTENSIONS_IDENTIFIER,
116
+ useValue: "Identity.RolesComponent" /* Roles */,
117
+ },
118
+ ],
119
+ }]
120
120
  }], ctorParameters: function () { return [{ type: i1.ListService }, { type: i2.ConfirmationService }, { type: i0.Injector }, { type: i3.IdentityRoleService }]; } });
121
121
 
122
- class UsersComponent {
123
- constructor(list, confirmationService, service, fb, injector) {
124
- this.list = list;
125
- this.confirmationService = confirmationService;
126
- this.service = service;
127
- this.fb = fb;
128
- this.injector = injector;
129
- this.data = { items: [], totalCount: 0 };
130
- this.visiblePermissions = false;
131
- this.modalBusy = false;
132
- this.permissionManagementKey = "PermissionManagement.PermissionManagementComponent" /* PermissionManagement */;
133
- this.trackByFn = (index, item) => Object.keys(item)[0] || index;
134
- this.onVisiblePermissionChange = event => {
135
- this.visiblePermissions = event;
136
- };
137
- }
138
- get roleGroups() {
139
- var _a;
140
- return ((_a = this.form.get('roleNames')) === null || _a === void 0 ? void 0 : _a.controls) || [];
141
- }
142
- ngOnInit() {
143
- this.hookToQuery();
144
- }
145
- buildForm() {
146
- const data = new FormPropData(this.injector, this.selected);
147
- this.form = generateFormFromProps(data);
148
- this.service.getAssignableRoles().subscribe(({ items }) => {
149
- this.roles = items;
150
- this.form.addControl('roleNames', this.fb.array(this.roles.map(role => {
151
- var _a;
152
- return this.fb.group({
153
- [role.name]: [
154
- this.selected.id
155
- ? !!((_a = this.selectedUserRoles) === null || _a === void 0 ? void 0 : _a.find(userRole => userRole.id === role.id))
156
- : role.isDefault,
157
- ],
158
- });
159
- })));
160
- });
161
- }
162
- openModal() {
163
- this.buildForm();
164
- this.isModalVisible = true;
165
- }
166
- add() {
167
- this.selected = {};
168
- this.selectedUserRoles = [];
169
- this.openModal();
170
- }
171
- edit(id) {
172
- this.service
173
- .get(id)
174
- .pipe(tap(user => (this.selected = user)), switchMap(() => this.service.getRoles(id)))
175
- .subscribe(userRole => {
176
- this.selectedUserRoles = userRole.items || [];
177
- this.openModal();
178
- });
179
- }
180
- save() {
181
- if (!this.form.valid || this.modalBusy)
182
- return;
183
- this.modalBusy = true;
184
- const { roleNames = [] } = this.form.value;
185
- const mappedRoleNames = roleNames.filter(role => !!role[Object.keys(role)[0]]).map(role => Object.keys(role)[0]) ||
186
- [];
187
- const { id } = this.selected;
188
- (id
189
- ? this.service.update(id, Object.assign(Object.assign(Object.assign({}, this.selected), this.form.value), { roleNames: mappedRoleNames }))
190
- : this.service.create(Object.assign(Object.assign({}, this.form.value), { roleNames: mappedRoleNames })))
191
- .pipe(finalize(() => (this.modalBusy = false)))
192
- .subscribe(() => {
193
- this.isModalVisible = false;
194
- this.list.get();
195
- });
196
- }
197
- delete(id, userName) {
198
- this.confirmationService
199
- .warn('AbpIdentity::UserDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
200
- messageLocalizationParams: [userName],
201
- })
202
- .subscribe((status) => {
203
- if (status === Confirmation.Status.confirm) {
204
- this.service.delete(id).subscribe(() => this.list.get());
205
- }
206
- });
207
- }
208
- sort(data) {
209
- const { prop, dir } = data.sorts[0];
210
- this.list.sortKey = prop;
211
- this.list.sortOrder = dir;
212
- }
213
- hookToQuery() {
214
- this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res));
215
- }
216
- openPermissionsModal(providerKey) {
217
- this.providerKey = providerKey;
218
- setTimeout(() => {
219
- this.visiblePermissions = true;
220
- }, 0);
221
- }
222
- }
223
- UsersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: UsersComponent, deps: [{ token: i1.ListService }, { token: i2.ConfirmationService }, { token: i3.IdentityUserService }, { token: i4$1.FormBuilder }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
224
- UsersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: UsersComponent, selector: "abp-users", providers: [
225
- ListService,
226
- {
227
- provide: EXTENSIONS_IDENTIFIER,
228
- useValue: "Identity.UsersComponent" /* Users */,
229
- },
230
- ], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<div id=\"identity-roles-wrapper\" class=\"card\">\r\n <div class=\"card-header\">\r\n <div class=\"row\">\r\n <div class=\"col col-md-6\">\r\n <h5 class=\"card-title\">{{ 'AbpIdentity::Users' | abpLocalization }}</h5>\r\n </div>\r\n <div class=\"text-end col col-md-6\">\r\n <abp-page-toolbar [record]=\"data.items\"></abp-page-toolbar>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-body\">\r\n <div id=\"data-tables-table-filter\" class=\"data-tables-filter\">\r\n <div class=\"input-group\">\r\n <input\r\n type=\"search\"\r\n class=\"form-control\"\r\n [placeholder]=\"'AbpUi::PagerSearch' | abpLocalization\"\r\n [(ngModel)]=\"list.filter\"\r\n />\r\n </div>\r\n </div>\r\n\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\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\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 <ng-template #loaderRef\r\n ><div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\"></i></div\r\n ></ng-template>\r\n\r\n <form *ngIf=\"form; else loaderRef\" [formGroup]=\"form\" (ngSubmit)=\"save()\">\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li 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\r\n <li ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::Roles' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <div\r\n *ngFor=\"let roleGroup of roleGroups; let i = index; trackBy: trackByFn\"\r\n class=\"form-check mb-2\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n [attr.id]=\"'roles-' + i\"\r\n [formControl]=\"roleGroup.controls[roles[i].name]\"\r\n />\r\n <label class=\"form-check-label\" [attr.for]=\"'roles-' + i\">{{ roles[i].name }}</label>\r\n </div>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n\r\n <div class=\"mt-2 fade-in-top\" [ngbNavOutlet]=\"nav\"></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\" [disabled]=\"form?.invalid\" (click)=\"save()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-permission-management\r\n #abpPermissionManagement=\"abpPermissionManagement\"\r\n *abpReplaceableTemplate=\"\r\n {\r\n inputs: {\r\n providerName: { value: 'U' },\r\n providerKey: { value: providerKey },\r\n visible: { value: visiblePermissions, twoWay: true }\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: permissionManagementKey\r\n };\r\n let init = initTemplate\r\n \"\r\n (abpInit)=\"init(abpPermissionManagement)\"\r\n>\r\n</abp-permission-management>\r\n", components: [{ type: i4.PageToolbarComponent, selector: "abp-page-toolbar", exportAs: ["abpPageToolbar"] }, { type: i4.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i4.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i6.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { type: i5.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }], directives: [{ type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { type: i6.NgbNav, selector: "[ngbNav]", inputs: ["animation", "destroyOnHide", "orientation", "roles", "keyboard", "activeId"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { type: i6.NgbNavItem, selector: "[ngbNavItem]", inputs: ["disabled", "domId", "destroyOnHide", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { type: i6.NgbNavLink, selector: "a[ngbNavLink]" }, { type: i6.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { type: i2.ModalCloseDirective, selector: "[abpClose]" }, { type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }], pipes: { "abpLocalization": i1.LocalizationPipe } });
231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: UsersComponent, decorators: [{
232
- type: Component,
233
- args: [{
234
- selector: 'abp-users',
235
- templateUrl: './users.component.html',
236
- providers: [
237
- ListService,
238
- {
239
- provide: EXTENSIONS_IDENTIFIER,
240
- useValue: "Identity.UsersComponent" /* Users */,
241
- },
242
- ],
243
- }]
244
- }], ctorParameters: function () { return [{ type: i1.ListService }, { type: i2.ConfirmationService }, { type: i3.IdentityUserService }, { type: i4$1.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { modalContent: [{
245
- type: ViewChild,
246
- args: ['modalContent', { static: false }]
122
+ class UsersComponent {
123
+ constructor(list, confirmationService, service, fb, injector) {
124
+ this.list = list;
125
+ this.confirmationService = confirmationService;
126
+ this.service = service;
127
+ this.fb = fb;
128
+ this.injector = injector;
129
+ this.data = { items: [], totalCount: 0 };
130
+ this.visiblePermissions = false;
131
+ this.modalBusy = false;
132
+ this.permissionManagementKey = "PermissionManagement.PermissionManagementComponent" /* PermissionManagement */;
133
+ this.trackByFn = (index, item) => Object.keys(item)[0] || index;
134
+ this.onVisiblePermissionChange = event => {
135
+ this.visiblePermissions = event;
136
+ };
137
+ }
138
+ get roleGroups() {
139
+ var _a;
140
+ return ((_a = this.form.get('roleNames')) === null || _a === void 0 ? void 0 : _a.controls) || [];
141
+ }
142
+ ngOnInit() {
143
+ this.hookToQuery();
144
+ }
145
+ buildForm() {
146
+ const data = new FormPropData(this.injector, this.selected);
147
+ this.form = generateFormFromProps(data);
148
+ this.service.getAssignableRoles().subscribe(({ items }) => {
149
+ this.roles = items;
150
+ this.form.addControl('roleNames', this.fb.array(this.roles.map(role => {
151
+ var _a;
152
+ return this.fb.group({
153
+ [role.name]: [
154
+ this.selected.id
155
+ ? !!((_a = this.selectedUserRoles) === null || _a === void 0 ? void 0 : _a.find(userRole => userRole.id === role.id))
156
+ : role.isDefault,
157
+ ],
158
+ });
159
+ })));
160
+ });
161
+ }
162
+ openModal() {
163
+ this.buildForm();
164
+ this.isModalVisible = true;
165
+ }
166
+ add() {
167
+ this.selected = {};
168
+ this.selectedUserRoles = [];
169
+ this.openModal();
170
+ }
171
+ edit(id) {
172
+ this.service
173
+ .get(id)
174
+ .pipe(tap(user => (this.selected = user)), switchMap(() => this.service.getRoles(id)))
175
+ .subscribe(userRole => {
176
+ this.selectedUserRoles = userRole.items || [];
177
+ this.openModal();
178
+ });
179
+ }
180
+ save() {
181
+ if (!this.form.valid || this.modalBusy)
182
+ return;
183
+ this.modalBusy = true;
184
+ const { roleNames = [] } = this.form.value;
185
+ const mappedRoleNames = roleNames.filter(role => !!role[Object.keys(role)[0]]).map(role => Object.keys(role)[0]) ||
186
+ [];
187
+ const { id } = this.selected;
188
+ (id
189
+ ? this.service.update(id, Object.assign(Object.assign(Object.assign({}, this.selected), this.form.value), { roleNames: mappedRoleNames }))
190
+ : this.service.create(Object.assign(Object.assign({}, this.form.value), { roleNames: mappedRoleNames })))
191
+ .pipe(finalize(() => (this.modalBusy = false)))
192
+ .subscribe(() => {
193
+ this.isModalVisible = false;
194
+ this.list.get();
195
+ });
196
+ }
197
+ delete(id, userName) {
198
+ this.confirmationService
199
+ .warn('AbpIdentity::UserDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
200
+ messageLocalizationParams: [userName],
201
+ })
202
+ .subscribe((status) => {
203
+ if (status === Confirmation.Status.confirm) {
204
+ this.service.delete(id).subscribe(() => this.list.get());
205
+ }
206
+ });
207
+ }
208
+ sort(data) {
209
+ const { prop, dir } = data.sorts[0];
210
+ this.list.sortKey = prop;
211
+ this.list.sortOrder = dir;
212
+ }
213
+ hookToQuery() {
214
+ this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res));
215
+ }
216
+ openPermissionsModal(providerKey) {
217
+ this.providerKey = providerKey;
218
+ setTimeout(() => {
219
+ this.visiblePermissions = true;
220
+ }, 0);
221
+ }
222
+ }
223
+ UsersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: UsersComponent, deps: [{ token: i1.ListService }, { token: i2.ConfirmationService }, { token: i3.IdentityUserService }, { token: i4$1.FormBuilder }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
224
+ UsersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: UsersComponent, selector: "abp-users", providers: [
225
+ ListService,
226
+ {
227
+ provide: EXTENSIONS_IDENTIFIER,
228
+ useValue: "Identity.UsersComponent" /* Users */,
229
+ },
230
+ ], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<div id=\"identity-roles-wrapper\" class=\"card\">\n <div class=\"card-header\">\n <div class=\"row\">\n <div class=\"col col-md-6\">\n <h5 class=\"card-title\">{{ 'AbpIdentity::Users' | abpLocalization }}</h5>\n </div>\n <div class=\"text-end col col-md-6\">\n <abp-page-toolbar [record]=\"data.items\"></abp-page-toolbar>\n </div>\n </div>\n </div>\n <div class=\"card-body\">\n <div id=\"data-tables-table-filter\" class=\"data-tables-filter\">\n <div class=\"input-group\">\n <input\n type=\"search\"\n class=\"form-control\"\n [placeholder]=\"'AbpUi::PagerSearch' | abpLocalization\"\n [(ngModel)]=\"list.filter\"\n />\n </div>\n </div>\n\n <abp-extensible-table\n [data]=\"data.items\"\n [recordsTotal]=\"data.totalCount\"\n [list]=\"list\"\n ></abp-extensible-table>\n </div>\n</div>\n\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\n <ng-template #abpHeader>\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewUser') | abpLocalization }}</h3>\n </ng-template>\n\n <ng-template #abpBody>\n <ng-template #loaderRef\n ><div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\"></i></div\n ></ng-template>\n\n <form *ngIf=\"form; else loaderRef\" [formGroup]=\"form\" (ngSubmit)=\"save()\">\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\n <li ngbNavItem>\n <a ngbNavLink>{{ 'AbpIdentity::UserInformations' | abpLocalization }}</a>\n <ng-template ngbNavContent>\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\n </ng-template>\n </li>\n\n <li ngbNavItem>\n <a ngbNavLink>{{ 'AbpIdentity::Roles' | abpLocalization }}</a>\n <ng-template ngbNavContent>\n <div\n *ngFor=\"let roleGroup of roleGroups; let i = index; trackBy: trackByFn\"\n class=\"form-check mb-2\"\n >\n <input\n type=\"checkbox\"\n class=\"form-check-input\"\n [attr.id]=\"'roles-' + i\"\n [formControl]=\"roleGroup.controls[roles[i].name]\"\n />\n <label class=\"form-check-label\" [attr.for]=\"'roles-' + i\">{{ roles[i].name }}</label>\n </div>\n </ng-template>\n </li>\n </ul>\n\n <div class=\"mt-2 fade-in-top\" [ngbNavOutlet]=\"nav\"></div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\n </button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"form?.invalid\" (click)=\"save()\">{{\n 'AbpIdentity::Save' | abpLocalization\n }}</abp-button>\n </ng-template>\n</abp-modal>\n\n<abp-permission-management\n #abpPermissionManagement=\"abpPermissionManagement\"\n *abpReplaceableTemplate=\"\n {\n inputs: {\n providerName: { value: 'U' },\n providerKey: { value: providerKey },\n visible: { value: visiblePermissions, twoWay: true }\n },\n outputs: { visibleChange: onVisiblePermissionChange },\n componentKey: permissionManagementKey\n };\n let init = initTemplate\n \"\n (abpInit)=\"init(abpPermissionManagement)\"\n>\n</abp-permission-management>\n", components: [{ type: i4.PageToolbarComponent, selector: "abp-page-toolbar", exportAs: ["abpPageToolbar"] }, { type: i4.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i4.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i6.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { type: i2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { type: i5.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }], directives: [{ type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { type: i6.NgbNav, selector: "[ngbNav]", inputs: ["animation", "destroyOnHide", "orientation", "roles", "keyboard", "activeId"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { type: i6.NgbNavItem, selector: "[ngbNavItem]", inputs: ["disabled", "domId", "destroyOnHide", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { type: i6.NgbNavLink, selector: "a[ngbNavLink]" }, { type: i6.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { type: i2.ModalCloseDirective, selector: "[abpClose]" }, { type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }], pipes: { "abpLocalization": i1.LocalizationPipe } });
231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: UsersComponent, decorators: [{
232
+ type: Component,
233
+ args: [{
234
+ selector: 'abp-users',
235
+ templateUrl: './users.component.html',
236
+ providers: [
237
+ ListService,
238
+ {
239
+ provide: EXTENSIONS_IDENTIFIER,
240
+ useValue: "Identity.UsersComponent" /* Users */,
241
+ },
242
+ ],
243
+ }]
244
+ }], ctorParameters: function () { return [{ type: i1.ListService }, { type: i2.ConfirmationService }, { type: i3.IdentityUserService }, { type: i4$1.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { modalContent: [{
245
+ type: ViewChild,
246
+ args: ['modalContent', { static: false }]
247
247
  }] } });
248
248
 
249
- const DEFAULT_ROLES_ENTITY_ACTIONS = EntityAction.createMany([
250
- {
251
- text: 'AbpIdentity::Edit',
252
- action: data => {
253
- const component = data.getInjected(RolesComponent);
254
- component.edit(data.record.id);
255
- },
256
- permission: 'AbpIdentity.Roles.Update',
257
- },
258
- {
259
- text: 'AbpIdentity::Permissions',
260
- action: data => {
261
- const component = data.getInjected(RolesComponent);
262
- component.openPermissionsModal(data.record.name);
263
- },
264
- permission: 'AbpIdentity.Roles.ManagePermissions',
265
- },
266
- {
267
- text: 'AbpIdentity::Delete',
268
- action: data => {
269
- const component = data.getInjected(RolesComponent);
270
- component.delete(data.record.id, data.record.name);
271
- },
272
- permission: 'AbpIdentity.Roles.Delete',
273
- visible: data => !data.record.isStatic,
274
- },
249
+ const DEFAULT_ROLES_ENTITY_ACTIONS = EntityAction.createMany([
250
+ {
251
+ text: 'AbpIdentity::Edit',
252
+ action: data => {
253
+ const component = data.getInjected(RolesComponent);
254
+ component.edit(data.record.id);
255
+ },
256
+ permission: 'AbpIdentity.Roles.Update',
257
+ },
258
+ {
259
+ text: 'AbpIdentity::Permissions',
260
+ action: data => {
261
+ const component = data.getInjected(RolesComponent);
262
+ component.openPermissionsModal(data.record.name);
263
+ },
264
+ permission: 'AbpIdentity.Roles.ManagePermissions',
265
+ },
266
+ {
267
+ text: 'AbpIdentity::Delete',
268
+ action: data => {
269
+ const component = data.getInjected(RolesComponent);
270
+ component.delete(data.record.id, data.record.name);
271
+ },
272
+ permission: 'AbpIdentity.Roles.Delete',
273
+ visible: data => !data.record.isStatic,
274
+ },
275
275
  ]);
276
276
 
277
- const DEFAULT_ROLES_ENTITY_PROPS = EntityProp.createMany([
278
- {
279
- type: "string" /* String */,
280
- name: 'name',
281
- displayName: 'AbpIdentity::RoleName',
282
- sortable: true,
283
- valueResolver: data => {
284
- const l10n = data.getInjected(LocalizationService);
285
- const t = l10n.instant.bind(l10n);
286
- const { isDefault, isPublic, name } = data.record;
287
- return of(name +
288
- (isDefault
289
- ? `<span class="badge rounded-pill bg-success ms-1">${t('AbpIdentity::DisplayName:IsDefault')}</span>`
290
- : '') +
291
- (isPublic
292
- ? `<span class="badge rounded-pill bg-info ms-1">${t('AbpIdentity::DisplayName:IsPublic')}</span>`
293
- : ''));
294
- },
295
- },
277
+ const DEFAULT_ROLES_ENTITY_PROPS = EntityProp.createMany([
278
+ {
279
+ type: "string" /* String */,
280
+ name: 'name',
281
+ displayName: 'AbpIdentity::RoleName',
282
+ sortable: true,
283
+ valueResolver: data => {
284
+ const l10n = data.getInjected(LocalizationService);
285
+ const t = l10n.instant.bind(l10n);
286
+ const { isDefault, isPublic, name } = data.record;
287
+ return of(escapeHtmlChars(name) +
288
+ (isDefault
289
+ ? `<span class="badge rounded-pill bg-success ms-1">${t('AbpIdentity::DisplayName:IsDefault')}</span>`
290
+ : '') +
291
+ (isPublic
292
+ ? `<span class="badge rounded-pill bg-info ms-1">${t('AbpIdentity::DisplayName:IsPublic')}</span>`
293
+ : ''));
294
+ },
295
+ },
296
296
  ]);
297
297
 
298
- const DEFAULT_ROLES_CREATE_FORM_PROPS = FormProp.createMany([
299
- {
300
- type: "string" /* String */,
301
- name: 'name',
302
- displayName: 'AbpIdentity::RoleName',
303
- id: 'role-name',
304
- disabled: (data) => data.record && data.record.isStatic,
305
- validators: () => [Validators.required],
306
- },
307
- {
308
- type: "boolean" /* Boolean */,
309
- name: 'isDefault',
310
- displayName: 'AbpIdentity::DisplayName:IsDefault',
311
- id: 'role-is-default',
312
- defaultValue: false,
313
- },
314
- {
315
- type: "boolean" /* Boolean */,
316
- name: 'isPublic',
317
- displayName: 'AbpIdentity::DisplayName:IsPublic',
318
- id: 'role-is-public',
319
- defaultValue: false,
320
- },
321
- ]);
298
+ const DEFAULT_ROLES_CREATE_FORM_PROPS = FormProp.createMany([
299
+ {
300
+ type: "string" /* String */,
301
+ name: 'name',
302
+ displayName: 'AbpIdentity::RoleName',
303
+ id: 'role-name',
304
+ disabled: (data) => data.record && data.record.isStatic,
305
+ validators: () => [Validators.required],
306
+ },
307
+ {
308
+ type: "boolean" /* Boolean */,
309
+ name: 'isDefault',
310
+ displayName: 'AbpIdentity::DisplayName:IsDefault',
311
+ id: 'role-is-default',
312
+ defaultValue: false,
313
+ },
314
+ {
315
+ type: "boolean" /* Boolean */,
316
+ name: 'isPublic',
317
+ displayName: 'AbpIdentity::DisplayName:IsPublic',
318
+ id: 'role-is-public',
319
+ defaultValue: false,
320
+ },
321
+ ]);
322
322
  const DEFAULT_ROLES_EDIT_FORM_PROPS = DEFAULT_ROLES_CREATE_FORM_PROPS;
323
323
 
324
- const DEFAULT_ROLES_TOOLBAR_ACTIONS = ToolbarAction.createMany([
325
- {
326
- text: 'AbpIdentity::NewRole',
327
- action: data => {
328
- const component = data.getInjected(RolesComponent);
329
- component.add();
330
- },
331
- permission: 'AbpIdentity.Roles.Create',
332
- icon: 'fa fa-plus',
333
- },
324
+ const DEFAULT_ROLES_TOOLBAR_ACTIONS = ToolbarAction.createMany([
325
+ {
326
+ text: 'AbpIdentity::NewRole',
327
+ action: data => {
328
+ const component = data.getInjected(RolesComponent);
329
+ component.add();
330
+ },
331
+ permission: 'AbpIdentity.Roles.Create',
332
+ icon: 'fa fa-plus',
333
+ },
334
334
  ]);
335
335
 
336
- const DEFAULT_USERS_ENTITY_ACTIONS = EntityAction.createMany([
337
- {
338
- text: 'AbpIdentity::Edit',
339
- action: data => {
340
- const component = data.getInjected(UsersComponent);
341
- component.edit(data.record.id);
342
- },
343
- permission: 'AbpIdentity.Users.Update',
344
- },
345
- {
346
- text: 'AbpIdentity::Permissions',
347
- action: data => {
348
- const component = data.getInjected(UsersComponent);
349
- component.openPermissionsModal(data.record.id);
350
- },
351
- permission: 'AbpIdentity.Users.ManagePermissions',
352
- },
353
- {
354
- text: 'AbpIdentity::Delete',
355
- action: data => {
356
- const component = data.getInjected(UsersComponent);
357
- component.delete(data.record.id, data.record.name || data.record.userName);
358
- },
359
- permission: 'AbpIdentity.Users.Delete',
360
- },
336
+ const DEFAULT_USERS_ENTITY_ACTIONS = EntityAction.createMany([
337
+ {
338
+ text: 'AbpIdentity::Edit',
339
+ action: data => {
340
+ const component = data.getInjected(UsersComponent);
341
+ component.edit(data.record.id);
342
+ },
343
+ permission: 'AbpIdentity.Users.Update',
344
+ },
345
+ {
346
+ text: 'AbpIdentity::Permissions',
347
+ action: data => {
348
+ const component = data.getInjected(UsersComponent);
349
+ component.openPermissionsModal(data.record.id);
350
+ },
351
+ permission: 'AbpIdentity.Users.ManagePermissions',
352
+ },
353
+ {
354
+ text: 'AbpIdentity::Delete',
355
+ action: data => {
356
+ const component = data.getInjected(UsersComponent);
357
+ component.delete(data.record.id, data.record.name || data.record.userName);
358
+ },
359
+ permission: 'AbpIdentity.Users.Delete',
360
+ },
361
361
  ]);
362
362
 
363
- const DEFAULT_USERS_ENTITY_PROPS = EntityProp.createMany([
364
- {
365
- type: "string" /* String */,
366
- name: 'userName',
367
- displayName: 'AbpIdentity::UserName',
368
- sortable: true,
369
- columnWidth: 250,
370
- valueResolver: data => {
371
- const l10n = data.getInjected(LocalizationService);
372
- const t = l10n.instant.bind(l10n);
373
- const inactiveIcon = `<i title="${t('AbpIdentity::ThisUserIsNotActiveMessage')}" class="fas fa-ban text-danger me-1"></i>`;
374
- return of(`
375
- ${!data.record.isActive ? inactiveIcon : ''}
376
- <span class="${!data.record.isActive ? 'text-muted' : ''}">${data.record.userName}</span>`);
377
- },
378
- },
379
- {
380
- type: "string" /* String */,
381
- name: 'email',
382
- displayName: 'AbpIdentity::EmailAddress',
383
- sortable: true,
384
- columnWidth: 250,
385
- },
386
- {
387
- type: "string" /* String */,
388
- name: 'phoneNumber',
389
- displayName: 'AbpIdentity::PhoneNumber',
390
- sortable: true,
391
- columnWidth: 250,
392
- },
363
+ const DEFAULT_USERS_ENTITY_PROPS = EntityProp.createMany([
364
+ {
365
+ type: "string" /* String */,
366
+ name: 'userName',
367
+ displayName: 'AbpIdentity::UserName',
368
+ sortable: true,
369
+ columnWidth: 250,
370
+ valueResolver: data => {
371
+ const l10n = data.getInjected(LocalizationService);
372
+ const t = l10n.instant.bind(l10n);
373
+ const inactiveIcon = `<i title="${t('AbpIdentity::ThisUserIsNotActiveMessage')}" class="fas fa-ban text-danger me-1"></i>`;
374
+ return of(`
375
+ ${!data.record.isActive ? inactiveIcon : ''}
376
+ <span class="${!data.record.isActive ? 'text-muted' : ''}">${escapeHtmlChars(data.record.userName)}</span>`);
377
+ },
378
+ },
379
+ {
380
+ type: "string" /* String */,
381
+ name: 'email',
382
+ displayName: 'AbpIdentity::EmailAddress',
383
+ sortable: true,
384
+ columnWidth: 250,
385
+ },
386
+ {
387
+ type: "string" /* String */,
388
+ name: 'phoneNumber',
389
+ displayName: 'AbpIdentity::PhoneNumber',
390
+ sortable: true,
391
+ columnWidth: 250,
392
+ },
393
393
  ]);
394
394
 
395
- const DEFAULT_USERS_CREATE_FORM_PROPS = FormProp.createMany([
396
- {
397
- type: "string" /* String */,
398
- name: 'userName',
399
- displayName: 'AbpIdentity::UserName',
400
- id: 'user-name',
401
- validators: () => [Validators.required, Validators.maxLength(256)],
402
- },
403
- {
404
- type: "password" /* Password */,
405
- name: 'password',
406
- displayName: 'AbpIdentity::Password',
407
- id: 'password',
408
- autocomplete: 'new-password',
409
- validators: data => [Validators.required, ...getPasswordValidators({ get: data.getInjected })],
410
- },
411
- {
412
- type: "string" /* String */,
413
- name: 'name',
414
- displayName: 'AbpIdentity::DisplayName:Name',
415
- id: 'name',
416
- validators: () => [Validators.maxLength(64)],
417
- },
418
- {
419
- type: "string" /* String */,
420
- name: 'surname',
421
- displayName: 'AbpIdentity::DisplayName:Surname',
422
- id: 'surname',
423
- validators: () => [Validators.maxLength(64)],
424
- },
425
- {
426
- type: "email" /* Email */,
427
- name: 'email',
428
- displayName: 'AbpIdentity::EmailAddress',
429
- id: 'email',
430
- validators: () => [Validators.required, Validators.maxLength(256), Validators.email],
431
- },
432
- {
433
- type: "string" /* String */,
434
- name: 'phoneNumber',
435
- displayName: 'AbpIdentity::PhoneNumber',
436
- id: 'phone-number',
437
- validators: () => [Validators.maxLength(16)],
438
- },
439
- {
440
- type: "boolean" /* Boolean */,
441
- name: 'isActive',
442
- displayName: 'AbpIdentity::DisplayName:IsActive',
443
- id: 'active-checkbox',
444
- defaultValue: true,
445
- },
446
- {
447
- type: "boolean" /* Boolean */,
448
- name: 'lockoutEnabled',
449
- displayName: 'AbpIdentity::DisplayName:LockoutEnabled',
450
- id: 'lockout-checkbox',
451
- defaultValue: true,
452
- },
453
- ]);
395
+ const DEFAULT_USERS_CREATE_FORM_PROPS = FormProp.createMany([
396
+ {
397
+ type: "string" /* String */,
398
+ name: 'userName',
399
+ displayName: 'AbpIdentity::UserName',
400
+ id: 'user-name',
401
+ validators: () => [Validators.required, Validators.maxLength(256)],
402
+ },
403
+ {
404
+ type: "password" /* Password */,
405
+ name: 'password',
406
+ displayName: 'AbpIdentity::Password',
407
+ id: 'password',
408
+ autocomplete: 'new-password',
409
+ validators: data => [Validators.required, ...getPasswordValidators({ get: data.getInjected })],
410
+ },
411
+ {
412
+ type: "string" /* String */,
413
+ name: 'name',
414
+ displayName: 'AbpIdentity::DisplayName:Name',
415
+ id: 'name',
416
+ validators: () => [Validators.maxLength(64)],
417
+ },
418
+ {
419
+ type: "string" /* String */,
420
+ name: 'surname',
421
+ displayName: 'AbpIdentity::DisplayName:Surname',
422
+ id: 'surname',
423
+ validators: () => [Validators.maxLength(64)],
424
+ },
425
+ {
426
+ type: "email" /* Email */,
427
+ name: 'email',
428
+ displayName: 'AbpIdentity::EmailAddress',
429
+ id: 'email',
430
+ validators: () => [Validators.required, Validators.maxLength(256), Validators.email],
431
+ },
432
+ {
433
+ type: "string" /* String */,
434
+ name: 'phoneNumber',
435
+ displayName: 'AbpIdentity::PhoneNumber',
436
+ id: 'phone-number',
437
+ validators: () => [Validators.maxLength(16)],
438
+ },
439
+ {
440
+ type: "boolean" /* Boolean */,
441
+ name: 'isActive',
442
+ displayName: 'AbpIdentity::DisplayName:IsActive',
443
+ id: 'active-checkbox',
444
+ defaultValue: true,
445
+ },
446
+ {
447
+ type: "boolean" /* Boolean */,
448
+ name: 'lockoutEnabled',
449
+ displayName: 'AbpIdentity::DisplayName:LockoutEnabled',
450
+ id: 'lockout-checkbox',
451
+ defaultValue: true,
452
+ },
453
+ ]);
454
454
  const DEFAULT_USERS_EDIT_FORM_PROPS = DEFAULT_USERS_CREATE_FORM_PROPS.filter(prop => prop.name !== 'password');
455
455
 
456
- const DEFAULT_USERS_TOOLBAR_ACTIONS = ToolbarAction.createMany([
457
- {
458
- text: 'AbpIdentity::NewUser',
459
- action: data => {
460
- const component = data.getInjected(UsersComponent);
461
- component.add();
462
- },
463
- permission: 'AbpIdentity.Users.Create',
464
- icon: 'fa fa-plus',
465
- },
456
+ const DEFAULT_USERS_TOOLBAR_ACTIONS = ToolbarAction.createMany([
457
+ {
458
+ text: 'AbpIdentity::NewUser',
459
+ action: data => {
460
+ const component = data.getInjected(UsersComponent);
461
+ component.add();
462
+ },
463
+ permission: 'AbpIdentity.Users.Create',
464
+ icon: 'fa fa-plus',
465
+ },
466
466
  ]);
467
467
 
468
- const DEFAULT_IDENTITY_ENTITY_ACTIONS = {
469
- ["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_ENTITY_ACTIONS,
470
- ["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_ENTITY_ACTIONS,
471
- };
472
- const DEFAULT_IDENTITY_TOOLBAR_ACTIONS = {
473
- ["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_TOOLBAR_ACTIONS,
474
- ["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_TOOLBAR_ACTIONS,
475
- };
476
- const DEFAULT_IDENTITY_ENTITY_PROPS = {
477
- ["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_ENTITY_PROPS,
478
- ["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_ENTITY_PROPS,
479
- };
480
- const DEFAULT_IDENTITY_CREATE_FORM_PROPS = {
481
- ["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_CREATE_FORM_PROPS,
482
- ["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_CREATE_FORM_PROPS,
483
- };
484
- const DEFAULT_IDENTITY_EDIT_FORM_PROPS = {
485
- ["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_EDIT_FORM_PROPS,
486
- ["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_EDIT_FORM_PROPS,
487
- };
488
- const IDENTITY_ENTITY_ACTION_CONTRIBUTORS = new InjectionToken('IDENTITY_ENTITY_ACTION_CONTRIBUTORS');
489
- const IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS = new InjectionToken('IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS');
490
- const IDENTITY_ENTITY_PROP_CONTRIBUTORS = new InjectionToken('IDENTITY_ENTITY_PROP_CONTRIBUTORS');
491
- const IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS = new InjectionToken('IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS');
468
+ const DEFAULT_IDENTITY_ENTITY_ACTIONS = {
469
+ ["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_ENTITY_ACTIONS,
470
+ ["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_ENTITY_ACTIONS,
471
+ };
472
+ const DEFAULT_IDENTITY_TOOLBAR_ACTIONS = {
473
+ ["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_TOOLBAR_ACTIONS,
474
+ ["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_TOOLBAR_ACTIONS,
475
+ };
476
+ const DEFAULT_IDENTITY_ENTITY_PROPS = {
477
+ ["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_ENTITY_PROPS,
478
+ ["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_ENTITY_PROPS,
479
+ };
480
+ const DEFAULT_IDENTITY_CREATE_FORM_PROPS = {
481
+ ["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_CREATE_FORM_PROPS,
482
+ ["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_CREATE_FORM_PROPS,
483
+ };
484
+ const DEFAULT_IDENTITY_EDIT_FORM_PROPS = {
485
+ ["Identity.RolesComponent" /* Roles */]: DEFAULT_ROLES_EDIT_FORM_PROPS,
486
+ ["Identity.UsersComponent" /* Users */]: DEFAULT_USERS_EDIT_FORM_PROPS,
487
+ };
488
+ const IDENTITY_ENTITY_ACTION_CONTRIBUTORS = new InjectionToken('IDENTITY_ENTITY_ACTION_CONTRIBUTORS');
489
+ const IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS = new InjectionToken('IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS');
490
+ const IDENTITY_ENTITY_PROP_CONTRIBUTORS = new InjectionToken('IDENTITY_ENTITY_PROP_CONTRIBUTORS');
491
+ const IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS = new InjectionToken('IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS');
492
492
  const IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS = new InjectionToken('IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS');
493
493
 
494
- class IdentityExtensionsGuard {
495
- constructor(injector) {
496
- this.injector = injector;
497
- }
498
- canActivate() {
499
- const extensions = this.injector.get(ExtensionsService);
500
- const actionContributors = this.injector.get(IDENTITY_ENTITY_ACTION_CONTRIBUTORS, null) || {};
501
- const toolbarContributors = this.injector.get(IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, null) || {};
502
- const propContributors = this.injector.get(IDENTITY_ENTITY_PROP_CONTRIBUTORS, null) || {};
503
- const createFormContributors = this.injector.get(IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, null) || {};
504
- const editFormContributors = this.injector.get(IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, null) || {};
505
- const configState = this.injector.get(ConfigStateService);
506
- return getObjectExtensionEntitiesFromStore(configState, 'Identity').pipe(map(entities => ({
507
- ["Identity.RolesComponent" /* Roles */]: entities.Role,
508
- ["Identity.UsersComponent" /* Users */]: entities.User,
509
- })), mapEntitiesToContributors(configState, 'AbpIdentity'), tap(objectExtensionContributors => {
510
- mergeWithDefaultActions(extensions.entityActions, DEFAULT_IDENTITY_ENTITY_ACTIONS, actionContributors);
511
- mergeWithDefaultActions(extensions.toolbarActions, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, toolbarContributors);
512
- mergeWithDefaultProps(extensions.entityProps, DEFAULT_IDENTITY_ENTITY_PROPS, objectExtensionContributors.prop, propContributors);
513
- mergeWithDefaultProps(extensions.createFormProps, DEFAULT_IDENTITY_CREATE_FORM_PROPS, objectExtensionContributors.createForm, createFormContributors);
514
- mergeWithDefaultProps(extensions.editFormProps, DEFAULT_IDENTITY_EDIT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
515
- }), mapTo(true));
516
- }
517
- }
518
- IdentityExtensionsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityExtensionsGuard, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
519
- IdentityExtensionsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityExtensionsGuard });
520
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityExtensionsGuard, decorators: [{
521
- type: Injectable
494
+ class IdentityExtensionsGuard {
495
+ constructor(injector) {
496
+ this.injector = injector;
497
+ }
498
+ canActivate() {
499
+ const extensions = this.injector.get(ExtensionsService);
500
+ const actionContributors = this.injector.get(IDENTITY_ENTITY_ACTION_CONTRIBUTORS, null) || {};
501
+ const toolbarContributors = this.injector.get(IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, null) || {};
502
+ const propContributors = this.injector.get(IDENTITY_ENTITY_PROP_CONTRIBUTORS, null) || {};
503
+ const createFormContributors = this.injector.get(IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, null) || {};
504
+ const editFormContributors = this.injector.get(IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, null) || {};
505
+ const configState = this.injector.get(ConfigStateService);
506
+ return getObjectExtensionEntitiesFromStore(configState, 'Identity').pipe(map(entities => ({
507
+ ["Identity.RolesComponent" /* Roles */]: entities.Role,
508
+ ["Identity.UsersComponent" /* Users */]: entities.User,
509
+ })), mapEntitiesToContributors(configState, 'AbpIdentity'), tap(objectExtensionContributors => {
510
+ mergeWithDefaultActions(extensions.entityActions, DEFAULT_IDENTITY_ENTITY_ACTIONS, actionContributors);
511
+ mergeWithDefaultActions(extensions.toolbarActions, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, toolbarContributors);
512
+ mergeWithDefaultProps(extensions.entityProps, DEFAULT_IDENTITY_ENTITY_PROPS, objectExtensionContributors.prop, propContributors);
513
+ mergeWithDefaultProps(extensions.createFormProps, DEFAULT_IDENTITY_CREATE_FORM_PROPS, objectExtensionContributors.createForm, createFormContributors);
514
+ mergeWithDefaultProps(extensions.editFormProps, DEFAULT_IDENTITY_EDIT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
515
+ }), mapTo(true));
516
+ }
517
+ }
518
+ IdentityExtensionsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityExtensionsGuard, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
519
+ IdentityExtensionsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityExtensionsGuard });
520
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityExtensionsGuard, decorators: [{
521
+ type: Injectable
522
522
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
523
523
 
524
- const routes = [
525
- { path: '', redirectTo: 'roles', pathMatch: 'full' },
526
- {
527
- path: '',
528
- component: RouterOutletComponent,
529
- canActivate: [AuthGuard, PermissionGuard, IdentityExtensionsGuard],
530
- children: [
531
- {
532
- path: 'roles',
533
- component: ReplaceableRouteContainerComponent,
534
- data: {
535
- requiredPolicy: 'AbpIdentity.Roles',
536
- replaceableComponent: {
537
- key: "Identity.RolesComponent" /* Roles */,
538
- defaultComponent: RolesComponent,
539
- },
540
- },
541
- },
542
- {
543
- path: 'users',
544
- component: ReplaceableRouteContainerComponent,
545
- data: {
546
- requiredPolicy: 'AbpIdentity.Users',
547
- replaceableComponent: {
548
- key: "Identity.UsersComponent" /* Users */,
549
- defaultComponent: UsersComponent,
550
- },
551
- },
552
- },
553
- ],
554
- },
555
- ];
556
- class IdentityRoutingModule {
557
- }
558
- IdentityRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
559
- IdentityRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] });
560
- IdentityRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityRoutingModule, imports: [[RouterModule.forChild(routes)], RouterModule] });
561
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityRoutingModule, decorators: [{
562
- type: NgModule,
563
- args: [{
564
- imports: [RouterModule.forChild(routes)],
565
- exports: [RouterModule],
566
- }]
524
+ const routes = [
525
+ { path: '', redirectTo: 'roles', pathMatch: 'full' },
526
+ {
527
+ path: '',
528
+ component: RouterOutletComponent,
529
+ canActivate: [AuthGuard, PermissionGuard, IdentityExtensionsGuard],
530
+ children: [
531
+ {
532
+ path: 'roles',
533
+ component: ReplaceableRouteContainerComponent,
534
+ data: {
535
+ requiredPolicy: 'AbpIdentity.Roles',
536
+ replaceableComponent: {
537
+ key: "Identity.RolesComponent" /* Roles */,
538
+ defaultComponent: RolesComponent,
539
+ },
540
+ },
541
+ },
542
+ {
543
+ path: 'users',
544
+ component: ReplaceableRouteContainerComponent,
545
+ data: {
546
+ requiredPolicy: 'AbpIdentity.Users',
547
+ replaceableComponent: {
548
+ key: "Identity.UsersComponent" /* Users */,
549
+ defaultComponent: UsersComponent,
550
+ },
551
+ },
552
+ },
553
+ ],
554
+ },
555
+ ];
556
+ class IdentityRoutingModule {
557
+ }
558
+ IdentityRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
559
+ IdentityRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] });
560
+ IdentityRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityRoutingModule, imports: [[RouterModule.forChild(routes)], RouterModule] });
561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityRoutingModule, decorators: [{
562
+ type: NgModule,
563
+ args: [{
564
+ imports: [RouterModule.forChild(routes)],
565
+ exports: [RouterModule],
566
+ }]
567
567
  }] });
568
568
 
569
- class IdentityModule {
570
- static forChild(options = {}) {
571
- return {
572
- ngModule: IdentityModule,
573
- providers: [
574
- {
575
- provide: IDENTITY_ENTITY_ACTION_CONTRIBUTORS,
576
- useValue: options.entityActionContributors,
577
- },
578
- {
579
- provide: IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS,
580
- useValue: options.toolbarActionContributors,
581
- },
582
- {
583
- provide: IDENTITY_ENTITY_PROP_CONTRIBUTORS,
584
- useValue: options.entityPropContributors,
585
- },
586
- {
587
- provide: IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS,
588
- useValue: options.createFormPropContributors,
589
- },
590
- {
591
- provide: IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS,
592
- useValue: options.editFormPropContributors,
593
- },
594
- IdentityExtensionsGuard,
595
- ],
596
- };
597
- }
598
- static forLazy(options = {}) {
599
- return new LazyModuleFactory(IdentityModule.forChild(options));
600
- }
601
- }
602
- IdentityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
603
- IdentityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityModule, declarations: [RolesComponent, UsersComponent], imports: [CoreModule,
604
- IdentityRoutingModule,
605
- NgbNavModule,
606
- ThemeSharedModule,
607
- UiExtensionsModule,
608
- NgbDropdownModule,
609
- PermissionManagementModule,
610
- NgxValidateCoreModule], exports: [RolesComponent, UsersComponent] });
611
- IdentityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityModule, imports: [[
612
- CoreModule,
613
- IdentityRoutingModule,
614
- NgbNavModule,
615
- ThemeSharedModule,
616
- UiExtensionsModule,
617
- NgbDropdownModule,
618
- PermissionManagementModule,
619
- NgxValidateCoreModule,
620
- ]] });
621
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityModule, decorators: [{
622
- type: NgModule,
623
- args: [{
624
- declarations: [RolesComponent, UsersComponent],
625
- exports: [RolesComponent, UsersComponent],
626
- imports: [
627
- CoreModule,
628
- IdentityRoutingModule,
629
- NgbNavModule,
630
- ThemeSharedModule,
631
- UiExtensionsModule,
632
- NgbDropdownModule,
633
- PermissionManagementModule,
634
- NgxValidateCoreModule,
635
- ],
636
- }]
569
+ class IdentityModule {
570
+ static forChild(options = {}) {
571
+ return {
572
+ ngModule: IdentityModule,
573
+ providers: [
574
+ {
575
+ provide: IDENTITY_ENTITY_ACTION_CONTRIBUTORS,
576
+ useValue: options.entityActionContributors,
577
+ },
578
+ {
579
+ provide: IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS,
580
+ useValue: options.toolbarActionContributors,
581
+ },
582
+ {
583
+ provide: IDENTITY_ENTITY_PROP_CONTRIBUTORS,
584
+ useValue: options.entityPropContributors,
585
+ },
586
+ {
587
+ provide: IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS,
588
+ useValue: options.createFormPropContributors,
589
+ },
590
+ {
591
+ provide: IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS,
592
+ useValue: options.editFormPropContributors,
593
+ },
594
+ IdentityExtensionsGuard,
595
+ ],
596
+ };
597
+ }
598
+ static forLazy(options = {}) {
599
+ return new LazyModuleFactory(IdentityModule.forChild(options));
600
+ }
601
+ }
602
+ IdentityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
603
+ IdentityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityModule, declarations: [RolesComponent, UsersComponent], imports: [CoreModule,
604
+ IdentityRoutingModule,
605
+ NgbNavModule,
606
+ ThemeSharedModule,
607
+ UiExtensionsModule,
608
+ NgbDropdownModule,
609
+ PermissionManagementModule,
610
+ NgxValidateCoreModule], exports: [RolesComponent, UsersComponent] });
611
+ IdentityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityModule, imports: [[
612
+ CoreModule,
613
+ IdentityRoutingModule,
614
+ NgbNavModule,
615
+ ThemeSharedModule,
616
+ UiExtensionsModule,
617
+ NgbDropdownModule,
618
+ PermissionManagementModule,
619
+ NgxValidateCoreModule,
620
+ ]] });
621
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IdentityModule, decorators: [{
622
+ type: NgModule,
623
+ args: [{
624
+ declarations: [RolesComponent, UsersComponent],
625
+ exports: [RolesComponent, UsersComponent],
626
+ imports: [
627
+ CoreModule,
628
+ IdentityRoutingModule,
629
+ NgbNavModule,
630
+ ThemeSharedModule,
631
+ UiExtensionsModule,
632
+ NgbDropdownModule,
633
+ PermissionManagementModule,
634
+ NgxValidateCoreModule,
635
+ ],
636
+ }]
637
637
  }] });
638
638
 
639
- /**
640
- * Generated bundle index. Do not edit.
639
+ /**
640
+ * Generated bundle index. Do not edit.
641
641
  */
642
642
 
643
643
  export { DEFAULT_IDENTITY_CREATE_FORM_PROPS, DEFAULT_IDENTITY_EDIT_FORM_PROPS, DEFAULT_IDENTITY_ENTITY_ACTIONS, DEFAULT_IDENTITY_ENTITY_PROPS, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, IDENTITY_ENTITY_ACTION_CONTRIBUTORS, IDENTITY_ENTITY_PROP_CONTRIBUTORS, IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, IdentityExtensionsGuard, IdentityModule, RolesComponent, UsersComponent };