@volo/abp.ng.openiddictpro 9.2.1 → 9.3.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/volo-abp.ng.openiddictpro.mjs +225 -122
- package/fesm2022/volo-abp.ng.openiddictpro.mjs.map +1 -1
- package/lib/components/application-form-modal/application-form-modal.component.d.ts +4 -4
- package/lib/components/applications/applications.component.d.ts +3 -3
- package/lib/components/scope-form-modal/scope-form-modal.component.d.ts +3 -3
- package/lib/components/scopes/scopes.component.d.ts +1 -1
- package/lib/openiddictpro.module.d.ts +18 -15
- package/lib/openiddictpro.routes.d.ts +3 -0
- package/lib/resolvers/index.d.ts +1 -0
- package/package.json +5 -5
- package/public-api.d.ts +1 -0
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, computed, inject,
|
|
3
|
-
import
|
|
4
|
-
import { InternalStore, CoreModule, LocalizationService, SubscriptionService, ListService, ReplaceableRouteContainerComponent, authGuard, permissionGuard, RouterOutletComponent, LazyModuleFactory } from '@abp/ng.core';
|
|
2
|
+
import { signal, computed, inject, Injector, DestroyRef, EventEmitter, Input, Output, Component, InjectionToken, NgModule, Injectable } from '@angular/core';
|
|
3
|
+
import { InternalStore, LocalizationService, SubscriptionService, LocalizationPipe, ListService, ReplaceableTemplateDirective, ReplaceableRouteContainerComponent, authGuard, permissionGuard, RouterOutletComponent, LazyModuleFactory, CoreModule } from '@abp/ng.core';
|
|
5
4
|
import * as i1$1 from '@angular/router';
|
|
6
5
|
import { RouterModule } from '@angular/router';
|
|
6
|
+
import { of, skip, finalize, filter, switchMap, map as map$1, tap } from 'rxjs';
|
|
7
|
+
import { ToasterService, ModalCloseDirective, ModalComponent, ButtonComponent, ConfirmationService, Confirmation, ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
8
|
+
import { PageComponent, PageModule } from '@abp/ng.components/page';
|
|
9
|
+
import { FormPropData, generateFormFromProps, ExtensibleFormComponent, ExtensibleTableComponent, EXTENSIONS_IDENTIFIER, EntityAction, EntityProp, ToolbarAction, FormProp, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps } from '@abp/ng.components/extensible';
|
|
10
|
+
import { PermissionManagementComponent, PermissionManagementModule } from '@abp/ng.permission-management';
|
|
11
|
+
import { AdvancedEntityFiltersComponent, SHOW_ENTITY_HISTORY, CommercialUiModule, AdvancedEntityFiltersModule } from '@volo/abp.commercial.ng.ui';
|
|
7
12
|
import { ApplicationService, ScopeService } from '@volo/abp.ng.openiddictpro/proxy';
|
|
8
|
-
import * as
|
|
9
|
-
import {
|
|
10
|
-
import * as i3$1 from '@abp/ng.components/extensible';
|
|
11
|
-
import { FormPropData, generateFormFromProps, EXTENSIONS_IDENTIFIER, EntityAction, EntityProp, ToolbarAction, FormProp, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps, ExtensibleFormComponent, ExtensibleTableComponent } from '@abp/ng.components/extensible';
|
|
12
|
-
import { finalize, of, skip, filter, switchMap, map as map$1, tap } from 'rxjs';
|
|
13
|
-
import * as i3$2 from '@volo/abp.commercial.ng.ui';
|
|
14
|
-
import { SHOW_ENTITY_HISTORY, CommercialUiModule, AdvancedEntityFiltersModule } from '@volo/abp.commercial.ng.ui';
|
|
15
|
-
import * as i4 from '@abp/ng.components/page';
|
|
16
|
-
import { PageModule } from '@abp/ng.components/page';
|
|
17
|
-
import * as i5$1 from '@abp/ng.permission-management';
|
|
18
|
-
import { PermissionManagementModule } from '@abp/ng.permission-management';
|
|
19
|
-
import * as i6 from '@angular/common';
|
|
20
|
-
import { CommonModule } from '@angular/common';
|
|
21
|
-
import * as i3 from '@angular/forms';
|
|
22
|
-
import { FormBuilder, Validators } from '@angular/forms';
|
|
23
|
-
import * as i1 from '@ngx-validate/core';
|
|
24
|
-
import { NgxValidateCoreModule } from '@ngx-validate/core';
|
|
13
|
+
import * as i1 from '@angular/forms';
|
|
14
|
+
import { FormsModule, ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';
|
|
25
15
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
16
|
+
import * as i2 from '@ngx-validate/core';
|
|
17
|
+
import { NgxValidateCoreModule } from '@ngx-validate/core';
|
|
18
|
+
import { CommonModule, AsyncPipe } from '@angular/common';
|
|
26
19
|
import { map, tap as tap$1, mapTo } from 'rxjs/operators';
|
|
27
20
|
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
28
21
|
|
|
@@ -49,88 +42,6 @@ class ApplicationsService {
|
|
|
49
42
|
}
|
|
50
43
|
}
|
|
51
44
|
|
|
52
|
-
class ScopesService {
|
|
53
|
-
constructor() {
|
|
54
|
-
this.state = new InternalStore({ isModalVisible: false });
|
|
55
|
-
this.isModalVisible$ = this.state.sliceState(x => x.isModalVisible);
|
|
56
|
-
}
|
|
57
|
-
openModal() {
|
|
58
|
-
this.setModalState(true);
|
|
59
|
-
}
|
|
60
|
-
setModalState(value) {
|
|
61
|
-
this.state.patch({ isModalVisible: value });
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const SECOND_LIMIT = 922337203685;
|
|
66
|
-
const TOKEN_LIFETIME_FIELDS = [
|
|
67
|
-
'accessTokenLifetime',
|
|
68
|
-
'authorizationCodeLifetime',
|
|
69
|
-
'deviceCodeLifetime',
|
|
70
|
-
'identityTokenLifetime',
|
|
71
|
-
'refreshTokenLifetime',
|
|
72
|
-
'userCodeLifetime',
|
|
73
|
-
'requestTokenLifetime',
|
|
74
|
-
];
|
|
75
|
-
class TokenLifetimeModalComponent {
|
|
76
|
-
constructor() {
|
|
77
|
-
this.toasterService = inject(ToasterService);
|
|
78
|
-
this.#service = inject(ApplicationsService);
|
|
79
|
-
this.#proxyService = inject(ApplicationService);
|
|
80
|
-
this.#fb = inject(FormBuilder);
|
|
81
|
-
this.saved = new EventEmitter();
|
|
82
|
-
this.loading = signal(false);
|
|
83
|
-
this.form = this.#fb.group(this.generateTokenLifetimeFormControls());
|
|
84
|
-
}
|
|
85
|
-
#service;
|
|
86
|
-
#proxyService;
|
|
87
|
-
#fb;
|
|
88
|
-
ngOnInit() {
|
|
89
|
-
this.#proxyService.getTokenLifetime(this.selected.id).subscribe(value => {
|
|
90
|
-
this.form.patchValue(value);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
generateTokenLifetimeFormControls() {
|
|
94
|
-
return TOKEN_LIFETIME_FIELDS.reduce((controls, field) => {
|
|
95
|
-
controls[field] = [
|
|
96
|
-
null,
|
|
97
|
-
[Validators.min(-SECOND_LIMIT), Validators.max(SECOND_LIMIT)],
|
|
98
|
-
];
|
|
99
|
-
return controls;
|
|
100
|
-
}, {});
|
|
101
|
-
}
|
|
102
|
-
save() {
|
|
103
|
-
if (this.form.invalid) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
const id = this.selected.id;
|
|
107
|
-
this.#proxyService
|
|
108
|
-
.setTokenLifetime(id, this.form.value)
|
|
109
|
-
.pipe(finalize(() => {
|
|
110
|
-
this.#service.setTokenLifetimeModalState(false);
|
|
111
|
-
this.toasterService.success('AbpUi::SavedSuccessfully');
|
|
112
|
-
this.saved.emit();
|
|
113
|
-
}))
|
|
114
|
-
.subscribe();
|
|
115
|
-
}
|
|
116
|
-
visibleChange($event) {
|
|
117
|
-
if ($event) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
this.#service.setTokenLifetimeModalState(false);
|
|
121
|
-
}
|
|
122
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TokenLifetimeModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
123
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: TokenLifetimeModalComponent, isStandalone: true, selector: "abp-token-lifetime-modal", inputs: { selected: "selected" }, 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\">\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 </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: CommonModule }, { kind: "ngmodule", type: ThemeSharedModule }, { kind: "directive", type: i1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i5.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i5.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i5.ModalCloseDirective, selector: "[abpClose]" }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: i2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }] }); }
|
|
124
|
-
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TokenLifetimeModalComponent, decorators: [{
|
|
126
|
-
type: Component,
|
|
127
|
-
args: [{ selector: 'abp-token-lifetime-modal', imports: [CommonModule, ThemeSharedModule, CoreModule], 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\">\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 </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" }]
|
|
128
|
-
}], propDecorators: { selected: [{
|
|
129
|
-
type: Input
|
|
130
|
-
}], saved: [{
|
|
131
|
-
type: Output
|
|
132
|
-
}] } });
|
|
133
|
-
|
|
134
45
|
const defaultApplicationsTypeList = [
|
|
135
46
|
{
|
|
136
47
|
key: 'Confidential client',
|
|
@@ -295,17 +206,117 @@ class ApplicationFormModalComponent {
|
|
|
295
206
|
}
|
|
296
207
|
}
|
|
297
208
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ApplicationFormModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
298
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: ApplicationFormModalComponent, isStandalone:
|
|
209
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: ApplicationFormModalComponent, isStandalone: true, selector: "abp-application-form-modal", inputs: { selected: "selected" }, 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],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: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { 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"] }] }); }
|
|
299
210
|
}
|
|
300
211
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ApplicationFormModalComponent, decorators: [{
|
|
301
212
|
type: Component,
|
|
302
|
-
args: [{
|
|
213
|
+
args: [{ selector: 'abp-application-form-modal', imports: [
|
|
214
|
+
FormsModule,
|
|
215
|
+
ReactiveFormsModule,
|
|
216
|
+
NgxValidateCoreModule,
|
|
217
|
+
ModalCloseDirective,
|
|
218
|
+
LocalizationPipe,
|
|
219
|
+
ExtensibleFormComponent,
|
|
220
|
+
ModalComponent,
|
|
221
|
+
ButtonComponent,
|
|
222
|
+
], 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" }]
|
|
303
223
|
}], propDecorators: { saved: [{
|
|
304
224
|
type: Output
|
|
305
225
|
}], selected: [{
|
|
306
226
|
type: Input
|
|
307
227
|
}] } });
|
|
308
228
|
|
|
229
|
+
class ScopesService {
|
|
230
|
+
constructor() {
|
|
231
|
+
this.state = new InternalStore({ isModalVisible: false });
|
|
232
|
+
this.isModalVisible$ = this.state.sliceState(x => x.isModalVisible);
|
|
233
|
+
}
|
|
234
|
+
openModal() {
|
|
235
|
+
this.setModalState(true);
|
|
236
|
+
}
|
|
237
|
+
setModalState(value) {
|
|
238
|
+
this.state.patch({ isModalVisible: value });
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const SECOND_LIMIT = 922337203685;
|
|
243
|
+
const TOKEN_LIFETIME_FIELDS = [
|
|
244
|
+
'accessTokenLifetime',
|
|
245
|
+
'authorizationCodeLifetime',
|
|
246
|
+
'deviceCodeLifetime',
|
|
247
|
+
'identityTokenLifetime',
|
|
248
|
+
'refreshTokenLifetime',
|
|
249
|
+
'userCodeLifetime',
|
|
250
|
+
'requestTokenLifetime',
|
|
251
|
+
];
|
|
252
|
+
class TokenLifetimeModalComponent {
|
|
253
|
+
constructor() {
|
|
254
|
+
this.toasterService = inject(ToasterService);
|
|
255
|
+
this.#service = inject(ApplicationsService);
|
|
256
|
+
this.#proxyService = inject(ApplicationService);
|
|
257
|
+
this.#fb = inject(FormBuilder);
|
|
258
|
+
this.saved = new EventEmitter();
|
|
259
|
+
this.loading = signal(false);
|
|
260
|
+
this.form = this.#fb.group(this.generateTokenLifetimeFormControls());
|
|
261
|
+
}
|
|
262
|
+
#service;
|
|
263
|
+
#proxyService;
|
|
264
|
+
#fb;
|
|
265
|
+
ngOnInit() {
|
|
266
|
+
this.#proxyService.getTokenLifetime(this.selected.id).subscribe(value => {
|
|
267
|
+
this.form.patchValue(value);
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
generateTokenLifetimeFormControls() {
|
|
271
|
+
return TOKEN_LIFETIME_FIELDS.reduce((controls, field) => {
|
|
272
|
+
controls[field] = [
|
|
273
|
+
null,
|
|
274
|
+
[Validators.min(-SECOND_LIMIT), Validators.max(SECOND_LIMIT)],
|
|
275
|
+
];
|
|
276
|
+
return controls;
|
|
277
|
+
}, {});
|
|
278
|
+
}
|
|
279
|
+
save() {
|
|
280
|
+
if (this.form.invalid) {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
const id = this.selected.id;
|
|
284
|
+
this.#proxyService
|
|
285
|
+
.setTokenLifetime(id, this.form.value)
|
|
286
|
+
.pipe(finalize(() => {
|
|
287
|
+
this.#service.setTokenLifetimeModalState(false);
|
|
288
|
+
this.toasterService.success('AbpUi::SavedSuccessfully');
|
|
289
|
+
this.saved.emit();
|
|
290
|
+
}))
|
|
291
|
+
.subscribe();
|
|
292
|
+
}
|
|
293
|
+
visibleChange($event) {
|
|
294
|
+
if ($event) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
this.#service.setTokenLifetimeModalState(false);
|
|
298
|
+
}
|
|
299
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TokenLifetimeModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
300
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: TokenLifetimeModalComponent, isStandalone: true, selector: "abp-token-lifetime-modal", inputs: { selected: "selected" }, 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\">\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 </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: CommonModule }, { 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],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: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { 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"] }] }); }
|
|
301
|
+
}
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: TokenLifetimeModalComponent, decorators: [{
|
|
303
|
+
type: Component,
|
|
304
|
+
args: [{ selector: 'abp-token-lifetime-modal', imports: [
|
|
305
|
+
CommonModule,
|
|
306
|
+
FormsModule,
|
|
307
|
+
ReactiveFormsModule,
|
|
308
|
+
NgxValidateCoreModule,
|
|
309
|
+
ModalCloseDirective,
|
|
310
|
+
LocalizationPipe,
|
|
311
|
+
ModalComponent,
|
|
312
|
+
ButtonComponent,
|
|
313
|
+
], 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\">\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 </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" }]
|
|
314
|
+
}], propDecorators: { selected: [{
|
|
315
|
+
type: Input
|
|
316
|
+
}], saved: [{
|
|
317
|
+
type: Output
|
|
318
|
+
}] } });
|
|
319
|
+
|
|
309
320
|
class ApplicationsComponent {
|
|
310
321
|
constructor() {
|
|
311
322
|
this.service = inject(ApplicationsService);
|
|
@@ -363,23 +374,32 @@ class ApplicationsComponent {
|
|
|
363
374
|
this.service.setTokenLifetimeModalState(true);
|
|
364
375
|
}
|
|
365
376
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ApplicationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
366
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ApplicationsComponent, isStandalone:
|
|
377
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ApplicationsComponent, isStandalone: true, selector: "abp-applications", providers: [
|
|
367
378
|
ListService,
|
|
368
379
|
{
|
|
369
380
|
provide: EXTENSIONS_IDENTIFIER,
|
|
370
381
|
useValue: "OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */,
|
|
371
382
|
},
|
|
372
|
-
], ngImport: i0, template: "<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters
|
|
383
|
+
], 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: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { 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"], outputs: ["tableActivate", "selectionChange"], 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"] }] }); }
|
|
373
384
|
}
|
|
374
385
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ApplicationsComponent, decorators: [{
|
|
375
386
|
type: Component,
|
|
376
|
-
args: [{
|
|
387
|
+
args: [{ selector: 'abp-applications', providers: [
|
|
377
388
|
ListService,
|
|
378
389
|
{
|
|
379
390
|
provide: EXTENSIONS_IDENTIFIER,
|
|
380
391
|
useValue: "OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */,
|
|
381
392
|
},
|
|
382
|
-
],
|
|
393
|
+
], imports: [
|
|
394
|
+
ReplaceableTemplateDirective,
|
|
395
|
+
LocalizationPipe,
|
|
396
|
+
AdvancedEntityFiltersComponent,
|
|
397
|
+
ExtensibleTableComponent,
|
|
398
|
+
ApplicationFormModalComponent,
|
|
399
|
+
TokenLifetimeModalComponent,
|
|
400
|
+
PageComponent,
|
|
401
|
+
PermissionManagementComponent,
|
|
402
|
+
], 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" }]
|
|
383
403
|
}] });
|
|
384
404
|
|
|
385
405
|
class ScopeFormModalComponent {
|
|
@@ -426,11 +446,21 @@ class ScopeFormModalComponent {
|
|
|
426
446
|
this.form = generateFormFromProps(data);
|
|
427
447
|
}
|
|
428
448
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ScopeFormModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
429
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: ScopeFormModalComponent, isStandalone:
|
|
449
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: ScopeFormModalComponent, isStandalone: true, selector: "abp-scope-form-modal", inputs: { selected: "selected" }, 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],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: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { 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"] }] }); }
|
|
430
450
|
}
|
|
431
451
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ScopeFormModalComponent, decorators: [{
|
|
432
452
|
type: Component,
|
|
433
|
-
args: [{
|
|
453
|
+
args: [{ selector: 'abp-scope-form-modal', imports: [
|
|
454
|
+
FormsModule,
|
|
455
|
+
ReactiveFormsModule,
|
|
456
|
+
NgxValidateCoreModule,
|
|
457
|
+
AsyncPipe,
|
|
458
|
+
LocalizationPipe,
|
|
459
|
+
ModalCloseDirective,
|
|
460
|
+
ExtensibleFormComponent,
|
|
461
|
+
ModalComponent,
|
|
462
|
+
ButtonComponent,
|
|
463
|
+
], 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" }]
|
|
434
464
|
}], propDecorators: { selected: [{
|
|
435
465
|
type: Input
|
|
436
466
|
}], saved: [{
|
|
@@ -481,23 +511,29 @@ class ScopesComponent {
|
|
|
481
511
|
this.list.get();
|
|
482
512
|
}
|
|
483
513
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ScopesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
484
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: ScopesComponent, isStandalone:
|
|
514
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: ScopesComponent, isStandalone: true, selector: "abp-scopes", providers: [
|
|
485
515
|
ListService,
|
|
486
516
|
{
|
|
487
517
|
provide: EXTENSIONS_IDENTIFIER,
|
|
488
518
|
useValue: "OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */,
|
|
489
519
|
},
|
|
490
|
-
], ngImport: i0, template: "<abp-page [title]=\"'AbpOpenIddict::Scopes' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n
|
|
520
|
+
], 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: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "component", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate", "selectable", "selectionType", "selected"], outputs: ["tableActivate", "selectionChange"], 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"] }] }); }
|
|
491
521
|
}
|
|
492
522
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ScopesComponent, decorators: [{
|
|
493
523
|
type: Component,
|
|
494
|
-
args: [{
|
|
524
|
+
args: [{ selector: 'abp-scopes', providers: [
|
|
495
525
|
ListService,
|
|
496
526
|
{
|
|
497
527
|
provide: EXTENSIONS_IDENTIFIER,
|
|
498
528
|
useValue: "OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */,
|
|
499
529
|
},
|
|
500
|
-
],
|
|
530
|
+
], imports: [
|
|
531
|
+
LocalizationPipe,
|
|
532
|
+
ExtensibleTableComponent,
|
|
533
|
+
ScopeFormModalComponent,
|
|
534
|
+
AdvancedEntityFiltersComponent,
|
|
535
|
+
PageComponent,
|
|
536
|
+
], 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" }]
|
|
501
537
|
}] });
|
|
502
538
|
|
|
503
539
|
const DEFAULT_APPLICATIONS_ENTITY_ACTIONS = EntityAction.createMany([
|
|
@@ -1116,14 +1152,14 @@ class OpeniddictproModule {
|
|
|
1116
1152
|
],
|
|
1117
1153
|
};
|
|
1118
1154
|
}
|
|
1155
|
+
/**
|
|
1156
|
+
* @deprecated `OpeniddictproModule.forLazy()` is deprecated. You can use `createRoutes` **function** instead.
|
|
1157
|
+
*/
|
|
1119
1158
|
static forLazy(options = {}) {
|
|
1120
1159
|
return new LazyModuleFactory(OpeniddictproModule.forChild(options));
|
|
1121
1160
|
}
|
|
1122
1161
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: OpeniddictproModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1123
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: OpeniddictproModule,
|
|
1124
|
-
ApplicationFormModalComponent,
|
|
1125
|
-
ScopesComponent,
|
|
1126
|
-
ScopeFormModalComponent], imports: [OpeniddictproRoutingModule,
|
|
1162
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: OpeniddictproModule, imports: [OpeniddictproRoutingModule,
|
|
1127
1163
|
CoreModule,
|
|
1128
1164
|
CommercialUiModule,
|
|
1129
1165
|
ThemeSharedModule,
|
|
@@ -1134,7 +1170,10 @@ class OpeniddictproModule {
|
|
|
1134
1170
|
PermissionManagementModule,
|
|
1135
1171
|
ExtensibleFormComponent,
|
|
1136
1172
|
TokenLifetimeModalComponent,
|
|
1137
|
-
ExtensibleTableComponent
|
|
1173
|
+
ExtensibleTableComponent, ApplicationsComponent,
|
|
1174
|
+
ApplicationFormModalComponent,
|
|
1175
|
+
ScopesComponent,
|
|
1176
|
+
ScopeFormModalComponent], exports: [ApplicationsComponent,
|
|
1138
1177
|
ApplicationFormModalComponent,
|
|
1139
1178
|
ScopesComponent,
|
|
1140
1179
|
ScopeFormModalComponent] }); }
|
|
@@ -1149,7 +1188,7 @@ class OpeniddictproModule {
|
|
|
1149
1188
|
PermissionManagementModule,
|
|
1150
1189
|
ExtensibleFormComponent,
|
|
1151
1190
|
TokenLifetimeModalComponent,
|
|
1152
|
-
ExtensibleTableComponent] }); }
|
|
1191
|
+
ExtensibleTableComponent, components] }); }
|
|
1153
1192
|
}
|
|
1154
1193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: OpeniddictproModule, decorators: [{
|
|
1155
1194
|
type: NgModule,
|
|
@@ -1167,12 +1206,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
1167
1206
|
ExtensibleFormComponent,
|
|
1168
1207
|
TokenLifetimeModalComponent,
|
|
1169
1208
|
ExtensibleTableComponent,
|
|
1209
|
+
...components,
|
|
1170
1210
|
],
|
|
1171
|
-
declarations: [...components],
|
|
1172
1211
|
exports: [...components],
|
|
1173
1212
|
}]
|
|
1174
1213
|
}] });
|
|
1175
1214
|
|
|
1215
|
+
const openIddictProProviders = [ApplicationsService, ScopesService];
|
|
1216
|
+
function createRoutes(config = {}) {
|
|
1217
|
+
return [
|
|
1218
|
+
{ path: '', redirectTo: 'Applications', pathMatch: 'full' },
|
|
1219
|
+
{
|
|
1220
|
+
path: '',
|
|
1221
|
+
component: RouterOutletComponent,
|
|
1222
|
+
providers: [...openIddictProProviders, provideOpenIddictProContributors(config)],
|
|
1223
|
+
canActivate: [authGuard, permissionGuard],
|
|
1224
|
+
resolve: [openIddictProExtensionsResolver],
|
|
1225
|
+
children: [
|
|
1226
|
+
{
|
|
1227
|
+
path: 'Applications',
|
|
1228
|
+
component: ReplaceableRouteContainerComponent,
|
|
1229
|
+
data: {
|
|
1230
|
+
requiredPolicy: 'OpenIddictPro.Application',
|
|
1231
|
+
replaceableComponent: {
|
|
1232
|
+
key: "OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */,
|
|
1233
|
+
defaultComponent: ApplicationsComponent,
|
|
1234
|
+
},
|
|
1235
|
+
},
|
|
1236
|
+
title: 'AbpOpenIddict::Applications',
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
path: 'Scopes',
|
|
1240
|
+
component: ReplaceableRouteContainerComponent,
|
|
1241
|
+
data: {
|
|
1242
|
+
requiredPolicy: 'OpenIddictPro.Scopes',
|
|
1243
|
+
replaceableComponent: {
|
|
1244
|
+
key: "OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */,
|
|
1245
|
+
defaultComponent: ScopesComponent,
|
|
1246
|
+
},
|
|
1247
|
+
},
|
|
1248
|
+
title: 'AbpOpenIddict::Scopes',
|
|
1249
|
+
},
|
|
1250
|
+
],
|
|
1251
|
+
},
|
|
1252
|
+
];
|
|
1253
|
+
}
|
|
1254
|
+
function provideOpenIddictProContributors(options = {}) {
|
|
1255
|
+
return [
|
|
1256
|
+
{
|
|
1257
|
+
provide: OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS,
|
|
1258
|
+
useValue: options.entityActionContributors,
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
provide: OPENIDDICT_PRO_TOOLBAR_ACTION_CONTRIBUTORS,
|
|
1262
|
+
useValue: options.toolbarActionContributors,
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
provide: OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS,
|
|
1266
|
+
useValue: options.entityPropContributors,
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
provide: OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS,
|
|
1270
|
+
useValue: options.createFormPropContributors,
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
provide: OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS,
|
|
1274
|
+
useValue: options.editFormPropContributors,
|
|
1275
|
+
},
|
|
1276
|
+
];
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1176
1279
|
/**
|
|
1177
1280
|
* @deprecated Use `openIddictProExtensionsResolver` *function* instead.
|
|
1178
1281
|
*/
|
|
@@ -1211,5 +1314,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
1211
1314
|
* Generated bundle index. Do not edit.
|
|
1212
1315
|
*/
|
|
1213
1316
|
|
|
1214
|
-
export { 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, defaultApplicationTypes, defaultApplicationTypesList, defaultApplicationsTypeList, defaultUriPattern, hashSetParser };
|
|
1317
|
+
export { 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, defaultUriPattern, hashSetParser };
|
|
1215
1318
|
//# sourceMappingURL=volo-abp.ng.openiddictpro.mjs.map
|