@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
|
@@ -7158,6 +7158,7 @@ class TableTemplateComponent {
|
|
|
7158
7158
|
}
|
|
7159
7159
|
onFiltersApplied(applied) {
|
|
7160
7160
|
var _a, _b;
|
|
7161
|
+
this.showFilterPanel = false;
|
|
7161
7162
|
const effective = (_a = applied !== null && applied !== void 0 ? applied : this.pendingFilters) !== null && _a !== void 0 ? _a : {};
|
|
7162
7163
|
this.appliedFilters = effective;
|
|
7163
7164
|
this.filteredRows = this.data.filter(r => this.passFilters(effective, r));
|
|
@@ -29843,7 +29844,25 @@ class ApiEditStepComponent {
|
|
|
29843
29844
|
return (this.currentStep - 1) * -33.333;
|
|
29844
29845
|
}
|
|
29845
29846
|
setStep(step) {
|
|
29847
|
+
var _a;
|
|
29846
29848
|
if (step >= this.minStep && step <= this.maxStep) {
|
|
29849
|
+
// Validate current step before allowing forward navigation
|
|
29850
|
+
if (step > this.currentStep) {
|
|
29851
|
+
// Validate URL before allowing navigation away from step 1
|
|
29852
|
+
if (this.currentStep === 1) {
|
|
29853
|
+
if (!this.validateUrl()) {
|
|
29854
|
+
this.cdr.markForCheck();
|
|
29855
|
+
return;
|
|
29856
|
+
}
|
|
29857
|
+
}
|
|
29858
|
+
// Validate variable name before allowing navigation away from step 2
|
|
29859
|
+
if (this.currentStep === 2 && !((_a = this.variableName) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
29860
|
+
this.variableNameError = 'Variable Name is required.';
|
|
29861
|
+
this.cdr.markForCheck();
|
|
29862
|
+
return;
|
|
29863
|
+
}
|
|
29864
|
+
this.variableNameError = '';
|
|
29865
|
+
}
|
|
29847
29866
|
this.currentStep = step;
|
|
29848
29867
|
}
|
|
29849
29868
|
}
|
|
@@ -30843,22 +30862,29 @@ class ApiEditStepComponent {
|
|
|
30843
30862
|
this.urlError = '';
|
|
30844
30863
|
return true;
|
|
30845
30864
|
}
|
|
30846
|
-
//
|
|
30847
|
-
|
|
30848
|
-
|
|
30849
|
-
this.
|
|
30850
|
-
|
|
30851
|
-
|
|
30852
|
-
|
|
30853
|
-
|
|
30854
|
-
|
|
30855
|
-
|
|
30856
|
-
|
|
30857
|
-
|
|
30858
|
-
|
|
30859
|
-
|
|
30860
|
-
|
|
30865
|
+
// When an environment is selected, skip the http/https validation
|
|
30866
|
+
// because the URL may be a relative path or parameter that gets resolved against the environment base URL.
|
|
30867
|
+
const hasEnvironment = this.currentEnvironmentValue != null
|
|
30868
|
+
&& this.currentEnvironmentValue !== ''
|
|
30869
|
+
&& this.currentEnvironmentValue !== 'none';
|
|
30870
|
+
if (!hasEnvironment) {
|
|
30871
|
+
// Check if URL matches http or https pattern
|
|
30872
|
+
const urlPattern = /^https?:\/\/.+/i;
|
|
30873
|
+
if (!urlPattern.test(urlValue)) {
|
|
30874
|
+
this.urlError = 'URL must start with http:// or https://';
|
|
30875
|
+
return false;
|
|
30876
|
+
}
|
|
30877
|
+
// Additional validation: try to create URL object to ensure it's valid
|
|
30878
|
+
try {
|
|
30879
|
+
new URL(urlValue);
|
|
30880
|
+
}
|
|
30881
|
+
catch (_c) {
|
|
30882
|
+
this.urlError = 'Please enter a valid URL';
|
|
30883
|
+
return false;
|
|
30884
|
+
}
|
|
30861
30885
|
}
|
|
30886
|
+
this.urlError = '';
|
|
30887
|
+
return true;
|
|
30862
30888
|
}
|
|
30863
30889
|
/**
|
|
30864
30890
|
* Check if URL is valid (for button disabled state)
|
|
@@ -30875,6 +30901,13 @@ class ApiEditStepComponent {
|
|
|
30875
30901
|
if (isParameterPlaceholder) {
|
|
30876
30902
|
return true;
|
|
30877
30903
|
}
|
|
30904
|
+
// When an environment is selected, skip the http/https validation
|
|
30905
|
+
const hasEnvironment = this.currentEnvironmentValue != null
|
|
30906
|
+
&& this.currentEnvironmentValue !== ''
|
|
30907
|
+
&& this.currentEnvironmentValue !== 'none';
|
|
30908
|
+
if (hasEnvironment) {
|
|
30909
|
+
return true;
|
|
30910
|
+
}
|
|
30878
30911
|
// Must match http/https pattern
|
|
30879
30912
|
const urlPattern = /^https?:\/\/.+/i;
|
|
30880
30913
|
if (!urlPattern.test(urlValue)) {
|