@progress/kendo-react-conversational-ui 11.4.0-develop.9 → 12.0.0-develop.1
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/README.md +80 -23
- package/ai-prompt/AIPrompt.js +1 -1
- package/ai-prompt/AIPrompt.mjs +40 -38
- package/ai-prompt/views/AIPromptView.js +2 -2
- package/ai-prompt/views/AIPromptView.mjs +42 -47
- package/ai-prompt/views/constants.js +1 -1
- package/ai-prompt/views/constants.mjs +1 -1
- package/chat/components/Action.js +8 -0
- package/chat/components/Action.mjs +37 -0
- package/chat/components/ActionGroup.js +8 -0
- package/chat/components/ActionGroup.mjs +56 -0
- package/chat/components/Attachment.js +8 -0
- package/chat/components/Attachment.mjs +23 -0
- package/chat/components/AttachmentGroup.js +8 -0
- package/chat/components/AttachmentGroup.mjs +66 -0
- package/chat/components/Chat.js +8 -0
- package/chat/components/Chat.mjs +388 -0
- package/chat/components/ChatContext.js +8 -0
- package/{components/base/FocusableUponSelection.mjs → chat/components/ChatContext.mjs} +10 -10
- package/chat/components/ChatMessage.js +8 -0
- package/chat/components/ChatMessage.mjs +284 -0
- package/chat/components/DateMarker.js +8 -0
- package/chat/components/DateMarker.mjs +22 -0
- package/chat/components/Header.js +8 -0
- package/{utils.mjs → chat/components/Header.mjs} +4 -2
- package/chat/components/MessageGroup.js +8 -0
- package/chat/components/MessageGroup.mjs +88 -0
- package/chat/components/NewMessage.js +8 -0
- package/chat/components/NewMessage.mjs +264 -0
- package/chat/components/Notification.js +8 -0
- package/chat/components/Notification.mjs +24 -0
- package/chat/components/SuggestionsGroup.js +1 -1
- package/chat/components/SuggestionsGroup.mjs +39 -20
- package/chat/components/elements/FileBox.js +8 -0
- package/chat/components/elements/FileBox.mjs +69 -0
- package/chat/components/elements/PinnedMessage.js +8 -0
- package/chat/components/elements/PinnedMessage.mjs +46 -0
- package/chat/components/templates/HeroCard.js +8 -0
- package/chat/components/templates/HeroCard.mjs +26 -0
- package/chat/utils/fieldMapping.js +8 -0
- package/chat/utils/fieldMapping.mjs +79 -0
- package/chat/utils.js +8 -0
- package/chat/utils.mjs +65 -0
- package/dist/cdn/js/kendo-react-conversational-ui.js +1 -1
- package/index.d.mts +437 -165
- package/index.d.ts +437 -165
- package/index.js +1 -1
- package/index.mjs +34 -27
- package/messages/index.js +1 -1
- package/messages/index.mjs +38 -16
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +7 -7
- package/components/Action.js +0 -8
- package/components/Action.mjs +0 -45
- package/components/ActionGroup.js +0 -8
- package/components/ActionGroup.mjs +0 -36
- package/components/Attachment.js +0 -8
- package/components/Attachment.mjs +0 -50
- package/components/AttachmentGroup.js +0 -8
- package/components/AttachmentGroup.mjs +0 -64
- package/components/Chat.js +0 -8
- package/components/Chat.mjs +0 -214
- package/components/ChatMessage.js +0 -8
- package/components/ChatMessage.mjs +0 -63
- package/components/ChatToolbar.js +0 -8
- package/components/ChatToolbar.mjs +0 -33
- package/components/DateMarker.js +0 -8
- package/components/DateMarker.mjs +0 -19
- package/components/MessageGroup.js +0 -8
- package/components/MessageGroup.mjs +0 -67
- package/components/NewMessage.js +0 -8
- package/components/NewMessage.mjs +0 -106
- package/components/base/FocusableUponSelection.js +0 -8
- package/components/base/SelectableItemsContainer.js +0 -8
- package/components/base/SelectableItemsContainer.mjs +0 -42
- package/components/templates/HeroCard.js +0 -8
- package/components/templates/HeroCard.mjs +0 -44
- package/utils.js +0 -8
- /package/{ViewItem.js → chat/ViewItem.js} +0 -0
- /package/{ViewItem.mjs → chat/ViewItem.mjs} +0 -0
package/index.d.mts
CHANGED
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
import { BaseEvent } from '@progress/kendo-react-common';
|
|
9
9
|
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
10
10
|
import { CustomComponent } from '@progress/kendo-react-common';
|
|
11
|
-
import { default as default_2 } from '
|
|
12
|
-
import { default as default_3 } from 'react';
|
|
11
|
+
import { default as default_2 } from 'react';
|
|
13
12
|
import { JSX } from 'react/jsx-runtime';
|
|
14
13
|
import { PopupAnimation } from '@progress/kendo-react-popup';
|
|
15
14
|
import { PopupProps } from '@progress/kendo-react-popup';
|
|
16
15
|
import * as React_2 from 'react';
|
|
17
16
|
import { SpeechToTextButtonProps } from '@progress/kendo-react-buttons';
|
|
18
|
-
import { SVGIcon } from '@progress/kendo-
|
|
19
|
-
import { SVGIcon as SVGIcon_2 } from '@progress/kendo-
|
|
17
|
+
import { SVGIcon } from '@progress/kendo-react-common';
|
|
18
|
+
import { SVGIcon as SVGIcon_2 } from '@progress/kendo-svg-icons';
|
|
20
19
|
import { TextAreaProps } from '@progress/kendo-react-inputs';
|
|
20
|
+
import { UploadProps } from '@progress/kendo-react-upload';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Defines a quick action for a message.
|
|
@@ -64,26 +64,26 @@ export declare interface AIPromptCardInterface {
|
|
|
64
64
|
/**
|
|
65
65
|
* Custom template for AIPromptCard header.
|
|
66
66
|
*/
|
|
67
|
-
header?: (props: AIPromptOutputInterface) =>
|
|
67
|
+
header?: (props: AIPromptOutputInterface) => default_2.ReactNode;
|
|
68
68
|
/**
|
|
69
69
|
* Custom template for AIPromptCard body.
|
|
70
70
|
*/
|
|
71
|
-
body?: (props: AIPromptOutputInterface) =>
|
|
71
|
+
body?: (props: AIPromptOutputInterface) => default_2.ReactNode;
|
|
72
72
|
/**
|
|
73
73
|
* Custom template for AIPromptCard actions.
|
|
74
74
|
*/
|
|
75
|
-
actions?: (props: AIPromptOutputInterface) =>
|
|
75
|
+
actions?: (props: AIPromptOutputInterface) => default_2.ReactNode;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
declare interface AIPromptCardInterface_2 {
|
|
79
79
|
/**
|
|
80
80
|
* Custom template for AIPromptCard body.
|
|
81
81
|
*/
|
|
82
|
-
body?: (props: InlineAIPromptOutputInterface) =>
|
|
82
|
+
body?: (props: InlineAIPromptOutputInterface) => default_2.ReactNode;
|
|
83
83
|
/**
|
|
84
84
|
* Custom template for AIPromptCard actions.
|
|
85
85
|
*/
|
|
86
|
-
actions?: (props: InlineAIPromptOutputInterface) =>
|
|
86
|
+
actions?: (props: InlineAIPromptOutputInterface) => default_2.ReactNode;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/**
|
|
@@ -108,7 +108,7 @@ declare interface AIPromptCommandsViewProps {
|
|
|
108
108
|
/**
|
|
109
109
|
* Represents the KendoReact AIPromptContent component.
|
|
110
110
|
*/
|
|
111
|
-
export declare const AIPromptContent:
|
|
111
|
+
export declare const AIPromptContent: default_2.ForwardRefExoticComponent<AIPromptContentProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* The props of the AIPromptContent component.
|
|
@@ -117,7 +117,7 @@ declare interface AIPromptContentProps {
|
|
|
117
117
|
/**
|
|
118
118
|
* Specifies the AIPromptContent children elements.
|
|
119
119
|
*/
|
|
120
|
-
children?:
|
|
120
|
+
children?: default_2.ReactNode;
|
|
121
121
|
/**
|
|
122
122
|
* Specifies the callback for cancel action.
|
|
123
123
|
*/
|
|
@@ -140,7 +140,7 @@ declare interface AIPromptFooterProps {
|
|
|
140
140
|
/**
|
|
141
141
|
* Specifies the AIPromptFooter children elements.
|
|
142
142
|
*/
|
|
143
|
-
children?:
|
|
143
|
+
children?: default_2.ReactNode;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
@@ -148,7 +148,7 @@ declare interface AIPromptFooterProps {
|
|
|
148
148
|
*/
|
|
149
149
|
declare interface AIPromptHeaderProps {
|
|
150
150
|
activeView: string;
|
|
151
|
-
toolbarItems: (AIPromptToolbarItemInterface |
|
|
151
|
+
toolbarItems: (AIPromptToolbarItemInterface | default_2.ReactNode)[];
|
|
152
152
|
activeViewChange?: (viewName: string) => void;
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -166,14 +166,14 @@ export declare interface AIPromptOutputInterface {
|
|
|
166
166
|
* const output = { title: 'Generated Title', responseContent: 'Generated content' };
|
|
167
167
|
* ```
|
|
168
168
|
*/
|
|
169
|
-
title?:
|
|
169
|
+
title?: default_2.ReactNode;
|
|
170
170
|
/**
|
|
171
171
|
* Example usage of the `subTitle` property:
|
|
172
172
|
* ```jsx
|
|
173
173
|
* const output = { subTitle: 'Generated Subtitle', responseContent: 'Generated content' };
|
|
174
174
|
* ```
|
|
175
175
|
*/
|
|
176
|
-
subTitle?:
|
|
176
|
+
subTitle?: default_2.ReactNode;
|
|
177
177
|
/**
|
|
178
178
|
* Example usage of the `prompt` property:
|
|
179
179
|
* ```jsx
|
|
@@ -252,14 +252,14 @@ declare interface AIPromptOutputViewProps {
|
|
|
252
252
|
/**
|
|
253
253
|
* The props of the AIPrompt component.
|
|
254
254
|
*/
|
|
255
|
-
export declare interface AIPromptProps extends
|
|
255
|
+
export declare interface AIPromptProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
256
256
|
/**
|
|
257
257
|
* Example usage of the `style` property:
|
|
258
258
|
* ```jsx
|
|
259
259
|
* <AIPrompt style={{ backgroundColor: 'lightblue' }} />
|
|
260
260
|
* ```
|
|
261
261
|
*/
|
|
262
|
-
style?:
|
|
262
|
+
style?: default_2.CSSProperties;
|
|
263
263
|
/**
|
|
264
264
|
* Example usage of the `activeView` property:
|
|
265
265
|
* ```jsx
|
|
@@ -273,7 +273,7 @@ export declare interface AIPromptProps extends default_3.HTMLAttributes<HTMLElem
|
|
|
273
273
|
* <AIPrompt toolbarItems={[<CustomToolbarItem />]} />
|
|
274
274
|
* ```
|
|
275
275
|
*/
|
|
276
|
-
toolbarItems?: (AIPromptToolbarItemInterface |
|
|
276
|
+
toolbarItems?: (AIPromptToolbarItemInterface | default_2.ReactNode)[];
|
|
277
277
|
/**
|
|
278
278
|
* Example usage of the `outputs` property:
|
|
279
279
|
* ```jsx
|
|
@@ -289,7 +289,7 @@ export declare interface AIPromptProps extends default_3.HTMLAttributes<HTMLElem
|
|
|
289
289
|
* </AIPrompt>
|
|
290
290
|
* ```
|
|
291
291
|
*/
|
|
292
|
-
children?:
|
|
292
|
+
children?: default_2.ReactNode;
|
|
293
293
|
/**
|
|
294
294
|
* Example usage of the `promptPlaceholder` property:
|
|
295
295
|
* ```jsx
|
|
@@ -346,6 +346,10 @@ export declare interface AIPromptProps extends default_3.HTMLAttributes<HTMLElem
|
|
|
346
346
|
* ```
|
|
347
347
|
*/
|
|
348
348
|
loading?: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Optionally specifies the rendering for the suggestions displayed in the AI Prompt component.
|
|
351
|
+
*/
|
|
352
|
+
suggestionsView?: SuggestionsView;
|
|
349
353
|
}
|
|
350
354
|
|
|
351
355
|
/**
|
|
@@ -359,7 +363,7 @@ export declare interface AIPromptToolbarItemInterface {
|
|
|
359
363
|
/**
|
|
360
364
|
* Defines the svgIcon used in the Toolbar button.
|
|
361
365
|
*/
|
|
362
|
-
buttonIcon?:
|
|
366
|
+
buttonIcon?: SVGIcon_2;
|
|
363
367
|
/**
|
|
364
368
|
* Defines the text used in the Toolbar button.
|
|
365
369
|
*/
|
|
@@ -403,7 +407,7 @@ export declare interface AIPromptViewProps {
|
|
|
403
407
|
/**
|
|
404
408
|
* Represents the KendoReact AIPromptViewRender component.
|
|
405
409
|
*/
|
|
406
|
-
export declare const AIPromptViewRender: (props: AIPromptViewRenderProps) =>
|
|
410
|
+
export declare const AIPromptViewRender: (props: AIPromptViewRenderProps) => default_2.ReactNode;
|
|
407
411
|
|
|
408
412
|
/**
|
|
409
413
|
* The props of the AIPromptViewRender component.
|
|
@@ -416,7 +420,7 @@ declare interface AIPromptViewRenderProps {
|
|
|
416
420
|
/**
|
|
417
421
|
* Specifies the AIPromptViewRender children elements.
|
|
418
422
|
*/
|
|
419
|
-
children:
|
|
423
|
+
children: default_2.ReactNode;
|
|
420
424
|
}
|
|
421
425
|
|
|
422
426
|
/**
|
|
@@ -456,103 +460,56 @@ export declare type AttachmentLayout = 'list' | 'carousel';
|
|
|
456
460
|
/**
|
|
457
461
|
* Represents the [KendoReact Chat component]({% slug overview_convui %}).
|
|
458
462
|
*/
|
|
459
|
-
export declare
|
|
463
|
+
export declare const Chat: React_2.ForwardRefExoticComponent<ChatProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* The arguments for the `actionexecute` event of the Chat.
|
|
467
|
+
*/
|
|
468
|
+
export declare interface ChatActionExecuteEvent extends Omit<BaseEvent<React_2.Component>, 'target'> {
|
|
460
469
|
/**
|
|
461
|
-
*
|
|
470
|
+
* The executed action.
|
|
462
471
|
*/
|
|
463
|
-
|
|
464
|
-
messages: default_2.Requireable<(object | null | undefined)[]>;
|
|
465
|
-
user: default_2.Requireable<object>;
|
|
466
|
-
messageTemplate: default_2.Requireable<any>;
|
|
467
|
-
attachmentTemplate: default_2.Requireable<any>;
|
|
468
|
-
width: default_2.Requireable<NonNullable<string | number | null | undefined>>;
|
|
469
|
-
onMessageSend: default_2.Requireable<(...args: any[]) => any>;
|
|
470
|
-
onActionExecute: default_2.Requireable<(...args: any[]) => any>;
|
|
471
|
-
dir: default_2.Requireable<string>;
|
|
472
|
-
messageBox: default_2.Requireable<any>;
|
|
473
|
-
};
|
|
472
|
+
action: Action;
|
|
474
473
|
/**
|
|
475
|
-
*
|
|
474
|
+
* The target message.
|
|
476
475
|
*/
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
476
|
+
target?: Message;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Represents a file attachment in a Chat message.
|
|
481
|
+
*/
|
|
482
|
+
export declare interface ChatFile {
|
|
482
483
|
/**
|
|
483
|
-
*
|
|
484
|
+
* Unique identifier for the file.
|
|
484
485
|
*/
|
|
485
|
-
|
|
486
|
-
private chatWrapperEl;
|
|
487
|
-
private viewItemsWrapperEl;
|
|
488
|
-
private newMsgComp;
|
|
489
|
-
private timeoutIdForChatLosingFocus;
|
|
490
|
-
private nextTickId;
|
|
491
|
-
private viewItems;
|
|
492
|
-
private isDirectionRightToLeft;
|
|
493
|
-
private scrollToBottomOnLoadingData;
|
|
494
|
-
private readonly showLicenseWatermark;
|
|
495
|
-
private readonly licenseMessage?;
|
|
496
|
-
constructor(props: ChatProps);
|
|
486
|
+
id: string;
|
|
497
487
|
/**
|
|
498
|
-
*
|
|
488
|
+
* The name of the file.
|
|
499
489
|
*/
|
|
500
|
-
|
|
490
|
+
name: string;
|
|
501
491
|
/**
|
|
502
|
-
*
|
|
492
|
+
* The size of the file in bytes.
|
|
503
493
|
*/
|
|
504
|
-
|
|
494
|
+
size: number;
|
|
505
495
|
/**
|
|
506
|
-
*
|
|
496
|
+
* MIME type of the file (e.g., 'application/pdf', 'image/jpeg').
|
|
507
497
|
*/
|
|
508
|
-
|
|
498
|
+
type: string;
|
|
509
499
|
/**
|
|
510
|
-
*
|
|
500
|
+
* Optional URL to download/view the file.
|
|
511
501
|
*/
|
|
512
|
-
|
|
513
|
-
private getClassNames;
|
|
514
|
-
private checkIsDirectionRightToLeft;
|
|
515
|
-
private onFocus;
|
|
516
|
-
private onBlur;
|
|
517
|
-
private onSelectionRequested;
|
|
518
|
-
private onKeyDown;
|
|
519
|
-
private renderViewItems;
|
|
520
|
-
private onMessageSend;
|
|
521
|
-
private onActionExecute;
|
|
522
|
-
private scrollViewItemsToBottom;
|
|
523
|
-
private getViewItemsFromMsgs;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* The arguments for the `actionexecute` event of the Chat.
|
|
528
|
-
*/
|
|
529
|
-
export declare interface ChatActionExecuteEvent extends BaseEvent<Chat> {
|
|
502
|
+
url?: string;
|
|
530
503
|
/**
|
|
531
|
-
*
|
|
504
|
+
* Optional preview image URL for the file.
|
|
532
505
|
*/
|
|
533
|
-
|
|
506
|
+
thumbnailUrl?: string;
|
|
534
507
|
}
|
|
535
508
|
|
|
536
509
|
/**
|
|
537
510
|
* Represents the ChatMessage component.
|
|
538
511
|
*/
|
|
539
|
-
export declare
|
|
540
|
-
/**
|
|
541
|
-
* @hidden
|
|
542
|
-
*/
|
|
543
|
-
static defaultProps: {
|
|
544
|
-
dateFormat: string;
|
|
545
|
-
tabIndex: number;
|
|
546
|
-
};
|
|
547
|
-
/**
|
|
548
|
-
* @hidden
|
|
549
|
-
*/
|
|
550
|
-
render(): JSX.Element;
|
|
551
|
-
private getMainView;
|
|
552
|
-
private getTimestampView;
|
|
553
|
-
private getStatusView;
|
|
554
|
-
private getClassNames;
|
|
555
|
-
}
|
|
512
|
+
export declare const ChatMessage: React_2.FC<ChatMessageProps>;
|
|
556
513
|
|
|
557
514
|
/**
|
|
558
515
|
* Represents a Chat message box.
|
|
@@ -562,10 +519,6 @@ export declare interface ChatMessageBoxProps {
|
|
|
562
519
|
* Sets the input message of the Chat component.
|
|
563
520
|
*/
|
|
564
521
|
messageInput: React.ReactElement;
|
|
565
|
-
/**
|
|
566
|
-
* Sets the toolbar button of the Chat component.
|
|
567
|
-
*/
|
|
568
|
-
toolbarButton: React.ReactElement;
|
|
569
522
|
/**
|
|
570
523
|
* Sets the send button of the Chat component.
|
|
571
524
|
*/
|
|
@@ -575,7 +528,7 @@ export declare interface ChatMessageBoxProps {
|
|
|
575
528
|
/**
|
|
576
529
|
* Represents the properties of [ChatMessage] (% slug api_conversational-ui_chatmessage %) component.
|
|
577
530
|
*/
|
|
578
|
-
export declare interface ChatMessageProps
|
|
531
|
+
export declare interface ChatMessageProps {
|
|
579
532
|
/**
|
|
580
533
|
* Represents the data item of the `Message`.
|
|
581
534
|
*/
|
|
@@ -593,31 +546,31 @@ export declare interface ChatMessageProps extends FocusableUponSelectionProps {
|
|
|
593
546
|
*/
|
|
594
547
|
tabIndex?: number;
|
|
595
548
|
/**
|
|
596
|
-
*
|
|
549
|
+
* Represents the date format of the message date.
|
|
597
550
|
*/
|
|
598
|
-
|
|
551
|
+
dateFormat?: string;
|
|
599
552
|
/**
|
|
600
|
-
*
|
|
553
|
+
* Sets the `selected` state of the component.
|
|
601
554
|
*/
|
|
602
|
-
|
|
555
|
+
selected: boolean;
|
|
603
556
|
/**
|
|
604
|
-
*
|
|
557
|
+
*
|
|
605
558
|
*/
|
|
606
|
-
|
|
559
|
+
allowMessageCollapse?: boolean;
|
|
607
560
|
/**
|
|
608
|
-
*
|
|
561
|
+
* Defines the actions that will be displayed in the message toolbar.
|
|
562
|
+
* This can include buttons for actions like reply, edit, delete, etc.
|
|
609
563
|
*/
|
|
610
|
-
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* The arguments for the `messagesend` event of the Chat.
|
|
615
|
-
*/
|
|
616
|
-
export declare interface ChatMessageSendEvent extends BaseEvent<Chat> {
|
|
564
|
+
messageToolbarActions?: MessageAction[];
|
|
617
565
|
/**
|
|
618
|
-
*
|
|
566
|
+
* Defines the actions that will be displayed in the message context menu.
|
|
567
|
+
* This can include buttons for actions like reply, edit, delete, etc.
|
|
619
568
|
*/
|
|
620
|
-
|
|
569
|
+
messageContextMenuActions?: MessageAction[];
|
|
570
|
+
/**
|
|
571
|
+
* @hidden
|
|
572
|
+
*/
|
|
573
|
+
isSender?: boolean;
|
|
621
574
|
}
|
|
622
575
|
|
|
623
576
|
/**
|
|
@@ -629,19 +582,20 @@ export declare interface ChatMessageTemplateProps {
|
|
|
629
582
|
item: MessageModel;
|
|
630
583
|
}
|
|
631
584
|
|
|
632
|
-
export declare interface ChatProps {
|
|
585
|
+
export declare interface ChatProps extends FieldMappingConfig {
|
|
633
586
|
/**
|
|
634
587
|
* Sets a class of the Chat DOM element.
|
|
635
588
|
*/
|
|
636
589
|
className?: string;
|
|
637
590
|
/**
|
|
638
|
-
* Sets the messages of the Chat.
|
|
591
|
+
* Sets the messages of the Chat. Can be an array of Message objects or raw data objects
|
|
592
|
+
* that will be mapped using the field mapping configuration.
|
|
639
593
|
*/
|
|
640
|
-
messages: Message[];
|
|
594
|
+
messages: Message[] | any[];
|
|
641
595
|
/**
|
|
642
|
-
* Sets the
|
|
596
|
+
* Sets the ID of the local user. The ID identifies messages that are authored by the local user.
|
|
643
597
|
*/
|
|
644
|
-
|
|
598
|
+
authorId: number | string;
|
|
645
599
|
/**
|
|
646
600
|
* A React functional or class component which is used as a message template. The corresponding [`message`]({% slug api_conversational-ui_message %}) is passed to the component as a property by the name `item`.
|
|
647
601
|
*/
|
|
@@ -655,27 +609,19 @@ export declare interface ChatProps {
|
|
|
655
609
|
*/
|
|
656
610
|
width?: string | number;
|
|
657
611
|
/**
|
|
658
|
-
*
|
|
659
|
-
*/
|
|
660
|
-
showToolbar?: any;
|
|
661
|
-
/**
|
|
662
|
-
* Renders a toolbar inside the Chat.
|
|
612
|
+
* Sets the height of the Chat.
|
|
663
613
|
*/
|
|
664
|
-
|
|
614
|
+
height?: string | number;
|
|
665
615
|
/**
|
|
666
|
-
* Fires when the user types a message and clicks the **Send** button or presses **Enter**. Emits the [`
|
|
616
|
+
* Fires when the user types a message and clicks the **Send** button or presses **Enter**. Emits the [`SendMessageEvent`]({% slug api_conversational-ui_ChatSendMessageEvent %}).
|
|
667
617
|
*
|
|
668
618
|
* > The Chat is not automatically updated with the new message.
|
|
669
619
|
*/
|
|
670
|
-
|
|
620
|
+
onSendMessage?: (event: ChatSendMessageEvent) => void;
|
|
671
621
|
/**
|
|
672
622
|
* Fires when the user clicks a quick action button. The Chat internally handles the `reply`, `openUrl`, and `call` [known actions]({% slug api_conversational-ui_actiontype %}). Emits the [`ExecuteActionEvent`]({% slug api_conversational-ui_chatactionexecuteevent %}). The event is preventable. If `preventDefault` is called, the built-in action will be suppressed.
|
|
673
623
|
*/
|
|
674
624
|
onActionExecute?: (event: ChatActionExecuteEvent) => void;
|
|
675
|
-
/**
|
|
676
|
-
* Fires when the user clicks the button to show or hide the toolbar.
|
|
677
|
-
*/
|
|
678
|
-
onToolbarActionExecute?: (event: ChatToolbarActionExecuteEvent) => void;
|
|
679
625
|
/**
|
|
680
626
|
* Sets the direction of the Chat component.
|
|
681
627
|
*/
|
|
@@ -693,6 +639,111 @@ export declare interface ChatProps {
|
|
|
693
639
|
* Represents the ChatMessage component.
|
|
694
640
|
*/
|
|
695
641
|
message?: React.ComponentType<ChatMessageProps>;
|
|
642
|
+
/**
|
|
643
|
+
* Defines the list of message suggestions that will be displayed above the message input.
|
|
644
|
+
*/
|
|
645
|
+
suggestions?: ChatSuggestion[];
|
|
646
|
+
/**
|
|
647
|
+
* Defines the template for the suggestions items that will be displayed above the message input.
|
|
648
|
+
*/
|
|
649
|
+
suggestionTemplate?: React.ComponentType<SuggestionTemplateProps>;
|
|
650
|
+
/**
|
|
651
|
+
* Fires when a suggestion is clicked. The event contains the clicked suggestion.
|
|
652
|
+
*/
|
|
653
|
+
onSuggestionClick?: (suggestion: ChatSuggestion) => void;
|
|
654
|
+
/**
|
|
655
|
+
* Defines the template for the header of the Chat component.
|
|
656
|
+
*/
|
|
657
|
+
headerTemplate?: React.ReactElement | (() => React.ReactElement);
|
|
658
|
+
/**
|
|
659
|
+
* Defines the template for the timestamp of the message.
|
|
660
|
+
*/
|
|
661
|
+
timestampTemplate?: React.ComponentType<{
|
|
662
|
+
item: DateMarker;
|
|
663
|
+
}>;
|
|
664
|
+
/**
|
|
665
|
+
* Defines the template for the status items below each message.
|
|
666
|
+
*/
|
|
667
|
+
statusTemplate?: React.ComponentType<StatusTemplateProps>;
|
|
668
|
+
/**
|
|
669
|
+
* Enables the expand/collapse functionality for the messages in the Chat.
|
|
670
|
+
* This allows users to collapse or expand messages to save space in the chat window.
|
|
671
|
+
*/
|
|
672
|
+
allowMessageCollapse?: boolean;
|
|
673
|
+
/**
|
|
674
|
+
* Defines the actions that will be displayed in the message toolbar.
|
|
675
|
+
* This can include buttons for actions like reply, edit, delete, etc.
|
|
676
|
+
*/
|
|
677
|
+
messageToolbarActions?: MessageAction[];
|
|
678
|
+
/**
|
|
679
|
+
* Defines the actions that will be displayed in the message context menu.
|
|
680
|
+
*/
|
|
681
|
+
messageContextMenuActions?: MessageAction[];
|
|
682
|
+
fileActions?: MessageAction[];
|
|
683
|
+
/**
|
|
684
|
+
* Fires when a message in unpinned.
|
|
685
|
+
* The event contains the message that was unpinned.
|
|
686
|
+
*/
|
|
687
|
+
onUnpin?: (message: Message) => void;
|
|
688
|
+
/**
|
|
689
|
+
* Sets the message width mode. The default value is `standard`.
|
|
690
|
+
* - `full`—The message occupies the full width of the chat.
|
|
691
|
+
* - `standard`—The message occupies a standard width, allowing for more compact display.
|
|
692
|
+
*/
|
|
693
|
+
messageWidthMode?: 'full' | 'standard';
|
|
694
|
+
/**
|
|
695
|
+
* Enables the speech-to-text functionality in the Chat.
|
|
696
|
+
* This allows users to dictate messages instead of typing them.
|
|
697
|
+
*/
|
|
698
|
+
speechToTextConfig?: boolean | SpeechToTextButtonProps;
|
|
699
|
+
/**
|
|
700
|
+
* Sets the upload configuration for the Chat component.
|
|
701
|
+
* This can be used to customize the file upload behavior, such as accepted file types and maximum file size.
|
|
702
|
+
*/
|
|
703
|
+
uploadConfig?: boolean | UploadProps;
|
|
704
|
+
/**
|
|
705
|
+
* Configures the appearance and behavior of the send button in the Chat component.
|
|
706
|
+
*/
|
|
707
|
+
sendButtonConfig?: ButtonProps;
|
|
708
|
+
/**
|
|
709
|
+
* Fires when a toolbar action is executed on a message.
|
|
710
|
+
* The event contains the action that was executed and the target message.
|
|
711
|
+
*/
|
|
712
|
+
onToolbarAction?: (action: MessageAction, event: React.SyntheticEvent<any>, target: Message) => void;
|
|
713
|
+
/**
|
|
714
|
+
* Fires when a context menu action is executed on a message.
|
|
715
|
+
* The event contains the action that was executed and the target message.
|
|
716
|
+
*/
|
|
717
|
+
onContextMenuAction?: (action: MessageAction, event: React.SyntheticEvent<any>, target: Message) => void;
|
|
718
|
+
/**
|
|
719
|
+
* Fires when a file action is executed on a message.
|
|
720
|
+
* The event contains the action that was executed and the target file.
|
|
721
|
+
*/
|
|
722
|
+
onFileAction?: (action: FileAction, event: React.SyntheticEvent<any>, target: ChatFile) => void;
|
|
723
|
+
/**
|
|
724
|
+
* Fires when a download action is executed on a message.
|
|
725
|
+
* The event contains the action that was executed and the target file.
|
|
726
|
+
*/
|
|
727
|
+
onDownload?: (files: ChatFile[], message: Message) => void;
|
|
728
|
+
/**
|
|
729
|
+
* Fires when the input value changes.
|
|
730
|
+
* The event contains the new input value.
|
|
731
|
+
*/
|
|
732
|
+
onInputValueChange?: (value: string) => void;
|
|
733
|
+
/**
|
|
734
|
+
* Sets the input value of the Chat component.
|
|
735
|
+
*/
|
|
736
|
+
inputValue?: string;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* The arguments for the `messagesend` event of the Chat.
|
|
741
|
+
*/
|
|
742
|
+
export declare interface ChatSendMessageEvent extends BaseEvent<React_2.Component> {
|
|
743
|
+
/**
|
|
744
|
+
* The new message.
|
|
745
|
+
*/
|
|
746
|
+
message: Message;
|
|
696
747
|
}
|
|
697
748
|
|
|
698
749
|
/**
|
|
@@ -700,7 +751,6 @@ export declare interface ChatProps {
|
|
|
700
751
|
*/
|
|
701
752
|
export declare interface ChatState {
|
|
702
753
|
selectedItemIndex: number | null;
|
|
703
|
-
isFirstRender: boolean;
|
|
704
754
|
}
|
|
705
755
|
|
|
706
756
|
/**
|
|
@@ -713,12 +763,13 @@ export declare interface ChatSuggestion {
|
|
|
713
763
|
text: string;
|
|
714
764
|
description?: string;
|
|
715
765
|
disabled?: boolean;
|
|
766
|
+
suggestionsView?: SuggestionsView;
|
|
716
767
|
}
|
|
717
768
|
|
|
718
769
|
/**
|
|
719
770
|
* The arguments for the `toolbaractionexecute` event of the Chat.
|
|
720
771
|
*/
|
|
721
|
-
export declare interface ChatToolbarActionExecuteEvent extends BaseEvent<
|
|
772
|
+
export declare interface ChatToolbarActionExecuteEvent extends BaseEvent<React_2.Component> {
|
|
722
773
|
/**
|
|
723
774
|
* The new toolbarShow value.
|
|
724
775
|
*/
|
|
@@ -750,7 +801,7 @@ export declare interface CommandItemInterface {
|
|
|
750
801
|
/**
|
|
751
802
|
* Specifies the name of the SVG icon that will be rendered for the command.
|
|
752
803
|
*/
|
|
753
|
-
svgIcon?:
|
|
804
|
+
svgIcon?: SVGIcon;
|
|
754
805
|
/**
|
|
755
806
|
* Optional prompt function that takes selected text and returns a formatted prompt.
|
|
756
807
|
* This is used by default commands and can be used by custom commands.
|
|
@@ -766,42 +817,141 @@ export declare const commandsViewDefaults: AIPromptToolbarItemInterface;
|
|
|
766
817
|
/**
|
|
767
818
|
* @hidden
|
|
768
819
|
*/
|
|
769
|
-
declare
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
*/
|
|
774
|
-
componentDidUpdate(prevProps: any): void;
|
|
820
|
+
declare interface DateMarker {
|
|
821
|
+
type: 'date-marker';
|
|
822
|
+
timestamp: Date;
|
|
823
|
+
trackBy: any;
|
|
775
824
|
}
|
|
776
825
|
|
|
777
826
|
/**
|
|
827
|
+
* Default field mapping configuration.
|
|
828
|
+
* These are the standard field names expected by the Chat component.
|
|
829
|
+
*
|
|
778
830
|
* @hidden
|
|
779
831
|
*/
|
|
780
|
-
declare
|
|
832
|
+
export declare const DEFAULT_FIELD_MAPPING: Required<FieldMappingConfig>;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Extracts field mapping configuration from ChatProps
|
|
836
|
+
*
|
|
837
|
+
* @param props - ChatProps containing field mapping properties
|
|
838
|
+
* @returns FieldMappingConfig object
|
|
839
|
+
*/
|
|
840
|
+
export declare const extractFieldMappingFromProps: (props: any) => FieldMappingConfig;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Configuration interface for mapping custom data fields to Chat component properties.
|
|
844
|
+
* This allows the Chat component to work with various data source formats by mapping
|
|
845
|
+
* custom field names to the expected Chat interface properties.
|
|
846
|
+
*/
|
|
847
|
+
export declare interface FieldMappingConfig {
|
|
781
848
|
/**
|
|
782
|
-
*
|
|
849
|
+
* Field name for message text content.
|
|
850
|
+
*
|
|
851
|
+
* @default 'text'
|
|
783
852
|
*/
|
|
784
|
-
|
|
853
|
+
textField?: string;
|
|
854
|
+
/**
|
|
855
|
+
* Field name for message status.
|
|
856
|
+
*
|
|
857
|
+
* @default 'status'
|
|
858
|
+
*/
|
|
859
|
+
statusField?: string;
|
|
860
|
+
/**
|
|
861
|
+
* Field name for message author ID.
|
|
862
|
+
*
|
|
863
|
+
* @default 'authorId'
|
|
864
|
+
*/
|
|
865
|
+
authorIdField?: string;
|
|
866
|
+
/**
|
|
867
|
+
* Field name for message author name (when flattened in data source).
|
|
868
|
+
*
|
|
869
|
+
* @default 'authorName'
|
|
870
|
+
*/
|
|
871
|
+
authorNameField?: string;
|
|
872
|
+
/**
|
|
873
|
+
* Field name for message author avatar URL (when flattened in data source).
|
|
874
|
+
*
|
|
875
|
+
* @default 'authorImageUrl'
|
|
876
|
+
*/
|
|
877
|
+
authorImageUrlField?: string;
|
|
878
|
+
/**
|
|
879
|
+
* Field name for alt text of the author's avatar (when flattened in data source).
|
|
880
|
+
*
|
|
881
|
+
* @default 'authorImageAltText'
|
|
882
|
+
*/
|
|
883
|
+
authorImageAltTextField?: string;
|
|
884
|
+
/**
|
|
885
|
+
* Field name for message ID.
|
|
886
|
+
*
|
|
887
|
+
* @default 'id'
|
|
888
|
+
*/
|
|
889
|
+
idField?: string;
|
|
890
|
+
/**
|
|
891
|
+
* Field name for message timestamp.
|
|
892
|
+
*
|
|
893
|
+
* @default 'timestamp'
|
|
894
|
+
*/
|
|
895
|
+
timestampField?: string;
|
|
896
|
+
/**
|
|
897
|
+
* Field name for file attachments.
|
|
898
|
+
*
|
|
899
|
+
* @default 'files'
|
|
900
|
+
*/
|
|
901
|
+
filesField?: string;
|
|
902
|
+
/**
|
|
903
|
+
* Field name for message attachments.
|
|
904
|
+
*
|
|
905
|
+
* @default 'attachments'
|
|
906
|
+
*/
|
|
907
|
+
attachmentsField?: string;
|
|
908
|
+
/**
|
|
909
|
+
* Field name for reply-to message ID.
|
|
910
|
+
*
|
|
911
|
+
* @default 'replyToId'
|
|
912
|
+
*/
|
|
913
|
+
replyToIdField?: string;
|
|
914
|
+
/**
|
|
915
|
+
* Field name for message deletion status.
|
|
916
|
+
*
|
|
917
|
+
* @default 'isDeleted'
|
|
918
|
+
*/
|
|
919
|
+
isDeletedField?: string;
|
|
920
|
+
/**
|
|
921
|
+
* Field name for message pinned status.
|
|
922
|
+
*
|
|
923
|
+
* @default 'isPinned'
|
|
924
|
+
*/
|
|
925
|
+
isPinnedField?: string;
|
|
926
|
+
/**
|
|
927
|
+
* Field name for the typing prop of a message.
|
|
928
|
+
*
|
|
929
|
+
* @default 'typing'
|
|
930
|
+
*/
|
|
931
|
+
typingField?: string;
|
|
932
|
+
/**
|
|
933
|
+
* Field name for the suggestedActions prop of a message.
|
|
934
|
+
*
|
|
935
|
+
* @default 'suggestedActions'
|
|
936
|
+
*/
|
|
937
|
+
suggestedActionsField?: string;
|
|
785
938
|
}
|
|
786
939
|
|
|
787
940
|
/**
|
|
788
|
-
* Represents a
|
|
941
|
+
* Represents a file action that can be performed on a file in the chat.
|
|
789
942
|
*/
|
|
790
|
-
export declare
|
|
791
|
-
/**
|
|
792
|
-
* @hidden
|
|
793
|
-
*/
|
|
794
|
-
render(): JSX.Element;
|
|
795
|
-
private onBtnClick;
|
|
796
|
-
private getActionsView;
|
|
797
|
-
private getTitleView;
|
|
798
|
-
private getSubtitleView;
|
|
943
|
+
export declare interface FileAction extends MessageAction {
|
|
799
944
|
}
|
|
800
945
|
|
|
946
|
+
/**
|
|
947
|
+
* Represents a Hero Card component. Hero cards host a single large image and action buttons with text content.
|
|
948
|
+
*/
|
|
949
|
+
export declare const HeroCard: React_2.FC<HeroCardProps>;
|
|
950
|
+
|
|
801
951
|
/**
|
|
802
952
|
* The arguments for the `actionexecute` event of the hero card.
|
|
803
953
|
*/
|
|
804
|
-
export declare interface HeroCardActionExecuteEvent extends BaseEvent<
|
|
954
|
+
export declare interface HeroCardActionExecuteEvent extends BaseEvent<React_2.Component> {
|
|
805
955
|
/**
|
|
806
956
|
* The executed action.
|
|
807
957
|
*/
|
|
@@ -813,6 +963,10 @@ export declare interface HeroCardProps {
|
|
|
813
963
|
* The URL of the hero card image.
|
|
814
964
|
*/
|
|
815
965
|
imageUrl: string;
|
|
966
|
+
/**
|
|
967
|
+
* The alt text for the hero card image.
|
|
968
|
+
*/
|
|
969
|
+
altText?: string;
|
|
816
970
|
/**
|
|
817
971
|
* The title of the hero card.
|
|
818
972
|
*/
|
|
@@ -902,21 +1056,21 @@ declare interface InlineAIPromptPopupProps {
|
|
|
902
1056
|
/**
|
|
903
1057
|
* The content to render inside the popup.
|
|
904
1058
|
*/
|
|
905
|
-
children?:
|
|
1059
|
+
children?: default_2.ReactNode;
|
|
906
1060
|
/**
|
|
907
1061
|
* Additional CSS styles for the popup content.
|
|
908
1062
|
*/
|
|
909
|
-
style?:
|
|
1063
|
+
style?: default_2.CSSProperties;
|
|
910
1064
|
}
|
|
911
1065
|
|
|
912
|
-
export declare interface InlineAIPromptProps extends Omit<
|
|
1066
|
+
export declare interface InlineAIPromptProps extends Omit<default_2.HTMLAttributes<HTMLElement>, 'onCopy'>, InlineAIPromptPopupProps {
|
|
913
1067
|
/**
|
|
914
1068
|
* Example usage of the `style` property:
|
|
915
1069
|
* ```jsx
|
|
916
1070
|
* <InlineAIPrompt style={{ backgroundColor: 'lightblue' }} />
|
|
917
1071
|
* ```
|
|
918
1072
|
*/
|
|
919
|
-
style?:
|
|
1073
|
+
style?: default_2.CSSProperties;
|
|
920
1074
|
/**
|
|
921
1075
|
* The collection of outputs to display as cards
|
|
922
1076
|
*/
|
|
@@ -1002,6 +1156,43 @@ export declare interface InlineAIPromptProps extends Omit<default_3.HTMLAttribut
|
|
|
1002
1156
|
onCommandExecute?: (command: CommandItemInterface) => void;
|
|
1003
1157
|
}
|
|
1004
1158
|
|
|
1159
|
+
/**
|
|
1160
|
+
* Checks if the provided message data is already in the standard Message format
|
|
1161
|
+
*
|
|
1162
|
+
* @param message - Message data to check
|
|
1163
|
+
* @returns True if the message is in standard format, false otherwise
|
|
1164
|
+
*/
|
|
1165
|
+
export declare const isStandardMessageFormat: (message: any) => message is Message;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Maps an array of raw data objects to Message array
|
|
1169
|
+
*
|
|
1170
|
+
* @param dataArray - Array of raw data objects
|
|
1171
|
+
* @param fieldMapping - Field mapping configuration (optional)
|
|
1172
|
+
* @returns Array of mapped Message objects
|
|
1173
|
+
*/
|
|
1174
|
+
export declare const mapDataArrayToMessages: (dataArray: any[], fieldMapping?: FieldMappingConfig) => Message[];
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Maps raw data object to standardized Message interface using field mapping configuration
|
|
1178
|
+
*
|
|
1179
|
+
* @param data - Raw data object from external source
|
|
1180
|
+
* @param fieldMapping - Field mapping configuration (optional)
|
|
1181
|
+
* @returns Mapped Message object
|
|
1182
|
+
*/
|
|
1183
|
+
export declare const mapDataToMessage: (data: any, fieldMapping?: FieldMappingConfig) => Message;
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* Maps a standard Message object back to custom field format
|
|
1187
|
+
* This is useful when you receive a new message in standard format but need to convert it
|
|
1188
|
+
* to your custom field mapping for data storage or API calls
|
|
1189
|
+
*
|
|
1190
|
+
* @param message - Standard Message object
|
|
1191
|
+
* @param fieldMapping - Field mapping configuration (optional)
|
|
1192
|
+
* @returns Object with custom field names
|
|
1193
|
+
*/
|
|
1194
|
+
export declare const mapMessageToCustomFormat: (message: Message, fieldMapping?: FieldMappingConfig) => any;
|
|
1195
|
+
|
|
1005
1196
|
/**
|
|
1006
1197
|
* Represents a Chat message.
|
|
1007
1198
|
*
|
|
@@ -1011,6 +1202,10 @@ export declare interface InlineAIPromptProps extends Omit<default_3.HTMLAttribut
|
|
|
1011
1202
|
* > * If `typing` is set to `true`, the Chat displays a typing indicator instead of text.
|
|
1012
1203
|
*/
|
|
1013
1204
|
export declare interface Message {
|
|
1205
|
+
/**
|
|
1206
|
+
* The unique identifier of the message.
|
|
1207
|
+
*/
|
|
1208
|
+
id: number | string;
|
|
1014
1209
|
/**
|
|
1015
1210
|
* The author of the message.
|
|
1016
1211
|
*/
|
|
@@ -1054,6 +1249,58 @@ export declare interface Message {
|
|
|
1054
1249
|
* If set to `true`, the Chat displays a typing indicator instead of the actual message.
|
|
1055
1250
|
*/
|
|
1056
1251
|
typing?: boolean;
|
|
1252
|
+
/**
|
|
1253
|
+
* A Boolean value which indicates if the message is in a loading state.
|
|
1254
|
+
* If set to `true`, the Chat displays a skeleton placeholder instead of the actual message content.
|
|
1255
|
+
*/
|
|
1256
|
+
isLoading?: boolean;
|
|
1257
|
+
/**
|
|
1258
|
+
* A message property that sets the message as pinned.
|
|
1259
|
+
*/
|
|
1260
|
+
isPinned?: boolean;
|
|
1261
|
+
/**
|
|
1262
|
+
* The date and time when the message was pinned.
|
|
1263
|
+
*/
|
|
1264
|
+
pinnedAt?: Date;
|
|
1265
|
+
/**
|
|
1266
|
+
* The user who pinned the message.
|
|
1267
|
+
*/
|
|
1268
|
+
pinnedBy?: User;
|
|
1269
|
+
/**
|
|
1270
|
+
* The ID of the message this message is replying to.
|
|
1271
|
+
*/
|
|
1272
|
+
replyToId?: number | string;
|
|
1273
|
+
/**
|
|
1274
|
+
* Indicates whether the message has been deleted.
|
|
1275
|
+
*/
|
|
1276
|
+
isDeleted?: boolean;
|
|
1277
|
+
/**
|
|
1278
|
+
* Files attached to the message.
|
|
1279
|
+
*/
|
|
1280
|
+
files?: any[];
|
|
1281
|
+
selectionIndex?: number;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Represents a message action that can be displayed in the message toolbar.
|
|
1286
|
+
*/
|
|
1287
|
+
declare interface MessageAction {
|
|
1288
|
+
/**
|
|
1289
|
+
* The unique identifier for the action.
|
|
1290
|
+
*/
|
|
1291
|
+
id: string;
|
|
1292
|
+
/**
|
|
1293
|
+
* The label to display for the action.
|
|
1294
|
+
*/
|
|
1295
|
+
label: string;
|
|
1296
|
+
/**
|
|
1297
|
+
* The SVG icon to display for the action.
|
|
1298
|
+
*/
|
|
1299
|
+
svgIcon?: SVGIcon;
|
|
1300
|
+
/**
|
|
1301
|
+
* The icon to display for the action.
|
|
1302
|
+
*/
|
|
1303
|
+
icon?: string;
|
|
1057
1304
|
}
|
|
1058
1305
|
|
|
1059
1306
|
/**
|
|
@@ -1109,14 +1356,39 @@ export declare const promptViewDefaults: AIPromptToolbarItemInterface;
|
|
|
1109
1356
|
* @hidden
|
|
1110
1357
|
*/
|
|
1111
1358
|
declare interface Selectable {
|
|
1112
|
-
selectionIndex
|
|
1359
|
+
selectionIndex?: number;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* Represents the properties available to the `statusTemplate` custom component.
|
|
1364
|
+
*/
|
|
1365
|
+
export declare interface StatusTemplateProps {
|
|
1366
|
+
/**
|
|
1367
|
+
* The message item containing the status information.
|
|
1368
|
+
*/
|
|
1369
|
+
item: Message;
|
|
1113
1370
|
}
|
|
1114
1371
|
|
|
1115
1372
|
export declare const SuggestionGroup: React_2.FC<SuggestionGroupProps>;
|
|
1116
1373
|
|
|
1117
1374
|
declare interface SuggestionGroupProps {
|
|
1118
1375
|
suggestions: ChatSuggestion[];
|
|
1119
|
-
onSuggestionClick
|
|
1376
|
+
onSuggestionClick?: (suggestion: ChatSuggestion) => void;
|
|
1377
|
+
suggestionTemplate?: React_2.ComponentType<SuggestionTemplateProps>;
|
|
1378
|
+
suggestionsView?: SuggestionsView;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* Represents the rendering options for suggestions in the AI Prompt component.
|
|
1383
|
+
* 'suggestionsView' can be either 'classic' or 'modern'.
|
|
1384
|
+
* - 'classic': Uses a rectangular styling for suggestions.
|
|
1385
|
+
* - 'modern': Uses a chip-like styling for suggestions.
|
|
1386
|
+
*/
|
|
1387
|
+
export declare type SuggestionsView = 'classic' | 'modern';
|
|
1388
|
+
|
|
1389
|
+
export declare interface SuggestionTemplateProps {
|
|
1390
|
+
suggestion: ChatSuggestion;
|
|
1391
|
+
onClick?: (event: React_2.MouseEvent<HTMLElement>) => void;
|
|
1120
1392
|
}
|
|
1121
1393
|
|
|
1122
1394
|
/**
|