@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.
- package/esm2020/lib/add-prerequisite-cases-section/add-prerequisite-cases-section.component.mjs +3 -3
- package/esm2020/lib/step-builder/step-builder-action/step-builder-action.component.mjs +100 -12
- package/esm2020/lib/step-builder/step-builder-condition/step-builder-condition.component.mjs +45 -3
- package/esm2020/lib/step-builder/step-builder-loop/step-builder-loop.component.mjs +45 -3
- package/esm2020/lib/step-builder/template-variables-form/template-variables-form.component.mjs +1055 -54
- package/fesm2015/cqa-lib-cqa-ui.mjs +1248 -64
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +1235 -62
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/step-builder/step-builder-action/step-builder-action.component.d.ts +50 -3
- package/lib/step-builder/step-builder-condition/step-builder-condition.component.d.ts +23 -1
- package/lib/step-builder/step-builder-loop/step-builder-loop.component.d.ts +20 -1
- package/lib/step-builder/template-variables-form/template-variables-form.component.d.ts +142 -4
- package/package.json +1 -1
- package/styles.css +1 -1
|
@@ -4696,10 +4696,10 @@ class AddPrerequisiteCasesSectionComponent {
|
|
|
4696
4696
|
}
|
|
4697
4697
|
}
|
|
4698
4698
|
AddPrerequisiteCasesSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AddPrerequisiteCasesSectionComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4699
|
-
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 });
|
|
4699
|
+
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 });
|
|
4700
4700
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AddPrerequisiteCasesSectionComponent, decorators: [{
|
|
4701
4701
|
type: Component,
|
|
4702
|
-
args: [{ selector: 'cqa-add-prerequisite-cases-section',
|
|
4702
|
+
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: [] }]
|
|
4703
4703
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { expanded: [{
|
|
4704
4704
|
type: Input
|
|
4705
4705
|
}], form: [{
|
|
@@ -26189,6 +26189,18 @@ class TemplateVariablesFormComponent {
|
|
|
26189
26189
|
this.hasMoreScreenNames = false;
|
|
26190
26190
|
/** True while parent is loading screen names (search or load more) */
|
|
26191
26191
|
this.isLoadingScreenNames = false;
|
|
26192
|
+
/** Test data profiles for parameter dropdown (from API) - raw TestData objects */
|
|
26193
|
+
this.parameterOptions = []; // TestData[] - using any to avoid circular dependency
|
|
26194
|
+
/** Whether more parameters are available for infinite scroll */
|
|
26195
|
+
this.hasMoreParameters = false;
|
|
26196
|
+
/** True while parent is loading parameters (search or load more) */
|
|
26197
|
+
this.isLoadingParameters = false;
|
|
26198
|
+
/** Environment options for environment parameter dropdown (from API) */
|
|
26199
|
+
this.environmentOptions = [];
|
|
26200
|
+
/** Whether more environments are available for infinite scroll */
|
|
26201
|
+
this.hasMoreEnvironments = false;
|
|
26202
|
+
/** True while parent is loading environments (search or load more) */
|
|
26203
|
+
this.isLoadingEnvironments = false;
|
|
26192
26204
|
this.variableValueChange = new EventEmitter();
|
|
26193
26205
|
this.variableBooleanChange = new EventEmitter();
|
|
26194
26206
|
this.metadataChange = new EventEmitter();
|
|
@@ -26199,16 +26211,28 @@ class TemplateVariablesFormComponent {
|
|
|
26199
26211
|
this.searchScreenName = new EventEmitter(); // Emit when user searches screen names
|
|
26200
26212
|
this.loadMoreScreenNames = new EventEmitter(); // Emit when user scrolls to load more screen names
|
|
26201
26213
|
this.createScreenNameRequest = new EventEmitter(); // Emit when user requests to create a new screen name
|
|
26214
|
+
this.searchParameters = new EventEmitter(); // Emit when user searches for parameters
|
|
26215
|
+
this.loadMoreParameters = new EventEmitter(); // Emit when user scrolls to load more parameters
|
|
26216
|
+
this.searchEnvironments = new EventEmitter(); // Emit when user searches for environments
|
|
26217
|
+
this.loadMoreEnvironments = new EventEmitter(); // Emit when user scrolls to load more environments
|
|
26202
26218
|
this.cancelElementForm = new EventEmitter(); // Emit when element form is cancelled
|
|
26203
26219
|
this.elementFormVisibilityChange = new EventEmitter(); // Emit when element form visibility changes
|
|
26204
26220
|
// Cache for select configs to avoid recalculating on every change detection
|
|
26205
26221
|
this.selectConfigCache = new Map();
|
|
26206
26222
|
// Cache for data type select configs
|
|
26207
26223
|
this.dataTypeSelectConfigCache = new Map();
|
|
26208
|
-
//
|
|
26209
|
-
this.
|
|
26210
|
-
//
|
|
26211
|
-
this.
|
|
26224
|
+
// Cache for parameter select configs
|
|
26225
|
+
this.parameterSelectConfigCache = new Map();
|
|
26226
|
+
// Cache for environment select configs
|
|
26227
|
+
this.environmentSelectConfigCache = new Map();
|
|
26228
|
+
// Cache for environment parameter select configs
|
|
26229
|
+
this.environmentParameterSelectConfigCache = new Map();
|
|
26230
|
+
// Cache for test data profile select configs (first dropdown for parameters)
|
|
26231
|
+
this.testDataProfileSelectConfigCache = new Map();
|
|
26232
|
+
// Cache for data set select configs (second dropdown for parameters - shows data sets from selected profile)
|
|
26233
|
+
this.dataSetSelectConfigCache = new Map();
|
|
26234
|
+
// Cache for parameter select configs for a specific data set (third dropdown for parameters)
|
|
26235
|
+
this.parameterForDataSetSelectConfigCache = new Map();
|
|
26212
26236
|
// Cache for computed properties
|
|
26213
26237
|
this.needsDataTypeDropdownCache = new Map();
|
|
26214
26238
|
this.shouldShowDropdownCache = new Map();
|
|
@@ -26224,35 +26248,79 @@ class TemplateVariablesFormComponent {
|
|
|
26224
26248
|
onCreateElement(payload) {
|
|
26225
26249
|
console.log('onCreateElement', payload);
|
|
26226
26250
|
this.createElement.emit(payload);
|
|
26227
|
-
this.createElementVisible = false;
|
|
26228
26251
|
this.elementFormVisibilityChange.emit(false);
|
|
26229
26252
|
this.cdr.markForCheck();
|
|
26230
26253
|
}
|
|
26231
26254
|
onCancelElementForm() {
|
|
26232
|
-
this.createElementVisible = false;
|
|
26233
26255
|
this.elementFormVisibilityChange.emit(false);
|
|
26234
26256
|
this.cancelElementForm.emit();
|
|
26235
26257
|
this.cdr.markForCheck();
|
|
26236
26258
|
}
|
|
26237
|
-
onShowElementForm() {
|
|
26238
|
-
this.createElementVisible = true;
|
|
26239
|
-
this.elementFormVisibilityChange.emit(true);
|
|
26240
|
-
this.cdr.markForCheck();
|
|
26241
|
-
}
|
|
26242
26259
|
ngOnChanges(changes) {
|
|
26243
26260
|
if (changes['templateVariables'] || changes['variablesForm'] || changes['elementOptions'] ||
|
|
26244
|
-
changes['hasMoreElements'] || changes['isLoadingElements']
|
|
26261
|
+
changes['hasMoreElements'] || changes['isLoadingElements'] ||
|
|
26262
|
+
changes['parameterOptions'] || changes['hasMoreParameters'] || changes['isLoadingParameters'] ||
|
|
26263
|
+
changes['environmentOptions'] || changes['hasMoreEnvironments'] || changes['isLoadingEnvironments'] ||
|
|
26264
|
+
changes['defaultTestDataProfileId'] || changes['defaultTestDataStartIndex']) {
|
|
26245
26265
|
// Clear all caches when inputs change
|
|
26246
26266
|
this.selectConfigCache.clear();
|
|
26247
26267
|
this.dataTypeSelectConfigCache.clear();
|
|
26268
|
+
this.parameterSelectConfigCache.clear();
|
|
26269
|
+
this.environmentSelectConfigCache.clear();
|
|
26270
|
+
this.environmentParameterSelectConfigCache.clear();
|
|
26271
|
+
this.testDataProfileSelectConfigCache.clear();
|
|
26272
|
+
this.dataSetSelectConfigCache.clear();
|
|
26273
|
+
this.parameterForDataSetSelectConfigCache.clear();
|
|
26248
26274
|
this.needsDataTypeDropdownCache.clear();
|
|
26249
26275
|
this.shouldShowDropdownCache.clear();
|
|
26250
26276
|
// Initialize data types and raw values for test-data variables
|
|
26251
|
-
if (
|
|
26277
|
+
// Also re-initialize if default values or parameterOptions change (to set default selections)
|
|
26278
|
+
if ((changes['templateVariables'] || changes['defaultTestDataProfileId'] || changes['defaultTestDataStartIndex'] || changes['parameterOptions']) && this.templateVariables) {
|
|
26252
26279
|
this.initializeTestDataVariables();
|
|
26253
26280
|
}
|
|
26254
26281
|
// Pre-compute all configs to avoid calling methods in template
|
|
26255
26282
|
this.precomputeConfigs();
|
|
26283
|
+
// If environment options changed and we have selected environments, refresh parameter configs
|
|
26284
|
+
if (changes['environmentOptions']) {
|
|
26285
|
+
this.templateVariables.forEach((variable, index) => {
|
|
26286
|
+
if (this.isEnvironmentType(variable) && variable.selectedEnvironment) {
|
|
26287
|
+
// Clear and recompute environment parameter config
|
|
26288
|
+
this.environmentParameterSelectConfigCache.delete(`${variable.name}_envParam`);
|
|
26289
|
+
this.getEnvironmentParameterSelectConfig(variable, index);
|
|
26290
|
+
}
|
|
26291
|
+
});
|
|
26292
|
+
}
|
|
26293
|
+
// If parameter options changed and we have default values, try to initialize them
|
|
26294
|
+
if (changes['parameterOptions'] && this.defaultTestDataProfileId && this.defaultTestDataStartIndex != null && this.parameterOptions.length > 0) {
|
|
26295
|
+
// Re-initialize to set default values now that parameterOptions are available
|
|
26296
|
+
console.log('Re-initializing with default values after parameterOptions loaded');
|
|
26297
|
+
this.initializeTestDataVariables();
|
|
26298
|
+
// Force change detection after initialization
|
|
26299
|
+
this.cdr.markForCheck();
|
|
26300
|
+
}
|
|
26301
|
+
// If parameter options changed and we have selected test data profiles, refresh configs
|
|
26302
|
+
if (changes['parameterOptions'] || changes['defaultTestDataProfileId'] || changes['defaultTestDataStartIndex']) {
|
|
26303
|
+
// Clear test data profile select config cache since profiles list may have changed
|
|
26304
|
+
this.testDataProfileSelectConfigCache.clear();
|
|
26305
|
+
this.templateVariables.forEach((variable, index) => {
|
|
26306
|
+
if (this.isParameterType(variable)) {
|
|
26307
|
+
// Recompute test data profile config
|
|
26308
|
+
this.getTestDataProfileSelectConfig(variable, index);
|
|
26309
|
+
// If a profile is already selected, recompute data set config
|
|
26310
|
+
if (variable.selectedTestDataProfile) {
|
|
26311
|
+
this.getDataSetSelectConfig(variable, index);
|
|
26312
|
+
// If a data set is already selected, recompute parameter config
|
|
26313
|
+
if (variable.selectedDataSet) {
|
|
26314
|
+
// Clear and recompute parameter config for the selected data set
|
|
26315
|
+
// Use profile ID if available for cache key
|
|
26316
|
+
const profileIdentifier = variable.selectedTestDataProfileId ? String(variable.selectedTestDataProfileId) : variable.selectedTestDataProfile;
|
|
26317
|
+
this.parameterForDataSetSelectConfigCache.delete(`${variable.name}_paramForDataSet_${profileIdentifier}_${variable.selectedDataSet}`);
|
|
26318
|
+
this.getParameterSelectConfig(variable, index);
|
|
26319
|
+
}
|
|
26320
|
+
}
|
|
26321
|
+
}
|
|
26322
|
+
});
|
|
26323
|
+
}
|
|
26256
26324
|
// Mark for check since we're using OnPush
|
|
26257
26325
|
this.cdr.markForCheck();
|
|
26258
26326
|
}
|
|
@@ -26261,8 +26329,9 @@ class TemplateVariablesFormComponent {
|
|
|
26261
26329
|
this.templateVariables.forEach((variable, index) => {
|
|
26262
26330
|
if (this.needsDataTypeDropdown(variable)) {
|
|
26263
26331
|
const { dataType, rawValue } = this.parseTestDataValue(variable.value || '');
|
|
26264
|
-
|
|
26265
|
-
|
|
26332
|
+
// Set properties directly on the variable object
|
|
26333
|
+
variable.dataType = dataType;
|
|
26334
|
+
variable.rawValue = rawValue;
|
|
26266
26335
|
// Ensure form control exists for data type in the FormArray
|
|
26267
26336
|
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
26268
26337
|
if (variableGroup) {
|
|
@@ -26272,6 +26341,162 @@ class TemplateVariablesFormComponent {
|
|
|
26272
26341
|
else {
|
|
26273
26342
|
variableGroup.get('dataType')?.setValue(dataType, { emitEvent: false });
|
|
26274
26343
|
}
|
|
26344
|
+
// For parameter type, parse the value to extract test data profile and parameter
|
|
26345
|
+
if (dataType === 'parameter') {
|
|
26346
|
+
// Check if default test data profile and data set are provided from test case
|
|
26347
|
+
// Only proceed if parameterOptions are loaded
|
|
26348
|
+
if (this.defaultTestDataProfileId && this.defaultTestDataStartIndex != null && this.parameterOptions.length > 0) {
|
|
26349
|
+
// Find the test data profile by ID
|
|
26350
|
+
const defaultProfile = this.parameterOptions.find((testData) => testData.id === this.defaultTestDataProfileId);
|
|
26351
|
+
if (defaultProfile && defaultProfile.data && defaultProfile.data.length > this.defaultTestDataStartIndex) {
|
|
26352
|
+
const defaultDataSet = defaultProfile.data[this.defaultTestDataStartIndex];
|
|
26353
|
+
const profileName = defaultProfile.name || defaultProfile.testDataName;
|
|
26354
|
+
const dataSetName = defaultDataSet.name;
|
|
26355
|
+
// Set variable properties - this ensures hasSelectedTestDataProfile() and hasSelectedDataSet() return true
|
|
26356
|
+
variable.selectedTestDataProfile = profileName;
|
|
26357
|
+
variable.selectedTestDataProfileId = defaultProfile.id;
|
|
26358
|
+
variable.selectedDataSet = dataSetName;
|
|
26359
|
+
// Set form controls with the actual values so dropdowns display selected options
|
|
26360
|
+
if (!variableGroup.get('selectedTestDataProfile')) {
|
|
26361
|
+
variableGroup.addControl('selectedTestDataProfile', new FormControl(profileName));
|
|
26362
|
+
}
|
|
26363
|
+
else {
|
|
26364
|
+
variableGroup.get('selectedTestDataProfile')?.setValue(profileName, { emitEvent: false });
|
|
26365
|
+
}
|
|
26366
|
+
if (!variableGroup.get('selectedDataSet')) {
|
|
26367
|
+
variableGroup.addControl('selectedDataSet', new FormControl(dataSetName));
|
|
26368
|
+
}
|
|
26369
|
+
else {
|
|
26370
|
+
variableGroup.get('selectedDataSet')?.setValue(dataSetName, { emitEvent: false });
|
|
26371
|
+
}
|
|
26372
|
+
// Don't set parameter value yet - user will select it
|
|
26373
|
+
if (variableGroup.get('value')) {
|
|
26374
|
+
variableGroup.get('value')?.setValue('', { emitEvent: false });
|
|
26375
|
+
}
|
|
26376
|
+
// Clear caches to force recomputation of configs with new values
|
|
26377
|
+
// Clear all cache entries for this variable to ensure fresh configs
|
|
26378
|
+
this.testDataProfileSelectConfigCache.delete(`${variable.name}_testDataProfile`);
|
|
26379
|
+
// Clear data set cache - need to clear all possible keys since we don't know the exact format
|
|
26380
|
+
const dataSetKeysToDelete = [];
|
|
26381
|
+
this.dataSetSelectConfigCache.forEach((value, key) => {
|
|
26382
|
+
if (key.startsWith(`${variable.name}_dataSet`)) {
|
|
26383
|
+
dataSetKeysToDelete.push(key);
|
|
26384
|
+
}
|
|
26385
|
+
});
|
|
26386
|
+
dataSetKeysToDelete.forEach(key => this.dataSetSelectConfigCache.delete(key));
|
|
26387
|
+
// Clear parameter cache - need to clear all possible keys
|
|
26388
|
+
const paramKeysToDelete = [];
|
|
26389
|
+
this.parameterForDataSetSelectConfigCache.forEach((value, key) => {
|
|
26390
|
+
if (key.startsWith(`${variable.name}_paramForDataSet`)) {
|
|
26391
|
+
paramKeysToDelete.push(key);
|
|
26392
|
+
}
|
|
26393
|
+
});
|
|
26394
|
+
paramKeysToDelete.forEach(key => this.parameterForDataSetSelectConfigCache.delete(key));
|
|
26395
|
+
console.log('Default test data initialized:', {
|
|
26396
|
+
variableName: variable.name,
|
|
26397
|
+
profileName,
|
|
26398
|
+
profileId: defaultProfile.id,
|
|
26399
|
+
dataSetName,
|
|
26400
|
+
hasSelectedProfile: !!variable.selectedTestDataProfile,
|
|
26401
|
+
hasSelectedDataSet: !!variable.selectedDataSet
|
|
26402
|
+
});
|
|
26403
|
+
}
|
|
26404
|
+
else {
|
|
26405
|
+
console.warn('Default test data profile not found or invalid:', {
|
|
26406
|
+
defaultTestDataProfileId: this.defaultTestDataProfileId,
|
|
26407
|
+
defaultTestDataStartIndex: this.defaultTestDataStartIndex,
|
|
26408
|
+
parameterOptionsLength: this.parameterOptions.length,
|
|
26409
|
+
foundProfile: !!defaultProfile
|
|
26410
|
+
});
|
|
26411
|
+
}
|
|
26412
|
+
}
|
|
26413
|
+
else {
|
|
26414
|
+
// No default values - use existing logic to find from parameter value
|
|
26415
|
+
const paramName = rawValue;
|
|
26416
|
+
if (paramName) {
|
|
26417
|
+
// Find the test data profile and data set that contains this parameter
|
|
26418
|
+
// Search through all test data profiles and their data sets
|
|
26419
|
+
let foundProfile = null;
|
|
26420
|
+
let foundDataSet = null;
|
|
26421
|
+
for (const testDataProfile of this.parameterOptions) {
|
|
26422
|
+
if (testDataProfile.data && testDataProfile.data.length > 0) {
|
|
26423
|
+
// Search through all data sets in this profile
|
|
26424
|
+
for (const dataSet of testDataProfile.data) {
|
|
26425
|
+
if (dataSet && dataSet.data && dataSet.data.hasOwnProperty(paramName)) {
|
|
26426
|
+
foundProfile = testDataProfile;
|
|
26427
|
+
foundDataSet = dataSet;
|
|
26428
|
+
break;
|
|
26429
|
+
}
|
|
26430
|
+
}
|
|
26431
|
+
if (foundProfile)
|
|
26432
|
+
break;
|
|
26433
|
+
}
|
|
26434
|
+
}
|
|
26435
|
+
if (foundProfile && foundDataSet) {
|
|
26436
|
+
const profileName = foundProfile.name || foundProfile.testDataName;
|
|
26437
|
+
const dataSetName = foundDataSet.name;
|
|
26438
|
+
variable.selectedTestDataProfile = profileName;
|
|
26439
|
+
variable.selectedTestDataProfileId = foundProfile.id;
|
|
26440
|
+
variable.selectedDataSet = dataSetName;
|
|
26441
|
+
// Set form controls
|
|
26442
|
+
if (!variableGroup.get('selectedTestDataProfile')) {
|
|
26443
|
+
variableGroup.addControl('selectedTestDataProfile', new FormControl(profileName));
|
|
26444
|
+
}
|
|
26445
|
+
else {
|
|
26446
|
+
variableGroup.get('selectedTestDataProfile')?.setValue(profileName, { emitEvent: false });
|
|
26447
|
+
}
|
|
26448
|
+
if (!variableGroup.get('selectedDataSet')) {
|
|
26449
|
+
variableGroup.addControl('selectedDataSet', new FormControl(dataSetName));
|
|
26450
|
+
}
|
|
26451
|
+
else {
|
|
26452
|
+
variableGroup.get('selectedDataSet')?.setValue(dataSetName, { emitEvent: false });
|
|
26453
|
+
}
|
|
26454
|
+
// Set form control to param name (for dropdown display)
|
|
26455
|
+
if (variableGroup.get('value')) {
|
|
26456
|
+
variableGroup.get('value')?.setValue(paramName, { emitEvent: false });
|
|
26457
|
+
}
|
|
26458
|
+
// Ensure variable.value is formatted correctly as @|paramName|
|
|
26459
|
+
variable.value = this.formatTestDataValue(paramName, 'parameter');
|
|
26460
|
+
}
|
|
26461
|
+
else {
|
|
26462
|
+
// If parameter not found, format the raw value if it's a parameter type
|
|
26463
|
+
if (variableGroup.get('value')) {
|
|
26464
|
+
variableGroup.get('value')?.setValue(rawValue, { emitEvent: false });
|
|
26465
|
+
}
|
|
26466
|
+
// Ensure variable.value is formatted correctly
|
|
26467
|
+
variable.value = this.formatTestDataValue(rawValue, dataType);
|
|
26468
|
+
}
|
|
26469
|
+
}
|
|
26470
|
+
}
|
|
26471
|
+
}
|
|
26472
|
+
// For environment type, parse the value to extract environment and parameter
|
|
26473
|
+
if (dataType === 'environment') {
|
|
26474
|
+
// Environment values are in format *|parameterName|
|
|
26475
|
+
// We need to find which environment this parameter belongs to
|
|
26476
|
+
const paramName = rawValue;
|
|
26477
|
+
if (paramName) {
|
|
26478
|
+
// Find the environment that contains this parameter
|
|
26479
|
+
const envOption = this.environmentOptions.find(env => env.name === paramName);
|
|
26480
|
+
if (envOption) {
|
|
26481
|
+
variable.selectedEnvironment = envOption.environment;
|
|
26482
|
+
// Extract and store environment ID
|
|
26483
|
+
const idMatch = envOption.id.match(/env-(\d+)-/);
|
|
26484
|
+
if (idMatch && idMatch[1]) {
|
|
26485
|
+
variable.selectedEnvironmentId = parseInt(idMatch[1], 10);
|
|
26486
|
+
}
|
|
26487
|
+
// Set form controls
|
|
26488
|
+
if (!variableGroup.get('selectedEnvironment')) {
|
|
26489
|
+
variableGroup.addControl('selectedEnvironment', new FormControl(envOption.environment));
|
|
26490
|
+
}
|
|
26491
|
+
else {
|
|
26492
|
+
variableGroup.get('selectedEnvironment')?.setValue(envOption.environment, { emitEvent: false });
|
|
26493
|
+
}
|
|
26494
|
+
if (variableGroup.get('value')) {
|
|
26495
|
+
variableGroup.get('value')?.setValue(`*|${paramName}|`, { emitEvent: false });
|
|
26496
|
+
}
|
|
26497
|
+
}
|
|
26498
|
+
}
|
|
26499
|
+
}
|
|
26275
26500
|
}
|
|
26276
26501
|
}
|
|
26277
26502
|
});
|
|
@@ -26303,6 +26528,26 @@ class TemplateVariablesFormComponent {
|
|
|
26303
26528
|
// Pre-compute data type select configs
|
|
26304
26529
|
if (this.needsDataTypeDropdown(variable)) {
|
|
26305
26530
|
this.getDataTypeSelectConfig(variable, index);
|
|
26531
|
+
// Pre-compute parameter and environment select configs if needed
|
|
26532
|
+
const dataType = variable.dataType || 'plain-text';
|
|
26533
|
+
if (dataType === 'parameter') {
|
|
26534
|
+
this.getTestDataProfileSelectConfig(variable, index);
|
|
26535
|
+
// Pre-compute data set config if test data profile is already selected
|
|
26536
|
+
if (variable.selectedTestDataProfile) {
|
|
26537
|
+
this.getDataSetSelectConfig(variable, index);
|
|
26538
|
+
// Pre-compute parameter config if data set is already selected
|
|
26539
|
+
if (variable.selectedDataSet) {
|
|
26540
|
+
this.getParameterSelectConfig(variable, index);
|
|
26541
|
+
}
|
|
26542
|
+
}
|
|
26543
|
+
}
|
|
26544
|
+
else if (dataType === 'environment') {
|
|
26545
|
+
this.getEnvironmentSelectConfig(variable, index);
|
|
26546
|
+
// Pre-compute environment parameter config if environment is already selected
|
|
26547
|
+
if (variable.selectedEnvironment) {
|
|
26548
|
+
this.getEnvironmentParameterSelectConfig(variable, index);
|
|
26549
|
+
}
|
|
26550
|
+
}
|
|
26306
26551
|
}
|
|
26307
26552
|
});
|
|
26308
26553
|
}
|
|
@@ -26416,8 +26661,8 @@ class TemplateVariablesFormComponent {
|
|
|
26416
26661
|
// If this is a test-data variable, parse and update raw value and data type
|
|
26417
26662
|
if (this.needsDataTypeDropdown(variable)) {
|
|
26418
26663
|
const { dataType, rawValue } = this.parseTestDataValue(value || '');
|
|
26419
|
-
|
|
26420
|
-
|
|
26664
|
+
variable.dataType = dataType;
|
|
26665
|
+
variable.rawValue = rawValue;
|
|
26421
26666
|
// Update data type form control in FormArray
|
|
26422
26667
|
const variableGroup = this.getVariableFormGroup(variableName);
|
|
26423
26668
|
if (variableGroup && variableGroup.get('dataType')) {
|
|
@@ -26468,7 +26713,7 @@ class TemplateVariablesFormComponent {
|
|
|
26468
26713
|
return this.needsDataTypeDropdownCache.get(variable.name);
|
|
26469
26714
|
}
|
|
26470
26715
|
const dataKey = variable.dataKey?.toLowerCase() || '';
|
|
26471
|
-
const result = dataKey === '
|
|
26716
|
+
const result = dataKey === 'test_data' || dataKey === 'source_value' || dataKey === 'target_value';
|
|
26472
26717
|
this.needsDataTypeDropdownCache.set(variable.name, result);
|
|
26473
26718
|
return result;
|
|
26474
26719
|
}
|
|
@@ -26485,7 +26730,7 @@ class TemplateVariablesFormComponent {
|
|
|
26485
26730
|
// Ensure form control exists in FormArray
|
|
26486
26731
|
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
26487
26732
|
if (variableGroup && !variableGroup.get('dataType')) {
|
|
26488
|
-
const currentDataType =
|
|
26733
|
+
const currentDataType = variable.dataType || 'plain-text';
|
|
26489
26734
|
variableGroup.addControl('dataType', new FormControl(currentDataType));
|
|
26490
26735
|
}
|
|
26491
26736
|
const config = {
|
|
@@ -26502,12 +26747,10 @@ class TemplateVariablesFormComponent {
|
|
|
26502
26747
|
return config;
|
|
26503
26748
|
}
|
|
26504
26749
|
getCurrentDataType(variable) {
|
|
26505
|
-
|
|
26506
|
-
return this.variableDataTypes.get(variable.name) || 'plain-text';
|
|
26750
|
+
return variable.dataType || 'plain-text';
|
|
26507
26751
|
}
|
|
26508
26752
|
getRawValue(variable) {
|
|
26509
|
-
|
|
26510
|
-
return this.variableRawValues.get(variable.name) || '';
|
|
26753
|
+
return variable.rawValue || '';
|
|
26511
26754
|
}
|
|
26512
26755
|
/**
|
|
26513
26756
|
* Check if selector variable is available in templateVariables
|
|
@@ -26521,8 +26764,8 @@ class TemplateVariablesFormComponent {
|
|
|
26521
26764
|
get parameterVariableAvailable() {
|
|
26522
26765
|
return this.templateVariables.some(v => {
|
|
26523
26766
|
const dataKey = v.dataKey?.toLowerCase() || '';
|
|
26524
|
-
if (dataKey === '
|
|
26525
|
-
const dataType =
|
|
26767
|
+
if (dataKey === 'test_data' || dataKey === 'source_value' || dataKey === 'target_value') {
|
|
26768
|
+
const dataType = v.dataType || 'plain-text';
|
|
26526
26769
|
return dataType === 'parameter';
|
|
26527
26770
|
}
|
|
26528
26771
|
return false;
|
|
@@ -26533,35 +26776,140 @@ class TemplateVariablesFormComponent {
|
|
|
26533
26776
|
*/
|
|
26534
26777
|
get environmentVariableAvailable() {
|
|
26535
26778
|
return this.templateVariables.some(v => {
|
|
26536
|
-
const dataKey = v.
|
|
26537
|
-
if (dataKey === '
|
|
26538
|
-
const dataType =
|
|
26779
|
+
const dataKey = v.dataKey?.toLowerCase() || '';
|
|
26780
|
+
if (dataKey === 'test_data' || dataKey === 'source_value' || dataKey === 'target_value') {
|
|
26781
|
+
const dataType = v.dataType || 'plain-text';
|
|
26539
26782
|
return dataType === 'environment';
|
|
26540
26783
|
}
|
|
26541
26784
|
return false;
|
|
26542
26785
|
});
|
|
26543
26786
|
}
|
|
26544
26787
|
onDataTypeChange(variableName, dataType) {
|
|
26545
|
-
//
|
|
26546
|
-
this.
|
|
26788
|
+
// Find the variable
|
|
26789
|
+
const variable = this.templateVariables.find(v => v.name === variableName);
|
|
26790
|
+
if (!variable)
|
|
26791
|
+
return;
|
|
26792
|
+
// Update stored data type on the variable object
|
|
26793
|
+
variable.dataType = dataType;
|
|
26794
|
+
// Clear parameter and environment select config caches since data type changed
|
|
26795
|
+
this.testDataProfileSelectConfigCache.delete(`${variableName}_testDataProfile`);
|
|
26796
|
+
this.dataSetSelectConfigCache.delete(`${variableName}_dataSet`);
|
|
26797
|
+
this.parameterForDataSetSelectConfigCache.delete(`${variableName}_paramForDataSet`);
|
|
26798
|
+
this.environmentSelectConfigCache.delete(`${variableName}_environment`);
|
|
26799
|
+
this.environmentParameterSelectConfigCache.delete(`${variableName}_envParam`);
|
|
26800
|
+
// Clear selected test data profile and data set if switching away from parameter type
|
|
26801
|
+
if (dataType !== 'parameter') {
|
|
26802
|
+
variable.selectedTestDataProfile = undefined;
|
|
26803
|
+
variable.selectedTestDataProfileId = undefined;
|
|
26804
|
+
variable.selectedDataSet = undefined;
|
|
26805
|
+
}
|
|
26806
|
+
// Clear selected environment if switching away from environment type
|
|
26807
|
+
if (dataType !== 'environment') {
|
|
26808
|
+
variable.selectedEnvironment = undefined;
|
|
26809
|
+
variable.selectedEnvironmentId = undefined;
|
|
26810
|
+
}
|
|
26547
26811
|
// Get current raw value
|
|
26548
|
-
const rawValue =
|
|
26812
|
+
const rawValue = variable.rawValue || '';
|
|
26549
26813
|
// Format the value based on new data type
|
|
26550
26814
|
const formattedValue = this.formatTestDataValue(rawValue, dataType);
|
|
26551
|
-
// Update variable value
|
|
26552
|
-
|
|
26553
|
-
if (variable) {
|
|
26554
|
-
variable.value = formattedValue;
|
|
26555
|
-
}
|
|
26815
|
+
// Update variable value (always store formatted value in variable)
|
|
26816
|
+
variable.value = formattedValue;
|
|
26556
26817
|
// Update form control in FormArray
|
|
26557
26818
|
const variableGroup = this.getVariableFormGroup(variableName);
|
|
26558
|
-
if (variableGroup
|
|
26559
|
-
variableGroup.get('value')
|
|
26819
|
+
if (variableGroup) {
|
|
26820
|
+
if (variableGroup.get('value')) {
|
|
26821
|
+
// For parameter type, set form control to raw value so select can display it
|
|
26822
|
+
if (dataType === 'parameter') {
|
|
26823
|
+
variableGroup.get('value')?.setValue(rawValue, { emitEvent: false });
|
|
26824
|
+
}
|
|
26825
|
+
else if (dataType === 'environment') {
|
|
26826
|
+
// For environment type, clear value and selectedEnvironment
|
|
26827
|
+
variableGroup.get('value')?.setValue('', { emitEvent: false });
|
|
26828
|
+
if (variableGroup.get('selectedEnvironment')) {
|
|
26829
|
+
variableGroup.get('selectedEnvironment')?.setValue('', { emitEvent: false });
|
|
26830
|
+
}
|
|
26831
|
+
}
|
|
26832
|
+
else {
|
|
26833
|
+
variableGroup.get('value')?.setValue(formattedValue, { emitEvent: false });
|
|
26834
|
+
}
|
|
26835
|
+
}
|
|
26836
|
+
// Remove selectedEnvironment control if not environment type
|
|
26837
|
+
if (dataType !== 'environment' && variableGroup.get('selectedEnvironment')) {
|
|
26838
|
+
variableGroup.removeControl('selectedEnvironment');
|
|
26839
|
+
}
|
|
26840
|
+
}
|
|
26841
|
+
// If switching to parameter type, check for default values and initialize them
|
|
26842
|
+
if (dataType === 'parameter') {
|
|
26843
|
+
const index = this.templateVariables.indexOf(variable);
|
|
26844
|
+
// Check if default test data profile and data set are provided from test case
|
|
26845
|
+
if (this.defaultTestDataProfileId && this.defaultTestDataStartIndex != null && this.parameterOptions.length > 0) {
|
|
26846
|
+
// Find the test data profile by ID
|
|
26847
|
+
const defaultProfile = this.parameterOptions.find((testData) => testData.id === this.defaultTestDataProfileId);
|
|
26848
|
+
if (defaultProfile && defaultProfile.data && defaultProfile.data.length > this.defaultTestDataStartIndex) {
|
|
26849
|
+
const defaultDataSet = defaultProfile.data[this.defaultTestDataStartIndex];
|
|
26850
|
+
const profileName = defaultProfile.name || defaultProfile.testDataName;
|
|
26851
|
+
const dataSetName = defaultDataSet.name;
|
|
26852
|
+
// Set variable properties - this ensures hasSelectedTestDataProfile() and hasSelectedDataSet() return true
|
|
26853
|
+
variable.selectedTestDataProfile = profileName;
|
|
26854
|
+
variable.selectedTestDataProfileId = defaultProfile.id;
|
|
26855
|
+
variable.selectedDataSet = dataSetName;
|
|
26856
|
+
// Set form controls with the actual values so dropdowns display selected options
|
|
26857
|
+
if (variableGroup) {
|
|
26858
|
+
if (!variableGroup.get('selectedTestDataProfile')) {
|
|
26859
|
+
variableGroup.addControl('selectedTestDataProfile', new FormControl(profileName));
|
|
26860
|
+
}
|
|
26861
|
+
else {
|
|
26862
|
+
variableGroup.get('selectedTestDataProfile')?.setValue(profileName, { emitEvent: false });
|
|
26863
|
+
}
|
|
26864
|
+
if (!variableGroup.get('selectedDataSet')) {
|
|
26865
|
+
variableGroup.addControl('selectedDataSet', new FormControl(dataSetName));
|
|
26866
|
+
}
|
|
26867
|
+
else {
|
|
26868
|
+
variableGroup.get('selectedDataSet')?.setValue(dataSetName, { emitEvent: false });
|
|
26869
|
+
}
|
|
26870
|
+
}
|
|
26871
|
+
// Clear caches to force recomputation of configs with new values
|
|
26872
|
+
this.testDataProfileSelectConfigCache.delete(`${variableName}_testDataProfile`);
|
|
26873
|
+
const dataSetKeysToDelete = [];
|
|
26874
|
+
this.dataSetSelectConfigCache.forEach((value, key) => {
|
|
26875
|
+
if (key.startsWith(`${variableName}_dataSet`)) {
|
|
26876
|
+
dataSetKeysToDelete.push(key);
|
|
26877
|
+
}
|
|
26878
|
+
});
|
|
26879
|
+
dataSetKeysToDelete.forEach(key => this.dataSetSelectConfigCache.delete(key));
|
|
26880
|
+
const paramKeysToDelete = [];
|
|
26881
|
+
this.parameterForDataSetSelectConfigCache.forEach((value, key) => {
|
|
26882
|
+
if (key.startsWith(`${variableName}_paramForDataSet`)) {
|
|
26883
|
+
paramKeysToDelete.push(key);
|
|
26884
|
+
}
|
|
26885
|
+
});
|
|
26886
|
+
paramKeysToDelete.forEach(key => this.parameterForDataSetSelectConfigCache.delete(key));
|
|
26887
|
+
}
|
|
26888
|
+
}
|
|
26889
|
+
}
|
|
26890
|
+
// Pre-compute the new select config if needed
|
|
26891
|
+
if (variable) {
|
|
26892
|
+
const index = this.templateVariables.indexOf(variable);
|
|
26893
|
+
if (dataType === 'parameter') {
|
|
26894
|
+
// Pre-compute test data profile config
|
|
26895
|
+
this.getTestDataProfileSelectConfig(variable, index);
|
|
26896
|
+
// If a profile is already selected, pre-compute data set config
|
|
26897
|
+
if (variable.selectedTestDataProfile) {
|
|
26898
|
+
this.getDataSetSelectConfig(variable, index);
|
|
26899
|
+
// If a data set is already selected, pre-compute parameter config
|
|
26900
|
+
if (variable.selectedDataSet) {
|
|
26901
|
+
this.getParameterSelectConfig(variable, index);
|
|
26902
|
+
}
|
|
26903
|
+
}
|
|
26904
|
+
}
|
|
26905
|
+
else if (dataType === 'environment') {
|
|
26906
|
+
this.getEnvironmentSelectConfig(variable, index);
|
|
26907
|
+
}
|
|
26560
26908
|
}
|
|
26561
26909
|
// Mark for check since we're using OnPush
|
|
26562
26910
|
this.cdr.markForCheck();
|
|
26563
26911
|
console.log('onDataTypeChange', variableName, dataType, formattedValue);
|
|
26564
|
-
// Emit the change event
|
|
26912
|
+
// Emit the change event with formatted value
|
|
26565
26913
|
this.variableValueChange.emit({ name: variableName, value: formattedValue });
|
|
26566
26914
|
}
|
|
26567
26915
|
onElementSearch(event) {
|
|
@@ -26571,17 +26919,18 @@ class TemplateVariablesFormComponent {
|
|
|
26571
26919
|
this.searchElements.emit(event.query);
|
|
26572
26920
|
}
|
|
26573
26921
|
onTestDataValueChange(variableName, rawValue) {
|
|
26574
|
-
//
|
|
26575
|
-
this.
|
|
26922
|
+
// Find the variable
|
|
26923
|
+
const variable = this.templateVariables.find(v => v.name === variableName);
|
|
26924
|
+
if (!variable)
|
|
26925
|
+
return;
|
|
26926
|
+
// Update stored raw value on the variable object
|
|
26927
|
+
variable.rawValue = rawValue;
|
|
26576
26928
|
// Get current data type
|
|
26577
|
-
const dataType =
|
|
26929
|
+
const dataType = variable.dataType || 'plain-text';
|
|
26578
26930
|
// Format the value based on data type
|
|
26579
26931
|
const formattedValue = this.formatTestDataValue(rawValue, dataType);
|
|
26580
26932
|
// Update variable value
|
|
26581
|
-
|
|
26582
|
-
if (variable) {
|
|
26583
|
-
variable.value = formattedValue;
|
|
26584
|
-
}
|
|
26933
|
+
variable.value = formattedValue;
|
|
26585
26934
|
// Update form control in FormArray
|
|
26586
26935
|
const variableGroup = this.getVariableFormGroup(variableName);
|
|
26587
26936
|
if (variableGroup && variableGroup.get('value')) {
|
|
@@ -26592,12 +26941,639 @@ class TemplateVariablesFormComponent {
|
|
|
26592
26941
|
// Emit the change event
|
|
26593
26942
|
this.variableValueChange.emit({ name: variableName, value: formattedValue });
|
|
26594
26943
|
}
|
|
26944
|
+
/**
|
|
26945
|
+
* Get unique test data profiles from parameter options (raw TestData objects)
|
|
26946
|
+
*/
|
|
26947
|
+
getUniqueTestDataProfiles() {
|
|
26948
|
+
const profileMap = new Map();
|
|
26949
|
+
this.parameterOptions.forEach((testData) => {
|
|
26950
|
+
// testData.name is the testDataName (profile name)
|
|
26951
|
+
const profileName = testData.name || testData.testDataName;
|
|
26952
|
+
if (profileName && !profileMap.has(profileName)) {
|
|
26953
|
+
profileMap.set(profileName, {
|
|
26954
|
+
id: String(testData.id),
|
|
26955
|
+
name: profileName
|
|
26956
|
+
});
|
|
26957
|
+
}
|
|
26958
|
+
});
|
|
26959
|
+
const profiles = Array.from(profileMap.values());
|
|
26960
|
+
return profiles;
|
|
26961
|
+
}
|
|
26962
|
+
/**
|
|
26963
|
+
* Get data sets for a specific test data profile
|
|
26964
|
+
* Returns all data sets from the profile's data array
|
|
26965
|
+
*/
|
|
26966
|
+
getDataSetsForTestDataProfile(profileId) {
|
|
26967
|
+
// Find the test data profile by id
|
|
26968
|
+
const testDataProfile = this.parameterOptions.find((testData) => {
|
|
26969
|
+
return testData.id === Number(profileId);
|
|
26970
|
+
});
|
|
26971
|
+
if (!testDataProfile || !testDataProfile.data || testDataProfile.data.length === 0) {
|
|
26972
|
+
return [];
|
|
26973
|
+
}
|
|
26974
|
+
// Return all data sets from the profile
|
|
26975
|
+
return testDataProfile.data.map((dataSet) => ({
|
|
26976
|
+
id: dataSet.name,
|
|
26977
|
+
name: dataSet.name
|
|
26978
|
+
}));
|
|
26979
|
+
}
|
|
26980
|
+
/**
|
|
26981
|
+
* Get parameters for a specific data set in a test data profile
|
|
26982
|
+
* Extracts parameter names from the selected data set's data object
|
|
26983
|
+
*/
|
|
26984
|
+
getParametersForDataSet(profileIdOrName, dataSetName) {
|
|
26985
|
+
// Find the test data profile by id or name
|
|
26986
|
+
const testDataProfile = this.parameterOptions.find((testData) => {
|
|
26987
|
+
// Try to match by ID first (if profileIdOrName is a number)
|
|
26988
|
+
const idMatch = !isNaN(Number(profileIdOrName)) && testData.id === Number(profileIdOrName);
|
|
26989
|
+
// Otherwise try to match by name
|
|
26990
|
+
const nameMatch = (testData.name || testData.testDataName) === profileIdOrName;
|
|
26991
|
+
return idMatch || nameMatch;
|
|
26992
|
+
});
|
|
26993
|
+
if (!testDataProfile || !testDataProfile.data || testDataProfile.data.length === 0) {
|
|
26994
|
+
return [];
|
|
26995
|
+
}
|
|
26996
|
+
// Find the specific data set by name
|
|
26997
|
+
const dataSet = testDataProfile.data.find((ds) => ds.name === dataSetName);
|
|
26998
|
+
if (!dataSet || !dataSet.data) {
|
|
26999
|
+
return [];
|
|
27000
|
+
}
|
|
27001
|
+
// Get all parameter keys from the data set's data object
|
|
27002
|
+
const parameterNames = Object.keys(dataSet.data);
|
|
27003
|
+
return parameterNames.map(paramName => ({
|
|
27004
|
+
id: paramName,
|
|
27005
|
+
name: paramName,
|
|
27006
|
+
}));
|
|
27007
|
+
}
|
|
27008
|
+
/**
|
|
27009
|
+
* Get select config for test data profile dropdown (first dropdown for parameters)
|
|
27010
|
+
*/
|
|
27011
|
+
getTestDataProfileSelectConfig(variable, index) {
|
|
27012
|
+
const cacheKey = `${variable.name}_testDataProfile`;
|
|
27013
|
+
// Get unique test data profiles
|
|
27014
|
+
const profiles = this.getUniqueTestDataProfiles();
|
|
27015
|
+
// Create options with profile name and ID (display name with ID)
|
|
27016
|
+
const optionsArray = profiles.map(profile => {
|
|
27017
|
+
// Find the test data profile to get the ID
|
|
27018
|
+
const testDataProfile = this.parameterOptions.find((testData) => {
|
|
27019
|
+
const name = testData.name || testData.testDataName;
|
|
27020
|
+
return name === profile.name;
|
|
27021
|
+
});
|
|
27022
|
+
const profileId = testDataProfile?.id || profile.id;
|
|
27023
|
+
return {
|
|
27024
|
+
id: String(profileId),
|
|
27025
|
+
value: profile.name,
|
|
27026
|
+
name: `${profile.name}`,
|
|
27027
|
+
label: `${profile.name}`
|
|
27028
|
+
};
|
|
27029
|
+
});
|
|
27030
|
+
// Ensure form control exists for test data profile selection and update it
|
|
27031
|
+
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
27032
|
+
if (variableGroup) {
|
|
27033
|
+
if (!variableGroup.get('selectedTestDataProfile')) {
|
|
27034
|
+
// Use profile ID if available, otherwise use profile name
|
|
27035
|
+
const currentValue = variable.selectedTestDataProfileId
|
|
27036
|
+
? String(variable.selectedTestDataProfileId)
|
|
27037
|
+
: (variable.selectedTestDataProfile || '');
|
|
27038
|
+
variableGroup.addControl('selectedTestDataProfile', new FormControl(currentValue));
|
|
27039
|
+
}
|
|
27040
|
+
// Always update form control value if variable has a selected profile
|
|
27041
|
+
// This ensures the value is set even if config was cached
|
|
27042
|
+
// Use profile ID (which matches opt.id) instead of profile name (which matches opt.value)
|
|
27043
|
+
if (variable.selectedTestDataProfileId != null) {
|
|
27044
|
+
const profileIdString = String(variable.selectedTestDataProfileId);
|
|
27045
|
+
// Verify the profile ID exists in options before setting
|
|
27046
|
+
const profileExists = optionsArray.some(opt => opt.id === profileIdString);
|
|
27047
|
+
if (profileExists) {
|
|
27048
|
+
const currentControlValue = variableGroup.get('selectedTestDataProfile')?.value;
|
|
27049
|
+
if (currentControlValue !== profileIdString) {
|
|
27050
|
+
variableGroup.get('selectedTestDataProfile')?.setValue(profileIdString, { emitEvent: false });
|
|
27051
|
+
console.log('Updated test data profile form control with ID:', {
|
|
27052
|
+
variableName: variable.name,
|
|
27053
|
+
profileId: profileIdString,
|
|
27054
|
+
profileName: variable.selectedTestDataProfile,
|
|
27055
|
+
optionsCount: optionsArray.length
|
|
27056
|
+
});
|
|
27057
|
+
}
|
|
27058
|
+
}
|
|
27059
|
+
else {
|
|
27060
|
+
console.warn('Selected test data profile ID not found in options:', {
|
|
27061
|
+
variableName: variable.name,
|
|
27062
|
+
profileId: profileIdString,
|
|
27063
|
+
profileName: variable.selectedTestDataProfile,
|
|
27064
|
+
availableOptionIds: optionsArray.map(opt => opt.id)
|
|
27065
|
+
});
|
|
27066
|
+
}
|
|
27067
|
+
}
|
|
27068
|
+
else if (variable.selectedTestDataProfile) {
|
|
27069
|
+
// Fallback: if we only have the profile name, find the matching option and use its ID
|
|
27070
|
+
const matchingOption = optionsArray.find(opt => opt.value === variable.selectedTestDataProfile);
|
|
27071
|
+
if (matchingOption) {
|
|
27072
|
+
const currentControlValue = variableGroup.get('selectedTestDataProfile')?.value;
|
|
27073
|
+
if (currentControlValue !== matchingOption.id) {
|
|
27074
|
+
variableGroup.get('selectedTestDataProfile')?.setValue(matchingOption.id, { emitEvent: false });
|
|
27075
|
+
// Also update the variable's profile ID for consistency
|
|
27076
|
+
variable.selectedTestDataProfileId = Number(matchingOption.id);
|
|
27077
|
+
console.log('Updated test data profile form control with ID from name:', {
|
|
27078
|
+
variableName: variable.name,
|
|
27079
|
+
profileId: matchingOption.id,
|
|
27080
|
+
profileName: variable.selectedTestDataProfile
|
|
27081
|
+
});
|
|
27082
|
+
}
|
|
27083
|
+
}
|
|
27084
|
+
}
|
|
27085
|
+
}
|
|
27086
|
+
// Check cache after ensuring form control is set
|
|
27087
|
+
if (this.testDataProfileSelectConfigCache.has(cacheKey)) {
|
|
27088
|
+
return this.testDataProfileSelectConfigCache.get(cacheKey);
|
|
27089
|
+
}
|
|
27090
|
+
// Check if default values are set - if so, disable the dropdown
|
|
27091
|
+
const isDisabled = this.hasDefaultTestDataSelection();
|
|
27092
|
+
const config = {
|
|
27093
|
+
key: 'selectedTestDataProfile',
|
|
27094
|
+
placeholder: 'Select Test Data Profile',
|
|
27095
|
+
multiple: false,
|
|
27096
|
+
searchable: false,
|
|
27097
|
+
options: optionsArray,
|
|
27098
|
+
hasMore: false,
|
|
27099
|
+
isLoading: false,
|
|
27100
|
+
disabled: isDisabled,
|
|
27101
|
+
onChange: (value) => {
|
|
27102
|
+
// Value is the profile ID (string) from the mat-option
|
|
27103
|
+
// Find the test data profile by ID to get the name
|
|
27104
|
+
const testDataProfile = this.parameterOptions.find((testData) => {
|
|
27105
|
+
return testData.id === Number(value);
|
|
27106
|
+
});
|
|
27107
|
+
// Store both ID and name
|
|
27108
|
+
variable.selectedTestDataProfileId = testDataProfile?.id;
|
|
27109
|
+
variable.selectedTestDataProfile = testDataProfile?.name || testDataProfile?.testDataName || '';
|
|
27110
|
+
// Clear data set and parameter selection when profile changes
|
|
27111
|
+
variable.selectedDataSet = undefined;
|
|
27112
|
+
variable.rawValue = '';
|
|
27113
|
+
variable.value = '';
|
|
27114
|
+
// Update form controls
|
|
27115
|
+
const varGroup = this.getVariableFormGroup(variable.name);
|
|
27116
|
+
if (varGroup) {
|
|
27117
|
+
if (varGroup.get('selectedTestDataProfile')) {
|
|
27118
|
+
varGroup.get('selectedTestDataProfile')?.setValue(value, { emitEvent: false });
|
|
27119
|
+
}
|
|
27120
|
+
if (varGroup.get('selectedDataSet')) {
|
|
27121
|
+
varGroup.get('selectedDataSet')?.setValue('', { emitEvent: false });
|
|
27122
|
+
}
|
|
27123
|
+
if (varGroup.get('value')) {
|
|
27124
|
+
varGroup.get('value')?.setValue('', { emitEvent: false });
|
|
27125
|
+
}
|
|
27126
|
+
}
|
|
27127
|
+
// Clear caches for data set and parameter select configs since profile changed
|
|
27128
|
+
// Clear all data set and parameter configs for this variable
|
|
27129
|
+
const dataSetKeysToDelete = [];
|
|
27130
|
+
this.dataSetSelectConfigCache.forEach((value, key) => {
|
|
27131
|
+
if (key.startsWith(`${variable.name}_dataSet`)) {
|
|
27132
|
+
dataSetKeysToDelete.push(key);
|
|
27133
|
+
}
|
|
27134
|
+
});
|
|
27135
|
+
dataSetKeysToDelete.forEach(key => this.dataSetSelectConfigCache.delete(key));
|
|
27136
|
+
const paramKeysToDelete = [];
|
|
27137
|
+
this.parameterForDataSetSelectConfigCache.forEach((value, key) => {
|
|
27138
|
+
if (key.startsWith(`${variable.name}_paramForDataSet`)) {
|
|
27139
|
+
paramKeysToDelete.push(key);
|
|
27140
|
+
}
|
|
27141
|
+
});
|
|
27142
|
+
paramKeysToDelete.forEach(key => this.parameterForDataSetSelectConfigCache.delete(key));
|
|
27143
|
+
// Clear selected data set when profile changes
|
|
27144
|
+
variable.selectedDataSet = undefined;
|
|
27145
|
+
// Mark for check
|
|
27146
|
+
this.cdr.markForCheck();
|
|
27147
|
+
}
|
|
27148
|
+
};
|
|
27149
|
+
this.testDataProfileSelectConfigCache.set(cacheKey, config);
|
|
27150
|
+
return config;
|
|
27151
|
+
}
|
|
27152
|
+
/**
|
|
27153
|
+
* Get select config for data set dropdown (second dropdown for parameters - shows data sets from selected profile)
|
|
27154
|
+
*/
|
|
27155
|
+
getDataSetSelectConfig(variable, index) {
|
|
27156
|
+
// Get selected test data profile ID (preferred) or name (fallback)
|
|
27157
|
+
const selectedProfileId = variable.selectedTestDataProfileId;
|
|
27158
|
+
const selectedProfile = variable.selectedTestDataProfile;
|
|
27159
|
+
if (!selectedProfileId && !selectedProfile) {
|
|
27160
|
+
// Return empty config if no profile is selected
|
|
27161
|
+
return {
|
|
27162
|
+
key: 'selectedDataSet',
|
|
27163
|
+
placeholder: 'Select Test Data Profile first',
|
|
27164
|
+
multiple: false,
|
|
27165
|
+
searchable: false,
|
|
27166
|
+
options: []
|
|
27167
|
+
};
|
|
27168
|
+
}
|
|
27169
|
+
// Use profile ID if available, otherwise find ID from profile name
|
|
27170
|
+
let profileIdToUse;
|
|
27171
|
+
if (selectedProfileId) {
|
|
27172
|
+
profileIdToUse = String(selectedProfileId);
|
|
27173
|
+
}
|
|
27174
|
+
else {
|
|
27175
|
+
// Find the profile ID from the profile name
|
|
27176
|
+
const testDataProfile = this.parameterOptions.find((testData) => {
|
|
27177
|
+
const name = testData.name || testData.testDataName;
|
|
27178
|
+
return name === selectedProfile;
|
|
27179
|
+
});
|
|
27180
|
+
profileIdToUse = testDataProfile?.id ? String(testDataProfile.id) : '';
|
|
27181
|
+
}
|
|
27182
|
+
// Use profile ID for cache key if available, otherwise use profile name
|
|
27183
|
+
const cacheKey = `${variable.name}_dataSet_${profileIdToUse || selectedProfile || ''}`;
|
|
27184
|
+
if (this.dataSetSelectConfigCache.has(cacheKey)) {
|
|
27185
|
+
return this.dataSetSelectConfigCache.get(cacheKey);
|
|
27186
|
+
}
|
|
27187
|
+
// Get data sets for the selected test data profile using ID
|
|
27188
|
+
const dataSets = this.getDataSetsForTestDataProfile(profileIdToUse);
|
|
27189
|
+
const optionsArray = dataSets.map(dataSet => ({
|
|
27190
|
+
id: dataSet.name,
|
|
27191
|
+
value: dataSet.name,
|
|
27192
|
+
name: dataSet.name,
|
|
27193
|
+
label: dataSet.name
|
|
27194
|
+
}));
|
|
27195
|
+
// Ensure form control exists for data set selection
|
|
27196
|
+
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
27197
|
+
if (variableGroup) {
|
|
27198
|
+
if (!variableGroup.get('selectedDataSet')) {
|
|
27199
|
+
const currentDataSet = variable.selectedDataSet || '';
|
|
27200
|
+
variableGroup.addControl('selectedDataSet', new FormControl(currentDataSet));
|
|
27201
|
+
}
|
|
27202
|
+
else {
|
|
27203
|
+
// Update form control value if variable has a selected data set
|
|
27204
|
+
if (variable.selectedDataSet) {
|
|
27205
|
+
variableGroup.get('selectedDataSet')?.setValue(variable.selectedDataSet, { emitEvent: false });
|
|
27206
|
+
}
|
|
27207
|
+
}
|
|
27208
|
+
}
|
|
27209
|
+
// Check if default values are set - if so, disable the dropdown
|
|
27210
|
+
const isDisabled = this.hasDefaultTestDataSelection();
|
|
27211
|
+
const config = {
|
|
27212
|
+
key: 'selectedDataSet',
|
|
27213
|
+
placeholder: 'Select Data Set',
|
|
27214
|
+
multiple: false,
|
|
27215
|
+
searchable: false,
|
|
27216
|
+
options: optionsArray,
|
|
27217
|
+
hasMore: false,
|
|
27218
|
+
isLoading: false,
|
|
27219
|
+
disabled: isDisabled,
|
|
27220
|
+
onChange: (value) => {
|
|
27221
|
+
// Store selected data set
|
|
27222
|
+
variable.selectedDataSet = value;
|
|
27223
|
+
// Clear parameter selection when data set changes
|
|
27224
|
+
variable.rawValue = '';
|
|
27225
|
+
variable.value = '';
|
|
27226
|
+
// Update form controls
|
|
27227
|
+
const varGroup = this.getVariableFormGroup(variable.name);
|
|
27228
|
+
if (varGroup) {
|
|
27229
|
+
if (varGroup.get('selectedDataSet')) {
|
|
27230
|
+
varGroup.get('selectedDataSet')?.setValue(value, { emitEvent: false });
|
|
27231
|
+
}
|
|
27232
|
+
if (varGroup.get('value')) {
|
|
27233
|
+
varGroup.get('value')?.setValue('', { emitEvent: false });
|
|
27234
|
+
}
|
|
27235
|
+
}
|
|
27236
|
+
// Clear caches for parameter select config since data set changed
|
|
27237
|
+
const paramKeysToDelete = [];
|
|
27238
|
+
this.parameterForDataSetSelectConfigCache.forEach((configValue, key) => {
|
|
27239
|
+
if (key.startsWith(`${variable.name}_paramForDataSet_`)) {
|
|
27240
|
+
paramKeysToDelete.push(key);
|
|
27241
|
+
}
|
|
27242
|
+
});
|
|
27243
|
+
paramKeysToDelete.forEach(key => this.parameterForDataSetSelectConfigCache.delete(key));
|
|
27244
|
+
// Mark for check
|
|
27245
|
+
this.cdr.markForCheck();
|
|
27246
|
+
}
|
|
27247
|
+
};
|
|
27248
|
+
this.dataSetSelectConfigCache.set(cacheKey, config);
|
|
27249
|
+
return config;
|
|
27250
|
+
}
|
|
27251
|
+
/**
|
|
27252
|
+
* Get select config for parameter dropdown (third dropdown for parameters - shows parameters from selected data set)
|
|
27253
|
+
*/
|
|
27254
|
+
getParameterSelectConfig(variable, index) {
|
|
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
|
+
variableGroup.get('value')?.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
|
+
// Value received is the formatted value (e.g., "@|email|") because mat-option uses opt.id
|
|
27308
|
+
// Extract parameter name from formatted value
|
|
27309
|
+
const formattedValue = value; // This is already formatted as @|paramName|
|
|
27310
|
+
const paramName = formattedValue.startsWith('@|') && formattedValue.endsWith('|')
|
|
27311
|
+
? formattedValue.slice(2, -1)
|
|
27312
|
+
: formattedValue;
|
|
27313
|
+
// Update raw value (store parameter name without formatting)
|
|
27314
|
+
variable.rawValue = paramName;
|
|
27315
|
+
// Update variable value (store formatted value for template)
|
|
27316
|
+
variable.value = formattedValue;
|
|
27317
|
+
// Update form control in FormArray - use formatted value (matches opt.id) so select displays correctly
|
|
27318
|
+
const varGroup = this.getVariableFormGroup(variable.name);
|
|
27319
|
+
if (varGroup && varGroup.get('value')) {
|
|
27320
|
+
// Set to formatted value so the select can match and display the selected option
|
|
27321
|
+
varGroup.get('value')?.setValue(formattedValue, { emitEvent: false });
|
|
27322
|
+
}
|
|
27323
|
+
// Mark for check and emit
|
|
27324
|
+
this.cdr.markForCheck();
|
|
27325
|
+
// Emit formatted value for parent component (this is what gets used in the template)
|
|
27326
|
+
this.variableValueChange.emit({ name: variable.name, value: formattedValue });
|
|
27327
|
+
}
|
|
27328
|
+
};
|
|
27329
|
+
this.parameterForDataSetSelectConfigCache.set(cacheKey, config);
|
|
27330
|
+
return config;
|
|
27331
|
+
}
|
|
27332
|
+
/**
|
|
27333
|
+
* Get unique environments from environment options
|
|
27334
|
+
*/
|
|
27335
|
+
getUniqueEnvironments() {
|
|
27336
|
+
const envMap = new Map();
|
|
27337
|
+
this.environmentOptions.forEach(env => {
|
|
27338
|
+
if (!envMap.has(env.environment)) {
|
|
27339
|
+
envMap.set(env.environment, {
|
|
27340
|
+
id: env.environment,
|
|
27341
|
+
name: env.environment
|
|
27342
|
+
});
|
|
27343
|
+
}
|
|
27344
|
+
});
|
|
27345
|
+
return Array.from(envMap.values());
|
|
27346
|
+
}
|
|
27347
|
+
/**
|
|
27348
|
+
* Get parameters for a specific environment
|
|
27349
|
+
*/
|
|
27350
|
+
getParametersForEnvironment(environmentName) {
|
|
27351
|
+
return this.environmentOptions
|
|
27352
|
+
.filter(env => env.environment === environmentName)
|
|
27353
|
+
.map(env => ({
|
|
27354
|
+
id: env.name,
|
|
27355
|
+
name: env.name
|
|
27356
|
+
}));
|
|
27357
|
+
}
|
|
27358
|
+
/**
|
|
27359
|
+
* Get select config for environment dropdown (first dropdown - select environment)
|
|
27360
|
+
*/
|
|
27361
|
+
getEnvironmentSelectConfig(variable, index) {
|
|
27362
|
+
const cacheKey = `${variable.name}_environment`;
|
|
27363
|
+
if (this.environmentSelectConfigCache.has(cacheKey)) {
|
|
27364
|
+
return this.environmentSelectConfigCache.get(cacheKey);
|
|
27365
|
+
}
|
|
27366
|
+
// Get unique environments
|
|
27367
|
+
const uniqueEnvironments = this.getUniqueEnvironments();
|
|
27368
|
+
const optionsArray = uniqueEnvironments.map(env => ({
|
|
27369
|
+
id: env.id,
|
|
27370
|
+
value: env.name,
|
|
27371
|
+
name: env.name,
|
|
27372
|
+
label: env.name
|
|
27373
|
+
}));
|
|
27374
|
+
// Ensure form control exists for environment selection
|
|
27375
|
+
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
27376
|
+
if (variableGroup && !variableGroup.get('selectedEnvironment')) {
|
|
27377
|
+
const currentEnv = variable.selectedEnvironment || '';
|
|
27378
|
+
variableGroup.addControl('selectedEnvironment', new FormControl(currentEnv));
|
|
27379
|
+
}
|
|
27380
|
+
const config = {
|
|
27381
|
+
key: 'selectedEnvironment',
|
|
27382
|
+
placeholder: `Select Environment`,
|
|
27383
|
+
multiple: false,
|
|
27384
|
+
searchable: true,
|
|
27385
|
+
serverSearch: true,
|
|
27386
|
+
options: optionsArray,
|
|
27387
|
+
hasMore: this.hasMoreEnvironments,
|
|
27388
|
+
isLoading: this.isLoadingEnvironments,
|
|
27389
|
+
onChange: (value) => {
|
|
27390
|
+
// Store selected environment name on the variable object
|
|
27391
|
+
variable.selectedEnvironment = value;
|
|
27392
|
+
// Extract and store environment ID from environmentOptions
|
|
27393
|
+
// Find the first environment option with matching environment name to get the ID
|
|
27394
|
+
const envOption = this.environmentOptions.find(env => env.environment === value);
|
|
27395
|
+
if (envOption) {
|
|
27396
|
+
// Extract numeric ID from envOption.id (format: "env-74-test" -> 74)
|
|
27397
|
+
const idMatch = envOption.id.match(/env-(\d+)-/);
|
|
27398
|
+
if (idMatch && idMatch[1]) {
|
|
27399
|
+
variable.selectedEnvironmentId = parseInt(idMatch[1], 10);
|
|
27400
|
+
}
|
|
27401
|
+
}
|
|
27402
|
+
// Clear the parameter selection when environment changes
|
|
27403
|
+
variable.rawValue = undefined;
|
|
27404
|
+
variable.value = '';
|
|
27405
|
+
// Clear environment parameter config cache to force refresh
|
|
27406
|
+
this.environmentParameterSelectConfigCache.delete(`${variable.name}_envParam`);
|
|
27407
|
+
// Update form control
|
|
27408
|
+
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
27409
|
+
if (variableGroup) {
|
|
27410
|
+
if (variableGroup.get('value')) {
|
|
27411
|
+
variableGroup.get('value')?.setValue('', { emitEvent: false });
|
|
27412
|
+
}
|
|
27413
|
+
// Update selectedEnvironment control
|
|
27414
|
+
if (variableGroup.get('selectedEnvironment')) {
|
|
27415
|
+
variableGroup.get('selectedEnvironment')?.setValue(value, { emitEvent: false });
|
|
27416
|
+
}
|
|
27417
|
+
}
|
|
27418
|
+
// Pre-compute environment parameter config for the new environment
|
|
27419
|
+
const index = this.templateVariables.findIndex(v => v.name === variable.name);
|
|
27420
|
+
if (index !== -1) {
|
|
27421
|
+
this.getEnvironmentParameterSelectConfig(variable, index);
|
|
27422
|
+
}
|
|
27423
|
+
// Mark for check to update UI
|
|
27424
|
+
this.cdr.markForCheck();
|
|
27425
|
+
},
|
|
27426
|
+
onLoadMore: () => {
|
|
27427
|
+
this.loadMoreEnvironments.emit();
|
|
27428
|
+
},
|
|
27429
|
+
onSearch: (query) => {
|
|
27430
|
+
this.searchEnvironments.emit(query);
|
|
27431
|
+
}
|
|
27432
|
+
};
|
|
27433
|
+
this.environmentSelectConfigCache.set(cacheKey, config);
|
|
27434
|
+
return config;
|
|
27435
|
+
}
|
|
27436
|
+
/**
|
|
27437
|
+
* Get select config for environment parameter dropdown (second dropdown - select parameter from environment)
|
|
27438
|
+
*/
|
|
27439
|
+
getEnvironmentParameterSelectConfig(variable, index) {
|
|
27440
|
+
const cacheKey = `${variable.name}_envParam`;
|
|
27441
|
+
if (this.environmentParameterSelectConfigCache.has(cacheKey)) {
|
|
27442
|
+
return this.environmentParameterSelectConfigCache.get(cacheKey);
|
|
27443
|
+
}
|
|
27444
|
+
// Get selected environment
|
|
27445
|
+
const selectedEnvironment = variable.selectedEnvironment;
|
|
27446
|
+
if (!selectedEnvironment) {
|
|
27447
|
+
// Return empty config if no environment is selected
|
|
27448
|
+
return {
|
|
27449
|
+
key: 'value',
|
|
27450
|
+
placeholder: 'Select Environment first',
|
|
27451
|
+
multiple: false,
|
|
27452
|
+
searchable: false,
|
|
27453
|
+
options: []
|
|
27454
|
+
};
|
|
27455
|
+
}
|
|
27456
|
+
// Get parameters for the selected environment
|
|
27457
|
+
const parameters = this.getParametersForEnvironment(selectedEnvironment);
|
|
27458
|
+
const optionsArray = parameters.map(param => ({
|
|
27459
|
+
id: `*|${param.name}|`,
|
|
27460
|
+
value: `*|${param.name}|`,
|
|
27461
|
+
name: param.name,
|
|
27462
|
+
label: param.name
|
|
27463
|
+
}));
|
|
27464
|
+
const config = {
|
|
27465
|
+
key: 'value',
|
|
27466
|
+
placeholder: `Select Parameter`,
|
|
27467
|
+
multiple: false,
|
|
27468
|
+
searchable: false,
|
|
27469
|
+
options: optionsArray,
|
|
27470
|
+
onChange: (value) => {
|
|
27471
|
+
// When parameter is selected, update raw value and format it
|
|
27472
|
+
variable.rawValue = value;
|
|
27473
|
+
const formattedValue = `${value}`;
|
|
27474
|
+
// Update variable value (store formatted value)
|
|
27475
|
+
variable.value = formattedValue;
|
|
27476
|
+
// Environment ID is already stored on variable.selectedEnvironmentId
|
|
27477
|
+
// (it was set when environment was selected)
|
|
27478
|
+
// Update form control in FormArray - keep raw value so select displays correctly
|
|
27479
|
+
const variableGroup = this.getVariableFormGroup(variable.name);
|
|
27480
|
+
if (variableGroup && variableGroup.get('value')) {
|
|
27481
|
+
// Set to raw value so the select can match and display the selected option
|
|
27482
|
+
variableGroup.get('value')?.setValue(value, { emitEvent: false });
|
|
27483
|
+
}
|
|
27484
|
+
// Mark for check and emit
|
|
27485
|
+
this.cdr.markForCheck();
|
|
27486
|
+
// Emit formatted value for parent component
|
|
27487
|
+
this.variableValueChange.emit({ name: variable.name, value: formattedValue });
|
|
27488
|
+
}
|
|
27489
|
+
};
|
|
27490
|
+
this.environmentParameterSelectConfigCache.set(cacheKey, config);
|
|
27491
|
+
return config;
|
|
27492
|
+
}
|
|
27493
|
+
/**
|
|
27494
|
+
* Get selected environment for a variable
|
|
27495
|
+
*/
|
|
27496
|
+
getSelectedEnvironment(variable) {
|
|
27497
|
+
return variable.selectedEnvironment || '';
|
|
27498
|
+
}
|
|
27499
|
+
/**
|
|
27500
|
+
* Check if environment is selected for a variable
|
|
27501
|
+
*/
|
|
27502
|
+
hasSelectedEnvironment(variable) {
|
|
27503
|
+
return !!variable.selectedEnvironment;
|
|
27504
|
+
}
|
|
27505
|
+
/**
|
|
27506
|
+
* Get selected environment ID for a variable
|
|
27507
|
+
*/
|
|
27508
|
+
getSelectedEnvironmentId(variable) {
|
|
27509
|
+
return variable.selectedEnvironmentId || null;
|
|
27510
|
+
}
|
|
27511
|
+
/**
|
|
27512
|
+
* Get all environment IDs for variables that use environment type
|
|
27513
|
+
* Returns a map of variable name to environment ID
|
|
27514
|
+
*/
|
|
27515
|
+
getEnvironmentIdsForVariables() {
|
|
27516
|
+
const envIds = new Map();
|
|
27517
|
+
this.templateVariables.forEach(variable => {
|
|
27518
|
+
if (this.isEnvironmentType(variable) && variable.selectedEnvironmentId) {
|
|
27519
|
+
envIds.set(variable.name, variable.selectedEnvironmentId);
|
|
27520
|
+
}
|
|
27521
|
+
});
|
|
27522
|
+
return envIds;
|
|
27523
|
+
}
|
|
27524
|
+
/**
|
|
27525
|
+
* Check if current data type is plain-text
|
|
27526
|
+
*/
|
|
27527
|
+
isPlainTextType(variable) {
|
|
27528
|
+
const dataType = variable.dataType || 'plain-text';
|
|
27529
|
+
return dataType === 'plain-text';
|
|
27530
|
+
}
|
|
27531
|
+
/**
|
|
27532
|
+
* Check if current data type is parameter
|
|
27533
|
+
*/
|
|
27534
|
+
isParameterType(variable) {
|
|
27535
|
+
const dataType = variable.dataType || 'plain-text';
|
|
27536
|
+
return dataType === 'parameter';
|
|
27537
|
+
}
|
|
27538
|
+
/**
|
|
27539
|
+
* Check if test data profile is selected for a variable
|
|
27540
|
+
*/
|
|
27541
|
+
hasSelectedTestDataProfile(variable) {
|
|
27542
|
+
return !!variable.selectedTestDataProfile;
|
|
27543
|
+
}
|
|
27544
|
+
/**
|
|
27545
|
+
* Check if data set is selected for a variable
|
|
27546
|
+
*/
|
|
27547
|
+
hasSelectedDataSet(variable) {
|
|
27548
|
+
return !!variable.selectedDataSet;
|
|
27549
|
+
}
|
|
27550
|
+
/**
|
|
27551
|
+
* Check if default test data profile and data set are set (from test case)
|
|
27552
|
+
* If true, profile and data set dropdowns should be disabled
|
|
27553
|
+
*/
|
|
27554
|
+
hasDefaultTestDataSelection() {
|
|
27555
|
+
return !!(this.defaultTestDataProfileId != null && this.defaultTestDataStartIndex != null);
|
|
27556
|
+
}
|
|
27557
|
+
/**
|
|
27558
|
+
* Check if current data type is environment
|
|
27559
|
+
*/
|
|
27560
|
+
isEnvironmentType(variable) {
|
|
27561
|
+
const dataType = variable.dataType || 'plain-text';
|
|
27562
|
+
return dataType === 'environment';
|
|
27563
|
+
}
|
|
27564
|
+
/**
|
|
27565
|
+
* Check if current data type is runtime
|
|
27566
|
+
*/
|
|
27567
|
+
isRuntimeType(variable) {
|
|
27568
|
+
const dataType = variable.dataType || 'plain-text';
|
|
27569
|
+
return dataType === 'runtime';
|
|
27570
|
+
}
|
|
26595
27571
|
}
|
|
26596
27572
|
TemplateVariablesFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TemplateVariablesFormComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
26597
|
-
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 });
|
|
27573
|
+
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 });
|
|
26598
27574
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TemplateVariablesFormComponent, decorators: [{
|
|
26599
27575
|
type: Component,
|
|
26600
|
-
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
|
|
27576
|
+
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"] }]
|
|
26601
27577
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { templateVariables: [{
|
|
26602
27578
|
type: Input
|
|
26603
27579
|
}], variablesForm: [{
|
|
@@ -26618,6 +27594,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
26618
27594
|
type: Input
|
|
26619
27595
|
}], isLoadingScreenNames: [{
|
|
26620
27596
|
type: Input
|
|
27597
|
+
}], parameterOptions: [{
|
|
27598
|
+
type: Input
|
|
27599
|
+
}], hasMoreParameters: [{
|
|
27600
|
+
type: Input
|
|
27601
|
+
}], isLoadingParameters: [{
|
|
27602
|
+
type: Input
|
|
27603
|
+
}], environmentOptions: [{
|
|
27604
|
+
type: Input
|
|
27605
|
+
}], hasMoreEnvironments: [{
|
|
27606
|
+
type: Input
|
|
27607
|
+
}], isLoadingEnvironments: [{
|
|
27608
|
+
type: Input
|
|
27609
|
+
}], defaultTestDataProfileId: [{
|
|
27610
|
+
type: Input
|
|
27611
|
+
}], defaultTestDataStartIndex: [{
|
|
27612
|
+
type: Input
|
|
26621
27613
|
}], variableValueChange: [{
|
|
26622
27614
|
type: Output
|
|
26623
27615
|
}], variableBooleanChange: [{
|
|
@@ -26638,10 +27630,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
26638
27630
|
type: Output
|
|
26639
27631
|
}], createScreenNameRequest: [{
|
|
26640
27632
|
type: Output
|
|
27633
|
+
}], searchParameters: [{
|
|
27634
|
+
type: Output
|
|
27635
|
+
}], loadMoreParameters: [{
|
|
27636
|
+
type: Output
|
|
27637
|
+
}], searchEnvironments: [{
|
|
27638
|
+
type: Output
|
|
27639
|
+
}], loadMoreEnvironments: [{
|
|
27640
|
+
type: Output
|
|
26641
27641
|
}], cancelElementForm: [{
|
|
26642
27642
|
type: Output
|
|
26643
27643
|
}], elementFormVisibilityChange: [{
|
|
26644
27644
|
type: Output
|
|
27645
|
+
}], createElementVisible: [{
|
|
27646
|
+
type: Input
|
|
26645
27647
|
}] } });
|
|
26646
27648
|
|
|
26647
27649
|
class StepBuilderActionComponent {
|
|
@@ -26664,6 +27666,18 @@ class StepBuilderActionComponent {
|
|
|
26664
27666
|
this.hasMoreScreenNames = false;
|
|
26665
27667
|
/** True while parent is loading screen names (search or load more) */
|
|
26666
27668
|
this.isLoadingScreenNames = false;
|
|
27669
|
+
/** Parameter options for test data parameter dropdown (from API) */
|
|
27670
|
+
this.parameterOptions = []; // TestData[] - raw test data profiles
|
|
27671
|
+
/** Whether more parameters are available for infinite scroll */
|
|
27672
|
+
this.hasMoreParameters = false;
|
|
27673
|
+
/** True while parent is loading parameters (search or load more) */
|
|
27674
|
+
this.isLoadingParameters = false;
|
|
27675
|
+
/** Environment options for environment parameter dropdown (from API) */
|
|
27676
|
+
this.environmentOptions = [];
|
|
27677
|
+
/** Whether more environments are available for infinite scroll */
|
|
27678
|
+
this.hasMoreEnvironments = false;
|
|
27679
|
+
/** True while parent is loading environments (search or load more) */
|
|
27680
|
+
this.isLoadingEnvironments = false;
|
|
26667
27681
|
this.templateChanged = new EventEmitter();
|
|
26668
27682
|
this.loadMoreElements = new EventEmitter(); // Emit when load more is requested
|
|
26669
27683
|
this.searchElements = new EventEmitter(); // Emit when user searches for elements
|
|
@@ -26671,10 +27685,16 @@ class StepBuilderActionComponent {
|
|
|
26671
27685
|
this.searchScreenName = new EventEmitter(); // Emit when user searches screen names
|
|
26672
27686
|
this.loadMoreScreenNames = new EventEmitter(); // Emit when user scrolls to load more screen names
|
|
26673
27687
|
this.createScreenNameRequest = new EventEmitter(); // Emit when user requests to create a new screen name
|
|
27688
|
+
this.searchParameters = new EventEmitter(); // Emit when user searches for parameters
|
|
27689
|
+
this.loadMoreParameters = new EventEmitter(); // Emit when user scrolls to load more parameters
|
|
27690
|
+
this.searchEnvironments = new EventEmitter(); // Emit when user searches for environments
|
|
27691
|
+
this.loadMoreEnvironments = new EventEmitter(); // Emit when user scrolls to load more environments
|
|
26674
27692
|
/** Emit when step is created */
|
|
26675
27693
|
this.createStep = new EventEmitter();
|
|
26676
27694
|
/** Emit when cancelled */
|
|
26677
27695
|
this.cancelled = new EventEmitter();
|
|
27696
|
+
this.redirectToParameter = new EventEmitter();
|
|
27697
|
+
this.redirectToEnvironment = new EventEmitter();
|
|
26678
27698
|
this.filteredTemplates = [];
|
|
26679
27699
|
this.searchValue = '';
|
|
26680
27700
|
this.selectedTemplate = null;
|
|
@@ -26683,8 +27703,7 @@ class StepBuilderActionComponent {
|
|
|
26683
27703
|
this.advancedExpanded = false;
|
|
26684
27704
|
this.templateVariables = [];
|
|
26685
27705
|
this.updatedHtmlGrammar = ''; // Updated HTML grammar with variable values
|
|
26686
|
-
|
|
26687
|
-
this.isElementFormVisible = false;
|
|
27706
|
+
this.createElementVisible = false;
|
|
26688
27707
|
// Cache for select configs to avoid recalculating on every change detection
|
|
26689
27708
|
this.selectConfigCache = new Map();
|
|
26690
27709
|
this.formValidCache = false;
|
|
@@ -26696,7 +27715,10 @@ class StepBuilderActionComponent {
|
|
|
26696
27715
|
* Handle element form visibility change
|
|
26697
27716
|
*/
|
|
26698
27717
|
onElementFormVisibilityChange(visible) {
|
|
26699
|
-
this.
|
|
27718
|
+
this.createElementVisible = visible;
|
|
27719
|
+
}
|
|
27720
|
+
onShowElementForm() {
|
|
27721
|
+
this.createElementVisible = true;
|
|
26700
27722
|
}
|
|
26701
27723
|
ngOnInit() {
|
|
26702
27724
|
this.filteredTemplates = [...this.templates];
|
|
@@ -26817,7 +27839,7 @@ class StepBuilderActionComponent {
|
|
|
26817
27839
|
});
|
|
26818
27840
|
// Add dataType control for test-data variables if needed
|
|
26819
27841
|
const label = variable.label?.toLowerCase() || '';
|
|
26820
|
-
if (label === '
|
|
27842
|
+
if (label === 'test_data' || label === 'source-value' || label === 'target-value' ||
|
|
26821
27843
|
label === 'source_value' || label === 'target_value') {
|
|
26822
27844
|
// Parse the value to determine data type
|
|
26823
27845
|
const valueStr = String(defaultValue || '');
|
|
@@ -26894,7 +27916,7 @@ class StepBuilderActionComponent {
|
|
|
26894
27916
|
});
|
|
26895
27917
|
// Add dataType control for test-data variables if needed
|
|
26896
27918
|
const label = variable.label?.toLowerCase() || '';
|
|
26897
|
-
if (label === '
|
|
27919
|
+
if (label === 'test_data' || label === 'source-value' || label === 'target-value' ||
|
|
26898
27920
|
label === 'source_value' || label === 'target_value') {
|
|
26899
27921
|
const valueStr = String(defaultValue || '');
|
|
26900
27922
|
let dataType = 'plain-text';
|
|
@@ -27011,14 +28033,18 @@ class StepBuilderActionComponent {
|
|
|
27011
28033
|
if (!this.isFormValid()) {
|
|
27012
28034
|
return;
|
|
27013
28035
|
}
|
|
28036
|
+
// Get environment IDs from template variables (if any environment type variables are selected)
|
|
28037
|
+
const environmentIds = this.templateVariablesForm?.getEnvironmentIdsForVariables() || new Map();
|
|
27014
28038
|
const stepData = {
|
|
27015
28039
|
template: this.selectedTemplate,
|
|
27016
28040
|
metadata: this.metadata,
|
|
27017
28041
|
description: this.description,
|
|
27018
|
-
templateVariables: this.templateVariables
|
|
28042
|
+
templateVariables: this.templateVariables,
|
|
28043
|
+
environmentIds: environmentIds // Map of variable name to environment ID
|
|
27019
28044
|
};
|
|
27020
28045
|
console.log("stepData", stepData);
|
|
27021
28046
|
console.log("variablesForm", this.variablesForm.value);
|
|
28047
|
+
console.log("environmentIds", environmentIds);
|
|
27022
28048
|
this.createStep.emit(stepData);
|
|
27023
28049
|
}
|
|
27024
28050
|
toggleAdvanced() {
|
|
@@ -27097,12 +28123,44 @@ class StepBuilderActionComponent {
|
|
|
27097
28123
|
this.updatedHtmlGrammar = updatedHtml;
|
|
27098
28124
|
}
|
|
27099
28125
|
}
|
|
28126
|
+
/**
|
|
28127
|
+
* Check if selector variable is available in templateVariables
|
|
28128
|
+
*/
|
|
28129
|
+
get selectorVariableAvailable() {
|
|
28130
|
+
return this.templateVariables.some(v => v.dataKey === 'element' || v.dataKey === 'label');
|
|
28131
|
+
}
|
|
28132
|
+
/**
|
|
28133
|
+
* Check if parameter variable is available (testData with parameter type)
|
|
28134
|
+
*/
|
|
28135
|
+
get parameterVariableAvailable() {
|
|
28136
|
+
return this.templateVariables.some(v => {
|
|
28137
|
+
const dataKey = v.dataKey?.toLowerCase() || '';
|
|
28138
|
+
if (dataKey === 'test_data' || dataKey === 'source_value' || dataKey === 'target_value') {
|
|
28139
|
+
// const dataType = this.variableDataTypes.get(v.name) || 'plain-text';
|
|
28140
|
+
return true;
|
|
28141
|
+
}
|
|
28142
|
+
return false;
|
|
28143
|
+
});
|
|
28144
|
+
}
|
|
28145
|
+
/**
|
|
28146
|
+
* Check if environment variable is available (testData with environment type)
|
|
28147
|
+
*/
|
|
28148
|
+
get environmentVariableAvailable() {
|
|
28149
|
+
return this.templateVariables.some(v => {
|
|
28150
|
+
const dataKey = v.dataKey?.toLowerCase() || '';
|
|
28151
|
+
if (dataKey === 'test_data' || dataKey === 'source_value' || dataKey === 'target_value') {
|
|
28152
|
+
// const dataType = this.variableDataTypes.get(v.name) || 'plain-text';
|
|
28153
|
+
return true;
|
|
28154
|
+
}
|
|
28155
|
+
return false;
|
|
28156
|
+
});
|
|
28157
|
+
}
|
|
27100
28158
|
}
|
|
27101
28159
|
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 });
|
|
27102
|
-
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"] }] });
|
|
28160
|
+
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"] }] });
|
|
27103
28161
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: StepBuilderActionComponent, decorators: [{
|
|
27104
28162
|
type: Component,
|
|
27105
|
-
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=\"!
|
|
28163
|
+
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: [] }]
|
|
27106
28164
|
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }]; }, propDecorators: { showHeader: [{
|
|
27107
28165
|
type: Input
|
|
27108
28166
|
}], templates: [{
|
|
@@ -27125,6 +28183,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
27125
28183
|
type: Input
|
|
27126
28184
|
}], isLoadingScreenNames: [{
|
|
27127
28185
|
type: Input
|
|
28186
|
+
}], parameterOptions: [{
|
|
28187
|
+
type: Input
|
|
28188
|
+
}], hasMoreParameters: [{
|
|
28189
|
+
type: Input
|
|
28190
|
+
}], isLoadingParameters: [{
|
|
28191
|
+
type: Input
|
|
28192
|
+
}], environmentOptions: [{
|
|
28193
|
+
type: Input
|
|
28194
|
+
}], hasMoreEnvironments: [{
|
|
28195
|
+
type: Input
|
|
28196
|
+
}], isLoadingEnvironments: [{
|
|
28197
|
+
type: Input
|
|
28198
|
+
}], defaultTestDataProfileId: [{
|
|
28199
|
+
type: Input
|
|
28200
|
+
}], defaultTestDataStartIndex: [{
|
|
28201
|
+
type: Input
|
|
27128
28202
|
}], templateChanged: [{
|
|
27129
28203
|
type: Output
|
|
27130
28204
|
}], loadMoreElements: [{
|
|
@@ -27139,10 +28213,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
27139
28213
|
type: Output
|
|
27140
28214
|
}], createScreenNameRequest: [{
|
|
27141
28215
|
type: Output
|
|
28216
|
+
}], searchParameters: [{
|
|
28217
|
+
type: Output
|
|
28218
|
+
}], loadMoreParameters: [{
|
|
28219
|
+
type: Output
|
|
28220
|
+
}], searchEnvironments: [{
|
|
28221
|
+
type: Output
|
|
28222
|
+
}], loadMoreEnvironments: [{
|
|
28223
|
+
type: Output
|
|
27142
28224
|
}], createStep: [{
|
|
27143
28225
|
type: Output
|
|
27144
28226
|
}], cancelled: [{
|
|
27145
28227
|
type: Output
|
|
28228
|
+
}], redirectToParameter: [{
|
|
28229
|
+
type: Output
|
|
28230
|
+
}], redirectToEnvironment: [{
|
|
28231
|
+
type: Output
|
|
28232
|
+
}], templateVariablesForm: [{
|
|
28233
|
+
type: ViewChild,
|
|
28234
|
+
args: [TemplateVariablesFormComponent, { static: false }]
|
|
27146
28235
|
}] } });
|
|
27147
28236
|
|
|
27148
28237
|
class StepBuilderLoopComponent {
|
|
@@ -27183,6 +28272,14 @@ class StepBuilderLoopComponent {
|
|
|
27183
28272
|
this.screenNameOptions = [];
|
|
27184
28273
|
this.hasMoreScreenNames = false;
|
|
27185
28274
|
this.isLoadingScreenNames = false;
|
|
28275
|
+
// Parameter fetching properties
|
|
28276
|
+
this.parameterOptions = []; // TestData[] - raw test data profiles
|
|
28277
|
+
this.hasMoreParameters = false;
|
|
28278
|
+
this.isLoadingParameters = false;
|
|
28279
|
+
// Environment fetching properties
|
|
28280
|
+
this.environmentOptions = [];
|
|
28281
|
+
this.hasMoreEnvironments = false;
|
|
28282
|
+
this.isLoadingEnvironments = false;
|
|
27186
28283
|
this.loadMoreElements = new EventEmitter();
|
|
27187
28284
|
this.searchElements = new EventEmitter();
|
|
27188
28285
|
this.createElement = new EventEmitter();
|
|
@@ -27190,6 +28287,12 @@ class StepBuilderLoopComponent {
|
|
|
27190
28287
|
this.loadMoreScreenNames = new EventEmitter();
|
|
27191
28288
|
this.createScreenNameRequest = new EventEmitter();
|
|
27192
28289
|
this.cancelElementForm = new EventEmitter();
|
|
28290
|
+
this.searchParameters = new EventEmitter();
|
|
28291
|
+
this.loadMoreParameters = new EventEmitter();
|
|
28292
|
+
this.searchEnvironments = new EventEmitter();
|
|
28293
|
+
this.loadMoreEnvironments = new EventEmitter();
|
|
28294
|
+
this.redirectToParameter = new EventEmitter();
|
|
28295
|
+
this.redirectToEnvironment = new EventEmitter();
|
|
27193
28296
|
this.selectedWhileTemplate = null;
|
|
27194
28297
|
this.selectedLoopType = 'for';
|
|
27195
28298
|
// Internal state for managing loop indices
|
|
@@ -27533,10 +28636,10 @@ class StepBuilderLoopComponent {
|
|
|
27533
28636
|
}
|
|
27534
28637
|
}
|
|
27535
28638
|
StepBuilderLoopComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: StepBuilderLoopComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27536
|
-
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"] }] });
|
|
28639
|
+
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"] }] });
|
|
27537
28640
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: StepBuilderLoopComponent, decorators: [{
|
|
27538
28641
|
type: Component,
|
|
27539
|
-
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: [] }]
|
|
28642
|
+
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: [] }]
|
|
27540
28643
|
}], ctorParameters: function () { return []; }, propDecorators: { loopType: [{
|
|
27541
28644
|
type: Input
|
|
27542
28645
|
}], selectOptions: [{
|
|
@@ -27577,6 +28680,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
27577
28680
|
type: Input
|
|
27578
28681
|
}], isLoadingScreenNames: [{
|
|
27579
28682
|
type: Input
|
|
28683
|
+
}], parameterOptions: [{
|
|
28684
|
+
type: Input
|
|
28685
|
+
}], hasMoreParameters: [{
|
|
28686
|
+
type: Input
|
|
28687
|
+
}], isLoadingParameters: [{
|
|
28688
|
+
type: Input
|
|
28689
|
+
}], environmentOptions: [{
|
|
28690
|
+
type: Input
|
|
28691
|
+
}], hasMoreEnvironments: [{
|
|
28692
|
+
type: Input
|
|
28693
|
+
}], isLoadingEnvironments: [{
|
|
28694
|
+
type: Input
|
|
28695
|
+
}], defaultTestDataProfileId: [{
|
|
28696
|
+
type: Input
|
|
28697
|
+
}], defaultTestDataStartIndex: [{
|
|
28698
|
+
type: Input
|
|
27580
28699
|
}], loadMoreElements: [{
|
|
27581
28700
|
type: Output
|
|
27582
28701
|
}], searchElements: [{
|
|
@@ -27591,6 +28710,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
27591
28710
|
type: Output
|
|
27592
28711
|
}], cancelElementForm: [{
|
|
27593
28712
|
type: Output
|
|
28713
|
+
}], searchParameters: [{
|
|
28714
|
+
type: Output
|
|
28715
|
+
}], loadMoreParameters: [{
|
|
28716
|
+
type: Output
|
|
28717
|
+
}], searchEnvironments: [{
|
|
28718
|
+
type: Output
|
|
28719
|
+
}], loadMoreEnvironments: [{
|
|
28720
|
+
type: Output
|
|
28721
|
+
}], redirectToParameter: [{
|
|
28722
|
+
type: Output
|
|
28723
|
+
}], redirectToEnvironment: [{
|
|
28724
|
+
type: Output
|
|
27594
28725
|
}] } });
|
|
27595
28726
|
|
|
27596
28727
|
class StepBuilderConditionComponent {
|
|
@@ -27619,6 +28750,14 @@ class StepBuilderConditionComponent {
|
|
|
27619
28750
|
this.hasMoreScreenNames = false;
|
|
27620
28751
|
/** True while parent is loading screen names (search or load more) */
|
|
27621
28752
|
this.isLoadingScreenNames = false;
|
|
28753
|
+
/** Parameter fetching properties */
|
|
28754
|
+
this.parameterOptions = []; // TestData[] - raw test data profiles
|
|
28755
|
+
this.hasMoreParameters = false;
|
|
28756
|
+
this.isLoadingParameters = false;
|
|
28757
|
+
/** Environment fetching properties */
|
|
28758
|
+
this.environmentOptions = [];
|
|
28759
|
+
this.hasMoreEnvironments = false;
|
|
28760
|
+
this.isLoadingEnvironments = false;
|
|
27622
28761
|
/** Emit when step is created */
|
|
27623
28762
|
this.createStep = new EventEmitter();
|
|
27624
28763
|
/** Emit when cancelled */
|
|
@@ -27629,6 +28768,12 @@ class StepBuilderConditionComponent {
|
|
|
27629
28768
|
this.searchScreenName = new EventEmitter(); // Emit when user searches screen names
|
|
27630
28769
|
this.loadMoreScreenNames = new EventEmitter(); // Emit when user scrolls to load more screen names
|
|
27631
28770
|
this.createScreenNameRequest = new EventEmitter(); // Emit when user requests to create a new screen name
|
|
28771
|
+
this.searchParameters = new EventEmitter(); // Emit when user searches for parameters
|
|
28772
|
+
this.loadMoreParameters = new EventEmitter(); // Emit when user scrolls to load more parameters
|
|
28773
|
+
this.searchEnvironments = new EventEmitter(); // Emit when user searches for environments
|
|
28774
|
+
this.loadMoreEnvironments = new EventEmitter(); // Emit when user scrolls to load more environments
|
|
28775
|
+
this.redirectToParameter = new EventEmitter();
|
|
28776
|
+
this.redirectToEnvironment = new EventEmitter();
|
|
27632
28777
|
this.includeElse = false;
|
|
27633
28778
|
// Cache for value configs to avoid recreating on every change detection
|
|
27634
28779
|
this.valueConfigCache = null;
|
|
@@ -28114,10 +29259,10 @@ class StepBuilderConditionComponent {
|
|
|
28114
29259
|
}
|
|
28115
29260
|
}
|
|
28116
29261
|
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 });
|
|
28117
|
-
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 });
|
|
29262
|
+
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 });
|
|
28118
29263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: StepBuilderConditionComponent, decorators: [{
|
|
28119
29264
|
type: Component,
|
|
28120
|
-
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
|
|
29265
|
+
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: [] }]
|
|
28121
29266
|
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { operatorOptions: [{
|
|
28122
29267
|
type: Input
|
|
28123
29268
|
}], conditionTemplates: [{
|
|
@@ -28136,6 +29281,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
28136
29281
|
type: Input
|
|
28137
29282
|
}], isLoadingScreenNames: [{
|
|
28138
29283
|
type: Input
|
|
29284
|
+
}], parameterOptions: [{
|
|
29285
|
+
type: Input
|
|
29286
|
+
}], hasMoreParameters: [{
|
|
29287
|
+
type: Input
|
|
29288
|
+
}], isLoadingParameters: [{
|
|
29289
|
+
type: Input
|
|
29290
|
+
}], environmentOptions: [{
|
|
29291
|
+
type: Input
|
|
29292
|
+
}], hasMoreEnvironments: [{
|
|
29293
|
+
type: Input
|
|
29294
|
+
}], isLoadingEnvironments: [{
|
|
29295
|
+
type: Input
|
|
29296
|
+
}], defaultTestDataProfileId: [{
|
|
29297
|
+
type: Input
|
|
29298
|
+
}], defaultTestDataStartIndex: [{
|
|
29299
|
+
type: Input
|
|
28139
29300
|
}], createStep: [{
|
|
28140
29301
|
type: Output
|
|
28141
29302
|
}], cancelled: [{
|
|
@@ -28152,6 +29313,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
28152
29313
|
type: Output
|
|
28153
29314
|
}], createScreenNameRequest: [{
|
|
28154
29315
|
type: Output
|
|
29316
|
+
}], searchParameters: [{
|
|
29317
|
+
type: Output
|
|
29318
|
+
}], loadMoreParameters: [{
|
|
29319
|
+
type: Output
|
|
29320
|
+
}], searchEnvironments: [{
|
|
29321
|
+
type: Output
|
|
29322
|
+
}], loadMoreEnvironments: [{
|
|
29323
|
+
type: Output
|
|
29324
|
+
}], redirectToParameter: [{
|
|
29325
|
+
type: Output
|
|
29326
|
+
}], redirectToEnvironment: [{
|
|
29327
|
+
type: Output
|
|
28155
29328
|
}] } });
|
|
28156
29329
|
|
|
28157
29330
|
class StepBuilderDatabaseComponent {
|