@volo/abp.ng.openiddictpro 7.2.2 → 7.3.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/README.md +130 -0
  2. package/config/enums/index.d.ts +2 -2
  3. package/config/enums/policy-names.d.ts +5 -5
  4. package/config/enums/route-names.d.ts +5 -5
  5. package/config/index.d.ts +5 -5
  6. package/config/openiddictpro-config.module.d.ts +8 -8
  7. package/config/providers/index.d.ts +1 -1
  8. package/config/providers/route.provider.d.ts +8 -8
  9. package/config/public-api.d.ts +3 -3
  10. package/{esm2020 → esm2022}/config/enums/index.mjs +2 -2
  11. package/{esm2020 → esm2022}/config/enums/policy-names.mjs +1 -1
  12. package/{esm2020 → esm2022}/config/enums/route-names.mjs +1 -1
  13. package/esm2022/config/openiddictpro-config.module.mjs +19 -0
  14. package/{esm2020 → esm2022}/config/providers/index.mjs +1 -1
  15. package/{esm2020 → esm2022}/config/providers/route.provider.mjs +36 -36
  16. package/{esm2020 → esm2022}/config/public-api.mjs +3 -3
  17. package/{esm2020 → esm2022}/config/volo-abp.ng.openiddictpro-config.mjs +4 -4
  18. package/esm2022/lib/components/application-form-modal/application-form-modal.component.mjs +117 -0
  19. package/esm2022/lib/components/applications/applications.component.mjs +86 -0
  20. package/{esm2020 → esm2022}/lib/components/index.mjs +5 -5
  21. package/esm2022/lib/components/scope-form-modal/scope-form-modal.component.mjs +68 -0
  22. package/{esm2020 → esm2022}/lib/components/scopes/allow-flow.mjs +3 -3
  23. package/esm2022/lib/components/scopes/scopes.component.mjs +75 -0
  24. package/{esm2020 → esm2022}/lib/defaults/default-applications-consent-type.mjs +18 -18
  25. package/{esm2020 → esm2022}/lib/defaults/default-applications-entity-actions.mjs +37 -37
  26. package/{esm2020 → esm2022}/lib/defaults/default-applications-entity-props.mjs +21 -21
  27. package/{esm2020 → esm2022}/lib/defaults/default-applications-form-props.mjs +252 -244
  28. package/{esm2020 → esm2022}/lib/defaults/default-applications-toolbar-actions.mjs +13 -13
  29. package/{esm2020 → esm2022}/lib/defaults/default-applications-types.mjs +14 -14
  30. package/{esm2020 → esm2022}/lib/defaults/default-scope-entity-actions.mjs +30 -30
  31. package/{esm2020 → esm2022}/lib/defaults/default-scope-entity-props.mjs +21 -21
  32. package/{esm2020 → esm2022}/lib/defaults/default-scope-form-props.mjs +30 -30
  33. package/{esm2020 → esm2022}/lib/defaults/default-scope-toolbar-actions.mjs +13 -13
  34. package/{esm2020 → esm2022}/lib/defaults/default-uri-pattern.mjs +1 -1
  35. package/{esm2020 → esm2022}/lib/defaults/index.mjs +11 -11
  36. package/{esm2020 → esm2022}/lib/enums/components.mjs +1 -1
  37. package/{esm2020 → esm2022}/lib/enums/index.mjs +1 -1
  38. package/esm2022/lib/guards/extensions.guard.mjs +39 -0
  39. package/{esm2020 → esm2022}/lib/guards/index.mjs +1 -1
  40. package/{esm2020 → esm2022}/lib/models/applications-service-state.mjs +1 -1
  41. package/{esm2020 → esm2022}/lib/models/config-options.mjs +1 -1
  42. package/{esm2020 → esm2022}/lib/models/index.mjs +3 -3
  43. package/{esm2020 → esm2022}/lib/models/scopes-service-state.mjs +1 -1
  44. package/esm2022/lib/openiddictpro-routing.module.mjs +54 -0
  45. package/esm2022/lib/openiddictpro.module.mjs +103 -0
  46. package/{esm2020 → esm2022}/lib/services/applications.service.mjs +13 -13
  47. package/{esm2020 → esm2022}/lib/services/index.mjs +2 -2
  48. package/{esm2020 → esm2022}/lib/services/scopes.service.mjs +13 -13
  49. package/{esm2020 → esm2022}/lib/tokens/extensions.token.mjs +34 -34
  50. package/{esm2020 → esm2022}/lib/tokens/index.mjs +1 -1
  51. package/{esm2020 → esm2022}/lib/utils/hashset-parser.mjs +14 -14
  52. package/{esm2020 → esm2022}/lib/utils/index.mjs +2 -2
  53. package/{esm2020 → esm2022}/lib/utils/new-line-regex.mjs +1 -1
  54. package/{esm2020 → esm2022}/lib/utils/uris-validator.mjs +23 -23
  55. package/esm2022/proxy/lib/proxy/application.service.mjs +49 -0
  56. package/{esm2020 → esm2022}/proxy/lib/proxy/applications/dtos/index.mjs +1 -1
  57. package/esm2022/proxy/lib/proxy/applications/dtos/models.mjs +2 -0
  58. package/{esm2020 → esm2022}/proxy/lib/proxy/applications/index.mjs +2 -2
  59. package/{esm2020 → esm2022}/proxy/lib/proxy/index.mjs +5 -5
  60. package/esm2022/proxy/lib/proxy/scope.service.mjs +53 -0
  61. package/{esm2020 → esm2022}/proxy/lib/proxy/scopes/dtos/index.mjs +1 -1
  62. package/esm2022/proxy/lib/proxy/scopes/dtos/models.mjs +2 -0
  63. package/{esm2020 → esm2022}/proxy/lib/proxy/scopes/index.mjs +2 -2
  64. package/{esm2020 → esm2022}/proxy/public-api.mjs +1 -1
  65. package/{esm2020 → esm2022}/proxy/volo-abp.ng.openiddictpro-proxy.mjs +4 -4
  66. package/{esm2020 → esm2022}/public-api.mjs +8 -8
  67. package/{esm2020 → esm2022}/volo-abp.ng.openiddictpro.mjs +4 -4
  68. package/{fesm2020 → fesm2022}/volo-abp.ng.openiddictpro-config.mjs +48 -48
  69. package/{fesm2020 → fesm2022}/volo-abp.ng.openiddictpro-config.mjs.map +1 -1
  70. package/fesm2022/volo-abp.ng.openiddictpro-proxy.mjs +120 -0
  71. package/fesm2022/volo-abp.ng.openiddictpro-proxy.mjs.map +1 -0
  72. package/{fesm2020 → fesm2022}/volo-abp.ng.openiddictpro.mjs +926 -916
  73. package/fesm2022/volo-abp.ng.openiddictpro.mjs.map +1 -0
  74. package/index.d.ts +5 -5
  75. package/lib/components/application-form-modal/application-form-modal.component.d.ts +40 -40
  76. package/lib/components/applications/applications.component.d.ts +27 -27
  77. package/lib/components/index.d.ts +5 -5
  78. package/lib/components/scope-form-modal/scope-form-modal.component.d.ts +25 -25
  79. package/lib/components/scopes/allow-flow.d.ts +2 -2
  80. package/lib/components/scopes/scopes.component.d.ts +23 -23
  81. package/lib/defaults/default-applications-consent-type.d.ts +4 -4
  82. package/lib/defaults/default-applications-entity-actions.d.ts +3 -3
  83. package/lib/defaults/default-applications-entity-props.d.ts +3 -3
  84. package/lib/defaults/default-applications-form-props.d.ts +4 -4
  85. package/lib/defaults/default-applications-toolbar-actions.d.ts +3 -3
  86. package/lib/defaults/default-applications-types.d.ts +8 -8
  87. package/lib/defaults/default-scope-entity-actions.d.ts +3 -3
  88. package/lib/defaults/default-scope-entity-props.d.ts +3 -3
  89. package/lib/defaults/default-scope-form-props.d.ts +4 -4
  90. package/lib/defaults/default-scope-toolbar-actions.d.ts +3 -3
  91. package/lib/defaults/default-uri-pattern.d.ts +1 -1
  92. package/lib/defaults/index.d.ts +11 -11
  93. package/lib/enums/components.d.ts +4 -4
  94. package/lib/enums/index.d.ts +1 -1
  95. package/lib/guards/extensions.guard.d.ts +10 -11
  96. package/lib/guards/index.d.ts +1 -1
  97. package/lib/models/applications-service-state.d.ts +3 -3
  98. package/lib/models/config-options.d.ts +26 -26
  99. package/lib/models/index.d.ts +3 -3
  100. package/lib/models/scopes-service-state.d.ts +3 -3
  101. package/lib/openiddictpro-routing.module.d.ts +7 -7
  102. package/lib/openiddictpro.module.d.ts +22 -22
  103. package/lib/services/applications.service.d.ts +6 -6
  104. package/lib/services/index.d.ts +2 -2
  105. package/lib/services/scopes.service.d.ts +6 -6
  106. package/lib/tokens/extensions.token.d.ts +39 -39
  107. package/lib/tokens/index.d.ts +1 -1
  108. package/lib/utils/hashset-parser.d.ts +1 -1
  109. package/lib/utils/index.d.ts +2 -2
  110. package/lib/utils/new-line-regex.d.ts +1 -1
  111. package/lib/utils/uris-validator.d.ts +2 -2
  112. package/package.json +33 -25
  113. package/proxy/index.d.ts +5 -5
  114. package/proxy/lib/proxy/application.service.d.ts +16 -16
  115. package/proxy/lib/proxy/applications/dtos/index.d.ts +1 -1
  116. package/proxy/lib/proxy/applications/dtos/models.d.ts +50 -48
  117. package/proxy/lib/proxy/applications/index.d.ts +2 -2
  118. package/proxy/lib/proxy/index.d.ts +5 -5
  119. package/proxy/lib/proxy/scope.service.d.ts +17 -17
  120. package/proxy/lib/proxy/scopes/dtos/index.d.ts +1 -1
  121. package/proxy/lib/proxy/scopes/dtos/models.d.ts +21 -20
  122. package/proxy/lib/proxy/scopes/index.d.ts +2 -2
  123. package/proxy/public-api.d.ts +1 -1
  124. package/public-api.d.ts +8 -8
  125. package/esm2020/config/openiddictpro-config.module.mjs +0 -18
  126. package/esm2020/lib/components/application-form-modal/application-form-modal.component.mjs +0 -114
  127. package/esm2020/lib/components/applications/applications.component.mjs +0 -85
  128. package/esm2020/lib/components/scope-form-modal/scope-form-modal.component.mjs +0 -67
  129. package/esm2020/lib/components/scopes/scopes.component.mjs +0 -74
  130. package/esm2020/lib/guards/extensions.guard.mjs +0 -38
  131. package/esm2020/lib/openiddictpro-routing.module.mjs +0 -53
  132. package/esm2020/lib/openiddictpro.module.mjs +0 -102
  133. package/esm2020/proxy/lib/proxy/application.service.mjs +0 -43
  134. package/esm2020/proxy/lib/proxy/applications/dtos/models.mjs +0 -2
  135. package/esm2020/proxy/lib/proxy/scope.service.mjs +0 -47
  136. package/esm2020/proxy/lib/proxy/scopes/dtos/models.mjs +0 -2
  137. package/fesm2015/volo-abp.ng.openiddictpro-config.mjs +0 -60
  138. package/fesm2015/volo-abp.ng.openiddictpro-config.mjs.map +0 -1
  139. package/fesm2015/volo-abp.ng.openiddictpro-proxy.mjs +0 -110
  140. package/fesm2015/volo-abp.ng.openiddictpro-proxy.mjs.map +0 -1
  141. package/fesm2015/volo-abp.ng.openiddictpro.mjs +0 -991
  142. package/fesm2015/volo-abp.ng.openiddictpro.mjs.map +0 -1
  143. package/fesm2020/volo-abp.ng.openiddictpro-proxy.mjs +0 -110
  144. package/fesm2020/volo-abp.ng.openiddictpro-proxy.mjs.map +0 -1
  145. package/fesm2020/volo-abp.ng.openiddictpro.mjs.map +0 -1
  146. package/proxy/src/lib/proxy/README.md +0 -17
@@ -25,972 +25,982 @@ 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
+ {
521
+ type: "text" /* ePropType.Text */,
522
+ name: 'extensionGrantTypes',
523
+ displayName: 'AbpOpenIddict::ExtensionGrantTypes',
524
+ id: 'extensionGrantTypes',
525
+ className: className,
526
+ group: groupRight,
527
+ },
528
+ {
529
+ type: "multiselect" /* ePropType.MultiSelect */,
530
+ name: 'scopes',
531
+ displayName: 'AbpOpenIddict::Scopes',
532
+ id: 'scopes',
533
+ options: data => {
534
+ return data
535
+ .getInjected(ScopeService)
536
+ .getAllScopes()
537
+ .pipe(map((result) => result.map(scope => ({
538
+ key: scope.name,
539
+ value: scope.name,
540
+ }))));
541
+ },
542
+ group: groupRight,
543
+ className: className,
544
+ },
545
+ {
546
+ type: "text" /* ePropType.Text */,
547
+ name: 'redirectUris',
548
+ displayName: 'AbpOpenIddict::RedirectUris',
549
+ id: 'redirectUris',
550
+ validators: () => [UrisValidator()],
551
+ visible: data => {
552
+ const formValue = data.getInjected(ApplicationFormModalComponent).getFormValue();
553
+ return allowFlow(formValue);
554
+ },
555
+ group: groupRight,
556
+ className: className,
557
+ },
558
+ {
559
+ type: "boolean" /* ePropType.Boolean */,
560
+ defaultValue: false,
561
+ name: 'allowLogoutEndpoint',
562
+ displayName: 'AbpOpenIddict::AllowLogoutEndpoint',
563
+ id: 'allowLogoutEndpoint',
564
+ visible: data => {
565
+ const formValue = data.getInjected(ApplicationFormModalComponent).getFormValue();
566
+ return allowFlow(formValue);
567
+ },
568
+ group: groupRight,
569
+ className: className,
570
+ },
571
+ {
572
+ type: "text" /* ePropType.Text */,
573
+ name: 'postLogoutRedirectUris',
574
+ displayName: 'AbpOpenIddict::PostLogoutRedirectUris',
575
+ id: 'postLogoutRedirectUris',
576
+ validators: () => [UrisValidator()],
577
+ visible: data => {
578
+ const { allowLogoutEndpoint } = data
579
+ .getInjected(ApplicationFormModalComponent)
580
+ .getFormValue();
581
+ return allowLogoutEndpoint;
582
+ },
583
+ group: groupRight,
584
+ className: className,
585
+ },
586
+ ]);
587
+ const DEFAULT_APPLICATIONS_FORM_PROPS = DEFAULT_APPLICATIONS_CREATE_FORM_PROPS.concat(FormProp.createMany([
588
+ {
589
+ type: "boolean" /* ePropType.Boolean */,
590
+ name: 'enabled',
591
+ displayName: 'AbpOpenIddict::Enabled',
592
+ id: 'enabled',
593
+ defaultValue: false,
594
+ group: groupRight,
595
+ className: className,
596
+ },
587
597
  ]));
588
598
 
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
- },
599
+ const DEFAULT_SCOPES_ENTITY_PROPS = EntityProp.createMany([
600
+ {
601
+ type: "string" /* ePropType.String */,
602
+ name: 'name',
603
+ displayName: 'AbpOpenIddict::Name',
604
+ columnWidth: 200,
605
+ },
606
+ {
607
+ type: "string" /* ePropType.String */,
608
+ name: 'displayName',
609
+ displayName: 'AbpOpenIddict::DisplayName',
610
+ columnWidth: 200,
611
+ },
612
+ {
613
+ type: "string" /* ePropType.String */,
614
+ name: 'description',
615
+ displayName: 'AbpOpenIddict::Description',
616
+ columnWidth: 200,
617
+ },
608
618
  ]);
609
619
 
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
- }
620
+ class ScopesService {
621
+ constructor() {
622
+ this.state = new InternalStore({ isModalVisible: false });
623
+ this.isModalVisible$ = this.state.sliceState(x => x.isModalVisible);
624
+ }
625
+ openModal() {
626
+ this.setModalState(true);
627
+ }
628
+ setModalState(value) {
629
+ this.state.patch({ isModalVisible: value });
630
+ }
621
631
  }
622
632
 
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
633
+ class ScopeFormModalComponent {
634
+ constructor(injector, scopesService, service) {
635
+ this.injector = injector;
636
+ this.scopesService = scopesService;
637
+ this.service = service;
638
+ this.saved = new EventEmitter();
639
+ this.blueprints = { pattern: 'AbpOpenIddict::TheScopeNameCannotContainSpaces' };
640
+ this.isModalVisible$ = this.scopesService.isModalVisible$;
641
+ }
642
+ ngOnChanges(changes) {
643
+ this.createForm();
644
+ }
645
+ save() {
646
+ if (this.form.invalid) {
647
+ return;
648
+ }
649
+ const id = this.selected.id;
650
+ const isEditMode = !!id;
651
+ let sub;
652
+ const value = { ...this.form.value, resources: hashSetParser(this.form.value.resources) };
653
+ if (isEditMode) {
654
+ sub = this.service.update(id, value);
655
+ }
656
+ else {
657
+ sub = this.service.create(value);
658
+ }
659
+ sub.subscribe(() => {
660
+ this.scopesService.setModalState(false);
661
+ this.saved.emit();
662
+ });
663
+ }
664
+ visibleChange($event) {
665
+ this.scopesService.setModalState($event);
666
+ }
667
+ createForm() {
668
+ const selected = this.selected?.id
669
+ ? { ...this.selected, resources: hashSetParser(this.selected.resources) }
670
+ : {};
671
+ const data = new FormPropData(this.injector, selected);
672
+ this.form = generateFormFromProps(data);
673
+ }
674
+ 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 }); }
675
+ 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" }] }); }
676
+ }
677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ScopeFormModalComponent, decorators: [{
678
+ type: Component,
679
+ 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" }]
680
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: ScopesService }, { type: i1.ScopeService }]; }, propDecorators: { selected: [{
681
+ type: Input
682
+ }], saved: [{
683
+ type: Output
674
684
  }] } });
675
685
 
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" }]
686
+ class ScopesComponent {
687
+ constructor(list, service, scopesService, confirmationService) {
688
+ this.list = list;
689
+ this.service = service;
690
+ this.scopesService = scopesService;
691
+ this.confirmationService = confirmationService;
692
+ this.data = { items: [], totalCount: 0 };
693
+ this.selected = {};
694
+ }
695
+ hookToQuery() {
696
+ this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res));
697
+ }
698
+ ngOnInit() {
699
+ this.hookToQuery();
700
+ }
701
+ onAdd() {
702
+ this.selected = {};
703
+ this.scopesService.openModal();
704
+ }
705
+ onEdit(id) {
706
+ this.service.get(id).subscribe(res => {
707
+ this.selected = res;
708
+ this.scopesService.openModal();
709
+ });
710
+ }
711
+ onDelete(id, name) {
712
+ const sub = this.confirmationService
713
+ .warn('AbpOpenIddict::ScopeDeletionWarningMessage', 'AbpOpenIddict::AreYouSure', {
714
+ messageLocalizationParams: [name],
715
+ })
716
+ .subscribe((status) => {
717
+ if (status === Confirmation.Status.confirm) {
718
+ this.service.delete(id).subscribe(() => this.list.get());
719
+ }
720
+ });
721
+ }
722
+ onSaved() {
723
+ this.list.get();
724
+ }
725
+ 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 }); }
726
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: ScopesComponent, selector: "abp-scopes", providers: [
727
+ ListService,
728
+ {
729
+ provide: EXTENSIONS_IDENTIFIER,
730
+ useValue: "OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */,
731
+ },
732
+ ], 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" }] }); }
733
+ }
734
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ScopesComponent, decorators: [{
735
+ type: Component,
736
+ args: [{ selector: 'abp-scopes', providers: [
737
+ ListService,
738
+ {
739
+ provide: EXTENSIONS_IDENTIFIER,
740
+ useValue: "OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */,
741
+ },
742
+ ], 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
743
  }], ctorParameters: function () { return [{ type: i3.ListService }, { type: i1.ScopeService }, { type: ScopesService }, { type: i7.ConfirmationService }]; } });
734
744
 
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
- },
745
+ const DEFAULT_SCOPES_TOOLBAR_ACTIONS = ToolbarAction.createMany([
746
+ {
747
+ text: 'AbpOpenIddict::NewScope',
748
+ action: data => {
749
+ const component = data.getInjected(ScopesComponent);
750
+ component.onAdd();
751
+ },
752
+ permission: 'OpenIddictPro.Scope.Create',
753
+ icon: 'fa fa-plus',
754
+ },
745
755
  ]);
746
756
 
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
- ]);
757
+ const DEFAULT_SCOPE_CREATE_FORM_PROPS = FormProp.createMany([
758
+ {
759
+ type: "string" /* ePropType.String */,
760
+ name: 'name',
761
+ displayName: 'AbpOpenIddict::Name',
762
+ id: 'name',
763
+ validators: () => [Validators.required, Validators.pattern(/^\S+$/)],
764
+ },
765
+ {
766
+ type: "string" /* ePropType.String */,
767
+ name: 'displayName',
768
+ displayName: 'AbpOpenIddict::DisplayName',
769
+ id: 'displayName',
770
+ },
771
+ {
772
+ type: "string" /* ePropType.String */,
773
+ name: 'description',
774
+ displayName: 'AbpOpenIddict::Description',
775
+ id: 'description',
776
+ },
777
+ {
778
+ type: "text" /* ePropType.Text */,
779
+ name: 'resources',
780
+ displayName: 'AbpOpenIddict::Resources',
781
+ id: 'resources',
782
+ },
783
+ ]);
774
784
  const DEFAULT_SCOPES_FORM_PROPS = DEFAULT_SCOPE_CREATE_FORM_PROPS;
775
785
 
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
- },
786
+ const DEFAULT_SCOPE_ENTITY_ACTIONS = EntityAction.createMany([
787
+ {
788
+ text: 'AbpOpenIddict::Edit',
789
+ action: data => {
790
+ const component = data.getInjected(ScopesComponent);
791
+ component.onEdit(data.record.id);
792
+ },
793
+ permission: 'OpenIddictPro.Scope.Update',
794
+ },
795
+ {
796
+ text: 'AbpOpenIddict::ChangeHistory',
797
+ action: data => {
798
+ const showHistory = data.getInjected(SHOW_ENTITY_HISTORY);
799
+ showHistory(data.record.id, 'Volo.Abp.OpenIddict.Scopes.OpenIddictScope');
800
+ },
801
+ permission: 'AuditLogging.ViewChangeHistory:Volo.Abp.OpenIddict.Pro.Scopes.Scope',
802
+ visible: data => Boolean(data.getInjected(SHOW_ENTITY_HISTORY, null)),
803
+ },
804
+ {
805
+ text: 'AbpOpenIddict::Delete',
806
+ action: data => {
807
+ const component = data.getInjected(ScopesComponent);
808
+ component.onDelete(data.record.id, data.record.name);
809
+ },
810
+ permission: 'OpenIddictPro.Scope.Delete',
811
+ },
802
812
  ]);
803
813
 
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');
814
+ const DEFAULT_OPENIDDICT_PRO_ENTITY_ACTIONS = {
815
+ ["OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */]: DEFAULT_APPLICATIONS_ENTITY_ACTIONS,
816
+ ["OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */]: DEFAULT_SCOPE_ENTITY_ACTIONS,
817
+ };
818
+ const DEFAULT_OPENIDDICT_PRO_TOOLBAR_ACTIONS = {
819
+ ["OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */]: DEFAULT_APPLICATIONS_TOOLBAR_ACTIONS,
820
+ ["OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */]: DEFAULT_SCOPES_TOOLBAR_ACTIONS,
821
+ };
822
+ const DEFAULT_OPENIDDICT_PRO_ENTITY_PROPS = {
823
+ ["OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */]: DEFAULT_APPLICATIONS_ENTITY_PROPS,
824
+ ["OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */]: DEFAULT_SCOPES_ENTITY_PROPS,
825
+ };
826
+ const DEFAULT_OPENIDDICT_PRO_CREATE_FORM_PROPS = {
827
+ ["OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */]: DEFAULT_APPLICATIONS_CREATE_FORM_PROPS,
828
+ ["OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */]: DEFAULT_SCOPE_CREATE_FORM_PROPS,
829
+ };
830
+ const DEFAULT_OPENIDDICT_PRO_EDIT_FORM_PROPS = {
831
+ ["OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */]: DEFAULT_APPLICATIONS_FORM_PROPS,
832
+ ["OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */]: DEFAULT_SCOPES_FORM_PROPS,
833
+ };
834
+ const OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS = new InjectionToken('OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS');
835
+ const OPENIDDICT_PRO_TOOLBAR_ACTION_CONTRIBUTORS = new InjectionToken('OPENIDDICT_PRO__TOOLBAR_ACTION_CONTRIBUTORS');
836
+ const OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS = new InjectionToken('OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS');
837
+ const OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS = new InjectionToken('OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS');
828
838
  const OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS = new InjectionToken('OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS');
829
839
 
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
840
+ class OpenIddictProExtensionsGuard {
841
+ constructor(injector) {
842
+ this.injector = injector;
843
+ }
844
+ canActivate() {
845
+ const extensions = this.injector.get(ExtensionsService);
846
+ const actionContributors = this.injector.get(OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS, null) || {};
847
+ const toolbarContributors = this.injector.get(OPENIDDICT_PRO_TOOLBAR_ACTION_CONTRIBUTORS, null) || {};
848
+ const propContributors = this.injector.get(OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS, null) || {};
849
+ const createFormContributors = this.injector.get(OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS, null) || {};
850
+ const editFormContributors = this.injector.get(OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS, null) || {};
851
+ const configState = this.injector.get(ConfigStateService);
852
+ return getObjectExtensionEntitiesFromStore(configState, 'OpenIddictPro').pipe(map(entities => {
853
+ return {
854
+ ["OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */]: entities.ApiResource,
855
+ ["OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */]: entities.Scopes,
856
+ };
857
+ }), mapEntitiesToContributors(configState, 'AbpOpenIddictPro'), tap(objectExtensionContributors => {
858
+ mergeWithDefaultActions(extensions.entityActions, DEFAULT_OPENIDDICT_PRO_ENTITY_ACTIONS, actionContributors);
859
+ mergeWithDefaultActions(extensions.toolbarActions, DEFAULT_OPENIDDICT_PRO_TOOLBAR_ACTIONS, toolbarContributors);
860
+ mergeWithDefaultProps(extensions.entityProps, DEFAULT_OPENIDDICT_PRO_ENTITY_PROPS, objectExtensionContributors.prop, propContributors);
861
+ mergeWithDefaultProps(extensions.createFormProps, DEFAULT_OPENIDDICT_PRO_CREATE_FORM_PROPS, objectExtensionContributors.createForm, createFormContributors);
862
+ mergeWithDefaultProps(extensions.editFormProps, DEFAULT_OPENIDDICT_PRO_EDIT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
863
+ }), mapTo(true));
864
+ }
865
+ 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 }); }
866
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpenIddictProExtensionsGuard }); }
867
+ }
868
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpenIddictProExtensionsGuard, decorators: [{
869
+ type: Injectable
860
870
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
861
871
 
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
- }]
872
+ const routes = [
873
+ { path: '', redirectTo: 'Applications', pathMatch: 'full' },
874
+ {
875
+ path: '',
876
+ component: RouterOutletComponent,
877
+ canActivate: [AuthGuard, PermissionGuard, OpenIddictProExtensionsGuard],
878
+ children: [
879
+ {
880
+ path: 'Applications',
881
+ component: ReplaceableRouteContainerComponent,
882
+ data: {
883
+ requiredPolicy: 'OpenIddictPro.Application',
884
+ replaceableComponent: {
885
+ key: "OpenIddictPro.Applications" /* eOpenIddictProComponents.Applications */,
886
+ defaultComponent: ApplicationsComponent,
887
+ },
888
+ },
889
+ },
890
+ {
891
+ path: 'Scopes',
892
+ component: ReplaceableRouteContainerComponent,
893
+ data: {
894
+ requiredPolicy: 'OpenIddictPro.Scopes',
895
+ replaceableComponent: {
896
+ key: "OpenIddictPro.Scopes" /* eOpenIddictProComponents.Scopes */,
897
+ defaultComponent: ScopesComponent,
898
+ },
899
+ },
900
+ },
901
+ ],
902
+ },
903
+ ];
904
+ class OpeniddictproRoutingModule {
905
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpeniddictproRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
906
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: OpeniddictproRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
907
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpeniddictproRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
908
+ }
909
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpeniddictproRoutingModule, decorators: [{
910
+ type: NgModule,
911
+ args: [{
912
+ imports: [RouterModule.forChild(routes)],
913
+ exports: [RouterModule],
914
+ }]
905
915
  }] });
906
916
 
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
- }]
917
+ const components = [
918
+ ApplicationsComponent,
919
+ ApplicationFormModalComponent,
920
+ ScopesComponent,
921
+ ScopeFormModalComponent,
922
+ ];
923
+ class OpeniddictproModule {
924
+ static forChild(options = {}) {
925
+ return {
926
+ ngModule: OpeniddictproModule,
927
+ providers: [
928
+ {
929
+ provide: OPENIDDICT_PRO_ENTITY_ACTION_CONTRIBUTORS,
930
+ useValue: options.entityActionContributors,
931
+ },
932
+ {
933
+ provide: OPENIDDICT_PRO_TOOLBAR_ACTION_CONTRIBUTORS,
934
+ useValue: options.toolbarActionContributors,
935
+ },
936
+ {
937
+ provide: OPENIDDICT_PRO_ENTITY_PROP_CONTRIBUTORS,
938
+ useValue: options.entityPropContributors,
939
+ },
940
+ {
941
+ provide: OPENIDDICT_PRO_CREATE_FORM_PROP_CONTRIBUTORS,
942
+ useValue: options.createFormPropContributors,
943
+ },
944
+ {
945
+ provide: OPENIDDICT_PRO_EDIT_FORM_PROP_CONTRIBUTORS,
946
+ useValue: options.editFormPropContributors,
947
+ },
948
+ OpenIddictProExtensionsGuard,
949
+ ApplicationsService,
950
+ ScopesService,
951
+ ],
952
+ };
953
+ }
954
+ static forLazy(options = {}) {
955
+ return new LazyModuleFactory(OpeniddictproModule.forChild(options));
956
+ }
957
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpeniddictproModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
958
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: OpeniddictproModule, declarations: [ApplicationsComponent,
959
+ ApplicationFormModalComponent,
960
+ ScopesComponent,
961
+ ScopeFormModalComponent], imports: [OpeniddictproRoutingModule,
962
+ CoreModule,
963
+ CommercialUiModule,
964
+ ThemeSharedModule,
965
+ NgbDropdownModule,
966
+ NgxValidateCoreModule,
967
+ PageModule,
968
+ AdvancedEntityFiltersModule,
969
+ PermissionManagementModule], exports: [ApplicationsComponent,
970
+ ApplicationFormModalComponent,
971
+ ScopesComponent,
972
+ ScopeFormModalComponent] }); }
973
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpeniddictproModule, imports: [OpeniddictproRoutingModule,
974
+ CoreModule,
975
+ CommercialUiModule,
976
+ ThemeSharedModule,
977
+ NgbDropdownModule,
978
+ NgxValidateCoreModule,
979
+ PageModule,
980
+ AdvancedEntityFiltersModule,
981
+ PermissionManagementModule] }); }
982
+ }
983
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpeniddictproModule, decorators: [{
984
+ type: NgModule,
985
+ args: [{
986
+ imports: [
987
+ OpeniddictproRoutingModule,
988
+ CoreModule,
989
+ CommercialUiModule,
990
+ ThemeSharedModule,
991
+ NgbDropdownModule,
992
+ NgxValidateCoreModule,
993
+ PageModule,
994
+ AdvancedEntityFiltersModule,
995
+ PermissionManagementModule,
996
+ ],
997
+ declarations: [...components],
998
+ exports: [...components],
999
+ }]
990
1000
  }] });
991
1001
 
992
- /**
993
- * Generated bundle index. Do not edit.
1002
+ /**
1003
+ * Generated bundle index. Do not edit.
994
1004
  */
995
1005
 
996
1006
  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 };