@progress/kendo-react-conversational-ui 12.3.0-develop.1 → 12.3.0-develop.10
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/chat/components/ActionGroup.js +1 -1
- package/chat/components/ActionGroup.mjs +55 -34
- package/chat/components/Attachment.js +1 -1
- package/chat/components/Attachment.mjs +16 -9
- package/chat/components/Chat.js +1 -1
- package/chat/components/Chat.mjs +359 -278
- package/chat/components/ChatMessage.js +1 -1
- package/chat/components/ChatMessage.mjs +159 -147
- package/chat/components/Header.js +1 -1
- package/chat/components/Header.mjs +1 -1
- package/chat/components/MessageGroup.js +1 -1
- package/chat/components/MessageGroup.mjs +82 -61
- package/chat/components/NewMessage.js +1 -1
- package/chat/components/NewMessage.mjs +63 -59
- package/chat/components/ScrollButtonsWrapper.js +8 -0
- package/chat/components/ScrollButtonsWrapper.mjs +58 -0
- package/chat/components/SuggestionsGroup.js +1 -1
- package/chat/components/SuggestionsGroup.mjs +58 -18
- package/chat/components/elements/FileBox.js +1 -1
- package/chat/components/elements/FileBox.mjs +31 -37
- package/chat/components/elements/PinnedMessage.js +1 -1
- package/chat/components/elements/PinnedMessage.mjs +5 -4
- package/chat/hooks/useScrollWithButtons.js +8 -0
- package/chat/hooks/useScrollWithButtons.mjs +46 -0
- package/chat/utils/fieldMapping.js +1 -1
- package/chat/utils/fieldMapping.mjs +1 -1
- package/chat/utils/messageSettings.js +8 -0
- package/chat/utils/messageSettings.mjs +31 -0
- package/dist/cdn/js/kendo-react-conversational-ui.js +1 -1
- package/index.d.mts +199 -5
- package/index.d.ts +199 -5
- package/messages/index.js +1 -1
- package/messages/index.mjs +26 -22
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +11 -11
|
@@ -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
|
|
8
|
+
"use strict";const D=require("react"),d=require("@progress/kendo-react-common"),E=require("./Action.js"),K=require("./ScrollButtonsWrapper.js"),L=require("../hooks/useScrollWithButtons.js");function O(c){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const r in c)if(r!=="default"){const u=Object.getOwnPropertyDescriptor(c,r);Object.defineProperty(e,r,u.get?u:{enumerable:!0,get:()=>c[r]})}}return e.default=c,Object.freeze(e)}const l=O(D),j=c=>{var S;const{group:e,onActionExecute:r,selected:u,onRequestSelection:g,quickActionsLayout:a="scroll",dir:p}=c,[t,i]=l.useState(null),b=l.useRef(null),{canScrollLeft:k,canScrollRight:C,scrollLeft:y,scrollRight:I}=L.useScrollWithButtons(b,{enabled:a==="scrollbuttons",dir:p,itemsDependency:e.actions});l.useEffect(()=>{!u&&t!==null?i(null):u&&t===null&&i(0)},[u,t]);const m=l.useCallback(()=>e.actions?e.actions.length-1:-1,[e.actions]),f=l.useCallback((n,s=0)=>{let o=null;return n?t===null?o=s:t<m()&&(o=t+1):t===null?o=0:t>0&&(o=t-1),o!==null&&i(o),o},[t,m]),R=l.useCallback(()=>{g(e.selectionIndex)},[g,e.selectionIndex]),x=l.useCallback(n=>{let s=null;const o=d.Keys.left,A=d.Keys.right;n.keyCode===o?s=f(!1):n.keyCode===A&&(s=f(!0)),s!==null&&(n.preventDefault(),n.stopPropagation())},[f]),q=l.useCallback(()=>d.classNames("k-suggestion-group",{"k-suggestion-group-scrollable":a==="scroll"}),[a]),h=l.createElement("div",{className:q(),onClick:R,onKeyDown:x,role:"toolbar",tabIndex:0,"aria-label":"Action group",ref:a==="scrollbuttons"?b:void 0},(S=e.actions)==null?void 0:S.map((n,s)=>l.createElement(E,{item:n,onActionExecute:r,selected:s===t,key:n.value})));return l.createElement(K.ScrollButtonsWrapper,{visible:a==="scrollbuttons",dir:p,canScrollLeft:k,canScrollRight:C,onScrollLeft:y,onScrollRight:I},h)};module.exports=j;
|
|
@@ -5,52 +5,73 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import { Keys as
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, [u, s.selectionIndex]), g = n.useCallback(
|
|
26
|
-
(t) => {
|
|
8
|
+
import * as t from "react";
|
|
9
|
+
import { Keys as g, classNames as L } from "@progress/kendo-react-common";
|
|
10
|
+
import K from "./Action.mjs";
|
|
11
|
+
import { ScrollButtonsWrapper as q } from "./ScrollButtonsWrapper.mjs";
|
|
12
|
+
import { useScrollWithButtons as v } from "../hooks/useScrollWithButtons.mjs";
|
|
13
|
+
const W = (b) => {
|
|
14
|
+
var p;
|
|
15
|
+
const { group: n, onActionExecute: C, selected: r, onRequestSelection: u, quickActionsLayout: c = "scroll", dir: f } = b, [e, a] = t.useState(null), d = t.useRef(null), { canScrollLeft: k, canScrollRight: S, scrollLeft: I, scrollRight: x } = v(d, {
|
|
16
|
+
enabled: c === "scrollbuttons",
|
|
17
|
+
dir: f,
|
|
18
|
+
itemsDependency: n.actions
|
|
19
|
+
});
|
|
20
|
+
t.useEffect(() => {
|
|
21
|
+
!r && e !== null ? a(null) : r && e === null && a(0);
|
|
22
|
+
}, [r, e]);
|
|
23
|
+
const m = t.useCallback(() => n.actions ? n.actions.length - 1 : -1, [n.actions]), i = t.useCallback(
|
|
24
|
+
(l, s = 0) => {
|
|
27
25
|
let o = null;
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
return l ? e === null ? o = s : e < m() && (o = e + 1) : e === null ? o = 0 : e > 0 && (o = e - 1), o !== null && a(o), o;
|
|
27
|
+
},
|
|
28
|
+
[e, m]
|
|
29
|
+
), y = t.useCallback(() => {
|
|
30
|
+
u(n.selectionIndex);
|
|
31
|
+
}, [u, n.selectionIndex]), R = t.useCallback(
|
|
32
|
+
(l) => {
|
|
33
|
+
let s = null;
|
|
34
|
+
const o = g.left, E = g.right;
|
|
35
|
+
l.keyCode === o ? s = i(!1) : l.keyCode === E && (s = i(!0)), s !== null && (l.preventDefault(), l.stopPropagation());
|
|
30
36
|
},
|
|
31
37
|
[i]
|
|
32
|
-
),
|
|
33
|
-
|
|
38
|
+
), h = t.useCallback(() => L("k-suggestion-group", {
|
|
39
|
+
// Apply scrollable class only when layout is 'scroll' (no scroll buttons)
|
|
40
|
+
"k-suggestion-group-scrollable": c === "scroll"
|
|
41
|
+
}), [c]), A = /* @__PURE__ */ t.createElement(
|
|
34
42
|
"div",
|
|
35
43
|
{
|
|
36
|
-
className:
|
|
37
|
-
onClick:
|
|
38
|
-
onKeyDown:
|
|
44
|
+
className: h(),
|
|
45
|
+
onClick: y,
|
|
46
|
+
onKeyDown: R,
|
|
39
47
|
role: "toolbar",
|
|
40
48
|
tabIndex: 0,
|
|
41
|
-
"aria-label": "Action group"
|
|
49
|
+
"aria-label": "Action group",
|
|
50
|
+
ref: c === "scrollbuttons" ? d : void 0
|
|
42
51
|
},
|
|
43
|
-
(
|
|
44
|
-
|
|
52
|
+
(p = n.actions) == null ? void 0 : p.map((l, s) => /* @__PURE__ */ t.createElement(
|
|
53
|
+
K,
|
|
45
54
|
{
|
|
46
|
-
item:
|
|
47
|
-
onActionExecute:
|
|
48
|
-
selected:
|
|
49
|
-
key:
|
|
55
|
+
item: l,
|
|
56
|
+
onActionExecute: C,
|
|
57
|
+
selected: s === e,
|
|
58
|
+
key: l.value
|
|
50
59
|
}
|
|
51
60
|
))
|
|
52
61
|
);
|
|
62
|
+
return /* @__PURE__ */ t.createElement(
|
|
63
|
+
q,
|
|
64
|
+
{
|
|
65
|
+
visible: c === "scrollbuttons",
|
|
66
|
+
dir: f,
|
|
67
|
+
canScrollLeft: k,
|
|
68
|
+
canScrollRight: S,
|
|
69
|
+
onScrollLeft: I,
|
|
70
|
+
onScrollRight: x
|
|
71
|
+
},
|
|
72
|
+
A
|
|
73
|
+
);
|
|
53
74
|
};
|
|
54
75
|
export {
|
|
55
|
-
|
|
76
|
+
W as default
|
|
56
77
|
};
|
|
@@ -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 f=require("react"),
|
|
8
|
+
"use strict";const f=require("react"),g=require("@progress/kendo-react-common");function k(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const c in n)if(c!=="default"){const a=Object.getOwnPropertyDescriptor(n,c);Object.defineProperty(e,c,a.get?a:{enumerable:!0,get:()=>n[c]})}}return e.default=n,Object.freeze(e)}const t=k(f),p=n=>{const{item:e,template:c,tabbable:a,onClick:r,selected:l}=n,s=t.useRef(null);t.useEffect(()=>{l&&s.current&&s.current.focus()},[l]);const o=t.useCallback(()=>{if(a!==void 0)return a?0:-1},[a]),i=t.useCallback(()=>g.classNames({"k-selected":l},{"k-focus":l}),[l]),u=t.useCallback(()=>e.title?t.createElement("h5",{className:"k-card-title"},e.title):null,[e.title]),m=t.useCallback(()=>e.subtitle?t.createElement("h6",{className:"k-card-subtitle"},e.subtitle):null,[e.subtitle]),d=t.useCallback(()=>e.contentType.indexOf("image/")===0?t.createElement("img",{src:e.content,alt:e.title||"Attachment",style:{maxHeight:"200px",height:"auto",maxWidth:"200px",width:"auto"}}):e.content,[e.contentType,e.content,e.title]),b=c;return t.createElement("div",{className:i(),tabIndex:o(),onClick:r,ref:s},c?t.createElement(b,{item:e}):t.createElement("div",{className:"k-card"},t.createElement("div",{className:"k-card-body"},u(),m(),d())))};module.exports=p;
|
|
@@ -7,17 +7,24 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import { classNames as f } from "@progress/kendo-react-common";
|
|
10
|
-
const
|
|
11
|
-
const { item: e, template: c, tabbable:
|
|
10
|
+
const p = (s) => {
|
|
11
|
+
const { item: e, template: c, tabbable: l, onClick: r, selected: a } = s, n = t.useRef(null);
|
|
12
12
|
t.useEffect(() => {
|
|
13
|
-
|
|
14
|
-
}, [
|
|
13
|
+
a && n.current && n.current.focus();
|
|
14
|
+
}, [a]);
|
|
15
15
|
const i = t.useCallback(() => {
|
|
16
|
-
if (
|
|
17
|
-
return
|
|
18
|
-
}, [
|
|
19
|
-
|
|
16
|
+
if (l !== void 0)
|
|
17
|
+
return l ? 0 : -1;
|
|
18
|
+
}, [l]), u = t.useCallback(() => f({ "k-selected": a }, { "k-focus": a }), [a]), o = t.useCallback(() => e.title ? /* @__PURE__ */ t.createElement("h5", { className: "k-card-title" }, e.title) : null, [e.title]), m = t.useCallback(() => e.subtitle ? /* @__PURE__ */ t.createElement("h6", { className: "k-card-subtitle" }, e.subtitle) : null, [e.subtitle]), d = t.useCallback(() => e.contentType.indexOf("image/") === 0 ? /* @__PURE__ */ t.createElement(
|
|
19
|
+
"img",
|
|
20
|
+
{
|
|
21
|
+
src: e.content,
|
|
22
|
+
alt: e.title || "Attachment",
|
|
23
|
+
style: { maxHeight: "200px", height: "auto", maxWidth: "200px", width: "auto" }
|
|
24
|
+
}
|
|
25
|
+
) : e.content, [e.contentType, e.content, e.title]), b = c;
|
|
26
|
+
return /* @__PURE__ */ t.createElement("div", { className: u(), tabIndex: i(), onClick: r, ref: n }, c ? /* @__PURE__ */ t.createElement(b, { item: e }) : /* @__PURE__ */ t.createElement("div", { className: "k-card" }, /* @__PURE__ */ t.createElement("div", { className: "k-card-body" }, o(), m(), d())));
|
|
20
27
|
};
|
|
21
28
|
export {
|
|
22
|
-
|
|
29
|
+
p as default
|
|
23
30
|
};
|
package/chat/components/Chat.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@progress/kendo-react-common"),n=require("prop-types"),st=require("react"),nt=require("../ViewItem.js"),at=require("./ActionGroup.js"),ot=require("./AttachmentGroup.js"),rt=require("./DateMarker.js"),lt=require("./MessageGroup.js"),it=require("./NewMessage.js"),ct=require("./Header.js"),ut=require("./elements/PinnedMessage.js"),gt=require("./Notification.js"),mt=require("./ChatContext.js"),dt=require("./ChatMessage.js"),Fe=require("../../package-metadata.js"),C=require("../../messages/index.js"),pt=require("@progress/kendo-react-intl"),Le=require("../utils/fieldMapping.js"),ft=require("../utils/scroll.js"),ht=require("../utils/messageSettings.js");function yt(g){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(g){for(const r in g)if(r!=="default"){const M=Object.getOwnPropertyDescriptor(g,r);Object.defineProperty(u,r,M.get?M:{enumerable:!0,get:()=>g[r]})}}return u.default=g,Object.freeze(u)}const e=yt(st),I=e.forwardRef((g,u)=>{const{messages:r=[],messageTemplate:M,messageContentTemplate:N,attachmentTemplate:x,width:Ie,height:Ne,onSendMessage:T,onSuggestionClick:D,onInputValueChange:O,onActionExecute:E,dir:f,messageBox:De,placeholder:Oe,className:P,message:j=dt.ChatMessage,authorId:l,suggestions:U,suggestionTemplate:Pe,suggestionsLayout:je="scroll",quickActionsLayout:V="scroll",inputValue:Ue,headerTemplate:h,noDataTemplate:y,timestampTemplate:B,statusTemplate:K,userStatusTemplate:W,allowMessageCollapse:G,messageToolbarActions:z,messageContextMenuActions:_,fileActions:k,onUnpin:Ve,messageWidthMode:H,showAvatar:$,showUsername:J,timestampVisibility:Q,authorMessageSettings:X,receiverMessageSettings:Y,onToolbarAction:Z,onContextMenuAction:ee,onFileAction:te,onDownload:se,speechToTextConfig:ne,uploadConfig:ae,sendButtonConfig:Be,messageFilesLayout:oe,textField:re,statusField:le,authorIdField:ie,authorNameField:ce,authorImageUrlField:ue,authorImageAltTextField:ge,idField:me,timestampField:de,filesField:pe,attachmentsField:fe,replyToIdField:he,isDeletedField:ye,isPinnedField:Ce,typingField:Me,suggestedActionsField:Te,...Ke}=g,[m,R]=e.useState(null),[A,We]=e.useState(!1),[Ge,Se]=e.useState(!1),[ke,be]=e.useState(null),[d,xe]=e.useState(null),w=e.useRef(null),Ee=e.useRef(null),q=e.useRef(null),Re=e.useRef(null),v=e.useRef(void 0),F=e.useRef(!1),L=e.useRef(null),Ae=e.useRef(""),o=e.useMemo(()=>{if(!r||r.length===0)return[];const s={textField:re,statusField:le,authorIdField:ie,authorNameField:ce,authorImageUrlField:ue,authorImageAltTextField:ge,idField:me,timestampField:de,filesField:pe,attachmentsField:fe,replyToIdField:he,isDeletedField:ye,isPinnedField:Ce,typingField:Me,suggestedActionsField:Te};return!Object.values(s).some(a=>a!==void 0)&&Le.isStandardMessageFormat(r[0])?r.map(a=>({...a,timestamp:a.timestamp?new Date(a.timestamp):a.timestamp})):Le.mapDataArrayToMessages(r,s)},[r,re,le,ie,ce,ue,ge,me,de,pe,fe,he,ye,Ce,Me,Te]);e.useEffect(()=>{if(l===Ae.current&&L.current){xe(L.current);return}if(l&&o.length>0){const s=o.find(a=>a.author&&(a.author.id===l||a.author.id===String(l))),t=(s==null?void 0:s.author)||{id:l};L.current=t,Ae.current=l,xe(t)}},[l,o]);const p=e.useMemo(()=>o.length>0?nt.convertMsgsToViewItems(o):[],[o]),ze=e.useMemo(()=>!c.validatePackage(Fe.packageMetadata,{component:"Chat"}),[]),_e=c.getLicenseMessage(Fe.packageMetadata),we=e.useMemo(()=>o.find(s=>s.isPinned),[o]),qe=pt.useLocalization();ft.useChatScroll({viewItemsWrapperRef:q,isKeyboardNavigationActiveRef:F,processedMessages:o,suggestions:U});const He=e.useCallback(()=>{clearTimeout(v.current)},[]),$e=e.useCallback(()=>{v.current=window.setTimeout(()=>{R(null)},0)},[]),b=e.useCallback(s=>{R(s)},[]),Je=e.useCallback(s=>{let t=null;const a=m!==null?m:p.lastSelectionIndex;s.keyCode===c.Keys.up?a===null?t=0:a>0&&(t=a-1):s.keyCode===c.Keys.down?a===null?t=0:a<p.lastSelectionIndex&&(t=a+1):s.keyCode===c.Keys.home?t=0:s.keyCode===c.Keys.end&&(t=p.lastSelectionIndex),t!==null&&(R(t),F.current=!0,s.preventDefault())},[m,p]),ve=e.useCallback((s,t,a)=>{var S;if(E&&E({action:{value:s.value,title:s.title,type:s.type},syntheticEvent:t,nativeEvent:t.nativeEvent,target:t.currentTarget}),!t.isDefaultPrevented()){switch(s.type){case"reply":T&&T({message:{id:"",author:d,text:s.value,timestamp:new Date},syntheticEvent:t,nativeEvent:t.nativeEvent,target:t.currentTarget});break;case"call":window.open("tel:"+s.value);break;case"openUrl":window.open(s.value);break}(S=Re.current)==null||S.focusInput()}},[E,T,d]),Qe=e.useCallback(()=>c.classNames("k-chat",P,{"k-rtl":A}),[P,A]),Xe=e.useCallback(()=>{const s=p.length-1;return p.map((t,a)=>{var S;if(t.type==="date-marker")return e.createElement(rt,{item:t,key:t.trackBy,timestampTemplate:B});if(t.type==="message-group"){const tt={allowMessageCollapse:G,messageWidthMode:H,showAvatar:$,showUsername:J,messageTemplate:M,messageContentTemplate:N,messageToolbarActions:z,messageContextMenuActions:_,fileActions:k},i=ht.resolveMessageSettings((S=t==null?void 0:t.messages)==null?void 0:S[0],l,tt,X,Y);return e.createElement(lt,{group:t,itemTemplate:i.messageTemplate,contentTemplate:i.messageContentTemplate,attachmentTemplate:x,user:d,selectedItemIndex:m,onRequestSelection:b,isLastGroup:a===s,key:t.messages[0].selectionIndex,message:j,allowMessageCollapse:i.allowMessageCollapse,messageToolbarActions:i.messageToolbarActions,messageContextMenuActions:i.messageContextMenuActions,fileActions:i.fileActions,messageWidthMode:i.messageWidthMode,showAvatar:i.showAvatar,showUsername:i.showUsername})}else{if(t.type==="attachment-group")return e.createElement(ot,{group:t,itemTemplate:x,onRequestSelection:b,selected:t.selectionIndex===m,isLastGroup:a===s,key:t.selectionIndex});if(t.type==="action-group")return e.createElement(at,{group:t,onActionExecute:ve,onRequestSelection:b,selected:t.selectionIndex===m,key:t.selectionIndex,quickActionsLayout:V,dir:f})}return null})},[p,B,M,N,x,d,m,b,j,G,z,_,k,H,$,J,l,X,Y,ve,V,f]),Ye=e.useCallback(()=>h?typeof h=="function"?h():h:null,[h]),Ze=e.useCallback(()=>y?typeof y=="function"?y():y:null,[y]);e.useEffect(()=>{const s=f!==void 0?f==="rtl":w.current&&getComputedStyle(w.current).direction==="rtl";We(!!s)},[f]),e.useEffect(()=>()=>{clearTimeout(v.current)},[]);const et=e.useMemo(()=>({replyToMessage:ke,setReplyToMessage:be,messages:o,user:d,internalScrollContainerRef:Ee,messageListScrollContainerRef:q,onToolbarAction:Z,onContextMenuAction:ee,onFileAction:te,setShowCopyNotification:Se,onDownload:se,fileActions:k,speechToTextConfig:ne,uploadConfig:ae,statusTemplate:K,userStatusTemplate:W,messageFilesLayout:oe,timestampVisibility:Q}),[ke,be,o,d,Z,ee,te,Se,se,k,ne,ae,K,W,oe,Q]);return e.createElement(mt.default.Provider,{value:et},e.createElement("div",{style:{width:Ie,height:Ne,position:"relative",overflow:"hidden"},onKeyDown:Je,className:Qe(),ref:s=>{w.current=s,Ee.current=s,typeof u=="function"?u(s):u&&(u.current=s)},...Ke},h!==void 0&&e.createElement(ct,null,Ye()),we&&e.createElement(ut,{message:we,onUnpin:Ve,user:d}),e.createElement("div",{className:"k-message-list",onBlur:$e,onFocus:He,role:"log","aria-label":qe.toLanguageString(C.ariaLabelMessageList,C.messages[C.ariaLabelMessageList]),"aria-live":"polite",ref:q},e.createElement("div",{className:c.classNames("k-message-list-content",{"k-message-list-content-empty":o.length===0})},o.length===0&&y!==void 0&&Ze(),o.length>0&&Xe())),e.createElement(it,{onSendMessage:(s,t)=>{T&&T({message:s,syntheticEvent:t,nativeEvent:t.nativeEvent,target:t.currentTarget})},onSuggestionClick:s=>{D&&D(s)},isDirectionRightToLeft:A,ref:Re,placeholder:Oe,MessageBox:De,suggestions:U,suggestionTemplate:Pe,inputValue:Ue,onInputValueChange:s=>{O&&O(s)},onInputClick:()=>{F.current=!1},sendButtonConfig:Be,suggestionsLayout:je,dir:f}),e.createElement(gt,{show:Ge,text:qe.toLanguageString(C.chatCopyNotification,C.messages[C.chatCopyNotification])}),ze&&e.createElement(c.WatermarkOverlay,{message:_e})))});I.displayName="Chat";I.propTypes={messages:n.arrayOf(n.object),user:n.object,messageTemplate:n.any,messageContentTemplate:n.any,attachmentTemplate:n.any,width:n.oneOfType([n.string,n.number]),onSendMessage:n.func,onActionExecute:n.func,dir:n.string,messageBox:n.any,noDataTemplate:n.oneOfType([n.element,n.func]),suggestionsLayout:n.oneOf(["scroll","wrap","scrollbuttons"]),quickActionsLayout:n.oneOf(["scroll","wrap","scrollbuttons"]),userStatusTemplate:n.elementType,messageFilesLayout:n.oneOf(["vertical","wrap","horizontal"]),showAvatar:n.bool,showUsername:n.bool,authorMessageSettings:n.object,receiverMessageSettings:n.object};exports.Chat=I;
|