@cqa-lib/cqa-ui 1.1.283 → 1.1.284

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.
@@ -25896,6 +25896,8 @@ class CreateStepGroupComponent {
25896
25896
  constructor(fb) {
25897
25897
  this.fb = fb;
25898
25898
  this.stepsToGroup = [];
25899
+ /** Pre-computed display labels from host (same order as stepsToGroup). When provided, used instead of computing from step. */
25900
+ this.stepLabels = [];
25899
25901
  this.createGroup = new EventEmitter();
25900
25902
  this.cancelled = new EventEmitter();
25901
25903
  this.form = this.fb.group({
@@ -25911,8 +25913,11 @@ class CreateStepGroupComponent {
25911
25913
  ? 'Group 1 selected step into a container'
25912
25914
  : `Group ${n} selected steps into a container`;
25913
25915
  }
25914
- /** Display label for a step in the "Steps to group" list (same as main step list - use action when available). */
25916
+ /** Display label for a step in the "Steps to group" list (same as main step list - use stepLabels when provided). */
25915
25917
  getStepDisplayLabel(step, index) {
25918
+ if (this.stepLabels?.length > index && this.stepLabels[index] != null && this.stepLabels[index] !== '') {
25919
+ return this.stepLabels[index];
25920
+ }
25916
25921
  // Prefer step.action - it matches the full display in the step list (e.g. "Enter @|password| in the Email")
25917
25922
  const rawAction = step.action != null && String(step.action).trim() !== '' ? String(step.action) : '';
25918
25923
  if (rawAction) {
@@ -25954,19 +25959,57 @@ class CreateStepGroupComponent {
25954
25959
  const params = step.parameters ?? [];
25955
25960
  const getParam = (name) => params.find((p) => p.name?.toLowerCase() === name.toLowerCase());
25956
25961
  const val = (p) => p?.displayValue ?? p?.value ?? '';
25962
+ /** Use raw value (strip surrounding quotes from displayValue) for building full sentences */
25963
+ const rawVal = (p) => {
25964
+ const v = p?.value ?? p?.displayValue ?? '';
25965
+ const s = String(v);
25966
+ return s.replace(/^["']|["']$/g, '').trim() || s;
25967
+ };
25957
25968
  switch (step.eventType) {
25958
25969
  case 'navigate': {
25959
- const url = getParam('url');
25960
- return url ? `Navigate to ${val(url)}` : 'Navigate';
25970
+ const url = getParam('url') ?? params.find((p) => /url|baseUrl/i.test(p.name || ''));
25971
+ return url ? `Navigate to ${rawVal(url)}` : 'Navigate';
25972
+ }
25973
+ case 'enter': {
25974
+ const valueParam = getParam('value');
25975
+ const labelParam = getParam('label');
25976
+ const value = rawVal(valueParam);
25977
+ const label = rawVal(labelParam);
25978
+ if (value && label)
25979
+ return `Enter ${value} in the ${label}`;
25980
+ if (value)
25981
+ return `Enter ${value}`;
25982
+ if (label)
25983
+ return `Enter in the ${label}`;
25984
+ return 'Enter';
25961
25985
  }
25962
25986
  case 'ai-agent': {
25963
25987
  const instructions = getParam('instructions') ?? getParam('description');
25964
25988
  return val(instructions) || 'AI Agent step';
25965
25989
  }
25966
- case 'type':
25967
- return val(getParam('text')) || 'Type';
25968
- case 'click':
25969
- return val(getParam('selector')) ? `Click ${val(getParam('selector'))}` : 'Click';
25990
+ case 'type': {
25991
+ const textParam = getParam('text') ?? getParam('value');
25992
+ const elementParam = getParam('element') ?? getParam('label') ?? getParam('selector');
25993
+ const text = rawVal(textParam);
25994
+ const element = rawVal(elementParam);
25995
+ if (text && element)
25996
+ return `Enter ${text} in the ${element}`;
25997
+ if (text)
25998
+ return `Enter ${text}`;
25999
+ return 'Type';
26000
+ }
26001
+ case 'click': {
26002
+ const selector = getParam('element') ?? getParam('selector');
26003
+ return selector ? `Click on ${rawVal(selector)}` : 'Click';
26004
+ }
26005
+ case 'doubleClick': {
26006
+ const selector = getParam('element') ?? getParam('selector');
26007
+ return selector ? `Double click on ${rawVal(selector)}` : 'Double click';
26008
+ }
26009
+ case 'pressEnter': {
26010
+ const element = getParam('element');
26011
+ return element ? `Press Enter on ${rawVal(element)}` : 'Press Enter';
26012
+ }
25970
26013
  case 'verify':
25971
26014
  return val(getParam('description')) || 'Verify';
25972
26015
  case 'custom': {
@@ -25994,12 +26037,14 @@ class CreateStepGroupComponent {
25994
26037
  }
25995
26038
  }
25996
26039
  CreateStepGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CreateStepGroupComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
25997
- CreateStepGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CreateStepGroupComponent, selector: "cqa-create-step-group", inputs: { stepsToGroup: "stepsToGroup" }, outputs: { createGroup: "createGroup", cancelled: "cancelled" }, host: { classAttribute: "cqa-ui-root" }, ngImport: i0, template: "<div\n class=\"cqa-bg-white cqa-rounded-[12px] cqa-shadow-lg cqa-border cqa-border-solid cqa-border-[#E5E7EB] cqa-w-full cqa-max-w-[500px] cqa-flex cqa-flex-col cqa-gap-4 cqa-p-6 cqa-box-border cqa-min-h-0\">\n <!-- Header: title + close (X) -->\n <div class=\"cqa-flex cqa-items-start cqa-justify-between cqa-gap-2\">\n <div class=\"cqa-flex cqa-flex-col cqa-gap-1 cqa-min-w-0\">\n <h2 class=\"cqa-text-[16px] cqa-leading-[24px] cqa-font-bold cqa-text-[#111827] cqa-m-0\">\n Create step group\n </h2>\n <p class=\"cqa-text-[14px] cqa-leading-[20px] cqa-text-[#64748B] cqa-m-0\">\n {{ subtitleText }}\n </p>\n </div>\n <button\n type=\"button\"\n (click)=\"onCancel()\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-min-h-7 cqa-min-w-7 cqa-rounded cqa-text-[#6B7280] hover:cqa-bg-[#F3F4F6] cqa-p-0 cqa-flex-shrink-0\"\n title=\"Close\"\n aria-label=\"Close\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M18 6L6 18M6 6l12 12\" />\n </svg>\n </button>\n </div>\n\n <!-- Group name * -->\n <div class=\"cqa-flex cqa-flex-col cqa-gap-1.5\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-[#161617]\">\n Group name <span class=\"cqa-text-red-500\">*</span>\n </label>\n <cqa-custom-input\n placeholder=\"e.g., Authentication flow\"\n [value]=\"form.get('groupName')?.value\"\n [fullWidth]=\"true\"\n size=\"md\"\n (valueChange)=\"form.get('groupName')?.setValue($event); form.get('groupName')?.updateValueAndValidity()\">\n </cqa-custom-input>\n <p *ngIf=\"form.get('groupName')?.invalid && form.get('groupName')?.touched\" class=\"cqa-text-xs cqa-text-red-500 cqa-m-0\">\n Group name is required.\n </p>\n </div>\n\n <!-- Steps to group (N) -->\n <div class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <label class=\"cqa-font-semibold cqa-text-[12px] cqa-leading-[100%] cqa-tracking-normal cqa-text-[#0A0A0A] cqa-align-middle\">\n Steps to group ({{ stepsCount }})\n </label>\n <div class=\"cqa-scrollbar-hide cqa-flex cqa-flex-col cqa-gap-2 cqa-max-h-[200px] cqa-overflow-y-auto cqa-rounded-[8px] cqa-p-[6px] cqa-border cqa-border-solid cqa-border-[rgba(0,0,0,0.1)]\">\n <div\n *ngFor=\"let step of stepsToGroup; let i = index\"\n class=\"cqa-flex cqa-items-center cqa-gap-2 cqa-rounded-[4px] cqa-py-[4px] cqa-px-[8px] cqa-bg-[rgba(216,217,252,0.3)]\">\n <!-- Numbered badge -->\n <span\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-7 cqa-h-7 cqa-rounded-full cqa-bg-[#3F43EE] cqa-text-white cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-flex-shrink-0\">\n {{ i + 1 }}\n </span>\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-leading-[15px] cqa-tracking-[0px] cqa-text-[#0B0B0C] cqa-flex-1 cqa-min-w-0 cqa-truncate\">\n {{ getStepDisplayLabel(step, i) }}\n </span>\n </div>\n </div>\n </div>\n\n <!-- Actions: Cancel | Create group -->\n <div class=\"cqa-flex cqa-items-stretch cqa-w-full cqa-gap-3\">\n <div class=\"cqa-flex-1 cqa-min-w-0\">\n <cqa-button\n variant=\"outlined\"\n btnSize=\"lg\"\n text=\"Cancel\"\n [fullWidth]=\"true\"\n [customClass]=\"'cqa-text-[14px] cqa-py-[9px] cqa-border-[#414146]'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n </div>\n <div class=\"cqa-flex-1 cqa-min-w-0\">\n <cqa-button\n variant=\"filled\"\n btnSize=\"lg\"\n text=\"Create group\"\n [fullWidth]=\"true\"\n [customClass]=\"'cqa-text-[14px] cqa-py-[9px] cqa-border-[#3F43EE] cqa-bg-[#3F43EE]'\"\n (clicked)=\"onCreateGroup()\">\n </cqa-button>\n </div>\n </div>\n</div>\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: 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"] }] });
26040
+ CreateStepGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CreateStepGroupComponent, selector: "cqa-create-step-group", inputs: { stepsToGroup: "stepsToGroup", stepLabels: "stepLabels" }, outputs: { createGroup: "createGroup", cancelled: "cancelled" }, host: { classAttribute: "cqa-ui-root" }, ngImport: i0, template: "<div\n class=\"cqa-bg-white cqa-rounded-[12px] cqa-shadow-lg cqa-border cqa-border-solid cqa-border-[#E5E7EB] cqa-w-full cqa-max-w-[500px] cqa-flex cqa-flex-col cqa-gap-4 cqa-p-6 cqa-box-border cqa-min-h-0\">\n <!-- Header: title + close (X) -->\n <div class=\"cqa-flex cqa-items-start cqa-justify-between cqa-gap-2\">\n <div class=\"cqa-flex cqa-flex-col cqa-gap-1 cqa-min-w-0\">\n <h2 class=\"cqa-text-[16px] cqa-leading-[24px] cqa-font-bold cqa-text-[#111827] cqa-m-0\">\n Create step group\n </h2>\n <p class=\"cqa-text-[14px] cqa-leading-[20px] cqa-text-[#64748B] cqa-m-0\">\n {{ subtitleText }}\n </p>\n </div>\n <button\n type=\"button\"\n (click)=\"onCancel()\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-min-h-7 cqa-min-w-7 cqa-rounded cqa-text-[#6B7280] hover:cqa-bg-[#F3F4F6] cqa-p-0 cqa-flex-shrink-0\"\n title=\"Close\"\n aria-label=\"Close\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M18 6L6 18M6 6l12 12\" />\n </svg>\n </button>\n </div>\n\n <!-- Group name * -->\n <div class=\"cqa-flex cqa-flex-col cqa-gap-1.5\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-[#161617]\">\n Group name <span class=\"cqa-text-red-500\">*</span>\n </label>\n <cqa-custom-input\n placeholder=\"e.g., Authentication flow\"\n [value]=\"form.get('groupName')?.value\"\n [fullWidth]=\"true\"\n size=\"md\"\n (valueChange)=\"form.get('groupName')?.setValue($event); form.get('groupName')?.updateValueAndValidity()\">\n </cqa-custom-input>\n <p *ngIf=\"form.get('groupName')?.invalid && form.get('groupName')?.touched\" class=\"cqa-text-xs cqa-text-red-500 cqa-m-0\">\n Group name is required.\n </p>\n </div>\n\n <!-- Steps to group (N) -->\n <div class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <label class=\"cqa-font-semibold cqa-text-[12px] cqa-leading-[100%] cqa-tracking-normal cqa-text-[#0A0A0A] cqa-align-middle\">\n Steps to group ({{ stepsCount }})\n </label>\n <div class=\"cqa-scrollbar-hide cqa-flex cqa-flex-col cqa-gap-2 cqa-max-h-[200px] cqa-overflow-y-auto cqa-rounded-[8px] cqa-p-[6px] cqa-border cqa-border-solid cqa-border-[rgba(0,0,0,0.1)]\">\n <div\n *ngFor=\"let step of stepsToGroup; let i = index\"\n class=\"cqa-flex cqa-items-center cqa-gap-2 cqa-rounded-[4px] cqa-py-[4px] cqa-px-[8px] cqa-bg-[rgba(216,217,252,0.3)]\">\n <!-- Numbered badge -->\n <span\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-7 cqa-h-7 cqa-rounded-full cqa-bg-[#3F43EE] cqa-text-white cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-flex-shrink-0\">\n {{ i + 1 }}\n </span>\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-leading-[15px] cqa-tracking-[0px] cqa-text-[#0B0B0C] cqa-flex-1 cqa-min-w-0 cqa-truncate\">\n {{ getStepDisplayLabel(step, i) }}\n </span>\n </div>\n </div>\n </div>\n\n <!-- Actions: Cancel | Create group -->\n <div class=\"cqa-flex cqa-items-stretch cqa-w-full cqa-gap-3\">\n <div class=\"cqa-flex-1 cqa-min-w-0\">\n <cqa-button\n variant=\"outlined\"\n btnSize=\"lg\"\n text=\"Cancel\"\n [fullWidth]=\"true\"\n [customClass]=\"'cqa-text-[14px] cqa-py-[9px] cqa-border-[#414146]'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n </div>\n <div class=\"cqa-flex-1 cqa-min-w-0\">\n <cqa-button\n variant=\"filled\"\n btnSize=\"lg\"\n text=\"Create group\"\n [fullWidth]=\"true\"\n [customClass]=\"'cqa-text-[14px] cqa-py-[9px] cqa-border-[#3F43EE] cqa-bg-[#3F43EE]'\"\n (clicked)=\"onCreateGroup()\">\n </cqa-button>\n </div>\n </div>\n</div>\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: 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"] }] });
25998
26041
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CreateStepGroupComponent, decorators: [{
25999
26042
  type: Component,
26000
26043
  args: [{ selector: 'cqa-create-step-group', host: { class: 'cqa-ui-root' }, template: "<div\n class=\"cqa-bg-white cqa-rounded-[12px] cqa-shadow-lg cqa-border cqa-border-solid cqa-border-[#E5E7EB] cqa-w-full cqa-max-w-[500px] cqa-flex cqa-flex-col cqa-gap-4 cqa-p-6 cqa-box-border cqa-min-h-0\">\n <!-- Header: title + close (X) -->\n <div class=\"cqa-flex cqa-items-start cqa-justify-between cqa-gap-2\">\n <div class=\"cqa-flex cqa-flex-col cqa-gap-1 cqa-min-w-0\">\n <h2 class=\"cqa-text-[16px] cqa-leading-[24px] cqa-font-bold cqa-text-[#111827] cqa-m-0\">\n Create step group\n </h2>\n <p class=\"cqa-text-[14px] cqa-leading-[20px] cqa-text-[#64748B] cqa-m-0\">\n {{ subtitleText }}\n </p>\n </div>\n <button\n type=\"button\"\n (click)=\"onCancel()\"\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-min-h-7 cqa-min-w-7 cqa-rounded cqa-text-[#6B7280] hover:cqa-bg-[#F3F4F6] cqa-p-0 cqa-flex-shrink-0\"\n title=\"Close\"\n aria-label=\"Close\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M18 6L6 18M6 6l12 12\" />\n </svg>\n </button>\n </div>\n\n <!-- Group name * -->\n <div class=\"cqa-flex cqa-flex-col cqa-gap-1.5\">\n <label class=\"cqa-text-sm cqa-font-medium cqa-text-[#161617]\">\n Group name <span class=\"cqa-text-red-500\">*</span>\n </label>\n <cqa-custom-input\n placeholder=\"e.g., Authentication flow\"\n [value]=\"form.get('groupName')?.value\"\n [fullWidth]=\"true\"\n size=\"md\"\n (valueChange)=\"form.get('groupName')?.setValue($event); form.get('groupName')?.updateValueAndValidity()\">\n </cqa-custom-input>\n <p *ngIf=\"form.get('groupName')?.invalid && form.get('groupName')?.touched\" class=\"cqa-text-xs cqa-text-red-500 cqa-m-0\">\n Group name is required.\n </p>\n </div>\n\n <!-- Steps to group (N) -->\n <div class=\"cqa-flex cqa-flex-col cqa-gap-2\">\n <label class=\"cqa-font-semibold cqa-text-[12px] cqa-leading-[100%] cqa-tracking-normal cqa-text-[#0A0A0A] cqa-align-middle\">\n Steps to group ({{ stepsCount }})\n </label>\n <div class=\"cqa-scrollbar-hide cqa-flex cqa-flex-col cqa-gap-2 cqa-max-h-[200px] cqa-overflow-y-auto cqa-rounded-[8px] cqa-p-[6px] cqa-border cqa-border-solid cqa-border-[rgba(0,0,0,0.1)]\">\n <div\n *ngFor=\"let step of stepsToGroup; let i = index\"\n class=\"cqa-flex cqa-items-center cqa-gap-2 cqa-rounded-[4px] cqa-py-[4px] cqa-px-[8px] cqa-bg-[rgba(216,217,252,0.3)]\">\n <!-- Numbered badge -->\n <span\n class=\"cqa-flex cqa-items-center cqa-justify-center cqa-w-7 cqa-h-7 cqa-rounded-full cqa-bg-[#3F43EE] cqa-text-white cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-flex-shrink-0\">\n {{ i + 1 }}\n </span>\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-leading-[15px] cqa-tracking-[0px] cqa-text-[#0B0B0C] cqa-flex-1 cqa-min-w-0 cqa-truncate\">\n {{ getStepDisplayLabel(step, i) }}\n </span>\n </div>\n </div>\n </div>\n\n <!-- Actions: Cancel | Create group -->\n <div class=\"cqa-flex cqa-items-stretch cqa-w-full cqa-gap-3\">\n <div class=\"cqa-flex-1 cqa-min-w-0\">\n <cqa-button\n variant=\"outlined\"\n btnSize=\"lg\"\n text=\"Cancel\"\n [fullWidth]=\"true\"\n [customClass]=\"'cqa-text-[14px] cqa-py-[9px] cqa-border-[#414146]'\"\n (clicked)=\"onCancel()\">\n </cqa-button>\n </div>\n <div class=\"cqa-flex-1 cqa-min-w-0\">\n <cqa-button\n variant=\"filled\"\n btnSize=\"lg\"\n text=\"Create group\"\n [fullWidth]=\"true\"\n [customClass]=\"'cqa-text-[14px] cqa-py-[9px] cqa-border-[#3F43EE] cqa-bg-[#3F43EE]'\"\n (clicked)=\"onCreateGroup()\">\n </cqa-button>\n </div>\n </div>\n</div>\n" }]
26001
26044
  }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }]; }, propDecorators: { stepsToGroup: [{
26002
26045
  type: Input
26046
+ }], stepLabels: [{
26047
+ type: Input
26003
26048
  }], createGroup: [{
26004
26049
  type: Output
26005
26050
  }], cancelled: [{