@volo/abp.ng.openiddictpro 10.5.0 → 10.6.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,8 @@ import { signal, computed, inject, Injector, DestroyRef, output, input, Componen
3
3
  import { InternalStore, LocalizationService, SubscriptionService, LocalizationPipe, ListService, ReplaceableTemplateDirective, ReplaceableRouteContainerComponent, authGuard, permissionGuard, RouterOutletComponent, LazyModuleFactory, CoreModule } from '@abp/ng.core';
4
4
  import * as i1$1 from '@angular/router';
5
5
  import { RouterModule } from '@angular/router';
6
- import { of, skip, finalize, filter, switchMap, map as map$1, tap } from 'rxjs';
6
+ import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
7
+ import { of, merge, skip, finalize, filter, switchMap, map as map$1, tap } from 'rxjs';
7
8
  import { ToasterService, ModalCloseDirective, ModalComponent, ButtonComponent, ConfirmationService, Confirmation, ThemeSharedModule } from '@abp/ng.theme.shared';
8
9
  import { PageComponent, PageModule } from '@abp/ng.components/page';
9
10
  import { FormPropData, generateFormFromProps, ExtensibleFormComponent, ExtensibleTableComponent, EXTENSIONS_IDENTIFIER, EntityAction, EntityProp, ToolbarAction, EXTENSIONS_FORM_PROP, FormProp, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps } from '@abp/ng.components/extensible';
@@ -12,7 +13,6 @@ import { AdvancedEntityFiltersComponent, SHOW_ENTITY_HISTORY, CommercialUiModule
12
13
  import { ApplicationService, ScopeService } from '@volo/abp.ng.openiddictpro/proxy';
13
14
  import * as i1 from '@angular/forms';
14
15
  import { FormsModule, ReactiveFormsModule, FormBuilder, Validators, FormGroupDirective } from '@angular/forms';
15
- import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
16
16
  import * as i2 from '@ngx-validate/core';
17
17
  import { NgxValidateCoreModule } from '@ngx-validate/core';
18
18
  import { AsyncPipe } from '@angular/common';
@@ -24,13 +24,22 @@ class ApplicationsService {
24
24
  this.state = new InternalStore({
25
25
  isModalVisible: false,
26
26
  });
27
- this.#isModalVisible = signal(false, ...(ngDevMode ? [{ debugName: "#isModalVisible" }] : /* istanbul ignore next */ []));
28
- this.isModalVisible = computed(() => this.#isModalVisible(), ...(ngDevMode ? [{ debugName: "isModalVisible" }] : /* istanbul ignore next */ []));
29
- this.#isTokenLifetimeModalVisible = signal(false, ...(ngDevMode ? [{ debugName: "#isTokenLifetimeModalVisible" }] : /* istanbul ignore next */ []));
30
- this.isTokenLifetimeModalVisible = computed(() => this.#isTokenLifetimeModalVisible(), ...(ngDevMode ? [{ debugName: "isTokenLifetimeModalVisible" }] : /* istanbul ignore next */ []));
27
+ this.#isModalVisible = signal(false, /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "#isModalVisible" }] : /* istanbul ignore next */ []));
29
+ this.isModalVisible = computed(() => this.#isModalVisible(), /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "isModalVisible" }] : /* istanbul ignore next */ []));
31
+ this.#isTokenLifetimeModalVisible = signal(false, /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "#isTokenLifetimeModalVisible" }] : /* istanbul ignore next */ []));
33
+ this.isTokenLifetimeModalVisible = computed(() => this.#isTokenLifetimeModalVisible(), /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "isTokenLifetimeModalVisible" }] : /* istanbul ignore next */ []));
35
+ this.#isGenerateAccessTokenModalVisible = signal(false, /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "#isGenerateAccessTokenModalVisible" }] : /* istanbul ignore next */ []));
37
+ this.isGenerateAccessTokenModalVisible = computed(() => this.#isGenerateAccessTokenModalVisible(), /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "isGenerateAccessTokenModalVisible" }] : /* istanbul ignore next */ []));
31
39
  }
32
40
  #isModalVisible;
33
41
  #isTokenLifetimeModalVisible;
42
+ #isGenerateAccessTokenModalVisible;
34
43
  openModal() {
35
44
  this.setModalState(true);
36
45
  }
@@ -40,6 +49,9 @@ class ApplicationsService {
40
49
  setTokenLifetimeModalState(value) {
41
50
  this.#isTokenLifetimeModalVisible.set(value);
42
51
  }
52
+ setGenerateAccessTokenModalState(value) {
53
+ this.#isGenerateAccessTokenModalVisible.set(value);
54
+ }
43
55
  }
44
56
 
45
57
  const defaultApplicationsTypeList = [
@@ -115,7 +127,8 @@ class ApplicationFormModalComponent {
115
127
  this.toasterService = inject(ToasterService);
116
128
  this.destroyRef = inject(DestroyRef);
117
129
  this.saved = output();
118
- this.selected = input(undefined, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
130
+ this.selected = input(undefined, /* @ts-ignore */
131
+ ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
119
132
  this.types$ = of(defaultApplicationsTypeList);
120
133
  this.consentTypes$ = of(DefaultApplicationsConsentType);
121
134
  this.options = { size: 'lg' };
@@ -143,6 +156,7 @@ class ApplicationFormModalComponent {
143
156
  this.createForm();
144
157
  this.hideFlowToType();
145
158
  this.togglePushAuthorizationState();
159
+ this.syncDisabledStates();
146
160
  }
147
161
  visibleChange($event) {
148
162
  this.applicationsService.setModalState($event);
@@ -181,10 +195,12 @@ class ApplicationFormModalComponent {
181
195
  else {
182
196
  sub = this.service.create(formValue);
183
197
  }
184
- sub.subscribe(() => {
198
+ sub
199
+ .pipe(takeUntilDestroyed(this.destroyRef))
200
+ .subscribe(() => {
201
+ this.saved.emit();
185
202
  this.applicationsService.setModalState(false);
186
203
  this.toasterService.success('AbpUi::SavedSuccessfully');
187
- this.saved.emit(undefined);
188
204
  });
189
205
  }
190
206
  hideFlowToType() {
@@ -210,6 +226,28 @@ class ApplicationFormModalComponent {
210
226
  }
211
227
  });
212
228
  }
229
+ syncDisabledStates() {
230
+ const { clientType, allowHybridFlow, allowAuthorizationCodeFlow, allowPasswordFlow, forcePushedAuthorization, } = this.form.controls;
231
+ const update = () => {
232
+ const isPublicClient = clientType.value === defaultApplicationTypes.public;
233
+ const isRefreshTokenFlowAllowed = allowHybridFlow.value || allowAuthorizationCodeFlow.value || allowPasswordFlow.value;
234
+ this.setControlDisabled('allowClientCredentialsFlow', isPublicClient);
235
+ this.setControlDisabled('allowDeviceAuthorizationEndpoint', isPublicClient);
236
+ this.setControlDisabled('allowRefreshTokenFlow', !isRefreshTokenFlowAllowed);
237
+ this.setControlDisabled('allowPushedAuthorizationEndpoint', forcePushedAuthorization.value === true);
238
+ };
239
+ update();
240
+ this.subscription.addOne(merge(clientType.valueChanges, allowHybridFlow.valueChanges, allowAuthorizationCodeFlow.valueChanges, allowPasswordFlow.valueChanges, forcePushedAuthorization.valueChanges), update);
241
+ }
242
+ setControlDisabled(controlName, disabled) {
243
+ const control = this.form.controls[controlName];
244
+ if (disabled && control.enabled) {
245
+ control.disable({ emitEvent: false });
246
+ }
247
+ else if (!disabled && control.disabled) {
248
+ control.enable({ emitEvent: false });
249
+ }
250
+ }
213
251
  togglePushAuthorizationState() {
214
252
  const forcePushedAuthorizationControl = this.form.controls['forcePushedAuthorization'];
215
253
  let valueChangeStream = forcePushedAuthorizationControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef));
@@ -237,10 +275,10 @@ class ApplicationFormModalComponent {
237
275
  return this.localizationService.instant(displayName);
238
276
  }
239
277
  }
240
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ApplicationFormModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
241
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: ApplicationFormModalComponent, isStandalone: true, selector: "abp-application-form-modal", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { saved: "saved" }, ngImport: i0, template: "<abp-modal [visible]=\"true\" (visibleChange)=\"visibleChange($event)\" [options]=\"options\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{\r\n (selected()?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewApplication') | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"applicationForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <div class=\"row\">\r\n <abp-extensible-form class=\"row gap-x2\" [selectedRecord]=\"selected()\" />\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"applicationForm\">\r\n {{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "component", type: ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
278
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ApplicationFormModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
279
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: ApplicationFormModalComponent, isStandalone: true, selector: "abp-application-form-modal", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { saved: "saved" }, ngImport: i0, template: "<abp-modal [visible]=\"true\" (visibleChange)=\"visibleChange($event)\" [options]=\"options\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{\r\n (selected()?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewApplication') | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"applicationForm\" (ngSubmit)=\"save()\" [validateOnSubmit]=\"true\">\r\n <div class=\"row\">\r\n <abp-extensible-form class=\"row gap-x2\" [selectedRecord]=\"selected()\" />\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"applicationForm\">\r\n {{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "component", type: ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
242
280
  }
243
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ApplicationFormModalComponent, decorators: [{
281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ApplicationFormModalComponent, decorators: [{
244
282
  type: Component,
245
283
  args: [{ selector: 'abp-application-form-modal', imports: [
246
284
  FormsModule,
@@ -251,7 +289,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
251
289
  ExtensibleFormComponent,
252
290
  ModalComponent,
253
291
  ButtonComponent,
254
- ], template: "<abp-modal [visible]=\"true\" (visibleChange)=\"visibleChange($event)\" [options]=\"options\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{\r\n (selected()?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewApplication') | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"applicationForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <div class=\"row\">\r\n <abp-extensible-form class=\"row gap-x2\" [selectedRecord]=\"selected()\" />\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"applicationForm\">\r\n {{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
292
+ ], template: "<abp-modal [visible]=\"true\" (visibleChange)=\"visibleChange($event)\" [options]=\"options\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{\r\n (selected()?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewApplication') | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"applicationForm\" (ngSubmit)=\"save()\" [validateOnSubmit]=\"true\">\r\n <div class=\"row\">\r\n <abp-extensible-form class=\"row gap-x2\" [selectedRecord]=\"selected()\" />\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"applicationForm\">\r\n {{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
255
293
  }], propDecorators: { saved: [{ type: i0.Output, args: ["saved"] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }] } });
256
294
 
257
295
  class ScopesService {
@@ -284,9 +322,11 @@ class TokenLifetimeModalComponent {
284
322
  this.#service = inject(ApplicationsService);
285
323
  this.#proxyService = inject(ApplicationService);
286
324
  this.#fb = inject(FormBuilder);
287
- this.selected = input(undefined, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
325
+ this.selected = input(undefined, /* @ts-ignore */
326
+ ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
288
327
  this.saved = output();
289
- this.loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
328
+ this.loading = signal(false, /* @ts-ignore */
329
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
290
330
  this.form = this.#fb.group(this.generateTokenLifetimeFormControls());
291
331
  }
292
332
  #service;
@@ -326,10 +366,10 @@ class TokenLifetimeModalComponent {
326
366
  }
327
367
  this.#service.setTokenLifetimeModalState(false);
328
368
  }
329
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TokenLifetimeModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
330
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: TokenLifetimeModalComponent, isStandalone: true, selector: "abp-token-lifetime-modal", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { saved: "saved" }, ngImport: i0, template: "<abp-modal [visible]=\"true\" (visibleChange)=\"visibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpOpenIddict::TokenLifetime' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <medium>\r\n <p class=\"mb-3\">\r\n {{ 'AbpOpenIddict::TokenLifetimeHit' | abpLocalization }}\r\n </p>\r\n </medium>\r\n\r\n <form [formGroup]=\"form\" id=\"applicationForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"accessTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::AccessTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"accessTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"accessTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"authorizationCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::AuthorizationCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"authorizationCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"authorizationCodeLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"deviceCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::DeviceCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"deviceCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"deviceCodeLifetime\"\r\n />\r\n </div>\r\n\r\n <div class=\"form-group mb-3\">\r\n <label for=\"identityTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::IdentityTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"identityTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"identityTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"refreshTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::RefreshTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"refreshTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"refreshTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"userCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::UserCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"userCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"userCodeLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"requestTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::RequestTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"requestTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"requestTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group\">\r\n <label for=\"issuedTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::IssuedTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"issuedTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"issuedTokenLifetime\"\r\n />\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n buttonType=\"submit\"\r\n [disabled]=\"loading()\"\r\n formName=\"applicationForm\"\r\n >{{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i2.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
369
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TokenLifetimeModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
370
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: TokenLifetimeModalComponent, isStandalone: true, selector: "abp-token-lifetime-modal", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { saved: "saved" }, ngImport: i0, template: "<abp-modal [visible]=\"true\" (visibleChange)=\"visibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpOpenIddict::TokenLifetime' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <small>\r\n <p class=\"mb-3\">\r\n {{ 'AbpOpenIddict::TokenLifetimeHit' | abpLocalization }}\r\n </p>\r\n </small>\r\n\r\n <form [formGroup]=\"form\" id=\"applicationForm\" (ngSubmit)=\"save()\" [validateOnSubmit]=\"true\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"accessTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::AccessTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"accessTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"accessTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"authorizationCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::AuthorizationCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"authorizationCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"authorizationCodeLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"deviceCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::DeviceCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"deviceCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"deviceCodeLifetime\"\r\n />\r\n </div>\r\n\r\n <div class=\"form-group mb-3\">\r\n <label for=\"identityTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::IdentityTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"identityTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"identityTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"refreshTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::RefreshTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"refreshTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"refreshTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"userCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::UserCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"userCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"userCodeLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"requestTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::RequestTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"requestTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"requestTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group\">\r\n <label for=\"issuedTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::IssuedTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"issuedTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"issuedTokenLifetime\"\r\n />\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n buttonType=\"submit\"\r\n [disabled]=\"loading()\"\r\n formName=\"applicationForm\"\r\n >{{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NumberValueAccessor, selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i2.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
331
371
  }
332
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TokenLifetimeModalComponent, decorators: [{
372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TokenLifetimeModalComponent, decorators: [{
333
373
  type: Component,
334
374
  args: [{ selector: 'abp-token-lifetime-modal', imports: [
335
375
  FormsModule,
@@ -339,9 +379,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
339
379
  LocalizationPipe,
340
380
  ModalComponent,
341
381
  ButtonComponent,
342
- ], template: "<abp-modal [visible]=\"true\" (visibleChange)=\"visibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpOpenIddict::TokenLifetime' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <medium>\r\n <p class=\"mb-3\">\r\n {{ 'AbpOpenIddict::TokenLifetimeHit' | abpLocalization }}\r\n </p>\r\n </medium>\r\n\r\n <form [formGroup]=\"form\" id=\"applicationForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"accessTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::AccessTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"accessTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"accessTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"authorizationCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::AuthorizationCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"authorizationCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"authorizationCodeLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"deviceCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::DeviceCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"deviceCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"deviceCodeLifetime\"\r\n />\r\n </div>\r\n\r\n <div class=\"form-group mb-3\">\r\n <label for=\"identityTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::IdentityTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"identityTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"identityTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"refreshTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::RefreshTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"refreshTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"refreshTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"userCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::UserCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"userCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"userCodeLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"requestTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::RequestTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"requestTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"requestTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group\">\r\n <label for=\"issuedTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::IssuedTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"issuedTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"issuedTokenLifetime\"\r\n />\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n buttonType=\"submit\"\r\n [disabled]=\"loading()\"\r\n formName=\"applicationForm\"\r\n >{{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
382
+ ], template: "<abp-modal [visible]=\"true\" (visibleChange)=\"visibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpOpenIddict::TokenLifetime' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <small>\r\n <p class=\"mb-3\">\r\n {{ 'AbpOpenIddict::TokenLifetimeHit' | abpLocalization }}\r\n </p>\r\n </small>\r\n\r\n <form [formGroup]=\"form\" id=\"applicationForm\" (ngSubmit)=\"save()\" [validateOnSubmit]=\"true\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"accessTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::AccessTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"accessTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"accessTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"authorizationCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::AuthorizationCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"authorizationCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"authorizationCodeLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"deviceCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::DeviceCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"deviceCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"deviceCodeLifetime\"\r\n />\r\n </div>\r\n\r\n <div class=\"form-group mb-3\">\r\n <label for=\"identityTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::IdentityTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"identityTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"identityTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"refreshTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::RefreshTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"refreshTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"refreshTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"userCodeLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::UserCodeLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"userCodeLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"userCodeLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group mb-3\">\r\n <label for=\"requestTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::RequestTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"requestTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"requestTokenLifetime\"\r\n />\r\n </div>\r\n <div class=\"form-group\">\r\n <label for=\"issuedTokenLifetime\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::IssuedTokenLifetime' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"number\"\r\n id=\"issuedTokenLifetime\"\r\n class=\"form-control\"\r\n formControlName=\"issuedTokenLifetime\"\r\n />\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n buttonType=\"submit\"\r\n [disabled]=\"loading()\"\r\n formName=\"applicationForm\"\r\n >{{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
343
383
  }], propDecorators: { selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], saved: [{ type: i0.Output, args: ["saved"] }] } });
344
384
 
385
+ class GenerateAccessTokenModalComponent {
386
+ constructor() {
387
+ this.toasterService = inject(ToasterService);
388
+ this.#service = inject(ApplicationsService);
389
+ this.#proxyService = inject(ApplicationService);
390
+ this.#fb = inject(FormBuilder);
391
+ this.selected = input(undefined, /* @ts-ignore */
392
+ ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
393
+ this.loading = signal(false, /* @ts-ignore */
394
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
395
+ this.allowedScopes = signal([], /* @ts-ignore */
396
+ ...(ngDevMode ? [{ debugName: "allowedScopes" }] : /* istanbul ignore next */ []));
397
+ this.result = signal(null, /* @ts-ignore */
398
+ ...(ngDevMode ? [{ debugName: "result" }] : /* istanbul ignore next */ []));
399
+ this.form = this.#fb.group({
400
+ clientSecret: ['', Validators.required],
401
+ scopes: this.#fb.array([]),
402
+ });
403
+ }
404
+ #service;
405
+ #proxyService;
406
+ #fb;
407
+ get scopesFormArray() {
408
+ return this.form.get('scopes');
409
+ }
410
+ ngOnInit() {
411
+ const sorted = [...(this.selected()?.scopes ?? [])].sort();
412
+ this.allowedScopes.set(sorted);
413
+ sorted.forEach(() => this.scopesFormArray.push(this.#fb.control(false)));
414
+ }
415
+ generate() {
416
+ if (this.form.invalid) {
417
+ return;
418
+ }
419
+ const id = this.selected()?.id;
420
+ const selectedScopes = this.scopesFormArray.controls
421
+ .map((control, i) => (control.value ? this.allowedScopes()[i] : null))
422
+ .filter((scope) => scope !== null);
423
+ const input = {
424
+ clientSecret: this.form.value.clientSecret,
425
+ scopes: selectedScopes,
426
+ };
427
+ this.result.set(null);
428
+ this.loading.set(true);
429
+ this.#proxyService
430
+ .generateAccessToken(id, input, { skipHandleError: true })
431
+ .pipe(finalize(() => this.loading.set(false)))
432
+ .subscribe({
433
+ next: res => this.result.set(res),
434
+ error: err => {
435
+ const message = err?.error?.error?.message ||
436
+ err?.message ||
437
+ 'AbpOpenIddict::FailedToGenerateAccessToken';
438
+ this.toasterService.warn(message);
439
+ },
440
+ });
441
+ }
442
+ copyToken() {
443
+ const token = this.result()?.accessToken;
444
+ if (!token) {
445
+ return;
446
+ }
447
+ navigator.clipboard
448
+ .writeText(token)
449
+ .then(() => this.toasterService.success('AbpOpenIddict::Copied'))
450
+ .catch(() => this.toasterService.error('AbpOpenIddict::FailedToCopyToClipboard'));
451
+ }
452
+ visibleChange($event) {
453
+ if ($event) {
454
+ return;
455
+ }
456
+ this.#service.setGenerateAccessTokenModalState(false);
457
+ }
458
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: GenerateAccessTokenModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
459
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: GenerateAccessTokenModalComponent, isStandalone: true, selector: "abp-generate-access-token-modal", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<abp-modal [visible]=\"true\" (visibleChange)=\"visibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpOpenIddict::GenerateAccessToken' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"row mb-3\">\r\n <div class=\"col-md-6\">\r\n <div class=\"text-muted small\">{{ 'AbpOpenIddict::ClientId' | abpLocalization }}</div>\r\n <div class=\"fw-semibold text-break\">{{ selected()?.clientId }}</div>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <div class=\"text-muted small\">{{ 'AbpOpenIddict::DisplayName' | abpLocalization }}</div>\r\n <div class=\"fw-semibold text-break\">{{ selected()?.displayName || '\u2014' }}</div>\r\n </div>\r\n </div>\r\n\r\n <form [formGroup]=\"form\" id=\"generateAccessTokenForm\" (ngSubmit)=\"generate()\" [validateOnSubmit]=\"true\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"clientSecret\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::ClientSecret' | abpLocalization }}\r\n <span class=\"text-danger\">*</span>\r\n </label>\r\n <input\r\n type=\"password\"\r\n id=\"clientSecret\"\r\n class=\"form-control\"\r\n formControlName=\"clientSecret\"\r\n autocomplete=\"off\"\r\n />\r\n </div>\r\n\r\n <div class=\"form-group mb-3\">\r\n <label class=\"form-label\">{{ 'AbpOpenIddict::SelectScopes' | abpLocalization }}</label>\r\n @if (allowedScopes().length === 0) {\r\n <div class=\"text-muted small\">\r\n {{ 'AbpOpenIddict::NoAllowedScopesForApplication' | abpLocalization }}\r\n </div>\r\n } @else {\r\n <div formArrayName=\"scopes\" class=\"row\">\r\n @for (scope of allowedScopes(); track scope; let i = $index) {\r\n <div class=\"col-sm-6 col-md-4\">\r\n <div class=\"form-check\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n id=\"scope-{{ scope }}\"\r\n [formControlName]=\"i\"\r\n />\r\n <label class=\"form-check-label\" for=\"scope-{{ scope }}\">{{ scope }}</label>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n\r\n @if (result()) {\r\n <hr />\r\n <div class=\"form-group mb-3\">\r\n <div class=\"d-flex justify-content-between align-items-center mb-1\">\r\n <label class=\"form-label mb-0\">\r\n {{ 'AbpOpenIddict::AccessToken' | abpLocalization }}\r\n </label>\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary\" (click)=\"copyToken()\">\r\n <i class=\"fa fa-copy\"></i>\r\n {{ 'AbpOpenIddict::CopyToClipboard' | abpLocalization }}\r\n </button>\r\n </div>\r\n <textarea\r\n class=\"form-control font-monospace small\"\r\n rows=\"6\"\r\n readonly\r\n [value]=\"result().accessToken\"\r\n ></textarea>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-4\">\r\n <div class=\"text-muted small\">{{ 'AbpOpenIddict::TokenType' | abpLocalization }}</div>\r\n <div class=\"fw-semibold\">{{ result().tokenType || '\u2014' }}</div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"text-muted small\">{{ 'AbpOpenIddict::ExpiresIn' | abpLocalization }}</div>\r\n <div class=\"fw-semibold\">{{ result().expiresIn ?? '\u2014' }}</div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"text-muted small\">{{ 'AbpOpenIddict::Scope' | abpLocalization }}</div>\r\n <div class=\"fw-semibold text-break\">{{ result().scope || '\u2014' }}</div>\r\n </div>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-key\"\r\n buttonType=\"submit\"\r\n [disabled]=\"loading()\"\r\n formName=\"generateAccessTokenForm\"\r\n >\r\n {{ 'AbpOpenIddict::GenerateAccessToken' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i2.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
460
+ }
461
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: GenerateAccessTokenModalComponent, decorators: [{
462
+ type: Component,
463
+ args: [{ selector: 'abp-generate-access-token-modal', imports: [
464
+ FormsModule,
465
+ ReactiveFormsModule,
466
+ NgxValidateCoreModule,
467
+ ModalCloseDirective,
468
+ LocalizationPipe,
469
+ ModalComponent,
470
+ ButtonComponent,
471
+ ], template: "<abp-modal [visible]=\"true\" (visibleChange)=\"visibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpOpenIddict::GenerateAccessToken' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"row mb-3\">\r\n <div class=\"col-md-6\">\r\n <div class=\"text-muted small\">{{ 'AbpOpenIddict::ClientId' | abpLocalization }}</div>\r\n <div class=\"fw-semibold text-break\">{{ selected()?.clientId }}</div>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <div class=\"text-muted small\">{{ 'AbpOpenIddict::DisplayName' | abpLocalization }}</div>\r\n <div class=\"fw-semibold text-break\">{{ selected()?.displayName || '\u2014' }}</div>\r\n </div>\r\n </div>\r\n\r\n <form [formGroup]=\"form\" id=\"generateAccessTokenForm\" (ngSubmit)=\"generate()\" [validateOnSubmit]=\"true\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"clientSecret\" class=\"form-label\">\r\n {{ 'AbpOpenIddict::ClientSecret' | abpLocalization }}\r\n <span class=\"text-danger\">*</span>\r\n </label>\r\n <input\r\n type=\"password\"\r\n id=\"clientSecret\"\r\n class=\"form-control\"\r\n formControlName=\"clientSecret\"\r\n autocomplete=\"off\"\r\n />\r\n </div>\r\n\r\n <div class=\"form-group mb-3\">\r\n <label class=\"form-label\">{{ 'AbpOpenIddict::SelectScopes' | abpLocalization }}</label>\r\n @if (allowedScopes().length === 0) {\r\n <div class=\"text-muted small\">\r\n {{ 'AbpOpenIddict::NoAllowedScopesForApplication' | abpLocalization }}\r\n </div>\r\n } @else {\r\n <div formArrayName=\"scopes\" class=\"row\">\r\n @for (scope of allowedScopes(); track scope; let i = $index) {\r\n <div class=\"col-sm-6 col-md-4\">\r\n <div class=\"form-check\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n id=\"scope-{{ scope }}\"\r\n [formControlName]=\"i\"\r\n />\r\n <label class=\"form-check-label\" for=\"scope-{{ scope }}\">{{ scope }}</label>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n\r\n @if (result()) {\r\n <hr />\r\n <div class=\"form-group mb-3\">\r\n <div class=\"d-flex justify-content-between align-items-center mb-1\">\r\n <label class=\"form-label mb-0\">\r\n {{ 'AbpOpenIddict::AccessToken' | abpLocalization }}\r\n </label>\r\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary\" (click)=\"copyToken()\">\r\n <i class=\"fa fa-copy\"></i>\r\n {{ 'AbpOpenIddict::CopyToClipboard' | abpLocalization }}\r\n </button>\r\n </div>\r\n <textarea\r\n class=\"form-control font-monospace small\"\r\n rows=\"6\"\r\n readonly\r\n [value]=\"result().accessToken\"\r\n ></textarea>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-4\">\r\n <div class=\"text-muted small\">{{ 'AbpOpenIddict::TokenType' | abpLocalization }}</div>\r\n <div class=\"fw-semibold\">{{ result().tokenType || '\u2014' }}</div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"text-muted small\">{{ 'AbpOpenIddict::ExpiresIn' | abpLocalization }}</div>\r\n <div class=\"fw-semibold\">{{ result().expiresIn ?? '\u2014' }}</div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"text-muted small\">{{ 'AbpOpenIddict::Scope' | abpLocalization }}</div>\r\n <div class=\"fw-semibold text-break\">{{ result().scope || '\u2014' }}</div>\r\n </div>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-key\"\r\n buttonType=\"submit\"\r\n [disabled]=\"loading()\"\r\n formName=\"generateAccessTokenForm\"\r\n >\r\n {{ 'AbpOpenIddict::GenerateAccessToken' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
472
+ }], propDecorators: { selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }] } });
473
+
345
474
  class ApplicationsComponent {
346
475
  constructor() {
347
476
  this.service = inject(ApplicationsService);
@@ -349,11 +478,18 @@ class ApplicationsComponent {
349
478
  this.proxyService = inject(ApplicationService);
350
479
  this.toasterService = inject(ToasterService);
351
480
  this.list = inject(ListService);
352
- this.data = { items: [], totalCount: 0 };
353
- this.selected = signal({}, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
354
- this.visiblePermissions = false;
481
+ this.data = toSignal(this.list.hookToQuery(query => this.proxyService.getList(query)), {
482
+ initialValue: {
483
+ items: [],
484
+ totalCount: 0,
485
+ },
486
+ });
487
+ this.selected = signal({}, /* @ts-ignore */
488
+ ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
489
+ this.visiblePermissions = signal(false, /* @ts-ignore */
490
+ ...(ngDevMode ? [{ debugName: "visiblePermissions" }] : /* istanbul ignore next */ []));
355
491
  this.onVisiblePermissionChange = (value) => {
356
- this.visiblePermissions = value;
492
+ this.visiblePermissions.set(value);
357
493
  };
358
494
  }
359
495
  onSaved() {
@@ -376,38 +512,32 @@ class ApplicationsComponent {
376
512
  this.list.get();
377
513
  });
378
514
  }
379
- ngOnInit() {
380
- this.hookToQuery();
381
- }
382
515
  onAdd() {
383
516
  this.selected.set({});
384
517
  this.service.openModal();
385
518
  }
386
519
  openPermissionsModal(providerKey) {
387
520
  this.providerKey = providerKey;
388
- setTimeout(() => {
389
- this.visiblePermissions = true;
390
- }, 0);
391
- }
392
- hookToQuery() {
393
- this.list
394
- .hookToQuery(query => this.proxyService.getList(query))
395
- .subscribe(res => (this.data = res));
521
+ this.visiblePermissions.set(true);
396
522
  }
397
523
  openTokenLifetimeModal(record) {
398
524
  this.selected.set(record);
399
525
  this.service.setTokenLifetimeModalState(true);
400
526
  }
401
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ApplicationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
402
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ApplicationsComponent, isStandalone: true, selector: "abp-applications", providers: [
527
+ openGenerateAccessTokenModal(record) {
528
+ this.selected.set(record);
529
+ this.service.setGenerateAccessTokenModalState(true);
530
+ }
531
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ApplicationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
532
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: ApplicationsComponent, isStandalone: true, selector: "abp-applications", providers: [
403
533
  ListService,
404
534
  {
405
535
  provide: EXTENSIONS_IDENTIFIER,
406
536
  useValue: "OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */,
407
537
  },
408
- ], ngImport: i0, template: "<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters localizationSourceName=\"AbpOpenIddict\" [list]=\"list\" />\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table [data]=\"data.items\" [recordsTotal]=\"data.totalCount\" [list]=\"list\" />\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n@if (service.isModalVisible()) {\r\n <abp-application-form-modal [selected]=\"selected()\" (saved)=\"onSaved()\" />\r\n}\r\n\r\n@if (service.isTokenLifetimeModalVisible()) {\r\n <abp-token-lifetime-modal [selected]=\"selected()\" />\r\n}\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'C' },\r\n providerKey: { value: providerKey },\r\n visible: { value: visiblePermissions, twoWay: true },\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent',\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n providerName=\"C\"\r\n [providerKey]=\"providerKey\"\r\n/>\r\n", dependencies: [{ kind: "directive", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "component", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate", "selectable", "selectionType", "selected", "infiniteScroll", "isLoading", "scrollThreshold", "tableHeight", "rowDetailTemplate", "rowDetailHeight"], outputs: ["tableActivate", "selectionChange", "loadMore", "rowDetailToggle"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: ApplicationFormModalComponent, selector: "abp-application-form-modal", inputs: ["selected"], outputs: ["saved"] }, { kind: "component", type: TokenLifetimeModalComponent, selector: "abp-token-lifetime-modal", inputs: ["selected"], outputs: ["saved"] }, { kind: "component", type: PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "entityDisplayName", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
538
+ ], ngImport: i0, template: "<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data().items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters localizationSourceName=\"AbpOpenIddict\" [list]=\"list\" />\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data().items\"\r\n [recordsTotal]=\"data().totalCount\"\r\n [list]=\"list\"\r\n />\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n@if (service.isModalVisible()) {\r\n <abp-application-form-modal [selected]=\"selected()\" (saved)=\"onSaved()\" />\r\n}\r\n\r\n@if (service.isTokenLifetimeModalVisible()) {\r\n <abp-token-lifetime-modal [selected]=\"selected()\" />\r\n}\r\n\r\n@if (service.isGenerateAccessTokenModalVisible()) {\r\n <abp-generate-access-token-modal [selected]=\"selected()\" />\r\n}\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'C' },\r\n providerKey: { value: providerKey },\r\n visible: { value: visiblePermissions(), twoWay: true },\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent',\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n providerName=\"C\"\r\n [providerKey]=\"providerKey\"\r\n/>\r\n", dependencies: [{ kind: "directive", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "component", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate", "selectable", "selectionType", "selected", "infiniteScroll", "isLoading", "scrollThreshold", "tableHeight", "rowDetailTemplate", "rowDetailHeight"], outputs: ["tableActivate", "selectionChange", "loadMore", "rowDetailToggle"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: ApplicationFormModalComponent, selector: "abp-application-form-modal", inputs: ["selected"], outputs: ["saved"] }, { kind: "component", type: TokenLifetimeModalComponent, selector: "abp-token-lifetime-modal", inputs: ["selected"], outputs: ["saved"] }, { kind: "component", type: GenerateAccessTokenModalComponent, selector: "abp-generate-access-token-modal", inputs: ["selected"] }, { kind: "component", type: PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "entityDisplayName", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
409
539
  }
410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ApplicationsComponent, decorators: [{
540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ApplicationsComponent, decorators: [{
411
541
  type: Component,
412
542
  args: [{ selector: 'abp-applications', providers: [
413
543
  ListService,
@@ -422,9 +552,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
422
552
  ExtensibleTableComponent,
423
553
  ApplicationFormModalComponent,
424
554
  TokenLifetimeModalComponent,
555
+ GenerateAccessTokenModalComponent,
425
556
  PageComponent,
426
557
  PermissionManagementComponent,
427
- ], template: "<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters localizationSourceName=\"AbpOpenIddict\" [list]=\"list\" />\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table [data]=\"data.items\" [recordsTotal]=\"data.totalCount\" [list]=\"list\" />\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n@if (service.isModalVisible()) {\r\n <abp-application-form-modal [selected]=\"selected()\" (saved)=\"onSaved()\" />\r\n}\r\n\r\n@if (service.isTokenLifetimeModalVisible()) {\r\n <abp-token-lifetime-modal [selected]=\"selected()\" />\r\n}\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'C' },\r\n providerKey: { value: providerKey },\r\n visible: { value: visiblePermissions, twoWay: true },\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent',\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n providerName=\"C\"\r\n [providerKey]=\"providerKey\"\r\n/>\r\n" }]
558
+ ], template: "<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data().items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters localizationSourceName=\"AbpOpenIddict\" [list]=\"list\" />\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data().items\"\r\n [recordsTotal]=\"data().totalCount\"\r\n [list]=\"list\"\r\n />\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n@if (service.isModalVisible()) {\r\n <abp-application-form-modal [selected]=\"selected()\" (saved)=\"onSaved()\" />\r\n}\r\n\r\n@if (service.isTokenLifetimeModalVisible()) {\r\n <abp-token-lifetime-modal [selected]=\"selected()\" />\r\n}\r\n\r\n@if (service.isGenerateAccessTokenModalVisible()) {\r\n <abp-generate-access-token-modal [selected]=\"selected()\" />\r\n}\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'C' },\r\n providerKey: { value: providerKey },\r\n visible: { value: visiblePermissions(), twoWay: true },\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent',\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n providerName=\"C\"\r\n [providerKey]=\"providerKey\"\r\n/>\r\n" }]
428
559
  }] });
429
560
 
430
561
  class ScopeFormModalComponent {
@@ -433,7 +564,8 @@ class ScopeFormModalComponent {
433
564
  this.scopesService = inject(ScopesService);
434
565
  this.service = inject(ScopeService);
435
566
  this.toasterService = inject(ToasterService);
436
- this.selected = input(undefined, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
567
+ this.selected = input(undefined, /* @ts-ignore */
568
+ ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
437
569
  this.saved = output();
438
570
  this.blueprints = { pattern: 'AbpOpenIddict::TheScopeNameCannotContainSpaces' };
439
571
  this.isModalVisible$ = this.scopesService.isModalVisible$;
@@ -472,10 +604,10 @@ class ScopeFormModalComponent {
472
604
  const data = new FormPropData(this.injector, selected);
473
605
  this.form = generateFormFromProps(data);
474
606
  }
475
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ScopeFormModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
476
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: ScopeFormModalComponent, isStandalone: true, selector: "abp-scope-form-modal", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { saved: "saved" }, usesOnChanges: true, ngImport: i0, template: "<abp-modal [visible]=\"isModalVisible$ | async\" (visibleChange)=\"visibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ (selected()?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewScope') | abpLocalization }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form\r\n [formGroup]=\"form\"\r\n id=\"scopeForm\"\r\n [blueprints]=\"blueprints\"\r\n (ngSubmit)=\"save()\"\r\n validateOnSubmit\r\n >\r\n <abp-extensible-form [selectedRecord]=\"selected()\" />\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"scopeForm\"\r\n >{{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "component", type: ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
607
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ScopeFormModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
608
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: ScopeFormModalComponent, isStandalone: true, selector: "abp-scope-form-modal", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { saved: "saved" }, usesOnChanges: true, ngImport: i0, template: "<abp-modal [visible]=\"isModalVisible$ | async\" (visibleChange)=\"visibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ (selected()?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewScope') | abpLocalization }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form\r\n [formGroup]=\"form\"\r\n id=\"scopeForm\"\r\n [blueprints]=\"blueprints\"\r\n (ngSubmit)=\"save()\"\r\n [validateOnSubmit]=\"true\"\r\n >\r\n <abp-extensible-form [selectedRecord]=\"selected()\" />\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"scopeForm\"\r\n >{{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "component", type: ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
477
609
  }
478
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ScopeFormModalComponent, decorators: [{
610
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ScopeFormModalComponent, decorators: [{
479
611
  type: Component,
480
612
  args: [{ selector: 'abp-scope-form-modal', imports: [
481
613
  FormsModule,
@@ -487,7 +619,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
487
619
  ExtensibleFormComponent,
488
620
  ModalComponent,
489
621
  ButtonComponent,
490
- ], template: "<abp-modal [visible]=\"isModalVisible$ | async\" (visibleChange)=\"visibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ (selected()?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewScope') | abpLocalization }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form\r\n [formGroup]=\"form\"\r\n id=\"scopeForm\"\r\n [blueprints]=\"blueprints\"\r\n (ngSubmit)=\"save()\"\r\n validateOnSubmit\r\n >\r\n <abp-extensible-form [selectedRecord]=\"selected()\" />\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"scopeForm\"\r\n >{{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
622
+ ], template: "<abp-modal [visible]=\"isModalVisible$ | async\" (visibleChange)=\"visibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ (selected()?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewScope') | abpLocalization }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form\r\n [formGroup]=\"form\"\r\n id=\"scopeForm\"\r\n [blueprints]=\"blueprints\"\r\n (ngSubmit)=\"save()\"\r\n [validateOnSubmit]=\"true\"\r\n >\r\n <abp-extensible-form [selectedRecord]=\"selected()\" />\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-outline-primary\" abpClose>\r\n {{ 'AbpOpenIddict::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"scopeForm\"\r\n >{{ 'AbpOpenIddict::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
491
623
  }], propDecorators: { selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], saved: [{ type: i0.Output, args: ["saved"] }] } });
492
624
 
493
625
  class ScopesComponent {
@@ -497,15 +629,11 @@ class ScopesComponent {
497
629
  this.toasterService = inject(ToasterService);
498
630
  this.service = inject(ScopeService);
499
631
  this.scopesService = inject(ScopesService);
500
- this.data = { items: [], totalCount: 0 };
632
+ this.data = toSignal(this.list.hookToQuery(query => this.service.getList(query)), {
633
+ initialValue: { items: [], totalCount: 0 },
634
+ });
501
635
  this.selected = {};
502
636
  }
503
- hookToQuery() {
504
- this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res));
505
- }
506
- ngOnInit() {
507
- this.hookToQuery();
508
- }
509
637
  onAdd() {
510
638
  this.selected = {};
511
639
  this.scopesService.openModal();
@@ -533,16 +661,16 @@ class ScopesComponent {
533
661
  onSaved() {
534
662
  this.list.get();
535
663
  }
536
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ScopesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
537
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: ScopesComponent, isStandalone: true, selector: "abp-scopes", providers: [
664
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ScopesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
665
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: ScopesComponent, isStandalone: true, selector: "abp-scopes", providers: [
538
666
  ListService,
539
667
  {
540
668
  provide: EXTENSIONS_IDENTIFIER,
541
669
  useValue: "OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */,
542
670
  },
543
- ], ngImport: i0, template: "<abp-page [title]=\"'AbpOpenIddict::Scopes' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters localizationSourceName=\"AbpOpenIddict\" [list]=\"list\" />\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table [data]=\"data.items\" [recordsTotal]=\"data.totalCount\" [list]=\"list\" />\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-scope-form-modal [selected]=\"selected\" (saved)=\"onSaved()\" />\r\n", dependencies: [{ kind: "component", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate", "selectable", "selectionType", "selected", "infiniteScroll", "isLoading", "scrollThreshold", "tableHeight", "rowDetailTemplate", "rowDetailHeight"], outputs: ["tableActivate", "selectionChange", "loadMore", "rowDetailToggle"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: ScopeFormModalComponent, selector: "abp-scope-form-modal", inputs: ["selected"], outputs: ["saved"] }, { kind: "component", type: AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "component", type: PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
671
+ ], ngImport: i0, template: "<abp-page [title]=\"'AbpOpenIddict::Scopes' | abpLocalization\" [toolbar]=\"data().items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters localizationSourceName=\"AbpOpenIddict\" [list]=\"list\" />\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data().items\"\r\n [recordsTotal]=\"data().totalCount\"\r\n [list]=\"list\"\r\n />\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-scope-form-modal [selected]=\"selected\" (saved)=\"onSaved()\" />\r\n", dependencies: [{ kind: "component", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate", "selectable", "selectionType", "selected", "infiniteScroll", "isLoading", "scrollThreshold", "tableHeight", "rowDetailTemplate", "rowDetailHeight"], outputs: ["tableActivate", "selectionChange", "loadMore", "rowDetailToggle"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: ScopeFormModalComponent, selector: "abp-scope-form-modal", inputs: ["selected"], outputs: ["saved"] }, { kind: "component", type: AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "component", type: PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
544
672
  }
545
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ScopesComponent, decorators: [{
673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ScopesComponent, decorators: [{
546
674
  type: Component,
547
675
  args: [{ selector: 'abp-scopes', providers: [
548
676
  ListService,
@@ -556,7 +684,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
556
684
  ScopeFormModalComponent,
557
685
  AdvancedEntityFiltersComponent,
558
686
  PageComponent,
559
- ], template: "<abp-page [title]=\"'AbpOpenIddict::Scopes' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters localizationSourceName=\"AbpOpenIddict\" [list]=\"list\" />\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table [data]=\"data.items\" [recordsTotal]=\"data.totalCount\" [list]=\"list\" />\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-scope-form-modal [selected]=\"selected\" (saved)=\"onSaved()\" />\r\n" }]
687
+ ], template: "<abp-page [title]=\"'AbpOpenIddict::Scopes' | abpLocalization\" [toolbar]=\"data().items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters localizationSourceName=\"AbpOpenIddict\" [list]=\"list\" />\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data().items\"\r\n [recordsTotal]=\"data().totalCount\"\r\n [list]=\"list\"\r\n />\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-scope-form-modal [selected]=\"selected\" (saved)=\"onSaved()\" />\r\n" }]
560
688
  }] });
561
689
 
562
690
  const DEFAULT_APPLICATIONS_ENTITY_ACTIONS = EntityAction.createMany([
@@ -576,6 +704,16 @@ const DEFAULT_APPLICATIONS_ENTITY_ACTIONS = EntityAction.createMany([
576
704
  },
577
705
  permission: 'OpenIddictPro.Application.Update',
578
706
  },
707
+ {
708
+ text: 'AbpOpenIddict::GenerateAccessToken',
709
+ action: data => {
710
+ const component = data.getInjected(ApplicationsComponent);
711
+ component.openGenerateAccessTokenModal(data.record);
712
+ },
713
+ permission: 'OpenIddictPro.Application.GenerateAccessToken',
714
+ visible: data => !!data?.record?.allowClientCredentialsFlow &&
715
+ data?.record?.clientType === 'confidential',
716
+ },
579
717
  {
580
718
  text: 'AbpOpenIddict::ChangeHistory',
581
719
  action: data => {
@@ -684,8 +822,8 @@ class ApplicationClientAuthMethodFieldComponent {
684
822
  this.jsonWebKeySetControl = jwksCtrl;
685
823
  this.authMethod = toSignal(this.clientAuthMethodControl.valueChanges.pipe(startWith(this.clientAuthMethodControl.value), map((v) => v ?? defaultClientAuthenticationMethods.secret)), { initialValue: defaultClientAuthenticationMethods.secret });
686
824
  }
687
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ApplicationClientAuthMethodFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
688
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ApplicationClientAuthMethodFieldComponent, isStandalone: true, selector: "abp-application-client-auth-method-field", ngImport: i0, template: `
825
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ApplicationClientAuthMethodFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
826
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: ApplicationClientAuthMethodFieldComponent, isStandalone: true, selector: "abp-application-client-auth-method-field", ngImport: i0, template: `
689
827
  <div [id]="prop.id + '-radios'" class="mb-1 form-group" validationTarget>
690
828
  @if (prop.displayName) {
691
829
  <label class="form-label d-block">{{ prop.displayName | abpLocalization }}</label>
@@ -751,9 +889,9 @@ class ApplicationClientAuthMethodFieldComponent {
751
889
  }}</small>
752
890
  </div>
753
891
  }
754
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }, { kind: "directive", type: i2.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
892
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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.RadioControlValueAccessor, selector: "input[type=radio]:not([ngNoCva])[formControlName],input[type=radio]:not([ngNoCva])[formControl],input[type=radio]:not([ngNoCva])[ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }, { kind: "directive", type: i2.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
755
893
  }
756
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ApplicationClientAuthMethodFieldComponent, decorators: [{
894
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ApplicationClientAuthMethodFieldComponent, decorators: [{
757
895
  type: Component,
758
896
  args: [{
759
897
  selector: 'abp-application-client-auth-method-field',
@@ -911,8 +1049,8 @@ const DEFAULT_APPLICATIONS_CREATE_FORM_PROPS = FormProp.createMany([
911
1049
  defaultValue: defaultClientAuthenticationMethods.secret,
912
1050
  template: ApplicationClientAuthMethodFieldComponent,
913
1051
  visible: data => {
914
- const formValue = data.getInjected(ApplicationFormModalComponent).getFormValue();
915
- return formValue.clientType === defaultApplicationTypes.confidential;
1052
+ const { clientType } = data.getInjected(ApplicationFormModalComponent).getFormValue();
1053
+ return clientType === defaultApplicationTypes.confidential;
916
1054
  },
917
1055
  group: groupLeft,
918
1056
  className: className,
@@ -983,8 +1121,8 @@ const DEFAULT_APPLICATIONS_CREATE_FORM_PROPS = FormProp.createMany([
983
1121
  .changeTextToType('AbpOpenIddict::AllowClientCredentialsFlow');
984
1122
  },
985
1123
  disabled: data => {
986
- const formValue = data.getInjected(ApplicationFormModalComponent).getFormValue();
987
- return formValue.type === defaultApplicationTypes.public;
1124
+ const { clientType } = data.getInjected(ApplicationFormModalComponent).getFormValue();
1125
+ return clientType === defaultApplicationTypes.public;
988
1126
  },
989
1127
  id: 'allowClientCredentialsFlow',
990
1128
  group: groupRight,
@@ -1319,11 +1457,11 @@ const routes = [
1319
1457
  },
1320
1458
  ];
1321
1459
  class OpeniddictproRoutingModule {
1322
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: OpeniddictproRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1323
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.17", ngImport: i0, type: OpeniddictproRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
1324
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: OpeniddictproRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
1460
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: OpeniddictproRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1461
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: OpeniddictproRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
1462
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: OpeniddictproRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
1325
1463
  }
1326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: OpeniddictproRoutingModule, decorators: [{
1464
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: OpeniddictproRoutingModule, decorators: [{
1327
1465
  type: NgModule,
1328
1466
  args: [{
1329
1467
  imports: [RouterModule.forChild(routes)],
@@ -1373,8 +1511,8 @@ class OpeniddictproModule {
1373
1511
  static forLazy(options = {}) {
1374
1512
  return new LazyModuleFactory(OpeniddictproModule.forChild(options));
1375
1513
  }
1376
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: OpeniddictproModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1377
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.17", ngImport: i0, type: OpeniddictproModule, imports: [OpeniddictproRoutingModule,
1514
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: OpeniddictproModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1515
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: OpeniddictproModule, imports: [OpeniddictproRoutingModule,
1378
1516
  CoreModule,
1379
1517
  CommercialUiModule,
1380
1518
  ThemeSharedModule,
@@ -1393,7 +1531,7 @@ class OpeniddictproModule {
1393
1531
  ApplicationFormModalComponent,
1394
1532
  ScopesComponent,
1395
1533
  ScopeFormModalComponent] }); }
1396
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: OpeniddictproModule, imports: [OpeniddictproRoutingModule,
1534
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: OpeniddictproModule, imports: [OpeniddictproRoutingModule,
1397
1535
  CoreModule,
1398
1536
  CommercialUiModule,
1399
1537
  ThemeSharedModule,
@@ -1407,7 +1545,7 @@ class OpeniddictproModule {
1407
1545
  ExtensibleTableComponent,
1408
1546
  ApplicationClientAuthMethodFieldComponent, components] }); }
1409
1547
  }
1410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: OpeniddictproModule, decorators: [{
1548
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: OpeniddictproModule, decorators: [{
1411
1549
  type: NgModule,
1412
1550
  args: [{
1413
1551
  imports: [
@@ -1521,10 +1659,10 @@ class OpenIddictProExtensionsGuard {
1521
1659
  mergeWithDefaultProps(extensions.editFormProps, DEFAULT_OPENIDDICT_PRO_EDIT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
1522
1660
  }), mapTo(true));
1523
1661
  }
1524
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: OpenIddictProExtensionsGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1525
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: OpenIddictProExtensionsGuard }); }
1662
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: OpenIddictProExtensionsGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1663
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: OpenIddictProExtensionsGuard }); }
1526
1664
  }
1527
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: OpenIddictProExtensionsGuard, decorators: [{
1665
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: OpenIddictProExtensionsGuard, decorators: [{
1528
1666
  type: Injectable
1529
1667
  }] });
1530
1668
 
@@ -1532,5 +1670,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
1532
1670
  * Generated bundle index. Do not edit.
1533
1671
  */
1534
1672
 
1535
- export { ApplicationClientAuthMethodFieldComponent, ApplicationFormModalComponent, ApplicationsComponent, ApplicationsService, DEFAULT_APPLICATIONS_CREATE_FORM_PROPS, DEFAULT_APPLICATIONS_ENTITY_ACTIONS, DEFAULT_APPLICATIONS_ENTITY_PROPS, DEFAULT_APPLICATIONS_FORM_PROPS, DEFAULT_APPLICATIONS_TOOLBAR_ACTIONS, DEFAULT_OPENIDDICT_PRO_CREATE_FORM_PROPS, DEFAULT_OPENIDDICT_PRO_EDIT_FORM_PROPS, DEFAULT_OPENIDDICT_PRO_ENTITY_ACTIONS, DEFAULT_OPENIDDICT_PRO_ENTITY_PROPS, DEFAULT_OPENIDDICT_PRO_TOOLBAR_ACTIONS, DEFAULT_SCOPES_ENTITY_PROPS, DEFAULT_SCOPES_FORM_PROPS, DEFAULT_SCOPES_TOOLBAR_ACTIONS, DEFAULT_SCOPE_CREATE_FORM_PROPS, DEFAULT_SCOPE_ENTITY_ACTIONS, DefaultApplicationsConsentType, OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS, OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS, OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS, OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS, OPENIDDICT_PRO_TOOLBAR_ACTION_CONTRIBUTORS, OpenIddictProExtensionsGuard, OpeniddictproModule, ScopeFormModalComponent, ScopesComponent, ScopesService, TokenLifetimeModalComponent, UrisValidator, allowFlow, createRoutes, defaultApplicationTypes, defaultApplicationTypesList, defaultApplicationsTypeList, defaultClientAuthenticationMethods, defaultUriPattern, hashSetParser };
1673
+ export { ApplicationClientAuthMethodFieldComponent, ApplicationFormModalComponent, ApplicationsComponent, ApplicationsService, DEFAULT_APPLICATIONS_CREATE_FORM_PROPS, DEFAULT_APPLICATIONS_ENTITY_ACTIONS, DEFAULT_APPLICATIONS_ENTITY_PROPS, DEFAULT_APPLICATIONS_FORM_PROPS, DEFAULT_APPLICATIONS_TOOLBAR_ACTIONS, DEFAULT_OPENIDDICT_PRO_CREATE_FORM_PROPS, DEFAULT_OPENIDDICT_PRO_EDIT_FORM_PROPS, DEFAULT_OPENIDDICT_PRO_ENTITY_ACTIONS, DEFAULT_OPENIDDICT_PRO_ENTITY_PROPS, DEFAULT_OPENIDDICT_PRO_TOOLBAR_ACTIONS, DEFAULT_SCOPES_ENTITY_PROPS, DEFAULT_SCOPES_FORM_PROPS, DEFAULT_SCOPES_TOOLBAR_ACTIONS, DEFAULT_SCOPE_CREATE_FORM_PROPS, DEFAULT_SCOPE_ENTITY_ACTIONS, DefaultApplicationsConsentType, GenerateAccessTokenModalComponent, OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS, OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS, OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS, OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS, OPENIDDICT_PRO_TOOLBAR_ACTION_CONTRIBUTORS, OpenIddictProExtensionsGuard, OpeniddictproModule, ScopeFormModalComponent, ScopesComponent, ScopesService, TokenLifetimeModalComponent, UrisValidator, allowFlow, createRoutes, defaultApplicationTypes, defaultApplicationTypesList, defaultApplicationsTypeList, defaultClientAuthenticationMethods, defaultUriPattern, hashSetParser };
1536
1674
  //# sourceMappingURL=volo-abp.ng.openiddictpro.mjs.map