@gravitee/ui-particles-angular 15.11.1 → 15.11.2-apim-9967-06add2e
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-avatar/gio-avatar.component.mjs +3 -1
- package/esm2022/lib/gio-el/gio-el-prompt/gio-el-prompt.component.mjs +28 -6
- package/esm2022/lib/gio-el/gio-el.service.mjs +15 -1
- package/esm2022/lib/gio-el/models/ElAiPromptState.mjs +1 -1
- package/fesm2022/gravitee-ui-particles-angular.mjs +39 -3
- package/fesm2022/gravitee-ui-particles-angular.mjs.map +1 -1
- package/lib/gio-el/gio-el-prompt/gio-el-prompt.component.d.ts +6 -1
- package/lib/gio-el/gio-el.service.d.ts +9 -1
- package/lib/gio-el/models/ElAiPromptState.d.ts +6 -0
- package/package.json +7 -7
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { WritableSignal, Signal, ElementRef, AfterViewInit } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { GioElService } from '../gio-el.service';
|
|
4
|
-
import { ElAiPromptState } from '../models/ElAiPromptState';
|
|
4
|
+
import { ElAiPromptState, FeedbackRequestId } 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,11 +13,15 @@ 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>;
|
|
15
17
|
get prompt(): import("@angular/forms").AbstractControl<string | null, string | null> | null;
|
|
16
18
|
el: Signal<string | null>;
|
|
19
|
+
feedbackRequestId: Signal<FeedbackRequestId | null>;
|
|
17
20
|
errorMessage: Signal<string | null>;
|
|
21
|
+
showFeedback: Signal<boolean>;
|
|
18
22
|
ngAfterViewInit(): void;
|
|
19
23
|
sendPromptToIA(): void;
|
|
24
|
+
submitFeedback(feedback: 'helpful' | 'not-helpful'): void;
|
|
20
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<GioElPromptComponent, never>;
|
|
21
26
|
static ɵcmp: i0.ɵɵComponentDeclaration<GioElPromptComponent, "gio-el-prompt", never, { "responseState": { "alias": "responseState"; "required": false; }; }, {}, never, never, true, never>;
|
|
22
27
|
}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ElAiPromptState } from './models/ElAiPromptState';
|
|
2
|
+
import { ElAiPromptState, FeedbackRequestId } from './models/ElAiPromptState';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
export type FeedbackType = 'helpful' | 'not-helpful';
|
|
5
|
+
export interface FeedbackSubmission {
|
|
6
|
+
feedback: FeedbackType;
|
|
7
|
+
feedbackRequestId?: FeedbackRequestId;
|
|
8
|
+
}
|
|
4
9
|
export declare class GioElService {
|
|
5
10
|
private _promptCallback?;
|
|
11
|
+
private _feedbackCallback?;
|
|
6
12
|
prompt(prompt: string): Observable<ElAiPromptState>;
|
|
7
13
|
set promptCallback(value: (prompt: string) => Observable<ElAiPromptState>);
|
|
14
|
+
submitFeedback(feedback: FeedbackType, feedbackRequestId?: FeedbackRequestId): Observable<void>;
|
|
15
|
+
set feedbackCallback(value: (feedbackSubmission: FeedbackSubmission) => Observable<void>);
|
|
8
16
|
isEnabled(): boolean;
|
|
9
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<GioElService, never>;
|
|
10
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<GioElService>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export type ElAiPromptState = PromptSuccess | PromptError;
|
|
2
2
|
export interface PromptSuccess {
|
|
3
3
|
el: string;
|
|
4
|
+
feedbackRequestId?: FeedbackRequestId;
|
|
5
|
+
}
|
|
6
|
+
export interface FeedbackRequestId {
|
|
7
|
+
chatId: string;
|
|
8
|
+
userMessageId: string;
|
|
9
|
+
agentMessageId: string;
|
|
4
10
|
}
|
|
5
11
|
export declare function isPromptSuccess(value: unknown): value is PromptSuccess;
|
|
6
12
|
export interface PromptError {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravitee/ui-particles-angular",
|
|
3
|
-
"version": "15.11.
|
|
3
|
+
"version": "15.11.2-apim-9967-06add2e",
|
|
4
4
|
"description": "Gravitee.io - UI Particles Angular",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,18 +57,18 @@
|
|
|
57
57
|
"esm": "./esm2022/gravitee-ui-particles-angular.mjs",
|
|
58
58
|
"default": "./fesm2022/gravitee-ui-particles-angular.mjs"
|
|
59
59
|
},
|
|
60
|
-
"./gio-el": {
|
|
61
|
-
"types": "./gio-el/index.d.ts",
|
|
62
|
-
"esm2022": "./esm2022/gio-el/gravitee-ui-particles-angular-gio-el.mjs",
|
|
63
|
-
"esm": "./esm2022/gio-el/gravitee-ui-particles-angular-gio-el.mjs",
|
|
64
|
-
"default": "./fesm2022/gravitee-ui-particles-angular-gio-el.mjs"
|
|
65
|
-
},
|
|
66
60
|
"./gio-asciidoctor": {
|
|
67
61
|
"types": "./gio-asciidoctor/index.d.ts",
|
|
68
62
|
"esm2022": "./esm2022/gio-asciidoctor/gravitee-ui-particles-angular-gio-asciidoctor.mjs",
|
|
69
63
|
"esm": "./esm2022/gio-asciidoctor/gravitee-ui-particles-angular-gio-asciidoctor.mjs",
|
|
70
64
|
"default": "./fesm2022/gravitee-ui-particles-angular-gio-asciidoctor.mjs"
|
|
71
65
|
},
|
|
66
|
+
"./gio-el": {
|
|
67
|
+
"types": "./gio-el/index.d.ts",
|
|
68
|
+
"esm2022": "./esm2022/gio-el/gravitee-ui-particles-angular-gio-el.mjs",
|
|
69
|
+
"esm": "./esm2022/gio-el/gravitee-ui-particles-angular-gio-el.mjs",
|
|
70
|
+
"default": "./fesm2022/gravitee-ui-particles-angular-gio-el.mjs"
|
|
71
|
+
},
|
|
72
72
|
"./testing": {
|
|
73
73
|
"types": "./testing/index.d.ts",
|
|
74
74
|
"esm2022": "./esm2022/testing/gravitee-ui-particles-angular-testing.mjs",
|