@abp/ng.tenant-management 7.2.2 → 7.3.0-rc.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 (88) hide show
  1. package/README.md +129 -2
  2. package/config/enums/index.d.ts +2 -2
  3. package/config/enums/policy-names.d.ts +4 -4
  4. package/config/enums/route-names.d.ts +4 -4
  5. package/config/index.d.ts +5 -5
  6. package/config/providers/index.d.ts +1 -1
  7. package/config/providers/route.provider.d.ts +8 -8
  8. package/config/public-api.d.ts +3 -3
  9. package/config/tenant-management-config.module.d.ts +8 -8
  10. package/{esm2020 → esm2022}/abp-ng.tenant-management.mjs +4 -4
  11. package/{esm2020 → esm2022}/config/abp-ng.tenant-management-config.mjs +4 -4
  12. package/{esm2020 → esm2022}/config/enums/index.mjs +2 -2
  13. package/{esm2020 → esm2022}/config/enums/policy-names.mjs +1 -1
  14. package/{esm2020 → esm2022}/config/enums/route-names.mjs +1 -1
  15. package/{esm2020 → esm2022}/config/providers/index.mjs +1 -1
  16. package/{esm2020 → esm2022}/config/providers/route.provider.mjs +27 -27
  17. package/{esm2020 → esm2022}/config/public-api.mjs +3 -3
  18. package/esm2022/config/tenant-management-config.module.mjs +19 -0
  19. package/{esm2020 → esm2022}/lib/components/index.mjs +1 -1
  20. package/esm2022/lib/components/tenants/tenants.component.mjs +129 -0
  21. package/{esm2020 → esm2022}/lib/defaults/default-tenants-entity-actions.mjs +28 -28
  22. package/{esm2020 → esm2022}/lib/defaults/default-tenants-entity-props.mjs +9 -9
  23. package/{esm2020 → esm2022}/lib/defaults/default-tenants-form-props.mjs +28 -28
  24. package/{esm2020 → esm2022}/lib/defaults/default-tenants-toolbar-actions.mjs +13 -13
  25. package/{esm2020 → esm2022}/lib/enums/components.mjs +1 -1
  26. package/{esm2020 → esm2022}/lib/enums/index.mjs +1 -1
  27. package/esm2022/lib/guards/extensions.guard.mjs +36 -0
  28. package/{esm2020 → esm2022}/lib/guards/index.mjs +1 -1
  29. package/{esm2020 → esm2022}/lib/models/config-options.mjs +1 -1
  30. package/{esm2020 → esm2022}/lib/models/index.mjs +2 -2
  31. package/{esm2020 → esm2022}/lib/models/tenant-management.mjs +1 -1
  32. package/esm2022/lib/tenant-management-routing.module.mjs +42 -0
  33. package/esm2022/lib/tenant-management.module.mjs +82 -0
  34. package/{esm2020 → esm2022}/lib/tokens/extensions.token.mjs +25 -25
  35. package/{esm2020 → esm2022}/lib/tokens/index.mjs +1 -1
  36. package/{esm2020 → esm2022}/proxy/abp-ng.tenant-management-proxy.mjs +4 -4
  37. package/{esm2020 → esm2022}/proxy/lib/index.mjs +1 -1
  38. package/{esm2020 → esm2022}/proxy/lib/proxy/index.mjs +2 -2
  39. package/{esm2020 → esm2022}/proxy/lib/proxy/models.mjs +1 -1
  40. package/esm2022/proxy/lib/proxy/tenant.service.mjs +57 -0
  41. package/{esm2020 → esm2022}/proxy/public-api.mjs +1 -1
  42. package/{esm2020 → esm2022}/public-api.mjs +6 -6
  43. package/{fesm2015 → fesm2022}/abp-ng.tenant-management-config.mjs +39 -39
  44. package/{fesm2020 → fesm2022}/abp-ng.tenant-management-config.mjs.map +1 -1
  45. package/{fesm2015 → fesm2022}/abp-ng.tenant-management-proxy.mjs +53 -53
  46. package/{fesm2020 → fesm2022}/abp-ng.tenant-management-proxy.mjs.map +1 -1
  47. package/{fesm2020 → fesm2022}/abp-ng.tenant-management.mjs +326 -326
  48. package/fesm2022/abp-ng.tenant-management.mjs.map +1 -0
  49. package/index.d.ts +5 -5
  50. package/lib/components/index.d.ts +1 -1
  51. package/lib/components/tenants/tenants.component.d.ts +38 -38
  52. package/lib/defaults/default-tenants-entity-actions.d.ts +3 -3
  53. package/lib/defaults/default-tenants-entity-props.d.ts +3 -3
  54. package/lib/defaults/default-tenants-form-props.d.ts +4 -4
  55. package/lib/defaults/default-tenants-toolbar-actions.d.ts +3 -3
  56. package/lib/enums/components.d.ts +3 -3
  57. package/lib/enums/index.d.ts +1 -1
  58. package/lib/guards/extensions.guard.d.ts +11 -11
  59. package/lib/guards/index.d.ts +1 -1
  60. package/lib/models/config-options.d.ts +25 -25
  61. package/lib/models/index.d.ts +2 -2
  62. package/lib/models/tenant-management.d.ts +8 -8
  63. package/lib/tenant-management-routing.module.d.ts +7 -7
  64. package/lib/tenant-management.module.d.ts +19 -19
  65. package/lib/tokens/extensions.token.d.ts +33 -33
  66. package/lib/tokens/index.d.ts +1 -1
  67. package/package.json +28 -24
  68. package/proxy/index.d.ts +5 -5
  69. package/proxy/lib/index.d.ts +1 -1
  70. package/proxy/lib/proxy/index.d.ts +2 -2
  71. package/proxy/lib/proxy/models.d.ts +18 -18
  72. package/proxy/lib/proxy/tenant.service.d.ts +19 -19
  73. package/proxy/public-api.d.ts +1 -1
  74. package/public-api.d.ts +6 -6
  75. package/esm2020/config/tenant-management-config.module.mjs +0 -18
  76. package/esm2020/lib/components/tenants/tenants.component.mjs +0 -128
  77. package/esm2020/lib/guards/extensions.guard.mjs +0 -35
  78. package/esm2020/lib/tenant-management-routing.module.mjs +0 -41
  79. package/esm2020/lib/tenant-management.module.mjs +0 -81
  80. package/esm2020/proxy/lib/proxy/tenant.service.mjs +0 -56
  81. package/fesm2015/abp-ng.tenant-management-config.mjs.map +0 -1
  82. package/fesm2015/abp-ng.tenant-management-proxy.mjs.map +0 -1
  83. package/fesm2015/abp-ng.tenant-management.mjs +0 -366
  84. package/fesm2015/abp-ng.tenant-management.mjs.map +0 -1
  85. package/fesm2020/abp-ng.tenant-management-config.mjs +0 -51
  86. package/fesm2020/abp-ng.tenant-management-proxy.mjs +0 -62
  87. package/fesm2020/abp-ng.tenant-management.mjs.map +0 -1
  88. package/proxy/src/lib/proxy/README.md +0 -17
@@ -6,10 +6,10 @@ import { Confirmation, getPasswordValidators, ThemeSharedModule } from '@abp/ng.
6
6
  import * as i7 from '@abp/ng.theme.shared/extensions';
7
7
  import { FormPropData, generateFormFromProps, EXTENSIONS_IDENTIFIER, EntityAction, EntityProp, FormProp, ToolbarAction, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps, UiExtensionsModule } from '@abp/ng.theme.shared/extensions';
8
8
  import * as i0 from '@angular/core';
9
- import { Component, InjectionToken, Injectable, NgModule } from '@angular/core';
9
+ import { Component, InjectionToken, inject, Injectable, NgModule } from '@angular/core';
10
10
  import * as i4 from '@angular/forms';
11
11
  import { Validators } from '@angular/forms';
12
- import { finalize, map, tap, mapTo } from 'rxjs/operators';
12
+ import { finalize, map, tap } from 'rxjs/operators';
13
13
  import * as i5 from '@ngx-validate/core';
14
14
  import { NgxValidateCoreModule } from '@ngx-validate/core';
15
15
  import * as i6 from '@abp/ng.feature-management';
@@ -18,348 +18,348 @@ import * as i8 from '@abp/ng.components/page';
18
18
  import { PageModule } from '@abp/ng.components/page';
19
19
  import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
20
20
  import * as i1$1 from '@angular/router';
21
- import { RouterModule } from '@angular/router';
21
+ import { mapToCanActivate, RouterModule } from '@angular/router';
22
22
 
23
- class TenantsComponent {
24
- constructor(list, injector, confirmationService, service, toasterService, fb) {
25
- this.list = list;
26
- this.injector = injector;
27
- this.confirmationService = confirmationService;
28
- this.service = service;
29
- this.toasterService = toasterService;
30
- this.fb = fb;
31
- this.data = { items: [], totalCount: 0 };
32
- this.visibleFeatures = false;
33
- this.modalBusy = false;
34
- this.featureManagementKey = "FeatureManagement.FeatureManagementComponent" /* eFeatureManagementComponents.FeatureManagement */;
35
- this.onVisibleFeaturesChange = (value) => {
36
- this.visibleFeatures = value;
37
- };
38
- }
39
- get hasSelectedTenant() {
40
- return Boolean(this.selected.id);
41
- }
42
- ngOnInit() {
43
- this.hookToQuery();
44
- }
45
- createTenantForm() {
46
- const data = new FormPropData(this.injector, this.selected);
47
- this.tenantForm = generateFormFromProps(data);
48
- }
49
- addTenant() {
50
- this.selected = {};
51
- this.createTenantForm();
52
- this.isModalVisible = true;
53
- }
54
- editTenant(id) {
55
- this.service.get(id).subscribe(res => {
56
- this.selected = res;
57
- this.createTenantForm();
58
- this.isModalVisible = true;
59
- });
60
- }
61
- save() {
62
- if (!this.tenantForm.valid || this.modalBusy)
63
- return;
64
- this.modalBusy = true;
65
- const { id } = this.selected;
66
- (id
67
- ? this.service.update(id, { ...this.selected, ...this.tenantForm.value })
68
- : this.service.create(this.tenantForm.value))
69
- .pipe(finalize(() => (this.modalBusy = false)))
70
- .subscribe(() => {
71
- this.isModalVisible = false;
72
- this.list.get();
73
- });
74
- }
75
- delete(id, name) {
76
- this.confirmationService
77
- .warn('AbpTenantManagement::TenantDeletionConfirmationMessage', 'AbpTenantManagement::AreYouSure', {
78
- messageLocalizationParams: [name],
79
- })
80
- .subscribe((status) => {
81
- if (status === Confirmation.Status.confirm) {
82
- this.toasterService.success('AbpUi::SuccessfullyDeleted');
83
- this.service.delete(id).subscribe(() => this.list.get());
84
- }
85
- });
86
- }
87
- hookToQuery() {
88
- this.list
89
- .hookToQuery(query => this.service.getList(query))
90
- .subscribe(res => {
91
- this.data = res;
92
- });
93
- }
94
- onSharedDatabaseChange(value) {
95
- if (!value) {
96
- setTimeout(() => {
97
- const defaultConnectionString = document.getElementById('defaultConnectionString');
98
- if (defaultConnectionString) {
99
- defaultConnectionString.focus();
100
- }
101
- }, 0);
102
- }
103
- }
104
- openFeaturesModal(providerKey) {
105
- this.providerKey = providerKey;
106
- setTimeout(() => {
107
- this.visibleFeatures = true;
108
- }, 0);
109
- }
110
- sort(data) {
111
- const { prop, dir } = data.sorts[0];
112
- this.list.sortKey = prop;
113
- this.list.sortOrder = dir;
114
- }
115
- }
116
- TenantsComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantsComponent, deps: [{ token: i1.ListService }, { token: i0.Injector }, { token: i2.ConfirmationService }, { token: i3.TenantService }, { token: i2.ToasterService }, { token: i4.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
117
- TenantsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: TenantsComponent, selector: "abp-tenants", providers: [
118
- ListService,
119
- {
120
- provide: EXTENSIONS_IDENTIFIER,
121
- useValue: "TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */,
122
- },
123
- ], ngImport: i0, template: "<abp-page [title]=\"'AbpTenantManagement::Tenants' | abpLocalization\" [toolbar]=\"data.items\">\r\n\r\n\r\n <div id=\"wrapper\" class=\"card\">\r\n <div class=\"card-body\">\r\n <div id=\"data-tables-table-filter\" class=\"data-tables-filter mb-3\">\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 || 0\"\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>\r\n {{\r\n (selected?.id ? 'AbpTenantManagement::Edit' : 'AbpTenantManagement::NewTenant')\r\n | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"tenantForm\" (ngSubmit)=\"save()\" [validateOnSubmit]=\"true\">\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 abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpTenantManagement::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"tenantForm?.invalid\">{{\r\n 'AbpTenantManagement::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n </abp-modal>\r\n\r\n <abp-feature-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'T' },\r\n providerKey: { value: providerKey },\r\n visible: { value: visibleFeatures, twoWay: true }\r\n },\r\n outputs: { visibleChange: $any(onVisibleFeaturesChange) },\r\n componentKey: featureManagementKey\r\n }\"\r\n [(visible)]=\"visibleFeatures\"\r\n providerName=\"T\"\r\n [providerKey]=\"providerKey\"\r\n >\r\n </abp-feature-management>\r\n</abp-page>\r\n", dependencies: [{ kind: "directive", type: i5.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.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: 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: i6.FeatureManagementComponent, selector: "abp-feature-management", inputs: ["providerKey", "providerName", "visible"], outputs: ["visibleChange"], exportAs: ["abpFeatureManagement"] }, { 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: i8.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantsComponent, decorators: [{
125
- type: Component,
126
- args: [{ selector: 'abp-tenants', providers: [
127
- ListService,
128
- {
129
- provide: EXTENSIONS_IDENTIFIER,
130
- useValue: "TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */,
131
- },
132
- ], template: "<abp-page [title]=\"'AbpTenantManagement::Tenants' | abpLocalization\" [toolbar]=\"data.items\">\r\n\r\n\r\n <div id=\"wrapper\" class=\"card\">\r\n <div class=\"card-body\">\r\n <div id=\"data-tables-table-filter\" class=\"data-tables-filter mb-3\">\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 || 0\"\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>\r\n {{\r\n (selected?.id ? 'AbpTenantManagement::Edit' : 'AbpTenantManagement::NewTenant')\r\n | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"tenantForm\" (ngSubmit)=\"save()\" [validateOnSubmit]=\"true\">\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 abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpTenantManagement::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"tenantForm?.invalid\">{{\r\n 'AbpTenantManagement::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n </abp-modal>\r\n\r\n <abp-feature-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'T' },\r\n providerKey: { value: providerKey },\r\n visible: { value: visibleFeatures, twoWay: true }\r\n },\r\n outputs: { visibleChange: $any(onVisibleFeaturesChange) },\r\n componentKey: featureManagementKey\r\n }\"\r\n [(visible)]=\"visibleFeatures\"\r\n providerName=\"T\"\r\n [providerKey]=\"providerKey\"\r\n >\r\n </abp-feature-management>\r\n</abp-page>\r\n" }]
23
+ class TenantsComponent {
24
+ get hasSelectedTenant() {
25
+ return Boolean(this.selected.id);
26
+ }
27
+ constructor(list, injector, confirmationService, service, toasterService, fb) {
28
+ this.list = list;
29
+ this.injector = injector;
30
+ this.confirmationService = confirmationService;
31
+ this.service = service;
32
+ this.toasterService = toasterService;
33
+ this.fb = fb;
34
+ this.data = { items: [], totalCount: 0 };
35
+ this.visibleFeatures = false;
36
+ this.modalBusy = false;
37
+ this.featureManagementKey = "FeatureManagement.FeatureManagementComponent" /* eFeatureManagementComponents.FeatureManagement */;
38
+ this.onVisibleFeaturesChange = (value) => {
39
+ this.visibleFeatures = value;
40
+ };
41
+ }
42
+ ngOnInit() {
43
+ this.hookToQuery();
44
+ }
45
+ createTenantForm() {
46
+ const data = new FormPropData(this.injector, this.selected);
47
+ this.tenantForm = generateFormFromProps(data);
48
+ }
49
+ addTenant() {
50
+ this.selected = {};
51
+ this.createTenantForm();
52
+ this.isModalVisible = true;
53
+ }
54
+ editTenant(id) {
55
+ this.service.get(id).subscribe(res => {
56
+ this.selected = res;
57
+ this.createTenantForm();
58
+ this.isModalVisible = true;
59
+ });
60
+ }
61
+ save() {
62
+ if (!this.tenantForm.valid || this.modalBusy)
63
+ return;
64
+ this.modalBusy = true;
65
+ const { id } = this.selected;
66
+ (id
67
+ ? this.service.update(id, { ...this.selected, ...this.tenantForm.value })
68
+ : this.service.create(this.tenantForm.value))
69
+ .pipe(finalize(() => (this.modalBusy = false)))
70
+ .subscribe(() => {
71
+ this.isModalVisible = false;
72
+ this.list.get();
73
+ });
74
+ }
75
+ delete(id, name) {
76
+ this.confirmationService
77
+ .warn('AbpTenantManagement::TenantDeletionConfirmationMessage', 'AbpTenantManagement::AreYouSure', {
78
+ messageLocalizationParams: [name],
79
+ })
80
+ .subscribe((status) => {
81
+ if (status === Confirmation.Status.confirm) {
82
+ this.toasterService.success('AbpUi::SuccessfullyDeleted');
83
+ this.service.delete(id).subscribe(() => this.list.get());
84
+ }
85
+ });
86
+ }
87
+ hookToQuery() {
88
+ this.list
89
+ .hookToQuery(query => this.service.getList(query))
90
+ .subscribe(res => {
91
+ this.data = res;
92
+ });
93
+ }
94
+ onSharedDatabaseChange(value) {
95
+ if (!value) {
96
+ setTimeout(() => {
97
+ const defaultConnectionString = document.getElementById('defaultConnectionString');
98
+ if (defaultConnectionString) {
99
+ defaultConnectionString.focus();
100
+ }
101
+ }, 0);
102
+ }
103
+ }
104
+ openFeaturesModal(providerKey) {
105
+ this.providerKey = providerKey;
106
+ setTimeout(() => {
107
+ this.visibleFeatures = true;
108
+ }, 0);
109
+ }
110
+ sort(data) {
111
+ const { prop, dir } = data.sorts[0];
112
+ this.list.sortKey = prop;
113
+ this.list.sortOrder = dir;
114
+ }
115
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantsComponent, deps: [{ token: i1.ListService }, { token: i0.Injector }, { token: i2.ConfirmationService }, { token: i3.TenantService }, { token: i2.ToasterService }, { token: i4.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
116
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: TenantsComponent, selector: "abp-tenants", providers: [
117
+ ListService,
118
+ {
119
+ provide: EXTENSIONS_IDENTIFIER,
120
+ useValue: "TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */,
121
+ },
122
+ ], ngImport: i0, template: "<abp-page [title]=\"'AbpTenantManagement::Tenants' | abpLocalization\" [toolbar]=\"data.items\">\r\n\r\n\r\n <div id=\"wrapper\" class=\"card\">\r\n <div class=\"card-body\">\r\n <div id=\"data-tables-table-filter\" class=\"data-tables-filter mb-3\">\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 || 0\"\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>\r\n {{\r\n (selected?.id ? 'AbpTenantManagement::Edit' : 'AbpTenantManagement::NewTenant')\r\n | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"tenantForm\" (ngSubmit)=\"save()\" [validateOnSubmit]=\"true\">\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 abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpTenantManagement::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"tenantForm?.invalid\">{{\r\n 'AbpTenantManagement::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n </abp-modal>\r\n\r\n <abp-feature-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'T' },\r\n providerKey: { value: providerKey },\r\n visible: { value: visibleFeatures, twoWay: true }\r\n },\r\n outputs: { visibleChange: $any(onVisibleFeaturesChange) },\r\n componentKey: featureManagementKey\r\n }\"\r\n [(visible)]=\"visibleFeatures\"\r\n providerName=\"T\"\r\n [providerKey]=\"providerKey\"\r\n >\r\n </abp-feature-management>\r\n</abp-page>\r\n", dependencies: [{ kind: "directive", type: i5.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.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: 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: i6.FeatureManagementComponent, selector: "abp-feature-management", inputs: ["providerKey", "providerName", "visible"], outputs: ["visibleChange"], exportAs: ["abpFeatureManagement"] }, { 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: i8.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
123
+ }
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantsComponent, decorators: [{
125
+ type: Component,
126
+ args: [{ selector: 'abp-tenants', providers: [
127
+ ListService,
128
+ {
129
+ provide: EXTENSIONS_IDENTIFIER,
130
+ useValue: "TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */,
131
+ },
132
+ ], template: "<abp-page [title]=\"'AbpTenantManagement::Tenants' | abpLocalization\" [toolbar]=\"data.items\">\r\n\r\n\r\n <div id=\"wrapper\" class=\"card\">\r\n <div class=\"card-body\">\r\n <div id=\"data-tables-table-filter\" class=\"data-tables-filter mb-3\">\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 || 0\"\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>\r\n {{\r\n (selected?.id ? 'AbpTenantManagement::Edit' : 'AbpTenantManagement::NewTenant')\r\n | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"tenantForm\" (ngSubmit)=\"save()\" [validateOnSubmit]=\"true\">\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 abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpTenantManagement::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"tenantForm?.invalid\">{{\r\n 'AbpTenantManagement::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n </abp-modal>\r\n\r\n <abp-feature-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'T' },\r\n providerKey: { value: providerKey },\r\n visible: { value: visibleFeatures, twoWay: true }\r\n },\r\n outputs: { visibleChange: $any(onVisibleFeaturesChange) },\r\n componentKey: featureManagementKey\r\n }\"\r\n [(visible)]=\"visibleFeatures\"\r\n providerName=\"T\"\r\n [providerKey]=\"providerKey\"\r\n >\r\n </abp-feature-management>\r\n</abp-page>\r\n" }]
133
133
  }], ctorParameters: function () { return [{ type: i1.ListService }, { type: i0.Injector }, { type: i2.ConfirmationService }, { type: i3.TenantService }, { type: i2.ToasterService }, { type: i4.UntypedFormBuilder }]; } });
134
134
 
135
- const DEFAULT_TENANTS_ENTITY_ACTIONS = EntityAction.createMany([
136
- {
137
- text: 'AbpTenantManagement::Edit',
138
- action: data => {
139
- const component = data.getInjected(TenantsComponent);
140
- component.editTenant(data.record.id);
141
- },
142
- permission: 'AbpTenantManagement.Tenants.Update',
143
- },
144
- {
145
- text: 'AbpTenantManagement::Permission:ManageFeatures',
146
- action: data => {
147
- const component = data.getInjected(TenantsComponent);
148
- component.openFeaturesModal(data.record.id);
149
- },
150
- permission: 'AbpTenantManagement.Tenants.ManageFeatures',
151
- },
152
- {
153
- text: 'AbpTenantManagement::Delete',
154
- action: data => {
155
- const component = data.getInjected(TenantsComponent);
156
- component.delete(data.record.id, data.record.name);
157
- },
158
- permission: 'AbpTenantManagement.Tenants.Delete',
159
- },
135
+ const DEFAULT_TENANTS_ENTITY_ACTIONS = EntityAction.createMany([
136
+ {
137
+ text: 'AbpTenantManagement::Edit',
138
+ action: data => {
139
+ const component = data.getInjected(TenantsComponent);
140
+ component.editTenant(data.record.id);
141
+ },
142
+ permission: 'AbpTenantManagement.Tenants.Update',
143
+ },
144
+ {
145
+ text: 'AbpTenantManagement::Permission:ManageFeatures',
146
+ action: data => {
147
+ const component = data.getInjected(TenantsComponent);
148
+ component.openFeaturesModal(data.record.id);
149
+ },
150
+ permission: 'AbpTenantManagement.Tenants.ManageFeatures',
151
+ },
152
+ {
153
+ text: 'AbpTenantManagement::Delete',
154
+ action: data => {
155
+ const component = data.getInjected(TenantsComponent);
156
+ component.delete(data.record.id, data.record.name);
157
+ },
158
+ permission: 'AbpTenantManagement.Tenants.Delete',
159
+ },
160
160
  ]);
161
161
 
162
- const DEFAULT_TENANTS_ENTITY_PROPS = EntityProp.createMany([
163
- {
164
- type: "string" /* ePropType.String */,
165
- name: 'name',
166
- displayName: 'AbpTenantManagement::TenantName',
167
- sortable: true,
168
- },
162
+ const DEFAULT_TENANTS_ENTITY_PROPS = EntityProp.createMany([
163
+ {
164
+ type: "string" /* ePropType.String */,
165
+ name: 'name',
166
+ displayName: 'AbpTenantManagement::TenantName',
167
+ sortable: true,
168
+ },
169
169
  ]);
170
170
 
171
- const DEFAULT_TENANTS_CREATE_FORM_PROPS = FormProp.createMany([
172
- {
173
- type: "string" /* ePropType.String */,
174
- name: 'name',
175
- id: 'name',
176
- displayName: 'AbpTenantManagement::TenantName',
177
- validators: () => [Validators.required, Validators.maxLength(256)],
178
- },
179
- {
180
- type: "email" /* ePropType.Email */,
181
- name: 'adminEmailAddress',
182
- displayName: 'AbpTenantManagement::DisplayName:AdminEmailAddress',
183
- id: 'admin-email-address',
184
- validators: () => [Validators.required, Validators.maxLength(256), Validators.email],
185
- },
186
- {
187
- type: "passwordinputgroup" /* ePropType.PasswordInputGroup */,
188
- name: 'adminPassword',
189
- displayName: 'AbpTenantManagement::DisplayName:AdminPassword',
190
- id: 'admin-password',
191
- autocomplete: 'new-password',
192
- validators: data => [Validators.required, ...getPasswordValidators({ get: data.getInjected })],
193
- },
194
- ]);
171
+ const DEFAULT_TENANTS_CREATE_FORM_PROPS = FormProp.createMany([
172
+ {
173
+ type: "string" /* ePropType.String */,
174
+ name: 'name',
175
+ id: 'name',
176
+ displayName: 'AbpTenantManagement::TenantName',
177
+ validators: () => [Validators.required, Validators.maxLength(256)],
178
+ },
179
+ {
180
+ type: "email" /* ePropType.Email */,
181
+ name: 'adminEmailAddress',
182
+ displayName: 'AbpTenantManagement::DisplayName:AdminEmailAddress',
183
+ id: 'admin-email-address',
184
+ validators: () => [Validators.required, Validators.maxLength(256), Validators.email],
185
+ },
186
+ {
187
+ type: "passwordinputgroup" /* ePropType.PasswordInputGroup */,
188
+ name: 'adminPassword',
189
+ displayName: 'AbpTenantManagement::DisplayName:AdminPassword',
190
+ id: 'admin-password',
191
+ autocomplete: 'new-password',
192
+ validators: data => [Validators.required, ...getPasswordValidators({ get: data.getInjected })],
193
+ },
194
+ ]);
195
195
  const DEFAULT_TENANTS_EDIT_FORM_PROPS = DEFAULT_TENANTS_CREATE_FORM_PROPS.slice(0, 1);
196
196
 
197
- const DEFAULT_TENANTS_TOOLBAR_ACTIONS = ToolbarAction.createMany([
198
- {
199
- text: 'AbpTenantManagement::NewTenant',
200
- action: data => {
201
- const component = data.getInjected(TenantsComponent);
202
- component.addTenant();
203
- },
204
- permission: 'AbpTenantManagement.Tenants.Create',
205
- icon: 'fa fa-plus',
206
- },
197
+ const DEFAULT_TENANTS_TOOLBAR_ACTIONS = ToolbarAction.createMany([
198
+ {
199
+ text: 'AbpTenantManagement::NewTenant',
200
+ action: data => {
201
+ const component = data.getInjected(TenantsComponent);
202
+ component.addTenant();
203
+ },
204
+ permission: 'AbpTenantManagement.Tenants.Create',
205
+ icon: 'fa fa-plus',
206
+ },
207
207
  ]);
208
208
 
209
- const DEFAULT_TENANT_MANAGEMENT_ENTITY_ACTIONS = {
210
- ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: DEFAULT_TENANTS_ENTITY_ACTIONS,
211
- };
212
- const DEFAULT_TENANT_MANAGEMENT_TOOLBAR_ACTIONS = {
213
- ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: DEFAULT_TENANTS_TOOLBAR_ACTIONS,
214
- };
215
- const DEFAULT_TENANT_MANAGEMENT_ENTITY_PROPS = {
216
- ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: DEFAULT_TENANTS_ENTITY_PROPS,
217
- };
218
- const DEFAULT_TENANT_MANAGEMENT_CREATE_FORM_PROPS = {
219
- ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: DEFAULT_TENANTS_CREATE_FORM_PROPS,
220
- };
221
- const DEFAULT_TENANT_MANAGEMENT_EDIT_FORM_PROPS = {
222
- ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: DEFAULT_TENANTS_EDIT_FORM_PROPS,
223
- };
224
- const TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS = new InjectionToken('TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS');
225
- const TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS = new InjectionToken('TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS');
226
- const TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS = new InjectionToken('TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS');
227
- const TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS = new InjectionToken('TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS');
209
+ const DEFAULT_TENANT_MANAGEMENT_ENTITY_ACTIONS = {
210
+ ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: DEFAULT_TENANTS_ENTITY_ACTIONS,
211
+ };
212
+ const DEFAULT_TENANT_MANAGEMENT_TOOLBAR_ACTIONS = {
213
+ ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: DEFAULT_TENANTS_TOOLBAR_ACTIONS,
214
+ };
215
+ const DEFAULT_TENANT_MANAGEMENT_ENTITY_PROPS = {
216
+ ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: DEFAULT_TENANTS_ENTITY_PROPS,
217
+ };
218
+ const DEFAULT_TENANT_MANAGEMENT_CREATE_FORM_PROPS = {
219
+ ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: DEFAULT_TENANTS_CREATE_FORM_PROPS,
220
+ };
221
+ const DEFAULT_TENANT_MANAGEMENT_EDIT_FORM_PROPS = {
222
+ ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: DEFAULT_TENANTS_EDIT_FORM_PROPS,
223
+ };
224
+ const TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS = new InjectionToken('TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS');
225
+ const TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS = new InjectionToken('TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS');
226
+ const TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS = new InjectionToken('TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS');
227
+ const TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS = new InjectionToken('TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS');
228
228
  const TENANT_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS = new InjectionToken('TENANT_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS');
229
229
 
230
- class TenantManagementExtensionsGuard {
231
- constructor(injector) {
232
- this.injector = injector;
233
- }
234
- canActivate() {
235
- const extensions = this.injector.get(ExtensionsService);
236
- const actionContributors = this.injector.get(TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS, null) || {};
237
- const toolbarContributors = this.injector.get(TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS, null) || {};
238
- const propContributors = this.injector.get(TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS, null) || {};
239
- const createFormContributors = this.injector.get(TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS, null) || {};
240
- const editFormContributors = this.injector.get(TENANT_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS, null) || {};
241
- const configState = this.injector.get(ConfigStateService);
242
- return getObjectExtensionEntitiesFromStore(configState, 'TenantManagement').pipe(map(entities => ({
243
- ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: entities.Tenant,
244
- })), mapEntitiesToContributors(configState, 'TenantManagement'), tap(objectExtensionContributors => {
245
- mergeWithDefaultActions(extensions.entityActions, DEFAULT_TENANT_MANAGEMENT_ENTITY_ACTIONS, actionContributors);
246
- mergeWithDefaultActions(extensions.toolbarActions, DEFAULT_TENANT_MANAGEMENT_TOOLBAR_ACTIONS, toolbarContributors);
247
- mergeWithDefaultProps(extensions.entityProps, DEFAULT_TENANT_MANAGEMENT_ENTITY_PROPS, objectExtensionContributors.prop, propContributors);
248
- mergeWithDefaultProps(extensions.createFormProps, DEFAULT_TENANT_MANAGEMENT_CREATE_FORM_PROPS, objectExtensionContributors.createForm, createFormContributors);
249
- mergeWithDefaultProps(extensions.editFormProps, DEFAULT_TENANT_MANAGEMENT_EDIT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
250
- }), mapTo(true));
251
- }
252
- }
253
- TenantManagementExtensionsGuardfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementExtensionsGuard, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
254
- TenantManagementExtensionsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementExtensionsGuard });
255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementExtensionsGuard, decorators: [{
256
- type: Injectable
257
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
230
+ class TenantManagementExtensionsGuard {
231
+ constructor() {
232
+ this.configState = inject(ConfigStateService);
233
+ this.extensions = inject(ExtensionsService);
234
+ }
235
+ canActivate() {
236
+ const config = { optional: true };
237
+ const actionContributors = inject(TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS, config) || {};
238
+ const toolbarContributors = inject(TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS, config) || {};
239
+ const propContributors = inject(TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS, config) || {};
240
+ const createFormContributors = inject(TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS, config) || {};
241
+ const editFormContributors = inject(TENANT_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS, config) || {};
242
+ return getObjectExtensionEntitiesFromStore(this.configState, 'TenantManagement').pipe(map(entities => ({
243
+ ["TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */]: entities.Tenant,
244
+ })), mapEntitiesToContributors(this.configState, 'TenantManagement'), tap(objectExtensionContributors => {
245
+ mergeWithDefaultActions(this.extensions.entityActions, DEFAULT_TENANT_MANAGEMENT_ENTITY_ACTIONS, actionContributors);
246
+ mergeWithDefaultActions(this.extensions.toolbarActions, DEFAULT_TENANT_MANAGEMENT_TOOLBAR_ACTIONS, toolbarContributors);
247
+ mergeWithDefaultProps(this.extensions.entityProps, DEFAULT_TENANT_MANAGEMENT_ENTITY_PROPS, objectExtensionContributors.prop, propContributors);
248
+ mergeWithDefaultProps(this.extensions.createFormProps, DEFAULT_TENANT_MANAGEMENT_CREATE_FORM_PROPS, objectExtensionContributors.createForm, createFormContributors);
249
+ mergeWithDefaultProps(this.extensions.editFormProps, DEFAULT_TENANT_MANAGEMENT_EDIT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
250
+ }), map(() => true));
251
+ }
252
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementExtensionsGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
253
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementExtensionsGuard }); }
254
+ }
255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementExtensionsGuard, decorators: [{
256
+ type: Injectable
257
+ }] });
258
258
 
259
- const routes = [
260
- { path: '', redirectTo: 'tenants', pathMatch: 'full' },
261
- {
262
- path: '',
263
- component: RouterOutletComponent,
264
- canActivate: [AuthGuard, PermissionGuard, TenantManagementExtensionsGuard],
265
- children: [
266
- {
267
- path: 'tenants',
268
- component: ReplaceableRouteContainerComponent,
269
- data: {
270
- requiredPolicy: 'AbpTenantManagement.Tenants',
271
- replaceableComponent: {
272
- key: "TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */,
273
- defaultComponent: TenantsComponent,
274
- },
275
- },
276
- },
277
- ],
278
- },
279
- ];
280
- class TenantManagementRoutingModule {
281
- }
282
- TenantManagementRoutingModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
283
- TenantManagementRoutingModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] });
284
- TenantManagementRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
285
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementRoutingModule, decorators: [{
286
- type: NgModule,
287
- args: [{
288
- imports: [RouterModule.forChild(routes)],
289
- exports: [RouterModule],
290
- }]
259
+ const routes = [
260
+ { path: '', redirectTo: 'tenants', pathMatch: 'full' },
261
+ {
262
+ path: '',
263
+ component: RouterOutletComponent,
264
+ canActivate: mapToCanActivate([AuthGuard, PermissionGuard, TenantManagementExtensionsGuard]),
265
+ children: [
266
+ {
267
+ path: 'tenants',
268
+ component: ReplaceableRouteContainerComponent,
269
+ data: {
270
+ requiredPolicy: 'AbpTenantManagement.Tenants',
271
+ replaceableComponent: {
272
+ key: "TenantManagement.TenantsComponent" /* eTenantManagementComponents.Tenants */,
273
+ defaultComponent: TenantsComponent,
274
+ },
275
+ },
276
+ },
277
+ ],
278
+ },
279
+ ];
280
+ class TenantManagementRoutingModule {
281
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
282
+ static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
283
+ static { thisinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
284
+ }
285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementRoutingModule, decorators: [{
286
+ type: NgModule,
287
+ args: [{
288
+ imports: [RouterModule.forChild(routes)],
289
+ exports: [RouterModule],
290
+ }]
291
291
  }] });
292
292
 
293
- class TenantManagementModule {
294
- static forChild(options = {}) {
295
- return {
296
- ngModule: TenantManagementModule,
297
- providers: [
298
- {
299
- provide: TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,
300
- useValue: options.entityActionContributors,
301
- },
302
- {
303
- provide: TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS,
304
- useValue: options.toolbarActionContributors,
305
- },
306
- {
307
- provide: TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,
308
- useValue: options.entityPropContributors,
309
- },
310
- {
311
- provide: TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS,
312
- useValue: options.createFormPropContributors,
313
- },
314
- {
315
- provide: TENANT_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS,
316
- useValue: options.editFormPropContributors,
317
- },
318
- TenantManagementExtensionsGuard,
319
- ],
320
- };
321
- }
322
- static forLazy(options = {}) {
323
- return new LazyModuleFactory(TenantManagementModule.forChild(options));
324
- }
325
- }
326
- TenantManagementModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
327
- TenantManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementModule, declarations: [TenantsComponent], imports: [TenantManagementRoutingModule,
328
- NgxValidateCoreModule,
329
- CoreModule,
330
- ThemeSharedModule,
331
- NgbDropdownModule,
332
- FeatureManagementModule,
333
- UiExtensionsModule,
334
- PageModule], exports: [TenantsComponent] });
335
- TenantManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementModule, imports: [TenantManagementRoutingModule,
336
- NgxValidateCoreModule,
337
- CoreModule,
338
- ThemeSharedModule,
339
- NgbDropdownModule,
340
- FeatureManagementModule,
341
- UiExtensionsModule,
342
- PageModule] });
343
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantManagementModule, decorators: [{
344
- type: NgModule,
345
- args: [{
346
- declarations: [TenantsComponent],
347
- exports: [TenantsComponent],
348
- imports: [
349
- TenantManagementRoutingModule,
350
- NgxValidateCoreModule,
351
- CoreModule,
352
- ThemeSharedModule,
353
- NgbDropdownModule,
354
- FeatureManagementModule,
355
- UiExtensionsModule,
356
- PageModule,
357
- ],
358
- }]
293
+ class TenantManagementModule {
294
+ static forChild(options = {}) {
295
+ return {
296
+ ngModule: TenantManagementModule,
297
+ providers: [
298
+ {
299
+ provide: TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,
300
+ useValue: options.entityActionContributors,
301
+ },
302
+ {
303
+ provide: TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS,
304
+ useValue: options.toolbarActionContributors,
305
+ },
306
+ {
307
+ provide: TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,
308
+ useValue: options.entityPropContributors,
309
+ },
310
+ {
311
+ provide: TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS,
312
+ useValue: options.createFormPropContributors,
313
+ },
314
+ {
315
+ provide: TENANT_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS,
316
+ useValue: options.editFormPropContributors,
317
+ },
318
+ TenantManagementExtensionsGuard,
319
+ ],
320
+ };
321
+ }
322
+ static forLazy(options = {}) {
323
+ return new LazyModuleFactory(TenantManagementModule.forChild(options));
324
+ }
325
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
326
+ static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementModule, declarations: [TenantsComponent], imports: [TenantManagementRoutingModule,
327
+ NgxValidateCoreModule,
328
+ CoreModule,
329
+ ThemeSharedModule,
330
+ NgbDropdownModule,
331
+ FeatureManagementModule,
332
+ UiExtensionsModule,
333
+ PageModule], exports: [TenantsComponent] }); }
334
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementModule, imports: [TenantManagementRoutingModule,
335
+ NgxValidateCoreModule,
336
+ CoreModule,
337
+ ThemeSharedModule,
338
+ NgbDropdownModule,
339
+ FeatureManagementModule,
340
+ UiExtensionsModule,
341
+ PageModule] }); }
342
+ }
343
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TenantManagementModule, decorators: [{
344
+ type: NgModule,
345
+ args: [{
346
+ declarations: [TenantsComponent],
347
+ exports: [TenantsComponent],
348
+ imports: [
349
+ TenantManagementRoutingModule,
350
+ NgxValidateCoreModule,
351
+ CoreModule,
352
+ ThemeSharedModule,
353
+ NgbDropdownModule,
354
+ FeatureManagementModule,
355
+ UiExtensionsModule,
356
+ PageModule,
357
+ ],
358
+ }]
359
359
  }] });
360
360
 
361
- /**
362
- * Generated bundle index. Do not edit.
361
+ /**
362
+ * Generated bundle index. Do not edit.
363
363
  */
364
364
 
365
365
  export { DEFAULT_TENANT_MANAGEMENT_CREATE_FORM_PROPS, DEFAULT_TENANT_MANAGEMENT_EDIT_FORM_PROPS, DEFAULT_TENANT_MANAGEMENT_ENTITY_ACTIONS, DEFAULT_TENANT_MANAGEMENT_ENTITY_PROPS, DEFAULT_TENANT_MANAGEMENT_TOOLBAR_ACTIONS, TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS, TENANT_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS, TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS, TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS, TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS, TenantManagementExtensionsGuard, TenantManagementModule, TenantsComponent };