@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.
@@ -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
- // Check if URL matches http or https pattern
30847
- const urlPattern = /^https?:\/\/.+/i;
30848
- if (!urlPattern.test(urlValue)) {
30849
- this.urlError = 'URL must start with http:// or https://';
30850
- return false;
30851
- }
30852
- // Additional validation: try to create URL object to ensure it's valid
30853
- try {
30854
- new URL(urlValue);
30855
- this.urlError = '';
30856
- return true;
30857
- }
30858
- catch (_c) {
30859
- this.urlError = 'Please enter a valid URL';
30860
- return false;
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)) {