@progress/kendo-react-conversational-ui 13.4.0-develop.2 → 13.4.0-develop.3

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.
Files changed (64) hide show
  1. package/api/message.interface.d.ts +87 -9
  2. package/chat/ChatPropsAndState.d.ts +108 -9
  3. package/chat/Events.d.ts +9 -0
  4. package/chat/components/ActionGroup.js +1 -1
  5. package/chat/components/ActionGroup.mjs +58 -48
  6. package/chat/components/Chat.d.ts +1 -1
  7. package/chat/components/Chat.js +1 -1
  8. package/chat/components/Chat.mjs +318 -269
  9. package/chat/components/ChatContext.d.ts +6 -3
  10. package/chat/components/ChatMessage.js +1 -1
  11. package/chat/components/ChatMessage.mjs +237 -177
  12. package/chat/components/Header.js +1 -1
  13. package/chat/components/Header.mjs +3 -3
  14. package/chat/components/NewMessage.d.ts +5 -3
  15. package/chat/components/NewMessage.js +1 -1
  16. package/chat/components/NewMessage.mjs +174 -226
  17. package/chat/components/ScrollButtonsWrapper.js +1 -1
  18. package/chat/components/ScrollButtonsWrapper.mjs +34 -40
  19. package/chat/components/SuggestionsGroup.js +1 -1
  20. package/chat/components/SuggestionsGroup.mjs +40 -39
  21. package/chat/components/elements/FileBox.js +1 -1
  22. package/chat/components/elements/FileBox.mjs +33 -41
  23. package/chat/components/elements/PinnedMessage.js +1 -1
  24. package/chat/components/elements/PinnedMessage.mjs +24 -22
  25. package/chat/hooks/useScrollWithButtons.d.ts +4 -0
  26. package/chat/hooks/useScrollWithButtons.js +1 -1
  27. package/chat/hooks/useScrollWithButtons.mjs +25 -23
  28. package/chat/utils/fieldMapping.d.ts +1 -1
  29. package/chat/utils/fieldMapping.js +1 -1
  30. package/chat/utils/fieldMapping.mjs +37 -34
  31. package/chat/utils/scroll.d.ts +15 -1
  32. package/chat/utils/scroll.js +3 -3
  33. package/chat/utils/scroll.mjs +92 -65
  34. package/chat/utils.d.ts +4 -1
  35. package/chat/utils.js +1 -1
  36. package/chat/utils.mjs +37 -37
  37. package/dist/cdn/js/kendo-react-conversational-ui.js +1 -1
  38. package/index.d.mts +6 -0
  39. package/index.d.ts +6 -0
  40. package/index.js +1 -1
  41. package/index.mjs +39 -31
  42. package/messages/index.d.ts +50 -0
  43. package/messages/index.js +1 -1
  44. package/messages/index.mjs +60 -40
  45. package/package-metadata.js +1 -1
  46. package/package-metadata.mjs +1 -1
  47. package/package.json +11 -11
  48. package/prompt-box/Events.d.ts +66 -0
  49. package/prompt-box/FileBox.d.ts +22 -0
  50. package/prompt-box/FileBox.js +8 -0
  51. package/prompt-box/FileBox.mjs +72 -0
  52. package/prompt-box/PromptBox.d.ts +35 -0
  53. package/prompt-box/PromptBox.js +8 -0
  54. package/prompt-box/PromptBox.mjs +424 -0
  55. package/prompt-box/PromptBoxActionButton.d.ts +32 -0
  56. package/prompt-box/PromptBoxActionButton.js +8 -0
  57. package/prompt-box/PromptBoxActionButton.mjs +14 -0
  58. package/prompt-box/PromptBoxSpeechToTextButton.d.ts +32 -0
  59. package/prompt-box/PromptBoxSpeechToTextButton.js +8 -0
  60. package/prompt-box/PromptBoxSpeechToTextButton.mjs +14 -0
  61. package/prompt-box/PromptBoxUploadButton.d.ts +108 -0
  62. package/prompt-box/PromptBoxUploadButton.js +8 -0
  63. package/prompt-box/PromptBoxUploadButton.mjs +54 -0
  64. package/prompt-box/interfaces/PromptBoxProps.d.ts +390 -0
@@ -5,11 +5,13 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Message, User } from '../../index.js';
8
+ import { Message } from '../../api/message.interface.js';
9
+ import { User } from '../../api/user.interface.js';
9
10
  import { FileAction, MessageAction } from './ChatMessage.js';
10
11
  import { StatusTemplateProps, UserStatusTemplateProps, ChatFile, FilesLayoutMode, TimestampVisibilityMode } from '../ChatPropsAndState.js';
11
12
  import { SpeechToTextButtonProps } from '@progress/kendo-react-buttons';
12
- import { UploadProps } from '@progress/kendo-react-upload';
13
+ import { UploadButtonProps } from '../../prompt-box/interfaces/PromptBoxProps.js';
14
+ import { ChatResendMessageEvent } from '../Events.js';
13
15
  import * as React from 'react';
14
16
  /**
15
17
  * @hidden
@@ -25,12 +27,13 @@ interface ChatContextType {
25
27
  onContextMenuAction?: (action: MessageAction, event: React.SyntheticEvent<any>, target: Message) => void;
26
28
  onFileAction?: (action: FileAction, event: React.SyntheticEvent<any>, target: ChatFile) => void;
27
29
  onDownload?: (files: ChatFile[], message: Message) => void;
30
+ onResendMessage?: (event: ChatResendMessageEvent) => void;
28
31
  fileActions?: MessageAction[];
29
32
  setShowCopyNotification?: React.Dispatch<React.SetStateAction<boolean>>;
30
33
  statusTemplate?: React.ComponentType<StatusTemplateProps>;
31
34
  userStatusTemplate?: React.ComponentType<UserStatusTemplateProps>;
32
35
  speechToTextConfig?: boolean | SpeechToTextButtonProps;
33
- uploadConfig?: boolean | UploadProps;
36
+ uploadConfig?: boolean | UploadButtonProps;
34
37
  messageFilesLayout?: FilesLayoutMode;
35
38
  timestampVisibility?: TimestampVisibilityMode;
36
39
  }
@@ -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 fe=require("react"),g=require("@progress/kendo-react-common"),Z=require("@progress/kendo-react-buttons"),f=require("@progress/kendo-svg-icons"),$=require("@progress/kendo-react-intl"),ee=require("@progress/kendo-react-layout"),c=require("../utils.js"),pe=require("./ChatContext.js"),ge=require("./elements/FileBox.js"),l=require("../../messages/index.js");function be(u){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const n in u)if(n!=="default"){const d=Object.getOwnPropertyDescriptor(u,n);Object.defineProperty(r,n,d.get?d:{enumerable:!0,get:()=>u[n]})}}return r.default=u,Object.freeze(r)}const t=be(fe),te=t.forwardRef((u,r)=>{const{item:n,template:d,contentTemplate:D,onRequestSelection:b,tabIndex:ne=-1,dateFormat:z="g",selected:o,allowMessageCollapse:k,messageToolbarActions:C,messageContextMenuActions:y,fileActions:B,isSender:x}=u,{setReplyToMessage:E,messages:j,user:p,internalScrollContainerRef:h,onToolbarAction:N,onContextMenuAction:S,onFileAction:K,onDownload:m,setShowCopyNotification:I,statusTemplate:A,timestampVisibility:R="onFocus"}=pe.useChatContext(),[W,F]=t.useState(!1),[_,q]=t.useState(!1),[w,se]=t.useState(!0),[ae,H]=t.useState(!1),i=$.useLocalization(),U=$.useInternationalization(),X=t.useRef({left:0,top:0}),M=t.useCallback(()=>{n!=null&&n.text&&c.copyToClipboard(n.text),I&&(I(!0),setTimeout(()=>{I(!1)},3e3))},[n,I]),L=t.useCallback(e=>{e.stopPropagation(),se(s=>!s)},[]),le=t.useCallback(()=>{H(!1)},[]),oe=t.useCallback(e=>{(e.key==="Tab"||e.key==="Enter"||e.key===" "||e.key==="ArrowUp"||e.key==="ArrowDown")&&H(!0)},[]),V=t.useRef(null);t.useEffect(()=>{o&&V.current&&V.current.focus()},[o]);const O=t.useCallback(e=>{X.current={left:e.pageX,top:e.pageY},e.preventDefault(),q(!0),F(!0)},[]),Y=t.useCallback(()=>{q(!1),F(!1)},[]),v=t.useCallback((e,s)=>e.isDeleted?c.getDeletedMessageText(s,i):e.text?e.text:"",[i]),G=t.useCallback(e=>{var s;(s=e.item)!=null&&s.text&&(e.item.data.id==="copy"&&!n.isDeleted?M():e.item.data.id==="reply"&&E(n),S&&S(e.item.data,e,n)),q(!1),F(!1)},[n,S,E,M]),J=t.useCallback(()=>{if(n.replyToId){const e=c.getMessageById(j,n.replyToId);if(e){const s=a=>{a.preventDefault(),a.stopPropagation();const T=h==null?void 0:h.current;c.scrollToMessageById(e.id,T)};return t.createElement("div",{className:g.classNames("k-message-reference",c.isAuthor(p,e)?"k-message-reference-sender":"k-message-reference-receiver"),onClick:s},t.createElement("div",{className:"k-message-reference-content"},c.convertTextToLinkedContent(v(e,c.isAuthor(p,e)))))}}return null},[n.replyToId,j,p,v,h]),P=t.useCallback(()=>{const e=[{id:"reply",label:"Reply",svgIcon:f.undoIcon},{id:"copy",label:"Copy",svgIcon:f.copyIcon}],s=y?[...e.map(a=>y.find(me=>me.id===a.id)||a),...y.filter(a=>!e.some(T=>T.id===a.id))]:e;return t.createElement(ee.ContextMenu,{onSelect:G,onClose:Y,vertical:!0,show:W,offset:X.current},s.map(a=>a.id==="delete"&&!x?null:t.createElement(ee.MenuItem,{key:a.id,text:a.label,icon:a.icon,svgIcon:a.svgIcon,data:a})))},[y,G,Y,W,x]),Q=t.useCallback(()=>n.files&&n.files.length>1?t.createElement("div",{className:"k-chat-download-button-wrapper"},t.createElement(Z.Button,{className:"k-chat-download-button",fillMode:"flat",themeColor:"base",svgIcon:f.downloadIcon,onClick:e=>{e.stopPropagation(),m&&m(n.files,n)},"aria-label":i.toLanguageString(l.downloadAllFiles,l.messages[l.downloadAllFiles])},t.createElement("span",{className:"k-button-text"},i.toLanguageString(l.downloadAll,l.messages[l.downloadAll])))):null,[n,m,i]),ce=t.useCallback(()=>{if(n.typing)return t.createElement("div",{className:"k-chat-bubble k-bubble"},t.createElement("div",{className:"k-bubble-content"},t.createElement("div",{className:"k-typing-indicator"},t.createElement("span",null),t.createElement("span",null),t.createElement("span",null))));if(d){const e=d;return t.createElement(t.Fragment,null,t.createElement(e,{item:n}),P())}else if(n.text||n.files&&n.files.length>0)return t.createElement(t.Fragment,null,t.createElement("div",{className:g.classNames("k-chat-bubble","k-bubble",{"k-bubble-expandable":k,"k-expanded":k&&w,"k-selected":o,"k-active":_}),onClick:()=>b(o?void 0:n.selectionIndex),onContextMenu:O},t.createElement("div",{className:"k-bubble-content"},D?t.createElement(D,{item:n}):t.createElement(t.Fragment,null,(n.text||n.isDeleted||n.replyToId)&&t.createElement("span",{className:"k-chat-bubble-text"},!n.isDeleted&&J(),c.convertTextToLinkedContent(v(n,c.isAuthor(p,n)))),n.files&&n.files.length>0&&t.createElement(ge,{files:n.files,message:n,onFileAction:K,onDownload:e=>m==null?void 0:m(e,n),renderInTextarea:!1,fileActions:B}),Q())),k&&t.createElement("span",{className:"k-bubble-expandable-indicator",onClick:L,role:"button","aria-label":w?i.toLanguageString(l.collapseMessage,l.messages[l.collapseMessage]):i.toLanguageString(l.expandMessage,l.messages[l.expandMessage]),tabIndex:0,onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),L(e))}},t.createElement(g.IconWrap,{icon:w?f.chevronUpIcon:f.chevronDownIcon,size:"medium"}))),P());return null},[n,d,D,k,w,o,_,b,O,J,v,p,K,B,Q,L,i,P,m]),re=t.useCallback(()=>{let e=null;if(n.timestamp){const s=R==="onFocus"&&o;R==="hidden"||(e=t.createElement("time",{className:"k-message-time","aria-hidden":!s},U.formatDate(n.timestamp,z)))}return e},[n.timestamp,o,z,R,U]),ie=t.useCallback(()=>{let e=null;return n.status&&o&&(A?e=t.createElement(A,{item:n}):e=t.createElement("span",{className:"k-message-status"},t.createElement(g.IconWrap,{icon:f.checkCircleIcon,size:"xsmall"}),n.status)),e},[n,o,A]),ue=t.useCallback(()=>g.classNames({"k-focus":o,"k-message-removed":n.isDeleted},"k-message"),[o,n.isDeleted]),de=t.useCallback(()=>C&&C.length>0&&t.createElement("div",{className:"k-chat-message-toolbar k-toolbar k-toolbar-md k-toolbar-flat"},C.map(e=>e.id==="delete"&&!x?null:t.createElement(Z.Button,{key:e.id,fillMode:"flat",className:"k-toolbar-button",themeColor:"base",icon:e.icon,svgIcon:e.svgIcon,onClick:s=>{s.stopPropagation(),e.id==="copy"&&!n.isDeleted?M():e.id==="reply"&&E(n),N&&N(e,s,n)},onMouseDown:s=>s.preventDefault()}))),[M,x,n,C,N,E]);return t.createElement("div",{"data-message-id":n.id,className:ue(),tabIndex:ne,onMouseDown:le,onKeyDown:oe,onFocus:e=>{ae&&b(n.selectionIndex)},ref:e=>{V.current=e,typeof r=="function"?r(e):r&&(r.current=e)},onContextMenu:d?O:void 0},re(),ce(),ie(),de())});te.displayName="ChatMessage";exports.ChatMessage=te;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ce=require("react"),f=require("@progress/kendo-react-common"),D=require("@progress/kendo-react-buttons"),p=require("@progress/kendo-svg-icons"),ae=require("@progress/kendo-react-intl"),ne=require("@progress/kendo-react-layout"),i=require("../utils.js"),ye=require("./ChatContext.js"),Ee=require("./elements/FileBox.js"),l=require("../../messages/index.js");function xe(d){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const e in d)if(e!=="default"){const m=Object.getOwnPropertyDescriptor(d,e);Object.defineProperty(r,e,m.get?m:{enumerable:!0,get:()=>d[e]})}}return r.default=d,Object.freeze(r)}const s=xe(Ce),le=s.forwardRef((d,r)=>{const{item:e,template:m,contentTemplate:F,onRequestSelection:C,tabIndex:oe=-1,dateFormat:_="g",selected:c,allowMessageCollapse:y,messageToolbarActions:E,messageContextMenuActions:x,fileActions:H,isSender:I}=d,{setReplyToMessage:w,messages:U,user:b,internalScrollContainerRef:h,onToolbarAction:A,onContextMenuAction:R,onFileAction:X,onDownload:g,onResendMessage:L,setShowCopyNotification:M,statusTemplate:q,timestampVisibility:v="onFocus"}=ye.useChatContext(),[Y,O]=s.useState(!1),[G,V]=s.useState(!1),[T,ce]=s.useState(!0),[ie,J]=s.useState(!1),o=ae.useLocalization(),Q=ae.useInternationalization(),Z=s.useRef({left:0,top:0}),N=s.useCallback(()=>{e!=null&&e.text&&i.copyToClipboard(e.text),M&&(M(!0),setTimeout(()=>{M(!1)},3e3))},[e,M]),z=s.useCallback(t=>{t.stopPropagation(),ce(a=>!a)},[]),re=s.useCallback(()=>{J(!1)},[]),ue=s.useCallback(t=>{(t.key==="Tab"||t.key==="Enter"||t.key===" "||t.key==="ArrowUp"||t.key==="ArrowDown")&&J(!0)},[]),j=s.useRef(null);s.useEffect(()=>{c&&j.current&&j.current.focus()},[c]);const B=s.useCallback(t=>{Z.current={left:t.pageX,top:t.pageY},t.preventDefault(),V(!0),O(!0)},[]),$=s.useCallback(()=>{V(!1),O(!1)},[]),S=s.useCallback((t,a)=>t.isDeleted?i.getDeletedMessageText(a,o):t.text?t.text:"",[o]),ee=s.useCallback(t=>{var a;(a=t.item)!=null&&a.text&&(t.item.data.id==="copy"&&!e.isDeleted?N():t.item.data.id==="reply"&&w(e),R&&R(t.item.data,t,e)),V(!1),O(!1)},[e,R,w,N]),te=s.useCallback(()=>{if(e.replyToId){const t=i.getMessageById(U,e.replyToId);if(t){const a=n=>{n.preventDefault(),n.stopPropagation();const u=h==null?void 0:h.current;i.scrollToMessageById(t.id,u)};return s.createElement("div",{className:f.classNames("k-message-reference",i.isAuthor(b,t)?"k-message-reference-sender":"k-message-reference-receiver"),onClick:a},s.createElement("div",{className:"k-message-reference-content"},i.convertTextToLinkedContent(S(t,i.isAuthor(b,t)))))}}return null},[e.replyToId,U,b,S,h]),P=s.useCallback(()=>{const t=[{id:"reply",label:"Reply",svgIcon:p.undoIcon},{id:"copy",label:"Copy",svgIcon:p.copyIcon}],a=x?[...t.map(n=>x.find(k=>k.id===n.id)||n),...x.filter(n=>!t.some(u=>u.id===n.id))]:t;return s.createElement(ne.ContextMenu,{onSelect:ee,onClose:$,vertical:!0,show:Y,offset:Z.current},a.map(n=>n.id==="delete"&&!I?null:s.createElement(ne.MenuItem,{key:n.id,text:n.label,icon:n.icon,svgIcon:n.svgIcon,data:n})))},[x,ee,$,Y,I]),se=s.useCallback(()=>e.files&&e.files.length>1?s.createElement("div",{className:"k-chat-download-button-wrapper"},s.createElement(D.Button,{className:"k-chat-download-button",fillMode:"flat",svgIcon:p.downloadLightIcon,size:"small",onClick:t=>{t.stopPropagation(),g&&g(e.files,e)},"aria-label":o.toLanguageString(l.downloadAllFiles,l.messages[l.downloadAllFiles])},s.createElement("span",{className:"k-button-text"},o.toLanguageString(l.downloadAll,l.messages[l.downloadAll])))):null,[e,g,o]),de=s.useCallback(()=>{if(e.typing)return s.createElement("div",{className:"k-chat-bubble k-bubble"},s.createElement("div",{className:"k-bubble-content"},s.createElement("div",{className:"k-typing-indicator"},s.createElement("span",null),s.createElement("span",null),s.createElement("span",null))));if(m){const t=m;return s.createElement(s.Fragment,null,s.createElement(t,{item:e}),P())}else if(e.text||e.files&&e.files.length>0)return s.createElement(s.Fragment,null,s.createElement("div",{className:f.classNames("k-chat-bubble","k-bubble",{"k-bubble-expandable":y,"k-expanded":y&&T,"k-selected":c,"k-active":G}),onClick:()=>C(c?void 0:e.selectionIndex),onContextMenu:B},s.createElement("div",{className:"k-bubble-content"},F?s.createElement(F,{item:e}):s.createElement(s.Fragment,null,(e.text||e.isDeleted||e.replyToId)&&s.createElement("span",{className:"k-chat-bubble-text"},!e.isDeleted&&te(),i.convertTextToLinkedContent(S(e,i.isAuthor(b,e)))),e.files&&e.files.length>0&&s.createElement(Ee,{files:e.files,message:e,onFileAction:X,onDownload:t=>g==null?void 0:g(t,e),renderInTextarea:!1,fileActions:H}),se())),y&&s.createElement("span",{className:"k-bubble-expandable-indicator",onClick:z,role:"button","aria-label":T?o.toLanguageString(l.collapseMessage,l.messages[l.collapseMessage]):o.toLanguageString(l.expandMessage,l.messages[l.expandMessage]),tabIndex:0,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),z(t))}},s.createElement(f.IconWrap,{icon:T?p.chevronUpIcon:p.chevronDownIcon,size:"medium"}))),P());return null},[e,m,F,y,T,c,G,C,B,te,S,b,X,H,se,z,o,P,g]),me=s.useCallback(()=>{let t=null;if(e.timestamp){const a=v==="onFocus"&&c;v==="hidden"||(t=s.createElement("time",{className:"k-message-time","aria-hidden":!a},Q.formatDate(e.timestamp,_)))}return t},[e.timestamp,c,_,v,Q]),ge=s.useCallback(()=>{if(!e.status)return null;let t;if(q)t=s.createElement(q,{item:e});else{const a=typeof e.status=="object"&&e.status!==null;let n,u,k;if(a){const W=e.status;n=W.text,u=W.icon,k=W.svgIcon}else n=e.status;let K=null;u?K=s.createElement(f.Icon,{name:u,size:"xsmall"}):k&&(K=s.createElement(f.IconWrap,{icon:k,size:"xsmall"})),t=s.createElement(s.Fragment,null,K,n)}return s.createElement("span",{className:"k-message-status"},t)},[e,q]),fe=s.useCallback(()=>{let t=null;if(e.isFailed){const a=o.toLanguageString(l.messageFailed,l.messages[l.messageFailed]);t=s.createElement("span",{className:"k-message-failed-content"},s.createElement(f.IconWrap,{icon:p.warningTriangleIcon,size:"xsmall"}),s.createElement("span",{className:"k-message-failed-text"},a))}return t},[e,o]),pe=s.useCallback(()=>{let t=null;if(e.isFailed){const a=o.toLanguageString(l.retryMessage,l.messages[l.retryMessage]);t=s.createElement(D.Button,{fillMode:"clear",size:"small",className:"k-resend-button",svgIcon:p.arrowRotateCwOutlineIcon,"aria-label":a,title:a,onClick:n=>{n.stopPropagation(),L&&L({message:e,syntheticEvent:n,nativeEvent:n.nativeEvent,target:n.target})}})}return t},[e,o,L]),be=s.useCallback(()=>f.classNames({"k-focus":c,"k-message-removed":e.isDeleted,"k-message-failed":e.isFailed},"k-message"),[c,e.isDeleted,e.isFailed]),ke=s.useCallback(()=>E&&E.length>0&&s.createElement(D.Toolbar,{className:"k-chat-message-toolbar",fillMode:"flat"},E.map(t=>t.id==="delete"&&!I?null:s.createElement(D.Button,{key:t.id,fillMode:"flat",className:"k-toolbar-button",icon:t.icon,svgIcon:t.svgIcon,onClick:a=>{a.stopPropagation(),t.id==="copy"&&!e.isDeleted?N():t.id==="reply"&&w(e),A&&A(t,a,e)},onMouseDown:a=>a.preventDefault()}))),[N,I,e,E,A,w]);return s.createElement("div",{"data-message-id":e.id,className:be(),tabIndex:oe,onMouseDown:re,onKeyDown:ue,onFocus:t=>{ie&&C(e.selectionIndex)},ref:t=>{j.current=t,typeof r=="function"?r(t):r&&(r.current=t)},onContextMenu:m?B:void 0},pe(),de(),(e.status||e.timestamp&&v!=="hidden"||e.isFailed)&&s.createElement("div",{className:"k-message-info"},ge(),me(),fe()),ke())});le.displayName="ChatMessage";exports.ChatMessage=le;
@@ -6,275 +6,335 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as t from "react";
9
- import { classNames as L, IconWrap as J } from "@progress/kendo-react-common";
10
- import { Button as Q } from "@progress/kendo-react-buttons";
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
- import { useLocalization as xe, useInternationalization as he } from "@progress/kendo-react-intl";
13
- import { ContextMenu as Ie, MenuItem as we } from "@progress/kendo-react-layout";
14
- import { copyToClipboard as Me, getDeletedMessageText as ve, getMessageById as Te, isAuthor as z, convertTextToLinkedContent as Z, scrollToMessageById as De } from "../utils.mjs";
15
- import { useChatContext as Ne } from "./ChatContext.mjs";
16
- import Ae from "./elements/FileBox.mjs";
17
- import { downloadAllFiles as _, messages as I, downloadAll as ee, collapseMessage as te, expandMessage as ne } from "../../messages/index.mjs";
18
- const Se = t.forwardRef(
19
- (ae, i) => {
9
+ import { classNames as O, IconWrap as P, Icon as Ie } from "@progress/kendo-react-common";
10
+ import { Button as j, Toolbar as we } from "@progress/kendo-react-buttons";
11
+ import { undoIcon as he, copyIcon as ve, downloadLightIcon as Me, chevronUpIcon as Te, chevronDownIcon as Ne, warningTriangleIcon as De, arrowRotateCwOutlineIcon as Se } from "@progress/kendo-svg-icons";
12
+ import { useLocalization as Fe, useInternationalization as Ae } from "@progress/kendo-react-intl";
13
+ import { ContextMenu as Re, MenuItem as Ve } from "@progress/kendo-react-layout";
14
+ import { copyToClipboard as Le, getDeletedMessageText as ze, getMessageById as Be, isAuthor as W, convertTextToLinkedContent as ae, scrollToMessageById as Ke } from "../utils.mjs";
15
+ import { useChatContext as Oe } from "./ChatContext.mjs";
16
+ import Pe from "./elements/FileBox.mjs";
17
+ import { downloadAllFiles as se, messages as c, downloadAll as ne, collapseMessage as le, expandMessage as oe, messageFailed as ie, retryMessage as re } from "../../messages/index.mjs";
18
+ const je = t.forwardRef(
19
+ (ce, d) => {
20
20
  const {
21
- item: n,
22
- template: u,
23
- contentTemplate: w,
24
- onRequestSelection: m,
25
- tabIndex: se = -1,
26
- dateFormat: K = "g",
27
- selected: l,
28
- allowMessageCollapse: d,
29
- messageToolbarActions: f,
30
- messageContextMenuActions: p,
31
- fileActions: B,
32
- isSender: b
33
- } = ae, {
34
- setReplyToMessage: g,
35
- messages: P,
36
- user: c,
37
- internalScrollContainerRef: k,
38
- onToolbarAction: M,
39
- onContextMenuAction: v,
40
- onFileAction: W,
21
+ item: a,
22
+ template: f,
23
+ contentTemplate: M,
24
+ onRequestSelection: g,
25
+ tabIndex: ue = -1,
26
+ dateFormat: H = "g",
27
+ selected: o,
28
+ allowMessageCollapse: p,
29
+ messageToolbarActions: b,
30
+ messageContextMenuActions: k,
31
+ fileActions: U,
32
+ isSender: C
33
+ } = ce, {
34
+ setReplyToMessage: E,
35
+ messages: q,
36
+ user: u,
37
+ internalScrollContainerRef: x,
38
+ onToolbarAction: T,
39
+ onContextMenuAction: N,
40
+ onFileAction: X,
41
41
  onDownload: r,
42
- setShowCopyNotification: C,
43
- statusTemplate: T,
44
- timestampVisibility: D = "onFocus"
45
- } = Ne(), [H, N] = t.useState(!1), [O, A] = t.useState(!1), [y, le] = t.useState(!0), [oe, U] = t.useState(!1), o = xe(), q = he(), X = t.useRef({ left: 0, top: 0 }), E = t.useCallback(() => {
46
- n != null && n.text && Me(n.text), C && (C(!0), setTimeout(() => {
47
- C(!1);
42
+ onResendMessage: D,
43
+ setShowCopyNotification: y,
44
+ statusTemplate: S,
45
+ timestampVisibility: I = "onFocus"
46
+ } = Oe(), [Y, F] = t.useState(!1), [$, A] = t.useState(!1), [w, me] = t.useState(!0), [de, G] = t.useState(!1), l = Fe(), J = Ae(), Q = t.useRef({ left: 0, top: 0 }), h = t.useCallback(() => {
47
+ a != null && a.text && Le(a.text), y && (y(!0), setTimeout(() => {
48
+ y(!1);
48
49
  }, 3e3));
49
- }, [n, C]), S = t.useCallback((e) => {
50
- e.stopPropagation(), le((a) => !a);
51
- }, []), re = t.useCallback(() => {
52
- U(!1);
53
- }, []), ce = t.useCallback((e) => {
54
- (e.key === "Tab" || e.key === "Enter" || e.key === " " || e.key === "ArrowUp" || e.key === "ArrowDown") && U(!0);
55
- }, []), F = t.useRef(null);
50
+ }, [a, y]), R = t.useCallback((e) => {
51
+ e.stopPropagation(), me((s) => !s);
52
+ }, []), fe = t.useCallback(() => {
53
+ G(!1);
54
+ }, []), ge = t.useCallback((e) => {
55
+ (e.key === "Tab" || e.key === "Enter" || e.key === " " || e.key === "ArrowUp" || e.key === "ArrowDown") && G(!0);
56
+ }, []), V = t.useRef(null);
56
57
  t.useEffect(() => {
57
- l && F.current && F.current.focus();
58
- }, [l]);
59
- const R = t.useCallback((e) => {
60
- X.current = { left: e.pageX, top: e.pageY }, e.preventDefault(), A(!0), N(!0);
61
- }, []), Y = t.useCallback(() => {
62
- A(!1), N(!1);
63
- }, []), x = t.useCallback(
64
- (e, a) => e.isDeleted ? ve(a, o) : e.text ? e.text : "",
65
- [o]
66
- ), $ = t.useCallback(
58
+ o && V.current && V.current.focus();
59
+ }, [o]);
60
+ const L = t.useCallback((e) => {
61
+ Q.current = { left: e.pageX, top: e.pageY }, e.preventDefault(), A(!0), F(!0);
62
+ }, []), Z = t.useCallback(() => {
63
+ A(!1), F(!1);
64
+ }, []), v = t.useCallback(
65
+ (e, s) => e.isDeleted ? ze(s, l) : e.text ? e.text : "",
66
+ [l]
67
+ ), _ = t.useCallback(
67
68
  (e) => {
68
- var a;
69
- (a = e.item) != null && a.text && (e.item.data.id === "copy" && !n.isDeleted ? E() : e.item.data.id === "reply" && g(n), v && v(e.item.data, e, n)), A(!1), N(!1);
69
+ var s;
70
+ (s = e.item) != null && s.text && (e.item.data.id === "copy" && !a.isDeleted ? h() : e.item.data.id === "reply" && E(a), N && N(e.item.data, e, a)), A(!1), F(!1);
70
71
  },
71
- [n, v, g, E]
72
- ), j = t.useCallback(() => {
73
- if (n.replyToId) {
74
- const e = Te(P, n.replyToId);
72
+ [a, N, E, h]
73
+ ), ee = t.useCallback(() => {
74
+ if (a.replyToId) {
75
+ const e = Be(q, a.replyToId);
75
76
  if (e) {
76
- const a = (s) => {
77
- s.preventDefault(), s.stopPropagation();
78
- const h = k == null ? void 0 : k.current;
79
- De(e.id, h);
77
+ const s = (n) => {
78
+ n.preventDefault(), n.stopPropagation();
79
+ const i = x == null ? void 0 : x.current;
80
+ Ke(e.id, i);
80
81
  };
81
82
  return /* @__PURE__ */ t.createElement(
82
83
  "div",
83
84
  {
84
- className: L(
85
+ className: O(
85
86
  "k-message-reference",
86
- z(c, e) ? "k-message-reference-sender" : "k-message-reference-receiver"
87
+ W(u, e) ? "k-message-reference-sender" : "k-message-reference-receiver"
87
88
  ),
88
- onClick: a
89
+ onClick: s
89
90
  },
90
- /* @__PURE__ */ t.createElement("div", { className: "k-message-reference-content" }, Z(
91
- x(e, z(c, e))
91
+ /* @__PURE__ */ t.createElement("div", { className: "k-message-reference-content" }, ae(
92
+ v(e, W(u, e))
92
93
  ))
93
94
  );
94
95
  }
95
96
  }
96
97
  return null;
97
- }, [n.replyToId, P, c, x, k]), V = t.useCallback(() => {
98
+ }, [a.replyToId, q, u, v, x]), z = t.useCallback(() => {
98
99
  const e = [
99
100
  {
100
101
  id: "reply",
101
102
  label: "Reply",
102
- svgIcon: be
103
+ svgIcon: he
103
104
  },
104
105
  {
105
106
  id: "copy",
106
107
  label: "Copy",
107
- svgIcon: ge
108
+ svgIcon: ve
108
109
  }
109
- ], a = p ? [
110
- ...e.map((s) => p.find(
111
- (pe) => pe.id === s.id
112
- ) || s),
113
- ...p.filter(
114
- (s) => !e.some((h) => h.id === s.id)
110
+ ], s = k ? [
111
+ ...e.map((n) => k.find(
112
+ (m) => m.id === n.id
113
+ ) || n),
114
+ ...k.filter(
115
+ (n) => !e.some((i) => i.id === n.id)
115
116
  )
116
117
  ] : e;
117
118
  return /* @__PURE__ */ t.createElement(
118
- Ie,
119
+ Re,
119
120
  {
120
- onSelect: $,
121
- onClose: Y,
121
+ onSelect: _,
122
+ onClose: Z,
122
123
  vertical: !0,
123
- show: H,
124
- offset: X.current
124
+ show: Y,
125
+ offset: Q.current
125
126
  },
126
- a.map(
127
- (s) => s.id === "delete" && !b ? null : /* @__PURE__ */ t.createElement(
128
- we,
127
+ s.map(
128
+ (n) => n.id === "delete" && !C ? null : /* @__PURE__ */ t.createElement(
129
+ Ve,
129
130
  {
130
- key: s.id,
131
- text: s.label,
132
- icon: s.icon,
133
- svgIcon: s.svgIcon,
134
- data: s
131
+ key: n.id,
132
+ text: n.label,
133
+ icon: n.icon,
134
+ svgIcon: n.svgIcon,
135
+ data: n
135
136
  }
136
137
  )
137
138
  )
138
139
  );
139
- }, [p, $, Y, H, b]), G = t.useCallback(() => n.files && n.files.length > 1 ? /* @__PURE__ */ t.createElement("div", { className: "k-chat-download-button-wrapper" }, /* @__PURE__ */ t.createElement(
140
- Q,
140
+ }, [k, _, Z, Y, C]), te = t.useCallback(() => a.files && a.files.length > 1 ? /* @__PURE__ */ t.createElement("div", { className: "k-chat-download-button-wrapper" }, /* @__PURE__ */ t.createElement(
141
+ j,
141
142
  {
142
143
  className: "k-chat-download-button",
143
144
  fillMode: "flat",
144
- themeColor: "base",
145
- svgIcon: ke,
145
+ svgIcon: Me,
146
+ size: "small",
146
147
  onClick: (e) => {
147
- e.stopPropagation(), r && r(n.files, n);
148
+ e.stopPropagation(), r && r(a.files, a);
148
149
  },
149
- "aria-label": o.toLanguageString(
150
- _,
151
- I[_]
150
+ "aria-label": l.toLanguageString(
151
+ se,
152
+ c[se]
152
153
  )
153
154
  },
154
- /* @__PURE__ */ t.createElement("span", { className: "k-button-text" }, o.toLanguageString(ee, I[ee]))
155
- )) : null, [n, r, o]), ie = t.useCallback(() => {
156
- if (n.typing)
155
+ /* @__PURE__ */ t.createElement("span", { className: "k-button-text" }, l.toLanguageString(ne, c[ne]))
156
+ )) : null, [a, r, l]), pe = t.useCallback(() => {
157
+ if (a.typing)
157
158
  return /* @__PURE__ */ t.createElement("div", { className: "k-chat-bubble k-bubble" }, /* @__PURE__ */ t.createElement("div", { className: "k-bubble-content" }, /* @__PURE__ */ t.createElement("div", { className: "k-typing-indicator" }, /* @__PURE__ */ t.createElement("span", null), /* @__PURE__ */ t.createElement("span", null), /* @__PURE__ */ t.createElement("span", null))));
158
- if (u) {
159
- const e = u;
160
- return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(e, { item: n }), V());
161
- } else if (n.text || n.files && n.files.length > 0)
159
+ if (f) {
160
+ const e = f;
161
+ return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(e, { item: a }), z());
162
+ } else if (a.text || a.files && a.files.length > 0)
162
163
  return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
163
164
  "div",
164
165
  {
165
- className: L("k-chat-bubble", "k-bubble", {
166
- "k-bubble-expandable": d,
167
- "k-expanded": d && y,
168
- "k-selected": l,
169
- "k-active": O
166
+ className: O("k-chat-bubble", "k-bubble", {
167
+ "k-bubble-expandable": p,
168
+ "k-expanded": p && w,
169
+ "k-selected": o,
170
+ "k-active": $
170
171
  }),
171
- onClick: () => m(l ? void 0 : n.selectionIndex),
172
- onContextMenu: R
172
+ onClick: () => g(o ? void 0 : a.selectionIndex),
173
+ onContextMenu: L
173
174
  },
174
- /* @__PURE__ */ t.createElement("div", { className: "k-bubble-content" }, w ? /* @__PURE__ */ t.createElement(w, { item: n }) : /* @__PURE__ */ t.createElement(t.Fragment, null, (n.text || n.isDeleted || n.replyToId) && /* @__PURE__ */ t.createElement("span", { className: "k-chat-bubble-text" }, !n.isDeleted && j(), Z(
175
- x(n, z(c, n))
176
- )), n.files && n.files.length > 0 && /* @__PURE__ */ t.createElement(
177
- Ae,
175
+ /* @__PURE__ */ t.createElement("div", { className: "k-bubble-content" }, M ? /* @__PURE__ */ t.createElement(M, { item: a }) : /* @__PURE__ */ t.createElement(t.Fragment, null, (a.text || a.isDeleted || a.replyToId) && /* @__PURE__ */ t.createElement("span", { className: "k-chat-bubble-text" }, !a.isDeleted && ee(), ae(
176
+ v(a, W(u, a))
177
+ )), a.files && a.files.length > 0 && /* @__PURE__ */ t.createElement(
178
+ Pe,
178
179
  {
179
- files: n.files,
180
- message: n,
181
- onFileAction: W,
182
- onDownload: (e) => r == null ? void 0 : r(e, n),
180
+ files: a.files,
181
+ message: a,
182
+ onFileAction: X,
183
+ onDownload: (e) => r == null ? void 0 : r(e, a),
183
184
  renderInTextarea: !1,
184
- fileActions: B
185
+ fileActions: U
185
186
  }
186
- ), G())),
187
- d && /* @__PURE__ */ t.createElement(
187
+ ), te())),
188
+ p && /* @__PURE__ */ t.createElement(
188
189
  "span",
189
190
  {
190
191
  className: "k-bubble-expandable-indicator",
191
- onClick: S,
192
+ onClick: R,
192
193
  role: "button",
193
- "aria-label": y ? o.toLanguageString(
194
- te,
195
- I[te]
196
- ) : o.toLanguageString(
197
- ne,
198
- I[ne]
194
+ "aria-label": w ? l.toLanguageString(
195
+ le,
196
+ c[le]
197
+ ) : l.toLanguageString(
198
+ oe,
199
+ c[oe]
199
200
  ),
200
201
  tabIndex: 0,
201
202
  onKeyDown: (e) => {
202
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), S(e));
203
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), R(e));
203
204
  }
204
205
  },
205
- /* @__PURE__ */ t.createElement(J, { icon: y ? Ce : ye, size: "medium" })
206
+ /* @__PURE__ */ t.createElement(P, { icon: w ? Te : Ne, size: "medium" })
206
207
  )
207
- ), V());
208
+ ), z());
208
209
  return null;
209
210
  }, [
210
- n,
211
- u,
211
+ a,
212
+ f,
213
+ M,
214
+ p,
212
215
  w,
213
- d,
214
- y,
215
- l,
216
- O,
217
- m,
218
- R,
219
- j,
220
- x,
221
- c,
222
- W,
223
- B,
224
- G,
225
- S,
226
216
  o,
227
- V,
217
+ $,
218
+ g,
219
+ L,
220
+ ee,
221
+ v,
222
+ u,
223
+ X,
224
+ U,
225
+ te,
226
+ R,
227
+ l,
228
+ z,
228
229
  r
229
- ]), ue = t.useCallback(() => {
230
+ ]), be = t.useCallback(() => {
230
231
  let e = null;
231
- if (n.timestamp) {
232
- const a = D === "onFocus" && l;
233
- D === "hidden" || (e = /* @__PURE__ */ t.createElement("time", { className: "k-message-time", "aria-hidden": !a }, q.formatDate(n.timestamp, K)));
232
+ if (a.timestamp) {
233
+ const s = I === "onFocus" && o;
234
+ I === "hidden" || (e = /* @__PURE__ */ t.createElement("time", { className: "k-message-time", "aria-hidden": !s }, J.formatDate(a.timestamp, H)));
234
235
  }
235
236
  return e;
236
- }, [n.timestamp, l, K, D, q]), me = t.useCallback(() => {
237
+ }, [a.timestamp, o, H, I, J]), ke = t.useCallback(() => {
238
+ if (!a.status)
239
+ return null;
240
+ let e;
241
+ if (S)
242
+ e = t.createElement(S, { item: a });
243
+ else {
244
+ const s = typeof a.status == "object" && a.status !== null;
245
+ let n, i, m;
246
+ if (s) {
247
+ const K = a.status;
248
+ n = K.text, i = K.icon, m = K.svgIcon;
249
+ } else
250
+ n = a.status;
251
+ let B = null;
252
+ i ? B = /* @__PURE__ */ t.createElement(Ie, { name: i, size: "xsmall" }) : m && (B = /* @__PURE__ */ t.createElement(P, { icon: m, size: "xsmall" })), e = /* @__PURE__ */ t.createElement(t.Fragment, null, B, n);
253
+ }
254
+ return /* @__PURE__ */ t.createElement("span", { className: "k-message-status" }, e);
255
+ }, [a, S]), Ce = t.useCallback(() => {
237
256
  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: Ee, size: "xsmall" }), n.status)), e;
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
- Q,
257
+ if (a.isFailed) {
258
+ const s = l.toLanguageString(
259
+ ie,
260
+ c[ie]
261
+ );
262
+ e = /* @__PURE__ */ t.createElement("span", { className: "k-message-failed-content" }, /* @__PURE__ */ t.createElement(P, { icon: De, size: "xsmall" }), /* @__PURE__ */ t.createElement("span", { className: "k-message-failed-text" }, s));
263
+ }
264
+ return e;
265
+ }, [a, l]), Ee = t.useCallback(() => {
266
+ let e = null;
267
+ if (a.isFailed) {
268
+ const s = l.toLanguageString(
269
+ re,
270
+ c[re]
271
+ );
272
+ e = /* @__PURE__ */ t.createElement(
273
+ j,
274
+ {
275
+ fillMode: "clear",
276
+ size: "small",
277
+ className: "k-resend-button",
278
+ svgIcon: Se,
279
+ "aria-label": s,
280
+ title: s,
281
+ onClick: (n) => {
282
+ n.stopPropagation(), D && D({
283
+ message: a,
284
+ syntheticEvent: n,
285
+ nativeEvent: n.nativeEvent,
286
+ target: n.target
287
+ });
288
+ }
289
+ }
290
+ );
291
+ }
292
+ return e;
293
+ }, [a, l, D]), xe = t.useCallback(() => O(
294
+ {
295
+ "k-focus": o,
296
+ "k-message-removed": a.isDeleted,
297
+ "k-message-failed": a.isFailed
298
+ },
299
+ "k-message"
300
+ ), [o, a.isDeleted, a.isFailed]), ye = t.useCallback(() => b && b.length > 0 && /* @__PURE__ */ t.createElement(we, { className: "k-chat-message-toolbar", fillMode: "flat" }, b.map((e) => e.id === "delete" && !C ? null : /* @__PURE__ */ t.createElement(
301
+ j,
241
302
  {
242
303
  key: e.id,
243
304
  fillMode: "flat",
244
305
  className: "k-toolbar-button",
245
- themeColor: "base",
246
306
  icon: e.icon,
247
307
  svgIcon: e.svgIcon,
248
- onClick: (a) => {
249
- a.stopPropagation(), e.id === "copy" && !n.isDeleted ? E() : e.id === "reply" && g(n), M && M(e, a, n);
308
+ onClick: (s) => {
309
+ s.stopPropagation(), e.id === "copy" && !a.isDeleted ? h() : e.id === "reply" && E(a), T && T(e, s, a);
250
310
  },
251
- onMouseDown: (a) => a.preventDefault()
311
+ onMouseDown: (s) => s.preventDefault()
252
312
  }
253
- ))), [E, b, n, f, M, g]);
313
+ ))), [h, C, a, b, T, E]);
254
314
  return /* @__PURE__ */ t.createElement(
255
315
  "div",
256
316
  {
257
- "data-message-id": n.id,
258
- className: de(),
259
- tabIndex: se,
260
- onMouseDown: re,
261
- onKeyDown: ce,
317
+ "data-message-id": a.id,
318
+ className: xe(),
319
+ tabIndex: ue,
320
+ onMouseDown: fe,
321
+ onKeyDown: ge,
262
322
  onFocus: (e) => {
263
- oe && m(n.selectionIndex);
323
+ de && g(a.selectionIndex);
264
324
  },
265
325
  ref: (e) => {
266
- F.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
326
+ V.current = e, typeof d == "function" ? d(e) : d && (d.current = e);
267
327
  },
268
- onContextMenu: u ? R : void 0
328
+ onContextMenu: f ? L : void 0
269
329
  },
270
- ue(),
271
- ie(),
272
- me(),
273
- fe()
330
+ Ee(),
331
+ pe(),
332
+ (a.status || a.timestamp && I !== "hidden" || a.isFailed) && /* @__PURE__ */ t.createElement("div", { className: "k-message-info" }, ke(), be(), Ce()),
333
+ ye()
274
334
  );
275
335
  }
276
336
  );
277
- Se.displayName = "ChatMessage";
337
+ je.displayName = "ChatMessage";
278
338
  export {
279
- Se as ChatMessage
339
+ je as ChatMessage
280
340
  };
@@ -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";const n=require("@progress/kendo-react-layout"),o=require("react");function a(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=a(o),s=e=>i.createElement(n.AppBar,{className:"k-chat-header",positionMode:"sticky",themeColor:"inherit"},e.children);module.exports=s;
8
+ "use strict";const n=require("react"),a=require("@progress/kendo-react-buttons");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const s=o(n),u=e=>s.createElement(a.Toolbar,{className:"k-chat-header"},e.children);module.exports=u;
@@ -5,9 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { AppBar as t } from "@progress/kendo-react-layout";
9
- import * as r from "react";
10
- const o = (e) => /* @__PURE__ */ r.createElement(t, { className: "k-chat-header", positionMode: "sticky", themeColor: "inherit" }, e.children);
8
+ import * as a from "react";
9
+ import { Toolbar as r } from "@progress/kendo-react-buttons";
10
+ const o = (e) => /* @__PURE__ */ a.createElement(r, { className: "k-chat-header" }, e.children);
11
11
  export {
12
12
  o as default
13
13
  };