@gravitee/ui-policy-studio-angular 16.1.0-apim-11657-adapt-ui-for-llm-db5f894 → 16.1.0-apim-11657-adapt-ui-for-llm-fb0148b
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.
|
@@ -545,7 +545,7 @@ class GioPolicyStudioFlowProxyFormDialogComponent {
|
|
|
545
545
|
onSubmit() {
|
|
546
546
|
const httpSelectorToSave = {
|
|
547
547
|
type: 'HTTP',
|
|
548
|
-
path: sanitizePath(this.flowFormGroup?.get('path')?.value),
|
|
548
|
+
path: sanitizePath$1(this.flowFormGroup?.get('path')?.value),
|
|
549
549
|
pathOperator: this.flowFormGroup?.get('pathOperator')?.value,
|
|
550
550
|
methods: sanitizeMethods$1(this.flowFormGroup?.get('methods')?.value),
|
|
551
551
|
};
|
|
@@ -608,7 +608,7 @@ const sanitizeMethodFormValue$1 = (methods) => {
|
|
|
608
608
|
return ['ALL'];
|
|
609
609
|
return methods;
|
|
610
610
|
};
|
|
611
|
-
const sanitizePath = (path) => {
|
|
611
|
+
const sanitizePath$1 = (path) => {
|
|
612
612
|
if (!path || !path.startsWith('/')) {
|
|
613
613
|
return `/${path}`;
|
|
614
614
|
}
|
|
@@ -807,7 +807,6 @@ class GioPolicyStudioFlowLlmFormDialogComponent {
|
|
|
807
807
|
methods: new UntypedFormControl(sanitizeMethodFormValue(httpSelector?.methods)),
|
|
808
808
|
condition: new UntypedFormControl(conditionSelector?.condition ?? ''),
|
|
809
809
|
});
|
|
810
|
-
this.defaultFlowName = capitalize(flowDialogData.parentGroupName) + ' flow';
|
|
811
810
|
}
|
|
812
811
|
onSubmit() {
|
|
813
812
|
const httpSelectorToSave = {
|
|
@@ -816,7 +815,7 @@ class GioPolicyStudioFlowLlmFormDialogComponent {
|
|
|
816
815
|
pathOperator: this.flowFormGroup?.get('pathOperator')?.value,
|
|
817
816
|
methods: sanitizeMethods(this.flowFormGroup?.get('methods')?.value),
|
|
818
817
|
};
|
|
819
|
-
const conditionValue = this.flowFormGroup?.get('condition')?.value
|
|
818
|
+
const conditionValue = this.flowFormGroup?.get('condition')?.value;
|
|
820
819
|
const conditionSelectorToSave = conditionValue
|
|
821
820
|
? {
|
|
822
821
|
type: 'CONDITION',
|
|
@@ -831,18 +830,14 @@ class GioPolicyStudioFlowLlmFormDialogComponent {
|
|
|
831
830
|
// Mark as changed
|
|
832
831
|
_hasChanged: true,
|
|
833
832
|
// Add changes
|
|
834
|
-
name: this.
|
|
835
|
-
enabled: this.existingFlow ? this.existingFlow.enabled : true,
|
|
833
|
+
name: this.flowFormGroup?.get('name')?.value,
|
|
836
834
|
selectors: conditionSelectorToSave ? [httpSelectorToSave, conditionSelectorToSave] : [httpSelectorToSave],
|
|
835
|
+
enabled: this.existingFlow ? this.existingFlow.enabled : true,
|
|
837
836
|
};
|
|
838
837
|
this.dialogRef.close({
|
|
839
838
|
...flowToSave,
|
|
840
839
|
});
|
|
841
840
|
}
|
|
842
|
-
getFlowName() {
|
|
843
|
-
const inputName = trim(this.flowFormGroup?.get('name')?.value ?? '');
|
|
844
|
-
return isEmpty(inputName) ? this.defaultFlowName : inputName;
|
|
845
|
-
}
|
|
846
841
|
tagValidationHook(tag, validationCb) {
|
|
847
842
|
validationCb(METHODS_AUTOCOMPLETE.map(m => `${m}`).includes(tag.toUpperCase()));
|
|
848
843
|
}
|
|
@@ -869,12 +864,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
869
864
|
type: Inject,
|
|
870
865
|
args: [MAT_DIALOG_DATA]
|
|
871
866
|
}] }] });
|
|
872
|
-
const sanitizePathFormValue = (path) => {
|
|
873
|
-
if (path && path.startsWith('/')) {
|
|
874
|
-
return path.substring(1);
|
|
875
|
-
}
|
|
876
|
-
return path ?? '';
|
|
877
|
-
};
|
|
878
867
|
const sanitizeMethods = (value) => {
|
|
879
868
|
if (!value || value.find(m => m === 'ALL'))
|
|
880
869
|
return [];
|
|
@@ -885,6 +874,18 @@ const sanitizeMethodFormValue = (methods) => {
|
|
|
885
874
|
return ['ALL'];
|
|
886
875
|
return methods;
|
|
887
876
|
};
|
|
877
|
+
const sanitizePath = (path) => {
|
|
878
|
+
if (!path || !path.startsWith('/')) {
|
|
879
|
+
return `/${path}`;
|
|
880
|
+
}
|
|
881
|
+
return path;
|
|
882
|
+
};
|
|
883
|
+
const sanitizePathFormValue = (path) => {
|
|
884
|
+
if (path && path.startsWith('/')) {
|
|
885
|
+
return path.substring(1);
|
|
886
|
+
}
|
|
887
|
+
return path ?? '';
|
|
888
|
+
};
|
|
888
889
|
|
|
889
890
|
/*
|
|
890
891
|
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
@@ -1133,7 +1134,6 @@ class GioPolicyStudioFlowsMenuComponent {
|
|
|
1133
1134
|
dialogResult = this.matDialog
|
|
1134
1135
|
.open(GioPolicyStudioFlowLlmFormDialogComponent, {
|
|
1135
1136
|
data: {
|
|
1136
|
-
parentGroupName: flowGroup.name,
|
|
1137
1137
|
flow: undefined,
|
|
1138
1138
|
},
|
|
1139
1139
|
role: 'alertdialog',
|
|
@@ -1273,7 +1273,6 @@ class GioPolicyStudioFlowsMenuComponent {
|
|
|
1273
1273
|
dialogResult = this.matDialog
|
|
1274
1274
|
.open(GioPolicyStudioFlowLlmFormDialogComponent, {
|
|
1275
1275
|
data: {
|
|
1276
|
-
parentGroupName: flowToEdit._parentFlowGroupName,
|
|
1277
1276
|
flow: flowToEdit,
|
|
1278
1277
|
},
|
|
1279
1278
|
role: 'alertdialog',
|
|
@@ -2348,7 +2347,6 @@ class GioPolicyStudioDetailsComponent {
|
|
|
2348
2347
|
dialogResult = this.matDialog
|
|
2349
2348
|
.open(GioPolicyStudioFlowLlmFormDialogComponent, {
|
|
2350
2349
|
data: {
|
|
2351
|
-
parentGroupName: this.flow._parentFlowGroupName,
|
|
2352
2350
|
flow: this.flow,
|
|
2353
2351
|
},
|
|
2354
2352
|
role: 'alertdialog',
|