@cqa-lib/cqa-ui 1.1.265 → 1.1.266
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/step-builder/advanced-variables-form/advanced-variables-form.component.mjs +3 -3
- package/esm2020/lib/step-builder/template-variables-form/template-variables-form.component.mjs +310 -146
- package/fesm2015/cqa-lib-cqa-ui.mjs +320 -156
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +312 -148
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/step-builder/template-variables-form/template-variables-form.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -25293,10 +25293,10 @@ class AdvancedVariablesFormComponent {
|
|
|
25293
25293
|
}
|
|
25294
25294
|
}
|
|
25295
25295
|
AdvancedVariablesFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AdvancedVariablesFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25296
|
-
AdvancedVariablesFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: AdvancedVariablesFormComponent, selector: "cqa-advanced-variables-form", inputs: { advancedVariables: "advancedVariables", advancedVariableForm: "advancedVariableForm" }, outputs: { variableBooleanChange: "variableBooleanChange", variableValueChange: "variableValueChange" }, host: { classAttribute: "cqa-ui-root" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cqa-flex cqa-gap-x-6 cqa-gap-y-4 cqa-flex-wrap advanced-variables-form cqa-mb-4\">\n <ng-container *ngFor=\"let variable of advancedVariables; let i = index; trackBy: trackByVariable\">\n <!-- Boolean variables with mat-slide-toggle -->\n <ng-container *ngIf=\"isBooleanType(variable)\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\" style=\"width: 100%\">\n <mat-slide-toggle \n [checked]=\"getBooleanValue(variable, i)\"\n (change)=\"onVariableBooleanChange(variable.name, $event.checked)\" \n color=\"primary\">\n </mat-slide-toggle>\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 capitalize-first\">\n {{ variable.label }}\n </label>\n </div>\n </ng-container>\n\n <!-- str_list variables with dynamic list -->\n <ng-container *ngIf=\"isStrListType(variable)\">\n <div class=\"cqa-flex cqa-flex-col cqa-w-full\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <div class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <ng-container *ngIf=\"getStrListFormArray(variable, i) as formArray\">\n <div *ngFor=\"let control of formArray.controls; let itemIndex = index; trackBy: trackByControl\" class=\"cqa-flex cqa-gap-2 cqa-items-center\">\n <cqa-custom-input \n [placeholder]=\"'Enter locator'\" \n [value]=\"control.value\" \n [fullWidth]=\"true\"\n (valueChange)=\"onStrListItemChange(variable, i, itemIndex, $event)\">\n </cqa-custom-input>\n <div class=\"cqa-cursor-pointer cqa-text-red-600 cqa-flex cqa-items-center cqa-justify-center\" (click)=\"removeStrListItem(variable, i, itemIndex)\">\n <mat-icon style=\"font-size: 24px;\">delete</mat-icon>\n </div>\n <div *ngIf=\"itemIndex === formArray.length - 1\" class=\"cqa-cursor-pointer cqa-text-blue-600 cqa-flex cqa-items-center cqa-justify-center\" (click)=\"addStrListItem(variable, i)\">\n <mat-icon style=\"font-size: 24px;\">add</mat-icon>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</div>\n\n", components: [{ type: i4$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: CustomInputComponent, selector: "cqa-custom-input", inputs: ["label", "type", "placeholder", "value", "disabled", "errors", "required", "ariaLabel", "size", "fullWidth", "maxLength", "showCharCount", "inputInlineStyle", "labelInlineStyle"], outputs: ["valueChange", "blurred", "focused", "enterPressed"] }, { type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25296
|
+
AdvancedVariablesFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: AdvancedVariablesFormComponent, selector: "cqa-advanced-variables-form", inputs: { advancedVariables: "advancedVariables", advancedVariableForm: "advancedVariableForm" }, outputs: { variableBooleanChange: "variableBooleanChange", variableValueChange: "variableValueChange" }, host: { classAttribute: "cqa-ui-root" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cqa-flex cqa-gap-x-6 cqa-gap-y-4 cqa-flex-wrap advanced-variables-form cqa-mb-4\">\n <ng-container *ngFor=\"let variable of advancedVariables; let i = index; trackBy: trackByVariable\">\n <!-- Boolean variables with mat-slide-toggle -->\n <ng-container *ngIf=\"isBooleanType(variable)\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\" style=\"width: 100%\">\n <mat-slide-toggle \n [checked]=\"getBooleanValue(variable, i)\"\n (change)=\"onVariableBooleanChange(variable.name, $event.checked)\" \n color=\"primary\">\n </mat-slide-toggle>\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 capitalize-first\">\n {{ variable.label }}\n </label>\n </div>\n </ng-container>\n\n <!-- str_list variables with dynamic list -->\n <ng-container *ngIf=\"isStrListType(variable)\">\n <div class=\"cqa-flex cqa-flex-col cqa-w-full\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <div class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <ng-container *ngIf=\"getStrListFormArray(variable, i) as formArray\">\n <div *ngFor=\"let control of formArray.controls; let itemIndex = index; trackBy: trackByControl\" class=\"cqa-flex cqa-gap-2 cqa-items-center\">\n <cqa-custom-input \n [placeholder]=\"'Enter locator'\" \n [value]=\"control.value\" \n [fullWidth]=\"true\"\n (valueChange)=\"onStrListItemChange(variable, i, itemIndex, $event)\">\n </cqa-custom-input>\n <div *ngIf=\"formArray.length > 1\" class=\"cqa-cursor-pointer cqa-text-red-600 cqa-flex cqa-items-center cqa-justify-center\" (click)=\"removeStrListItem(variable, i, itemIndex)\">\n <mat-icon style=\"font-size: 24px;\">delete</mat-icon>\n </div>\n <div *ngIf=\"itemIndex === formArray.length - 1\" class=\"cqa-cursor-pointer cqa-text-blue-600 cqa-flex cqa-items-center cqa-justify-center\" (click)=\"addStrListItem(variable, i)\">\n <mat-icon style=\"font-size: 24px;\">add</mat-icon>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</div>\n\n", components: [{ type: i4$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: CustomInputComponent, selector: "cqa-custom-input", inputs: ["label", "type", "placeholder", "value", "disabled", "errors", "required", "ariaLabel", "size", "fullWidth", "maxLength", "showCharCount", "inputInlineStyle", "labelInlineStyle"], outputs: ["valueChange", "blurred", "focused", "enterPressed"] }, { type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25297
25297
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AdvancedVariablesFormComponent, decorators: [{
|
|
25298
25298
|
type: Component,
|
|
25299
|
-
args: [{ selector: 'cqa-advanced-variables-form', host: { class: 'cqa-ui-root' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cqa-flex cqa-gap-x-6 cqa-gap-y-4 cqa-flex-wrap advanced-variables-form cqa-mb-4\">\n <ng-container *ngFor=\"let variable of advancedVariables; let i = index; trackBy: trackByVariable\">\n <!-- Boolean variables with mat-slide-toggle -->\n <ng-container *ngIf=\"isBooleanType(variable)\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\" style=\"width: 100%\">\n <mat-slide-toggle \n [checked]=\"getBooleanValue(variable, i)\"\n (change)=\"onVariableBooleanChange(variable.name, $event.checked)\" \n color=\"primary\">\n </mat-slide-toggle>\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 capitalize-first\">\n {{ variable.label }}\n </label>\n </div>\n </ng-container>\n\n <!-- str_list variables with dynamic list -->\n <ng-container *ngIf=\"isStrListType(variable)\">\n <div class=\"cqa-flex cqa-flex-col cqa-w-full\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <div class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <ng-container *ngIf=\"getStrListFormArray(variable, i) as formArray\">\n <div *ngFor=\"let control of formArray.controls; let itemIndex = index; trackBy: trackByControl\" class=\"cqa-flex cqa-gap-2 cqa-items-center\">\n <cqa-custom-input \n [placeholder]=\"'Enter locator'\" \n [value]=\"control.value\" \n [fullWidth]=\"true\"\n (valueChange)=\"onStrListItemChange(variable, i, itemIndex, $event)\">\n </cqa-custom-input>\n <div class=\"cqa-cursor-pointer cqa-text-red-600 cqa-flex cqa-items-center cqa-justify-center\" (click)=\"removeStrListItem(variable, i, itemIndex)\">\n <mat-icon style=\"font-size: 24px;\">delete</mat-icon>\n </div>\n <div *ngIf=\"itemIndex === formArray.length - 1\" class=\"cqa-cursor-pointer cqa-text-blue-600 cqa-flex cqa-items-center cqa-justify-center\" (click)=\"addStrListItem(variable, i)\">\n <mat-icon style=\"font-size: 24px;\">add</mat-icon>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</div>\n\n", styles: [] }]
|
|
25299
|
+
args: [{ selector: 'cqa-advanced-variables-form', host: { class: 'cqa-ui-root' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cqa-flex cqa-gap-x-6 cqa-gap-y-4 cqa-flex-wrap advanced-variables-form cqa-mb-4\">\n <ng-container *ngFor=\"let variable of advancedVariables; let i = index; trackBy: trackByVariable\">\n <!-- Boolean variables with mat-slide-toggle -->\n <ng-container *ngIf=\"isBooleanType(variable)\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\" style=\"width: 100%\">\n <mat-slide-toggle \n [checked]=\"getBooleanValue(variable, i)\"\n (change)=\"onVariableBooleanChange(variable.name, $event.checked)\" \n color=\"primary\">\n </mat-slide-toggle>\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 capitalize-first\">\n {{ variable.label }}\n </label>\n </div>\n </ng-container>\n\n <!-- str_list variables with dynamic list -->\n <ng-container *ngIf=\"isStrListType(variable)\">\n <div class=\"cqa-flex cqa-flex-col cqa-w-full\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <div class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <ng-container *ngIf=\"getStrListFormArray(variable, i) as formArray\">\n <div *ngFor=\"let control of formArray.controls; let itemIndex = index; trackBy: trackByControl\" class=\"cqa-flex cqa-gap-2 cqa-items-center\">\n <cqa-custom-input \n [placeholder]=\"'Enter locator'\" \n [value]=\"control.value\" \n [fullWidth]=\"true\"\n (valueChange)=\"onStrListItemChange(variable, i, itemIndex, $event)\">\n </cqa-custom-input>\n <div *ngIf=\"formArray.length > 1\" class=\"cqa-cursor-pointer cqa-text-red-600 cqa-flex cqa-items-center cqa-justify-center\" (click)=\"removeStrListItem(variable, i, itemIndex)\">\n <mat-icon style=\"font-size: 24px;\">delete</mat-icon>\n </div>\n <div *ngIf=\"itemIndex === formArray.length - 1\" class=\"cqa-cursor-pointer cqa-text-blue-600 cqa-flex cqa-items-center cqa-justify-center\" (click)=\"addStrListItem(variable, i)\">\n <mat-icon style=\"font-size: 24px;\">add</mat-icon>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</div>\n\n", styles: [] }]
|
|
25300
25300
|
}], propDecorators: { advancedVariables: [{
|
|
25301
25301
|
type: Input
|
|
25302
25302
|
}], advancedVariableForm: [{
|
|
@@ -27417,15 +27417,18 @@ class TemplateVariablesFormComponent {
|
|
|
27417
27417
|
if (this.isElementType(variable) && variable.screenNameId) {
|
|
27418
27418
|
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
27419
27419
|
if (variableGroup) {
|
|
27420
|
-
// Initialize screen name form control with screenNameId (
|
|
27420
|
+
// Initialize screen name form control with screenNameId as string (to match option id format), or 'none' by default
|
|
27421
27421
|
if (!variableGroup.get('selectedScreenName')) {
|
|
27422
|
-
|
|
27422
|
+
const initialValue = variable.screenNameId ? String(variable.screenNameId) : 'none';
|
|
27423
|
+
variableGroup.addControl('selectedScreenName', new FormControl(initialValue));
|
|
27423
27424
|
}
|
|
27424
27425
|
else {
|
|
27425
27426
|
// Update form control value if it doesn't match
|
|
27426
27427
|
const currentValue = (_a = variableGroup.get('selectedScreenName')) === null || _a === void 0 ? void 0 : _a.value;
|
|
27427
|
-
|
|
27428
|
-
|
|
27428
|
+
const expectedValue = variable.screenNameId ? String(variable.screenNameId) : 'none';
|
|
27429
|
+
const currentValueStr = currentValue != null ? String(currentValue) : null;
|
|
27430
|
+
if (currentValueStr !== expectedValue && currentValue !== variable.screenNameId) {
|
|
27431
|
+
(_b = variableGroup.get('selectedScreenName')) === null || _b === void 0 ? void 0 : _b.setValue(expectedValue, { emitEvent: false });
|
|
27429
27432
|
}
|
|
27430
27433
|
}
|
|
27431
27434
|
// If we have screenNameId but not selectedScreenName, find it from screenNameOptions
|
|
@@ -27456,70 +27459,108 @@ class TemplateVariablesFormComponent {
|
|
|
27456
27459
|
// This ensures that when elements are loaded after screen name selection, the config is recomputed
|
|
27457
27460
|
this.elementSelectConfigCache.clear();
|
|
27458
27461
|
this.templateVariables.forEach((variable) => {
|
|
27459
|
-
var _a, _b, _c;
|
|
27462
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
27460
27463
|
if (this.isElementType(variable)) {
|
|
27461
27464
|
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
27462
27465
|
if (variableGroup) {
|
|
27463
|
-
|
|
27464
|
-
//
|
|
27466
|
+
// Only try to find and set element if elementId exists in template data
|
|
27467
|
+
// If no elementId, don't select anything - use default values
|
|
27465
27468
|
if (variable.elementId) {
|
|
27469
|
+
let element = null;
|
|
27470
|
+
// Priority 1: Find by elementId (from setTemplateVariables)
|
|
27466
27471
|
element = this.elementOptions.find(el => el.id === variable.elementId);
|
|
27467
|
-
|
|
27468
|
-
|
|
27469
|
-
|
|
27470
|
-
|
|
27471
|
-
|
|
27472
|
-
|
|
27473
|
-
|
|
27474
|
-
|
|
27475
|
-
|
|
27476
|
-
|
|
27477
|
-
|
|
27478
|
-
|
|
27479
|
-
|
|
27480
|
-
|
|
27481
|
-
|
|
27482
|
-
|
|
27483
|
-
|
|
27484
|
-
|
|
27485
|
-
|
|
27472
|
+
// Priority 2: Find by elementName if elementId search didn't find it (fallback)
|
|
27473
|
+
if (!element && variable.elementName) {
|
|
27474
|
+
element = this.elementOptions.find(el => el.name === variable.elementName);
|
|
27475
|
+
}
|
|
27476
|
+
// Priority 3: Find by locatorValue (for backward compatibility)
|
|
27477
|
+
if (!element && variable.value) {
|
|
27478
|
+
const elementValue = variable.value;
|
|
27479
|
+
element = this.elementOptions.find(el => el.locatorValue === elementValue);
|
|
27480
|
+
}
|
|
27481
|
+
if (element) {
|
|
27482
|
+
// Set screen name info from the found element
|
|
27483
|
+
if (element.screenNameId && element.screenNameObj) {
|
|
27484
|
+
variable.selectedScreenName = element.screenNameObj.name;
|
|
27485
|
+
variable.screenNameId = element.screenNameId;
|
|
27486
|
+
// Set form controls
|
|
27487
|
+
// Store screenNameId as string to match option id format (for consistency with getScreenNameSelectConfig)
|
|
27488
|
+
const screenNameIdString = String(element.screenNameId);
|
|
27489
|
+
if (!variableGroup.get('selectedScreenName')) {
|
|
27490
|
+
variableGroup.addControl('selectedScreenName', new FormControl(screenNameIdString));
|
|
27491
|
+
}
|
|
27492
|
+
else {
|
|
27493
|
+
// Only update if form control doesn't already have a valid screen name selected
|
|
27494
|
+
// This prevents resetting user's selection when elementOptions changes
|
|
27495
|
+
const currentValue = (_a = variableGroup.get('selectedScreenName')) === null || _a === void 0 ? void 0 : _a.value;
|
|
27496
|
+
const currentValueStr = currentValue != null ? String(currentValue) : null;
|
|
27497
|
+
if (currentValueStr !== screenNameIdString && currentValueStr !== 'none') {
|
|
27498
|
+
(_b = variableGroup.get('selectedScreenName')) === null || _b === void 0 ? void 0 : _b.setValue(screenNameIdString, { emitEvent: false });
|
|
27499
|
+
}
|
|
27500
|
+
}
|
|
27501
|
+
}
|
|
27502
|
+
// Set/update element details from the found element
|
|
27503
|
+
variable.elementId = element.id;
|
|
27504
|
+
variable.elementLocator = element.locatorValue || '';
|
|
27505
|
+
// Only update elementName if it wasn't already set (preserve from setTemplateVariables)
|
|
27506
|
+
if (!variable.elementName) {
|
|
27507
|
+
variable.elementName = element.name || '';
|
|
27508
|
+
}
|
|
27509
|
+
// For selector, use elementLocator as value; for others, use elementName
|
|
27510
|
+
if (variable.name === 'selector') {
|
|
27511
|
+
variable.value = element.locatorValue || element.name || '';
|
|
27512
|
+
}
|
|
27513
|
+
else if (!variable.value || variable.value === '') {
|
|
27514
|
+
variable.value = element.name || element.locatorValue || '';
|
|
27515
|
+
}
|
|
27516
|
+
// Set element ID form control for the dropdown (key is 'id' in config)
|
|
27517
|
+
if (!variableGroup.get('id')) {
|
|
27518
|
+
variableGroup.addControl('id', new FormControl(element.id));
|
|
27486
27519
|
}
|
|
27487
27520
|
else {
|
|
27488
|
-
(
|
|
27521
|
+
(_c = variableGroup.get('id')) === null || _c === void 0 ? void 0 : _c.setValue(element.id, { emitEvent: false });
|
|
27522
|
+
}
|
|
27523
|
+
// Update value form control
|
|
27524
|
+
if (variableGroup.get('value')) {
|
|
27525
|
+
(_d = variableGroup.get('value')) === null || _d === void 0 ? void 0 : _d.setValue(variable.value, { emitEvent: false });
|
|
27489
27526
|
}
|
|
27490
27527
|
}
|
|
27491
|
-
|
|
27492
|
-
|
|
27493
|
-
|
|
27494
|
-
|
|
27495
|
-
|
|
27496
|
-
|
|
27497
|
-
}
|
|
27498
|
-
// For selector, use elementLocator as value; for others, use elementName
|
|
27499
|
-
if (variable.name === 'selector') {
|
|
27500
|
-
variable.value = element.locatorValue || element.name || '';
|
|
27528
|
+
else {
|
|
27529
|
+
// Element not found in elementOptions yet - might need to fetch
|
|
27530
|
+
// Keep elementId and elementName if they exist (from setTemplateVariables)
|
|
27531
|
+
// If we have elementId but element isn't found, we might need to fetch elements
|
|
27532
|
+
// However, we don't know the screen name yet, so we'll wait for elementOptions to be loaded
|
|
27533
|
+
// The initialization will run again when elementOptions changes via ngOnChanges
|
|
27501
27534
|
}
|
|
27502
|
-
|
|
27503
|
-
|
|
27535
|
+
}
|
|
27536
|
+
else {
|
|
27537
|
+
// No elementId in template data - clear all element-related fields and set defaults
|
|
27538
|
+
// But don't override user's screen name selection if they've already selected one
|
|
27539
|
+
variable.elementId = undefined;
|
|
27540
|
+
variable.elementLocator = undefined;
|
|
27541
|
+
variable.elementName = undefined;
|
|
27542
|
+
// Only clear screenNameId if it wasn't set by user selection
|
|
27543
|
+
// Check if form control has a valid screen name (not 'none')
|
|
27544
|
+
const currentScreenNameValue = (_e = variableGroup.get('selectedScreenName')) === null || _e === void 0 ? void 0 : _e.value;
|
|
27545
|
+
if (!currentScreenNameValue || currentScreenNameValue === 'none' || currentScreenNameValue === null) {
|
|
27546
|
+
variable.screenNameId = undefined;
|
|
27547
|
+
variable.selectedScreenName = undefined;
|
|
27548
|
+
// Set form controls to default values
|
|
27549
|
+
// Screen name should be 'none' (Select option)
|
|
27550
|
+
if (!variableGroup.get('selectedScreenName')) {
|
|
27551
|
+
variableGroup.addControl('selectedScreenName', new FormControl('none'));
|
|
27552
|
+
}
|
|
27553
|
+
else {
|
|
27554
|
+
(_f = variableGroup.get('selectedScreenName')) === null || _f === void 0 ? void 0 : _f.setValue('none', { emitEvent: false });
|
|
27555
|
+
}
|
|
27504
27556
|
}
|
|
27505
|
-
//
|
|
27557
|
+
// Element ID should be null
|
|
27506
27558
|
if (!variableGroup.get('id')) {
|
|
27507
|
-
variableGroup.addControl('id', new FormControl(
|
|
27559
|
+
variableGroup.addControl('id', new FormControl(null));
|
|
27508
27560
|
}
|
|
27509
27561
|
else {
|
|
27510
|
-
(
|
|
27562
|
+
(_g = variableGroup.get('id')) === null || _g === void 0 ? void 0 : _g.setValue(null, { emitEvent: false });
|
|
27511
27563
|
}
|
|
27512
|
-
// Update value form control
|
|
27513
|
-
if (variableGroup.get('value')) {
|
|
27514
|
-
(_c = variableGroup.get('value')) === null || _c === void 0 ? void 0 : _c.setValue(variable.value, { emitEvent: false });
|
|
27515
|
-
}
|
|
27516
|
-
}
|
|
27517
|
-
else {
|
|
27518
|
-
// Element not found in elementOptions yet - might need to fetch
|
|
27519
|
-
// Keep elementId and elementName if they exist (from setTemplateVariables)
|
|
27520
|
-
// If we have elementId but element isn't found, we might need to fetch elements
|
|
27521
|
-
// However, we don't know the screen name yet, so we'll wait for elementOptions to be loaded
|
|
27522
|
-
// The initialization will run again when elementOptions changes via ngOnChanges
|
|
27523
27564
|
}
|
|
27524
27565
|
}
|
|
27525
27566
|
}
|
|
@@ -27579,7 +27620,7 @@ class TemplateVariablesFormComponent {
|
|
|
27579
27620
|
}
|
|
27580
27621
|
initializeTestDataVariables() {
|
|
27581
27622
|
this.templateVariables.forEach((variable, index) => {
|
|
27582
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
27623
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
27583
27624
|
if (this.needsDataTypeDropdown(variable)) {
|
|
27584
27625
|
const { dataType, rawValue } = this.parseTestDataValue(variable.value || '');
|
|
27585
27626
|
// Set properties directly on the variable object
|
|
@@ -27738,67 +27779,105 @@ class TemplateVariablesFormComponent {
|
|
|
27738
27779
|
}
|
|
27739
27780
|
// For element type, parse the value to extract screen name and element
|
|
27740
27781
|
if (this.isElementType(variable)) {
|
|
27741
|
-
|
|
27742
|
-
//
|
|
27782
|
+
// Only try to find and set element if elementId exists in template data
|
|
27783
|
+
// If no elementId, don't select anything - use default values
|
|
27743
27784
|
if (variable.elementId) {
|
|
27785
|
+
let element = null;
|
|
27786
|
+
// Priority 1: Find by elementId (from setTemplateVariables)
|
|
27744
27787
|
element = this.elementOptions.find(el => el.id === variable.elementId);
|
|
27745
|
-
|
|
27746
|
-
|
|
27747
|
-
|
|
27748
|
-
|
|
27749
|
-
|
|
27750
|
-
|
|
27751
|
-
|
|
27752
|
-
|
|
27753
|
-
|
|
27754
|
-
|
|
27755
|
-
|
|
27756
|
-
|
|
27757
|
-
|
|
27758
|
-
|
|
27759
|
-
|
|
27760
|
-
|
|
27761
|
-
|
|
27762
|
-
|
|
27763
|
-
|
|
27788
|
+
// Priority 2: Find by elementName if elementId search didn't find it (fallback)
|
|
27789
|
+
if (!element && variable.elementName) {
|
|
27790
|
+
element = this.elementOptions.find(el => el.name === variable.elementName);
|
|
27791
|
+
}
|
|
27792
|
+
// Priority 3: Find by locatorValue (for backward compatibility)
|
|
27793
|
+
if (!element && variable.value) {
|
|
27794
|
+
const elementValue = variable.value;
|
|
27795
|
+
element = this.elementOptions.find(el => el.locatorValue === elementValue);
|
|
27796
|
+
}
|
|
27797
|
+
if (element) {
|
|
27798
|
+
// Set screen name info from the found element
|
|
27799
|
+
if (element.screenNameId && element.screenNameObj) {
|
|
27800
|
+
variable.selectedScreenName = element.screenNameObj.name;
|
|
27801
|
+
variable.screenNameId = element.screenNameId;
|
|
27802
|
+
// Set form controls
|
|
27803
|
+
// Store screenNameId as string to match option id format (for consistency with getScreenNameSelectConfig)
|
|
27804
|
+
const screenNameIdString = String(element.screenNameId);
|
|
27805
|
+
if (!variableGroup.get('selectedScreenName')) {
|
|
27806
|
+
variableGroup.addControl('selectedScreenName', new FormControl(screenNameIdString));
|
|
27807
|
+
}
|
|
27808
|
+
else {
|
|
27809
|
+
// Only update if form control doesn't already have a valid screen name selected
|
|
27810
|
+
// This prevents resetting user's selection when elementOptions changes
|
|
27811
|
+
const currentValue = (_l = variableGroup.get('selectedScreenName')) === null || _l === void 0 ? void 0 : _l.value;
|
|
27812
|
+
const currentValueStr = currentValue != null ? String(currentValue) : null;
|
|
27813
|
+
if (currentValueStr !== screenNameIdString && currentValueStr !== 'none') {
|
|
27814
|
+
(_m = variableGroup.get('selectedScreenName')) === null || _m === void 0 ? void 0 : _m.setValue(screenNameIdString, { emitEvent: false });
|
|
27815
|
+
}
|
|
27816
|
+
}
|
|
27817
|
+
}
|
|
27818
|
+
// Set/update element details from the found element
|
|
27819
|
+
variable.elementId = element.id;
|
|
27820
|
+
variable.elementLocator = element.locatorValue || '';
|
|
27821
|
+
// Only update elementName if it wasn't already set (preserve from setTemplateVariables)
|
|
27822
|
+
if (!variable.elementName) {
|
|
27823
|
+
variable.elementName = element.name || '';
|
|
27824
|
+
}
|
|
27825
|
+
// For selector, use elementLocator as value; for others, use elementName
|
|
27826
|
+
if (variable.name === 'selector') {
|
|
27827
|
+
variable.value = element.locatorValue || element.name || '';
|
|
27828
|
+
}
|
|
27829
|
+
else if (!variable.value || variable.value === '') {
|
|
27830
|
+
variable.value = element.name || element.locatorValue || '';
|
|
27831
|
+
}
|
|
27832
|
+
// Set element ID form control for the dropdown (key is 'id' in config)
|
|
27833
|
+
if (!variableGroup.get('id')) {
|
|
27834
|
+
variableGroup.addControl('id', new FormControl(element.id));
|
|
27764
27835
|
}
|
|
27765
27836
|
else {
|
|
27766
|
-
(
|
|
27837
|
+
(_o = variableGroup.get('id')) === null || _o === void 0 ? void 0 : _o.setValue(element.id, { emitEvent: false });
|
|
27838
|
+
}
|
|
27839
|
+
// Update value form control
|
|
27840
|
+
if (variableGroup.get('value')) {
|
|
27841
|
+
(_p = variableGroup.get('value')) === null || _p === void 0 ? void 0 : _p.setValue(variable.value, { emitEvent: false });
|
|
27767
27842
|
}
|
|
27768
27843
|
}
|
|
27769
|
-
|
|
27770
|
-
|
|
27771
|
-
|
|
27772
|
-
|
|
27773
|
-
|
|
27774
|
-
|
|
27775
|
-
}
|
|
27776
|
-
// For selector, use elementLocator as value; for others, use elementName
|
|
27777
|
-
if (variable.name === 'selector') {
|
|
27778
|
-
variable.value = element.locatorValue || element.name || '';
|
|
27844
|
+
else {
|
|
27845
|
+
// Element not found in elementOptions yet - might need to fetch
|
|
27846
|
+
// Keep elementId and elementName if they exist (from setTemplateVariables)
|
|
27847
|
+
// If we have elementId but element isn't found, we might need to fetch elements
|
|
27848
|
+
// However, we don't know the screen name yet, so we'll wait for elementOptions to be loaded
|
|
27849
|
+
// The initialization will run again when elementOptions changes via ngOnChanges
|
|
27779
27850
|
}
|
|
27780
|
-
|
|
27781
|
-
|
|
27851
|
+
}
|
|
27852
|
+
else {
|
|
27853
|
+
// No elementId in template data - clear all element-related fields and set defaults
|
|
27854
|
+
// But don't override user's screen name selection if they've already selected one
|
|
27855
|
+
variable.elementId = undefined;
|
|
27856
|
+
variable.elementLocator = undefined;
|
|
27857
|
+
variable.elementName = undefined;
|
|
27858
|
+
// Only clear screenNameId if it wasn't set by user selection
|
|
27859
|
+
// Check if form control has a valid screen name (not 'none')
|
|
27860
|
+
const currentScreenNameValue = (_q = variableGroup.get('selectedScreenName')) === null || _q === void 0 ? void 0 : _q.value;
|
|
27861
|
+
if (!currentScreenNameValue || currentScreenNameValue === 'none' || currentScreenNameValue === null) {
|
|
27862
|
+
variable.screenNameId = undefined;
|
|
27863
|
+
variable.selectedScreenName = undefined;
|
|
27864
|
+
// Set form controls to default values
|
|
27865
|
+
// Screen name should be 'none' (Select option)
|
|
27866
|
+
if (!variableGroup.get('selectedScreenName')) {
|
|
27867
|
+
variableGroup.addControl('selectedScreenName', new FormControl('none'));
|
|
27868
|
+
}
|
|
27869
|
+
else {
|
|
27870
|
+
(_r = variableGroup.get('selectedScreenName')) === null || _r === void 0 ? void 0 : _r.setValue('none', { emitEvent: false });
|
|
27871
|
+
}
|
|
27782
27872
|
}
|
|
27783
|
-
//
|
|
27873
|
+
// Element ID should be null
|
|
27784
27874
|
if (!variableGroup.get('id')) {
|
|
27785
|
-
variableGroup.addControl('id', new FormControl(
|
|
27875
|
+
variableGroup.addControl('id', new FormControl(null));
|
|
27786
27876
|
}
|
|
27787
27877
|
else {
|
|
27788
|
-
(
|
|
27789
|
-
}
|
|
27790
|
-
// Update value form control
|
|
27791
|
-
if (variableGroup.get('value')) {
|
|
27792
|
-
(_o = variableGroup.get('value')) === null || _o === void 0 ? void 0 : _o.setValue(variable.value, { emitEvent: false });
|
|
27878
|
+
(_s = variableGroup.get('id')) === null || _s === void 0 ? void 0 : _s.setValue(null, { emitEvent: false });
|
|
27793
27879
|
}
|
|
27794
27880
|
}
|
|
27795
|
-
else {
|
|
27796
|
-
// Element not found in elementOptions yet - might need to fetch
|
|
27797
|
-
// Keep elementId and elementName if they exist (from setTemplateVariables)
|
|
27798
|
-
// If we have elementId but element isn't found, we might need to fetch elements
|
|
27799
|
-
// However, we don't know the screen name yet, so we'll wait for elementOptions to be loaded
|
|
27800
|
-
// The initialization will run again when elementOptions changes via ngOnChanges
|
|
27801
|
-
}
|
|
27802
27881
|
}
|
|
27803
27882
|
}
|
|
27804
27883
|
}
|
|
@@ -28882,46 +28961,69 @@ class TemplateVariablesFormComponent {
|
|
|
28882
28961
|
}
|
|
28883
28962
|
/**
|
|
28884
28963
|
* Check if screen name is selected for an element variable
|
|
28964
|
+
* Returns true if either selectedScreenName or screenNameId is set (and not "None")
|
|
28885
28965
|
*/
|
|
28886
28966
|
hasSelectedScreenName(variable) {
|
|
28967
|
+
// Check if screenNameId exists and is a valid number (not null/undefined)
|
|
28968
|
+
if (variable.screenNameId != null && typeof variable.screenNameId === 'number' && !isNaN(variable.screenNameId)) {
|
|
28969
|
+
return true;
|
|
28970
|
+
}
|
|
28971
|
+
// Fallback: check selectedScreenName
|
|
28887
28972
|
return !!variable.selectedScreenName;
|
|
28888
28973
|
}
|
|
28889
28974
|
/**
|
|
28890
28975
|
* Get select config for screen name dropdown (first dropdown for element variables)
|
|
28891
28976
|
*/
|
|
28892
28977
|
getScreenNameSelectConfig(variable, index) {
|
|
28893
|
-
var _a, _b;
|
|
28978
|
+
var _a, _b, _c, _d;
|
|
28894
28979
|
// Include loading state in cache key to invalidate when loading completes
|
|
28895
28980
|
const cacheKey = `${variable.name}_screenName_${this.screenNameOptions.length}_${this.isLoadingScreenNames}`;
|
|
28896
28981
|
if (this.screenNameSelectConfigCache.has(cacheKey)) {
|
|
28897
28982
|
return this.screenNameSelectConfigCache.get(cacheKey);
|
|
28898
28983
|
}
|
|
28899
|
-
//
|
|
28900
|
-
const optionsArray =
|
|
28901
|
-
|
|
28902
|
-
|
|
28903
|
-
|
|
28904
|
-
|
|
28905
|
-
|
|
28906
|
-
|
|
28907
|
-
|
|
28908
|
-
|
|
28909
|
-
|
|
28984
|
+
// Build options: include a "None" option (displayed as "Select") plus screenNameOptions from API
|
|
28985
|
+
const optionsArray = [
|
|
28986
|
+
{
|
|
28987
|
+
id: 'none',
|
|
28988
|
+
value: 'Select',
|
|
28989
|
+
name: 'None',
|
|
28990
|
+
label: 'None'
|
|
28991
|
+
},
|
|
28992
|
+
...this.screenNameOptions.map(screenName => {
|
|
28993
|
+
var _a;
|
|
28994
|
+
return ({
|
|
28995
|
+
id: ((_a = screenName.id) === null || _a === void 0 ? void 0 : _a.toString()) || '',
|
|
28996
|
+
value: screenName.name,
|
|
28997
|
+
name: screenName.name,
|
|
28998
|
+
label: screenName.name
|
|
28999
|
+
});
|
|
29000
|
+
})
|
|
29001
|
+
];
|
|
28910
29002
|
// Ensure form control exists for screen name selection
|
|
28911
|
-
//
|
|
29003
|
+
// The form control value should match the option id (string for "none", string representation of number for real screen names)
|
|
28912
29004
|
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
28913
29005
|
if (variableGroup) {
|
|
28914
29006
|
if (!variableGroup.get('selectedScreenName')) {
|
|
28915
|
-
// Initialize with screenNameId
|
|
28916
|
-
const initialValue = variable.screenNameId
|
|
29007
|
+
// Initialize with screenNameId as string (to match option id format), or 'none' by default
|
|
29008
|
+
const initialValue = variable.screenNameId ? String(variable.screenNameId) : 'none';
|
|
28917
29009
|
variableGroup.addControl('selectedScreenName', new FormControl(initialValue));
|
|
28918
29010
|
}
|
|
28919
29011
|
else {
|
|
28920
29012
|
// Update form control value if variable has screenNameId but form control doesn't match
|
|
28921
29013
|
if (variable.screenNameId) {
|
|
28922
29014
|
const currentValue = (_a = variableGroup.get('selectedScreenName')) === null || _a === void 0 ? void 0 : _a.value;
|
|
28923
|
-
|
|
28924
|
-
|
|
29015
|
+
const expectedValue = String(variable.screenNameId);
|
|
29016
|
+
// Compare as strings to handle both number and string values
|
|
29017
|
+
const currentValueStr = currentValue != null ? String(currentValue) : null;
|
|
29018
|
+
if (currentValueStr !== expectedValue) {
|
|
29019
|
+
(_b = variableGroup.get('selectedScreenName')) === null || _b === void 0 ? void 0 : _b.setValue(expectedValue, { emitEvent: false });
|
|
29020
|
+
}
|
|
29021
|
+
}
|
|
29022
|
+
else {
|
|
29023
|
+
// If no screenNameId, ensure form control is 'none' (for "None" selection by default)
|
|
29024
|
+
const currentValue = (_c = variableGroup.get('selectedScreenName')) === null || _c === void 0 ? void 0 : _c.value;
|
|
29025
|
+
if (currentValue !== 'none' && currentValue !== null && currentValue !== '') {
|
|
29026
|
+
(_d = variableGroup.get('selectedScreenName')) === null || _d === void 0 ? void 0 : _d.setValue('none', { emitEvent: false });
|
|
28925
29027
|
}
|
|
28926
29028
|
}
|
|
28927
29029
|
}
|
|
@@ -28935,43 +29037,93 @@ class TemplateVariablesFormComponent {
|
|
|
28935
29037
|
options: optionsArray,
|
|
28936
29038
|
hasMore: this.hasMoreScreenNames,
|
|
28937
29039
|
isLoading: this.isLoadingScreenNames,
|
|
28938
|
-
valueBy: 'screenNameId',
|
|
28939
29040
|
onChange: (value) => {
|
|
28940
|
-
var _a;
|
|
28941
|
-
//
|
|
28942
|
-
|
|
28943
|
-
|
|
28944
|
-
|
|
28945
|
-
|
|
28946
|
-
|
|
28947
|
-
variable.
|
|
28948
|
-
|
|
28949
|
-
|
|
28950
|
-
|
|
28951
|
-
|
|
28952
|
-
|
|
28953
|
-
|
|
28954
|
-
|
|
28955
|
-
|
|
28956
|
-
|
|
28957
|
-
|
|
28958
|
-
|
|
28959
|
-
|
|
28960
|
-
|
|
28961
|
-
|
|
28962
|
-
|
|
28963
|
-
(
|
|
29041
|
+
var _a, _b, _c, _d, _e;
|
|
29042
|
+
// If "None" is selected (value is 'none' string or null), clear screen name and element info
|
|
29043
|
+
if (value == null || value === 'none' || value === '') {
|
|
29044
|
+
variable.screenNameId = undefined;
|
|
29045
|
+
variable.selectedScreenName = undefined;
|
|
29046
|
+
variable.elementId = undefined;
|
|
29047
|
+
variable.elementLocator = undefined;
|
|
29048
|
+
variable.elementName = undefined;
|
|
29049
|
+
variable.value = '';
|
|
29050
|
+
// Clear element config cache for this variable
|
|
29051
|
+
const keysToDelete = [];
|
|
29052
|
+
this.elementSelectConfigCache.forEach((_, key) => {
|
|
29053
|
+
if (key.startsWith(`${variable.name}_element`)) {
|
|
29054
|
+
keysToDelete.push(key);
|
|
29055
|
+
}
|
|
29056
|
+
});
|
|
29057
|
+
keysToDelete.forEach(key => this.elementSelectConfigCache.delete(key));
|
|
29058
|
+
// Update form controls - clear all element-related form controls
|
|
29059
|
+
// Set selectedScreenName to 'none' to show "None" is selected
|
|
29060
|
+
if (variableGroup) {
|
|
29061
|
+
if (variableGroup.get('value')) {
|
|
29062
|
+
(_a = variableGroup.get('value')) === null || _a === void 0 ? void 0 : _a.setValue('', { emitEvent: false });
|
|
29063
|
+
}
|
|
29064
|
+
if (variableGroup.get('selectedScreenName')) {
|
|
29065
|
+
(_b = variableGroup.get('selectedScreenName')) === null || _b === void 0 ? void 0 : _b.setValue('none', { emitEvent: false });
|
|
29066
|
+
}
|
|
29067
|
+
// Clear element ID form control to ensure elementId is cleared
|
|
29068
|
+
if (variableGroup.get('id')) {
|
|
29069
|
+
(_c = variableGroup.get('id')) === null || _c === void 0 ? void 0 : _c.setValue(null, { emitEvent: false });
|
|
29070
|
+
}
|
|
28964
29071
|
}
|
|
28965
|
-
//
|
|
28966
|
-
|
|
29072
|
+
// Mark for check and stop (no element fetch when None)
|
|
29073
|
+
this.cdr.markForCheck();
|
|
29074
|
+
return;
|
|
28967
29075
|
}
|
|
28968
|
-
//
|
|
28969
|
-
|
|
29076
|
+
// value is the option id (string for "none", string representation of number for real screen names)
|
|
29077
|
+
// Convert to number for screenNameId if it's a valid number
|
|
29078
|
+
const screenNameIdNum = typeof value === 'string' && value !== 'none' ? parseInt(value, 10) : (typeof value === 'number' ? value : null);
|
|
29079
|
+
if (screenNameIdNum && !isNaN(screenNameIdNum)) {
|
|
29080
|
+
// Store selected screen name on the variable object
|
|
29081
|
+
variable.screenNameId = screenNameIdNum;
|
|
29082
|
+
// Find and store screen name name from screenNameOptions
|
|
29083
|
+
const screenNameOption = this.screenNameOptions.find(sn => sn.id === screenNameIdNum);
|
|
29084
|
+
if (screenNameOption) {
|
|
29085
|
+
variable.selectedScreenName = screenNameOption.name;
|
|
29086
|
+
}
|
|
29087
|
+
else {
|
|
29088
|
+
// Fallback: if not found, still set the ID but clear the name
|
|
29089
|
+
variable.selectedScreenName = undefined;
|
|
29090
|
+
}
|
|
29091
|
+
// Clear the element selection when screen name changes
|
|
29092
|
+
variable.elementId = undefined;
|
|
29093
|
+
variable.elementLocator = undefined;
|
|
29094
|
+
variable.elementName = undefined;
|
|
29095
|
+
variable.value = '';
|
|
29096
|
+
// Clear element config cache to force refresh
|
|
29097
|
+
// Clear all element configs for this variable since screen name changed
|
|
29098
|
+
const keysToDelete = [];
|
|
29099
|
+
this.elementSelectConfigCache.forEach((_, key) => {
|
|
29100
|
+
if (key.startsWith(`${variable.name}_element`)) {
|
|
29101
|
+
keysToDelete.push(key);
|
|
29102
|
+
}
|
|
29103
|
+
});
|
|
29104
|
+
keysToDelete.forEach(key => this.elementSelectConfigCache.delete(key));
|
|
29105
|
+
// Update form control
|
|
29106
|
+
if (variableGroup) {
|
|
29107
|
+
if (variableGroup.get('value')) {
|
|
29108
|
+
(_d = variableGroup.get('value')) === null || _d === void 0 ? void 0 : _d.setValue('', { emitEvent: false });
|
|
29109
|
+
}
|
|
29110
|
+
// Ensure form control has the correct value (as string to match option id)
|
|
29111
|
+
if (variableGroup.get('selectedScreenName')) {
|
|
29112
|
+
(_e = variableGroup.get('selectedScreenName')) === null || _e === void 0 ? void 0 : _e.setValue(String(screenNameIdNum), { emitEvent: false });
|
|
29113
|
+
}
|
|
29114
|
+
}
|
|
29115
|
+
// Emit event to fetch elements filtered by selected screen name
|
|
28970
29116
|
this.searchElementsByScreenName.emit({
|
|
28971
29117
|
screenNameId: variable.screenNameId,
|
|
28972
29118
|
searchTerm: ''
|
|
28973
29119
|
});
|
|
28974
29120
|
}
|
|
29121
|
+
else {
|
|
29122
|
+
// Invalid value - clear everything
|
|
29123
|
+
variable.screenNameId = undefined;
|
|
29124
|
+
variable.selectedScreenName = undefined;
|
|
29125
|
+
variable.value = '';
|
|
29126
|
+
}
|
|
28975
29127
|
// Mark for check to update UI first
|
|
28976
29128
|
this.cdr.markForCheck();
|
|
28977
29129
|
// The element config will be recomputed automatically when elementOptions input changes
|
|
@@ -28993,7 +29145,6 @@ class TemplateVariablesFormComponent {
|
|
|
28993
29145
|
*/
|
|
28994
29146
|
getElementSelectConfig(variable, index) {
|
|
28995
29147
|
// Get selected screen name ID
|
|
28996
|
-
console.log('variable', variable);
|
|
28997
29148
|
const selectedScreenNameId = variable.screenNameId;
|
|
28998
29149
|
// Include elementOptions length and loading state in cache key to invalidate when elements change
|
|
28999
29150
|
const cacheKey = `${variable.name}_element_${selectedScreenNameId || ''}_${this.elementOptions.length}_${this.isLoadingElements}`;
|
|
@@ -29076,7 +29227,7 @@ class TemplateVariablesFormComponent {
|
|
|
29076
29227
|
hasMore: this.hasMoreElements,
|
|
29077
29228
|
isLoading: this.isLoadingElements,
|
|
29078
29229
|
onChange: (value) => {
|
|
29079
|
-
var _a, _b, _c;
|
|
29230
|
+
var _a, _b, _c, _d;
|
|
29080
29231
|
// Find the selected element from elementOptions
|
|
29081
29232
|
// value is the element ID (since config key is 'id')
|
|
29082
29233
|
const selectedElement = this.elementOptions.find(el => el.id === value);
|
|
@@ -29086,6 +29237,16 @@ class TemplateVariablesFormComponent {
|
|
|
29086
29237
|
variable.elementId = selectedElement.id;
|
|
29087
29238
|
variable.elementLocator = selectedElement.locatorValue || '';
|
|
29088
29239
|
variable.elementName = selectedElement.name || '';
|
|
29240
|
+
// Update screen name from the selected element
|
|
29241
|
+
// This ensures the screen name dropdown shows the correct selection
|
|
29242
|
+
if (selectedElement.screenNameId) {
|
|
29243
|
+
variable.screenNameId = selectedElement.screenNameId;
|
|
29244
|
+
// Find and store screen name name from screenNameOptions
|
|
29245
|
+
const screenNameOption = this.screenNameOptions.find(sn => sn.id === selectedElement.screenNameId);
|
|
29246
|
+
if (screenNameOption) {
|
|
29247
|
+
variable.selectedScreenName = screenNameOption.name;
|
|
29248
|
+
}
|
|
29249
|
+
}
|
|
29089
29250
|
// Find and patch the selector variable with dataKey 'not_found'
|
|
29090
29251
|
const selectorVariable = this.templateVariables.find(v => v.name === 'selector' && v.dataKey === 'not_found');
|
|
29091
29252
|
if (selectorVariable && selectedElement.locatorValue) {
|
|
@@ -29105,8 +29266,6 @@ class TemplateVariablesFormComponent {
|
|
|
29105
29266
|
// Fallback: if element not found, just set the value
|
|
29106
29267
|
variable.value = value;
|
|
29107
29268
|
}
|
|
29108
|
-
// Screen name ID is already stored on variable.selectedScreenNameId
|
|
29109
|
-
// (it was set when screen name was selected)
|
|
29110
29269
|
// Update form control in FormArray
|
|
29111
29270
|
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
29112
29271
|
if (variableGroup) {
|
|
@@ -29117,6 +29276,11 @@ class TemplateVariablesFormComponent {
|
|
|
29117
29276
|
if (selectedElement && variableGroup.get('id')) {
|
|
29118
29277
|
(_c = variableGroup.get('id')) === null || _c === void 0 ? void 0 : _c.setValue(selectedElement.id, { emitEvent: false });
|
|
29119
29278
|
}
|
|
29279
|
+
// Update screen name form control if element has a screen name
|
|
29280
|
+
if (selectedElement && selectedElement.screenNameId && variableGroup.get('selectedScreenName')) {
|
|
29281
|
+
// Set the screen name ID as string to match option id format
|
|
29282
|
+
(_d = variableGroup.get('selectedScreenName')) === null || _d === void 0 ? void 0 : _d.setValue(String(selectedElement.screenNameId), { emitEvent: false });
|
|
29283
|
+
}
|
|
29120
29284
|
}
|
|
29121
29285
|
// Mark for check and emit
|
|
29122
29286
|
this.cdr.markForCheck();
|
|
@@ -29142,10 +29306,10 @@ class TemplateVariablesFormComponent {
|
|
|
29142
29306
|
}
|
|
29143
29307
|
}
|
|
29144
29308
|
TemplateVariablesFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TemplateVariablesFormComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
29145
|
-
TemplateVariablesFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: TemplateVariablesFormComponent, selector: "cqa-template-variables-form", inputs: { templateVariables: "templateVariables", variablesForm: "variablesForm", metadata: "metadata", description: "description", elementOptions: "elementOptions", hasMoreElements: "hasMoreElements", isLoadingElements: "isLoadingElements", screenNameOptions: "screenNameOptions", hasMoreScreenNames: "hasMoreScreenNames", isLoadingScreenNames: "isLoadingScreenNames", parameterOptions: "parameterOptions", hasMoreParameters: "hasMoreParameters", isLoadingParameters: "isLoadingParameters", environmentOptions: "environmentOptions", hasMoreEnvironments: "hasMoreEnvironments", isLoadingEnvironments: "isLoadingEnvironments", defaultTestDataProfileId: "defaultTestDataProfileId", defaultTestDataStartIndex: "defaultTestDataStartIndex", isEditInDepth: "isEditInDepth", createElementVisible: "createElementVisible" }, outputs: { variableValueChange: "variableValueChange", variableBooleanChange: "variableBooleanChange", metadataChange: "metadataChange", descriptionChange: "descriptionChange", loadMoreElements: "loadMoreElements", searchElements: "searchElements", searchElementsByScreenName: "searchElementsByScreenName", createElement: "createElement", searchScreenName: "searchScreenName", loadMoreScreenNames: "loadMoreScreenNames", createScreenNameRequest: "createScreenNameRequest", searchParameters: "searchParameters", loadMoreParameters: "loadMoreParameters", searchEnvironments: "searchEnvironments", loadMoreEnvironments: "loadMoreEnvironments", cancelElementForm: "cancelElementForm", elementFormVisibilityChange: "elementFormVisibilityChange" }, host: { classAttribute: "cqa-ui-root" }, usesOnChanges: true, ngImport: i0, template: "<style>\n .capitalize-first::first-letter {\n text-transform: uppercase;\n }\n</style>\n<div class=\"cqa-flex cqa-gap-x-6 cqa-gap-y-4 cqa-flex-wrap template-variables-form\" [ngClass]=\"{'cqa-flex-col': isEditInDepth}\" *ngIf=\"!createElementVisible\">\n \n <!-- Metadata - Only show if element is available in form -->\n <div *ngIf=\"selectorVariableAvailable\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Metadata\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"metadata\" [fullWidth]=\"true\"\n (valueChange)=\"metadataChange.emit($event)\">\n </cqa-custom-input>\n </div>\n\n <!-- Description -->\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Description\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"description\" [fullWidth]=\"true\"\n (valueChange)=\"descriptionChange.emit($event)\">\n </cqa-custom-input>\n </div>\n \n <ng-container *ngFor=\"let variable of templateVariables; let i = index; trackBy: trackByVariable\">\n <!-- Boolean variables with mat-slide-toggle -->\n <ng-container *ngIf=\"variable.type === 'boolean'\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 capitalize-first\">\n {{ variable.label }}\n </label>\n <mat-slide-toggle [checked]=\"variablesForm.at(i)?.get('value')?.value || variable.value || false\"\n (change)=\"onVariableBooleanChange(variable.name, $event.checked)\" color=\"primary\">\n </mat-slide-toggle>\n </div>\n </ng-container>\n\n <!-- Non-boolean, non-custom_code variables -->\n <ng-container *ngIf=\"variable.name !== 'custom_code' && variable.type !== 'boolean'\">\n <!-- Element variables with cascading dropdowns (screen name + element) -->\n <ng-container *ngIf=\"isElementType(variable)\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} Screen Name\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getScreenNameSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedScreenName(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getElementSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!isElementType(variable)\">\n <!-- Other dropdown variables (type, scrollTo, label) -->\n <ng-container *ngIf=\"shouldShowDropdown(variable); else defaultInput\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #defaultInput>\n <!-- Test-data, source-value, or target-value with data type dropdown -->\n <ng-container *ngIf=\"needsDataTypeDropdown(variable); else regularInput\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} Type\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getDataTypeSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <ng-container *ngIf=\"isEnvironmentType(variable)\">\n <div *ngIf=\"isEnvironmentType(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Environment Name\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getEnvironmentSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedEnvironment(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Environment Value\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getEnvironmentParameterSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isParameterType(variable)\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Test Data Profile\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getTestDataProfileSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedTestDataProfile(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Data Set\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getDataSetSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedDataSet(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getParameterSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div> \n </ng-container>\n <div *ngIf=\"isPlainTextType(variable) || isRuntimeType(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} \n </label>\n <!-- Show custom input for plain-text type -->\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"getRawValue(variable)\" [fullWidth]=\"true\"\n (valueChange)=\"onTestDataValueChange(variable.name, $event)\">\n </cqa-custom-input>\n </div>\n </ng-container>\n <ng-template #regularInput>\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"variable.value\" [fullWidth]=\"true\"\n (valueChange)=\"onVariableValueChange(variable.name, $event)\">\n </cqa-custom-input>\n </div>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n</div>\n\n<div *ngIf=\"createElementVisible\">\n <cqa-element-form\n [isCreateMode]=\"true\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n [isEditInDepthAvailable]=\"false\"\n (createElement)=\"onCreateElement($event)\"\n (cancel)=\"onCancelElementForm()\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\">\n </cqa-element-form>\n</div>", styles: ["\n .capitalize-first::first-letter {\n text-transform: uppercase;\n }\n"], components: [{ type: CustomInputComponent, selector: "cqa-custom-input", inputs: ["label", "type", "placeholder", "value", "disabled", "errors", "required", "ariaLabel", "size", "fullWidth", "maxLength", "showCharCount", "inputInlineStyle", "labelInlineStyle"], outputs: ["valueChange", "blurred", "focused", "enterPressed"] }, { type: i4$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: DynamicSelectFieldComponent, selector: "cqa-dynamic-select", inputs: ["form", "config"], outputs: ["selectionChange", "selectClick", "searchChange", "loadMore", "addCustomValue"] }, { type: ElementFormComponent, selector: "cqa-element-form", inputs: ["elementId", "element", "screenNameOptions", "hasMoreScreenNames", "isLoadingScreenNames", "isElementLoading", "isEditMode", "isCreateMode", "isEditInDepthAvailable"], outputs: ["createElement", "updateElement", "createScreenNameRequest", "searchScreenName", "loadMoreScreenNames", "cancel", "editInDepth"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
29309
|
+
TemplateVariablesFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: TemplateVariablesFormComponent, selector: "cqa-template-variables-form", inputs: { templateVariables: "templateVariables", variablesForm: "variablesForm", metadata: "metadata", description: "description", elementOptions: "elementOptions", hasMoreElements: "hasMoreElements", isLoadingElements: "isLoadingElements", screenNameOptions: "screenNameOptions", hasMoreScreenNames: "hasMoreScreenNames", isLoadingScreenNames: "isLoadingScreenNames", parameterOptions: "parameterOptions", hasMoreParameters: "hasMoreParameters", isLoadingParameters: "isLoadingParameters", environmentOptions: "environmentOptions", hasMoreEnvironments: "hasMoreEnvironments", isLoadingEnvironments: "isLoadingEnvironments", defaultTestDataProfileId: "defaultTestDataProfileId", defaultTestDataStartIndex: "defaultTestDataStartIndex", isEditInDepth: "isEditInDepth", createElementVisible: "createElementVisible" }, outputs: { variableValueChange: "variableValueChange", variableBooleanChange: "variableBooleanChange", metadataChange: "metadataChange", descriptionChange: "descriptionChange", loadMoreElements: "loadMoreElements", searchElements: "searchElements", searchElementsByScreenName: "searchElementsByScreenName", createElement: "createElement", searchScreenName: "searchScreenName", loadMoreScreenNames: "loadMoreScreenNames", createScreenNameRequest: "createScreenNameRequest", searchParameters: "searchParameters", loadMoreParameters: "loadMoreParameters", searchEnvironments: "searchEnvironments", loadMoreEnvironments: "loadMoreEnvironments", cancelElementForm: "cancelElementForm", elementFormVisibilityChange: "elementFormVisibilityChange" }, host: { classAttribute: "cqa-ui-root" }, usesOnChanges: true, ngImport: i0, template: "<style>\n .capitalize-first::first-letter {\n text-transform: uppercase;\n }\n</style>\n<div class=\"cqa-flex cqa-gap-x-6 cqa-gap-y-4 cqa-flex-wrap template-variables-form\" [ngClass]=\"{'cqa-flex-col': isEditInDepth}\" *ngIf=\"!createElementVisible\">\n \n <!-- Metadata - Only show if element is available in form -->\n <div *ngIf=\"selectorVariableAvailable\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Metadata\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"metadata\" [fullWidth]=\"true\"\n (valueChange)=\"metadataChange.emit($event)\">\n </cqa-custom-input>\n </div>\n\n <!-- Description -->\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Description\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"description\" [fullWidth]=\"true\"\n (valueChange)=\"descriptionChange.emit($event)\">\n </cqa-custom-input>\n </div>\n \n <ng-container *ngFor=\"let variable of templateVariables; let i = index; trackBy: trackByVariable\">\n <!-- Boolean variables with mat-slide-toggle -->\n <ng-container *ngIf=\"variable.type === 'boolean'\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 capitalize-first\">\n {{ variable.label }}\n </label>\n <mat-slide-toggle [checked]=\"variablesForm.at(i)?.get('value')?.value || variable.value || false\"\n (change)=\"onVariableBooleanChange(variable.name, $event.checked)\" color=\"primary\">\n </mat-slide-toggle>\n </div>\n </ng-container>\n\n <!-- Non-boolean, non-custom_code variables -->\n <ng-container *ngIf=\"variable.name !== 'custom_code' && variable.type !== 'boolean'\">\n <!-- Element variables with cascading dropdowns (screen name + element) -->\n <ng-container *ngIf=\"isElementType(variable)\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} Screen Name\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getScreenNameSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedScreenName(variable); else elementManualInput\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getElementSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <ng-template #elementManualInput>\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"variable.value\" [fullWidth]=\"true\"\n (valueChange)=\"onVariableValueChange(variable.name, $event)\">\n </cqa-custom-input>\n </div>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!isElementType(variable)\">\n <!-- Other dropdown variables (type, scrollTo, label) -->\n <ng-container *ngIf=\"shouldShowDropdown(variable); else defaultInput\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #defaultInput>\n <!-- Test-data, source-value, or target-value with data type dropdown -->\n <ng-container *ngIf=\"needsDataTypeDropdown(variable); else regularInput\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} Type\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getDataTypeSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <ng-container *ngIf=\"isEnvironmentType(variable)\">\n <div *ngIf=\"isEnvironmentType(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Environment Name\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getEnvironmentSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedEnvironment(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Environment Value\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getEnvironmentParameterSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isParameterType(variable)\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Test Data Profile\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getTestDataProfileSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedTestDataProfile(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Data Set\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getDataSetSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedDataSet(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getParameterSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div> \n </ng-container>\n <div *ngIf=\"isPlainTextType(variable) || isRuntimeType(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} \n </label>\n <!-- Show custom input for plain-text type -->\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"getRawValue(variable)\" [fullWidth]=\"true\"\n (valueChange)=\"onTestDataValueChange(variable.name, $event)\">\n </cqa-custom-input>\n </div>\n </ng-container>\n <ng-template #regularInput>\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"variable.value\" [fullWidth]=\"true\"\n (valueChange)=\"onVariableValueChange(variable.name, $event)\">\n </cqa-custom-input>\n </div>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n</div>\n\n<div *ngIf=\"createElementVisible\">\n <cqa-element-form\n [isCreateMode]=\"true\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n [isEditInDepthAvailable]=\"false\"\n (createElement)=\"onCreateElement($event)\"\n (cancel)=\"onCancelElementForm()\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\">\n </cqa-element-form>\n</div>", styles: ["\n .capitalize-first::first-letter {\n text-transform: uppercase;\n }\n"], components: [{ type: CustomInputComponent, selector: "cqa-custom-input", inputs: ["label", "type", "placeholder", "value", "disabled", "errors", "required", "ariaLabel", "size", "fullWidth", "maxLength", "showCharCount", "inputInlineStyle", "labelInlineStyle"], outputs: ["valueChange", "blurred", "focused", "enterPressed"] }, { type: i4$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: DynamicSelectFieldComponent, selector: "cqa-dynamic-select", inputs: ["form", "config"], outputs: ["selectionChange", "selectClick", "searchChange", "loadMore", "addCustomValue"] }, { type: ElementFormComponent, selector: "cqa-element-form", inputs: ["elementId", "element", "screenNameOptions", "hasMoreScreenNames", "isLoadingScreenNames", "isElementLoading", "isEditMode", "isCreateMode", "isEditInDepthAvailable"], outputs: ["createElement", "updateElement", "createScreenNameRequest", "searchScreenName", "loadMoreScreenNames", "cancel", "editInDepth"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
29146
29310
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TemplateVariablesFormComponent, decorators: [{
|
|
29147
29311
|
type: Component,
|
|
29148
|
-
args: [{ selector: 'cqa-template-variables-form', host: { class: 'cqa-ui-root' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<style>\n .capitalize-first::first-letter {\n text-transform: uppercase;\n }\n</style>\n<div class=\"cqa-flex cqa-gap-x-6 cqa-gap-y-4 cqa-flex-wrap template-variables-form\" [ngClass]=\"{'cqa-flex-col': isEditInDepth}\" *ngIf=\"!createElementVisible\">\n \n <!-- Metadata - Only show if element is available in form -->\n <div *ngIf=\"selectorVariableAvailable\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Metadata\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"metadata\" [fullWidth]=\"true\"\n (valueChange)=\"metadataChange.emit($event)\">\n </cqa-custom-input>\n </div>\n\n <!-- Description -->\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Description\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"description\" [fullWidth]=\"true\"\n (valueChange)=\"descriptionChange.emit($event)\">\n </cqa-custom-input>\n </div>\n \n <ng-container *ngFor=\"let variable of templateVariables; let i = index; trackBy: trackByVariable\">\n <!-- Boolean variables with mat-slide-toggle -->\n <ng-container *ngIf=\"variable.type === 'boolean'\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 capitalize-first\">\n {{ variable.label }}\n </label>\n <mat-slide-toggle [checked]=\"variablesForm.at(i)?.get('value')?.value || variable.value || false\"\n (change)=\"onVariableBooleanChange(variable.name, $event.checked)\" color=\"primary\">\n </mat-slide-toggle>\n </div>\n </ng-container>\n\n <!-- Non-boolean, non-custom_code variables -->\n <ng-container *ngIf=\"variable.name !== 'custom_code' && variable.type !== 'boolean'\">\n <!-- Element variables with cascading dropdowns (screen name + element) -->\n <ng-container *ngIf=\"isElementType(variable)\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} Screen Name\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getScreenNameSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedScreenName(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getElementSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!isElementType(variable)\">\n <!-- Other dropdown variables (type, scrollTo, label) -->\n <ng-container *ngIf=\"shouldShowDropdown(variable); else defaultInput\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #defaultInput>\n <!-- Test-data, source-value, or target-value with data type dropdown -->\n <ng-container *ngIf=\"needsDataTypeDropdown(variable); else regularInput\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} Type\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getDataTypeSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <ng-container *ngIf=\"isEnvironmentType(variable)\">\n <div *ngIf=\"isEnvironmentType(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Environment Name\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getEnvironmentSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedEnvironment(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Environment Value\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getEnvironmentParameterSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isParameterType(variable)\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Test Data Profile\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getTestDataProfileSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedTestDataProfile(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Data Set\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getDataSetSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedDataSet(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getParameterSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div> \n </ng-container>\n <div *ngIf=\"isPlainTextType(variable) || isRuntimeType(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} \n </label>\n <!-- Show custom input for plain-text type -->\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"getRawValue(variable)\" [fullWidth]=\"true\"\n (valueChange)=\"onTestDataValueChange(variable.name, $event)\">\n </cqa-custom-input>\n </div>\n </ng-container>\n <ng-template #regularInput>\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"variable.value\" [fullWidth]=\"true\"\n (valueChange)=\"onVariableValueChange(variable.name, $event)\">\n </cqa-custom-input>\n </div>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n</div>\n\n<div *ngIf=\"createElementVisible\">\n <cqa-element-form\n [isCreateMode]=\"true\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n [isEditInDepthAvailable]=\"false\"\n (createElement)=\"onCreateElement($event)\"\n (cancel)=\"onCancelElementForm()\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\">\n </cqa-element-form>\n</div>", styles: ["\n .capitalize-first::first-letter {\n text-transform: uppercase;\n }\n"] }]
|
|
29312
|
+
args: [{ selector: 'cqa-template-variables-form', host: { class: 'cqa-ui-root' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<style>\n .capitalize-first::first-letter {\n text-transform: uppercase;\n }\n</style>\n<div class=\"cqa-flex cqa-gap-x-6 cqa-gap-y-4 cqa-flex-wrap template-variables-form\" [ngClass]=\"{'cqa-flex-col': isEditInDepth}\" *ngIf=\"!createElementVisible\">\n \n <!-- Metadata - Only show if element is available in form -->\n <div *ngIf=\"selectorVariableAvailable\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Metadata\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"metadata\" [fullWidth]=\"true\"\n (valueChange)=\"metadataChange.emit($event)\">\n </cqa-custom-input>\n </div>\n\n <!-- Description -->\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Description\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"description\" [fullWidth]=\"true\"\n (valueChange)=\"descriptionChange.emit($event)\">\n </cqa-custom-input>\n </div>\n \n <ng-container *ngFor=\"let variable of templateVariables; let i = index; trackBy: trackByVariable\">\n <!-- Boolean variables with mat-slide-toggle -->\n <ng-container *ngIf=\"variable.type === 'boolean'\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 capitalize-first\">\n {{ variable.label }}\n </label>\n <mat-slide-toggle [checked]=\"variablesForm.at(i)?.get('value')?.value || variable.value || false\"\n (change)=\"onVariableBooleanChange(variable.name, $event.checked)\" color=\"primary\">\n </mat-slide-toggle>\n </div>\n </ng-container>\n\n <!-- Non-boolean, non-custom_code variables -->\n <ng-container *ngIf=\"variable.name !== 'custom_code' && variable.type !== 'boolean'\">\n <!-- Element variables with cascading dropdowns (screen name + element) -->\n <ng-container *ngIf=\"isElementType(variable)\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} Screen Name\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getScreenNameSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedScreenName(variable); else elementManualInput\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getElementSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <ng-template #elementManualInput>\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"variable.value\" [fullWidth]=\"true\"\n (valueChange)=\"onVariableValueChange(variable.name, $event)\">\n </cqa-custom-input>\n </div>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!isElementType(variable)\">\n <!-- Other dropdown variables (type, scrollTo, label) -->\n <ng-container *ngIf=\"shouldShowDropdown(variable); else defaultInput\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #defaultInput>\n <!-- Test-data, source-value, or target-value with data type dropdown -->\n <ng-container *ngIf=\"needsDataTypeDropdown(variable); else regularInput\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} Type\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getDataTypeSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <ng-container *ngIf=\"isEnvironmentType(variable)\">\n <div *ngIf=\"isEnvironmentType(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Environment Name\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getEnvironmentSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedEnvironment(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Environment Value\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getEnvironmentParameterSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isParameterType(variable)\">\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Test Data Profile\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getTestDataProfileSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedTestDataProfile(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n Data Set\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getDataSetSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div *ngIf=\"hasSelectedDataSet(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getParameterSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div> \n </ng-container>\n <div *ngIf=\"isPlainTextType(variable) || isRuntimeType(variable)\" class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }} \n </label>\n <!-- Show custom input for plain-text type -->\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"getRawValue(variable)\" [fullWidth]=\"true\"\n (valueChange)=\"onTestDataValueChange(variable.name, $event)\">\n </cqa-custom-input>\n </div>\n </ng-container>\n <ng-template #regularInput>\n <div class=\"cqa-flex cqa-flex-col\" [style.width]=\"isEditInDepth ? null : 'calc(50% - 12px)'\" [ngClass]=\"{'cqa-w-full': isEditInDepth}\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1 capitalize-first\">\n {{ variable.label }}\n </label>\n <cqa-custom-input [placeholder]=\"'Text Input'\" [value]=\"variable.value\" [fullWidth]=\"true\"\n (valueChange)=\"onVariableValueChange(variable.name, $event)\">\n </cqa-custom-input>\n </div>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n</div>\n\n<div *ngIf=\"createElementVisible\">\n <cqa-element-form\n [isCreateMode]=\"true\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n [isEditInDepthAvailable]=\"false\"\n (createElement)=\"onCreateElement($event)\"\n (cancel)=\"onCancelElementForm()\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\">\n </cqa-element-form>\n</div>", styles: ["\n .capitalize-first::first-letter {\n text-transform: uppercase;\n }\n"] }]
|
|
29149
29313
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { templateVariables: [{
|
|
29150
29314
|
type: Input
|
|
29151
29315
|
}], variablesForm: [{
|