@gravitee/ui-policy-studio-angular 7.13.0 → 7.14.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-details-phase/gio-ps-flow-details-phase.component.mjs +9 -3
- package/esm2020/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.mjs +7 -4
- package/esm2020/testing/lib/components/flow-details-phase/gio-ps-flow-details-phase.harness.mjs +9 -1
- package/esm2020/testing/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.harness.mjs +5 -1
- package/fesm2015/gravitee-ui-policy-studio-angular-testing.mjs +16 -0
- package/fesm2015/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
- package/fesm2015/gravitee-ui-policy-studio-angular.mjs +14 -5
- package/fesm2015/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-policy-studio-angular-testing.mjs +12 -0
- package/fesm2020/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
- package/fesm2020/gravitee-ui-policy-studio-angular.mjs +14 -5
- package/fesm2020/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.d.ts +1 -0
- package/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.d.ts +2 -1
- package/package.json +1 -1
- package/testing/lib/components/flow-details-phase/gio-ps-flow-details-phase.harness.d.ts +5 -0
- package/testing/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.harness.d.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gravitee-ui-policy-studio-angular.mjs","sources":["../../../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/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/policy/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/index.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.component.html","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.service.ts","../../../projects/ui-policy-studio-angular/src/lib/components/step-form/gio-ps-step-form.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/step-form/gio-ps-step-form.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/filter-pipe/gio-flter-connectors-by-mode.pipe.ts","../../../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/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.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) 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 const HttpMethods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE', 'OTHER'] as const;\nexport type HttpMethod = (typeof HttpMethods)[number];\n\nexport const toHttpMethod: (value: string) => HttpMethod | undefined = (value: string) => {\n switch (value) {\n case 'CONNECT':\n return 'CONNECT';\n case 'DELETE':\n return 'DELETE';\n case 'GET':\n return 'GET';\n case 'HEAD':\n return 'HEAD';\n case 'OPTIONS':\n return 'OPTIONS';\n case 'PATCH':\n return 'PATCH';\n case 'POST':\n return 'POST';\n case 'PUT':\n return 'PUT';\n case 'TRACE':\n return 'TRACE';\n case 'OTHER':\n return 'OTHER';\n default:\n return undefined;\n }\n};\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) 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) 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 './Policy';\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';\nexport * from './policy';\n\nexport * from './ConnectorsInfo';\nexport * from './SaveOutput';\nexport * from './PolicySchemaFetcher';\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, ConnectorInfo } from '../../../models';\nimport { GioPolicyStudioFlowFormDialogResult } from '../gio-ps-flow-form-dialog-result.model';\n\nexport type GioPolicyStudioFlowMessageFormDialogData = {\n flow?: FlowVM;\n entrypoints?: ConnectorInfo[];\n};\n\n@Component({\n selector: 'gio-ps-flow-message-form-dialog',\n templateUrl: './gio-ps-flow-message-form-dialog.component.html',\n styleUrls: ['./gio-ps-flow-message-form-dialog.component.scss'],\n})\nexport class GioPolicyStudioFlowMessageFormDialogComponent {\n public entrypoints: ConnectorInfo[] = [];\n public flowFormGroup?: FormGroup;\n\n public existingFlow?: FlowVM;\n public mode: 'create' | 'edit' = 'create';\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioFlowMessageFormDialogComponent, GioPolicyStudioFlowFormDialogResult>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioFlowMessageFormDialogData,\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 channelSelectorToSave: 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 ? [channelSelectorToSave, conditionSelectorToSave] : [channelSelectorToSave],\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.type\">{{ entrypoint.name }}</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) 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 { ConditionSelector, HttpMethod, HttpMethods, HttpSelector } from '../../../models';\nimport { GioPolicyStudioFlowFormDialogResult } from '../gio-ps-flow-form-dialog-result.model';\n\nexport type GioPolicyStudioFlowProxyFormDialogData = {\n flow?: FlowVM;\n};\n\ntype HttpMethodVM = HttpMethod | 'ALL';\n\nconst METHODS_AUTOCOMPLETE: HttpMethodVM[] = ['ALL', ...HttpMethods];\n\n@Component({\n selector: 'gio-ps-flow-proxy-form-dialog',\n templateUrl: './gio-ps-flow-proxy-form-dialog.component.html',\n styleUrls: ['./gio-ps-flow-proxy-form-dialog.component.scss'],\n})\nexport class GioPolicyStudioFlowProxyFormDialogComponent {\n public flowFormGroup?: FormGroup;\n\n public existingFlow?: FlowVM;\n public mode: 'create' | 'edit' = 'create';\n public methods = METHODS_AUTOCOMPLETE;\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioFlowProxyFormDialogComponent, GioPolicyStudioFlowFormDialogResult>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioFlowProxyFormDialogData,\n ) {\n this.existingFlow = cloneDeep(flowDialogData?.flow);\n this.mode = this.existingFlow ? 'edit' : 'create';\n\n const httpSelector = flowDialogData?.flow?.selectors?.find(s => s.type === 'HTTP') as HttpSelector;\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 pathOperator: new FormControl(httpSelector?.pathOperator ?? 'EQUALS'),\n path: new FormControl(sanitizePathFormValue(httpSelector?.path)),\n methods: new FormControl(sanitizeMethodFormValue(httpSelector?.methods)),\n condition: new FormControl(conditionSelector?.condition ?? ''),\n });\n }\n\n public onSubmit(): void {\n const httpSelectorToSave: HttpSelector = {\n type: 'HTTP',\n path: sanitizePath(this.flowFormGroup?.get('path')?.value),\n pathOperator: this.flowFormGroup?.get('pathOperator')?.value,\n methods: sanitizeMethods(this.flowFormGroup?.get('methods')?.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 ? [httpSelectorToSave, conditionSelectorToSave] : [httpSelectorToSave],\n enabled: true,\n };\n\n this.dialogRef.close({\n ...flowToSave,\n });\n }\n\n public tagValidationHook(tag: string, validationCb: (shouldAddTag: boolean) => void) {\n validationCb(METHODS_AUTOCOMPLETE.map(m => `${m}`).includes(tag.toUpperCase()));\n }\n}\n\nconst sanitizeMethods: (value: HttpMethodVM[]) => HttpMethod[] = (value?: HttpMethodVM[]) => {\n if (!value || value.find(m => m === 'ALL')) return [];\n return value as HttpMethod[];\n};\n\nconst sanitizeMethodFormValue: (methods?: HttpMethod[]) => HttpMethodVM[] = (methods?: HttpMethod[]) => {\n if (!methods || methods.length === 0) return ['ALL'];\n return methods;\n};\n\nexport const sanitizePath = (path: string) => {\n if (!path || !path.startsWith('/')) {\n return `/${path}`;\n }\n return path;\n};\n\nconst sanitizePathFormValue = (path: string | undefined) => {\n if (path && path.startsWith('/')) {\n return path.substring(1);\n }\n return path ?? '';\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>\n Flows allow you to apply different policies per HTTP path and/or method. For example you can reroute calls based on the URL specified.\n </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 path and method 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=\"pathOperator\">\n <mat-option value=\"EQUALS\">Equals</mat-option>\n <mat-option value=\"STARTS_WITH\">Starts with</mat-option>\n </mat-select>\n <mat-hint>Path operator</mat-hint>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Path</mat-label>\n <span matPrefix>/</span>\n <input matInput formControlName=\"path\" />\n <mat-hint>Path</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Methods for your flow</mat-label>\n <gio-form-tags-input\n formControlName=\"methods\"\n [autocompleteOptions]=\"methods\"\n [tagValidationHook]=\"tagValidationHook\"\n ></gio-form-tags-input>\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, Input } from '@angular/core';\n\nimport { FlowVM } from '../../gio-policy-studio.model';\nimport { ChannelSelector, ConditionSelector, ConnectorInfo, HttpSelector, Operation } from '../../models';\n\n@Component({\n selector: 'gio-ps-flow-details-info-bar',\n templateUrl: './gio-ps-flow-details-info-bar.component.html',\n styleUrls: ['./gio-ps-flow-details-info-bar.component.scss'],\n})\nexport class GioPolicyStudioDetailsInfoBarComponent {\n @Input()\n public flow?: FlowVM = undefined;\n\n @Input()\n public entrypointsInfo: ConnectorInfo[] = [];\n\n public get condition(): string | undefined {\n const conditionSelector = this.flow?.selectors?.find(s => s.type === 'CONDITION') as ConditionSelector;\n if (!conditionSelector) {\n return undefined;\n }\n return conditionSelector?.condition;\n }\n\n // MESSAGE API type\n\n public get operations(): string[] | undefined {\n const channelSelector = this.flow?.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector;\n if (!channelSelector) {\n return undefined;\n }\n const operationToBadge: Record<Operation, string> = {\n PUBLISH: 'PUB',\n SUBSCRIBE: 'SUB',\n };\n return channelSelector?.operations?.map(o => operationToBadge[o]).sort();\n }\n\n public get channel(): string | undefined {\n const channelSelector = this.flow?.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector;\n if (!channelSelector) {\n return undefined;\n }\n return channelSelector?.channel;\n }\n\n public get channelOperator(): string | undefined {\n const channelSelector = this.flow?.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector;\n if (!channelSelector) {\n return undefined;\n }\n return channelSelector?.channelOperator;\n }\n\n // PROXY API type\n\n public get path(): string | undefined {\n const httpSelector = this.flow?.selectors?.find(s => s.type === 'HTTP') as HttpSelector;\n if (!httpSelector) {\n return undefined;\n }\n return httpSelector?.path;\n }\n\n public get pathOperator(): string | undefined {\n const httpSelector = this.flow?.selectors?.find(s => s.type === 'HTTP') as HttpSelector;\n if (!httpSelector) {\n return undefined;\n }\n return httpSelector?.pathOperator;\n }\n\n public get methods(): string[] | undefined {\n const httpSelector = this.flow?.selectors?.find(s => s.type === 'HTTP') as HttpSelector;\n if (!httpSelector) {\n return undefined;\n }\n return httpSelector?.methods?.length ? httpSelector?.methods : ['ALL'];\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<div *ngIf=\"flow?.name\" class=\"info\">\n <span class=\"info__label\">Name</span>\n <span class=\"info__value strong\">{{ flow?.name }}</span>\n</div>\n\n<div *ngIf=\"entrypointsInfo\" class=\"info\">\n <span class=\"info__label\">Entrypoints</span>\n <span *ngFor=\"let entrypoint of entrypointsInfo\" class=\"info__value gio-badge-neutral\">\n <mat-icon [svgIcon]=\"entrypoint.icon\"></mat-icon>\n {{ entrypoint.name }}</span\n >\n</div>\n\n<!-- MESSAGE API type -->\n\n<div *ngIf=\"operations\" class=\"info\">\n <span class=\"info__label\">Operations</span>\n <span *ngFor=\"let operation of operations\" class=\"info__value gio-badge-neutral\"> {{ operation }}</span>\n</div>\n\n<div *ngIf=\"channel\" class=\"info\">\n <span class=\"info__label\">Channel</span>\n <span class=\"info__value strong\">{{ channel }}</span>\n</div>\n\n<div *ngIf=\"channelOperator\" class=\"info\">\n <span class=\"info__label\">Channel Operator</span>\n <span class=\"info__value gio-badge-neutral\">{{ channelOperator }}</span>\n</div>\n\n<!-- PROXY API type -->\n\n<div *ngIf=\"path\" class=\"info\">\n <span class=\"info__label\">Path</span>\n <span class=\"info__value strong\">{{ path }}</span>\n</div>\n\n<div *ngIf=\"pathOperator\" class=\"info\">\n <span class=\"info__label\">Path Operator</span>\n <span class=\"info__value gio-badge-neutral\">{{ pathOperator }}</span>\n</div>\n\n<div *ngIf=\"methods\" class=\"info\">\n <span class=\"info__label\">HTTP methods</span>\n <span *ngFor=\"let method of methods\" class=\"info__value gio-badge-neutral\"> {{ method }}</span>\n</div>\n\n<!-- Condition -->\n\n<div *ngIf=\"condition\" class=\"info\">\n <span class=\"info__label\">Condition</span>\n <span class=\"info__value gio-badge-neutral\">{{ condition }}</span>\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 */\n\nimport { Inject } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { shareReplay } from 'rxjs/operators';\n\nimport { Policy, PolicySchemaFetcher } from './models';\n\n@Inject({})\nexport class GioPolicyStudioService {\n private schemasCache: Record<string, unknown> = {};\n private documentationsCache: Record<string, unknown> = {};\n\n private policySchemaFetcher?: PolicySchemaFetcher;\n private policyDocumentationFetcher?: PolicySchemaFetcher;\n\n public setPolicySchemaFetcher(policySchemaFetcher: PolicySchemaFetcher) {\n this.policySchemaFetcher = policySchemaFetcher;\n }\n\n public setPolicyDocumentationFetcher(policyDocumentationFetcher: PolicySchemaFetcher) {\n this.policyDocumentationFetcher = policyDocumentationFetcher;\n }\n\n /**\n * Call the policy schema fetcher to get the schema for the given policy. If the\n * schema has already been fetched, it will be returned from the cache.\n *\n * @param policy to get the schema for\n * @returns the schema for the policy\n */\n public getPolicySchema(policy: Policy): Observable<unknown> {\n if (!this.policySchemaFetcher) throw new Error('PolicySchemaFetcher not defined!');\n\n if (this.schemasCache[policy.id]) {\n return of(this.schemasCache[policy.id]).pipe(shareReplay(1));\n }\n\n return this.policySchemaFetcher(policy);\n }\n\n /**\n * Call the policy documentation fetcher to get the documentation for the given policy. If the\n * documentation has already been fetched, it will be returned from the cache.\n *\n * @param policy to get the documentation for\n * @returns the documentation for the policy\n */\n public getPolicyDocumentation(policy: Policy): Observable<unknown> {\n if (!this.policyDocumentationFetcher) throw new Error('PolicyDocumentationFetcher not defined!');\n\n if (this.documentationsCache[policy.id]) {\n return of(this.documentationsCache[policy.id]).pipe(shareReplay(1));\n }\n\n return this.policyDocumentationFetcher(policy);\n }\n}\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, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { startWith, takeUntil } from 'rxjs/operators';\nimport { Subject } from 'rxjs';\n\nimport { GioPolicyStudioService } from '../../gio-policy-studio.service';\nimport { Policy, Step } from '../../models';\n\n@Component({\n selector: 'gio-ps-step-form',\n templateUrl: './gio-ps-step-form.component.html',\n styleUrls: ['./gio-ps-step-form.component.scss'],\n})\nexport class GioPolicyStudioStepFormComponent implements OnChanges, OnInit, OnDestroy {\n @Input()\n public step?: Step;\n\n @Input()\n public policy!: Policy;\n\n @Output()\n public stepChange = new EventEmitter<Step>();\n\n @Output()\n public isValid = new EventEmitter<boolean>();\n\n public policySchema$?: unknown;\n public policyDocumentation$?: unknown;\n\n public stepForm?: FormGroup;\n\n private unsubscribe$ = new Subject<void>();\n constructor(private readonly policyStudioService: GioPolicyStudioService) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.policy) {\n this.policySchema$ = this.policyStudioService.getPolicySchema(this.policy);\n this.policyDocumentation$ = this.policyStudioService.getPolicyDocumentation(this.policy);\n }\n\n if (changes.step && !changes.step.firstChange) {\n this.initStepForm();\n }\n }\n\n public ngOnInit(): void {\n this.initStepForm();\n }\n\n public ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n\n private initStepForm(): void {\n this.stepForm = new FormGroup({\n description: new FormControl(this.step?.description, []),\n });\n\n this.stepForm.valueChanges.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {\n this.stepChange.emit({\n ...this.step,\n description: this.stepForm?.get('description')?.value,\n });\n });\n\n this.stepForm.statusChanges.pipe(takeUntil(this.unsubscribe$), startWith(this.stepForm.status)).subscribe(valid => {\n this.isValid.emit(valid === 'VALID');\n });\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=\"settings\">\n <div class=\"settings__header\">Settings</div>\n\n <div *ngIf=\"stepForm\" class=\"settings__content\" [formGroup]=\"stepForm\">\n <mat-form-field>\n <mat-label>Description</mat-label>\n <input matInput formControlName=\"description\" cdkFocusInitial />\n <mat-hint>Describe how your policy works.</mat-hint>\n </mat-form-field>\n\n <ng-container *ngIf=\"policySchema$\">\n {{ $any(policySchema$) | async | json }}\n </ng-container>\n </div>\n</div>\n\n<div class=\"documentation\">\n <div class=\"documentation__header\">Documentation</div>\n\n <div class=\"documentation__content\">\n <ng-container *ngIf=\"policyDocumentation$\">\n {{ $any(policyDocumentation$) | async }}\n </ng-container>\n </div>\n</div>\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';\n\nimport { ApiType, ExecutionPhase, Policy, Step } from '../../models';\n\nexport type GioPolicyStudioPoliciesCatalogDialogData = {\n policies: Policy[];\n executionPhase: ExecutionPhase;\n apiType: ApiType;\n};\n\nexport type GioPolicyStudioPoliciesCatalogDialogResult = undefined | Step;\n\nconst executionPhaseLabels: Record<ExecutionPhase, string> = {\n REQUEST: 'Request',\n RESPONSE: 'Response',\n MESSAGE_REQUEST: 'Publish',\n MESSAGE_RESPONSE: 'Subscribe',\n};\n\n@Component({\n selector: 'gio-ps-policies-catalog-dialog',\n templateUrl: './gio-ps-policies-catalog-dialog.component.html',\n styleUrls: ['./gio-ps-policies-catalog-dialog.component.scss'],\n})\nexport class GioPolicyStudioPoliciesCatalogDialogComponent {\n public policies: Policy[] = [];\n\n public executionPhaseLabel!: string;\n\n public selectedPolicy?: Policy;\n\n public stepToAdd?: Step;\n\n public isValid = false;\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioPoliciesCatalogDialogComponent, GioPolicyStudioPoliciesCatalogDialogResult>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioPoliciesCatalogDialogData,\n ) {\n this.policies = flowDialogData.policies.filter(policy => {\n if (flowDialogData.apiType === 'PROXY') {\n return policy.proxy?.includes(flowDialogData.executionPhase);\n }\n return policy.message?.includes(flowDialogData.executionPhase);\n });\n this.executionPhaseLabel = executionPhaseLabels[flowDialogData.executionPhase];\n }\n\n public onSelectPolicy(policy: Policy) {\n this.selectedPolicy = policy;\n }\n\n public onAddPolicy() {\n this.dialogRef.close({\n ...this.stepToAdd,\n name: this.selectedPolicy?.name,\n enabled: true,\n policy: this.selectedPolicy?.id,\n });\n }\n\n public onGoBack() {\n this.selectedPolicy = undefined;\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 Policies for <span class=\"title__phase\">{{ executionPhaseLabel }}</span> phase\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<mat-dialog-content *ngIf=\"!selectedPolicy\" class=\"policiesCatalog\">\n <div *ngFor=\"let policy of policies\" class=\"policiesCatalog__policy\">\n <div class=\"policiesCatalog__policy__head\">\n <mat-icon class=\"policiesCatalog__policy__head__icon\" [svgIcon]=\"policy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"policy.name\" class=\"policiesCatalog__policy__head__name\">{{ policy.name }}</span>\n </div>\n\n <div *ngIf=\"policy.description\" class=\"policiesCatalog__policy__description\">{{ policy.description }}</div>\n\n <button class=\"policiesCatalog__policy__selectBtn\" mat-stroked-button role=\"dialog\" (click)=\"onSelectPolicy(policy)\">Select</button>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-content *ngIf=\"selectedPolicy\" class=\"policyForm\">\n <button class=\"policyForm__goBackBtn\" mat-stroked-button (click)=\"onGoBack()\">\n <mat-icon svgIcon=\"gio:arrow-left\"></mat-icon>\n Go back\n </button>\n\n <div class=\"policyForm__info\">\n <div class=\"policyForm__info__head\">\n <mat-icon class=\"policyForm__info__head__icon\" [svgIcon]=\"selectedPolicy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"selectedPolicy.name\" class=\"policyForm__info__head__name\">{{ selectedPolicy.name }}</span>\n </div>\n\n <div *ngIf=\"selectedPolicy.description\" class=\"policyForm__info__description\">{{ selectedPolicy.description }}</div>\n </div>\n\n <gio-ps-step-form [policy]=\"selectedPolicy\" [(step)]=\"stepToAdd\" (isValid)=\"isValid = $event\"></gio-ps-step-form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"\">Cancel</button>\n <button\n *ngIf=\"selectedPolicy\"\n class=\"actions__addBtn\"\n color=\"primary\"\n mat-stroked-button\n role=\"dialog\"\n [disabled]=\"!isValid\"\n (click)=\"onAddPolicy()\"\n >\n Add policy\n </button>\n</mat-dialog-actions>\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';\n\nimport { Policy, Step } from '../../models';\n\nexport type GioPolicyStudioStepEditDialogData = {\n policy: Policy;\n step: Step;\n};\n\nexport type GioPolicyStudioStepEditDialogResult = undefined | Step;\n\n@Component({\n selector: 'gio-ps-step-edit-dialog',\n templateUrl: './gio-ps-step-edit-dialog.component.html',\n styleUrls: ['./gio-ps-step-edit-dialog.component.scss'],\n})\nexport class GioPolicyStudioStepEditDialogComponent {\n public policy!: Policy;\n public step!: Step;\n\n public isValid = false;\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioStepEditDialogComponent, GioPolicyStudioStepEditDialogResult>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioStepEditDialogData,\n ) {\n this.policy = flowDialogData.policy;\n this.step = flowDialogData.step;\n }\n\n public onSave(): void {\n this.dialogRef.close({\n ...this.step,\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 <mat-icon class=\"title__icon\" [svgIcon]=\"policy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"step.name\" class=\"title__name\">{{ step.name }}</span>\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n\n <div class=\"title__description\">\n {{ policy.description }}\n </div>\n</h2>\n\n<mat-dialog-content class=\"content\">\n <gio-ps-step-form [policy]=\"policy\" [(step)]=\"step\" (isValid)=\"isValid = $event\"></gio-ps-step-form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-stroked-button role=\"dialog\" (click)=\"onSave()\" [disabled]=\"!isValid\">Save</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, OnChanges, Output, SimpleChanges } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Policy, Step } from '../../models';\nimport {\n GioPolicyStudioStepEditDialogComponent,\n GioPolicyStudioStepEditDialogData,\n GioPolicyStudioStepEditDialogResult,\n} from '../step-edit-dialog/gio-ps-step-edit-dialog.component';\n\n@Component({\n selector: 'gio-ps-flow-details-phase-step',\n templateUrl: './gio-ps-flow-details-phase-step.component.html',\n styleUrls: ['./gio-ps-flow-details-phase-step.component.scss'],\n})\nexport class GioPolicyStudioDetailsPhaseStepComponent implements OnChanges {\n @Input()\n public step!: Step;\n\n @Input()\n public policies: Policy[] = [];\n\n @Output()\n public stepChange = new EventEmitter<Step>();\n\n public policy?: Policy;\n\n constructor(private readonly matDialog: MatDialog) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.policies || changes.step) {\n this.policy = this.policies.find(policy => policy.id === this.step.policy);\n }\n }\n\n public onEdit() {\n if (!this.policy) {\n // TODO: Handle UseCase when policy is not found. (Like if the plugin is removed from the BackEnd)\n return;\n }\n\n this.matDialog\n .open<GioPolicyStudioStepEditDialogComponent, GioPolicyStudioStepEditDialogData, GioPolicyStudioStepEditDialogResult>(\n GioPolicyStudioStepEditDialogComponent,\n {\n data: {\n policy: this.policy,\n step: this.step,\n },\n role: 'alertdialog',\n id: 'gioPolicyStudioPolicyFormDialog',\n width: '1000px',\n },\n )\n .afterClosed()\n .subscribe(stepToEdit => {\n if (!stepToEdit) {\n return;\n }\n\n this.stepChange.emit(stepToEdit);\n });\n }\n\n public onDisable() {\n throw new Error('Wip');\n }\n\n public onDelete() {\n throw new Error('Wip');\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=\"info\">\n <div class=\"info__head\">\n <mat-icon class=\"info__head__icon\" [svgIcon]=\"policy?.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"step.name\" class=\"info__head__name\">{{ step.name }}</span>\n </div>\n\n <div *ngIf=\"step.description\" class=\"info__description\">{{ step.description }}</div>\n</div>\n\n<button class=\"menuBtn\" mat-icon-button [matMenuTriggerFor]=\"policyMenu\"><mat-icon svgIcon=\"gio:more-vertical\"></mat-icon></button>\n\n<mat-menu #policyMenu=\"matMenu\">\n <button mat-menu-item (click)=\"onEdit()\">\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n <span>Edit</span>\n </button>\n\n <button disabled mat-menu-item (click)=\"onDisable()\">\n <mat-icon svgIcon=\"gio:prohibition\"></mat-icon>\n <span>Disable 🚧</span>\n </button>\n\n <button disabled mat-menu-item (click)=\"onDelete()\">\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n <span>Delete 🚧</span>\n </button>\n</mat-menu>\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 { isEmpty } from 'lodash';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { ApiType, ConnectorInfo, ExecutionPhase, Policy, Step } from '../../models';\nimport {\n GioPolicyStudioPoliciesCatalogDialogComponent,\n GioPolicyStudioPoliciesCatalogDialogData,\n GioPolicyStudioPoliciesCatalogDialogResult,\n} from '../policies-catalog-dialog/gio-ps-policies-catalog-dialog.component';\n\ntype StepVM =\n | {\n type: 'connectors';\n connectors: {\n name?: string;\n icon?: string;\n }[];\n }\n | {\n type: 'step';\n step: Step;\n index: number;\n };\n\n@Component({\n selector: 'gio-ps-flow-details-phase',\n templateUrl: './gio-ps-flow-details-phase.component.html',\n styleUrls: ['./gio-ps-flow-details-phase.component.scss'],\n})\nexport class GioPolicyStudioDetailsPhaseComponent implements OnChanges {\n @Input()\n public steps: Step[] = [];\n\n @Input()\n public name!: string;\n\n @Input()\n public description!: string;\n\n @Input()\n public startConnector: ConnectorInfo[] = [];\n\n @Input()\n public endConnector: ConnectorInfo[] = [];\n\n @Input()\n public apiType!: ApiType;\n\n @Input()\n public policies: Policy[] = [];\n\n @Input()\n public policyExecutionPhase!: ExecutionPhase;\n\n @Output()\n public stepsChange = new EventEmitter<Step[]>();\n\n public stepsVM: StepVM[] = [];\n\n public isDisabled = false;\n\n constructor(private readonly matDialog: MatDialog) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.steps || changes.startConnector || changes.endConnector) {\n this.stepsVM = [\n {\n type: 'connectors',\n connectors: this.startConnector.map(connector => ({\n name: connector.name,\n icon: connector.icon,\n })),\n },\n\n ...(this.steps ?? []).map((step, index) => ({\n type: 'step' as const,\n step: step,\n index,\n })),\n\n {\n type: 'connectors',\n connectors: this.endConnector.map(connector => ({\n name: connector.name,\n icon: connector.icon,\n })),\n },\n ];\n\n // Disable phase if there are not start & end connectors\n this.isDisabled = this.stepsVM.filter(step => step.type === 'connectors' && !isEmpty(step.connectors)).length < 2;\n }\n }\n\n public onAddPolicy(index: number): void {\n this.matDialog\n .open<\n GioPolicyStudioPoliciesCatalogDialogComponent,\n GioPolicyStudioPoliciesCatalogDialogData,\n GioPolicyStudioPoliciesCatalogDialogResult\n >(GioPolicyStudioPoliciesCatalogDialogComponent, {\n data: {\n policies: this.policies,\n executionPhase: this.policyExecutionPhase,\n apiType: this.apiType,\n },\n role: 'alertdialog',\n id: 'gioPolicyStudioPoliciesCatalogDialog',\n width: '1000px',\n })\n .afterClosed()\n .subscribe(stepToAdd => {\n if (!this.steps || !stepToAdd) {\n return;\n }\n // Add Step after the given index\n this.stepsChange.emit([...this.steps.slice(0, index + 1), stepToAdd, ...this.steps.slice(index + 1)]);\n });\n }\n\n public onStepChange(index: number, stepToEdit: Step): void {\n if (!this.steps) {\n return;\n }\n // Replace the step at the given index\n this.stepsChange.emit([...this.steps.slice(0, index), stepToEdit, ...this.steps.slice(index + 1)]);\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 <span class=\"header__name\">\n {{ name }}\n </span>\n <span class=\"header__description\">\n {{ description }}\n </span>\n\n <span *ngIf=\"isDisabled\" class=\"header__infoIcon\" matTooltip=\"Policies might not be evaluated\" matTooltipPosition=\"before\">\n <mat-icon svgIcon=\"gio:info\"></mat-icon>\n </span>\n</div>\n\n<div *ngIf=\"!isDisabled; else disabledPhaseContent\" class=\"wrapper\">\n <div class=\"content\">\n <div *ngFor=\"let stepVM of stepsVM; first as isFirst\" class=\"content__step\">\n <!-- Connector -->\n <ng-container *ngIf=\"stepVM.type === 'connectors'\">\n <div class=\"content__step__connector\">\n <span *ngFor=\"let connector of stepVM.connectors\" class=\"gio-badge-white content__step__connector__badge\">\n <mat-icon *ngIf=\"connector.icon\" [svgIcon]=\"connector.icon\" class=\"content__step__connector__badge__icon\"></mat-icon>\n {{ connector.name }}\n </span>\n </div>\n\n <!-- Add policy button after first connector -->\n <ng-container *ngIf=\"isFirst\">\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n <button class=\"content__step__addBtn\" mat-icon-button (click)=\"onAddPolicy(-1)\"><mat-icon svgIcon=\"gio:plus\"></mat-icon></button>\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n </ng-container>\n </ng-container>\n\n <!-- Policy -->\n <ng-container *ngIf=\"stepVM.type === 'step'\">\n <gio-ps-flow-details-phase-step\n class=\"content__step__step\"\n [policies]=\"policies\"\n [step]=\"stepVM.step\"\n (stepChange)=\"onStepChange(stepVM.index, $event)\"\n ></gio-ps-flow-details-phase-step>\n\n <!-- Add policy button -->\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n <button class=\"content__step__addBtn\" mat-icon-button (click)=\"onAddPolicy(stepVM.index)\">\n <mat-icon svgIcon=\"gio:plus\"></mat-icon>\n </button>\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #disabledPhaseContent>\n <div class=\"disabledContent\">\n <gio-banner-warning>\n Policies might not be evaluated\n <span gioBannerBody> Your API entrypoints don't apply on this phase. To enable them, add an entrypoint supporting this phase. </span>\n </gio-banner-warning>\n </div>\n</ng-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 */\nimport { Pipe, PipeTransform } from '@angular/core';\nimport { filter } from 'lodash';\n\nimport { ConnectorInfo, ConnectorMode } from '../../models';\n\n@Pipe({\n name: 'gioFilterConnectorsByMode',\n})\nexport class GioFilterConnectorsByModePipe implements PipeTransform {\n public transform(items: ConnectorInfo[], mode: ConnectorMode): ConnectorInfo[] {\n if (!items) {\n return [];\n }\n if (!mode) {\n return items;\n }\n\n return filter(items, (item: ConnectorInfo) => {\n return item.supportedModes.includes(mode);\n });\n }\n}\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 GioPolicyStudioFlowMessageFormDialogComponent,\n GioPolicyStudioFlowMessageFormDialogData,\n} from '../flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component';\nimport { ApiType, ConnectorInfo, Policy, Step } from '../../models';\nimport {\n GioPolicyStudioFlowProxyFormDialogComponent,\n GioPolicyStudioFlowProxyFormDialogData,\n} from '../flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component';\nimport { GioPolicyStudioFlowFormDialogResult } from '../flow-form-dialog/gio-ps-flow-form-dialog-result.model';\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 apiType!: ApiType;\n\n @Input()\n public flow?: FlowVM = undefined;\n\n @Input()\n public entrypointsInfo: ConnectorInfo[] = [];\n\n @Input()\n public endpointsInfo: ConnectorInfo[] = [];\n\n @Input()\n public policies: Policy[] = [];\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 const dialogResult =\n this.apiType === 'MESSAGE'\n ? this.matDialog\n .open<\n GioPolicyStudioFlowMessageFormDialogComponent,\n GioPolicyStudioFlowMessageFormDialogData,\n GioPolicyStudioFlowFormDialogResult\n >(GioPolicyStudioFlowMessageFormDialogComponent, {\n data: {\n flow: this.flow,\n entrypoints: this.entrypointsInfo ?? [],\n },\n role: 'alertdialog',\n id: 'gioPsFlowMessageFormDialog',\n })\n .afterClosed()\n : this.matDialog\n .open<GioPolicyStudioFlowProxyFormDialogComponent, GioPolicyStudioFlowProxyFormDialogData, GioPolicyStudioFlowFormDialogResult>(\n GioPolicyStudioFlowProxyFormDialogComponent,\n {\n data: {\n flow: this.flow,\n },\n role: 'alertdialog',\n id: 'gioPsFlowProxyFormDialog',\n },\n )\n .afterClosed();\n\n dialogResult\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 public onStepsChange(flowPhase: 'request' | 'response' | 'publish' | 'subscribe', steps: Step[]): void {\n if (!this.flow) {\n return;\n }\n\n this.flowChange.emit({\n ...this.flow,\n [flowPhase]: steps,\n _hasChanged: true,\n });\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 <gio-ps-flow-details-info-bar class=\"infoBar\" [flow]=\"flow\" [entrypointsInfo]=\"entrypointsInfo\"></gio-ps-flow-details-info-bar>\n\n <div class=\"content\">\n <gio-banner-warning>🚧 Work in progress 🚧</gio-banner-warning>\n\n <mat-tab-group *ngIf=\"apiType === 'MESSAGE'\" class=\"content__tabs\">\n <mat-tab label=\"Initial connection\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [startConnector]=\"entrypointsInfo\"\n [endConnector]=\"endpointsInfo\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"REQUEST\"\n (stepsChange)=\"onStepsChange('request', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Response phase\"\n description=\"Policies will be applied during the connection termination\"\n [startConnector]=\"endpointsInfo\"\n [endConnector]=\"entrypointsInfo\"\n [steps]=\"flow.response ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"RESPONSE\"\n (stepsChange)=\"onStepsChange('response', $event)\"\n ></gio-ps-flow-details-phase>\n </mat-tab>\n <mat-tab label=\"Event messages\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Publish phase\"\n description=\"Policies will be applied on messages sent to the endpoint\"\n [startConnector]=\"entrypointsInfo | gioFilterConnectorsByMode : 'PUBLISH'\"\n [endConnector]=\"endpointsInfo | gioFilterConnectorsByMode : 'PUBLISH'\"\n [steps]=\"flow.publish ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"MESSAGE_RESPONSE\"\n (stepsChange)=\"onStepsChange('publish', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Subscribe phase\"\n description=\"Policies will be applied on messages received by the entrypoint\"\n [startConnector]=\"endpointsInfo | gioFilterConnectorsByMode : 'SUBSCRIBE'\"\n [endConnector]=\"entrypointsInfo | gioFilterConnectorsByMode : 'SUBSCRIBE'\"\n [steps]=\"flow.subscribe ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"MESSAGE_REQUEST\"\n (stepsChange)=\"onStepsChange('subscribe', $event)\"\n ></gio-ps-flow-details-phase>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"apiType === 'PROXY'\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [startConnector]=\"entrypointsInfo | gioFilterConnectorsByMode : 'REQUEST_RESPONSE'\"\n [endConnector]=\"endpointsInfo | gioFilterConnectorsByMode : 'REQUEST_RESPONSE'\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"REQUEST\"\n (stepsChange)=\"onStepsChange('request', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Response phase\"\n description=\"Policies will be applied during the connection termination\"\n [startConnector]=\"endpointsInfo | gioFilterConnectorsByMode : 'REQUEST_RESPONSE'\"\n [endConnector]=\"entrypointsInfo | gioFilterConnectorsByMode : 'REQUEST_RESPONSE'\"\n [steps]=\"flow.response ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"RESPONSE\"\n (stepsChange)=\"onStepsChange('response', $event)\"\n ></gio-ps-flow-details-phase>\n </div>\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) 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 } from 'lodash';\n\nimport { FlowExecution } from '../../models';\n\nexport type GioPolicyStudioFlowExecutionFormDialogData = {\n flowExecution?: FlowExecution;\n};\n\n@Component({\n selector: 'gio-ps-flow-execution-form-dialog',\n templateUrl: './gio-ps-flow-execution-form-dialog.component.html',\n styleUrls: ['./gio-ps-flow-execution-form-dialog.component.scss'],\n})\nexport class GioPolicyStudioFlowExecutionFormDialogComponent {\n public flowExecutionFormGroup?: FormGroup;\n\n public existingFlowExecution?: FlowExecution;\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioFlowExecutionFormDialogComponent, FlowExecution | undefined>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioFlowExecutionFormDialogData,\n ) {\n this.existingFlowExecution = cloneDeep(flowDialogData?.flowExecution);\n\n this.flowExecutionFormGroup = new FormGroup({\n mode: new FormControl(flowDialogData?.flowExecution?.mode ?? 'DEFAULT'),\n matchRequired: new FormControl(flowDialogData?.flowExecution?.matchRequired ?? false),\n });\n }\n\n public onSubmit(): void {\n const flowExecutionToSave: FlowExecution = {\n ...this.existingFlowExecution,\n mode: this.flowExecutionFormGroup?.get('mode')?.value,\n matchRequired: this.flowExecutionFormGroup?.get('matchRequired')?.value,\n };\n\n this.dialogRef.close({\n ...flowExecutionToSave,\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 Flow execution\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<mat-dialog-content *ngIf=\"flowExecutionFormGroup\" class=\"content\" [formGroup]=\"flowExecutionFormGroup\">\n <div class=\"content__row\">\n <gio-banner-info>\n By default, flow selection is based on the operators defined in your flows, either when it “matches with” or “starts with” a path. You\n can choose the \"Best match\" option to select a flow from the closest path.\n </gio-banner-info>\n </div>\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Default flow mode</mat-label>\n <mat-select formControlName=\"mode\">\n <mat-option value=\"BEST_MATCH\">Best Match</mat-option>\n <mat-option value=\"DEFAULT\">Default</mat-option>\n </mat-select>\n <mat-hint>Change how the flow selection is made</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <gio-form-slide-toggle>\n <gio-form-label>Fail on flow mismatch</gio-form-label>\n Respond with an error when requests don’t match any defined flow\n <mat-slide-toggle gioFormSlideToggle formControlName=\"matchRequired\"></mat-slide-toggle>\n </gio-form-slide-toggle>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-stroked-button role=\"dialog\" (click)=\"onSubmit()\">Save</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, OnChanges, Output, SimpleChanges } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { tap } from 'rxjs/operators';\nimport { cloneDeep } from 'lodash';\n\nimport {\n GioPolicyStudioFlowMessageFormDialogComponent,\n GioPolicyStudioFlowMessageFormDialogData,\n} from '../flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component';\nimport { FlowGroupVM, FlowVM } from '../../gio-policy-studio.model';\nimport { ApiType, ChannelSelector, ConnectorInfo, FlowExecution, HttpSelector, Operation } from '../../models';\nimport {\n GioPolicyStudioFlowProxyFormDialogComponent,\n GioPolicyStudioFlowProxyFormDialogData,\n} from '../flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component';\nimport { GioPolicyStudioFlowFormDialogResult } from '../flow-form-dialog/gio-ps-flow-form-dialog-result.model';\nimport {\n GioPolicyStudioFlowExecutionFormDialogComponent,\n GioPolicyStudioFlowExecutionFormDialogData,\n} from '../flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component';\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 apiType!: ApiType;\n\n @Input()\n public flowExecution!: FlowExecution;\n\n @Input()\n public flowsGroups: FlowGroupVM[] = [];\n\n @Input()\n public selectedFlow?: FlowVM = undefined;\n\n @Input()\n public entrypoints: ConnectorInfo[] = [];\n\n @Output()\n public selectedFlowChange = new EventEmitter<FlowVM>();\n\n @Output()\n public flowsGroupsChange = new EventEmitter<FlowGroupVM[]>();\n\n @Output()\n public flowExecutionChange = new EventEmitter<FlowExecution>();\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 = cloneDeep(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(groupId: string, flowId: string): void {\n const flow = this.flowsGroups.find(fg => fg._id === groupId)?.flows.find(f => f._id === flowId);\n if (flow) {\n this.selectedFlowChange.emit(flow);\n }\n }\n\n public onAddFlow(flowGroup: FlowGroupVM): void {\n const dialogResult =\n this.apiType === 'MESSAGE'\n ? this.matDialog\n .open<\n GioPolicyStudioFlowMessageFormDialogComponent,\n GioPolicyStudioFlowMessageFormDialogData,\n GioPolicyStudioFlowFormDialogResult\n >(GioPolicyStudioFlowMessageFormDialogComponent, {\n data: {\n flow: undefined,\n entrypoints: this.entrypoints,\n },\n role: 'alertdialog',\n id: 'gioPsFlowFormDialog',\n })\n .afterClosed()\n : this.matDialog\n .open<GioPolicyStudioFlowProxyFormDialogComponent, GioPolicyStudioFlowProxyFormDialogData, GioPolicyStudioFlowFormDialogResult>(\n GioPolicyStudioFlowProxyFormDialogComponent,\n {\n data: {\n flow: undefined,\n },\n role: 'alertdialog',\n id: 'gioPsFlowFormDialog',\n },\n )\n .afterClosed();\n\n dialogResult\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 public onConfigureExecution(flowExecution: FlowExecution): void {\n const dialogResult = this.matDialog\n .open<GioPolicyStudioFlowExecutionFormDialogComponent, GioPolicyStudioFlowExecutionFormDialogData, FlowExecution | undefined>(\n GioPolicyStudioFlowExecutionFormDialogComponent,\n {\n data: {\n flowExecution,\n },\n role: 'alertdialog',\n id: 'gioPsFlowExecutionFormDialog',\n },\n )\n .afterClosed();\n\n dialogResult\n .pipe(\n tap(edited => {\n if (!edited) {\n return;\n }\n this.flowExecutionChange.emit(edited);\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 class=\"header__configBtn_edit\" mat-stroked-button mat-icon-button (click)=\"onConfigureExecution(flowExecution)\">\n <mat-icon svgIcon=\"gio:settings\"></mat-icon>\n </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(flowsGroup._id, flow._id)\"\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 { cloneDeep, differenceBy, flatten, isEqual, omit, unionBy, uniqueId } from 'lodash';\nimport { EMPTY } from 'rxjs';\n\nimport {\n ApiType,\n ConnectorInfo,\n Flow,\n FlowExecution,\n Plan,\n Policy,\n PolicyDocumentationFetcher,\n PolicySchemaFetcher,\n SaveOutput,\n} from './models';\nimport { FlowGroupVM, FlowVM } from './gio-policy-studio.model';\nimport { GioPolicyStudioService } from './gio-policy-studio.service';\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 /**\n * API type (required)\n */\n @Input()\n public apiType!: ApiType;\n\n /**\n * Flow execution config (required)\n */\n @Input()\n public flowExecution!: FlowExecution;\n\n /**\n * List of entrypoints to display\n */\n @Input()\n public entrypointsInfo: ConnectorInfo[] = [];\n\n /**\n * List of endpoints to display\n */\n @Input()\n public endpointsInfo: ConnectorInfo[] = [];\n\n /**\n * List of common flows to add to common flows group\n */\n @Input()\n public commonFlows: Flow[] = [];\n\n /**\n * List of plans with their flows\n */\n @Input()\n public plans: Plan[] = [];\n\n /**\n * List of policies usable in the policy studio\n */\n @Input()\n public policies: Policy[] = [];\n\n /**\n * Called when Policy Studio needs to fetch the policy schema\n * @returns Observable of the policy schema\n */\n @Input()\n public policySchemaFetcher: PolicySchemaFetcher = () => EMPTY;\n\n /**\n * Called when Policy Studio needs to fetch the policy documentation\n * @returns Observable of the policy documentation\n */\n @Input()\n public policyDocumentationFetcher: PolicyDocumentationFetcher = () => EMPTY;\n\n /**\n * Return what is needed to save.\n **/\n @Output()\n public save = new EventEmitter<SaveOutput>();\n\n public connectorsTooltip = '';\n\n public selectedFlow?: FlowVM = undefined;\n\n public flowsGroups: FlowGroupVM[] = [];\n\n public disableSaveButton = true;\n\n // Used to keep track of initial flows groups to know if there are deleted flows\n private initialFlowsGroups: FlowGroupVM[] = [];\n\n private hasFlowExecutionChanged = false;\n\n constructor(private readonly policyStudioService: GioPolicyStudioService) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.entrypointsInfo || changes.endpointsInfo) {\n this.connectorsTooltip = `Entrypoints: ${(this.entrypointsInfo ?? []).map(e => e.name).join(', ')}\\nEndpoints: ${(\n this.endpointsInfo ?? []\n )\n .map(e => e.name)\n .join(', ')}`;\n }\n\n if (changes.commonFlows || changes.plans) {\n this.disableSaveButton = true;\n this.flowsGroups = getFlowsGroups(this.commonFlows, this.plans);\n this.initialFlowsGroups = cloneDeep(this.flowsGroups);\n\n // Select first flow by default on first load\n this.selectedFlow = this.flowsGroups[0].flows[0];\n }\n\n if (changes.policySchemaFetcher) {\n this.policyStudioService.setPolicySchemaFetcher(this.policySchemaFetcher);\n }\n\n if (changes.policyDocumentationFetcher) {\n this.policyStudioService.setPolicyDocumentationFetcher(this.policyDocumentationFetcher);\n }\n }\n\n public onFlowExecutionChange(flowExecution: FlowExecution): void {\n this.hasFlowExecutionChanged = !isEqual(this.flowExecution, flowExecution);\n if (this.hasFlowExecutionChanged) {\n this.disableSaveButton = false;\n this.flowExecution = flowExecution;\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\n this.selectedFlow = flatten(this.flowsGroups.map(flowGroup => flowGroup.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, this.initialFlowsGroups);\n\n // Emit plans only if they have been updated\n const plansToUpdate = getPlansChangeOutput(this.flowsGroups, this.initialFlowsGroups);\n\n this.save.emit({\n ...(commonFlows ? { commonFlows } : {}),\n ...(plansToUpdate ? { plansToUpdate } : {}),\n ...(this.hasFlowExecutionChanged ? { flowExecution: this.flowExecution } : {}),\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 _planId: plan.id,\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[], initialFlowsGroups: FlowGroupVM[]): Flow[] | null => {\n const commonFlowsGroup = flowsGroups.find(flowGroup => flowGroup._id === 'flowsGroup_commonFlow');\n const initialCommonFlowsGroup = initialFlowsGroups.find(flowGroup => flowGroup._id === 'flowsGroup_commonFlow');\n // Check if common flows have been updated\n const hasChanged = commonFlowsGroup?.flows.some(flow => flow._hasChanged);\n\n // Check if common flows have been deleted\n const hasDeletedFlow = differenceBy(initialCommonFlowsGroup?.flows ?? [], commonFlowsGroup?.flows ?? [], '_id').length > 0;\n\n return hasChanged || hasDeletedFlow ? (commonFlowsGroup?.flows ?? []).map(flow => omit(flow, '_id', '_hasChanged')) : null;\n};\n\nconst getPlansChangeOutput = (flowsGroups: FlowGroupVM[], initialFlowsGroups: FlowGroupVM[]): Plan[] | null => {\n const plansGroups = flowsGroups.filter(flowGroup => flowGroup._id !== 'flowsGroup_commonFlow');\n const initialPlansGroups = initialFlowsGroups.filter(flowGroup => flowGroup._id !== 'flowsGroup_commonFlow');\n\n // Get plans with changed flows\n const plansGroupsWithChangedFlows = plansGroups.filter(plan => plan.flows.some(flow => flow._hasChanged));\n\n // Get plans with deleted flows\n const plansGroupsWithDeletedFlows: FlowGroupVM[] = [];\n\n // Check if there are deleted flows in initial initialPlansGroups\n initialPlansGroups.forEach(plan => {\n const planGroupToCompare = plansGroups.find(p => p._planId === plan._planId);\n if (planGroupToCompare && differenceBy(plan.flows, planGroupToCompare?.flows ?? [], '_id').length > 0) {\n // If there are deleted flows, we need to return the complete plan with the new flows\n plansGroupsWithDeletedFlows.push(planGroupToCompare);\n }\n });\n\n // Merge plans with changed flows and plans with deleted flows\n const plansWithChangedFlowsOutput = unionBy([...plansGroupsWithChangedFlows, ...plansGroupsWithDeletedFlows], '_planId').map(plan => ({\n ...omit(plan, '_id', '_icon', '_planId'),\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- planId is always defined\n id: plan._planId!,\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 [apiType]=\"apiType\"\n [flowExecution]=\"flowExecution\"\n [flowsGroups]=\"flowsGroups\"\n [entrypoints]=\"entrypointsInfo\"\n (flowsGroupsChange)=\"onFlowsGroupsChange($event)\"\n (flowExecutionChange)=\"onFlowExecutionChange($event)\"\n [(selectedFlow)]=\"selectedFlow\"\n ></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details\n [apiType]=\"apiType\"\n [flow]=\"selectedFlow\"\n [entrypointsInfo]=\"entrypointsInfo\"\n [endpointsInfo]=\"endpointsInfo\"\n [policies]=\"policies\"\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 { GioBannerModule, GioFormSlideToggleModule, GioFormTagsInputModule, 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';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatMenuModule } from '@angular/material/menu';\n\nimport { GioPolicyStudioFlowMessageFormDialogComponent } from './components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-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';\nimport { GioPolicyStudioFlowProxyFormDialogComponent } from './components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component';\nimport { GioPolicyStudioDetailsInfoBarComponent } from './components/flow-details-info-bar/gio-ps-flow-details-info-bar.component';\nimport { GioPolicyStudioDetailsPhaseStepComponent } from './components/flow-details-phase-step/gio-ps-flow-details-phase-step.component';\nimport { GioPolicyStudioDetailsPhaseComponent } from './components/flow-details-phase/gio-ps-flow-details-phase.component';\nimport { GioPolicyStudioFlowExecutionFormDialogComponent } from './components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component';\nimport { GioFilterConnectorsByModePipe } from './components/filter-pipe/gio-flter-connectors-by-mode.pipe';\nimport { GioPolicyStudioPoliciesCatalogDialogComponent } from './components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component';\nimport { GioPolicyStudioStepEditDialogComponent } from './components/step-edit-dialog/gio-ps-step-edit-dialog.component';\nimport { GioPolicyStudioStepFormComponent } from './components/step-form/gio-ps-step-form.component';\nimport { GioPolicyStudioService } from './gio-policy-studio.service';\n\n@NgModule({\n declarations: [\n GioPolicyStudioComponent,\n GioPolicyStudioFlowsMenuComponent,\n GioPolicyStudioDetailsComponent,\n GioPolicyStudioFlowExecutionFormDialogComponent,\n GioPolicyStudioFlowMessageFormDialogComponent,\n GioPolicyStudioFlowProxyFormDialogComponent,\n GioPolicyStudioDetailsInfoBarComponent,\n GioPolicyStudioDetailsPhaseComponent,\n GioPolicyStudioDetailsPhaseStepComponent,\n GioFilterConnectorsByModePipe,\n GioPolicyStudioPoliciesCatalogDialogComponent,\n GioPolicyStudioStepEditDialogComponent,\n GioPolicyStudioStepFormComponent,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatButtonModule,\n MatTooltipModule,\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n MatSlideToggleModule,\n MatDialogModule,\n MatTabsModule,\n MatMenuModule,\n\n GioIconsModule,\n GioFormSlideToggleModule,\n GioFormTagsInputModule,\n GioBannerModule,\n ],\n exports: [GioPolicyStudioComponent],\n providers: [GioPolicyStudioService],\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;;;;;;;;;;;;;;;MAgBa,WAAW,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAW;MAGjH,YAAY,GAA8C,CAAC,KAAa;IACnF,QAAQ,KAAK;QACX,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,SAAS,CAAC;KACpB;AACH;;AC5CA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;MAkCa,6CAA6C;IAOxD,YACS,SAA2G,EACzF,cAAwD;;QAD1E,cAAS,GAAT,SAAS,CAAkG;QAP7G,gBAAW,GAAoB,EAAE,CAAC;QAIlC,SAAI,GAAsB,QAAQ,CAAC;QAMxC,IAAI,CAAC,WAAW,GAAG,MAAA,cAAc,aAAd,cAAc,uBAAd,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ACf,gBAAgB;wBAChB,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBACf,oBAAoB;wBACpB,eAAe;wBACf,aAAa;wBACb,aAAa;wBAEb,cAAc;wBACd,wBAAwB;wBACxB,sBAAsB;wBACtB,eAAe;qBAChB;oBACD,OAAO,EAAE,CAAC,wBAAwB,CAAC;oBACnC,SAAS,EAAE,CAAC,sBAAsB,CAAC;iBACpC;;;ACjFD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"gravitee-ui-policy-studio-angular.mjs","sources":["../../../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/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/policy/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/index.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.component.html","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.service.ts","../../../projects/ui-policy-studio-angular/src/lib/components/step-form/gio-ps-step-form.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/step-form/gio-ps-step-form.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/filter-pipe/gio-flter-connectors-by-mode.pipe.ts","../../../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/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.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) 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 const HttpMethods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE', 'OTHER'] as const;\nexport type HttpMethod = (typeof HttpMethods)[number];\n\nexport const toHttpMethod: (value: string) => HttpMethod | undefined = (value: string) => {\n switch (value) {\n case 'CONNECT':\n return 'CONNECT';\n case 'DELETE':\n return 'DELETE';\n case 'GET':\n return 'GET';\n case 'HEAD':\n return 'HEAD';\n case 'OPTIONS':\n return 'OPTIONS';\n case 'PATCH':\n return 'PATCH';\n case 'POST':\n return 'POST';\n case 'PUT':\n return 'PUT';\n case 'TRACE':\n return 'TRACE';\n case 'OTHER':\n return 'OTHER';\n default:\n return undefined;\n }\n};\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) 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) 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 './Policy';\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';\nexport * from './policy';\n\nexport * from './ConnectorsInfo';\nexport * from './SaveOutput';\nexport * from './PolicySchemaFetcher';\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, ConnectorInfo } from '../../../models';\nimport { GioPolicyStudioFlowFormDialogResult } from '../gio-ps-flow-form-dialog-result.model';\n\nexport type GioPolicyStudioFlowMessageFormDialogData = {\n flow?: FlowVM;\n entrypoints?: ConnectorInfo[];\n};\n\n@Component({\n selector: 'gio-ps-flow-message-form-dialog',\n templateUrl: './gio-ps-flow-message-form-dialog.component.html',\n styleUrls: ['./gio-ps-flow-message-form-dialog.component.scss'],\n})\nexport class GioPolicyStudioFlowMessageFormDialogComponent {\n public entrypoints: ConnectorInfo[] = [];\n public flowFormGroup?: FormGroup;\n\n public existingFlow?: FlowVM;\n public mode: 'create' | 'edit' = 'create';\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioFlowMessageFormDialogComponent, GioPolicyStudioFlowFormDialogResult>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioFlowMessageFormDialogData,\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 channelSelectorToSave: 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 ? [channelSelectorToSave, conditionSelectorToSave] : [channelSelectorToSave],\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.type\">{{ entrypoint.name }}</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) 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 { ConditionSelector, HttpMethod, HttpMethods, HttpSelector } from '../../../models';\nimport { GioPolicyStudioFlowFormDialogResult } from '../gio-ps-flow-form-dialog-result.model';\n\nexport type GioPolicyStudioFlowProxyFormDialogData = {\n flow?: FlowVM;\n};\n\ntype HttpMethodVM = HttpMethod | 'ALL';\n\nconst METHODS_AUTOCOMPLETE: HttpMethodVM[] = ['ALL', ...HttpMethods];\n\n@Component({\n selector: 'gio-ps-flow-proxy-form-dialog',\n templateUrl: './gio-ps-flow-proxy-form-dialog.component.html',\n styleUrls: ['./gio-ps-flow-proxy-form-dialog.component.scss'],\n})\nexport class GioPolicyStudioFlowProxyFormDialogComponent {\n public flowFormGroup?: FormGroup;\n\n public existingFlow?: FlowVM;\n public mode: 'create' | 'edit' = 'create';\n public methods = METHODS_AUTOCOMPLETE;\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioFlowProxyFormDialogComponent, GioPolicyStudioFlowFormDialogResult>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioFlowProxyFormDialogData,\n ) {\n this.existingFlow = cloneDeep(flowDialogData?.flow);\n this.mode = this.existingFlow ? 'edit' : 'create';\n\n const httpSelector = flowDialogData?.flow?.selectors?.find(s => s.type === 'HTTP') as HttpSelector;\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 pathOperator: new FormControl(httpSelector?.pathOperator ?? 'EQUALS'),\n path: new FormControl(sanitizePathFormValue(httpSelector?.path)),\n methods: new FormControl(sanitizeMethodFormValue(httpSelector?.methods)),\n condition: new FormControl(conditionSelector?.condition ?? ''),\n });\n }\n\n public onSubmit(): void {\n const httpSelectorToSave: HttpSelector = {\n type: 'HTTP',\n path: sanitizePath(this.flowFormGroup?.get('path')?.value),\n pathOperator: this.flowFormGroup?.get('pathOperator')?.value,\n methods: sanitizeMethods(this.flowFormGroup?.get('methods')?.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 ? [httpSelectorToSave, conditionSelectorToSave] : [httpSelectorToSave],\n enabled: true,\n };\n\n this.dialogRef.close({\n ...flowToSave,\n });\n }\n\n public tagValidationHook(tag: string, validationCb: (shouldAddTag: boolean) => void) {\n validationCb(METHODS_AUTOCOMPLETE.map(m => `${m}`).includes(tag.toUpperCase()));\n }\n}\n\nconst sanitizeMethods: (value: HttpMethodVM[]) => HttpMethod[] = (value?: HttpMethodVM[]) => {\n if (!value || value.find(m => m === 'ALL')) return [];\n return value as HttpMethod[];\n};\n\nconst sanitizeMethodFormValue: (methods?: HttpMethod[]) => HttpMethodVM[] = (methods?: HttpMethod[]) => {\n if (!methods || methods.length === 0) return ['ALL'];\n return methods;\n};\n\nexport const sanitizePath = (path: string) => {\n if (!path || !path.startsWith('/')) {\n return `/${path}`;\n }\n return path;\n};\n\nconst sanitizePathFormValue = (path: string | undefined) => {\n if (path && path.startsWith('/')) {\n return path.substring(1);\n }\n return path ?? '';\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>\n Flows allow you to apply different policies per HTTP path and/or method. For example you can reroute calls based on the URL specified.\n </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 path and method 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=\"pathOperator\">\n <mat-option value=\"EQUALS\">Equals</mat-option>\n <mat-option value=\"STARTS_WITH\">Starts with</mat-option>\n </mat-select>\n <mat-hint>Path operator</mat-hint>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Path</mat-label>\n <span matPrefix>/</span>\n <input matInput formControlName=\"path\" />\n <mat-hint>Path</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Methods for your flow</mat-label>\n <gio-form-tags-input\n formControlName=\"methods\"\n [autocompleteOptions]=\"methods\"\n [tagValidationHook]=\"tagValidationHook\"\n ></gio-form-tags-input>\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, Input } from '@angular/core';\n\nimport { FlowVM } from '../../gio-policy-studio.model';\nimport { ChannelSelector, ConditionSelector, ConnectorInfo, HttpSelector, Operation } from '../../models';\n\n@Component({\n selector: 'gio-ps-flow-details-info-bar',\n templateUrl: './gio-ps-flow-details-info-bar.component.html',\n styleUrls: ['./gio-ps-flow-details-info-bar.component.scss'],\n})\nexport class GioPolicyStudioDetailsInfoBarComponent {\n @Input()\n public flow?: FlowVM = undefined;\n\n @Input()\n public entrypointsInfo: ConnectorInfo[] = [];\n\n public get condition(): string | undefined {\n const conditionSelector = this.flow?.selectors?.find(s => s.type === 'CONDITION') as ConditionSelector;\n if (!conditionSelector) {\n return undefined;\n }\n return conditionSelector?.condition;\n }\n\n // MESSAGE API type\n\n public get operations(): string[] | undefined {\n const channelSelector = this.flow?.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector;\n if (!channelSelector) {\n return undefined;\n }\n const operationToBadge: Record<Operation, string> = {\n PUBLISH: 'PUB',\n SUBSCRIBE: 'SUB',\n };\n return channelSelector?.operations?.map(o => operationToBadge[o]).sort();\n }\n\n public get channel(): string | undefined {\n const channelSelector = this.flow?.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector;\n if (!channelSelector) {\n return undefined;\n }\n return channelSelector?.channel;\n }\n\n public get channelOperator(): string | undefined {\n const channelSelector = this.flow?.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector;\n if (!channelSelector) {\n return undefined;\n }\n return channelSelector?.channelOperator;\n }\n\n // PROXY API type\n\n public get path(): string | undefined {\n const httpSelector = this.flow?.selectors?.find(s => s.type === 'HTTP') as HttpSelector;\n if (!httpSelector) {\n return undefined;\n }\n return httpSelector?.path;\n }\n\n public get pathOperator(): string | undefined {\n const httpSelector = this.flow?.selectors?.find(s => s.type === 'HTTP') as HttpSelector;\n if (!httpSelector) {\n return undefined;\n }\n return httpSelector?.pathOperator;\n }\n\n public get methods(): string[] | undefined {\n const httpSelector = this.flow?.selectors?.find(s => s.type === 'HTTP') as HttpSelector;\n if (!httpSelector) {\n return undefined;\n }\n return httpSelector?.methods?.length ? httpSelector?.methods : ['ALL'];\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<div *ngIf=\"flow?.name\" class=\"info\">\n <span class=\"info__label\">Name</span>\n <span class=\"info__value strong\">{{ flow?.name }}</span>\n</div>\n\n<div *ngIf=\"entrypointsInfo\" class=\"info\">\n <span class=\"info__label\">Entrypoints</span>\n <span *ngFor=\"let entrypoint of entrypointsInfo\" class=\"info__value gio-badge-neutral\">\n <mat-icon [svgIcon]=\"entrypoint.icon\"></mat-icon>\n {{ entrypoint.name }}</span\n >\n</div>\n\n<!-- MESSAGE API type -->\n\n<div *ngIf=\"operations\" class=\"info\">\n <span class=\"info__label\">Operations</span>\n <span *ngFor=\"let operation of operations\" class=\"info__value gio-badge-neutral\"> {{ operation }}</span>\n</div>\n\n<div *ngIf=\"channel\" class=\"info\">\n <span class=\"info__label\">Channel</span>\n <span class=\"info__value strong\">{{ channel }}</span>\n</div>\n\n<div *ngIf=\"channelOperator\" class=\"info\">\n <span class=\"info__label\">Channel Operator</span>\n <span class=\"info__value gio-badge-neutral\">{{ channelOperator }}</span>\n</div>\n\n<!-- PROXY API type -->\n\n<div *ngIf=\"path\" class=\"info\">\n <span class=\"info__label\">Path</span>\n <span class=\"info__value strong\">{{ path }}</span>\n</div>\n\n<div *ngIf=\"pathOperator\" class=\"info\">\n <span class=\"info__label\">Path Operator</span>\n <span class=\"info__value gio-badge-neutral\">{{ pathOperator }}</span>\n</div>\n\n<div *ngIf=\"methods\" class=\"info\">\n <span class=\"info__label\">HTTP methods</span>\n <span *ngFor=\"let method of methods\" class=\"info__value gio-badge-neutral\"> {{ method }}</span>\n</div>\n\n<!-- Condition -->\n\n<div *ngIf=\"condition\" class=\"info\">\n <span class=\"info__label\">Condition</span>\n <span class=\"info__value gio-badge-neutral\">{{ condition }}</span>\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 */\n\nimport { Inject } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { shareReplay } from 'rxjs/operators';\n\nimport { Policy, PolicySchemaFetcher } from './models';\n\n@Inject({})\nexport class GioPolicyStudioService {\n private schemasCache: Record<string, unknown> = {};\n private documentationsCache: Record<string, unknown> = {};\n\n private policySchemaFetcher?: PolicySchemaFetcher;\n private policyDocumentationFetcher?: PolicySchemaFetcher;\n\n public setPolicySchemaFetcher(policySchemaFetcher: PolicySchemaFetcher) {\n this.policySchemaFetcher = policySchemaFetcher;\n }\n\n public setPolicyDocumentationFetcher(policyDocumentationFetcher: PolicySchemaFetcher) {\n this.policyDocumentationFetcher = policyDocumentationFetcher;\n }\n\n /**\n * Call the policy schema fetcher to get the schema for the given policy. If the\n * schema has already been fetched, it will be returned from the cache.\n *\n * @param policy to get the schema for\n * @returns the schema for the policy\n */\n public getPolicySchema(policy: Policy): Observable<unknown> {\n if (!this.policySchemaFetcher) throw new Error('PolicySchemaFetcher not defined!');\n\n if (this.schemasCache[policy.id]) {\n return of(this.schemasCache[policy.id]).pipe(shareReplay(1));\n }\n\n return this.policySchemaFetcher(policy);\n }\n\n /**\n * Call the policy documentation fetcher to get the documentation for the given policy. If the\n * documentation has already been fetched, it will be returned from the cache.\n *\n * @param policy to get the documentation for\n * @returns the documentation for the policy\n */\n public getPolicyDocumentation(policy: Policy): Observable<unknown> {\n if (!this.policyDocumentationFetcher) throw new Error('PolicyDocumentationFetcher not defined!');\n\n if (this.documentationsCache[policy.id]) {\n return of(this.documentationsCache[policy.id]).pipe(shareReplay(1));\n }\n\n return this.policyDocumentationFetcher(policy);\n }\n}\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, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { startWith, takeUntil } from 'rxjs/operators';\nimport { Subject } from 'rxjs';\n\nimport { GioPolicyStudioService } from '../../gio-policy-studio.service';\nimport { Policy, Step } from '../../models';\n\n@Component({\n selector: 'gio-ps-step-form',\n templateUrl: './gio-ps-step-form.component.html',\n styleUrls: ['./gio-ps-step-form.component.scss'],\n})\nexport class GioPolicyStudioStepFormComponent implements OnChanges, OnInit, OnDestroy {\n @Input()\n public step?: Step;\n\n @Input()\n public policy!: Policy;\n\n @Output()\n public stepChange = new EventEmitter<Step>();\n\n @Output()\n public isValid = new EventEmitter<boolean>();\n\n public policySchema$?: unknown;\n public policyDocumentation$?: unknown;\n\n public stepForm?: FormGroup;\n\n private unsubscribe$ = new Subject<void>();\n constructor(private readonly policyStudioService: GioPolicyStudioService) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.policy) {\n this.policySchema$ = this.policyStudioService.getPolicySchema(this.policy);\n this.policyDocumentation$ = this.policyStudioService.getPolicyDocumentation(this.policy);\n }\n\n if (changes.step && !changes.step.firstChange) {\n this.initStepForm();\n }\n }\n\n public ngOnInit(): void {\n this.initStepForm();\n }\n\n public ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n\n private initStepForm(): void {\n this.stepForm = new FormGroup({\n description: new FormControl(this.step?.description, []),\n });\n\n this.stepForm.valueChanges.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {\n this.stepChange.emit({\n ...this.step,\n description: this.stepForm?.get('description')?.value,\n });\n });\n\n this.stepForm.statusChanges.pipe(takeUntil(this.unsubscribe$), startWith(this.stepForm.status)).subscribe(valid => {\n this.isValid.emit(valid === 'VALID');\n });\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=\"settings\">\n <div class=\"settings__header\">Settings</div>\n\n <div *ngIf=\"stepForm\" class=\"settings__content\" [formGroup]=\"stepForm\">\n <mat-form-field>\n <mat-label>Description</mat-label>\n <input matInput formControlName=\"description\" cdkFocusInitial />\n <mat-hint>Describe how your policy works.</mat-hint>\n </mat-form-field>\n\n <ng-container *ngIf=\"policySchema$\">\n {{ $any(policySchema$) | async | json }}\n </ng-container>\n </div>\n</div>\n\n<div class=\"documentation\">\n <div class=\"documentation__header\">Documentation</div>\n\n <div class=\"documentation__content\">\n <ng-container *ngIf=\"policyDocumentation$\">\n {{ $any(policyDocumentation$) | async }}\n </ng-container>\n </div>\n</div>\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';\n\nimport { ApiType, ExecutionPhase, Policy, Step } from '../../models';\n\nexport type GioPolicyStudioPoliciesCatalogDialogData = {\n policies: Policy[];\n executionPhase: ExecutionPhase;\n apiType: ApiType;\n};\n\nexport type GioPolicyStudioPoliciesCatalogDialogResult = undefined | Step;\n\nconst executionPhaseLabels: Record<ExecutionPhase, string> = {\n REQUEST: 'Request',\n RESPONSE: 'Response',\n MESSAGE_REQUEST: 'Publish',\n MESSAGE_RESPONSE: 'Subscribe',\n};\n\n@Component({\n selector: 'gio-ps-policies-catalog-dialog',\n templateUrl: './gio-ps-policies-catalog-dialog.component.html',\n styleUrls: ['./gio-ps-policies-catalog-dialog.component.scss'],\n})\nexport class GioPolicyStudioPoliciesCatalogDialogComponent {\n public policies: Policy[] = [];\n\n public executionPhaseLabel!: string;\n\n public selectedPolicy?: Policy;\n\n public stepToAdd?: Step;\n\n public isValid = false;\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioPoliciesCatalogDialogComponent, GioPolicyStudioPoliciesCatalogDialogResult>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioPoliciesCatalogDialogData,\n ) {\n this.policies = flowDialogData.policies.filter(policy => {\n if (flowDialogData.apiType === 'PROXY') {\n return policy.proxy?.includes(flowDialogData.executionPhase);\n }\n return policy.message?.includes(flowDialogData.executionPhase);\n });\n this.executionPhaseLabel = executionPhaseLabels[flowDialogData.executionPhase];\n }\n\n public onSelectPolicy(policy: Policy) {\n this.selectedPolicy = policy;\n }\n\n public onAddPolicy() {\n this.dialogRef.close({\n ...this.stepToAdd,\n name: this.selectedPolicy?.name,\n enabled: true,\n policy: this.selectedPolicy?.id,\n });\n }\n\n public onGoBack() {\n this.selectedPolicy = undefined;\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 Policies for <span class=\"title__phase\">{{ executionPhaseLabel }}</span> phase\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<mat-dialog-content *ngIf=\"!selectedPolicy\" class=\"policiesCatalog\">\n <div *ngFor=\"let policy of policies\" class=\"policiesCatalog__policy\">\n <div class=\"policiesCatalog__policy__head\">\n <mat-icon class=\"policiesCatalog__policy__head__icon\" [svgIcon]=\"policy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"policy.name\" class=\"policiesCatalog__policy__head__name\">{{ policy.name }}</span>\n </div>\n\n <div *ngIf=\"policy.description\" class=\"policiesCatalog__policy__description\">{{ policy.description }}</div>\n\n <button class=\"policiesCatalog__policy__selectBtn\" mat-stroked-button role=\"dialog\" (click)=\"onSelectPolicy(policy)\">Select</button>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-content *ngIf=\"selectedPolicy\" class=\"policyForm\">\n <button class=\"policyForm__goBackBtn\" mat-stroked-button (click)=\"onGoBack()\">\n <mat-icon svgIcon=\"gio:arrow-left\"></mat-icon>\n Go back\n </button>\n\n <div class=\"policyForm__info\">\n <div class=\"policyForm__info__head\">\n <mat-icon class=\"policyForm__info__head__icon\" [svgIcon]=\"selectedPolicy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"selectedPolicy.name\" class=\"policyForm__info__head__name\">{{ selectedPolicy.name }}</span>\n </div>\n\n <div *ngIf=\"selectedPolicy.description\" class=\"policyForm__info__description\">{{ selectedPolicy.description }}</div>\n </div>\n\n <gio-ps-step-form [policy]=\"selectedPolicy\" [(step)]=\"stepToAdd\" (isValid)=\"isValid = $event\"></gio-ps-step-form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"\">Cancel</button>\n <button\n *ngIf=\"selectedPolicy\"\n class=\"actions__addBtn\"\n color=\"primary\"\n mat-stroked-button\n role=\"dialog\"\n [disabled]=\"!isValid\"\n (click)=\"onAddPolicy()\"\n >\n Add policy\n </button>\n</mat-dialog-actions>\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';\n\nimport { Policy, Step } from '../../models';\n\nexport type GioPolicyStudioStepEditDialogData = {\n policy: Policy;\n step: Step;\n};\n\nexport type GioPolicyStudioStepEditDialogResult = undefined | Step;\n\n@Component({\n selector: 'gio-ps-step-edit-dialog',\n templateUrl: './gio-ps-step-edit-dialog.component.html',\n styleUrls: ['./gio-ps-step-edit-dialog.component.scss'],\n})\nexport class GioPolicyStudioStepEditDialogComponent {\n public policy!: Policy;\n public step!: Step;\n\n public isValid = false;\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioStepEditDialogComponent, GioPolicyStudioStepEditDialogResult>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioStepEditDialogData,\n ) {\n this.policy = flowDialogData.policy;\n this.step = flowDialogData.step;\n }\n\n public onSave(): void {\n this.dialogRef.close({\n ...this.step,\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 <mat-icon class=\"title__icon\" [svgIcon]=\"policy.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"step.name\" class=\"title__name\">{{ step.name }}</span>\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n\n <div class=\"title__description\">\n {{ policy.description }}\n </div>\n</h2>\n\n<mat-dialog-content class=\"content\">\n <gio-ps-step-form [policy]=\"policy\" [(step)]=\"step\" (isValid)=\"isValid = $event\"></gio-ps-step-form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-stroked-button role=\"dialog\" (click)=\"onSave()\" [disabled]=\"!isValid\">Save</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, OnChanges, Output, SimpleChanges } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Policy, Step } from '../../models';\nimport {\n GioPolicyStudioStepEditDialogComponent,\n GioPolicyStudioStepEditDialogData,\n GioPolicyStudioStepEditDialogResult,\n} from '../step-edit-dialog/gio-ps-step-edit-dialog.component';\n\n@Component({\n selector: 'gio-ps-flow-details-phase-step',\n templateUrl: './gio-ps-flow-details-phase-step.component.html',\n styleUrls: ['./gio-ps-flow-details-phase-step.component.scss'],\n})\nexport class GioPolicyStudioDetailsPhaseStepComponent implements OnChanges {\n @Input()\n public step!: Step;\n\n @Input()\n public policies: Policy[] = [];\n\n @Output()\n public stepChange = new EventEmitter<Step>();\n\n @Output()\n public deleted = new EventEmitter<void>();\n\n public policy?: Policy;\n\n constructor(private readonly matDialog: MatDialog) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.policies || changes.step) {\n this.policy = this.policies.find(policy => policy.id === this.step.policy);\n }\n }\n\n public onEdit() {\n if (!this.policy) {\n // TODO: Handle UseCase when policy is not found. (Like if the plugin is removed from the BackEnd)\n return;\n }\n\n this.matDialog\n .open<GioPolicyStudioStepEditDialogComponent, GioPolicyStudioStepEditDialogData, GioPolicyStudioStepEditDialogResult>(\n GioPolicyStudioStepEditDialogComponent,\n {\n data: {\n policy: this.policy,\n step: this.step,\n },\n role: 'alertdialog',\n id: 'gioPolicyStudioPolicyFormDialog',\n width: '1000px',\n },\n )\n .afterClosed()\n .subscribe(stepToEdit => {\n if (!stepToEdit) {\n return;\n }\n\n this.stepChange.emit(stepToEdit);\n });\n }\n\n public onDisable() {\n throw new Error('Wip');\n }\n\n public onDelete() {\n this.deleted.emit();\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=\"info\">\n <div class=\"info__head\">\n <mat-icon class=\"info__head__icon\" [svgIcon]=\"policy?.icon ?? 'gio:puzzle'\"></mat-icon>\n\n <span *ngIf=\"step.name\" class=\"info__head__name\">{{ step.name }}</span>\n </div>\n\n <div *ngIf=\"step.description\" class=\"info__description\">{{ step.description }}</div>\n</div>\n\n<button class=\"menuBtn\" mat-icon-button [matMenuTriggerFor]=\"policyMenu\"><mat-icon svgIcon=\"gio:more-vertical\"></mat-icon></button>\n\n<mat-menu #policyMenu=\"matMenu\">\n <button mat-menu-item (click)=\"onEdit()\">\n <mat-icon svgIcon=\"gio:edit-pencil\"></mat-icon>\n <span>Edit</span>\n </button>\n\n <button disabled mat-menu-item (click)=\"onDisable()\">\n <mat-icon svgIcon=\"gio:prohibition\"></mat-icon>\n <span>Disable 🚧</span>\n </button>\n\n <button mat-menu-item (click)=\"onDelete()\">\n <mat-icon svgIcon=\"gio:trash\"></mat-icon>\n <span>Delete</span>\n </button>\n</mat-menu>\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 { isEmpty } from 'lodash';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { ApiType, ConnectorInfo, ExecutionPhase, Policy, Step } from '../../models';\nimport {\n GioPolicyStudioPoliciesCatalogDialogComponent,\n GioPolicyStudioPoliciesCatalogDialogData,\n GioPolicyStudioPoliciesCatalogDialogResult,\n} from '../policies-catalog-dialog/gio-ps-policies-catalog-dialog.component';\n\ntype StepVM =\n | {\n type: 'connectors';\n connectors: {\n name?: string;\n icon?: string;\n }[];\n }\n | {\n type: 'step';\n step: Step;\n index: number;\n };\n\n@Component({\n selector: 'gio-ps-flow-details-phase',\n templateUrl: './gio-ps-flow-details-phase.component.html',\n styleUrls: ['./gio-ps-flow-details-phase.component.scss'],\n})\nexport class GioPolicyStudioDetailsPhaseComponent implements OnChanges {\n @Input()\n public steps: Step[] = [];\n\n @Input()\n public name!: string;\n\n @Input()\n public description!: string;\n\n @Input()\n public startConnector: ConnectorInfo[] = [];\n\n @Input()\n public endConnector: ConnectorInfo[] = [];\n\n @Input()\n public apiType!: ApiType;\n\n @Input()\n public policies: Policy[] = [];\n\n @Input()\n public policyExecutionPhase!: ExecutionPhase;\n\n @Output()\n public stepsChange = new EventEmitter<Step[]>();\n\n public stepsVM: StepVM[] = [];\n\n public isDisabled = false;\n\n constructor(private readonly matDialog: MatDialog) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.steps || changes.startConnector || changes.endConnector) {\n this.stepsVM = [\n {\n type: 'connectors',\n connectors: this.startConnector.map(connector => ({\n name: connector.name,\n icon: connector.icon,\n })),\n },\n\n ...(this.steps ?? []).map((step, index) => ({\n type: 'step' as const,\n step: step,\n index,\n })),\n\n {\n type: 'connectors',\n connectors: this.endConnector.map(connector => ({\n name: connector.name,\n icon: connector.icon,\n })),\n },\n ];\n\n // Disable phase if there are not start & end connectors\n this.isDisabled = this.stepsVM.filter(step => step.type === 'connectors' && !isEmpty(step.connectors)).length < 2;\n }\n }\n\n public onAddPolicy(index: number): void {\n this.matDialog\n .open<\n GioPolicyStudioPoliciesCatalogDialogComponent,\n GioPolicyStudioPoliciesCatalogDialogData,\n GioPolicyStudioPoliciesCatalogDialogResult\n >(GioPolicyStudioPoliciesCatalogDialogComponent, {\n data: {\n policies: this.policies,\n executionPhase: this.policyExecutionPhase,\n apiType: this.apiType,\n },\n role: 'alertdialog',\n id: 'gioPolicyStudioPoliciesCatalogDialog',\n width: '1000px',\n })\n .afterClosed()\n .subscribe(stepToAdd => {\n if (!this.steps || !stepToAdd) {\n return;\n }\n // Add Step after the given index\n this.stepsChange.emit([...this.steps.slice(0, index + 1), stepToAdd, ...this.steps.slice(index + 1)]);\n });\n }\n\n public onStepChange(index: number, stepToEdit: Step): void {\n if (!this.steps) {\n return;\n }\n // Replace the step at the given index\n this.stepsChange.emit([...this.steps.slice(0, index), stepToEdit, ...this.steps.slice(index + 1)]);\n }\n\n public onStepDeleted(index: number): void {\n if (!this.steps) {\n return;\n }\n this.stepsChange.emit([...this.steps.slice(0, index), ...this.steps.slice(index + 1)]);\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 <span class=\"header__name\">\n {{ name }}\n </span>\n <span class=\"header__description\">\n {{ description }}\n </span>\n\n <span *ngIf=\"isDisabled\" class=\"header__infoIcon\" matTooltip=\"Policies might not be evaluated\" matTooltipPosition=\"before\">\n <mat-icon svgIcon=\"gio:info\"></mat-icon>\n </span>\n</div>\n\n<div *ngIf=\"!isDisabled; else disabledPhaseContent\" class=\"wrapper\">\n <div class=\"content\">\n <div *ngFor=\"let stepVM of stepsVM; first as isFirst\" class=\"content__step\">\n <!-- Connector -->\n <ng-container *ngIf=\"stepVM.type === 'connectors'\">\n <div class=\"content__step__connector\">\n <span *ngFor=\"let connector of stepVM.connectors\" class=\"gio-badge-white content__step__connector__badge\">\n <mat-icon *ngIf=\"connector.icon\" [svgIcon]=\"connector.icon\" class=\"content__step__connector__badge__icon\"></mat-icon>\n {{ connector.name }}\n </span>\n </div>\n\n <!-- Add policy button after first connector -->\n <ng-container *ngIf=\"isFirst\">\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n <button class=\"content__step__addBtn\" mat-icon-button (click)=\"onAddPolicy(-1)\"><mat-icon svgIcon=\"gio:plus\"></mat-icon></button>\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n </ng-container>\n </ng-container>\n\n <!-- Policy -->\n <ng-container *ngIf=\"stepVM.type === 'step'\">\n <gio-ps-flow-details-phase-step\n class=\"content__step__step\"\n [policies]=\"policies\"\n [step]=\"stepVM.step\"\n (stepChange)=\"onStepChange(stepVM.index, $event)\"\n (deleted)=\"onStepDeleted(stepVM.index)\"\n ></gio-ps-flow-details-phase-step>\n\n <!-- Add policy button -->\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n <button class=\"content__step__addBtn\" mat-icon-button (click)=\"onAddPolicy(stepVM.index)\">\n <mat-icon svgIcon=\"gio:plus\"></mat-icon>\n </button>\n <mat-icon class=\"content__step__rightArrow\" svgIcon=\"gio:arrow-right\"></mat-icon>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #disabledPhaseContent>\n <div class=\"disabledContent\">\n <gio-banner-warning>\n Policies might not be evaluated\n <span gioBannerBody> Your API entrypoints don't apply on this phase. To enable them, add an entrypoint supporting this phase. </span>\n </gio-banner-warning>\n </div>\n</ng-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 */\nimport { Pipe, PipeTransform } from '@angular/core';\nimport { filter } from 'lodash';\n\nimport { ConnectorInfo, ConnectorMode } from '../../models';\n\n@Pipe({\n name: 'gioFilterConnectorsByMode',\n})\nexport class GioFilterConnectorsByModePipe implements PipeTransform {\n public transform(items: ConnectorInfo[], mode: ConnectorMode): ConnectorInfo[] {\n if (!items) {\n return [];\n }\n if (!mode) {\n return items;\n }\n\n return filter(items, (item: ConnectorInfo) => {\n return item.supportedModes.includes(mode);\n });\n }\n}\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 GioPolicyStudioFlowMessageFormDialogComponent,\n GioPolicyStudioFlowMessageFormDialogData,\n} from '../flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component';\nimport { ApiType, ConnectorInfo, Policy, Step } from '../../models';\nimport {\n GioPolicyStudioFlowProxyFormDialogComponent,\n GioPolicyStudioFlowProxyFormDialogData,\n} from '../flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component';\nimport { GioPolicyStudioFlowFormDialogResult } from '../flow-form-dialog/gio-ps-flow-form-dialog-result.model';\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 apiType!: ApiType;\n\n @Input()\n public flow?: FlowVM = undefined;\n\n @Input()\n public entrypointsInfo: ConnectorInfo[] = [];\n\n @Input()\n public endpointsInfo: ConnectorInfo[] = [];\n\n @Input()\n public policies: Policy[] = [];\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 const dialogResult =\n this.apiType === 'MESSAGE'\n ? this.matDialog\n .open<\n GioPolicyStudioFlowMessageFormDialogComponent,\n GioPolicyStudioFlowMessageFormDialogData,\n GioPolicyStudioFlowFormDialogResult\n >(GioPolicyStudioFlowMessageFormDialogComponent, {\n data: {\n flow: this.flow,\n entrypoints: this.entrypointsInfo ?? [],\n },\n role: 'alertdialog',\n id: 'gioPsFlowMessageFormDialog',\n })\n .afterClosed()\n : this.matDialog\n .open<GioPolicyStudioFlowProxyFormDialogComponent, GioPolicyStudioFlowProxyFormDialogData, GioPolicyStudioFlowFormDialogResult>(\n GioPolicyStudioFlowProxyFormDialogComponent,\n {\n data: {\n flow: this.flow,\n },\n role: 'alertdialog',\n id: 'gioPsFlowProxyFormDialog',\n },\n )\n .afterClosed();\n\n dialogResult\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 public onStepsChange(flowPhase: 'request' | 'response' | 'publish' | 'subscribe', steps: Step[]): void {\n if (!this.flow) {\n return;\n }\n\n this.flowChange.emit({\n ...this.flow,\n [flowPhase]: steps,\n _hasChanged: true,\n });\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 <gio-ps-flow-details-info-bar class=\"infoBar\" [flow]=\"flow\" [entrypointsInfo]=\"entrypointsInfo\"></gio-ps-flow-details-info-bar>\n\n <div class=\"content\">\n <gio-banner-warning>🚧 Work in progress 🚧</gio-banner-warning>\n\n <mat-tab-group *ngIf=\"apiType === 'MESSAGE'\" class=\"content__tabs\">\n <mat-tab label=\"Initial connection\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [startConnector]=\"entrypointsInfo\"\n [endConnector]=\"endpointsInfo\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"REQUEST\"\n (stepsChange)=\"onStepsChange('request', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Response phase\"\n description=\"Policies will be applied during the connection termination\"\n [startConnector]=\"endpointsInfo\"\n [endConnector]=\"entrypointsInfo\"\n [steps]=\"flow.response ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"RESPONSE\"\n (stepsChange)=\"onStepsChange('response', $event)\"\n ></gio-ps-flow-details-phase>\n </mat-tab>\n <mat-tab label=\"Event messages\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Publish phase\"\n description=\"Policies will be applied on messages sent to the endpoint\"\n [startConnector]=\"entrypointsInfo | gioFilterConnectorsByMode : 'PUBLISH'\"\n [endConnector]=\"endpointsInfo | gioFilterConnectorsByMode : 'PUBLISH'\"\n [steps]=\"flow.publish ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"MESSAGE_RESPONSE\"\n (stepsChange)=\"onStepsChange('publish', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Subscribe phase\"\n description=\"Policies will be applied on messages received by the entrypoint\"\n [startConnector]=\"endpointsInfo | gioFilterConnectorsByMode : 'SUBSCRIBE'\"\n [endConnector]=\"entrypointsInfo | gioFilterConnectorsByMode : 'SUBSCRIBE'\"\n [steps]=\"flow.subscribe ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"MESSAGE_REQUEST\"\n (stepsChange)=\"onStepsChange('subscribe', $event)\"\n ></gio-ps-flow-details-phase>\n </mat-tab>\n </mat-tab-group>\n\n <div *ngIf=\"apiType === 'PROXY'\">\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Request phase\"\n description=\"Policies will be applied during the connection establishment\"\n [startConnector]=\"entrypointsInfo | gioFilterConnectorsByMode : 'REQUEST_RESPONSE'\"\n [endConnector]=\"endpointsInfo | gioFilterConnectorsByMode : 'REQUEST_RESPONSE'\"\n [steps]=\"flow.request ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"REQUEST\"\n (stepsChange)=\"onStepsChange('request', $event)\"\n ></gio-ps-flow-details-phase>\n <gio-ps-flow-details-phase\n class=\"content__phase\"\n name=\"Response phase\"\n description=\"Policies will be applied during the connection termination\"\n [startConnector]=\"endpointsInfo | gioFilterConnectorsByMode : 'REQUEST_RESPONSE'\"\n [endConnector]=\"entrypointsInfo | gioFilterConnectorsByMode : 'REQUEST_RESPONSE'\"\n [steps]=\"flow.response ?? []\"\n [apiType]=\"apiType\"\n [policies]=\"policies\"\n policyExecutionPhase=\"RESPONSE\"\n (stepsChange)=\"onStepsChange('response', $event)\"\n ></gio-ps-flow-details-phase>\n </div>\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) 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 } from 'lodash';\n\nimport { FlowExecution } from '../../models';\n\nexport type GioPolicyStudioFlowExecutionFormDialogData = {\n flowExecution?: FlowExecution;\n};\n\n@Component({\n selector: 'gio-ps-flow-execution-form-dialog',\n templateUrl: './gio-ps-flow-execution-form-dialog.component.html',\n styleUrls: ['./gio-ps-flow-execution-form-dialog.component.scss'],\n})\nexport class GioPolicyStudioFlowExecutionFormDialogComponent {\n public flowExecutionFormGroup?: FormGroup;\n\n public existingFlowExecution?: FlowExecution;\n\n constructor(\n public dialogRef: MatDialogRef<GioPolicyStudioFlowExecutionFormDialogComponent, FlowExecution | undefined>,\n @Inject(MAT_DIALOG_DATA) flowDialogData: GioPolicyStudioFlowExecutionFormDialogData,\n ) {\n this.existingFlowExecution = cloneDeep(flowDialogData?.flowExecution);\n\n this.flowExecutionFormGroup = new FormGroup({\n mode: new FormControl(flowDialogData?.flowExecution?.mode ?? 'DEFAULT'),\n matchRequired: new FormControl(flowDialogData?.flowExecution?.matchRequired ?? false),\n });\n }\n\n public onSubmit(): void {\n const flowExecutionToSave: FlowExecution = {\n ...this.existingFlowExecution,\n mode: this.flowExecutionFormGroup?.get('mode')?.value,\n matchRequired: this.flowExecutionFormGroup?.get('matchRequired')?.value,\n };\n\n this.dialogRef.close({\n ...flowExecutionToSave,\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 Flow execution\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<mat-dialog-content *ngIf=\"flowExecutionFormGroup\" class=\"content\" [formGroup]=\"flowExecutionFormGroup\">\n <div class=\"content__row\">\n <gio-banner-info>\n By default, flow selection is based on the operators defined in your flows, either when it “matches with” or “starts with” a path. You\n can choose the \"Best match\" option to select a flow from the closest path.\n </gio-banner-info>\n </div>\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Default flow mode</mat-label>\n <mat-select formControlName=\"mode\">\n <mat-option value=\"BEST_MATCH\">Best Match</mat-option>\n <mat-option value=\"DEFAULT\">Default</mat-option>\n </mat-select>\n <mat-hint>Change how the flow selection is made</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <gio-form-slide-toggle>\n <gio-form-label>Fail on flow mismatch</gio-form-label>\n Respond with an error when requests don’t match any defined flow\n <mat-slide-toggle gioFormSlideToggle formControlName=\"matchRequired\"></mat-slide-toggle>\n </gio-form-slide-toggle>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-stroked-button role=\"dialog\" (click)=\"onSubmit()\">Save</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, OnChanges, Output, SimpleChanges } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { tap } from 'rxjs/operators';\nimport { cloneDeep } from 'lodash';\n\nimport {\n GioPolicyStudioFlowMessageFormDialogComponent,\n GioPolicyStudioFlowMessageFormDialogData,\n} from '../flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component';\nimport { FlowGroupVM, FlowVM } from '../../gio-policy-studio.model';\nimport { ApiType, ChannelSelector, ConnectorInfo, FlowExecution, HttpSelector, Operation } from '../../models';\nimport {\n GioPolicyStudioFlowProxyFormDialogComponent,\n GioPolicyStudioFlowProxyFormDialogData,\n} from '../flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component';\nimport { GioPolicyStudioFlowFormDialogResult } from '../flow-form-dialog/gio-ps-flow-form-dialog-result.model';\nimport {\n GioPolicyStudioFlowExecutionFormDialogComponent,\n GioPolicyStudioFlowExecutionFormDialogData,\n} from '../flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component';\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 apiType!: ApiType;\n\n @Input()\n public flowExecution!: FlowExecution;\n\n @Input()\n public flowsGroups: FlowGroupVM[] = [];\n\n @Input()\n public selectedFlow?: FlowVM = undefined;\n\n @Input()\n public entrypoints: ConnectorInfo[] = [];\n\n @Output()\n public selectedFlowChange = new EventEmitter<FlowVM>();\n\n @Output()\n public flowsGroupsChange = new EventEmitter<FlowGroupVM[]>();\n\n @Output()\n public flowExecutionChange = new EventEmitter<FlowExecution>();\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 = cloneDeep(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(groupId: string, flowId: string): void {\n const flow = this.flowsGroups.find(fg => fg._id === groupId)?.flows.find(f => f._id === flowId);\n if (flow) {\n this.selectedFlowChange.emit(flow);\n }\n }\n\n public onAddFlow(flowGroup: FlowGroupVM): void {\n const dialogResult =\n this.apiType === 'MESSAGE'\n ? this.matDialog\n .open<\n GioPolicyStudioFlowMessageFormDialogComponent,\n GioPolicyStudioFlowMessageFormDialogData,\n GioPolicyStudioFlowFormDialogResult\n >(GioPolicyStudioFlowMessageFormDialogComponent, {\n data: {\n flow: undefined,\n entrypoints: this.entrypoints,\n },\n role: 'alertdialog',\n id: 'gioPsFlowFormDialog',\n })\n .afterClosed()\n : this.matDialog\n .open<GioPolicyStudioFlowProxyFormDialogComponent, GioPolicyStudioFlowProxyFormDialogData, GioPolicyStudioFlowFormDialogResult>(\n GioPolicyStudioFlowProxyFormDialogComponent,\n {\n data: {\n flow: undefined,\n },\n role: 'alertdialog',\n id: 'gioPsFlowFormDialog',\n },\n )\n .afterClosed();\n\n dialogResult\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 public onConfigureExecution(flowExecution: FlowExecution): void {\n const dialogResult = this.matDialog\n .open<GioPolicyStudioFlowExecutionFormDialogComponent, GioPolicyStudioFlowExecutionFormDialogData, FlowExecution | undefined>(\n GioPolicyStudioFlowExecutionFormDialogComponent,\n {\n data: {\n flowExecution,\n },\n role: 'alertdialog',\n id: 'gioPsFlowExecutionFormDialog',\n },\n )\n .afterClosed();\n\n dialogResult\n .pipe(\n tap(edited => {\n if (!edited) {\n return;\n }\n this.flowExecutionChange.emit(edited);\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 class=\"header__configBtn_edit\" mat-stroked-button mat-icon-button (click)=\"onConfigureExecution(flowExecution)\">\n <mat-icon svgIcon=\"gio:settings\"></mat-icon>\n </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(flowsGroup._id, flow._id)\"\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 { cloneDeep, differenceBy, flatten, isEqual, omit, unionBy, uniqueId } from 'lodash';\nimport { EMPTY } from 'rxjs';\n\nimport {\n ApiType,\n ConnectorInfo,\n Flow,\n FlowExecution,\n Plan,\n Policy,\n PolicyDocumentationFetcher,\n PolicySchemaFetcher,\n SaveOutput,\n} from './models';\nimport { FlowGroupVM, FlowVM } from './gio-policy-studio.model';\nimport { GioPolicyStudioService } from './gio-policy-studio.service';\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 /**\n * API type (required)\n */\n @Input()\n public apiType!: ApiType;\n\n /**\n * Flow execution config (required)\n */\n @Input()\n public flowExecution!: FlowExecution;\n\n /**\n * List of entrypoints to display\n */\n @Input()\n public entrypointsInfo: ConnectorInfo[] = [];\n\n /**\n * List of endpoints to display\n */\n @Input()\n public endpointsInfo: ConnectorInfo[] = [];\n\n /**\n * List of common flows to add to common flows group\n */\n @Input()\n public commonFlows: Flow[] = [];\n\n /**\n * List of plans with their flows\n */\n @Input()\n public plans: Plan[] = [];\n\n /**\n * List of policies usable in the policy studio\n */\n @Input()\n public policies: Policy[] = [];\n\n /**\n * Called when Policy Studio needs to fetch the policy schema\n * @returns Observable of the policy schema\n */\n @Input()\n public policySchemaFetcher: PolicySchemaFetcher = () => EMPTY;\n\n /**\n * Called when Policy Studio needs to fetch the policy documentation\n * @returns Observable of the policy documentation\n */\n @Input()\n public policyDocumentationFetcher: PolicyDocumentationFetcher = () => EMPTY;\n\n /**\n * Return what is needed to save.\n **/\n @Output()\n public save = new EventEmitter<SaveOutput>();\n\n public connectorsTooltip = '';\n\n public selectedFlow?: FlowVM = undefined;\n\n public flowsGroups: FlowGroupVM[] = [];\n\n public disableSaveButton = true;\n\n // Used to keep track of initial flows groups to know if there are deleted flows\n private initialFlowsGroups: FlowGroupVM[] = [];\n\n private hasFlowExecutionChanged = false;\n\n constructor(private readonly policyStudioService: GioPolicyStudioService) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.entrypointsInfo || changes.endpointsInfo) {\n this.connectorsTooltip = `Entrypoints: ${(this.entrypointsInfo ?? []).map(e => e.name).join(', ')}\\nEndpoints: ${(\n this.endpointsInfo ?? []\n )\n .map(e => e.name)\n .join(', ')}`;\n }\n\n if (changes.commonFlows || changes.plans) {\n this.disableSaveButton = true;\n this.flowsGroups = getFlowsGroups(this.commonFlows, this.plans);\n this.initialFlowsGroups = cloneDeep(this.flowsGroups);\n\n // Select first flow by default on first load\n this.selectedFlow = this.flowsGroups[0].flows[0];\n }\n\n if (changes.policySchemaFetcher) {\n this.policyStudioService.setPolicySchemaFetcher(this.policySchemaFetcher);\n }\n\n if (changes.policyDocumentationFetcher) {\n this.policyStudioService.setPolicyDocumentationFetcher(this.policyDocumentationFetcher);\n }\n }\n\n public onFlowExecutionChange(flowExecution: FlowExecution): void {\n this.hasFlowExecutionChanged = !isEqual(this.flowExecution, flowExecution);\n if (this.hasFlowExecutionChanged) {\n this.disableSaveButton = false;\n this.flowExecution = flowExecution;\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\n this.selectedFlow = flatten(this.flowsGroups.map(flowGroup => flowGroup.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, this.initialFlowsGroups);\n\n // Emit plans only if they have been updated\n const plansToUpdate = getPlansChangeOutput(this.flowsGroups, this.initialFlowsGroups);\n\n this.save.emit({\n ...(commonFlows ? { commonFlows } : {}),\n ...(plansToUpdate ? { plansToUpdate } : {}),\n ...(this.hasFlowExecutionChanged ? { flowExecution: this.flowExecution } : {}),\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 _planId: plan.id,\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[], initialFlowsGroups: FlowGroupVM[]): Flow[] | null => {\n const commonFlowsGroup = flowsGroups.find(flowGroup => flowGroup._id === 'flowsGroup_commonFlow');\n const initialCommonFlowsGroup = initialFlowsGroups.find(flowGroup => flowGroup._id === 'flowsGroup_commonFlow');\n // Check if common flows have been updated\n const hasChanged = commonFlowsGroup?.flows.some(flow => flow._hasChanged);\n\n // Check if common flows have been deleted\n const hasDeletedFlow = differenceBy(initialCommonFlowsGroup?.flows ?? [], commonFlowsGroup?.flows ?? [], '_id').length > 0;\n\n return hasChanged || hasDeletedFlow ? (commonFlowsGroup?.flows ?? []).map(flow => omit(flow, '_id', '_hasChanged')) : null;\n};\n\nconst getPlansChangeOutput = (flowsGroups: FlowGroupVM[], initialFlowsGroups: FlowGroupVM[]): Plan[] | null => {\n const plansGroups = flowsGroups.filter(flowGroup => flowGroup._id !== 'flowsGroup_commonFlow');\n const initialPlansGroups = initialFlowsGroups.filter(flowGroup => flowGroup._id !== 'flowsGroup_commonFlow');\n\n // Get plans with changed flows\n const plansGroupsWithChangedFlows = plansGroups.filter(plan => plan.flows.some(flow => flow._hasChanged));\n\n // Get plans with deleted flows\n const plansGroupsWithDeletedFlows: FlowGroupVM[] = [];\n\n // Check if there are deleted flows in initial initialPlansGroups\n initialPlansGroups.forEach(plan => {\n const planGroupToCompare = plansGroups.find(p => p._planId === plan._planId);\n if (planGroupToCompare && differenceBy(plan.flows, planGroupToCompare?.flows ?? [], '_id').length > 0) {\n // If there are deleted flows, we need to return the complete plan with the new flows\n plansGroupsWithDeletedFlows.push(planGroupToCompare);\n }\n });\n\n // Merge plans with changed flows and plans with deleted flows\n const plansWithChangedFlowsOutput = unionBy([...plansGroupsWithChangedFlows, ...plansGroupsWithDeletedFlows], '_planId').map(plan => ({\n ...omit(plan, '_id', '_icon', '_planId'),\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- planId is always defined\n id: plan._planId!,\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 [apiType]=\"apiType\"\n [flowExecution]=\"flowExecution\"\n [flowsGroups]=\"flowsGroups\"\n [entrypoints]=\"entrypointsInfo\"\n (flowsGroupsChange)=\"onFlowsGroupsChange($event)\"\n (flowExecutionChange)=\"onFlowExecutionChange($event)\"\n [(selectedFlow)]=\"selectedFlow\"\n ></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details\n [apiType]=\"apiType\"\n [flow]=\"selectedFlow\"\n [entrypointsInfo]=\"entrypointsInfo\"\n [endpointsInfo]=\"endpointsInfo\"\n [policies]=\"policies\"\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 { GioBannerModule, GioFormSlideToggleModule, GioFormTagsInputModule, 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';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatMenuModule } from '@angular/material/menu';\n\nimport { GioPolicyStudioFlowMessageFormDialogComponent } from './components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-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';\nimport { GioPolicyStudioFlowProxyFormDialogComponent } from './components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component';\nimport { GioPolicyStudioDetailsInfoBarComponent } from './components/flow-details-info-bar/gio-ps-flow-details-info-bar.component';\nimport { GioPolicyStudioDetailsPhaseStepComponent } from './components/flow-details-phase-step/gio-ps-flow-details-phase-step.component';\nimport { GioPolicyStudioDetailsPhaseComponent } from './components/flow-details-phase/gio-ps-flow-details-phase.component';\nimport { GioPolicyStudioFlowExecutionFormDialogComponent } from './components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component';\nimport { GioFilterConnectorsByModePipe } from './components/filter-pipe/gio-flter-connectors-by-mode.pipe';\nimport { GioPolicyStudioPoliciesCatalogDialogComponent } from './components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component';\nimport { GioPolicyStudioStepEditDialogComponent } from './components/step-edit-dialog/gio-ps-step-edit-dialog.component';\nimport { GioPolicyStudioStepFormComponent } from './components/step-form/gio-ps-step-form.component';\nimport { GioPolicyStudioService } from './gio-policy-studio.service';\n\n@NgModule({\n declarations: [\n GioPolicyStudioComponent,\n GioPolicyStudioFlowsMenuComponent,\n GioPolicyStudioDetailsComponent,\n GioPolicyStudioFlowExecutionFormDialogComponent,\n GioPolicyStudioFlowMessageFormDialogComponent,\n GioPolicyStudioFlowProxyFormDialogComponent,\n GioPolicyStudioDetailsInfoBarComponent,\n GioPolicyStudioDetailsPhaseComponent,\n GioPolicyStudioDetailsPhaseStepComponent,\n GioFilterConnectorsByModePipe,\n GioPolicyStudioPoliciesCatalogDialogComponent,\n GioPolicyStudioStepEditDialogComponent,\n GioPolicyStudioStepFormComponent,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatButtonModule,\n MatTooltipModule,\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n MatSlideToggleModule,\n MatDialogModule,\n MatTabsModule,\n MatMenuModule,\n\n GioIconsModule,\n GioFormSlideToggleModule,\n GioFormTagsInputModule,\n GioBannerModule,\n ],\n exports: [GioPolicyStudioComponent],\n providers: [GioPolicyStudioService],\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;;;;;;;;;;;;;;;MAgBa,WAAW,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAW;MAGjH,YAAY,GAA8C,CAAC,KAAa;IACnF,QAAQ,KAAK;QACX,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,QAAQ,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