@cqa-lib/cqa-ui 1.1.236 → 1.1.237

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.
@@ -4755,10 +4755,10 @@ class AddPrerequisiteCasesSectionComponent {
4755
4755
  }
4756
4756
  }
4757
4757
  AddPrerequisiteCasesSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AddPrerequisiteCasesSectionComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4758
- AddPrerequisiteCasesSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: AddPrerequisiteCasesSectionComponent, selector: "cqa-add-prerequisite-cases-section", inputs: { expanded: "expanded", form: "form", rows: "rows", options: "options", getSelectConfig: "getSelectConfig", label: "label", infoTooltip: "infoTooltip", addAnotherText: "addAnotherText", updateText: "updateText", cancelText: "cancelText", addTriggerText: "addTriggerText", hideAddPrerequisite: "hideAddPrerequisite", updateDisabled: "updateDisabled", isUpdating: "isUpdating", enableServerSearch: "enableServerSearch", hasMoreOptions: "hasMoreOptions", isLoadingOptions: "isLoadingOptions", selectFirstValidationMessage: "selectFirstValidationMessage" }, outputs: { expandedChange: "expandedChange", addRow: "addRow", removeRow: "removeRow", rowsReordered: "rowsReordered", update: "update", cancel: "cancel", selectionChange: "selectionChange", searchOptions: "searchOptions", loadMoreOptions: "loadMoreOptions", prerequisitesChange: "prerequisitesChange" }, host: { classAttribute: "cqa-ui-root cqa-add-prerequisite-cases-section-host" }, queries: [{ propertyName: "selectBodyTpl", first: true, predicate: ["selectBody"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<!-- Add Prerequisite trigger - only when collapsed and no rows (user must click to expand); hide when parent has prerequisites -->\n<ng-container *ngIf=\"rows.length === 0 && !expanded && !hideAddPrerequisite\">\n <div\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#D8D9FC] cqa-rounded-lg cqa-p-1 cqa-mt-4 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-center cqa-gap-2 cqa-w-full cqa-hover:cqa-border-[#9999ee] cqa-hover:cqa-bg-[#f8f8ff] cqa-active:cqa-border-[#7c7ce0] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"onAddPrerequisiteClick()\">\n <mat-icon class=\"cqa-text-[12px] cqa-w-[12px] cqa-h-[12px] cqa-text-[#3F43EE]\">add</mat-icon>\n <span class=\"cqa-font-regular cqa-font-inter cqa-text-sm cqa-text-[#3F43EE]\">{{ addTriggerText }}</span>\n </div>\n</ng-container>\n\n<!-- Collapsed summary when we have rows but expanded=false -->\n<ng-container *ngIf=\"rows.length > 0 && !expanded\">\n <div\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#D8D9FC] cqa-rounded-lg cqa-p-1.5 cqa-mt-4 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-between cqa-min-h-[27px] cqa-hover:cqa-border-[#9ca3af] cqa-hover:cqa-bg-[#f9fafb] cqa-active:cqa-border-[#6366f1] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"toggleExpanded(true)\">\n <span class=\"cqa-text-[#4a5565] cqa-font-normal cqa-font-inter cqa-text-xs\">{{ rows.length }} prerequisite{{ rows.length !== 1 ? 's' : '' }}</span>\n <mat-icon class=\"cqa-text-[14px] cqa-w-[14px] cqa-h-[14px] cqa-text-[#4a5565]\">expand_more</mat-icon>\n </div>\n</ng-container>\n\n<!-- Expanded form - when expanded=true (with or without rows; no Add Prerequisite trigger) -->\n<ng-container *ngIf=\"expanded\">\n <div class=\"cqa-p-3 cqa-bg-white cqa-border cqa-border-[#e5e7eb] cqa-rounded-lg\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-1.5 cqa-mb-3\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-[#374151] cqa-m-0 cqa-leading-none\">{{ label }}</label>\n <mat-icon class=\"cqa-inline-flex cqa-mt-1 cqa-items-center cqa-justify-center cqa-w-4 cqa-h-4 cqa-text-sm cqa-text-[#6b7280] cqa-cursor-help cqa-flex-shrink-0\" [matTooltip]=\"infoTooltip\" matTooltipPosition=\"above\" matTooltipShowDelay=\"300\">info</mat-icon>\n <button\n type=\"button\"\n class=\"cqa-ml-auto cqa-flex cqa-items-center cqa-justify-center cqa-w-7 cqa-h-7 cqa-p-0 cqa-bg-transparent cqa-border-none cqa-rounded-md cqa-text-[#6b7280] cqa-cursor-pointer cqa-hover:cqa-bg-[#f3f4f6] cqa-hover:cqa-text-[#374151]\"\n (click)=\"toggleExpanded(false)\"\n matTooltip=\"Close\">\n <mat-icon class=\"cqa-text-xl cqa-w-5 cqa-h-5\">expand_less</mat-icon>\n </button>\n </div>\n\n <div\n class=\"prerequisite-drop-list cqa-flex cqa-flex-col cqa-gap-2 cqa-mb-3\"\n [dndDropzone]=\"['prerequisite-row']\"\n dndEffectAllowed=\"move\"\n dndDragoverClass=\"dndDragover\"\n (dndDrop)=\"onDndDrop($event)\">\n <div dndPlaceholderRef class=\"prerequisite-drag-placeholder\">Drop here</div>\n <div\n *ngFor=\"let row of rows; let i = index; trackBy: trackByKey\"\n class=\"prerequisite-drag-item cqa-flex cqa-items-center cqa-gap-2\"\n [dndDraggable]=\"row\"\n [dndDisableIf]=\"rows.length <= 1\"\n dndEffectAllowed=\"move\"\n dndType=\"prerequisite-row\">\n <!-- 9-dot grid drag handle (only when multiple rows to reorder) -->\n <div *ngIf=\"rows.length > 1\" dndHandle class=\"cqa-flex cqa-flex-shrink-0 cqa-items-center cqa-justify-center cqa-cursor-grab cqa-text-[#6B7280] cqa-hover:cqa-text-[#111827] active:cqa-cursor-grabbing\" matTooltip=\"Drag to reorder\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"3\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"3\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"3\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n </svg>\n </div>\n\n <div class=\"cqa-flex-1 cqa-min-w-0\">\n <!-- Custom template (e.g. parent-provided cqa-dynamic-select) -->\n <ng-container *ngIf=\"selectBodyTpl\">\n <ng-container\n *ngTemplateOutlet=\"selectBodyTpl; context: {\n $implicit: row,\n index: i,\n form: form,\n config: getConfig(i)\n }\">\n </ng-container>\n </ng-container>\n <!-- Default: built-in cqa-dynamic-select -->\n <cqa-dynamic-select\n *ngIf=\"!selectBodyTpl && form\"\n [form]=\"form\"\n [config]=\"getConfig(i)\"\n (selectionChange)=\"onSelectionChange($event, i)\">\n </cqa-dynamic-select>\n </div>\n\n <button\n type=\"button\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-8 cqa-h-8 cqa-min-w-[32px] cqa-bg-transparent cqa-border-none cqa-rounded-md cqa-text-[#6b7280] cqa-cursor-pointer cqa-p-0 cqa-hover:cqa-bg-[#f3f4f6] cqa-hover:cqa-text-[#374151]\"\n (click)=\"onRemoveRow(i)\"\n matTooltip=\"Cancel\">\n <mat-icon class=\"cqa-text-lg cqa-w-[18px] cqa-h-[18px]\">close</mat-icon>\n </button>\n </div>\n </div>\n\n <div *ngIf=\"showAddAnotherValidation && !allRowsHaveValues()\" class=\"cqa-text-xs cqa-text-[#dc2626] cqa-mb-2\">\n {{ selectFirstValidationMessage }}\n </div>\n <!-- Add Prerequisite button only in empty state; hide when parent has prerequisites (e.g. collapsing after update) -->\n <div\n *ngIf=\"rows.length === 0 && !hideAddPrerequisite\"\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#ccccff] cqa-rounded-lg cqa-p-3 cqa-mb-3 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-center cqa-gap-2 cqa-min-h-[40px] cqa-w-full cqa-hover:cqa-border-[#9999ee] cqa-hover:cqa-bg-[#f8f8ff] cqa-active:cqa-border-[#7c7ce0] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"onAddRow()\">\n <mat-icon class=\"cqa-text-[18px] cqa-w-[18px] cqa-h-[18px] cqa-text-[#3b82f6]\">add</mat-icon>\n <span class=\"cqa-font-medium cqa-font-inter cqa-text-sm cqa-text-[#3b82f6]\">{{ addTriggerText }}</span>\n </div>\n <!-- Add Another link when we already have at least one row -->\n <button\n *ngIf=\"rows.length > 0 && !hideAddPrerequisite\"\n type=\"button\"\n class=\"cqa-mb-3 cqa-flex cqa-items-center cqa-gap-2 cqa-bg-transparent cqa-border-none cqa-p-0 cqa-cursor-pointer cqa-font-inter cqa-text-sm cqa-text-[#4242DB] cqa-hover:cqa-underline\"\n (click)=\"onAddRow()\">\n <mat-icon class=\"cqa-text-[18px] cqa-w-[18px] cqa-h-[18px]\">add</mat-icon>\n <span>{{ addAnotherText }}</span>\n </button>\n <div class=\"cqa-flex cqa-gap-3 cqa-justify-end\">\n <button\n type=\"button\"\n class=\"cqa-py-2.5 cqa-px-4 cqa-bg-white cqa-text-[#374151] cqa-border cqa-border-[#d1d5db] cqa-rounded-md cqa-text-sm cqa-font-semibold cqa-cursor-pointer cqa-hover:cqa-bg-[#f9fafb]\"\n (click)=\"onCancel()\">\n {{ cancelText }}\n </button>\n <button\n type=\"button\"\n class=\"cqa-py-2.5 cqa-px-4 cqa-rounded-md cqa-text-sm cqa-font-semibold cqa-border-none cqa-cursor-pointer disabled:cqa-opacity-50 disabled:cqa-cursor-not-allowed cqa-bg-[#1a56db] cqa-text-white cqa-hover:cqa-bg-[#1647b8] disabled:cqa-bg-[#1a56db] cqa-flex cqa-items-center cqa-justify-center cqa-gap-2\"\n [style.pointer-events]=\"isUpdating ? 'none' : 'auto'\"\n [style.cursor]=\"isUpdating ? 'not-allowed' : 'pointer'\"\n [disabled]=\"isUpdateDisabled()\"\n (click)=\"onUpdate()\">\n <mat-spinner *ngIf=\"isUpdating\" diameter=\"16\" class=\"cqa-inline-block update-spinner-white\"></mat-spinner>\n <span>{{ updateText }}</span>\n </button>\n </div>\n </div>\n</ng-container>\n", styles: [":host ::ng-deep .update-spinner-white circle{stroke:#fff!important}\n"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DynamicSelectFieldComponent, selector: "cqa-dynamic-select", inputs: ["form", "config"], outputs: ["selectionChange", "selectClick", "searchChange", "loadMore", "addCustomValue"] }, { type: i3$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i6.DndDropzoneDirective, selector: "[dndDropzone]", inputs: ["dndDropzone", "dndEffectAllowed", "dndAllowExternal", "dndHorizontal", "dndDragoverClass", "dndDropzoneDisabledClass", "dndDisableIf", "dndDisableDropIf"], outputs: ["dndDragover", "dndDrop"] }, { type: i6.DndPlaceholderRefDirective, selector: "[dndPlaceholderRef]" }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.DndDraggableDirective, selector: "[dndDraggable]", inputs: ["dndDraggable", "dndEffectAllowed", "dndType", "dndDraggingClass", "dndDraggingSourceClass", "dndDraggableDisabledClass", "dndDragImageOffsetFunction", "dndDisableIf", "dndDisableDragIf"], outputs: ["dndStart", "dndDrag", "dndEnd", "dndMoved", "dndCopied", "dndLinked", "dndCanceled"] }, { type: i6.DndHandleDirective, selector: "[dndHandle]" }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4758
+ AddPrerequisiteCasesSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: AddPrerequisiteCasesSectionComponent, selector: "cqa-add-prerequisite-cases-section", inputs: { expanded: "expanded", form: "form", rows: "rows", options: "options", getSelectConfig: "getSelectConfig", label: "label", infoTooltip: "infoTooltip", addAnotherText: "addAnotherText", updateText: "updateText", cancelText: "cancelText", addTriggerText: "addTriggerText", hideAddPrerequisite: "hideAddPrerequisite", updateDisabled: "updateDisabled", isUpdating: "isUpdating", enableServerSearch: "enableServerSearch", hasMoreOptions: "hasMoreOptions", isLoadingOptions: "isLoadingOptions", selectFirstValidationMessage: "selectFirstValidationMessage" }, outputs: { expandedChange: "expandedChange", addRow: "addRow", removeRow: "removeRow", rowsReordered: "rowsReordered", update: "update", cancel: "cancel", selectionChange: "selectionChange", searchOptions: "searchOptions", loadMoreOptions: "loadMoreOptions", prerequisitesChange: "prerequisitesChange" }, host: { classAttribute: "cqa-ui-root cqa-add-prerequisite-cases-section-host" }, queries: [{ propertyName: "selectBodyTpl", first: true, predicate: ["selectBody"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<!-- Add Prerequisite trigger - only when collapsed and no rows (user must click to expand); hide when parent has prerequisites -->\n<ng-container *ngIf=\"rows.length === 0 && !expanded && !hideAddPrerequisite\">\n <div\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#D8D9FC] cqa-rounded-lg cqa-p-1 cqa-mt-4 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-center cqa-gap-2 cqa-w-full cqa-hover:cqa-border-[#9999ee] cqa-hover:cqa-bg-[#f8f8ff] cqa-active:cqa-border-[#7c7ce0] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"onAddPrerequisiteClick()\">\n <mat-icon class=\"cqa-text-[12px] cqa-w-[12px] cqa-h-[12px] cqa-text-[#3F43EE]\">add</mat-icon>\n <span class=\"cqa-font-regular cqa-font-inter cqa-text-sm cqa-text-[#3F43EE]\">{{ addTriggerText }}</span>\n </div>\n</ng-container>\n\n<!-- Collapsed summary when we have rows but expanded=false -->\n<ng-container *ngIf=\"rows.length > 0 && !expanded\">\n <div\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#D8D9FC] cqa-rounded-lg cqa-p-1.5 cqa-mt-4 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-between cqa-min-h-[27px] cqa-hover:cqa-border-[#9ca3af] cqa-hover:cqa-bg-[#f9fafb] cqa-active:cqa-border-[#6366f1] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"toggleExpanded(true)\">\n <span class=\"cqa-text-[#4a5565] cqa-font-normal cqa-font-inter cqa-text-xs\">{{ rows.length }} prerequisite{{ rows.length !== 1 ? 's' : '' }}</span>\n <mat-icon class=\"cqa-text-[14px] cqa-w-[14px] cqa-h-[14px] cqa-text-[#4a5565]\">expand_more</mat-icon>\n </div>\n</ng-container>\n\n<!-- Expanded form - when expanded=true (with or without rows; no Add Prerequisite trigger) -->\n<ng-container *ngIf=\"expanded\">\n <div class=\"cqa-p-3 cqa-bg-white cqa-border cqa-border-[#e5e7eb] cqa-rounded-lg\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-1.5 cqa-mb-3\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-[#374151] cqa-m-0 cqa-leading-none\">{{ label }}</label>\n <mat-icon class=\"cqa-inline-flex cqa-mt-1 cqa-items-center cqa-justify-center cqa-w-4 cqa-h-4 cqa-text-sm cqa-text-[#6b7280] cqa-cursor-help cqa-flex-shrink-0\" [matTooltip]=\"infoTooltip\" matTooltipPosition=\"above\" matTooltipShowDelay=\"300\">info</mat-icon>\n <button\n type=\"button\"\n class=\"cqa-ml-auto cqa-flex cqa-items-center cqa-justify-center cqa-w-7 cqa-h-7 cqa-p-0 cqa-bg-transparent cqa-border-none cqa-rounded-md cqa-text-[#6b7280] cqa-cursor-pointer cqa-hover:cqa-bg-[#f3f4f6] cqa-hover:cqa-text-[#374151]\"\n (click)=\"toggleExpanded(false)\"\n matTooltip=\"Close\">\n <mat-icon class=\"cqa-text-xl cqa-w-5 cqa-h-5\">expand_less</mat-icon>\n </button>\n </div>\n\n <div\n class=\"prerequisite-drop-list cqa-flex cqa-flex-col cqa-gap-2 cqa-mb-3\"\n [dndDropzone]=\"['prerequisite-row']\"\n dndEffectAllowed=\"move\"\n dndDragoverClass=\"dndDragover\"\n (dndDrop)=\"onDndDrop($event)\">\n <div dndPlaceholderRef class=\"prerequisite-drag-placeholder\">Drop here</div>\n <div\n *ngFor=\"let row of rows; let i = index; trackBy: trackByKey\"\n class=\"prerequisite-drag-item cqa-flex cqa-items-center cqa-gap-2\"\n [dndDraggable]=\"row\"\n [dndDisableIf]=\"rows.length <= 1\"\n dndEffectAllowed=\"move\"\n dndType=\"prerequisite-row\">\n <!-- 9-dot grid drag handle (only when multiple rows to reorder) -->\n <div *ngIf=\"rows.length > 1\" dndHandle class=\"cqa-flex cqa-flex-shrink-0 cqa-items-center cqa-justify-center cqa-cursor-grab cqa-text-[#6B7280] cqa-hover:cqa-text-[#111827] active:cqa-cursor-grabbing\" matTooltip=\"Drag to reorder\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"3\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"3\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"3\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n </svg>\n </div>\n\n <div class=\"cqa-flex-1 cqa-min-w-0\">\n <!-- Custom template (e.g. parent-provided cqa-dynamic-select) -->\n <ng-container *ngIf=\"selectBodyTpl\">\n <ng-container\n *ngTemplateOutlet=\"selectBodyTpl; context: {\n $implicit: row,\n index: i,\n form: form,\n config: getConfig(i)\n }\">\n </ng-container>\n </ng-container>\n <!-- Default: built-in cqa-dynamic-select -->\n <cqa-dynamic-select\n *ngIf=\"!selectBodyTpl && form\"\n [form]=\"form\"\n [config]=\"getConfig(i)\"\n (selectionChange)=\"onSelectionChange($event, i)\">\n </cqa-dynamic-select>\n </div>\n\n <button\n type=\"button\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-8 cqa-h-8 cqa-min-w-[32px] cqa-bg-transparent cqa-border-none cqa-rounded-md cqa-text-[#6b7280] cqa-cursor-pointer cqa-p-0 cqa-hover:cqa-bg-[#f3f4f6] cqa-hover:cqa-text-[#374151]\"\n (click)=\"onRemoveRow(i)\"\n matTooltip=\"Cancel\">\n <mat-icon class=\"cqa-text-lg cqa-w-[18px] cqa-h-[18px]\">close</mat-icon>\n </button>\n </div>\n </div>\n\n <div *ngIf=\"showAddAnotherValidation && !allRowsHaveValues()\" class=\"cqa-text-xs cqa-text-[#dc2626] cqa-mb-2\">\n {{ selectFirstValidationMessage }}\n </div>\n <!-- Add Prerequisite button only in empty state; hide when parent has prerequisites (e.g. collapsing after update) -->\n <div\n *ngIf=\"rows.length === 0 && !hideAddPrerequisite\"\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#ccccff] cqa-rounded-lg cqa-p-3 cqa-mb-3 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-center cqa-gap-2 cqa-min-h-[40px] cqa-w-full cqa-hover:cqa-border-[#9999ee] cqa-hover:cqa-bg-[#f8f8ff] cqa-active:cqa-border-[#7c7ce0] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"onAddRow()\">\n <mat-icon class=\"cqa-text-[18px] cqa-w-[18px] cqa-h-[18px] cqa-text-[#3b82f6]\">add</mat-icon>\n <span class=\"cqa-font-medium cqa-font-inter cqa-text-sm cqa-text-[#3b82f6]\">{{ addTriggerText }}</span>\n </div>\n <!-- Add Another link when we already have at least one row -->\n <button\n *ngIf=\"rows.length > 0 && !hideAddPrerequisite\"\n type=\"button\"\n class=\"cqa-mb-3 cqa-flex cqa-items-center cqa-gap-2 cqa-bg-transparent cqa-border-none cqa-p-0 cqa-cursor-pointer cqa-font-inter cqa-text-sm cqa-text-[#4242DB] cqa-hover:cqa-underline\"\n (click)=\"onAddRow()\">\n <mat-icon class=\"cqa-text-[18px] cqa-w-[18px] cqa-h-[18px]\">add</mat-icon>\n <span>{{ addAnotherText }}</span>\n </button>\n <div class=\"cqa-flex cqa-gap-3 cqa-justify-end\">\n <button\n type=\"button\"\n class=\"cqa-py-2.5 cqa-px-4 cqa-bg-white cqa-text-[#374151] cqa-border cqa-border-[#d1d5db] cqa-rounded-md cqa-text-sm cqa-font-semibold cqa-cursor-pointer cqa-hover:cqa-bg-[#f9fafb]\"\n (click)=\"onCancel()\">\n {{ cancelText }}\n </button>\n <button\n type=\"button\"\n class=\"cqa-py-2.5 cqa-px-4 cqa-rounded-md cqa-text-sm cqa-font-semibold cqa-border-none cqa-cursor-pointer disabled:cqa-opacity-50 disabled:cqa-cursor-not-allowed cqa-bg-[#1a56db] cqa-text-white cqa-hover:cqa-bg-[#1647b8] disabled:cqa-bg-[#1a56db] cqa-flex cqa-items-center cqa-justify-center cqa-gap-2\"\n [style.pointer-events]=\"isUpdating ? 'none' : 'auto'\"\n [style.cursor]=\"isUpdating ? 'not-allowed' : 'pointer'\"\n [disabled]=\"isUpdateDisabled()\"\n (click)=\"onUpdate()\">\n <mat-spinner *ngIf=\"isUpdating\" diameter=\"16\" class=\"cqa-inline-block update-spinner-white\"></mat-spinner>\n <span>{{ updateText }}</span>\n </button>\n </div>\n </div>\n</ng-container>\n", components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DynamicSelectFieldComponent, selector: "cqa-dynamic-select", inputs: ["form", "config"], outputs: ["selectionChange", "selectClick", "searchChange", "loadMore", "addCustomValue"] }, { type: i3$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i6.DndDropzoneDirective, selector: "[dndDropzone]", inputs: ["dndDropzone", "dndEffectAllowed", "dndAllowExternal", "dndHorizontal", "dndDragoverClass", "dndDropzoneDisabledClass", "dndDisableIf", "dndDisableDropIf"], outputs: ["dndDragover", "dndDrop"] }, { type: i6.DndPlaceholderRefDirective, selector: "[dndPlaceholderRef]" }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.DndDraggableDirective, selector: "[dndDraggable]", inputs: ["dndDraggable", "dndEffectAllowed", "dndType", "dndDraggingClass", "dndDraggingSourceClass", "dndDraggableDisabledClass", "dndDragImageOffsetFunction", "dndDisableIf", "dndDisableDragIf"], outputs: ["dndStart", "dndDrag", "dndEnd", "dndMoved", "dndCopied", "dndLinked", "dndCanceled"] }, { type: i6.DndHandleDirective, selector: "[dndHandle]" }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4759
4759
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AddPrerequisiteCasesSectionComponent, decorators: [{
4760
4760
  type: Component,
4761
- args: [{ selector: 'cqa-add-prerequisite-cases-section', styles: [":host ::ng-deep .update-spinner-white circle{stroke:#fff!important}\n"], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'cqa-ui-root cqa-add-prerequisite-cases-section-host' }, template: "<!-- Add Prerequisite trigger - only when collapsed and no rows (user must click to expand); hide when parent has prerequisites -->\n<ng-container *ngIf=\"rows.length === 0 && !expanded && !hideAddPrerequisite\">\n <div\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#D8D9FC] cqa-rounded-lg cqa-p-1 cqa-mt-4 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-center cqa-gap-2 cqa-w-full cqa-hover:cqa-border-[#9999ee] cqa-hover:cqa-bg-[#f8f8ff] cqa-active:cqa-border-[#7c7ce0] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"onAddPrerequisiteClick()\">\n <mat-icon class=\"cqa-text-[12px] cqa-w-[12px] cqa-h-[12px] cqa-text-[#3F43EE]\">add</mat-icon>\n <span class=\"cqa-font-regular cqa-font-inter cqa-text-sm cqa-text-[#3F43EE]\">{{ addTriggerText }}</span>\n </div>\n</ng-container>\n\n<!-- Collapsed summary when we have rows but expanded=false -->\n<ng-container *ngIf=\"rows.length > 0 && !expanded\">\n <div\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#D8D9FC] cqa-rounded-lg cqa-p-1.5 cqa-mt-4 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-between cqa-min-h-[27px] cqa-hover:cqa-border-[#9ca3af] cqa-hover:cqa-bg-[#f9fafb] cqa-active:cqa-border-[#6366f1] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"toggleExpanded(true)\">\n <span class=\"cqa-text-[#4a5565] cqa-font-normal cqa-font-inter cqa-text-xs\">{{ rows.length }} prerequisite{{ rows.length !== 1 ? 's' : '' }}</span>\n <mat-icon class=\"cqa-text-[14px] cqa-w-[14px] cqa-h-[14px] cqa-text-[#4a5565]\">expand_more</mat-icon>\n </div>\n</ng-container>\n\n<!-- Expanded form - when expanded=true (with or without rows; no Add Prerequisite trigger) -->\n<ng-container *ngIf=\"expanded\">\n <div class=\"cqa-p-3 cqa-bg-white cqa-border cqa-border-[#e5e7eb] cqa-rounded-lg\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-1.5 cqa-mb-3\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-[#374151] cqa-m-0 cqa-leading-none\">{{ label }}</label>\n <mat-icon class=\"cqa-inline-flex cqa-mt-1 cqa-items-center cqa-justify-center cqa-w-4 cqa-h-4 cqa-text-sm cqa-text-[#6b7280] cqa-cursor-help cqa-flex-shrink-0\" [matTooltip]=\"infoTooltip\" matTooltipPosition=\"above\" matTooltipShowDelay=\"300\">info</mat-icon>\n <button\n type=\"button\"\n class=\"cqa-ml-auto cqa-flex cqa-items-center cqa-justify-center cqa-w-7 cqa-h-7 cqa-p-0 cqa-bg-transparent cqa-border-none cqa-rounded-md cqa-text-[#6b7280] cqa-cursor-pointer cqa-hover:cqa-bg-[#f3f4f6] cqa-hover:cqa-text-[#374151]\"\n (click)=\"toggleExpanded(false)\"\n matTooltip=\"Close\">\n <mat-icon class=\"cqa-text-xl cqa-w-5 cqa-h-5\">expand_less</mat-icon>\n </button>\n </div>\n\n <div\n class=\"prerequisite-drop-list cqa-flex cqa-flex-col cqa-gap-2 cqa-mb-3\"\n [dndDropzone]=\"['prerequisite-row']\"\n dndEffectAllowed=\"move\"\n dndDragoverClass=\"dndDragover\"\n (dndDrop)=\"onDndDrop($event)\">\n <div dndPlaceholderRef class=\"prerequisite-drag-placeholder\">Drop here</div>\n <div\n *ngFor=\"let row of rows; let i = index; trackBy: trackByKey\"\n class=\"prerequisite-drag-item cqa-flex cqa-items-center cqa-gap-2\"\n [dndDraggable]=\"row\"\n [dndDisableIf]=\"rows.length <= 1\"\n dndEffectAllowed=\"move\"\n dndType=\"prerequisite-row\">\n <!-- 9-dot grid drag handle (only when multiple rows to reorder) -->\n <div *ngIf=\"rows.length > 1\" dndHandle class=\"cqa-flex cqa-flex-shrink-0 cqa-items-center cqa-justify-center cqa-cursor-grab cqa-text-[#6B7280] cqa-hover:cqa-text-[#111827] active:cqa-cursor-grabbing\" matTooltip=\"Drag to reorder\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"3\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"3\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"3\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n </svg>\n </div>\n\n <div class=\"cqa-flex-1 cqa-min-w-0\">\n <!-- Custom template (e.g. parent-provided cqa-dynamic-select) -->\n <ng-container *ngIf=\"selectBodyTpl\">\n <ng-container\n *ngTemplateOutlet=\"selectBodyTpl; context: {\n $implicit: row,\n index: i,\n form: form,\n config: getConfig(i)\n }\">\n </ng-container>\n </ng-container>\n <!-- Default: built-in cqa-dynamic-select -->\n <cqa-dynamic-select\n *ngIf=\"!selectBodyTpl && form\"\n [form]=\"form\"\n [config]=\"getConfig(i)\"\n (selectionChange)=\"onSelectionChange($event, i)\">\n </cqa-dynamic-select>\n </div>\n\n <button\n type=\"button\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-8 cqa-h-8 cqa-min-w-[32px] cqa-bg-transparent cqa-border-none cqa-rounded-md cqa-text-[#6b7280] cqa-cursor-pointer cqa-p-0 cqa-hover:cqa-bg-[#f3f4f6] cqa-hover:cqa-text-[#374151]\"\n (click)=\"onRemoveRow(i)\"\n matTooltip=\"Cancel\">\n <mat-icon class=\"cqa-text-lg cqa-w-[18px] cqa-h-[18px]\">close</mat-icon>\n </button>\n </div>\n </div>\n\n <div *ngIf=\"showAddAnotherValidation && !allRowsHaveValues()\" class=\"cqa-text-xs cqa-text-[#dc2626] cqa-mb-2\">\n {{ selectFirstValidationMessage }}\n </div>\n <!-- Add Prerequisite button only in empty state; hide when parent has prerequisites (e.g. collapsing after update) -->\n <div\n *ngIf=\"rows.length === 0 && !hideAddPrerequisite\"\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#ccccff] cqa-rounded-lg cqa-p-3 cqa-mb-3 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-center cqa-gap-2 cqa-min-h-[40px] cqa-w-full cqa-hover:cqa-border-[#9999ee] cqa-hover:cqa-bg-[#f8f8ff] cqa-active:cqa-border-[#7c7ce0] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"onAddRow()\">\n <mat-icon class=\"cqa-text-[18px] cqa-w-[18px] cqa-h-[18px] cqa-text-[#3b82f6]\">add</mat-icon>\n <span class=\"cqa-font-medium cqa-font-inter cqa-text-sm cqa-text-[#3b82f6]\">{{ addTriggerText }}</span>\n </div>\n <!-- Add Another link when we already have at least one row -->\n <button\n *ngIf=\"rows.length > 0 && !hideAddPrerequisite\"\n type=\"button\"\n class=\"cqa-mb-3 cqa-flex cqa-items-center cqa-gap-2 cqa-bg-transparent cqa-border-none cqa-p-0 cqa-cursor-pointer cqa-font-inter cqa-text-sm cqa-text-[#4242DB] cqa-hover:cqa-underline\"\n (click)=\"onAddRow()\">\n <mat-icon class=\"cqa-text-[18px] cqa-w-[18px] cqa-h-[18px]\">add</mat-icon>\n <span>{{ addAnotherText }}</span>\n </button>\n <div class=\"cqa-flex cqa-gap-3 cqa-justify-end\">\n <button\n type=\"button\"\n class=\"cqa-py-2.5 cqa-px-4 cqa-bg-white cqa-text-[#374151] cqa-border cqa-border-[#d1d5db] cqa-rounded-md cqa-text-sm cqa-font-semibold cqa-cursor-pointer cqa-hover:cqa-bg-[#f9fafb]\"\n (click)=\"onCancel()\">\n {{ cancelText }}\n </button>\n <button\n type=\"button\"\n class=\"cqa-py-2.5 cqa-px-4 cqa-rounded-md cqa-text-sm cqa-font-semibold cqa-border-none cqa-cursor-pointer disabled:cqa-opacity-50 disabled:cqa-cursor-not-allowed cqa-bg-[#1a56db] cqa-text-white cqa-hover:cqa-bg-[#1647b8] disabled:cqa-bg-[#1a56db] cqa-flex cqa-items-center cqa-justify-center cqa-gap-2\"\n [style.pointer-events]=\"isUpdating ? 'none' : 'auto'\"\n [style.cursor]=\"isUpdating ? 'not-allowed' : 'pointer'\"\n [disabled]=\"isUpdateDisabled()\"\n (click)=\"onUpdate()\">\n <mat-spinner *ngIf=\"isUpdating\" diameter=\"16\" class=\"cqa-inline-block update-spinner-white\"></mat-spinner>\n <span>{{ updateText }}</span>\n </button>\n </div>\n </div>\n</ng-container>\n" }]
4761
+ args: [{ selector: 'cqa-add-prerequisite-cases-section', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'cqa-ui-root cqa-add-prerequisite-cases-section-host' }, template: "<!-- Add Prerequisite trigger - only when collapsed and no rows (user must click to expand); hide when parent has prerequisites -->\n<ng-container *ngIf=\"rows.length === 0 && !expanded && !hideAddPrerequisite\">\n <div\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#D8D9FC] cqa-rounded-lg cqa-p-1 cqa-mt-4 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-center cqa-gap-2 cqa-w-full cqa-hover:cqa-border-[#9999ee] cqa-hover:cqa-bg-[#f8f8ff] cqa-active:cqa-border-[#7c7ce0] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"onAddPrerequisiteClick()\">\n <mat-icon class=\"cqa-text-[12px] cqa-w-[12px] cqa-h-[12px] cqa-text-[#3F43EE]\">add</mat-icon>\n <span class=\"cqa-font-regular cqa-font-inter cqa-text-sm cqa-text-[#3F43EE]\">{{ addTriggerText }}</span>\n </div>\n</ng-container>\n\n<!-- Collapsed summary when we have rows but expanded=false -->\n<ng-container *ngIf=\"rows.length > 0 && !expanded\">\n <div\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#D8D9FC] cqa-rounded-lg cqa-p-1.5 cqa-mt-4 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-between cqa-min-h-[27px] cqa-hover:cqa-border-[#9ca3af] cqa-hover:cqa-bg-[#f9fafb] cqa-active:cqa-border-[#6366f1] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"toggleExpanded(true)\">\n <span class=\"cqa-text-[#4a5565] cqa-font-normal cqa-font-inter cqa-text-xs\">{{ rows.length }} prerequisite{{ rows.length !== 1 ? 's' : '' }}</span>\n <mat-icon class=\"cqa-text-[14px] cqa-w-[14px] cqa-h-[14px] cqa-text-[#4a5565]\">expand_more</mat-icon>\n </div>\n</ng-container>\n\n<!-- Expanded form - when expanded=true (with or without rows; no Add Prerequisite trigger) -->\n<ng-container *ngIf=\"expanded\">\n <div class=\"cqa-p-3 cqa-bg-white cqa-border cqa-border-[#e5e7eb] cqa-rounded-lg\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-1.5 cqa-mb-3\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-[#374151] cqa-m-0 cqa-leading-none\">{{ label }}</label>\n <mat-icon class=\"cqa-inline-flex cqa-mt-1 cqa-items-center cqa-justify-center cqa-w-4 cqa-h-4 cqa-text-sm cqa-text-[#6b7280] cqa-cursor-help cqa-flex-shrink-0\" [matTooltip]=\"infoTooltip\" matTooltipPosition=\"above\" matTooltipShowDelay=\"300\">info</mat-icon>\n <button\n type=\"button\"\n class=\"cqa-ml-auto cqa-flex cqa-items-center cqa-justify-center cqa-w-7 cqa-h-7 cqa-p-0 cqa-bg-transparent cqa-border-none cqa-rounded-md cqa-text-[#6b7280] cqa-cursor-pointer cqa-hover:cqa-bg-[#f3f4f6] cqa-hover:cqa-text-[#374151]\"\n (click)=\"toggleExpanded(false)\"\n matTooltip=\"Close\">\n <mat-icon class=\"cqa-text-xl cqa-w-5 cqa-h-5\">expand_less</mat-icon>\n </button>\n </div>\n\n <div\n class=\"prerequisite-drop-list cqa-flex cqa-flex-col cqa-gap-2 cqa-mb-3\"\n [dndDropzone]=\"['prerequisite-row']\"\n dndEffectAllowed=\"move\"\n dndDragoverClass=\"dndDragover\"\n (dndDrop)=\"onDndDrop($event)\">\n <div dndPlaceholderRef class=\"prerequisite-drag-placeholder\">Drop here</div>\n <div\n *ngFor=\"let row of rows; let i = index; trackBy: trackByKey\"\n class=\"prerequisite-drag-item cqa-flex cqa-items-center cqa-gap-2\"\n [dndDraggable]=\"row\"\n [dndDisableIf]=\"rows.length <= 1\"\n dndEffectAllowed=\"move\"\n dndType=\"prerequisite-row\">\n <!-- 9-dot grid drag handle (only when multiple rows to reorder) -->\n <div *ngIf=\"rows.length > 1\" dndHandle class=\"cqa-flex cqa-flex-shrink-0 cqa-items-center cqa-justify-center cqa-cursor-grab cqa-text-[#6B7280] cqa-hover:cqa-text-[#111827] active:cqa-cursor-grabbing\" matTooltip=\"Drag to reorder\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"3\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"3\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"3\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"3\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n <circle cx=\"13\" cy=\"13\" r=\"1.5\" fill=\"currentColor\"/>\n </svg>\n </div>\n\n <div class=\"cqa-flex-1 cqa-min-w-0\">\n <!-- Custom template (e.g. parent-provided cqa-dynamic-select) -->\n <ng-container *ngIf=\"selectBodyTpl\">\n <ng-container\n *ngTemplateOutlet=\"selectBodyTpl; context: {\n $implicit: row,\n index: i,\n form: form,\n config: getConfig(i)\n }\">\n </ng-container>\n </ng-container>\n <!-- Default: built-in cqa-dynamic-select -->\n <cqa-dynamic-select\n *ngIf=\"!selectBodyTpl && form\"\n [form]=\"form\"\n [config]=\"getConfig(i)\"\n (selectionChange)=\"onSelectionChange($event, i)\">\n </cqa-dynamic-select>\n </div>\n\n <button\n type=\"button\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-8 cqa-h-8 cqa-min-w-[32px] cqa-bg-transparent cqa-border-none cqa-rounded-md cqa-text-[#6b7280] cqa-cursor-pointer cqa-p-0 cqa-hover:cqa-bg-[#f3f4f6] cqa-hover:cqa-text-[#374151]\"\n (click)=\"onRemoveRow(i)\"\n matTooltip=\"Cancel\">\n <mat-icon class=\"cqa-text-lg cqa-w-[18px] cqa-h-[18px]\">close</mat-icon>\n </button>\n </div>\n </div>\n\n <div *ngIf=\"showAddAnotherValidation && !allRowsHaveValues()\" class=\"cqa-text-xs cqa-text-[#dc2626] cqa-mb-2\">\n {{ selectFirstValidationMessage }}\n </div>\n <!-- Add Prerequisite button only in empty state; hide when parent has prerequisites (e.g. collapsing after update) -->\n <div\n *ngIf=\"rows.length === 0 && !hideAddPrerequisite\"\n class=\"cqa-border-2 cqa-border-dashed cqa-border-[#ccccff] cqa-rounded-lg cqa-p-3 cqa-mb-3 cqa-bg-white cqa-cursor-pointer cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-flex cqa-items-center cqa-justify-center cqa-gap-2 cqa-min-h-[40px] cqa-w-full cqa-hover:cqa-border-[#9999ee] cqa-hover:cqa-bg-[#f8f8ff] cqa-active:cqa-border-[#7c7ce0] cqa-active:cqa-bg-[#eff6ff]\"\n (click)=\"onAddRow()\">\n <mat-icon class=\"cqa-text-[18px] cqa-w-[18px] cqa-h-[18px] cqa-text-[#3b82f6]\">add</mat-icon>\n <span class=\"cqa-font-medium cqa-font-inter cqa-text-sm cqa-text-[#3b82f6]\">{{ addTriggerText }}</span>\n </div>\n <!-- Add Another link when we already have at least one row -->\n <button\n *ngIf=\"rows.length > 0 && !hideAddPrerequisite\"\n type=\"button\"\n class=\"cqa-mb-3 cqa-flex cqa-items-center cqa-gap-2 cqa-bg-transparent cqa-border-none cqa-p-0 cqa-cursor-pointer cqa-font-inter cqa-text-sm cqa-text-[#4242DB] cqa-hover:cqa-underline\"\n (click)=\"onAddRow()\">\n <mat-icon class=\"cqa-text-[18px] cqa-w-[18px] cqa-h-[18px]\">add</mat-icon>\n <span>{{ addAnotherText }}</span>\n </button>\n <div class=\"cqa-flex cqa-gap-3 cqa-justify-end\">\n <button\n type=\"button\"\n class=\"cqa-py-2.5 cqa-px-4 cqa-bg-white cqa-text-[#374151] cqa-border cqa-border-[#d1d5db] cqa-rounded-md cqa-text-sm cqa-font-semibold cqa-cursor-pointer cqa-hover:cqa-bg-[#f9fafb]\"\n (click)=\"onCancel()\">\n {{ cancelText }}\n </button>\n <button\n type=\"button\"\n class=\"cqa-py-2.5 cqa-px-4 cqa-rounded-md cqa-text-sm cqa-font-semibold cqa-border-none cqa-cursor-pointer disabled:cqa-opacity-50 disabled:cqa-cursor-not-allowed cqa-bg-[#1a56db] cqa-text-white cqa-hover:cqa-bg-[#1647b8] disabled:cqa-bg-[#1a56db] cqa-flex cqa-items-center cqa-justify-center cqa-gap-2\"\n [style.pointer-events]=\"isUpdating ? 'none' : 'auto'\"\n [style.cursor]=\"isUpdating ? 'not-allowed' : 'pointer'\"\n [disabled]=\"isUpdateDisabled()\"\n (click)=\"onUpdate()\">\n <mat-spinner *ngIf=\"isUpdating\" diameter=\"16\" class=\"cqa-inline-block update-spinner-white\"></mat-spinner>\n <span>{{ updateText }}</span>\n </button>\n </div>\n </div>\n</ng-container>\n", styles: [] }]
4762
4762
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { expanded: [{
4763
4763
  type: Input
4764
4764
  }], form: [{
@@ -26174,6 +26174,18 @@ class TemplateVariablesFormComponent {
26174
26174
  this.hasMoreScreenNames = false;
26175
26175
  /** True while parent is loading screen names (search or load more) */
26176
26176
  this.isLoadingScreenNames = false;
26177
+ /** Test data profiles for parameter dropdown (from API) - raw TestData objects */
26178
+ this.parameterOptions = []; // TestData[] - using any to avoid circular dependency
26179
+ /** Whether more parameters are available for infinite scroll */
26180
+ this.hasMoreParameters = false;
26181
+ /** True while parent is loading parameters (search or load more) */
26182
+ this.isLoadingParameters = false;
26183
+ /** Environment options for environment parameter dropdown (from API) */
26184
+ this.environmentOptions = [];
26185
+ /** Whether more environments are available for infinite scroll */
26186
+ this.hasMoreEnvironments = false;
26187
+ /** True while parent is loading environments (search or load more) */
26188
+ this.isLoadingEnvironments = false;
26177
26189
  this.variableValueChange = new EventEmitter();
26178
26190
  this.variableBooleanChange = new EventEmitter();
26179
26191
  this.metadataChange = new EventEmitter();
@@ -26184,16 +26196,28 @@ class TemplateVariablesFormComponent {
26184
26196
  this.searchScreenName = new EventEmitter(); // Emit when user searches screen names
26185
26197
  this.loadMoreScreenNames = new EventEmitter(); // Emit when user scrolls to load more screen names
26186
26198
  this.createScreenNameRequest = new EventEmitter(); // Emit when user requests to create a new screen name
26199
+ this.searchParameters = new EventEmitter(); // Emit when user searches for parameters
26200
+ this.loadMoreParameters = new EventEmitter(); // Emit when user scrolls to load more parameters
26201
+ this.searchEnvironments = new EventEmitter(); // Emit when user searches for environments
26202
+ this.loadMoreEnvironments = new EventEmitter(); // Emit when user scrolls to load more environments
26187
26203
  this.cancelElementForm = new EventEmitter(); // Emit when element form is cancelled
26188
26204
  this.elementFormVisibilityChange = new EventEmitter(); // Emit when element form visibility changes
26189
26205
  // Cache for select configs to avoid recalculating on every change detection
26190
26206
  this.selectConfigCache = new Map();
26191
26207
  // Cache for data type select configs
26192
26208
  this.dataTypeSelectConfigCache = new Map();
26193
- // Store data types for test-data variables
26194
- this.variableDataTypes = new Map();
26195
- // Store raw values (without formatting) for test-data variables
26196
- this.variableRawValues = new Map();
26209
+ // Cache for parameter select configs
26210
+ this.parameterSelectConfigCache = new Map();
26211
+ // Cache for environment select configs
26212
+ this.environmentSelectConfigCache = new Map();
26213
+ // Cache for environment parameter select configs
26214
+ this.environmentParameterSelectConfigCache = new Map();
26215
+ // Cache for test data profile select configs (first dropdown for parameters)
26216
+ this.testDataProfileSelectConfigCache = new Map();
26217
+ // Cache for data set select configs (second dropdown for parameters - shows data sets from selected profile)
26218
+ this.dataSetSelectConfigCache = new Map();
26219
+ // Cache for parameter select configs for a specific data set (third dropdown for parameters)
26220
+ this.parameterForDataSetSelectConfigCache = new Map();
26197
26221
  // Cache for computed properties
26198
26222
  this.needsDataTypeDropdownCache = new Map();
26199
26223
  this.shouldShowDropdownCache = new Map();
@@ -26209,46 +26233,91 @@ class TemplateVariablesFormComponent {
26209
26233
  onCreateElement(payload) {
26210
26234
  console.log('onCreateElement', payload);
26211
26235
  this.createElement.emit(payload);
26212
- this.createElementVisible = false;
26213
26236
  this.elementFormVisibilityChange.emit(false);
26214
26237
  this.cdr.markForCheck();
26215
26238
  }
26216
26239
  onCancelElementForm() {
26217
- this.createElementVisible = false;
26218
26240
  this.elementFormVisibilityChange.emit(false);
26219
26241
  this.cancelElementForm.emit();
26220
26242
  this.cdr.markForCheck();
26221
26243
  }
26222
- onShowElementForm() {
26223
- this.createElementVisible = true;
26224
- this.elementFormVisibilityChange.emit(true);
26225
- this.cdr.markForCheck();
26226
- }
26227
26244
  ngOnChanges(changes) {
26228
26245
  if (changes['templateVariables'] || changes['variablesForm'] || changes['elementOptions'] ||
26229
- changes['hasMoreElements'] || changes['isLoadingElements']) {
26246
+ changes['hasMoreElements'] || changes['isLoadingElements'] ||
26247
+ changes['parameterOptions'] || changes['hasMoreParameters'] || changes['isLoadingParameters'] ||
26248
+ changes['environmentOptions'] || changes['hasMoreEnvironments'] || changes['isLoadingEnvironments'] ||
26249
+ changes['defaultTestDataProfileId'] || changes['defaultTestDataStartIndex']) {
26230
26250
  // Clear all caches when inputs change
26231
26251
  this.selectConfigCache.clear();
26232
26252
  this.dataTypeSelectConfigCache.clear();
26253
+ this.parameterSelectConfigCache.clear();
26254
+ this.environmentSelectConfigCache.clear();
26255
+ this.environmentParameterSelectConfigCache.clear();
26256
+ this.testDataProfileSelectConfigCache.clear();
26257
+ this.dataSetSelectConfigCache.clear();
26258
+ this.parameterForDataSetSelectConfigCache.clear();
26233
26259
  this.needsDataTypeDropdownCache.clear();
26234
26260
  this.shouldShowDropdownCache.clear();
26235
26261
  // Initialize data types and raw values for test-data variables
26236
- if (changes['templateVariables'] && this.templateVariables) {
26262
+ // Also re-initialize if default values or parameterOptions change (to set default selections)
26263
+ if ((changes['templateVariables'] || changes['defaultTestDataProfileId'] || changes['defaultTestDataStartIndex'] || changes['parameterOptions']) && this.templateVariables) {
26237
26264
  this.initializeTestDataVariables();
26238
26265
  }
26239
26266
  // Pre-compute all configs to avoid calling methods in template
26240
26267
  this.precomputeConfigs();
26268
+ // If environment options changed and we have selected environments, refresh parameter configs
26269
+ if (changes['environmentOptions']) {
26270
+ this.templateVariables.forEach((variable, index) => {
26271
+ if (this.isEnvironmentType(variable) && variable.selectedEnvironment) {
26272
+ // Clear and recompute environment parameter config
26273
+ this.environmentParameterSelectConfigCache.delete(`${variable.name}_envParam`);
26274
+ this.getEnvironmentParameterSelectConfig(variable, index);
26275
+ }
26276
+ });
26277
+ }
26278
+ // If parameter options changed and we have default values, try to initialize them
26279
+ if (changes['parameterOptions'] && this.defaultTestDataProfileId && this.defaultTestDataStartIndex != null && this.parameterOptions.length > 0) {
26280
+ // Re-initialize to set default values now that parameterOptions are available
26281
+ console.log('Re-initializing with default values after parameterOptions loaded');
26282
+ this.initializeTestDataVariables();
26283
+ // Force change detection after initialization
26284
+ this.cdr.markForCheck();
26285
+ }
26286
+ // If parameter options changed and we have selected test data profiles, refresh configs
26287
+ if (changes['parameterOptions'] || changes['defaultTestDataProfileId'] || changes['defaultTestDataStartIndex']) {
26288
+ // Clear test data profile select config cache since profiles list may have changed
26289
+ this.testDataProfileSelectConfigCache.clear();
26290
+ this.templateVariables.forEach((variable, index) => {
26291
+ if (this.isParameterType(variable)) {
26292
+ // Recompute test data profile config
26293
+ this.getTestDataProfileSelectConfig(variable, index);
26294
+ // If a profile is already selected, recompute data set config
26295
+ if (variable.selectedTestDataProfile) {
26296
+ this.getDataSetSelectConfig(variable, index);
26297
+ // If a data set is already selected, recompute parameter config
26298
+ if (variable.selectedDataSet) {
26299
+ // Clear and recompute parameter config for the selected data set
26300
+ // Use profile ID if available for cache key
26301
+ const profileIdentifier = variable.selectedTestDataProfileId ? String(variable.selectedTestDataProfileId) : variable.selectedTestDataProfile;
26302
+ this.parameterForDataSetSelectConfigCache.delete(`${variable.name}_paramForDataSet_${profileIdentifier}_${variable.selectedDataSet}`);
26303
+ this.getParameterSelectConfig(variable, index);
26304
+ }
26305
+ }
26306
+ }
26307
+ });
26308
+ }
26241
26309
  // Mark for check since we're using OnPush
26242
26310
  this.cdr.markForCheck();
26243
26311
  }
26244
26312
  }
26245
26313
  initializeTestDataVariables() {
26246
26314
  this.templateVariables.forEach((variable, index) => {
26247
- var _a;
26315
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
26248
26316
  if (this.needsDataTypeDropdown(variable)) {
26249
26317
  const { dataType, rawValue } = this.parseTestDataValue(variable.value || '');
26250
- this.variableDataTypes.set(variable.name, dataType);
26251
- this.variableRawValues.set(variable.name, rawValue);
26318
+ // Set properties directly on the variable object
26319
+ variable.dataType = dataType;
26320
+ variable.rawValue = rawValue;
26252
26321
  // Ensure form control exists for data type in the FormArray
26253
26322
  const variableGroup = this.getVariableFormGroup(variable.name);
26254
26323
  if (variableGroup) {
@@ -26258,6 +26327,162 @@ class TemplateVariablesFormComponent {
26258
26327
  else {
26259
26328
  (_a = variableGroup.get('dataType')) === null || _a === void 0 ? void 0 : _a.setValue(dataType, { emitEvent: false });
26260
26329
  }
26330
+ // For parameter type, parse the value to extract test data profile and parameter
26331
+ if (dataType === 'parameter') {
26332
+ // Check if default test data profile and data set are provided from test case
26333
+ // Only proceed if parameterOptions are loaded
26334
+ if (this.defaultTestDataProfileId && this.defaultTestDataStartIndex != null && this.parameterOptions.length > 0) {
26335
+ // Find the test data profile by ID
26336
+ const defaultProfile = this.parameterOptions.find((testData) => testData.id === this.defaultTestDataProfileId);
26337
+ if (defaultProfile && defaultProfile.data && defaultProfile.data.length > this.defaultTestDataStartIndex) {
26338
+ const defaultDataSet = defaultProfile.data[this.defaultTestDataStartIndex];
26339
+ const profileName = defaultProfile.name || defaultProfile.testDataName;
26340
+ const dataSetName = defaultDataSet.name;
26341
+ // Set variable properties - this ensures hasSelectedTestDataProfile() and hasSelectedDataSet() return true
26342
+ variable.selectedTestDataProfile = profileName;
26343
+ variable.selectedTestDataProfileId = defaultProfile.id;
26344
+ variable.selectedDataSet = dataSetName;
26345
+ // Set form controls with the actual values so dropdowns display selected options
26346
+ if (!variableGroup.get('selectedTestDataProfile')) {
26347
+ variableGroup.addControl('selectedTestDataProfile', new FormControl(profileName));
26348
+ }
26349
+ else {
26350
+ (_b = variableGroup.get('selectedTestDataProfile')) === null || _b === void 0 ? void 0 : _b.setValue(profileName, { emitEvent: false });
26351
+ }
26352
+ if (!variableGroup.get('selectedDataSet')) {
26353
+ variableGroup.addControl('selectedDataSet', new FormControl(dataSetName));
26354
+ }
26355
+ else {
26356
+ (_c = variableGroup.get('selectedDataSet')) === null || _c === void 0 ? void 0 : _c.setValue(dataSetName, { emitEvent: false });
26357
+ }
26358
+ // Don't set parameter value yet - user will select it
26359
+ if (variableGroup.get('value')) {
26360
+ (_d = variableGroup.get('value')) === null || _d === void 0 ? void 0 : _d.setValue('', { emitEvent: false });
26361
+ }
26362
+ // Clear caches to force recomputation of configs with new values
26363
+ // Clear all cache entries for this variable to ensure fresh configs
26364
+ this.testDataProfileSelectConfigCache.delete(`${variable.name}_testDataProfile`);
26365
+ // Clear data set cache - need to clear all possible keys since we don't know the exact format
26366
+ const dataSetKeysToDelete = [];
26367
+ this.dataSetSelectConfigCache.forEach((value, key) => {
26368
+ if (key.startsWith(`${variable.name}_dataSet`)) {
26369
+ dataSetKeysToDelete.push(key);
26370
+ }
26371
+ });
26372
+ dataSetKeysToDelete.forEach(key => this.dataSetSelectConfigCache.delete(key));
26373
+ // Clear parameter cache - need to clear all possible keys
26374
+ const paramKeysToDelete = [];
26375
+ this.parameterForDataSetSelectConfigCache.forEach((value, key) => {
26376
+ if (key.startsWith(`${variable.name}_paramForDataSet`)) {
26377
+ paramKeysToDelete.push(key);
26378
+ }
26379
+ });
26380
+ paramKeysToDelete.forEach(key => this.parameterForDataSetSelectConfigCache.delete(key));
26381
+ console.log('Default test data initialized:', {
26382
+ variableName: variable.name,
26383
+ profileName,
26384
+ profileId: defaultProfile.id,
26385
+ dataSetName,
26386
+ hasSelectedProfile: !!variable.selectedTestDataProfile,
26387
+ hasSelectedDataSet: !!variable.selectedDataSet
26388
+ });
26389
+ }
26390
+ else {
26391
+ console.warn('Default test data profile not found or invalid:', {
26392
+ defaultTestDataProfileId: this.defaultTestDataProfileId,
26393
+ defaultTestDataStartIndex: this.defaultTestDataStartIndex,
26394
+ parameterOptionsLength: this.parameterOptions.length,
26395
+ foundProfile: !!defaultProfile
26396
+ });
26397
+ }
26398
+ }
26399
+ else {
26400
+ // No default values - use existing logic to find from parameter value
26401
+ const paramName = rawValue;
26402
+ if (paramName) {
26403
+ // Find the test data profile and data set that contains this parameter
26404
+ // Search through all test data profiles and their data sets
26405
+ let foundProfile = null;
26406
+ let foundDataSet = null;
26407
+ for (const testDataProfile of this.parameterOptions) {
26408
+ if (testDataProfile.data && testDataProfile.data.length > 0) {
26409
+ // Search through all data sets in this profile
26410
+ for (const dataSet of testDataProfile.data) {
26411
+ if (dataSet && dataSet.data && dataSet.data.hasOwnProperty(paramName)) {
26412
+ foundProfile = testDataProfile;
26413
+ foundDataSet = dataSet;
26414
+ break;
26415
+ }
26416
+ }
26417
+ if (foundProfile)
26418
+ break;
26419
+ }
26420
+ }
26421
+ if (foundProfile && foundDataSet) {
26422
+ const profileName = foundProfile.name || foundProfile.testDataName;
26423
+ const dataSetName = foundDataSet.name;
26424
+ variable.selectedTestDataProfile = profileName;
26425
+ variable.selectedTestDataProfileId = foundProfile.id;
26426
+ variable.selectedDataSet = dataSetName;
26427
+ // Set form controls
26428
+ if (!variableGroup.get('selectedTestDataProfile')) {
26429
+ variableGroup.addControl('selectedTestDataProfile', new FormControl(profileName));
26430
+ }
26431
+ else {
26432
+ (_e = variableGroup.get('selectedTestDataProfile')) === null || _e === void 0 ? void 0 : _e.setValue(profileName, { emitEvent: false });
26433
+ }
26434
+ if (!variableGroup.get('selectedDataSet')) {
26435
+ variableGroup.addControl('selectedDataSet', new FormControl(dataSetName));
26436
+ }
26437
+ else {
26438
+ (_f = variableGroup.get('selectedDataSet')) === null || _f === void 0 ? void 0 : _f.setValue(dataSetName, { emitEvent: false });
26439
+ }
26440
+ // Set form control to param name (for dropdown display)
26441
+ if (variableGroup.get('value')) {
26442
+ (_g = variableGroup.get('value')) === null || _g === void 0 ? void 0 : _g.setValue(paramName, { emitEvent: false });
26443
+ }
26444
+ // Ensure variable.value is formatted correctly as @|paramName|
26445
+ variable.value = this.formatTestDataValue(paramName, 'parameter');
26446
+ }
26447
+ else {
26448
+ // If parameter not found, format the raw value if it's a parameter type
26449
+ if (variableGroup.get('value')) {
26450
+ (_h = variableGroup.get('value')) === null || _h === void 0 ? void 0 : _h.setValue(rawValue, { emitEvent: false });
26451
+ }
26452
+ // Ensure variable.value is formatted correctly
26453
+ variable.value = this.formatTestDataValue(rawValue, dataType);
26454
+ }
26455
+ }
26456
+ }
26457
+ }
26458
+ // For environment type, parse the value to extract environment and parameter
26459
+ if (dataType === 'environment') {
26460
+ // Environment values are in format *|parameterName|
26461
+ // We need to find which environment this parameter belongs to
26462
+ const paramName = rawValue;
26463
+ if (paramName) {
26464
+ // Find the environment that contains this parameter
26465
+ const envOption = this.environmentOptions.find(env => env.name === paramName);
26466
+ if (envOption) {
26467
+ variable.selectedEnvironment = envOption.environment;
26468
+ // Extract and store environment ID
26469
+ const idMatch = envOption.id.match(/env-(\d+)-/);
26470
+ if (idMatch && idMatch[1]) {
26471
+ variable.selectedEnvironmentId = parseInt(idMatch[1], 10);
26472
+ }
26473
+ // Set form controls
26474
+ if (!variableGroup.get('selectedEnvironment')) {
26475
+ variableGroup.addControl('selectedEnvironment', new FormControl(envOption.environment));
26476
+ }
26477
+ else {
26478
+ (_j = variableGroup.get('selectedEnvironment')) === null || _j === void 0 ? void 0 : _j.setValue(envOption.environment, { emitEvent: false });
26479
+ }
26480
+ if (variableGroup.get('value')) {
26481
+ (_k = variableGroup.get('value')) === null || _k === void 0 ? void 0 : _k.setValue(`*|${paramName}|`, { emitEvent: false });
26482
+ }
26483
+ }
26484
+ }
26485
+ }
26261
26486
  }
26262
26487
  }
26263
26488
  });
@@ -26289,6 +26514,26 @@ class TemplateVariablesFormComponent {
26289
26514
  // Pre-compute data type select configs
26290
26515
  if (this.needsDataTypeDropdown(variable)) {
26291
26516
  this.getDataTypeSelectConfig(variable, index);
26517
+ // Pre-compute parameter and environment select configs if needed
26518
+ const dataType = variable.dataType || 'plain-text';
26519
+ if (dataType === 'parameter') {
26520
+ this.getTestDataProfileSelectConfig(variable, index);
26521
+ // Pre-compute data set config if test data profile is already selected
26522
+ if (variable.selectedTestDataProfile) {
26523
+ this.getDataSetSelectConfig(variable, index);
26524
+ // Pre-compute parameter config if data set is already selected
26525
+ if (variable.selectedDataSet) {
26526
+ this.getParameterSelectConfig(variable, index);
26527
+ }
26528
+ }
26529
+ }
26530
+ else if (dataType === 'environment') {
26531
+ this.getEnvironmentSelectConfig(variable, index);
26532
+ // Pre-compute environment parameter config if environment is already selected
26533
+ if (variable.selectedEnvironment) {
26534
+ this.getEnvironmentParameterSelectConfig(variable, index);
26535
+ }
26536
+ }
26292
26537
  }
26293
26538
  });
26294
26539
  }
@@ -26405,8 +26650,8 @@ class TemplateVariablesFormComponent {
26405
26650
  // If this is a test-data variable, parse and update raw value and data type
26406
26651
  if (this.needsDataTypeDropdown(variable)) {
26407
26652
  const { dataType, rawValue } = this.parseTestDataValue(value || '');
26408
- this.variableDataTypes.set(variableName, dataType);
26409
- this.variableRawValues.set(variableName, rawValue);
26653
+ variable.dataType = dataType;
26654
+ variable.rawValue = rawValue;
26410
26655
  // Update data type form control in FormArray
26411
26656
  const variableGroup = this.getVariableFormGroup(variableName);
26412
26657
  if (variableGroup && variableGroup.get('dataType')) {
@@ -26459,7 +26704,7 @@ class TemplateVariablesFormComponent {
26459
26704
  return this.needsDataTypeDropdownCache.get(variable.name);
26460
26705
  }
26461
26706
  const dataKey = ((_a = variable.dataKey) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
26462
- const result = dataKey === 'test-data' || dataKey === 'source_value' || dataKey === 'target_value';
26707
+ const result = dataKey === 'test_data' || dataKey === 'source_value' || dataKey === 'target_value';
26463
26708
  this.needsDataTypeDropdownCache.set(variable.name, result);
26464
26709
  return result;
26465
26710
  }
@@ -26476,7 +26721,7 @@ class TemplateVariablesFormComponent {
26476
26721
  // Ensure form control exists in FormArray
26477
26722
  const variableGroup = this.getVariableFormGroup(variable.name);
26478
26723
  if (variableGroup && !variableGroup.get('dataType')) {
26479
- const currentDataType = this.variableDataTypes.get(variable.name) || 'plain-text';
26724
+ const currentDataType = variable.dataType || 'plain-text';
26480
26725
  variableGroup.addControl('dataType', new FormControl(currentDataType));
26481
26726
  }
26482
26727
  const config = {
@@ -26493,12 +26738,10 @@ class TemplateVariablesFormComponent {
26493
26738
  return config;
26494
26739
  }
26495
26740
  getCurrentDataType(variable) {
26496
- // Simple getter - already cached in Map, no computation needed
26497
- return this.variableDataTypes.get(variable.name) || 'plain-text';
26741
+ return variable.dataType || 'plain-text';
26498
26742
  }
26499
26743
  getRawValue(variable) {
26500
- // Simple getter - already cached in Map, no computation needed
26501
- return this.variableRawValues.get(variable.name) || '';
26744
+ return variable.rawValue || '';
26502
26745
  }
26503
26746
  /**
26504
26747
  * Check if selector variable is available in templateVariables
@@ -26513,8 +26756,8 @@ class TemplateVariablesFormComponent {
26513
26756
  return this.templateVariables.some(v => {
26514
26757
  var _a;
26515
26758
  const dataKey = ((_a = v.dataKey) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
26516
- if (dataKey === 'test-data' || dataKey === 'source_value' || dataKey === 'target_value') {
26517
- const dataType = this.variableDataTypes.get(v.name) || 'plain-text';
26759
+ if (dataKey === 'test_data' || dataKey === 'source_value' || dataKey === 'target_value') {
26760
+ const dataType = v.dataType || 'plain-text';
26518
26761
  return dataType === 'parameter';
26519
26762
  }
26520
26763
  return false;
@@ -26526,36 +26769,141 @@ class TemplateVariablesFormComponent {
26526
26769
  get environmentVariableAvailable() {
26527
26770
  return this.templateVariables.some(v => {
26528
26771
  var _a;
26529
- const dataKey = ((_a = v.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
26530
- if (dataKey === 'test-data' || dataKey === 'source_value' || dataKey === 'target_value') {
26531
- const dataType = this.variableDataTypes.get(v.name) || 'plain-text';
26772
+ const dataKey = ((_a = v.dataKey) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
26773
+ if (dataKey === 'test_data' || dataKey === 'source_value' || dataKey === 'target_value') {
26774
+ const dataType = v.dataType || 'plain-text';
26532
26775
  return dataType === 'environment';
26533
26776
  }
26534
26777
  return false;
26535
26778
  });
26536
26779
  }
26537
26780
  onDataTypeChange(variableName, dataType) {
26538
- var _a;
26539
- // Update stored data type
26540
- this.variableDataTypes.set(variableName, dataType);
26781
+ var _a, _b, _c, _d, _e, _f;
26782
+ // Find the variable
26783
+ const variable = this.templateVariables.find(v => v.name === variableName);
26784
+ if (!variable)
26785
+ return;
26786
+ // Update stored data type on the variable object
26787
+ variable.dataType = dataType;
26788
+ // Clear parameter and environment select config caches since data type changed
26789
+ this.testDataProfileSelectConfigCache.delete(`${variableName}_testDataProfile`);
26790
+ this.dataSetSelectConfigCache.delete(`${variableName}_dataSet`);
26791
+ this.parameterForDataSetSelectConfigCache.delete(`${variableName}_paramForDataSet`);
26792
+ this.environmentSelectConfigCache.delete(`${variableName}_environment`);
26793
+ this.environmentParameterSelectConfigCache.delete(`${variableName}_envParam`);
26794
+ // Clear selected test data profile and data set if switching away from parameter type
26795
+ if (dataType !== 'parameter') {
26796
+ variable.selectedTestDataProfile = undefined;
26797
+ variable.selectedTestDataProfileId = undefined;
26798
+ variable.selectedDataSet = undefined;
26799
+ }
26800
+ // Clear selected environment if switching away from environment type
26801
+ if (dataType !== 'environment') {
26802
+ variable.selectedEnvironment = undefined;
26803
+ variable.selectedEnvironmentId = undefined;
26804
+ }
26541
26805
  // Get current raw value
26542
- const rawValue = this.variableRawValues.get(variableName) || '';
26806
+ const rawValue = variable.rawValue || '';
26543
26807
  // Format the value based on new data type
26544
26808
  const formattedValue = this.formatTestDataValue(rawValue, dataType);
26545
- // Update variable value
26546
- const variable = this.templateVariables.find(v => v.name === variableName);
26547
- if (variable) {
26548
- variable.value = formattedValue;
26549
- }
26809
+ // Update variable value (always store formatted value in variable)
26810
+ variable.value = formattedValue;
26550
26811
  // Update form control in FormArray
26551
26812
  const variableGroup = this.getVariableFormGroup(variableName);
26552
- if (variableGroup && variableGroup.get('value')) {
26553
- (_a = variableGroup.get('value')) === null || _a === void 0 ? void 0 : _a.setValue(formattedValue, { emitEvent: false });
26813
+ if (variableGroup) {
26814
+ if (variableGroup.get('value')) {
26815
+ // For parameter type, set form control to raw value so select can display it
26816
+ if (dataType === 'parameter') {
26817
+ (_a = variableGroup.get('value')) === null || _a === void 0 ? void 0 : _a.setValue(rawValue, { emitEvent: false });
26818
+ }
26819
+ else if (dataType === 'environment') {
26820
+ // For environment type, clear value and selectedEnvironment
26821
+ (_b = variableGroup.get('value')) === null || _b === void 0 ? void 0 : _b.setValue('', { emitEvent: false });
26822
+ if (variableGroup.get('selectedEnvironment')) {
26823
+ (_c = variableGroup.get('selectedEnvironment')) === null || _c === void 0 ? void 0 : _c.setValue('', { emitEvent: false });
26824
+ }
26825
+ }
26826
+ else {
26827
+ (_d = variableGroup.get('value')) === null || _d === void 0 ? void 0 : _d.setValue(formattedValue, { emitEvent: false });
26828
+ }
26829
+ }
26830
+ // Remove selectedEnvironment control if not environment type
26831
+ if (dataType !== 'environment' && variableGroup.get('selectedEnvironment')) {
26832
+ variableGroup.removeControl('selectedEnvironment');
26833
+ }
26834
+ }
26835
+ // If switching to parameter type, check for default values and initialize them
26836
+ if (dataType === 'parameter') {
26837
+ const index = this.templateVariables.indexOf(variable);
26838
+ // Check if default test data profile and data set are provided from test case
26839
+ if (this.defaultTestDataProfileId && this.defaultTestDataStartIndex != null && this.parameterOptions.length > 0) {
26840
+ // Find the test data profile by ID
26841
+ const defaultProfile = this.parameterOptions.find((testData) => testData.id === this.defaultTestDataProfileId);
26842
+ if (defaultProfile && defaultProfile.data && defaultProfile.data.length > this.defaultTestDataStartIndex) {
26843
+ const defaultDataSet = defaultProfile.data[this.defaultTestDataStartIndex];
26844
+ const profileName = defaultProfile.name || defaultProfile.testDataName;
26845
+ const dataSetName = defaultDataSet.name;
26846
+ // Set variable properties - this ensures hasSelectedTestDataProfile() and hasSelectedDataSet() return true
26847
+ variable.selectedTestDataProfile = profileName;
26848
+ variable.selectedTestDataProfileId = defaultProfile.id;
26849
+ variable.selectedDataSet = dataSetName;
26850
+ // Set form controls with the actual values so dropdowns display selected options
26851
+ if (variableGroup) {
26852
+ if (!variableGroup.get('selectedTestDataProfile')) {
26853
+ variableGroup.addControl('selectedTestDataProfile', new FormControl(profileName));
26854
+ }
26855
+ else {
26856
+ (_e = variableGroup.get('selectedTestDataProfile')) === null || _e === void 0 ? void 0 : _e.setValue(profileName, { emitEvent: false });
26857
+ }
26858
+ if (!variableGroup.get('selectedDataSet')) {
26859
+ variableGroup.addControl('selectedDataSet', new FormControl(dataSetName));
26860
+ }
26861
+ else {
26862
+ (_f = variableGroup.get('selectedDataSet')) === null || _f === void 0 ? void 0 : _f.setValue(dataSetName, { emitEvent: false });
26863
+ }
26864
+ }
26865
+ // Clear caches to force recomputation of configs with new values
26866
+ this.testDataProfileSelectConfigCache.delete(`${variableName}_testDataProfile`);
26867
+ const dataSetKeysToDelete = [];
26868
+ this.dataSetSelectConfigCache.forEach((value, key) => {
26869
+ if (key.startsWith(`${variableName}_dataSet`)) {
26870
+ dataSetKeysToDelete.push(key);
26871
+ }
26872
+ });
26873
+ dataSetKeysToDelete.forEach(key => this.dataSetSelectConfigCache.delete(key));
26874
+ const paramKeysToDelete = [];
26875
+ this.parameterForDataSetSelectConfigCache.forEach((value, key) => {
26876
+ if (key.startsWith(`${variableName}_paramForDataSet`)) {
26877
+ paramKeysToDelete.push(key);
26878
+ }
26879
+ });
26880
+ paramKeysToDelete.forEach(key => this.parameterForDataSetSelectConfigCache.delete(key));
26881
+ }
26882
+ }
26883
+ }
26884
+ // Pre-compute the new select config if needed
26885
+ if (variable) {
26886
+ const index = this.templateVariables.indexOf(variable);
26887
+ if (dataType === 'parameter') {
26888
+ // Pre-compute test data profile config
26889
+ this.getTestDataProfileSelectConfig(variable, index);
26890
+ // If a profile is already selected, pre-compute data set config
26891
+ if (variable.selectedTestDataProfile) {
26892
+ this.getDataSetSelectConfig(variable, index);
26893
+ // If a data set is already selected, pre-compute parameter config
26894
+ if (variable.selectedDataSet) {
26895
+ this.getParameterSelectConfig(variable, index);
26896
+ }
26897
+ }
26898
+ }
26899
+ else if (dataType === 'environment') {
26900
+ this.getEnvironmentSelectConfig(variable, index);
26901
+ }
26554
26902
  }
26555
26903
  // Mark for check since we're using OnPush
26556
26904
  this.cdr.markForCheck();
26557
26905
  console.log('onDataTypeChange', variableName, dataType, formattedValue);
26558
- // Emit the change event
26906
+ // Emit the change event with formatted value
26559
26907
  this.variableValueChange.emit({ name: variableName, value: formattedValue });
26560
26908
  }
26561
26909
  onElementSearch(event) {
@@ -26566,17 +26914,18 @@ class TemplateVariablesFormComponent {
26566
26914
  }
26567
26915
  onTestDataValueChange(variableName, rawValue) {
26568
26916
  var _a;
26569
- // Update stored raw value
26570
- this.variableRawValues.set(variableName, rawValue);
26917
+ // Find the variable
26918
+ const variable = this.templateVariables.find(v => v.name === variableName);
26919
+ if (!variable)
26920
+ return;
26921
+ // Update stored raw value on the variable object
26922
+ variable.rawValue = rawValue;
26571
26923
  // Get current data type
26572
- const dataType = this.variableDataTypes.get(variableName) || 'plain-text';
26924
+ const dataType = variable.dataType || 'plain-text';
26573
26925
  // Format the value based on data type
26574
26926
  const formattedValue = this.formatTestDataValue(rawValue, dataType);
26575
26927
  // Update variable value
26576
- const variable = this.templateVariables.find(v => v.name === variableName);
26577
- if (variable) {
26578
- variable.value = formattedValue;
26579
- }
26928
+ variable.value = formattedValue;
26580
26929
  // Update form control in FormArray
26581
26930
  const variableGroup = this.getVariableFormGroup(variableName);
26582
26931
  if (variableGroup && variableGroup.get('value')) {
@@ -26587,12 +26936,647 @@ class TemplateVariablesFormComponent {
26587
26936
  // Emit the change event
26588
26937
  this.variableValueChange.emit({ name: variableName, value: formattedValue });
26589
26938
  }
26939
+ /**
26940
+ * Get unique test data profiles from parameter options (raw TestData objects)
26941
+ */
26942
+ getUniqueTestDataProfiles() {
26943
+ const profileMap = new Map();
26944
+ this.parameterOptions.forEach((testData) => {
26945
+ // testData.name is the testDataName (profile name)
26946
+ const profileName = testData.name || testData.testDataName;
26947
+ if (profileName && !profileMap.has(profileName)) {
26948
+ profileMap.set(profileName, {
26949
+ id: String(testData.id),
26950
+ name: profileName
26951
+ });
26952
+ }
26953
+ });
26954
+ const profiles = Array.from(profileMap.values());
26955
+ return profiles;
26956
+ }
26957
+ /**
26958
+ * Get data sets for a specific test data profile
26959
+ * Returns all data sets from the profile's data array
26960
+ */
26961
+ getDataSetsForTestDataProfile(profileId) {
26962
+ // Find the test data profile by id
26963
+ const testDataProfile = this.parameterOptions.find((testData) => {
26964
+ return testData.id === Number(profileId);
26965
+ });
26966
+ if (!testDataProfile || !testDataProfile.data || testDataProfile.data.length === 0) {
26967
+ return [];
26968
+ }
26969
+ // Return all data sets from the profile
26970
+ return testDataProfile.data.map((dataSet) => ({
26971
+ id: dataSet.name,
26972
+ name: dataSet.name
26973
+ }));
26974
+ }
26975
+ /**
26976
+ * Get parameters for a specific data set in a test data profile
26977
+ * Extracts parameter names from the selected data set's data object
26978
+ */
26979
+ getParametersForDataSet(profileIdOrName, dataSetName) {
26980
+ // Find the test data profile by id or name
26981
+ const testDataProfile = this.parameterOptions.find((testData) => {
26982
+ // Try to match by ID first (if profileIdOrName is a number)
26983
+ const idMatch = !isNaN(Number(profileIdOrName)) && testData.id === Number(profileIdOrName);
26984
+ // Otherwise try to match by name
26985
+ const nameMatch = (testData.name || testData.testDataName) === profileIdOrName;
26986
+ return idMatch || nameMatch;
26987
+ });
26988
+ if (!testDataProfile || !testDataProfile.data || testDataProfile.data.length === 0) {
26989
+ return [];
26990
+ }
26991
+ // Find the specific data set by name
26992
+ const dataSet = testDataProfile.data.find((ds) => ds.name === dataSetName);
26993
+ if (!dataSet || !dataSet.data) {
26994
+ return [];
26995
+ }
26996
+ // Get all parameter keys from the data set's data object
26997
+ const parameterNames = Object.keys(dataSet.data);
26998
+ return parameterNames.map(paramName => ({
26999
+ id: paramName,
27000
+ name: paramName,
27001
+ }));
27002
+ }
27003
+ /**
27004
+ * Get select config for test data profile dropdown (first dropdown for parameters)
27005
+ */
27006
+ getTestDataProfileSelectConfig(variable, index) {
27007
+ var _a, _b, _c, _d;
27008
+ const cacheKey = `${variable.name}_testDataProfile`;
27009
+ // Get unique test data profiles
27010
+ const profiles = this.getUniqueTestDataProfiles();
27011
+ // Create options with profile name and ID (display name with ID)
27012
+ const optionsArray = profiles.map(profile => {
27013
+ // Find the test data profile to get the ID
27014
+ const testDataProfile = this.parameterOptions.find((testData) => {
27015
+ const name = testData.name || testData.testDataName;
27016
+ return name === profile.name;
27017
+ });
27018
+ const profileId = (testDataProfile === null || testDataProfile === void 0 ? void 0 : testDataProfile.id) || profile.id;
27019
+ return {
27020
+ id: String(profileId),
27021
+ value: profile.name,
27022
+ name: `${profile.name}`,
27023
+ label: `${profile.name}`
27024
+ };
27025
+ });
27026
+ // Ensure form control exists for test data profile selection and update it
27027
+ const variableGroup = this.getVariableFormGroup(variable.name);
27028
+ if (variableGroup) {
27029
+ if (!variableGroup.get('selectedTestDataProfile')) {
27030
+ // Use profile ID if available, otherwise use profile name
27031
+ const currentValue = variable.selectedTestDataProfileId
27032
+ ? String(variable.selectedTestDataProfileId)
27033
+ : (variable.selectedTestDataProfile || '');
27034
+ variableGroup.addControl('selectedTestDataProfile', new FormControl(currentValue));
27035
+ }
27036
+ // Always update form control value if variable has a selected profile
27037
+ // This ensures the value is set even if config was cached
27038
+ // Use profile ID (which matches opt.id) instead of profile name (which matches opt.value)
27039
+ if (variable.selectedTestDataProfileId != null) {
27040
+ const profileIdString = String(variable.selectedTestDataProfileId);
27041
+ // Verify the profile ID exists in options before setting
27042
+ const profileExists = optionsArray.some(opt => opt.id === profileIdString);
27043
+ if (profileExists) {
27044
+ const currentControlValue = (_a = variableGroup.get('selectedTestDataProfile')) === null || _a === void 0 ? void 0 : _a.value;
27045
+ if (currentControlValue !== profileIdString) {
27046
+ (_b = variableGroup.get('selectedTestDataProfile')) === null || _b === void 0 ? void 0 : _b.setValue(profileIdString, { emitEvent: false });
27047
+ console.log('Updated test data profile form control with ID:', {
27048
+ variableName: variable.name,
27049
+ profileId: profileIdString,
27050
+ profileName: variable.selectedTestDataProfile,
27051
+ optionsCount: optionsArray.length
27052
+ });
27053
+ }
27054
+ }
27055
+ else {
27056
+ console.warn('Selected test data profile ID not found in options:', {
27057
+ variableName: variable.name,
27058
+ profileId: profileIdString,
27059
+ profileName: variable.selectedTestDataProfile,
27060
+ availableOptionIds: optionsArray.map(opt => opt.id)
27061
+ });
27062
+ }
27063
+ }
27064
+ else if (variable.selectedTestDataProfile) {
27065
+ // Fallback: if we only have the profile name, find the matching option and use its ID
27066
+ const matchingOption = optionsArray.find(opt => opt.value === variable.selectedTestDataProfile);
27067
+ if (matchingOption) {
27068
+ const currentControlValue = (_c = variableGroup.get('selectedTestDataProfile')) === null || _c === void 0 ? void 0 : _c.value;
27069
+ if (currentControlValue !== matchingOption.id) {
27070
+ (_d = variableGroup.get('selectedTestDataProfile')) === null || _d === void 0 ? void 0 : _d.setValue(matchingOption.id, { emitEvent: false });
27071
+ // Also update the variable's profile ID for consistency
27072
+ variable.selectedTestDataProfileId = Number(matchingOption.id);
27073
+ console.log('Updated test data profile form control with ID from name:', {
27074
+ variableName: variable.name,
27075
+ profileId: matchingOption.id,
27076
+ profileName: variable.selectedTestDataProfile
27077
+ });
27078
+ }
27079
+ }
27080
+ }
27081
+ }
27082
+ // Check cache after ensuring form control is set
27083
+ if (this.testDataProfileSelectConfigCache.has(cacheKey)) {
27084
+ return this.testDataProfileSelectConfigCache.get(cacheKey);
27085
+ }
27086
+ // Check if default values are set - if so, disable the dropdown
27087
+ const isDisabled = this.hasDefaultTestDataSelection();
27088
+ const config = {
27089
+ key: 'selectedTestDataProfile',
27090
+ placeholder: 'Select Test Data Profile',
27091
+ multiple: false,
27092
+ searchable: false,
27093
+ options: optionsArray,
27094
+ hasMore: false,
27095
+ isLoading: false,
27096
+ disabled: isDisabled,
27097
+ onChange: (value) => {
27098
+ var _a, _b, _c;
27099
+ // Value is the profile ID (string) from the mat-option
27100
+ // Find the test data profile by ID to get the name
27101
+ const testDataProfile = this.parameterOptions.find((testData) => {
27102
+ return testData.id === Number(value);
27103
+ });
27104
+ // Store both ID and name
27105
+ variable.selectedTestDataProfileId = testDataProfile === null || testDataProfile === void 0 ? void 0 : testDataProfile.id;
27106
+ variable.selectedTestDataProfile = (testDataProfile === null || testDataProfile === void 0 ? void 0 : testDataProfile.name) || (testDataProfile === null || testDataProfile === void 0 ? void 0 : testDataProfile.testDataName) || '';
27107
+ // Clear data set and parameter selection when profile changes
27108
+ variable.selectedDataSet = undefined;
27109
+ variable.rawValue = '';
27110
+ variable.value = '';
27111
+ // Update form controls
27112
+ const varGroup = this.getVariableFormGroup(variable.name);
27113
+ if (varGroup) {
27114
+ if (varGroup.get('selectedTestDataProfile')) {
27115
+ (_a = varGroup.get('selectedTestDataProfile')) === null || _a === void 0 ? void 0 : _a.setValue(value, { emitEvent: false });
27116
+ }
27117
+ if (varGroup.get('selectedDataSet')) {
27118
+ (_b = varGroup.get('selectedDataSet')) === null || _b === void 0 ? void 0 : _b.setValue('', { emitEvent: false });
27119
+ }
27120
+ if (varGroup.get('value')) {
27121
+ (_c = varGroup.get('value')) === null || _c === void 0 ? void 0 : _c.setValue('', { emitEvent: false });
27122
+ }
27123
+ }
27124
+ // Clear caches for data set and parameter select configs since profile changed
27125
+ // Clear all data set and parameter configs for this variable
27126
+ const dataSetKeysToDelete = [];
27127
+ this.dataSetSelectConfigCache.forEach((value, key) => {
27128
+ if (key.startsWith(`${variable.name}_dataSet`)) {
27129
+ dataSetKeysToDelete.push(key);
27130
+ }
27131
+ });
27132
+ dataSetKeysToDelete.forEach(key => this.dataSetSelectConfigCache.delete(key));
27133
+ const paramKeysToDelete = [];
27134
+ this.parameterForDataSetSelectConfigCache.forEach((value, key) => {
27135
+ if (key.startsWith(`${variable.name}_paramForDataSet`)) {
27136
+ paramKeysToDelete.push(key);
27137
+ }
27138
+ });
27139
+ paramKeysToDelete.forEach(key => this.parameterForDataSetSelectConfigCache.delete(key));
27140
+ // Clear selected data set when profile changes
27141
+ variable.selectedDataSet = undefined;
27142
+ // Mark for check
27143
+ this.cdr.markForCheck();
27144
+ }
27145
+ };
27146
+ this.testDataProfileSelectConfigCache.set(cacheKey, config);
27147
+ return config;
27148
+ }
27149
+ /**
27150
+ * Get select config for data set dropdown (second dropdown for parameters - shows data sets from selected profile)
27151
+ */
27152
+ getDataSetSelectConfig(variable, index) {
27153
+ var _a;
27154
+ // Get selected test data profile ID (preferred) or name (fallback)
27155
+ const selectedProfileId = variable.selectedTestDataProfileId;
27156
+ const selectedProfile = variable.selectedTestDataProfile;
27157
+ if (!selectedProfileId && !selectedProfile) {
27158
+ // Return empty config if no profile is selected
27159
+ return {
27160
+ key: 'selectedDataSet',
27161
+ placeholder: 'Select Test Data Profile first',
27162
+ multiple: false,
27163
+ searchable: false,
27164
+ options: []
27165
+ };
27166
+ }
27167
+ // Use profile ID if available, otherwise find ID from profile name
27168
+ let profileIdToUse;
27169
+ if (selectedProfileId) {
27170
+ profileIdToUse = String(selectedProfileId);
27171
+ }
27172
+ else {
27173
+ // Find the profile ID from the profile name
27174
+ const testDataProfile = this.parameterOptions.find((testData) => {
27175
+ const name = testData.name || testData.testDataName;
27176
+ return name === selectedProfile;
27177
+ });
27178
+ profileIdToUse = (testDataProfile === null || testDataProfile === void 0 ? void 0 : testDataProfile.id) ? String(testDataProfile.id) : '';
27179
+ }
27180
+ // Use profile ID for cache key if available, otherwise use profile name
27181
+ const cacheKey = `${variable.name}_dataSet_${profileIdToUse || selectedProfile || ''}`;
27182
+ if (this.dataSetSelectConfigCache.has(cacheKey)) {
27183
+ return this.dataSetSelectConfigCache.get(cacheKey);
27184
+ }
27185
+ // Get data sets for the selected test data profile using ID
27186
+ const dataSets = this.getDataSetsForTestDataProfile(profileIdToUse);
27187
+ const optionsArray = dataSets.map(dataSet => ({
27188
+ id: dataSet.name,
27189
+ value: dataSet.name,
27190
+ name: dataSet.name,
27191
+ label: dataSet.name
27192
+ }));
27193
+ // Ensure form control exists for data set selection
27194
+ const variableGroup = this.getVariableFormGroup(variable.name);
27195
+ if (variableGroup) {
27196
+ if (!variableGroup.get('selectedDataSet')) {
27197
+ const currentDataSet = variable.selectedDataSet || '';
27198
+ variableGroup.addControl('selectedDataSet', new FormControl(currentDataSet));
27199
+ }
27200
+ else {
27201
+ // Update form control value if variable has a selected data set
27202
+ if (variable.selectedDataSet) {
27203
+ (_a = variableGroup.get('selectedDataSet')) === null || _a === void 0 ? void 0 : _a.setValue(variable.selectedDataSet, { emitEvent: false });
27204
+ }
27205
+ }
27206
+ }
27207
+ // Check if default values are set - if so, disable the dropdown
27208
+ const isDisabled = this.hasDefaultTestDataSelection();
27209
+ const config = {
27210
+ key: 'selectedDataSet',
27211
+ placeholder: 'Select Data Set',
27212
+ multiple: false,
27213
+ searchable: false,
27214
+ options: optionsArray,
27215
+ hasMore: false,
27216
+ isLoading: false,
27217
+ disabled: isDisabled,
27218
+ onChange: (value) => {
27219
+ var _a, _b;
27220
+ // Store selected data set
27221
+ variable.selectedDataSet = value;
27222
+ // Clear parameter selection when data set changes
27223
+ variable.rawValue = '';
27224
+ variable.value = '';
27225
+ // Update form controls
27226
+ const varGroup = this.getVariableFormGroup(variable.name);
27227
+ if (varGroup) {
27228
+ if (varGroup.get('selectedDataSet')) {
27229
+ (_a = varGroup.get('selectedDataSet')) === null || _a === void 0 ? void 0 : _a.setValue(value, { emitEvent: false });
27230
+ }
27231
+ if (varGroup.get('value')) {
27232
+ (_b = varGroup.get('value')) === null || _b === void 0 ? void 0 : _b.setValue('', { emitEvent: false });
27233
+ }
27234
+ }
27235
+ // Clear caches for parameter select config since data set changed
27236
+ const paramKeysToDelete = [];
27237
+ this.parameterForDataSetSelectConfigCache.forEach((configValue, key) => {
27238
+ if (key.startsWith(`${variable.name}_paramForDataSet_`)) {
27239
+ paramKeysToDelete.push(key);
27240
+ }
27241
+ });
27242
+ paramKeysToDelete.forEach(key => this.parameterForDataSetSelectConfigCache.delete(key));
27243
+ // Mark for check
27244
+ this.cdr.markForCheck();
27245
+ }
27246
+ };
27247
+ this.dataSetSelectConfigCache.set(cacheKey, config);
27248
+ return config;
27249
+ }
27250
+ /**
27251
+ * Get select config for parameter dropdown (third dropdown for parameters - shows parameters from selected data set)
27252
+ */
27253
+ getParameterSelectConfig(variable, index) {
27254
+ var _a;
27255
+ // Get selected test data profile ID (preferred) or name (fallback) and data set
27256
+ const selectedProfileId = variable.selectedTestDataProfileId;
27257
+ const selectedProfile = variable.selectedTestDataProfile;
27258
+ const selectedDataSet = variable.selectedDataSet;
27259
+ if ((!selectedProfileId && !selectedProfile) || !selectedDataSet) {
27260
+ // Return empty config if profile or data set is not selected
27261
+ return {
27262
+ key: 'value',
27263
+ placeholder: (selectedProfileId || selectedProfile) ? 'Select Data Set first' : 'Select Test Data Profile first',
27264
+ multiple: false,
27265
+ searchable: false,
27266
+ options: []
27267
+ };
27268
+ }
27269
+ // Use profile ID if available, otherwise use profile name
27270
+ const profileIdentifier = selectedProfileId ? String(selectedProfileId) : (selectedProfile || '');
27271
+ const cacheKey = `${variable.name}_paramForDataSet_${profileIdentifier}_${selectedDataSet}`;
27272
+ if (this.parameterForDataSetSelectConfigCache.has(cacheKey)) {
27273
+ return this.parameterForDataSetSelectConfigCache.get(cacheKey);
27274
+ }
27275
+ // Get parameters for the selected data set using profile ID or name
27276
+ const parameters = this.getParametersForDataSet(profileIdentifier, selectedDataSet);
27277
+ const optionsArray = parameters.map(param => ({
27278
+ id: `@|${param.name}|`,
27279
+ value: `@|${param.name}|`,
27280
+ name: param.name,
27281
+ label: param.name
27282
+ }));
27283
+ // Ensure form control exists and is initialized with the current value
27284
+ const variableGroup = this.getVariableFormGroup(variable.name);
27285
+ if (variableGroup && variableGroup.get('value')) {
27286
+ // If we have a value, ensure form control matches the option id (formatted value)
27287
+ const currentValue = variable.value || '';
27288
+ // Check if value is already formatted (e.g., "@|email|")
27289
+ const formattedValue = currentValue.startsWith('@|') && currentValue.endsWith('|')
27290
+ ? currentValue
27291
+ : (currentValue ? `@|${currentValue}|` : '');
27292
+ // Set form control to formatted value (matches opt.id) so select displays correctly
27293
+ if (formattedValue && parameters.some(p => `@|${p.name}|` === formattedValue)) {
27294
+ (_a = variableGroup.get('value')) === null || _a === void 0 ? void 0 : _a.setValue(formattedValue, { emitEvent: false });
27295
+ }
27296
+ }
27297
+ const config = {
27298
+ key: 'value',
27299
+ placeholder: `Select ${variable.label}`,
27300
+ multiple: false,
27301
+ searchable: true,
27302
+ serverSearch: false,
27303
+ options: optionsArray,
27304
+ hasMore: false,
27305
+ isLoading: false,
27306
+ onChange: (value) => {
27307
+ var _a;
27308
+ // Value received is the formatted value (e.g., "@|email|") because mat-option uses opt.id
27309
+ // Extract parameter name from formatted value
27310
+ const formattedValue = value; // This is already formatted as @|paramName|
27311
+ const paramName = formattedValue.startsWith('@|') && formattedValue.endsWith('|')
27312
+ ? formattedValue.slice(2, -1)
27313
+ : formattedValue;
27314
+ // Update raw value (store parameter name without formatting)
27315
+ variable.rawValue = paramName;
27316
+ // Update variable value (store formatted value for template)
27317
+ variable.value = formattedValue;
27318
+ // Update form control in FormArray - use formatted value (matches opt.id) so select displays correctly
27319
+ const varGroup = this.getVariableFormGroup(variable.name);
27320
+ if (varGroup && varGroup.get('value')) {
27321
+ // Set to formatted value so the select can match and display the selected option
27322
+ (_a = varGroup.get('value')) === null || _a === void 0 ? void 0 : _a.setValue(formattedValue, { emitEvent: false });
27323
+ }
27324
+ // Mark for check and emit
27325
+ this.cdr.markForCheck();
27326
+ // Emit formatted value for parent component (this is what gets used in the template)
27327
+ this.variableValueChange.emit({ name: variable.name, value: formattedValue });
27328
+ }
27329
+ };
27330
+ this.parameterForDataSetSelectConfigCache.set(cacheKey, config);
27331
+ return config;
27332
+ }
27333
+ /**
27334
+ * Get unique environments from environment options
27335
+ */
27336
+ getUniqueEnvironments() {
27337
+ const envMap = new Map();
27338
+ this.environmentOptions.forEach(env => {
27339
+ if (!envMap.has(env.environment)) {
27340
+ envMap.set(env.environment, {
27341
+ id: env.environment,
27342
+ name: env.environment
27343
+ });
27344
+ }
27345
+ });
27346
+ return Array.from(envMap.values());
27347
+ }
27348
+ /**
27349
+ * Get parameters for a specific environment
27350
+ */
27351
+ getParametersForEnvironment(environmentName) {
27352
+ return this.environmentOptions
27353
+ .filter(env => env.environment === environmentName)
27354
+ .map(env => ({
27355
+ id: env.name,
27356
+ name: env.name
27357
+ }));
27358
+ }
27359
+ /**
27360
+ * Get select config for environment dropdown (first dropdown - select environment)
27361
+ */
27362
+ getEnvironmentSelectConfig(variable, index) {
27363
+ const cacheKey = `${variable.name}_environment`;
27364
+ if (this.environmentSelectConfigCache.has(cacheKey)) {
27365
+ return this.environmentSelectConfigCache.get(cacheKey);
27366
+ }
27367
+ // Get unique environments
27368
+ const uniqueEnvironments = this.getUniqueEnvironments();
27369
+ const optionsArray = uniqueEnvironments.map(env => ({
27370
+ id: env.id,
27371
+ value: env.name,
27372
+ name: env.name,
27373
+ label: env.name
27374
+ }));
27375
+ // Ensure form control exists for environment selection
27376
+ const variableGroup = this.getVariableFormGroup(variable.name);
27377
+ if (variableGroup && !variableGroup.get('selectedEnvironment')) {
27378
+ const currentEnv = variable.selectedEnvironment || '';
27379
+ variableGroup.addControl('selectedEnvironment', new FormControl(currentEnv));
27380
+ }
27381
+ const config = {
27382
+ key: 'selectedEnvironment',
27383
+ placeholder: `Select Environment`,
27384
+ multiple: false,
27385
+ searchable: true,
27386
+ serverSearch: true,
27387
+ options: optionsArray,
27388
+ hasMore: this.hasMoreEnvironments,
27389
+ isLoading: this.isLoadingEnvironments,
27390
+ onChange: (value) => {
27391
+ var _a, _b;
27392
+ // Store selected environment name on the variable object
27393
+ variable.selectedEnvironment = value;
27394
+ // Extract and store environment ID from environmentOptions
27395
+ // Find the first environment option with matching environment name to get the ID
27396
+ const envOption = this.environmentOptions.find(env => env.environment === value);
27397
+ if (envOption) {
27398
+ // Extract numeric ID from envOption.id (format: "env-74-test" -> 74)
27399
+ const idMatch = envOption.id.match(/env-(\d+)-/);
27400
+ if (idMatch && idMatch[1]) {
27401
+ variable.selectedEnvironmentId = parseInt(idMatch[1], 10);
27402
+ }
27403
+ }
27404
+ // Clear the parameter selection when environment changes
27405
+ variable.rawValue = undefined;
27406
+ variable.value = '';
27407
+ // Clear environment parameter config cache to force refresh
27408
+ this.environmentParameterSelectConfigCache.delete(`${variable.name}_envParam`);
27409
+ // Update form control
27410
+ const variableGroup = this.getVariableFormGroup(variable.name);
27411
+ if (variableGroup) {
27412
+ if (variableGroup.get('value')) {
27413
+ (_a = variableGroup.get('value')) === null || _a === void 0 ? void 0 : _a.setValue('', { emitEvent: false });
27414
+ }
27415
+ // Update selectedEnvironment control
27416
+ if (variableGroup.get('selectedEnvironment')) {
27417
+ (_b = variableGroup.get('selectedEnvironment')) === null || _b === void 0 ? void 0 : _b.setValue(value, { emitEvent: false });
27418
+ }
27419
+ }
27420
+ // Pre-compute environment parameter config for the new environment
27421
+ const index = this.templateVariables.findIndex(v => v.name === variable.name);
27422
+ if (index !== -1) {
27423
+ this.getEnvironmentParameterSelectConfig(variable, index);
27424
+ }
27425
+ // Mark for check to update UI
27426
+ this.cdr.markForCheck();
27427
+ },
27428
+ onLoadMore: () => {
27429
+ this.loadMoreEnvironments.emit();
27430
+ },
27431
+ onSearch: (query) => {
27432
+ this.searchEnvironments.emit(query);
27433
+ }
27434
+ };
27435
+ this.environmentSelectConfigCache.set(cacheKey, config);
27436
+ return config;
27437
+ }
27438
+ /**
27439
+ * Get select config for environment parameter dropdown (second dropdown - select parameter from environment)
27440
+ */
27441
+ getEnvironmentParameterSelectConfig(variable, index) {
27442
+ const cacheKey = `${variable.name}_envParam`;
27443
+ if (this.environmentParameterSelectConfigCache.has(cacheKey)) {
27444
+ return this.environmentParameterSelectConfigCache.get(cacheKey);
27445
+ }
27446
+ // Get selected environment
27447
+ const selectedEnvironment = variable.selectedEnvironment;
27448
+ if (!selectedEnvironment) {
27449
+ // Return empty config if no environment is selected
27450
+ return {
27451
+ key: 'value',
27452
+ placeholder: 'Select Environment first',
27453
+ multiple: false,
27454
+ searchable: false,
27455
+ options: []
27456
+ };
27457
+ }
27458
+ // Get parameters for the selected environment
27459
+ const parameters = this.getParametersForEnvironment(selectedEnvironment);
27460
+ const optionsArray = parameters.map(param => ({
27461
+ id: `*|${param.name}|`,
27462
+ value: `*|${param.name}|`,
27463
+ name: param.name,
27464
+ label: param.name
27465
+ }));
27466
+ const config = {
27467
+ key: 'value',
27468
+ placeholder: `Select Parameter`,
27469
+ multiple: false,
27470
+ searchable: false,
27471
+ options: optionsArray,
27472
+ onChange: (value) => {
27473
+ var _a;
27474
+ // When parameter is selected, update raw value and format it
27475
+ variable.rawValue = value;
27476
+ const formattedValue = `${value}`;
27477
+ // Update variable value (store formatted value)
27478
+ variable.value = formattedValue;
27479
+ // Environment ID is already stored on variable.selectedEnvironmentId
27480
+ // (it was set when environment was selected)
27481
+ // Update form control in FormArray - keep raw value so select displays correctly
27482
+ const variableGroup = this.getVariableFormGroup(variable.name);
27483
+ if (variableGroup && variableGroup.get('value')) {
27484
+ // Set to raw value so the select can match and display the selected option
27485
+ (_a = variableGroup.get('value')) === null || _a === void 0 ? void 0 : _a.setValue(value, { emitEvent: false });
27486
+ }
27487
+ // Mark for check and emit
27488
+ this.cdr.markForCheck();
27489
+ // Emit formatted value for parent component
27490
+ this.variableValueChange.emit({ name: variable.name, value: formattedValue });
27491
+ }
27492
+ };
27493
+ this.environmentParameterSelectConfigCache.set(cacheKey, config);
27494
+ return config;
27495
+ }
27496
+ /**
27497
+ * Get selected environment for a variable
27498
+ */
27499
+ getSelectedEnvironment(variable) {
27500
+ return variable.selectedEnvironment || '';
27501
+ }
27502
+ /**
27503
+ * Check if environment is selected for a variable
27504
+ */
27505
+ hasSelectedEnvironment(variable) {
27506
+ return !!variable.selectedEnvironment;
27507
+ }
27508
+ /**
27509
+ * Get selected environment ID for a variable
27510
+ */
27511
+ getSelectedEnvironmentId(variable) {
27512
+ return variable.selectedEnvironmentId || null;
27513
+ }
27514
+ /**
27515
+ * Get all environment IDs for variables that use environment type
27516
+ * Returns a map of variable name to environment ID
27517
+ */
27518
+ getEnvironmentIdsForVariables() {
27519
+ const envIds = new Map();
27520
+ this.templateVariables.forEach(variable => {
27521
+ if (this.isEnvironmentType(variable) && variable.selectedEnvironmentId) {
27522
+ envIds.set(variable.name, variable.selectedEnvironmentId);
27523
+ }
27524
+ });
27525
+ return envIds;
27526
+ }
27527
+ /**
27528
+ * Check if current data type is plain-text
27529
+ */
27530
+ isPlainTextType(variable) {
27531
+ const dataType = variable.dataType || 'plain-text';
27532
+ return dataType === 'plain-text';
27533
+ }
27534
+ /**
27535
+ * Check if current data type is parameter
27536
+ */
27537
+ isParameterType(variable) {
27538
+ const dataType = variable.dataType || 'plain-text';
27539
+ return dataType === 'parameter';
27540
+ }
27541
+ /**
27542
+ * Check if test data profile is selected for a variable
27543
+ */
27544
+ hasSelectedTestDataProfile(variable) {
27545
+ return !!variable.selectedTestDataProfile;
27546
+ }
27547
+ /**
27548
+ * Check if data set is selected for a variable
27549
+ */
27550
+ hasSelectedDataSet(variable) {
27551
+ return !!variable.selectedDataSet;
27552
+ }
27553
+ /**
27554
+ * Check if default test data profile and data set are set (from test case)
27555
+ * If true, profile and data set dropdowns should be disabled
27556
+ */
27557
+ hasDefaultTestDataSelection() {
27558
+ return !!(this.defaultTestDataProfileId != null && this.defaultTestDataStartIndex != null);
27559
+ }
27560
+ /**
27561
+ * Check if current data type is environment
27562
+ */
27563
+ isEnvironmentType(variable) {
27564
+ const dataType = variable.dataType || 'plain-text';
27565
+ return dataType === 'environment';
27566
+ }
27567
+ /**
27568
+ * Check if current data type is runtime
27569
+ */
27570
+ isRuntimeType(variable) {
27571
+ const dataType = variable.dataType || 'plain-text';
27572
+ return dataType === 'runtime';
27573
+ }
26590
27574
  }
26591
27575
  TemplateVariablesFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TemplateVariablesFormComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
26592
- 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" }, outputs: { variableValueChange: "variableValueChange", variableBooleanChange: "variableBooleanChange", metadataChange: "metadataChange", descriptionChange: "descriptionChange", loadMoreElements: "loadMoreElements", searchElements: "searchElements", createElement: "createElement", searchScreenName: "searchScreenName", loadMoreScreenNames: "loadMoreScreenNames", createScreenNameRequest: "createScreenNameRequest", cancelElementForm: "cancelElementForm", elementFormVisibilityChange: "elementFormVisibilityChange" }, 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\" *ngIf=\"!createElementVisible\">\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: calc(50% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700\">\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 <ng-container *ngIf=\"shouldShowDropdown(variable); else defaultInput\">\n <div class=\"cqa-flex cqa-flex-col\" style=\"width: calc(50% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\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-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: calc(50% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n {{ variable.label }} Type\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getDataTypeSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div class=\"cqa-flex cqa-flex-col\" style=\"width: calc(50% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n {{ variable.label }}\n </label>\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: calc(50% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\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\n <!-- Metadata -->\n <div class=\"cqa-flex cqa-flex-col\" style=\"width: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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</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>\n<div class=\"cqa-flex cqa-justify-end cqa-pt-2\" *ngIf=\"!createElementVisible\">\n <cqa-button \n *ngIf=\"selectorVariableAvailable\"\n variant=\"text\" \n size=\"sm\"\n text=\"Create Element\"\n (clicked)=\"onShowElementForm()\">\n </cqa-button>\n <!-- <cqa-button \n *ngIf=\"parameterVariableAvailable\"\n variant=\"filled\" \n text=\"Create Parameter\"\n (clicked)=\"onCreateParameter()\">\n </cqa-button>\n <cqa-button \n *ngIf=\"environmentVariableAvailable\"\n variant=\"filled\" \n text=\"Create Environment\"\n (clicked)=\"onCreateEnvironment()\">\n </cqa-button> -->\n</div>", components: [{ type: i5$1.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: 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: ElementFormComponent, selector: "cqa-element-form", inputs: ["elementId", "element", "screenNameOptions", "hasMoreScreenNames", "isLoadingScreenNames", "isElementLoading", "isEditMode", "isCreateMode", "isEditInDepthAvailable"], outputs: ["createElement", "updateElement", "createScreenNameRequest", "searchScreenName", "loadMoreScreenNames", "cancel", "editInDepth"] }, { type: ButtonComponent, selector: "cqa-button", inputs: ["variant", "btnSize", "disabled", "icon", "iconPosition", "fullWidth", "iconColor", "type", "text", "customClass", "inlineStyles", "tooltip", "tooltipPosition"], outputs: ["clicked"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
27576
+ 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", createElementVisible: "createElementVisible" }, outputs: { variableValueChange: "variableValueChange", variableBooleanChange: "variableBooleanChange", metadataChange: "metadataChange", descriptionChange: "descriptionChange", loadMoreElements: "loadMoreElements", searchElements: "searchElements", 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\n<div class=\"cqa-flex cqa-gap-x-6 cqa-gap-y-4 cqa-flex-wrap template-variables-form\" *ngIf=\"!createElementVisible\">\n \n <!-- Metadata -->\n <div class=\"cqa-flex cqa-flex-col\" style=\"width: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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 <ng-container *ngIf=\"shouldShowDropdown(variable); else defaultInput\">\n <div class=\"cqa-flex cqa-flex-col\" style=\"width: calc(50% - 12px);\">\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-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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: i5$1.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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
26593
27577
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TemplateVariablesFormComponent, decorators: [{
26594
27578
  type: Component,
26595
- args: [{ selector: 'cqa-template-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\" *ngIf=\"!createElementVisible\">\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: calc(50% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700\">\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 <ng-container *ngIf=\"shouldShowDropdown(variable); else defaultInput\">\n <div class=\"cqa-flex cqa-flex-col\" style=\"width: calc(50% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\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-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: calc(50% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n {{ variable.label }} Type\n </label>\n <cqa-dynamic-select [form]=\"getFormGroupAt(i)!\" [config]=\"getDataTypeSelectConfig(variable, i)\">\n </cqa-dynamic-select>\n </div>\n <div class=\"cqa-flex cqa-flex-col\" style=\"width: calc(50% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\n {{ variable.label }}\n </label>\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: calc(50% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1\">\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\n <!-- Metadata -->\n <div class=\"cqa-flex cqa-flex-col\" style=\"width: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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</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>\n<div class=\"cqa-flex cqa-justify-end cqa-pt-2\" *ngIf=\"!createElementVisible\">\n <cqa-button \n *ngIf=\"selectorVariableAvailable\"\n variant=\"text\" \n size=\"sm\"\n text=\"Create Element\"\n (clicked)=\"onShowElementForm()\">\n </cqa-button>\n <!-- <cqa-button \n *ngIf=\"parameterVariableAvailable\"\n variant=\"filled\" \n text=\"Create Parameter\"\n (clicked)=\"onCreateParameter()\">\n </cqa-button>\n <cqa-button \n *ngIf=\"environmentVariableAvailable\"\n variant=\"filled\" \n text=\"Create Environment\"\n (clicked)=\"onCreateEnvironment()\">\n </cqa-button> -->\n</div>", styles: [] }]
27579
+ 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\n<div class=\"cqa-flex cqa-gap-x-6 cqa-gap-y-4 cqa-flex-wrap template-variables-form\" *ngIf=\"!createElementVisible\">\n \n <!-- Metadata -->\n <div class=\"cqa-flex cqa-flex-col\" style=\"width: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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 <ng-container *ngIf=\"shouldShowDropdown(variable); else defaultInput\">\n <div class=\"cqa-flex cqa-flex-col\" style=\"width: calc(50% - 12px);\">\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-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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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: calc(50% - 12px);\">\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"] }]
26596
27580
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { templateVariables: [{
26597
27581
  type: Input
26598
27582
  }], variablesForm: [{
@@ -26613,6 +27597,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
26613
27597
  type: Input
26614
27598
  }], isLoadingScreenNames: [{
26615
27599
  type: Input
27600
+ }], parameterOptions: [{
27601
+ type: Input
27602
+ }], hasMoreParameters: [{
27603
+ type: Input
27604
+ }], isLoadingParameters: [{
27605
+ type: Input
27606
+ }], environmentOptions: [{
27607
+ type: Input
27608
+ }], hasMoreEnvironments: [{
27609
+ type: Input
27610
+ }], isLoadingEnvironments: [{
27611
+ type: Input
27612
+ }], defaultTestDataProfileId: [{
27613
+ type: Input
27614
+ }], defaultTestDataStartIndex: [{
27615
+ type: Input
26616
27616
  }], variableValueChange: [{
26617
27617
  type: Output
26618
27618
  }], variableBooleanChange: [{
@@ -26633,10 +27633,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
26633
27633
  type: Output
26634
27634
  }], createScreenNameRequest: [{
26635
27635
  type: Output
27636
+ }], searchParameters: [{
27637
+ type: Output
27638
+ }], loadMoreParameters: [{
27639
+ type: Output
27640
+ }], searchEnvironments: [{
27641
+ type: Output
27642
+ }], loadMoreEnvironments: [{
27643
+ type: Output
26636
27644
  }], cancelElementForm: [{
26637
27645
  type: Output
26638
27646
  }], elementFormVisibilityChange: [{
26639
27647
  type: Output
27648
+ }], createElementVisible: [{
27649
+ type: Input
26640
27650
  }] } });
26641
27651
 
26642
27652
  class StepBuilderActionComponent {
@@ -26659,6 +27669,18 @@ class StepBuilderActionComponent {
26659
27669
  this.hasMoreScreenNames = false;
26660
27670
  /** True while parent is loading screen names (search or load more) */
26661
27671
  this.isLoadingScreenNames = false;
27672
+ /** Parameter options for test data parameter dropdown (from API) */
27673
+ this.parameterOptions = []; // TestData[] - raw test data profiles
27674
+ /** Whether more parameters are available for infinite scroll */
27675
+ this.hasMoreParameters = false;
27676
+ /** True while parent is loading parameters (search or load more) */
27677
+ this.isLoadingParameters = false;
27678
+ /** Environment options for environment parameter dropdown (from API) */
27679
+ this.environmentOptions = [];
27680
+ /** Whether more environments are available for infinite scroll */
27681
+ this.hasMoreEnvironments = false;
27682
+ /** True while parent is loading environments (search or load more) */
27683
+ this.isLoadingEnvironments = false;
26662
27684
  this.templateChanged = new EventEmitter();
26663
27685
  this.loadMoreElements = new EventEmitter(); // Emit when load more is requested
26664
27686
  this.searchElements = new EventEmitter(); // Emit when user searches for elements
@@ -26666,10 +27688,16 @@ class StepBuilderActionComponent {
26666
27688
  this.searchScreenName = new EventEmitter(); // Emit when user searches screen names
26667
27689
  this.loadMoreScreenNames = new EventEmitter(); // Emit when user scrolls to load more screen names
26668
27690
  this.createScreenNameRequest = new EventEmitter(); // Emit when user requests to create a new screen name
27691
+ this.searchParameters = new EventEmitter(); // Emit when user searches for parameters
27692
+ this.loadMoreParameters = new EventEmitter(); // Emit when user scrolls to load more parameters
27693
+ this.searchEnvironments = new EventEmitter(); // Emit when user searches for environments
27694
+ this.loadMoreEnvironments = new EventEmitter(); // Emit when user scrolls to load more environments
26669
27695
  /** Emit when step is created */
26670
27696
  this.createStep = new EventEmitter();
26671
27697
  /** Emit when cancelled */
26672
27698
  this.cancelled = new EventEmitter();
27699
+ this.redirectToParameter = new EventEmitter();
27700
+ this.redirectToEnvironment = new EventEmitter();
26673
27701
  this.filteredTemplates = [];
26674
27702
  this.searchValue = '';
26675
27703
  this.selectedTemplate = null;
@@ -26678,8 +27706,7 @@ class StepBuilderActionComponent {
26678
27706
  this.advancedExpanded = false;
26679
27707
  this.templateVariables = [];
26680
27708
  this.updatedHtmlGrammar = ''; // Updated HTML grammar with variable values
26681
- // Track element form visibility
26682
- this.isElementFormVisible = false;
27709
+ this.createElementVisible = false;
26683
27710
  // Cache for select configs to avoid recalculating on every change detection
26684
27711
  this.selectConfigCache = new Map();
26685
27712
  this.formValidCache = false;
@@ -26691,7 +27718,10 @@ class StepBuilderActionComponent {
26691
27718
  * Handle element form visibility change
26692
27719
  */
26693
27720
  onElementFormVisibilityChange(visible) {
26694
- this.isElementFormVisible = visible;
27721
+ this.createElementVisible = visible;
27722
+ }
27723
+ onShowElementForm() {
27724
+ this.createElementVisible = true;
26695
27725
  }
26696
27726
  ngOnInit() {
26697
27727
  this.filteredTemplates = [...this.templates];
@@ -26814,7 +27844,7 @@ class StepBuilderActionComponent {
26814
27844
  });
26815
27845
  // Add dataType control for test-data variables if needed
26816
27846
  const label = ((_a = variable.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
26817
- if (label === 'test-data' || label === 'source-value' || label === 'target-value' ||
27847
+ if (label === 'test_data' || label === 'source-value' || label === 'target-value' ||
26818
27848
  label === 'source_value' || label === 'target_value') {
26819
27849
  // Parse the value to determine data type
26820
27850
  const valueStr = String(defaultValue || '');
@@ -26893,7 +27923,7 @@ class StepBuilderActionComponent {
26893
27923
  });
26894
27924
  // Add dataType control for test-data variables if needed
26895
27925
  const label = ((_a = variable.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
26896
- if (label === 'test-data' || label === 'source-value' || label === 'target-value' ||
27926
+ if (label === 'test_data' || label === 'source-value' || label === 'target-value' ||
26897
27927
  label === 'source_value' || label === 'target_value') {
26898
27928
  const valueStr = String(defaultValue || '');
26899
27929
  let dataType = 'plain-text';
@@ -27009,17 +28039,22 @@ class StepBuilderActionComponent {
27009
28039
  return variable.name || index;
27010
28040
  }
27011
28041
  onCreateStep() {
28042
+ var _a;
27012
28043
  if (!this.isFormValid()) {
27013
28044
  return;
27014
28045
  }
28046
+ // Get environment IDs from template variables (if any environment type variables are selected)
28047
+ const environmentIds = ((_a = this.templateVariablesForm) === null || _a === void 0 ? void 0 : _a.getEnvironmentIdsForVariables()) || new Map();
27015
28048
  const stepData = {
27016
28049
  template: this.selectedTemplate,
27017
28050
  metadata: this.metadata,
27018
28051
  description: this.description,
27019
- templateVariables: this.templateVariables
28052
+ templateVariables: this.templateVariables,
28053
+ environmentIds: environmentIds // Map of variable name to environment ID
27020
28054
  };
27021
28055
  console.log("stepData", stepData);
27022
28056
  console.log("variablesForm", this.variablesForm.value);
28057
+ console.log("environmentIds", environmentIds);
27023
28058
  this.createStep.emit(stepData);
27024
28059
  }
27025
28060
  toggleAdvanced() {
@@ -27098,12 +28133,46 @@ class StepBuilderActionComponent {
27098
28133
  this.updatedHtmlGrammar = updatedHtml;
27099
28134
  }
27100
28135
  }
28136
+ /**
28137
+ * Check if selector variable is available in templateVariables
28138
+ */
28139
+ get selectorVariableAvailable() {
28140
+ return this.templateVariables.some(v => v.dataKey === 'element' || v.dataKey === 'label');
28141
+ }
28142
+ /**
28143
+ * Check if parameter variable is available (testData with parameter type)
28144
+ */
28145
+ get parameterVariableAvailable() {
28146
+ return this.templateVariables.some(v => {
28147
+ var _a;
28148
+ const dataKey = ((_a = v.dataKey) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
28149
+ if (dataKey === 'test_data' || dataKey === 'source_value' || dataKey === 'target_value') {
28150
+ // const dataType = this.variableDataTypes.get(v.name) || 'plain-text';
28151
+ return true;
28152
+ }
28153
+ return false;
28154
+ });
28155
+ }
28156
+ /**
28157
+ * Check if environment variable is available (testData with environment type)
28158
+ */
28159
+ get environmentVariableAvailable() {
28160
+ return this.templateVariables.some(v => {
28161
+ var _a;
28162
+ const dataKey = ((_a = v.dataKey) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
28163
+ if (dataKey === 'test_data' || dataKey === 'source_value' || dataKey === 'target_value') {
28164
+ // const dataType = this.variableDataTypes.get(v.name) || 'plain-text';
28165
+ return true;
28166
+ }
28167
+ return false;
28168
+ });
28169
+ }
27101
28170
  }
27102
28171
  StepBuilderActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: StepBuilderActionComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
27103
- StepBuilderActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: StepBuilderActionComponent, selector: "cqa-step-builder-action", inputs: { showHeader: "showHeader", templates: "templates", searchPlaceholder: "searchPlaceholder", setTemplateVariables: "setTemplateVariables", preventSelectTemplate: "preventSelectTemplate", elementOptions: "elementOptions", hasMoreElements: "hasMoreElements", isLoadingElements: "isLoadingElements", screenNameOptions: "screenNameOptions", hasMoreScreenNames: "hasMoreScreenNames", isLoadingScreenNames: "isLoadingScreenNames" }, outputs: { templateChanged: "templateChanged", loadMoreElements: "loadMoreElements", searchElements: "searchElements", createElement: "createElement", searchScreenName: "searchScreenName", loadMoreScreenNames: "loadMoreScreenNames", createScreenNameRequest: "createScreenNameRequest", createStep: "createStep", cancelled: "cancelled" }, host: { styleAttribute: "display: block;height: 100%;width: 100%;", classAttribute: "cqa-ui-root" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white\" [ngClass]=\"{'cqa-px-4': showHeader, 'cqa-py-2': showHeader && !selectedTemplate}\">\n <!-- Header -->\n <h2 *ngIf=\"showHeader\" class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-1\">\n Create an action step\n </h2>\n <div *ngIf=\"!selectedTemplate\" class=\"cqa-flex cqa-flex-col cqa-h-full cqa-flex-1\"\n [ngClass]=\"{'cqa-px-3': showHeader}\">\n\n <!-- Search Bar -->\n <div class=\"cqa-pb-1\">\n <div class=\"cqa-pb-1\" *ngIf=\"showHeader\">\n <p class=\"cqa-text-[12px] cqa-text-gray-500\">\n Template library\n </p>\n </div>\n <cqa-search-bar [placeholder]=\"searchPlaceholder\" [fullWidth]=\"true\" [value]=\"searchValue\"\n (valueChange)=\"onSearchChange($event)\" (search)=\"onSearchSubmit($event)\" (cleared)=\"onSearchCleared()\">\n </cqa-search-bar>\n </div>\n\n <!-- Template List -->\n <div class=\"cqa-flex-1 cqa-overflow-y-auto cqa-px-2\">\n <div class=\"cqa-py-2\">\n <div *ngFor=\"let template of filteredTemplates; trackBy: trackByTemplate\"\n class=\"cqa-action-format cqa-bg-white cqa-cursor-pointer cqa-transition-all hover:cqa-border-blue-500 hover:cqa-shadow-sm mb-6\"\n (click)=\"selectTemplate(template)\">\n <div class=\"cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"template.htmlGrammar || template.naturalText || ''\">\n </div>\n </div>\n\n <div *ngIf=\"filteredTemplates.length === 0\" class=\"cqa-text-center cqa-py-8 cqa-text-gray-400 cqa-text-[12px]\">\n No templates found\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"selectedTemplate\" class=\"cqa-flex cqa-flex-col cqa-overflow-y-auto\" style=\"flex: 1 1 0 !important;\">\n <!-- Instruction Text with Element Buttons -->\n <div class=\"cqa-mb-4 cqa-flex cqa-items-center cqa-flex-wrap cqa-gap-1 cqa-text-sm cqa-text-gray-700\">\n <div class=\"cqa-action-format cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"updatedHtmlGrammar || selectedTemplate.htmlGrammar || selectedTemplate.naturalText || ''\">\n </div>\n </div>\n\n <!-- Form Fields in Two Columns -->\n <div class=\"cqa-flex cqa-overflow-y-auto cqa-flex-1 cqa-pb-2\">\n <div class=\"cqa-flex-1 cqa-flex cqa-flex-col cqa-gap-1\">\n <div class=\"cqa-flex cqa-gap-x-6 cqa-flex-wrap cqa-pb-4\">\n <!-- Template Variables Form Component -->\n <cqa-template-variables-form\n style=\"width: 100%;\"\n [templateVariables]=\"templateVariables\"\n [variablesForm]=\"variablesForm\"\n [metadata]=\"metadata\"\n [description]=\"description\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n (variableValueChange)=\"onVariableValueChange($event.name, $event.value)\"\n (variableBooleanChange)=\"onVariableBooleanChange($event.name, $event.value)\"\n (metadataChange)=\"metadata = $event\"\n (descriptionChange)=\"description = $event\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\"\n (elementFormVisibilityChange)=\"onElementFormVisibilityChange($event)\">\n </cqa-template-variables-form>\n </div>\n\n <!-- Advanced (Expandable) -->\n <!-- <div class=\"cqa-flex cqa-flex-col cqa-w-full\">\n <button type=\"button\"\n class=\"cqa-flex cqa-w-full cqa-items-center cqa-justify-between cqa-gap-2 cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-bg-transparent cqa-border-none cqa-cursor-pointer cqa-p-0 cqa-mb-1.5\"\n (click)=\"toggleAdvanced()\">\n <span class=\"cqa-text-[10px]\">Advanced</span>\n <mat-icon class=\"cqa-text-base\" [class.cqa-rotate-180]=\"advancedExpanded\">\n expand_more\n </mat-icon>\n </button>\n <div *ngIf=\"advancedExpanded\" class=\"cqa-mt-2\">\n </div>\n </div> -->\n <div>\n \n </div>\n </div>\n\n\n </div>\n\n <!-- Action Buttons -->\n <div *ngIf=\"!isElementFormVisible\" class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-border-t cqa-border-gray-200 cqa-pb-2\">\n <cqa-button class=\"cqa-w-1/2\" variant=\"outlined\" text=\"Cancel\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button class=\"cqa-w-1/2\" variant=\"filled\" text=\"Create Step\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!isFormValid()\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n </div>\n</div>", components: [{ type: SearchBarComponent, selector: "cqa-search-bar", inputs: ["placeholder", "value", "disabled", "showClear", "ariaLabel", "autoFocus", "size", "fullWidth"], outputs: ["valueChange", "search", "cleared"] }, { type: TemplateVariablesFormComponent, selector: "cqa-template-variables-form", inputs: ["templateVariables", "variablesForm", "metadata", "description", "elementOptions", "hasMoreElements", "isLoadingElements", "screenNameOptions", "hasMoreScreenNames", "isLoadingScreenNames"], outputs: ["variableValueChange", "variableBooleanChange", "metadataChange", "descriptionChange", "loadMoreElements", "searchElements", "createElement", "searchScreenName", "loadMoreScreenNames", "createScreenNameRequest", "cancelElementForm", "elementFormVisibilityChange"] }, { type: ButtonComponent, selector: "cqa-button", inputs: ["variant", "btnSize", "disabled", "icon", "iconPosition", "fullWidth", "iconColor", "type", "text", "customClass", "inlineStyles", "tooltip", "tooltipPosition"], outputs: ["clicked"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
28172
+ StepBuilderActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: StepBuilderActionComponent, selector: "cqa-step-builder-action", inputs: { showHeader: "showHeader", templates: "templates", searchPlaceholder: "searchPlaceholder", setTemplateVariables: "setTemplateVariables", preventSelectTemplate: "preventSelectTemplate", 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" }, outputs: { templateChanged: "templateChanged", loadMoreElements: "loadMoreElements", searchElements: "searchElements", createElement: "createElement", searchScreenName: "searchScreenName", loadMoreScreenNames: "loadMoreScreenNames", createScreenNameRequest: "createScreenNameRequest", searchParameters: "searchParameters", loadMoreParameters: "loadMoreParameters", searchEnvironments: "searchEnvironments", loadMoreEnvironments: "loadMoreEnvironments", createStep: "createStep", cancelled: "cancelled", redirectToParameter: "redirectToParameter", redirectToEnvironment: "redirectToEnvironment" }, host: { styleAttribute: "display: block;height: 100%;width: 100%;", classAttribute: "cqa-ui-root" }, viewQueries: [{ propertyName: "templateVariablesForm", first: true, predicate: TemplateVariablesFormComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white\" [ngClass]=\"{'cqa-px-4': showHeader, 'cqa-py-2': showHeader && !selectedTemplate}\">\n <!-- Header -->\n \n <h2 *ngIf=\"showHeader\" class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-1\">\n Create an action step\n </h2>\n <div *ngIf=\"!selectedTemplate\" class=\"cqa-flex cqa-flex-col cqa-h-full cqa-flex-1\"\n [ngClass]=\"{'cqa-px-3': showHeader}\">\n\n <!-- Search Bar -->\n <div class=\"cqa-pb-1\">\n <div class=\"cqa-pb-1\" *ngIf=\"showHeader\">\n <p class=\"cqa-text-[12px] cqa-text-gray-500\">\n Template library\n </p>\n </div>\n <cqa-search-bar [placeholder]=\"searchPlaceholder\" [fullWidth]=\"true\" [value]=\"searchValue\"\n (valueChange)=\"onSearchChange($event)\" (search)=\"onSearchSubmit($event)\" (cleared)=\"onSearchCleared()\">\n </cqa-search-bar>\n </div>\n\n <!-- Template List -->\n <div class=\"cqa-flex-1 cqa-overflow-y-auto cqa-px-2\">\n <div class=\"cqa-py-2\">\n <div *ngFor=\"let template of filteredTemplates; trackBy: trackByTemplate\"\n class=\"cqa-action-format cqa-bg-white cqa-cursor-pointer cqa-transition-all hover:cqa-border-blue-500 hover:cqa-shadow-sm mb-6\"\n (click)=\"selectTemplate(template)\">\n <div class=\"cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"template.htmlGrammar || template.naturalText || ''\">\n </div>\n </div>\n\n <div *ngIf=\"filteredTemplates.length === 0\" class=\"cqa-text-center cqa-py-8 cqa-text-gray-400 cqa-text-[12px]\">\n No templates found\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"selectedTemplate\" class=\"cqa-flex cqa-flex-col cqa-overflow-y-auto\" style=\"flex: 1 1 0 !important;\">\n <!-- Instruction Text with Element Buttons -->\n <div class=\"cqa-mb-4 cqa-flex cqa-items-center cqa-flex-wrap cqa-gap-1 cqa-text-sm cqa-text-gray-700\">\n <div class=\"cqa-action-format cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"updatedHtmlGrammar || selectedTemplate.htmlGrammar || selectedTemplate.naturalText || ''\">\n </div>\n \n <div class=\"cqa-flex cqa-justify-end cqa-pt-2\" *ngIf=\"!createElementVisible\">\n <cqa-button \n *ngIf=\"selectorVariableAvailable\"\n variant=\"text\" \n size=\"sm\"\n text=\"Create Element\"\n (clicked)=\"onShowElementForm()\">\n </cqa-button>\n <cqa-button \n *ngIf=\"parameterVariableAvailable\"\n variant=\"text\" \n size=\"sm\"\n text=\"Create Parameter\"\n (clicked)=\"redirectToParameter.emit()\">\n </cqa-button>\n <cqa-button \n *ngIf=\"environmentVariableAvailable\"\n variant=\"text\" \n size=\"sm\"\n text=\"Create Environment\"\n (clicked)=\"redirectToEnvironment.emit()\">\n </cqa-button>\n </div>\n </div>\n\n <!-- Form Fields in Two Columns -->\n <div class=\"cqa-flex cqa-overflow-y-auto cqa-flex-1 cqa-pb-2\">\n <div class=\"cqa-flex-1 cqa-flex cqa-flex-col cqa-gap-1\">\n <div class=\"cqa-flex cqa-gap-x-6 cqa-flex-wrap cqa-pb-4\">\n <!-- Template Variables Form Component -->\n <cqa-template-variables-form\n #templateVariablesForm\n style=\"width: 100%;\"\n [templateVariables]=\"templateVariables\"\n [variablesForm]=\"variablesForm\"\n [metadata]=\"metadata\"\n [description]=\"description\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n [parameterOptions]=\"parameterOptions\"\n [hasMoreParameters]=\"hasMoreParameters\"\n [isLoadingParameters]=\"isLoadingParameters\"\n [environmentOptions]=\"environmentOptions\"\n [hasMoreEnvironments]=\"hasMoreEnvironments\"\n [isLoadingEnvironments]=\"isLoadingEnvironments\"\n [defaultTestDataProfileId]=\"defaultTestDataProfileId\"\n [defaultTestDataStartIndex]=\"defaultTestDataStartIndex\"\n [createElementVisible]=\"createElementVisible\"\n (variableValueChange)=\"onVariableValueChange($event.name, $event.value)\"\n (variableBooleanChange)=\"onVariableBooleanChange($event.name, $event.value)\"\n (metadataChange)=\"metadata = $event\"\n (descriptionChange)=\"description = $event\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\"\n (searchParameters)=\"searchParameters.emit($event)\"\n (loadMoreParameters)=\"loadMoreParameters.emit()\"\n (searchEnvironments)=\"searchEnvironments.emit($event)\"\n (loadMoreEnvironments)=\"loadMoreEnvironments.emit()\"\n (elementFormVisibilityChange)=\"onElementFormVisibilityChange($event)\">\n </cqa-template-variables-form>\n </div>\n\n <!-- Advanced (Expandable) -->\n <!-- <div class=\"cqa-flex cqa-flex-col cqa-w-full\">\n <button type=\"button\"\n class=\"cqa-flex cqa-w-full cqa-items-center cqa-justify-between cqa-gap-2 cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-bg-transparent cqa-border-none cqa-cursor-pointer cqa-p-0 cqa-mb-1.5\"\n (click)=\"toggleAdvanced()\">\n <span class=\"cqa-text-[10px]\">Advanced</span>\n <mat-icon class=\"cqa-text-base\" [class.cqa-rotate-180]=\"advancedExpanded\">\n expand_more\n </mat-icon>\n </button>\n <div *ngIf=\"advancedExpanded\" class=\"cqa-mt-2\">\n </div>\n </div> -->\n <div>\n \n </div>\n </div>\n\n\n </div>\n\n <!-- Action Buttons -->\n <div *ngIf=\"!createElementVisible\" class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-border-t cqa-border-gray-200 cqa-pb-2\">\n <cqa-button class=\"cqa-w-1/2\" variant=\"outlined\" text=\"Cancel\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button class=\"cqa-w-1/2\" variant=\"filled\" text=\"Create Step\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!isFormValid()\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n </div>\n</div>", components: [{ type: SearchBarComponent, selector: "cqa-search-bar", inputs: ["placeholder", "value", "disabled", "showClear", "ariaLabel", "autoFocus", "size", "fullWidth"], outputs: ["valueChange", "search", "cleared"] }, { type: ButtonComponent, selector: "cqa-button", inputs: ["variant", "btnSize", "disabled", "icon", "iconPosition", "fullWidth", "iconColor", "type", "text", "customClass", "inlineStyles", "tooltip", "tooltipPosition"], outputs: ["clicked"] }, { type: TemplateVariablesFormComponent, selector: "cqa-template-variables-form", inputs: ["templateVariables", "variablesForm", "metadata", "description", "elementOptions", "hasMoreElements", "isLoadingElements", "screenNameOptions", "hasMoreScreenNames", "isLoadingScreenNames", "parameterOptions", "hasMoreParameters", "isLoadingParameters", "environmentOptions", "hasMoreEnvironments", "isLoadingEnvironments", "defaultTestDataProfileId", "defaultTestDataStartIndex", "createElementVisible"], outputs: ["variableValueChange", "variableBooleanChange", "metadataChange", "descriptionChange", "loadMoreElements", "searchElements", "createElement", "searchScreenName", "loadMoreScreenNames", "createScreenNameRequest", "searchParameters", "loadMoreParameters", "searchEnvironments", "loadMoreEnvironments", "cancelElementForm", "elementFormVisibilityChange"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
27104
28173
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: StepBuilderActionComponent, decorators: [{
27105
28174
  type: Component,
27106
- args: [{ selector: 'cqa-step-builder-action', host: { class: 'cqa-ui-root', style: 'display: block;height: 100%;width: 100%;' }, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white\" [ngClass]=\"{'cqa-px-4': showHeader, 'cqa-py-2': showHeader && !selectedTemplate}\">\n <!-- Header -->\n <h2 *ngIf=\"showHeader\" class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-1\">\n Create an action step\n </h2>\n <div *ngIf=\"!selectedTemplate\" class=\"cqa-flex cqa-flex-col cqa-h-full cqa-flex-1\"\n [ngClass]=\"{'cqa-px-3': showHeader}\">\n\n <!-- Search Bar -->\n <div class=\"cqa-pb-1\">\n <div class=\"cqa-pb-1\" *ngIf=\"showHeader\">\n <p class=\"cqa-text-[12px] cqa-text-gray-500\">\n Template library\n </p>\n </div>\n <cqa-search-bar [placeholder]=\"searchPlaceholder\" [fullWidth]=\"true\" [value]=\"searchValue\"\n (valueChange)=\"onSearchChange($event)\" (search)=\"onSearchSubmit($event)\" (cleared)=\"onSearchCleared()\">\n </cqa-search-bar>\n </div>\n\n <!-- Template List -->\n <div class=\"cqa-flex-1 cqa-overflow-y-auto cqa-px-2\">\n <div class=\"cqa-py-2\">\n <div *ngFor=\"let template of filteredTemplates; trackBy: trackByTemplate\"\n class=\"cqa-action-format cqa-bg-white cqa-cursor-pointer cqa-transition-all hover:cqa-border-blue-500 hover:cqa-shadow-sm mb-6\"\n (click)=\"selectTemplate(template)\">\n <div class=\"cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"template.htmlGrammar || template.naturalText || ''\">\n </div>\n </div>\n\n <div *ngIf=\"filteredTemplates.length === 0\" class=\"cqa-text-center cqa-py-8 cqa-text-gray-400 cqa-text-[12px]\">\n No templates found\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"selectedTemplate\" class=\"cqa-flex cqa-flex-col cqa-overflow-y-auto\" style=\"flex: 1 1 0 !important;\">\n <!-- Instruction Text with Element Buttons -->\n <div class=\"cqa-mb-4 cqa-flex cqa-items-center cqa-flex-wrap cqa-gap-1 cqa-text-sm cqa-text-gray-700\">\n <div class=\"cqa-action-format cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"updatedHtmlGrammar || selectedTemplate.htmlGrammar || selectedTemplate.naturalText || ''\">\n </div>\n </div>\n\n <!-- Form Fields in Two Columns -->\n <div class=\"cqa-flex cqa-overflow-y-auto cqa-flex-1 cqa-pb-2\">\n <div class=\"cqa-flex-1 cqa-flex cqa-flex-col cqa-gap-1\">\n <div class=\"cqa-flex cqa-gap-x-6 cqa-flex-wrap cqa-pb-4\">\n <!-- Template Variables Form Component -->\n <cqa-template-variables-form\n style=\"width: 100%;\"\n [templateVariables]=\"templateVariables\"\n [variablesForm]=\"variablesForm\"\n [metadata]=\"metadata\"\n [description]=\"description\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n (variableValueChange)=\"onVariableValueChange($event.name, $event.value)\"\n (variableBooleanChange)=\"onVariableBooleanChange($event.name, $event.value)\"\n (metadataChange)=\"metadata = $event\"\n (descriptionChange)=\"description = $event\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\"\n (elementFormVisibilityChange)=\"onElementFormVisibilityChange($event)\">\n </cqa-template-variables-form>\n </div>\n\n <!-- Advanced (Expandable) -->\n <!-- <div class=\"cqa-flex cqa-flex-col cqa-w-full\">\n <button type=\"button\"\n class=\"cqa-flex cqa-w-full cqa-items-center cqa-justify-between cqa-gap-2 cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-bg-transparent cqa-border-none cqa-cursor-pointer cqa-p-0 cqa-mb-1.5\"\n (click)=\"toggleAdvanced()\">\n <span class=\"cqa-text-[10px]\">Advanced</span>\n <mat-icon class=\"cqa-text-base\" [class.cqa-rotate-180]=\"advancedExpanded\">\n expand_more\n </mat-icon>\n </button>\n <div *ngIf=\"advancedExpanded\" class=\"cqa-mt-2\">\n </div>\n </div> -->\n <div>\n \n </div>\n </div>\n\n\n </div>\n\n <!-- Action Buttons -->\n <div *ngIf=\"!isElementFormVisible\" class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-border-t cqa-border-gray-200 cqa-pb-2\">\n <cqa-button class=\"cqa-w-1/2\" variant=\"outlined\" text=\"Cancel\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button class=\"cqa-w-1/2\" variant=\"filled\" text=\"Create Step\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!isFormValid()\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n </div>\n</div>", styles: [] }]
28175
+ args: [{ selector: 'cqa-step-builder-action', host: { class: 'cqa-ui-root', style: 'display: block;height: 100%;width: 100%;' }, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white\" [ngClass]=\"{'cqa-px-4': showHeader, 'cqa-py-2': showHeader && !selectedTemplate}\">\n <!-- Header -->\n \n <h2 *ngIf=\"showHeader\" class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-1\">\n Create an action step\n </h2>\n <div *ngIf=\"!selectedTemplate\" class=\"cqa-flex cqa-flex-col cqa-h-full cqa-flex-1\"\n [ngClass]=\"{'cqa-px-3': showHeader}\">\n\n <!-- Search Bar -->\n <div class=\"cqa-pb-1\">\n <div class=\"cqa-pb-1\" *ngIf=\"showHeader\">\n <p class=\"cqa-text-[12px] cqa-text-gray-500\">\n Template library\n </p>\n </div>\n <cqa-search-bar [placeholder]=\"searchPlaceholder\" [fullWidth]=\"true\" [value]=\"searchValue\"\n (valueChange)=\"onSearchChange($event)\" (search)=\"onSearchSubmit($event)\" (cleared)=\"onSearchCleared()\">\n </cqa-search-bar>\n </div>\n\n <!-- Template List -->\n <div class=\"cqa-flex-1 cqa-overflow-y-auto cqa-px-2\">\n <div class=\"cqa-py-2\">\n <div *ngFor=\"let template of filteredTemplates; trackBy: trackByTemplate\"\n class=\"cqa-action-format cqa-bg-white cqa-cursor-pointer cqa-transition-all hover:cqa-border-blue-500 hover:cqa-shadow-sm mb-6\"\n (click)=\"selectTemplate(template)\">\n <div class=\"cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"template.htmlGrammar || template.naturalText || ''\">\n </div>\n </div>\n\n <div *ngIf=\"filteredTemplates.length === 0\" class=\"cqa-text-center cqa-py-8 cqa-text-gray-400 cqa-text-[12px]\">\n No templates found\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"selectedTemplate\" class=\"cqa-flex cqa-flex-col cqa-overflow-y-auto\" style=\"flex: 1 1 0 !important;\">\n <!-- Instruction Text with Element Buttons -->\n <div class=\"cqa-mb-4 cqa-flex cqa-items-center cqa-flex-wrap cqa-gap-1 cqa-text-sm cqa-text-gray-700\">\n <div class=\"cqa-action-format cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"updatedHtmlGrammar || selectedTemplate.htmlGrammar || selectedTemplate.naturalText || ''\">\n </div>\n \n <div class=\"cqa-flex cqa-justify-end cqa-pt-2\" *ngIf=\"!createElementVisible\">\n <cqa-button \n *ngIf=\"selectorVariableAvailable\"\n variant=\"text\" \n size=\"sm\"\n text=\"Create Element\"\n (clicked)=\"onShowElementForm()\">\n </cqa-button>\n <cqa-button \n *ngIf=\"parameterVariableAvailable\"\n variant=\"text\" \n size=\"sm\"\n text=\"Create Parameter\"\n (clicked)=\"redirectToParameter.emit()\">\n </cqa-button>\n <cqa-button \n *ngIf=\"environmentVariableAvailable\"\n variant=\"text\" \n size=\"sm\"\n text=\"Create Environment\"\n (clicked)=\"redirectToEnvironment.emit()\">\n </cqa-button>\n </div>\n </div>\n\n <!-- Form Fields in Two Columns -->\n <div class=\"cqa-flex cqa-overflow-y-auto cqa-flex-1 cqa-pb-2\">\n <div class=\"cqa-flex-1 cqa-flex cqa-flex-col cqa-gap-1\">\n <div class=\"cqa-flex cqa-gap-x-6 cqa-flex-wrap cqa-pb-4\">\n <!-- Template Variables Form Component -->\n <cqa-template-variables-form\n #templateVariablesForm\n style=\"width: 100%;\"\n [templateVariables]=\"templateVariables\"\n [variablesForm]=\"variablesForm\"\n [metadata]=\"metadata\"\n [description]=\"description\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n [parameterOptions]=\"parameterOptions\"\n [hasMoreParameters]=\"hasMoreParameters\"\n [isLoadingParameters]=\"isLoadingParameters\"\n [environmentOptions]=\"environmentOptions\"\n [hasMoreEnvironments]=\"hasMoreEnvironments\"\n [isLoadingEnvironments]=\"isLoadingEnvironments\"\n [defaultTestDataProfileId]=\"defaultTestDataProfileId\"\n [defaultTestDataStartIndex]=\"defaultTestDataStartIndex\"\n [createElementVisible]=\"createElementVisible\"\n (variableValueChange)=\"onVariableValueChange($event.name, $event.value)\"\n (variableBooleanChange)=\"onVariableBooleanChange($event.name, $event.value)\"\n (metadataChange)=\"metadata = $event\"\n (descriptionChange)=\"description = $event\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\"\n (searchParameters)=\"searchParameters.emit($event)\"\n (loadMoreParameters)=\"loadMoreParameters.emit()\"\n (searchEnvironments)=\"searchEnvironments.emit($event)\"\n (loadMoreEnvironments)=\"loadMoreEnvironments.emit()\"\n (elementFormVisibilityChange)=\"onElementFormVisibilityChange($event)\">\n </cqa-template-variables-form>\n </div>\n\n <!-- Advanced (Expandable) -->\n <!-- <div class=\"cqa-flex cqa-flex-col cqa-w-full\">\n <button type=\"button\"\n class=\"cqa-flex cqa-w-full cqa-items-center cqa-justify-between cqa-gap-2 cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-bg-transparent cqa-border-none cqa-cursor-pointer cqa-p-0 cqa-mb-1.5\"\n (click)=\"toggleAdvanced()\">\n <span class=\"cqa-text-[10px]\">Advanced</span>\n <mat-icon class=\"cqa-text-base\" [class.cqa-rotate-180]=\"advancedExpanded\">\n expand_more\n </mat-icon>\n </button>\n <div *ngIf=\"advancedExpanded\" class=\"cqa-mt-2\">\n </div>\n </div> -->\n <div>\n \n </div>\n </div>\n\n\n </div>\n\n <!-- Action Buttons -->\n <div *ngIf=\"!createElementVisible\" class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-border-t cqa-border-gray-200 cqa-pb-2\">\n <cqa-button class=\"cqa-w-1/2\" variant=\"outlined\" text=\"Cancel\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button class=\"cqa-w-1/2\" variant=\"filled\" text=\"Create Step\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!isFormValid()\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n </div>\n</div>", styles: [] }]
27107
28176
  }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }]; }, propDecorators: { showHeader: [{
27108
28177
  type: Input
27109
28178
  }], templates: [{
@@ -27126,6 +28195,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
27126
28195
  type: Input
27127
28196
  }], isLoadingScreenNames: [{
27128
28197
  type: Input
28198
+ }], parameterOptions: [{
28199
+ type: Input
28200
+ }], hasMoreParameters: [{
28201
+ type: Input
28202
+ }], isLoadingParameters: [{
28203
+ type: Input
28204
+ }], environmentOptions: [{
28205
+ type: Input
28206
+ }], hasMoreEnvironments: [{
28207
+ type: Input
28208
+ }], isLoadingEnvironments: [{
28209
+ type: Input
28210
+ }], defaultTestDataProfileId: [{
28211
+ type: Input
28212
+ }], defaultTestDataStartIndex: [{
28213
+ type: Input
27129
28214
  }], templateChanged: [{
27130
28215
  type: Output
27131
28216
  }], loadMoreElements: [{
@@ -27140,10 +28225,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
27140
28225
  type: Output
27141
28226
  }], createScreenNameRequest: [{
27142
28227
  type: Output
28228
+ }], searchParameters: [{
28229
+ type: Output
28230
+ }], loadMoreParameters: [{
28231
+ type: Output
28232
+ }], searchEnvironments: [{
28233
+ type: Output
28234
+ }], loadMoreEnvironments: [{
28235
+ type: Output
27143
28236
  }], createStep: [{
27144
28237
  type: Output
27145
28238
  }], cancelled: [{
27146
28239
  type: Output
28240
+ }], redirectToParameter: [{
28241
+ type: Output
28242
+ }], redirectToEnvironment: [{
28243
+ type: Output
28244
+ }], templateVariablesForm: [{
28245
+ type: ViewChild,
28246
+ args: [TemplateVariablesFormComponent, { static: false }]
27147
28247
  }] } });
27148
28248
 
27149
28249
  class StepBuilderLoopComponent {
@@ -27184,6 +28284,14 @@ class StepBuilderLoopComponent {
27184
28284
  this.screenNameOptions = [];
27185
28285
  this.hasMoreScreenNames = false;
27186
28286
  this.isLoadingScreenNames = false;
28287
+ // Parameter fetching properties
28288
+ this.parameterOptions = []; // TestData[] - raw test data profiles
28289
+ this.hasMoreParameters = false;
28290
+ this.isLoadingParameters = false;
28291
+ // Environment fetching properties
28292
+ this.environmentOptions = [];
28293
+ this.hasMoreEnvironments = false;
28294
+ this.isLoadingEnvironments = false;
27187
28295
  this.loadMoreElements = new EventEmitter();
27188
28296
  this.searchElements = new EventEmitter();
27189
28297
  this.createElement = new EventEmitter();
@@ -27191,6 +28299,12 @@ class StepBuilderLoopComponent {
27191
28299
  this.loadMoreScreenNames = new EventEmitter();
27192
28300
  this.createScreenNameRequest = new EventEmitter();
27193
28301
  this.cancelElementForm = new EventEmitter();
28302
+ this.searchParameters = new EventEmitter();
28303
+ this.loadMoreParameters = new EventEmitter();
28304
+ this.searchEnvironments = new EventEmitter();
28305
+ this.loadMoreEnvironments = new EventEmitter();
28306
+ this.redirectToParameter = new EventEmitter();
28307
+ this.redirectToEnvironment = new EventEmitter();
27194
28308
  this.selectedWhileTemplate = null;
27195
28309
  this.selectedLoopType = 'for';
27196
28310
  // Internal state for managing loop indices
@@ -27517,10 +28631,10 @@ class StepBuilderLoopComponent {
27517
28631
  }
27518
28632
  }
27519
28633
  StepBuilderLoopComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: StepBuilderLoopComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
27520
- StepBuilderLoopComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: StepBuilderLoopComponent, selector: "cqa-step-builder-loop", inputs: { loopType: "loopType", selectOptions: "selectOptions", dataProfileOptions: "dataProfileOptions", hasMoreDataProfiles: "hasMoreDataProfiles", isLoadingDataProfiles: "isLoadingDataProfiles", setWhileTemplateVariables: "setWhileTemplateVariables", whileTemplates: "whileTemplates", whileSearchPlaceholder: "whileSearchPlaceholder", whileSearchValue: "whileSearchValue", elementOptions: "elementOptions", hasMoreElements: "hasMoreElements", isLoadingElements: "isLoadingElements", screenNameOptions: "screenNameOptions", hasMoreScreenNames: "hasMoreScreenNames", isLoadingScreenNames: "isLoadingScreenNames" }, outputs: { createStep: "createStep", cancelled: "cancelled", loopTypeChange: "loopTypeChange", loadMoreDataProfiles: "loadMoreDataProfiles", searchDataProfiles: "searchDataProfiles", loadMoreElements: "loadMoreElements", searchElements: "searchElements", createElement: "createElement", searchScreenName: "searchScreenName", loadMoreScreenNames: "loadMoreScreenNames", createScreenNameRequest: "createScreenNameRequest", cancelElementForm: "cancelElementForm" }, host: { classAttribute: "cqa-ui-root" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white cqa-px-4 cqa-py-2\">\n <!-- Header -->\n <h2 class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-4\">\n Create Loop Test Step\n </h2>\n\n <!-- Loop Type Selection -->\n <div class=\"cqa-mb-4 cqa-w-full\">\n <div class=\"cqa-w-full cqa-inline-flex cqa-items-center cqa-bg-gray-100 cqa-rounded-lg cqa-p-1 cqa-gap-0\" style=\"height: 30px; background-color: #F3F4F6;\">\n <!-- For Button -->\n <button\n type=\"button\"\n class=\"cqa-w-1/2 cqa-text-[12px] cqa-rounded-md cqa-font-medium cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-min-w-[80px] cqa-text-center cqa-cursor-pointer\"\n [style.background-color]=\"selectedLoopType === 'for' ? '#3F43EE' : 'transparent'\"\n [style.color]=\"selectedLoopType === 'for' ? '#FFFFFF' : '#6B7280'\"\n [style.border-radius]=\"'8px'\"\n [style.height]=\"'22px'\"\n (click)=\"onLoopTypeChange('for')\">\n For\n </button>\n <!-- While Button -->\n <button\n type=\"button\"\n class=\"cqa-w-1/2 cqa-text-[12px] cqa-rounded-md cqa-font-medium cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-min-w-[80px] cqa-text-center cqa-cursor-pointer\"\n [style.background-color]=\"selectedLoopType === 'while' ? '#3F43EE' : 'transparent'\"\n [style.color]=\"selectedLoopType === 'while' ? '#FFFFFF' : '#6B7280'\"\n [style.border-radius]=\"'8px'\"\n [style.height]=\"'22px'\"\n (click)=\"onLoopTypeChange('while')\">\n While\n </button>\n </div>\n </div>\n\n <!-- Form Fields -->\n <ng-container *ngIf=\"selectedLoopType === 'for'\">\n <div class=\"cqa-flex cqa-flex-col cqa-gap-4 cqa-flex-1 cqa-overflow-y-auto\">\n <!-- Dropdown Fields Row -->\n <div class=\"cqa-flex cqa-gap-4 cqa-flex-wrap\">\n <!-- Select Option -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Select Option\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"selectOptionConfig\">\n </cqa-dynamic-select>\n </div>\n\n <ng-container *ngIf=\"loopForm.get('selectOption')?.value === 'dataProfile'\">\n <!-- Data Profile -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Data Profile\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"dataProfileConfig\"\n (searchChange)=\"onSearchDataProfiles($event.query)\"\n (loadMore)=\"onLoadMoreDataProfiles($event)\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Loop Start -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Loop Start\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"loopStartConfig\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Loop End -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Loop End\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"loopEndConfig\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n <ng-container *ngIf=\"loopForm.get('selectOption')?.value === 'runTime'\">\n <!-- Run Time Input Field -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Run Time\n </label>\n <cqa-custom-input\n [placeholder]=\"'Enter Run Time'\"\n [value]=\"loopForm.get('runTime')?.value\"\n [fullWidth]=\"true\"\n (valueChange)=\"loopForm.get('runTime')?.setValue($event)\">\n </cqa-custom-input>\n </div>\n </ng-container>\n </div>\n </div>\n</ng-container>\n <ng-container *ngIf=\"selectedLoopType === 'while'\">\n <cqa-step-builder-action \n [showHeader]=\"false\" \n [templates]=\"whileTemplates\" \n [setTemplateVariables]=\"setWhileTemplateVariables\" \n [searchPlaceholder]=\"whileSearchPlaceholder\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n (templateChanged)=\"selectWhileTemplate($event)\" \n (createStep)=\"createWhileStep($event)\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\"\n (cancelElementForm)=\"cancelElementForm.emit()\">\n </cqa-step-builder-action>\n </ng-container>\n\n <!-- Action Buttons -->\n <div *ngIf=\"selectedLoopType === 'for'\" class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-mt-6 cqa-pt-4 cqa-border-t cqa-border-gray-200\">\n <cqa-button\n class=\"cqa-w-1/2\"\n variant=\"outlined\"\n text=\"Cancel\"\n [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button\n class=\"cqa-w-1/2\"\n variant=\"filled\"\n text=\"Create Step\"\n [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!isFormValid()\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n</div>\n\n", components: [{ type: DynamicSelectFieldComponent, selector: "cqa-dynamic-select", inputs: ["form", "config"], outputs: ["selectionChange", "selectClick", "searchChange", "loadMore", "addCustomValue"] }, { 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: StepBuilderActionComponent, selector: "cqa-step-builder-action", inputs: ["showHeader", "templates", "searchPlaceholder", "setTemplateVariables", "preventSelectTemplate", "elementOptions", "hasMoreElements", "isLoadingElements", "screenNameOptions", "hasMoreScreenNames", "isLoadingScreenNames"], outputs: ["templateChanged", "loadMoreElements", "searchElements", "createElement", "searchScreenName", "loadMoreScreenNames", "createScreenNameRequest", "createStep", "cancelled"] }, { type: ButtonComponent, selector: "cqa-button", inputs: ["variant", "btnSize", "disabled", "icon", "iconPosition", "fullWidth", "iconColor", "type", "text", "customClass", "inlineStyles", "tooltip", "tooltipPosition"], outputs: ["clicked"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
28634
+ StepBuilderLoopComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: StepBuilderLoopComponent, selector: "cqa-step-builder-loop", inputs: { loopType: "loopType", selectOptions: "selectOptions", dataProfileOptions: "dataProfileOptions", hasMoreDataProfiles: "hasMoreDataProfiles", isLoadingDataProfiles: "isLoadingDataProfiles", setWhileTemplateVariables: "setWhileTemplateVariables", whileTemplates: "whileTemplates", whileSearchPlaceholder: "whileSearchPlaceholder", whileSearchValue: "whileSearchValue", 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" }, outputs: { createStep: "createStep", cancelled: "cancelled", loopTypeChange: "loopTypeChange", loadMoreDataProfiles: "loadMoreDataProfiles", searchDataProfiles: "searchDataProfiles", loadMoreElements: "loadMoreElements", searchElements: "searchElements", createElement: "createElement", searchScreenName: "searchScreenName", loadMoreScreenNames: "loadMoreScreenNames", createScreenNameRequest: "createScreenNameRequest", cancelElementForm: "cancelElementForm", searchParameters: "searchParameters", loadMoreParameters: "loadMoreParameters", searchEnvironments: "searchEnvironments", loadMoreEnvironments: "loadMoreEnvironments", redirectToParameter: "redirectToParameter", redirectToEnvironment: "redirectToEnvironment" }, host: { classAttribute: "cqa-ui-root" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white cqa-px-4 cqa-py-2\">\n <!-- Header -->\n <h2 class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-4\">\n Create Loop Test Step\n </h2>\n\n <!-- Loop Type Selection -->\n <div class=\"cqa-mb-4 cqa-w-full\">\n <div class=\"cqa-w-full cqa-inline-flex cqa-items-center cqa-bg-gray-100 cqa-rounded-lg cqa-p-1 cqa-gap-0\" style=\"height: 30px; background-color: #F3F4F6;\">\n <!-- For Button -->\n <button\n type=\"button\"\n class=\"cqa-w-1/2 cqa-text-[12px] cqa-rounded-md cqa-font-medium cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-min-w-[80px] cqa-text-center cqa-cursor-pointer\"\n [style.background-color]=\"selectedLoopType === 'for' ? '#3F43EE' : 'transparent'\"\n [style.color]=\"selectedLoopType === 'for' ? '#FFFFFF' : '#6B7280'\"\n [style.border-radius]=\"'8px'\"\n [style.height]=\"'22px'\"\n (click)=\"onLoopTypeChange('for')\">\n For\n </button>\n <!-- While Button -->\n <button\n type=\"button\"\n class=\"cqa-w-1/2 cqa-text-[12px] cqa-rounded-md cqa-font-medium cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-min-w-[80px] cqa-text-center cqa-cursor-pointer\"\n [style.background-color]=\"selectedLoopType === 'while' ? '#3F43EE' : 'transparent'\"\n [style.color]=\"selectedLoopType === 'while' ? '#FFFFFF' : '#6B7280'\"\n [style.border-radius]=\"'8px'\"\n [style.height]=\"'22px'\"\n (click)=\"onLoopTypeChange('while')\">\n While\n </button>\n </div>\n </div>\n\n <!-- Form Fields -->\n <ng-container *ngIf=\"selectedLoopType === 'for'\">\n <div class=\"cqa-flex cqa-flex-col cqa-gap-4 cqa-flex-1 cqa-overflow-y-auto\">\n <!-- Dropdown Fields Row -->\n <div class=\"cqa-flex cqa-gap-4 cqa-flex-wrap\">\n <!-- Select Option -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Select Option\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"selectOptionConfig\">\n </cqa-dynamic-select>\n </div>\n\n <ng-container *ngIf=\"loopForm.get('selectOption')?.value === 'dataProfile'\">\n <!-- Data Profile -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Data Profile\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"dataProfileConfig\"\n (searchChange)=\"onSearchDataProfiles($event.query)\"\n (loadMore)=\"onLoadMoreDataProfiles($event)\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Loop Start -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Loop Start\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"loopStartConfig\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Loop End -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Loop End\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"loopEndConfig\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n <ng-container *ngIf=\"loopForm.get('selectOption')?.value === 'runTime'\">\n <!-- Run Time Input Field -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Run Time\n </label>\n <cqa-custom-input\n [placeholder]=\"'Enter Run Time'\"\n [value]=\"loopForm.get('runTime')?.value\"\n [fullWidth]=\"true\"\n (valueChange)=\"loopForm.get('runTime')?.setValue($event)\">\n </cqa-custom-input>\n </div>\n </ng-container>\n </div>\n </div>\n</ng-container>\n <ng-container *ngIf=\"selectedLoopType === 'while'\">\n <cqa-step-builder-action \n [showHeader]=\"false\" \n [templates]=\"whileTemplates\" \n [setTemplateVariables]=\"setWhileTemplateVariables\" \n [searchPlaceholder]=\"whileSearchPlaceholder\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n [parameterOptions]=\"parameterOptions\"\n [hasMoreParameters]=\"hasMoreParameters\"\n [isLoadingParameters]=\"isLoadingParameters\"\n [environmentOptions]=\"environmentOptions\"\n [hasMoreEnvironments]=\"hasMoreEnvironments\"\n [isLoadingEnvironments]=\"isLoadingEnvironments\"\n [defaultTestDataProfileId]=\"defaultTestDataProfileId\"\n [defaultTestDataStartIndex]=\"defaultTestDataStartIndex\"\n (templateChanged)=\"selectWhileTemplate($event)\" \n (createStep)=\"createWhileStep($event)\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\"\n (searchParameters)=\"searchParameters.emit($event)\"\n (loadMoreParameters)=\"loadMoreParameters.emit()\"\n (searchEnvironments)=\"searchEnvironments.emit($event)\"\n (loadMoreEnvironments)=\"loadMoreEnvironments.emit()\"\n (redirectToParameter)=\"redirectToParameter.emit()\"\n (redirectToEnvironment)=\"redirectToEnvironment.emit()\"\n (cancelElementForm)=\"cancelElementForm.emit()\">\n </cqa-step-builder-action>\n </ng-container>\n\n <!-- Action Buttons -->\n <div *ngIf=\"selectedLoopType === 'for'\" class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-mt-6 cqa-pt-4 cqa-border-t cqa-border-gray-200\">\n <cqa-button\n class=\"cqa-w-1/2\"\n variant=\"outlined\"\n text=\"Cancel\"\n [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button\n class=\"cqa-w-1/2\"\n variant=\"filled\"\n text=\"Create Step\"\n [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!isFormValid()\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n</div>\n\n", components: [{ type: DynamicSelectFieldComponent, selector: "cqa-dynamic-select", inputs: ["form", "config"], outputs: ["selectionChange", "selectClick", "searchChange", "loadMore", "addCustomValue"] }, { 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: StepBuilderActionComponent, selector: "cqa-step-builder-action", inputs: ["showHeader", "templates", "searchPlaceholder", "setTemplateVariables", "preventSelectTemplate", "elementOptions", "hasMoreElements", "isLoadingElements", "screenNameOptions", "hasMoreScreenNames", "isLoadingScreenNames", "parameterOptions", "hasMoreParameters", "isLoadingParameters", "environmentOptions", "hasMoreEnvironments", "isLoadingEnvironments", "defaultTestDataProfileId", "defaultTestDataStartIndex"], outputs: ["templateChanged", "loadMoreElements", "searchElements", "createElement", "searchScreenName", "loadMoreScreenNames", "createScreenNameRequest", "searchParameters", "loadMoreParameters", "searchEnvironments", "loadMoreEnvironments", "createStep", "cancelled", "redirectToParameter", "redirectToEnvironment"] }, { type: ButtonComponent, selector: "cqa-button", inputs: ["variant", "btnSize", "disabled", "icon", "iconPosition", "fullWidth", "iconColor", "type", "text", "customClass", "inlineStyles", "tooltip", "tooltipPosition"], outputs: ["clicked"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
27521
28635
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: StepBuilderLoopComponent, decorators: [{
27522
28636
  type: Component,
27523
- args: [{ selector: 'cqa-step-builder-loop', host: { class: 'cqa-ui-root' }, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white cqa-px-4 cqa-py-2\">\n <!-- Header -->\n <h2 class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-4\">\n Create Loop Test Step\n </h2>\n\n <!-- Loop Type Selection -->\n <div class=\"cqa-mb-4 cqa-w-full\">\n <div class=\"cqa-w-full cqa-inline-flex cqa-items-center cqa-bg-gray-100 cqa-rounded-lg cqa-p-1 cqa-gap-0\" style=\"height: 30px; background-color: #F3F4F6;\">\n <!-- For Button -->\n <button\n type=\"button\"\n class=\"cqa-w-1/2 cqa-text-[12px] cqa-rounded-md cqa-font-medium cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-min-w-[80px] cqa-text-center cqa-cursor-pointer\"\n [style.background-color]=\"selectedLoopType === 'for' ? '#3F43EE' : 'transparent'\"\n [style.color]=\"selectedLoopType === 'for' ? '#FFFFFF' : '#6B7280'\"\n [style.border-radius]=\"'8px'\"\n [style.height]=\"'22px'\"\n (click)=\"onLoopTypeChange('for')\">\n For\n </button>\n <!-- While Button -->\n <button\n type=\"button\"\n class=\"cqa-w-1/2 cqa-text-[12px] cqa-rounded-md cqa-font-medium cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-min-w-[80px] cqa-text-center cqa-cursor-pointer\"\n [style.background-color]=\"selectedLoopType === 'while' ? '#3F43EE' : 'transparent'\"\n [style.color]=\"selectedLoopType === 'while' ? '#FFFFFF' : '#6B7280'\"\n [style.border-radius]=\"'8px'\"\n [style.height]=\"'22px'\"\n (click)=\"onLoopTypeChange('while')\">\n While\n </button>\n </div>\n </div>\n\n <!-- Form Fields -->\n <ng-container *ngIf=\"selectedLoopType === 'for'\">\n <div class=\"cqa-flex cqa-flex-col cqa-gap-4 cqa-flex-1 cqa-overflow-y-auto\">\n <!-- Dropdown Fields Row -->\n <div class=\"cqa-flex cqa-gap-4 cqa-flex-wrap\">\n <!-- Select Option -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Select Option\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"selectOptionConfig\">\n </cqa-dynamic-select>\n </div>\n\n <ng-container *ngIf=\"loopForm.get('selectOption')?.value === 'dataProfile'\">\n <!-- Data Profile -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Data Profile\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"dataProfileConfig\"\n (searchChange)=\"onSearchDataProfiles($event.query)\"\n (loadMore)=\"onLoadMoreDataProfiles($event)\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Loop Start -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Loop Start\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"loopStartConfig\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Loop End -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Loop End\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"loopEndConfig\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n <ng-container *ngIf=\"loopForm.get('selectOption')?.value === 'runTime'\">\n <!-- Run Time Input Field -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Run Time\n </label>\n <cqa-custom-input\n [placeholder]=\"'Enter Run Time'\"\n [value]=\"loopForm.get('runTime')?.value\"\n [fullWidth]=\"true\"\n (valueChange)=\"loopForm.get('runTime')?.setValue($event)\">\n </cqa-custom-input>\n </div>\n </ng-container>\n </div>\n </div>\n</ng-container>\n <ng-container *ngIf=\"selectedLoopType === 'while'\">\n <cqa-step-builder-action \n [showHeader]=\"false\" \n [templates]=\"whileTemplates\" \n [setTemplateVariables]=\"setWhileTemplateVariables\" \n [searchPlaceholder]=\"whileSearchPlaceholder\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n (templateChanged)=\"selectWhileTemplate($event)\" \n (createStep)=\"createWhileStep($event)\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\"\n (cancelElementForm)=\"cancelElementForm.emit()\">\n </cqa-step-builder-action>\n </ng-container>\n\n <!-- Action Buttons -->\n <div *ngIf=\"selectedLoopType === 'for'\" class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-mt-6 cqa-pt-4 cqa-border-t cqa-border-gray-200\">\n <cqa-button\n class=\"cqa-w-1/2\"\n variant=\"outlined\"\n text=\"Cancel\"\n [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button\n class=\"cqa-w-1/2\"\n variant=\"filled\"\n text=\"Create Step\"\n [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!isFormValid()\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n</div>\n\n", styles: [] }]
28637
+ args: [{ selector: 'cqa-step-builder-loop', host: { class: 'cqa-ui-root' }, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white cqa-px-4 cqa-py-2\">\n <!-- Header -->\n <h2 class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-4\">\n Create Loop Test Step\n </h2>\n\n <!-- Loop Type Selection -->\n <div class=\"cqa-mb-4 cqa-w-full\">\n <div class=\"cqa-w-full cqa-inline-flex cqa-items-center cqa-bg-gray-100 cqa-rounded-lg cqa-p-1 cqa-gap-0\" style=\"height: 30px; background-color: #F3F4F6;\">\n <!-- For Button -->\n <button\n type=\"button\"\n class=\"cqa-w-1/2 cqa-text-[12px] cqa-rounded-md cqa-font-medium cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-min-w-[80px] cqa-text-center cqa-cursor-pointer\"\n [style.background-color]=\"selectedLoopType === 'for' ? '#3F43EE' : 'transparent'\"\n [style.color]=\"selectedLoopType === 'for' ? '#FFFFFF' : '#6B7280'\"\n [style.border-radius]=\"'8px'\"\n [style.height]=\"'22px'\"\n (click)=\"onLoopTypeChange('for')\">\n For\n </button>\n <!-- While Button -->\n <button\n type=\"button\"\n class=\"cqa-w-1/2 cqa-text-[12px] cqa-rounded-md cqa-font-medium cqa-transition-all cqa-duration-200 cqa-ease-in-out cqa-min-w-[80px] cqa-text-center cqa-cursor-pointer\"\n [style.background-color]=\"selectedLoopType === 'while' ? '#3F43EE' : 'transparent'\"\n [style.color]=\"selectedLoopType === 'while' ? '#FFFFFF' : '#6B7280'\"\n [style.border-radius]=\"'8px'\"\n [style.height]=\"'22px'\"\n (click)=\"onLoopTypeChange('while')\">\n While\n </button>\n </div>\n </div>\n\n <!-- Form Fields -->\n <ng-container *ngIf=\"selectedLoopType === 'for'\">\n <div class=\"cqa-flex cqa-flex-col cqa-gap-4 cqa-flex-1 cqa-overflow-y-auto\">\n <!-- Dropdown Fields Row -->\n <div class=\"cqa-flex cqa-gap-4 cqa-flex-wrap\">\n <!-- Select Option -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Select Option\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"selectOptionConfig\">\n </cqa-dynamic-select>\n </div>\n\n <ng-container *ngIf=\"loopForm.get('selectOption')?.value === 'dataProfile'\">\n <!-- Data Profile -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Data Profile\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"dataProfileConfig\"\n (searchChange)=\"onSearchDataProfiles($event.query)\"\n (loadMore)=\"onLoadMoreDataProfiles($event)\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Loop Start -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Loop Start\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"loopStartConfig\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Loop End -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Loop End\n </label>\n <cqa-dynamic-select\n [form]=\"loopForm\"\n [config]=\"loopEndConfig\">\n </cqa-dynamic-select>\n </div>\n </ng-container>\n <ng-container *ngIf=\"loopForm.get('selectOption')?.value === 'runTime'\">\n <!-- Run Time Input Field -->\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1\" style=\"min-width: calc(25% - 12px);\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-gray-700 cqa-mb-1.5\">\n Run Time\n </label>\n <cqa-custom-input\n [placeholder]=\"'Enter Run Time'\"\n [value]=\"loopForm.get('runTime')?.value\"\n [fullWidth]=\"true\"\n (valueChange)=\"loopForm.get('runTime')?.setValue($event)\">\n </cqa-custom-input>\n </div>\n </ng-container>\n </div>\n </div>\n</ng-container>\n <ng-container *ngIf=\"selectedLoopType === 'while'\">\n <cqa-step-builder-action \n [showHeader]=\"false\" \n [templates]=\"whileTemplates\" \n [setTemplateVariables]=\"setWhileTemplateVariables\" \n [searchPlaceholder]=\"whileSearchPlaceholder\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n [parameterOptions]=\"parameterOptions\"\n [hasMoreParameters]=\"hasMoreParameters\"\n [isLoadingParameters]=\"isLoadingParameters\"\n [environmentOptions]=\"environmentOptions\"\n [hasMoreEnvironments]=\"hasMoreEnvironments\"\n [isLoadingEnvironments]=\"isLoadingEnvironments\"\n [defaultTestDataProfileId]=\"defaultTestDataProfileId\"\n [defaultTestDataStartIndex]=\"defaultTestDataStartIndex\"\n (templateChanged)=\"selectWhileTemplate($event)\" \n (createStep)=\"createWhileStep($event)\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\"\n (searchParameters)=\"searchParameters.emit($event)\"\n (loadMoreParameters)=\"loadMoreParameters.emit()\"\n (searchEnvironments)=\"searchEnvironments.emit($event)\"\n (loadMoreEnvironments)=\"loadMoreEnvironments.emit()\"\n (redirectToParameter)=\"redirectToParameter.emit()\"\n (redirectToEnvironment)=\"redirectToEnvironment.emit()\"\n (cancelElementForm)=\"cancelElementForm.emit()\">\n </cqa-step-builder-action>\n </ng-container>\n\n <!-- Action Buttons -->\n <div *ngIf=\"selectedLoopType === 'for'\" class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-mt-6 cqa-pt-4 cqa-border-t cqa-border-gray-200\">\n <cqa-button\n class=\"cqa-w-1/2\"\n variant=\"outlined\"\n text=\"Cancel\"\n [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button\n class=\"cqa-w-1/2\"\n variant=\"filled\"\n text=\"Create Step\"\n [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!isFormValid()\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n</div>\n\n", styles: [] }]
27524
28638
  }], ctorParameters: function () { return []; }, propDecorators: { loopType: [{
27525
28639
  type: Input
27526
28640
  }], selectOptions: [{
@@ -27561,6 +28675,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
27561
28675
  type: Input
27562
28676
  }], isLoadingScreenNames: [{
27563
28677
  type: Input
28678
+ }], parameterOptions: [{
28679
+ type: Input
28680
+ }], hasMoreParameters: [{
28681
+ type: Input
28682
+ }], isLoadingParameters: [{
28683
+ type: Input
28684
+ }], environmentOptions: [{
28685
+ type: Input
28686
+ }], hasMoreEnvironments: [{
28687
+ type: Input
28688
+ }], isLoadingEnvironments: [{
28689
+ type: Input
28690
+ }], defaultTestDataProfileId: [{
28691
+ type: Input
28692
+ }], defaultTestDataStartIndex: [{
28693
+ type: Input
27564
28694
  }], loadMoreElements: [{
27565
28695
  type: Output
27566
28696
  }], searchElements: [{
@@ -27575,6 +28705,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
27575
28705
  type: Output
27576
28706
  }], cancelElementForm: [{
27577
28707
  type: Output
28708
+ }], searchParameters: [{
28709
+ type: Output
28710
+ }], loadMoreParameters: [{
28711
+ type: Output
28712
+ }], searchEnvironments: [{
28713
+ type: Output
28714
+ }], loadMoreEnvironments: [{
28715
+ type: Output
28716
+ }], redirectToParameter: [{
28717
+ type: Output
28718
+ }], redirectToEnvironment: [{
28719
+ type: Output
27578
28720
  }] } });
27579
28721
 
27580
28722
  class StepBuilderConditionComponent {
@@ -27603,6 +28745,14 @@ class StepBuilderConditionComponent {
27603
28745
  this.hasMoreScreenNames = false;
27604
28746
  /** True while parent is loading screen names (search or load more) */
27605
28747
  this.isLoadingScreenNames = false;
28748
+ /** Parameter fetching properties */
28749
+ this.parameterOptions = []; // TestData[] - raw test data profiles
28750
+ this.hasMoreParameters = false;
28751
+ this.isLoadingParameters = false;
28752
+ /** Environment fetching properties */
28753
+ this.environmentOptions = [];
28754
+ this.hasMoreEnvironments = false;
28755
+ this.isLoadingEnvironments = false;
27606
28756
  /** Emit when step is created */
27607
28757
  this.createStep = new EventEmitter();
27608
28758
  /** Emit when cancelled */
@@ -27613,6 +28763,12 @@ class StepBuilderConditionComponent {
27613
28763
  this.searchScreenName = new EventEmitter(); // Emit when user searches screen names
27614
28764
  this.loadMoreScreenNames = new EventEmitter(); // Emit when user scrolls to load more screen names
27615
28765
  this.createScreenNameRequest = new EventEmitter(); // Emit when user requests to create a new screen name
28766
+ this.searchParameters = new EventEmitter(); // Emit when user searches for parameters
28767
+ this.loadMoreParameters = new EventEmitter(); // Emit when user scrolls to load more parameters
28768
+ this.searchEnvironments = new EventEmitter(); // Emit when user searches for environments
28769
+ this.loadMoreEnvironments = new EventEmitter(); // Emit when user scrolls to load more environments
28770
+ this.redirectToParameter = new EventEmitter();
28771
+ this.redirectToEnvironment = new EventEmitter();
27616
28772
  this.includeElse = false;
27617
28773
  // Cache for value configs to avoid recreating on every change detection
27618
28774
  this.valueConfigCache = null;
@@ -28100,10 +29256,10 @@ class StepBuilderConditionComponent {
28100
29256
  }
28101
29257
  }
28102
29258
  StepBuilderConditionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: StepBuilderConditionComponent, deps: [{ token: i1$1.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
28103
- StepBuilderConditionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: StepBuilderConditionComponent, selector: "cqa-step-builder-condition", inputs: { operatorOptions: "operatorOptions", conditionTemplates: "conditionTemplates", setConditionTemplateVariables: "setConditionTemplateVariables", elementOptions: "elementOptions", hasMoreElements: "hasMoreElements", isLoadingElements: "isLoadingElements", screenNameOptions: "screenNameOptions", hasMoreScreenNames: "hasMoreScreenNames", isLoadingScreenNames: "isLoadingScreenNames" }, outputs: { createStep: "createStep", cancelled: "cancelled", loadMoreElements: "loadMoreElements", searchElements: "searchElements", createElement: "createElement", searchScreenName: "searchScreenName", loadMoreScreenNames: "loadMoreScreenNames", createScreenNameRequest: "createScreenNameRequest" }, host: { classAttribute: "cqa-ui-root" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white cqa-px-4 cqa-py-2\">\n <!-- Header -->\n <h2 class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-4\">\n Create Condition Step\n </h2>\n\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1 cqa-overflow-y-auto\">\n <!-- Condition Builder Section -->\n <div class=\"cqa-mb-6\">\n <h3 class=\"cqa-text-sm cqa-text-[12px] cqa-font-semibold cqa-text-gray-900 cqa-mb-3\">\n Condition Builder\n </h3>\n\n <!-- Condition Rows -->\n <div class=\"cqa-flex cqa-flex-col cqa-gap-3 cqa-mb-3\">\n <ng-container *ngFor=\"let condition of conditionsFormArray.controls; let i = index; trackBy: trackByConditionIndex\">\n <div\n *ngIf=\"isConditionIf(i) || isConditionElseIf(i)\"\n class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <!-- Condition Row -->\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\">\n <!-- Condition Label -->\n <div class=\"cqa-text-[12px] cqa-font-semibold\">\n {{ getConditionLabel(i) }}\n </div>\n\n <!-- Operator Dropdown -->\n <!-- <div class=\"cqa-flex-1 cqa-max-w-[100px] cqa-text-[10px]\">\n <cqa-dynamic-select [form]=\"getConditionFormGroup(i)\" [config]=\"getOperatorConfig(i)\">\n </cqa-dynamic-select>\n </div> -->\n\n <!-- Value Template Dropdown -->\n <div class=\"cqa-flex-1 cqa-min-w-[150px] cqa-text-[10px]\">\n <cqa-dynamic-select [form]=\"getConditionFormGroup(i)\" [config]=\"getValueConfig(i)\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Remove Button -->\n <cqa-button\n *ngIf=\"i >= 1\"\n variant=\"text\"\n icon=\"close\"\n iconPosition=\"start\"\n [customClass]=\"'cqa-w-full cqa-flex cqa-items-center cqa-justify-center'\"\n (click)=\"removeCondition(i)\"\n [attr.aria-label]=\"'Remove condition'\">\n </cqa-button>\n <!-- <button type=\"button\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-8 cqa-h-8 cqa-rounded cqa-text-gray-500 hover:cqa-text-gray-700 hover:cqa-bg-gray-100 cqa-transition-colors\"\n (click)=\"removeCondition(i)\" *ngIf=\"i >= 1\"\n [attr.aria-label]=\"'Remove condition'\">\n <mat-icon class=\"cqa-text-lg cqa-text-[24px]\">close</mat-icon>\n </button> -->\n </div>\n\n <!-- Template Variables Section (shown when template is selected) -->\n <div *ngIf=\"getSelectedTemplate(i)\" class=\"cqa-mt-2\">\n <!-- Template Grammar Display -->\n <div class=\"cqa-mb-4 cqa-flex cqa-items-center cqa-flex-wrap cqa-gap-1 cqa-text-sm cqa-text-gray-700\">\n <div class=\"cqa-action-format cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"getConditionUpdatedHtmlGrammar(i) || getSelectedTemplate(i)?.htmlGrammar || getSelectedTemplate(i)?.naturalText || ''\">\n </div>\n </div>\n \n <!-- Template Variables Form Component (includes Description and Metadata) -->\n <cqa-template-variables-form\n style=\"width: 100%;\"\n [templateVariables]=\"getConditionTemplateVariables(i)\"\n [variablesForm]=\"getConditionVariablesForm(i)\"\n [metadata]=\"getConditionFormGroup(i).get('metadata')?.value || ''\"\n [description]=\"getConditionFormGroup(i).get('description')?.value || ''\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n (variableValueChange)=\"onConditionVariableValueChange(i, $event.name, $event.value)\"\n (variableBooleanChange)=\"onConditionVariableBooleanChange(i, $event.name, $event.value)\"\n (metadataChange)=\"getConditionFormGroup(i).get('metadata')?.setValue($event)\"\n (descriptionChange)=\"getConditionFormGroup(i).get('description')?.setValue($event)\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\">\n </cqa-template-variables-form>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Add Condition Button -->\n <div class=\"cqa-border-2 cqa-border-dashed cqa-border-gray-300 cqa-rounded-lg cqa-p-1 cqa-mt-3\">\n <cqa-button\n variant=\"text\"\n icon=\"add\"\n iconPosition=\"start\"\n [customClass]=\"'cqa-w-full cqa-flex cqa-items-center cqa-justify-center'\"\n [text]=\"'Add Condition'\"\n (clicked)=\"addCondition('CONDITION_ELSE_IF')\">\n </cqa-button>\n </div>\n </div>\n\n <!-- Include ELSE Branch Section -->\n <div class=\"cqa-flex cqa-items-center cqa-justify-between cqa-mb-6 cqa-p-3 cqa-bg-gray-50 cqa-rounded-lg\">\n <div class=\"cqa-flex cqa-flex-col\">\n <h3 class=\"cqa-text-[14px] cqa-font-semibold cqa-text-gray-900 cqa-mb-1\">\n Include ELSE branch\n </h3>\n <p class=\"cqa-text-[12px] cqa-text-gray-600\">\n Execute alternative steps when condition is not met.\n </p>\n </div>\n <mat-slide-toggle [checked]=\"includeElse\" (change)=\"onIncludeElseChange($event.checked)\" color=\"primary\">\n </mat-slide-toggle>\n </div>\n </div>\n <!-- Action Buttons -->\n <div class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-mt-auto cqa-pt-4 cqa-border-t cqa-border-gray-200\">\n <cqa-button class=\"cqa-w-1/2\" variant=\"outlined\" text=\"Cancel\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button class=\"cqa-w-1/2\" variant=\"filled\" text=\"Create Step\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!conditionForm.valid\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n</div>", components: [{ type: DynamicSelectFieldComponent, selector: "cqa-dynamic-select", inputs: ["form", "config"], outputs: ["selectionChange", "selectClick", "searchChange", "loadMore", "addCustomValue"] }, { type: ButtonComponent, selector: "cqa-button", inputs: ["variant", "btnSize", "disabled", "icon", "iconPosition", "fullWidth", "iconColor", "type", "text", "customClass", "inlineStyles", "tooltip", "tooltipPosition"], outputs: ["clicked"] }, { type: TemplateVariablesFormComponent, selector: "cqa-template-variables-form", inputs: ["templateVariables", "variablesForm", "metadata", "description", "elementOptions", "hasMoreElements", "isLoadingElements", "screenNameOptions", "hasMoreScreenNames", "isLoadingScreenNames"], outputs: ["variableValueChange", "variableBooleanChange", "metadataChange", "descriptionChange", "loadMoreElements", "searchElements", "createElement", "searchScreenName", "loadMoreScreenNames", "createScreenNameRequest", "cancelElementForm", "elementFormVisibilityChange"] }, { type: i5$1.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"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
29259
+ StepBuilderConditionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: StepBuilderConditionComponent, selector: "cqa-step-builder-condition", inputs: { operatorOptions: "operatorOptions", conditionTemplates: "conditionTemplates", setConditionTemplateVariables: "setConditionTemplateVariables", 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" }, outputs: { createStep: "createStep", cancelled: "cancelled", loadMoreElements: "loadMoreElements", searchElements: "searchElements", createElement: "createElement", searchScreenName: "searchScreenName", loadMoreScreenNames: "loadMoreScreenNames", createScreenNameRequest: "createScreenNameRequest", searchParameters: "searchParameters", loadMoreParameters: "loadMoreParameters", searchEnvironments: "searchEnvironments", loadMoreEnvironments: "loadMoreEnvironments", redirectToParameter: "redirectToParameter", redirectToEnvironment: "redirectToEnvironment" }, host: { classAttribute: "cqa-ui-root" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white cqa-px-4 cqa-py-2\">\n <!-- Header -->\n <h2 class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-4\">\n Create Condition Step\n </h2>\n\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1 cqa-overflow-y-auto\">\n <!-- Condition Builder Section -->\n <div class=\"cqa-mb-6\">\n <div class=\"cqa-mb-3\">\n <h3 class=\"cqa-text-sm cqa-text-[12px] cqa-font-semibold cqa-text-gray-900\">\n Condition Builder\n </h3>\n </div>\n\n <!-- Condition Rows -->\n <div class=\"cqa-flex cqa-flex-col cqa-gap-3 cqa-mb-3\">\n <ng-container *ngFor=\"let condition of conditionsFormArray.controls; let i = index; trackBy: trackByConditionIndex\">\n <div\n *ngIf=\"isConditionIf(i) || isConditionElseIf(i)\"\n class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <!-- Condition Row -->\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\">\n <!-- Condition Label -->\n <div class=\"cqa-text-[12px] cqa-font-semibold\">\n {{ getConditionLabel(i) }}\n </div>\n\n <!-- Operator Dropdown -->\n <!-- <div class=\"cqa-flex-1 cqa-max-w-[100px] cqa-text-[10px]\">\n <cqa-dynamic-select [form]=\"getConditionFormGroup(i)\" [config]=\"getOperatorConfig(i)\">\n </cqa-dynamic-select>\n </div> -->\n\n <!-- Value Template Dropdown -->\n <div class=\"cqa-flex-1 cqa-min-w-[150px] cqa-text-[10px]\">\n <cqa-dynamic-select [form]=\"getConditionFormGroup(i)\" [config]=\"getValueConfig(i)\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Remove Button -->\n <cqa-button\n *ngIf=\"i >= 1\"\n variant=\"text\"\n icon=\"close\"\n iconPosition=\"start\"\n [customClass]=\"'cqa-w-full cqa-flex cqa-items-center cqa-justify-center'\"\n (click)=\"removeCondition(i)\"\n [attr.aria-label]=\"'Remove condition'\">\n </cqa-button>\n <!-- <button type=\"button\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-8 cqa-h-8 cqa-rounded cqa-text-gray-500 hover:cqa-text-gray-700 hover:cqa-bg-gray-100 cqa-transition-colors\"\n (click)=\"removeCondition(i)\" *ngIf=\"i >= 1\"\n [attr.aria-label]=\"'Remove condition'\">\n <mat-icon class=\"cqa-text-lg cqa-text-[24px]\">close</mat-icon>\n </button> -->\n </div>\n\n <!-- Template Variables Section (shown when template is selected) -->\n <div *ngIf=\"getSelectedTemplate(i)\" class=\"cqa-mt-2\">\n <!-- Template Grammar Display -->\n <div class=\"cqa-mb-4 cqa-flex cqa-items-center cqa-flex-wrap cqa-gap-1 cqa-text-sm cqa-text-gray-700\">\n <div class=\"cqa-action-format cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"getSelectedTemplate(i)?.htmlGrammar || getSelectedTemplate(i)?.naturalText || ''\">\n </div>\n \n </div>\n \n <!-- Template Variables Form Component (includes Description and Metadata) -->\n <cqa-template-variables-form\n style=\"width: 100%;\"\n [templateVariables]=\"getConditionTemplateVariables(i)\"\n [variablesForm]=\"getConditionVariablesForm(i)\"\n [metadata]=\"getConditionFormGroup(i).get('metadata')?.value || ''\"\n [description]=\"getConditionFormGroup(i).get('description')?.value || ''\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n [parameterOptions]=\"parameterOptions\"\n [hasMoreParameters]=\"hasMoreParameters\"\n [isLoadingParameters]=\"isLoadingParameters\"\n [environmentOptions]=\"environmentOptions\"\n [hasMoreEnvironments]=\"hasMoreEnvironments\"\n [isLoadingEnvironments]=\"isLoadingEnvironments\"\n [defaultTestDataProfileId]=\"defaultTestDataProfileId\"\n [defaultTestDataStartIndex]=\"defaultTestDataStartIndex\"\n (variableValueChange)=\"onConditionVariableValueChange(i, $event.name, $event.value)\"\n (variableBooleanChange)=\"onConditionVariableBooleanChange(i, $event.name, $event.value)\"\n (metadataChange)=\"getConditionFormGroup(i).get('metadata')?.setValue($event)\"\n (descriptionChange)=\"getConditionFormGroup(i).get('description')?.setValue($event)\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\"\n (searchParameters)=\"searchParameters.emit($event)\"\n (loadMoreParameters)=\"loadMoreParameters.emit()\"\n (searchEnvironments)=\"searchEnvironments.emit($event)\"\n (loadMoreEnvironments)=\"loadMoreEnvironments.emit()\">\n </cqa-template-variables-form>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Add Condition Button -->\n <div class=\"cqa-border-2 cqa-border-dashed cqa-border-gray-300 cqa-rounded-lg cqa-p-1 cqa-mt-3\">\n <cqa-button\n variant=\"text\"\n icon=\"add\"\n iconPosition=\"start\"\n [customClass]=\"'cqa-w-full cqa-flex cqa-items-center cqa-justify-center'\"\n [text]=\"'Add Condition'\"\n (clicked)=\"addCondition('CONDITION_ELSE_IF')\">\n </cqa-button>\n </div>\n </div>\n\n <!-- Include ELSE Branch Section -->\n <div class=\"cqa-flex cqa-items-center cqa-justify-between cqa-mb-6 cqa-p-3 cqa-bg-gray-50 cqa-rounded-lg\">\n <div class=\"cqa-flex cqa-flex-col\">\n <h3 class=\"cqa-text-[14px] cqa-font-semibold cqa-text-gray-900 cqa-mb-1\">\n Include ELSE branch\n </h3>\n <p class=\"cqa-text-[12px] cqa-text-gray-600\">\n Execute alternative steps when condition is not met.\n </p>\n </div>\n <mat-slide-toggle [checked]=\"includeElse\" (change)=\"onIncludeElseChange($event.checked)\" color=\"primary\">\n </mat-slide-toggle>\n </div>\n </div>\n <!-- Action Buttons -->\n <div class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-mt-auto cqa-pt-4 cqa-border-t cqa-border-gray-200\">\n <cqa-button class=\"cqa-w-1/2\" variant=\"outlined\" text=\"Cancel\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button class=\"cqa-w-1/2\" variant=\"filled\" text=\"Create Step\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!conditionForm.valid\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n</div>", components: [{ type: DynamicSelectFieldComponent, selector: "cqa-dynamic-select", inputs: ["form", "config"], outputs: ["selectionChange", "selectClick", "searchChange", "loadMore", "addCustomValue"] }, { type: ButtonComponent, selector: "cqa-button", inputs: ["variant", "btnSize", "disabled", "icon", "iconPosition", "fullWidth", "iconColor", "type", "text", "customClass", "inlineStyles", "tooltip", "tooltipPosition"], outputs: ["clicked"] }, { type: TemplateVariablesFormComponent, selector: "cqa-template-variables-form", inputs: ["templateVariables", "variablesForm", "metadata", "description", "elementOptions", "hasMoreElements", "isLoadingElements", "screenNameOptions", "hasMoreScreenNames", "isLoadingScreenNames", "parameterOptions", "hasMoreParameters", "isLoadingParameters", "environmentOptions", "hasMoreEnvironments", "isLoadingEnvironments", "defaultTestDataProfileId", "defaultTestDataStartIndex", "createElementVisible"], outputs: ["variableValueChange", "variableBooleanChange", "metadataChange", "descriptionChange", "loadMoreElements", "searchElements", "createElement", "searchScreenName", "loadMoreScreenNames", "createScreenNameRequest", "searchParameters", "loadMoreParameters", "searchEnvironments", "loadMoreEnvironments", "cancelElementForm", "elementFormVisibilityChange"] }, { type: i5$1.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"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
28104
29260
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: StepBuilderConditionComponent, decorators: [{
28105
29261
  type: Component,
28106
- args: [{ selector: 'cqa-step-builder-condition', host: { class: 'cqa-ui-root' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white cqa-px-4 cqa-py-2\">\n <!-- Header -->\n <h2 class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-4\">\n Create Condition Step\n </h2>\n\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1 cqa-overflow-y-auto\">\n <!-- Condition Builder Section -->\n <div class=\"cqa-mb-6\">\n <h3 class=\"cqa-text-sm cqa-text-[12px] cqa-font-semibold cqa-text-gray-900 cqa-mb-3\">\n Condition Builder\n </h3>\n\n <!-- Condition Rows -->\n <div class=\"cqa-flex cqa-flex-col cqa-gap-3 cqa-mb-3\">\n <ng-container *ngFor=\"let condition of conditionsFormArray.controls; let i = index; trackBy: trackByConditionIndex\">\n <div\n *ngIf=\"isConditionIf(i) || isConditionElseIf(i)\"\n class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <!-- Condition Row -->\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\">\n <!-- Condition Label -->\n <div class=\"cqa-text-[12px] cqa-font-semibold\">\n {{ getConditionLabel(i) }}\n </div>\n\n <!-- Operator Dropdown -->\n <!-- <div class=\"cqa-flex-1 cqa-max-w-[100px] cqa-text-[10px]\">\n <cqa-dynamic-select [form]=\"getConditionFormGroup(i)\" [config]=\"getOperatorConfig(i)\">\n </cqa-dynamic-select>\n </div> -->\n\n <!-- Value Template Dropdown -->\n <div class=\"cqa-flex-1 cqa-min-w-[150px] cqa-text-[10px]\">\n <cqa-dynamic-select [form]=\"getConditionFormGroup(i)\" [config]=\"getValueConfig(i)\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Remove Button -->\n <cqa-button\n *ngIf=\"i >= 1\"\n variant=\"text\"\n icon=\"close\"\n iconPosition=\"start\"\n [customClass]=\"'cqa-w-full cqa-flex cqa-items-center cqa-justify-center'\"\n (click)=\"removeCondition(i)\"\n [attr.aria-label]=\"'Remove condition'\">\n </cqa-button>\n <!-- <button type=\"button\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-8 cqa-h-8 cqa-rounded cqa-text-gray-500 hover:cqa-text-gray-700 hover:cqa-bg-gray-100 cqa-transition-colors\"\n (click)=\"removeCondition(i)\" *ngIf=\"i >= 1\"\n [attr.aria-label]=\"'Remove condition'\">\n <mat-icon class=\"cqa-text-lg cqa-text-[24px]\">close</mat-icon>\n </button> -->\n </div>\n\n <!-- Template Variables Section (shown when template is selected) -->\n <div *ngIf=\"getSelectedTemplate(i)\" class=\"cqa-mt-2\">\n <!-- Template Grammar Display -->\n <div class=\"cqa-mb-4 cqa-flex cqa-items-center cqa-flex-wrap cqa-gap-1 cqa-text-sm cqa-text-gray-700\">\n <div class=\"cqa-action-format cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"getConditionUpdatedHtmlGrammar(i) || getSelectedTemplate(i)?.htmlGrammar || getSelectedTemplate(i)?.naturalText || ''\">\n </div>\n </div>\n \n <!-- Template Variables Form Component (includes Description and Metadata) -->\n <cqa-template-variables-form\n style=\"width: 100%;\"\n [templateVariables]=\"getConditionTemplateVariables(i)\"\n [variablesForm]=\"getConditionVariablesForm(i)\"\n [metadata]=\"getConditionFormGroup(i).get('metadata')?.value || ''\"\n [description]=\"getConditionFormGroup(i).get('description')?.value || ''\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n (variableValueChange)=\"onConditionVariableValueChange(i, $event.name, $event.value)\"\n (variableBooleanChange)=\"onConditionVariableBooleanChange(i, $event.name, $event.value)\"\n (metadataChange)=\"getConditionFormGroup(i).get('metadata')?.setValue($event)\"\n (descriptionChange)=\"getConditionFormGroup(i).get('description')?.setValue($event)\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\">\n </cqa-template-variables-form>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Add Condition Button -->\n <div class=\"cqa-border-2 cqa-border-dashed cqa-border-gray-300 cqa-rounded-lg cqa-p-1 cqa-mt-3\">\n <cqa-button\n variant=\"text\"\n icon=\"add\"\n iconPosition=\"start\"\n [customClass]=\"'cqa-w-full cqa-flex cqa-items-center cqa-justify-center'\"\n [text]=\"'Add Condition'\"\n (clicked)=\"addCondition('CONDITION_ELSE_IF')\">\n </cqa-button>\n </div>\n </div>\n\n <!-- Include ELSE Branch Section -->\n <div class=\"cqa-flex cqa-items-center cqa-justify-between cqa-mb-6 cqa-p-3 cqa-bg-gray-50 cqa-rounded-lg\">\n <div class=\"cqa-flex cqa-flex-col\">\n <h3 class=\"cqa-text-[14px] cqa-font-semibold cqa-text-gray-900 cqa-mb-1\">\n Include ELSE branch\n </h3>\n <p class=\"cqa-text-[12px] cqa-text-gray-600\">\n Execute alternative steps when condition is not met.\n </p>\n </div>\n <mat-slide-toggle [checked]=\"includeElse\" (change)=\"onIncludeElseChange($event.checked)\" color=\"primary\">\n </mat-slide-toggle>\n </div>\n </div>\n <!-- Action Buttons -->\n <div class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-mt-auto cqa-pt-4 cqa-border-t cqa-border-gray-200\">\n <cqa-button class=\"cqa-w-1/2\" variant=\"outlined\" text=\"Cancel\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button class=\"cqa-w-1/2\" variant=\"filled\" text=\"Create Step\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!conditionForm.valid\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n</div>", styles: [] }]
29262
+ args: [{ selector: 'cqa-step-builder-condition', host: { class: 'cqa-ui-root' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cqa-flex cqa-flex-col cqa-h-full cqa-bg-white cqa-px-4 cqa-py-2\">\n <!-- Header -->\n <h2 class=\"cqa-text-[12px] cqa-font-semibold cqa-text-black-100 cqa-mb-4\">\n Create Condition Step\n </h2>\n\n <div class=\"cqa-flex cqa-flex-col cqa-flex-1 cqa-overflow-y-auto\">\n <!-- Condition Builder Section -->\n <div class=\"cqa-mb-6\">\n <div class=\"cqa-mb-3\">\n <h3 class=\"cqa-text-sm cqa-text-[12px] cqa-font-semibold cqa-text-gray-900\">\n Condition Builder\n </h3>\n </div>\n\n <!-- Condition Rows -->\n <div class=\"cqa-flex cqa-flex-col cqa-gap-3 cqa-mb-3\">\n <ng-container *ngFor=\"let condition of conditionsFormArray.controls; let i = index; trackBy: trackByConditionIndex\">\n <div\n *ngIf=\"isConditionIf(i) || isConditionElseIf(i)\"\n class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <!-- Condition Row -->\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\">\n <!-- Condition Label -->\n <div class=\"cqa-text-[12px] cqa-font-semibold\">\n {{ getConditionLabel(i) }}\n </div>\n\n <!-- Operator Dropdown -->\n <!-- <div class=\"cqa-flex-1 cqa-max-w-[100px] cqa-text-[10px]\">\n <cqa-dynamic-select [form]=\"getConditionFormGroup(i)\" [config]=\"getOperatorConfig(i)\">\n </cqa-dynamic-select>\n </div> -->\n\n <!-- Value Template Dropdown -->\n <div class=\"cqa-flex-1 cqa-min-w-[150px] cqa-text-[10px]\">\n <cqa-dynamic-select [form]=\"getConditionFormGroup(i)\" [config]=\"getValueConfig(i)\">\n </cqa-dynamic-select>\n </div>\n\n <!-- Remove Button -->\n <cqa-button\n *ngIf=\"i >= 1\"\n variant=\"text\"\n icon=\"close\"\n iconPosition=\"start\"\n [customClass]=\"'cqa-w-full cqa-flex cqa-items-center cqa-justify-center'\"\n (click)=\"removeCondition(i)\"\n [attr.aria-label]=\"'Remove condition'\">\n </cqa-button>\n <!-- <button type=\"button\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-8 cqa-h-8 cqa-rounded cqa-text-gray-500 hover:cqa-text-gray-700 hover:cqa-bg-gray-100 cqa-transition-colors\"\n (click)=\"removeCondition(i)\" *ngIf=\"i >= 1\"\n [attr.aria-label]=\"'Remove condition'\">\n <mat-icon class=\"cqa-text-lg cqa-text-[24px]\">close</mat-icon>\n </button> -->\n </div>\n\n <!-- Template Variables Section (shown when template is selected) -->\n <div *ngIf=\"getSelectedTemplate(i)\" class=\"cqa-mt-2\">\n <!-- Template Grammar Display -->\n <div class=\"cqa-mb-4 cqa-flex cqa-items-center cqa-flex-wrap cqa-gap-1 cqa-text-sm cqa-text-gray-700\">\n <div class=\"cqa-action-format cqa-text-[12px] cqa-leading-[23px] cqa-text-black-100\"\n [innerHTML]=\"getSelectedTemplate(i)?.htmlGrammar || getSelectedTemplate(i)?.naturalText || ''\">\n </div>\n \n </div>\n \n <!-- Template Variables Form Component (includes Description and Metadata) -->\n <cqa-template-variables-form\n style=\"width: 100%;\"\n [templateVariables]=\"getConditionTemplateVariables(i)\"\n [variablesForm]=\"getConditionVariablesForm(i)\"\n [metadata]=\"getConditionFormGroup(i).get('metadata')?.value || ''\"\n [description]=\"getConditionFormGroup(i).get('description')?.value || ''\"\n [elementOptions]=\"elementOptions\"\n [hasMoreElements]=\"hasMoreElements\"\n [isLoadingElements]=\"isLoadingElements\"\n [screenNameOptions]=\"screenNameOptions\"\n [hasMoreScreenNames]=\"hasMoreScreenNames\"\n [isLoadingScreenNames]=\"isLoadingScreenNames\"\n [parameterOptions]=\"parameterOptions\"\n [hasMoreParameters]=\"hasMoreParameters\"\n [isLoadingParameters]=\"isLoadingParameters\"\n [environmentOptions]=\"environmentOptions\"\n [hasMoreEnvironments]=\"hasMoreEnvironments\"\n [isLoadingEnvironments]=\"isLoadingEnvironments\"\n [defaultTestDataProfileId]=\"defaultTestDataProfileId\"\n [defaultTestDataStartIndex]=\"defaultTestDataStartIndex\"\n (variableValueChange)=\"onConditionVariableValueChange(i, $event.name, $event.value)\"\n (variableBooleanChange)=\"onConditionVariableBooleanChange(i, $event.name, $event.value)\"\n (metadataChange)=\"getConditionFormGroup(i).get('metadata')?.setValue($event)\"\n (descriptionChange)=\"getConditionFormGroup(i).get('description')?.setValue($event)\"\n (loadMoreElements)=\"loadMoreElements.emit()\"\n (searchElements)=\"searchElements.emit($event)\"\n (createElement)=\"createElement.emit($event)\"\n (searchScreenName)=\"searchScreenName.emit($event)\"\n (loadMoreScreenNames)=\"loadMoreScreenNames.emit($event)\"\n (createScreenNameRequest)=\"createScreenNameRequest.emit($event)\"\n (searchParameters)=\"searchParameters.emit($event)\"\n (loadMoreParameters)=\"loadMoreParameters.emit()\"\n (searchEnvironments)=\"searchEnvironments.emit($event)\"\n (loadMoreEnvironments)=\"loadMoreEnvironments.emit()\">\n </cqa-template-variables-form>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Add Condition Button -->\n <div class=\"cqa-border-2 cqa-border-dashed cqa-border-gray-300 cqa-rounded-lg cqa-p-1 cqa-mt-3\">\n <cqa-button\n variant=\"text\"\n icon=\"add\"\n iconPosition=\"start\"\n [customClass]=\"'cqa-w-full cqa-flex cqa-items-center cqa-justify-center'\"\n [text]=\"'Add Condition'\"\n (clicked)=\"addCondition('CONDITION_ELSE_IF')\">\n </cqa-button>\n </div>\n </div>\n\n <!-- Include ELSE Branch Section -->\n <div class=\"cqa-flex cqa-items-center cqa-justify-between cqa-mb-6 cqa-p-3 cqa-bg-gray-50 cqa-rounded-lg\">\n <div class=\"cqa-flex cqa-flex-col\">\n <h3 class=\"cqa-text-[14px] cqa-font-semibold cqa-text-gray-900 cqa-mb-1\">\n Include ELSE branch\n </h3>\n <p class=\"cqa-text-[12px] cqa-text-gray-600\">\n Execute alternative steps when condition is not met.\n </p>\n </div>\n <mat-slide-toggle [checked]=\"includeElse\" (change)=\"onIncludeElseChange($event.checked)\" color=\"primary\">\n </mat-slide-toggle>\n </div>\n </div>\n <!-- Action Buttons -->\n <div class=\"cqa-flex cqa-w-full cqa-gap-2 cqa-mt-auto cqa-pt-4 cqa-border-t cqa-border-gray-200\">\n <cqa-button class=\"cqa-w-1/2\" variant=\"outlined\" text=\"Cancel\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n <cqa-button class=\"cqa-w-1/2\" variant=\"filled\" text=\"Create Step\" [customClass]=\"'cqa-flex-1 cqa-w-full'\"\n [disabled]=\"!conditionForm.valid\"\n (clicked)=\"onCreateStep()\">\n </cqa-button>\n </div>\n</div>", styles: [] }]
28107
29263
  }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { operatorOptions: [{
28108
29264
  type: Input
28109
29265
  }], conditionTemplates: [{
@@ -28122,6 +29278,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
28122
29278
  type: Input
28123
29279
  }], isLoadingScreenNames: [{
28124
29280
  type: Input
29281
+ }], parameterOptions: [{
29282
+ type: Input
29283
+ }], hasMoreParameters: [{
29284
+ type: Input
29285
+ }], isLoadingParameters: [{
29286
+ type: Input
29287
+ }], environmentOptions: [{
29288
+ type: Input
29289
+ }], hasMoreEnvironments: [{
29290
+ type: Input
29291
+ }], isLoadingEnvironments: [{
29292
+ type: Input
29293
+ }], defaultTestDataProfileId: [{
29294
+ type: Input
29295
+ }], defaultTestDataStartIndex: [{
29296
+ type: Input
28125
29297
  }], createStep: [{
28126
29298
  type: Output
28127
29299
  }], cancelled: [{
@@ -28138,6 +29310,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
28138
29310
  type: Output
28139
29311
  }], createScreenNameRequest: [{
28140
29312
  type: Output
29313
+ }], searchParameters: [{
29314
+ type: Output
29315
+ }], loadMoreParameters: [{
29316
+ type: Output
29317
+ }], searchEnvironments: [{
29318
+ type: Output
29319
+ }], loadMoreEnvironments: [{
29320
+ type: Output
29321
+ }], redirectToParameter: [{
29322
+ type: Output
29323
+ }], redirectToEnvironment: [{
29324
+ type: Output
28141
29325
  }] } });
28142
29326
 
28143
29327
  class StepBuilderDatabaseComponent {