@progress/kendo-react-conversational-ui 11.4.0 → 12.0.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/views/AIPromptView.js +2 -2
- package/ai-prompt/views/AIPromptView.mjs +26 -26
- 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 +40 -23
- 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 +423 -165
- package/index.d.ts +423 -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.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./chat/components/ChatMessage.js"),o=require("./chat/components/Chat.js"),a=require("./chat/components/SuggestionsGroup.js"),s=require("./chat/components/templates/HeroCard.js"),e=require("./chat/utils/fieldMapping.js"),m=require("./ai-prompt/AIPrompt.js"),p=require("./ai-prompt/AIPromptHeader.js"),i=require("./ai-prompt/AIPromptFooter.js"),n=require("./ai-prompt/AIPromptContent.js"),u=require("./ai-prompt/views/AIPromptView.js"),P=require("./ai-prompt/views/AIPromptOutputView.js"),I=require("./ai-prompt/views/AIPromptCommandsView.js"),A=require("./ai-prompt/views/AIPromptViewRender.js"),d=require("./inline-ai-prompt/InlineAIPrompt.js"),t=require("./ai-prompt/views/constants.js");exports.ChatMessage=r.ChatMessage;exports.Chat=o.Chat;exports.SuggestionGroup=a.SuggestionGroup;exports.HeroCard=s.HeroCard;exports.DEFAULT_FIELD_MAPPING=e.DEFAULT_FIELD_MAPPING;exports.extractFieldMappingFromProps=e.extractFieldMappingFromProps;exports.isStandardMessageFormat=e.isStandardMessageFormat;exports.mapDataArrayToMessages=e.mapDataArrayToMessages;exports.mapDataToMessage=e.mapDataToMessage;exports.mapMessageToCustomFormat=e.mapMessageToCustomFormat;exports.AIPrompt=m.AIPrompt;exports.PromptHeader=p.PromptHeader;exports.AIPromptFooter=i.AIPromptFooter;exports.AIPromptContent=n.AIPromptContent;exports.AIPromptView=u.AIPromptView;exports.AIPromptOutputView=P.AIPromptOutputView;exports.AIPromptCommandsView=I.AIPromptCommandsView;exports.AIPromptViewRender=A.AIPromptViewRender;exports.InlineAIPrompt=d.InlineAIPrompt;exports.commandsViewDefaults=t.commandsViewDefaults;exports.outputViewDefaults=t.outputViewDefaults;exports.promptViewDefaults=t.promptViewDefaults;
|
package/index.mjs
CHANGED
|
@@ -6,35 +6,42 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import { ChatMessage as
|
|
10
|
-
import { Chat as m } from "./components/Chat.mjs";
|
|
11
|
-
import { SuggestionGroup as
|
|
12
|
-
import { HeroCard as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
9
|
+
import { ChatMessage as e } from "./chat/components/ChatMessage.mjs";
|
|
10
|
+
import { Chat as m } from "./chat/components/Chat.mjs";
|
|
11
|
+
import { SuggestionGroup as a } from "./chat/components/SuggestionsGroup.mjs";
|
|
12
|
+
import { HeroCard as f } from "./chat/components/templates/HeroCard.mjs";
|
|
13
|
+
import { DEFAULT_FIELD_MAPPING as i, extractFieldMappingFromProps as P, isStandardMessageFormat as A, mapDataArrayToMessages as I, mapDataToMessage as n, mapMessageToCustomFormat as u } from "./chat/utils/fieldMapping.mjs";
|
|
14
|
+
import { AIPrompt as g } from "./ai-prompt/AIPrompt.mjs";
|
|
15
|
+
import { PromptHeader as D } from "./ai-prompt/AIPromptHeader.mjs";
|
|
16
|
+
import { AIPromptFooter as M } from "./ai-prompt/AIPromptFooter.mjs";
|
|
17
|
+
import { AIPromptContent as C } from "./ai-prompt/AIPromptContent.mjs";
|
|
18
|
+
import { AIPromptView as T } from "./ai-prompt/views/AIPromptView.mjs";
|
|
19
|
+
import { AIPromptOutputView as h } from "./ai-prompt/views/AIPromptOutputView.mjs";
|
|
20
|
+
import { AIPromptCommandsView as G } from "./ai-prompt/views/AIPromptCommandsView.mjs";
|
|
21
|
+
import { AIPromptViewRender as L } from "./ai-prompt/views/AIPromptViewRender.mjs";
|
|
22
|
+
import { InlineAIPrompt as _ } from "./inline-ai-prompt/InlineAIPrompt.mjs";
|
|
23
|
+
import { commandsViewDefaults as N, outputViewDefaults as O, promptViewDefaults as R } from "./ai-prompt/views/constants.mjs";
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
g as AIPrompt,
|
|
26
|
+
G as AIPromptCommandsView,
|
|
27
|
+
C as AIPromptContent,
|
|
28
|
+
M as AIPromptFooter,
|
|
29
|
+
h as AIPromptOutputView,
|
|
30
|
+
T as AIPromptView,
|
|
31
|
+
L as AIPromptViewRender,
|
|
31
32
|
m as Chat,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
e as ChatMessage,
|
|
34
|
+
i as DEFAULT_FIELD_MAPPING,
|
|
35
|
+
f as HeroCard,
|
|
36
|
+
_ as InlineAIPrompt,
|
|
37
|
+
D as PromptHeader,
|
|
38
|
+
a as SuggestionGroup,
|
|
39
|
+
N as commandsViewDefaults,
|
|
40
|
+
P as extractFieldMappingFromProps,
|
|
41
|
+
A as isStandardMessageFormat,
|
|
42
|
+
I as mapDataArrayToMessages,
|
|
43
|
+
n as mapDataToMessage,
|
|
44
|
+
u as mapMessageToCustomFormat,
|
|
38
45
|
O as outputViewDefaults,
|
|
39
46
|
R as promptViewDefaults
|
|
40
47
|
};
|
package/messages/index.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="newMessage.sendButton",s="newMessage.optionsButton",
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="newMessage.sendButton",s="newMessage.optionsButton",a="newMessage.messageInput",t="avatar.alt",o="messageList.ariaLabel",l="aIPrompt.noOutputs",n="aIPrompt.cancel",c="chat.senderDeletedMessage",i="chat.receiverDeletedMessage",d="chat.copyNotification",g="chat.downloadAllFiles",p="chat.closeReply",r="chat.collapseMessage",M="chat.expandMessage",h="chat.removeFile",m="chat.fileActions",u="chat.attachFile",w="chat.downloadAll",v={[e]:"Send",[s]:"Options",[a]:"Message",[t]:"Avatar",[o]:"Message list",[n]:"Cancel",[l]:"No output from AI available",[c]:"You removed this message",[i]:"The message was removed by its sender",[d]:"Text copied to clipboard",[g]:"Download all files",[p]:"Close reply",[r]:"Collapse message",[M]:"Expand message",[h]:"Remove file",[m]:"File actions for",[u]:"Attach file",[w]:"Download all"};exports.aIPromptCancel=n;exports.aIPromptNoOutputs=l;exports.ariaLabelMessageList=o;exports.attachFile=u;exports.avatarAlt=t;exports.chatCopyNotification=d;exports.chatReceiverDeletedMessage=i;exports.chatSenderDeletedMessage=c;exports.closeReply=p;exports.collapseMessage=r;exports.downloadAll=w;exports.downloadAllFiles=g;exports.expandMessage=M;exports.fileActions=m;exports.messages=v;exports.newMessageMessageInput=a;exports.newMessageOptionsButton=s;exports.newMessageSendButton=e;exports.removeFile=h;
|
package/messages/index.mjs
CHANGED
|
@@ -5,22 +5,44 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
8
|
+
const e = "newMessage.sendButton", s = "newMessage.optionsButton", a = "newMessage.messageInput", t = "avatar.alt", o = "messageList.ariaLabel", n = "aIPrompt.noOutputs", l = "aIPrompt.cancel", c = "chat.senderDeletedMessage", i = "chat.receiverDeletedMessage", d = "chat.copyNotification", p = "chat.downloadAllFiles", g = "chat.closeReply", r = "chat.collapseMessage", h = "chat.expandMessage", M = "chat.removeFile", m = "chat.fileActions", u = "chat.attachFile", w = "chat.downloadAll", v = {
|
|
9
|
+
[e]: "Send",
|
|
10
|
+
[s]: "Options",
|
|
11
|
+
[a]: "Message",
|
|
12
|
+
[t]: "Avatar",
|
|
13
|
+
[o]: "Message list",
|
|
14
|
+
[l]: "Cancel",
|
|
15
|
+
[n]: "No output from AI available",
|
|
16
|
+
[c]: "You removed this message",
|
|
17
|
+
[i]: "The message was removed by its sender",
|
|
18
|
+
[d]: "Text copied to clipboard",
|
|
19
|
+
[p]: "Download all files",
|
|
20
|
+
[g]: "Close reply",
|
|
21
|
+
[r]: "Collapse message",
|
|
22
|
+
[h]: "Expand message",
|
|
23
|
+
[M]: "Remove file",
|
|
24
|
+
[m]: "File actions for",
|
|
25
|
+
[u]: "Attach file",
|
|
26
|
+
[w]: "Download all"
|
|
16
27
|
};
|
|
17
28
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
l as aIPromptCancel,
|
|
30
|
+
n as aIPromptNoOutputs,
|
|
31
|
+
o as ariaLabelMessageList,
|
|
32
|
+
u as attachFile,
|
|
33
|
+
t as avatarAlt,
|
|
34
|
+
d as chatCopyNotification,
|
|
35
|
+
i as chatReceiverDeletedMessage,
|
|
36
|
+
c as chatSenderDeletedMessage,
|
|
37
|
+
g as closeReply,
|
|
38
|
+
r as collapseMessage,
|
|
39
|
+
w as downloadAll,
|
|
40
|
+
p as downloadAllFiles,
|
|
41
|
+
h as expandMessage,
|
|
42
|
+
m as fileActions,
|
|
43
|
+
v as messages,
|
|
44
|
+
a as newMessageMessageInput,
|
|
45
|
+
s as newMessageOptionsButton,
|
|
46
|
+
e as newMessageSendButton,
|
|
47
|
+
M as removeFile
|
|
26
48
|
};
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-conversational-ui",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-conversational-ui",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1755608263,version:"12.0.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = Object.freeze({
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "
|
|
13
|
+
publishDate: 1755608263,
|
|
14
|
+
version: "12.0.0-develop.2",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
});
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-conversational-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0-develop.2",
|
|
4
4
|
"description": "React Chat component allows the user to participate in chat sessions with users or chat bots. KendoReact Conversational UI components",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.0",
|
|
29
|
-
"@progress/kendo-react-buttons": "
|
|
30
|
-
"@progress/kendo-react-common": "
|
|
31
|
-
"@progress/kendo-react-intl": "
|
|
32
|
-
"@progress/kendo-react-inputs": "
|
|
33
|
-
"@progress/kendo-react-layout": "
|
|
29
|
+
"@progress/kendo-react-buttons": "12.0.0-develop.2",
|
|
30
|
+
"@progress/kendo-react-common": "12.0.0-develop.2",
|
|
31
|
+
"@progress/kendo-react-intl": "12.0.0-develop.2",
|
|
32
|
+
"@progress/kendo-react-inputs": "12.0.0-develop.2",
|
|
33
|
+
"@progress/kendo-react-layout": "12.0.0-develop.2",
|
|
34
34
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
35
35
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
36
36
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"package": {
|
|
60
60
|
"productName": "KendoReact",
|
|
61
61
|
"productCode": "KENDOUIREACT",
|
|
62
|
-
"publishDate":
|
|
62
|
+
"publishDate": 1755608263,
|
|
63
63
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
64
64
|
}
|
|
65
65
|
},
|
package/components/Action.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use strict";const n=require("react"),r=require("@progress/kendo-react-common"),i=require("./base/FocusableUponSelection.js");function c(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const p=c(n);class a extends i.FocusableUponSelection{constructor(){super(...arguments),this.onKeyDown=e=>{e.keyCode===r.Keys.enter&&this.props.onActionExecute(this.props.item,e)}}render(){return p.createElement("span",{role:"button",className:this.getClassNames(),onClick:e=>this.props.onActionExecute(this.props.item,e),ref:e=>{this.elementToFocus=e},onKeyDown:this.onKeyDown,tabIndex:0},this.props.item.title||this.props.item.value)}getClassNames(){return r.classNames("k-quick-reply",{"k-first":this.props.isFirstItemInGroup},{"k-last":this.props.isLastItemInGroup},{"k-selected":this.props.selected},{"k-focus":this.props.selected})}}module.exports=a;
|
package/components/Action.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 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 s from "react";
|
|
9
|
-
import { Keys as t, classNames as o } from "@progress/kendo-react-common";
|
|
10
|
-
import { FocusableUponSelection as r } from "./base/FocusableUponSelection.mjs";
|
|
11
|
-
class a extends r {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments), this.onKeyDown = (e) => {
|
|
14
|
-
e.keyCode === t.enter && this.props.onActionExecute(this.props.item, e);
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
return /* @__PURE__ */ s.createElement(
|
|
19
|
-
"span",
|
|
20
|
-
{
|
|
21
|
-
role: "button",
|
|
22
|
-
className: this.getClassNames(),
|
|
23
|
-
onClick: (e) => this.props.onActionExecute(this.props.item, e),
|
|
24
|
-
ref: (e) => {
|
|
25
|
-
this.elementToFocus = e;
|
|
26
|
-
},
|
|
27
|
-
onKeyDown: this.onKeyDown,
|
|
28
|
-
tabIndex: 0
|
|
29
|
-
},
|
|
30
|
-
this.props.item.title || this.props.item.value
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
getClassNames() {
|
|
34
|
-
return o(
|
|
35
|
-
"k-quick-reply",
|
|
36
|
-
{ "k-first": this.props.isFirstItemInGroup },
|
|
37
|
-
{ "k-last": this.props.isLastItemInGroup },
|
|
38
|
-
{ "k-selected": this.props.selected },
|
|
39
|
-
{ "k-focus": this.props.selected }
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
a as default
|
|
45
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use strict";const r=require("react"),c=require("@progress/kendo-react-common"),a=require("./Action.js"),i=require("./base/SelectableItemsContainer.js");function u(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const o in s)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(s,o);Object.defineProperty(e,o,t.get?t:{enumerable:!0,get:()=>s[o]})}}return e.default=s,Object.freeze(e)}const n=u(r);class l extends i.SelectableItemsContainer{constructor(e){super(e)}render(){const e=this.props.group.actions?this.props.group.actions.length-1:0;return n.createElement("div",{className:this.getClassNames(),onClick:this.onRequestContainerSelection,onKeyDown:this.onKeyDown},this.props.group.actions&&this.props.group.actions.map((o,t)=>n.createElement(a,{item:o,onActionExecute:this.props.onActionExecute,selected:t===this.state.selectedItemIndex,isFirstItemInGroup:t===0,isLastItemInGroup:t===e,key:t})))}getClassNames(){return c.classNames("k-quick-replies")}}module.exports=l;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 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 s from "react";
|
|
9
|
-
import { classNames as r } from "@progress/kendo-react-common";
|
|
10
|
-
import n from "./Action.mjs";
|
|
11
|
-
import { SelectableItemsContainer as i } from "./base/SelectableItemsContainer.mjs";
|
|
12
|
-
class l extends i {
|
|
13
|
-
constructor(e) {
|
|
14
|
-
super(e);
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
const e = this.props.group.actions ? this.props.group.actions.length - 1 : 0;
|
|
18
|
-
return /* @__PURE__ */ s.createElement("div", { className: this.getClassNames(), onClick: this.onRequestContainerSelection, onKeyDown: this.onKeyDown }, this.props.group.actions && this.props.group.actions.map((o, t) => /* @__PURE__ */ s.createElement(
|
|
19
|
-
n,
|
|
20
|
-
{
|
|
21
|
-
item: o,
|
|
22
|
-
onActionExecute: this.props.onActionExecute,
|
|
23
|
-
selected: t === this.state.selectedItemIndex,
|
|
24
|
-
isFirstItemInGroup: t === 0,
|
|
25
|
-
isLastItemInGroup: t === e,
|
|
26
|
-
key: t
|
|
27
|
-
}
|
|
28
|
-
)));
|
|
29
|
-
}
|
|
30
|
-
getClassNames() {
|
|
31
|
-
return r("k-quick-replies");
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
l as default
|
|
36
|
-
};
|
package/components/Attachment.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use strict";const n=require("react"),a=require("@progress/kendo-react-common"),o=require("./base/FocusableUponSelection.js");function l(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(s,i,r.get?r:{enumerable:!0,get:()=>t[i]})}}return s.default=t,Object.freeze(s)}const e=l(n);class c extends o.FocusableUponSelection{render(){return e.createElement("div",{className:this.getClassNames(),tabIndex:this.getTabIndexValue(),onClick:this.props.onClick,ref:s=>{this.elementToFocus=s}},this.props.template?e.createElement(this.props.template,{item:this.props.item}):e.createElement("div",{className:"k-card"},e.createElement("div",{className:"k-card-body"},this.getTitleView(),this.getSubtitleView(),this.getContentView())))}getTabIndexValue(){if(this.props.tabbable!==void 0)return this.props.tabbable?0:-1}getClassNames(){return a.classNames({"k-selected":this.props.selected},{"k-focus":this.props.selected},{"k-first":this.props.isFirstItemInGroup},{"k-last":this.props.isLastItemInGroup})}getTitleView(){return this.props.item.title?e.createElement("h5",{className:"k-card-title"},this.props.item.title):null}getSubtitleView(){return this.props.item.subtitle?e.createElement("h6",{className:"k-card-subtitle"},this.props.item.subtitle):null}getContentView(){return this.props.item.contentType.indexOf("image/")===0?e.createElement("img",{src:this.props.item.content}):this.props.item.content}}module.exports=c;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 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 e from "react";
|
|
9
|
-
import { classNames as s } from "@progress/kendo-react-common";
|
|
10
|
-
import { FocusableUponSelection as i } from "./base/FocusableUponSelection.mjs";
|
|
11
|
-
class p extends i {
|
|
12
|
-
render() {
|
|
13
|
-
return /* @__PURE__ */ e.createElement(
|
|
14
|
-
"div",
|
|
15
|
-
{
|
|
16
|
-
className: this.getClassNames(),
|
|
17
|
-
tabIndex: this.getTabIndexValue(),
|
|
18
|
-
onClick: this.props.onClick,
|
|
19
|
-
ref: (t) => {
|
|
20
|
-
this.elementToFocus = t;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
this.props.template ? /* @__PURE__ */ e.createElement(this.props.template, { item: this.props.item }) : /* @__PURE__ */ e.createElement("div", { className: "k-card" }, /* @__PURE__ */ e.createElement("div", { className: "k-card-body" }, this.getTitleView(), this.getSubtitleView(), this.getContentView()))
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
getTabIndexValue() {
|
|
27
|
-
if (this.props.tabbable !== void 0)
|
|
28
|
-
return this.props.tabbable ? 0 : -1;
|
|
29
|
-
}
|
|
30
|
-
getClassNames() {
|
|
31
|
-
return s(
|
|
32
|
-
{ "k-selected": this.props.selected },
|
|
33
|
-
{ "k-focus": this.props.selected },
|
|
34
|
-
{ "k-first": this.props.isFirstItemInGroup },
|
|
35
|
-
{ "k-last": this.props.isLastItemInGroup }
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
getTitleView() {
|
|
39
|
-
return this.props.item.title ? /* @__PURE__ */ e.createElement("h5", { className: "k-card-title" }, this.props.item.title) : null;
|
|
40
|
-
}
|
|
41
|
-
getSubtitleView() {
|
|
42
|
-
return this.props.item.subtitle ? /* @__PURE__ */ e.createElement("h6", { className: "k-card-subtitle" }, this.props.item.subtitle) : null;
|
|
43
|
-
}
|
|
44
|
-
getContentView() {
|
|
45
|
-
return this.props.item.contentType.indexOf("image/") === 0 ? /* @__PURE__ */ e.createElement("img", { src: this.props.item.content }) : this.props.item.content;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
export {
|
|
49
|
-
p as default
|
|
50
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use strict";const c=require("react"),l=require("@progress/kendo-react-common"),a=require("@progress/kendo-svg-icons"),u=require("./Attachment.js"),h=require("./base/SelectableItemsContainer.js"),i=require("@progress/kendo-react-buttons");function m(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const o=m(c);class p extends h.SelectableItemsContainer{render(){const t=this.isCardDeckLayout(this.props),e=o.createElement("div",{className:this.getClassNames(),onKeyDown:t?void 0:this.onKeyDown},this.props.group.attachments.map((r,n)=>o.createElement(u,{item:r,template:this.props.itemTemplate,selected:n===this.state.selectedItemIndex,tabbable:this.props.isLastGroup&&n===this.state.selectedItemIndex,isFirstItemInGroup:n===0,isLastItemInGroup:n===this.getLastItemIndex(),onClick:()=>this.onAttachmentClick(n),key:n})));return t?o.createElement("div",{className:"k-card-deck-scrollwrap",onKeyDown:this.onKeyDown},this.getLeftScrollBtn(),e,this.getRightScrollBtn()):e}get isKeyboardNavigationLeftRight(){return this.isCardDeckLayout(this.props)}getLastItemIndex(){return this.props.group.attachments.length-1}getLeftScrollBtn(){let t=null;return this.isCardDeckLayout(this.props)&&this.state.selectedItemIndex&&(t=o.createElement(i.Button,{icon:"chevron-left",onClick:()=>this.onNavigateBtnClick(!1),svgIcon:a.chevronLeftIcon})),t}getRightScrollBtn(){let t=null;return this.isCardDeckLayout(this.props)&&this.state.selectedItemIndex!==this.getLastItemIndex()&&(t=o.createElement(i.Button,{icon:"chevron-right",onClick:()=>this.onNavigateBtnClick(!0),svgIcon:a.chevronRightIcon})),t}onAttachmentClick(t){this.onRequestContainerSelection(),this.setState({selectedItemIndex:t})}onNavigateBtnClick(t){this.onRequestContainerSelection(),this.navigate(t,1)}isCardDeckLayout(t){return t.group.attachmentLayout!=="list"}getClassNames(){return l.classNames({"k-card-list":this.props.group.attachmentLayout,"k-card-deck":this.isCardDeckLayout(this.props)})}}module.exports=p;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 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 s from "react";
|
|
9
|
-
import { classNames as i } from "@progress/kendo-react-common";
|
|
10
|
-
import { chevronLeftIcon as n, chevronRightIcon as c } from "@progress/kendo-svg-icons";
|
|
11
|
-
import l from "./Attachment.mjs";
|
|
12
|
-
import { SelectableItemsContainer as h } from "./base/SelectableItemsContainer.mjs";
|
|
13
|
-
import { Button as r } from "@progress/kendo-react-buttons";
|
|
14
|
-
class k extends h {
|
|
15
|
-
render() {
|
|
16
|
-
const t = this.isCardDeckLayout(this.props), o = /* @__PURE__ */ s.createElement("div", { className: this.getClassNames(), onKeyDown: t ? void 0 : this.onKeyDown }, this.props.group.attachments.map((a, e) => /* @__PURE__ */ s.createElement(
|
|
17
|
-
l,
|
|
18
|
-
{
|
|
19
|
-
item: a,
|
|
20
|
-
template: this.props.itemTemplate,
|
|
21
|
-
selected: e === this.state.selectedItemIndex,
|
|
22
|
-
tabbable: this.props.isLastGroup && e === this.state.selectedItemIndex,
|
|
23
|
-
isFirstItemInGroup: e === 0,
|
|
24
|
-
isLastItemInGroup: e === this.getLastItemIndex(),
|
|
25
|
-
onClick: () => this.onAttachmentClick(e),
|
|
26
|
-
key: e
|
|
27
|
-
}
|
|
28
|
-
)));
|
|
29
|
-
return t ? /* @__PURE__ */ s.createElement("div", { className: "k-card-deck-scrollwrap", onKeyDown: this.onKeyDown }, this.getLeftScrollBtn(), o, this.getRightScrollBtn()) : o;
|
|
30
|
-
}
|
|
31
|
-
// Overriding the default navigation.
|
|
32
|
-
get isKeyboardNavigationLeftRight() {
|
|
33
|
-
return this.isCardDeckLayout(this.props);
|
|
34
|
-
}
|
|
35
|
-
getLastItemIndex() {
|
|
36
|
-
return this.props.group.attachments.length - 1;
|
|
37
|
-
}
|
|
38
|
-
getLeftScrollBtn() {
|
|
39
|
-
let t = null;
|
|
40
|
-
return this.isCardDeckLayout(this.props) && this.state.selectedItemIndex && (t = /* @__PURE__ */ s.createElement(r, { icon: "chevron-left", onClick: () => this.onNavigateBtnClick(!1), svgIcon: n })), t;
|
|
41
|
-
}
|
|
42
|
-
getRightScrollBtn() {
|
|
43
|
-
let t = null;
|
|
44
|
-
return this.isCardDeckLayout(this.props) && this.state.selectedItemIndex !== this.getLastItemIndex() && (t = /* @__PURE__ */ s.createElement(r, { icon: "chevron-right", onClick: () => this.onNavigateBtnClick(!0), svgIcon: c })), t;
|
|
45
|
-
}
|
|
46
|
-
onAttachmentClick(t) {
|
|
47
|
-
this.onRequestContainerSelection(), this.setState({ selectedItemIndex: t });
|
|
48
|
-
}
|
|
49
|
-
onNavigateBtnClick(t) {
|
|
50
|
-
this.onRequestContainerSelection(), this.navigate(t, 1);
|
|
51
|
-
}
|
|
52
|
-
isCardDeckLayout(t) {
|
|
53
|
-
return t.group.attachmentLayout !== "list";
|
|
54
|
-
}
|
|
55
|
-
getClassNames() {
|
|
56
|
-
return i({
|
|
57
|
-
"k-card-list": this.props.group.attachmentLayout,
|
|
58
|
-
"k-card-deck": this.isCardDeckLayout(this.props)
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
export {
|
|
63
|
-
k as default
|
|
64
|
-
};
|
package/components/Chat.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@progress/kendo-react-common"),i=require("prop-types"),u=require("react"),m=require("../ViewItem.js"),d=require("./ActionGroup.js"),g=require("./AttachmentGroup.js"),I=require("./DateMarker.js"),f=require("./MessageGroup.js"),T=require("./NewMessage.js"),w=require("./ChatMessage.js"),p=require("../package-metadata.js"),c=require("../messages/index.js"),k=require("@progress/kendo-react-intl");function y(n){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return s.default=n,Object.freeze(s)}const o=y(u),l=class l extends o.Component{constructor(s){super(s),this.viewItems=[],this.isDirectionRightToLeft=!1,this.scrollToBottomOnLoadingData=!0,this.showLicenseWatermark=!1,this.onFocus=()=>{clearTimeout(this.timeoutIdForChatLosingFocus)},this.onBlur=()=>{this.timeoutIdForChatLosingFocus=window.setTimeout(()=>{this.setState({selectedItemIndex:null})},0)},this.onSelectionRequested=e=>{this.setState({selectedItemIndex:e})},this.onKeyDown=e=>{let t=null;const a=this.state.selectedItemIndex!==null?this.state.selectedItemIndex:this.viewItems.lastSelectionIndex;e.keyCode===r.Keys.up?a===null?t=0:a>0&&(t=a-1):e.keyCode===r.Keys.down&&(a===null?t=0:a<this.viewItems.lastSelectionIndex&&(t=a+1)),t!==null&&(this.setState({selectedItemIndex:t}),e.preventDefault())},this.onMessageSend=(e,t)=>{r.dispatchEvent(this.props.onMessageSend,t,this,{message:e})},this.onActionExecute=(e,t)=>{if(r.dispatchEvent(this.props.onActionExecute,t,this,{action:e}),!t.isDefaultPrevented()){switch(e.type){case"reply":this.onMessageSend({author:this.props.user,text:e.value,timestamp:new Date},t);break;case"call":window.open("tel:"+e.value);break;case"openUrl":window.open(e.value);break}this.newMsgComp.focusInput()}},this.showLicenseWatermark=!r.validatePackage(p.packageMetadata,{component:"Chat"}),this.licenseMessage=r.getLicenseMessage(p.packageMetadata),this.state={selectedItemIndex:null,isFirstRender:!0}}render(){this.viewItems=this.getViewItemsFromMsgs(this.props.messages),this.isDirectionRightToLeft=this.checkIsDirectionRightToLeft(this.props);const s=k.provideLocalizationService(this);return o.createElement("div",{style:{width:this.props.width,position:"relative"},onKeyDown:this.onKeyDown,className:this.getClassNames(),ref:e=>{this.chatWrapperEl=e}},o.createElement("div",{className:"k-message-list k-avatars",onBlur:this.onBlur,onFocus:this.onFocus,role:"log","aria-label":s.toLanguageString(c.ariaLabelMessageList,c.messages[c.ariaLabelMessageList]),"aria-live":"polite",onScroll:e=>{this.scrollToBottomOnLoadingData=e.currentTarget.scrollTop===e.currentTarget.scrollHeight-e.currentTarget.clientHeight},ref:e=>{this.viewItemsWrapperEl=e}},o.createElement("div",{className:"k-message-list-content"},this.renderViewItems())),o.createElement(T,{user:this.props.user,onMessageSend:this.onMessageSend,isDirectionRightToLeft:this.isDirectionRightToLeft,ref:e=>{this.newMsgComp=e},placeholder:this.props.placeholder,MessageBox:this.props.messageBox,toolbar:this.props.toolbar,onToolbarActionButtonClick:this.props.onToolbarActionExecute,showToolbar:this.props.showToolbar}),this.showLicenseWatermark&&o.createElement(r.WatermarkOverlay,{message:this.licenseMessage}))}componentDidMount(){this.setState({isFirstRender:!1},()=>{this.nextTickId=window.setTimeout(()=>this.scrollViewItemsToBottom(),250)})}componentWillUnmount(){clearTimeout(this.nextTickId)}componentDidUpdate(s){s.messages.length!==this.props.messages.length&&this.scrollToBottomOnLoadingData&&this.scrollViewItemsToBottom()}getClassNames(){return r.classNames("k-chat",this.props.className,{"k-rtl":this.isDirectionRightToLeft})}checkIsDirectionRightToLeft(s){return!!(s.dir!==void 0?s.dir==="rtl":this.chatWrapperEl&&getComputedStyle(this.chatWrapperEl).direction==="rtl")}renderViewItems(){const s=this.viewItems.length-1;return this.viewItems.map((e,t)=>{if(e.type==="date-marker")return o.createElement(I,{item:e,key:t});if(e.type==="message-group")return o.createElement(f,{group:e,itemTemplate:this.props.messageTemplate,attachmentTemplate:this.props.attachmentTemplate,user:this.props.user,selectedItemIndex:this.state.selectedItemIndex,onRequestSelection:this.onSelectionRequested,isLastGroup:t===s,key:t,message:this.props.message||l.defaultProps.message});if(e.type==="attachment-group")return o.createElement(g,{group:e,itemTemplate:this.props.attachmentTemplate,onRequestSelection:this.onSelectionRequested,selected:e.selectionIndex===this.state.selectedItemIndex,isLastGroup:t===s,key:t});if(e.type==="action-group")return o.createElement(d,{group:e,onActionExecute:this.onActionExecute,onRequestSelection:this.onSelectionRequested,selected:e.selectionIndex===this.state.selectedItemIndex,isLastGroup:t===s,key:t})})}scrollViewItemsToBottom(){this.viewItemsWrapperEl&&(this.viewItemsWrapperEl.scrollTop=this.viewItemsWrapperEl.scrollHeight-this.viewItemsWrapperEl.clientHeight)}getViewItemsFromMsgs(s){return s.length>0?m.convertMsgsToViewItems(s):[]}};l.propTypes={messages:i.arrayOf(i.object),user:i.object,messageTemplate:i.any,attachmentTemplate:i.any,width:i.oneOfType([i.string,i.number]),onMessageSend:i.func,onActionExecute:i.func,dir:i.string,messageBox:i.any},l.defaultProps={messages:[],dateFormat:"g",message:w.ChatMessage};let h=l;exports.Chat=h;
|