@progress/kendo-react-conversational-ui 13.3.0 → 13.4.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/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
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Message, User, Action, Attachment, AttachmentLayout } from '../index.js';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export interface Selectable {
|
|
13
|
+
selectionIndex?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Represents the data item of a single `Message`.
|
|
17
|
+
*/
|
|
18
|
+
export interface MessageModel extends Message, Selectable {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export interface MessageGroup {
|
|
24
|
+
type: 'message-group';
|
|
25
|
+
messages: MessageModel[];
|
|
26
|
+
author: User;
|
|
27
|
+
timestamp: Date;
|
|
28
|
+
trackBy: any;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @hidden
|
|
32
|
+
*/
|
|
33
|
+
export interface AttachmentGroup extends Selectable {
|
|
34
|
+
type: 'attachment-group';
|
|
35
|
+
attachments: Attachment[];
|
|
36
|
+
attachmentLayout: AttachmentLayout;
|
|
37
|
+
timestamp: Date;
|
|
38
|
+
trackBy: any;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
export interface ActionGroup extends Selectable {
|
|
44
|
+
type: 'action-group';
|
|
45
|
+
actions?: Action[];
|
|
46
|
+
timestamp: Date;
|
|
47
|
+
trackBy: any;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @hidden
|
|
51
|
+
*/
|
|
52
|
+
export interface DateMarker {
|
|
53
|
+
type: 'date-marker';
|
|
54
|
+
timestamp: Date;
|
|
55
|
+
trackBy: any;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
export type ViewItem = MessageGroup | AttachmentGroup | ActionGroup | DateMarker;
|
|
61
|
+
/**
|
|
62
|
+
* @hidden
|
|
63
|
+
*/
|
|
64
|
+
export declare const convertMsgsToViewItems: (messages: MessageModel[]) => ViewItem[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Action as ActionModel } from '../../index.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export interface ActionProps {
|
|
14
|
+
item: ActionModel;
|
|
15
|
+
onActionExecute: any;
|
|
16
|
+
/**
|
|
17
|
+
* Sets the `selected` state of the component.
|
|
18
|
+
*/
|
|
19
|
+
selected: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
declare const Action: React.FC<ActionProps>;
|
|
25
|
+
export default Action;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ActionGroup as ActionGroupModel } from '../ViewItem.js';
|
|
9
|
+
import { QuickActionsLayoutMode } from '../ChatPropsAndState.js';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
export interface ActionGroupProps {
|
|
15
|
+
group: ActionGroupModel;
|
|
16
|
+
onActionExecute: any;
|
|
17
|
+
selected: boolean;
|
|
18
|
+
onRequestSelection: any;
|
|
19
|
+
quickActionsLayout?: QuickActionsLayoutMode;
|
|
20
|
+
dir?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
declare const ActionGroup: React.FC<ActionGroupProps>;
|
|
26
|
+
export default ActionGroup;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Attachment as AttachmentModel } from '../../index.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export interface AttachmentProps {
|
|
14
|
+
item: AttachmentModel;
|
|
15
|
+
template?: any;
|
|
16
|
+
tabbable?: boolean;
|
|
17
|
+
onClick?: any;
|
|
18
|
+
/**
|
|
19
|
+
* Sets the `selected` state of the component.
|
|
20
|
+
*/
|
|
21
|
+
selected: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @hidden
|
|
25
|
+
*/
|
|
26
|
+
declare const Attachment: React.FC<AttachmentProps>;
|
|
27
|
+
export default Attachment;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { AttachmentGroup as AttachmentGroupModel } from '../ViewItem.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export interface AttachmentGroupProps {
|
|
14
|
+
group: AttachmentGroupModel;
|
|
15
|
+
itemTemplate?: any;
|
|
16
|
+
selected: boolean;
|
|
17
|
+
isLastGroup: boolean;
|
|
18
|
+
onRequestSelection: any;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
declare const AttachmentGroup: React.FC<AttachmentGroupProps>;
|
|
24
|
+
export default AttachmentGroup;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ChatProps } from '../../index.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Represents the [KendoReact Chat component](https://www.telerik.com/kendo-react-ui/components/conversational-ui).
|
|
12
|
+
*/
|
|
13
|
+
export declare const Chat: React.ForwardRefExoticComponent<ChatProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Message, User } from '../../index.js';
|
|
9
|
+
import { FileAction, MessageAction } from './ChatMessage.js';
|
|
10
|
+
import { StatusTemplateProps, UserStatusTemplateProps, ChatFile, FilesLayoutMode, TimestampVisibilityMode } from '../ChatPropsAndState.js';
|
|
11
|
+
import { SpeechToTextButtonProps } from '@progress/kendo-react-buttons';
|
|
12
|
+
import { UploadProps } from '@progress/kendo-react-upload';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
interface ChatContextType {
|
|
18
|
+
replyToMessage: Message | null;
|
|
19
|
+
setReplyToMessage: React.Dispatch<React.SetStateAction<Message | null>>;
|
|
20
|
+
messages: Message[];
|
|
21
|
+
user: User;
|
|
22
|
+
internalScrollContainerRef?: React.RefObject<HTMLDivElement | null>;
|
|
23
|
+
messageListScrollContainerRef?: React.RefObject<HTMLDivElement | null>;
|
|
24
|
+
onToolbarAction?: (action: MessageAction, event: React.SyntheticEvent<any>, target: Message) => void;
|
|
25
|
+
onContextMenuAction?: (action: MessageAction, event: React.SyntheticEvent<any>, target: Message) => void;
|
|
26
|
+
onFileAction?: (action: FileAction, event: React.SyntheticEvent<any>, target: ChatFile) => void;
|
|
27
|
+
onDownload?: (files: ChatFile[], message: Message) => void;
|
|
28
|
+
fileActions?: MessageAction[];
|
|
29
|
+
setShowCopyNotification?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
30
|
+
statusTemplate?: React.ComponentType<StatusTemplateProps>;
|
|
31
|
+
userStatusTemplate?: React.ComponentType<UserStatusTemplateProps>;
|
|
32
|
+
speechToTextConfig?: boolean | SpeechToTextButtonProps;
|
|
33
|
+
uploadConfig?: boolean | UploadProps;
|
|
34
|
+
messageFilesLayout?: FilesLayoutMode;
|
|
35
|
+
timestampVisibility?: TimestampVisibilityMode;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @hidden
|
|
39
|
+
*/
|
|
40
|
+
declare const ChatContext: React.Context<ChatContextType | undefined>;
|
|
41
|
+
/**
|
|
42
|
+
* @hidden
|
|
43
|
+
*/
|
|
44
|
+
export declare const useChatContext: () => ChatContextType;
|
|
45
|
+
export default ChatContext;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { SVGIcon } from '@progress/kendo-react-common';
|
|
9
|
+
import { MessageModel } from '../ViewItem.js';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* Represents a message action that can be displayed in the message toolbar.
|
|
13
|
+
*/
|
|
14
|
+
export interface MessageAction {
|
|
15
|
+
/**
|
|
16
|
+
* The unique identifier for the action.
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* The label to display for the action.
|
|
21
|
+
*/
|
|
22
|
+
label: string;
|
|
23
|
+
/**
|
|
24
|
+
* The SVG icon to display for the action.
|
|
25
|
+
*/
|
|
26
|
+
svgIcon?: SVGIcon;
|
|
27
|
+
/**
|
|
28
|
+
* The icon to display for the action.
|
|
29
|
+
*/
|
|
30
|
+
icon?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Represents a file action that can be performed on a file in the chat.
|
|
34
|
+
*/
|
|
35
|
+
export interface FileAction extends MessageAction {
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Represents the properties available to the `messageTemplate` custom component.
|
|
39
|
+
*
|
|
40
|
+
* For more information, refer to the [Message Template](https://www.telerik.com/kendo-react-ui/components/conversational-ui/chat/customization/message-templates) article.
|
|
41
|
+
*/
|
|
42
|
+
export interface ChatMessageTemplateProps {
|
|
43
|
+
/**
|
|
44
|
+
* The message data object containing all information about the message to be rendered.
|
|
45
|
+
*/
|
|
46
|
+
item: MessageModel;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Represents the properties of `ChatMessage` component.
|
|
50
|
+
*/
|
|
51
|
+
export interface ChatMessageProps {
|
|
52
|
+
/**
|
|
53
|
+
* Represents the data item of the `Message`.
|
|
54
|
+
*/
|
|
55
|
+
item: MessageModel;
|
|
56
|
+
/**
|
|
57
|
+
* Represents the React Component rendered inside the `Message`.
|
|
58
|
+
*/
|
|
59
|
+
template?: React.ComponentType<ChatMessageTemplateProps>;
|
|
60
|
+
/**
|
|
61
|
+
* Represents the React Component rendered inside the .k-bubble-content element.
|
|
62
|
+
*/
|
|
63
|
+
contentTemplate?: React.ComponentType<ChatMessageTemplateProps>;
|
|
64
|
+
/**
|
|
65
|
+
* @hidden
|
|
66
|
+
*/
|
|
67
|
+
onRequestSelection: any;
|
|
68
|
+
/**
|
|
69
|
+
* Represents the tab index attribute.
|
|
70
|
+
*/
|
|
71
|
+
tabIndex?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Represents the date format of the message date.
|
|
74
|
+
*/
|
|
75
|
+
dateFormat?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Sets the `selected` state of the component.
|
|
78
|
+
*/
|
|
79
|
+
selected: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Determines whether messages can be collapsed/expanded when multiple consecutive messages are from the same author.
|
|
82
|
+
*/
|
|
83
|
+
allowMessageCollapse?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* @hidden
|
|
86
|
+
* Defines the actions that will be displayed in the message toolbar.
|
|
87
|
+
* This can include buttons for actions like reply, edit, delete, etc.
|
|
88
|
+
*/
|
|
89
|
+
messageToolbarActions?: MessageAction[];
|
|
90
|
+
/**
|
|
91
|
+
* @hidden
|
|
92
|
+
* Defines the actions that will be displayed in the message context menu.
|
|
93
|
+
* This can include buttons for actions like reply, edit, delete, etc.
|
|
94
|
+
*/
|
|
95
|
+
messageContextMenuActions?: MessageAction[];
|
|
96
|
+
/**
|
|
97
|
+
* @hidden
|
|
98
|
+
* Defines the actions that will be displayed for files in messages.
|
|
99
|
+
* This can include buttons for actions like download, view, etc.
|
|
100
|
+
*/
|
|
101
|
+
fileActions?: MessageAction[];
|
|
102
|
+
/**
|
|
103
|
+
* @hidden
|
|
104
|
+
*/
|
|
105
|
+
isSender?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Represents the ChatMessage component.
|
|
109
|
+
*/
|
|
110
|
+
export declare const ChatMessage: React.FC<ChatMessageProps>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import { classNames as L, IconWrap as J } from "@progress/kendo-react-common";
|
|
10
10
|
import { Button as Q } from "@progress/kendo-react-buttons";
|
|
11
|
-
import {
|
|
11
|
+
import { undoIcon as be, copyIcon as ge, downloadIcon as ke, chevronUpIcon as Ce, chevronDownIcon as ye, checkCircleIcon as Ee } from "@progress/kendo-svg-icons";
|
|
12
12
|
import { useLocalization as xe, useInternationalization as he } from "@progress/kendo-react-intl";
|
|
13
13
|
import { ContextMenu as Ie, MenuItem as we } from "@progress/kendo-react-layout";
|
|
14
14
|
import { copyToClipboard as Me, getDeletedMessageText as ve, getMessageById as Te, isAuthor as z, convertTextToLinkedContent as Z, scrollToMessageById as De } from "../utils.mjs";
|
|
@@ -99,12 +99,12 @@ const Se = t.forwardRef(
|
|
|
99
99
|
{
|
|
100
100
|
id: "reply",
|
|
101
101
|
label: "Reply",
|
|
102
|
-
svgIcon:
|
|
102
|
+
svgIcon: be
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
id: "copy",
|
|
106
106
|
label: "Copy",
|
|
107
|
-
svgIcon:
|
|
107
|
+
svgIcon: ge
|
|
108
108
|
}
|
|
109
109
|
], a = p ? [
|
|
110
110
|
...e.map((s) => p.find(
|
|
@@ -142,7 +142,7 @@ const Se = t.forwardRef(
|
|
|
142
142
|
className: "k-chat-download-button",
|
|
143
143
|
fillMode: "flat",
|
|
144
144
|
themeColor: "base",
|
|
145
|
-
svgIcon:
|
|
145
|
+
svgIcon: ke,
|
|
146
146
|
onClick: (e) => {
|
|
147
147
|
e.stopPropagation(), r && r(n.files, n);
|
|
148
148
|
},
|
|
@@ -202,7 +202,7 @@ const Se = t.forwardRef(
|
|
|
202
202
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), S(e));
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
|
-
/* @__PURE__ */ t.createElement(J, { icon: y ?
|
|
205
|
+
/* @__PURE__ */ t.createElement(J, { icon: y ? Ce : ye, size: "medium" })
|
|
206
206
|
)
|
|
207
207
|
), V());
|
|
208
208
|
return null;
|
|
@@ -235,7 +235,7 @@ const Se = t.forwardRef(
|
|
|
235
235
|
return e;
|
|
236
236
|
}, [n.timestamp, l, K, D, q]), me = t.useCallback(() => {
|
|
237
237
|
let e = null;
|
|
238
|
-
return n.status && l && (T ? e = t.createElement(T, { item: n }) : e = /* @__PURE__ */ t.createElement("span", { className: "k-message-status" }, /* @__PURE__ */ t.createElement(J, { icon:
|
|
238
|
+
return n.status && l && (T ? e = t.createElement(T, { item: n }) : e = /* @__PURE__ */ t.createElement("span", { className: "k-message-status" }, /* @__PURE__ */ t.createElement(J, { icon: Ee, size: "xsmall" }), n.status)), e;
|
|
239
239
|
}, [n, l, T]), de = t.useCallback(() => L({ "k-focus": l, "k-message-removed": n.isDeleted }, "k-message"), [l, n.isDeleted]), fe = t.useCallback(() => f && f.length > 0 && /* @__PURE__ */ t.createElement("div", { className: "k-chat-message-toolbar k-toolbar k-toolbar-md k-toolbar-flat" }, f.map((e) => e.id === "delete" && !b ? null : /* @__PURE__ */ t.createElement(
|
|
240
240
|
Q,
|
|
241
241
|
{
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { DateMarker as DateMarkerModel } from './../ViewItem.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export interface DateMarkerProps {
|
|
14
|
+
item: DateMarkerModel;
|
|
15
|
+
timestampTemplate?: React.ComponentType<{
|
|
16
|
+
item: DateMarkerModel;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
declare const DateMarker: React.FC<DateMarkerProps>;
|
|
23
|
+
export default DateMarker;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
declare const ChatHeader: React.FC<React.PropsWithChildren<{}>>;
|
|
13
|
+
export default ChatHeader;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { User } from '../../index.js';
|
|
9
|
+
import { MessageGroup as MessageGroupModel } from './../ViewItem.js';
|
|
10
|
+
import { ChatMessageProps, MessageAction } from './ChatMessage.js';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export interface MessageGroupProps {
|
|
16
|
+
group: MessageGroupModel;
|
|
17
|
+
user: User;
|
|
18
|
+
itemTemplate?: any;
|
|
19
|
+
contentTemplate?: any;
|
|
20
|
+
attachmentTemplate?: any;
|
|
21
|
+
onRequestSelection: any;
|
|
22
|
+
selectedItemIndex: number | null;
|
|
23
|
+
isLastGroup: boolean;
|
|
24
|
+
message: React.ComponentType<ChatMessageProps>;
|
|
25
|
+
allowMessageCollapse?: boolean;
|
|
26
|
+
messageToolbarActions?: MessageAction[];
|
|
27
|
+
messageContextMenuActions?: MessageAction[];
|
|
28
|
+
fileActions?: MessageAction[];
|
|
29
|
+
messageWidthMode?: 'full' | 'standard';
|
|
30
|
+
showAvatar?: boolean;
|
|
31
|
+
showUsername?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
declare const MessageGroup: React.FC<MessageGroupProps>;
|
|
37
|
+
export default MessageGroup;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ChatMessageBoxProps } from '../ChatPropsAndState.js';
|
|
9
|
+
import { MessageAction, FileAction } from './ChatMessage.js';
|
|
10
|
+
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
11
|
+
import { ChatSuggestion, SuggestionTemplateProps } from './SuggestionsGroup.js';
|
|
12
|
+
import { Message } from '../../index.js';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export interface NewMessageProps {
|
|
18
|
+
onSendMessage: (message: Message, event: React.SyntheticEvent<any>) => void;
|
|
19
|
+
isDirectionRightToLeft: boolean | null;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
MessageBox?: React.ComponentType<ChatMessageBoxProps>;
|
|
22
|
+
inputValue?: string;
|
|
23
|
+
suggestions?: ChatSuggestion[];
|
|
24
|
+
suggestionTemplate?: React.ComponentType<SuggestionTemplateProps>;
|
|
25
|
+
onSuggestionClick?: (suggestion: ChatSuggestion) => void;
|
|
26
|
+
onInputValueChange?: (value: string) => void;
|
|
27
|
+
sendButtonConfig?: ButtonProps;
|
|
28
|
+
onInputClick?: () => void;
|
|
29
|
+
suggestionsLayout?: 'scroll' | 'wrap' | 'scrollbuttons';
|
|
30
|
+
dir?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ActionTriggeredEvent {
|
|
33
|
+
/**
|
|
34
|
+
* The action that was triggered, can be a message action or file action.
|
|
35
|
+
*/
|
|
36
|
+
action: MessageAction | FileAction;
|
|
37
|
+
/**
|
|
38
|
+
* The target message associated with the action, if applicable.
|
|
39
|
+
*/
|
|
40
|
+
target?: Message;
|
|
41
|
+
/**
|
|
42
|
+
* The synthetic event that triggered the action.
|
|
43
|
+
*/
|
|
44
|
+
event: React.SyntheticEvent;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
49
|
+
declare const NewMessage: React.ForwardRefExoticComponent<NewMessageProps & React.RefAttributes<{
|
|
50
|
+
focusInput: () => void;
|
|
51
|
+
}>>;
|
|
52
|
+
export default NewMessage;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export interface ChatNotificationProps {
|
|
13
|
+
/**
|
|
14
|
+
* Determines whether the notification should be visible.
|
|
15
|
+
*/
|
|
16
|
+
show: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The text content to display in the notification.
|
|
19
|
+
*/
|
|
20
|
+
text: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
declare const ChatNotification: React.FC<ChatNotificationProps>;
|
|
26
|
+
export default ChatNotification;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export interface ScrollButtonsWrapperProps {
|
|
13
|
+
/**
|
|
14
|
+
* Whether scroll buttons are visible
|
|
15
|
+
*/
|
|
16
|
+
visible: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Direction for RTL support
|
|
19
|
+
*/
|
|
20
|
+
dir?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the left scroll button is disabled
|
|
23
|
+
*/
|
|
24
|
+
canScrollLeft: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the right scroll button is disabled
|
|
27
|
+
*/
|
|
28
|
+
canScrollRight: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Handler for left scroll button click
|
|
31
|
+
*/
|
|
32
|
+
onScrollLeft: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Handler for right scroll button click
|
|
35
|
+
*/
|
|
36
|
+
onScrollRight: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Content to wrap with scroll buttons
|
|
39
|
+
*/
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @hidden
|
|
44
|
+
* Wrapper component that adds scroll buttons around content when visible.
|
|
45
|
+
* Used by both SuggestionGroup and ActionGroup for consistent scroll button rendering.
|
|
46
|
+
*/
|
|
47
|
+
export declare const ScrollButtonsWrapper: React.FC<ScrollButtonsWrapperProps>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { SuggestionsLayoutMode } from '../ChatPropsAndState.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Represents the rendering options for suggestions in the AI Prompt component.
|
|
12
|
+
* 'suggestionsView' can be either 'classic' or 'modern'.
|
|
13
|
+
* - 'classic': Uses a rectangular styling for suggestions.
|
|
14
|
+
* - 'modern': Uses a chip-like styling for suggestions.
|
|
15
|
+
*/
|
|
16
|
+
export type SuggestionsView = 'classic' | 'modern';
|
|
17
|
+
/**
|
|
18
|
+
* Represents the structure of a chat suggestion item that can be displayed above the message input.
|
|
19
|
+
*
|
|
20
|
+
* @interface ChatSuggestion
|
|
21
|
+
*/
|
|
22
|
+
export interface ChatSuggestion {
|
|
23
|
+
/**
|
|
24
|
+
* The unique identifier for the suggestion.
|
|
25
|
+
*/
|
|
26
|
+
id: string | number;
|
|
27
|
+
/**
|
|
28
|
+
* The text content of the suggestion that will be displayed to the user.
|
|
29
|
+
*/
|
|
30
|
+
text: string;
|
|
31
|
+
/**
|
|
32
|
+
* An optional description that provides additional context for the suggestion.
|
|
33
|
+
*/
|
|
34
|
+
description?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Determines whether the suggestion is disabled and cannot be clicked.
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The visual style for displaying the suggestion. Can be 'classic' for rectangular styling or 'modern' for chip-like styling.
|
|
41
|
+
*/
|
|
42
|
+
suggestionsView?: SuggestionsView;
|
|
43
|
+
}
|
|
44
|
+
export interface SuggestionTemplateProps {
|
|
45
|
+
/**
|
|
46
|
+
* The suggestion object containing the data to be rendered.
|
|
47
|
+
*/
|
|
48
|
+
suggestion: ChatSuggestion;
|
|
49
|
+
/**
|
|
50
|
+
* A callback function that is called when the suggestion is clicked.
|
|
51
|
+
*/
|
|
52
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
53
|
+
}
|
|
54
|
+
interface SuggestionGroupProps {
|
|
55
|
+
suggestions: ChatSuggestion[];
|
|
56
|
+
onSuggestionClick?: (suggestion: ChatSuggestion) => void;
|
|
57
|
+
suggestionTemplate?: React.ComponentType<SuggestionTemplateProps>;
|
|
58
|
+
suggestionsView?: SuggestionsView;
|
|
59
|
+
suggestionsLayout?: SuggestionsLayoutMode;
|
|
60
|
+
dir?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare const SuggestionGroup: React.FC<SuggestionGroupProps>;
|
|
63
|
+
export {};
|