@cqa-lib/cqa-ui 1.1.475 → 1.1.477
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/templates/table-template.component.mjs +2 -1
- package/esm2020/lib/test-case-details/api-edit-step/api-edit-step.component.mjs +47 -16
- package/fesm2015/cqa-lib-cqa-ui.mjs +48 -15
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +47 -15
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -7054,6 +7054,7 @@ class TableTemplateComponent {
|
|
|
7054
7054
|
this.pendingFilters = current;
|
|
7055
7055
|
}
|
|
7056
7056
|
onFiltersApplied(applied) {
|
|
7057
|
+
this.showFilterPanel = false;
|
|
7057
7058
|
const effective = applied ?? this.pendingFilters ?? {};
|
|
7058
7059
|
this.appliedFilters = effective;
|
|
7059
7060
|
this.filteredRows = this.data.filter(r => this.passFilters(effective, r));
|
|
@@ -29821,6 +29822,23 @@ class ApiEditStepComponent {
|
|
|
29821
29822
|
}
|
|
29822
29823
|
setStep(step) {
|
|
29823
29824
|
if (step >= this.minStep && step <= this.maxStep) {
|
|
29825
|
+
// Validate current step before allowing forward navigation
|
|
29826
|
+
if (step > this.currentStep) {
|
|
29827
|
+
// Validate URL before allowing navigation away from step 1
|
|
29828
|
+
if (this.currentStep === 1) {
|
|
29829
|
+
if (!this.validateUrl()) {
|
|
29830
|
+
this.cdr.markForCheck();
|
|
29831
|
+
return;
|
|
29832
|
+
}
|
|
29833
|
+
}
|
|
29834
|
+
// Validate variable name before allowing navigation away from step 2
|
|
29835
|
+
if (this.currentStep === 2 && !this.variableName?.trim()) {
|
|
29836
|
+
this.variableNameError = 'Variable Name is required.';
|
|
29837
|
+
this.cdr.markForCheck();
|
|
29838
|
+
return;
|
|
29839
|
+
}
|
|
29840
|
+
this.variableNameError = '';
|
|
29841
|
+
}
|
|
29824
29842
|
this.currentStep = step;
|
|
29825
29843
|
}
|
|
29826
29844
|
}
|
|
@@ -30801,22 +30819,29 @@ class ApiEditStepComponent {
|
|
|
30801
30819
|
this.urlError = '';
|
|
30802
30820
|
return true;
|
|
30803
30821
|
}
|
|
30804
|
-
//
|
|
30805
|
-
|
|
30806
|
-
|
|
30807
|
-
this.
|
|
30808
|
-
|
|
30809
|
-
|
|
30810
|
-
|
|
30811
|
-
|
|
30812
|
-
|
|
30813
|
-
|
|
30814
|
-
|
|
30815
|
-
|
|
30816
|
-
|
|
30817
|
-
|
|
30818
|
-
|
|
30822
|
+
// When an environment is selected, skip the http/https validation
|
|
30823
|
+
// because the URL may be a relative path or parameter that gets resolved against the environment base URL.
|
|
30824
|
+
const hasEnvironment = this.currentEnvironmentValue != null
|
|
30825
|
+
&& this.currentEnvironmentValue !== ''
|
|
30826
|
+
&& this.currentEnvironmentValue !== 'none';
|
|
30827
|
+
if (!hasEnvironment) {
|
|
30828
|
+
// Check if URL matches http or https pattern
|
|
30829
|
+
const urlPattern = /^https?:\/\/.+/i;
|
|
30830
|
+
if (!urlPattern.test(urlValue)) {
|
|
30831
|
+
this.urlError = 'URL must start with http:// or https://';
|
|
30832
|
+
return false;
|
|
30833
|
+
}
|
|
30834
|
+
// Additional validation: try to create URL object to ensure it's valid
|
|
30835
|
+
try {
|
|
30836
|
+
new URL(urlValue);
|
|
30837
|
+
}
|
|
30838
|
+
catch {
|
|
30839
|
+
this.urlError = 'Please enter a valid URL';
|
|
30840
|
+
return false;
|
|
30841
|
+
}
|
|
30819
30842
|
}
|
|
30843
|
+
this.urlError = '';
|
|
30844
|
+
return true;
|
|
30820
30845
|
}
|
|
30821
30846
|
/**
|
|
30822
30847
|
* Check if URL is valid (for button disabled state)
|
|
@@ -30832,6 +30857,13 @@ class ApiEditStepComponent {
|
|
|
30832
30857
|
if (isParameterPlaceholder) {
|
|
30833
30858
|
return true;
|
|
30834
30859
|
}
|
|
30860
|
+
// When an environment is selected, skip the http/https validation
|
|
30861
|
+
const hasEnvironment = this.currentEnvironmentValue != null
|
|
30862
|
+
&& this.currentEnvironmentValue !== ''
|
|
30863
|
+
&& this.currentEnvironmentValue !== 'none';
|
|
30864
|
+
if (hasEnvironment) {
|
|
30865
|
+
return true;
|
|
30866
|
+
}
|
|
30835
30867
|
// Must match http/https pattern
|
|
30836
30868
|
const urlPattern = /^https?:\/\/.+/i;
|
|
30837
30869
|
if (!urlPattern.test(urlValue)) {
|