@telia-ace/widget-conversation 1.0.29-next.13 → 1.0.29-next.15
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/dist/components/conversation/ui/styles.d.ts +2 -2
- package/dist/{conversation.fe5da693.js → conversation.4bd3eedd.js} +194 -194
- package/dist/{conversation.fe5da693.js.map → conversation.4bd3eedd.js.map} +1 -1
- package/dist/index.js +29 -26
- package/dist/index.js.map +1 -1
- package/package.json +48 -48
|
@@ -2,27 +2,27 @@ var ve = Object.defineProperty, Ee = Object.defineProperties;
|
|
|
2
2
|
var xe = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var A = Object.getOwnPropertySymbols;
|
|
4
4
|
var ee = Object.prototype.hasOwnProperty, te = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var Z = (e, t,
|
|
6
|
-
for (var
|
|
7
|
-
ee.call(t,
|
|
5
|
+
var Z = (e, t, r) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, g = (e, t) => {
|
|
6
|
+
for (var r in t || (t = {}))
|
|
7
|
+
ee.call(t, r) && Z(e, r, t[r]);
|
|
8
8
|
if (A)
|
|
9
|
-
for (var
|
|
10
|
-
te.call(t,
|
|
9
|
+
for (var r of A(t))
|
|
10
|
+
te.call(t, r) && Z(e, r, t[r]);
|
|
11
11
|
return e;
|
|
12
12
|
}, x = (e, t) => Ee(e, xe(t));
|
|
13
13
|
var j = (e, t) => {
|
|
14
|
-
var
|
|
14
|
+
var r = {};
|
|
15
15
|
for (var o in e)
|
|
16
|
-
ee.call(e, o) && t.indexOf(o) < 0 && (
|
|
16
|
+
ee.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
|
|
17
17
|
if (e != null && A)
|
|
18
18
|
for (var o of A(e))
|
|
19
|
-
t.indexOf(o) < 0 && te.call(e, o) && (
|
|
20
|
-
return
|
|
19
|
+
t.indexOf(o) < 0 && te.call(e, o) && (r[o] = e[o]);
|
|
20
|
+
return r;
|
|
21
21
|
};
|
|
22
22
|
import a from "@emotion/styled";
|
|
23
|
-
import {
|
|
23
|
+
import { useIsTabbing as we, useDispatch as V, useProperties as L, useScroll as oe, SymbolBadge as w, Input as ae, Button as M, borderTabStyle as b, Typography as q, invertedHoverButton as ke, Html as Y, List as le, buttonCss as G, ItemList as J, itemList as Q, useComponent as Ce, genericHtml as Se, headingElement as se, list as ze, WidgetOverlayOutlet as ie, ConversationContext as Le } from "@telia-ace/widget-ui";
|
|
24
24
|
import { appendClassNames as H } from "@telia-ace/widget-utilities";
|
|
25
|
-
import
|
|
25
|
+
import n, { useState as R, useEffect as ce, forwardRef as X, Suspense as Me, useMemo as He, useCallback as me, useRef as Te } from "react";
|
|
26
26
|
import { css as f, keyframes as Ie } from "@emotion/react";
|
|
27
27
|
import { FormComponent as Ae } from "@telia-ace/widget-forms";
|
|
28
28
|
import { ConversationMessageListItemType as C, ConversationMessageType as D } from "./index.js";
|
|
@@ -30,14 +30,14 @@ import "@telia-ace/widget-core";
|
|
|
30
30
|
import "@telia-ace/widget-services";
|
|
31
31
|
import "@telia-ace/widget-plugins";
|
|
32
32
|
const Re = ({ className: e }) => {
|
|
33
|
-
const [t,
|
|
33
|
+
const [t, r] = R(""), [o, l] = R(!1), [s, u] = R(0), [c, h] = R(0), v = we(), m = V(), {
|
|
34
34
|
inputPlaceholder: i = "Type your message",
|
|
35
35
|
inputHidden: $ = !1,
|
|
36
36
|
inputDisabled: k = !1,
|
|
37
37
|
sendButtonLabel: S = "Send message",
|
|
38
38
|
inputMultiline: E = !0,
|
|
39
39
|
secondaryAction: p
|
|
40
|
-
} =
|
|
40
|
+
} = L(), [fe, y] = oe(!0);
|
|
41
41
|
ce(() => {
|
|
42
42
|
if (y.current) {
|
|
43
43
|
const { lineHeight: d, maxHeight: I } = getComputedStyle(y.current);
|
|
@@ -50,7 +50,7 @@ const Re = ({ className: e }) => {
|
|
|
50
50
|
}
|
|
51
51
|
}, [y.current]);
|
|
52
52
|
const N = (d) => {
|
|
53
|
-
!d.shiftKey || !E ? (d.preventDefault(), t && t.length > 0 && (m("user-submit", { text: t }),
|
|
53
|
+
!d.shiftKey || !E ? (d.preventDefault(), t && t.length > 0 && (m("user-submit", { text: t }), r(""), O(""))) : t.length < 1 && d.preventDefault();
|
|
54
54
|
}, pe = (d) => {
|
|
55
55
|
!p || (d.preventDefault(), m("action", g({
|
|
56
56
|
actionKey: p.action
|
|
@@ -65,23 +65,23 @@ const Re = ({ className: e }) => {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}, O = (d) => {
|
|
68
|
-
ye(d),
|
|
68
|
+
ye(d), r(d), d && d.length > 0 && m("user-typing", { textLength: d.length });
|
|
69
69
|
};
|
|
70
|
-
return $ ? null : /* @__PURE__ */
|
|
70
|
+
return $ ? null : /* @__PURE__ */ n.createElement(Oe, {
|
|
71
71
|
grow: E,
|
|
72
72
|
className: H("humany-conversation-input", e),
|
|
73
73
|
"data-has-focus": o,
|
|
74
74
|
scrollableCss: fe,
|
|
75
75
|
isTabbing: v
|
|
76
|
-
}, p && /* @__PURE__ */
|
|
76
|
+
}, p && /* @__PURE__ */ n.createElement(Ne, {
|
|
77
77
|
disabled: k,
|
|
78
78
|
onClick: pe,
|
|
79
79
|
title: p.label,
|
|
80
80
|
"aria-label": p.label
|
|
81
|
-
}, /* @__PURE__ */
|
|
81
|
+
}, /* @__PURE__ */ n.createElement(w, {
|
|
82
82
|
size: 24,
|
|
83
83
|
symbol: { type: "Svg", content: p.icon || "browse" }
|
|
84
|
-
})), E ? /* @__PURE__ */
|
|
84
|
+
})), E ? /* @__PURE__ */ n.createElement(Be, {
|
|
85
85
|
value: t,
|
|
86
86
|
onChange: O,
|
|
87
87
|
onEnter: N,
|
|
@@ -92,7 +92,7 @@ const Re = ({ className: e }) => {
|
|
|
92
92
|
type: "textarea",
|
|
93
93
|
rows: 1,
|
|
94
94
|
ref: y
|
|
95
|
-
}) : /* @__PURE__ */
|
|
95
|
+
}) : /* @__PURE__ */ n.createElement(Ke, {
|
|
96
96
|
value: t,
|
|
97
97
|
onChange: O,
|
|
98
98
|
onEnter: N,
|
|
@@ -100,17 +100,17 @@ const Re = ({ className: e }) => {
|
|
|
100
100
|
"aria-label": i,
|
|
101
101
|
placeholder: i,
|
|
102
102
|
onFocusChange: l
|
|
103
|
-
}), /* @__PURE__ */
|
|
103
|
+
}), /* @__PURE__ */ n.createElement(de, {
|
|
104
104
|
disabled: k,
|
|
105
105
|
onClick: N,
|
|
106
106
|
title: S,
|
|
107
107
|
"aria-label": S
|
|
108
|
-
}, /* @__PURE__ */
|
|
108
|
+
}, /* @__PURE__ */ n.createElement(je, {
|
|
109
109
|
size: 22,
|
|
110
110
|
symbol: { type: "Svg", content: "send" },
|
|
111
111
|
hasContent: !!t && !!t.length
|
|
112
112
|
})));
|
|
113
|
-
}, Be = a(
|
|
113
|
+
}, Be = a(ae)`
|
|
114
114
|
resize: none;
|
|
115
115
|
flex: 1;
|
|
116
116
|
flex-shrink: 1;
|
|
@@ -130,7 +130,7 @@ const Re = ({ className: e }) => {
|
|
|
130
130
|
border: none;
|
|
131
131
|
transition: height 200ms linear;
|
|
132
132
|
outline: none;
|
|
133
|
-
`, Ke = a(
|
|
133
|
+
`, Ke = a(ae)`
|
|
134
134
|
flex: 1;
|
|
135
135
|
border: none;
|
|
136
136
|
background-color: transparent;
|
|
@@ -156,7 +156,7 @@ const Re = ({ className: e }) => {
|
|
|
156
156
|
}};
|
|
157
157
|
font-style: italic;
|
|
158
158
|
}
|
|
159
|
-
`, de = a(
|
|
159
|
+
`, de = a(M)`
|
|
160
160
|
flex: 0 0 50px;
|
|
161
161
|
align-self: stretch;
|
|
162
162
|
background-color: transparent;
|
|
@@ -194,13 +194,13 @@ const Re = ({ className: e }) => {
|
|
|
194
194
|
${(e) => !!e.scrollableCss && e.scrollableCss}
|
|
195
195
|
}
|
|
196
196
|
`, je = a(
|
|
197
|
-
(
|
|
198
|
-
var o =
|
|
197
|
+
(r) => {
|
|
198
|
+
var o = r, {
|
|
199
199
|
hasContent: e
|
|
200
200
|
} = o, t = j(o, [
|
|
201
201
|
"hasContent"
|
|
202
202
|
]);
|
|
203
|
-
return /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ n.createElement(w, g({}, t));
|
|
204
204
|
}
|
|
205
205
|
)`
|
|
206
206
|
line,
|
|
@@ -214,7 +214,7 @@ const Re = ({ className: e }) => {
|
|
|
214
214
|
return e.hasContent ? (t = e.theme.colors) == null ? void 0 : t.primary : "#a6a6a6";
|
|
215
215
|
}};
|
|
216
216
|
}
|
|
217
|
-
`, De = a.div`
|
|
217
|
+
`, De = Re, Fe = a.div`
|
|
218
218
|
width: ${(e) => e.avatarSize || "32px"};
|
|
219
219
|
height: ${(e) => e.avatarSize || "32px"};
|
|
220
220
|
border-radius: 50%;
|
|
@@ -261,7 +261,7 @@ const Re = ({ className: e }) => {
|
|
|
261
261
|
}};
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
`,
|
|
264
|
+
`, We = Ie`
|
|
265
265
|
0% {
|
|
266
266
|
opacity: 0;
|
|
267
267
|
}
|
|
@@ -271,7 +271,7 @@ const Re = ({ className: e }) => {
|
|
|
271
271
|
100% {
|
|
272
272
|
opacity: 0;
|
|
273
273
|
}
|
|
274
|
-
`,
|
|
274
|
+
`, Pe = a.div`
|
|
275
275
|
display: flex;
|
|
276
276
|
justify-content: center;
|
|
277
277
|
> div {
|
|
@@ -283,7 +283,7 @@ const Re = ({ className: e }) => {
|
|
|
283
283
|
var t;
|
|
284
284
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
285
285
|
}};
|
|
286
|
-
animation: ${
|
|
286
|
+
animation: ${We} 1s infinite;
|
|
287
287
|
}
|
|
288
288
|
> div:nth-child(2) {
|
|
289
289
|
animation-delay: 100ms;
|
|
@@ -295,7 +295,7 @@ const Re = ({ className: e }) => {
|
|
|
295
295
|
grid-area: content;
|
|
296
296
|
max-width: 100%;
|
|
297
297
|
overflow: hidden;
|
|
298
|
-
`,
|
|
298
|
+
`, Ue = a(q)`
|
|
299
299
|
font-size: ${(e) => {
|
|
300
300
|
var t;
|
|
301
301
|
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
@@ -312,8 +312,8 @@ const Re = ({ className: e }) => {
|
|
|
312
312
|
var t;
|
|
313
313
|
return e.padded && `padding: ${(t = e.theme.sizes) == null ? void 0 : t.medium};`;
|
|
314
314
|
}}
|
|
315
|
-
${(e) => !e.user && e.stacked &&
|
|
316
|
-
${(e) => e.user && e.stacked &&
|
|
315
|
+
${(e) => !e.user && e.stacked && _e(e.stacked, e.theme)}
|
|
316
|
+
${(e) => e.user && e.stacked && Ve(e.stacked, e.theme)}
|
|
317
317
|
|
|
318
318
|
display: inline-block;
|
|
319
319
|
margin-top: ${(e) => {
|
|
@@ -329,15 +329,15 @@ const Re = ({ className: e }) => {
|
|
|
329
329
|
}
|
|
330
330
|
max-width: 100%;
|
|
331
331
|
${(e) => e.fullWidth && "width: 100%;"}
|
|
332
|
-
`,
|
|
332
|
+
`, _e = (e, t) => {
|
|
333
333
|
var o, l;
|
|
334
|
-
const
|
|
334
|
+
const r = f`
|
|
335
335
|
background-color: ${(o = t.colors) == null ? void 0 : o.accent};
|
|
336
336
|
color: ${(l = t.colors) == null ? void 0 : l.text};
|
|
337
337
|
${t.border && `border: ${t.border};`};
|
|
338
338
|
`;
|
|
339
339
|
return t.borderRadius ? f`
|
|
340
|
-
${
|
|
340
|
+
${r}
|
|
341
341
|
|
|
342
342
|
border-top-right-radius: ${t.borderRadius};
|
|
343
343
|
border-bottom-right-radius: ${t.borderRadius};
|
|
@@ -349,15 +349,15 @@ const Re = ({ className: e }) => {
|
|
|
349
349
|
${e === "last" && `
|
|
350
350
|
border-bottom-left-radius: ${t.borderRadius};
|
|
351
351
|
`}
|
|
352
|
-
` :
|
|
353
|
-
},
|
|
352
|
+
` : r;
|
|
353
|
+
}, Ve = (e, t) => {
|
|
354
354
|
var o, l;
|
|
355
|
-
const
|
|
355
|
+
const r = f`
|
|
356
356
|
background-color: ${(o = t.colors) == null ? void 0 : o.primary};
|
|
357
357
|
color: ${(l = t.colors) == null ? void 0 : l.accent};
|
|
358
358
|
`;
|
|
359
359
|
return t.borderRadius ? f`
|
|
360
|
-
${
|
|
360
|
+
${r}
|
|
361
361
|
|
|
362
362
|
border-top-left-radius: ${t.borderRadius};
|
|
363
363
|
border-bottom-left-radius: ${t.borderRadius};
|
|
@@ -369,7 +369,7 @@ const Re = ({ className: e }) => {
|
|
|
369
369
|
${e === "last" && `
|
|
370
370
|
border-bottom-right-radius: ${t.borderRadius};
|
|
371
371
|
`}
|
|
372
|
-
` :
|
|
372
|
+
` : r;
|
|
373
373
|
}, B = a.div`
|
|
374
374
|
margin-bottom: ${(e) => {
|
|
375
375
|
var t;
|
|
@@ -379,16 +379,16 @@ const Re = ({ className: e }) => {
|
|
|
379
379
|
margin-bottom: 0;
|
|
380
380
|
}
|
|
381
381
|
`, T = (e) => {
|
|
382
|
-
var t,
|
|
382
|
+
var t, r;
|
|
383
383
|
return f`
|
|
384
384
|
margin: ${(t = e.theme.sizes) == null ? void 0 : t.medium} 0;
|
|
385
|
-
padding: 0 ${(
|
|
385
|
+
padding: 0 ${(r = e.theme.sizes) == null ? void 0 : r.medium};
|
|
386
386
|
`;
|
|
387
|
-
},
|
|
387
|
+
}, qe = a(Ae)`
|
|
388
388
|
& button.humany-form-component-button {
|
|
389
389
|
${(e) => {
|
|
390
|
-
var t,
|
|
391
|
-
return ((t = e.theme.colors) == null ? void 0 : t.primary) && ((
|
|
390
|
+
var t, r, o, l;
|
|
391
|
+
return ((t = e.theme.colors) == null ? void 0 : t.primary) && ((r = e.theme.colors) == null ? void 0 : r.accent) && ke({
|
|
392
392
|
active: !1,
|
|
393
393
|
primaryColor: (o = e.theme.colors) == null ? void 0 : o.primary,
|
|
394
394
|
secondaryColor: (l = e.theme.colors) == null ? void 0 : l.accent,
|
|
@@ -412,7 +412,7 @@ const Re = ({ className: e }) => {
|
|
|
412
412
|
}};
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
`,
|
|
415
|
+
`, Ye = a(Y)`
|
|
416
416
|
white-space: pre-wrap;
|
|
417
417
|
a {
|
|
418
418
|
color: ${(e) => e.theme.colors.link};
|
|
@@ -423,7 +423,7 @@ const Re = ({ className: e }) => {
|
|
|
423
423
|
}};
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
`,
|
|
426
|
+
`, Ge = a(le)`
|
|
427
427
|
padding: 0;
|
|
428
428
|
list-style: none;
|
|
429
429
|
margin: 0 -${(e) => {
|
|
@@ -436,7 +436,7 @@ const Re = ({ className: e }) => {
|
|
|
436
436
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
437
437
|
}};
|
|
438
438
|
}
|
|
439
|
-
`,
|
|
439
|
+
`, Je = a.button`
|
|
440
440
|
${(e) => G(e)};
|
|
441
441
|
display: block;
|
|
442
442
|
background-color: ${(e) => {
|
|
@@ -449,17 +449,17 @@ const Re = ({ className: e }) => {
|
|
|
449
449
|
${b}
|
|
450
450
|
background-color: transparent;
|
|
451
451
|
}
|
|
452
|
-
`,
|
|
453
|
-
({ boxed: e, className: t, agentData:
|
|
452
|
+
`, Qe = X(
|
|
453
|
+
({ boxed: e, className: t, agentData: r }, o) => /* @__PURE__ */ n.createElement(P, {
|
|
454
454
|
ref: o
|
|
455
|
-
}, /* @__PURE__ */
|
|
455
|
+
}, /* @__PURE__ */ n.createElement(U, {
|
|
456
456
|
left: e,
|
|
457
457
|
center: !e
|
|
458
|
-
}, /* @__PURE__ */
|
|
458
|
+
}, /* @__PURE__ */ n.createElement(_, {
|
|
459
459
|
padded: !!e,
|
|
460
460
|
stacked: e ? "first" : void 0
|
|
461
|
-
}, /* @__PURE__ */
|
|
462
|
-
),
|
|
461
|
+
}, /* @__PURE__ */ n.createElement(Pe, null, /* @__PURE__ */ n.createElement("div", null), /* @__PURE__ */ n.createElement("div", null), /* @__PURE__ */ n.createElement("div", null)))))
|
|
462
|
+
), ne = Qe, Xe = a.p`
|
|
463
463
|
&& {
|
|
464
464
|
font-size: ${(e) => {
|
|
465
465
|
var t;
|
|
@@ -474,27 +474,27 @@ const Re = ({ className: e }) => {
|
|
|
474
474
|
var t;
|
|
475
475
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
476
476
|
}};
|
|
477
|
-
`,
|
|
478
|
-
if (!t && !
|
|
477
|
+
`, re = (e) => new Date(e).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), Ze = ({ className: e, name: t, timestamp: r }) => {
|
|
478
|
+
if (!t && !r)
|
|
479
479
|
return null;
|
|
480
480
|
let o = "";
|
|
481
|
-
return t ?
|
|
482
|
-
},
|
|
483
|
-
const { avatar: l, name: s } =
|
|
484
|
-
return /* @__PURE__ */
|
|
481
|
+
return t ? r ? o = `${t}: ${re(r)}` : o = t : r && (o = re(r)), /* @__PURE__ */ n.createElement(Xe, null, o);
|
|
482
|
+
}, K = Ze, et = ({ className: e, children: t, sender: r, timestamp: o }) => {
|
|
483
|
+
const { avatar: l, name: s } = r, { avatarSize: u } = L();
|
|
484
|
+
return /* @__PURE__ */ n.createElement(tt, {
|
|
485
485
|
hasAvatar: !!l,
|
|
486
486
|
className: H(e, "humany-conversation-agent-message")
|
|
487
|
-
}, l && /* @__PURE__ */
|
|
487
|
+
}, l && /* @__PURE__ */ n.createElement(Fe, {
|
|
488
488
|
avatarSize: u
|
|
489
|
-
}, typeof l == "string" ? /* @__PURE__ */
|
|
489
|
+
}, typeof l == "string" ? /* @__PURE__ */ n.createElement("img", {
|
|
490
490
|
src: l
|
|
491
|
-
}) : /* @__PURE__ */
|
|
491
|
+
}) : /* @__PURE__ */ n.createElement(w, {
|
|
492
492
|
symbol: l
|
|
493
|
-
})), t, /* @__PURE__ */
|
|
493
|
+
})), t, /* @__PURE__ */ n.createElement(K, {
|
|
494
494
|
name: s,
|
|
495
495
|
timestamp: o
|
|
496
496
|
}));
|
|
497
|
-
},
|
|
497
|
+
}, tt = a.div`
|
|
498
498
|
display: grid;
|
|
499
499
|
margin-right: 10%;
|
|
500
500
|
width: 90%;
|
|
@@ -511,26 +511,26 @@ const Re = ({ className: e }) => {
|
|
|
511
511
|
'content'
|
|
512
512
|
'info';
|
|
513
513
|
`};
|
|
514
|
-
`,
|
|
515
|
-
({ className: e, children: t, timestamp:
|
|
514
|
+
`, ue = et, nt = X(
|
|
515
|
+
({ className: e, children: t, timestamp: r, discrete: o, fullWidth: l }, s) => /* @__PURE__ */ n.createElement(rt, {
|
|
516
516
|
ref: s,
|
|
517
517
|
className: H(e, "humany-conversation-system-message"),
|
|
518
518
|
fullWidth: l
|
|
519
|
-
}, o ? /* @__PURE__ */
|
|
519
|
+
}, o ? /* @__PURE__ */ n.createElement(ot, {
|
|
520
520
|
className: "humany-conversation-discrete-message"
|
|
521
|
-
}, t, /* @__PURE__ */
|
|
522
|
-
timestamp:
|
|
523
|
-
})) : /* @__PURE__ */
|
|
524
|
-
timestamp:
|
|
521
|
+
}, t, /* @__PURE__ */ n.createElement(K, {
|
|
522
|
+
timestamp: r
|
|
523
|
+
})) : /* @__PURE__ */ n.createElement(n.Fragment, null, t, /* @__PURE__ */ n.createElement(K, {
|
|
524
|
+
timestamp: r
|
|
525
525
|
})))
|
|
526
|
-
),
|
|
526
|
+
), rt = a.div`
|
|
527
527
|
${(e) => e.fullWidth && "width: 100%"};
|
|
528
528
|
padding: 0 ${(e) => {
|
|
529
529
|
var t;
|
|
530
530
|
return (t = e.theme.sizes) == null ? void 0 : t.large;
|
|
531
531
|
}};
|
|
532
532
|
overflow: auto;
|
|
533
|
-
`,
|
|
533
|
+
`, ot = a.div`
|
|
534
534
|
text-align: center;
|
|
535
535
|
word-wrap: break-word;
|
|
536
536
|
font-size: ${(e) => {
|
|
@@ -544,38 +544,38 @@ const Re = ({ className: e }) => {
|
|
|
544
544
|
> p {
|
|
545
545
|
margin: 0;
|
|
546
546
|
}
|
|
547
|
-
`,
|
|
548
|
-
const { userLabel: o = "" } =
|
|
549
|
-
return /* @__PURE__ */
|
|
547
|
+
`, at = nt, lt = ({ className: e, children: t, timestamp: r }) => {
|
|
548
|
+
const { userLabel: o = "" } = L();
|
|
549
|
+
return /* @__PURE__ */ n.createElement(st, {
|
|
550
550
|
className: H(e, "humany-conversation-user-message")
|
|
551
|
-
}, t, /* @__PURE__ */
|
|
551
|
+
}, t, /* @__PURE__ */ n.createElement(K, {
|
|
552
552
|
name: o,
|
|
553
|
-
timestamp:
|
|
553
|
+
timestamp: r
|
|
554
554
|
}));
|
|
555
|
-
},
|
|
555
|
+
}, st = a.div`
|
|
556
556
|
margin-left: 10%;
|
|
557
557
|
width: 90%;
|
|
558
558
|
display: flex;
|
|
559
559
|
flex-direction: column;
|
|
560
560
|
align-items: flex-end;
|
|
561
|
-
`, he = (e) => Array.isArray(e) ? e : Object.keys(e).map((t) => ({
|
|
561
|
+
`, it = lt, he = (e) => Array.isArray(e) ? e : Object.keys(e).map((t) => ({
|
|
562
562
|
label: e[t],
|
|
563
563
|
actionKey: t
|
|
564
|
-
})),
|
|
564
|
+
})), ct = ({ header: e, actions: t, dispatch: r }) => /* @__PURE__ */ n.createElement(mt, {
|
|
565
565
|
header: e,
|
|
566
566
|
items: he(t),
|
|
567
|
-
renderItem: (o) => /* @__PURE__ */
|
|
567
|
+
renderItem: (o) => /* @__PURE__ */ n.createElement("li", {
|
|
568
568
|
key: o.actionKey
|
|
569
|
-
}, /* @__PURE__ */
|
|
569
|
+
}, /* @__PURE__ */ n.createElement(dt, {
|
|
570
570
|
onClick: () => {
|
|
571
|
-
|
|
571
|
+
r("action", o);
|
|
572
572
|
},
|
|
573
573
|
"aria-label": o.label,
|
|
574
574
|
title: o.label
|
|
575
|
-
}, /* @__PURE__ */
|
|
575
|
+
}, /* @__PURE__ */ n.createElement(w, {
|
|
576
576
|
symbol: o.symbol
|
|
577
577
|
}), o.label))
|
|
578
|
-
}),
|
|
578
|
+
}), mt = a(J)`
|
|
579
579
|
${Q}
|
|
580
580
|
> ul {
|
|
581
581
|
display: flex;
|
|
@@ -589,7 +589,7 @@ const Re = ({ className: e }) => {
|
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
591
|
${T}
|
|
592
|
-
`,
|
|
592
|
+
`, dt = a(M)`
|
|
593
593
|
${G};
|
|
594
594
|
|
|
595
595
|
display: block;
|
|
@@ -617,14 +617,14 @@ const Re = ({ className: e }) => {
|
|
|
617
617
|
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
618
618
|
}};
|
|
619
619
|
}
|
|
620
|
-
`,
|
|
621
|
-
const
|
|
622
|
-
return !
|
|
620
|
+
`, ut = ({ type: e, content: t = {} }) => {
|
|
621
|
+
const r = Ce(e);
|
|
622
|
+
return !r || !e ? null : /* @__PURE__ */ n.createElement(Me, {
|
|
623
623
|
fallback: null
|
|
624
|
-
}, /* @__PURE__ */
|
|
625
|
-
},
|
|
624
|
+
}, /* @__PURE__ */ n.createElement(r, g({}, t)));
|
|
625
|
+
}, ht = ({ body: e }) => /* @__PURE__ */ n.createElement(gt, {
|
|
626
626
|
html: e
|
|
627
|
-
}),
|
|
627
|
+
}), gt = a(Y)`
|
|
628
628
|
${Se}
|
|
629
629
|
color: inherit;
|
|
630
630
|
white-space: pre-wrap;
|
|
@@ -635,26 +635,26 @@ const Re = ({ className: e }) => {
|
|
|
635
635
|
${b};
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
`,
|
|
638
|
+
`, ft = ({ header: e, actions: t, dispatch: r }) => /* @__PURE__ */ n.createElement(pt, {
|
|
639
639
|
header: e,
|
|
640
640
|
items: he(t),
|
|
641
|
-
renderItem: (o) => /* @__PURE__ */
|
|
641
|
+
renderItem: (o) => /* @__PURE__ */ n.createElement("li", {
|
|
642
642
|
key: o.actionKey
|
|
643
|
-
}, /* @__PURE__ */
|
|
643
|
+
}, /* @__PURE__ */ n.createElement(yt, {
|
|
644
644
|
help: o.actionKey === "help",
|
|
645
645
|
onClick: () => {
|
|
646
|
-
|
|
646
|
+
r("action", o);
|
|
647
647
|
},
|
|
648
648
|
"aria-label": o.label,
|
|
649
649
|
title: o.label
|
|
650
|
-
}, o.label, o.actionKey === "help" && /* @__PURE__ */
|
|
650
|
+
}, o.label, o.actionKey === "help" && /* @__PURE__ */ n.createElement(w, {
|
|
651
651
|
size: 14,
|
|
652
652
|
symbol: {
|
|
653
653
|
type: "Svg",
|
|
654
654
|
content: "caret-down"
|
|
655
655
|
}
|
|
656
656
|
})))
|
|
657
|
-
}),
|
|
657
|
+
}), pt = a(J)`
|
|
658
658
|
${Q}
|
|
659
659
|
${T}
|
|
660
660
|
|
|
@@ -676,7 +676,7 @@ const Re = ({ className: e }) => {
|
|
|
676
676
|
margin: 0;
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
`,
|
|
679
|
+
`, yt = a(M)`
|
|
680
680
|
display: block;
|
|
681
681
|
text-align: left;
|
|
682
682
|
font-weight: 300;
|
|
@@ -689,14 +689,14 @@ const Re = ({ className: e }) => {
|
|
|
689
689
|
overflow: hidden;
|
|
690
690
|
|
|
691
691
|
${(e) => {
|
|
692
|
-
var t,
|
|
692
|
+
var t, r;
|
|
693
693
|
return e.help && f`
|
|
694
694
|
color: ${(t = e.theme.colors) == null ? void 0 : t.text};
|
|
695
695
|
text-decoration: underline;
|
|
696
696
|
|
|
697
697
|
i,
|
|
698
698
|
svg {
|
|
699
|
-
margin-left: ${(
|
|
699
|
+
margin-left: ${(r = e.theme.sizes) == null ? void 0 : r.small};
|
|
700
700
|
}
|
|
701
701
|
`;
|
|
702
702
|
}}
|
|
@@ -711,17 +711,17 @@ const Re = ({ className: e }) => {
|
|
|
711
711
|
text-decoration: underline;
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
|
-
`,
|
|
714
|
+
`, bt = () => /* @__PURE__ */ n.createElement($t, null), $t = a.div`
|
|
715
715
|
${(e) => e.theme.border && `border-bottom: ${e.theme.border};`}
|
|
716
716
|
width: 100%;
|
|
717
|
-
`,
|
|
717
|
+
`, vt = ({ text: e }) => /* @__PURE__ */ n.createElement(Et, {
|
|
718
718
|
variant: "span"
|
|
719
|
-
}, e),
|
|
719
|
+
}, e), Et = a(q)`
|
|
720
720
|
${T}
|
|
721
|
-
`,
|
|
721
|
+
`, xt = ({
|
|
722
722
|
header: e = "Video call",
|
|
723
723
|
acceptLabel: t = "Accept",
|
|
724
|
-
declineLabel:
|
|
724
|
+
declineLabel: r = "Decline",
|
|
725
725
|
dispatch: o
|
|
726
726
|
}) => {
|
|
727
727
|
const l = He(() => [
|
|
@@ -734,35 +734,35 @@ const Re = ({ className: e }) => {
|
|
|
734
734
|
}
|
|
735
735
|
},
|
|
736
736
|
{
|
|
737
|
-
label:
|
|
737
|
+
label: r,
|
|
738
738
|
actionKey: "decline-video-call",
|
|
739
739
|
symbol: {
|
|
740
740
|
type: "Svg",
|
|
741
741
|
content: "close"
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
|
-
], [t,
|
|
745
|
-
return /* @__PURE__ */
|
|
744
|
+
], [t, r]);
|
|
745
|
+
return /* @__PURE__ */ n.createElement(wt, {
|
|
746
746
|
header: e,
|
|
747
747
|
items: l,
|
|
748
748
|
renderItem: (s) => {
|
|
749
749
|
const u = s.actionKey === "accept-video-call" ? "#70c48e" : "#da5c85";
|
|
750
|
-
return /* @__PURE__ */
|
|
750
|
+
return /* @__PURE__ */ n.createElement("li", {
|
|
751
751
|
key: s.actionKey
|
|
752
|
-
}, /* @__PURE__ */
|
|
752
|
+
}, /* @__PURE__ */ n.createElement(kt, {
|
|
753
753
|
onClick: () => {
|
|
754
754
|
o("action", s);
|
|
755
755
|
},
|
|
756
756
|
"aria-label": s.label,
|
|
757
757
|
title: s.label,
|
|
758
758
|
bgColor: u
|
|
759
|
-
}, /* @__PURE__ */
|
|
759
|
+
}, /* @__PURE__ */ n.createElement(w, {
|
|
760
760
|
symbol: s.symbol,
|
|
761
761
|
size: 25
|
|
762
762
|
})));
|
|
763
763
|
}
|
|
764
764
|
});
|
|
765
|
-
},
|
|
765
|
+
}, wt = a(J)`
|
|
766
766
|
${(e) => Q(e)}
|
|
767
767
|
> ul {
|
|
768
768
|
display: flex;
|
|
@@ -776,7 +776,7 @@ const Re = ({ className: e }) => {
|
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
${(e) => T(e)}
|
|
779
|
-
`,
|
|
779
|
+
`, kt = a(M)`
|
|
780
780
|
${G};
|
|
781
781
|
|
|
782
782
|
background-color: ${(e) => e.bgColor};
|
|
@@ -816,86 +816,86 @@ const Re = ({ className: e }) => {
|
|
|
816
816
|
stroke: #fff;
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
`,
|
|
820
|
-
items: e.map(
|
|
819
|
+
`, Ct = ([e, t]) => ({ type: e, content: t }), St = ({ items: e, dispatch: t }) => /* @__PURE__ */ n.createElement(zt, {
|
|
820
|
+
items: e.map(Ct),
|
|
821
821
|
renderLi: !0,
|
|
822
|
-
renderItem: (
|
|
823
|
-
switch (
|
|
822
|
+
renderItem: (r) => {
|
|
823
|
+
switch (r.type) {
|
|
824
824
|
case C.Text:
|
|
825
|
-
return /* @__PURE__ */
|
|
826
|
-
text:
|
|
825
|
+
return /* @__PURE__ */ n.createElement(vt, {
|
|
826
|
+
text: r.content
|
|
827
827
|
});
|
|
828
828
|
case C.HTML:
|
|
829
|
-
return /* @__PURE__ */
|
|
829
|
+
return /* @__PURE__ */ n.createElement(ht, g({}, r.content));
|
|
830
830
|
case C.Separator:
|
|
831
|
-
return /* @__PURE__ */
|
|
831
|
+
return /* @__PURE__ */ n.createElement(bt, g({}, r.content));
|
|
832
832
|
case C.LinkList:
|
|
833
|
-
return /* @__PURE__ */
|
|
833
|
+
return /* @__PURE__ */ n.createElement(ft, x(g({}, r.content), {
|
|
834
834
|
dispatch: t
|
|
835
835
|
}));
|
|
836
836
|
case C.ButtonList:
|
|
837
|
-
return /* @__PURE__ */
|
|
837
|
+
return /* @__PURE__ */ n.createElement(ct, x(g({}, r.content), {
|
|
838
838
|
dispatch: t
|
|
839
839
|
}));
|
|
840
840
|
case C.VideoRequest:
|
|
841
|
-
return /* @__PURE__ */
|
|
841
|
+
return /* @__PURE__ */ n.createElement(xt, x(g({}, r.content), {
|
|
842
842
|
dispatch: t
|
|
843
843
|
}));
|
|
844
844
|
default:
|
|
845
|
-
return /* @__PURE__ */
|
|
846
|
-
type:
|
|
847
|
-
content:
|
|
845
|
+
return /* @__PURE__ */ n.createElement(ut, {
|
|
846
|
+
type: r.type,
|
|
847
|
+
content: r.content
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
}),
|
|
851
|
+
}), zt = a(le)`
|
|
852
852
|
${ze}
|
|
853
853
|
|
|
854
854
|
> li {
|
|
855
855
|
margin: 0;
|
|
856
856
|
}
|
|
857
|
-
`,
|
|
858
|
-
({ className: e, timestamp: t, sender:
|
|
857
|
+
`, Lt = X(
|
|
858
|
+
({ className: e, timestamp: t, sender: r, type: o, content: l }, s) => {
|
|
859
859
|
const u = me(
|
|
860
860
|
(m) => {
|
|
861
861
|
let i = "first";
|
|
862
862
|
return l.length > 1 && (i = m === 0 ? "first" : m + 1 === l.length ? "last" : "middle"), i;
|
|
863
863
|
},
|
|
864
864
|
[l]
|
|
865
|
-
), c = () => /* @__PURE__ */
|
|
865
|
+
), c = () => /* @__PURE__ */ n.createElement(n.Fragment, null, l.map((m) => {
|
|
866
866
|
const { key: i, body: $, title: k, form: S, actions: E } = m, p = !!$ && !k && !S && !E;
|
|
867
|
-
return /* @__PURE__ */
|
|
867
|
+
return /* @__PURE__ */ n.createElement(at, {
|
|
868
868
|
className: e,
|
|
869
869
|
key: i,
|
|
870
870
|
discrete: p,
|
|
871
871
|
ref: s,
|
|
872
872
|
timestamp: t,
|
|
873
873
|
fullWidth: !!S || !!E
|
|
874
|
-
}, p && $ ? /* @__PURE__ */
|
|
874
|
+
}, p && $ ? /* @__PURE__ */ n.createElement(Y, {
|
|
875
875
|
html: $
|
|
876
|
-
}) : /* @__PURE__ */
|
|
876
|
+
}) : /* @__PURE__ */ n.createElement(F, {
|
|
877
877
|
isSystem: !0,
|
|
878
878
|
content: m
|
|
879
879
|
}));
|
|
880
|
-
})), h = () => /* @__PURE__ */
|
|
881
|
-
sender:
|
|
880
|
+
})), h = () => /* @__PURE__ */ n.createElement(ue, {
|
|
881
|
+
sender: r,
|
|
882
882
|
timestamp: t,
|
|
883
883
|
className: e
|
|
884
|
-
}, /* @__PURE__ */
|
|
884
|
+
}, /* @__PURE__ */ n.createElement(P, null, l.map((m, i) => /* @__PURE__ */ n.createElement(U, {
|
|
885
885
|
left: !0,
|
|
886
886
|
key: m.key,
|
|
887
887
|
ref: s
|
|
888
|
-
}, /* @__PURE__ */
|
|
888
|
+
}, /* @__PURE__ */ n.createElement(F, {
|
|
889
889
|
content: m,
|
|
890
890
|
stacked: u(i)
|
|
891
|
-
}))))), v = () => /* @__PURE__ */
|
|
891
|
+
}))))), v = () => /* @__PURE__ */ n.createElement(it, {
|
|
892
892
|
timestamp: t,
|
|
893
893
|
className: e
|
|
894
|
-
}, /* @__PURE__ */
|
|
894
|
+
}, /* @__PURE__ */ n.createElement(P, null, l.map((m, i) => /* @__PURE__ */ n.createElement(U, {
|
|
895
895
|
right: !0,
|
|
896
896
|
key: m.key,
|
|
897
897
|
ref: s
|
|
898
|
-
}, /* @__PURE__ */
|
|
898
|
+
}, /* @__PURE__ */ n.createElement(F, {
|
|
899
899
|
isUser: !0,
|
|
900
900
|
content: m,
|
|
901
901
|
stacked: u(i)
|
|
@@ -911,24 +911,24 @@ const Re = ({ className: e }) => {
|
|
|
911
911
|
return null;
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
|
-
), F = ({ content: e, isUser: t, isSystem:
|
|
914
|
+
), F = ({ content: e, isUser: t, isSystem: r, stacked: o }) => {
|
|
915
915
|
const l = V(), { title: s, body: u, actions: c, form: h, items: v } = e;
|
|
916
|
-
return v ? /* @__PURE__ */
|
|
916
|
+
return v ? /* @__PURE__ */ n.createElement(_, {
|
|
917
917
|
user: !!t,
|
|
918
918
|
stacked: o
|
|
919
|
-
}, /* @__PURE__ */
|
|
919
|
+
}, /* @__PURE__ */ n.createElement(St, {
|
|
920
920
|
items: v,
|
|
921
921
|
dispatch: l
|
|
922
|
-
})) : /* @__PURE__ */
|
|
923
|
-
padded: !
|
|
922
|
+
})) : /* @__PURE__ */ n.createElement(_, {
|
|
923
|
+
padded: !r,
|
|
924
924
|
user: !!t,
|
|
925
925
|
stacked: o,
|
|
926
926
|
fullWidth: !!h || !!c
|
|
927
|
-
}, s && /* @__PURE__ */
|
|
927
|
+
}, s && /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(Ue, {
|
|
928
928
|
variant: "h2"
|
|
929
|
-
}, s)), u && /* @__PURE__ */
|
|
929
|
+
}, s)), u && /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(Ye, {
|
|
930
930
|
html: u
|
|
931
|
-
})), h && /* @__PURE__ */
|
|
931
|
+
})), h && /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(qe, x(g({}, h), {
|
|
932
932
|
onChange: (i, $) => {
|
|
933
933
|
l("form", {
|
|
934
934
|
data: $,
|
|
@@ -936,11 +936,11 @@ const Re = ({ className: e }) => {
|
|
|
936
936
|
actionKey: i
|
|
937
937
|
});
|
|
938
938
|
}
|
|
939
|
-
}))), c && /* @__PURE__ */
|
|
939
|
+
}))), c && /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(Ge, {
|
|
940
940
|
items: Object.keys(c).map((i) => ({ label: c[i], actionKey: i })),
|
|
941
|
-
renderItem: (i) => /* @__PURE__ */
|
|
941
|
+
renderItem: (i) => /* @__PURE__ */ n.createElement("li", {
|
|
942
942
|
key: i.actionKey
|
|
943
|
-
}, /* @__PURE__ */
|
|
943
|
+
}, /* @__PURE__ */ n.createElement(Je, {
|
|
944
944
|
onClick: () => {
|
|
945
945
|
l("action", i.actionKey);
|
|
946
946
|
}
|
|
@@ -954,37 +954,37 @@ const Re = ({ className: e }) => {
|
|
|
954
954
|
behavior: "smooth"
|
|
955
955
|
});
|
|
956
956
|
}, 250);
|
|
957
|
-
}, []), [t,
|
|
957
|
+
}, []), [t, r] = oe(!0), {
|
|
958
958
|
messages: o,
|
|
959
959
|
loading: l,
|
|
960
960
|
typingActors: s = []
|
|
961
|
-
} =
|
|
961
|
+
} = L(), u = () => s && s.length ? s.map((c, h) => /* @__PURE__ */ n.createElement(W, {
|
|
962
962
|
id: `typing_${c.name}`,
|
|
963
963
|
key: `typing_${c.name}`
|
|
964
|
-
}, /* @__PURE__ */
|
|
964
|
+
}, /* @__PURE__ */ n.createElement(ue, {
|
|
965
965
|
timestamp: Date.now(),
|
|
966
966
|
sender: c
|
|
967
|
-
}, /* @__PURE__ */
|
|
967
|
+
}, /* @__PURE__ */ n.createElement(ne, {
|
|
968
968
|
boxed: !0,
|
|
969
969
|
ref: e
|
|
970
970
|
})))) : null;
|
|
971
|
-
return /* @__PURE__ */
|
|
971
|
+
return /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(Mt, {
|
|
972
972
|
tabIndex: 0,
|
|
973
973
|
scrollableCss: t,
|
|
974
|
-
ref:
|
|
974
|
+
ref: r
|
|
975
975
|
}, o && o.length ? o.map((c, h) => {
|
|
976
976
|
const { type: v, timestamp: m, sender: i, content: $ } = c;
|
|
977
|
-
return /* @__PURE__ */
|
|
977
|
+
return /* @__PURE__ */ n.createElement(W, {
|
|
978
978
|
className: "humany-conversation-entry",
|
|
979
979
|
tabIndex: -1,
|
|
980
980
|
key: `${v}_${i == null ? void 0 : i.name}_${m}_${$[0].key}`
|
|
981
|
-
}, /* @__PURE__ */
|
|
981
|
+
}, /* @__PURE__ */ n.createElement(Lt, x(g({}, c), {
|
|
982
982
|
ref: e
|
|
983
983
|
})));
|
|
984
|
-
}) : null, u(), l && /* @__PURE__ */
|
|
984
|
+
}) : null, u(), l && /* @__PURE__ */ n.createElement(W, null, /* @__PURE__ */ n.createElement(ne, {
|
|
985
985
|
ref: e
|
|
986
|
-
}))), /* @__PURE__ */
|
|
987
|
-
},
|
|
986
|
+
}))), /* @__PURE__ */ n.createElement(De, null));
|
|
987
|
+
}, Mt = a.div`
|
|
988
988
|
display: flex;
|
|
989
989
|
flex-direction: column;
|
|
990
990
|
align-items: stretch;
|
|
@@ -1035,39 +1035,39 @@ const Re = ({ className: e }) => {
|
|
|
1035
1035
|
font-weight: normal;
|
|
1036
1036
|
`
|
|
1037
1037
|
)}
|
|
1038
|
-
`,
|
|
1038
|
+
`, Ht = ({ dispatch: e }) => {
|
|
1039
1039
|
const t = Te(null);
|
|
1040
1040
|
return ce(() => {
|
|
1041
1041
|
t.current && t.current.parentNode && e("overlay-mounted", t.current);
|
|
1042
|
-
}, [t]), /* @__PURE__ */
|
|
1042
|
+
}, [t]), /* @__PURE__ */ n.createElement(ie, {
|
|
1043
1043
|
portalId: "humany-conversation-overlay-portal",
|
|
1044
1044
|
className: "humany-conversation-overlay-outlet",
|
|
1045
1045
|
ref: t
|
|
1046
1046
|
});
|
|
1047
|
-
},
|
|
1047
|
+
}, Tt = ({
|
|
1048
1048
|
dispatch: e,
|
|
1049
1049
|
header: t,
|
|
1050
|
-
buttonLabel:
|
|
1051
|
-
}) => /* @__PURE__ */
|
|
1050
|
+
buttonLabel: r
|
|
1051
|
+
}) => /* @__PURE__ */ n.createElement(It, {
|
|
1052
1052
|
portalId: "humany-conversation-portal",
|
|
1053
1053
|
className: "humany-conversation-outlet"
|
|
1054
|
-
}, /* @__PURE__ */
|
|
1054
|
+
}, /* @__PURE__ */ n.createElement(At, {
|
|
1055
1055
|
className: "humany-conversation-outlet-head"
|
|
1056
|
-
}, /* @__PURE__ */
|
|
1056
|
+
}, /* @__PURE__ */ n.createElement(Bt, {
|
|
1057
1057
|
className: "humany-conversation-outlet-head-button",
|
|
1058
|
-
"aria-label":
|
|
1059
|
-
title:
|
|
1058
|
+
"aria-label": r,
|
|
1059
|
+
title: r,
|
|
1060
1060
|
onClick: () => e("hide-overlay-conversation")
|
|
1061
|
-
}, /* @__PURE__ */
|
|
1061
|
+
}, /* @__PURE__ */ n.createElement(w, {
|
|
1062
1062
|
symbol: {
|
|
1063
1063
|
type: "Svg",
|
|
1064
1064
|
content: "caret-down"
|
|
1065
1065
|
},
|
|
1066
1066
|
size: 20
|
|
1067
|
-
})), t && /* @__PURE__ */
|
|
1067
|
+
})), t && /* @__PURE__ */ n.createElement(Rt, {
|
|
1068
1068
|
className: "humany-conversation-outlet-header",
|
|
1069
1069
|
variant: "h1"
|
|
1070
|
-
}, t)), /* @__PURE__ */
|
|
1070
|
+
}, t)), /* @__PURE__ */ n.createElement(ge, null)), It = a(ie)`
|
|
1071
1071
|
z-index: 11;
|
|
1072
1072
|
top: auto;
|
|
1073
1073
|
height: 65%;
|
|
@@ -1082,7 +1082,7 @@ const Re = ({ className: e }) => {
|
|
|
1082
1082
|
var t;
|
|
1083
1083
|
return (t = e.theme.sizes) == null ? void 0 : t.large;
|
|
1084
1084
|
}};
|
|
1085
|
-
`,
|
|
1085
|
+
`, At = a.div`
|
|
1086
1086
|
display: flex;
|
|
1087
1087
|
flex-direction: column;
|
|
1088
1088
|
justify-content: center;
|
|
@@ -1096,7 +1096,7 @@ const Re = ({ className: e }) => {
|
|
|
1096
1096
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
1097
1097
|
}};
|
|
1098
1098
|
${(e) => e.theme.border && `border-bottom: ${e.theme.border};`}
|
|
1099
|
-
`,
|
|
1099
|
+
`, Rt = a(q)`
|
|
1100
1100
|
font-size: ${(e) => {
|
|
1101
1101
|
var t;
|
|
1102
1102
|
return (t = e.theme.fonts) == null ? void 0 : t.medium;
|
|
@@ -1106,7 +1106,7 @@ const Re = ({ className: e }) => {
|
|
|
1106
1106
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
1107
1107
|
}};
|
|
1108
1108
|
margin: 0;
|
|
1109
|
-
`,
|
|
1109
|
+
`, Bt = a(M)`
|
|
1110
1110
|
display: flex;
|
|
1111
1111
|
align-items: center;
|
|
1112
1112
|
justify-content: center;
|
|
@@ -1129,26 +1129,26 @@ const Re = ({ className: e }) => {
|
|
|
1129
1129
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
1130
1130
|
}};
|
|
1131
1131
|
}
|
|
1132
|
-
`,
|
|
1133
|
-
var o =
|
|
1132
|
+
`, Yt = (r) => {
|
|
1133
|
+
var o = r, { className: e } = o, t = j(o, ["className"]);
|
|
1134
1134
|
const {
|
|
1135
1135
|
overlay: l,
|
|
1136
1136
|
overlayConversationHeader: s,
|
|
1137
1137
|
overlayConversationCloseLabel: u,
|
|
1138
1138
|
conversationControllerId: c
|
|
1139
|
-
} =
|
|
1140
|
-
return /* @__PURE__ */
|
|
1139
|
+
} = L(), h = V();
|
|
1140
|
+
return /* @__PURE__ */ n.createElement(Le.Provider, {
|
|
1141
1141
|
value: c ? { id: c } : null
|
|
1142
|
-
}, /* @__PURE__ */
|
|
1142
|
+
}, /* @__PURE__ */ n.createElement(Kt, x(g({}, t), {
|
|
1143
1143
|
className: H(e, "humany-conversation-component")
|
|
1144
|
-
}), /* @__PURE__ */
|
|
1144
|
+
}), /* @__PURE__ */ n.createElement(ge, null)), l && /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(Ht, {
|
|
1145
1145
|
dispatch: h
|
|
1146
|
-
}), l.conversation && /* @__PURE__ */
|
|
1146
|
+
}), l.conversation && /* @__PURE__ */ n.createElement(Tt, {
|
|
1147
1147
|
dispatch: h,
|
|
1148
1148
|
header: s,
|
|
1149
1149
|
buttonLabel: u
|
|
1150
1150
|
})));
|
|
1151
|
-
},
|
|
1151
|
+
}, Kt = a.div`
|
|
1152
1152
|
position: absolute;
|
|
1153
1153
|
right: 0;
|
|
1154
1154
|
left: 0;
|
|
@@ -1159,6 +1159,6 @@ const Re = ({ className: e }) => {
|
|
|
1159
1159
|
flex-direction: column;
|
|
1160
1160
|
`;
|
|
1161
1161
|
export {
|
|
1162
|
-
|
|
1162
|
+
Yt as default
|
|
1163
1163
|
};
|
|
1164
|
-
//# sourceMappingURL=conversation.
|
|
1164
|
+
//# sourceMappingURL=conversation.4bd3eedd.js.map
|