@progress/kendo-react-conversational-ui 16.2.0-develop.9 → 16.2.1-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EULA.pdf +0 -0
- package/EULA.rtf +2730 -0
- package/EULA.txt +292 -0
- package/chat/components/Chat.js +1 -1
- package/chat/components/Chat.mjs +134 -132
- package/dist/cdn/js/kendo-react-conversational-ui.js +1 -1
- package/llm-kit/defaults/DefaultCitationBody.js +1 -1
- package/llm-kit/defaults/DefaultCitationBody.mjs +19 -16
- package/messages/index.d.ts +5 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +56 -54
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -18
- package/prompt-box/PromptBox.js +1 -1
- package/prompt-box/PromptBox.mjs +106 -91
- package/prompt-box/PromptBoxActionButton.d.ts +21 -0
- package/prompt-box/PromptBoxActionButton.js +1 -1
- package/prompt-box/PromptBoxActionButton.mjs +8 -5
- package/prompt-box/interfaces/PromptBoxProps.d.ts +2 -1
- package/prompt-box/utils.d.ts +24 -0
- package/prompt-box/utils.js +8 -0
- package/prompt-box/utils.mjs +22 -0
package/chat/components/Chat.mjs
CHANGED
|
@@ -5,58 +5,58 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { useWebMcpRegister as Ot, validatePackage as
|
|
8
|
+
import { useWebMcpRegister as Ot, validatePackage as Ut, getLicenseMessage as Pt, Keys as w, sanitizeUrl as jt, classNames as He, WatermarkOverlay as Vt } from "@progress/kendo-react-common";
|
|
9
9
|
import o from "prop-types";
|
|
10
10
|
import * as t from "react";
|
|
11
|
-
import { FloatingActionButton as
|
|
12
|
-
import { arrowDownIcon as
|
|
11
|
+
import { FloatingActionButton as qt } from "@progress/kendo-react-buttons";
|
|
12
|
+
import { arrowDownIcon as zt } from "@progress/kendo-svg-icons";
|
|
13
13
|
import { convertMsgsToViewItems as Wt } from "../ViewItem.mjs";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
14
|
+
import Gt from "./ActionGroup.mjs";
|
|
15
|
+
import Ht from "./AttachmentGroup.mjs";
|
|
16
|
+
import Kt from "./DateMarker.mjs";
|
|
17
|
+
import $t from "./MessageGroup.mjs";
|
|
18
|
+
import _t from "./NewMessage.mjs";
|
|
19
19
|
import Jt from "./Header.mjs";
|
|
20
20
|
import Qt from "./elements/PinnedMessage.mjs";
|
|
21
21
|
import Xt from "./Notification.mjs";
|
|
22
22
|
import Yt from "./ChatContext.mjs";
|
|
23
23
|
import { ChatMessage as Zt } from "./ChatMessage.mjs";
|
|
24
24
|
import { packageMetadata as Ke } from "../../package-metadata.mjs";
|
|
25
|
-
import { ariaLabelMessageList as $e, messages as F, scrollToBottom as L, chatCopyNotification as
|
|
26
|
-
import { useLocalization as
|
|
27
|
-
import { isStandardMessageFormat as
|
|
28
|
-
import { useMessageAutoScroll as
|
|
29
|
-
import { resolveMessageSettings as
|
|
30
|
-
import { useEndlessScroll as
|
|
31
|
-
const
|
|
25
|
+
import { ariaLabelMessageList as $e, messages as F, scrollToBottom as L, chatCopyNotification as _e } from "../../messages/index.mjs";
|
|
26
|
+
import { useLocalization as es } from "@progress/kendo-react-intl";
|
|
27
|
+
import { isStandardMessageFormat as ts, mapDataArrayToMessages as ss } from "../utils/fieldMapping.mjs";
|
|
28
|
+
import { useMessageAutoScroll as os, useHasScrollbar as ns } from "../utils/scroll.mjs";
|
|
29
|
+
import { resolveMessageSettings as as } from "../utils/messageSettings.mjs";
|
|
30
|
+
import { useEndlessScroll as rs } from "../hooks/useEndlessScroll.mjs";
|
|
31
|
+
const Je = t.forwardRef((I, k) => {
|
|
32
32
|
const {
|
|
33
|
-
messages:
|
|
33
|
+
messages: p = [],
|
|
34
34
|
messageTemplate: G,
|
|
35
35
|
messageContentTemplate: H,
|
|
36
36
|
attachmentTemplate: B,
|
|
37
|
-
width:
|
|
38
|
-
height:
|
|
37
|
+
width: Qe,
|
|
38
|
+
height: Xe,
|
|
39
39
|
onSendMessage: C,
|
|
40
40
|
onSuggestionClick: K,
|
|
41
41
|
onInputValueChange: $,
|
|
42
42
|
onActionExecute: N,
|
|
43
|
-
dir:
|
|
44
|
-
messageBox:
|
|
45
|
-
placeholder:
|
|
46
|
-
className:
|
|
43
|
+
dir: h,
|
|
44
|
+
messageBox: Ye,
|
|
45
|
+
placeholder: Ze,
|
|
46
|
+
className: _,
|
|
47
47
|
style: et,
|
|
48
|
-
message:
|
|
48
|
+
message: J = Zt,
|
|
49
49
|
authorId: a,
|
|
50
50
|
suggestions: tt,
|
|
51
51
|
suggestionTemplate: st,
|
|
52
52
|
suggestionsLayout: ot = "scroll",
|
|
53
|
-
quickActionsLayout:
|
|
53
|
+
quickActionsLayout: Q = "scroll",
|
|
54
54
|
inputValue: nt,
|
|
55
|
-
headerTemplate:
|
|
56
|
-
noDataTemplate:
|
|
57
|
-
timestampTemplate:
|
|
58
|
-
statusTemplate:
|
|
59
|
-
userStatusTemplate:
|
|
55
|
+
headerTemplate: M,
|
|
56
|
+
noDataTemplate: y,
|
|
57
|
+
timestampTemplate: X,
|
|
58
|
+
statusTemplate: Y,
|
|
59
|
+
userStatusTemplate: Z,
|
|
60
60
|
allowMessageCollapse: ee,
|
|
61
61
|
messageToolbarActions: te,
|
|
62
62
|
messageContextMenuActions: se,
|
|
@@ -109,8 +109,8 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
109
109
|
...Mt
|
|
110
110
|
} = I, yt = t.useRef(null);
|
|
111
111
|
Ot("chat", yt, I, I.webMcp);
|
|
112
|
-
const [
|
|
113
|
-
if (!
|
|
112
|
+
const [m, U] = t.useState(null), [P, Ct] = t.useState(!1), [St, Ne] = t.useState(!1), [De, Oe] = t.useState(null), [d, Ue] = t.useState(null), [Tt, Pe] = t.useState(!1), j = t.useRef(null), je = t.useRef(null), c = t.useRef(null), Ve = t.useRef(null), V = t.useRef(void 0), q = t.useRef(!1), z = t.useRef(null), qe = t.useRef(""), u = t.useMemo(() => {
|
|
113
|
+
if (!p || p.length === 0)
|
|
114
114
|
return [];
|
|
115
115
|
const s = {
|
|
116
116
|
textField: he,
|
|
@@ -130,12 +130,12 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
130
130
|
suggestedActionsField: Fe,
|
|
131
131
|
isFailedField: Le
|
|
132
132
|
};
|
|
133
|
-
return !Object.values(s).some((n) => n !== void 0) &&
|
|
133
|
+
return !Object.values(s).some((n) => n !== void 0) && ts(p[0]) ? p.map((n) => ({
|
|
134
134
|
...n,
|
|
135
135
|
timestamp: n.timestamp ? new Date(n.timestamp) : n.timestamp
|
|
136
|
-
})) :
|
|
136
|
+
})) : ss(p, s);
|
|
137
137
|
}, [
|
|
138
|
-
|
|
138
|
+
p,
|
|
139
139
|
he,
|
|
140
140
|
Me,
|
|
141
141
|
ye,
|
|
@@ -154,67 +154,67 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
154
154
|
Le
|
|
155
155
|
]);
|
|
156
156
|
t.useEffect(() => {
|
|
157
|
-
if (a === qe.current &&
|
|
158
|
-
|
|
157
|
+
if (a === qe.current && z.current) {
|
|
158
|
+
Ue(z.current);
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
|
-
if (a &&
|
|
162
|
-
const s =
|
|
161
|
+
if (a && u.length > 0) {
|
|
162
|
+
const s = u.find(
|
|
163
163
|
(n) => n.author && (n.author.id === a || n.author.id === String(a))
|
|
164
164
|
), e = (s == null ? void 0 : s.author) || { id: a };
|
|
165
|
-
|
|
165
|
+
z.current = e, qe.current = a, Ue(e);
|
|
166
166
|
}
|
|
167
|
-
}, [a,
|
|
167
|
+
}, [a, u]);
|
|
168
168
|
const {
|
|
169
|
-
renderedMessages:
|
|
169
|
+
renderedMessages: g,
|
|
170
170
|
handleScrollToBottom: bt,
|
|
171
|
-
handleReferencedMessageClick:
|
|
171
|
+
handleReferencedMessageClick: W,
|
|
172
172
|
isEndless: kt,
|
|
173
|
-
isOnLastBatch:
|
|
173
|
+
isOnLastBatch: ze,
|
|
174
174
|
skipAutoScrollRef: vt
|
|
175
|
-
} =
|
|
175
|
+
} = rs({
|
|
176
176
|
scrollMode: ut,
|
|
177
|
-
processedMessages:
|
|
177
|
+
processedMessages: u,
|
|
178
178
|
total: mt,
|
|
179
179
|
pageSize: dt,
|
|
180
180
|
startIndex: gt,
|
|
181
181
|
endIndex: ft,
|
|
182
182
|
onLoadMoreMessages: pt,
|
|
183
183
|
onReferencedMessageClick: ht,
|
|
184
|
-
viewItemsWrapperRef:
|
|
184
|
+
viewItemsWrapperRef: c,
|
|
185
185
|
authorId: a
|
|
186
|
-
}),
|
|
186
|
+
}), f = t.useMemo(() => g.length > 0 ? Wt(g) : [], [g]), Et = t.useMemo(() => !Ut(Ke, { component: "Chat" }), []), Rt = Pt(Ke), We = t.useMemo(() => {
|
|
187
187
|
if (O)
|
|
188
188
|
return O.find((e) => e.isPinned);
|
|
189
|
-
const s =
|
|
189
|
+
const s = u.find((e) => e.isPinned);
|
|
190
190
|
if (s)
|
|
191
191
|
return s;
|
|
192
|
-
}, [
|
|
193
|
-
|
|
194
|
-
viewItemsWrapperRef:
|
|
192
|
+
}, [u, O]), E = es();
|
|
193
|
+
os({
|
|
194
|
+
viewItemsWrapperRef: c,
|
|
195
195
|
isKeyboardNavigationActiveRef: q,
|
|
196
|
-
processedMessages:
|
|
196
|
+
processedMessages: g,
|
|
197
197
|
authorId: a,
|
|
198
198
|
autoScrollThreshold: lt,
|
|
199
199
|
isEndless: kt,
|
|
200
|
-
isOnLastBatch:
|
|
200
|
+
isOnLastBatch: ze,
|
|
201
201
|
skipAutoScrollRef: vt
|
|
202
202
|
});
|
|
203
|
-
const xt =
|
|
203
|
+
const xt = ns({ elementRef: c }), At = t.useCallback(() => {
|
|
204
204
|
clearTimeout(V.current);
|
|
205
205
|
}, []), wt = t.useCallback(() => {
|
|
206
206
|
V.current = window.setTimeout(() => {
|
|
207
|
-
|
|
207
|
+
U(null);
|
|
208
208
|
}, 0);
|
|
209
209
|
}, []), R = t.useCallback((s) => {
|
|
210
|
-
|
|
210
|
+
U(s);
|
|
211
211
|
}, []), Ft = t.useCallback(
|
|
212
212
|
(s) => {
|
|
213
213
|
let e = null;
|
|
214
|
-
const n =
|
|
215
|
-
s.keyCode === w.up ? n === null ? e = 0 : n > 0 && (e = n - 1) : s.keyCode === w.down ? n === null ? e = 0 : n <
|
|
214
|
+
const n = m !== null ? m : f.lastSelectionIndex;
|
|
215
|
+
s.keyCode === w.up ? n === null ? e = 0 : n > 0 && (e = n - 1) : s.keyCode === w.down ? n === null ? e = 0 : n < f.lastSelectionIndex && (e = n + 1) : s.keyCode === w.home ? e = 0 : s.keyCode === w.end && (e = f.lastSelectionIndex), e !== null && (U(e), q.current = !0, s.preventDefault());
|
|
216
216
|
},
|
|
217
|
-
[
|
|
217
|
+
[m, f]
|
|
218
218
|
), Ge = t.useCallback(
|
|
219
219
|
(s, e, n) => {
|
|
220
220
|
var l;
|
|
@@ -229,7 +229,7 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
229
229
|
C && C({
|
|
230
230
|
message: {
|
|
231
231
|
id: "",
|
|
232
|
-
author:
|
|
232
|
+
author: d,
|
|
233
233
|
text: s.value,
|
|
234
234
|
timestamp: /* @__PURE__ */ new Date()
|
|
235
235
|
},
|
|
@@ -241,20 +241,22 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
241
241
|
case "call":
|
|
242
242
|
window.open("tel:" + s.value);
|
|
243
243
|
break;
|
|
244
|
-
case "openUrl":
|
|
245
|
-
|
|
244
|
+
case "openUrl": {
|
|
245
|
+
const i = jt(s.value);
|
|
246
|
+
i && window.open(i, "_blank", "noopener,noreferrer");
|
|
246
247
|
break;
|
|
248
|
+
}
|
|
247
249
|
}
|
|
248
250
|
(l = Ve.current) == null || l.focusInput();
|
|
249
251
|
}
|
|
250
252
|
},
|
|
251
|
-
[N, C,
|
|
252
|
-
), Lt = t.useCallback(() => He("k-chat",
|
|
253
|
-
const s =
|
|
254
|
-
return
|
|
255
|
-
var l,
|
|
253
|
+
[N, C, d]
|
|
254
|
+
), Lt = t.useCallback(() => He("k-chat", _, { "k-rtl": P }), [_, P]), It = t.useCallback(() => {
|
|
255
|
+
const s = f.length - 1;
|
|
256
|
+
return f.map((e, n) => {
|
|
257
|
+
var l, i, S, T, b, x;
|
|
256
258
|
if (e.type === "date-marker")
|
|
257
|
-
return /* @__PURE__ */ t.createElement(
|
|
259
|
+
return /* @__PURE__ */ t.createElement(Kt, { item: e, key: e.trackBy, timestampTemplate: X });
|
|
258
260
|
if (e.type === "message-group") {
|
|
259
261
|
const A = {
|
|
260
262
|
allowMessageCollapse: ee,
|
|
@@ -266,7 +268,7 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
266
268
|
messageToolbarActions: te,
|
|
267
269
|
messageContextMenuActions: se,
|
|
268
270
|
fileActions: v
|
|
269
|
-
}, r =
|
|
271
|
+
}, r = as(
|
|
270
272
|
(l = e.messages) == null ? void 0 : l[0],
|
|
271
273
|
a,
|
|
272
274
|
A,
|
|
@@ -274,18 +276,18 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
274
276
|
ie
|
|
275
277
|
);
|
|
276
278
|
return /* @__PURE__ */ t.createElement(
|
|
277
|
-
|
|
279
|
+
$t,
|
|
278
280
|
{
|
|
279
281
|
group: e,
|
|
280
282
|
itemTemplate: r.messageTemplate,
|
|
281
283
|
contentTemplate: r.messageContentTemplate,
|
|
282
284
|
attachmentTemplate: B,
|
|
283
|
-
user:
|
|
284
|
-
selectedItemIndex:
|
|
285
|
+
user: d,
|
|
286
|
+
selectedItemIndex: m,
|
|
285
287
|
onRequestSelection: R,
|
|
286
288
|
isLastGroup: n === s,
|
|
287
|
-
key: (
|
|
288
|
-
message:
|
|
289
|
+
key: (i = e.messages[0].id) != null ? i : e.messages[0].selectionIndex,
|
|
290
|
+
message: J,
|
|
289
291
|
allowMessageCollapse: r.allowMessageCollapse,
|
|
290
292
|
messageToolbarActions: r.messageToolbarActions,
|
|
291
293
|
messageContextMenuActions: r.messageContextMenuActions,
|
|
@@ -298,42 +300,42 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
298
300
|
} else {
|
|
299
301
|
if (e.type === "attachment-group")
|
|
300
302
|
return /* @__PURE__ */ t.createElement(
|
|
301
|
-
|
|
303
|
+
Ht,
|
|
302
304
|
{
|
|
303
305
|
group: e,
|
|
304
306
|
itemTemplate: B,
|
|
305
307
|
onRequestSelection: R,
|
|
306
|
-
selected: e.selectionIndex ===
|
|
308
|
+
selected: e.selectionIndex === m,
|
|
307
309
|
isLastGroup: n === s,
|
|
308
310
|
key: `att-${(T = (S = e.trackBy) == null ? void 0 : S.id) != null ? T : e.selectionIndex}`
|
|
309
311
|
}
|
|
310
312
|
);
|
|
311
313
|
if (e.type === "action-group")
|
|
312
314
|
return /* @__PURE__ */ t.createElement(
|
|
313
|
-
|
|
315
|
+
Gt,
|
|
314
316
|
{
|
|
315
317
|
group: e,
|
|
316
318
|
onActionExecute: Ge,
|
|
317
319
|
onRequestSelection: R,
|
|
318
|
-
selected: e.selectionIndex ===
|
|
320
|
+
selected: e.selectionIndex === m,
|
|
319
321
|
key: `act-${(x = (b = e.trackBy) == null ? void 0 : b.id) != null ? x : e.selectionIndex}`,
|
|
320
|
-
quickActionsLayout:
|
|
321
|
-
dir:
|
|
322
|
+
quickActionsLayout: Q,
|
|
323
|
+
dir: h
|
|
322
324
|
}
|
|
323
325
|
);
|
|
324
326
|
}
|
|
325
327
|
return null;
|
|
326
328
|
});
|
|
327
329
|
}, [
|
|
328
|
-
|
|
329
|
-
|
|
330
|
+
f,
|
|
331
|
+
X,
|
|
330
332
|
G,
|
|
331
333
|
H,
|
|
332
334
|
B,
|
|
335
|
+
d,
|
|
333
336
|
m,
|
|
334
|
-
u,
|
|
335
337
|
R,
|
|
336
|
-
|
|
338
|
+
J,
|
|
337
339
|
ee,
|
|
338
340
|
te,
|
|
339
341
|
se,
|
|
@@ -345,44 +347,44 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
345
347
|
le,
|
|
346
348
|
ie,
|
|
347
349
|
Ge,
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
]), Bt = t.useCallback(() =>
|
|
350
|
+
Q,
|
|
351
|
+
h
|
|
352
|
+
]), Bt = t.useCallback(() => M ? typeof M == "function" ? M() : M : null, [M]), Nt = t.useCallback(() => y ? typeof y == "function" ? y() : y : null, [y]);
|
|
351
353
|
t.useEffect(() => {
|
|
352
|
-
const s =
|
|
354
|
+
const s = h !== void 0 ? h === "rtl" : j.current && getComputedStyle(j.current).direction === "rtl";
|
|
353
355
|
Ct(!!s);
|
|
354
|
-
}, [
|
|
356
|
+
}, [h]), t.useEffect(() => () => {
|
|
355
357
|
clearTimeout(V.current);
|
|
356
358
|
}, []), t.useEffect(() => {
|
|
357
|
-
if (!D || !
|
|
359
|
+
if (!D || !c.current)
|
|
358
360
|
return;
|
|
359
361
|
let s, e;
|
|
360
362
|
const n = () => {
|
|
361
363
|
s = void 0;
|
|
362
|
-
const T =
|
|
364
|
+
const T = c.current;
|
|
363
365
|
if (!T)
|
|
364
366
|
return;
|
|
365
367
|
const { scrollHeight: b, scrollTop: x, clientHeight: A } = T;
|
|
366
|
-
!(b > A) || b - x - A <= 100 ? (e !== void 0 && (clearTimeout(e), e = void 0),
|
|
367
|
-
e = void 0,
|
|
368
|
+
!(b > A) || b - x - A <= 100 ? (e !== void 0 && (clearTimeout(e), e = void 0), Pe(!1)) : e != null || (e = setTimeout(() => {
|
|
369
|
+
e = void 0, Pe(!0);
|
|
368
370
|
}, 300));
|
|
369
371
|
}, l = () => {
|
|
370
372
|
s === void 0 && (s = requestAnimationFrame(n));
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
+
}, i = c.current;
|
|
374
|
+
i.addEventListener("scroll", l, { passive: !0 });
|
|
373
375
|
const S = new MutationObserver(l);
|
|
374
|
-
return S.observe(
|
|
375
|
-
|
|
376
|
+
return S.observe(i, { childList: !0, subtree: !0, characterData: !0 }), () => {
|
|
377
|
+
i.removeEventListener("scroll", l), S.disconnect(), s !== void 0 && cancelAnimationFrame(s), e !== void 0 && clearTimeout(e);
|
|
376
378
|
};
|
|
377
379
|
}, [D]);
|
|
378
380
|
const Dt = t.useMemo(() => ({
|
|
379
381
|
replyToMessage: De,
|
|
380
382
|
setReplyToMessage: Oe,
|
|
381
|
-
messages:
|
|
383
|
+
messages: u,
|
|
382
384
|
repliedToMessages: Be,
|
|
383
|
-
user:
|
|
385
|
+
user: d,
|
|
384
386
|
internalScrollContainerRef: je,
|
|
385
|
-
messageListScrollContainerRef:
|
|
387
|
+
messageListScrollContainerRef: c,
|
|
386
388
|
onToolbarAction: ce,
|
|
387
389
|
onContextMenuAction: ue,
|
|
388
390
|
onFileAction: me,
|
|
@@ -392,17 +394,17 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
392
394
|
fileActions: v,
|
|
393
395
|
speechToTextConfig: ge,
|
|
394
396
|
uploadConfig: fe,
|
|
395
|
-
statusTemplate:
|
|
396
|
-
userStatusTemplate:
|
|
397
|
+
statusTemplate: Y,
|
|
398
|
+
userStatusTemplate: Z,
|
|
397
399
|
messageFilesLayout: pe,
|
|
398
400
|
timestampVisibility: re,
|
|
399
|
-
onReferencedMessageClick:
|
|
401
|
+
onReferencedMessageClick: W
|
|
400
402
|
}), [
|
|
401
403
|
De,
|
|
402
404
|
Oe,
|
|
403
|
-
|
|
405
|
+
u,
|
|
404
406
|
Be,
|
|
405
|
-
|
|
407
|
+
d,
|
|
406
408
|
ce,
|
|
407
409
|
ue,
|
|
408
410
|
me,
|
|
@@ -412,18 +414,18 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
412
414
|
v,
|
|
413
415
|
ge,
|
|
414
416
|
fe,
|
|
417
|
+
Y,
|
|
415
418
|
Z,
|
|
416
|
-
_,
|
|
417
419
|
pe,
|
|
418
420
|
re,
|
|
419
|
-
|
|
421
|
+
W
|
|
420
422
|
]);
|
|
421
423
|
return /* @__PURE__ */ t.createElement(Yt.Provider, { value: Dt }, /* @__PURE__ */ t.createElement(
|
|
422
424
|
"div",
|
|
423
425
|
{
|
|
424
426
|
style: {
|
|
425
|
-
width:
|
|
426
|
-
height:
|
|
427
|
+
width: Qe,
|
|
428
|
+
height: Xe,
|
|
427
429
|
position: "relative",
|
|
428
430
|
overflow: "hidden",
|
|
429
431
|
...et
|
|
@@ -435,7 +437,7 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
435
437
|
},
|
|
436
438
|
...Mt
|
|
437
439
|
},
|
|
438
|
-
|
|
440
|
+
M !== void 0 && /* @__PURE__ */ t.createElement(Jt, null, Bt()),
|
|
439
441
|
/* @__PURE__ */ t.createElement(
|
|
440
442
|
"div",
|
|
441
443
|
{
|
|
@@ -448,34 +450,34 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
448
450
|
F[$e]
|
|
449
451
|
),
|
|
450
452
|
"aria-live": "polite",
|
|
451
|
-
ref:
|
|
453
|
+
ref: c,
|
|
452
454
|
style: {
|
|
453
455
|
scrollBehavior: "auto"
|
|
454
456
|
}
|
|
455
457
|
},
|
|
456
|
-
|
|
458
|
+
We && /* @__PURE__ */ t.createElement(
|
|
457
459
|
Qt,
|
|
458
460
|
{
|
|
459
|
-
message:
|
|
461
|
+
message: We,
|
|
460
462
|
onUnpin: at,
|
|
461
|
-
user:
|
|
462
|
-
onReferencedMessageClick:
|
|
463
|
+
user: d,
|
|
464
|
+
onReferencedMessageClick: W
|
|
463
465
|
}
|
|
464
466
|
),
|
|
465
467
|
/* @__PURE__ */ t.createElement(
|
|
466
468
|
"div",
|
|
467
469
|
{
|
|
468
470
|
className: He("k-message-list-content", {
|
|
469
|
-
"k-message-list-content-empty":
|
|
471
|
+
"k-message-list-content-empty": g.length === 0
|
|
470
472
|
})
|
|
471
473
|
},
|
|
472
|
-
|
|
473
|
-
|
|
474
|
+
g.length === 0 && y !== void 0 && Nt(),
|
|
475
|
+
g.length > 0 && It()
|
|
474
476
|
),
|
|
475
|
-
D && (Tt || !
|
|
476
|
-
|
|
477
|
+
D && (Tt || !ze) && /* @__PURE__ */ t.createElement("div", { className: "k-chat-scroll-to-bottom-container" }, /* @__PURE__ */ t.createElement(
|
|
478
|
+
qt,
|
|
477
479
|
{
|
|
478
|
-
svgIcon:
|
|
480
|
+
svgIcon: zt,
|
|
479
481
|
size: "small",
|
|
480
482
|
themeColor: "base",
|
|
481
483
|
rounded: "full",
|
|
@@ -493,7 +495,7 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
493
495
|
),
|
|
494
496
|
xt && /* @__PURE__ */ t.createElement("div", { className: "k-separator" }),
|
|
495
497
|
/* @__PURE__ */ t.createElement(
|
|
496
|
-
|
|
498
|
+
_t,
|
|
497
499
|
{
|
|
498
500
|
onSendMessage: (s, e) => {
|
|
499
501
|
C && C({
|
|
@@ -506,10 +508,10 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
506
508
|
onSuggestionClick: (s) => {
|
|
507
509
|
K && K(s);
|
|
508
510
|
},
|
|
509
|
-
isDirectionRightToLeft:
|
|
511
|
+
isDirectionRightToLeft: P,
|
|
510
512
|
ref: Ve,
|
|
511
|
-
placeholder:
|
|
512
|
-
MessageBox:
|
|
513
|
+
placeholder: Ze,
|
|
514
|
+
MessageBox: Ye,
|
|
513
515
|
suggestions: tt,
|
|
514
516
|
suggestionTemplate: st,
|
|
515
517
|
inputValue: nt,
|
|
@@ -521,7 +523,7 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
521
523
|
},
|
|
522
524
|
sendButtonConfig: rt,
|
|
523
525
|
suggestionsLayout: ot,
|
|
524
|
-
dir:
|
|
526
|
+
dir: h,
|
|
525
527
|
messageBoxSettings: it,
|
|
526
528
|
loading: ct
|
|
527
529
|
}
|
|
@@ -531,16 +533,16 @@ const Qe = t.forwardRef((I, k) => {
|
|
|
531
533
|
{
|
|
532
534
|
show: St,
|
|
533
535
|
text: E.toLanguageString(
|
|
534
|
-
|
|
535
|
-
F[
|
|
536
|
+
_e,
|
|
537
|
+
F[_e]
|
|
536
538
|
)
|
|
537
539
|
}
|
|
538
540
|
),
|
|
539
|
-
Et && /* @__PURE__ */ t.createElement(
|
|
541
|
+
Et && /* @__PURE__ */ t.createElement(Vt, { message: Rt })
|
|
540
542
|
));
|
|
541
543
|
});
|
|
542
|
-
|
|
543
|
-
|
|
544
|
+
Je.displayName = "Chat";
|
|
545
|
+
Je.propTypes = {
|
|
544
546
|
messages: o.arrayOf(o.object),
|
|
545
547
|
user: o.object,
|
|
546
548
|
messageTemplate: o.any,
|
|
@@ -572,5 +574,5 @@ Qe.propTypes = {
|
|
|
572
574
|
onReferencedMessageClick: o.func
|
|
573
575
|
};
|
|
574
576
|
export {
|
|
575
|
-
|
|
577
|
+
Je as Chat
|
|
576
578
|
};
|