@gravitee/ui-policy-studio-angular 13.4.0 → 13.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/flow-details/gio-ps-flow-details.component.mjs +3 -3
- package/esm2022/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.mjs +5 -5
- package/esm2022/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.mjs +4 -4
- package/esm2022/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.mjs +19 -11
- package/esm2022/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.mjs +4 -4
- package/esm2022/lib/components/step-form/gio-ps-step-form.component.mjs +6 -6
- package/esm2022/lib/models/ApiProtocolType.mjs +17 -0
- package/esm2022/lib/models/ApiType.mjs +17 -0
- package/esm2022/lib/models/flow/index.mjs +1 -2
- package/esm2022/lib/models/index.mjs +3 -1
- package/esm2022/lib/models/policy/Policy.mjs +44 -2
- package/esm2022/lib/models/policy/SharedPolicyGroupPolicy.mjs +1 -1
- package/esm2022/lib/policy-group-studio/gio-policy-group-studio.component.mjs +44 -14
- package/esm2022/lib/policy-studio/gio-policy-studio.component.mjs +17 -8
- package/esm2022/testing/lib/models/ApiProtocolType.mjs +17 -0
- package/esm2022/testing/lib/models/ApiType.mjs +17 -0
- package/esm2022/testing/lib/models/flow/index.mjs +1 -2
- package/esm2022/testing/lib/models/index.mjs +3 -1
- package/esm2022/testing/lib/models/policy/Policy.fixture.mjs +59 -22
- package/esm2022/testing/lib/models/policy/Policy.mjs +44 -2
- package/esm2022/testing/lib/models/policy/SharedPolicyGroupPolicy.mjs +1 -1
- package/fesm2022/gravitee-ui-policy-studio-angular-testing.mjs +58 -21
- package/fesm2022/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
- package/fesm2022/gravitee-ui-policy-studio-angular.mjs +169 -47
- package/fesm2022/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.d.ts +3 -3
- package/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.d.ts +3 -3
- package/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.d.ts +4 -4
- package/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.d.ts +3 -3
- package/lib/components/step-form/gio-ps-step-form.component.d.ts +3 -3
- package/lib/models/ApiProtocolType.d.ts +1 -0
- package/lib/models/ApiType.d.ts +1 -0
- package/lib/models/flow/index.d.ts +0 -1
- package/lib/models/index.d.ts +2 -0
- package/lib/models/policy/Policy.d.ts +19 -3
- package/lib/models/policy/SharedPolicyGroupPolicy.d.ts +3 -3
- package/lib/policy-group-studio/gio-policy-group-studio.component.d.ts +11 -4
- package/lib/policy-studio/gio-policy-studio.component.d.ts +5 -2
- package/package.json +1 -1
- package/testing/lib/models/ApiProtocolType.d.ts +1 -0
- package/testing/lib/models/ApiType.d.ts +1 -0
- package/testing/lib/models/flow/index.d.ts +0 -1
- package/testing/lib/models/index.d.ts +2 -0
- package/testing/lib/models/policy/Policy.d.ts +19 -3
- package/testing/lib/models/policy/Policy.fixture.d.ts +2 -2
- package/testing/lib/models/policy/SharedPolicyGroupPolicy.d.ts +3 -3
- package/esm2022/lib/models/flow/ApiType.mjs +0 -2
- package/esm2022/testing/lib/models/flow/ApiType.mjs +0 -2
- package/lib/models/flow/ApiType.d.ts +0 -1
- package/testing/lib/models/flow/ApiType.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { get, cloneDeep, uniqueId, isEmpty, flatten, uniq, toLower, isNil, has, filter, isEqual, differenceBy, omit, unionBy } from 'lodash';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
3
|
import { Component, Inject, EventEmitter, Input, Output, Injectable, Pipe, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
-
import { cloneDeep, uniqueId, isEmpty, flatten, uniq, toLower, isNil, get, has, filter, isEqual, differenceBy, omit, unionBy } from 'lodash';
|
|
4
4
|
import { BehaviorSubject, Subject, of, EMPTY, timer } from 'rxjs';
|
|
5
5
|
import * as i2 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
@@ -144,6 +144,49 @@ const toHttpMethod = (value) => {
|
|
|
144
144
|
* limitations under the License.
|
|
145
145
|
*/
|
|
146
146
|
|
|
147
|
+
/*
|
|
148
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
149
|
+
*
|
|
150
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
151
|
+
* you may not use this file except in compliance with the License.
|
|
152
|
+
* You may obtain a copy of the License at
|
|
153
|
+
*
|
|
154
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
155
|
+
*
|
|
156
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
157
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
158
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
159
|
+
* See the License for the specific language governing permissions and
|
|
160
|
+
* limitations under the License.
|
|
161
|
+
*/
|
|
162
|
+
/**
|
|
163
|
+
* @Deprecated to keep as long as we support APIM < 4.6
|
|
164
|
+
*/
|
|
165
|
+
const fromPolicyInput = (policy) => {
|
|
166
|
+
const getProxyPhase = get(policy, 'proxy')?.map(fromExecutionPhase);
|
|
167
|
+
const getMessagePhase = get(policy, 'message')?.map(fromExecutionPhase);
|
|
168
|
+
return {
|
|
169
|
+
...policy,
|
|
170
|
+
flowPhaseCompatibility: {
|
|
171
|
+
...(getProxyPhase && { HTTP_PROXY: getProxyPhase }),
|
|
172
|
+
...(getMessagePhase && { HTTP_MESSAGE: getMessagePhase }),
|
|
173
|
+
...policy.flowPhaseCompatibility,
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* @Deprecated to keep as long as we support APIM < 4.6
|
|
179
|
+
*/
|
|
180
|
+
const fromExecutionPhase = (phase) => {
|
|
181
|
+
if (phase === 'MESSAGE_REQUEST') {
|
|
182
|
+
return 'PUBLISH';
|
|
183
|
+
}
|
|
184
|
+
if (phase === 'MESSAGE_RESPONSE') {
|
|
185
|
+
return 'SUBSCRIBE';
|
|
186
|
+
}
|
|
187
|
+
return phase;
|
|
188
|
+
};
|
|
189
|
+
|
|
147
190
|
/*
|
|
148
191
|
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
149
192
|
*
|
|
@@ -184,6 +227,38 @@ const toPolicy = (genericPolicy) => {
|
|
|
184
227
|
throw new Error('Cannot convert a Shared Policy Group Policy to a Policy');
|
|
185
228
|
};
|
|
186
229
|
|
|
230
|
+
/*
|
|
231
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
232
|
+
*
|
|
233
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
234
|
+
* you may not use this file except in compliance with the License.
|
|
235
|
+
* You may obtain a copy of the License at
|
|
236
|
+
*
|
|
237
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
238
|
+
*
|
|
239
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
240
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
241
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
242
|
+
* See the License for the specific language governing permissions and
|
|
243
|
+
* limitations under the License.
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
/*
|
|
247
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
248
|
+
*
|
|
249
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
250
|
+
* you may not use this file except in compliance with the License.
|
|
251
|
+
* You may obtain a copy of the License at
|
|
252
|
+
*
|
|
253
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
254
|
+
*
|
|
255
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
256
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
257
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
258
|
+
* See the License for the specific language governing permissions and
|
|
259
|
+
* limitations under the License.
|
|
260
|
+
*/
|
|
261
|
+
|
|
187
262
|
/*
|
|
188
263
|
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
189
264
|
*
|
|
@@ -870,11 +945,11 @@ class GioPolicyStudioStepFormComponent {
|
|
|
870
945
|
this.infoBanner = this.genericPolicy.prerequisiteMessage;
|
|
871
946
|
}
|
|
872
947
|
}
|
|
873
|
-
if (changes.
|
|
948
|
+
if (changes.flowPhase) {
|
|
874
949
|
this.context = {
|
|
875
|
-
|
|
950
|
+
flowPhase: this.flowPhase,
|
|
876
951
|
};
|
|
877
|
-
this.isMessage = this.
|
|
952
|
+
this.isMessage = this.flowPhase === 'PUBLISH' || this.flowPhase === 'SUBSCRIBE';
|
|
878
953
|
}
|
|
879
954
|
}
|
|
880
955
|
ngOnInit() {
|
|
@@ -921,7 +996,7 @@ class GioPolicyStudioStepFormComponent {
|
|
|
921
996
|
});
|
|
922
997
|
}
|
|
923
998
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioStepFormComponent, deps: [{ token: GioPolicyStudioService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
924
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioPolicyStudioStepFormComponent, isStandalone: true, selector: "gio-ps-step-form", inputs: { readOnly: "readOnly", step: "step",
|
|
999
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioPolicyStudioStepFormComponent, isStandalone: true, selector: "gio-ps-step-form", inputs: { readOnly: "readOnly", step: "step", flowPhase: "flowPhase", genericPolicy: "genericPolicy" }, outputs: { stepChange: "stepChange", isValid: "isValid" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"settings\">\n <div class=\"settings__header\">Settings</div>\n\n <div class=\"settings__content\">\n <ng-container *ngIf=\"stepForm && (policySchema$ | async) as policySchema; else loadingTmpl\" [formGroup]=\"stepForm\">\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" cdkFocusInitial></textarea>\n <mat-hint>Describe how your policy works.</mat-hint>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Trigger condition</mat-label>\n <input matInput formControlName=\"condition\" />\n <mat-hint>The condition to execute this policy. Supports Expression Language.</mat-hint>\n </mat-form-field>\n\n @if (isMessage) {\n <mat-form-field>\n <mat-label>Message trigger condition</mat-label>\n <input matInput formControlName=\"messageCondition\" />\n <mat-hint>The condition to execute this policy on message. Supports Expression Language.</mat-hint>\n </mat-form-field>\n }\n\n <gio-form-json-schema\n *ngIf=\"policySchema\"\n [jsonSchema]=\"$any(policySchema)\"\n [context]=\"context\"\n (ready)=\"onJsonSchemaReady($event)\"\n formControlName=\"configuration\"\n ></gio-form-json-schema>\n </ng-container>\n </div>\n</div>\n\n<div class=\"documentation\">\n <div class=\"documentation__header\">Documentation</div>\n\n <div class=\"documentation__content\">\n <gio-banner-warning *ngIf=\"infoBanner\">\n Prerequisite message\n <span gioBannerBody>{{ infoBanner }}</span>\n </gio-banner-warning>\n <ng-container *ngIf=\"policyDocumentation$ | async as policyDocumentation; else loadingTmpl\">\n <gio-asciidoctor [content]=\"policyDocumentation\"></gio-asciidoctor>\n </ng-container>\n </div>\n</div>\n\n<ng-template #loadingTmpl>\n <gio-loader></gio-loader>\n</ng-template>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;flex-direction:row;border:1px solid #d3d5dc;border-radius:8px}.settings{display:flex;flex:0 0 50%;flex-direction:column}.settings__header{border-right:1px solid #d3d5dc}.settings__content{display:flex;flex:1 1 auto;flex-direction:column;padding:16px;border-right:1px solid #d3d5dc}.documentation{display:flex;overflow:auto;flex:0 0 50%;flex-direction:column}.documentation__content{overflow:auto;flex:1 1 auto;padding:16px}.settings__header,.documentation__header{padding:16px;border-bottom:1px solid #d3d5dc;font-size:14px;font-weight:500;line-height:20px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: GioFormJsonSchemaModule }, { kind: "component", type: i6$1.GioFormJsonSchemaComponent, selector: "gio-form-json-schema", inputs: ["jsonSchema", "context", "options"], outputs: ["ready"] }, { kind: "ngmodule", type: GioAsciidoctorModule }, { kind: "component", type: i7$2.GioAsciidoctorComponent, selector: "gio-asciidoctor", inputs: ["content", "src"] }, { kind: "ngmodule", type: GioLoaderModule }, { kind: "component", type: i6$1.GioLoaderComponent, selector: "gio-loader" }, { kind: "ngmodule", type: GioBannerModule }, { kind: "component", type: i6$1.GioBannerWarningComponent, selector: "gio-banner-warning" }, { kind: "directive", type: i6$1.GioBannerBodyDirective, selector: "[gioBannerBody]" }] }); }
|
|
925
1000
|
}
|
|
926
1001
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioStepFormComponent, decorators: [{
|
|
927
1002
|
type: Component,
|
|
@@ -939,7 +1014,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
939
1014
|
type: Input
|
|
940
1015
|
}], step: [{
|
|
941
1016
|
type: Input
|
|
942
|
-
}],
|
|
1017
|
+
}], flowPhase: [{
|
|
943
1018
|
type: Input,
|
|
944
1019
|
args: [{ required: true }]
|
|
945
1020
|
}], genericPolicy: [{
|
|
@@ -965,11 +1040,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
965
1040
|
* See the License for the specific language governing permissions and
|
|
966
1041
|
* limitations under the License.
|
|
967
1042
|
*/
|
|
968
|
-
const
|
|
1043
|
+
const flowPhaseLabels = {
|
|
969
1044
|
REQUEST: 'Request',
|
|
970
1045
|
RESPONSE: 'Response',
|
|
971
|
-
|
|
972
|
-
|
|
1046
|
+
PUBLISH: 'Publish',
|
|
1047
|
+
SUBSCRIBE: 'Subscribe',
|
|
1048
|
+
CONNECT: 'Connect',
|
|
1049
|
+
INTERACT: 'Interact',
|
|
973
1050
|
};
|
|
974
1051
|
class GioPolicyStudioPoliciesCatalogDialogComponent {
|
|
975
1052
|
constructor(dialogRef, flowDialogData) {
|
|
@@ -984,18 +1061,24 @@ class GioPolicyStudioPoliciesCatalogDialogComponent {
|
|
|
984
1061
|
this.allPolicies = [];
|
|
985
1062
|
this.unsubscribe$ = new Subject();
|
|
986
1063
|
this.isUnlicensed = false;
|
|
987
|
-
this.
|
|
988
|
-
this.
|
|
1064
|
+
this.flowPhase = flowDialogData.flowPhase;
|
|
1065
|
+
this.flowPhaseLabel = flowPhaseLabels[flowDialogData.flowPhase];
|
|
989
1066
|
this.allPolicies = flowDialogData.genericPolicies
|
|
990
1067
|
.filter(genericPolicy => {
|
|
991
1068
|
if (isPolicy(genericPolicy)) {
|
|
992
1069
|
if (flowDialogData.apiType === 'PROXY') {
|
|
993
|
-
return genericPolicy.
|
|
1070
|
+
return genericPolicy.flowPhaseCompatibility?.HTTP_PROXY?.includes(flowDialogData.flowPhase);
|
|
1071
|
+
}
|
|
1072
|
+
else if (flowDialogData.apiType === 'MESSAGE') {
|
|
1073
|
+
return genericPolicy.flowPhaseCompatibility?.HTTP_MESSAGE?.includes(flowDialogData.flowPhase);
|
|
1074
|
+
}
|
|
1075
|
+
else {
|
|
1076
|
+
// TODO: Implement for NATIVE API
|
|
1077
|
+
throw new Error('Not implemented');
|
|
994
1078
|
}
|
|
995
|
-
return genericPolicy.message?.includes(flowDialogData.executionPhase);
|
|
996
1079
|
}
|
|
997
1080
|
if (isSharedPolicyGroupPolicy(genericPolicy)) {
|
|
998
|
-
return genericPolicy.apiType === flowDialogData.apiType && genericPolicy.phase === flowDialogData.
|
|
1081
|
+
return genericPolicy.apiType === flowDialogData.apiType && genericPolicy.phase === flowDialogData.flowPhase;
|
|
999
1082
|
}
|
|
1000
1083
|
// Not expected
|
|
1001
1084
|
throw new Error('Unknown policy type');
|
|
@@ -1059,7 +1142,7 @@ class GioPolicyStudioPoliciesCatalogDialogComponent {
|
|
|
1059
1142
|
this.isUnlicensed = false;
|
|
1060
1143
|
}
|
|
1061
1144
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioPoliciesCatalogDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1062
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: GioPolicyStudioPoliciesCatalogDialogComponent, isStandalone: true, selector: "gio-ps-policies-catalog-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n Policies for <span class=\"title__phase\">{{ executionPhaseLabel }}</span> phase\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<ng-container>\n <mat-dialog-content *ngIf=\"!selectedPolicy\" class=\"policiesCatalog\">\n <div class=\"policiesCatalog__filters\" [formGroup]=\"filtersForm\">\n <mat-form-field class=\"policiesCatalog__filters__search\" appearance=\"outline\">\n <mat-label>Search</mat-label>\n <input matInput formControlName=\"search\" />\n <button\n matIconSuffix\n mat-icon-button\n aria-label=\"Clear\"\n *ngIf=\"filtersForm.get('search')?.value\"\n (click)=\"filtersForm.get('search')?.setValue('')\"\n >\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n </mat-form-field>\n <mat-chip-listbox\n *ngIf=\"categories.length > 1\"\n class=\"policiesCatalog__filters__categories\"\n aria-label=\"Categories selection\"\n multiple\n formControlName=\"categories\"\n >\n <mat-chip-option *ngFor=\"let category of categories\" [selected]=\"category\" [value]=\"category\"\n >{{ category | titlecase }}\n </mat-chip-option>\n </mat-chip-listbox>\n </div>\n\n <div *ngIf=\"policies.length; else emptyPoliciesTpl\" class=\"policiesCatalog__list\">\n <div *ngFor=\"let policy of policies\" class=\"policiesCatalog__list__policy\">\n <div class=\"policiesCatalog__list__policy__head\">\n <mat-icon class=\"policiesCatalog__list__policy__head__icon\" [svgIcon]=\"policy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"policy.name\" class=\"policiesCatalog__list__policy__head__name\">{{ policy.name }}</span>\n\n <span\n *ngIf=\"policy.genericPolicy.type === 'SHARED_POLICY_GROUP'\"\n class=\"gio-badge-neutral policiesCatalog__list__policy__head__badge\"\n matTooltip=\"Shared Policy Group\"\n >\n <mat-icon svgIcon=\"gio:users\"></mat-icon>\n </span>\n </div>\n\n <div class=\"policiesCatalog__list__policy__enterprise\" *ngIf=\"policy.deployed === false\">\n <mat-icon\n class=\"policiesCatalog__list__policy__enterprise__lock\"\n [svgIcon]=\"'gio:lock'\"\n matTooltip=\"This policy is only available for users with an enterprise license.\"\n ></mat-icon>\n </div>\n\n <div *ngIf=\"policy.description\" class=\"policiesCatalog__list__policy__description\">{{ policy.description }}</div>\n\n <button class=\"policiesCatalog__list__policy__selectBtn\" mat-stroked-button role=\"dialog\" (click)=\"onSelectPolicy(policy)\">\n Select\n </button>\n </div>\n </div>\n </mat-dialog-content>\n</ng-container>\n\n<ng-template #emptyPoliciesTpl>\n <div class=\"emptyPoliciesCatalog\">No policies available.</div>\n</ng-template>\n\n<mat-dialog-content *ngIf=\"selectedPolicy\" class=\"policyForm\">\n <button class=\"policyForm__goBackBtn\" mat-stroked-button (click)=\"onGoBack()\">\n <mat-icon svgIcon=\"gio:arrow-left\"></mat-icon>\n Go back\n </button>\n\n <gio-banner *ngIf=\"isUnlicensed\" type=\"error\" icon=\"gio:universe\">\n This policy is only available for users with an enterprise license.\n <span gioBannerBody>Request a license to upgrade your account and unlock this policy</span>\n <div gioBannerAction>\n <a *ngIf=\"trialUrl\" mat-stroked-button [href]=\"trialUrl\" target=\"_blank\">Request upgrade</a>\n </div>\n </gio-banner>\n\n <div class=\"policyForm__info\">\n <div class=\"policyForm__info__head\">\n <mat-icon class=\"policyForm__info__head__icon\" [svgIcon]=\"selectedPolicy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"selectedPolicy.name\" class=\"policyForm__info__head__name\">{{ selectedPolicy.name }}</span>\n\n <span *ngIf=\"selectedPolicy.type === 'SHARED_POLICY_GROUP'\" class=\"gio-badge-neutral policiesCatalog__list__policy__head__badge\">\n <mat-icon svgIcon=\"gio:users\"></mat-icon> Shared Policy Group\n </span>\n </div>\n\n <div *ngIf=\"selectedPolicy.description\" class=\"policyForm__info__description\">{{ selectedPolicy.description }}</div>\n </div>\n\n <gio-ps-step-form\n [genericPolicy]=\"selectedPolicy\"\n [executionPhase]=\"executionPhase\"\n (stepChange)=\"onStepChange($event)\"\n (isValid)=\"onIsValid($event)\"\n ></gio-ps-step-form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\" align=\"end\">\n <button class=\"actions__cancelBtn\" mat-button [mat-dialog-close]=\"\">Cancel</button>\n <button\n *ngIf=\"selectedPolicy\"\n class=\"actions__addBtn\"\n color=\"primary\"\n mat-flat-button\n role=\"dialog\"\n [disabled]=\"!isValid || isUnlicensed\"\n (click)=\"onAddPolicy()\"\n >\n Add policy\n </button>\n</mat-dialog-actions>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.title__closeBtn{top:0;right:-24px;float:right}.policiesCatalog__filters{display:flex;flex-direction:column;padding:0 0 8px;gap:8px}.policiesCatalog__filters__search{width:100%;height:54px;padding-bottom:0}.policiesCatalog__list{--grid-layout-gap: 16px;--grid-column-count: 3;--grid-item-min-width: 200px;--gap-count: calc(var(--grid-column-count) - 1);--total-gap-width: calc(var(--gap-count) * var(--grid-layout-gap));--grid-item-max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count));display:grid;grid-gap:var(--grid-layout-gap);grid-template-columns:repeat(auto-fill,minmax(max(var(--grid-item-min-width),var(--grid-item-max-width)),1fr))}.policiesCatalog__list__policy{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:16px;border:1px solid #d3d5dc;border-radius:8px;gap:4px}.policiesCatalog__list__policy__head{display:flex;align-items:center;align-self:stretch}.policiesCatalog__list__policy__head__icon{min-width:24px;flex:0 0 24px;margin-right:8px}.policiesCatalog__list__policy__head__name{overflow:hidden;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap}.policiesCatalog__list__policy__head__badge{float:left}.policiesCatalog__list__policy__enterprise{position:absolute;top:0;right:0;padding:8px 8px 8px 16px;border-radius:0 8px 0 38px;background:#e7e8ef;color:#6c59bd}.policiesCatalog__list__policy__enterprise__lock{min-width:16px;max-width:16px;color:#6c59bd}.policiesCatalog__list__policy__description{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;color:#606274;-webkit-line-clamp:2}.policiesCatalog__list__policy__description:empty{display:none}.policiesCatalog__list__policy__selectBtn{margin-top:8px}.policyForm__goBackBtn{margin:16px 0}.policyForm__info{display:flex;max-width:100%;flex-direction:column;align-items:flex-start;padding-bottom:16px;gap:4px}.policyForm__info__head{display:flex;align-items:center}.policyForm__info__head__icon{min-width:24px;flex:1 1 24px;margin-right:8px}.policyForm__info__head__name{flex:1 1 auto}.policyForm__info__description{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#606274}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i6$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i6$2.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: GioBannerModule }, { kind: "component", type: i6$1.GioBannerComponent, selector: "gio-banner", inputs: ["type", "icon", "collapsible"] }, { kind: "directive", type: i6$1.GioBannerBodyDirective, selector: "[gioBannerBody]" }, { kind: "directive", type: i6$1.GioBannerActionDirective, selector: "[gioBannerAction]" }, { kind: "ngmodule", type: GioIconsModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioPolicyStudioStepFormComponent, selector: "gio-ps-step-form", inputs: ["readOnly", "step", "executionPhase", "genericPolicy"], outputs: ["stepChange", "isValid"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
|
1145
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: GioPolicyStudioPoliciesCatalogDialogComponent, isStandalone: true, selector: "gio-ps-policies-catalog-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n Policies for <span class=\"title__phase\">{{ flowPhaseLabel }}</span> phase\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<ng-container>\n <mat-dialog-content *ngIf=\"!selectedPolicy\" class=\"policiesCatalog\">\n <div class=\"policiesCatalog__filters\" [formGroup]=\"filtersForm\">\n <mat-form-field class=\"policiesCatalog__filters__search\" appearance=\"outline\">\n <mat-label>Search</mat-label>\n <input matInput formControlName=\"search\" />\n <button\n matIconSuffix\n mat-icon-button\n aria-label=\"Clear\"\n *ngIf=\"filtersForm.get('search')?.value\"\n (click)=\"filtersForm.get('search')?.setValue('')\"\n >\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n </mat-form-field>\n <mat-chip-listbox\n *ngIf=\"categories.length > 1\"\n class=\"policiesCatalog__filters__categories\"\n aria-label=\"Categories selection\"\n multiple\n formControlName=\"categories\"\n >\n <mat-chip-option *ngFor=\"let category of categories\" [selected]=\"category\" [value]=\"category\"\n >{{ category | titlecase }}\n </mat-chip-option>\n </mat-chip-listbox>\n </div>\n\n <div *ngIf=\"policies.length; else emptyPoliciesTpl\" class=\"policiesCatalog__list\">\n <div *ngFor=\"let policy of policies\" class=\"policiesCatalog__list__policy\">\n <div class=\"policiesCatalog__list__policy__head\">\n <mat-icon class=\"policiesCatalog__list__policy__head__icon\" [svgIcon]=\"policy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"policy.name\" class=\"policiesCatalog__list__policy__head__name\">{{ policy.name }}</span>\n\n <span\n *ngIf=\"policy.genericPolicy.type === 'SHARED_POLICY_GROUP'\"\n class=\"gio-badge-neutral policiesCatalog__list__policy__head__badge\"\n matTooltip=\"Shared Policy Group\"\n >\n <mat-icon svgIcon=\"gio:users\"></mat-icon>\n </span>\n </div>\n\n <div class=\"policiesCatalog__list__policy__enterprise\" *ngIf=\"policy.deployed === false\">\n <mat-icon\n class=\"policiesCatalog__list__policy__enterprise__lock\"\n [svgIcon]=\"'gio:lock'\"\n matTooltip=\"This policy is only available for users with an enterprise license.\"\n ></mat-icon>\n </div>\n\n <div *ngIf=\"policy.description\" class=\"policiesCatalog__list__policy__description\">{{ policy.description }}</div>\n\n <button class=\"policiesCatalog__list__policy__selectBtn\" mat-stroked-button role=\"dialog\" (click)=\"onSelectPolicy(policy)\">\n Select\n </button>\n </div>\n </div>\n </mat-dialog-content>\n</ng-container>\n\n<ng-template #emptyPoliciesTpl>\n <div class=\"emptyPoliciesCatalog\">No policies available.</div>\n</ng-template>\n\n<mat-dialog-content *ngIf=\"selectedPolicy\" class=\"policyForm\">\n <button class=\"policyForm__goBackBtn\" mat-stroked-button (click)=\"onGoBack()\">\n <mat-icon svgIcon=\"gio:arrow-left\"></mat-icon>\n Go back\n </button>\n\n <gio-banner *ngIf=\"isUnlicensed\" type=\"error\" icon=\"gio:universe\">\n This policy is only available for users with an enterprise license.\n <span gioBannerBody>Request a license to upgrade your account and unlock this policy</span>\n <div gioBannerAction>\n <a *ngIf=\"trialUrl\" mat-stroked-button [href]=\"trialUrl\" target=\"_blank\">Request upgrade</a>\n </div>\n </gio-banner>\n\n <div class=\"policyForm__info\">\n <div class=\"policyForm__info__head\">\n <mat-icon class=\"policyForm__info__head__icon\" [svgIcon]=\"selectedPolicy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"selectedPolicy.name\" class=\"policyForm__info__head__name\">{{ selectedPolicy.name }}</span>\n\n <span *ngIf=\"selectedPolicy.type === 'SHARED_POLICY_GROUP'\" class=\"gio-badge-neutral policiesCatalog__list__policy__head__badge\">\n <mat-icon svgIcon=\"gio:users\"></mat-icon> Shared Policy Group\n </span>\n </div>\n\n <div *ngIf=\"selectedPolicy.description\" class=\"policyForm__info__description\">{{ selectedPolicy.description }}</div>\n </div>\n\n <gio-ps-step-form\n [genericPolicy]=\"selectedPolicy\"\n [flowPhase]=\"flowPhase\"\n (stepChange)=\"onStepChange($event)\"\n (isValid)=\"onIsValid($event)\"\n ></gio-ps-step-form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\" align=\"end\">\n <button class=\"actions__cancelBtn\" mat-button [mat-dialog-close]=\"\">Cancel</button>\n <button\n *ngIf=\"selectedPolicy\"\n class=\"actions__addBtn\"\n color=\"primary\"\n mat-flat-button\n role=\"dialog\"\n [disabled]=\"!isValid || isUnlicensed\"\n (click)=\"onAddPolicy()\"\n >\n Add policy\n </button>\n</mat-dialog-actions>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.title__closeBtn{top:0;right:-24px;float:right}.policiesCatalog__filters{display:flex;flex-direction:column;padding:0 0 8px;gap:8px}.policiesCatalog__filters__search{width:100%;height:54px;padding-bottom:0}.policiesCatalog__list{--grid-layout-gap: 16px;--grid-column-count: 3;--grid-item-min-width: 200px;--gap-count: calc(var(--grid-column-count) - 1);--total-gap-width: calc(var(--gap-count) * var(--grid-layout-gap));--grid-item-max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count));display:grid;grid-gap:var(--grid-layout-gap);grid-template-columns:repeat(auto-fill,minmax(max(var(--grid-item-min-width),var(--grid-item-max-width)),1fr))}.policiesCatalog__list__policy{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:16px;border:1px solid #d3d5dc;border-radius:8px;gap:4px}.policiesCatalog__list__policy__head{display:flex;align-items:center;align-self:stretch}.policiesCatalog__list__policy__head__icon{min-width:24px;flex:0 0 24px;margin-right:8px}.policiesCatalog__list__policy__head__name{overflow:hidden;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap}.policiesCatalog__list__policy__head__badge{float:left}.policiesCatalog__list__policy__enterprise{position:absolute;top:0;right:0;padding:8px 8px 8px 16px;border-radius:0 8px 0 38px;background:#e7e8ef;color:#6c59bd}.policiesCatalog__list__policy__enterprise__lock{min-width:16px;max-width:16px;color:#6c59bd}.policiesCatalog__list__policy__description{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;color:#606274;-webkit-line-clamp:2}.policiesCatalog__list__policy__description:empty{display:none}.policiesCatalog__list__policy__selectBtn{margin-top:8px}.policyForm__goBackBtn{margin:16px 0}.policyForm__info{display:flex;max-width:100%;flex-direction:column;align-items:flex-start;padding-bottom:16px;gap:4px}.policyForm__info__head{display:flex;align-items:center}.policyForm__info__head__icon{min-width:24px;flex:1 1 24px;margin-right:8px}.policyForm__info__head__name{flex:1 1 auto}.policyForm__info__description{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#606274}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i6$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i6$2.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: GioBannerModule }, { kind: "component", type: i6$1.GioBannerComponent, selector: "gio-banner", inputs: ["type", "icon", "collapsible"] }, { kind: "directive", type: i6$1.GioBannerBodyDirective, selector: "[gioBannerBody]" }, { kind: "directive", type: i6$1.GioBannerActionDirective, selector: "[gioBannerAction]" }, { kind: "ngmodule", type: GioIconsModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioPolicyStudioStepFormComponent, selector: "gio-ps-step-form", inputs: ["readOnly", "step", "flowPhase", "genericPolicy"], outputs: ["stepChange", "isValid"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
|
1063
1146
|
}
|
|
1064
1147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioPoliciesCatalogDialogComponent, decorators: [{
|
|
1065
1148
|
type: Component,
|
|
@@ -1075,7 +1158,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1075
1158
|
GioIconsModule,
|
|
1076
1159
|
GioPolicyStudioStepFormComponent,
|
|
1077
1160
|
MatTooltip,
|
|
1078
|
-
], selector: 'gio-ps-policies-catalog-dialog', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n Policies for <span class=\"title__phase\">{{
|
|
1161
|
+
], selector: 'gio-ps-policies-catalog-dialog', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n Policies for <span class=\"title__phase\">{{ flowPhaseLabel }}</span> phase\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<ng-container>\n <mat-dialog-content *ngIf=\"!selectedPolicy\" class=\"policiesCatalog\">\n <div class=\"policiesCatalog__filters\" [formGroup]=\"filtersForm\">\n <mat-form-field class=\"policiesCatalog__filters__search\" appearance=\"outline\">\n <mat-label>Search</mat-label>\n <input matInput formControlName=\"search\" />\n <button\n matIconSuffix\n mat-icon-button\n aria-label=\"Clear\"\n *ngIf=\"filtersForm.get('search')?.value\"\n (click)=\"filtersForm.get('search')?.setValue('')\"\n >\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n </mat-form-field>\n <mat-chip-listbox\n *ngIf=\"categories.length > 1\"\n class=\"policiesCatalog__filters__categories\"\n aria-label=\"Categories selection\"\n multiple\n formControlName=\"categories\"\n >\n <mat-chip-option *ngFor=\"let category of categories\" [selected]=\"category\" [value]=\"category\"\n >{{ category | titlecase }}\n </mat-chip-option>\n </mat-chip-listbox>\n </div>\n\n <div *ngIf=\"policies.length; else emptyPoliciesTpl\" class=\"policiesCatalog__list\">\n <div *ngFor=\"let policy of policies\" class=\"policiesCatalog__list__policy\">\n <div class=\"policiesCatalog__list__policy__head\">\n <mat-icon class=\"policiesCatalog__list__policy__head__icon\" [svgIcon]=\"policy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"policy.name\" class=\"policiesCatalog__list__policy__head__name\">{{ policy.name }}</span>\n\n <span\n *ngIf=\"policy.genericPolicy.type === 'SHARED_POLICY_GROUP'\"\n class=\"gio-badge-neutral policiesCatalog__list__policy__head__badge\"\n matTooltip=\"Shared Policy Group\"\n >\n <mat-icon svgIcon=\"gio:users\"></mat-icon>\n </span>\n </div>\n\n <div class=\"policiesCatalog__list__policy__enterprise\" *ngIf=\"policy.deployed === false\">\n <mat-icon\n class=\"policiesCatalog__list__policy__enterprise__lock\"\n [svgIcon]=\"'gio:lock'\"\n matTooltip=\"This policy is only available for users with an enterprise license.\"\n ></mat-icon>\n </div>\n\n <div *ngIf=\"policy.description\" class=\"policiesCatalog__list__policy__description\">{{ policy.description }}</div>\n\n <button class=\"policiesCatalog__list__policy__selectBtn\" mat-stroked-button role=\"dialog\" (click)=\"onSelectPolicy(policy)\">\n Select\n </button>\n </div>\n </div>\n </mat-dialog-content>\n</ng-container>\n\n<ng-template #emptyPoliciesTpl>\n <div class=\"emptyPoliciesCatalog\">No policies available.</div>\n</ng-template>\n\n<mat-dialog-content *ngIf=\"selectedPolicy\" class=\"policyForm\">\n <button class=\"policyForm__goBackBtn\" mat-stroked-button (click)=\"onGoBack()\">\n <mat-icon svgIcon=\"gio:arrow-left\"></mat-icon>\n Go back\n </button>\n\n <gio-banner *ngIf=\"isUnlicensed\" type=\"error\" icon=\"gio:universe\">\n This policy is only available for users with an enterprise license.\n <span gioBannerBody>Request a license to upgrade your account and unlock this policy</span>\n <div gioBannerAction>\n <a *ngIf=\"trialUrl\" mat-stroked-button [href]=\"trialUrl\" target=\"_blank\">Request upgrade</a>\n </div>\n </gio-banner>\n\n <div class=\"policyForm__info\">\n <div class=\"policyForm__info__head\">\n <mat-icon class=\"policyForm__info__head__icon\" [svgIcon]=\"selectedPolicy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"selectedPolicy.name\" class=\"policyForm__info__head__name\">{{ selectedPolicy.name }}</span>\n\n <span *ngIf=\"selectedPolicy.type === 'SHARED_POLICY_GROUP'\" class=\"gio-badge-neutral policiesCatalog__list__policy__head__badge\">\n <mat-icon svgIcon=\"gio:users\"></mat-icon> Shared Policy Group\n </span>\n </div>\n\n <div *ngIf=\"selectedPolicy.description\" class=\"policyForm__info__description\">{{ selectedPolicy.description }}</div>\n </div>\n\n <gio-ps-step-form\n [genericPolicy]=\"selectedPolicy\"\n [flowPhase]=\"flowPhase\"\n (stepChange)=\"onStepChange($event)\"\n (isValid)=\"onIsValid($event)\"\n ></gio-ps-step-form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\" align=\"end\">\n <button class=\"actions__cancelBtn\" mat-button [mat-dialog-close]=\"\">Cancel</button>\n <button\n *ngIf=\"selectedPolicy\"\n class=\"actions__addBtn\"\n color=\"primary\"\n mat-flat-button\n role=\"dialog\"\n [disabled]=\"!isValid || isUnlicensed\"\n (click)=\"onAddPolicy()\"\n >\n Add policy\n </button>\n</mat-dialog-actions>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.title__closeBtn{top:0;right:-24px;float:right}.policiesCatalog__filters{display:flex;flex-direction:column;padding:0 0 8px;gap:8px}.policiesCatalog__filters__search{width:100%;height:54px;padding-bottom:0}.policiesCatalog__list{--grid-layout-gap: 16px;--grid-column-count: 3;--grid-item-min-width: 200px;--gap-count: calc(var(--grid-column-count) - 1);--total-gap-width: calc(var(--gap-count) * var(--grid-layout-gap));--grid-item-max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count));display:grid;grid-gap:var(--grid-layout-gap);grid-template-columns:repeat(auto-fill,minmax(max(var(--grid-item-min-width),var(--grid-item-max-width)),1fr))}.policiesCatalog__list__policy{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:16px;border:1px solid #d3d5dc;border-radius:8px;gap:4px}.policiesCatalog__list__policy__head{display:flex;align-items:center;align-self:stretch}.policiesCatalog__list__policy__head__icon{min-width:24px;flex:0 0 24px;margin-right:8px}.policiesCatalog__list__policy__head__name{overflow:hidden;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap}.policiesCatalog__list__policy__head__badge{float:left}.policiesCatalog__list__policy__enterprise{position:absolute;top:0;right:0;padding:8px 8px 8px 16px;border-radius:0 8px 0 38px;background:#e7e8ef;color:#6c59bd}.policiesCatalog__list__policy__enterprise__lock{min-width:16px;max-width:16px;color:#6c59bd}.policiesCatalog__list__policy__description{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;color:#606274;-webkit-line-clamp:2}.policiesCatalog__list__policy__description:empty{display:none}.policiesCatalog__list__policy__selectBtn{margin-top:8px}.policyForm__goBackBtn{margin:16px 0}.policyForm__info{display:flex;max-width:100%;flex-direction:column;align-items:flex-start;padding-bottom:16px;gap:4px}.policyForm__info__head{display:flex;align-items:center}.policyForm__info__head__icon{min-width:24px;flex:1 1 24px;margin-right:8px}.policyForm__info__head__name{flex:1 1 auto}.policyForm__info__description{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#606274}\n"] }]
|
|
1079
1162
|
}], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
1080
1163
|
type: Inject,
|
|
1081
1164
|
args: [MAT_DIALOG_DATA]
|
|
@@ -1101,7 +1184,7 @@ class GioPolicyStudioStepEditDialogComponent {
|
|
|
1101
1184
|
this.dialogRef = dialogRef;
|
|
1102
1185
|
this.isValid = false;
|
|
1103
1186
|
this.readOnly = false;
|
|
1104
|
-
this.
|
|
1187
|
+
this.flowPhase = flowDialogData.flowPhase;
|
|
1105
1188
|
this.genericPolicy = flowDialogData.genericPolicy;
|
|
1106
1189
|
this.step = flowDialogData.step;
|
|
1107
1190
|
this.readOnly = Boolean(flowDialogData.readOnly);
|
|
@@ -1112,11 +1195,11 @@ class GioPolicyStudioStepEditDialogComponent {
|
|
|
1112
1195
|
});
|
|
1113
1196
|
}
|
|
1114
1197
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioStepEditDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1115
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: GioPolicyStudioStepEditDialogComponent, isStandalone: true, selector: "gio-ps-step-edit-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n <mat-icon class=\"title__icon\" [svgIcon]=\"genericPolicy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"step.name\" class=\"title__name\">\n {{ step.name }}\n <span *ngIf=\"genericPolicy.type === 'SHARED_POLICY_GROUP'\" class=\"gio-badge-neutral policiesCatalog__list__policy__head__badge\">\n <mat-icon svgIcon=\"gio:users\"></mat-icon> Shared Policy Group\n </span></span\n >\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n\n <div class=\"title__description\">\n {{ genericPolicy.description }}\n </div>\n</h2>\n\n<mat-dialog-content class=\"content\">\n <gio-ps-step-form\n [readOnly]=\"readOnly\"\n [genericPolicy]=\"genericPolicy\"\n [
|
|
1198
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: GioPolicyStudioStepEditDialogComponent, isStandalone: true, selector: "gio-ps-step-edit-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n <mat-icon class=\"title__icon\" [svgIcon]=\"genericPolicy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"step.name\" class=\"title__name\">\n {{ step.name }}\n <span *ngIf=\"genericPolicy.type === 'SHARED_POLICY_GROUP'\" class=\"gio-badge-neutral policiesCatalog__list__policy__head__badge\">\n <mat-icon svgIcon=\"gio:users\"></mat-icon> Shared Policy Group\n </span></span\n >\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n\n <div class=\"title__description\">\n {{ genericPolicy.description }}\n </div>\n</h2>\n\n<mat-dialog-content class=\"content\">\n <gio-ps-step-form\n [readOnly]=\"readOnly\"\n [genericPolicy]=\"genericPolicy\"\n [flowPhase]=\"flowPhase\"\n [(step)]=\"step\"\n (isValid)=\"isValid = $event\"\n ></gio-ps-step-form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\" align=\"end\">\n <button class=\"actions__cancelBtn\" mat-button [mat-dialog-close]=\"\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-flat-button role=\"dialog\" (click)=\"onSave()\" [disabled]=\"!isValid\">Save</button>\n</mat-dialog-actions>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.title__icon{margin-right:8px}.title__closeBtn{top:0;right:-24px;float:right}.title__description{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#606274}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: GioIconsModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioPolicyStudioStepFormComponent, selector: "gio-ps-step-form", inputs: ["readOnly", "step", "flowPhase", "genericPolicy"], outputs: ["stepChange", "isValid"] }] }); }
|
|
1116
1199
|
}
|
|
1117
1200
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioStepEditDialogComponent, decorators: [{
|
|
1118
1201
|
type: Component,
|
|
1119
|
-
args: [{ standalone: true, imports: [CommonModule, MatButtonModule, MatDialogModule, GioIconsModule, GioPolicyStudioStepFormComponent], selector: 'gio-ps-step-edit-dialog', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n <mat-icon class=\"title__icon\" [svgIcon]=\"genericPolicy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"step.name\" class=\"title__name\">\n {{ step.name }}\n <span *ngIf=\"genericPolicy.type === 'SHARED_POLICY_GROUP'\" class=\"gio-badge-neutral policiesCatalog__list__policy__head__badge\">\n <mat-icon svgIcon=\"gio:users\"></mat-icon> Shared Policy Group\n </span></span\n >\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n\n <div class=\"title__description\">\n {{ genericPolicy.description }}\n </div>\n</h2>\n\n<mat-dialog-content class=\"content\">\n <gio-ps-step-form\n [readOnly]=\"readOnly\"\n [genericPolicy]=\"genericPolicy\"\n [
|
|
1202
|
+
args: [{ standalone: true, imports: [CommonModule, MatButtonModule, MatDialogModule, GioIconsModule, GioPolicyStudioStepFormComponent], selector: 'gio-ps-step-edit-dialog', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n <mat-icon class=\"title__icon\" [svgIcon]=\"genericPolicy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"step.name\" class=\"title__name\">\n {{ step.name }}\n <span *ngIf=\"genericPolicy.type === 'SHARED_POLICY_GROUP'\" class=\"gio-badge-neutral policiesCatalog__list__policy__head__badge\">\n <mat-icon svgIcon=\"gio:users\"></mat-icon> Shared Policy Group\n </span></span\n >\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n\n <div class=\"title__description\">\n {{ genericPolicy.description }}\n </div>\n</h2>\n\n<mat-dialog-content class=\"content\">\n <gio-ps-step-form\n [readOnly]=\"readOnly\"\n [genericPolicy]=\"genericPolicy\"\n [flowPhase]=\"flowPhase\"\n [(step)]=\"step\"\n (isValid)=\"isValid = $event\"\n ></gio-ps-step-form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\" align=\"end\">\n <button class=\"actions__cancelBtn\" mat-button [mat-dialog-close]=\"\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-flat-button role=\"dialog\" (click)=\"onSave()\" [disabled]=\"!isValid\">Save</button>\n</mat-dialog-actions>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.title__icon{margin-right:8px}.title__closeBtn{top:0;right:-24px;float:right}.title__description{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#606274}\n"] }]
|
|
1120
1203
|
}], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
1121
1204
|
type: Inject,
|
|
1122
1205
|
args: [MAT_DIALOG_DATA]
|
|
@@ -1197,7 +1280,7 @@ ${this.policyNotFound === 'SHARED_POLICY_GROUP' ? 'Note: The Gateway will ignore
|
|
|
1197
1280
|
readOnly: this.readOnly,
|
|
1198
1281
|
genericPolicy: this.genericPolicy,
|
|
1199
1282
|
step: this.step,
|
|
1200
|
-
|
|
1283
|
+
flowPhase: this.flowPhase,
|
|
1201
1284
|
},
|
|
1202
1285
|
role: 'alertdialog',
|
|
1203
1286
|
id: 'gioPolicyStudioPolicyFormDialog',
|
|
@@ -1218,7 +1301,7 @@ ${this.policyNotFound === 'SHARED_POLICY_GROUP' ? 'Note: The Gateway will ignore
|
|
|
1218
1301
|
this.deleted.emit();
|
|
1219
1302
|
}
|
|
1220
1303
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioDetailsPhaseStepComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1221
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioPolicyStudioDetailsPhaseStepComponent, isStandalone: true, selector: "gio-ps-flow-details-phase-step", inputs: { readOnly: "readOnly", step: "step", genericPolicies: "genericPolicies",
|
|
1304
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioPolicyStudioDetailsPhaseStepComponent, isStandalone: true, selector: "gio-ps-flow-details-phase-step", inputs: { readOnly: "readOnly", step: "step", genericPolicies: "genericPolicies", flowPhase: "flowPhase" }, outputs: { stepChange: "stepChange", deleted: "deleted", disabled: "disabled" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"info\">\n <div class=\"info__head\">\n <mat-icon class=\"info__head__icon\" [svgIcon]=\"genericPolicy?.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"step.name\" class=\"info__head__name\">{{ step.name }}</span>\n\n <span *ngIf=\"genericPolicy?.type === 'SHARED_POLICY_GROUP'\" class=\"gio-badge-neutral\" matTooltip=\"Shared Policy Group\">\n <mat-icon svgIcon=\"gio:users\"></mat-icon>\n </span>\n @if (getPrerequisiteMessage) {\n <mat-icon class=\"info__head__info\" svgIcon=\"gio:info\" [matTooltip]=\"getPrerequisiteMessage\"></mat-icon>\n }\n <span\n *ngIf=\"policyNotFound !== false\"\n class=\"gio-badge-error\"\n [matTooltip]=\"policyNotFound === 'SHARED_POLICY_GROUP' ? 'Shared Policy Group not found' : 'Policy not found'\"\n >\n @if (policyNotFound === 'SHARED_POLICY_GROUP') {\n <mat-icon svgIcon=\"gio:users\"></mat-icon> \n }\n <mat-icon svgIcon=\"gio:alert-circle\"></mat-icon>\n </span>\n </div>\n\n <div *ngIf=\"step.description\" class=\"info__description\">{{ step.description }}</div>\n</div>\n\n<button class=\"menuBtn\" mat-icon-button [matMenuTriggerFor]=\"policyMenu\"><mat-icon svgIcon=\"gio:more-vertical\"></mat-icon></button>\n\n<mat-menu #policyMenu=\"matMenu\">\n <button mat-menu-item (click)=\"onEditOrView()\">\n <mat-icon [svgIcon]=\"readOnly ? 'gio:eye-empty' : 'gio:edit-pencil'\"></mat-icon>\n <span>{{ readOnly ? 'View' : 'Edit' }}</span>\n </button>\n\n <button [disabled]=\"readOnly\" mat-menu-item (click)=\"onDisable()\">\n <mat-icon [svgIcon]=\"step.enabled ? 'gio:prohibition' : 'gio:check-circled-outline'\"></mat-icon>\n <span>{{ step.enabled ? 'Disable' : 'Enable' }}</span>\n </button>\n\n <button [disabled]=\"readOnly\" mat-menu-item (click)=\"onDelete()\">\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n <span>Delete</span>\n </button>\n</mat-menu>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;align-items:center;padding:8px;border:1px solid #6c59bd;border-radius:8px}:host-context(.disabled){border:1px solid #d3d5dc}.info{display:flex;max-width:300px;flex-direction:column;margin-left:4px;gap:4px}.info__head{display:flex;align-items:center}.info__head__icon{min-width:24px;flex:1 1 24px;margin-right:8px}.info__head__name{overflow:hidden;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap}.info__description{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;color:#606274;-webkit-line-clamp:2}.info__description:empty{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: GioIconsModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i7$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i7$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i7$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
|
1222
1305
|
}
|
|
1223
1306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioDetailsPhaseStepComponent, decorators: [{
|
|
1224
1307
|
type: Component,
|
|
@@ -1229,7 +1312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1229
1312
|
type: Input
|
|
1230
1313
|
}], genericPolicies: [{
|
|
1231
1314
|
type: Input
|
|
1232
|
-
}],
|
|
1315
|
+
}], flowPhase: [{
|
|
1233
1316
|
type: Input,
|
|
1234
1317
|
args: [{ required: true }]
|
|
1235
1318
|
}], stepChange: [{
|
|
@@ -1302,7 +1385,7 @@ class GioPolicyStudioDetailsPhaseComponent {
|
|
|
1302
1385
|
.open(GioPolicyStudioPoliciesCatalogDialogComponent, {
|
|
1303
1386
|
data: {
|
|
1304
1387
|
genericPolicies: this.genericPolicies,
|
|
1305
|
-
|
|
1388
|
+
flowPhase: this.policyFlowPhase,
|
|
1306
1389
|
apiType: this.apiType,
|
|
1307
1390
|
trialUrl: this.trialUrl,
|
|
1308
1391
|
},
|
|
@@ -1346,11 +1429,11 @@ class GioPolicyStudioDetailsPhaseComponent {
|
|
|
1346
1429
|
]);
|
|
1347
1430
|
}
|
|
1348
1431
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioDetailsPhaseComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1349
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioPolicyStudioDetailsPhaseComponent, isStandalone: true, selector: "gio-ps-flow-details-phase", inputs: { readOnly: "readOnly", steps: "steps", name: "name", description: "description", startConnector: "startConnector", endConnector: "endConnector", apiType: "apiType", genericPolicies: "genericPolicies",
|
|
1432
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioPolicyStudioDetailsPhaseComponent, isStandalone: true, selector: "gio-ps-flow-details-phase", inputs: { readOnly: "readOnly", steps: "steps", name: "name", description: "description", startConnector: "startConnector", endConnector: "endConnector", apiType: "apiType", genericPolicies: "genericPolicies", policyFlowPhase: "policyFlowPhase", trialUrl: "trialUrl" }, outputs: { stepsChange: "stepsChange" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <span class=\"header__name\">\n {{ name }}\n </span>\n <span class=\"header__description\">\n {{ description }}\n </span>\n\n <span *ngIf=\"isDisabled\" class=\"header__infoIcon\" matTooltip=\"Policies might not be evaluated\" matTooltipPosition=\"before\">\n <mat-icon svgIcon=\"gio:info\"></mat-icon>\n </span>\n</div>\n\n<div *ngIf=\"!isDisabled; else disabledPhaseContent\" class=\"wrapper\">\n <div class=\"content\">\n @for (stepVM of stepsVM; track stepVM._id; let isFirst = $first) {\n <div class=\"content__step\">\n <!-- Connector -->\n <ng-container *ngIf=\"stepVM.type === 'connectors'\">\n <div class=\"content__step__connector\">\n <span *ngFor=\"let connector of stepVM.connectors\" class=\"gio-badge-white content__step__connector__badge\">\n <mat-icon *ngIf=\"connector.icon\" [svgIcon]=\"connector.icon\" class=\"content__step__connector__badge__icon\"></mat-icon>\n {{ connector.name }}\n </span>\n </div>\n\n <!-- Add policy button after first connector -->\n <ng-container *ngIf=\"isFirst\">\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n <button [disabled]=\"readOnly\" class=\"content__step__addBtn\" mat-button (click)=\"onAddPolicy(-1)\">\n <mat-icon svgIcon=\"gio:plus\"></mat-icon>\n </button>\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n </ng-container>\n </ng-container>\n\n <!-- Policy -->\n @if (stepVM.type === 'step') {\n <div class=\"content__step__policy\">\n <div *ngIf=\"stepVM.step?.condition\" class=\"content__step__policy__condition\">\n <span class=\"gio-badge-neutral\" [matTooltip]=\"'Condition: ' + stepVM.step.condition\"\n ><mat-icon svgIcon=\"gio:if\"></mat-icon> {{ stepVM.step.condition }}</span\n >\n </div>\n\n <gio-ps-flow-details-phase-step\n class=\"content__step__step\"\n [readOnly]=\"readOnly\"\n [class.disabled]=\"readOnly || !stepVM.step.enabled\"\n [genericPolicies]=\"genericPolicies\"\n [step]=\"stepVM.step\"\n [flowPhase]=\"policyFlowPhase\"\n (stepChange)=\"onStepChange(stepVM.index, $event)\"\n (deleted)=\"onStepDeleted(stepVM.index)\"\n (disabled)=\"onStepDisabled(stepVM.index)\"\n ></gio-ps-flow-details-phase-step>\n </div>\n\n <!-- Add policy button -->\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n <button [disabled]=\"readOnly\" class=\"content__step__addBtn\" mat-button (click)=\"onAddPolicy(stepVM.index)\">\n <mat-icon svgIcon=\"gio:plus\"></mat-icon>\n </button>\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n }\n </div>\n }\n </div>\n</div>\n\n<ng-template #disabledPhaseContent>\n <div class=\"disabledContent\">\n <gio-banner-warning>\n Policies might not be evaluated\n <span gioBannerBody>\n Your current flow settings are not applicable to this phase. Select supporting endpoints and operations in the flow configuration to\n enable this phase.\n </span>\n </gio-banner-warning>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;overflow:hidden;min-height:215px;flex-direction:column;padding-top:16px;border:1px solid #d3d5dc;border-radius:8px;background-color:#fff}.header{display:flex;padding:0 16px;gap:8px}.header__name{flex:0 1 auto;font-size:14px;font-weight:500;line-height:20px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.header__description{flex:1 1 auto;font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;color:#606274}.wrapper{position:relative;flex:1 1 auto;overflow-y:auto}.content{position:absolute;display:flex;width:max-content;height:100%;align-items:center;padding:0 16px}.content__step{display:flex;align-items:center}.content__step__connector{display:flex;flex-direction:column;gap:8px}.content__step__connector__badge{border:1px solid #876fec;border-radius:16px}.content__step__connector__badge__icon{margin-right:4px}.content__step__rightArrow{width:16px;height:16px;margin:0 8px;color:#b4b5bb}.content__step__policy{position:relative;display:flex;flex-direction:row;align-items:center}.content__step__policy__condition{position:absolute;top:-32px;right:0;left:0;display:flex;flex-direction:column}.content__step__policy__condition span{display:inline-block;overflow:hidden;text-overflow:ellipsis;text-transform:none;white-space:nowrap}.content__step__policy__condition span mat-icon{margin-right:4px}.disabledContent{display:flex;flex-direction:column;padding:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: GioPolicyStudioDetailsPhaseStepComponent, selector: "gio-ps-flow-details-phase-step", inputs: ["readOnly", "step", "genericPolicies", "flowPhase"], outputs: ["stepChange", "deleted", "disabled"] }, { kind: "ngmodule", type: GioIconsModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: GioBannerModule }, { kind: "component", type: i6$1.GioBannerWarningComponent, selector: "gio-banner-warning" }, { kind: "directive", type: i6$1.GioBannerBodyDirective, selector: "[gioBannerBody]" }] }); }
|
|
1350
1433
|
}
|
|
1351
1434
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioDetailsPhaseComponent, decorators: [{
|
|
1352
1435
|
type: Component,
|
|
1353
|
-
args: [{ standalone: true, imports: [CommonModule, MatTooltipModule, MatButtonModule, GioPolicyStudioDetailsPhaseStepComponent, GioIconsModule, GioBannerModule], selector: 'gio-ps-flow-details-phase', template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <span class=\"header__name\">\n {{ name }}\n </span>\n <span class=\"header__description\">\n {{ description }}\n </span>\n\n <span *ngIf=\"isDisabled\" class=\"header__infoIcon\" matTooltip=\"Policies might not be evaluated\" matTooltipPosition=\"before\">\n <mat-icon svgIcon=\"gio:info\"></mat-icon>\n </span>\n</div>\n\n<div *ngIf=\"!isDisabled; else disabledPhaseContent\" class=\"wrapper\">\n <div class=\"content\">\n @for (stepVM of stepsVM; track stepVM._id; let isFirst = $first) {\n <div class=\"content__step\">\n <!-- Connector -->\n <ng-container *ngIf=\"stepVM.type === 'connectors'\">\n <div class=\"content__step__connector\">\n <span *ngFor=\"let connector of stepVM.connectors\" class=\"gio-badge-white content__step__connector__badge\">\n <mat-icon *ngIf=\"connector.icon\" [svgIcon]=\"connector.icon\" class=\"content__step__connector__badge__icon\"></mat-icon>\n {{ connector.name }}\n </span>\n </div>\n\n <!-- Add policy button after first connector -->\n <ng-container *ngIf=\"isFirst\">\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n <button [disabled]=\"readOnly\" class=\"content__step__addBtn\" mat-button (click)=\"onAddPolicy(-1)\">\n <mat-icon svgIcon=\"gio:plus\"></mat-icon>\n </button>\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n </ng-container>\n </ng-container>\n\n <!-- Policy -->\n @if (stepVM.type === 'step') {\n <div class=\"content__step__policy\">\n <div *ngIf=\"stepVM.step?.condition\" class=\"content__step__policy__condition\">\n <span class=\"gio-badge-neutral\" [matTooltip]=\"'Condition: ' + stepVM.step.condition\"\n ><mat-icon svgIcon=\"gio:if\"></mat-icon> {{ stepVM.step.condition }}</span\n >\n </div>\n\n <gio-ps-flow-details-phase-step\n class=\"content__step__step\"\n [readOnly]=\"readOnly\"\n [class.disabled]=\"readOnly || !stepVM.step.enabled\"\n [genericPolicies]=\"genericPolicies\"\n [step]=\"stepVM.step\"\n [
|
|
1436
|
+
args: [{ standalone: true, imports: [CommonModule, MatTooltipModule, MatButtonModule, GioPolicyStudioDetailsPhaseStepComponent, GioIconsModule, GioBannerModule], selector: 'gio-ps-flow-details-phase', template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <span class=\"header__name\">\n {{ name }}\n </span>\n <span class=\"header__description\">\n {{ description }}\n </span>\n\n <span *ngIf=\"isDisabled\" class=\"header__infoIcon\" matTooltip=\"Policies might not be evaluated\" matTooltipPosition=\"before\">\n <mat-icon svgIcon=\"gio:info\"></mat-icon>\n </span>\n</div>\n\n<div *ngIf=\"!isDisabled; else disabledPhaseContent\" class=\"wrapper\">\n <div class=\"content\">\n @for (stepVM of stepsVM; track stepVM._id; let isFirst = $first) {\n <div class=\"content__step\">\n <!-- Connector -->\n <ng-container *ngIf=\"stepVM.type === 'connectors'\">\n <div class=\"content__step__connector\">\n <span *ngFor=\"let connector of stepVM.connectors\" class=\"gio-badge-white content__step__connector__badge\">\n <mat-icon *ngIf=\"connector.icon\" [svgIcon]=\"connector.icon\" class=\"content__step__connector__badge__icon\"></mat-icon>\n {{ connector.name }}\n </span>\n </div>\n\n <!-- Add policy button after first connector -->\n <ng-container *ngIf=\"isFirst\">\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n <button [disabled]=\"readOnly\" class=\"content__step__addBtn\" mat-button (click)=\"onAddPolicy(-1)\">\n <mat-icon svgIcon=\"gio:plus\"></mat-icon>\n </button>\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n </ng-container>\n </ng-container>\n\n <!-- Policy -->\n @if (stepVM.type === 'step') {\n <div class=\"content__step__policy\">\n <div *ngIf=\"stepVM.step?.condition\" class=\"content__step__policy__condition\">\n <span class=\"gio-badge-neutral\" [matTooltip]=\"'Condition: ' + stepVM.step.condition\"\n ><mat-icon svgIcon=\"gio:if\"></mat-icon> {{ stepVM.step.condition }}</span\n >\n </div>\n\n <gio-ps-flow-details-phase-step\n class=\"content__step__step\"\n [readOnly]=\"readOnly\"\n [class.disabled]=\"readOnly || !stepVM.step.enabled\"\n [genericPolicies]=\"genericPolicies\"\n [step]=\"stepVM.step\"\n [flowPhase]=\"policyFlowPhase\"\n (stepChange)=\"onStepChange(stepVM.index, $event)\"\n (deleted)=\"onStepDeleted(stepVM.index)\"\n (disabled)=\"onStepDisabled(stepVM.index)\"\n ></gio-ps-flow-details-phase-step>\n </div>\n\n <!-- Add policy button -->\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n <button [disabled]=\"readOnly\" class=\"content__step__addBtn\" mat-button (click)=\"onAddPolicy(stepVM.index)\">\n <mat-icon svgIcon=\"gio:plus\"></mat-icon>\n </button>\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n }\n </div>\n }\n </div>\n</div>\n\n<ng-template #disabledPhaseContent>\n <div class=\"disabledContent\">\n <gio-banner-warning>\n Policies might not be evaluated\n <span gioBannerBody>\n Your current flow settings are not applicable to this phase. Select supporting endpoints and operations in the flow configuration to\n enable this phase.\n </span>\n </gio-banner-warning>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;overflow:hidden;min-height:215px;flex-direction:column;padding-top:16px;border:1px solid #d3d5dc;border-radius:8px;background-color:#fff}.header{display:flex;padding:0 16px;gap:8px}.header__name{flex:0 1 auto;font-size:14px;font-weight:500;line-height:20px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.header__description{flex:1 1 auto;font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;color:#606274}.wrapper{position:relative;flex:1 1 auto;overflow-y:auto}.content{position:absolute;display:flex;width:max-content;height:100%;align-items:center;padding:0 16px}.content__step{display:flex;align-items:center}.content__step__connector{display:flex;flex-direction:column;gap:8px}.content__step__connector__badge{border:1px solid #876fec;border-radius:16px}.content__step__connector__badge__icon{margin-right:4px}.content__step__rightArrow{width:16px;height:16px;margin:0 8px;color:#b4b5bb}.content__step__policy{position:relative;display:flex;flex-direction:row;align-items:center}.content__step__policy__condition{position:absolute;top:-32px;right:0;left:0;display:flex;flex-direction:column}.content__step__policy__condition span{display:inline-block;overflow:hidden;text-overflow:ellipsis;text-transform:none;white-space:nowrap}.content__step__policy__condition span mat-icon{margin-right:4px}.disabledContent{display:flex;flex-direction:column;padding:16px}\n"] }]
|
|
1354
1437
|
}], ctorParameters: () => [{ type: i1.MatDialog }], propDecorators: { readOnly: [{
|
|
1355
1438
|
type: Input
|
|
1356
1439
|
}], steps: [{
|
|
@@ -1367,7 +1450,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1367
1450
|
type: Input
|
|
1368
1451
|
}], genericPolicies: [{
|
|
1369
1452
|
type: Input
|
|
1370
|
-
}],
|
|
1453
|
+
}], policyFlowPhase: [{
|
|
1371
1454
|
type: Input
|
|
1372
1455
|
}], trialUrl: [{
|
|
1373
1456
|
type: Input
|
|
@@ -1623,7 +1706,7 @@ class GioPolicyStudioDetailsComponent {
|
|
|
1623
1706
|
});
|
|
1624
1707
|
}
|
|
1625
1708
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioDetailsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1626
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: GioPolicyStudioDetailsComponent, isStandalone: true, selector: "gio-ps-flow-details", inputs: { readOnly: "readOnly", loading: "loading", apiType: "apiType", flow: "flow", entrypointsInfo: "entrypointsInfo", endpointsInfo: "endpointsInfo", policies: "policies", genericPolicies: "genericPolicies", trialUrl: "trialUrl" }, outputs: { flowChange: "flowChange", deleteFlow: "deleteFlow" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<ng-container *ngIf=\"!loading; then flowDetailsTpl; else loadingTpl\"></ng-container>\n\n<ng-template #flowDetailsTpl>\n <ng-container *ngIf=\"flow; else emptyFlows\">\n <div class=\"header\">\n <div class=\"header__label\">\n Flow details\n <div *ngIf=\"!flow.enabled\" class=\"gio-badge gio-badge-neutral\">Disabled</div>\n </div>\n <div class=\"header__configBtn\">\n <button\n [disabled]=\"readOnly\"\n class=\"header__configBtn__enableDisable\"\n mat-stroked-button\n [matTooltip]=\"flow.enabled ? 'Disable' : 'Enable'\"\n (click)=\"onEnableDisableFlow()\"\n >\n <mat-icon [svgIcon]=\"flow.enabled ? 'gio:prohibition' : 'gio:check-circled-outline'\"></mat-icon>\n </button>\n <button [disabled]=\"readOnly\" class=\"header__configBtn__edit\" mat-stroked-button (click)=\"onEditFlow()\" matTooltip=\"Edit\">\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n </button>\n <button [disabled]=\"readOnly\" class=\"header__configBtn__delete\" mat-stroked-button (click)=\"onDeleteFlow()\" matTooltip=\"Delete\">\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n </button>\n </div>\n </div>\n <gio-ps-flow-details-info-bar class=\"infoBar\" [flow]=\"flow\" [entrypointsInfo]=\"entrypointsInfo\"></gio-ps-flow-details-info-bar>\n\n <div class=\"content\">\n <mat-tab-group *ngIf=\"apiType === 'MESSAGE'\" class=\"content__tabs\" dynamicHeight>\n <mat-tab label=\"Initial connection\" bodyClass=\"content__tabs__body\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"messageFlowEntrypointsInfo\"\n [endConnector]=\"endpointsInfo\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyExecutionPhase=\"REQUEST\"\n (stepsChange)=\"onStepsChange('request', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Response phase\"\n description=\"Policies will be applied to the response from the initial connection\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"endpointsInfo\"\n [endConnector]=\"messageFlowEntrypointsInfo\"\n [steps]=\"flow.response ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyExecutionPhase=\"RESPONSE\"\n (stepsChange)=\"onStepsChange('response', $event)\"\n ></gio-ps-flow-details-phase>\n </mat-tab>\n <mat-tab label=\"Event messages\" bodyClass=\"content__tabs__body\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Publish phase\"\n description=\"Policies will be applied on messages sent to the endpoint\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"messageFlowEntrypointsInfo | gioFilterConnectorsByMode: 'PUBLISH' : operations\"\n [endConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'PUBLISH' : operations\"\n [steps]=\"flow.publish ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyExecutionPhase=\"MESSAGE_REQUEST\"\n (stepsChange)=\"onStepsChange('publish', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Subscribe phase\"\n description=\"Policies will be applied on messages received by the entrypoint\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'SUBSCRIBE' : operations\"\n [endConnector]=\"messageFlowEntrypointsInfo | gioFilterConnectorsByMode: 'SUBSCRIBE' : operations\"\n [steps]=\"flow.subscribe ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyExecutionPhase=\"MESSAGE_RESPONSE\"\n (stepsChange)=\"onStepsChange('subscribe', $event)\"\n ></gio-ps-flow-details-phase>\n </mat-tab>\n </mat-tab-group>\n\n <ng-container *ngIf=\"apiType === 'PROXY'\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"entrypointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [endConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyExecutionPhase=\"REQUEST\"\n (stepsChange)=\"onStepsChange('request', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Response phase\"\n description=\"Policies will be applied during the connection termination\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [endConnector]=\"entrypointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [steps]=\"flow.response ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyExecutionPhase=\"RESPONSE\"\n (stepsChange)=\"onStepsChange('response', $event)\"\n ></gio-ps-flow-details-phase>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #emptyFlows>\n <div class=\"emptyFlows\">\n <h2>No flows yet</h2>\n <p class=\"mat-body-1\">Flows allow you to customize the behavior of your API event phases through configurable policies</p>\n </div>\n </ng-template>\n</ng-template>\n\n<ng-template #loadingTpl>\n <div class=\"header loading\">\n <div class=\"header__label\">Flow details</div>\n <div class=\"header__configBtn\">\n <button class=\"header__configBtn__edit\" mat-stroked-button disabled>\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n </button>\n <button class=\"header__configBtn__delete\" mat-stroked-button disabled>\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n </button>\n </div>\n </div>\n <gio-ps-flow-details-info-bar class=\"infoBar loading\"></gio-ps-flow-details-info-bar>\n <div class=\"content loading\">\n <gio-loader></gio-loader>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;height:100%;flex-direction:column}.emptyFlows{display:flex;max-width:500px;height:100%;flex-direction:column;justify-content:center;margin:auto;text-align:center}.header{display:flex;align-items:center;padding:16px;border-bottom:1px solid #d3d5dc}.header__label{font-size:16px;font-weight:500;letter-spacing:.4px;line-height:24px;display:flex;flex:1 1 auto;align-items:center;margin-bottom:0;gap:8px}.header__configBtn{display:flex;align-items:center;margin-left:8px;gap:8px}.infoBar{border-bottom:1px solid #d3d5dc}.infoBar.loading{min-height:52px}.content{overflow:auto;flex:1 1 auto;background-color:#f7f8fd}.content__tabs{min-height:100%;min-height:calc(100% - 64px)}.content__phase{margin:16px 16px 0}.content.loading{display:flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i3$2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i3$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: GioIconsModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioPolicyStudioDetailsPhaseComponent, selector: "gio-ps-flow-details-phase", inputs: ["readOnly", "steps", "name", "description", "startConnector", "endConnector", "apiType", "genericPolicies", "policyExecutionPhase", "trialUrl"], outputs: ["stepsChange"] }, { kind: "pipe", type: GioFilterConnectorsByModePipe, name: "gioFilterConnectorsByMode" }, { kind: "ngmodule", type: GioLoaderModule }, { kind: "component", type: i6$1.GioLoaderComponent, selector: "gio-loader" }, { kind: "component", type: GioPolicyStudioDetailsInfoBarComponent, selector: "gio-ps-flow-details-info-bar", inputs: ["flow", "entrypointsInfo"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
|
1709
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: GioPolicyStudioDetailsComponent, isStandalone: true, selector: "gio-ps-flow-details", inputs: { readOnly: "readOnly", loading: "loading", apiType: "apiType", flow: "flow", entrypointsInfo: "entrypointsInfo", endpointsInfo: "endpointsInfo", policies: "policies", genericPolicies: "genericPolicies", trialUrl: "trialUrl" }, outputs: { flowChange: "flowChange", deleteFlow: "deleteFlow" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<ng-container *ngIf=\"!loading; then flowDetailsTpl; else loadingTpl\"></ng-container>\n\n<ng-template #flowDetailsTpl>\n <ng-container *ngIf=\"flow; else emptyFlows\">\n <div class=\"header\">\n <div class=\"header__label\">\n Flow details\n <div *ngIf=\"!flow.enabled\" class=\"gio-badge gio-badge-neutral\">Disabled</div>\n </div>\n <div class=\"header__configBtn\">\n <button\n [disabled]=\"readOnly\"\n class=\"header__configBtn__enableDisable\"\n mat-stroked-button\n [matTooltip]=\"flow.enabled ? 'Disable' : 'Enable'\"\n (click)=\"onEnableDisableFlow()\"\n >\n <mat-icon [svgIcon]=\"flow.enabled ? 'gio:prohibition' : 'gio:check-circled-outline'\"></mat-icon>\n </button>\n <button [disabled]=\"readOnly\" class=\"header__configBtn__edit\" mat-stroked-button (click)=\"onEditFlow()\" matTooltip=\"Edit\">\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n </button>\n <button [disabled]=\"readOnly\" class=\"header__configBtn__delete\" mat-stroked-button (click)=\"onDeleteFlow()\" matTooltip=\"Delete\">\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n </button>\n </div>\n </div>\n <gio-ps-flow-details-info-bar class=\"infoBar\" [flow]=\"flow\" [entrypointsInfo]=\"entrypointsInfo\"></gio-ps-flow-details-info-bar>\n\n <div class=\"content\">\n <mat-tab-group *ngIf=\"apiType === 'MESSAGE'\" class=\"content__tabs\" dynamicHeight>\n <mat-tab label=\"Initial connection\" bodyClass=\"content__tabs__body\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"messageFlowEntrypointsInfo\"\n [endConnector]=\"endpointsInfo\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"REQUEST\"\n (stepsChange)=\"onStepsChange('request', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Response phase\"\n description=\"Policies will be applied to the response from the initial connection\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"endpointsInfo\"\n [endConnector]=\"messageFlowEntrypointsInfo\"\n [steps]=\"flow.response ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"RESPONSE\"\n (stepsChange)=\"onStepsChange('response', $event)\"\n ></gio-ps-flow-details-phase>\n </mat-tab>\n <mat-tab label=\"Event messages\" bodyClass=\"content__tabs__body\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Publish phase\"\n description=\"Policies will be applied on messages sent to the endpoint\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"messageFlowEntrypointsInfo | gioFilterConnectorsByMode: 'PUBLISH' : operations\"\n [endConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'PUBLISH' : operations\"\n [steps]=\"flow.publish ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"PUBLISH\"\n (stepsChange)=\"onStepsChange('publish', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Subscribe phase\"\n description=\"Policies will be applied on messages received by the entrypoint\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'SUBSCRIBE' : operations\"\n [endConnector]=\"messageFlowEntrypointsInfo | gioFilterConnectorsByMode: 'SUBSCRIBE' : operations\"\n [steps]=\"flow.subscribe ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"SUBSCRIBE\"\n (stepsChange)=\"onStepsChange('subscribe', $event)\"\n ></gio-ps-flow-details-phase>\n </mat-tab>\n </mat-tab-group>\n\n <ng-container *ngIf=\"apiType === 'PROXY'\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"entrypointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [endConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"REQUEST\"\n (stepsChange)=\"onStepsChange('request', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Response phase\"\n description=\"Policies will be applied during the connection termination\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [endConnector]=\"entrypointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [steps]=\"flow.response ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"RESPONSE\"\n (stepsChange)=\"onStepsChange('response', $event)\"\n ></gio-ps-flow-details-phase>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #emptyFlows>\n <div class=\"emptyFlows\">\n <h2>No flows yet</h2>\n <p class=\"mat-body-1\">Flows allow you to customize the behavior of your API event phases through configurable policies</p>\n </div>\n </ng-template>\n</ng-template>\n\n<ng-template #loadingTpl>\n <div class=\"header loading\">\n <div class=\"header__label\">Flow details</div>\n <div class=\"header__configBtn\">\n <button class=\"header__configBtn__edit\" mat-stroked-button disabled>\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n </button>\n <button class=\"header__configBtn__delete\" mat-stroked-button disabled>\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n </button>\n </div>\n </div>\n <gio-ps-flow-details-info-bar class=\"infoBar loading\"></gio-ps-flow-details-info-bar>\n <div class=\"content loading\">\n <gio-loader></gio-loader>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;height:100%;flex-direction:column}.emptyFlows{display:flex;max-width:500px;height:100%;flex-direction:column;justify-content:center;margin:auto;text-align:center}.header{display:flex;align-items:center;padding:16px;border-bottom:1px solid #d3d5dc}.header__label{font-size:16px;font-weight:500;letter-spacing:.4px;line-height:24px;display:flex;flex:1 1 auto;align-items:center;margin-bottom:0;gap:8px}.header__configBtn{display:flex;align-items:center;margin-left:8px;gap:8px}.infoBar{border-bottom:1px solid #d3d5dc}.infoBar.loading{min-height:52px}.content{overflow:auto;flex:1 1 auto;background-color:#f7f8fd}.content__tabs{min-height:100%;min-height:calc(100% - 64px)}.content__phase{margin:16px 16px 0}.content.loading{display:flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i3$2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i3$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: GioIconsModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioPolicyStudioDetailsPhaseComponent, selector: "gio-ps-flow-details-phase", inputs: ["readOnly", "steps", "name", "description", "startConnector", "endConnector", "apiType", "genericPolicies", "policyFlowPhase", "trialUrl"], outputs: ["stepsChange"] }, { kind: "pipe", type: GioFilterConnectorsByModePipe, name: "gioFilterConnectorsByMode" }, { kind: "ngmodule", type: GioLoaderModule }, { kind: "component", type: i6$1.GioLoaderComponent, selector: "gio-loader" }, { kind: "component", type: GioPolicyStudioDetailsInfoBarComponent, selector: "gio-ps-flow-details-info-bar", inputs: ["flow", "entrypointsInfo"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
|
1627
1710
|
}
|
|
1628
1711
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioDetailsComponent, decorators: [{
|
|
1629
1712
|
type: Component,
|
|
@@ -1637,7 +1720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1637
1720
|
GioLoaderModule,
|
|
1638
1721
|
GioPolicyStudioDetailsInfoBarComponent,
|
|
1639
1722
|
MatTooltipModule,
|
|
1640
|
-
], selector: 'gio-ps-flow-details', template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<ng-container *ngIf=\"!loading; then flowDetailsTpl; else loadingTpl\"></ng-container>\n\n<ng-template #flowDetailsTpl>\n <ng-container *ngIf=\"flow; else emptyFlows\">\n <div class=\"header\">\n <div class=\"header__label\">\n Flow details\n <div *ngIf=\"!flow.enabled\" class=\"gio-badge gio-badge-neutral\">Disabled</div>\n </div>\n <div class=\"header__configBtn\">\n <button\n [disabled]=\"readOnly\"\n class=\"header__configBtn__enableDisable\"\n mat-stroked-button\n [matTooltip]=\"flow.enabled ? 'Disable' : 'Enable'\"\n (click)=\"onEnableDisableFlow()\"\n >\n <mat-icon [svgIcon]=\"flow.enabled ? 'gio:prohibition' : 'gio:check-circled-outline'\"></mat-icon>\n </button>\n <button [disabled]=\"readOnly\" class=\"header__configBtn__edit\" mat-stroked-button (click)=\"onEditFlow()\" matTooltip=\"Edit\">\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n </button>\n <button [disabled]=\"readOnly\" class=\"header__configBtn__delete\" mat-stroked-button (click)=\"onDeleteFlow()\" matTooltip=\"Delete\">\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n </button>\n </div>\n </div>\n <gio-ps-flow-details-info-bar class=\"infoBar\" [flow]=\"flow\" [entrypointsInfo]=\"entrypointsInfo\"></gio-ps-flow-details-info-bar>\n\n <div class=\"content\">\n <mat-tab-group *ngIf=\"apiType === 'MESSAGE'\" class=\"content__tabs\" dynamicHeight>\n <mat-tab label=\"Initial connection\" bodyClass=\"content__tabs__body\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"messageFlowEntrypointsInfo\"\n [endConnector]=\"endpointsInfo\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n
|
|
1723
|
+
], selector: 'gio-ps-flow-details', template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<ng-container *ngIf=\"!loading; then flowDetailsTpl; else loadingTpl\"></ng-container>\n\n<ng-template #flowDetailsTpl>\n <ng-container *ngIf=\"flow; else emptyFlows\">\n <div class=\"header\">\n <div class=\"header__label\">\n Flow details\n <div *ngIf=\"!flow.enabled\" class=\"gio-badge gio-badge-neutral\">Disabled</div>\n </div>\n <div class=\"header__configBtn\">\n <button\n [disabled]=\"readOnly\"\n class=\"header__configBtn__enableDisable\"\n mat-stroked-button\n [matTooltip]=\"flow.enabled ? 'Disable' : 'Enable'\"\n (click)=\"onEnableDisableFlow()\"\n >\n <mat-icon [svgIcon]=\"flow.enabled ? 'gio:prohibition' : 'gio:check-circled-outline'\"></mat-icon>\n </button>\n <button [disabled]=\"readOnly\" class=\"header__configBtn__edit\" mat-stroked-button (click)=\"onEditFlow()\" matTooltip=\"Edit\">\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n </button>\n <button [disabled]=\"readOnly\" class=\"header__configBtn__delete\" mat-stroked-button (click)=\"onDeleteFlow()\" matTooltip=\"Delete\">\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n </button>\n </div>\n </div>\n <gio-ps-flow-details-info-bar class=\"infoBar\" [flow]=\"flow\" [entrypointsInfo]=\"entrypointsInfo\"></gio-ps-flow-details-info-bar>\n\n <div class=\"content\">\n <mat-tab-group *ngIf=\"apiType === 'MESSAGE'\" class=\"content__tabs\" dynamicHeight>\n <mat-tab label=\"Initial connection\" bodyClass=\"content__tabs__body\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"messageFlowEntrypointsInfo\"\n [endConnector]=\"endpointsInfo\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"REQUEST\"\n (stepsChange)=\"onStepsChange('request', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Response phase\"\n description=\"Policies will be applied to the response from the initial connection\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"endpointsInfo\"\n [endConnector]=\"messageFlowEntrypointsInfo\"\n [steps]=\"flow.response ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"RESPONSE\"\n (stepsChange)=\"onStepsChange('response', $event)\"\n ></gio-ps-flow-details-phase>\n </mat-tab>\n <mat-tab label=\"Event messages\" bodyClass=\"content__tabs__body\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Publish phase\"\n description=\"Policies will be applied on messages sent to the endpoint\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"messageFlowEntrypointsInfo | gioFilterConnectorsByMode: 'PUBLISH' : operations\"\n [endConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'PUBLISH' : operations\"\n [steps]=\"flow.publish ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"PUBLISH\"\n (stepsChange)=\"onStepsChange('publish', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Subscribe phase\"\n description=\"Policies will be applied on messages received by the entrypoint\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'SUBSCRIBE' : operations\"\n [endConnector]=\"messageFlowEntrypointsInfo | gioFilterConnectorsByMode: 'SUBSCRIBE' : operations\"\n [steps]=\"flow.subscribe ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"SUBSCRIBE\"\n (stepsChange)=\"onStepsChange('subscribe', $event)\"\n ></gio-ps-flow-details-phase>\n </mat-tab>\n </mat-tab-group>\n\n <ng-container *ngIf=\"apiType === 'PROXY'\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"entrypointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [endConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"REQUEST\"\n (stepsChange)=\"onStepsChange('request', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Response phase\"\n description=\"Policies will be applied during the connection termination\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"endpointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [endConnector]=\"entrypointsInfo | gioFilterConnectorsByMode: 'REQUEST_RESPONSE'\"\n [steps]=\"flow.response ?? []\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n policyFlowPhase=\"RESPONSE\"\n (stepsChange)=\"onStepsChange('response', $event)\"\n ></gio-ps-flow-details-phase>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #emptyFlows>\n <div class=\"emptyFlows\">\n <h2>No flows yet</h2>\n <p class=\"mat-body-1\">Flows allow you to customize the behavior of your API event phases through configurable policies</p>\n </div>\n </ng-template>\n</ng-template>\n\n<ng-template #loadingTpl>\n <div class=\"header loading\">\n <div class=\"header__label\">Flow details</div>\n <div class=\"header__configBtn\">\n <button class=\"header__configBtn__edit\" mat-stroked-button disabled>\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n </button>\n <button class=\"header__configBtn__delete\" mat-stroked-button disabled>\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n </button>\n </div>\n </div>\n <gio-ps-flow-details-info-bar class=\"infoBar loading\"></gio-ps-flow-details-info-bar>\n <div class=\"content loading\">\n <gio-loader></gio-loader>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;height:100%;flex-direction:column}.emptyFlows{display:flex;max-width:500px;height:100%;flex-direction:column;justify-content:center;margin:auto;text-align:center}.header{display:flex;align-items:center;padding:16px;border-bottom:1px solid #d3d5dc}.header__label{font-size:16px;font-weight:500;letter-spacing:.4px;line-height:24px;display:flex;flex:1 1 auto;align-items:center;margin-bottom:0;gap:8px}.header__configBtn{display:flex;align-items:center;margin-left:8px;gap:8px}.infoBar{border-bottom:1px solid #d3d5dc}.infoBar.loading{min-height:52px}.content{overflow:auto;flex:1 1 auto;background-color:#f7f8fd}.content__tabs{min-height:100%;min-height:calc(100% - 64px)}.content__phase{margin:16px 16px 0}.content.loading{display:flex}\n"] }]
|
|
1641
1724
|
}], ctorParameters: () => [{ type: i1.MatDialog }], propDecorators: { readOnly: [{
|
|
1642
1725
|
type: Input
|
|
1643
1726
|
}], loading: [{
|
|
@@ -1678,6 +1761,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1678
1761
|
* limitations under the License.
|
|
1679
1762
|
*/
|
|
1680
1763
|
class GioPolicyStudioComponent {
|
|
1764
|
+
/**
|
|
1765
|
+
* List of policies usable in the policy studio
|
|
1766
|
+
*/
|
|
1767
|
+
set policies(value) {
|
|
1768
|
+
this._policies = value.map(fromPolicyInput);
|
|
1769
|
+
}
|
|
1770
|
+
get policies() {
|
|
1771
|
+
return this._policies;
|
|
1772
|
+
}
|
|
1681
1773
|
constructor(policyStudioService) {
|
|
1682
1774
|
this.policyStudioService = policyStudioService;
|
|
1683
1775
|
/**
|
|
@@ -1700,10 +1792,7 @@ class GioPolicyStudioComponent {
|
|
|
1700
1792
|
* List of plans with their flows
|
|
1701
1793
|
*/
|
|
1702
1794
|
this.plans = [];
|
|
1703
|
-
|
|
1704
|
-
* List of policies usable in the policy studio
|
|
1705
|
-
*/
|
|
1706
|
-
this.policies = [];
|
|
1795
|
+
this._policies = [];
|
|
1707
1796
|
/**
|
|
1708
1797
|
* List of SharedPolicyGroups usable in the studio
|
|
1709
1798
|
*/
|
|
@@ -1825,7 +1914,7 @@ class GioPolicyStudioComponent {
|
|
|
1825
1914
|
this.genericPolicies = toGenericPolicies(this.policies ?? [], this.sharedPolicyGroupPolicies ?? []);
|
|
1826
1915
|
}
|
|
1827
1916
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioComponent, deps: [{ token: GioPolicyStudioService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1828
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1917
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.0", type: GioPolicyStudioComponent, isStandalone: true, selector: "gio-policy-studio", inputs: { readOnly: "readOnly", apiType: "apiType", flowExecution: "flowExecution", entrypointsInfo: "entrypointsInfo", endpointsInfo: "endpointsInfo", commonFlows: "commonFlows", plans: "plans", policies: ["policies", "policies", (policies) => policies ?? []], sharedPolicyGroupPolicies: "sharedPolicyGroupPolicies", trialUrl: "trialUrl", loading: "loading", policySchemaFetcher: "policySchemaFetcher", policyDocumentationFetcher: "policyDocumentationFetcher" }, outputs: { save: "save" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__apiInfo\" *ngIf=\"!loading; else loadingApiInfo\">\n <span class=\"gio-badge-primary\">\n {{ apiType | titlecase }}\n </span>\n <span\n class=\"gio-badge-neutral\"\n [matTooltip]=\"connectorsTooltip\"\n matTooltipPosition=\"right\"\n matTooltipClass=\"gio-policy-studio__tooltip-line-break\"\n >\n <mat-icon *ngFor=\"let entrypoint of entrypointsInfo\" class=\"gio-left\" [svgIcon]=\"entrypoint.icon\"></mat-icon>\n <mat-icon *ngFor=\"let endpoint of endpointsInfo\" class=\"gio-left\" [svgIcon]=\"endpoint.icon\"></mat-icon>\n </span>\n </div>\n <ng-template #loadingApiInfo>\n <div class=\"header__apiInfo\">\n <span class=\"gio-badge-primary\"> </span>\n <span class=\"gio-badge-neutral\"> </span>\n </div>\n </ng-template>\n\n <div class=\"header__btn\">\n <button *ngIf=\"!saving\" mat-flat-button color=\"primary\" [disabled]=\"loading || disableSaveButton\" (click)=\"onSave()\">Save</button>\n <button *ngIf=\"saving\" mat-flat-button color=\"primary\" disabled>Saving...</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu\n [readOnly]=\"readOnly\"\n [loading]=\"loading\"\n [apiType]=\"apiType\"\n [flowExecution]=\"flowExecution\"\n [flowsGroups]=\"flowsGroups\"\n [entrypoints]=\"entrypointsInfo\"\n [entrypointsInfo]=\"entrypointsInfo\"\n (flowsGroupsChange)=\"onFlowsGroupsChange($event)\"\n (flowExecutionChange)=\"onFlowExecutionChange($event)\"\n [selectedFlowId]=\"selectedFlow?._id\"\n (selectedFlowIdChange)=\"onSelectFlow($event)\"\n (deleteFlow)=\"onDeleteSelectedFlow($event)\"\n ></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details\n [readOnly]=\"readOnly\"\n [loading]=\"loading\"\n [apiType]=\"apiType\"\n [flow]=\"selectedFlow\"\n [entrypointsInfo]=\"entrypointsInfo\"\n [endpointsInfo]=\"endpointsInfo\"\n [policies]=\"policies\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n (flowChange)=\"onSelectedFlowChange($event)\"\n (deleteFlow)=\"onDeleteSelectedFlow($event)\"\n ></gio-ps-flow-details>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;height:100%;flex-direction:column;padding:16px;background-color:#fff}::ng-deep .gio-policy-studio__tooltip-line-break{white-space:pre-line}.header{display:flex;align-items:center;padding-bottom:16px}.header__apiInfo{flex:1 1 auto}.wrapper{display:flex;min-height:0;flex:1 1 auto;flex-direction:row;gap:16px}.wrapper__flowsMenu{overflow:hidden;min-width:230px;max-width:400px;flex:1 1 33%;border:1px solid #d3d5dc;border-radius:8px}.wrapper__flowDetails{overflow:hidden;flex:1 1 66%;border:1px solid #d3d5dc;border-radius:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: GioIconsModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioPolicyStudioFlowsMenuComponent, selector: "gio-ps-flows-menu", inputs: ["readOnly", "loading", "apiType", "flowExecution", "flowsGroups", "selectedFlowId", "entrypoints", "entrypointsInfo"], outputs: ["selectedFlowIdChange", "flowsGroupsChange", "flowExecutionChange", "deleteFlow"] }, { kind: "component", type: GioPolicyStudioDetailsComponent, selector: "gio-ps-flow-details", inputs: ["readOnly", "loading", "apiType", "flow", "entrypointsInfo", "endpointsInfo", "policies", "genericPolicies", "trialUrl"], outputs: ["flowChange", "deleteFlow"] }] }); }
|
|
1829
1918
|
}
|
|
1830
1919
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyStudioComponent, decorators: [{
|
|
1831
1920
|
type: Component,
|
|
@@ -1852,7 +1941,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1852
1941
|
}], plans: [{
|
|
1853
1942
|
type: Input
|
|
1854
1943
|
}], policies: [{
|
|
1855
|
-
type: Input
|
|
1944
|
+
type: Input,
|
|
1945
|
+
args: [{
|
|
1946
|
+
transform: (policies) => policies ?? [],
|
|
1947
|
+
}]
|
|
1856
1948
|
}], sharedPolicyGroupPolicies: [{
|
|
1857
1949
|
type: Input
|
|
1858
1950
|
}], trialUrl: [{
|
|
@@ -1933,12 +2025,25 @@ const getPlansChangeOutput = (flowsGroups, initialFlowsGroups) => {
|
|
|
1933
2025
|
* limitations under the License.
|
|
1934
2026
|
*/
|
|
1935
2027
|
class GioPolicyGroupStudioComponent {
|
|
2028
|
+
/**
|
|
2029
|
+
* List of policies usable in the studio
|
|
2030
|
+
*/
|
|
2031
|
+
set policies(value) {
|
|
2032
|
+
this._policies = value.map(fromPolicyInput);
|
|
2033
|
+
}
|
|
2034
|
+
get policies() {
|
|
2035
|
+
return this._policies;
|
|
2036
|
+
}
|
|
2037
|
+
/**
|
|
2038
|
+
* Execution phase targeted by the Policy Group Studio
|
|
2039
|
+
* @deprecated Use `flowPhase` instead. To keep as long as we support APIM < 4.6
|
|
2040
|
+
*/
|
|
2041
|
+
set executionPhase(value) {
|
|
2042
|
+
this.flowPhase = fromExecutionPhase(value);
|
|
2043
|
+
}
|
|
1936
2044
|
constructor(policyStudioService) {
|
|
1937
2045
|
this.policyStudioService = policyStudioService;
|
|
1938
|
-
|
|
1939
|
-
* List of policies usable in the studio
|
|
1940
|
-
*/
|
|
1941
|
-
this.policies = [];
|
|
2046
|
+
this._policies = [];
|
|
1942
2047
|
/**
|
|
1943
2048
|
* Whether the Policy Group Studio is in read-only mode
|
|
1944
2049
|
*/
|
|
@@ -1980,6 +2085,7 @@ class GioPolicyGroupStudioComponent {
|
|
|
1980
2085
|
this.startConnector = [];
|
|
1981
2086
|
this.endConnector = [];
|
|
1982
2087
|
this.phases = {
|
|
2088
|
+
// HTTP Proxy
|
|
1983
2089
|
PROXY__REQUEST: {
|
|
1984
2090
|
name: 'Request phase',
|
|
1985
2091
|
description: 'Policies will be applied during the connection establishment',
|
|
@@ -1992,8 +2098,11 @@ class GioPolicyGroupStudioComponent {
|
|
|
1992
2098
|
startConnectorName: 'Incoming response',
|
|
1993
2099
|
endConnectorName: 'Outgoing response',
|
|
1994
2100
|
},
|
|
1995
|
-
|
|
1996
|
-
|
|
2101
|
+
PROXY__PUBLISH: null, // n/a
|
|
2102
|
+
PROXY__SUBSCRIBE: null, // n/a
|
|
2103
|
+
PROXY__CONNECT: null, // n/a
|
|
2104
|
+
PROXY__INTERACT: null, // n/a
|
|
2105
|
+
// HTTP Message
|
|
1997
2106
|
MESSAGE__REQUEST: {
|
|
1998
2107
|
name: 'Request phase',
|
|
1999
2108
|
description: 'Policies will be applied during the connection establishment',
|
|
@@ -2006,18 +2115,28 @@ class GioPolicyGroupStudioComponent {
|
|
|
2006
2115
|
startConnectorName: 'Incoming response',
|
|
2007
2116
|
endConnectorName: 'Outgoing response',
|
|
2008
2117
|
},
|
|
2009
|
-
|
|
2118
|
+
MESSAGE__PUBLISH: {
|
|
2010
2119
|
name: 'Publish phase',
|
|
2011
2120
|
description: 'Policies will be applied on messages sent to the endpoint',
|
|
2012
2121
|
startConnectorName: 'Incoming message request',
|
|
2013
2122
|
endConnectorName: 'Outgoing message request',
|
|
2014
2123
|
},
|
|
2015
|
-
|
|
2124
|
+
MESSAGE__SUBSCRIBE: {
|
|
2016
2125
|
name: 'Subscribe phase',
|
|
2017
2126
|
description: 'Policies will be applied on messages received by the entrypoint',
|
|
2018
2127
|
startConnectorName: 'Incoming message response',
|
|
2019
2128
|
endConnectorName: 'Outgoing message response',
|
|
2020
2129
|
},
|
|
2130
|
+
MESSAGE__CONNECT: null, // n/a
|
|
2131
|
+
MESSAGE__INTERACT: null, // n/a
|
|
2132
|
+
// NATIVE
|
|
2133
|
+
// TODO: To implement we want to make PS compatible with the native API
|
|
2134
|
+
NATIVE__CONNECT: null, // n/a
|
|
2135
|
+
NATIVE__INTERACT: null, // n/a
|
|
2136
|
+
NATIVE__PUBLISH: null, // n/a
|
|
2137
|
+
NATIVE__SUBSCRIBE: null, // n/a
|
|
2138
|
+
NATIVE__REQUEST: null, // n/a
|
|
2139
|
+
NATIVE__RESPONSE: null, // n/a
|
|
2021
2140
|
};
|
|
2022
2141
|
}
|
|
2023
2142
|
ngOnChanges(changes) {
|
|
@@ -2029,10 +2148,10 @@ class GioPolicyGroupStudioComponent {
|
|
|
2029
2148
|
}
|
|
2030
2149
|
if (changes.policies) {
|
|
2031
2150
|
this.isLoading = false;
|
|
2032
|
-
this.genericPolicies = toGenericPolicies(this.
|
|
2151
|
+
this.genericPolicies = toGenericPolicies(this._policies);
|
|
2033
2152
|
}
|
|
2034
2153
|
if (changes.executionPhase) {
|
|
2035
|
-
this.policyGroupVM = this.phases[`${this.apiType}__${this.
|
|
2154
|
+
this.policyGroupVM = this.phases[`${this.apiType}__${this.flowPhase}`] ?? undefined;
|
|
2036
2155
|
this.startConnector = this.createStartConnector(this.policyGroupVM?.startConnectorName ?? '');
|
|
2037
2156
|
this.endConnector = this.createEndConnector(this.policyGroupVM?.endConnectorName ?? '');
|
|
2038
2157
|
}
|
|
@@ -2045,11 +2164,11 @@ class GioPolicyGroupStudioComponent {
|
|
|
2045
2164
|
this.policyGroupChange.emit(steps);
|
|
2046
2165
|
}
|
|
2047
2166
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyGroupStudioComponent, deps: [{ token: GioPolicyStudioService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2048
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioPolicyGroupStudioComponent, isStandalone: true, selector: "gio-policy-group-studio", inputs: { policies: ["policies", "policies", (policies) => policies ?? []], readOnly: "readOnly", apiType: "apiType", executionPhase: "executionPhase", policySchemaFetcher: "policySchemaFetcher", policyDocumentationFetcher: "policyDocumentationFetcher", policyGroup: "policyGroup" }, outputs: { policyGroupChange: "policyGroupChange" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (!isLoading && policyGroupVM) {\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n [name]=\"policyGroupVM.name\"\n [description]=\"policyGroupVM.description\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"startConnector\"\n [endConnector]=\"endConnector\"\n [steps]=\"steps\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n [
|
|
2167
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioPolicyGroupStudioComponent, isStandalone: true, selector: "gio-policy-group-studio", inputs: { policies: ["policies", "policies", (policies) => policies ?? []], readOnly: "readOnly", apiType: "apiType", executionPhase: "executionPhase", flowPhase: "flowPhase", policySchemaFetcher: "policySchemaFetcher", policyDocumentationFetcher: "policyDocumentationFetcher", policyGroup: "policyGroup" }, outputs: { policyGroupChange: "policyGroupChange" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (!isLoading && policyGroupVM) {\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n [name]=\"policyGroupVM.name\"\n [description]=\"policyGroupVM.description\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"startConnector\"\n [endConnector]=\"endConnector\"\n [steps]=\"steps\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n [policyFlowPhase]=\"flowPhase\"\n (stepsChange)=\"onStepsChange($event)\"\n ></gio-ps-flow-details-phase>\n} @else {\n <gio-loader></gio-loader>\n}\n", styles: [""], dependencies: [{ kind: "component", type: GioPolicyStudioDetailsPhaseComponent, selector: "gio-ps-flow-details-phase", inputs: ["readOnly", "steps", "name", "description", "startConnector", "endConnector", "apiType", "genericPolicies", "policyFlowPhase", "trialUrl"], outputs: ["stepsChange"] }, { kind: "ngmodule", type: GioFormJsonSchemaModule }, { kind: "ngmodule", type: GioLoaderModule }, { kind: "component", type: i6$1.GioLoaderComponent, selector: "gio-loader" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2049
2168
|
}
|
|
2050
2169
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioPolicyGroupStudioComponent, decorators: [{
|
|
2051
2170
|
type: Component,
|
|
2052
|
-
args: [{ selector: 'gio-policy-group-studio', standalone: true, imports: [GioPolicyStudioDetailsPhaseComponent, GioFormJsonSchemaModule, GioLoaderModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (!isLoading && policyGroupVM) {\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n [name]=\"policyGroupVM.name\"\n [description]=\"policyGroupVM.description\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"startConnector\"\n [endConnector]=\"endConnector\"\n [steps]=\"steps\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n [
|
|
2171
|
+
args: [{ selector: 'gio-policy-group-studio', standalone: true, imports: [GioPolicyStudioDetailsPhaseComponent, GioFormJsonSchemaModule, GioLoaderModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (!isLoading && policyGroupVM) {\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n [name]=\"policyGroupVM.name\"\n [description]=\"policyGroupVM.description\"\n [readOnly]=\"readOnly\"\n [startConnector]=\"startConnector\"\n [endConnector]=\"endConnector\"\n [steps]=\"steps\"\n [apiType]=\"apiType\"\n [genericPolicies]=\"genericPolicies\"\n [trialUrl]=\"trialUrl\"\n [policyFlowPhase]=\"flowPhase\"\n (stepsChange)=\"onStepsChange($event)\"\n ></gio-ps-flow-details-phase>\n} @else {\n <gio-loader></gio-loader>\n}\n" }]
|
|
2053
2172
|
}], ctorParameters: () => [{ type: GioPolicyStudioService }], propDecorators: { policies: [{
|
|
2054
2173
|
type: Input,
|
|
2055
2174
|
args: [{
|
|
@@ -2063,6 +2182,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
2063
2182
|
}], executionPhase: [{
|
|
2064
2183
|
type: Input,
|
|
2065
2184
|
args: [{ required: true }]
|
|
2185
|
+
}], flowPhase: [{
|
|
2186
|
+
type: Input,
|
|
2187
|
+
args: [{ required: true }]
|
|
2066
2188
|
}], policySchemaFetcher: [{
|
|
2067
2189
|
type: Input,
|
|
2068
2190
|
args: [{ required: true }]
|
|
@@ -2098,5 +2220,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
2098
2220
|
* Generated bundle index. Do not edit.
|
|
2099
2221
|
*/
|
|
2100
2222
|
|
|
2101
|
-
export { GioPolicyGroupStudioComponent, GioPolicyStudioComponent, HttpMethods, isPolicy, isSharedPolicyGroupPolicy, toGenericPolicies, toHttpMethod, toPolicy };
|
|
2223
|
+
export { GioPolicyGroupStudioComponent, GioPolicyStudioComponent, HttpMethods, fromExecutionPhase, fromPolicyInput, isPolicy, isSharedPolicyGroupPolicy, toGenericPolicies, toHttpMethod, toPolicy };
|
|
2102
2224
|
//# sourceMappingURL=gravitee-ui-policy-studio-angular.mjs.map
|