@cqa-lib/cqa-ui 1.1.508 → 1.1.509

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- export declare type AiPromptCardOperation = 'created' | 'edited' | 'duplicated' | 'deleted';
2
+ export declare type AiPromptCardOperation = 'created' | 'edited' | 'duplicated' | 'deleted' | 'converted';
3
3
  export declare class AiPromptCardComponent {
4
4
  stepNumber: string;
5
5
  stepName: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
2
  import { MatRadioChange } from '@angular/material/radio';
3
3
  import { ButtonVariant } from '../button/button.component';
4
4
  import * as i0 from "@angular/core";
@@ -17,30 +17,91 @@ export interface SubStepsConfirmationOption {
17
17
  /** Variant for the primary CTA when this option is selected. Defaults to `filled`. */
18
18
  buttonVariant?: ButtonVariant;
19
19
  }
20
+ /** Single row rendered in the optional preview list above the radio group. */
21
+ export interface SubStepsConfirmationPreviewItem {
22
+ /** Bold primary text (e.g. action name). */
23
+ primary: string;
24
+ /** Optional secondary text appended after an em-dash (e.g. element label). */
25
+ secondary?: string;
26
+ }
20
27
  /**
21
- * Confirmation dialog shown before editing an AI-Agent step whose execution has
22
- * already generated sub-steps (CON-926). The caller supplies the option list
23
- * and copy; this component only renders the UI and emits the user's choice.
28
+ * Full configuration payload for the sub-steps confirmation dialog. Pass a new
29
+ * object reference whenever the content should change the component uses
30
+ * `OnPush` change detection and only reacts to reference changes.
24
31
  */
25
- export declare class SubStepsConfirmationDialogComponent implements OnChanges {
26
- isOpen: boolean;
27
- title: string;
28
- description: string;
32
+ export interface SubStepsConfirmationDialogConfig {
33
+ title?: string;
34
+ description?: string;
35
+ /** Optional subtitle shown under the title (e.g. action type / parent context). */
36
+ subtitle?: string;
29
37
  options: SubStepsConfirmationOption[];
30
38
  selectedValue?: string;
31
- cancelLabel: string;
32
- disableBackdropClose: boolean;
39
+ cancelLabel?: string;
40
+ disableBackdropClose?: boolean;
41
+ /** Hide the top-right close (X) button. */
42
+ hideCloseButton?: boolean;
43
+ /** Hide the Cancel button in the footer. CTA expands to full width when true. */
44
+ hideCancel?: boolean;
45
+ /** Amber warnings list rendered above the radio group. */
46
+ warnings?: string[];
47
+ /** Optional numbered preview list rendered between description and radio group. */
48
+ previewItems?: SubStepsConfirmationPreviewItem[];
49
+ /** If >0, render a "+ N more" row after the preview list. */
50
+ previewOverflowCount?: number;
51
+ /**
52
+ * If >0, show an `M:SS` countdown in the header. `timeoutExpired` fires once
53
+ * when the countdown reaches 0. Countdown restarts whenever `isOpen` flips
54
+ * to true or a new config reference is passed with a different `timeoutSeconds`.
55
+ */
56
+ timeoutSeconds?: number;
57
+ }
58
+ /**
59
+ * Confirmation dialog shown before editing an AI-Agent step whose execution has
60
+ * already generated sub-steps (CON-926). Also used by CON-1166 to review
61
+ * AI-generated steps before persisting.
62
+ *
63
+ * The caller supplies the whole payload via the `config` input (one object, one
64
+ * reference change = one re-render). `isOpen` stays separate so open/close
65
+ * transitions don't force callers to rebuild the payload.
66
+ */
67
+ export declare class SubStepsConfirmationDialogComponent implements OnChanges, OnDestroy {
68
+ private readonly cdr;
69
+ isOpen: boolean;
70
+ config: SubStepsConfirmationDialogConfig;
33
71
  selectionChange: EventEmitter<string>;
34
72
  confirm: EventEmitter<string>;
35
73
  closeModal: EventEmitter<void>;
74
+ timeoutExpired: EventEmitter<void>;
75
+ /** Local selection state. Seeded from `config.selectedValue` and user-driven thereafter. */
76
+ selectedValue?: string;
77
+ remainingSeconds: number;
78
+ private _tickIntervalId;
79
+ private _timeoutEmitted;
80
+ constructor(cdr: ChangeDetectorRef);
36
81
  ngOnChanges(changes: SimpleChanges): void;
82
+ ngOnDestroy(): void;
83
+ get title(): string;
84
+ get description(): string;
85
+ get subtitle(): string | undefined;
86
+ get options(): SubStepsConfirmationOption[];
87
+ get cancelLabel(): string;
88
+ get disableBackdropClose(): boolean;
89
+ get hideCloseButton(): boolean;
90
+ get hideCancel(): boolean;
91
+ get warnings(): string[];
92
+ get previewItems(): SubStepsConfirmationPreviewItem[];
93
+ get previewOverflowCount(): number;
37
94
  get currentOption(): SubStepsConfirmationOption | undefined;
95
+ get showCountdown(): boolean;
96
+ get countdownLabel(): string;
38
97
  isSelected(option: SubStepsConfirmationOption): boolean;
39
98
  onSelect(option: SubStepsConfirmationOption): void;
40
99
  onRadioChange(event: MatRadioChange): void;
41
100
  onBackdropClick(event: MouseEvent): void;
42
101
  onClose(): void;
43
102
  onConfirm(): void;
103
+ private _startCountdown;
104
+ private _stopCountdown;
44
105
  static ɵfac: i0.ɵɵFactoryDeclaration<SubStepsConfirmationDialogComponent, never>;
45
- static ɵcmp: i0.ɵɵComponentDeclaration<SubStepsConfirmationDialogComponent, "cqa-sub-steps-confirmation-dialog", never, { "isOpen": "isOpen"; "title": "title"; "description": "description"; "options": "options"; "selectedValue": "selectedValue"; "cancelLabel": "cancelLabel"; "disableBackdropClose": "disableBackdropClose"; }, { "selectionChange": "selectionChange"; "confirm": "confirm"; "closeModal": "closeModal"; }, never, never>;
106
+ static ɵcmp: i0.ɵɵComponentDeclaration<SubStepsConfirmationDialogComponent, "cqa-sub-steps-confirmation-dialog", never, { "isOpen": "isOpen"; "config": "config"; }, { "selectionChange": "selectionChange"; "confirm": "confirm"; "closeModal": "closeModal"; "timeoutExpired": "timeoutExpired"; }, never, never>;
46
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cqa-lib/cqa-ui",
3
- "version": "1.1.508",
3
+ "version": "1.1.509",
4
4
  "description": "UI Kit library for Angular 13.4",
5
5
  "keywords": [
6
6
  "angular",