@progress/kendo-vue-conversational-ui 7.0.0-develop.3 → 7.0.0-develop.4
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/ai-prompt/AIPrompt.js +1 -1
- package/ai-prompt/AIPrompt.mjs +23 -10
- package/ai-prompt/AIPromptContent.js +1 -1
- package/ai-prompt/AIPromptContent.mjs +40 -9
- package/ai-prompt/AIPromptHeader.js +1 -1
- package/ai-prompt/AIPromptHeader.mjs +0 -1
- package/ai-prompt/views/AIPromptCommandsView.js +1 -1
- package/ai-prompt/views/AIPromptCommandsView.mjs +25 -23
- package/ai-prompt/views/AIPromptOutputView.js +1 -1
- package/ai-prompt/views/AIPromptOutputView.mjs +147 -108
- package/ai-prompt/views/AIPromptView.js +2 -1
- package/ai-prompt/views/AIPromptView.mjs +85 -55
- package/ai-prompt/views/constants.js +8 -0
- package/ai-prompt/views/constants.mjs +25 -0
- package/chat/components/SuggestionGroup.js +8 -0
- package/chat/components/SuggestionGroup.mjs +54 -0
- package/dist/cdn/js/kendo-vue-conversational-ui.js +1 -1
- package/index.d.mts +108 -6
- package/index.d.ts +108 -6
- package/index.js +1 -1
- package/index.mjs +21 -18
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ dir: PropType<string>;
|
|
|
26
26
|
toolbarItems: PropType<AIPromptToolbarItemInterface[]>;
|
|
27
27
|
outputs: PropType<AIPromptOutputInterface[]>;
|
|
28
28
|
promptPlaceholder: PropType<string>;
|
|
29
|
+
streaming: PropType<boolean>;
|
|
30
|
+
loading: PropType<boolean>;
|
|
29
31
|
}>, {}, {
|
|
30
32
|
contextState: AIPromptContextInterface;
|
|
31
33
|
}, {}, {
|
|
@@ -33,6 +35,7 @@ onStateAction(action: StateActionInterface): void;
|
|
|
33
35
|
onActiveViewChange(event: string): void;
|
|
34
36
|
onPromptRequest(prompt?: string, outputItem?: AIPromptOutputInterface): void;
|
|
35
37
|
onCommandExecute(event: AIPromptCommandInterface): void;
|
|
38
|
+
onCancel(): void;
|
|
36
39
|
}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
37
40
|
activeView: {
|
|
38
41
|
type: PropType<string>;
|
|
@@ -42,10 +45,30 @@ dir: PropType<string>;
|
|
|
42
45
|
toolbarItems: PropType<AIPromptToolbarItemInterface[]>;
|
|
43
46
|
outputs: PropType<AIPromptOutputInterface[]>;
|
|
44
47
|
promptPlaceholder: PropType<string>;
|
|
48
|
+
streaming: PropType<boolean>;
|
|
49
|
+
loading: PropType<boolean>;
|
|
45
50
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, () => {
|
|
46
51
|
kendoAIPrompt: any;
|
|
47
52
|
}, true, {}, any>;
|
|
48
53
|
|
|
54
|
+
/**
|
|
55
|
+
* The fields of the AIPromptOutputView card prop.
|
|
56
|
+
*/
|
|
57
|
+
export declare interface AIPromptCardInterface {
|
|
58
|
+
/**
|
|
59
|
+
* Custom template for AIPromptCard header.
|
|
60
|
+
*/
|
|
61
|
+
header?: (props: AIPromptOutputInterface) => any;
|
|
62
|
+
/**
|
|
63
|
+
* Custom template for AIPromptCard body.
|
|
64
|
+
*/
|
|
65
|
+
body?: (props: AIPromptOutputInterface) => any;
|
|
66
|
+
/**
|
|
67
|
+
* Custom template for AIPromptCard actions.
|
|
68
|
+
*/
|
|
69
|
+
actions?: (props: AIPromptOutputInterface) => any;
|
|
70
|
+
}
|
|
71
|
+
|
|
49
72
|
/**
|
|
50
73
|
* An interface for the Command view command.
|
|
51
74
|
*/
|
|
@@ -82,13 +105,26 @@ export declare interface AIPromptCommandsViewProps {
|
|
|
82
105
|
/**
|
|
83
106
|
* @hidden
|
|
84
107
|
*/
|
|
85
|
-
export declare const AIPromptContent: DefineComponent< {
|
|
108
|
+
export declare const AIPromptContent: DefineComponent<ExtractPropTypes< {
|
|
109
|
+
onCancel: PropType<() => void>;
|
|
110
|
+
streaming: PropType<boolean>;
|
|
111
|
+
}>, {}, {}, {
|
|
112
|
+
showFloatingButton(): boolean;
|
|
113
|
+
}, {
|
|
114
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
115
|
+
}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
116
|
+
onCancel: PropType<() => void>;
|
|
117
|
+
streaming: PropType<boolean>;
|
|
118
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
86
119
|
|
|
87
120
|
/**
|
|
88
121
|
* The AIPrompt context that is passed to the view.
|
|
89
122
|
*/
|
|
90
123
|
declare interface AIPromptContextInterface {
|
|
91
124
|
activeView?: string;
|
|
125
|
+
streaming?: boolean;
|
|
126
|
+
loading?: boolean;
|
|
127
|
+
onCancel?: () => void;
|
|
92
128
|
onPromptRequest?: (prompt?: string, outputItem?: AIPromptOutputInterface) => void;
|
|
93
129
|
onCommandExecute?: (command: AIPromptCommandInterface) => void;
|
|
94
130
|
onActiveViewChange?: (view: string) => void;
|
|
@@ -173,27 +209,29 @@ export declare enum AIPromptOutputRating {
|
|
|
173
209
|
*/
|
|
174
210
|
export declare const AIPromptOutputView: DefineComponent<ExtractPropTypes< {
|
|
175
211
|
outputs: PropType<AIPromptOutputInterface[]>;
|
|
176
|
-
outputCard: PropType<
|
|
212
|
+
outputCard: PropType<AIPromptCardInterface>;
|
|
177
213
|
showOutputRating: PropType<boolean>;
|
|
178
214
|
}>, {}, {
|
|
179
215
|
copiedIndex: number;
|
|
180
216
|
copyButtonIcon: SVGIcon;
|
|
217
|
+
contentRef: any;
|
|
181
218
|
}, {}, {
|
|
182
219
|
retryPrompt(output: AIPromptOutputInterface): void;
|
|
183
220
|
copyToClipboard(output: AIPromptOutputInterface, index: number): void;
|
|
184
221
|
outputRating(output: AIPromptOutputInterface, ratingType: AIPromptOutputRating): void;
|
|
222
|
+
scrollToTopOutput(): void;
|
|
185
223
|
}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
186
224
|
copy: any;
|
|
187
225
|
retry: any;
|
|
188
226
|
rating: any;
|
|
189
227
|
}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
190
228
|
outputs: PropType<AIPromptOutputInterface[]>;
|
|
191
|
-
outputCard: PropType<
|
|
229
|
+
outputCard: PropType<AIPromptCardInterface>;
|
|
192
230
|
showOutputRating: PropType<boolean>;
|
|
193
231
|
}>> & Readonly<{
|
|
194
232
|
onCopy?: (...args: any[] | unknown[]) => any;
|
|
195
|
-
onRating?: (...args: any[] | unknown[]) => any;
|
|
196
233
|
onRetry?: (...args: any[] | unknown[]) => any;
|
|
234
|
+
onRating?: (...args: any[] | unknown[]) => any;
|
|
197
235
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
198
236
|
|
|
199
237
|
/**
|
|
@@ -205,10 +243,13 @@ export declare interface AIPromptOutputViewProps {
|
|
|
205
243
|
*/
|
|
206
244
|
outputs?: AIPromptOutputInterface[];
|
|
207
245
|
/**
|
|
208
|
-
* Represents a template that allows you to define custom Card
|
|
246
|
+
* Represents a template that allows you to define custom Card fields for:
|
|
247
|
+
* header
|
|
248
|
+
* body
|
|
249
|
+
* actions
|
|
209
250
|
* The custom fields will override the default one.
|
|
210
251
|
*/
|
|
211
|
-
outputCard?:
|
|
252
|
+
outputCard?: AIPromptCardInterface;
|
|
212
253
|
/**
|
|
213
254
|
* Specifies if the rating buttons in each card will be rendered.
|
|
214
255
|
* By default, rating buttons are not rendered.
|
|
@@ -254,6 +295,14 @@ export declare interface AIPromptProps {
|
|
|
254
295
|
* The direction of the Prompt.
|
|
255
296
|
*/
|
|
256
297
|
dir?: string;
|
|
298
|
+
/**
|
|
299
|
+
* If true, the prompt is in a streaming state.
|
|
300
|
+
*/
|
|
301
|
+
streaming?: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* If true, the prompt is in a loading state.
|
|
304
|
+
*/
|
|
305
|
+
loading?: boolean;
|
|
257
306
|
/**
|
|
258
307
|
* The onActiveViewChange event handler of the Kendo UI for Vue AIPrompt component.
|
|
259
308
|
* Fires when active view is changed. Exposes the name of the new active view as event data.
|
|
@@ -269,6 +318,10 @@ export declare interface AIPromptProps {
|
|
|
269
318
|
* Fires when user clicks the `Generate` button in the Prompt view.
|
|
270
319
|
*/
|
|
271
320
|
onPromptrequest?: (prompt?: string, outputItem?: AIPromptOutputInterface) => void;
|
|
321
|
+
/**
|
|
322
|
+
* Called when the prompt is cancelled.
|
|
323
|
+
*/
|
|
324
|
+
onCancel?: () => void;
|
|
272
325
|
}
|
|
273
326
|
|
|
274
327
|
/**
|
|
@@ -301,6 +354,7 @@ promptInput: PropType<any>;
|
|
|
301
354
|
generateButton: PropType<any>;
|
|
302
355
|
promptValue: PropType<string>;
|
|
303
356
|
promptSuggestions: PropType<string[]>;
|
|
357
|
+
enableSpeechToText: PropType<boolean | object>;
|
|
304
358
|
}>, {}, {
|
|
305
359
|
value: string;
|
|
306
360
|
}, {
|
|
@@ -309,11 +363,16 @@ computedValue(): any;
|
|
|
309
363
|
handleOnRequest(): void;
|
|
310
364
|
handleSuggestionSelect(suggestion: string): void;
|
|
311
365
|
onTextChange(event: any): void;
|
|
366
|
+
onSpeechResult(event: any): void;
|
|
367
|
+
onSpeechStart(): void;
|
|
368
|
+
onSpeechEnd(): void;
|
|
369
|
+
getButtonDisabledState(): boolean;
|
|
312
370
|
}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
313
371
|
promptInput: PropType<any>;
|
|
314
372
|
generateButton: PropType<any>;
|
|
315
373
|
promptValue: PropType<string>;
|
|
316
374
|
promptSuggestions: PropType<string[]>;
|
|
375
|
+
enableSpeechToText: PropType<boolean | object>;
|
|
317
376
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
318
377
|
|
|
319
378
|
/**
|
|
@@ -335,6 +394,18 @@ export declare interface AIPromptViewRenderProps {
|
|
|
335
394
|
name: string;
|
|
336
395
|
}
|
|
337
396
|
|
|
397
|
+
/**
|
|
398
|
+
* Represents the structure of a chat suggestion item that can be displayed above the message input.
|
|
399
|
+
*
|
|
400
|
+
* @interface ChatSuggestion
|
|
401
|
+
*/
|
|
402
|
+
export declare interface ChatSuggestion {
|
|
403
|
+
id: string | number;
|
|
404
|
+
text: string;
|
|
405
|
+
description?: string;
|
|
406
|
+
disabled?: boolean;
|
|
407
|
+
}
|
|
408
|
+
|
|
338
409
|
/**
|
|
339
410
|
* @hidden
|
|
340
411
|
*/
|
|
@@ -375,4 +446,35 @@ declare interface StateActionInterface {
|
|
|
375
446
|
activeView: string;
|
|
376
447
|
}
|
|
377
448
|
|
|
449
|
+
/**
|
|
450
|
+
* @hidden
|
|
451
|
+
*/
|
|
452
|
+
export declare const SuggestionGroup: DefineComponent<ExtractPropTypes< {
|
|
453
|
+
suggestions: {
|
|
454
|
+
type: PropType<ChatSuggestion[]>;
|
|
455
|
+
required: true;
|
|
456
|
+
};
|
|
457
|
+
onSuggestionClick: {
|
|
458
|
+
type: PropType<(event: MouseEvent, suggestion: ChatSuggestion) => void>;
|
|
459
|
+
required: true;
|
|
460
|
+
};
|
|
461
|
+
}>, {}, {}, {}, {
|
|
462
|
+
handleSuggestionClick(event: MouseEvent, suggestion: ChatSuggestion): void;
|
|
463
|
+
handleKeyDown(event: KeyboardEvent, suggestion: ChatSuggestion): void;
|
|
464
|
+
}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
465
|
+
suggestions: {
|
|
466
|
+
type: PropType<ChatSuggestion[]>;
|
|
467
|
+
required: true;
|
|
468
|
+
};
|
|
469
|
+
onSuggestionClick: {
|
|
470
|
+
type: PropType<(event: MouseEvent, suggestion: ChatSuggestion) => void>;
|
|
471
|
+
required: true;
|
|
472
|
+
};
|
|
473
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
474
|
+
|
|
475
|
+
export declare interface SuggestionGroupProps {
|
|
476
|
+
suggestions: ChatSuggestion[];
|
|
477
|
+
onSuggestionClick: (event: MouseEvent, suggestion: ChatSuggestion) => void;
|
|
478
|
+
}
|
|
479
|
+
|
|
378
480
|
export { }
|
package/index.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./ai-prompt/AIPrompt.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./ai-prompt/AIPrompt.js"),r=require("./ai-prompt/AIPromptHeader.js"),p=require("./ai-prompt/AIPromptFooter.js"),m=require("./ai-prompt/AIPromptContent.js"),u=require("./ai-prompt/views/AIPromptView.js"),e=require("./ai-prompt/views/AIPromptOutputView.js"),i=require("./ai-prompt/views/AIPromptCommandsView.js"),n=require("./ai-prompt/views/AIPromptViewRender.js"),t=require("./ai-prompt/views/constants.js"),s=require("./chat/components/SuggestionGroup.js");exports.AIPrompt=o.AIPrompt;exports.AIPromptHeader=r.AIPromptHeader;exports.AIPromptFooter=p.AIPromptFooter;exports.AIPromptContent=m.AIPromptContent;exports.AIPromptView=u.AIPromptView;exports.AIPromptOutputRating=e.AIPromptOutputRating;exports.AIPromptOutputView=e.AIPromptOutputView;exports.AIPromptCommandsView=i.AIPromptCommandsView;exports.AIPromptViewRender=n.AIPromptViewRender;exports.commandsViewDefaults=t.commandsViewDefaults;exports.outputViewDefaults=t.outputViewDefaults;exports.promptViewDefaults=t.promptViewDefaults;exports.SuggestionGroup=s.SuggestionGroup;
|
package/index.mjs
CHANGED
|
@@ -5,25 +5,28 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { AIPrompt as
|
|
9
|
-
import { AIPromptHeader as
|
|
8
|
+
import { AIPrompt as t } from "./ai-prompt/AIPrompt.mjs";
|
|
9
|
+
import { AIPromptHeader as p } from "./ai-prompt/AIPromptHeader.mjs";
|
|
10
10
|
import { AIPromptFooter as f } from "./ai-prompt/AIPromptFooter.mjs";
|
|
11
|
-
import { AIPromptContent as
|
|
12
|
-
import { AIPromptView as
|
|
13
|
-
import { AIPromptOutputRating as
|
|
14
|
-
import { AIPromptCommandsView as
|
|
15
|
-
import { AIPromptViewRender as
|
|
11
|
+
import { AIPromptContent as x } from "./ai-prompt/AIPromptContent.mjs";
|
|
12
|
+
import { AIPromptView as A } from "./ai-prompt/views/AIPromptView.mjs";
|
|
13
|
+
import { AIPromptOutputRating as P, AIPromptOutputView as a } from "./ai-prompt/views/AIPromptOutputView.mjs";
|
|
14
|
+
import { AIPromptCommandsView as w } from "./ai-prompt/views/AIPromptCommandsView.mjs";
|
|
15
|
+
import { AIPromptViewRender as s } from "./ai-prompt/views/AIPromptViewRender.mjs";
|
|
16
|
+
import { commandsViewDefaults as g, outputViewDefaults as l, promptViewDefaults as D } from "./ai-prompt/views/constants.mjs";
|
|
17
|
+
import { SuggestionGroup as O } from "./chat/components/SuggestionGroup.mjs";
|
|
16
18
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
t as AIPrompt,
|
|
20
|
+
w as AIPromptCommandsView,
|
|
21
|
+
x as AIPromptContent,
|
|
20
22
|
f as AIPromptFooter,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
p as AIPromptHeader,
|
|
24
|
+
P as AIPromptOutputRating,
|
|
25
|
+
a as AIPromptOutputView,
|
|
26
|
+
A as AIPromptView,
|
|
27
|
+
s as AIPromptViewRender,
|
|
28
|
+
O as SuggestionGroup,
|
|
29
|
+
g as commandsViewDefaults,
|
|
30
|
+
l as outputViewDefaults,
|
|
31
|
+
D as promptViewDefaults
|
|
29
32
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-conversational-ui",
|
|
3
|
-
"version": "7.0.0-develop.
|
|
3
|
+
"version": "7.0.0-develop.4",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@progress/kendo-licensing": "^1.4.0",
|
|
22
|
-
"@progress/kendo-vue-buttons": "7.0.0-develop.
|
|
23
|
-
"@progress/kendo-vue-common": "7.0.0-develop.
|
|
24
|
-
"@progress/kendo-vue-intl": "7.0.0-develop.
|
|
25
|
-
"@progress/kendo-vue-inputs": "7.0.0-develop.
|
|
26
|
-
"@progress/kendo-vue-layout": "7.0.0-develop.
|
|
22
|
+
"@progress/kendo-vue-buttons": "7.0.0-develop.4",
|
|
23
|
+
"@progress/kendo-vue-common": "7.0.0-develop.4",
|
|
24
|
+
"@progress/kendo-vue-intl": "7.0.0-develop.4",
|
|
25
|
+
"@progress/kendo-vue-inputs": "7.0.0-develop.4",
|
|
26
|
+
"@progress/kendo-vue-layout": "7.0.0-develop.4",
|
|
27
27
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
28
28
|
"vue": "^3.0.2"
|
|
29
29
|
},
|