@abp/ng.feature-management 10.5.0-rc.4 → 10.6.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,10 +23,10 @@ class FeaturesService {
23
23
  body: input,
24
24
  }, { apiName: this.apiName });
25
25
  }
26
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FeaturesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
27
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FeaturesService, providedIn: 'root' }); }
26
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FeaturesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
27
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FeaturesService, providedIn: 'root' }); }
28
28
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FeaturesService, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FeaturesService, decorators: [{
30
30
  type: Injectable,
31
31
  args: [{
32
32
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"abp-ng.feature-management-proxy.mjs","sources":["../../../../packages/feature-management/proxy/src/lib/proxy/feature-management/features.service.ts","../../../../packages/feature-management/proxy/src/abp-ng.feature-management-proxy.ts"],"sourcesContent":["import type { GetFeatureListResultDto, UpdateFeaturesDto } from './models';\r\nimport { RestService } from '@abp/ng.core';\r\nimport { Injectable, inject } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class FeaturesService {\r\n private restService = inject(RestService);\r\n\r\n apiName = 'AbpFeatureManagement';\r\n\r\n delete = (providerName: string, providerKey: string) =>\r\n this.restService.request<any, void>(\r\n {\r\n method: 'DELETE',\r\n url: '/api/feature-management/features',\r\n params: { providerName, providerKey },\r\n },\r\n { apiName: this.apiName },\r\n );\r\n\r\n get = (providerName: string, providerKey: string) =>\r\n this.restService.request<any, GetFeatureListResultDto>(\r\n {\r\n method: 'GET',\r\n url: '/api/feature-management/features',\r\n params: { providerName, providerKey },\r\n },\r\n { apiName: this.apiName },\r\n );\r\n\r\n update = (providerName: string, providerKey: string, input: UpdateFeaturesDto) =>\r\n this.restService.request<any, void>(\r\n {\r\n method: 'PUT',\r\n url: '/api/feature-management/features',\r\n params: { providerName, providerKey },\r\n body: input,\r\n },\r\n { apiName: this.apiName },\r\n );\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,eAAe,CAAA;AAH5B,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QAEzC,IAAA,CAAA,OAAO,GAAG,sBAAsB;AAEhC,QAAA,IAAA,CAAA,MAAM,GAAG,CAAC,YAAoB,EAAE,WAAmB,KACjD,IAAI,CAAC,WAAW,CAAC,OAAO,CACtB;AACE,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,GAAG,EAAE,kCAAkC;AACvC,YAAA,MAAM,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE;SACtC,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAC1B;AAEH,QAAA,IAAA,CAAA,GAAG,GAAG,CAAC,YAAoB,EAAE,WAAmB,KAC9C,IAAI,CAAC,WAAW,CAAC,OAAO,CACtB;AACE,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,GAAG,EAAE,kCAAkC;AACvC,YAAA,MAAM,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE;SACtC,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAC1B;AAEH,QAAA,IAAA,CAAA,MAAM,GAAG,CAAC,YAAoB,EAAE,WAAmB,EAAE,KAAwB,KAC3E,IAAI,CAAC,WAAW,CAAC,OAAO,CACtB;AACE,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,GAAG,EAAE,kCAAkC;AACvC,YAAA,MAAM,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE;AACrC,YAAA,IAAI,EAAE,KAAK;SACZ,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAC1B;AACJ,IAAA;+GAnCY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFd,MAAM,EAAA,CAAA,CAAA;;4FAEP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;;;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"abp-ng.feature-management-proxy.mjs","sources":["../../../../packages/feature-management/proxy/src/lib/proxy/feature-management/features.service.ts","../../../../packages/feature-management/proxy/src/abp-ng.feature-management-proxy.ts"],"sourcesContent":["import type { GetFeatureListResultDto, UpdateFeaturesDto } from './models';\r\nimport { RestService } from '@abp/ng.core';\r\nimport { Injectable, inject } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class FeaturesService {\r\n private restService = inject(RestService);\r\n\r\n apiName = 'AbpFeatureManagement';\r\n\r\n delete = (providerName: string, providerKey: string) =>\r\n this.restService.request<any, void>(\r\n {\r\n method: 'DELETE',\r\n url: '/api/feature-management/features',\r\n params: { providerName, providerKey },\r\n },\r\n { apiName: this.apiName },\r\n );\r\n\r\n get = (providerName: string, providerKey: string) =>\r\n this.restService.request<any, GetFeatureListResultDto>(\r\n {\r\n method: 'GET',\r\n url: '/api/feature-management/features',\r\n params: { providerName, providerKey },\r\n },\r\n { apiName: this.apiName },\r\n );\r\n\r\n update = (providerName: string, providerKey: string, input: UpdateFeaturesDto) =>\r\n this.restService.request<any, void>(\r\n {\r\n method: 'PUT',\r\n url: '/api/feature-management/features',\r\n params: { providerName, providerKey },\r\n body: input,\r\n },\r\n { apiName: this.apiName },\r\n );\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,eAAe,CAAA;AAH5B,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QAEzC,IAAA,CAAA,OAAO,GAAG,sBAAsB;AAEhC,QAAA,IAAA,CAAA,MAAM,GAAG,CAAC,YAAoB,EAAE,WAAmB,KACjD,IAAI,CAAC,WAAW,CAAC,OAAO,CACtB;AACE,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,GAAG,EAAE,kCAAkC;AACvC,YAAA,MAAM,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE;SACtC,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAC1B;AAEH,QAAA,IAAA,CAAA,GAAG,GAAG,CAAC,YAAoB,EAAE,WAAmB,KAC9C,IAAI,CAAC,WAAW,CAAC,OAAO,CACtB;AACE,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,GAAG,EAAE,kCAAkC;AACvC,YAAA,MAAM,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE;SACtC,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAC1B;AAEH,QAAA,IAAA,CAAA,MAAM,GAAG,CAAC,YAAoB,EAAE,WAAmB,EAAE,KAAwB,KAC3E,IAAI,CAAC,WAAW,CAAC,OAAO,CACtB;AACE,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,GAAG,EAAE,kCAAkC;AACvC,YAAA,MAAM,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE;AACrC,YAAA,IAAI,EAAE,KAAK;SACZ,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAC1B;AACJ,IAAA;8GAnCY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFd,MAAM,EAAA,CAAA,CAAA;;2FAEP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;;;;;ACND;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, Renderer2, input, effect, Directive, DOCUMENT, output, signal, Component, provideAppInitializer, makeEnvironmentProviders, NgModule } from '@angular/core';
2
+ import { inject, ElementRef, Renderer2, input, effect, Directive, DOCUMENT, output, signal, ChangeDetectionStrategy, Component, provideAppInitializer, makeEnvironmentProviders, NgModule } from '@angular/core';
3
3
  import { NgTemplateOutlet } from '@angular/common';
4
4
  import * as i1 from '@angular/forms';
5
5
  import { FormsModule } from '@angular/forms';
@@ -31,10 +31,10 @@ class FreeTextInputDirective {
31
31
  const type = INPUT_TYPES[validatorType] ?? INPUT_TYPES['default'];
32
32
  this.renderer.setAttribute(this.elRef.nativeElement, 'type', type);
33
33
  }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FreeTextInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
35
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: FreeTextInputDirective, isStandalone: true, selector: "input[abpFeatureManagementFreeText]", inputs: { feature: { classPropertyName: "feature", publicName: "abpFeatureManagementFreeText", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["inputAbpFeatureManagementFreeText"], ngImport: i0 }); }
34
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FreeTextInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
35
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: FreeTextInputDirective, isStandalone: true, selector: "input[abpFeatureManagementFreeText]", inputs: { feature: { classPropertyName: "feature", publicName: "abpFeatureManagementFreeText", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["inputAbpFeatureManagementFreeText"], ngImport: i0 }); }
36
36
  }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FreeTextInputDirective, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FreeTextInputDirective, decorators: [{
38
38
  type: Directive,
39
39
  args: [{
40
40
  selector: 'input[abpFeatureManagementFreeText]',
@@ -72,18 +72,28 @@ class FeatureManagementComponent {
72
72
  this.confirmationService = inject(ConfirmationService);
73
73
  this.document = inject(DOCUMENT);
74
74
  // Signal inputs
75
- this.providerKey = input(undefined, ...(ngDevMode ? [{ debugName: "providerKey" }] : /* istanbul ignore next */ []));
76
- this.providerName = input(undefined, ...(ngDevMode ? [{ debugName: "providerName" }] : /* istanbul ignore next */ []));
77
- this.providerTitle = input(undefined, ...(ngDevMode ? [{ debugName: "providerTitle" }] : /* istanbul ignore next */ []));
75
+ this.providerKey = input(undefined, /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "providerKey" }] : /* istanbul ignore next */ []));
77
+ this.providerName = input(undefined, /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "providerName" }] : /* istanbul ignore next */ []));
79
+ this.providerTitle = input(undefined, /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "providerTitle" }] : /* istanbul ignore next */ []));
78
81
  this.visibleInput = input(false, { ...(ngDevMode ? { debugName: "visibleInput" } : /* istanbul ignore next */ {}), alias: 'visible' });
79
82
  // Output signals
80
83
  this.visibleChange = output();
81
84
  // Internal state
82
- this._visible = signal(false, ...(ngDevMode ? [{ debugName: "_visible" }] : /* istanbul ignore next */ []));
83
- this.groups = [];
85
+ this._visible = signal(false, /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "_visible" }] : /* istanbul ignore next */ []));
87
+ this.selectedGroupDisplayName = signal(undefined, /* @ts-ignore */
88
+ ...(ngDevMode ? [{ debugName: "selectedGroupDisplayName" }] : /* istanbul ignore next */ []));
89
+ this.groups = signal([], /* @ts-ignore */
90
+ ...(ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []));
91
+ this.features = signal({}, /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "features" }] : /* istanbul ignore next */ []));
84
93
  this.valueTypes = ValueTypes;
85
94
  this.defaultProviderName = DEFAULT_PROVIDER_NAME;
86
- this.modalBusy = false;
95
+ this.modalBusy = signal(false, /* @ts-ignore */
96
+ ...(ngDevMode ? [{ debugName: "modalBusy" }] : /* istanbul ignore next */ []));
87
97
  // Sync visible input to internal signal
88
98
  effect(() => {
89
99
  const inputValue = this.visibleInput();
@@ -105,20 +115,21 @@ class FeatureManagementComponent {
105
115
  this.service.get(this.providerName(), this.providerKey()).subscribe(res => {
106
116
  if (!res.groups?.length)
107
117
  return;
108
- this.groups = res.groups.map(({ name, displayName }) => ({ name, displayName }));
109
- this.selectedGroupDisplayName = this.groups[0].displayName;
110
- this.features = res.groups.reduce((acc, val) => ({
118
+ const groups = res.groups.map(({ name, displayName }) => ({ name, displayName }));
119
+ this.groups.set(groups);
120
+ this.selectedGroupDisplayName.set(groups[0].displayName);
121
+ this.features.set(res.groups.reduce((acc, val) => ({
111
122
  ...acc,
112
123
  [val.name]: mapFeatures(val.features, this.document.body?.dir),
113
- }), {});
124
+ }), {}));
114
125
  });
115
126
  }
116
127
  save() {
117
- if (this.modalBusy)
128
+ if (this.modalBusy())
118
129
  return;
119
130
  const changedFeatures = [];
120
- Object.keys(this.features).forEach(key => {
121
- this.features[key].forEach(feature => {
131
+ Object.keys(this.features()).forEach(key => {
132
+ this.features()[key].forEach(feature => {
122
133
  if (feature.value !== feature.initialValue)
123
134
  changedFeatures.push({ name: feature.name, value: `${feature.value}` });
124
135
  });
@@ -127,10 +138,10 @@ class FeatureManagementComponent {
127
138
  this.visible = false;
128
139
  return;
129
140
  }
130
- this.modalBusy = true;
141
+ this.modalBusy.set(true);
131
142
  this.service
132
143
  .update(this.providerName(), this.providerKey(), { features: changedFeatures })
133
- .pipe(finalize(() => (this.modalBusy = false)))
144
+ .pipe(finalize(() => this.modalBusy.set(false)))
134
145
  .subscribe(() => {
135
146
  this.visible = false;
136
147
  this.toasterService.success('AbpUi::SavedSuccessfully');
@@ -164,8 +175,14 @@ class FeatureManagementComponent {
164
175
  this.uncheckToggleDescendants(feature);
165
176
  }
166
177
  }
178
+ getSelectionItems(feature) {
179
+ if (feature.valueType?.name !== ValueTypes.SelectionStringValueType) {
180
+ return [];
181
+ }
182
+ return feature.valueType.itemSource?.items ?? [];
183
+ }
167
184
  isParentDisabled(parentName, groupName, provider) {
168
- const children = this.features[groupName]?.filter(f => f.parentName === parentName);
185
+ const children = this.features()[groupName]?.filter(f => f.parentName === parentName);
169
186
  const providerNameValue = this.providerName();
170
187
  if (children?.length) {
171
188
  return children.some(child => {
@@ -211,17 +228,18 @@ class FeatureManagementComponent {
211
228
  return this.getCurrentGroup().filter(f => f.valueType.name === type && f.parentName === feature.name);
212
229
  }
213
230
  getCurrentGroup() {
214
- return this.features[this.selectedGroupDisplayName] ?? [];
231
+ const selectedGroup = this.selectedGroupDisplayName();
232
+ return selectedGroup ? this.features()[selectedGroup] ?? [] : [];
215
233
  }
216
234
  setFeatureValue(feature, val) {
217
235
  feature.value = val;
218
236
  }
219
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FeatureManagementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
220
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: FeatureManagementComponent, isStandalone: true, selector: "abp-feature-management", inputs: { providerKey: { classPropertyName: "providerKey", publicName: "providerKey", isSignal: true, isRequired: false, transformFunction: null }, providerName: { classPropertyName: "providerName", publicName: "providerName", isSignal: true, isRequired: false, transformFunction: null }, providerTitle: { classPropertyName: "providerTitle", publicName: "providerTitle", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange" }, exportAs: ["abpFeatureManagement"], ngImport: i0, template: "@if (visible) {\r\n<abp-modal [(visible)]=\"visible\" [busy]=\"modalBusy\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ 'AbpFeatureManagement::Features' | abpLocalization }}\r\n @if (providerTitle()) {\r\n - {{ providerTitle() }}\r\n }\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"row\">\r\n @if (groups.length) {\r\n <div ngTabs orientation=\"vertical\" class=\"row\">\r\n <div class=\"col-md-4\">\r\n <div ngTabList orientation=\"vertical\" selectionMode=\"follow\" [(selectedTab)]=\"selectedGroupDisplayName\" class=\"nav nav-pills flex-column\">\r\n @for (group of groups; track group.name) {\r\n <button ngTab #tab=\"ngTab\" type=\"button\" [value]=\"group.displayName\" class=\"nav-link text-start\" [class.active]=\"tab.selected()\">\r\n {{ group.displayName }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <ng-template #descTmp let-description>\r\n @if (description) {\r\n <small class=\"d-block form-text text-muted\">{{ description }}</small>\r\n }\r\n </ng-template>\r\n\r\n <div class=\"col-md-8\">\r\n @for (group of groups; track group.name) {\r\n <div ngTabPanel [value]=\"group.displayName\">\r\n <ng-template ngTabContent>\r\n <h4>{{ selectedGroupDisplayName }}</h4>\r\n <hr class=\"mt-2 mb-3\" />\r\n\r\n @for (feature of features[group.name]; track feature.id || i; let i = $index) {\r\n @let provider = feature.provider.name;\r\n @let isFeatureDisabled = !feature.parentName ? isParentDisabled(feature.name, group.name, provider) :\r\n (provider !== providerName() && provider !== defaultProviderName);\r\n\r\n <div class=\"mt-2\" [style]=\"feature.style\" (keyup.enter)=\"save()\">\r\n @switch (feature.valueType?.name) {\r\n @case (valueTypes.ToggleStringValueType) {\r\n <div class=\"form-check\" [class.px-4]=\"!!feature.parentName\">\r\n <input class=\"form-check-input\" type=\"checkbox\" [id]=\"feature.name\" [(ngModel)]=\"feature.value\"\r\n (ngModelChange)=\"onCheckboxClick($event, feature)\" [disabled]=\"isFeatureDisabled\" />\r\n\r\n <label class=\"form-check-label\" [htmlFor]=\"feature.name\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <ng-container *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"></ng-container>\r\n </div>\r\n }\r\n @case (valueTypes.FreeTextStringValueType) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <input class=\"form-control\" type=\"text\" [id]=\"feature.name\" [(ngModel)]=\"feature.value\"\r\n [abpFeatureManagementFreeText]=\"feature\" [disabled]=\"isFeatureDisabled\" />\r\n\r\n <ng-container *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"></ng-container>\r\n </div>\r\n }\r\n @case (valueTypes.SelectionStringValueType) {\r\n @if (feature.valueType.itemSource?.items?.length) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <select class=\"form-select\" [id]=\"feature.name\" [(ngModel)]=\"feature.value\"\r\n [disabled]=\"isFeatureDisabled\">\r\n @for (\r\n item of feature.valueType.itemSource?.items;\r\n track item.value\r\n ) {\r\n <option [ngValue]=\"item.value\">\r\n {{\r\n item.displayText?.resourceName +\r\n '::' +\r\n item.displayText?.name | abpLocalization\r\n }}\r\n </option>\r\n }\r\n </select>\r\n <ng-container *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n ></ng-container>\r\n </div>\r\n }\r\n }\r\n @default {\r\n {{ feature.displayName }}\r\n }\r\n }\r\n </div>\r\n }\r\n </ng-template>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (!groups.length) {\r\n <div class=\"col\">\r\n {{ 'AbpFeatureManagement::NoFeatureFoundMessage' | abpLocalization }}\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-link\">\r\n {{ 'AbpFeatureManagement::Cancel' | abpLocalization }}\r\n </button>\r\n\r\n @if (groups.length) {\r\n <abp-button buttonClass=\"btn btn-outline-primary\" [disabled]=\"modalBusy\" (click)=\"resetToDefault()\"\r\n aria-hidden=\"true\">\r\n {{ 'AbpFeatureManagement::ResetToDefault' | abpLocalization }}\r\n </abp-button>\r\n }\r\n\r\n @if (groups.length) {\r\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"modalBusy\" (click)=\"save()\" aria-hidden=\"true\">\r\n {{ 'AbpFeatureManagement::Save' | abpLocalization }}\r\n </abp-button>\r\n }\r\n </ng-template>\r\n</abp-modal>\r\n}", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.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: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: Tabs, selector: "[ngTabs]", exportAs: ["ngTabs"] }, { kind: "directive", type: TabList, selector: "[ngTabList]", inputs: ["orientation", "wrap", "softDisabled", "focusMode", "selectionMode", "selectedTab", "disabled"], outputs: ["selectedTabChange"], exportAs: ["ngTabList"] }, { kind: "directive", type: Tab, selector: "[ngTab]", inputs: ["id", "disabled", "value"], exportAs: ["ngTab"] }, { kind: "directive", type: TabPanel, selector: "[ngTabPanel]", inputs: ["id", "value"], exportAs: ["ngTabPanel"] }, { kind: "directive", type: TabContent, selector: "ng-template[ngTabContent]", exportAs: ["ngTabContent"] }, { kind: "directive", type: FreeTextInputDirective, selector: "input[abpFeatureManagementFreeText]", inputs: ["abpFeatureManagementFreeText"], exportAs: ["inputAbpFeatureManagementFreeText"] }, { kind: "directive", type: ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
237
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FeatureManagementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
238
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FeatureManagementComponent, isStandalone: true, selector: "abp-feature-management", inputs: { providerKey: { classPropertyName: "providerKey", publicName: "providerKey", isSignal: true, isRequired: false, transformFunction: null }, providerName: { classPropertyName: "providerName", publicName: "providerName", isSignal: true, isRequired: false, transformFunction: null }, providerTitle: { classPropertyName: "providerTitle", publicName: "providerTitle", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange" }, exportAs: ["abpFeatureManagement"], ngImport: i0, template: "@if (visible) {\r\n <abp-modal [(visible)]=\"visible\" [busy]=\"modalBusy()\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ 'AbpFeatureManagement::Features' | abpLocalization }}\r\n @if (providerTitle()) {\r\n - {{ providerTitle() }}\r\n }\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"row\">\r\n @if (groups().length) {\r\n <div ngTabs orientation=\"vertical\" class=\"row\">\r\n <div class=\"col-md-4\">\r\n <div\r\n ngTabList\r\n orientation=\"vertical\"\r\n selectionMode=\"follow\"\r\n [(selectedTab)]=\"selectedGroupDisplayName\"\r\n class=\"nav nav-pills flex-column\"\r\n >\r\n @for (group of groups(); track group.name) {\r\n <button\r\n ngTab\r\n #tab=\"ngTab\"\r\n type=\"button\"\r\n [value]=\"group.displayName\"\r\n class=\"nav-link text-start\"\r\n [class.active]=\"tab.selected()\"\r\n >\r\n {{ group.displayName }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <ng-template #descTmp let-description>\r\n @if (description) {\r\n <small class=\"d-block form-text text-muted\">{{ description }}</small>\r\n }\r\n </ng-template>\r\n\r\n <div class=\"col-md-8\">\r\n @for (group of groups(); track group.name) {\r\n <div ngTabPanel [value]=\"group.displayName\">\r\n <ng-template ngTabContent>\r\n <h4>{{ selectedGroupDisplayName() }}</h4>\r\n <hr class=\"mt-2 mb-3\" />\r\n\r\n @for (\r\n feature of features()[group.name];\r\n track feature.name || i;\r\n let i = $index\r\n ) {\r\n @let provider = feature.provider.name;\r\n @let isFeatureDisabled =\r\n !feature.parentName\r\n ? isParentDisabled(feature.name, group.name, provider)\r\n : provider !== providerName() && provider !== defaultProviderName;\r\n\r\n <div class=\"mt-2\" [style]=\"feature.style\" (keyup.enter)=\"save()\">\r\n @switch (feature.valueType?.name) {\r\n @case (valueTypes.ToggleStringValueType) {\r\n <div class=\"form-check\" [class.px-4]=\"!!feature.parentName\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n [id]=\"feature.name\"\r\n [(ngModel)]=\"feature.value\"\r\n (ngModelChange)=\"onCheckboxClick($event, feature)\"\r\n [disabled]=\"isFeatureDisabled\"\r\n />\r\n\r\n <label class=\"form-check-label\" [htmlFor]=\"feature.name\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n />\r\n </div>\r\n }\r\n @case (valueTypes.FreeTextStringValueType) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <input\r\n class=\"form-control\"\r\n type=\"text\"\r\n [id]=\"feature.name\"\r\n [(ngModel)]=\"feature.value\"\r\n [abpFeatureManagementFreeText]=\"feature\"\r\n [disabled]=\"isFeatureDisabled\"\r\n />\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n />\r\n </div>\r\n }\r\n @case (valueTypes.SelectionStringValueType) {\r\n @if (getSelectionItems(feature).length) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <select\r\n class=\"form-select\"\r\n [id]=\"feature.name\"\r\n [(ngModel)]=\"feature.value\"\r\n [disabled]=\"isFeatureDisabled\"\r\n >\r\n @for (item of getSelectionItems(feature); track item.value) {\r\n <option [ngValue]=\"item.value\">\r\n {{\r\n item.displayText?.resourceName +\r\n '::' +\r\n item.displayText?.name | abpLocalization\r\n }}\r\n </option>\r\n }\r\n </select>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n @default {\r\n {{ feature.displayName }}\r\n }\r\n }\r\n </div>\r\n }\r\n </ng-template>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (!groups().length) {\r\n <div class=\"col\">\r\n {{ 'AbpFeatureManagement::NoFeatureFoundMessage' | abpLocalization }}\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-link\">\r\n {{ 'AbpFeatureManagement::Cancel' | abpLocalization }}\r\n </button>\r\n\r\n @if (groups().length) {\r\n <abp-button\r\n buttonClass=\"btn btn-outline-primary\"\r\n [disabled]=\"modalBusy()\"\r\n (click)=\"resetToDefault()\"\r\n aria-hidden=\"true\"\r\n >\r\n {{ 'AbpFeatureManagement::ResetToDefault' | abpLocalization }}\r\n </abp-button>\r\n }\r\n\r\n @if (groups().length) {\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n [disabled]=\"modalBusy()\"\r\n (click)=\"save()\"\r\n aria-hidden=\"true\"\r\n >\r\n {{ 'AbpFeatureManagement::Save' | abpLocalization }}\r\n </abp-button>\r\n }\r\n </ng-template>\r\n </abp-modal>\r\n}\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: Tabs, selector: "[ngTabs]", exportAs: ["ngTabs"] }, { kind: "directive", type: TabList, selector: "[ngTabList]", inputs: ["orientation", "wrap", "softDisabled", "focusMode", "selectionMode", "selectedTab", "disabled"], outputs: ["selectedTabChange"], exportAs: ["ngTabList"] }, { kind: "directive", type: Tab, selector: "[ngTab]", inputs: ["id", "disabled", "value"], exportAs: ["ngTab"] }, { kind: "directive", type: TabPanel, selector: "[ngTabPanel]", inputs: ["id", "value"], exportAs: ["ngTabPanel"] }, { kind: "directive", type: TabContent, selector: "ng-template[ngTabContent]", exportAs: ["ngTabContent"] }, { kind: "directive", type: FreeTextInputDirective, selector: "input[abpFeatureManagementFreeText]", inputs: ["abpFeatureManagementFreeText"], exportAs: ["inputAbpFeatureManagementFreeText"] }, { kind: "directive", type: ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
221
239
  }
222
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FeatureManagementComponent, decorators: [{
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FeatureManagementComponent, decorators: [{
223
241
  type: Component,
224
- args: [{ selector: 'abp-feature-management', exportAs: 'abpFeatureManagement', imports: [
242
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'abp-feature-management', exportAs: 'abpFeatureManagement', imports: [
225
243
  NgTemplateOutlet,
226
244
  ButtonComponent,
227
245
  ModalComponent,
@@ -234,7 +252,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
234
252
  TabContent,
235
253
  FreeTextInputDirective,
236
254
  ModalCloseDirective,
237
- ], template: "@if (visible) {\r\n<abp-modal [(visible)]=\"visible\" [busy]=\"modalBusy\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ 'AbpFeatureManagement::Features' | abpLocalization }}\r\n @if (providerTitle()) {\r\n - {{ providerTitle() }}\r\n }\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"row\">\r\n @if (groups.length) {\r\n <div ngTabs orientation=\"vertical\" class=\"row\">\r\n <div class=\"col-md-4\">\r\n <div ngTabList orientation=\"vertical\" selectionMode=\"follow\" [(selectedTab)]=\"selectedGroupDisplayName\" class=\"nav nav-pills flex-column\">\r\n @for (group of groups; track group.name) {\r\n <button ngTab #tab=\"ngTab\" type=\"button\" [value]=\"group.displayName\" class=\"nav-link text-start\" [class.active]=\"tab.selected()\">\r\n {{ group.displayName }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <ng-template #descTmp let-description>\r\n @if (description) {\r\n <small class=\"d-block form-text text-muted\">{{ description }}</small>\r\n }\r\n </ng-template>\r\n\r\n <div class=\"col-md-8\">\r\n @for (group of groups; track group.name) {\r\n <div ngTabPanel [value]=\"group.displayName\">\r\n <ng-template ngTabContent>\r\n <h4>{{ selectedGroupDisplayName }}</h4>\r\n <hr class=\"mt-2 mb-3\" />\r\n\r\n @for (feature of features[group.name]; track feature.id || i; let i = $index) {\r\n @let provider = feature.provider.name;\r\n @let isFeatureDisabled = !feature.parentName ? isParentDisabled(feature.name, group.name, provider) :\r\n (provider !== providerName() && provider !== defaultProviderName);\r\n\r\n <div class=\"mt-2\" [style]=\"feature.style\" (keyup.enter)=\"save()\">\r\n @switch (feature.valueType?.name) {\r\n @case (valueTypes.ToggleStringValueType) {\r\n <div class=\"form-check\" [class.px-4]=\"!!feature.parentName\">\r\n <input class=\"form-check-input\" type=\"checkbox\" [id]=\"feature.name\" [(ngModel)]=\"feature.value\"\r\n (ngModelChange)=\"onCheckboxClick($event, feature)\" [disabled]=\"isFeatureDisabled\" />\r\n\r\n <label class=\"form-check-label\" [htmlFor]=\"feature.name\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <ng-container *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"></ng-container>\r\n </div>\r\n }\r\n @case (valueTypes.FreeTextStringValueType) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <input class=\"form-control\" type=\"text\" [id]=\"feature.name\" [(ngModel)]=\"feature.value\"\r\n [abpFeatureManagementFreeText]=\"feature\" [disabled]=\"isFeatureDisabled\" />\r\n\r\n <ng-container *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"></ng-container>\r\n </div>\r\n }\r\n @case (valueTypes.SelectionStringValueType) {\r\n @if (feature.valueType.itemSource?.items?.length) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <select class=\"form-select\" [id]=\"feature.name\" [(ngModel)]=\"feature.value\"\r\n [disabled]=\"isFeatureDisabled\">\r\n @for (\r\n item of feature.valueType.itemSource?.items;\r\n track item.value\r\n ) {\r\n <option [ngValue]=\"item.value\">\r\n {{\r\n item.displayText?.resourceName +\r\n '::' +\r\n item.displayText?.name | abpLocalization\r\n }}\r\n </option>\r\n }\r\n </select>\r\n <ng-container *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n ></ng-container>\r\n </div>\r\n }\r\n }\r\n @default {\r\n {{ feature.displayName }}\r\n }\r\n }\r\n </div>\r\n }\r\n </ng-template>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (!groups.length) {\r\n <div class=\"col\">\r\n {{ 'AbpFeatureManagement::NoFeatureFoundMessage' | abpLocalization }}\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-link\">\r\n {{ 'AbpFeatureManagement::Cancel' | abpLocalization }}\r\n </button>\r\n\r\n @if (groups.length) {\r\n <abp-button buttonClass=\"btn btn-outline-primary\" [disabled]=\"modalBusy\" (click)=\"resetToDefault()\"\r\n aria-hidden=\"true\">\r\n {{ 'AbpFeatureManagement::ResetToDefault' | abpLocalization }}\r\n </abp-button>\r\n }\r\n\r\n @if (groups.length) {\r\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"modalBusy\" (click)=\"save()\" aria-hidden=\"true\">\r\n {{ 'AbpFeatureManagement::Save' | abpLocalization }}\r\n </abp-button>\r\n }\r\n </ng-template>\r\n</abp-modal>\r\n}" }]
255
+ ], template: "@if (visible) {\r\n <abp-modal [(visible)]=\"visible\" [busy]=\"modalBusy()\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ 'AbpFeatureManagement::Features' | abpLocalization }}\r\n @if (providerTitle()) {\r\n - {{ providerTitle() }}\r\n }\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"row\">\r\n @if (groups().length) {\r\n <div ngTabs orientation=\"vertical\" class=\"row\">\r\n <div class=\"col-md-4\">\r\n <div\r\n ngTabList\r\n orientation=\"vertical\"\r\n selectionMode=\"follow\"\r\n [(selectedTab)]=\"selectedGroupDisplayName\"\r\n class=\"nav nav-pills flex-column\"\r\n >\r\n @for (group of groups(); track group.name) {\r\n <button\r\n ngTab\r\n #tab=\"ngTab\"\r\n type=\"button\"\r\n [value]=\"group.displayName\"\r\n class=\"nav-link text-start\"\r\n [class.active]=\"tab.selected()\"\r\n >\r\n {{ group.displayName }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <ng-template #descTmp let-description>\r\n @if (description) {\r\n <small class=\"d-block form-text text-muted\">{{ description }}</small>\r\n }\r\n </ng-template>\r\n\r\n <div class=\"col-md-8\">\r\n @for (group of groups(); track group.name) {\r\n <div ngTabPanel [value]=\"group.displayName\">\r\n <ng-template ngTabContent>\r\n <h4>{{ selectedGroupDisplayName() }}</h4>\r\n <hr class=\"mt-2 mb-3\" />\r\n\r\n @for (\r\n feature of features()[group.name];\r\n track feature.name || i;\r\n let i = $index\r\n ) {\r\n @let provider = feature.provider.name;\r\n @let isFeatureDisabled =\r\n !feature.parentName\r\n ? isParentDisabled(feature.name, group.name, provider)\r\n : provider !== providerName() && provider !== defaultProviderName;\r\n\r\n <div class=\"mt-2\" [style]=\"feature.style\" (keyup.enter)=\"save()\">\r\n @switch (feature.valueType?.name) {\r\n @case (valueTypes.ToggleStringValueType) {\r\n <div class=\"form-check\" [class.px-4]=\"!!feature.parentName\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n [id]=\"feature.name\"\r\n [(ngModel)]=\"feature.value\"\r\n (ngModelChange)=\"onCheckboxClick($event, feature)\"\r\n [disabled]=\"isFeatureDisabled\"\r\n />\r\n\r\n <label class=\"form-check-label\" [htmlFor]=\"feature.name\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n />\r\n </div>\r\n }\r\n @case (valueTypes.FreeTextStringValueType) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <input\r\n class=\"form-control\"\r\n type=\"text\"\r\n [id]=\"feature.name\"\r\n [(ngModel)]=\"feature.value\"\r\n [abpFeatureManagementFreeText]=\"feature\"\r\n [disabled]=\"isFeatureDisabled\"\r\n />\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n />\r\n </div>\r\n }\r\n @case (valueTypes.SelectionStringValueType) {\r\n @if (getSelectionItems(feature).length) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <select\r\n class=\"form-select\"\r\n [id]=\"feature.name\"\r\n [(ngModel)]=\"feature.value\"\r\n [disabled]=\"isFeatureDisabled\"\r\n >\r\n @for (item of getSelectionItems(feature); track item.value) {\r\n <option [ngValue]=\"item.value\">\r\n {{\r\n item.displayText?.resourceName +\r\n '::' +\r\n item.displayText?.name | abpLocalization\r\n }}\r\n </option>\r\n }\r\n </select>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n @default {\r\n {{ feature.displayName }}\r\n }\r\n }\r\n </div>\r\n }\r\n </ng-template>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (!groups().length) {\r\n <div class=\"col\">\r\n {{ 'AbpFeatureManagement::NoFeatureFoundMessage' | abpLocalization }}\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-link\">\r\n {{ 'AbpFeatureManagement::Cancel' | abpLocalization }}\r\n </button>\r\n\r\n @if (groups().length) {\r\n <abp-button\r\n buttonClass=\"btn btn-outline-primary\"\r\n [disabled]=\"modalBusy()\"\r\n (click)=\"resetToDefault()\"\r\n aria-hidden=\"true\"\r\n >\r\n {{ 'AbpFeatureManagement::ResetToDefault' | abpLocalization }}\r\n </abp-button>\r\n }\r\n\r\n @if (groups().length) {\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n [disabled]=\"modalBusy()\"\r\n (click)=\"save()\"\r\n aria-hidden=\"true\"\r\n >\r\n {{ 'AbpFeatureManagement::Save' | abpLocalization }}\r\n </abp-button>\r\n }\r\n </ng-template>\r\n </abp-modal>\r\n}\r\n" }]
238
256
  }], ctorParameters: () => [], propDecorators: { providerKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "providerKey", required: false }] }], providerName: [{ type: i0.Input, args: [{ isSignal: true, alias: "providerName", required: false }] }], providerTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "providerTitle", required: false }] }], visibleInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }], visibleChange: [{ type: i0.Output, args: ["visibleChange"] }] } });
239
257
  function mapFeatures(features, dir) {
240
258
  const margin = `margin-${dir === 'rtl' ? 'right' : 'left'}.px`;
@@ -261,12 +279,12 @@ class FeatureManagementTabComponent {
261
279
  openFeaturesModal() {
262
280
  this.visibleFeatures = true;
263
281
  }
264
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FeatureManagementTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
265
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: FeatureManagementTabComponent, isStandalone: true, selector: "abp-feature-management-tab", ngImport: i0, template: "<p class=\"pt-2 text-wrap\">{{ 'AbpFeatureManagement::ManageHostFeaturesText' | abpLocalization }}</p>\r\n\r\n<button class=\"btn btn-primary\" type=\"button\" (click)=\"openFeaturesModal()\">\r\n <i class=\"me-1 fa fa-cog\" aria-hidden=\"true\"></i>\r\n {{ 'AbpFeatureManagement::ManageHostFeatures' | abpLocalization }}\r\n</button>\r\n@if (visibleFeatures) {\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: onVisibleFeaturesChange },\r\n componentKey: 'FeatureManagement.FeatureManagementComponent'\r\n }\"\r\n [(visible)]=\"visibleFeatures\"\r\n providerName=\"T\"\r\n [providerKey]=\"providerKey\"\r\n >\r\n </abp-feature-management>\r\n}\r\n", dependencies: [{ kind: "directive", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: FeatureManagementComponent, selector: "abp-feature-management", inputs: ["providerKey", "providerName", "providerTitle", "visible"], outputs: ["visibleChange"], exportAs: ["abpFeatureManagement"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
282
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FeatureManagementTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
283
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FeatureManagementTabComponent, isStandalone: true, selector: "abp-feature-management-tab", ngImport: i0, template: "<p class=\"pt-2 text-wrap\">{{ 'AbpFeatureManagement::ManageHostFeaturesText' | abpLocalization }}</p>\r\n\r\n<button class=\"btn btn-primary\" type=\"button\" (click)=\"openFeaturesModal()\">\r\n <i class=\"me-1 fa fa-cog\" aria-hidden=\"true\"></i>\r\n {{ 'AbpFeatureManagement::ManageHostFeatures' | abpLocalization }}\r\n</button>\r\n@if (visibleFeatures) {\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: onVisibleFeaturesChange },\r\n componentKey: 'FeatureManagement.FeatureManagementComponent'\r\n }\"\r\n [(visible)]=\"visibleFeatures\"\r\n providerName=\"T\"\r\n [providerKey]=\"providerKey\"\r\n >\r\n </abp-feature-management>\r\n}\r\n", dependencies: [{ kind: "directive", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: FeatureManagementComponent, selector: "abp-feature-management", inputs: ["providerKey", "providerName", "providerTitle", "visible"], outputs: ["visibleChange"], exportAs: ["abpFeatureManagement"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
266
284
  }
267
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FeatureManagementTabComponent, decorators: [{
285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FeatureManagementTabComponent, decorators: [{
268
286
  type: Component,
269
- args: [{ selector: 'abp-feature-management-tab', imports: [ReplaceableTemplateDirective, LocalizationPipe, FeatureManagementComponent], template: "<p class=\"pt-2 text-wrap\">{{ 'AbpFeatureManagement::ManageHostFeaturesText' | abpLocalization }}</p>\r\n\r\n<button class=\"btn btn-primary\" type=\"button\" (click)=\"openFeaturesModal()\">\r\n <i class=\"me-1 fa fa-cog\" aria-hidden=\"true\"></i>\r\n {{ 'AbpFeatureManagement::ManageHostFeatures' | abpLocalization }}\r\n</button>\r\n@if (visibleFeatures) {\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: onVisibleFeaturesChange },\r\n componentKey: 'FeatureManagement.FeatureManagementComponent'\r\n }\"\r\n [(visible)]=\"visibleFeatures\"\r\n providerName=\"T\"\r\n [providerKey]=\"providerKey\"\r\n >\r\n </abp-feature-management>\r\n}\r\n" }]
287
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'abp-feature-management-tab', imports: [ReplaceableTemplateDirective, LocalizationPipe, FeatureManagementComponent], template: "<p class=\"pt-2 text-wrap\">{{ 'AbpFeatureManagement::ManageHostFeaturesText' | abpLocalization }}</p>\r\n\r\n<button class=\"btn btn-primary\" type=\"button\" (click)=\"openFeaturesModal()\">\r\n <i class=\"me-1 fa fa-cog\" aria-hidden=\"true\"></i>\r\n {{ 'AbpFeatureManagement::ManageHostFeatures' | abpLocalization }}\r\n</button>\r\n@if (visibleFeatures) {\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: onVisibleFeaturesChange },\r\n componentKey: 'FeatureManagement.FeatureManagementComponent'\r\n }\"\r\n [(visible)]=\"visibleFeatures\"\r\n providerName=\"T\"\r\n [providerKey]=\"providerKey\"\r\n >\r\n </abp-feature-management>\r\n}\r\n" }]
270
288
  }] });
271
289
 
272
290
  const FEATURE_MANAGEMENT_SETTINGS_PROVIDERS = [
@@ -307,16 +325,16 @@ class FeatureManagementModule {
307
325
  providers: [provideFeatureManagementConfig()],
308
326
  };
309
327
  }
310
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FeatureManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
311
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.17", ngImport: i0, type: FeatureManagementModule, imports: [FeatureManagementComponent,
328
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FeatureManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
329
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: FeatureManagementModule, imports: [FeatureManagementComponent,
312
330
  FreeTextInputDirective,
313
331
  FeatureManagementTabComponent], exports: [FeatureManagementComponent,
314
332
  FreeTextInputDirective,
315
333
  FeatureManagementTabComponent] }); }
316
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FeatureManagementModule, imports: [FeatureManagementComponent,
334
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FeatureManagementModule, imports: [FeatureManagementComponent,
317
335
  FeatureManagementTabComponent] }); }
318
336
  }
319
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: FeatureManagementModule, decorators: [{
337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FeatureManagementModule, decorators: [{
320
338
  type: NgModule,
321
339
  args: [{
322
340
  imports: [...FEATURE_MANAGEMENT_EXPORTS],
@@ -1 +1 @@
1
- {"version":3,"file":"abp-ng.feature-management.mjs","sources":["../../../../packages/feature-management/src/lib/directives/free-text-input.directive.ts","../../../../packages/feature-management/src/lib/components/feature-management/feature-management.component.ts","../../../../packages/feature-management/src/lib/components/feature-management/feature-management.component.html","../../../../packages/feature-management/src/lib/components/feature-management-tab/feature-management-tab.component.ts","../../../../packages/feature-management/src/lib/components/feature-management-tab/feature-management-tab.component.html","../../../../packages/feature-management/src/lib/providers/feature-management-settings.provider.ts","../../../../packages/feature-management/src/lib/providers/feature-management-config.provider.ts","../../../../packages/feature-management/src/lib/feature-management.module.ts","../../../../packages/feature-management/src/abp-ng.feature-management.ts"],"sourcesContent":["import { Directive, effect, inject, input, ElementRef, Renderer2 } from '@angular/core';\r\n\r\n// TODO: improve this type\r\nexport interface FreeTextType {\r\n valueType: {\r\n validator: {\r\n name: string;\r\n };\r\n };\r\n}\r\n\r\nexport const INPUT_TYPES: Record<string, string> = {\r\n numeric: 'number',\r\n default: 'text',\r\n};\r\n\r\n@Directive({\r\n selector: 'input[abpFeatureManagementFreeText]',\r\n exportAs: 'inputAbpFeatureManagementFreeText',\r\n})\r\nexport class FreeTextInputDirective {\r\n private readonly elRef = inject(ElementRef);\r\n private readonly renderer = inject(Renderer2);\r\n\r\n readonly feature = input<FreeTextType | undefined>(undefined, {\r\n alias: 'abpFeatureManagementFreeText',\r\n });\r\n\r\n constructor() {\r\n effect(() => {\r\n const feature = this.feature();\r\n if (feature) {\r\n this.setInputType(feature);\r\n }\r\n });\r\n }\r\n\r\n private setInputType(feature: FreeTextType) {\r\n const validatorType = feature?.valueType?.validator?.name?.toLowerCase();\r\n const type = INPUT_TYPES[validatorType] ?? INPUT_TYPES['default'];\r\n this.renderer.setAttribute(this.elRef.nativeElement, 'type', type);\r\n }\r\n}\r\n","import { Component, inject, DOCUMENT, input, output, signal, effect } from '@angular/core';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { ConfigStateService, LocalizationPipe, TrackByService } from '@abp/ng.core';\r\nimport {\r\n FeatureDto,\r\n FeatureGroupDto,\r\n FeaturesService,\r\n UpdateFeatureDto,\r\n} from '@abp/ng.feature-management/proxy';\r\nimport {\r\n ButtonComponent,\r\n Confirmation,\r\n ConfirmationService,\r\n LocaleDirection,\r\n ModalCloseDirective,\r\n ModalComponent,\r\n ToasterService,\r\n} from '@abp/ng.theme.shared';\r\nimport { Tabs, TabList, Tab, TabPanel, TabContent } from '@angular/aria/tabs';\r\nimport { finalize } from 'rxjs/operators';\r\nimport { FreeTextInputDirective } from '../../directives';\r\n\r\nenum ValueTypes {\r\n ToggleStringValueType = 'ToggleStringValueType',\r\n FreeTextStringValueType = 'FreeTextStringValueType',\r\n SelectionStringValueType = 'SelectionStringValueType',\r\n}\r\n\r\nconst DEFAULT_PROVIDER_NAME = 'D';\r\n\r\n@Component({\r\n selector: 'abp-feature-management',\r\n templateUrl: './feature-management.component.html',\r\n exportAs: 'abpFeatureManagement',\r\n imports: [\r\n NgTemplateOutlet,\r\n ButtonComponent,\r\n ModalComponent,\r\n LocalizationPipe,\r\n FormsModule,\r\n Tabs,\r\n TabList,\r\n Tab,\r\n TabPanel,\r\n TabContent,\r\n FreeTextInputDirective,\r\n ModalCloseDirective,\r\n ],\r\n})\r\nexport class FeatureManagementComponent {\r\n protected readonly track = inject(TrackByService);\r\n protected readonly toasterService = inject(ToasterService);\r\n protected readonly service = inject(FeaturesService);\r\n protected readonly configState = inject(ConfigStateService);\r\n protected readonly confirmationService = inject(ConfirmationService);\r\n private document = inject(DOCUMENT);\r\n\r\n // Signal inputs\r\n readonly providerKey = input<string | undefined>(undefined);\r\n readonly providerName = input<string | undefined>(undefined);\r\n readonly providerTitle = input<string | undefined>(undefined);\r\n readonly visibleInput = input(false, { alias: 'visible' });\r\n\r\n // Output signals\r\n readonly visibleChange = output<boolean>();\r\n\r\n // Internal state\r\n protected readonly _visible = signal(false);\r\n\r\n selectedGroupDisplayName: string;\r\n\r\n groups: Pick<FeatureGroupDto, 'name' | 'displayName'>[] = [];\r\n\r\n features: {\r\n [group: string]: Array<FeatureDto & { style?: { [key: string]: number }; initialValue: any }>;\r\n };\r\n\r\n valueTypes = ValueTypes;\r\n\r\n defaultProviderName = DEFAULT_PROVIDER_NAME;\r\n\r\n modalBusy = false;\r\n\r\n // Getter/setter for backward compatibility\r\n get visible(): boolean {\r\n return this._visible();\r\n }\r\n\r\n set visible(value: boolean) {\r\n if (this._visible() === value) {\r\n return;\r\n }\r\n\r\n this._visible.set(value);\r\n this.visibleChange.emit(value);\r\n\r\n if (value) {\r\n this.openModal();\r\n }\r\n }\r\n\r\n constructor() {\r\n // Sync visible input to internal signal\r\n effect(() => {\r\n const inputValue = this.visibleInput();\r\n if (this._visible() !== inputValue) {\r\n this._visible.set(inputValue);\r\n if (inputValue) {\r\n this.openModal();\r\n }\r\n }\r\n });\r\n }\r\n\r\n openModal() {\r\n if (!this.providerName()) {\r\n throw new Error('providerName is required.');\r\n }\r\n\r\n this.getFeatures();\r\n }\r\n\r\n getFeatures() {\r\n this.service.get(this.providerName()!, this.providerKey()).subscribe(res => {\r\n if (!res.groups?.length) return;\r\n this.groups = res.groups.map(({ name, displayName }) => ({ name, displayName }));\r\n this.selectedGroupDisplayName = this.groups[0].displayName;\r\n this.features = res.groups.reduce(\r\n (acc, val) => ({\r\n ...acc,\r\n [val.name]: mapFeatures(val.features, this.document.body?.dir as LocaleDirection),\r\n }),\r\n {},\r\n );\r\n });\r\n }\r\n\r\n save() {\r\n if (this.modalBusy) return;\r\n\r\n const changedFeatures = [] as UpdateFeatureDto[];\r\n\r\n Object.keys(this.features).forEach(key => {\r\n this.features[key].forEach(feature => {\r\n if (feature.value !== feature.initialValue)\r\n changedFeatures.push({ name: feature.name, value: `${feature.value}` });\r\n });\r\n });\r\n\r\n if (!changedFeatures.length) {\r\n this.visible = false;\r\n return;\r\n }\r\n\r\n this.modalBusy = true;\r\n this.service\r\n .update(this.providerName()!, this.providerKey(), { features: changedFeatures })\r\n .pipe(finalize(() => (this.modalBusy = false)))\r\n .subscribe(() => {\r\n this.visible = false;\r\n\r\n this.toasterService.success('AbpUi::SavedSuccessfully');\r\n if (!this.providerKey()) {\r\n // to refresh host's features\r\n this.configState.refreshAppState().subscribe();\r\n }\r\n });\r\n }\r\n\r\n resetToDefault() {\r\n this.confirmationService\r\n .warn('AbpFeatureManagement::AreYouSureToResetToDefault', 'AbpFeatureManagement::AreYouSure')\r\n .subscribe((status: Confirmation.Status) => {\r\n if (status === Confirmation.Status.confirm) {\r\n this.service.delete(this.providerName()!, this.providerKey()).subscribe(() => {\r\n this.toasterService.success('AbpFeatureManagement::ResetedToDefault');\r\n this.visible = false;\r\n\r\n if (!this.providerKey()) {\r\n // to refresh host's features\r\n this.configState.refreshAppState().subscribe();\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n onCheckboxClick(val: boolean, feature: FeatureDto) {\r\n if (val) {\r\n this.checkToggleAncestors(feature);\r\n } else {\r\n this.uncheckToggleDescendants(feature);\r\n }\r\n }\r\n\r\n isParentDisabled(parentName: string, groupName: string, provider: string): boolean {\r\n const children = this.features[groupName]?.filter(f => f.parentName === parentName);\r\n const providerNameValue = this.providerName();\r\n\r\n if (children?.length) {\r\n return children.some(child => {\r\n const childProvider = child.provider?.name;\r\n return (\r\n (childProvider !== providerNameValue && childProvider !== this.defaultProviderName) ||\r\n (provider !== providerNameValue && provider !== this.defaultProviderName)\r\n );\r\n });\r\n } else {\r\n return provider !== providerNameValue && provider !== this.defaultProviderName;\r\n }\r\n }\r\n\r\n private uncheckToggleDescendants(feature: FeatureDto) {\r\n this.findAllDescendantsOfByType(feature, ValueTypes.ToggleStringValueType).forEach(node =>\r\n this.setFeatureValue(node, false),\r\n );\r\n }\r\n\r\n private checkToggleAncestors(feature: FeatureDto) {\r\n this.findAllAncestorsOfByType(feature, ValueTypes.ToggleStringValueType).forEach(node =>\r\n this.setFeatureValue(node, true),\r\n );\r\n }\r\n\r\n private findAllAncestorsOfByType(feature: FeatureDto, type: ValueTypes) {\r\n let parent = this.findParentByType(feature, type);\r\n const ancestors = [];\r\n while (parent) {\r\n ancestors.push(parent);\r\n parent = this.findParentByType(parent, type);\r\n }\r\n return ancestors;\r\n }\r\n\r\n private findAllDescendantsOfByType(feature: FeatureDto, type: ValueTypes) {\r\n const descendants = [];\r\n const queue = [feature];\r\n\r\n while (queue.length) {\r\n const node = queue.pop();\r\n const newDescendants = this.findChildrenByType(node, type);\r\n descendants.push(...newDescendants);\r\n queue.push(...newDescendants);\r\n }\r\n\r\n return descendants;\r\n }\r\n\r\n private findParentByType(feature: FeatureDto, type: ValueTypes) {\r\n return this.getCurrentGroup().find(\r\n f => f.valueType.name === type && f.name === feature.parentName,\r\n );\r\n }\r\n\r\n private findChildrenByType(feature: FeatureDto, type: ValueTypes) {\r\n return this.getCurrentGroup().filter(\r\n f => f.valueType.name === type && f.parentName === feature.name,\r\n );\r\n }\r\n\r\n private getCurrentGroup() {\r\n return this.features[this.selectedGroupDisplayName] ?? [];\r\n }\r\n\r\n private setFeatureValue(feature: FeatureDto, val: boolean) {\r\n feature.value = val as any;\r\n }\r\n}\r\n\r\nfunction mapFeatures(features: FeatureDto[], dir: LocaleDirection) {\r\n const margin = `margin-${dir === 'rtl' ? 'right' : 'left'}.px`;\r\n\r\n return features.map(feature => {\r\n const value =\r\n feature.valueType?.name === ValueTypes.ToggleStringValueType\r\n ? (feature.value || '').toLowerCase() === 'true'\r\n : feature.value;\r\n\r\n return {\r\n ...feature,\r\n value,\r\n initialValue: value,\r\n style: { [margin]: feature.depth * 20 },\r\n };\r\n });\r\n}\r\n","@if (visible) {\r\n<abp-modal [(visible)]=\"visible\" [busy]=\"modalBusy\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ 'AbpFeatureManagement::Features' | abpLocalization }}\r\n @if (providerTitle()) {\r\n - {{ providerTitle() }}\r\n }\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"row\">\r\n @if (groups.length) {\r\n <div ngTabs orientation=\"vertical\" class=\"row\">\r\n <div class=\"col-md-4\">\r\n <div ngTabList orientation=\"vertical\" selectionMode=\"follow\" [(selectedTab)]=\"selectedGroupDisplayName\" class=\"nav nav-pills flex-column\">\r\n @for (group of groups; track group.name) {\r\n <button ngTab #tab=\"ngTab\" type=\"button\" [value]=\"group.displayName\" class=\"nav-link text-start\" [class.active]=\"tab.selected()\">\r\n {{ group.displayName }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <ng-template #descTmp let-description>\r\n @if (description) {\r\n <small class=\"d-block form-text text-muted\">{{ description }}</small>\r\n }\r\n </ng-template>\r\n\r\n <div class=\"col-md-8\">\r\n @for (group of groups; track group.name) {\r\n <div ngTabPanel [value]=\"group.displayName\">\r\n <ng-template ngTabContent>\r\n <h4>{{ selectedGroupDisplayName }}</h4>\r\n <hr class=\"mt-2 mb-3\" />\r\n\r\n @for (feature of features[group.name]; track feature.id || i; let i = $index) {\r\n @let provider = feature.provider.name;\r\n @let isFeatureDisabled = !feature.parentName ? isParentDisabled(feature.name, group.name, provider) :\r\n (provider !== providerName() && provider !== defaultProviderName);\r\n\r\n <div class=\"mt-2\" [style]=\"feature.style\" (keyup.enter)=\"save()\">\r\n @switch (feature.valueType?.name) {\r\n @case (valueTypes.ToggleStringValueType) {\r\n <div class=\"form-check\" [class.px-4]=\"!!feature.parentName\">\r\n <input class=\"form-check-input\" type=\"checkbox\" [id]=\"feature.name\" [(ngModel)]=\"feature.value\"\r\n (ngModelChange)=\"onCheckboxClick($event, feature)\" [disabled]=\"isFeatureDisabled\" />\r\n\r\n <label class=\"form-check-label\" [htmlFor]=\"feature.name\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <ng-container *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"></ng-container>\r\n </div>\r\n }\r\n @case (valueTypes.FreeTextStringValueType) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <input class=\"form-control\" type=\"text\" [id]=\"feature.name\" [(ngModel)]=\"feature.value\"\r\n [abpFeatureManagementFreeText]=\"feature\" [disabled]=\"isFeatureDisabled\" />\r\n\r\n <ng-container *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"></ng-container>\r\n </div>\r\n }\r\n @case (valueTypes.SelectionStringValueType) {\r\n @if (feature.valueType.itemSource?.items?.length) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <select class=\"form-select\" [id]=\"feature.name\" [(ngModel)]=\"feature.value\"\r\n [disabled]=\"isFeatureDisabled\">\r\n @for (\r\n item of feature.valueType.itemSource?.items;\r\n track item.value\r\n ) {\r\n <option [ngValue]=\"item.value\">\r\n {{\r\n item.displayText?.resourceName +\r\n '::' +\r\n item.displayText?.name | abpLocalization\r\n }}\r\n </option>\r\n }\r\n </select>\r\n <ng-container *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n ></ng-container>\r\n </div>\r\n }\r\n }\r\n @default {\r\n {{ feature.displayName }}\r\n }\r\n }\r\n </div>\r\n }\r\n </ng-template>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (!groups.length) {\r\n <div class=\"col\">\r\n {{ 'AbpFeatureManagement::NoFeatureFoundMessage' | abpLocalization }}\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-link\">\r\n {{ 'AbpFeatureManagement::Cancel' | abpLocalization }}\r\n </button>\r\n\r\n @if (groups.length) {\r\n <abp-button buttonClass=\"btn btn-outline-primary\" [disabled]=\"modalBusy\" (click)=\"resetToDefault()\"\r\n aria-hidden=\"true\">\r\n {{ 'AbpFeatureManagement::ResetToDefault' | abpLocalization }}\r\n </abp-button>\r\n }\r\n\r\n @if (groups.length) {\r\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"modalBusy\" (click)=\"save()\" aria-hidden=\"true\">\r\n {{ 'AbpFeatureManagement::Save' | abpLocalization }}\r\n </abp-button>\r\n }\r\n </ng-template>\r\n</abp-modal>\r\n}","import { LocalizationPipe, ReplaceableTemplateDirective } from '@abp/ng.core';\r\nimport { Component } from '@angular/core';\r\nimport { FeatureManagementComponent } from '../feature-management/feature-management.component';\r\n\r\n@Component({\r\n selector: 'abp-feature-management-tab',\r\n templateUrl: './feature-management-tab.component.html',\r\n imports: [ReplaceableTemplateDirective, LocalizationPipe, FeatureManagementComponent],\r\n})\r\nexport class FeatureManagementTabComponent {\r\n visibleFeatures = false;\r\n providerKey: string;\r\n\r\n openFeaturesModal() {\r\n this.visibleFeatures = true;\r\n }\r\n\r\n onVisibleFeaturesChange = (value: boolean) => {\r\n this.visibleFeatures = value;\r\n };\r\n}\r\n","<p class=\"pt-2 text-wrap\">{{ 'AbpFeatureManagement::ManageHostFeaturesText' | abpLocalization }}</p>\r\n\r\n<button class=\"btn btn-primary\" type=\"button\" (click)=\"openFeaturesModal()\">\r\n <i class=\"me-1 fa fa-cog\" aria-hidden=\"true\"></i>\r\n {{ 'AbpFeatureManagement::ManageHostFeatures' | abpLocalization }}\r\n</button>\r\n@if (visibleFeatures) {\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: onVisibleFeaturesChange },\r\n componentKey: 'FeatureManagement.FeatureManagementComponent'\r\n }\"\r\n [(visible)]=\"visibleFeatures\"\r\n providerName=\"T\"\r\n [providerKey]=\"providerKey\"\r\n >\r\n </abp-feature-management>\r\n}\r\n","import { SettingTabsService } from '@abp/ng.setting-management/config';\r\nimport { inject, provideAppInitializer } from '@angular/core';\r\nimport { eFeatureManagementTabNames } from '../enums/feature-management-tab-names';\r\nimport { FeatureManagementTabComponent } from '../components';\r\n\r\nexport const FEATURE_MANAGEMENT_SETTINGS_PROVIDERS = [\r\n provideAppInitializer(() => {\r\n configureSettingTabs();\r\n }),\r\n];\r\n\r\nexport function configureSettingTabs() {\r\n const settingtabs = inject(SettingTabsService);\r\n settingtabs.add([\r\n {\r\n name: eFeatureManagementTabNames.FeatureManagement,\r\n order: 100,\r\n requiredPolicy: 'FeatureManagement.ManageHostFeatures',\r\n component: FeatureManagementTabComponent,\r\n },\r\n ]);\r\n}\r\n","import { makeEnvironmentProviders } from '@angular/core';\r\nimport { FEATURE_MANAGEMENT_SETTINGS_PROVIDERS } from './';\r\n\r\nexport function provideFeatureManagementConfig() {\r\n return makeEnvironmentProviders([FEATURE_MANAGEMENT_SETTINGS_PROVIDERS]);\r\n}\r\n","import { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { FreeTextInputDirective } from './directives';\r\nimport { provideFeatureManagementConfig } from './providers';\r\nimport { FeatureManagementTabComponent, FeatureManagementComponent } from './components';\r\n\r\nexport const FEATURE_MANAGEMENT_EXPORTS = [\r\n FeatureManagementComponent,\r\n FreeTextInputDirective,\r\n FeatureManagementTabComponent,\r\n];\r\n\r\n/**\r\n * @deprecated FeatureManagementModule is deprecated .\r\n * @description use `provideFeatureManagementConfig` *function* for config settings.\r\n * You can import directives and pipes directly whichs were belongs to FeatureManagementModule are switched to standalone.\r\n */\r\n@NgModule({\r\n imports: [...FEATURE_MANAGEMENT_EXPORTS],\r\n exports: [...FEATURE_MANAGEMENT_EXPORTS],\r\n})\r\nexport class FeatureManagementModule {\r\n static forRoot(): ModuleWithProviders<FeatureManagementModule> {\r\n return {\r\n ngModule: FeatureManagementModule,\r\n providers: [provideFeatureManagementConfig()],\r\n };\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAWO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abp-ng.feature-management.mjs","sources":["../../../../packages/feature-management/src/lib/directives/free-text-input.directive.ts","../../../../packages/feature-management/src/lib/components/feature-management/feature-management.component.ts","../../../../packages/feature-management/src/lib/components/feature-management/feature-management.component.html","../../../../packages/feature-management/src/lib/components/feature-management-tab/feature-management-tab.component.ts","../../../../packages/feature-management/src/lib/components/feature-management-tab/feature-management-tab.component.html","../../../../packages/feature-management/src/lib/providers/feature-management-settings.provider.ts","../../../../packages/feature-management/src/lib/providers/feature-management-config.provider.ts","../../../../packages/feature-management/src/lib/feature-management.module.ts","../../../../packages/feature-management/src/abp-ng.feature-management.ts"],"sourcesContent":["import { Directive, effect, inject, input, ElementRef, Renderer2 } from '@angular/core';\r\nimport type { FeatureDto } from '@abp/ng.feature-management/proxy';\r\n\r\nexport type FreeTextType = Pick<FeatureDto, 'valueType'>;\r\n\r\nexport const INPUT_TYPES: Record<string, string> = {\r\n numeric: 'number',\r\n default: 'text',\r\n};\r\n\r\n@Directive({\r\n selector: 'input[abpFeatureManagementFreeText]',\r\n exportAs: 'inputAbpFeatureManagementFreeText',\r\n})\r\nexport class FreeTextInputDirective {\r\n private readonly elRef = inject(ElementRef);\r\n private readonly renderer = inject(Renderer2);\r\n\r\n readonly feature = input<FreeTextType | undefined>(undefined, {\r\n alias: 'abpFeatureManagementFreeText',\r\n });\r\n\r\n constructor() {\r\n effect(() => {\r\n const feature = this.feature();\r\n if (feature) {\r\n this.setInputType(feature);\r\n }\r\n });\r\n }\r\n\r\n private setInputType(feature: FreeTextType) {\r\n const validatorType = feature?.valueType?.validator?.name?.toLowerCase();\r\n const type = INPUT_TYPES[validatorType] ?? INPUT_TYPES['default'];\r\n this.renderer.setAttribute(this.elRef.nativeElement, 'type', type);\r\n }\r\n}\r\n","import {Component, inject, DOCUMENT, input, output, signal, effect, ChangeDetectionStrategy,} from '@angular/core';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { ConfigStateService, LocalizationPipe, TrackByService } from '@abp/ng.core';\r\nimport {\r\n FeatureDto,\r\n FeatureGroupDto,\r\n FeaturesService,\r\n UpdateFeatureDto,\r\n} from '@abp/ng.feature-management/proxy';\r\nimport {\r\n ButtonComponent,\r\n Confirmation,\r\n ConfirmationService,\r\n LocaleDirection,\r\n ModalCloseDirective,\r\n ModalComponent,\r\n ToasterService,\r\n} from '@abp/ng.theme.shared';\r\nimport { Tabs, TabList, Tab, TabPanel, TabContent } from '@angular/aria/tabs';\r\nimport { finalize } from 'rxjs/operators';\r\nimport { FreeTextInputDirective } from '../../directives';\r\n\r\nenum ValueTypes {\r\n ToggleStringValueType = 'ToggleStringValueType',\r\n FreeTextStringValueType = 'FreeTextStringValueType',\r\n SelectionStringValueType = 'SelectionStringValueType',\r\n}\r\n\r\nconst DEFAULT_PROVIDER_NAME = 'D';\r\n\r\n/**\r\n * FeatureDto.ValueType is typed as IStringValueType in Application.Contracts, but the API\r\n * serializes concrete value types at runtime (e.g. SelectionStringValueType includes itemSource).\r\n * generate-proxy only reflects the interface contract, so keep runtime-only shapes here — not in proxy/.\r\n * See: modules/feature-management (FeatureDto, StringValueTypeJsonConverter) and Blazor/MVC cast pattern.\r\n */\r\ntype FeatureWithStyle = FeatureDto & {\r\n style?: Record<string, number>;\r\n initialValue: unknown;\r\n};\r\n\r\ntype SelectionStringValueType = FeatureDto['valueType'] & {\r\n itemSource?: {\r\n items?: Array<{\r\n value?: string;\r\n displayText?: { resourceName?: string; name?: string };\r\n }>;\r\n };\r\n};\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n selector: 'abp-feature-management',\r\n templateUrl: './feature-management.component.html',\r\n exportAs: 'abpFeatureManagement',\r\n imports: [\r\n NgTemplateOutlet,\r\n ButtonComponent,\r\n ModalComponent,\r\n LocalizationPipe,\r\n FormsModule,\r\n Tabs,\r\n TabList,\r\n Tab,\r\n TabPanel,\r\n TabContent,\r\n FreeTextInputDirective,\r\n ModalCloseDirective,\r\n ],\r\n})\r\nexport class FeatureManagementComponent {\r\n protected readonly track = inject(TrackByService);\r\n protected readonly toasterService = inject(ToasterService);\r\n protected readonly service = inject(FeaturesService);\r\n protected readonly configState = inject(ConfigStateService);\r\n protected readonly confirmationService = inject(ConfirmationService);\r\n private document = inject(DOCUMENT);\r\n\r\n // Signal inputs\r\n readonly providerKey = input<string | undefined>(undefined);\r\n readonly providerName = input<string | undefined>(undefined);\r\n readonly providerTitle = input<string | undefined>(undefined);\r\n readonly visibleInput = input(false, { alias: 'visible' });\r\n\r\n // Output signals\r\n readonly visibleChange = output<boolean>();\r\n\r\n // Internal state\r\n protected readonly _visible = signal(false);\r\n\r\n protected readonly selectedGroupDisplayName = signal<string | undefined>(undefined);\r\n\r\n protected readonly groups = signal<Pick<FeatureGroupDto, 'name' | 'displayName'>[]>([]);\r\n\r\n protected readonly features = signal<{\r\n [group: string]: FeatureWithStyle[];\r\n }>({});\r\n\r\n valueTypes = ValueTypes;\r\n\r\n defaultProviderName = DEFAULT_PROVIDER_NAME;\r\n\r\n protected readonly modalBusy = signal(false);\r\n\r\n // Getter/setter for backward compatibility\r\n get visible(): boolean {\r\n return this._visible();\r\n }\r\n\r\n set visible(value: boolean) {\r\n if (this._visible() === value) {\r\n return;\r\n }\r\n\r\n this._visible.set(value);\r\n this.visibleChange.emit(value);\r\n\r\n if (value) {\r\n this.openModal();\r\n }\r\n }\r\n\r\n constructor() {\r\n // Sync visible input to internal signal\r\n effect(() => {\r\n const inputValue = this.visibleInput();\r\n if (this._visible() !== inputValue) {\r\n this._visible.set(inputValue);\r\n if (inputValue) {\r\n this.openModal();\r\n }\r\n }\r\n });\r\n }\r\n\r\n openModal() {\r\n if (!this.providerName()) {\r\n throw new Error('providerName is required.');\r\n }\r\n\r\n this.getFeatures();\r\n }\r\n\r\n getFeatures() {\r\n this.service.get(this.providerName()!, this.providerKey()).subscribe(res => {\r\n if (!res.groups?.length) return;\r\n const groups = res.groups.map(({ name, displayName }) => ({ name, displayName }));\r\n this.groups.set(groups);\r\n this.selectedGroupDisplayName.set(groups[0].displayName);\r\n this.features.set(\r\n res.groups.reduce(\r\n (acc, val) => ({\r\n ...acc,\r\n [val.name]: mapFeatures(val.features, this.document.body?.dir as LocaleDirection),\r\n }),\r\n {},\r\n ),\r\n );\r\n });\r\n }\r\n\r\n save() {\r\n if (this.modalBusy()) return;\r\n\r\n const changedFeatures = [] as UpdateFeatureDto[];\r\n\r\n Object.keys(this.features()).forEach(key => {\r\n this.features()[key].forEach(feature => {\r\n if (feature.value !== feature.initialValue)\r\n changedFeatures.push({ name: feature.name, value: `${feature.value}` });\r\n });\r\n });\r\n\r\n if (!changedFeatures.length) {\r\n this.visible = false;\r\n return;\r\n }\r\n\r\n this.modalBusy.set(true);\r\n this.service\r\n .update(this.providerName()!, this.providerKey(), { features: changedFeatures })\r\n .pipe(finalize(() => this.modalBusy.set(false)))\r\n .subscribe(() => {\r\n this.visible = false;\r\n\r\n this.toasterService.success('AbpUi::SavedSuccessfully');\r\n if (!this.providerKey()) {\r\n // to refresh host's features\r\n this.configState.refreshAppState().subscribe();\r\n }\r\n });\r\n }\r\n\r\n resetToDefault() {\r\n this.confirmationService\r\n .warn('AbpFeatureManagement::AreYouSureToResetToDefault', 'AbpFeatureManagement::AreYouSure')\r\n .subscribe((status: Confirmation.Status) => {\r\n if (status === Confirmation.Status.confirm) {\r\n this.service.delete(this.providerName()!, this.providerKey()).subscribe(() => {\r\n this.toasterService.success('AbpFeatureManagement::ResetedToDefault');\r\n this.visible = false;\r\n\r\n if (!this.providerKey()) {\r\n // to refresh host's features\r\n this.configState.refreshAppState().subscribe();\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n onCheckboxClick(val: boolean, feature: FeatureDto) {\r\n if (val) {\r\n this.checkToggleAncestors(feature);\r\n } else {\r\n this.uncheckToggleDescendants(feature);\r\n }\r\n }\r\n\r\n getSelectionItems(feature: FeatureWithStyle) {\r\n if (feature.valueType?.name !== ValueTypes.SelectionStringValueType) {\r\n return [];\r\n }\r\n\r\n return (feature.valueType as SelectionStringValueType).itemSource?.items ?? [];\r\n }\r\n\r\n isParentDisabled(parentName: string, groupName: string, provider: string): boolean {\r\n const children = this.features()[groupName]?.filter(f => f.parentName === parentName);\r\n const providerNameValue = this.providerName();\r\n\r\n if (children?.length) {\r\n return children.some(child => {\r\n const childProvider = child.provider?.name;\r\n return (\r\n (childProvider !== providerNameValue && childProvider !== this.defaultProviderName) ||\r\n (provider !== providerNameValue && provider !== this.defaultProviderName)\r\n );\r\n });\r\n } else {\r\n return provider !== providerNameValue && provider !== this.defaultProviderName;\r\n }\r\n }\r\n\r\n private uncheckToggleDescendants(feature: FeatureDto) {\r\n this.findAllDescendantsOfByType(feature, ValueTypes.ToggleStringValueType).forEach(node =>\r\n this.setFeatureValue(node, false),\r\n );\r\n }\r\n\r\n private checkToggleAncestors(feature: FeatureDto) {\r\n this.findAllAncestorsOfByType(feature, ValueTypes.ToggleStringValueType).forEach(node =>\r\n this.setFeatureValue(node, true),\r\n );\r\n }\r\n\r\n private findAllAncestorsOfByType(feature: FeatureDto, type: ValueTypes) {\r\n let parent = this.findParentByType(feature, type);\r\n const ancestors = [];\r\n while (parent) {\r\n ancestors.push(parent);\r\n parent = this.findParentByType(parent, type);\r\n }\r\n return ancestors;\r\n }\r\n\r\n private findAllDescendantsOfByType(feature: FeatureDto, type: ValueTypes) {\r\n const descendants = [];\r\n const queue = [feature];\r\n\r\n while (queue.length) {\r\n const node = queue.pop();\r\n const newDescendants = this.findChildrenByType(node, type);\r\n descendants.push(...newDescendants);\r\n queue.push(...newDescendants);\r\n }\r\n\r\n return descendants;\r\n }\r\n\r\n private findParentByType(feature: FeatureDto, type: ValueTypes) {\r\n return this.getCurrentGroup().find(\r\n f => f.valueType.name === type && f.name === feature.parentName,\r\n );\r\n }\r\n\r\n private findChildrenByType(feature: FeatureDto, type: ValueTypes) {\r\n return this.getCurrentGroup().filter(\r\n f => f.valueType.name === type && f.parentName === feature.name,\r\n );\r\n }\r\n\r\n private getCurrentGroup() {\r\n const selectedGroup = this.selectedGroupDisplayName();\r\n return selectedGroup ? this.features()[selectedGroup] ?? [] : [];\r\n }\r\n\r\n private setFeatureValue(feature: FeatureDto, val: boolean) {\r\n feature.value = val as any;\r\n }\r\n}\r\n\r\nfunction mapFeatures(features: FeatureDto[], dir: LocaleDirection) {\r\n const margin = `margin-${dir === 'rtl' ? 'right' : 'left'}.px`;\r\n\r\n return features.map(feature => {\r\n const value =\r\n feature.valueType?.name === ValueTypes.ToggleStringValueType\r\n ? (feature.value || '').toLowerCase() === 'true'\r\n : feature.value;\r\n\r\n return {\r\n ...feature,\r\n value,\r\n initialValue: value,\r\n style: { [margin]: feature.depth * 20 },\r\n };\r\n });\r\n}\r\n","@if (visible) {\r\n <abp-modal [(visible)]=\"visible\" [busy]=\"modalBusy()\" [options]=\"{ size: 'lg' }\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ 'AbpFeatureManagement::Features' | abpLocalization }}\r\n @if (providerTitle()) {\r\n - {{ providerTitle() }}\r\n }\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"row\">\r\n @if (groups().length) {\r\n <div ngTabs orientation=\"vertical\" class=\"row\">\r\n <div class=\"col-md-4\">\r\n <div\r\n ngTabList\r\n orientation=\"vertical\"\r\n selectionMode=\"follow\"\r\n [(selectedTab)]=\"selectedGroupDisplayName\"\r\n class=\"nav nav-pills flex-column\"\r\n >\r\n @for (group of groups(); track group.name) {\r\n <button\r\n ngTab\r\n #tab=\"ngTab\"\r\n type=\"button\"\r\n [value]=\"group.displayName\"\r\n class=\"nav-link text-start\"\r\n [class.active]=\"tab.selected()\"\r\n >\r\n {{ group.displayName }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <ng-template #descTmp let-description>\r\n @if (description) {\r\n <small class=\"d-block form-text text-muted\">{{ description }}</small>\r\n }\r\n </ng-template>\r\n\r\n <div class=\"col-md-8\">\r\n @for (group of groups(); track group.name) {\r\n <div ngTabPanel [value]=\"group.displayName\">\r\n <ng-template ngTabContent>\r\n <h4>{{ selectedGroupDisplayName() }}</h4>\r\n <hr class=\"mt-2 mb-3\" />\r\n\r\n @for (\r\n feature of features()[group.name];\r\n track feature.name || i;\r\n let i = $index\r\n ) {\r\n @let provider = feature.provider.name;\r\n @let isFeatureDisabled =\r\n !feature.parentName\r\n ? isParentDisabled(feature.name, group.name, provider)\r\n : provider !== providerName() && provider !== defaultProviderName;\r\n\r\n <div class=\"mt-2\" [style]=\"feature.style\" (keyup.enter)=\"save()\">\r\n @switch (feature.valueType?.name) {\r\n @case (valueTypes.ToggleStringValueType) {\r\n <div class=\"form-check\" [class.px-4]=\"!!feature.parentName\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n [id]=\"feature.name\"\r\n [(ngModel)]=\"feature.value\"\r\n (ngModelChange)=\"onCheckboxClick($event, feature)\"\r\n [disabled]=\"isFeatureDisabled\"\r\n />\r\n\r\n <label class=\"form-check-label\" [htmlFor]=\"feature.name\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n />\r\n </div>\r\n }\r\n @case (valueTypes.FreeTextStringValueType) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <input\r\n class=\"form-control\"\r\n type=\"text\"\r\n [id]=\"feature.name\"\r\n [(ngModel)]=\"feature.value\"\r\n [abpFeatureManagementFreeText]=\"feature\"\r\n [disabled]=\"isFeatureDisabled\"\r\n />\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n />\r\n </div>\r\n }\r\n @case (valueTypes.SelectionStringValueType) {\r\n @if (getSelectionItems(feature).length) {\r\n <div class=\"mb-3 form-group\" [class.px-2]=\"!!feature.parentName\">\r\n <label [htmlFor]=\"feature.name\" class=\"form-label\">\r\n {{ feature.displayName }}\r\n @if (isFeatureDisabled) {\r\n <span>({{ provider }})</span>\r\n }\r\n </label>\r\n <select\r\n class=\"form-select\"\r\n [id]=\"feature.name\"\r\n [(ngModel)]=\"feature.value\"\r\n [disabled]=\"isFeatureDisabled\"\r\n >\r\n @for (item of getSelectionItems(feature); track item.value) {\r\n <option [ngValue]=\"item.value\">\r\n {{\r\n item.displayText?.resourceName +\r\n '::' +\r\n item.displayText?.name | abpLocalization\r\n }}\r\n </option>\r\n }\r\n </select>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n descTmp;\r\n context: { $implicit: feature.description }\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n @default {\r\n {{ feature.displayName }}\r\n }\r\n }\r\n </div>\r\n }\r\n </ng-template>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (!groups().length) {\r\n <div class=\"col\">\r\n {{ 'AbpFeatureManagement::NoFeatureFoundMessage' | abpLocalization }}\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-link\">\r\n {{ 'AbpFeatureManagement::Cancel' | abpLocalization }}\r\n </button>\r\n\r\n @if (groups().length) {\r\n <abp-button\r\n buttonClass=\"btn btn-outline-primary\"\r\n [disabled]=\"modalBusy()\"\r\n (click)=\"resetToDefault()\"\r\n aria-hidden=\"true\"\r\n >\r\n {{ 'AbpFeatureManagement::ResetToDefault' | abpLocalization }}\r\n </abp-button>\r\n }\r\n\r\n @if (groups().length) {\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n [disabled]=\"modalBusy()\"\r\n (click)=\"save()\"\r\n aria-hidden=\"true\"\r\n >\r\n {{ 'AbpFeatureManagement::Save' | abpLocalization }}\r\n </abp-button>\r\n }\r\n </ng-template>\r\n </abp-modal>\r\n}\r\n","import { LocalizationPipe, ReplaceableTemplateDirective } from '@abp/ng.core';\r\nimport {Component, ChangeDetectionStrategy,} from '@angular/core';\r\nimport { FeatureManagementComponent } from '../feature-management/feature-management.component';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n selector: 'abp-feature-management-tab',\r\n templateUrl: './feature-management-tab.component.html',\r\n imports: [ReplaceableTemplateDirective, LocalizationPipe, FeatureManagementComponent],\r\n})\r\nexport class FeatureManagementTabComponent {\r\n visibleFeatures = false;\r\n providerKey: string;\r\n\r\n openFeaturesModal() {\r\n this.visibleFeatures = true;\r\n }\r\n\r\n onVisibleFeaturesChange = (value: boolean) => {\r\n this.visibleFeatures = value;\r\n };\r\n}\r\n","<p class=\"pt-2 text-wrap\">{{ 'AbpFeatureManagement::ManageHostFeaturesText' | abpLocalization }}</p>\r\n\r\n<button class=\"btn btn-primary\" type=\"button\" (click)=\"openFeaturesModal()\">\r\n <i class=\"me-1 fa fa-cog\" aria-hidden=\"true\"></i>\r\n {{ 'AbpFeatureManagement::ManageHostFeatures' | abpLocalization }}\r\n</button>\r\n@if (visibleFeatures) {\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: onVisibleFeaturesChange },\r\n componentKey: 'FeatureManagement.FeatureManagementComponent'\r\n }\"\r\n [(visible)]=\"visibleFeatures\"\r\n providerName=\"T\"\r\n [providerKey]=\"providerKey\"\r\n >\r\n </abp-feature-management>\r\n}\r\n","import { SettingTabsService } from '@abp/ng.setting-management/config';\r\nimport { inject, provideAppInitializer } from '@angular/core';\r\nimport { eFeatureManagementTabNames } from '../enums/feature-management-tab-names';\r\nimport { FeatureManagementTabComponent } from '../components';\r\n\r\nexport const FEATURE_MANAGEMENT_SETTINGS_PROVIDERS = [\r\n provideAppInitializer(() => {\r\n configureSettingTabs();\r\n }),\r\n];\r\n\r\nexport function configureSettingTabs() {\r\n const settingtabs = inject(SettingTabsService);\r\n settingtabs.add([\r\n {\r\n name: eFeatureManagementTabNames.FeatureManagement,\r\n order: 100,\r\n requiredPolicy: 'FeatureManagement.ManageHostFeatures',\r\n component: FeatureManagementTabComponent,\r\n },\r\n ]);\r\n}\r\n","import { makeEnvironmentProviders } from '@angular/core';\r\nimport { FEATURE_MANAGEMENT_SETTINGS_PROVIDERS } from './';\r\n\r\nexport function provideFeatureManagementConfig() {\r\n return makeEnvironmentProviders([FEATURE_MANAGEMENT_SETTINGS_PROVIDERS]);\r\n}\r\n","import { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { FreeTextInputDirective } from './directives';\r\nimport { provideFeatureManagementConfig } from './providers';\r\nimport { FeatureManagementTabComponent, FeatureManagementComponent } from './components';\r\n\r\nexport const FEATURE_MANAGEMENT_EXPORTS = [\r\n FeatureManagementComponent,\r\n FreeTextInputDirective,\r\n FeatureManagementTabComponent,\r\n];\r\n\r\n/**\r\n * @deprecated FeatureManagementModule is deprecated .\r\n * @description use `provideFeatureManagementConfig` *function* for config settings.\r\n * You can import directives and pipes directly whichs were belongs to FeatureManagementModule are switched to standalone.\r\n */\r\n@NgModule({\r\n imports: [...FEATURE_MANAGEMENT_EXPORTS],\r\n exports: [...FEATURE_MANAGEMENT_EXPORTS],\r\n})\r\nexport class FeatureManagementModule {\r\n static forRoot(): ModuleWithProviders<FeatureManagementModule> {\r\n return {\r\n ngModule: FeatureManagementModule,\r\n providers: [provideFeatureManagementConfig()],\r\n };\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAKO,MAAM,WAAW,GAA2B;AACjD,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,OAAO,EAAE,MAAM;;MAOJ,sBAAsB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AAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAdlC,0BAA0B;YAC1B,sBAAsB;AACtB,YAAA,6BAA6B,aAF7B,0BAA0B;YAC1B,sBAAsB;YACtB,6BAA6B,CAAA,EAAA,CAAA,CAAA;AAYlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAdlC,0BAA0B;YAE1B,6BAA6B,CAAA,EAAA,CAAA,CAAA;;2FAYlB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,0BAA0B,CAAC;AACxC,oBAAA,OAAO,EAAE,CAAC,GAAG,0BAA0B,CAAC;AACzC,iBAAA;;;ACnBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@abp/ng.feature-management",
3
- "version": "10.5.0-rc.4",
3
+ "version": "10.6.0-rc.1",
4
4
  "homepage": "https://abp.io",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/abpframework/abp.git"
8
8
  },
9
9
  "dependencies": {
10
- "@abp/ng.theme.shared": "~10.5.0-rc.4",
10
+ "@abp/ng.theme.shared": "~10.6.0-rc.1",
11
11
  "tslib": "^2.0.0"
12
12
  },
13
13
  "peerDependencies": {
@@ -9,6 +9,16 @@ declare enum ValueTypes {
9
9
  FreeTextStringValueType = "FreeTextStringValueType",
10
10
  SelectionStringValueType = "SelectionStringValueType"
11
11
  }
12
+ /**
13
+ * FeatureDto.ValueType is typed as IStringValueType in Application.Contracts, but the API
14
+ * serializes concrete value types at runtime (e.g. SelectionStringValueType includes itemSource).
15
+ * generate-proxy only reflects the interface contract, so keep runtime-only shapes here — not in proxy/.
16
+ * See: modules/feature-management (FeatureDto, StringValueTypeJsonConverter) and Blazor/MVC cast pattern.
17
+ */
18
+ type FeatureWithStyle = FeatureDto & {
19
+ style?: Record<string, number>;
20
+ initialValue: unknown;
21
+ };
12
22
  declare class FeatureManagementComponent {
13
23
  protected readonly track: TrackByService<any>;
14
24
  protected readonly toasterService: ToasterService;
@@ -22,19 +32,14 @@ declare class FeatureManagementComponent {
22
32
  readonly visibleInput: _angular_core.InputSignal<boolean>;
23
33
  readonly visibleChange: _angular_core.OutputEmitterRef<boolean>;
24
34
  protected readonly _visible: _angular_core.WritableSignal<boolean>;
25
- selectedGroupDisplayName: string;
26
- groups: Pick<FeatureGroupDto, 'name' | 'displayName'>[];
27
- features: {
28
- [group: string]: Array<FeatureDto & {
29
- style?: {
30
- [key: string]: number;
31
- };
32
- initialValue: any;
33
- }>;
34
- };
35
+ protected readonly selectedGroupDisplayName: _angular_core.WritableSignal<string>;
36
+ protected readonly groups: _angular_core.WritableSignal<Pick<FeatureGroupDto, "name" | "displayName">[]>;
37
+ protected readonly features: _angular_core.WritableSignal<{
38
+ [group: string]: FeatureWithStyle[];
39
+ }>;
35
40
  valueTypes: typeof ValueTypes;
36
41
  defaultProviderName: string;
37
- modalBusy: boolean;
42
+ protected readonly modalBusy: _angular_core.WritableSignal<boolean>;
38
43
  get visible(): boolean;
39
44
  set visible(value: boolean);
40
45
  constructor();
@@ -43,6 +48,13 @@ declare class FeatureManagementComponent {
43
48
  save(): void;
44
49
  resetToDefault(): void;
45
50
  onCheckboxClick(val: boolean, feature: FeatureDto): void;
51
+ getSelectionItems(feature: FeatureWithStyle): {
52
+ value?: string;
53
+ displayText?: {
54
+ resourceName?: string;
55
+ name?: string;
56
+ };
57
+ }[];
46
58
  isParentDisabled(parentName: string, groupName: string, provider: string): boolean;
47
59
  private uncheckToggleDescendants;
48
60
  private checkToggleAncestors;
@@ -65,13 +77,7 @@ declare class FeatureManagementTabComponent {
65
77
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<FeatureManagementTabComponent, "abp-feature-management-tab", never, {}, {}, never, never, true, never>;
66
78
  }
67
79
 
68
- interface FreeTextType {
69
- valueType: {
70
- validator: {
71
- name: string;
72
- };
73
- };
74
- }
80
+ type FreeTextType = Pick<FeatureDto, 'valueType'>;
75
81
  declare const INPUT_TYPES: Record<string, string>;
76
82
  declare class FreeTextInputDirective {
77
83
  private readonly elRef;