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