@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.
- package/esm2020/lib/ai-prompt-card/ai-prompt-card.component.mjs +3 -1
- package/esm2020/lib/sub-steps-confirmation-dialog/sub-steps-confirmation-dialog.component.mjs +94 -31
- package/fesm2015/cqa-lib-cqa-ui.mjs +95 -31
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +94 -29
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/ai-prompt-card/ai-prompt-card.component.d.ts +1 -1
- package/lib/sub-steps-confirmation-dialog/sub-steps-confirmation-dialog.component.d.ts +72 -11
- package/package.json +1 -1
- package/styles.css +1 -1
|
@@ -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
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
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
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
|
32
|
-
disableBackdropClose
|
|
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"; "
|
|
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
|
}
|