@volo/abp.ng.openiddictpro 8.3.2 → 8.3.4
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/esm2022/lib/components/application-form-modal/application-form-modal.component.mjs +23 -24
- package/esm2022/lib/components/applications/applications.component.mjs +7 -7
- package/esm2022/lib/defaults/default-applications-entity-actions.mjs +2 -2
- package/esm2022/lib/defaults/default-applications-form-props.mjs +2 -12
- package/fesm2022/volo-abp.ng.openiddictpro-config.mjs.map +1 -1
- package/fesm2022/volo-abp.ng.openiddictpro-proxy.mjs.map +1 -1
- package/fesm2022/volo-abp.ng.openiddictpro.mjs +26 -37
- package/fesm2022/volo-abp.ng.openiddictpro.mjs.map +1 -1
- package/lib/components/application-form-modal/application-form-modal.component.d.ts +8 -9
- package/lib/components/applications/applications.component.d.ts +6 -6
- package/package.json +5 -5
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, computed, inject, EventEmitter,
|
|
2
|
+
import { signal, computed, inject, EventEmitter, Output, Input, Component, Injector, InjectionToken, NgModule, Injectable } from '@angular/core';
|
|
3
3
|
import * as i2 from '@abp/ng.core';
|
|
4
|
-
import { InternalStore, CoreModule, LocalizationService, SubscriptionService, ListService, ConfigStateService,
|
|
4
|
+
import { InternalStore, CoreModule, LocalizationService, SubscriptionService, ListService, ConfigStateService, ReplaceableRouteContainerComponent, authGuard, permissionGuard, RouterOutletComponent, LazyModuleFactory } from '@abp/ng.core';
|
|
5
5
|
import * as i1$1 from '@angular/router';
|
|
6
6
|
import { RouterModule } from '@angular/router';
|
|
7
|
+
import { ApplicationService, ScopeService } from '@volo/abp.ng.openiddictpro/proxy';
|
|
7
8
|
import * as i5 from '@abp/ng.theme.shared';
|
|
8
9
|
import { ToasterService, ThemeSharedModule, ConfirmationService, Confirmation } from '@abp/ng.theme.shared';
|
|
9
10
|
import * as i3$1 from '@abp/ng.components/extensible';
|
|
10
11
|
import { ExtensibleFormComponent, FormPropData, generateFormFromProps, EXTENSIONS_IDENTIFIER, EntityAction, EntityProp, ToolbarAction, FormProp, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps, ExtensibleTableComponent } from '@abp/ng.components/extensible';
|
|
11
|
-
import { ApplicationService, ScopeService } from '@volo/abp.ng.openiddictpro/proxy';
|
|
12
12
|
import { finalize, of, filter, switchMap, map as map$1, tap } from 'rxjs';
|
|
13
13
|
import * as i3$2 from '@volo/abp.commercial.ng.ui';
|
|
14
14
|
import { SHOW_ENTITY_HISTORY, CommercialUiModule, AdvancedEntityFiltersModule } from '@volo/abp.commercial.ng.ui';
|
|
@@ -189,9 +189,23 @@ class ApplicationFormModalComponent {
|
|
|
189
189
|
this.types$ = of(defaultApplicationsTypeList);
|
|
190
190
|
this.consentTypes$ = of(DefaultApplicationsConsentType);
|
|
191
191
|
this.options = { size: 'lg' };
|
|
192
|
-
this.isModalVisible = this.applicationsService.isModalVisible;
|
|
193
192
|
}
|
|
194
|
-
|
|
193
|
+
createForm() {
|
|
194
|
+
const selected = this.selected?.id
|
|
195
|
+
? {
|
|
196
|
+
...this.selected,
|
|
197
|
+
redirectUris: hashSetParser(this.selected.redirectUris),
|
|
198
|
+
postLogoutRedirectUris: hashSetParser(this.selected.postLogoutRedirectUris),
|
|
199
|
+
extensionGrantTypes: hashSetParser(this.selected.extensionGrantTypes),
|
|
200
|
+
}
|
|
201
|
+
: { clientType: null };
|
|
202
|
+
const data = new FormPropData(this.injector, selected);
|
|
203
|
+
this.form = generateFormFromProps(data);
|
|
204
|
+
}
|
|
205
|
+
getFormValue() {
|
|
206
|
+
return this.form?.value || {};
|
|
207
|
+
}
|
|
208
|
+
ngOnInit() {
|
|
195
209
|
this.createForm();
|
|
196
210
|
this.hideFlowToType();
|
|
197
211
|
}
|
|
@@ -226,21 +240,6 @@ class ApplicationFormModalComponent {
|
|
|
226
240
|
this.saved.emit();
|
|
227
241
|
});
|
|
228
242
|
}
|
|
229
|
-
getFormValue() {
|
|
230
|
-
return this.form?.value || {};
|
|
231
|
-
}
|
|
232
|
-
createForm() {
|
|
233
|
-
const selected = this.selected?.id
|
|
234
|
-
? {
|
|
235
|
-
...this.selected,
|
|
236
|
-
redirectUris: hashSetParser(this.selected.redirectUris),
|
|
237
|
-
postLogoutRedirectUris: hashSetParser(this.selected.postLogoutRedirectUris),
|
|
238
|
-
extensionGrantTypes: hashSetParser(this.selected.extensionGrantTypes),
|
|
239
|
-
}
|
|
240
|
-
: { clientType: null };
|
|
241
|
-
const data = new FormPropData(this.injector, selected);
|
|
242
|
-
this.form = generateFormFromProps(data);
|
|
243
|
-
}
|
|
244
243
|
hideFlowToType() {
|
|
245
244
|
const formType = this.form.controls['clientType'];
|
|
246
245
|
this.subscription.removeOne(this.formValueChanges$);
|
|
@@ -266,11 +265,11 @@ class ApplicationFormModalComponent {
|
|
|
266
265
|
}
|
|
267
266
|
}
|
|
268
267
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: ApplicationFormModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
269
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
268
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: ApplicationFormModalComponent, 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\"> </abp-extensible-form>\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: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: i2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "component", type: i3$1.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "directive", type: i1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { 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: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
270
269
|
}
|
|
271
270
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: ApplicationFormModalComponent, decorators: [{
|
|
272
271
|
type: Component,
|
|
273
|
-
args: [{ selector: 'abp-application-form-modal', template: "
|
|
272
|
+
args: [{ selector: 'abp-application-form-modal', 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\"> </abp-extensible-form>\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" }]
|
|
274
273
|
}], propDecorators: { saved: [{
|
|
275
274
|
type: Output
|
|
276
275
|
}], selected: [{
|
|
@@ -280,10 +279,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
280
279
|
class ApplicationsComponent {
|
|
281
280
|
constructor() {
|
|
282
281
|
this.service = inject(ApplicationsService);
|
|
283
|
-
this.list = inject(ListService);
|
|
284
282
|
this.confirmationService = inject(ConfirmationService);
|
|
285
283
|
this.proxyService = inject(ApplicationService);
|
|
286
284
|
this.toasterService = inject(ToasterService);
|
|
285
|
+
this.list = inject(ListService);
|
|
287
286
|
this.data = { items: [], totalCount: 0 };
|
|
288
287
|
this.selected = signal({});
|
|
289
288
|
this.visiblePermissions = false;
|
|
@@ -340,7 +339,7 @@ class ApplicationsComponent {
|
|
|
340
339
|
provide: EXTENSIONS_IDENTIFIER,
|
|
341
340
|
useValue: "OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */,
|
|
342
341
|
},
|
|
343
|
-
], ngImport: i0, template: "<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n
|
|
342
|
+
], ngImport: i0, template: "<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpOpenIddict\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\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 ></abp-extensible-table>\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</abp-permission-management>\r\n", dependencies: [{ kind: "directive", type: i2.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: i3$1.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], outputs: ["tableActivate"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: i3$2.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "component", type: i4.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i5$1.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "entityDisplayName", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }, { kind: "component", type: TokenLifetimeModalComponent, selector: "abp-token-lifetime-modal", inputs: ["selected"], outputs: ["saved"] }, { kind: "component", type: ApplicationFormModalComponent, selector: "abp-application-form-modal", inputs: ["selected"], outputs: ["saved"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
344
343
|
}
|
|
345
344
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: ApplicationsComponent, decorators: [{
|
|
346
345
|
type: Component,
|
|
@@ -350,7 +349,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
350
349
|
provide: EXTENSIONS_IDENTIFIER,
|
|
351
350
|
useValue: "OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */,
|
|
352
351
|
},
|
|
353
|
-
], template: "<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n
|
|
352
|
+
], template: "<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpOpenIddict\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\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 ></abp-extensible-table>\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</abp-permission-management>\r\n" }]
|
|
354
353
|
}] });
|
|
355
354
|
|
|
356
355
|
class ScopeFormModalComponent {
|
|
@@ -510,7 +509,7 @@ const DEFAULT_APPLICATIONS_ENTITY_ACTIONS = EntityAction.createMany([
|
|
|
510
509
|
const component = data.getInjected(ApplicationsComponent);
|
|
511
510
|
component.delete(data.record.id, data.record.clientId);
|
|
512
511
|
},
|
|
513
|
-
permission: '
|
|
512
|
+
permission: 'OpenIddictPro.Application.Delete',
|
|
514
513
|
},
|
|
515
514
|
]);
|
|
516
515
|
|
|
@@ -832,17 +831,7 @@ const DEFAULT_APPLICATIONS_CREATE_FORM_PROPS = FormProp.createMany([
|
|
|
832
831
|
className: className,
|
|
833
832
|
},
|
|
834
833
|
]);
|
|
835
|
-
const DEFAULT_APPLICATIONS_FORM_PROPS = DEFAULT_APPLICATIONS_CREATE_FORM_PROPS
|
|
836
|
-
{
|
|
837
|
-
type: "boolean" /* ePropType.Boolean */,
|
|
838
|
-
name: 'enabled',
|
|
839
|
-
displayName: 'AbpOpenIddict::Enabled',
|
|
840
|
-
id: 'enabled',
|
|
841
|
-
defaultValue: false,
|
|
842
|
-
group: groupRight,
|
|
843
|
-
className: className,
|
|
844
|
-
},
|
|
845
|
-
]));
|
|
834
|
+
const DEFAULT_APPLICATIONS_FORM_PROPS = DEFAULT_APPLICATIONS_CREATE_FORM_PROPS;
|
|
846
835
|
|
|
847
836
|
const DEFAULT_SCOPES_ENTITY_PROPS = EntityProp.createMany([
|
|
848
837
|
{
|