@cqa-lib/cqa-ui 1.1.188 → 1.1.190
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/add-prerequisite-cases-section/add-prerequisite-cases-section.component.mjs +1 -1
- package/esm2020/lib/button/button.component.mjs +3 -3
- package/esm2020/lib/compare-runs/compare-runs.component.mjs +1 -1
- package/esm2020/lib/custom-textarea/custom-textarea.component.mjs +3 -6
- package/esm2020/lib/dashboards/dashboard-header/dashboard-header.component.mjs +1 -1
- package/esm2020/lib/dynamic-select/dynamic-select-field.component.mjs +82 -3
- package/esm2020/lib/filters/dynamic-filter/dynamic-filter.component.mjs +1 -1
- package/esm2020/lib/step-builder/step-builder-action/step-builder-action.component.mjs +1 -1
- package/esm2020/lib/step-builder/step-builder-ai-agent/step-builder-ai-agent.component.mjs +1 -1
- package/esm2020/lib/step-builder/step-builder-api/step-builder-api.component.mjs +3 -2
- package/esm2020/lib/step-builder/step-builder-condition/step-builder-condition.component.mjs +1 -1
- package/esm2020/lib/step-builder/step-builder-custom-code/step-builder-custom-code.component.mjs +1 -1
- package/esm2020/lib/step-builder/step-builder-database/step-builder-database.component.mjs +1 -1
- package/esm2020/lib/step-builder/step-builder-document/step-builder-document.component.mjs +1 -1
- package/esm2020/lib/step-builder/step-builder-document-generation-template-step/step-builder-document-generation-template-step.component.mjs +1 -1
- package/esm2020/lib/step-builder/step-builder-loop/step-builder-loop.component.mjs +1 -1
- package/esm2020/lib/test-case-details/api-edit-step/api-edit-step.component.mjs +1122 -0
- package/esm2020/lib/test-case-details/api-step/api-step.component.mjs +48 -9
- package/esm2020/lib/test-case-details/condition-step/condition-step.component.mjs +1 -1
- package/esm2020/lib/test-case-details/custom-edit-step/custom-edit-step.component.mjs +1 -1
- package/esm2020/lib/test-case-details/element-popup/element-popup.component.mjs +1 -1
- package/esm2020/lib/test-case-details/loop-step/loop-step.component.mjs +1 -1
- package/esm2020/lib/test-case-details/step-details-drawer/step-details-drawer-data.mjs +3 -0
- package/esm2020/lib/test-case-details/step-details-drawer/step-details-drawer-field.config.mjs +188 -0
- package/esm2020/lib/test-case-details/step-details-drawer/step-details-drawer-ref.mjs +28 -0
- package/esm2020/lib/test-case-details/step-details-drawer/step-details-drawer.component.mjs +291 -0
- package/esm2020/lib/test-case-details/step-details-drawer/step-details-drawer.service.mjs +67 -0
- package/esm2020/lib/ui-kit.module.mjs +13 -3
- package/esm2020/lib/utils/tw-overlay-container.mjs +6 -3
- package/esm2020/public-api.mjs +7 -1
- package/fesm2015/cqa-lib-cqa-ui.mjs +2066 -227
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +1898 -112
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/custom-textarea/custom-textarea.component.d.ts +1 -2
- package/lib/dynamic-select/dynamic-select-field.component.d.ts +19 -1
- package/lib/test-case-details/api-edit-step/api-edit-step.component.d.ts +346 -0
- package/lib/test-case-details/api-step/api-step.component.d.ts +18 -2
- package/lib/test-case-details/step-details-drawer/step-details-drawer-data.d.ts +7 -0
- package/lib/test-case-details/step-details-drawer/step-details-drawer-field.config.d.ts +51 -0
- package/lib/test-case-details/step-details-drawer/step-details-drawer-ref.d.ts +13 -0
- package/lib/test-case-details/step-details-drawer/step-details-drawer.component.d.ts +60 -0
- package/lib/test-case-details/step-details-drawer/step-details-drawer.service.d.ts +22 -0
- package/lib/ui-kit.module.d.ts +35 -33
- package/package.json +1 -1
- package/public-api.d.ts +6 -0
- package/src/lib/assets/images/delete.svg +3 -0
- package/styles.css +1 -1
|
@@ -18,7 +18,6 @@ export declare class CustomTextareaComponent implements OnChanges {
|
|
|
18
18
|
resize: 'none' | 'both' | 'horizontal' | 'vertical';
|
|
19
19
|
textareaInlineStyle?: string;
|
|
20
20
|
labelInlineStyle?: string;
|
|
21
|
-
customClass: string;
|
|
22
21
|
valueChange: EventEmitter<string>;
|
|
23
22
|
blurred: EventEmitter<FocusEvent>;
|
|
24
23
|
focused: EventEmitter<FocusEvent>;
|
|
@@ -35,6 +34,6 @@ export declare class CustomTextareaComponent implements OnChanges {
|
|
|
35
34
|
get textareaStyles(): string;
|
|
36
35
|
get labelStyles(): string;
|
|
37
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomTextareaComponent, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CustomTextareaComponent, "cqa-custom-textarea", never, { "label": "label"; "placeholder": "placeholder"; "value": "value"; "disabled": "disabled"; "errors": "errors"; "required": "required"; "ariaLabel": "ariaLabel"; "size": "size"; "fullWidth": "fullWidth"; "maxLength": "maxLength"; "showCharCount": "showCharCount"; "rows": "rows"; "cols": "cols"; "resize": "resize"; "textareaInlineStyle": "textareaInlineStyle"; "labelInlineStyle": "labelInlineStyle";
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomTextareaComponent, "cqa-custom-textarea", never, { "label": "label"; "placeholder": "placeholder"; "value": "value"; "disabled": "disabled"; "errors": "errors"; "required": "required"; "ariaLabel": "ariaLabel"; "size": "size"; "fullWidth": "fullWidth"; "maxLength": "maxLength"; "showCharCount": "showCharCount"; "rows": "rows"; "cols": "cols"; "resize": "resize"; "textareaInlineStyle": "textareaInlineStyle"; "labelInlineStyle": "labelInlineStyle"; }, { "valueChange": "valueChange"; "blurred": "blurred"; "focused": "focused"; }, never, never>;
|
|
39
38
|
}
|
|
40
39
|
export {};
|
|
@@ -51,11 +51,14 @@ export interface DynamicSelectFieldConfig {
|
|
|
51
51
|
onLoadMore?: (query?: string) => void;
|
|
52
52
|
/** Optional regex pattern or function to highlight parts of option text. */
|
|
53
53
|
highlightPattern?: RegExp | string | ((text: string) => string);
|
|
54
|
+
/** When true (and searchable), allows adding the current search text as a new option via an "Add '<value>'" choice. */
|
|
55
|
+
allowCustomValue?: boolean;
|
|
54
56
|
options: SelectOption[];
|
|
55
57
|
isCompareRuns?: boolean;
|
|
56
58
|
}
|
|
57
59
|
export declare class DynamicSelectFieldComponent implements OnInit, OnChanges {
|
|
58
60
|
readonly SELECT_ALL_VALUE: string;
|
|
61
|
+
readonly ADD_CUSTOM_VALUE_PREFIX: string;
|
|
59
62
|
form: FormGroup;
|
|
60
63
|
config: DynamicSelectFieldConfig;
|
|
61
64
|
selectionChange: EventEmitter<{
|
|
@@ -74,6 +77,11 @@ export declare class DynamicSelectFieldComponent implements OnInit, OnChanges {
|
|
|
74
77
|
key: string;
|
|
75
78
|
query: string;
|
|
76
79
|
}>;
|
|
80
|
+
/** Emits when the user chooses to add a custom value (allowCustomValue: true). Consumer should add the value to options and set the control value. */
|
|
81
|
+
addCustomValue: EventEmitter<{
|
|
82
|
+
key: string;
|
|
83
|
+
value: string;
|
|
84
|
+
}>;
|
|
77
85
|
selectRef?: MatSelect;
|
|
78
86
|
hostEl?: ElementRef<HTMLElement>;
|
|
79
87
|
searchTextByKey: Record<string, string>;
|
|
@@ -97,6 +105,12 @@ export declare class DynamicSelectFieldComponent implements OnInit, OnChanges {
|
|
|
97
105
|
get useCheckboxStyle(): boolean;
|
|
98
106
|
get allSelected(): boolean;
|
|
99
107
|
private toBoolean;
|
|
108
|
+
/**
|
|
109
|
+
* Sync the form control's disabled state from config.
|
|
110
|
+
* Use the FormControl API instead of [disabled] in the template to avoid Angular's
|
|
111
|
+
* "changed after checked" / reactive forms disabled-attribute warning.
|
|
112
|
+
*/
|
|
113
|
+
private syncDisabledState;
|
|
100
114
|
private syncControlValueForMultipleMode;
|
|
101
115
|
private applySelectedValueIfNeeded;
|
|
102
116
|
private hasExistingValue;
|
|
@@ -112,6 +126,10 @@ export declare class DynamicSelectFieldComponent implements OnInit, OnChanges {
|
|
|
112
126
|
/** Programmatically close the select panel if open */
|
|
113
127
|
closePanel(): void;
|
|
114
128
|
filteredOptions(c: DynamicSelectFieldConfig): SelectOption[];
|
|
129
|
+
/** When allowCustomValue is true and the user has typed a value that is not in options, returns that value for the "Add" option. */
|
|
130
|
+
get customValueToAdd(): string | null;
|
|
131
|
+
get showAddCustomOption(): boolean;
|
|
132
|
+
get addCustomSentinelValue(): string;
|
|
115
133
|
onSelectionChange(event: MatSelectChange, select: MatSelect): void;
|
|
116
134
|
handleDocumentClick(event: MouseEvent): void;
|
|
117
135
|
/**
|
|
@@ -129,5 +147,5 @@ export declare class DynamicSelectFieldComponent implements OnInit, OnChanges {
|
|
|
129
147
|
get hasHighlighting(): boolean;
|
|
130
148
|
private setupLoadMoreObserver;
|
|
131
149
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicSelectFieldComponent, never>;
|
|
132
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicSelectFieldComponent, "cqa-dynamic-select", never, { "form": "form"; "config": "config"; }, { "selectionChange": "selectionChange"; "selectClick": "selectClick"; "searchChange": "searchChange"; "loadMore": "loadMore"; }, never, never>;
|
|
150
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicSelectFieldComponent, "cqa-dynamic-select", never, { "form": "form"; "config": "config"; }, { "selectionChange": "selectionChange"; "selectClick": "selectClick"; "searchChange": "searchChange"; "loadMore": "loadMore"; "addCustomValue": "addCustomValue"; }, never, never>;
|
|
133
151
|
}
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { FormArray, FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { DynamicSelectFieldConfig, SelectOption } from '../../dynamic-select/dynamic-select-field.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare const API_EDIT_STEP_LABELS: {
|
|
6
|
+
readonly REQUEST_DETAILS: "Request Details";
|
|
7
|
+
readonly STORE_RESPONSE: "Store Response";
|
|
8
|
+
readonly VALIDATION: "Validation";
|
|
9
|
+
};
|
|
10
|
+
export declare type ApiEditPayloadTab = 'headers' | 'body' | 'params' | 'scripts';
|
|
11
|
+
/** Which body content block is visible: headers (tabs) or import cURL textarea. */
|
|
12
|
+
export declare type ApiEditBodyView = 'headers' | 'import-curl';
|
|
13
|
+
export interface ApiEditHeaderRow {
|
|
14
|
+
name: string;
|
|
15
|
+
type: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
/** Payload emitted when user clicks Send Request (environment, method, url, headers). */
|
|
19
|
+
export interface ApiEditSendRequestPayload {
|
|
20
|
+
environment: string;
|
|
21
|
+
method: string;
|
|
22
|
+
url: string;
|
|
23
|
+
headers: ApiEditHeaderRow[];
|
|
24
|
+
}
|
|
25
|
+
/** Step 1 request + body payload. */
|
|
26
|
+
export interface ApiEditStep1Payload {
|
|
27
|
+
environment: string;
|
|
28
|
+
method: string;
|
|
29
|
+
url: string;
|
|
30
|
+
headers: ApiEditHeaderRow[];
|
|
31
|
+
activePayloadTab: ApiEditPayloadTab;
|
|
32
|
+
payloadType: 'raw' | 'x-www-form-urlencoded' | 'form-data';
|
|
33
|
+
payloadFormat: string;
|
|
34
|
+
payloadText: string;
|
|
35
|
+
keyValueRows: {
|
|
36
|
+
key: string;
|
|
37
|
+
value: string;
|
|
38
|
+
}[];
|
|
39
|
+
keyTypeValueRows: {
|
|
40
|
+
key: string;
|
|
41
|
+
type: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}[];
|
|
44
|
+
}
|
|
45
|
+
/** Step 2 store-response payload. */
|
|
46
|
+
export interface ApiEditStep2Payload {
|
|
47
|
+
variableName: string;
|
|
48
|
+
}
|
|
49
|
+
/** Response body verification row. */
|
|
50
|
+
export interface ApiEditResponseBodyVerificationRow {
|
|
51
|
+
jsonPath: string;
|
|
52
|
+
verification: string;
|
|
53
|
+
dataType: string;
|
|
54
|
+
expectedValue: string;
|
|
55
|
+
}
|
|
56
|
+
/** Status verification row. */
|
|
57
|
+
export interface ApiEditStatusVerificationRow {
|
|
58
|
+
verification: string;
|
|
59
|
+
expectedValue: string;
|
|
60
|
+
}
|
|
61
|
+
/** Step 3 validation payload. */
|
|
62
|
+
export interface ApiEditStep3Payload {
|
|
63
|
+
activeResponseVerificationTab: 'response-body' | 'status';
|
|
64
|
+
responseBodyVerifications: ApiEditResponseBodyVerificationRow[];
|
|
65
|
+
statusVerifications: ApiEditStatusVerificationRow[];
|
|
66
|
+
}
|
|
67
|
+
/** Full payload emitted when user clicks Create (all steps’ data). */
|
|
68
|
+
export interface ApiEditCreatePayload {
|
|
69
|
+
step1: ApiEditStep1Payload;
|
|
70
|
+
step2: ApiEditStep2Payload;
|
|
71
|
+
step3: ApiEditStep3Payload;
|
|
72
|
+
}
|
|
73
|
+
/** Environment option: either a string (display = value) or an object with id, name, value, label. */
|
|
74
|
+
export declare type EnvironmentOptionInput = string | SelectOption;
|
|
75
|
+
export declare class ApiEditStepComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy {
|
|
76
|
+
private readonly fb;
|
|
77
|
+
private readonly cdr;
|
|
78
|
+
initialMethod?: string;
|
|
79
|
+
initialEnvironment?: string;
|
|
80
|
+
initialStep?: number;
|
|
81
|
+
initialUrl?: string;
|
|
82
|
+
initialPayloadTab?: ApiEditPayloadTab;
|
|
83
|
+
initialHeaders?: ApiEditHeaderRow[];
|
|
84
|
+
initialResponsePreview?: string;
|
|
85
|
+
/** Emits the cURL string when user clicks Import (value from the textarea control). */
|
|
86
|
+
importCurl: EventEmitter<string>;
|
|
87
|
+
/** Emits when user cancels the Import cURL panel (clicks Cancel). */
|
|
88
|
+
importCurlCancel: EventEmitter<void>;
|
|
89
|
+
/** Emits when user clicks Send Request, with environment, method, url, and headers. */
|
|
90
|
+
sendRequest: EventEmitter<ApiEditSendRequestPayload>;
|
|
91
|
+
back: EventEmitter<void>;
|
|
92
|
+
next: EventEmitter<void>;
|
|
93
|
+
/** Emits when user clicks Create with all entered details: step1 (environment, HTTP method, URL, headers, body), step2 (variable name), step3 (verifications). */
|
|
94
|
+
create: EventEmitter<ApiEditCreatePayload>;
|
|
95
|
+
/** Emits whenever headers change (add, remove, or edit) so the parent can reflect them in the canvas/controls. */
|
|
96
|
+
headersChange: EventEmitter<ApiEditHeaderRow[]>;
|
|
97
|
+
/** Form control for Import cURL textarea; value is emitted when user clicks Import. */
|
|
98
|
+
readonly importCurlControl: FormControl;
|
|
99
|
+
variableName: string;
|
|
100
|
+
variableNameError: string;
|
|
101
|
+
/** Controls which body content is visible: headers (default) or import-curl. */
|
|
102
|
+
bodyView: ApiEditBodyView;
|
|
103
|
+
readonly stepLabels: ({
|
|
104
|
+
index: number;
|
|
105
|
+
label: "Request Details";
|
|
106
|
+
} | {
|
|
107
|
+
index: number;
|
|
108
|
+
label: "Store Response";
|
|
109
|
+
} | {
|
|
110
|
+
index: number;
|
|
111
|
+
label: "Validation";
|
|
112
|
+
})[];
|
|
113
|
+
currentStep: number;
|
|
114
|
+
/** The label for the current step only (used when showing a single step in the indicator). */
|
|
115
|
+
get activeStepLabel(): {
|
|
116
|
+
index: number;
|
|
117
|
+
label: string;
|
|
118
|
+
} | undefined;
|
|
119
|
+
private readonly minStep;
|
|
120
|
+
private readonly maxStep;
|
|
121
|
+
/** Percentage to translate the step strip (0, -33.333, -66.666) for CSS transition. */
|
|
122
|
+
get stripTranslatePercent(): number;
|
|
123
|
+
setStep(step: number): void;
|
|
124
|
+
private applyInitialStep;
|
|
125
|
+
/** HTTP method options: array of strings or objects with id, name, value, label (passed from parent). */
|
|
126
|
+
httpMethodOptions: EnvironmentOptionInput[];
|
|
127
|
+
/** Form for HTTP method select (cqa-dynamic-select) */
|
|
128
|
+
methodForm: FormGroup;
|
|
129
|
+
/** Config for method dropdown (updated when httpMethodOptions changes to avoid new reference every CD) */
|
|
130
|
+
methodSelectConfig: DynamicSelectFieldConfig;
|
|
131
|
+
private updateMethodSelectConfig;
|
|
132
|
+
private getMethodValues;
|
|
133
|
+
/** Form for environment select (cqa-dynamic-select) */
|
|
134
|
+
environmentForm: FormGroup;
|
|
135
|
+
/** Environment options: array of strings or objects with id, name, value, label (passed from parent). */
|
|
136
|
+
environmentOptions: EnvironmentOptionInput[];
|
|
137
|
+
/** Config for environment dropdown (updated when environmentOptions changes to avoid new reference every CD) */
|
|
138
|
+
environmentSelectConfig: DynamicSelectFieldConfig;
|
|
139
|
+
private static toSelectOption;
|
|
140
|
+
private static getOptionValue;
|
|
141
|
+
private updateEnvironmentSelectConfig;
|
|
142
|
+
private getEnvironmentValues;
|
|
143
|
+
/** Current HTTP method (from form or default: first of httpMethodOptions). Treats empty string as unset. */
|
|
144
|
+
get selectedMethod(): string;
|
|
145
|
+
set selectedMethod(v: string);
|
|
146
|
+
/** True when the selected HTTP method is GET, HEAD, or DELETE (no request body). */
|
|
147
|
+
get isMethodWithoutBody(): boolean;
|
|
148
|
+
/** Cached environment value from last selection (so Create payload has the selected value). */
|
|
149
|
+
private currentEnvironmentValue;
|
|
150
|
+
/** Cached HTTP method from last selection (so Create payload has the selected value). */
|
|
151
|
+
private currentMethodValue;
|
|
152
|
+
/** Current environment (from form or default: first of environmentOptions). Treats empty string as unset. */
|
|
153
|
+
get selectedEnvironment(): string;
|
|
154
|
+
set selectedEnvironment(v: string);
|
|
155
|
+
/** Called when user selects an environment; keeps currentEnvironmentValue in sync for create payload. */
|
|
156
|
+
onEnvironmentSelectionChange(event: {
|
|
157
|
+
key: string;
|
|
158
|
+
value: unknown;
|
|
159
|
+
}): void;
|
|
160
|
+
/** Called when user selects an HTTP method; keeps currentMethodValue in sync for create payload. */
|
|
161
|
+
onMethodSelectionChange(event: {
|
|
162
|
+
key: string;
|
|
163
|
+
value: unknown;
|
|
164
|
+
}): void;
|
|
165
|
+
url: string;
|
|
166
|
+
readonly payloadTabs: {
|
|
167
|
+
value: ApiEditPayloadTab;
|
|
168
|
+
label: string;
|
|
169
|
+
}[];
|
|
170
|
+
activePayloadTab: ApiEditPayloadTab;
|
|
171
|
+
/** Step 3: Response verification tabs */
|
|
172
|
+
readonly responseVerificationTabs: {
|
|
173
|
+
value: 'response-body' | 'status';
|
|
174
|
+
label: string;
|
|
175
|
+
}[];
|
|
176
|
+
activeResponseVerificationTab: 'response-body' | 'status';
|
|
177
|
+
/** Payload type for Body/Params/Scripts: raw, x-www-form-urlencoded, form-data */
|
|
178
|
+
payloadType: 'raw' | 'x-www-form-urlencoded' | 'form-data';
|
|
179
|
+
/** Segment options for payload type (used by cqa-segment-control) */
|
|
180
|
+
readonly payloadTypeSegments: {
|
|
181
|
+
label: string;
|
|
182
|
+
value: string;
|
|
183
|
+
}[];
|
|
184
|
+
onPayloadTypeChange(val: string): void;
|
|
185
|
+
/** Form for Format select (Body/Params/Scripts) */
|
|
186
|
+
payloadFormatForm: FormGroup;
|
|
187
|
+
/** Format options: array of strings or objects (passed from parent). Falls back to JSON, XML, HTML, Text when empty. */
|
|
188
|
+
formatOptions: EnvironmentOptionInput[];
|
|
189
|
+
initialFormat?: string;
|
|
190
|
+
private static readonly DEFAULT_FORMAT_OPTIONS;
|
|
191
|
+
/** Config for Format dropdown (updated when formatOptions changes, like Method dropdown) */
|
|
192
|
+
payloadFormatSelectConfig: DynamicSelectFieldConfig;
|
|
193
|
+
private updatePayloadFormatSelectConfig;
|
|
194
|
+
private getFormatValues;
|
|
195
|
+
/** Payload text area value for Body/Params/Scripts */
|
|
196
|
+
payloadText: string;
|
|
197
|
+
/** JSON parse error when format is JSON and payload is invalid; null when valid or not JSON. */
|
|
198
|
+
payloadJsonError: {
|
|
199
|
+
line: number;
|
|
200
|
+
column: number;
|
|
201
|
+
message: string;
|
|
202
|
+
excerpt: string;
|
|
203
|
+
caretOffset: number;
|
|
204
|
+
} | null;
|
|
205
|
+
/** Line numbers for payload textarea (1, 2, 3, ...) based on current line count. */
|
|
206
|
+
get payloadLineNumbers(): number[];
|
|
207
|
+
/** Whether current payload format is JSON (so we validate and show JSON editor behavior). */
|
|
208
|
+
get isPayloadFormatJson(): boolean;
|
|
209
|
+
/** Error messages for the payload textarea (red border + bottom line). */
|
|
210
|
+
get payloadJsonErrors(): string[];
|
|
211
|
+
/** Tooltip content for the line-level error icon (parse error on line X, excerpt, caret, message). */
|
|
212
|
+
get payloadJsonErrorTooltip(): string;
|
|
213
|
+
onPayloadTextChange(value: string): void;
|
|
214
|
+
onPayloadInput(event: Event): void;
|
|
215
|
+
onPayloadKeydown(event: KeyboardEvent): void;
|
|
216
|
+
/** Validate payload when format is JSON; sets payloadJsonError or clears it. */
|
|
217
|
+
validatePayloadJson(): void;
|
|
218
|
+
private extractPositionFromJsonError;
|
|
219
|
+
private positionToLineColumn;
|
|
220
|
+
private normalizeJsonErrorMessage;
|
|
221
|
+
payloadEditorWithLinesRef?: ElementRef<HTMLElement>;
|
|
222
|
+
payloadTextareaRef?: ElementRef<HTMLTextAreaElement>;
|
|
223
|
+
private static readonly DEFAULT_HEADER_NAME_OPTIONS;
|
|
224
|
+
/** Header name options: array of strings or objects with id, name, value, label (passed from parent). Falls back to built-in list when empty. */
|
|
225
|
+
headerNameOptions: EnvironmentOptionInput[];
|
|
226
|
+
/** Form array for header rows; each item is FormGroup({ name, value }) for cqa-dynamic-select and value input */
|
|
227
|
+
headersFormArray: FormArray;
|
|
228
|
+
/** Typed accessor for template (FormArray.controls is AbstractControl[]) */
|
|
229
|
+
get headerRows(): FormGroup[];
|
|
230
|
+
/** Config for header name dropdown (updated when headerNameOptions changes to avoid new reference every CD) */
|
|
231
|
+
headerNameSelectConfig: DynamicSelectFieldConfig;
|
|
232
|
+
private updateHeaderNameSelectConfig;
|
|
233
|
+
/** Collects distinct non-empty header names currently in the headers form (for dynamic options). */
|
|
234
|
+
private getCurrentHeaderNamesFromForm;
|
|
235
|
+
private readonly defaultHeaders;
|
|
236
|
+
/** Form array for key-value rows (Body payload); each item is FormGroup({ key, value }) */
|
|
237
|
+
keyValueFormArray: FormArray;
|
|
238
|
+
get keyValueRows(): FormGroup[];
|
|
239
|
+
/** Form array for key-type-value rows; each item is FormGroup({ key, type, value }) */
|
|
240
|
+
keyTypeValueFormArray: FormArray;
|
|
241
|
+
get keyTypeValueRows(): FormGroup[];
|
|
242
|
+
/** Config for Type dropdown in key-type-value rows (Text, File) */
|
|
243
|
+
readonly keyTypeValueTypeSelectConfig: DynamicSelectFieldConfig;
|
|
244
|
+
/** Form array for response body verification rows; each item is FormGroup({ jsonPath, verification, dataType, expectedValue }) */
|
|
245
|
+
verificationFormArray: FormArray;
|
|
246
|
+
get verificationRows(): FormGroup[];
|
|
247
|
+
/** Verification options: array of strings or objects (passed from parent). Falls back to built-in list when empty. */
|
|
248
|
+
verificationOptions: EnvironmentOptionInput[];
|
|
249
|
+
private static readonly DEFAULT_VERIFICATION_OPTIONS;
|
|
250
|
+
/** Config for Verification dropdown (updated when verificationOptions changes, like Method dropdown) */
|
|
251
|
+
verificationSelectConfig: DynamicSelectFieldConfig;
|
|
252
|
+
private updateVerificationSelectConfig;
|
|
253
|
+
private getVerificationValues;
|
|
254
|
+
private getDefaultVerification;
|
|
255
|
+
/** Data Type options: array of strings or objects (passed from parent). Falls back to built-in list when empty. */
|
|
256
|
+
verificationDataTypeOptions: EnvironmentOptionInput[];
|
|
257
|
+
private static readonly DEFAULT_DATA_TYPE_OPTIONS;
|
|
258
|
+
/** Config for Data Type dropdown (updated when verificationDataTypeOptions changes, like Method dropdown) */
|
|
259
|
+
verificationDataTypeSelectConfig: DynamicSelectFieldConfig;
|
|
260
|
+
private updateVerificationDataTypeSelectConfig;
|
|
261
|
+
private getDataTypeValues;
|
|
262
|
+
private getDefaultDataType;
|
|
263
|
+
/** Config for Expected Value when Data Type is Boolean (true/false dropdown) */
|
|
264
|
+
readonly verificationExpectedValueBooleanSelectConfig: DynamicSelectFieldConfig;
|
|
265
|
+
/** Form array for Status tab verification rows; each item is FormGroup({ verification, expectedValue }) */
|
|
266
|
+
statusVerificationFormArray: FormArray;
|
|
267
|
+
get statusVerificationRows(): FormGroup[];
|
|
268
|
+
/** Config for Status tab Verification dropdown (Equals, Not equal, Less than, Greater than) */
|
|
269
|
+
/** Status tab Verification options (Equals, Not equal, etc.). Falls back to built-in list when empty. */
|
|
270
|
+
statusVerificationOptions: EnvironmentOptionInput[];
|
|
271
|
+
private static readonly DEFAULT_STATUS_VERIFICATION_OPTIONS;
|
|
272
|
+
/** Config for Status tab Verification dropdown (updated when statusVerificationOptions changes). */
|
|
273
|
+
statusVerificationSelectConfig: DynamicSelectFieldConfig;
|
|
274
|
+
private updateStatusVerificationSelectConfig;
|
|
275
|
+
private getStatusVerificationValues;
|
|
276
|
+
private getDefaultStatusVerification;
|
|
277
|
+
responsePreview: string;
|
|
278
|
+
private methodChangesSub?;
|
|
279
|
+
private formatChangesSub?;
|
|
280
|
+
private headerNameOptionsChangesSub?;
|
|
281
|
+
private environmentFormChangesSub?;
|
|
282
|
+
private methodFormChangesSub?;
|
|
283
|
+
constructor(fb: FormBuilder, cdr: ChangeDetectorRef);
|
|
284
|
+
ngOnInit(): void;
|
|
285
|
+
ngAfterViewInit(): void;
|
|
286
|
+
ngOnDestroy(): void;
|
|
287
|
+
/** Sync line numbers column scroll with payload textarea scroll (Postman-style). */
|
|
288
|
+
private setupPayloadTextareaScrollSync;
|
|
289
|
+
private buildKeyValueFormArray;
|
|
290
|
+
private buildKeyTypeValueFormArray;
|
|
291
|
+
private buildVerificationFormArray;
|
|
292
|
+
private buildStatusVerificationFormArray;
|
|
293
|
+
private buildHeadersFormArray;
|
|
294
|
+
/** Handler: show import cURL panel (called when user clicks "Import API cURL"). */
|
|
295
|
+
openImportCurlPanel(): void;
|
|
296
|
+
/** Handler: emit cURL value from control and close panel. Called when user clicks Import button. */
|
|
297
|
+
onImportCurlConfirm(): void;
|
|
298
|
+
/** Handler: emit cancel and close panel. Called when user clicks Cancel in import cURL panel. */
|
|
299
|
+
onCancelImportCurl(): void;
|
|
300
|
+
/** Handler: show headers section (called from Cancel or after Import in import panel). */
|
|
301
|
+
closeImportCurlPanel(): void;
|
|
302
|
+
onSendRequest(): void;
|
|
303
|
+
onVariableNameChange(): void;
|
|
304
|
+
onBack(): void;
|
|
305
|
+
onNext(): void;
|
|
306
|
+
setPayloadTab(value: ApiEditPayloadTab): void;
|
|
307
|
+
setResponseVerificationTab(value: 'response-body' | 'status'): void;
|
|
308
|
+
addHeader(): void;
|
|
309
|
+
removeHeader(index: number): void;
|
|
310
|
+
/** When user adds a custom header name via the dropdown "Add '…'" option, set the control value. */
|
|
311
|
+
onHeaderNameAddCustomValue(event: {
|
|
312
|
+
key: string;
|
|
313
|
+
value: string;
|
|
314
|
+
}, row: FormGroup): void;
|
|
315
|
+
trackByHeader(index: number): number;
|
|
316
|
+
addKeyValueRow(): void;
|
|
317
|
+
removeKeyValueRow(index: number): void;
|
|
318
|
+
trackByKeyValue(index: number): number;
|
|
319
|
+
addKeyTypeValueRow(): void;
|
|
320
|
+
removeKeyTypeValueRow(index: number): void;
|
|
321
|
+
trackByKeyTypeValue(index: number): number;
|
|
322
|
+
addVerificationRow(): void;
|
|
323
|
+
removeVerificationRow(index: number): void;
|
|
324
|
+
trackByVerification(index: number): number;
|
|
325
|
+
/** When Data Type changes in Response Body verification, reset Expected Value for that row. */
|
|
326
|
+
onVerificationDataTypeChange(row: FormGroup, event: {
|
|
327
|
+
key: string;
|
|
328
|
+
value: unknown;
|
|
329
|
+
}): void;
|
|
330
|
+
addStatusVerificationRow(): void;
|
|
331
|
+
removeStatusVerificationRow(index: number): void;
|
|
332
|
+
trackByStatusVerification(index: number): number;
|
|
333
|
+
/** Emit all entered details (environment, HTTP method, URL, headers, body, step2 variable, step3 verifications) when user clicks Create. */
|
|
334
|
+
onCreate(): void;
|
|
335
|
+
/** Minimal payload when getCreatePayload throws (so create always emits). */
|
|
336
|
+
private getCreatePayloadFallback;
|
|
337
|
+
/** Normalize form control value to string (handles object or string). */
|
|
338
|
+
private static getControlValue;
|
|
339
|
+
/** Build full create payload: environment, HTTP method, URL, headers, body (step1), variable name (step2), verifications (step3). */
|
|
340
|
+
private getCreatePayload;
|
|
341
|
+
/** Current header rows from form (for consumers that read headers) */
|
|
342
|
+
get headers(): ApiEditHeaderRow[];
|
|
343
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
344
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApiEditStepComponent, never>;
|
|
345
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ApiEditStepComponent, "cqa-api-edit-step", never, { "initialMethod": "initialMethod"; "initialEnvironment": "initialEnvironment"; "initialStep": "initialStep"; "initialUrl": "initialUrl"; "initialPayloadTab": "initialPayloadTab"; "initialHeaders": "initialHeaders"; "initialResponsePreview": "initialResponsePreview"; "httpMethodOptions": "httpMethodOptions"; "environmentOptions": "environmentOptions"; "formatOptions": "formatOptions"; "initialFormat": "initialFormat"; "headerNameOptions": "headerNameOptions"; "verificationOptions": "verificationOptions"; "verificationDataTypeOptions": "verificationDataTypeOptions"; "statusVerificationOptions": "statusVerificationOptions"; }, { "importCurl": "importCurl"; "importCurlCancel": "importCurlCancel"; "sendRequest": "sendRequest"; "back": "back"; "next": "next"; "create": "create"; "headersChange": "headersChange"; }, never, never>;
|
|
346
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
2
3
|
import { ApiStepConfig } from '../test-case-step.models';
|
|
4
|
+
import { EnvironmentOptionInput } from '../api-edit-step/api-edit-step.component';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
export declare class TestCaseApiStepComponent implements OnInit {
|
|
7
|
+
private readonly overlayContainer;
|
|
8
|
+
editModalBackdropRef?: ElementRef<HTMLElement>;
|
|
5
9
|
config: ApiStepConfig;
|
|
6
10
|
stepNumber: number | string;
|
|
7
11
|
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
@@ -17,6 +21,12 @@ export declare class TestCaseApiStepComponent implements OnInit {
|
|
|
17
21
|
isInsideLoop: boolean;
|
|
18
22
|
expanded: boolean;
|
|
19
23
|
isReorder: boolean;
|
|
24
|
+
/** Environment options for the API edit step dropdown: strings or { id, name, value, label }. Passed to cqa-api-edit-step. */
|
|
25
|
+
environmentOptions?: EnvironmentOptionInput[];
|
|
26
|
+
/** HTTP method options for the API edit step dropdown: strings or { id, name, value, label }. Passed to cqa-api-edit-step. */
|
|
27
|
+
httpMethodOptions?: EnvironmentOptionInput[];
|
|
28
|
+
/** Header name options for the API edit step (e.g. for header dropdown): strings or { id, name, value, label }. Passed to cqa-api-edit-step. */
|
|
29
|
+
headerNameOptions?: EnvironmentOptionInput[];
|
|
20
30
|
edit: EventEmitter<void>;
|
|
21
31
|
link: EventEmitter<void>;
|
|
22
32
|
duplicate: EventEmitter<void>;
|
|
@@ -31,7 +41,13 @@ export declare class TestCaseApiStepComponent implements OnInit {
|
|
|
31
41
|
ngOnInit(): void;
|
|
32
42
|
getDisplayText(): string;
|
|
33
43
|
onToggleExpanded(): void;
|
|
44
|
+
editModalOpen: boolean;
|
|
45
|
+
constructor(overlayContainer: OverlayContainer);
|
|
34
46
|
onEdit(): void;
|
|
47
|
+
closeEditModal(): void;
|
|
48
|
+
/** Attach overlay container to modal backdrop so select panels position below trigger (same stacking context). */
|
|
49
|
+
private attachOverlayToModalBackdrop;
|
|
50
|
+
private detachOverlayFromModalBackdrop;
|
|
35
51
|
onLink(): void;
|
|
36
52
|
onDuplicate(): void;
|
|
37
53
|
onDelete(): void;
|
|
@@ -39,5 +55,5 @@ export declare class TestCaseApiStepComponent implements OnInit {
|
|
|
39
55
|
onViewDetails(): void;
|
|
40
56
|
onSelectionChange(checked: boolean): void;
|
|
41
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<TestCaseApiStepComponent, never>;
|
|
42
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TestCaseApiStepComponent, "cqa-test-case-api-step", never, { "config": "config"; "stepNumber": "stepNumber"; "method": "method"; "endpoint": "endpoint"; "description": "description"; "baseUrl": "baseUrl"; "headersCount": "headersCount"; "hasBody": "hasBody"; "saveTo": "saveTo"; "selected": "selected"; "disabled": "disabled"; "isNested": "isNested"; "isInsideLoop": "isInsideLoop"; "expanded": "expanded"; "isReorder": "isReorder"; }, { "edit": "edit"; "link": "link"; "duplicate": "duplicate"; "delete": "delete"; "moreOptions": "moreOptions"; "viewDetails": "viewDetails"; "selectionChange": "selectionChange"; "toggleExpanded": "toggleExpanded"; }, never, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TestCaseApiStepComponent, "cqa-test-case-api-step", never, { "config": "config"; "stepNumber": "stepNumber"; "method": "method"; "endpoint": "endpoint"; "description": "description"; "baseUrl": "baseUrl"; "headersCount": "headersCount"; "hasBody": "hasBody"; "saveTo": "saveTo"; "selected": "selected"; "disabled": "disabled"; "isNested": "isNested"; "isInsideLoop": "isInsideLoop"; "expanded": "expanded"; "isReorder": "isReorder"; "environmentOptions": "environmentOptions"; "httpMethodOptions": "httpMethodOptions"; "headerNameOptions": "headerNameOptions"; }, { "edit": "edit"; "link": "link"; "duplicate": "duplicate"; "delete": "delete"; "moreOptions": "moreOptions"; "viewDetails": "viewDetails"; "selectionChange": "selectionChange"; "toggleExpanded": "toggleExpanded"; }, never, never>;
|
|
43
59
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { TestCaseStepConfig } from '../test-case-step.models';
|
|
3
|
+
export interface StepDetailsDrawerData {
|
|
4
|
+
step: TestCaseStepConfig;
|
|
5
|
+
stepNumber: number | string;
|
|
6
|
+
}
|
|
7
|
+
export declare const STEP_DETAILS_DRAWER_DATA: InjectionToken<StepDetailsDrawerData>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for Step Details Drawer (Edit In Depth).
|
|
3
|
+
* Form is fully dynamic by Step Type – no hardcoded field lists.
|
|
4
|
+
*/
|
|
5
|
+
import { TestCaseStepConfig } from '../test-case-step.models';
|
|
6
|
+
/** Field keys used for configuration-based rendering. */
|
|
7
|
+
export declare type StepDetailsFieldKey = 'description' | 'metadata' | 'retryCount' | 'advanced' | 'method' | 'url' | 'headers' | 'body' | 'saveOutputAsVariable' | 'agentTask' | 'type' | 'environment' | 'maxRetries' | 'onlyUseAttachedContext' | 'takeScreenshotsWhenVerifying' | 'iframeLocator' | 'otherLocators' | 'continueOnError' | 'disabled';
|
|
8
|
+
/** Step type for the drawer (drives which fields are shown). */
|
|
9
|
+
export declare type StepDetailsStepType = 'custom' | 'api' | 'aiAgent';
|
|
10
|
+
/**
|
|
11
|
+
* Resolves drawer step type from a test case step config.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getStepDetailsStepType(step: TestCaseStepConfig | null | undefined): StepDetailsStepType | null;
|
|
14
|
+
/**
|
|
15
|
+
* Fields shown per step type (configuration-based).
|
|
16
|
+
* Custom: Description, Metadata, Retry Count (if configured), Advanced (if configured).
|
|
17
|
+
* API: Method, URL, Headers, Body, Save Output as Variable, Advanced (if configured).
|
|
18
|
+
* AI Agent: Agent Task, Type, Metadata, Environment, Description, Constraints (toggles + Max Retries), Advanced (toggles + Retry Count, Iframe locator, Other Locators).
|
|
19
|
+
*/
|
|
20
|
+
export declare const STEP_DETAILS_FIELDS_BY_TYPE: Record<StepDetailsStepType, StepDetailsFieldKey[]>;
|
|
21
|
+
/** Section for grouping fields (main form, constraints, or inside advanced). */
|
|
22
|
+
export declare type StepDetailsFieldSection = 'main' | 'constraints' | 'advanced';
|
|
23
|
+
/** Option for dropdown fields (value/label). */
|
|
24
|
+
export interface StepDetailsSelectOption {
|
|
25
|
+
value: string;
|
|
26
|
+
label: string;
|
|
27
|
+
}
|
|
28
|
+
/** Metadata per field (label, placeholder, control type, visibility). */
|
|
29
|
+
export interface StepDetailsFieldMeta {
|
|
30
|
+
key: StepDetailsFieldKey;
|
|
31
|
+
label: string;
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
controlType: 'text' | 'textarea' | 'dropdown' | 'code' | 'toggleGroup' | 'toggle';
|
|
34
|
+
/** Section for grouping; used for conditional headings (e.g. "Constraints"). */
|
|
35
|
+
section?: StepDetailsFieldSection;
|
|
36
|
+
/** Dropdown options (for controlType === 'dropdown'). */
|
|
37
|
+
options?: StepDetailsSelectOption[];
|
|
38
|
+
/** Whether the field is required (e.g. show Required pill). */
|
|
39
|
+
required?: boolean;
|
|
40
|
+
/** Textarea rows. */
|
|
41
|
+
rows?: number;
|
|
42
|
+
/** Helper text or tip below the field. */
|
|
43
|
+
tip?: string;
|
|
44
|
+
/** Sub-label or description for toggles (e.g. "Only use elements from the attached context"). */
|
|
45
|
+
subLabel?: string;
|
|
46
|
+
}
|
|
47
|
+
export declare const STEP_DETAILS_FIELD_META: Record<StepDetailsFieldKey, StepDetailsFieldMeta>;
|
|
48
|
+
/** Toggle fields always shown inside the Advanced section. */
|
|
49
|
+
export declare const ADVANCED_TOGGLE_KEYS: StepDetailsFieldKey[];
|
|
50
|
+
/** Field keys shown inside Advanced (per step type), in addition to ADVANCED_TOGGLE_KEYS. */
|
|
51
|
+
export declare const ADVANCED_SUBFIELDS_BY_TYPE: Record<StepDetailsStepType, StepDetailsFieldKey[]>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { OverlayRef } from '@angular/cdk/overlay';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export declare class StepDetailsDrawerRef<TResult = unknown> {
|
|
5
|
+
private readonly overlayRef;
|
|
6
|
+
private readonly closed$;
|
|
7
|
+
private isClosed;
|
|
8
|
+
constructor(overlayRef: OverlayRef);
|
|
9
|
+
close(result?: TResult): void;
|
|
10
|
+
afterClosed(): Observable<TResult | undefined>;
|
|
11
|
+
private finishClose;
|
|
12
|
+
}
|
|
13
|
+
export declare const STEP_DETAILS_DRAWER_REF: InjectionToken<StepDetailsDrawerRef<unknown>>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
3
|
+
import { StepDetailsFieldKey, StepDetailsStepType, StepDetailsFieldSection } from './step-details-drawer-field.config';
|
|
4
|
+
import { StepDetailsDrawerRef } from './step-details-drawer-ref';
|
|
5
|
+
import { StepDetailsDrawerData } from './step-details-drawer-data';
|
|
6
|
+
import { TestCaseStepConfig } from '../test-case-step.models';
|
|
7
|
+
import type { DynamicSelectFieldConfig } from '../../dynamic-select/dynamic-select-field.component';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Step Details Drawer (Edit In Depth).
|
|
11
|
+
* Single reusable component; form is dynamic by Step Type via configuration.
|
|
12
|
+
* No Priority section. Uses CQA components only.
|
|
13
|
+
*/
|
|
14
|
+
export declare class StepDetailsDrawerComponent implements OnInit, OnChanges {
|
|
15
|
+
private ref;
|
|
16
|
+
private fb;
|
|
17
|
+
private cdr;
|
|
18
|
+
saveChanges: EventEmitter<TestCaseStepConfig>;
|
|
19
|
+
cancel: EventEmitter<void>;
|
|
20
|
+
saveAsTemplate: EventEmitter<TestCaseStepConfig>;
|
|
21
|
+
/** Optional: when provided (e.g. from Storybook Controls), use instead of STEP_DETAILS_DRAWER_DATA. */
|
|
22
|
+
stepData: TestCaseStepConfig | null;
|
|
23
|
+
stepNumberInput: number | string | null;
|
|
24
|
+
step: TestCaseStepConfig;
|
|
25
|
+
stepNumber: number | string;
|
|
26
|
+
stepType: StepDetailsStepType | null;
|
|
27
|
+
visibleFields: StepDetailsFieldKey[];
|
|
28
|
+
fieldMeta: Record<StepDetailsFieldKey, import("./step-details-drawer-field.config").StepDetailsFieldMeta>;
|
|
29
|
+
advancedToggleKeys: StepDetailsFieldKey[];
|
|
30
|
+
advancedExpanded: boolean;
|
|
31
|
+
agentTaskExpanded: boolean;
|
|
32
|
+
form: FormGroup;
|
|
33
|
+
/** Cached select configs (stable references per key) to avoid infinite change detection in template. */
|
|
34
|
+
readonly selectConfigMap: Record<string, DynamicSelectFieldConfig>;
|
|
35
|
+
/** Subfields to show inside Advanced section for current step type. */
|
|
36
|
+
get advancedSubfields(): StepDetailsFieldKey[];
|
|
37
|
+
constructor(ref: StepDetailsDrawerRef, fb: FormBuilder, cdr: ChangeDetectorRef, data?: StepDetailsDrawerData);
|
|
38
|
+
ngOnInit(): void;
|
|
39
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
40
|
+
private syncStepTypeAndForm;
|
|
41
|
+
private buildFormFromStep;
|
|
42
|
+
getStepValue(key: StepDetailsFieldKey): unknown;
|
|
43
|
+
setStepValue(key: StepDetailsFieldKey, value: unknown): void;
|
|
44
|
+
onBack(): void;
|
|
45
|
+
onClose(): void;
|
|
46
|
+
onCancel(): void;
|
|
47
|
+
onSaveAsTemplate(): void;
|
|
48
|
+
onSaveChanges(): void;
|
|
49
|
+
private applyFormToStep;
|
|
50
|
+
/** Build cached map of select configs from field meta (stable refs to prevent CD loops). */
|
|
51
|
+
private buildSelectConfigMap;
|
|
52
|
+
/** Return cached select config for key (for template use; same reference every time). */
|
|
53
|
+
getSelectConfig(key: StepDetailsFieldKey): DynamicSelectFieldConfig | null;
|
|
54
|
+
/** Whether this key is the first in its section (for showing section headings). */
|
|
55
|
+
isFirstInSection(key: StepDetailsFieldKey, section: StepDetailsFieldSection): boolean;
|
|
56
|
+
/** Dynamic drawer title by step type (e.g. "AI Agent Step Details"). */
|
|
57
|
+
get drawerTitle(): string;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StepDetailsDrawerComponent, [null, null, null, { optional: true; }]>;
|
|
59
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StepDetailsDrawerComponent, "cqa-step-details-drawer", never, { "stepData": "stepData"; "stepNumberInput": "stepNumberInput"; }, { "saveChanges": "saveChanges"; "cancel": "cancel"; "saveAsTemplate": "saveAsTemplate"; }, never, never>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
3
|
+
import { TestCaseStepConfig } from '../test-case-step.models';
|
|
4
|
+
import { StepDetailsDrawerRef } from './step-details-drawer-ref';
|
|
5
|
+
import { StepDetailsDrawerData } from './step-details-drawer-data';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export interface StepDetailsDrawerResult {
|
|
8
|
+
action: 'saveChanges' | 'saveAsTemplate' | 'cancel';
|
|
9
|
+
step?: TestCaseStepConfig;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Opens the Step Details Drawer (Edit In Depth) from the right.
|
|
13
|
+
*/
|
|
14
|
+
export declare class StepDetailsDrawerService {
|
|
15
|
+
private readonly overlay;
|
|
16
|
+
private readonly injector;
|
|
17
|
+
private currentRef;
|
|
18
|
+
constructor(overlay: Overlay, injector: Injector);
|
|
19
|
+
open(data: StepDetailsDrawerData): StepDetailsDrawerRef<StepDetailsDrawerResult>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StepDetailsDrawerService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StepDetailsDrawerService>;
|
|
22
|
+
}
|