@cqa-lib/cqa-ui 1.1.293 → 1.1.294
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/test-case-details/api-edit-step/api-edit-step.component.mjs +97 -17
- package/esm2020/lib/test-case-details/condition-step/condition-step.component.mjs +15 -10
- package/esm2020/lib/test-case-details/test-case-details-renderer/test-case-details-renderer.component.mjs +4 -1
- package/fesm2015/cqa-lib-cqa-ui.mjs +113 -22
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +107 -20
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/test-case-details/api-edit-step/api-edit-step.component.d.ts +22 -4
- package/lib/test-case-details/condition-step/condition-step.component.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormArray, FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { DynamicSelectFieldConfig, SelectOption } from '../../dynamic-select/dynamic-select-field.component';
|
|
4
|
+
import { CqaAutocompleteOption } from '../../autocomplete/autocomplete.model';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare const API_EDIT_STEP_LABELS: {
|
|
6
7
|
readonly REQUEST_DETAILS: "Request Details";
|
|
@@ -132,6 +133,8 @@ export declare class ApiEditStepComponent implements OnChanges, OnInit, AfterVie
|
|
|
132
133
|
create: EventEmitter<ApiEditCreatePayload>;
|
|
133
134
|
/** Emits whenever headers change (add, remove, or edit) so the parent can reflect them in the canvas/controls. */
|
|
134
135
|
headersChange: EventEmitter<ApiEditHeaderRow[]>;
|
|
136
|
+
/** Emits when the environment dropdown selection changes (selected value/id or null for None) so the parent can provide urlOptions. */
|
|
137
|
+
environmentChange: EventEmitter<string | number>;
|
|
135
138
|
/** Form control for Import cURL textarea; value is emitted when user clicks Import. */
|
|
136
139
|
readonly importCurlControl: FormControl;
|
|
137
140
|
variableName: string;
|
|
@@ -172,6 +175,8 @@ export declare class ApiEditStepComponent implements OnChanges, OnInit, AfterVie
|
|
|
172
175
|
environmentForm: FormGroup;
|
|
173
176
|
/** Environment options: array of strings or objects with id, name, value, label (passed from parent). */
|
|
174
177
|
environmentOptions: EnvironmentOptionInput[];
|
|
178
|
+
/** URL field options when an environment is selected (base URL + parameters as *|key|). Parent fills this when environmentChange fires. */
|
|
179
|
+
urlOptions: CqaAutocompleteOption[];
|
|
175
180
|
/** Config for environment dropdown (updated when environmentOptions changes to avoid new reference every CD) */
|
|
176
181
|
environmentSelectConfig: DynamicSelectFieldConfig;
|
|
177
182
|
private static toSelectOption;
|
|
@@ -214,11 +219,18 @@ export declare class ApiEditStepComponent implements OnChanges, OnInit, AfterVie
|
|
|
214
219
|
/** Current environment (from form or default: first of environmentOptions). Treats empty string as unset. */
|
|
215
220
|
get selectedEnvironment(): string;
|
|
216
221
|
set selectedEnvironment(v: string);
|
|
217
|
-
/** Called when user selects an environment; keeps currentEnvironmentValue in sync for
|
|
222
|
+
/** Called when user selects an environment; keeps currentEnvironmentValue in sync, sets request URL from environment when available, and notifies parent for urlOptions. */
|
|
218
223
|
onEnvironmentSelectionChange(event: {
|
|
219
224
|
key: string;
|
|
220
225
|
value: unknown;
|
|
221
226
|
}): void;
|
|
227
|
+
/** When user selects an option from the URL autocomplete (e.g. environment parameter *|key|), set the URL field to that value. */
|
|
228
|
+
onUrlOptionSelect(option: CqaAutocompleteOption): void;
|
|
229
|
+
/**
|
|
230
|
+
* Resolve the request URL for the selected environment option.
|
|
231
|
+
* Environment options may carry an optional `url` (e.g. from Environment model); "None" has no url.
|
|
232
|
+
*/
|
|
233
|
+
private getSelectedEnvironmentUrl;
|
|
222
234
|
/** Called when user selects an HTTP method; keeps currentMethodValue in sync for create payload. */
|
|
223
235
|
onMethodSelectionChange(event: {
|
|
224
236
|
key: string;
|
|
@@ -230,6 +242,8 @@ export declare class ApiEditStepComponent implements OnChanges, OnInit, AfterVie
|
|
|
230
242
|
set url(value: string);
|
|
231
243
|
/** When true, params form changes should not update the URL (we're syncing from URL). */
|
|
232
244
|
private paramsSyncingFromUrl;
|
|
245
|
+
/** Placeholder for the URL field: show "Enter URL or select Parameter *" when urlOptions are available (environment selected). */
|
|
246
|
+
get urlPlaceholder(): string;
|
|
233
247
|
readonly payloadTabs: {
|
|
234
248
|
value: ApiEditPayloadTab;
|
|
235
249
|
label: string;
|
|
@@ -363,9 +377,13 @@ export declare class ApiEditStepComponent implements OnChanges, OnInit, AfterVie
|
|
|
363
377
|
private buildKeyValueFormArray;
|
|
364
378
|
private buildKeyTypeValueFormArray;
|
|
365
379
|
private buildParamsFormArray;
|
|
366
|
-
/**
|
|
380
|
+
/** True if URL is a parameter placeholder (e.g. *|param|); must not be parsed with URL() which encodes | to %7C. */
|
|
381
|
+
private static isParameterUrl;
|
|
382
|
+
/** Decode URL for display/payload: strip /* prefix and decode %7C to | so *|param| shows correctly. */
|
|
383
|
+
private static decodeUrlForDisplay;
|
|
384
|
+
/** Parse URL into base (without query/fragment) and query key-value pairs. Preserves relative URLs and parameter placeholders. */
|
|
367
385
|
private parseQueryParamsFromUrl;
|
|
368
|
-
/** Get base URL (without query/fragment) for building URL from params. Preserves relative URLs. */
|
|
386
|
+
/** Get base URL (without query/fragment) for building URL from params. Preserves relative URLs and parameter placeholders. */
|
|
369
387
|
private getBaseUrl;
|
|
370
388
|
/**
|
|
371
389
|
* Set the payload format dropdown using the Content-Type header first, then
|
|
@@ -458,5 +476,5 @@ export declare class ApiEditStepComponent implements OnChanges, OnInit, AfterVie
|
|
|
458
476
|
get headers(): ApiEditHeaderRow[];
|
|
459
477
|
ngOnChanges(changes: SimpleChanges): void;
|
|
460
478
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApiEditStepComponent, never>;
|
|
461
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ApiEditStepComponent, "cqa-api-edit-step", never, { "initialMethod": "initialMethod"; "initialEnvironment": "initialEnvironment"; "initialStep": "initialStep"; "initialUrl": "initialUrl"; "initialPayloadTab": "initialPayloadTab"; "initialHeaders": "initialHeaders"; "initialResponsePreview": "initialResponsePreview"; "initialVariableName": "initialVariableName"; "editMode": "editMode"; "httpMethodOptions": "httpMethodOptions"; "environmentOptions": "environmentOptions"; "authTypeOptions": "authTypeOptions"; "initialAuthType": "initialAuthType"; "formatOptions": "formatOptions"; "initialFormat": "initialFormat"; "headerNameOptions": "headerNameOptions"; "verificationOptions": "verificationOptions"; "verificationDataTypeOptions": "verificationDataTypeOptions"; "statusVerificationOptions": "statusVerificationOptions"; "advancedSettingsVariables": "advancedSettingsVariables"; }, { "importCurl": "importCurl"; "importCurlCancel": "importCurlCancel"; "sendRequest": "sendRequest"; "back": "back"; "cancel": "cancel"; "next": "next"; "create": "create"; "headersChange": "headersChange"; }, never, never>;
|
|
479
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ApiEditStepComponent, "cqa-api-edit-step", never, { "initialMethod": "initialMethod"; "initialEnvironment": "initialEnvironment"; "initialStep": "initialStep"; "initialUrl": "initialUrl"; "initialPayloadTab": "initialPayloadTab"; "initialHeaders": "initialHeaders"; "initialResponsePreview": "initialResponsePreview"; "initialVariableName": "initialVariableName"; "editMode": "editMode"; "httpMethodOptions": "httpMethodOptions"; "environmentOptions": "environmentOptions"; "urlOptions": "urlOptions"; "authTypeOptions": "authTypeOptions"; "initialAuthType": "initialAuthType"; "formatOptions": "formatOptions"; "initialFormat": "initialFormat"; "headerNameOptions": "headerNameOptions"; "verificationOptions": "verificationOptions"; "verificationDataTypeOptions": "verificationDataTypeOptions"; "statusVerificationOptions": "statusVerificationOptions"; "advancedSettingsVariables": "advancedSettingsVariables"; }, { "importCurl": "importCurl"; "importCurlCancel": "importCurlCancel"; "sendRequest": "sendRequest"; "back": "back"; "cancel": "cancel"; "next": "next"; "create": "create"; "headersChange": "headersChange"; "environmentChange": "environmentChange"; }, never, never>;
|
|
462
480
|
}
|
|
@@ -262,9 +262,9 @@ export declare class TestCaseConditionStepComponent implements OnInit, OnChanges
|
|
|
262
262
|
private substituteTemplateVariablesToHtmlForCondition;
|
|
263
263
|
/**
|
|
264
264
|
* Emit editInDepth. When branch is provided (ELSE IF/ELSE branch row), use branch's nested condition step
|
|
265
|
-
* and branch display number for correct "Edit Step N" title.
|
|
265
|
+
* and branch display number for correct "Edit Step N" title. When isCreateMode (new ELSE IF), modal shows "Create In depth" and calls create API on save.
|
|
266
266
|
*/
|
|
267
|
-
onEditInDepth(templateOverride?: any, branch?: ConditionBranch, branchIndex?: number): void;
|
|
267
|
+
onEditInDepth(templateOverride?: any, branch?: ConditionBranch, branchIndex?: number, isCreateMode?: boolean): void;
|
|
268
268
|
onLink(): void;
|
|
269
269
|
onDuplicate(): void;
|
|
270
270
|
onDelete(): void;
|