@volo/abp.ng.openiddictpro 6.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +7 -0
  2. package/config/enums/index.d.ts +2 -0
  3. package/config/enums/policy-names.d.ts +5 -0
  4. package/config/enums/route-names.d.ts +5 -0
  5. package/config/openiddictpro-config.module.d.ts +8 -0
  6. package/config/package.json +10 -0
  7. package/config/providers/index.d.ts +1 -0
  8. package/config/providers/route.provider.d.ts +8 -0
  9. package/config/public-api.d.ts +3 -0
  10. package/config/volo-abp.ng.openiddictpro-config.d.ts +5 -0
  11. package/esm2020/config/enums/index.mjs +3 -0
  12. package/esm2020/config/enums/policy-names.mjs +2 -0
  13. package/esm2020/config/enums/route-names.mjs +2 -0
  14. package/esm2020/config/openiddictpro-config.module.mjs +18 -0
  15. package/esm2020/config/providers/index.mjs +2 -0
  16. package/esm2020/config/providers/route.provider.mjs +39 -0
  17. package/esm2020/config/public-api.mjs +4 -0
  18. package/esm2020/config/volo-abp.ng.openiddictpro-config.mjs +5 -0
  19. package/esm2020/lib/components/application-form-modal/application-form-modal.component.mjs +87 -0
  20. package/esm2020/lib/components/applications/applications.component.mjs +85 -0
  21. package/esm2020/lib/components/index.mjs +6 -0
  22. package/esm2020/lib/components/scope-form-modal/scope-form-modal.component.mjs +66 -0
  23. package/esm2020/lib/components/scopes/allow-flow.mjs +4 -0
  24. package/esm2020/lib/components/scopes/scopes.component.mjs +74 -0
  25. package/esm2020/lib/defaults/default-applications-consent-type.mjs +19 -0
  26. package/esm2020/lib/defaults/default-applications-entity-actions.mjs +38 -0
  27. package/esm2020/lib/defaults/default-applications-entity-props.mjs +22 -0
  28. package/esm2020/lib/defaults/default-applications-form-props.mjs +181 -0
  29. package/esm2020/lib/defaults/default-applications-toolbar-actions.mjs +14 -0
  30. package/esm2020/lib/defaults/default-applications-types.mjs +15 -0
  31. package/esm2020/lib/defaults/default-scope-entity-actions.mjs +31 -0
  32. package/esm2020/lib/defaults/default-scope-entity-props.mjs +22 -0
  33. package/esm2020/lib/defaults/default-scope-form-props.mjs +31 -0
  34. package/esm2020/lib/defaults/default-scope-toolbar-actions.mjs +14 -0
  35. package/esm2020/lib/defaults/default-uri-pattern.mjs +2 -0
  36. package/esm2020/lib/defaults/index.mjs +12 -0
  37. package/esm2020/lib/enums/components.mjs +2 -0
  38. package/esm2020/lib/enums/index.mjs +2 -0
  39. package/esm2020/lib/guards/extensions.guard.mjs +38 -0
  40. package/esm2020/lib/guards/index.mjs +2 -0
  41. package/esm2020/lib/models/applications-service-state.mjs +2 -0
  42. package/esm2020/lib/models/config-options.mjs +2 -0
  43. package/esm2020/lib/models/index.mjs +4 -0
  44. package/esm2020/lib/models/scopes-service-state.mjs +2 -0
  45. package/esm2020/lib/openiddictpro-routing.module.mjs +53 -0
  46. package/esm2020/lib/openiddictpro.module.mjs +104 -0
  47. package/esm2020/lib/services/applications.service.mjs +14 -0
  48. package/esm2020/lib/services/index.mjs +3 -0
  49. package/esm2020/lib/services/scopes.service.mjs +14 -0
  50. package/esm2020/lib/tokens/extensions.token.mjs +35 -0
  51. package/esm2020/lib/tokens/index.mjs +2 -0
  52. package/esm2020/lib/utils/hashset-parser.mjs +15 -0
  53. package/esm2020/lib/utils/new-line-regex.mjs +2 -0
  54. package/esm2020/lib/utils/uris-validator.mjs +24 -0
  55. package/esm2020/proxy/lib/proxy/application.service.mjs +43 -0
  56. package/esm2020/proxy/lib/proxy/applications/dtos/index.mjs +2 -0
  57. package/esm2020/proxy/lib/proxy/applications/dtos/models.mjs +2 -0
  58. package/esm2020/proxy/lib/proxy/applications/index.mjs +3 -0
  59. package/esm2020/proxy/lib/proxy/index.mjs +6 -0
  60. package/esm2020/proxy/lib/proxy/scope.service.mjs +47 -0
  61. package/esm2020/proxy/lib/proxy/scopes/dtos/index.mjs +2 -0
  62. package/esm2020/proxy/lib/proxy/scopes/dtos/models.mjs +2 -0
  63. package/esm2020/proxy/lib/proxy/scopes/index.mjs +3 -0
  64. package/esm2020/proxy/public-api.mjs +2 -0
  65. package/esm2020/proxy/volo-abp.ng.openiddictpro-proxy.mjs +5 -0
  66. package/esm2020/public-api.mjs +6 -0
  67. package/esm2020/volo-abp.ng.openiddictpro.mjs +5 -0
  68. package/fesm2015/volo-abp.ng.openiddictpro-config.mjs +62 -0
  69. package/fesm2015/volo-abp.ng.openiddictpro-config.mjs.map +1 -0
  70. package/fesm2015/volo-abp.ng.openiddictpro-proxy.mjs +110 -0
  71. package/fesm2015/volo-abp.ng.openiddictpro-proxy.mjs.map +1 -0
  72. package/fesm2015/volo-abp.ng.openiddictpro.mjs +903 -0
  73. package/fesm2015/volo-abp.ng.openiddictpro.mjs.map +1 -0
  74. package/fesm2020/volo-abp.ng.openiddictpro-config.mjs +62 -0
  75. package/fesm2020/volo-abp.ng.openiddictpro-config.mjs.map +1 -0
  76. package/fesm2020/volo-abp.ng.openiddictpro-proxy.mjs +110 -0
  77. package/fesm2020/volo-abp.ng.openiddictpro-proxy.mjs.map +1 -0
  78. package/fesm2020/volo-abp.ng.openiddictpro.mjs +909 -0
  79. package/fesm2020/volo-abp.ng.openiddictpro.mjs.map +1 -0
  80. package/lib/components/application-form-modal/application-form-modal.component.d.ts +31 -0
  81. package/lib/components/applications/applications.component.d.ts +27 -0
  82. package/lib/components/index.d.ts +5 -0
  83. package/lib/components/scope-form-modal/scope-form-modal.component.d.ts +22 -0
  84. package/lib/components/scopes/allow-flow.d.ts +2 -0
  85. package/lib/components/scopes/scopes.component.d.ts +23 -0
  86. package/lib/defaults/default-applications-consent-type.d.ts +4 -0
  87. package/lib/defaults/default-applications-entity-actions.d.ts +3 -0
  88. package/lib/defaults/default-applications-entity-props.d.ts +3 -0
  89. package/lib/defaults/default-applications-form-props.d.ts +4 -0
  90. package/lib/defaults/default-applications-toolbar-actions.d.ts +3 -0
  91. package/lib/defaults/default-applications-types.d.ts +8 -0
  92. package/lib/defaults/default-scope-entity-actions.d.ts +3 -0
  93. package/lib/defaults/default-scope-entity-props.d.ts +3 -0
  94. package/lib/defaults/default-scope-form-props.d.ts +4 -0
  95. package/lib/defaults/default-scope-toolbar-actions.d.ts +3 -0
  96. package/lib/defaults/default-uri-pattern.d.ts +1 -0
  97. package/lib/defaults/index.d.ts +11 -0
  98. package/lib/enums/components.d.ts +4 -0
  99. package/lib/enums/index.d.ts +1 -0
  100. package/lib/guards/extensions.guard.d.ts +11 -0
  101. package/lib/guards/index.d.ts +1 -0
  102. package/lib/models/applications-service-state.d.ts +3 -0
  103. package/lib/models/config-options.d.ts +26 -0
  104. package/lib/models/index.d.ts +3 -0
  105. package/lib/models/scopes-service-state.d.ts +3 -0
  106. package/lib/openiddictpro-routing.module.d.ts +7 -0
  107. package/lib/openiddictpro.module.d.ts +22 -0
  108. package/lib/services/applications.service.d.ts +6 -0
  109. package/lib/services/index.d.ts +2 -0
  110. package/lib/services/scopes.service.d.ts +6 -0
  111. package/lib/tokens/extensions.token.d.ts +39 -0
  112. package/lib/tokens/index.d.ts +1 -0
  113. package/lib/utils/hashset-parser.d.ts +1 -0
  114. package/lib/utils/new-line-regex.d.ts +1 -0
  115. package/lib/utils/uris-validator.d.ts +2 -0
  116. package/package.json +51 -0
  117. package/proxy/lib/proxy/application.service.d.ts +16 -0
  118. package/proxy/lib/proxy/applications/dtos/index.d.ts +1 -0
  119. package/proxy/lib/proxy/applications/dtos/models.d.ts +48 -0
  120. package/proxy/lib/proxy/applications/index.d.ts +2 -0
  121. package/proxy/lib/proxy/index.d.ts +5 -0
  122. package/proxy/lib/proxy/scope.service.d.ts +17 -0
  123. package/proxy/lib/proxy/scopes/dtos/index.d.ts +1 -0
  124. package/proxy/lib/proxy/scopes/dtos/models.d.ts +20 -0
  125. package/proxy/lib/proxy/scopes/index.d.ts +2 -0
  126. package/proxy/package.json +10 -0
  127. package/proxy/public-api.d.ts +1 -0
  128. package/proxy/src/lib/proxy/README.md +17 -0
  129. package/proxy/volo-abp.ng.openiddictpro-proxy.d.ts +5 -0
  130. package/public-api.d.ts +5 -0
  131. package/volo-abp.ng.openiddictpro.d.ts +5 -0
@@ -0,0 +1,909 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, Output, Input, InjectionToken, Injectable, NgModule } from '@angular/core';
3
+ import * as i4$1 from '@abp/ng.core';
4
+ import { InternalStore, ListService, ConfigStateService, RouterOutletComponent, AuthGuard, PermissionGuard, ReplaceableRouteContainerComponent, LazyModuleFactory, CoreModule } from '@abp/ng.core';
5
+ import * as i1$1 from '@angular/router';
6
+ import { RouterModule } from '@angular/router';
7
+ import * as i3 from '@abp/ng.theme.shared';
8
+ import { Confirmation, ThemeSharedModule } from '@abp/ng.theme.shared';
9
+ import * as i4 from '@abp/ng.theme.shared/extensions';
10
+ import { FormPropData, generateFormFromProps, EXTENSIONS_IDENTIFIER, EntityAction, EntityProp, ToolbarAction, FormProp, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps } from '@abp/ng.theme.shared/extensions';
11
+ import * as i1 from '@volo/abp.ng.openiddictpro/proxy';
12
+ import { ScopeService } from '@volo/abp.ng.openiddictpro/proxy';
13
+ import * as i5$1 from '@abp/ng.components/page';
14
+ import { PageModule } from '@abp/ng.components/page';
15
+ import * as i6 from '@volo/abp.commercial.ng.ui';
16
+ import { SHOW_ENTITY_HISTORY, CommercialUiModule, AdvancedEntityFiltersModule } from '@volo/abp.commercial.ng.ui';
17
+ import { of } from 'rxjs';
18
+ import * as i5 from '@angular/forms';
19
+ import { Validators } from '@angular/forms';
20
+ import * as i7 from '@ngx-validate/core';
21
+ import { NgxValidateCoreModule } from '@ngx-validate/core';
22
+ import * as i8 from '@angular/common';
23
+ import * as i9 from '@abp/ng.permission-management';
24
+ import { PermissionManagementModule } from '@abp/ng.permission-management';
25
+ import { map, tap, mapTo } from 'rxjs/operators';
26
+ import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
27
+
28
+ class ApplicationsService {
29
+ constructor() {
30
+ this.state = new InternalStore({ isModalVisible: false });
31
+ this.isModalVisible$ = this.state.sliceState(x => x.isModalVisible);
32
+ }
33
+ openModal() {
34
+ this.setModalState(true);
35
+ }
36
+ setModalState(value) {
37
+ this.state.patch({ isModalVisible: value });
38
+ }
39
+ }
40
+
41
+ const defaultApplicationsTypeList = [
42
+ {
43
+ key: 'Confidential client',
44
+ value: 'confidential',
45
+ },
46
+ {
47
+ key: 'Public client',
48
+ value: 'public',
49
+ },
50
+ ];
51
+ const defaultApplicationTypes = {
52
+ public: 'public',
53
+ confidential: 'confidential',
54
+ };
55
+
56
+ const separatorRegex = /\r?\n/;
57
+ const separator = '\n';
58
+ function hashSetParser(stringOrArray) {
59
+ if (Array.isArray(stringOrArray)) {
60
+ return stringOrArray.join(separator);
61
+ }
62
+ if (typeof stringOrArray === 'string') {
63
+ if (!stringOrArray) {
64
+ return null;
65
+ }
66
+ return stringOrArray.split(separatorRegex);
67
+ }
68
+ return stringOrArray;
69
+ }
70
+
71
+ const DefaultApplicationsConsentType = [
72
+ {
73
+ key: 'Explicit consent',
74
+ value: 'explicit',
75
+ },
76
+ {
77
+ key: 'External consent',
78
+ value: 'external',
79
+ },
80
+ {
81
+ key: 'Implicit consent',
82
+ value: 'implicit',
83
+ },
84
+ {
85
+ key: 'Systematic consent',
86
+ value: 'systematic',
87
+ },
88
+ ];
89
+
90
+ class ApplicationFormModalComponent {
91
+ constructor(service, applicationsService, injector) {
92
+ this.service = service;
93
+ this.applicationsService = applicationsService;
94
+ this.injector = injector;
95
+ this.saved = new EventEmitter();
96
+ this.types$ = of(defaultApplicationsTypeList);
97
+ this.consentTypes$ = of(DefaultApplicationsConsentType);
98
+ }
99
+ ngOnChanges(changes) {
100
+ this.createForm();
101
+ }
102
+ get isModalVisible$() {
103
+ return this.applicationsService.isModalVisible$;
104
+ }
105
+ visibleChange($event) {
106
+ this.applicationsService.setModalState($event);
107
+ }
108
+ save() {
109
+ if (this.form.invalid) {
110
+ return;
111
+ }
112
+ const id = this.selected?.id;
113
+ const isEditMode = !!id;
114
+ let sub;
115
+ const parseTextAreaValue = value => {
116
+ return Array.isArray(value) ? value : hashSetParser(value);
117
+ };
118
+ const formValue = {
119
+ ...this.form.value,
120
+ redirectUris: parseTextAreaValue(this.form.value.redirectUris),
121
+ postLogoutRedirectUris: parseTextAreaValue(this.form.value.postLogoutRedirectUris),
122
+ };
123
+ if (isEditMode) {
124
+ sub = this.service.update(id, formValue);
125
+ }
126
+ else {
127
+ sub = this.service.create(formValue);
128
+ }
129
+ sub.subscribe(() => {
130
+ this.applicationsService.setModalState(false);
131
+ this.saved.emit();
132
+ });
133
+ }
134
+ getFormValue() {
135
+ return this.form?.value || {};
136
+ }
137
+ createForm() {
138
+ const selected = this.selected?.id
139
+ ? {
140
+ ...this.selected,
141
+ redirectUris: hashSetParser(this.selected.redirectUris),
142
+ postLogoutRedirectUris: hashSetParser(this.selected.postLogoutRedirectUris),
143
+ }
144
+ : {};
145
+ const data = new FormPropData(this.injector, selected);
146
+ this.form = generateFormFromProps(data);
147
+ }
148
+ }
149
+ ApplicationFormModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: ApplicationFormModalComponent, deps: [{ token: i1.ApplicationService }, { token: ApplicationsService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
150
+ ApplicationFormModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: ApplicationFormModalComponent, selector: "abp-application-form-modal", inputs: { selected: "selected" }, outputs: { saved: "saved" }, providers: [], usesOnChanges: true, ngImport: i0, template: "\r\n<abp-modal [visible]=\"isModalVisible$ | async\" (visibleChange)=\"visibleChange($event)\" >\r\n\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewApplication') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"applicationForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" 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", components: [{ type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i4.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }], directives: [{ type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { type: i3.ModalCloseDirective, selector: "[abpClose]" }], pipes: { "async": i8.AsyncPipe, "abpLocalization": i4$1.LocalizationPipe } });
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: ApplicationFormModalComponent, decorators: [{
152
+ type: Component,
153
+ args: [{ selector: 'abp-application-form-modal', styles: [], providers: [], template: "\r\n<abp-modal [visible]=\"isModalVisible$ | async\" (visibleChange)=\"visibleChange($event)\" >\r\n\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewApplication') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"applicationForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" 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" }]
154
+ }], ctorParameters: function () { return [{ type: i1.ApplicationService }, { type: ApplicationsService }, { type: i0.Injector }]; }, propDecorators: { saved: [{
155
+ type: Output
156
+ }], selected: [{
157
+ type: Input
158
+ }] } });
159
+
160
+ class ApplicationsComponent {
161
+ constructor(service, applicationsService, confirmationService, list) {
162
+ this.service = service;
163
+ this.applicationsService = applicationsService;
164
+ this.confirmationService = confirmationService;
165
+ this.list = list;
166
+ this.data = { items: [], totalCount: 0 };
167
+ this.selected = {};
168
+ this.visiblePermissions = false;
169
+ this.onVisiblePermissionChange = (value) => {
170
+ this.visiblePermissions = value;
171
+ };
172
+ }
173
+ onSaved() {
174
+ this.list.get();
175
+ }
176
+ edit(id) {
177
+ this.service.get(id).subscribe(res => {
178
+ this.selected = res;
179
+ this.applicationsService.openModal();
180
+ });
181
+ }
182
+ delete(id, name) {
183
+ this.confirmationService
184
+ .warn('AbpOpenIddict::ApplicationDeletionWarningMessage', 'AbpOpenIddict::AreYouSure', {
185
+ messageLocalizationParams: [name],
186
+ })
187
+ .subscribe((status) => {
188
+ if (status === Confirmation.Status.confirm) {
189
+ this.service.delete(id).subscribe(() => this.list.get());
190
+ }
191
+ });
192
+ }
193
+ ngOnInit() {
194
+ this.hookToQuery();
195
+ }
196
+ onAdd() {
197
+ this.selected = {};
198
+ this.applicationsService.openModal();
199
+ }
200
+ openPermissionsModal(providerKey) {
201
+ this.providerKey = providerKey;
202
+ setTimeout(() => {
203
+ this.visiblePermissions = true;
204
+ }, 0);
205
+ }
206
+ hookToQuery() {
207
+ this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res));
208
+ }
209
+ }
210
+ ApplicationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: ApplicationsComponent, deps: [{ token: i1.ApplicationService }, { token: ApplicationsService }, { token: i3.ConfirmationService }, { token: i4$1.ListService }], target: i0.ɵɵFactoryTarget.Component });
211
+ ApplicationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: ApplicationsComponent, selector: "abp-applications", providers: [
212
+ ListService,
213
+ {
214
+ provide: EXTENSIONS_IDENTIFIER,
215
+ useValue: "OpenIddictPro.Applications" /* Applications */,
216
+ },
217
+ ], ngImport: i0, template: "\r\n<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpOpenIddict\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\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<abp-application-form-modal [selected]=\"selected\" (saved)=\"onSaved()\">\r\n</abp-application-form-modal>\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", components: [{ type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { type: i4.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: ApplicationFormModalComponent, selector: "abp-application-form-modal", inputs: ["selected"], outputs: ["saved"] }, { type: i9.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "entityDisplayName", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }], directives: [{ type: i4$1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }], pipes: { "abpLocalization": i4$1.LocalizationPipe } });
218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: ApplicationsComponent, decorators: [{
219
+ type: Component,
220
+ args: [{ selector: 'abp-applications', providers: [
221
+ ListService,
222
+ {
223
+ provide: EXTENSIONS_IDENTIFIER,
224
+ useValue: "OpenIddictPro.Applications" /* Applications */,
225
+ },
226
+ ], template: "\r\n<abp-page [title]=\"'AbpOpenIddict::Applications' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpOpenIddict\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\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<abp-application-form-modal [selected]=\"selected\" (saved)=\"onSaved()\">\r\n</abp-application-form-modal>\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" }]
227
+ }], ctorParameters: function () { return [{ type: i1.ApplicationService }, { type: ApplicationsService }, { type: i3.ConfirmationService }, { type: i4$1.ListService }]; } });
228
+
229
+ const DEFAULT_APPLICATIONS_ENTITY_ACTIONS = EntityAction.createMany([
230
+ {
231
+ text: 'AbpOpenIddict::Edit',
232
+ action: data => {
233
+ const component = data.getInjected(ApplicationsComponent);
234
+ component.edit(data.record.id);
235
+ },
236
+ permission: 'OpenIddictPro.Application.Update',
237
+ },
238
+ {
239
+ text: 'AbpOpenIddict::ChangeHistory',
240
+ action: data => {
241
+ const showHistory = data.getInjected(SHOW_ENTITY_HISTORY);
242
+ showHistory(data.record.id, 'Volo.Abp.OpenIddict.Applications.OpenIddictApplication');
243
+ },
244
+ permission: 'AuditLogging.ViewChangeHistory:Volo.Abp.OpenIddict.Pro.Applications.Application',
245
+ },
246
+ {
247
+ text: 'AbpOpenIddict::Permissions',
248
+ action: data => {
249
+ const component = data.getInjected(ApplicationsComponent);
250
+ component.openPermissionsModal(data.record.clientId);
251
+ },
252
+ permission: 'OpenIddictPro.Application.ManagePermissions',
253
+ },
254
+ {
255
+ text: 'LanguageManagement::Delete',
256
+ action: data => {
257
+ const component = data.getInjected(ApplicationsComponent);
258
+ component.delete(data.record.id, data.record.clientId);
259
+ },
260
+ permission: 'LanguageManagement.Languages.Delete',
261
+ },
262
+ ]);
263
+
264
+ const DEFAULT_APPLICATIONS_ENTITY_PROPS = EntityProp.createMany([
265
+ {
266
+ type: "string" /* String */,
267
+ name: 'clientId',
268
+ displayName: 'AbpOpenIddict::ClientId',
269
+ columnWidth: 200,
270
+ },
271
+ {
272
+ type: "string" /* String */,
273
+ name: 'displayName',
274
+ displayName: 'AbpOpenIddict::DisplayName',
275
+ columnWidth: 200,
276
+ },
277
+ {
278
+ type: "string" /* String */,
279
+ name: 'type',
280
+ displayName: 'AbpOpenIddict::Type',
281
+ columnWidth: 200,
282
+ },
283
+ ]);
284
+
285
+ const DEFAULT_APPLICATIONS_TOOLBAR_ACTIONS = ToolbarAction.createMany([
286
+ {
287
+ text: 'AbpOpenIddict::NewApplication',
288
+ action: data => {
289
+ const component = data.getInjected(ApplicationsComponent);
290
+ component.onAdd();
291
+ },
292
+ permission: 'OpenIddictPro.Application.Create',
293
+ icon: 'fa fa-plus',
294
+ },
295
+ ]);
296
+
297
+ const allowFlow = ({ allowImplicitFlow, allowAuthorizationCodeFlow, allowHybridFlow, }) => {
298
+ return allowAuthorizationCodeFlow || allowImplicitFlow || allowHybridFlow;
299
+ };
300
+
301
+ const defaultUriPattern = /^([a-z][a-z0-9+.-]*):(?:\/\/((?:(?=((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9A-F]{2})*))(\3)@)?(?=(\[[0-9A-F:.]{2,}\]|(?:[a-z0-9-._~!$&'()*+,;=]|%[0-9A-F]{2})*))\5(?::(?=(\d*))\6)?)(\/(?=((?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9A-F]{2})*))\8)?|(\/?(?!\/)(?=((?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9A-F]{2})*))\10)?)(?:\?(?=((?:[a-z0-9-._~!$&'()*+,;=:@\/?]|%[0-9A-F]{2})*))\11)?(?:#(?=((?:[a-z0-9-._~!$&'()*+,;=:@\/?]|%[0-9A-F]{2})*))\12)?$/i;
302
+
303
+ const NewLineRegex = /(\r\n|\r|\n)/;
304
+
305
+ function UrisValidator() {
306
+ const pattern = defaultUriPattern;
307
+ return (control) => {
308
+ if (isEmptyInputValue(control.value)) {
309
+ return null;
310
+ }
311
+ const value = control.value;
312
+ const rows = value.split(NewLineRegex).filter(item => !!item.trim());
313
+ if (rows.length === 0) {
314
+ return null;
315
+ }
316
+ const isAllRowsValid = rows.every(item => pattern.test(item));
317
+ if (isAllRowsValid) {
318
+ return null;
319
+ }
320
+ return { url: pattern.toString(), actualValue: value };
321
+ };
322
+ }
323
+ function isEmptyInputValue(value) {
324
+ return (value == null || ((typeof value === 'string' || Array.isArray(value)) && value.length === 0));
325
+ }
326
+
327
+ const DEFAULT_APPLICATIONS_CREATE_FORM_PROPS = FormProp.createMany([
328
+ {
329
+ type: "string" /* String */,
330
+ name: 'clientId',
331
+ displayName: 'AbpOpenIddict::ClientId',
332
+ id: 'clientId',
333
+ validators: () => [Validators.required],
334
+ },
335
+ {
336
+ type: "string" /* String */,
337
+ name: 'displayName',
338
+ displayName: 'AbpOpenIddict::DisplayName',
339
+ id: 'displayName',
340
+ validators: () => [Validators.required],
341
+ },
342
+ {
343
+ type: "string" /* String */,
344
+ name: 'type',
345
+ displayName: 'AbpOpenIddict::Type',
346
+ id: 'type',
347
+ validators: () => [Validators.required],
348
+ options: data => data.getInjected(ApplicationFormModalComponent).types$,
349
+ },
350
+ {
351
+ type: "string" /* String */,
352
+ name: 'clientSecret',
353
+ displayName: 'AbpOpenIddict::ClientSecret',
354
+ id: 'clientSecret',
355
+ visible: data => {
356
+ const formValue = data.getInjected(ApplicationFormModalComponent).getFormValue();
357
+ return formValue.type === defaultApplicationTypes.confidential;
358
+ },
359
+ },
360
+ {
361
+ type: "string" /* String */,
362
+ name: 'clientUri',
363
+ displayName: 'AbpOpenIddict::ClientUri',
364
+ id: 'clientUri',
365
+ validators: () => [UrisValidator()],
366
+ },
367
+ {
368
+ type: "string" /* String */,
369
+ name: 'logoUri',
370
+ displayName: 'AbpOpenIddict::LogoUri',
371
+ id: 'logoUri',
372
+ },
373
+ {
374
+ type: "boolean" /* Boolean */,
375
+ defaultValue: false,
376
+ name: 'allowAuthorizationCodeFlow',
377
+ displayName: 'AbpOpenIddict::AllowAuthorizationCodeFlow',
378
+ id: 'allowAuthorizationCodeFlow',
379
+ },
380
+ {
381
+ type: "boolean" /* Boolean */,
382
+ defaultValue: false,
383
+ name: 'allowImplicitFlow',
384
+ displayName: 'AbpOpenIddict::AllowImplicitFlow',
385
+ id: 'allowImplicitFlow',
386
+ },
387
+ {
388
+ type: "boolean" /* Boolean */,
389
+ defaultValue: false,
390
+ name: 'allowHybridFlow',
391
+ displayName: 'AbpOpenIddict::AllowHybridFlow',
392
+ id: 'allowHybridFlow',
393
+ },
394
+ {
395
+ type: "boolean" /* Boolean */,
396
+ defaultValue: false,
397
+ name: 'allowPasswordFlow',
398
+ displayName: 'AbpOpenIddict::AllowPasswordFlow',
399
+ id: 'allowPasswordFlow',
400
+ },
401
+ {
402
+ type: "boolean" /* Boolean */,
403
+ defaultValue: false,
404
+ name: 'allowClientCredentialsFlow',
405
+ displayName: 'AbpOpenIddict::AllowClientCredentialsFlow',
406
+ id: 'allowClientCredentialsFlow',
407
+ },
408
+ {
409
+ type: "boolean" /* Boolean */,
410
+ defaultValue: false,
411
+ name: 'allowRefreshTokenFlow',
412
+ displayName: 'AbpOpenIddict::AllowRefreshTokenFlow',
413
+ disabled: data => {
414
+ const { allowHybridFlow, allowAuthorizationCodeFlow, allowPasswordFlow } = data
415
+ .getInjected(ApplicationFormModalComponent)
416
+ .getFormValue();
417
+ return !(allowHybridFlow || allowAuthorizationCodeFlow || allowPasswordFlow);
418
+ },
419
+ id: 'allowRefreshTokenFlow',
420
+ },
421
+ {
422
+ type: "boolean" /* Boolean */,
423
+ defaultValue: false,
424
+ name: 'allowDeviceEndpoint',
425
+ displayName: 'AbpOpenIddict::AllowDeviceEndpoint',
426
+ id: 'allowDeviceEndpoint',
427
+ },
428
+ {
429
+ type: "string" /* String */,
430
+ name: 'consentType',
431
+ displayName: 'AbpOpenIddict::ConsentType',
432
+ id: 'consentType',
433
+ options: data => data.getInjected(ApplicationFormModalComponent).consentTypes$,
434
+ visible: data => {
435
+ const formValue = data.getInjected(ApplicationFormModalComponent).getFormValue();
436
+ return allowFlow(formValue);
437
+ },
438
+ },
439
+ {
440
+ type: "multiselect" /* MultiSelect */,
441
+ name: 'scopes',
442
+ displayName: 'AbpOpenIddict::Scopes',
443
+ id: 'scopes',
444
+ options: data => {
445
+ return data
446
+ .getInjected(ScopeService)
447
+ .getAllScopes()
448
+ .pipe(map(result => result.map(scope => ({
449
+ key: scope.displayName,
450
+ value: scope.name,
451
+ }))));
452
+ },
453
+ },
454
+ {
455
+ type: "text" /* Text */,
456
+ name: 'redirectUris',
457
+ displayName: 'AbpOpenIddict::RedirectUris',
458
+ id: 'redirectUris',
459
+ validators: () => [UrisValidator()],
460
+ visible: data => {
461
+ const formValue = data.getInjected(ApplicationFormModalComponent).getFormValue();
462
+ return allowFlow(formValue);
463
+ },
464
+ },
465
+ {
466
+ type: "boolean" /* Boolean */,
467
+ defaultValue: false,
468
+ name: 'allowLogoutEndpoint',
469
+ displayName: 'AbpOpenIddict::AllowLogoutEndpoint',
470
+ id: 'allowLogoutEndpoint',
471
+ visible: data => {
472
+ const formValue = data.getInjected(ApplicationFormModalComponent).getFormValue();
473
+ return allowFlow(formValue);
474
+ },
475
+ },
476
+ {
477
+ type: "text" /* Text */,
478
+ name: 'postLogoutRedirectUris',
479
+ displayName: 'AbpOpenIddict::PostLogoutRedirectUris',
480
+ id: 'postLogoutRedirectUris',
481
+ validators: () => [UrisValidator()],
482
+ visible: data => {
483
+ const { allowLogoutEndpoint } = data
484
+ .getInjected(ApplicationFormModalComponent)
485
+ .getFormValue();
486
+ return allowLogoutEndpoint;
487
+ },
488
+ },
489
+ ]);
490
+ const DEFAULT_APPLICATIONS_FORM_PROPS = DEFAULT_APPLICATIONS_CREATE_FORM_PROPS.concat(FormProp.createMany([
491
+ {
492
+ type: "boolean" /* Boolean */,
493
+ name: 'enabled',
494
+ displayName: 'AbpIdentityServer::Enabled',
495
+ id: 'enabled',
496
+ defaultValue: false,
497
+ },
498
+ ]));
499
+
500
+ const DEFAULT_SCOPES_ENTITY_PROPS = EntityProp.createMany([
501
+ {
502
+ type: "string" /* String */,
503
+ name: 'name',
504
+ displayName: 'AbpOpenIddict::Name',
505
+ columnWidth: 200,
506
+ },
507
+ {
508
+ type: "string" /* String */,
509
+ name: 'displayName',
510
+ displayName: 'AbpOpenIddict::DisplayName',
511
+ columnWidth: 200,
512
+ },
513
+ {
514
+ type: "string" /* String */,
515
+ name: 'description',
516
+ displayName: 'AbpOpenIddict::Description',
517
+ columnWidth: 200,
518
+ },
519
+ ]);
520
+
521
+ class ScopesService {
522
+ constructor() {
523
+ this.state = new InternalStore({ isModalVisible: false });
524
+ this.isModalVisible$ = this.state.sliceState(x => x.isModalVisible);
525
+ }
526
+ openModal() {
527
+ this.setModalState(true);
528
+ }
529
+ setModalState(value) {
530
+ this.state.patch({ isModalVisible: value });
531
+ }
532
+ }
533
+
534
+ class ScopeFormModalComponent {
535
+ constructor(injector, scopesService, service) {
536
+ this.injector = injector;
537
+ this.scopesService = scopesService;
538
+ this.service = service;
539
+ this.saved = new EventEmitter();
540
+ this.isModalVisible$ = this.scopesService.isModalVisible$;
541
+ }
542
+ ngOnChanges(changes) {
543
+ this.createForm();
544
+ }
545
+ save() {
546
+ if (this.form.invalid) {
547
+ return;
548
+ }
549
+ const id = this.selected.id;
550
+ const isEditMode = !!id;
551
+ let sub;
552
+ const value = { ...this.form.value, resources: hashSetParser(this.form.value.resources) };
553
+ if (isEditMode) {
554
+ sub = this.service.update(id, value);
555
+ }
556
+ else {
557
+ sub = this.service.create(value);
558
+ }
559
+ sub.subscribe(() => {
560
+ this.scopesService.setModalState(false);
561
+ this.saved.emit();
562
+ });
563
+ }
564
+ visibleChange($event) {
565
+ this.scopesService.setModalState($event);
566
+ }
567
+ createForm() {
568
+ const selected = this.selected?.id
569
+ ? { ...this.selected, resources: hashSetParser(this.selected.resources) }
570
+ : {};
571
+ const data = new FormPropData(this.injector, selected);
572
+ this.form = generateFormFromProps(data);
573
+ }
574
+ }
575
+ ScopeFormModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: ScopeFormModalComponent, deps: [{ token: i0.Injector }, { token: ScopesService }, { token: i1.ScopeService }], target: i0.ɵɵFactoryTarget.Component });
576
+ ScopeFormModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: ScopeFormModalComponent, selector: "abp-scope-form-modal", inputs: { selected: "selected" }, outputs: { saved: "saved" }, usesOnChanges: true, ngImport: i0, template: "\r\n<abp-modal [visible]=\"isModalVisible$ | async\" (visibleChange)=\"visibleChange($event)\" >\r\n\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewScope') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"scopeForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" 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", components: [{ type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i4.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }], directives: [{ type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { type: i3.ModalCloseDirective, selector: "[abpClose]" }], pipes: { "async": i8.AsyncPipe, "abpLocalization": i4$1.LocalizationPipe } });
577
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: ScopeFormModalComponent, decorators: [{
578
+ type: Component,
579
+ args: [{ selector: 'abp-scope-form-modal', template: "\r\n<abp-modal [visible]=\"isModalVisible$ | async\" (visibleChange)=\"visibleChange($event)\" >\r\n\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpOpenIddict::Edit' : 'AbpOpenIddict::NewScope') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"scopeForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" 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" }]
580
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: ScopesService }, { type: i1.ScopeService }]; }, propDecorators: { selected: [{
581
+ type: Input
582
+ }], saved: [{
583
+ type: Output
584
+ }] } });
585
+
586
+ class ScopesComponent {
587
+ constructor(list, service, scopesService, confirmationService) {
588
+ this.list = list;
589
+ this.service = service;
590
+ this.scopesService = scopesService;
591
+ this.confirmationService = confirmationService;
592
+ this.data = { items: [], totalCount: 0 };
593
+ this.selected = {};
594
+ }
595
+ hookToQuery() {
596
+ this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res));
597
+ }
598
+ ngOnInit() {
599
+ this.hookToQuery();
600
+ }
601
+ onAdd() {
602
+ this.selected = {};
603
+ this.scopesService.openModal();
604
+ }
605
+ onEdit(id) {
606
+ this.service.get(id).subscribe(res => {
607
+ this.selected = res;
608
+ this.scopesService.openModal();
609
+ });
610
+ }
611
+ onDelete(id, name) {
612
+ const sub = this.confirmationService
613
+ .warn('AbpOpenIddict::ScopeDeletionWarningMessage', 'AbpOpenIddict::AreYouSure', {
614
+ messageLocalizationParams: [name],
615
+ })
616
+ .subscribe((status) => {
617
+ if (status === Confirmation.Status.confirm) {
618
+ this.service.delete(id).subscribe(() => this.list.get());
619
+ }
620
+ });
621
+ }
622
+ onSaved() {
623
+ this.list.get();
624
+ }
625
+ }
626
+ ScopesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: ScopesComponent, deps: [{ token: i4$1.ListService }, { token: i1.ScopeService }, { token: ScopesService }, { token: i3.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component });
627
+ ScopesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: ScopesComponent, selector: "abp-scopes", providers: [
628
+ ListService,
629
+ {
630
+ provide: EXTENSIONS_IDENTIFIER,
631
+ useValue: "OpenIddictPro.Scopes" /* Scopes */,
632
+ },
633
+ ], ngImport: i0, template: "<abp-page [title]=\"'AbpOpenIddict::Scopes' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpOpenIddict\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\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<abp-scope-form-modal [selected]=\"selected\" (saved)=\"onSaved()\">\r\n</abp-scope-form-modal>\r\n", components: [{ type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { type: i4.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: ScopeFormModalComponent, selector: "abp-scope-form-modal", inputs: ["selected"], outputs: ["saved"] }], pipes: { "abpLocalization": i4$1.LocalizationPipe } });
634
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: ScopesComponent, decorators: [{
635
+ type: Component,
636
+ args: [{ selector: 'abp-scopes', styles: [], providers: [
637
+ ListService,
638
+ {
639
+ provide: EXTENSIONS_IDENTIFIER,
640
+ useValue: "OpenIddictPro.Scopes" /* Scopes */,
641
+ },
642
+ ], template: "<abp-page [title]=\"'AbpOpenIddict::Scopes' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"wrapper\">\r\n\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpOpenIddict\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\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<abp-scope-form-modal [selected]=\"selected\" (saved)=\"onSaved()\">\r\n</abp-scope-form-modal>\r\n" }]
643
+ }], ctorParameters: function () { return [{ type: i4$1.ListService }, { type: i1.ScopeService }, { type: ScopesService }, { type: i3.ConfirmationService }]; } });
644
+
645
+ const DEFAULT_SCOPES_TOOLBAR_ACTIONS = ToolbarAction.createMany([
646
+ {
647
+ text: 'AbpOpenIddict::NewScope',
648
+ action: data => {
649
+ const component = data.getInjected(ScopesComponent);
650
+ component.onAdd();
651
+ },
652
+ permission: 'OpenIddictPro.Scope.Create',
653
+ icon: 'fa fa-plus',
654
+ },
655
+ ]);
656
+
657
+ const DEFAULT_SCOPE_CREATE_FORM_PROPS = FormProp.createMany([
658
+ {
659
+ type: "string" /* String */,
660
+ name: 'name',
661
+ displayName: 'AbpOpenIddict::Name',
662
+ id: 'name',
663
+ validators: () => [Validators.required],
664
+ },
665
+ {
666
+ type: "string" /* String */,
667
+ name: 'displayName',
668
+ displayName: 'AbpOpenIddict::DisplayName',
669
+ id: 'displayName',
670
+ },
671
+ {
672
+ type: "string" /* String */,
673
+ name: 'description',
674
+ displayName: 'AbpOpenIddict::Description',
675
+ id: 'description',
676
+ },
677
+ {
678
+ type: "text" /* Text */,
679
+ name: 'resources',
680
+ displayName: 'AbpOpenIddict::Resources',
681
+ id: 'resources',
682
+ },
683
+ ]);
684
+ const DEFAULT_SCOPES_FORM_PROPS = DEFAULT_SCOPE_CREATE_FORM_PROPS;
685
+
686
+ const DEFAULT_SCOPE_ENTITY_ACTIONS = EntityAction.createMany([
687
+ {
688
+ text: 'AbpOpenIddict::Edit',
689
+ action: data => {
690
+ const component = data.getInjected(ScopesComponent);
691
+ component.onEdit(data.record.id);
692
+ },
693
+ permission: 'OpenIddictPro.Scope.Update',
694
+ },
695
+ {
696
+ text: 'AbpOpenIddict::ChangeHistory',
697
+ action: data => {
698
+ const showHistory = data.getInjected(SHOW_ENTITY_HISTORY);
699
+ showHistory(data.record.id, 'Volo.Abp.OpenIddict.Scopes.OpenIddictScope');
700
+ },
701
+ permission: 'AuditLogging.ViewChangeHistory:Volo.Abp.OpenIddict.Pro.Scopes.Scope',
702
+ visible: data => Boolean(data.getInjected(SHOW_ENTITY_HISTORY, null)),
703
+ },
704
+ {
705
+ text: 'AbpOpenIddict::Delete',
706
+ action: data => {
707
+ const component = data.getInjected(ScopesComponent);
708
+ component.onDelete(data.record.id, data.record.name);
709
+ },
710
+ permission: 'OpenIddictPro.Scope.Delete',
711
+ },
712
+ ]);
713
+
714
+ const DEFAULT_OPENIDDICT_PRO_ENTITY_ACTIONS = {
715
+ ["OpenIddictPro.Applications" /* Applications */]: DEFAULT_APPLICATIONS_ENTITY_ACTIONS,
716
+ ["OpenIddictPro.Scopes" /* Scopes */]: DEFAULT_SCOPE_ENTITY_ACTIONS,
717
+ };
718
+ const DEFAULT_OPENIDDICT_PRO_TOOLBAR_ACTIONS = {
719
+ ["OpenIddictPro.Applications" /* Applications */]: DEFAULT_APPLICATIONS_TOOLBAR_ACTIONS,
720
+ ["OpenIddictPro.Scopes" /* Scopes */]: DEFAULT_SCOPES_TOOLBAR_ACTIONS,
721
+ };
722
+ const DEFAULT_OPENIDDICT_PRO_ENTITY_PROPS = {
723
+ ["OpenIddictPro.Applications" /* Applications */]: DEFAULT_APPLICATIONS_ENTITY_PROPS,
724
+ ["OpenIddictPro.Scopes" /* Scopes */]: DEFAULT_SCOPES_ENTITY_PROPS,
725
+ };
726
+ const DEFAULT_OPENIDDICT_PRO_CREATE_FORM_PROPS = {
727
+ ["OpenIddictPro.Applications" /* Applications */]: DEFAULT_APPLICATIONS_CREATE_FORM_PROPS,
728
+ ["OpenIddictPro.Scopes" /* Scopes */]: DEFAULT_SCOPE_CREATE_FORM_PROPS,
729
+ };
730
+ const DEFAULT_OPENIDDICT_PRO_EDIT_FORM_PROPS = {
731
+ ["OpenIddictPro.Applications" /* Applications */]: DEFAULT_APPLICATIONS_FORM_PROPS,
732
+ ["OpenIddictPro.Scopes" /* Scopes */]: DEFAULT_SCOPES_FORM_PROPS,
733
+ };
734
+ const OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS = new InjectionToken('OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS');
735
+ const OPENIDDICT_PRO_TOOLBAR_ACTION_CONTRIBUTORS = new InjectionToken('OPENIDDICT_PRO__TOOLBAR_ACTION_CONTRIBUTORS');
736
+ const OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS = new InjectionToken('OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS');
737
+ const OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS = new InjectionToken('OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS');
738
+ const OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS = new InjectionToken('OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS');
739
+
740
+ class OpenIddictProExtensionsGuard {
741
+ constructor(injector) {
742
+ this.injector = injector;
743
+ }
744
+ canActivate() {
745
+ const extensions = this.injector.get(ExtensionsService);
746
+ const actionContributors = this.injector.get(OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS, null) || {};
747
+ const toolbarContributors = this.injector.get(OPENIDDICT_PRO_TOOLBAR_ACTION_CONTRIBUTORS, null) || {};
748
+ const propContributors = this.injector.get(OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS, null) || {};
749
+ const createFormContributors = this.injector.get(OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS, null) || {};
750
+ const editFormContributors = this.injector.get(OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS, null) || {};
751
+ const configState = this.injector.get(ConfigStateService);
752
+ return getObjectExtensionEntitiesFromStore(configState, 'OpenIddictPro').pipe(map(entities => {
753
+ return {
754
+ ["OpenIddictPro.Applications" /* Applications */]: entities.ApiResource,
755
+ ["OpenIddictPro.Scopes" /* Scopes */]: entities.Scopes,
756
+ };
757
+ }), mapEntitiesToContributors(configState, 'AbpOpenIddictPro'), tap(objectExtensionContributors => {
758
+ mergeWithDefaultActions(extensions.entityActions, DEFAULT_OPENIDDICT_PRO_ENTITY_ACTIONS, actionContributors);
759
+ mergeWithDefaultActions(extensions.toolbarActions, DEFAULT_OPENIDDICT_PRO_TOOLBAR_ACTIONS, toolbarContributors);
760
+ mergeWithDefaultProps(extensions.entityProps, DEFAULT_OPENIDDICT_PRO_ENTITY_PROPS, objectExtensionContributors.prop, propContributors);
761
+ mergeWithDefaultProps(extensions.createFormProps, DEFAULT_OPENIDDICT_PRO_CREATE_FORM_PROPS, objectExtensionContributors.createForm, createFormContributors);
762
+ mergeWithDefaultProps(extensions.editFormProps, DEFAULT_OPENIDDICT_PRO_EDIT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
763
+ }), mapTo(true));
764
+ }
765
+ }
766
+ OpenIddictProExtensionsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpenIddictProExtensionsGuard, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
767
+ OpenIddictProExtensionsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpenIddictProExtensionsGuard });
768
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpenIddictProExtensionsGuard, decorators: [{
769
+ type: Injectable
770
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
771
+
772
+ const routes = [
773
+ { path: '', redirectTo: 'Applications', pathMatch: 'full' },
774
+ {
775
+ path: '',
776
+ component: RouterOutletComponent,
777
+ canActivate: [AuthGuard, PermissionGuard, OpenIddictProExtensionsGuard],
778
+ children: [
779
+ {
780
+ path: 'Applications',
781
+ component: ReplaceableRouteContainerComponent,
782
+ data: {
783
+ requiredPolicy: 'OpenIddictPro.Application',
784
+ replaceableComponent: {
785
+ key: "OpenIddictPro.Applications" /* Applications */,
786
+ defaultComponent: ApplicationsComponent,
787
+ },
788
+ },
789
+ },
790
+ {
791
+ path: 'Scopes',
792
+ component: ReplaceableRouteContainerComponent,
793
+ data: {
794
+ requiredPolicy: 'OpenIddictPro.Scopes',
795
+ replaceableComponent: {
796
+ key: "OpenIddictPro.Scopes" /* Scopes */,
797
+ defaultComponent: ScopesComponent,
798
+ },
799
+ },
800
+ },
801
+ ],
802
+ },
803
+ ];
804
+ class OpeniddictproRoutingModule {
805
+ }
806
+ OpeniddictproRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpeniddictproRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
807
+ OpeniddictproRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpeniddictproRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] });
808
+ OpeniddictproRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpeniddictproRoutingModule, imports: [[RouterModule.forChild(routes)], RouterModule] });
809
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpeniddictproRoutingModule, decorators: [{
810
+ type: NgModule,
811
+ args: [{
812
+ imports: [RouterModule.forChild(routes)],
813
+ exports: [RouterModule],
814
+ }]
815
+ }] });
816
+
817
+ const components = [
818
+ ApplicationsComponent,
819
+ ApplicationFormModalComponent,
820
+ ScopesComponent,
821
+ ScopeFormModalComponent,
822
+ ];
823
+ class OpeniddictproModule {
824
+ static forChild(options = {}) {
825
+ return {
826
+ ngModule: OpeniddictproModule,
827
+ providers: [
828
+ {
829
+ provide: OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS,
830
+ useValue: options.entityActionContributors,
831
+ },
832
+ {
833
+ provide: OPENIDDICT_PRO_TOOLBAR_ACTION_CONTRIBUTORS,
834
+ useValue: options.toolbarActionContributors,
835
+ },
836
+ {
837
+ provide: OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS,
838
+ useValue: options.entityPropContributors,
839
+ },
840
+ {
841
+ provide: OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS,
842
+ useValue: options.createFormPropContributors,
843
+ },
844
+ {
845
+ provide: OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS,
846
+ useValue: options.editFormPropContributors,
847
+ },
848
+ OpenIddictProExtensionsGuard,
849
+ ApplicationsService,
850
+ ScopesService,
851
+ ],
852
+ };
853
+ }
854
+ static forLazy(options = {}) {
855
+ return new LazyModuleFactory(OpeniddictproModule.forChild(options));
856
+ }
857
+ }
858
+ OpeniddictproModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpeniddictproModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
859
+ OpeniddictproModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpeniddictproModule, declarations: [ApplicationsComponent,
860
+ ApplicationFormModalComponent,
861
+ ScopesComponent,
862
+ ScopeFormModalComponent], imports: [OpeniddictproRoutingModule,
863
+ CoreModule,
864
+ CommercialUiModule,
865
+ ThemeSharedModule,
866
+ NgbDropdownModule,
867
+ NgxValidateCoreModule,
868
+ PageModule,
869
+ AdvancedEntityFiltersModule,
870
+ PermissionManagementModule], exports: [ApplicationsComponent,
871
+ ApplicationFormModalComponent,
872
+ ScopesComponent,
873
+ ScopeFormModalComponent] });
874
+ OpeniddictproModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpeniddictproModule, imports: [[
875
+ OpeniddictproRoutingModule,
876
+ CoreModule,
877
+ CommercialUiModule,
878
+ ThemeSharedModule,
879
+ NgbDropdownModule,
880
+ NgxValidateCoreModule,
881
+ PageModule,
882
+ AdvancedEntityFiltersModule,
883
+ PermissionManagementModule,
884
+ ]] });
885
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: OpeniddictproModule, decorators: [{
886
+ type: NgModule,
887
+ args: [{
888
+ imports: [
889
+ OpeniddictproRoutingModule,
890
+ CoreModule,
891
+ CommercialUiModule,
892
+ ThemeSharedModule,
893
+ NgbDropdownModule,
894
+ NgxValidateCoreModule,
895
+ PageModule,
896
+ AdvancedEntityFiltersModule,
897
+ PermissionManagementModule,
898
+ ],
899
+ declarations: [...components],
900
+ exports: [...components],
901
+ }]
902
+ }] });
903
+
904
+ /**
905
+ * Generated bundle index. Do not edit.
906
+ */
907
+
908
+ 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_SCOPES_ENTITY_PROPS, DEFAULT_SCOPES_FORM_PROPS, DEFAULT_SCOPES_TOOLBAR_ACTIONS, DEFAULT_SCOPE_CREATE_FORM_PROPS, DEFAULT_SCOPE_ENTITY_ACTIONS, DefaultApplicationsConsentType, OpeniddictproModule, ScopeFormModalComponent, ScopesComponent, ScopesService, allowFlow, defaultApplicationTypes, defaultApplicationsTypeList, defaultUriPattern };
909
+ //# sourceMappingURL=volo-abp.ng.openiddictpro.mjs.map