@gravitee/ui-policy-studio-angular 7.4.0 → 7.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/esm2020/lib/components/flow-form-dialog/gio-ps-flow-form-dialog.component.mjs +5 -2
- package/esm2020/lib/components/flows-menu/gio-ps-flows-menu.component.mjs +3 -3
- package/esm2020/lib/gio-policy-studio.component.mjs +51 -8
- package/esm2020/lib/gio-policy-studio.model.mjs +1 -1
- package/esm2020/lib/models/index.mjs +2 -2
- package/fesm2015/gravitee-ui-policy-studio-angular.mjs +55 -10
- package/fesm2015/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-policy-studio-angular.mjs +55 -9
- package/fesm2020/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/lib/gio-policy-studio.component.d.ts +12 -2
- package/lib/gio-policy-studio.model.d.ts +2 -1
- package/lib/models/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ import * as i5 from '@angular/material/select';
|
|
|
17
17
|
import { MatSelectModule } from '@angular/material/select';
|
|
18
18
|
import * as i8 from '@angular/forms';
|
|
19
19
|
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
20
|
-
import { cloneDeep, uniqueId, capitalize, flatten } from 'lodash';
|
|
20
|
+
import { cloneDeep, uniqueId, capitalize, flatten, omit } from 'lodash';
|
|
21
21
|
import * as i3 from '@angular/material/icon';
|
|
22
22
|
import * as i6 from '@angular/material/core';
|
|
23
23
|
import { tap } from 'rxjs/operators';
|
|
@@ -145,7 +145,7 @@ class GioPolicyStudioFlowFormDialogComponent {
|
|
|
145
145
|
const conditionSelector = flowDialogData?.flow?.selectors?.find(s => s.type === 'CONDITION');
|
|
146
146
|
this.flowFormGroup = new FormGroup({
|
|
147
147
|
name: new FormControl(flowDialogData?.flow?.name ?? ''),
|
|
148
|
-
channelOperator: new FormControl(channelSelector?.channelOperator ?? ''),
|
|
148
|
+
channelOperator: new FormControl(channelSelector?.channelOperator ?? 'EQUALS'),
|
|
149
149
|
channel: new FormControl(channelSelector?.channel ?? ''),
|
|
150
150
|
operations: new FormControl(channelSelector?.operations ?? []),
|
|
151
151
|
entrypoints: new FormControl(channelSelector?.entrypoints ?? []),
|
|
@@ -172,6 +172,9 @@ class GioPolicyStudioFlowFormDialogComponent {
|
|
|
172
172
|
_id: uniqueId('flow_'),
|
|
173
173
|
// If existing flow, keep root props
|
|
174
174
|
...this.existingFlow,
|
|
175
|
+
// Mark as changed
|
|
176
|
+
_hasChanged: true,
|
|
177
|
+
// Add changes
|
|
175
178
|
name: this.flowFormGroup?.get('name')?.value,
|
|
176
179
|
selectors: conditionSelectorToSave ? [chanelSelectorToSave, conditionSelectorToSave] : [chanelSelectorToSave],
|
|
177
180
|
enabled: true,
|
|
@@ -364,10 +367,10 @@ class GioPolicyStudioFlowsMenuComponent {
|
|
|
364
367
|
}
|
|
365
368
|
}
|
|
366
369
|
GioPolicyStudioFlowsMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioFlowsMenuComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
367
|
-
GioPolicyStudioFlowsMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioFlowsMenuComponent, selector: "gio-ps-flows-menu", inputs: { flowsGroups: "flowsGroups", selectedFlow: "selectedFlow", entrypoints: "entrypoints" }, outputs: { selectedFlowChange: "selectedFlowChange", flowsGroupsChange: "flowsGroupsChange" }, 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 <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div *ngFor=\"let flowsGroup of flowsGroupsVMSelected\" class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">\n <mat-icon *ngIf=\"flowsGroup.
|
|
370
|
+
GioPolicyStudioFlowsMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioFlowsMenuComponent, selector: "gio-ps-flows-menu", inputs: { flowsGroups: "flowsGroups", selectedFlow: "selectedFlow", entrypoints: "entrypoints" }, outputs: { selectedFlowChange: "selectedFlowChange", flowsGroupsChange: "flowsGroupsChange" }, 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 <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div *ngFor=\"let flowsGroup of flowsGroupsVMSelected\" class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">\n <mat-icon *ngIf=\"flowsGroup._icon\" [svgIcon]=\"flowsGroup._icon\"></mat-icon>\n <span>{{ flowsGroup.name }}</span>\n </div>\n <div class=\"list__flowsGroup__header__addBtn\">\n <button mat-icon-button (click)=\"onAddFlow(flowsGroup)\"><mat-icon svgIcon=\"gio:plus\" matTooltip=\"New flow\"></mat-icon></button>\n </div>\n </div>\n\n <div\n *ngFor=\"let flow of flowsGroup.flows\"\n class=\"list__flowsGroup__flow\"\n [class.selected]=\"flow.selected\"\n (click)=\"selectFlow(flow)\"\n (mouseout)=\"flow.mouseOver = false\"\n (mouseover)=\"flow.mouseOver = true\"\n >\n <div *ngIf=\"flow.name\" class=\"list__flowsGroup__flow__name\" [attr.title]=\"flow.name\">\n {{ flow.name }}\n </div>\n <div class=\"list__flowsGroup__flow__infos\">\n <div class=\"list__flowsGroup__flow__infos__badges\">\n <span *ngFor=\"let badge of flow.badges\" class=\"list__flowsGroup__flow__infos__badges__badge\" [ngClass]=\"badge.class\">{{\n badge.label\n }}</span>\n </div>\n <div class=\"list__flowsGroup__flow__infos__pathOrChannelLabel\">{{ flow.pathOrChannelLabel }}</div>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:flex;max-height:100%;flex-direction:column;padding-top:16px}.header{display:flex;align-items:center;padding:0 16px;margin-bottom:16px}.header__label{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;margin-bottom:0;gap:8px}.header__configBtn{margin-left:8px}.list{padding:0 16px;overflow-y:overlay}.list__flowsGroup{display:flex;flex-direction:column;padding-bottom:8px;gap:8px}.list__flowsGroup__header{display:flex;align-items:center;padding:8px 8px 8px 10px;border-radius:8px;background-color:#cdc5f7}.list__flowsGroup__header__label{font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;gap:8px}.list__flowsGroup__header__label>mat-icon{width:22px;height:22px;flex:0 0 auto}.list__flowsGroup__header__label>span{display:-webkit-box;overflow:hidden;flex:1 1 auto;-webkit-box-orient:vertical;-webkit-line-clamp:2}.list__flowsGroup__header__addBtn{margin-left:8px}.list__flowsGroup__flow{display:flex;height:68px;flex-direction:column;justify-content:center;padding:7px;border:1px solid #d3d5dc;border-radius:8px;gap:8px}.list__flowsGroup__flow:hover,.list__flowsGroup__flow.selected{padding:6px;border:2px solid #876fec;cursor:pointer}.list__flowsGroup__flow__name{overflow:hidden;padding-left:4px;text-overflow:ellipsis;white-space:nowrap}.list__flowsGroup__flow__infos{display:flex;align-items:center}.list__flowsGroup__flow__infos__badges{flex:0 0 auto}.list__flowsGroup__flow__infos__badges__badge{width:auto}.list__flowsGroup__flow__infos__pathOrChannelLabel{flex:1 1 auto}\n"], components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
368
371
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioFlowsMenuComponent, decorators: [{
|
|
369
372
|
type: Component,
|
|
370
|
-
args: [{ selector: 'gio-ps-flows-menu', 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 <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div *ngFor=\"let flowsGroup of flowsGroupsVMSelected\" class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">\n <mat-icon *ngIf=\"flowsGroup.
|
|
373
|
+
args: [{ selector: 'gio-ps-flows-menu', 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 <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div *ngFor=\"let flowsGroup of flowsGroupsVMSelected\" class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">\n <mat-icon *ngIf=\"flowsGroup._icon\" [svgIcon]=\"flowsGroup._icon\"></mat-icon>\n <span>{{ flowsGroup.name }}</span>\n </div>\n <div class=\"list__flowsGroup__header__addBtn\">\n <button mat-icon-button (click)=\"onAddFlow(flowsGroup)\"><mat-icon svgIcon=\"gio:plus\" matTooltip=\"New flow\"></mat-icon></button>\n </div>\n </div>\n\n <div\n *ngFor=\"let flow of flowsGroup.flows\"\n class=\"list__flowsGroup__flow\"\n [class.selected]=\"flow.selected\"\n (click)=\"selectFlow(flow)\"\n (mouseout)=\"flow.mouseOver = false\"\n (mouseover)=\"flow.mouseOver = true\"\n >\n <div *ngIf=\"flow.name\" class=\"list__flowsGroup__flow__name\" [attr.title]=\"flow.name\">\n {{ flow.name }}\n </div>\n <div class=\"list__flowsGroup__flow__infos\">\n <div class=\"list__flowsGroup__flow__infos__badges\">\n <span *ngFor=\"let badge of flow.badges\" class=\"list__flowsGroup__flow__infos__badges__badge\" [ngClass]=\"badge.class\">{{\n badge.label\n }}</span>\n </div>\n <div class=\"list__flowsGroup__flow__infos__pathOrChannelLabel\">{{ flow.pathOrChannelLabel }}</div>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:flex;max-height:100%;flex-direction:column;padding-top:16px}.header{display:flex;align-items:center;padding:0 16px;margin-bottom:16px}.header__label{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;margin-bottom:0;gap:8px}.header__configBtn{margin-left:8px}.list{padding:0 16px;overflow-y:overlay}.list__flowsGroup{display:flex;flex-direction:column;padding-bottom:8px;gap:8px}.list__flowsGroup__header{display:flex;align-items:center;padding:8px 8px 8px 10px;border-radius:8px;background-color:#cdc5f7}.list__flowsGroup__header__label{font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;gap:8px}.list__flowsGroup__header__label>mat-icon{width:22px;height:22px;flex:0 0 auto}.list__flowsGroup__header__label>span{display:-webkit-box;overflow:hidden;flex:1 1 auto;-webkit-box-orient:vertical;-webkit-line-clamp:2}.list__flowsGroup__header__addBtn{margin-left:8px}.list__flowsGroup__flow{display:flex;height:68px;flex-direction:column;justify-content:center;padding:7px;border:1px solid #d3d5dc;border-radius:8px;gap:8px}.list__flowsGroup__flow:hover,.list__flowsGroup__flow.selected{padding:6px;border:2px solid #876fec;cursor:pointer}.list__flowsGroup__flow__name{overflow:hidden;padding-left:4px;text-overflow:ellipsis;white-space:nowrap}.list__flowsGroup__flow__infos{display:flex;align-items:center}.list__flowsGroup__flow__infos__badges{flex:0 0 auto}.list__flowsGroup__flow__infos__badges__badge{width:auto}.list__flowsGroup__flow__infos__pathOrChannelLabel{flex:1 1 auto}\n"] }]
|
|
371
374
|
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { flowsGroups: [{
|
|
372
375
|
type: Input
|
|
373
376
|
}], selectedFlow: [{
|
|
@@ -407,10 +410,19 @@ class GioPolicyStudioComponent {
|
|
|
407
410
|
this.endpointsInfo = [];
|
|
408
411
|
this.commonFlows = [];
|
|
409
412
|
this.plans = [];
|
|
413
|
+
/**
|
|
414
|
+
* Return common flows if they have been updated.
|
|
415
|
+
*/
|
|
416
|
+
this.commonFlowsChange = new EventEmitter();
|
|
417
|
+
/**
|
|
418
|
+
* Return the list of plans with updated flows. Plans with no updated flows are not returned.
|
|
419
|
+
**/
|
|
420
|
+
this.plansToUpdate = new EventEmitter();
|
|
410
421
|
this.connectorsTooltip = '';
|
|
411
422
|
this.selectedFlow = undefined;
|
|
412
423
|
this.flowsGroups = [];
|
|
413
424
|
this.entrypointsType = [];
|
|
425
|
+
this.disableSaveButton = true;
|
|
414
426
|
}
|
|
415
427
|
ngOnChanges(changes) {
|
|
416
428
|
if (changes.entrypointsInfo || changes.endpointsInfo) {
|
|
@@ -420,6 +432,7 @@ class GioPolicyStudioComponent {
|
|
|
420
432
|
this.entrypointsType = (this.entrypointsInfo ?? []).map(e => e.type);
|
|
421
433
|
}
|
|
422
434
|
if (changes.commonFlows || changes.plans) {
|
|
435
|
+
this.disableSaveButton = true;
|
|
423
436
|
this.flowsGroups = getFlowsGroups(this.commonFlows, this.plans);
|
|
424
437
|
// Select first flow by default on first load
|
|
425
438
|
if (changes.commonFlows?.isFirstChange() || changes.plans?.isFirstChange()) {
|
|
@@ -429,6 +442,7 @@ class GioPolicyStudioComponent {
|
|
|
429
442
|
}
|
|
430
443
|
onFlowsGroupsChange(flowsGroups) {
|
|
431
444
|
this.flowsGroups = flowsGroups;
|
|
445
|
+
this.disableSaveButton = false;
|
|
432
446
|
}
|
|
433
447
|
onSelectedFlowChange(flow) {
|
|
434
448
|
this.flowsGroups = this.flowsGroups.map(flowGroup => ({
|
|
@@ -436,6 +450,7 @@ class GioPolicyStudioComponent {
|
|
|
436
450
|
flows: flowGroup.flows.map(f => (f._id === flow._id ? flow : f)),
|
|
437
451
|
}));
|
|
438
452
|
this.selectedFlow = flow;
|
|
453
|
+
this.disableSaveButton = false;
|
|
439
454
|
}
|
|
440
455
|
onDeleteSelectedFlow(flow) {
|
|
441
456
|
// Define next selected flow and remove flow from flowsGroups
|
|
@@ -449,13 +464,26 @@ class GioPolicyStudioComponent {
|
|
|
449
464
|
this.selectedFlow = this.flowsGroups
|
|
450
465
|
.find(flowGroup => flowGroup.flows.some(f => f._id === nextSelectedFlow))
|
|
451
466
|
?.flows.find(f => f._id === nextSelectedFlow);
|
|
467
|
+
this.disableSaveButton = false;
|
|
468
|
+
}
|
|
469
|
+
onSave() {
|
|
470
|
+
// Emit common flows only if they have been updated
|
|
471
|
+
const commonFlows = getCommonFlowsOutput(this.flowsGroups);
|
|
472
|
+
if (commonFlows != null) {
|
|
473
|
+
this.commonFlowsChange.emit(commonFlows);
|
|
474
|
+
}
|
|
475
|
+
// Emit plans only if they have been updated
|
|
476
|
+
const plans = getPlansChangeOutput(this.flowsGroups);
|
|
477
|
+
if (plans != null) {
|
|
478
|
+
this.plansToUpdate.emit(plans);
|
|
479
|
+
}
|
|
452
480
|
}
|
|
453
481
|
}
|
|
454
482
|
GioPolicyStudioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
455
|
-
GioPolicyStudioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioComponent, selector: "gio-policy-studio", inputs: { apiType: "apiType", entrypointsInfo: "entrypointsInfo", endpointsInfo: "endpointsInfo", commonFlows: "commonFlows", plans: "plans" }, 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\">\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\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu\n [flowsGroups]=\"flowsGroups\"\n [entrypoints]=\"entrypointsType\"\n (flowsGroupsChange)=\"onFlowsGroupsChange($event)\"\n [(selectedFlow)]=\"selectedFlow\"\n ></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details\n [flow]=\"selectedFlow\"\n [entrypoints]=\"entrypointsType\"\n (flowChange)=\"onSelectedFlowChange($event)\"\n (deleteFlow)=\"onDeleteSelectedFlow($event)\"\n ></gio-ps-flow-details>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column;padding:8px;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{max-width:400px;flex:0 1 400px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__flowDetails{flex:1 1 auto;padding:16px;border:1px solid #d3d5dc;border-radius:8px}\n"], components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: GioPolicyStudioFlowsMenuComponent, selector: "gio-ps-flows-menu", inputs: ["flowsGroups", "selectedFlow", "entrypoints"], outputs: ["selectedFlowChange", "flowsGroupsChange"] }, { type: GioPolicyStudioDetailsComponent, selector: "gio-ps-flow-details", inputs: ["flow", "entrypoints"], outputs: ["flowChange", "deleteFlow"] }], directives: [{ type: i4$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "titlecase": i5$1.TitleCasePipe } });
|
|
483
|
+
GioPolicyStudioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioComponent, selector: "gio-policy-studio", inputs: { apiType: "apiType", entrypointsInfo: "entrypointsInfo", endpointsInfo: "endpointsInfo", commonFlows: "commonFlows", plans: "plans" }, outputs: { commonFlowsChange: "commonFlowsChange", plansToUpdate: "plansToUpdate" }, 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\">\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\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\" [disabled]=\"disableSaveButton\" (click)=\"onSave()\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu\n [flowsGroups]=\"flowsGroups\"\n [entrypoints]=\"entrypointsType\"\n (flowsGroupsChange)=\"onFlowsGroupsChange($event)\"\n [(selectedFlow)]=\"selectedFlow\"\n ></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details\n [flow]=\"selectedFlow\"\n [entrypoints]=\"entrypointsType\"\n (flowChange)=\"onSelectedFlowChange($event)\"\n (deleteFlow)=\"onDeleteSelectedFlow($event)\"\n ></gio-ps-flow-details>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column;padding:8px;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{max-width:400px;flex:0 1 400px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__flowDetails{flex:1 1 auto;padding:16px;border:1px solid #d3d5dc;border-radius:8px}\n"], components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: GioPolicyStudioFlowsMenuComponent, selector: "gio-ps-flows-menu", inputs: ["flowsGroups", "selectedFlow", "entrypoints"], outputs: ["selectedFlowChange", "flowsGroupsChange"] }, { type: GioPolicyStudioDetailsComponent, selector: "gio-ps-flow-details", inputs: ["flow", "entrypoints"], outputs: ["flowChange", "deleteFlow"] }], directives: [{ type: i4$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "titlecase": i5$1.TitleCasePipe } });
|
|
456
484
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioComponent, decorators: [{
|
|
457
485
|
type: Component,
|
|
458
|
-
args: [{ selector: 'gio-policy-studio', 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\">\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\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu\n [flowsGroups]=\"flowsGroups\"\n [entrypoints]=\"entrypointsType\"\n (flowsGroupsChange)=\"onFlowsGroupsChange($event)\"\n [(selectedFlow)]=\"selectedFlow\"\n ></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details\n [flow]=\"selectedFlow\"\n [entrypoints]=\"entrypointsType\"\n (flowChange)=\"onSelectedFlowChange($event)\"\n (deleteFlow)=\"onDeleteSelectedFlow($event)\"\n ></gio-ps-flow-details>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column;padding:8px;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{max-width:400px;flex:0 1 400px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__flowDetails{flex:1 1 auto;padding:16px;border:1px solid #d3d5dc;border-radius:8px}\n"] }]
|
|
486
|
+
args: [{ selector: 'gio-policy-studio', 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\">\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\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\" [disabled]=\"disableSaveButton\" (click)=\"onSave()\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu\n [flowsGroups]=\"flowsGroups\"\n [entrypoints]=\"entrypointsType\"\n (flowsGroupsChange)=\"onFlowsGroupsChange($event)\"\n [(selectedFlow)]=\"selectedFlow\"\n ></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details\n [flow]=\"selectedFlow\"\n [entrypoints]=\"entrypointsType\"\n (flowChange)=\"onSelectedFlowChange($event)\"\n (deleteFlow)=\"onDeleteSelectedFlow($event)\"\n ></gio-ps-flow-details>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column;padding:8px;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{max-width:400px;flex:0 1 400px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__flowDetails{flex:1 1 auto;padding:16px;border:1px solid #d3d5dc;border-radius:8px}\n"] }]
|
|
459
487
|
}], propDecorators: { apiType: [{
|
|
460
488
|
type: Input
|
|
461
489
|
}], entrypointsInfo: [{
|
|
@@ -466,23 +494,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
466
494
|
type: Input
|
|
467
495
|
}], plans: [{
|
|
468
496
|
type: Input
|
|
497
|
+
}], commonFlowsChange: [{
|
|
498
|
+
type: Output
|
|
499
|
+
}], plansToUpdate: [{
|
|
500
|
+
type: Output
|
|
469
501
|
}] } });
|
|
470
502
|
const getFlowsGroups = (commonFlows = [], plans = []) => {
|
|
471
503
|
const commFlowsGroup = {
|
|
472
504
|
_id: 'flowsGroup_commonFlow',
|
|
473
505
|
name: 'Common flows',
|
|
474
|
-
flows: commonFlows.map(flow => ({ ...flow, _id: uniqueId('flow_') })),
|
|
506
|
+
flows: commonFlows.map(flow => ({ ...flow, _id: uniqueId('flow_'), _hasChanged: false })),
|
|
475
507
|
};
|
|
476
508
|
return [
|
|
477
509
|
...plans.map(plan => ({
|
|
478
510
|
_id: uniqueId('flowsGroup_'),
|
|
511
|
+
_icon: 'gio:shield',
|
|
479
512
|
name: plan.name,
|
|
480
|
-
|
|
481
|
-
flows: plan.flows.map(flow => ({ ...flow, _id: uniqueId('flow_') })),
|
|
513
|
+
flows: plan.flows.map(flow => ({ ...flow, _id: uniqueId('flow_'), _hasChanged: false })),
|
|
482
514
|
})),
|
|
483
515
|
commFlowsGroup,
|
|
484
516
|
];
|
|
485
517
|
};
|
|
518
|
+
const getCommonFlowsOutput = (flowsGroups) => {
|
|
519
|
+
const commonFlowsGroup = flowsGroups.find(flowGroup => flowGroup._id === 'flowsGroup_commonFlow');
|
|
520
|
+
const hasChanged = commonFlowsGroup?.flows.some(flow => flow._hasChanged);
|
|
521
|
+
return hasChanged ? (commonFlowsGroup?.flows ?? []).map(flow => omit(flow, '_id', '_hasChanged')) : null;
|
|
522
|
+
};
|
|
523
|
+
const getPlansChangeOutput = (flowsGroups) => {
|
|
524
|
+
const plans = flowsGroups.filter(flowGroup => flowGroup._id !== 'flowsGroup_commonFlow');
|
|
525
|
+
const plansWithChangedFlows = plans.filter(plan => plan.flows.some(flow => flow._hasChanged));
|
|
526
|
+
const plansWithChangedFlowsOutput = plansWithChangedFlows.map(plan => ({
|
|
527
|
+
...omit(plan, '_id', '_icon'),
|
|
528
|
+
flows: plan.flows.map(flow => omit(flow, '_id', '_hasChanged')),
|
|
529
|
+
}));
|
|
530
|
+
return plansWithChangedFlowsOutput.length > 0 ? plansWithChangedFlowsOutput : null;
|
|
531
|
+
};
|
|
486
532
|
|
|
487
533
|
/*
|
|
488
534
|
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gravitee-ui-policy-studio-angular.mjs","sources":["../../../projects/ui-policy-studio-angular/src/lib/models/flow/FlowExecution.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/HttpMethod.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/Plan.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/index.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/gio-ps-flow-form-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/gio-ps-flow-form-dialog.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details/gio-ps-flow-details.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details/gio-ps-flow-details.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flows-menu/gio-ps-flows-menu.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flows-menu/gio-ps-flows-menu.component.html","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.component.ts","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.component.html","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.module.ts","../../../projects/ui-policy-studio-angular/src/public-api.ts","../../../projects/ui-policy-studio-angular/src/gravitee-ui-policy-studio-angular.ts"],"sourcesContent":["/*\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 * API's flow mode.\n */\nexport type FlowMode = 'BEST_MATCH' | 'DEFAULT';\n\nexport interface FlowExecution {\n mode?: FlowMode;\n /**\n * Is the flow execution match required.\n */\n matchRequired?: boolean;\n}\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\nexport type HttpMethod = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE' | 'OTHER';\n","/*\n * Copyright (C) 2022 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 */\nexport * from './ApiType';\nexport * from './Flow';\nexport * from './FlowExecution';\nexport * from './HttpMethod';\nexport * from './Selector';\nexport * from './Step';\n","/*\n * Copyright (C) 2022 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\nimport { Flow } from '../flow';\n\nexport interface Plan {\n name: string;\n flows: Flow[];\n}\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 */\nexport * from './Plan';\n","/*\n * Copyright (C) 2022 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 */\nexport * from './flow';\nexport * from './ConnectorsInfo';\nexport * from './plan';\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 */\nimport { Component, Inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { cloneDeep, uniqueId } from 'lodash';\n\nimport { FlowVM } from '../../gio-policy-studio.model';\nimport { ChannelSelector, ConditionSelector } from '../../models';\n\nexport type GioPolicyStudioFlowFormDialogData = {\n flow?: FlowVM;\n entrypoints?: string[];\n};\n\nexport type GioPolicyStudioFlowFormDialogResult = FlowVM | false;\n\n@Component({\n selector: 'gio-ps-flow-form-dialog',\n templateUrl: './gio-ps-flow-form-dialog.component.html',\n styleUrls: ['./gio-ps-flow-form-dialog.component.scss'],\n})\nexport class GioPolicyStudioFlowFormDialogComponent {\n public entrypoints: string[] = [];\n public flowFormGroup?: FormGroup;\n\n public existingFlow?: FlowVM;\n public mode: 'create' | 'edit' = 'create';\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioFlowFormDialogComponent, GioPolicyStudioFlowFormDialogResult>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioFlowFormDialogData,\n ) {\n this.entrypoints = flowDialogData?.entrypoints ?? [];\n\n this.existingFlow = cloneDeep(flowDialogData?.flow);\n this.mode = this.existingFlow ? 'edit' : 'create';\n\n const channelSelector = flowDialogData?.flow?.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector;\n const conditionSelector = flowDialogData?.flow?.selectors?.find(s => s.type === 'CONDITION') as ConditionSelector;\n\n this.flowFormGroup = new FormGroup({\n name: new FormControl(flowDialogData?.flow?.name ?? ''),\n channelOperator: new FormControl(channelSelector?.channelOperator ?? ''),\n channel: new FormControl(channelSelector?.channel ?? ''),\n operations: new FormControl(channelSelector?.operations ?? []),\n entrypoints: new FormControl(channelSelector?.entrypoints ?? []),\n condition: new FormControl(conditionSelector?.condition ?? ''),\n });\n }\n\n public onSubmit(): void {\n const chanelSelectorToSave: ChannelSelector = {\n type: 'CHANNEL',\n channel: this.flowFormGroup?.get('channel')?.value,\n channelOperator: this.flowFormGroup?.get('channelOperator')?.value,\n operations: this.flowFormGroup?.get('operations')?.value,\n entrypoints: this.flowFormGroup?.get('entrypoints')?.value,\n };\n\n const conditionValue: string = this.flowFormGroup?.get('condition')?.value;\n const conditionSelectorToSave: ConditionSelector | undefined = conditionValue\n ? {\n type: 'CONDITION',\n condition: conditionValue,\n }\n : undefined;\n\n const flowToSave: FlowVM = {\n // New id for new flow\n _id: uniqueId('flow_'),\n // If existing flow, keep root props\n ...this.existingFlow,\n name: this.flowFormGroup?.get('name')?.value,\n selectors: conditionSelectorToSave ? [chanelSelectorToSave, conditionSelectorToSave] : [chanelSelectorToSave],\n enabled: true,\n };\n\n this.dialogRef.close({\n ...flowToSave,\n });\n }\n}\n","<!--\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 {{ mode === 'create' ? 'Create a new flow' : 'Edit flow' }}\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"false\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<mat-dialog-content *ngIf=\"flowFormGroup\" class=\"content\" [formGroup]=\"flowFormGroup\">\n <p>Flows allow you to apply different policies per event phases. For example you can reroute calls based on the URL specified.</p>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Flow name</mat-label>\n <input matInput formControlName=\"name\" cdkFocusInitial />\n <mat-hint>Names will be automatically generated with channel and operation if left blank</mat-hint>\n </mat-form-field>\n </div>\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n <mat-select formControlName=\"channelOperator\">\n <mat-option value=\"EQUALS\">Equals</mat-option>\n <mat-option value=\"STARTS_WITH\">Starts with</mat-option>\n </mat-select>\n <mat-hint>Channel operator</mat-hint>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Channel</mat-label>\n <input matInput formControlName=\"channel\" />\n <mat-hint>Publish or Subscribe channel. This is the path of your request.</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Entrypoints</mat-label>\n <mat-select multiple formControlName=\"entrypoints\">\n <mat-option *ngFor=\"let entrypoint of entrypoints\" [value]=\"entrypoint\">{{ entrypoint }}</mat-option>\n </mat-select>\n <mat-hint>Entrypoints where your flow will be executed</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Entrypoints supported operations</mat-label>\n <mat-select multiple formControlName=\"operations\">\n <mat-option value=\"PUBLISH\">Publish</mat-option>\n <mat-option value=\"SUBSCRIBE\">Subscribe</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Condition</mat-label>\n <input matInput formControlName=\"condition\" />\n <mat-hint>Condition to execute the flow, supports Expression Language</mat-hint>\n </mat-form-field>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"false\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-stroked-button role=\"dialog\" (click)=\"onSubmit()\">\n {{ mode === 'create' ? 'Create' : 'Save' }}\n </button>\n</mat-dialog-actions>\n","/*\n * Copyright (C) 2022 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 */\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { tap } from 'rxjs/operators';\n\nimport { FlowVM } from '../../gio-policy-studio.model';\nimport {\n GioPolicyStudioFlowFormDialogComponent,\n GioPolicyStudioFlowFormDialogData,\n GioPolicyStudioFlowFormDialogResult,\n} from '../flow-form-dialog/gio-ps-flow-form-dialog.component';\n\n@Component({\n selector: 'gio-ps-flow-details',\n templateUrl: './gio-ps-flow-details.component.html',\n styleUrls: ['./gio-ps-flow-details.component.scss'],\n})\nexport class GioPolicyStudioDetailsComponent {\n @Input()\n public flow?: FlowVM = undefined;\n\n @Input()\n public entrypoints: string[] = [];\n\n @Output()\n public flowChange = new EventEmitter<FlowVM>();\n\n @Output()\n public deleteFlow = new EventEmitter<FlowVM>();\n\n constructor(private readonly matDialog: MatDialog) {}\n\n public onEditFlow(): void {\n this.matDialog\n .open<GioPolicyStudioFlowFormDialogComponent, GioPolicyStudioFlowFormDialogData, GioPolicyStudioFlowFormDialogResult>(\n GioPolicyStudioFlowFormDialogComponent,\n {\n data: {\n flow: this.flow,\n entrypoints: this.entrypoints,\n },\n role: 'alertdialog',\n id: 'gioPsFlowFormDialog',\n },\n )\n .afterClosed()\n .pipe(\n tap(createdOrEdited => {\n if (!createdOrEdited) {\n return;\n }\n\n this.flowChange.emit(createdOrEdited);\n }),\n )\n .subscribe();\n }\n\n public onDeleteFlow(): void {\n this.deleteFlow.emit(this.flow);\n }\n}\n","<!--\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<ng-container *ngIf=\"flow; else emptyFlows\">\n <div class=\"header\">\n <div class=\"header__label\">Flow details</div>\n <div class=\"header__configBtn\">\n <button class=\"header__configBtn__edit\" mat-stroked-button mat-icon-button (click)=\"onEditFlow()\">\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n </button>\n <button class=\"header__configBtn__delete\" mat-stroked-button mat-icon-button (click)=\"onDeleteFlow()\">\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n </button>\n </div>\n </div>\n\n <div class=\"content\">\n 🚧 Work in progress 🚧 <br />\n {{ flow | json }}\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","/*\n * Copyright (C) 2022 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 */\nimport { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { tap } from 'rxjs/operators';\nimport { cloneDeep } from 'lodash';\n\nimport {\n GioPolicyStudioFlowFormDialogComponent,\n GioPolicyStudioFlowFormDialogData,\n GioPolicyStudioFlowFormDialogResult,\n} from '../flow-form-dialog/gio-ps-flow-form-dialog.component';\nimport { FlowGroupVM, FlowVM } from '../../gio-policy-studio.model';\nimport { ChannelSelector, HttpSelector, Operation } from '../../models';\n\ninterface FlowGroupMenuVM extends FlowGroupVM {\n flows: FlowMenuVM[];\n}\n\ninterface FlowMenuVM extends FlowVM {\n selected: boolean;\n mouseOver: boolean;\n badges: {\n label: string;\n class: string;\n }[];\n pathOrChannelLabel: string;\n}\n\n@Component({\n selector: 'gio-ps-flows-menu',\n templateUrl: './gio-ps-flows-menu.component.html',\n styleUrls: ['./gio-ps-flows-menu.component.scss'],\n})\nexport class GioPolicyStudioFlowsMenuComponent implements OnChanges {\n @Input()\n public flowsGroups: FlowGroupVM[] = [];\n\n @Input()\n public selectedFlow?: FlowVM = undefined;\n\n @Input()\n public entrypoints: string[] = [];\n\n @Output()\n public selectedFlowChange = new EventEmitter<FlowVM>();\n\n @Output()\n public flowsGroupsChange = new EventEmitter<FlowGroupVM[]>();\n\n public flowsGroupsVMSelected: FlowGroupMenuVM[] = [];\n\n constructor(private readonly matDialog: MatDialog) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.flowsGroups || changes.selectedFlow) {\n this.flowsGroupsVMSelected = this.flowsGroups.map(flowGroup => {\n return {\n ...flowGroup,\n flows: flowGroup.flows.map(flow => {\n const badges: FlowMenuVM['badges'] = [];\n let pathOrChannelLabel = '';\n const channelSelector = flow.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector;\n if (channelSelector) {\n const operationToBadge: Record<Operation, string> = {\n PUBLISH: 'PUB',\n SUBSCRIBE: 'SUB',\n };\n const operationBadges = (channelSelector.operations ?? [])\n .map(operation => ({\n label: operationToBadge[operation],\n class: 'gio-badge-neutral',\n }))\n .sort((a, b) => a.label.localeCompare(b.label));\n operationBadges && badges.push(...operationBadges);\n pathOrChannelLabel = `${channelSelector.channel}${channelSelector.channelOperator === 'STARTS_WITH' ? '**' : ''}`;\n }\n\n const httpSelector = flow.selectors?.find(s => s.type === 'HTTP') as HttpSelector;\n if (httpSelector) {\n // Keep only 2 first http methods and add +X badge if there are more\n const httpMethodsToKeep = httpSelector.methods?.slice(0, 2);\n const httpMethodsLength = httpSelector.methods?.length;\n httpMethodsToKeep &&\n badges.push(...httpMethodsToKeep.map(method => ({ label: method, class: `gio-method-badge-${method.toLowerCase()}` })));\n if (httpMethodsLength && httpMethodsLength > 2) {\n badges?.push({\n label: `+${httpMethodsLength - 2}`,\n class: 'gio-badge-neutral',\n });\n }\n if (httpMethodsLength === 0) {\n badges?.push({\n label: 'ALL',\n class: 'gio-badge-neutral',\n });\n }\n\n pathOrChannelLabel = `${httpSelector.path}${httpSelector.pathOperator === 'STARTS_WITH' ? '/**' : ''}`;\n }\n\n return {\n ...flow,\n selected: this.selectedFlow?._id === flow._id,\n mouseOver: false,\n badges,\n pathOrChannelLabel,\n };\n }),\n };\n });\n }\n }\n\n public selectFlow(flow: FlowVM): void {\n this.selectedFlowChange.emit(flow);\n }\n\n public onAddFlow(flowGroup: FlowGroupVM): void {\n this.matDialog\n .open<GioPolicyStudioFlowFormDialogComponent, GioPolicyStudioFlowFormDialogData, GioPolicyStudioFlowFormDialogResult>(\n GioPolicyStudioFlowFormDialogComponent,\n {\n data: {\n flow: undefined,\n entrypoints: this.entrypoints,\n },\n role: 'alertdialog',\n id: 'gioPsFlowFormDialog',\n },\n )\n .afterClosed()\n .pipe(\n tap(createdOrEdited => {\n if (!createdOrEdited) {\n return;\n }\n const editedFlowsGroups = cloneDeep(this.flowsGroups);\n\n const flowsGroupToEdit = editedFlowsGroups.find(fg => fg._id === flowGroup._id);\n if (!flowsGroupToEdit) {\n throw new Error(`Flow group ${flowGroup._id} not found`);\n }\n flowsGroupToEdit.flows.push(createdOrEdited);\n\n this.flowsGroupsChange.emit(editedFlowsGroups);\n this.selectedFlowChange.emit(createdOrEdited);\n }),\n )\n .subscribe();\n }\n}\n","<!--\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 <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div *ngFor=\"let flowsGroup of flowsGroupsVMSelected\" class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">\n <mat-icon *ngIf=\"flowsGroup.icon\" [svgIcon]=\"flowsGroup.icon\"></mat-icon>\n <span>{{ flowsGroup.name }}</span>\n </div>\n <div class=\"list__flowsGroup__header__addBtn\">\n <button mat-icon-button (click)=\"onAddFlow(flowsGroup)\"><mat-icon svgIcon=\"gio:plus\" matTooltip=\"New flow\"></mat-icon></button>\n </div>\n </div>\n\n <div\n *ngFor=\"let flow of flowsGroup.flows\"\n class=\"list__flowsGroup__flow\"\n [class.selected]=\"flow.selected\"\n (click)=\"selectFlow(flow)\"\n (mouseout)=\"flow.mouseOver = false\"\n (mouseover)=\"flow.mouseOver = true\"\n >\n <div *ngIf=\"flow.name\" class=\"list__flowsGroup__flow__name\" [attr.title]=\"flow.name\">\n {{ flow.name }}\n </div>\n <div class=\"list__flowsGroup__flow__infos\">\n <div class=\"list__flowsGroup__flow__infos__badges\">\n <span *ngFor=\"let badge of flow.badges\" class=\"list__flowsGroup__flow__infos__badges__badge\" [ngClass]=\"badge.class\">{{\n badge.label\n }}</span>\n </div>\n <div class=\"list__flowsGroup__flow__infos__pathOrChannelLabel\">{{ flow.pathOrChannelLabel }}</div>\n </div>\n </div>\n </div>\n</div>\n","/*\n * Copyright (C) 2022 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 */\nimport { Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { capitalize, flatten, uniqueId } from 'lodash';\n\nimport { ApiType, ConnectorsInfo, Flow, Plan } from './models';\nimport { FlowGroupVM, FlowVM } from './gio-policy-studio.model';\n\n@Component({\n selector: 'gio-policy-studio',\n templateUrl: './gio-policy-studio.component.html',\n styleUrls: ['./gio-policy-studio.component.scss'],\n})\nexport class GioPolicyStudioComponent implements OnChanges {\n @Input()\n public apiType!: ApiType;\n\n /**\n * List of entrypoints to display\n */\n @Input()\n public entrypointsInfo: ConnectorsInfo[] = [];\n\n /**\n * List of endpoints to display\n */\n @Input()\n public endpointsInfo: ConnectorsInfo[] = [];\n\n @Input()\n public commonFlows: Flow[] = [];\n\n @Input()\n public plans: Plan[] = [];\n\n public connectorsTooltip = '';\n\n public selectedFlow?: FlowVM = undefined;\n\n public flowsGroups: FlowGroupVM[] = [];\n\n public entrypointsType: string[] = [];\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.entrypointsInfo || changes.endpointsInfo) {\n this.connectorsTooltip = `Entrypoints: ${(this.entrypointsInfo ?? []).map(e => capitalize(e.type)).join(', ')}\\nEndpoints: ${(\n this.endpointsInfo ?? []\n )\n .map(e => capitalize(e.type))\n .join(', ')}`;\n\n this.entrypointsType = (this.entrypointsInfo ?? []).map(e => e.type);\n }\n\n if (changes.commonFlows || changes.plans) {\n this.flowsGroups = getFlowsGroups(this.commonFlows, this.plans);\n\n // Select first flow by default on first load\n if (changes.commonFlows?.isFirstChange() || changes.plans?.isFirstChange()) {\n this.selectedFlow = this.flowsGroups[0].flows[0];\n }\n }\n }\n\n public onFlowsGroupsChange(flowsGroups: FlowGroupVM[]): void {\n this.flowsGroups = flowsGroups;\n }\n\n public onSelectedFlowChange(flow: FlowVM): void {\n this.flowsGroups = this.flowsGroups.map(flowGroup => ({\n ...flowGroup,\n flows: flowGroup.flows.map(f => (f._id === flow._id ? flow : f)),\n }));\n this.selectedFlow = flow;\n }\n\n public onDeleteSelectedFlow(flow: FlowVM): void {\n // Define next selected flow and remove flow from flowsGroups\n const allFLowsId = flatten(this.flowsGroups.map(flowGroup => flowGroup.flows)).map(f => f._id);\n const flowToDeleteIndex = allFLowsId.indexOf(flow._id);\n const nextSelectedFlow = allFLowsId[flowToDeleteIndex + 1] ?? allFLowsId[flowToDeleteIndex - 1];\n this.flowsGroups = this.flowsGroups.map(flowGroup => ({\n ...flowGroup,\n flows: flowGroup.flows.filter(f => f._id !== flow._id),\n }));\n this.selectedFlow = this.flowsGroups\n .find(flowGroup => flowGroup.flows.some(f => f._id === nextSelectedFlow))\n ?.flows.find(f => f._id === nextSelectedFlow);\n }\n}\n\nconst getFlowsGroups = (commonFlows: Flow[] = [], plans: Plan[] = []): FlowGroupVM[] => {\n const commFlowsGroup: FlowGroupVM = {\n _id: 'flowsGroup_commonFlow',\n name: 'Common flows',\n flows: commonFlows.map(flow => ({ ...flow, _id: uniqueId('flow_') })),\n };\n\n return [\n ...plans.map(plan => ({\n _id: uniqueId('flowsGroup_'),\n name: plan.name,\n icon: 'gio:shield',\n flows: plan.flows.map(flow => ({ ...flow, _id: uniqueId('flow_') })),\n })),\n commFlowsGroup,\n ];\n};\n","<!--\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\">\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\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu\n [flowsGroups]=\"flowsGroups\"\n [entrypoints]=\"entrypointsType\"\n (flowsGroupsChange)=\"onFlowsGroupsChange($event)\"\n [(selectedFlow)]=\"selectedFlow\"\n ></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details\n [flow]=\"selectedFlow\"\n [entrypoints]=\"entrypointsType\"\n (flowChange)=\"onSelectedFlowChange($event)\"\n (deleteFlow)=\"onDeleteSelectedFlow($event)\"\n ></gio-ps-flow-details>\n </div>\n</div>\n","/*\n * Copyright (C) 2022 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 */\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { GioIconsModule } from '@gravitee/ui-particles-angular';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { GioPolicyStudioFlowFormDialogComponent } from './components/flow-form-dialog/gio-ps-flow-form-dialog.component';\nimport { GioPolicyStudioDetailsComponent } from './components/flow-details/gio-ps-flow-details.component';\nimport { GioPolicyStudioFlowsMenuComponent } from './components/flows-menu/gio-ps-flows-menu.component';\nimport { GioPolicyStudioComponent } from './gio-policy-studio.component';\n\n@NgModule({\n declarations: [\n GioPolicyStudioComponent,\n GioPolicyStudioFlowsMenuComponent,\n GioPolicyStudioDetailsComponent,\n GioPolicyStudioFlowFormDialogComponent,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatButtonModule,\n MatTooltipModule,\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n MatDialogModule,\n\n GioIconsModule,\n ],\n exports: [GioPolicyStudioComponent],\n})\nexport class GioPolicyStudioModule {}\n","/*\n * Copyright (C) 2022 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 * Public API Surface of ui-policy-studio-angular\n */\nexport * from './lib/models';\nexport { GioPolicyStudioModule } from './lib/gio-policy-studio.module';\nexport { GioPolicyStudioComponent } from './lib/gio-policy-studio.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;MAmCa,sCAAsC;IAOjD,YACS,SAAoG,EAClF,cAAiD;QADnE,cAAS,GAAT,SAAS,CAA2F;QAPtG,gBAAW,GAAa,EAAE,CAAC;QAI3B,SAAI,GAAsB,QAAQ,CAAC;QAMxC,IAAI,CAAC,WAAW,GAAG,cAAc,EAAE,WAAW,IAAI,EAAE,CAAC;QAErD,IAAI,CAAC,YAAY,GAAG,SAAS,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ib/models/flow/FlowExecution.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/HttpMethod.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/Plan.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/index.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/gio-ps-flow-form-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/gio-ps-flow-form-dialog.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details/gio-ps-flow-details.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details/gio-ps-flow-details.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flows-menu/gio-ps-flows-menu.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flows-menu/gio-ps-flows-menu.component.html","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.component.ts","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.component.html","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.module.ts","../../../projects/ui-policy-studio-angular/src/public-api.ts","../../../projects/ui-policy-studio-angular/src/gravitee-ui-policy-studio-angular.ts"],"sourcesContent":["/*\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 * API's flow mode.\n */\nexport type FlowMode = 'BEST_MATCH' | 'DEFAULT';\n\nexport interface FlowExecution {\n mode?: FlowMode;\n /**\n * Is the flow execution match required.\n */\n matchRequired?: boolean;\n}\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\nexport type HttpMethod = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE' | 'OTHER';\n","/*\n * Copyright (C) 2022 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 */\nexport * from './ApiType';\nexport * from './Flow';\nexport * from './FlowExecution';\nexport * from './HttpMethod';\nexport * from './Selector';\nexport * from './Step';\n","/*\n * Copyright (C) 2022 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\nimport { Flow } from '../flow';\n\nexport interface Plan {\n name: string;\n flows: Flow[];\n}\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 */\nexport * from './Plan';\n","/*\n * Copyright (C) 2022 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 */\nexport * from './flow';\nexport * from './plan';\n\nexport * from './ConnectorsInfo';\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 */\nimport { Component, Inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { cloneDeep, uniqueId } from 'lodash';\n\nimport { FlowVM } from '../../gio-policy-studio.model';\nimport { ChannelSelector, ConditionSelector } from '../../models';\n\nexport type GioPolicyStudioFlowFormDialogData = {\n flow?: FlowVM;\n entrypoints?: string[];\n};\n\nexport type GioPolicyStudioFlowFormDialogResult = FlowVM | false;\n\n@Component({\n selector: 'gio-ps-flow-form-dialog',\n templateUrl: './gio-ps-flow-form-dialog.component.html',\n styleUrls: ['./gio-ps-flow-form-dialog.component.scss'],\n})\nexport class GioPolicyStudioFlowFormDialogComponent {\n public entrypoints: string[] = [];\n public flowFormGroup?: FormGroup;\n\n public existingFlow?: FlowVM;\n public mode: 'create' | 'edit' = 'create';\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioFlowFormDialogComponent, GioPolicyStudioFlowFormDialogResult>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioFlowFormDialogData,\n ) {\n this.entrypoints = flowDialogData?.entrypoints ?? [];\n\n this.existingFlow = cloneDeep(flowDialogData?.flow);\n this.mode = this.existingFlow ? 'edit' : 'create';\n\n const channelSelector = flowDialogData?.flow?.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector;\n const conditionSelector = flowDialogData?.flow?.selectors?.find(s => s.type === 'CONDITION') as ConditionSelector;\n\n this.flowFormGroup = new FormGroup({\n name: new FormControl(flowDialogData?.flow?.name ?? ''),\n channelOperator: new FormControl(channelSelector?.channelOperator ?? 'EQUALS'),\n channel: new FormControl(channelSelector?.channel ?? ''),\n operations: new FormControl(channelSelector?.operations ?? []),\n entrypoints: new FormControl(channelSelector?.entrypoints ?? []),\n condition: new FormControl(conditionSelector?.condition ?? ''),\n });\n }\n\n public onSubmit(): void {\n const chanelSelectorToSave: ChannelSelector = {\n type: 'CHANNEL',\n channel: this.flowFormGroup?.get('channel')?.value,\n channelOperator: this.flowFormGroup?.get('channelOperator')?.value,\n operations: this.flowFormGroup?.get('operations')?.value,\n entrypoints: this.flowFormGroup?.get('entrypoints')?.value,\n };\n\n const conditionValue: string = this.flowFormGroup?.get('condition')?.value;\n const conditionSelectorToSave: ConditionSelector | undefined = conditionValue\n ? {\n type: 'CONDITION',\n condition: conditionValue,\n }\n : undefined;\n\n const flowToSave: FlowVM = {\n // New id for new flow\n _id: uniqueId('flow_'),\n // If existing flow, keep root props\n ...this.existingFlow,\n // Mark as changed\n _hasChanged: true,\n // Add changes\n name: this.flowFormGroup?.get('name')?.value,\n selectors: conditionSelectorToSave ? [chanelSelectorToSave, conditionSelectorToSave] : [chanelSelectorToSave],\n enabled: true,\n };\n\n this.dialogRef.close({\n ...flowToSave,\n });\n }\n}\n","<!--\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 {{ mode === 'create' ? 'Create a new flow' : 'Edit flow' }}\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"false\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<mat-dialog-content *ngIf=\"flowFormGroup\" class=\"content\" [formGroup]=\"flowFormGroup\">\n <p>Flows allow you to apply different policies per event phases. For example you can reroute calls based on the URL specified.</p>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Flow name</mat-label>\n <input matInput formControlName=\"name\" cdkFocusInitial />\n <mat-hint>Names will be automatically generated with channel and operation if left blank</mat-hint>\n </mat-form-field>\n </div>\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n <mat-select formControlName=\"channelOperator\">\n <mat-option value=\"EQUALS\">Equals</mat-option>\n <mat-option value=\"STARTS_WITH\">Starts with</mat-option>\n </mat-select>\n <mat-hint>Channel operator</mat-hint>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Channel</mat-label>\n <input matInput formControlName=\"channel\" />\n <mat-hint>Publish or Subscribe channel. This is the path of your request.</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Entrypoints</mat-label>\n <mat-select multiple formControlName=\"entrypoints\">\n <mat-option *ngFor=\"let entrypoint of entrypoints\" [value]=\"entrypoint\">{{ entrypoint }}</mat-option>\n </mat-select>\n <mat-hint>Entrypoints where your flow will be executed</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Entrypoints supported operations</mat-label>\n <mat-select multiple formControlName=\"operations\">\n <mat-option value=\"PUBLISH\">Publish</mat-option>\n <mat-option value=\"SUBSCRIBE\">Subscribe</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Condition</mat-label>\n <input matInput formControlName=\"condition\" />\n <mat-hint>Condition to execute the flow, supports Expression Language</mat-hint>\n </mat-form-field>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"false\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-stroked-button role=\"dialog\" (click)=\"onSubmit()\">\n {{ mode === 'create' ? 'Create' : 'Save' }}\n </button>\n</mat-dialog-actions>\n","/*\n * Copyright (C) 2022 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 */\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { tap } from 'rxjs/operators';\n\nimport { FlowVM } from '../../gio-policy-studio.model';\nimport {\n GioPolicyStudioFlowFormDialogComponent,\n GioPolicyStudioFlowFormDialogData,\n GioPolicyStudioFlowFormDialogResult,\n} from '../flow-form-dialog/gio-ps-flow-form-dialog.component';\n\n@Component({\n selector: 'gio-ps-flow-details',\n templateUrl: './gio-ps-flow-details.component.html',\n styleUrls: ['./gio-ps-flow-details.component.scss'],\n})\nexport class GioPolicyStudioDetailsComponent {\n @Input()\n public flow?: FlowVM = undefined;\n\n @Input()\n public entrypoints: string[] = [];\n\n @Output()\n public flowChange = new EventEmitter<FlowVM>();\n\n @Output()\n public deleteFlow = new EventEmitter<FlowVM>();\n\n constructor(private readonly matDialog: MatDialog) {}\n\n public onEditFlow(): void {\n this.matDialog\n .open<GioPolicyStudioFlowFormDialogComponent, GioPolicyStudioFlowFormDialogData, GioPolicyStudioFlowFormDialogResult>(\n GioPolicyStudioFlowFormDialogComponent,\n {\n data: {\n flow: this.flow,\n entrypoints: this.entrypoints,\n },\n role: 'alertdialog',\n id: 'gioPsFlowFormDialog',\n },\n )\n .afterClosed()\n .pipe(\n tap(createdOrEdited => {\n if (!createdOrEdited) {\n return;\n }\n\n this.flowChange.emit(createdOrEdited);\n }),\n )\n .subscribe();\n }\n\n public onDeleteFlow(): void {\n this.deleteFlow.emit(this.flow);\n }\n}\n","<!--\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<ng-container *ngIf=\"flow; else emptyFlows\">\n <div class=\"header\">\n <div class=\"header__label\">Flow details</div>\n <div class=\"header__configBtn\">\n <button class=\"header__configBtn__edit\" mat-stroked-button mat-icon-button (click)=\"onEditFlow()\">\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n </button>\n <button class=\"header__configBtn__delete\" mat-stroked-button mat-icon-button (click)=\"onDeleteFlow()\">\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n </button>\n </div>\n </div>\n\n <div class=\"content\">\n 🚧 Work in progress 🚧 <br />\n {{ flow | json }}\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","/*\n * Copyright (C) 2022 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 */\nimport { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { tap } from 'rxjs/operators';\nimport { cloneDeep } from 'lodash';\n\nimport {\n GioPolicyStudioFlowFormDialogComponent,\n GioPolicyStudioFlowFormDialogData,\n GioPolicyStudioFlowFormDialogResult,\n} from '../flow-form-dialog/gio-ps-flow-form-dialog.component';\nimport { FlowGroupVM, FlowVM } from '../../gio-policy-studio.model';\nimport { ChannelSelector, HttpSelector, Operation } from '../../models';\n\ninterface FlowGroupMenuVM extends FlowGroupVM {\n flows: FlowMenuVM[];\n}\n\ninterface FlowMenuVM extends FlowVM {\n selected: boolean;\n mouseOver: boolean;\n badges: {\n label: string;\n class: string;\n }[];\n pathOrChannelLabel: string;\n}\n\n@Component({\n selector: 'gio-ps-flows-menu',\n templateUrl: './gio-ps-flows-menu.component.html',\n styleUrls: ['./gio-ps-flows-menu.component.scss'],\n})\nexport class GioPolicyStudioFlowsMenuComponent implements OnChanges {\n @Input()\n public flowsGroups: FlowGroupVM[] = [];\n\n @Input()\n public selectedFlow?: FlowVM = undefined;\n\n @Input()\n public entrypoints: string[] = [];\n\n @Output()\n public selectedFlowChange = new EventEmitter<FlowVM>();\n\n @Output()\n public flowsGroupsChange = new EventEmitter<FlowGroupVM[]>();\n\n public flowsGroupsVMSelected: FlowGroupMenuVM[] = [];\n\n constructor(private readonly matDialog: MatDialog) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.flowsGroups || changes.selectedFlow) {\n this.flowsGroupsVMSelected = this.flowsGroups.map(flowGroup => {\n return {\n ...flowGroup,\n flows: flowGroup.flows.map(flow => {\n const badges: FlowMenuVM['badges'] = [];\n let pathOrChannelLabel = '';\n const channelSelector = flow.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector;\n if (channelSelector) {\n const operationToBadge: Record<Operation, string> = {\n PUBLISH: 'PUB',\n SUBSCRIBE: 'SUB',\n };\n const operationBadges = (channelSelector.operations ?? [])\n .map(operation => ({\n label: operationToBadge[operation],\n class: 'gio-badge-neutral',\n }))\n .sort((a, b) => a.label.localeCompare(b.label));\n operationBadges && badges.push(...operationBadges);\n pathOrChannelLabel = `${channelSelector.channel}${channelSelector.channelOperator === 'STARTS_WITH' ? '**' : ''}`;\n }\n\n const httpSelector = flow.selectors?.find(s => s.type === 'HTTP') as HttpSelector;\n if (httpSelector) {\n // Keep only 2 first http methods and add +X badge if there are more\n const httpMethodsToKeep = httpSelector.methods?.slice(0, 2);\n const httpMethodsLength = httpSelector.methods?.length;\n httpMethodsToKeep &&\n badges.push(...httpMethodsToKeep.map(method => ({ label: method, class: `gio-method-badge-${method.toLowerCase()}` })));\n if (httpMethodsLength && httpMethodsLength > 2) {\n badges?.push({\n label: `+${httpMethodsLength - 2}`,\n class: 'gio-badge-neutral',\n });\n }\n if (httpMethodsLength === 0) {\n badges?.push({\n label: 'ALL',\n class: 'gio-badge-neutral',\n });\n }\n\n pathOrChannelLabel = `${httpSelector.path}${httpSelector.pathOperator === 'STARTS_WITH' ? '/**' : ''}`;\n }\n\n return {\n ...flow,\n selected: this.selectedFlow?._id === flow._id,\n mouseOver: false,\n badges,\n pathOrChannelLabel,\n };\n }),\n };\n });\n }\n }\n\n public selectFlow(flow: FlowVM): void {\n this.selectedFlowChange.emit(flow);\n }\n\n public onAddFlow(flowGroup: FlowGroupVM): void {\n this.matDialog\n .open<GioPolicyStudioFlowFormDialogComponent, GioPolicyStudioFlowFormDialogData, GioPolicyStudioFlowFormDialogResult>(\n GioPolicyStudioFlowFormDialogComponent,\n {\n data: {\n flow: undefined,\n entrypoints: this.entrypoints,\n },\n role: 'alertdialog',\n id: 'gioPsFlowFormDialog',\n },\n )\n .afterClosed()\n .pipe(\n tap(createdOrEdited => {\n if (!createdOrEdited) {\n return;\n }\n const editedFlowsGroups = cloneDeep(this.flowsGroups);\n\n const flowsGroupToEdit = editedFlowsGroups.find(fg => fg._id === flowGroup._id);\n if (!flowsGroupToEdit) {\n throw new Error(`Flow group ${flowGroup._id} not found`);\n }\n flowsGroupToEdit.flows.push(createdOrEdited);\n\n this.flowsGroupsChange.emit(editedFlowsGroups);\n this.selectedFlowChange.emit(createdOrEdited);\n }),\n )\n .subscribe();\n }\n}\n","<!--\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 <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div *ngFor=\"let flowsGroup of flowsGroupsVMSelected\" class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">\n <mat-icon *ngIf=\"flowsGroup._icon\" [svgIcon]=\"flowsGroup._icon\"></mat-icon>\n <span>{{ flowsGroup.name }}</span>\n </div>\n <div class=\"list__flowsGroup__header__addBtn\">\n <button mat-icon-button (click)=\"onAddFlow(flowsGroup)\"><mat-icon svgIcon=\"gio:plus\" matTooltip=\"New flow\"></mat-icon></button>\n </div>\n </div>\n\n <div\n *ngFor=\"let flow of flowsGroup.flows\"\n class=\"list__flowsGroup__flow\"\n [class.selected]=\"flow.selected\"\n (click)=\"selectFlow(flow)\"\n (mouseout)=\"flow.mouseOver = false\"\n (mouseover)=\"flow.mouseOver = true\"\n >\n <div *ngIf=\"flow.name\" class=\"list__flowsGroup__flow__name\" [attr.title]=\"flow.name\">\n {{ flow.name }}\n </div>\n <div class=\"list__flowsGroup__flow__infos\">\n <div class=\"list__flowsGroup__flow__infos__badges\">\n <span *ngFor=\"let badge of flow.badges\" class=\"list__flowsGroup__flow__infos__badges__badge\" [ngClass]=\"badge.class\">{{\n badge.label\n }}</span>\n </div>\n <div class=\"list__flowsGroup__flow__infos__pathOrChannelLabel\">{{ flow.pathOrChannelLabel }}</div>\n </div>\n </div>\n </div>\n</div>\n","/*\n * Copyright (C) 2022 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 */\nimport { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';\nimport { capitalize, flatten, omit, uniqueId } from 'lodash';\n\nimport { ApiType, ConnectorsInfo, Flow, Plan } from './models';\nimport { FlowGroupVM, FlowVM } from './gio-policy-studio.model';\n\n@Component({\n selector: 'gio-policy-studio',\n templateUrl: './gio-policy-studio.component.html',\n styleUrls: ['./gio-policy-studio.component.scss'],\n})\nexport class GioPolicyStudioComponent implements OnChanges {\n @Input()\n public apiType!: ApiType;\n\n /**\n * List of entrypoints to display\n */\n @Input()\n public entrypointsInfo: ConnectorsInfo[] = [];\n\n /**\n * List of endpoints to display\n */\n @Input()\n public endpointsInfo: ConnectorsInfo[] = [];\n\n @Input()\n public commonFlows: Flow[] = [];\n\n @Input()\n public plans: Plan[] = [];\n\n /**\n * Return common flows if they have been updated.\n */\n @Output()\n public commonFlowsChange = new EventEmitter<Flow[]>();\n\n /**\n * Return the list of plans with updated flows. Plans with no updated flows are not returned.\n **/\n @Output()\n public plansToUpdate = new EventEmitter<Plan[]>();\n\n public connectorsTooltip = '';\n\n public selectedFlow?: FlowVM = undefined;\n\n public flowsGroups: FlowGroupVM[] = [];\n\n public entrypointsType: string[] = [];\n\n public disableSaveButton = true;\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.entrypointsInfo || changes.endpointsInfo) {\n this.connectorsTooltip = `Entrypoints: ${(this.entrypointsInfo ?? []).map(e => capitalize(e.type)).join(', ')}\\nEndpoints: ${(\n this.endpointsInfo ?? []\n )\n .map(e => capitalize(e.type))\n .join(', ')}`;\n\n this.entrypointsType = (this.entrypointsInfo ?? []).map(e => e.type);\n }\n\n if (changes.commonFlows || changes.plans) {\n this.disableSaveButton = true;\n this.flowsGroups = getFlowsGroups(this.commonFlows, this.plans);\n\n // Select first flow by default on first load\n if (changes.commonFlows?.isFirstChange() || changes.plans?.isFirstChange()) {\n this.selectedFlow = this.flowsGroups[0].flows[0];\n }\n }\n }\n\n public onFlowsGroupsChange(flowsGroups: FlowGroupVM[]): void {\n this.flowsGroups = flowsGroups;\n this.disableSaveButton = false;\n }\n\n public onSelectedFlowChange(flow: FlowVM): void {\n this.flowsGroups = this.flowsGroups.map(flowGroup => ({\n ...flowGroup,\n flows: flowGroup.flows.map(f => (f._id === flow._id ? flow : f)),\n }));\n this.selectedFlow = flow;\n this.disableSaveButton = false;\n }\n\n public onDeleteSelectedFlow(flow: FlowVM): void {\n // Define next selected flow and remove flow from flowsGroups\n const allFLowsId = flatten(this.flowsGroups.map(flowGroup => flowGroup.flows)).map(f => f._id);\n const flowToDeleteIndex = allFLowsId.indexOf(flow._id);\n const nextSelectedFlow = allFLowsId[flowToDeleteIndex + 1] ?? allFLowsId[flowToDeleteIndex - 1];\n this.flowsGroups = this.flowsGroups.map(flowGroup => ({\n ...flowGroup,\n flows: flowGroup.flows.filter(f => f._id !== flow._id),\n }));\n this.selectedFlow = this.flowsGroups\n .find(flowGroup => flowGroup.flows.some(f => f._id === nextSelectedFlow))\n ?.flows.find(f => f._id === nextSelectedFlow);\n\n this.disableSaveButton = false;\n }\n\n public onSave(): void {\n // Emit common flows only if they have been updated\n const commonFlows = getCommonFlowsOutput(this.flowsGroups);\n if (commonFlows != null) {\n this.commonFlowsChange.emit(commonFlows);\n }\n // Emit plans only if they have been updated\n const plans = getPlansChangeOutput(this.flowsGroups);\n if (plans != null) {\n this.plansToUpdate.emit(plans);\n }\n }\n}\n\nconst getFlowsGroups = (commonFlows: Flow[] = [], plans: Plan[] = []): FlowGroupVM[] => {\n const commFlowsGroup: FlowGroupVM = {\n _id: 'flowsGroup_commonFlow',\n name: 'Common flows',\n flows: commonFlows.map(flow => ({ ...flow, _id: uniqueId('flow_'), _hasChanged: false })),\n };\n\n return [\n ...plans.map(plan => ({\n _id: uniqueId('flowsGroup_'),\n _icon: 'gio:shield',\n name: plan.name,\n flows: plan.flows.map(flow => ({ ...flow, _id: uniqueId('flow_'), _hasChanged: false })),\n })),\n commFlowsGroup,\n ];\n};\n\nconst getCommonFlowsOutput = (flowsGroups: FlowGroupVM[]): Flow[] | null => {\n const commonFlowsGroup = flowsGroups.find(flowGroup => flowGroup._id === 'flowsGroup_commonFlow');\n const hasChanged = commonFlowsGroup?.flows.some(flow => flow._hasChanged);\n\n return hasChanged ? (commonFlowsGroup?.flows ?? []).map(flow => omit(flow, '_id', '_hasChanged')) : null;\n};\n\nconst getPlansChangeOutput = (flowsGroups: FlowGroupVM[]): Plan[] | null => {\n const plans = flowsGroups.filter(flowGroup => flowGroup._id !== 'flowsGroup_commonFlow');\n const plansWithChangedFlows = plans.filter(plan => plan.flows.some(flow => flow._hasChanged));\n const plansWithChangedFlowsOutput = plansWithChangedFlows.map(plan => ({\n ...omit(plan, '_id', '_icon'),\n flows: plan.flows.map(flow => omit(flow, '_id', '_hasChanged')),\n }));\n\n return plansWithChangedFlowsOutput.length > 0 ? plansWithChangedFlowsOutput : null;\n};\n","<!--\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\">\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\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\" [disabled]=\"disableSaveButton\" (click)=\"onSave()\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu\n [flowsGroups]=\"flowsGroups\"\n [entrypoints]=\"entrypointsType\"\n (flowsGroupsChange)=\"onFlowsGroupsChange($event)\"\n [(selectedFlow)]=\"selectedFlow\"\n ></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details\n [flow]=\"selectedFlow\"\n [entrypoints]=\"entrypointsType\"\n (flowChange)=\"onSelectedFlowChange($event)\"\n (deleteFlow)=\"onDeleteSelectedFlow($event)\"\n ></gio-ps-flow-details>\n </div>\n</div>\n","/*\n * Copyright (C) 2022 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 */\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { GioIconsModule } from '@gravitee/ui-particles-angular';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { GioPolicyStudioFlowFormDialogComponent } from './components/flow-form-dialog/gio-ps-flow-form-dialog.component';\nimport { GioPolicyStudioDetailsComponent } from './components/flow-details/gio-ps-flow-details.component';\nimport { GioPolicyStudioFlowsMenuComponent } from './components/flows-menu/gio-ps-flows-menu.component';\nimport { GioPolicyStudioComponent } from './gio-policy-studio.component';\n\n@NgModule({\n declarations: [\n GioPolicyStudioComponent,\n GioPolicyStudioFlowsMenuComponent,\n GioPolicyStudioDetailsComponent,\n GioPolicyStudioFlowFormDialogComponent,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatButtonModule,\n MatTooltipModule,\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n MatDialogModule,\n\n GioIconsModule,\n ],\n exports: [GioPolicyStudioComponent],\n})\nexport class GioPolicyStudioModule {}\n","/*\n * Copyright (C) 2022 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 * Public API Surface of ui-policy-studio-angular\n */\nexport * from './lib/models';\nexport { GioPolicyStudioModule } from './lib/gio-policy-studio.module';\nexport { GioPolicyStudioComponent } from './lib/gio-policy-studio.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;MAmCa,sCAAsC;IAOjD,YACS,SAAoG,EAClF,cAAiD;QADnE,cAAS,GAAT,SAAS,CAA2F;QAPtG,gBAAW,GAAa,EAAE,CAAC;QAI3B,SAAI,GAAsB,QAAQ,CAAC;QAMxC,IAAI,CAAC,WAAW,GAAG,cAAc,EAAE,WAAW,IAAI,EAAE,CAAC;QAErD,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,cAAc,EAAE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B;QAChB,kBAAkB;QAClB,cAAc;QACd,eAAe;QACf,eAAe;QAEf,cAAc,aAEN,wBAAwB;oHAEvB,qBAAqB,YAfvB;YACP,YAAY;YACZ,mBAAmB;YAEnB,eAAe;YACf,gBAAgB;YAChB,kBAAkB;YAClB,cAAc;YACd,eAAe;YACf,eAAe;YAEf,cAAc;SACf;4FAGU,qBAAqB;kBAtBjC,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,wBAAwB;wBACxB,iCAAiC;wBACjC,+BAA+B;wBAC/B,sCAAsC;qBACvC;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,eAAe;wBACf,gBAAgB;wBAChB,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBACf,eAAe;wBAEf,cAAc;qBACf;oBACD,OAAO,EAAE,CAAC,wBAAwB,CAAC;iBACpC;;;ACpDD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ApiType, ConnectorsInfo, Flow, Plan } from './models';
|
|
3
3
|
import { FlowGroupVM, FlowVM } from './gio-policy-studio.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -14,14 +14,24 @@ export declare class GioPolicyStudioComponent implements OnChanges {
|
|
|
14
14
|
endpointsInfo: ConnectorsInfo[];
|
|
15
15
|
commonFlows: Flow[];
|
|
16
16
|
plans: Plan[];
|
|
17
|
+
/**
|
|
18
|
+
* Return common flows if they have been updated.
|
|
19
|
+
*/
|
|
20
|
+
commonFlowsChange: EventEmitter<Flow[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Return the list of plans with updated flows. Plans with no updated flows are not returned.
|
|
23
|
+
**/
|
|
24
|
+
plansToUpdate: EventEmitter<Plan[]>;
|
|
17
25
|
connectorsTooltip: string;
|
|
18
26
|
selectedFlow?: FlowVM;
|
|
19
27
|
flowsGroups: FlowGroupVM[];
|
|
20
28
|
entrypointsType: string[];
|
|
29
|
+
disableSaveButton: boolean;
|
|
21
30
|
ngOnChanges(changes: SimpleChanges): void;
|
|
22
31
|
onFlowsGroupsChange(flowsGroups: FlowGroupVM[]): void;
|
|
23
32
|
onSelectedFlowChange(flow: FlowVM): void;
|
|
24
33
|
onDeleteSelectedFlow(flow: FlowVM): void;
|
|
34
|
+
onSave(): void;
|
|
25
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<GioPolicyStudioComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GioPolicyStudioComponent, "gio-policy-studio", never, { "apiType": "apiType"; "entrypointsInfo": "entrypointsInfo"; "endpointsInfo": "endpointsInfo"; "commonFlows": "commonFlows"; "plans": "plans"; }, {}, never, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GioPolicyStudioComponent, "gio-policy-studio", never, { "apiType": "apiType"; "entrypointsInfo": "entrypointsInfo"; "endpointsInfo": "endpointsInfo"; "commonFlows": "commonFlows"; "plans": "plans"; }, { "commonFlowsChange": "commonFlowsChange"; "plansToUpdate": "plansToUpdate"; }, never, never>;
|
|
27
37
|
}
|
package/lib/models/index.d.ts
CHANGED