@progress/kendo-react-conversational-ui 13.3.0 → 13.4.0-develop.2
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.d.ts +176 -0
- package/ai-prompt/AIPromptContent.d.ts +30 -0
- package/ai-prompt/AIPromptContext.d.ts +32 -0
- package/ai-prompt/AIPromptExpander.d.ts +23 -0
- package/ai-prompt/AIPromptFooter.d.ts +22 -0
- package/ai-prompt/AIPromptHeader.d.ts +39 -0
- package/ai-prompt/views/AIPromptCommandsView.d.ts +58 -0
- package/ai-prompt/views/AIPromptOutputView.d.ts +63 -0
- package/ai-prompt/views/AIPromptView.d.ts +43 -0
- package/ai-prompt/views/AIPromptView.mjs +5 -5
- package/ai-prompt/views/AIPromptViewRender.d.ts +26 -0
- package/ai-prompt/views/constants.d.ts +20 -0
- package/api/action.interface.d.ts +36 -0
- package/api/attachment.interface.d.ts +37 -0
- package/api/message.interface.d.ts +99 -0
- package/api/user.interface.d.ts +29 -0
- package/chat/ChatPropsAndState.d.ts +498 -0
- package/chat/Events.d.ts +50 -0
- package/chat/ViewItem.d.ts +64 -0
- package/chat/components/Action.d.ts +25 -0
- package/chat/components/ActionGroup.d.ts +26 -0
- package/chat/components/Attachment.d.ts +27 -0
- package/chat/components/AttachmentGroup.d.ts +24 -0
- package/chat/components/Chat.d.ts +13 -0
- package/chat/components/ChatContext.d.ts +45 -0
- package/chat/components/ChatMessage.d.ts +110 -0
- package/chat/components/ChatMessage.mjs +6 -6
- package/chat/components/DateMarker.d.ts +23 -0
- package/chat/components/Header.d.ts +13 -0
- package/chat/components/MessageGroup.d.ts +37 -0
- package/chat/components/NewMessage.d.ts +52 -0
- package/chat/components/Notification.d.ts +26 -0
- package/chat/components/ScrollButtonsWrapper.d.ts +47 -0
- package/chat/components/SuggestionsGroup.d.ts +63 -0
- package/chat/components/elements/FileBox.d.ts +37 -0
- package/chat/components/elements/FileBox.mjs +3 -3
- package/chat/components/elements/PinnedMessage.d.ts +22 -0
- package/chat/components/templates/HeroCard.d.ts +43 -0
- package/chat/hooks/useScrollWithButtons.d.ts +57 -0
- package/chat/utils/fieldMapping.d.ts +56 -0
- package/chat/utils/messageSettings.d.ts +82 -0
- package/chat/utils/scroll.d.ts +32 -0
- package/chat/utils.d.ts +41 -0
- package/codemods/v12/author-id.js +1 -8
- package/codemods/v12/chat-send-message.js +2 -9
- package/codemods/v12/index.js +0 -7
- package/codemods/v12/message-template.js +1 -8
- package/codemods/v12/send-message.js +1 -8
- package/codemods/v12/show-toolbar.js +1 -8
- package/codemods/v12/toolbar-action-execute.js +1 -8
- package/codemods/v12/toolbar.js +1 -8
- package/codemods/v12/utils.js +2 -9
- package/dist/cdn/js/kendo-react-conversational-ui.js +1 -1
- package/index.d.mts +23 -1627
- package/index.d.ts +23 -1627
- package/inline-ai-prompt/InlineAIPrompt.d.ts +163 -0
- package/inline-ai-prompt/InlineAIPrompt.mjs +4 -4
- package/inline-ai-prompt/InlineAIPromptInput.d.ts +62 -0
- package/inline-ai-prompt/InlineAIPromptInput.js +2 -2
- package/inline-ai-prompt/InlineAIPromptInput.mjs +45 -44
- package/inline-ai-prompt/InlineAIPromptPopup.d.ts +57 -0
- package/messages/index.d.ts +112 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +11 -16
- package/package.json +11 -11
package/index.d.mts
CHANGED
|
@@ -5,1630 +5,26 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* The value associated with the action.
|
|
33
|
-
*/
|
|
34
|
-
value: any;
|
|
35
|
-
/**
|
|
36
|
-
* Optional title for the quick action.
|
|
37
|
-
* If not set, the Chat displays `value`.
|
|
38
|
-
*/
|
|
39
|
-
title?: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Specifies the button type of a quick action ([see examples](https://www.telerik.com/kendo-react-ui/components/conversational-ui/chat/quick-actions/suggested-actions)).
|
|
44
|
-
*
|
|
45
|
-
* * `openUrl`—Opens a new browser window with the specified URL.
|
|
46
|
-
* * `reply`—Sends the action value as a reply in the Chat.
|
|
47
|
-
* * `call`—Treats a value as a phone number.
|
|
48
|
-
* Similar to clicking a [telephone link](https://css-tricks.com/the-current-state-of-telephone-links/).
|
|
49
|
-
* * other—Handled in your code in the [`ExecuteActionEvent`](https://www.telerik.com/kendo-react-ui/components/conversational-ui/api/chatactionexecuteevent).
|
|
50
|
-
*/
|
|
51
|
-
export declare type ActionType = 'openUrl' | 'reply' | 'call' | any;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Represents the KendoReact AIPrompt component.
|
|
55
|
-
*/
|
|
56
|
-
export declare const AIPrompt: (props: AIPromptProps) => JSX.Element;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* The fields of the AIPromptOutputView card prop.
|
|
60
|
-
*/
|
|
61
|
-
export declare interface AIPromptCardInterface {
|
|
62
|
-
/**
|
|
63
|
-
* Custom template for AIPromptCard header.
|
|
64
|
-
*/
|
|
65
|
-
header?: (props: AIPromptOutputInterface) => default_2.ReactNode;
|
|
66
|
-
/**
|
|
67
|
-
* Custom template for AIPromptCard body.
|
|
68
|
-
*/
|
|
69
|
-
body?: (props: AIPromptOutputInterface) => default_2.ReactNode;
|
|
70
|
-
/**
|
|
71
|
-
* Custom template for AIPromptCard actions.
|
|
72
|
-
*/
|
|
73
|
-
actions?: (props: AIPromptOutputInterface) => default_2.ReactNode;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
declare interface AIPromptCardInterface_2 {
|
|
77
|
-
/**
|
|
78
|
-
* Custom template for AIPromptCard body.
|
|
79
|
-
*/
|
|
80
|
-
body?: (props: InlineAIPromptOutputInterface) => default_2.ReactNode;
|
|
81
|
-
/**
|
|
82
|
-
* Custom template for AIPromptCard actions.
|
|
83
|
-
*/
|
|
84
|
-
actions?: (props: InlineAIPromptOutputInterface) => default_2.ReactNode;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* The props of the AIPromptCommandsView component.
|
|
89
|
-
*/
|
|
90
|
-
export declare const AIPromptCommandsView: (props: AIPromptCommandsViewProps) => JSX.Element;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* The props of the AIPromptCommandsView component.
|
|
94
|
-
*/
|
|
95
|
-
declare interface AIPromptCommandsViewProps {
|
|
96
|
-
/**
|
|
97
|
-
* The collection of commands that will be rendered in the Command view.
|
|
98
|
-
*/
|
|
99
|
-
commands?: CommandInterface[];
|
|
100
|
-
/**
|
|
101
|
-
* Fires each time the user clicks over a Command view command. Exposes the selected command as event data.
|
|
102
|
-
*/
|
|
103
|
-
onCommandExecute?: (command: CommandItemInterface) => void;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Represents the KendoReact AIPromptContent component.
|
|
108
|
-
*/
|
|
109
|
-
export declare const AIPromptContent: default_2.ForwardRefExoticComponent<AIPromptContentProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* The props of the AIPromptContent component.
|
|
113
|
-
*/
|
|
114
|
-
declare interface AIPromptContentProps {
|
|
115
|
-
/**
|
|
116
|
-
* Specifies the AIPromptContent children elements.
|
|
117
|
-
*/
|
|
118
|
-
children?: default_2.ReactNode;
|
|
119
|
-
/**
|
|
120
|
-
* Specifies the callback for cancel action.
|
|
121
|
-
*/
|
|
122
|
-
onCancel?: () => void;
|
|
123
|
-
/**
|
|
124
|
-
* Specifies if the streaming indicator should be shown.
|
|
125
|
-
*/
|
|
126
|
-
streaming?: boolean;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Represents the KendoReact AIPromptFooter component.
|
|
131
|
-
*/
|
|
132
|
-
export declare const AIPromptFooter: (props: AIPromptFooterProps) => JSX.Element;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* The props of the AIPromptFooter component.
|
|
136
|
-
*/
|
|
137
|
-
declare interface AIPromptFooterProps {
|
|
138
|
-
/**
|
|
139
|
-
* Specifies the AIPromptFooter children elements.
|
|
140
|
-
*/
|
|
141
|
-
children?: default_2.ReactNode;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* @hidden
|
|
146
|
-
*/
|
|
147
|
-
declare interface AIPromptHeaderProps {
|
|
148
|
-
activeView: string;
|
|
149
|
-
toolbarItems: (AIPromptToolbarItemInterface | default_2.ReactNode)[];
|
|
150
|
-
activeViewChange?: (viewName: string) => void;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export declare interface AIPromptOutputInterface {
|
|
154
|
-
/**
|
|
155
|
-
* EUnique identifier of the output item.
|
|
156
|
-
* ```jsx
|
|
157
|
-
* const output = { id: 1, responseContent: 'Generated content' };
|
|
158
|
-
* ```
|
|
159
|
-
*/
|
|
160
|
-
id: string | number;
|
|
161
|
-
/**
|
|
162
|
-
* Example usage of the `title` property:
|
|
163
|
-
* ```jsx
|
|
164
|
-
* const output = { title: 'Generated Title', responseContent: 'Generated content' };
|
|
165
|
-
* ```
|
|
166
|
-
*/
|
|
167
|
-
title?: default_2.ReactNode;
|
|
168
|
-
/**
|
|
169
|
-
* Optional `subTitle` content.
|
|
170
|
-
* ```jsx
|
|
171
|
-
* const output = { subTitle: 'Generated Subtitle', responseContent: 'Generated content' };
|
|
172
|
-
* ```
|
|
173
|
-
*/
|
|
174
|
-
subTitle?: default_2.ReactNode;
|
|
175
|
-
/**
|
|
176
|
-
* Prompt that produced this output.
|
|
177
|
-
* ```jsx
|
|
178
|
-
* const output = { prompt: 'User prompt', responseContent: 'Generated content' };
|
|
179
|
-
* ```
|
|
180
|
-
*/
|
|
181
|
-
prompt?: string;
|
|
182
|
-
/**
|
|
183
|
-
* Generated response content.
|
|
184
|
-
* ```jsx
|
|
185
|
-
* const output = { responseContent: 'Generated content' };
|
|
186
|
-
* ```
|
|
187
|
-
*/
|
|
188
|
-
responseContent: string;
|
|
189
|
-
/**
|
|
190
|
-
* Indicates if this output is a retry.
|
|
191
|
-
* ```jsx
|
|
192
|
-
* const output = { isRetry: true, responseContent: 'Generated content' };
|
|
193
|
-
* ```
|
|
194
|
-
*/
|
|
195
|
-
isRetry?: boolean;
|
|
196
|
-
/**
|
|
197
|
-
* Rating type applied to the output.
|
|
198
|
-
* ```jsx
|
|
199
|
-
* const output = { ratingType: 'positive', responseContent: 'Generated content' };
|
|
200
|
-
* ```
|
|
201
|
-
*/
|
|
202
|
-
ratingType?: string;
|
|
203
|
-
/**
|
|
204
|
-
* Command that triggered the prompt generation.
|
|
205
|
-
* ```jsx
|
|
206
|
-
* const output = { command: { name: 'Retry' }, responseContent: 'Generated content' };
|
|
207
|
-
* ```
|
|
208
|
-
*/
|
|
209
|
-
command?: CommandInterface;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Represents the KendoReact AIPromptOutputView component.
|
|
214
|
-
*/
|
|
215
|
-
export declare const AIPromptOutputView: (props: AIPromptOutputViewProps) => JSX.Element;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* The props of the AIPromptOutputView component.
|
|
219
|
-
*/
|
|
220
|
-
declare interface AIPromptOutputViewProps {
|
|
221
|
-
/**
|
|
222
|
-
* The collection of generated prompt outputs that will be rendered in the Output view.
|
|
223
|
-
*/
|
|
224
|
-
outputs?: AIPromptOutputInterface[];
|
|
225
|
-
/**
|
|
226
|
-
* Represents a template that allows you to define custom Card fields for:
|
|
227
|
-
* header
|
|
228
|
-
* body
|
|
229
|
-
* actions
|
|
230
|
-
* The custom fields will override the default one.
|
|
231
|
-
*/
|
|
232
|
-
outputCard?: AIPromptCardInterface;
|
|
233
|
-
/**
|
|
234
|
-
* Specifies if the rating buttons in each card will be rendered.
|
|
235
|
-
* By default, rating buttons are not rendered.
|
|
236
|
-
*
|
|
237
|
-
* @default false
|
|
238
|
-
*/
|
|
239
|
-
showOutputRating?: boolean;
|
|
240
|
-
/**
|
|
241
|
-
* Fires each time the user clicks Copy button in the card.
|
|
242
|
-
*/
|
|
243
|
-
onCopy?: () => void;
|
|
244
|
-
/**
|
|
245
|
-
* Fires each time the user clicks a rating button in the card.
|
|
246
|
-
*/
|
|
247
|
-
onOutputRating?: () => void;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Props of the AIPrompt component.
|
|
252
|
-
*/
|
|
253
|
-
export declare interface AIPromptProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
254
|
-
/**
|
|
255
|
-
* Inline styles for the root element.
|
|
256
|
-
* ```jsx
|
|
257
|
-
* <AIPrompt style={{ backgroundColor: 'lightblue' }} />
|
|
258
|
-
* ```
|
|
259
|
-
*/
|
|
260
|
-
style?: default_2.CSSProperties;
|
|
261
|
-
/**
|
|
262
|
-
* Sets the name of the `activeView` property:
|
|
263
|
-
* ```jsx
|
|
264
|
-
* <AIPrompt activeView="promptView" />
|
|
265
|
-
* ```
|
|
266
|
-
*/
|
|
267
|
-
activeView: typeof promptViewDefaults.name | typeof outputViewDefaults.name | typeof commandsViewDefaults.name | string;
|
|
268
|
-
/**
|
|
269
|
-
* Items rendered in the toolbar.
|
|
270
|
-
* The items rendered in the toolbar. the `toolbarItems` property:
|
|
271
|
-
* ```jsx
|
|
272
|
-
* <AIPrompt toolbarItems={[<CustomToolbarItem />]} />
|
|
273
|
-
* ```
|
|
274
|
-
*/
|
|
275
|
-
toolbarItems?: (AIPromptToolbarItemInterface | default_2.ReactNode)[];
|
|
276
|
-
/**
|
|
277
|
-
* Output items generated from prompts.
|
|
278
|
-
*
|
|
279
|
-
* @hidden
|
|
280
|
-
*/
|
|
281
|
-
outputs?: AIPromptOutputInterface[];
|
|
282
|
-
/**
|
|
283
|
-
* Custom content rendered inside the component.
|
|
284
|
-
* ```jsx
|
|
285
|
-
* <AIPrompt>
|
|
286
|
-
* <div>Custom content</div>
|
|
287
|
-
* </AIPrompt>
|
|
288
|
-
* ```
|
|
289
|
-
*/
|
|
290
|
-
children?: default_2.ReactNode;
|
|
291
|
-
/**
|
|
292
|
-
* Placeholder text for the prompt input.
|
|
293
|
-
* ```jsx
|
|
294
|
-
* <AIPrompt promptPlaceholder="Type your prompt here..." />
|
|
295
|
-
* ```
|
|
296
|
-
*/
|
|
297
|
-
promptPlaceholder?: string;
|
|
298
|
-
/**
|
|
299
|
-
* Text direction of the component.
|
|
300
|
-
* ```jsx
|
|
301
|
-
* <AIPrompt dir="rtl" />
|
|
302
|
-
* ```
|
|
303
|
-
*/
|
|
304
|
-
dir?: string;
|
|
305
|
-
/**
|
|
306
|
-
* Fires when the active view changes. Provides the new view name.
|
|
307
|
-
* ```jsx
|
|
308
|
-
* <AIPrompt onActiveViewChange={(name) => console.log('Active view changed to:', name)} />
|
|
309
|
-
* ```
|
|
310
|
-
*/
|
|
311
|
-
onActiveViewChange?: (name: string) => void;
|
|
312
|
-
/**
|
|
313
|
-
* Fires when a command is executed.
|
|
314
|
-
* ```jsx
|
|
315
|
-
* <AIPrompt onCommandExecute={(command) => console.log('Command executed:', command)} />
|
|
316
|
-
* ```
|
|
317
|
-
*/
|
|
318
|
-
onCommandExecute?: (command: CommandInterface) => void;
|
|
319
|
-
/**
|
|
320
|
-
* Fires when a prompt is requested. Provides the prompt and optional target output.
|
|
321
|
-
* ```jsx
|
|
322
|
-
* <AIPrompt onPromptRequest={(prompt) => console.log('Prompt requested:', prompt)} />
|
|
323
|
-
* ```
|
|
324
|
-
*/
|
|
325
|
-
onPromptRequest?: (prompt?: string, outputItem?: AIPromptOutputInterface) => void;
|
|
326
|
-
/**
|
|
327
|
-
* Fires when the prompt is canceled.
|
|
328
|
-
* ```jsx
|
|
329
|
-
* <AIPrompt onCancel={() => console.log('Prompt cancelled')} />
|
|
330
|
-
* ```
|
|
331
|
-
*/
|
|
332
|
-
onCancel?: () => void;
|
|
333
|
-
/**
|
|
334
|
-
* Indicates streaming state of the prompt.
|
|
335
|
-
* ```jsx
|
|
336
|
-
* <AIPrompt streaming={true} />
|
|
337
|
-
* ```
|
|
338
|
-
*/
|
|
339
|
-
streaming?: boolean;
|
|
340
|
-
/**
|
|
341
|
-
* Indicates loading state of the prompt.
|
|
342
|
-
* ```jsx
|
|
343
|
-
* <AIPrompt loading={true} />
|
|
344
|
-
* ```
|
|
345
|
-
*/
|
|
346
|
-
loading?: boolean;
|
|
347
|
-
/**
|
|
348
|
-
* Optionally specifies the rendering for the suggestions displayed in the AI Prompt component.
|
|
349
|
-
*/
|
|
350
|
-
suggestionsView?: SuggestionsView;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* An interface for the AIPromptToolbarItem.
|
|
355
|
-
*/
|
|
356
|
-
export declare interface AIPromptToolbarItemInterface {
|
|
357
|
-
/**
|
|
358
|
-
* Defines the name of the view witch is related to.
|
|
359
|
-
*/
|
|
360
|
-
name: string;
|
|
361
|
-
/**
|
|
362
|
-
* Defines the svgIcon used in the Toolbar button.
|
|
363
|
-
*/
|
|
364
|
-
buttonIcon?: SVGIcon_2;
|
|
365
|
-
/**
|
|
366
|
-
* Defines the text used in the Toolbar button.
|
|
367
|
-
*/
|
|
368
|
-
buttonText?: string;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* The props of the AIPromptCommandsView component.
|
|
373
|
-
*/
|
|
374
|
-
export declare const AIPromptView: (props: AIPromptViewProps) => JSX.Element;
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* The properties of the AIPromptView component.
|
|
378
|
-
*/
|
|
379
|
-
export declare interface AIPromptViewProps {
|
|
380
|
-
/**
|
|
381
|
-
* Accepts a custom component that can be used to render the prompt input. See example [here](https://www.telerik.com/kendo-react-ui/components/conversational-ui/ai-prompt/customization).
|
|
382
|
-
*/
|
|
383
|
-
promptInput?: CustomComponent<TextAreaProps>;
|
|
384
|
-
/**
|
|
385
|
-
* Accepts a custom component that can be used to render the generate button. See example [here](https://www.telerik.com/kendo-react-ui/components/conversational-ui/ai-prompt/customization).
|
|
386
|
-
*/
|
|
387
|
-
generateButton?: CustomComponent<ButtonProps>;
|
|
388
|
-
/**
|
|
389
|
-
* The value of the prompt input.
|
|
390
|
-
*/
|
|
391
|
-
promptValue?: string;
|
|
392
|
-
/**
|
|
393
|
-
* The suggestions that will be displayed in the prompt view. See example [here](https://www.telerik.com/kendo-react-ui/components/conversational-ui/ai-prompt/suggestions).
|
|
394
|
-
*/
|
|
395
|
-
promptSuggestions?: string[];
|
|
396
|
-
/**
|
|
397
|
-
* Show speech to text button in input. When true, shows the button with default settings.
|
|
398
|
-
* When an object is provided, passes those props directly to the SpeechToTextButton component.
|
|
399
|
-
*
|
|
400
|
-
* @default false
|
|
401
|
-
*/
|
|
402
|
-
enableSpeechToText?: boolean | SpeechToTextButtonProps;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* Represents the KendoReact AIPromptViewRender component.
|
|
407
|
-
*/
|
|
408
|
-
export declare const AIPromptViewRender: (props: AIPromptViewRenderProps) => default_2.ReactNode;
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* The props of the AIPromptViewRender component.
|
|
412
|
-
*/
|
|
413
|
-
declare interface AIPromptViewRenderProps {
|
|
414
|
-
/**
|
|
415
|
-
* Specifies the name of the view.
|
|
416
|
-
*/
|
|
417
|
-
name: string;
|
|
418
|
-
/**
|
|
419
|
-
* Specifies the AIPromptViewRender children elements.
|
|
420
|
-
*/
|
|
421
|
-
children: default_2.ReactNode;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* Represents a message attachment ([see examples](https://www.telerik.com/kendo-react-ui/components/conversational-ui/chat/file-uploads-and-media/attachments)).
|
|
426
|
-
*/
|
|
427
|
-
export declare interface Attachment {
|
|
428
|
-
/**
|
|
429
|
-
* Content type identifier for the attachment.
|
|
430
|
-
* Typically a MIME type. Can be any string.
|
|
431
|
-
*/
|
|
432
|
-
contentType: string;
|
|
433
|
-
/**
|
|
434
|
-
* Content of the attachment.
|
|
435
|
-
*/
|
|
436
|
-
content: any;
|
|
437
|
-
/**
|
|
438
|
-
* Optional title of the attachment.
|
|
439
|
-
*/
|
|
440
|
-
title?: string;
|
|
441
|
-
/**
|
|
442
|
-
* Optional subtitle of the attachment.
|
|
443
|
-
*/
|
|
444
|
-
subtitle?: string;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* Specifies the layout for message attachments.
|
|
449
|
-
*
|
|
450
|
-
* The supported values are:
|
|
451
|
-
* * `"list"`—A vertical list.
|
|
452
|
-
* * `"carousel"`—A horizontal, scrollable list. Also called a card deck.
|
|
453
|
-
*/
|
|
454
|
-
export declare type AttachmentLayout = 'list' | 'carousel';
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* Represents the [KendoReact Chat component](https://www.telerik.com/kendo-react-ui/components/conversational-ui).
|
|
458
|
-
*/
|
|
459
|
-
export declare const Chat: React_2.ForwardRefExoticComponent<ChatProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Arguments for the `actionexecute` event of the Chat.
|
|
463
|
-
*/
|
|
464
|
-
export declare interface ChatActionExecuteEvent extends Omit<BaseEvent<React_2.Component>, 'target'> {
|
|
465
|
-
/**
|
|
466
|
-
* The executed action.
|
|
467
|
-
*/
|
|
468
|
-
action: Action;
|
|
469
|
-
/**
|
|
470
|
-
* The target message.
|
|
471
|
-
*/
|
|
472
|
-
target?: Message;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* Represents a file attachment in a Chat message.
|
|
477
|
-
*/
|
|
478
|
-
export declare interface ChatFile {
|
|
479
|
-
/**
|
|
480
|
-
* Unique identifier for the file.
|
|
481
|
-
*/
|
|
482
|
-
id: string;
|
|
483
|
-
/**
|
|
484
|
-
* Name of the file.
|
|
485
|
-
*/
|
|
486
|
-
name: string;
|
|
487
|
-
/**
|
|
488
|
-
* Size of the file in bytes.
|
|
489
|
-
*/
|
|
490
|
-
size: number;
|
|
491
|
-
/**
|
|
492
|
-
* MIME type of the file (for example, `application/pdf`).
|
|
493
|
-
*/
|
|
494
|
-
type: string;
|
|
495
|
-
/**
|
|
496
|
-
* Optional URL to download or view the file.
|
|
497
|
-
*/
|
|
498
|
-
url?: string;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Represents the ChatMessage component.
|
|
503
|
-
*/
|
|
504
|
-
export declare const ChatMessage: React_2.FC<ChatMessageProps>;
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Represents a Chat message box.
|
|
508
|
-
*/
|
|
509
|
-
export declare interface ChatMessageBoxProps {
|
|
510
|
-
/**
|
|
511
|
-
* Input message element of the Chat.
|
|
512
|
-
*/
|
|
513
|
-
messageInput: React.ReactElement;
|
|
514
|
-
/**
|
|
515
|
-
* Send button element of the Chat.
|
|
516
|
-
*/
|
|
517
|
-
sendButton: React.ReactElement;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* Represents the properties of `ChatMessage` component.
|
|
522
|
-
*/
|
|
523
|
-
export declare interface ChatMessageProps {
|
|
524
|
-
/**
|
|
525
|
-
* Represents the data item of the `Message`.
|
|
526
|
-
*/
|
|
527
|
-
item: MessageModel;
|
|
528
|
-
/**
|
|
529
|
-
* Represents the React Component rendered inside the `Message`.
|
|
530
|
-
*/
|
|
531
|
-
template?: React_2.ComponentType<ChatMessageTemplateProps>;
|
|
532
|
-
/**
|
|
533
|
-
* Represents the React Component rendered inside the .k-bubble-content element.
|
|
534
|
-
*/
|
|
535
|
-
contentTemplate?: React_2.ComponentType<ChatMessageTemplateProps>;
|
|
536
|
-
/**
|
|
537
|
-
* @hidden
|
|
538
|
-
*/
|
|
539
|
-
onRequestSelection: any;
|
|
540
|
-
/**
|
|
541
|
-
* Represents the tab index attribute.
|
|
542
|
-
*/
|
|
543
|
-
tabIndex?: number;
|
|
544
|
-
/**
|
|
545
|
-
* Represents the date format of the message date.
|
|
546
|
-
*/
|
|
547
|
-
dateFormat?: string;
|
|
548
|
-
/**
|
|
549
|
-
* Sets the `selected` state of the component.
|
|
550
|
-
*/
|
|
551
|
-
selected: boolean;
|
|
552
|
-
/**
|
|
553
|
-
* Determines whether messages can be collapsed/expanded when multiple consecutive messages are from the same author.
|
|
554
|
-
*/
|
|
555
|
-
allowMessageCollapse?: boolean;
|
|
556
|
-
/**
|
|
557
|
-
* @hidden
|
|
558
|
-
* Defines the actions that will be displayed in the message toolbar.
|
|
559
|
-
* This can include buttons for actions like reply, edit, delete, etc.
|
|
560
|
-
*/
|
|
561
|
-
messageToolbarActions?: MessageAction[];
|
|
562
|
-
/**
|
|
563
|
-
* @hidden
|
|
564
|
-
* Defines the actions that will be displayed in the message context menu.
|
|
565
|
-
* This can include buttons for actions like reply, edit, delete, etc.
|
|
566
|
-
*/
|
|
567
|
-
messageContextMenuActions?: MessageAction[];
|
|
568
|
-
/**
|
|
569
|
-
* @hidden
|
|
570
|
-
* Defines the actions that will be displayed for files in messages.
|
|
571
|
-
* This can include buttons for actions like download, view, etc.
|
|
572
|
-
*/
|
|
573
|
-
fileActions?: MessageAction[];
|
|
574
|
-
/**
|
|
575
|
-
* @hidden
|
|
576
|
-
*/
|
|
577
|
-
isSender?: boolean;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
/**
|
|
581
|
-
* Represents the properties available to the `messageTemplate` custom component.
|
|
582
|
-
*
|
|
583
|
-
* For more information, refer to the [Message Template](https://www.telerik.com/kendo-react-ui/components/conversational-ui/chat/customization/message-templates) article.
|
|
584
|
-
*/
|
|
585
|
-
export declare interface ChatMessageTemplateProps {
|
|
586
|
-
/**
|
|
587
|
-
* The message data object containing all information about the message to be rendered.
|
|
588
|
-
*/
|
|
589
|
-
item: MessageModel;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
export declare interface ChatProps extends FieldMappingConfig {
|
|
593
|
-
/**
|
|
594
|
-
* CSS class of the Chat DOM element.
|
|
595
|
-
*/
|
|
596
|
-
className?: string;
|
|
597
|
-
/**
|
|
598
|
-
* ID of the Chat component.
|
|
599
|
-
*/
|
|
600
|
-
id?: string;
|
|
601
|
-
/**
|
|
602
|
-
* Represents the styles that are applied to the Chat.
|
|
603
|
-
*
|
|
604
|
-
* @example
|
|
605
|
-
* ```tsx
|
|
606
|
-
* <Chat style={{ maxWidth: '400px' }} />
|
|
607
|
-
* ```
|
|
608
|
-
*/
|
|
609
|
-
style?: React.CSSProperties;
|
|
610
|
-
/**
|
|
611
|
-
* Messages of the Chat. Can be an array of `Message` objects or raw data objects
|
|
612
|
-
* that map using the field mapping configuration.
|
|
613
|
-
*/
|
|
614
|
-
messages: Message[] | any[];
|
|
615
|
-
/**
|
|
616
|
-
* ID of the local user. Identifies messages authored by the local user.
|
|
617
|
-
*/
|
|
618
|
-
authorId: number | string;
|
|
619
|
-
/**
|
|
620
|
-
* React functional or class component used as a message template. The corresponding [`message`](https://www.telerik.com/kendo-react-ui/components/conversational-ui/api/message) is passed as an `item` property.
|
|
621
|
-
*/
|
|
622
|
-
messageTemplate?: React.ComponentType<ChatMessageTemplateProps>;
|
|
623
|
-
/**
|
|
624
|
-
* React functional or class component used as a message content template. Rendered inside the .k-bubble-content element when provided. The corresponding [`message`](https://www.telerik.com/kendo-react-ui/components/conversational-ui/api/message) is passed as an `item` property.
|
|
625
|
-
*/
|
|
626
|
-
messageContentTemplate?: React.ComponentType<ChatMessageTemplateProps>;
|
|
627
|
-
/**
|
|
628
|
-
* React functional or class component used as an attachment template ([see example](https://www.telerik.com/kendo-react-ui/components/conversational-ui/chat/file-uploads-and-media/attachments#toc-attachment-templates)). The corresponding [`attachment`](https://www.telerik.com/kendo-react-ui/components/conversational-ui/api/attachment) is passed as an `item` property.
|
|
629
|
-
*/
|
|
630
|
-
attachmentTemplate?: any;
|
|
631
|
-
/**
|
|
632
|
-
* Width of the Chat.
|
|
633
|
-
*/
|
|
634
|
-
width?: string | number;
|
|
635
|
-
/**
|
|
636
|
-
* Height of the Chat.
|
|
637
|
-
*/
|
|
638
|
-
height?: string | number;
|
|
639
|
-
/**
|
|
640
|
-
* Fires when the user types a message and clicks **Send** or presses **Enter**. Emits [`SendMessageEvent`](https://www.telerik.com/kendo-react-ui/components/conversational-ui/api/chatsendmessageevent).
|
|
641
|
-
*
|
|
642
|
-
* > The Chat does not automatically update with the new message.
|
|
643
|
-
*/
|
|
644
|
-
onSendMessage?: (event: ChatSendMessageEvent) => void;
|
|
645
|
-
/**
|
|
646
|
-
* Fires when the user clicks a quick action button. The Chat internally handles the `reply`, `openUrl`, and `call` [known actions](https://www.telerik.com/kendo-react-ui/components/conversational-ui/api/actiontype). Emits [`ExecuteActionEvent`](https://www.telerik.com/kendo-react-ui/components/conversational-ui/api/chatactionexecuteevent). The event is preventable. If you call `preventDefault`, the built-in action is suppressed.
|
|
647
|
-
*/
|
|
648
|
-
onActionExecute?: (event: ChatActionExecuteEvent) => void;
|
|
649
|
-
/**
|
|
650
|
-
* Direction of the Chat component.
|
|
651
|
-
*/
|
|
652
|
-
dir?: string;
|
|
653
|
-
/**
|
|
654
|
-
* Text displayed inside the new message input when empty.
|
|
655
|
-
*/
|
|
656
|
-
placeholder?: string;
|
|
657
|
-
/**
|
|
658
|
-
* Enables customization or override of the default message box item ([see example](https://www.telerik.com/kendo-react-ui/components/conversational-ui/chat/customization/messagebox-templates)).
|
|
659
|
-
*/
|
|
660
|
-
messageBox?: React.ComponentType<ChatMessageBoxProps>;
|
|
661
|
-
/**
|
|
662
|
-
* @hidden
|
|
663
|
-
* Represents the ChatMessage component.
|
|
664
|
-
*/
|
|
665
|
-
message?: React.ComponentType<ChatMessageProps>;
|
|
666
|
-
/**
|
|
667
|
-
* List of message suggestions displayed above the message input.
|
|
668
|
-
*/
|
|
669
|
-
suggestions?: ChatSuggestion[];
|
|
670
|
-
/**
|
|
671
|
-
* Template for suggestion items displayed above the message input.
|
|
672
|
-
*/
|
|
673
|
-
suggestionTemplate?: React.ComponentType<SuggestionTemplateProps>;
|
|
674
|
-
/**
|
|
675
|
-
* Fires when a suggestion is clicked. Provides the clicked suggestion.
|
|
676
|
-
*/
|
|
677
|
-
onSuggestionClick?: (suggestion: ChatSuggestion) => void;
|
|
678
|
-
/**
|
|
679
|
-
* Controls how suggestions behave when they exceed available space.
|
|
680
|
-
* - `scroll`—Suggestions scroll horizontally without navigation buttons.
|
|
681
|
-
* - `wrap`—Suggestions wrap to new lines when they overflow.
|
|
682
|
-
* - `scrollbuttons`—Suggestions scroll horizontally with navigation buttons.
|
|
683
|
-
*
|
|
684
|
-
* @default 'scroll'
|
|
685
|
-
*/
|
|
686
|
-
suggestionsLayout?: SuggestionsLayoutMode;
|
|
687
|
-
/**
|
|
688
|
-
* Controls how quick actions behave when they exceed available space.
|
|
689
|
-
* - `scroll`—Quick actions scroll horizontally without navigation buttons.
|
|
690
|
-
* - `wrap`—Quick actions wrap to new lines when they overflow.
|
|
691
|
-
* - `scrollbuttons`—Quick actions scroll horizontally with navigation buttons.
|
|
692
|
-
*
|
|
693
|
-
* @default 'scroll'
|
|
694
|
-
*/
|
|
695
|
-
quickActionsLayout?: QuickActionsLayoutMode;
|
|
696
|
-
/**
|
|
697
|
-
* Template for the header of the Chat component.
|
|
698
|
-
*/
|
|
699
|
-
headerTemplate?: React.ReactElement | (() => React.ReactElement);
|
|
700
|
-
/**
|
|
701
|
-
* Template for the empty Chat state when no messages are present.
|
|
702
|
-
* Only renders when there are no messages and this template is provided.
|
|
703
|
-
*/
|
|
704
|
-
noDataTemplate?: React.ReactElement | (() => React.ReactElement);
|
|
705
|
-
/**
|
|
706
|
-
* Template for the timestamp of the message.
|
|
707
|
-
*/
|
|
708
|
-
timestampTemplate?: React.ComponentType<{
|
|
709
|
-
item: DateMarker;
|
|
710
|
-
}>;
|
|
711
|
-
/**
|
|
712
|
-
* Template for status items below each message.
|
|
713
|
-
*/
|
|
714
|
-
statusTemplate?: React.ComponentType<StatusTemplateProps>;
|
|
715
|
-
/**
|
|
716
|
-
* Template for user status display next to avatars.
|
|
717
|
-
* Only rendered when an avatar for the user is provided.
|
|
718
|
-
*/
|
|
719
|
-
userStatusTemplate?: React.ComponentType<UserStatusTemplateProps>;
|
|
720
|
-
/**
|
|
721
|
-
* Enables expand or collapse for messages to save space.
|
|
722
|
-
*/
|
|
723
|
-
allowMessageCollapse?: boolean;
|
|
724
|
-
/**
|
|
725
|
-
* Actions displayed in the message toolbar.
|
|
726
|
-
*/
|
|
727
|
-
messageToolbarActions?: MessageAction[];
|
|
728
|
-
/**
|
|
729
|
-
* Actions displayed in the message context menu.
|
|
730
|
-
*/
|
|
731
|
-
messageContextMenuActions?: MessageAction[];
|
|
732
|
-
/**
|
|
733
|
-
* Actions displayed for files in the message.
|
|
734
|
-
*/
|
|
735
|
-
fileActions?: MessageAction[];
|
|
736
|
-
/**
|
|
737
|
-
* Fires when a message is unpinned. Provides the message.
|
|
738
|
-
*/
|
|
739
|
-
onUnpin?: (message: Message) => void;
|
|
740
|
-
/**
|
|
741
|
-
* Sets the message width mode.
|
|
742
|
-
* - `full`—Message occupies the full width of the Chat.
|
|
743
|
-
* - `standard`—Message occupies a standard width for a compact display.
|
|
744
|
-
*
|
|
745
|
-
* @default 'standard'
|
|
746
|
-
*/
|
|
747
|
-
messageWidthMode?: MessageWidthMode;
|
|
748
|
-
/**
|
|
749
|
-
* Controls whether avatars are displayed for messages.
|
|
750
|
-
* Can be overridden by author-specific and receiver-specific settings.
|
|
751
|
-
*
|
|
752
|
-
* @default true
|
|
753
|
-
*/
|
|
754
|
-
showAvatar?: boolean;
|
|
755
|
-
/**
|
|
756
|
-
* Controls whether author names are displayed for messages.
|
|
757
|
-
* Can be overridden by author-specific and receiver-specific settings.
|
|
758
|
-
*
|
|
759
|
-
* @default true
|
|
760
|
-
*/
|
|
761
|
-
showUsername?: boolean;
|
|
762
|
-
/**
|
|
763
|
-
* Controls when timestamps are visible for messages.
|
|
764
|
-
* - `onFocus`—Timestamps are only visible for selected/focused messages.
|
|
765
|
-
* - `hidden`—Timestamps are never visible for any messages.
|
|
766
|
-
*
|
|
767
|
-
* @default 'onFocus'
|
|
768
|
-
*/
|
|
769
|
-
timestampVisibility?: TimestampVisibilityMode;
|
|
770
|
-
/**
|
|
771
|
-
* Configuration settings for author messages (messages from the local user).
|
|
772
|
-
* These settings override global message settings for author messages.
|
|
773
|
-
* If both global and author-specific settings are provided, the author-specific settings take precedence.
|
|
774
|
-
*/
|
|
775
|
-
authorMessageSettings?: MessageSettings;
|
|
776
|
-
/**
|
|
777
|
-
* Configuration settings for receiver messages (messages from other users).
|
|
778
|
-
* These settings override global message settings for receiver messages.
|
|
779
|
-
* If both global and receiver-specific settings are provided, the receiver-specific settings take precedence.
|
|
780
|
-
*/
|
|
781
|
-
receiverMessageSettings?: MessageSettings;
|
|
782
|
-
/**
|
|
783
|
-
* Sets the file layout mode for file attachments in messages.
|
|
784
|
-
* - `vertical`—Files are displayed in a vertical list layout.
|
|
785
|
-
* - `wrap`—Files are displayed in a wrapped layout.
|
|
786
|
-
* - `horizontal`—Files are displayed in a horizontal list layout with scrollable overflow.
|
|
787
|
-
*
|
|
788
|
-
* @default 'vertical'
|
|
789
|
-
*/
|
|
790
|
-
messageFilesLayout?: FilesLayoutMode;
|
|
791
|
-
/**
|
|
792
|
-
* Enables the speech-to-text functionality in the Chat.
|
|
793
|
-
* This allows users to dictate messages instead of typing them.
|
|
794
|
-
*/
|
|
795
|
-
speechToTextConfig?: boolean | SpeechToTextButtonProps;
|
|
796
|
-
/**
|
|
797
|
-
* Sets the upload configuration for the Chat component.
|
|
798
|
-
* This can be used to customize the file upload behavior, such as accepted file types and maximum file size.
|
|
799
|
-
*/
|
|
800
|
-
uploadConfig?: boolean | UploadProps;
|
|
801
|
-
/**
|
|
802
|
-
* Configures the appearance and behavior of the send button in the Chat component.
|
|
803
|
-
*/
|
|
804
|
-
sendButtonConfig?: ButtonProps;
|
|
805
|
-
/**
|
|
806
|
-
* Fires when a toolbar action is executed on a message. Provides the action and target message.
|
|
807
|
-
*/
|
|
808
|
-
onToolbarAction?: (action: MessageAction, event: React.SyntheticEvent<any>, target: Message) => void;
|
|
809
|
-
/**
|
|
810
|
-
* Fires when a context menu action is executed on a message. Provides the action and target message.
|
|
811
|
-
*/
|
|
812
|
-
onContextMenuAction?: (action: MessageAction, event: React.SyntheticEvent<any>, target: Message) => void;
|
|
813
|
-
/**
|
|
814
|
-
* Fires when a file action is executed on a message. Provides the action and target file.
|
|
815
|
-
*/
|
|
816
|
-
onFileAction?: (action: FileAction, event: React.SyntheticEvent<any>, target: ChatFile) => void;
|
|
817
|
-
/**
|
|
818
|
-
* Fires when a download action is executed on a message. Provides the selected files and parent message.
|
|
819
|
-
*/
|
|
820
|
-
onDownload?: (files: ChatFile[], message: Message) => void;
|
|
821
|
-
/**
|
|
822
|
-
* Fires when the input value changes. Provides the new input value.
|
|
823
|
-
*/
|
|
824
|
-
onInputValueChange?: (value: string) => void;
|
|
825
|
-
/**
|
|
826
|
-
* Input value of the Chat component.
|
|
827
|
-
*/
|
|
828
|
-
inputValue?: string;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
/**
|
|
832
|
-
* Arguments for the `messagesend` event of the Chat.
|
|
833
|
-
*/
|
|
834
|
-
export declare interface ChatSendMessageEvent extends BaseEvent<React_2.Component> {
|
|
835
|
-
/**
|
|
836
|
-
* The new message.
|
|
837
|
-
*/
|
|
838
|
-
message: Message;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* @hidden
|
|
843
|
-
*/
|
|
844
|
-
export declare interface ChatState {
|
|
845
|
-
selectedItemIndex: number | null;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
/**
|
|
849
|
-
* Represents the structure of a chat suggestion item that can be displayed above the message input.
|
|
850
|
-
*
|
|
851
|
-
* @interface ChatSuggestion
|
|
852
|
-
*/
|
|
853
|
-
export declare interface ChatSuggestion {
|
|
854
|
-
/**
|
|
855
|
-
* The unique identifier for the suggestion.
|
|
856
|
-
*/
|
|
857
|
-
id: string | number;
|
|
858
|
-
/**
|
|
859
|
-
* The text content of the suggestion that will be displayed to the user.
|
|
860
|
-
*/
|
|
861
|
-
text: string;
|
|
862
|
-
/**
|
|
863
|
-
* An optional description that provides additional context for the suggestion.
|
|
864
|
-
*/
|
|
865
|
-
description?: string;
|
|
866
|
-
/**
|
|
867
|
-
* Determines whether the suggestion is disabled and cannot be clicked.
|
|
868
|
-
*/
|
|
869
|
-
disabled?: boolean;
|
|
870
|
-
/**
|
|
871
|
-
* The visual style for displaying the suggestion. Can be 'classic' for rectangular styling or 'modern' for chip-like styling.
|
|
872
|
-
*/
|
|
873
|
-
suggestionsView?: SuggestionsView;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
/**
|
|
877
|
-
* Arguments for the `toolbaractionexecute` event of the Chat.
|
|
878
|
-
*/
|
|
879
|
-
export declare interface ChatToolbarActionExecuteEvent extends BaseEvent<React_2.Component> {
|
|
880
|
-
/**
|
|
881
|
-
* The new toolbarShow value.
|
|
882
|
-
*/
|
|
883
|
-
show: boolean;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
/**
|
|
887
|
-
* An interface for the command in the Command view.
|
|
888
|
-
*/
|
|
889
|
-
export declare interface CommandInterface extends CommandItemInterface {
|
|
890
|
-
/**
|
|
891
|
-
* Collection with nested commands.
|
|
892
|
-
*/
|
|
893
|
-
children?: CommandItemInterface[];
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
/**
|
|
897
|
-
* An interface for the command item.
|
|
898
|
-
*/
|
|
899
|
-
export declare interface CommandItemInterface {
|
|
900
|
-
/**
|
|
901
|
-
* The unique identifier of the command.
|
|
902
|
-
*/
|
|
903
|
-
id: string;
|
|
904
|
-
/**
|
|
905
|
-
* Specifies the command text.
|
|
906
|
-
*/
|
|
907
|
-
text: string;
|
|
908
|
-
/**
|
|
909
|
-
* Specifies the name of the SVG icon that will be rendered for the command.
|
|
910
|
-
*/
|
|
911
|
-
svgIcon?: SVGIcon;
|
|
912
|
-
/**
|
|
913
|
-
* Optional prompt function that takes selected text and returns a formatted prompt.
|
|
914
|
-
* This is used by default commands and can be used by custom commands.
|
|
915
|
-
*/
|
|
916
|
-
prompt?: (selection: string) => string;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
/**
|
|
920
|
-
* Specifies the default values for Commands view Toolbar.
|
|
921
|
-
*/
|
|
922
|
-
export declare const commandsViewDefaults: AIPromptToolbarItemInterface;
|
|
923
|
-
|
|
924
|
-
/**
|
|
925
|
-
* @hidden
|
|
926
|
-
*/
|
|
927
|
-
declare interface DateMarker {
|
|
928
|
-
type: 'date-marker';
|
|
929
|
-
timestamp: Date;
|
|
930
|
-
trackBy: any;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
/**
|
|
934
|
-
* Default field mapping configuration.
|
|
935
|
-
* These are the standard field names expected by the Chat component.
|
|
936
|
-
*
|
|
937
|
-
* @hidden
|
|
938
|
-
*/
|
|
939
|
-
export declare const DEFAULT_FIELD_MAPPING: Required<FieldMappingConfig>;
|
|
940
|
-
|
|
941
|
-
/**
|
|
942
|
-
* Extracts field mapping configuration from ChatProps
|
|
943
|
-
*
|
|
944
|
-
* @param props - ChatProps containing field mapping properties
|
|
945
|
-
* @returns FieldMappingConfig object
|
|
946
|
-
*/
|
|
947
|
-
export declare const extractFieldMappingFromProps: (props: any) => FieldMappingConfig;
|
|
948
|
-
|
|
949
|
-
/**
|
|
950
|
-
* Configuration for mapping custom data fields to Chat properties.
|
|
951
|
-
* Lets the Chat work with various data source formats by mapping
|
|
952
|
-
* your field names to expected Chat interface properties.
|
|
953
|
-
*/
|
|
954
|
-
export declare interface FieldMappingConfig {
|
|
955
|
-
/**
|
|
956
|
-
* Field name for message text content.
|
|
957
|
-
*
|
|
958
|
-
* @default 'text'
|
|
959
|
-
*/
|
|
960
|
-
textField?: string;
|
|
961
|
-
/**
|
|
962
|
-
* Field name for message status.
|
|
963
|
-
*
|
|
964
|
-
* @default 'status'
|
|
965
|
-
*/
|
|
966
|
-
statusField?: string;
|
|
967
|
-
/**
|
|
968
|
-
* Field name for message author ID.
|
|
969
|
-
*
|
|
970
|
-
* @default 'authorId'
|
|
971
|
-
*/
|
|
972
|
-
authorIdField?: string;
|
|
973
|
-
/**
|
|
974
|
-
* Field name for message author name (when flattened).
|
|
975
|
-
*
|
|
976
|
-
* @default 'authorName'
|
|
977
|
-
*/
|
|
978
|
-
authorNameField?: string;
|
|
979
|
-
/**
|
|
980
|
-
* Field name for message author avatar URL (when flattened).
|
|
981
|
-
*
|
|
982
|
-
* @default 'authorImageUrl'
|
|
983
|
-
*/
|
|
984
|
-
authorImageUrlField?: string;
|
|
985
|
-
/**
|
|
986
|
-
* Field name for alt text of the author's avatar (when flattened).
|
|
987
|
-
*
|
|
988
|
-
* @default 'authorImageAltText'
|
|
989
|
-
*/
|
|
990
|
-
authorImageAltTextField?: string;
|
|
991
|
-
/**
|
|
992
|
-
* Field name for message ID.
|
|
993
|
-
*
|
|
994
|
-
* @default 'id'
|
|
995
|
-
*/
|
|
996
|
-
idField?: string;
|
|
997
|
-
/**
|
|
998
|
-
* Field name for message timestamp.
|
|
999
|
-
*
|
|
1000
|
-
* @default 'timestamp'
|
|
1001
|
-
*/
|
|
1002
|
-
timestampField?: string;
|
|
1003
|
-
/**
|
|
1004
|
-
* Field name for file attachments.
|
|
1005
|
-
*
|
|
1006
|
-
* @default 'files'
|
|
1007
|
-
*/
|
|
1008
|
-
filesField?: string;
|
|
1009
|
-
/**
|
|
1010
|
-
* Field name for message attachments.
|
|
1011
|
-
*
|
|
1012
|
-
* @default 'attachments'
|
|
1013
|
-
*/
|
|
1014
|
-
attachmentsField?: string;
|
|
1015
|
-
/**
|
|
1016
|
-
* Field name for reply-to message ID.
|
|
1017
|
-
*
|
|
1018
|
-
* @default 'replyToId'
|
|
1019
|
-
*/
|
|
1020
|
-
replyToIdField?: string;
|
|
1021
|
-
/**
|
|
1022
|
-
* Field name for message deletion status.
|
|
1023
|
-
*
|
|
1024
|
-
* @default 'isDeleted'
|
|
1025
|
-
*/
|
|
1026
|
-
isDeletedField?: string;
|
|
1027
|
-
/**
|
|
1028
|
-
* Field name for message pinned status.
|
|
1029
|
-
*
|
|
1030
|
-
* @default 'isPinned'
|
|
1031
|
-
*/
|
|
1032
|
-
isPinnedField?: string;
|
|
1033
|
-
/**
|
|
1034
|
-
* Field name for the `typing` property of a message.
|
|
1035
|
-
*
|
|
1036
|
-
* @default 'typing'
|
|
1037
|
-
*/
|
|
1038
|
-
typingField?: string;
|
|
1039
|
-
/**
|
|
1040
|
-
* Field name for the `suggestedActions` property of a message.
|
|
1041
|
-
*
|
|
1042
|
-
* @default 'suggestedActions'
|
|
1043
|
-
*/
|
|
1044
|
-
suggestedActionsField?: string;
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
/**
|
|
1048
|
-
* Represents a file action that can be performed on a file in the chat.
|
|
1049
|
-
*/
|
|
1050
|
-
export declare interface FileAction extends MessageAction {
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
/**
|
|
1054
|
-
* Controls the layout mode for file attachments in messages.
|
|
1055
|
-
* - `vertical`—Files are displayed in a vertical list layout.
|
|
1056
|
-
* - `wrap`—Files are displayed in a wrapped layout.
|
|
1057
|
-
* - `horizontal`—Files are displayed in a horizontal list layout with scrollable overflow.
|
|
1058
|
-
*/
|
|
1059
|
-
export declare type FilesLayoutMode = 'vertical' | 'wrap' | 'horizontal';
|
|
1060
|
-
|
|
1061
|
-
/**
|
|
1062
|
-
* Represents a Hero Card component. Hero cards host a single large image and action buttons with text content.
|
|
1063
|
-
*/
|
|
1064
|
-
export declare const HeroCard: React_2.FC<HeroCardProps>;
|
|
1065
|
-
|
|
1066
|
-
/**
|
|
1067
|
-
* Arguments for the `actionexecute` event of the hero card.
|
|
1068
|
-
*/
|
|
1069
|
-
export declare interface HeroCardActionExecuteEvent extends BaseEvent<React_2.Component> {
|
|
1070
|
-
/**
|
|
1071
|
-
* The executed action.
|
|
1072
|
-
*/
|
|
1073
|
-
action: Action;
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
export declare interface HeroCardProps {
|
|
1077
|
-
/**
|
|
1078
|
-
* The URL of the hero card image.
|
|
1079
|
-
*/
|
|
1080
|
-
imageUrl: string;
|
|
1081
|
-
/**
|
|
1082
|
-
* The alt text for the hero card image.
|
|
1083
|
-
*/
|
|
1084
|
-
altText?: string;
|
|
1085
|
-
/**
|
|
1086
|
-
* The title of the hero card.
|
|
1087
|
-
*/
|
|
1088
|
-
title: string;
|
|
1089
|
-
/**
|
|
1090
|
-
* The subtitle of the hero card.
|
|
1091
|
-
*/
|
|
1092
|
-
subtitle: string;
|
|
1093
|
-
/**
|
|
1094
|
-
* An array with the possible quick actions for this hero card.
|
|
1095
|
-
*/
|
|
1096
|
-
actions: Action[];
|
|
1097
|
-
/**
|
|
1098
|
-
* Fires when the user clicks a button.
|
|
1099
|
-
*/
|
|
1100
|
-
onActionExecute?: (event: HeroCardActionExecuteEvent) => void;
|
|
1101
|
-
/**
|
|
1102
|
-
* Max width of the card image.
|
|
1103
|
-
*/
|
|
1104
|
-
imageMaxWidth?: string | number;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
export declare const InlineAIPrompt: (props: InlineAIPromptProps) => JSX.Element;
|
|
1108
|
-
|
|
1109
|
-
export declare interface InlineAIPromptOutputInterface {
|
|
1110
|
-
/**
|
|
1111
|
-
* Example usage of the `id` property:
|
|
1112
|
-
* ```jsx
|
|
1113
|
-
* const output = { id: 1, responseContent: 'Generated content' };
|
|
1114
|
-
* ```
|
|
1115
|
-
*/
|
|
1116
|
-
id: string | number;
|
|
1117
|
-
/**
|
|
1118
|
-
* Example usage of the `prompt` property:
|
|
1119
|
-
* ```jsx
|
|
1120
|
-
* const output = { prompt: 'User prompt', responseContent: 'Generated content' };
|
|
1121
|
-
* ```
|
|
1122
|
-
*/
|
|
1123
|
-
prompt?: string;
|
|
1124
|
-
/**
|
|
1125
|
-
* Example usage of the `responseContent` property:
|
|
1126
|
-
* ```jsx
|
|
1127
|
-
* const output = { responseContent: 'Generated content' };
|
|
1128
|
-
* ```
|
|
1129
|
-
*/
|
|
1130
|
-
responseContent: string;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
declare interface InlineAIPromptPopupProps {
|
|
1134
|
-
/**
|
|
1135
|
-
* Controls the visibility of the popup.
|
|
1136
|
-
*
|
|
1137
|
-
* @default false
|
|
1138
|
-
*/
|
|
1139
|
-
show?: boolean;
|
|
1140
|
-
/**
|
|
1141
|
-
* The element that serves as an anchor for the popup.
|
|
1142
|
-
*/
|
|
1143
|
-
anchor?: HTMLElement | null;
|
|
1144
|
-
/**
|
|
1145
|
-
* Fires when the popup is opened.
|
|
1146
|
-
*/
|
|
1147
|
-
onOpen?: (event: {
|
|
1148
|
-
target: any;
|
|
1149
|
-
}) => void;
|
|
1150
|
-
/**
|
|
1151
|
-
* Fires when the popup is closed.
|
|
1152
|
-
*/
|
|
1153
|
-
onClose?: (event: {
|
|
1154
|
-
target: any;
|
|
1155
|
-
}) => void;
|
|
1156
|
-
/**
|
|
1157
|
-
* Controls the animation of the popup.
|
|
1158
|
-
*
|
|
1159
|
-
* @default true
|
|
1160
|
-
*/
|
|
1161
|
-
animate?: boolean | PopupAnimation;
|
|
1162
|
-
/**
|
|
1163
|
-
* The container element where the popup will be rendered.
|
|
1164
|
-
* If not specified, the popup will be rendered in the document body.
|
|
1165
|
-
*/
|
|
1166
|
-
appendTo?: HTMLElement;
|
|
1167
|
-
/**
|
|
1168
|
-
* Object which passes props directly to the Popup component.
|
|
1169
|
-
*/
|
|
1170
|
-
popupOptions?: PopupProps;
|
|
1171
|
-
/**
|
|
1172
|
-
* The content to render inside the popup.
|
|
1173
|
-
*/
|
|
1174
|
-
children?: default_2.ReactNode;
|
|
1175
|
-
/**
|
|
1176
|
-
* Additional CSS styles for the popup content.
|
|
1177
|
-
*/
|
|
1178
|
-
style?: default_2.CSSProperties;
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
export declare interface InlineAIPromptProps extends Omit<default_2.HTMLAttributes<HTMLElement>, 'onCopy'>, InlineAIPromptPopupProps {
|
|
1182
|
-
/**
|
|
1183
|
-
* Inline styles for the root element.
|
|
1184
|
-
* ```jsx
|
|
1185
|
-
* <InlineAIPrompt style={{ backgroundColor: 'lightblue' }} />
|
|
1186
|
-
* ```
|
|
1187
|
-
*/
|
|
1188
|
-
style?: default_2.CSSProperties;
|
|
1189
|
-
/**
|
|
1190
|
-
* Collection of outputs to display as cards.
|
|
1191
|
-
*/
|
|
1192
|
-
outputs?: InlineAIPromptOutputInterface[];
|
|
1193
|
-
/**
|
|
1194
|
-
* Template that lets you define custom Card fields for header, body, and actions. Overrides defaults.
|
|
1195
|
-
*/
|
|
1196
|
-
outputCard?: AIPromptCardInterface_2;
|
|
1197
|
-
/**
|
|
1198
|
-
* Placeholder text for the prompt input.
|
|
1199
|
-
*/
|
|
1200
|
-
promptPlaceholder?: string;
|
|
1201
|
-
/**
|
|
1202
|
-
* Initial value of the prompt input.
|
|
1203
|
-
*/
|
|
1204
|
-
promptValue?: string;
|
|
1205
|
-
/**
|
|
1206
|
-
* Fires when the user submits a prompt.
|
|
1207
|
-
*/
|
|
1208
|
-
onPromptRequest?: (prompt: string, outputItem?: InlineAIPromptOutputInterface) => void;
|
|
1209
|
-
/**
|
|
1210
|
-
* Fires when the cancel action occurs.
|
|
1211
|
-
*/
|
|
1212
|
-
onPromptCancel?: () => void;
|
|
1213
|
-
/**
|
|
1214
|
-
* Fires when the user clicks the Copy button.
|
|
1215
|
-
*/
|
|
1216
|
-
onCopy?: (output: InlineAIPromptOutputInterface) => void;
|
|
1217
|
-
/**
|
|
1218
|
-
* Fires when the user clicks the Discard button.
|
|
1219
|
-
*/
|
|
1220
|
-
onDiscard?: (output: InlineAIPromptOutputInterface) => void;
|
|
1221
|
-
/**
|
|
1222
|
-
* Collection of output actions rendered in the card actions.
|
|
1223
|
-
* If not set, default actions (`copy`, `discard`) are used. You can override built-ins.
|
|
1224
|
-
*/
|
|
1225
|
-
outputActions?: OutputActionInterface[];
|
|
1226
|
-
/**
|
|
1227
|
-
* Fires when an action command executes.
|
|
1228
|
-
* Built-in `copy` and `discard` actions are handled internally.
|
|
1229
|
-
* All other actions call this handler.
|
|
1230
|
-
*/
|
|
1231
|
-
onOutputAction?: (command: OutputActionInterface, output: InlineAIPromptOutputInterface) => void;
|
|
1232
|
-
/**
|
|
1233
|
-
* Custom component used to render the prompt input.
|
|
1234
|
-
*/
|
|
1235
|
-
promptInput?: CustomComponent<TextAreaProps>;
|
|
1236
|
-
/**
|
|
1237
|
-
* Custom component used to render the generate button.
|
|
1238
|
-
*/
|
|
1239
|
-
generateButton?: CustomComponent<ButtonProps>;
|
|
1240
|
-
/**
|
|
1241
|
-
* Shows speech-to-text button in the input. When `true`, shows the button with default settings.
|
|
1242
|
-
* When you pass an object, forwards its props to the `SpeechToTextButton` component.
|
|
1243
|
-
*
|
|
1244
|
-
* @default false
|
|
1245
|
-
*/
|
|
1246
|
-
enableSpeechToText?: boolean | SpeechToTextButtonProps;
|
|
1247
|
-
/**
|
|
1248
|
-
* Indicates if the content is streaming.
|
|
1249
|
-
*/
|
|
1250
|
-
streaming?: boolean;
|
|
1251
|
-
/**
|
|
1252
|
-
* Collection of commands rendered in the context menu.
|
|
1253
|
-
* If not set, default AI text editing commands are used.
|
|
1254
|
-
*/
|
|
1255
|
-
commands?: CommandInterface[];
|
|
1256
|
-
/**
|
|
1257
|
-
* The width of the component.
|
|
1258
|
-
*/
|
|
1259
|
-
width?: number | string;
|
|
1260
|
-
/**
|
|
1261
|
-
* The height of the component.
|
|
1262
|
-
*/
|
|
1263
|
-
height?: number | string;
|
|
1264
|
-
/**
|
|
1265
|
-
* Fires when a command from the context menu executes. Provides the selected command and current prompt value.
|
|
1266
|
-
*/
|
|
1267
|
-
onCommandExecute?: (command: CommandItemInterface) => void;
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
/**
|
|
1271
|
-
* Checks if the provided message data is already in the standard Message format
|
|
1272
|
-
*
|
|
1273
|
-
* @param message - Message data to check
|
|
1274
|
-
* @returns True if the message is in standard format, false otherwise
|
|
1275
|
-
*/
|
|
1276
|
-
export declare const isStandardMessageFormat: (message: any) => message is Message;
|
|
1277
|
-
|
|
1278
|
-
/**
|
|
1279
|
-
* Maps an array of raw data objects to Message array
|
|
1280
|
-
*
|
|
1281
|
-
* @param dataArray - Array of raw data objects
|
|
1282
|
-
* @param fieldMapping - Field mapping configuration (optional)
|
|
1283
|
-
* @returns Array of mapped Message objects
|
|
1284
|
-
*/
|
|
1285
|
-
export declare const mapDataArrayToMessages: (dataArray: any[], fieldMapping?: FieldMappingConfig) => Message[];
|
|
1286
|
-
|
|
1287
|
-
/**
|
|
1288
|
-
* Maps raw data object to standardized Message interface using field mapping configuration
|
|
1289
|
-
*
|
|
1290
|
-
* @param data - Raw data object from external source
|
|
1291
|
-
* @param fieldMapping - Field mapping configuration (optional)
|
|
1292
|
-
* @returns Mapped Message object
|
|
1293
|
-
*/
|
|
1294
|
-
export declare const mapDataToMessage: (data: any, fieldMapping?: FieldMappingConfig) => Message;
|
|
1295
|
-
|
|
1296
|
-
/**
|
|
1297
|
-
* Maps a standard Message object back to custom field format
|
|
1298
|
-
* This is useful when you receive a new message in standard format but need to convert it
|
|
1299
|
-
* to your custom field mapping for data storage or API calls
|
|
1300
|
-
*
|
|
1301
|
-
* @param message - Standard Message object
|
|
1302
|
-
* @param fieldMapping - Field mapping configuration (optional)
|
|
1303
|
-
* @returns Object with custom field names
|
|
1304
|
-
*/
|
|
1305
|
-
export declare const mapMessageToCustomFormat: (message: Message, fieldMapping?: FieldMappingConfig) => any;
|
|
1306
|
-
|
|
1307
|
-
/**
|
|
1308
|
-
* Represents a Chat message.
|
|
1309
|
-
*
|
|
1310
|
-
* > * Provide the `author` field.
|
|
1311
|
-
* > * [Local users](https://www.telerik.com/kendo-react-ui/components/conversational-ui/api/chatprops#toc-user) display to the right in left-to-right languages and to the left in right-to-left languages.
|
|
1312
|
-
* > * If `typing` is `true`, the Chat displays a typing indicator instead of text.
|
|
1313
|
-
*/
|
|
1314
|
-
export declare interface Message {
|
|
1315
|
-
/**
|
|
1316
|
-
* Unique identifier of the message.
|
|
1317
|
-
*/
|
|
1318
|
-
id: number | string;
|
|
1319
|
-
/**
|
|
1320
|
-
* Author of the message.
|
|
1321
|
-
*/
|
|
1322
|
-
author: User;
|
|
1323
|
-
/**
|
|
1324
|
-
* Layout used for displaying message attachments, if any ([see example](https://www.telerik.com/kendo-react-ui/components/conversational-ui/chat/file-uploads-and-media/attachments#toc-display-modes)).
|
|
1325
|
-
*/
|
|
1326
|
-
attachmentLayout?: AttachmentLayout;
|
|
1327
|
-
/**
|
|
1328
|
-
* Optional message attachments ([see example](https://www.telerik.com/kendo-react-ui/components/conversational-ui/chat/file-uploads-and-media/attachments)).
|
|
1329
|
-
*/
|
|
1330
|
-
attachments?: Attachment[];
|
|
1331
|
-
/**
|
|
1332
|
-
* Suggested quick actions displayed below this message ([see example](https://www.telerik.com/kendo-react-ui/components/conversational-ui/chat/quick-actions/suggested-actions#toc-defining-quick-actions)).
|
|
1333
|
-
*
|
|
1334
|
-
* > The Chat displays suggested actions only for the last message in the conversation.
|
|
1335
|
-
*/
|
|
1336
|
-
suggestedActions?: Action[];
|
|
1337
|
-
/**
|
|
1338
|
-
* Optional status string for the message.
|
|
1339
|
-
* Displays when you select the message by mouse or keyboard.
|
|
1340
|
-
*/
|
|
1341
|
-
status?: string;
|
|
1342
|
-
/**
|
|
1343
|
-
* Optional text for the message.
|
|
1344
|
-
* Some messages contain only attachments or quick actions.
|
|
1345
|
-
*/
|
|
1346
|
-
text?: string;
|
|
1347
|
-
/**
|
|
1348
|
-
* Time when the message was composed.
|
|
1349
|
-
*/
|
|
1350
|
-
timestamp?: Date;
|
|
1351
|
-
/**
|
|
1352
|
-
* Indicates if the user is still typing the message.
|
|
1353
|
-
* If `true`, the Chat displays a typing indicator instead of the message.
|
|
1354
|
-
*/
|
|
1355
|
-
typing?: boolean;
|
|
1356
|
-
/**
|
|
1357
|
-
* Indicates if the message is loading.
|
|
1358
|
-
* If `true`, the Chat displays a skeleton placeholder instead of the content.
|
|
1359
|
-
*/
|
|
1360
|
-
isLoading?: boolean;
|
|
1361
|
-
/**
|
|
1362
|
-
* Indicates if the message is pinned.
|
|
1363
|
-
*/
|
|
1364
|
-
isPinned?: boolean;
|
|
1365
|
-
/**
|
|
1366
|
-
* Date and time when the message was pinned.
|
|
1367
|
-
*/
|
|
1368
|
-
pinnedAt?: Date;
|
|
1369
|
-
/**
|
|
1370
|
-
* User who pinned the message.
|
|
1371
|
-
*/
|
|
1372
|
-
pinnedBy?: User;
|
|
1373
|
-
/**
|
|
1374
|
-
* ID of the message this message replies to.
|
|
1375
|
-
*/
|
|
1376
|
-
replyToId?: number | string;
|
|
1377
|
-
/**
|
|
1378
|
-
* Indicates if the message has been deleted.
|
|
1379
|
-
*/
|
|
1380
|
-
isDeleted?: boolean;
|
|
1381
|
-
/**
|
|
1382
|
-
* Files attached to the message.
|
|
1383
|
-
*/
|
|
1384
|
-
files?: any[];
|
|
1385
|
-
/**
|
|
1386
|
-
* Index used for keyboard selection navigation.
|
|
1387
|
-
*/
|
|
1388
|
-
selectionIndex?: number;
|
|
1389
|
-
/**
|
|
1390
|
-
* @hidden
|
|
1391
|
-
* Original data item containing all the raw fields from the source message.
|
|
1392
|
-
* This field preserves the original message structure for custom template access.
|
|
1393
|
-
*/
|
|
1394
|
-
dataItem?: any;
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
/**
|
|
1398
|
-
* Represents a message action that can be displayed in the message toolbar.
|
|
1399
|
-
*/
|
|
1400
|
-
export declare interface MessageAction {
|
|
1401
|
-
/**
|
|
1402
|
-
* The unique identifier for the action.
|
|
1403
|
-
*/
|
|
1404
|
-
id: string;
|
|
1405
|
-
/**
|
|
1406
|
-
* The label to display for the action.
|
|
1407
|
-
*/
|
|
1408
|
-
label: string;
|
|
1409
|
-
/**
|
|
1410
|
-
* The SVG icon to display for the action.
|
|
1411
|
-
*/
|
|
1412
|
-
svgIcon?: SVGIcon;
|
|
1413
|
-
/**
|
|
1414
|
-
* The icon to display for the action.
|
|
1415
|
-
*/
|
|
1416
|
-
icon?: string;
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
/**
|
|
1420
|
-
* Represents the data item of a single `Message`.
|
|
1421
|
-
*/
|
|
1422
|
-
export declare interface MessageModel extends Message, Selectable {
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
/**
|
|
1426
|
-
* Configuration settings for message display and behavior.
|
|
1427
|
-
*/
|
|
1428
|
-
export declare interface MessageSettings {
|
|
1429
|
-
/**
|
|
1430
|
-
* Enables expand or collapse for messages to save space.
|
|
1431
|
-
*/
|
|
1432
|
-
allowMessageCollapse?: boolean;
|
|
1433
|
-
/**
|
|
1434
|
-
* Sets the message width mode.
|
|
1435
|
-
* - `full`—Message occupies the full width of the Chat.
|
|
1436
|
-
* - `standard`—Message occupies a standard width for a compact display.
|
|
1437
|
-
*/
|
|
1438
|
-
messageWidthMode?: MessageWidthMode;
|
|
1439
|
-
/**
|
|
1440
|
-
* Controls whether avatars are displayed for this message type.
|
|
1441
|
-
* When provided, this overrides the global showAvatar setting for the specific message type (author/receiver).
|
|
1442
|
-
*/
|
|
1443
|
-
showAvatar?: boolean;
|
|
1444
|
-
/**
|
|
1445
|
-
* Controls whether author names are displayed for this message type.
|
|
1446
|
-
* When provided, this overrides the global showUsername setting for the specific message type (author/receiver).
|
|
1447
|
-
*/
|
|
1448
|
-
showUsername?: boolean;
|
|
1449
|
-
/**
|
|
1450
|
-
* React functional or class component used as a message template for this message type.
|
|
1451
|
-
* The corresponding [`message`](https://www.telerik.com/kendo-react-ui/components/conversational-ui/api/message) is passed as an `item` property.
|
|
1452
|
-
* When provided, this template overrides the global messageTemplate for the specific message type (author/receiver).
|
|
1453
|
-
*/
|
|
1454
|
-
messageTemplate?: React.ComponentType<ChatMessageTemplateProps>;
|
|
1455
|
-
/**
|
|
1456
|
-
* React functional or class component used as a message content template for this message type.
|
|
1457
|
-
* Rendered inside the .k-bubble-content element when provided.
|
|
1458
|
-
* The corresponding [`message`](https://www.telerik.com/kendo-react-ui/components/conversational-ui/api/message) is passed as an `item` property.
|
|
1459
|
-
* When provided, this template overrides the global messageContentTemplate for the specific message type (author/receiver).
|
|
1460
|
-
*/
|
|
1461
|
-
messageContentTemplate?: React.ComponentType<ChatMessageTemplateProps>;
|
|
1462
|
-
/**
|
|
1463
|
-
* Actions displayed in the message toolbar for this message type.
|
|
1464
|
-
* When provided, this overrides the global messageToolbarActions for the specific message type (author/receiver).
|
|
1465
|
-
*/
|
|
1466
|
-
messageToolbarActions?: MessageAction[];
|
|
1467
|
-
/**
|
|
1468
|
-
* Actions displayed in the message context menu for this message type.
|
|
1469
|
-
* When provided, this overrides the global messageContextMenuActions for the specific message type (author/receiver).
|
|
1470
|
-
*/
|
|
1471
|
-
messageContextMenuActions?: MessageAction[];
|
|
1472
|
-
/**
|
|
1473
|
-
* Actions displayed for files in messages for this message type.
|
|
1474
|
-
* When provided, this overrides the global fileActions for the specific message type (author/receiver).
|
|
1475
|
-
*/
|
|
1476
|
-
fileActions?: MessageAction[];
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* Controls the width mode for messages.
|
|
1481
|
-
* - `full`—Message occupies the full width of the Chat.
|
|
1482
|
-
* - `standard`—Message occupies a standard width for a compact display.
|
|
1483
|
-
*/
|
|
1484
|
-
export declare type MessageWidthMode = 'full' | 'standard';
|
|
1485
|
-
|
|
1486
|
-
export declare interface OutputActionInterface {
|
|
1487
|
-
/**
|
|
1488
|
-
* Unique identifier for the action command.
|
|
1489
|
-
*/
|
|
1490
|
-
id: string;
|
|
1491
|
-
/**
|
|
1492
|
-
* Text displayed on the button.
|
|
1493
|
-
*/
|
|
1494
|
-
text: string;
|
|
1495
|
-
/**
|
|
1496
|
-
* SVG icon displayed on the button.
|
|
1497
|
-
*/
|
|
1498
|
-
svgIcon?: any;
|
|
1499
|
-
/**
|
|
1500
|
-
* Theme color of the button.
|
|
1501
|
-
*/
|
|
1502
|
-
themeColor?: ButtonProps['themeColor'];
|
|
1503
|
-
/**
|
|
1504
|
-
* Title attribute (tooltip) for the button.
|
|
1505
|
-
*/
|
|
1506
|
-
title?: string;
|
|
1507
|
-
/**
|
|
1508
|
-
* If `true`, adds a spacer in the action commands section for visual separation.
|
|
1509
|
-
* Useful for visually separating groups of actions.
|
|
1510
|
-
*/
|
|
1511
|
-
spacer?: boolean;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
/**
|
|
1515
|
-
* Specifies the default values for Output view Toolbar.
|
|
1516
|
-
*/
|
|
1517
|
-
export declare const outputViewDefaults: AIPromptToolbarItemInterface;
|
|
1518
|
-
|
|
1519
|
-
/**
|
|
1520
|
-
* @hidden
|
|
1521
|
-
*/
|
|
1522
|
-
export declare const PromptHeader: (props: AIPromptHeaderProps) => JSX.Element;
|
|
1523
|
-
|
|
1524
|
-
/**
|
|
1525
|
-
* Specifies the default values for Prompt view Toolbar.
|
|
1526
|
-
*/
|
|
1527
|
-
export declare const promptViewDefaults: AIPromptToolbarItemInterface;
|
|
1528
|
-
|
|
1529
|
-
/**
|
|
1530
|
-
* Controls how quick actions behave when they exceed available space.
|
|
1531
|
-
* - `scroll`—Quick actions scroll horizontally without navigation buttons.
|
|
1532
|
-
* - `wrap`—Quick actions wrap to new lines when they overflow.
|
|
1533
|
-
* - `scrollbuttons`—Quick actions scroll horizontally with navigation buttons.
|
|
1534
|
-
*/
|
|
1535
|
-
export declare type QuickActionsLayoutMode = 'scroll' | 'wrap' | 'scrollbuttons';
|
|
1536
|
-
|
|
1537
|
-
/**
|
|
1538
|
-
* @hidden
|
|
1539
|
-
*/
|
|
1540
|
-
declare interface Selectable {
|
|
1541
|
-
selectionIndex?: number;
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* Represents the properties available to the `statusTemplate` custom component.
|
|
1546
|
-
*/
|
|
1547
|
-
export declare interface StatusTemplateProps {
|
|
1548
|
-
/**
|
|
1549
|
-
* Message item containing the status information.
|
|
1550
|
-
*/
|
|
1551
|
-
item: Message;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
export declare const SuggestionGroup: React_2.FC<SuggestionGroupProps>;
|
|
1555
|
-
|
|
1556
|
-
declare interface SuggestionGroupProps {
|
|
1557
|
-
suggestions: ChatSuggestion[];
|
|
1558
|
-
onSuggestionClick?: (suggestion: ChatSuggestion) => void;
|
|
1559
|
-
suggestionTemplate?: React_2.ComponentType<SuggestionTemplateProps>;
|
|
1560
|
-
suggestionsView?: SuggestionsView;
|
|
1561
|
-
suggestionsLayout?: SuggestionsLayoutMode;
|
|
1562
|
-
dir?: string;
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
/**
|
|
1566
|
-
* Controls how suggestions behave when they exceed available space.
|
|
1567
|
-
* - `scroll`—Suggestions scroll horizontally without navigation buttons.
|
|
1568
|
-
* - `wrap`—Suggestions wrap to new lines when they overflow.
|
|
1569
|
-
* - `scrollbuttons`—Suggestions scroll horizontally with navigation buttons.
|
|
1570
|
-
*/
|
|
1571
|
-
export declare type SuggestionsLayoutMode = 'scroll' | 'wrap' | 'scrollbuttons';
|
|
1572
|
-
|
|
1573
|
-
/**
|
|
1574
|
-
* Represents the rendering options for suggestions in the AI Prompt component.
|
|
1575
|
-
* 'suggestionsView' can be either 'classic' or 'modern'.
|
|
1576
|
-
* - 'classic': Uses a rectangular styling for suggestions.
|
|
1577
|
-
* - 'modern': Uses a chip-like styling for suggestions.
|
|
1578
|
-
*/
|
|
1579
|
-
export declare type SuggestionsView = 'classic' | 'modern';
|
|
1580
|
-
|
|
1581
|
-
export declare interface SuggestionTemplateProps {
|
|
1582
|
-
/**
|
|
1583
|
-
* The suggestion object containing the data to be rendered.
|
|
1584
|
-
*/
|
|
1585
|
-
suggestion: ChatSuggestion;
|
|
1586
|
-
/**
|
|
1587
|
-
* A callback function that is called when the suggestion is clicked.
|
|
1588
|
-
*/
|
|
1589
|
-
onClick?: (event: React_2.MouseEvent<HTMLElement>) => void;
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
/**
|
|
1593
|
-
* Represents the timestamp visibility mode options for the Chat component.
|
|
1594
|
-
* - `onFocus`—Timestamps are only visible for selected/focused messages (default behavior).
|
|
1595
|
-
* - `hidden`—Timestamps are never visible for any messages.
|
|
1596
|
-
*/
|
|
1597
|
-
export declare type TimestampVisibilityMode = 'onFocus' | 'hidden';
|
|
1598
|
-
|
|
1599
|
-
/**
|
|
1600
|
-
* Represents a participant in a Chat conversation.
|
|
1601
|
-
*/
|
|
1602
|
-
export declare interface User {
|
|
1603
|
-
/**
|
|
1604
|
-
* Unique ID for this user.
|
|
1605
|
-
* Typically a number. Can be a string or an object.
|
|
1606
|
-
*/
|
|
1607
|
-
id: any;
|
|
1608
|
-
/**
|
|
1609
|
-
* Optional displayed name for the user.
|
|
1610
|
-
*/
|
|
1611
|
-
name?: string;
|
|
1612
|
-
/**
|
|
1613
|
-
* Optional avatar image URL for the user.
|
|
1614
|
-
*/
|
|
1615
|
-
avatarUrl?: string;
|
|
1616
|
-
/**
|
|
1617
|
-
* Optional avatar image `alt` text for the user.
|
|
1618
|
-
*/
|
|
1619
|
-
avatarAltText?: string;
|
|
1620
|
-
}
|
|
1621
|
-
|
|
1622
|
-
/**
|
|
1623
|
-
* Represents the properties available to the `userStatusTemplate` custom component.
|
|
1624
|
-
*/
|
|
1625
|
-
export declare interface UserStatusTemplateProps {
|
|
1626
|
-
/**
|
|
1627
|
-
* The latest message in the message group as you originally passed it.
|
|
1628
|
-
* Regardless of whether field mapping is configured or not, you will always
|
|
1629
|
-
* receive the message data in its original format. This is why the type is `any`.
|
|
1630
|
-
*/
|
|
1631
|
-
message: any;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
export { }
|
|
8
|
+
import { MessageModel } from './chat/ViewItem.js';
|
|
9
|
+
import { ChatMessage, ChatMessageProps, ChatMessageTemplateProps, MessageAction, FileAction } from './chat/components/ChatMessage.js';
|
|
10
|
+
export * from './api/action.interface.js';
|
|
11
|
+
export * from './api/attachment.interface.js';
|
|
12
|
+
export * from './api/message.interface.js';
|
|
13
|
+
export * from './api/user.interface.js';
|
|
14
|
+
export * from './chat/components/Chat.js';
|
|
15
|
+
export * from './chat/ChatPropsAndState.js';
|
|
16
|
+
export * from './chat/components/SuggestionsGroup.js';
|
|
17
|
+
export * from './chat/Events.js';
|
|
18
|
+
export * from './chat/components/templates/HeroCard.js';
|
|
19
|
+
export * from './chat/utils/fieldMapping.js';
|
|
20
|
+
export * from './ai-prompt/AIPrompt.js';
|
|
21
|
+
export * from './ai-prompt/AIPromptHeader.js';
|
|
22
|
+
export * from './ai-prompt/AIPromptFooter.js';
|
|
23
|
+
export * from './ai-prompt/AIPromptContent.js';
|
|
24
|
+
export * from './ai-prompt/views/AIPromptView.js';
|
|
25
|
+
export * from './ai-prompt/views/AIPromptOutputView.js';
|
|
26
|
+
export * from './ai-prompt/views/AIPromptCommandsView.js';
|
|
27
|
+
export * from './ai-prompt/views/AIPromptViewRender.js';
|
|
28
|
+
export * from './inline-ai-prompt/InlineAIPrompt.js';
|
|
29
|
+
export * from './ai-prompt/views/constants.js';
|
|
30
|
+
export { MessageModel, ChatMessage, ChatMessageProps, ChatMessageTemplateProps, MessageAction, FileAction };
|