@gravitee/ui-particles-angular 15.10.2 → 15.10.3-apim-9967-471bf98
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/esm2022/lib/gio-el/gio-el-prompt/gio-el-prompt.component.mjs +27 -7
- package/esm2022/lib/gio-el/gio-el.service.mjs +14 -2
- package/fesm2022/gravitee-ui-particles-angular.mjs +35 -5
- package/fesm2022/gravitee-ui-particles-angular.mjs.map +1 -1
- package/lib/gio-el/gio-el-prompt/gio-el-prompt.component.d.ts +5 -0
- package/lib/gio-el/gio-el.service.d.ts +4 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { GioElService } from '../gio-el.service';
|
|
|
4
4
|
import { ElAiPromptState } from '../models/ElAiPromptState';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
type PromptState = 'loading' | ElAiPromptState;
|
|
7
|
+
type FeedbackState = 'helpful' | 'not-helpful' | null;
|
|
7
8
|
export declare class GioElPromptComponent implements AfterViewInit {
|
|
8
9
|
readonly maxPromptSize = 256;
|
|
9
10
|
aiRequestFormGroup: FormGroup<{
|
|
@@ -12,10 +13,14 @@ export declare class GioElPromptComponent implements AfterViewInit {
|
|
|
12
13
|
elService: GioElService;
|
|
13
14
|
responseState: WritableSignal<PromptState | null>;
|
|
14
15
|
myInput: ElementRef<HTMLInputElement>;
|
|
16
|
+
feedbackState: WritableSignal<FeedbackState>;
|
|
17
|
+
get prompt(): import("@angular/forms").AbstractControl<string | null, string | null> | null;
|
|
15
18
|
el: Signal<string | null>;
|
|
16
19
|
errorMessage: Signal<string | null>;
|
|
20
|
+
showFeedback: Signal<boolean>;
|
|
17
21
|
ngAfterViewInit(): void;
|
|
18
22
|
sendPromptToIA(): void;
|
|
23
|
+
submitFeedback(feedback: 'helpful' | 'not-helpful'): void;
|
|
19
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<GioElPromptComponent, never>;
|
|
20
25
|
static ɵcmp: i0.ɵɵComponentDeclaration<GioElPromptComponent, "gio-el-prompt", never, { "responseState": { "alias": "responseState"; "required": false; }; }, {}, never, never, true, never>;
|
|
21
26
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ElAiPromptState } from './models/ElAiPromptState';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
export type FeedbackType = 'helpful' | 'not-helpful';
|
|
4
5
|
export declare class GioElService {
|
|
5
6
|
private _promptCallback?;
|
|
7
|
+
private _feedbackCallback?;
|
|
6
8
|
prompt(prompt: string): Observable<ElAiPromptState>;
|
|
9
|
+
submitFeedback(feedback: FeedbackType, expression: string): Observable<void>;
|
|
7
10
|
set promptCallback(value: (prompt: string) => Observable<ElAiPromptState>);
|
|
11
|
+
set feedbackCallback(value: (feedback: FeedbackType, expression: string) => Observable<void>);
|
|
8
12
|
isEnabled(): boolean;
|
|
9
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<GioElService, never>;
|
|
10
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<GioElService>;
|