@gravitee/ui-policy-studio-angular 16.1.0-apim-11657-adapt-ui-for-llm-26c5623 → 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
  }
@@ -815,7 +815,7 @@ class GioPolicyStudioFlowLlmFormDialogComponent {
815
815
  pathOperator: this.flowFormGroup?.get('pathOperator')?.value,
816
816
  methods: sanitizeMethods(this.flowFormGroup?.get('methods')?.value),
817
817
  };
818
- const conditionValue = this.flowFormGroup?.get('condition')?.value ?? undefined;
818
+ const conditionValue = this.flowFormGroup?.get('condition')?.value;
819
819
  const conditionSelectorToSave = conditionValue
820
820
  ? {
821
821
  type: 'CONDITION',
@@ -831,8 +831,8 @@ class GioPolicyStudioFlowLlmFormDialogComponent {
831
831
  _hasChanged: true,
832
832
  // Add changes
833
833
  name: this.flowFormGroup?.get('name')?.value,
834
- enabled: this.existingFlow ? this.existingFlow.enabled : true,
835
834
  selectors: conditionSelectorToSave ? [httpSelectorToSave, conditionSelectorToSave] : [httpSelectorToSave],
835
+ enabled: this.existingFlow ? this.existingFlow.enabled : true,
836
836
  };
837
837
  this.dialogRef.close({
838
838
  ...flowToSave,
@@ -864,12 +864,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
864
864
  type: Inject,
865
865
  args: [MAT_DIALOG_DATA]
866
866
  }] }] });
867
- const sanitizePathFormValue = (path) => {
868
- if (path && path.startsWith('/')) {
869
- return path.substring(1);
870
- }
871
- return path ?? '';
872
- };
873
867
  const sanitizeMethods = (value) => {
874
868
  if (!value || value.find(m => m === 'ALL'))
875
869
  return [];
@@ -880,6 +874,18 @@ const sanitizeMethodFormValue = (methods) => {
880
874
  return ['ALL'];
881
875
  return methods;
882
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
+ };
883
889
 
884
890
  /*
885
891
  * Copyright (C) 2022 The Gravitee team (http://gravitee.io)