@banbox/chat 1.0.3 → 1.0.4
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/index.cjs +477 -295
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +475 -293
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chat/InboxPopup.tsx +208 -115
- package/src/chat/SinglePopup.tsx +55 -40
- package/src/ui/chat/ChatHeader.tsx +32 -24
- package/src/ui/chat/ChatListHeader.tsx +157 -156
- package/src/ui/chat/ChatScroll.tsx +71 -64
- package/src/ui/chat/TypingIndicator.tsx +36 -17
package/dist/index.cjs
CHANGED
|
@@ -4,14 +4,14 @@ var framerMotion = require('framer-motion');
|
|
|
4
4
|
var reactDom = require('react-dom');
|
|
5
5
|
var React10 = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var
|
|
7
|
+
var clsx16 = require('clsx');
|
|
8
8
|
var tailwindMerge = require('tailwind-merge');
|
|
9
9
|
var _Lottie = require('lottie-react');
|
|
10
10
|
|
|
11
11
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
|
|
13
13
|
var React10__default = /*#__PURE__*/_interopDefault(React10);
|
|
14
|
-
var
|
|
14
|
+
var clsx16__default = /*#__PURE__*/_interopDefault(clsx16);
|
|
15
15
|
var _Lottie__default = /*#__PURE__*/_interopDefault(_Lottie);
|
|
16
16
|
|
|
17
17
|
// src/chat/ChatRoot.tsx
|
|
@@ -107,7 +107,7 @@ var GalleryProvider = ({ children }) => {
|
|
|
107
107
|
return /* @__PURE__ */ jsxRuntime.jsx(GalleryContext.Provider, { value, children });
|
|
108
108
|
};
|
|
109
109
|
function cn(...inputs) {
|
|
110
|
-
return tailwindMerge.twMerge(
|
|
110
|
+
return tailwindMerge.twMerge(clsx16.clsx(inputs));
|
|
111
111
|
}
|
|
112
112
|
var sizeClasses = {
|
|
113
113
|
"26": "h-[26px] px-[10px] text-[12px] rounded-[4px] gap-1",
|
|
@@ -465,7 +465,7 @@ var ChatTranslateSettingsModal = ({
|
|
|
465
465
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
466
466
|
"div",
|
|
467
467
|
{
|
|
468
|
-
className:
|
|
468
|
+
className: clsx16__default.default(
|
|
469
469
|
isSingle ? "fixed inset-0 z-9999 flex" : "absolute inset-0 z-50 flex items-center justify-center"
|
|
470
470
|
),
|
|
471
471
|
onClick: () => onClose(),
|
|
@@ -478,7 +478,7 @@ var ChatTranslateSettingsModal = ({
|
|
|
478
478
|
"aria-modal": "true",
|
|
479
479
|
"aria-labelledby": "translate-settings-title",
|
|
480
480
|
onClick: (e) => e.stopPropagation(),
|
|
481
|
-
className:
|
|
481
|
+
className: clsx16__default.default(
|
|
482
482
|
isSingle ? "fixed bottom-6 right-6 w-[500px] max-w-[95vw]" : "relative w-[500px] max-w-[95vw]",
|
|
483
483
|
"z-10000 overflow-visible rounded-md bg-white shadow-[0_12px_30px_rgba(0,0,0,0.18)]",
|
|
484
484
|
className
|
|
@@ -561,7 +561,7 @@ var extColor = (ext) => {
|
|
|
561
561
|
var FilePreviewChip = ({ name, sizeMB, ext, onRemove }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mr-2 inline-flex items-center gap-3 whitespace-nowrap rounded-sm border border-[#e1e1e1] bg-white px-3 py-2 h-[65px] max-w-[185px]", children: [
|
|
562
562
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
563
563
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
564
|
-
/* @__PURE__ */ jsxRuntime.jsx(FileIcon, { className:
|
|
564
|
+
/* @__PURE__ */ jsxRuntime.jsx(FileIcon, { className: clsx16__default.default("h-[18px] w-[18px]", extColor(ext)) }),
|
|
565
565
|
" ",
|
|
566
566
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-sm font-normal text-black", children: name })
|
|
567
567
|
] }),
|
|
@@ -712,7 +712,7 @@ var ChatComposerBar = ({
|
|
|
712
712
|
{
|
|
713
713
|
type: "button",
|
|
714
714
|
onClick: sendText,
|
|
715
|
-
className:
|
|
715
|
+
className: clsx16__default.default(
|
|
716
716
|
"ms-1 grid h-[40px] w-[40px] place-items-center rounded-full text-[#ff5301] hover:bg-[#f8f8f8]"
|
|
717
717
|
),
|
|
718
718
|
title: hasAttachments ? "Send attachments" : "Send",
|
|
@@ -728,7 +728,7 @@ var ChatComposerBar = ({
|
|
|
728
728
|
type: "button",
|
|
729
729
|
onClick: sendAttachments,
|
|
730
730
|
disabled: !hasAttachments,
|
|
731
|
-
className:
|
|
731
|
+
className: clsx16__default.default(
|
|
732
732
|
"ms-1 grid h-[40px] w-[40px] place-items-center rounded-full hover:bg-[#f8f8f8]",
|
|
733
733
|
hasAttachments ? "text-[#ff5301]" : "text-[#B9C3D4]"
|
|
734
734
|
),
|
|
@@ -753,7 +753,7 @@ var ChatComposerBar = ({
|
|
|
753
753
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
754
754
|
RecordMicIcon,
|
|
755
755
|
{
|
|
756
|
-
className:
|
|
756
|
+
className: clsx16__default.default(
|
|
757
757
|
"h-6 w-6",
|
|
758
758
|
seconds % 2 === 0 ? "text-[#929292]" : "text-[#ff5301]"
|
|
759
759
|
)
|
|
@@ -1050,7 +1050,7 @@ var EmojiDropup = ({ open, onClose, onSelect, anchorRef, className }) => {
|
|
|
1050
1050
|
ref: panelRef,
|
|
1051
1051
|
role: "dialog",
|
|
1052
1052
|
"aria-label": "Emoji picker",
|
|
1053
|
-
className:
|
|
1053
|
+
className: clsx16__default.default("emoji-dropup", className),
|
|
1054
1054
|
style: {
|
|
1055
1055
|
zIndex: "9999",
|
|
1056
1056
|
width: WIDTH2,
|
|
@@ -1194,7 +1194,7 @@ var ReplyCard = ({ refMsg, onClose, compact, className, jumpOnClick }) => {
|
|
|
1194
1194
|
"div",
|
|
1195
1195
|
{
|
|
1196
1196
|
onClick: clickToJump,
|
|
1197
|
-
className:
|
|
1197
|
+
className: clsx16__default.default(
|
|
1198
1198
|
widthClamp,
|
|
1199
1199
|
"relative rounded-md bg-[#f8f8f8] px-3",
|
|
1200
1200
|
"border-l-2 border-[#FF5300]",
|
|
@@ -1513,7 +1513,7 @@ var ChatFooter = ({
|
|
|
1513
1513
|
}
|
|
1514
1514
|
setSeconds(0);
|
|
1515
1515
|
};
|
|
1516
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1516
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx16__default.default("border-t border-[#ededed] bg-white p-3.5", className), children: [
|
|
1517
1517
|
replyTo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxRuntime.jsx(ReplyCard_default, { refMsg: replyTo, onClose: clearReply }) }),
|
|
1518
1518
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1519
1519
|
AttachmentPreviewStrip_default,
|
|
@@ -1611,12 +1611,27 @@ var ChatFooter = ({
|
|
|
1611
1611
|
] });
|
|
1612
1612
|
};
|
|
1613
1613
|
var ChatFooter_default = ChatFooter;
|
|
1614
|
-
function ChatHeader({ left, right, below
|
|
1614
|
+
function ChatHeader({ left, right, below }) {
|
|
1615
1615
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1616
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1616
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1617
|
+
"div",
|
|
1618
|
+
{
|
|
1619
|
+
style: {
|
|
1620
|
+
borderBottom: "1px solid #e1e1e1",
|
|
1621
|
+
height: 64,
|
|
1622
|
+
display: "flex",
|
|
1623
|
+
alignItems: "flex-start",
|
|
1624
|
+
justifyContent: "space-between",
|
|
1625
|
+
paddingLeft: 16,
|
|
1626
|
+
paddingRight: 16,
|
|
1627
|
+
paddingTop: 10
|
|
1628
|
+
},
|
|
1629
|
+
children: [
|
|
1630
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "flex-start", gap: 12 }, children: left }),
|
|
1631
|
+
right
|
|
1632
|
+
]
|
|
1633
|
+
}
|
|
1634
|
+
),
|
|
1620
1635
|
below && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: below })
|
|
1621
1636
|
] });
|
|
1622
1637
|
}
|
|
@@ -1634,11 +1649,11 @@ var ChatIdentity = (props) => {
|
|
|
1634
1649
|
size = 46,
|
|
1635
1650
|
className
|
|
1636
1651
|
} = props;
|
|
1637
|
-
const subtitleClass =
|
|
1652
|
+
const subtitleClass = clsx16__default.default(
|
|
1638
1653
|
"text-[10px] font-medium",
|
|
1639
1654
|
subtitleVariant === "live" ? "text-[#1E9E6A]" : "text-[#929292]"
|
|
1640
1655
|
);
|
|
1641
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1656
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx16__default.default("flex items-start gap-3", className), children: [
|
|
1642
1657
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", style: { width: size, height: size }, children: [
|
|
1643
1658
|
props.variant === "avatar" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1644
1659
|
"img",
|
|
@@ -1651,7 +1666,7 @@ var ChatIdentity = (props) => {
|
|
|
1651
1666
|
props.variant === "initial" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1652
1667
|
"div",
|
|
1653
1668
|
{
|
|
1654
|
-
className:
|
|
1669
|
+
className: clsx16__default.default(
|
|
1655
1670
|
"grid h-full w-full place-items-center rounded-xs text-[15px] font-semibold text-[#2c2c2c]",
|
|
1656
1671
|
props.textClassName
|
|
1657
1672
|
),
|
|
@@ -1726,7 +1741,7 @@ var ChatInquiryBar = ({ id, onView, className, label, buttonLabel }) => {
|
|
|
1726
1741
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1727
1742
|
"div",
|
|
1728
1743
|
{
|
|
1729
|
-
className:
|
|
1744
|
+
className: clsx16__default.default(
|
|
1730
1745
|
"flex items-center justify-between border-b border-[#ededed] bg-[#f8f8f8] ps-[16px] pe-[30px] h-[30px]",
|
|
1731
1746
|
className
|
|
1732
1747
|
),
|
|
@@ -1759,7 +1774,7 @@ var ChatInquiryBar = ({ id, onView, className, label, buttonLabel }) => {
|
|
|
1759
1774
|
);
|
|
1760
1775
|
};
|
|
1761
1776
|
var ChatInquiryBar_default = ChatInquiryBar;
|
|
1762
|
-
var ChatListHeader = ({
|
|
1777
|
+
var ChatListHeader = ({ onClose, onSearchChange }) => {
|
|
1763
1778
|
const [searching, setSearching] = React10__default.default.useState(false);
|
|
1764
1779
|
const [q, setQ] = React10__default.default.useState("");
|
|
1765
1780
|
const inputRef = React10__default.default.useRef(null);
|
|
@@ -1772,9 +1787,7 @@ var ChatListHeader = ({ className, onClose, onSearchChange }) => {
|
|
|
1772
1787
|
};
|
|
1773
1788
|
}, [searching]);
|
|
1774
1789
|
React10__default.default.useEffect(() => {
|
|
1775
|
-
if (!searching)
|
|
1776
|
-
return;
|
|
1777
|
-
}
|
|
1790
|
+
if (!searching) return;
|
|
1778
1791
|
const onKey = (e) => {
|
|
1779
1792
|
if (e.key === "Escape") {
|
|
1780
1793
|
setSearching(false);
|
|
@@ -1793,91 +1806,117 @@ var ChatListHeader = ({ className, onClose, onSearchChange }) => {
|
|
|
1793
1806
|
inFromLeft: { opacity: 1, x: 0, transition: { duration: 0.18, ease: [0.16, 1, 0.3, 1] } },
|
|
1794
1807
|
outToRight: { opacity: 0, x: 24, transition: { duration: 0.16, ease: [0.4, 0, 1, 1] } }
|
|
1795
1808
|
};
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
className: "h-9 w-9 place-items-center rounded-full hover:bg-black/5 flex items-center justify-center",
|
|
1818
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ChatSearchIcon, { className: "w-5 h-5" })
|
|
1819
|
-
}
|
|
1820
|
-
),
|
|
1821
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1822
|
-
"button",
|
|
1823
|
-
{
|
|
1824
|
-
title: "Close",
|
|
1825
|
-
onClick: onClose,
|
|
1826
|
-
className: "h-9 w-9 place-items-center rounded-full hover:bg-black/5 flex items-center justify-center",
|
|
1827
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ChatXIcon, { className: "w-6 h-6" })
|
|
1828
|
-
}
|
|
1829
|
-
)
|
|
1830
|
-
] })
|
|
1831
|
-
]
|
|
1809
|
+
const btnStyle = {
|
|
1810
|
+
height: 36,
|
|
1811
|
+
width: 36,
|
|
1812
|
+
display: "flex",
|
|
1813
|
+
alignItems: "center",
|
|
1814
|
+
justifyContent: "center",
|
|
1815
|
+
borderRadius: "50%",
|
|
1816
|
+
border: "none",
|
|
1817
|
+
background: "transparent",
|
|
1818
|
+
cursor: "pointer"
|
|
1819
|
+
};
|
|
1820
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1821
|
+
"div",
|
|
1822
|
+
{
|
|
1823
|
+
style: {
|
|
1824
|
+
height: 64,
|
|
1825
|
+
borderBottom: "1px solid #ededed",
|
|
1826
|
+
display: "flex",
|
|
1827
|
+
alignItems: "center",
|
|
1828
|
+
paddingLeft: 20,
|
|
1829
|
+
paddingRight: 20
|
|
1832
1830
|
},
|
|
1833
|
-
"
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1864
|
-
"button",
|
|
1831
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, mode: "wait", children: !searching ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1832
|
+
framerMotion.motion.div,
|
|
1833
|
+
{
|
|
1834
|
+
style: { display: "flex", width: "100%", alignItems: "center", justifyContent: "space-between" },
|
|
1835
|
+
initial: { opacity: 0, x: -24 },
|
|
1836
|
+
animate: "inFromLeft",
|
|
1837
|
+
exit: "outToLeft",
|
|
1838
|
+
variants,
|
|
1839
|
+
children: [
|
|
1840
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, color: "#2c2c2c" }, children: [
|
|
1841
|
+
/* @__PURE__ */ jsxRuntime.jsx(MessageIcon, { className: "w-6 h-6" }),
|
|
1842
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 22, fontWeight: 600 }, children: "Messenger" })
|
|
1843
|
+
] }),
|
|
1844
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
1845
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { title: "Search", onClick: () => setSearching(true), style: btnStyle, children: /* @__PURE__ */ jsxRuntime.jsx(ChatSearchIcon, { className: "w-5 h-5" }) }),
|
|
1846
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { title: "Close", onClick: onClose, style: btnStyle, children: /* @__PURE__ */ jsxRuntime.jsx(ChatXIcon, { className: "w-6 h-6" }) })
|
|
1847
|
+
] })
|
|
1848
|
+
]
|
|
1849
|
+
},
|
|
1850
|
+
"normal"
|
|
1851
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1852
|
+
framerMotion.motion.div,
|
|
1853
|
+
{
|
|
1854
|
+
style: { display: "flex", width: "100%", alignItems: "center", gap: 12 },
|
|
1855
|
+
initial: { opacity: 0, x: 24 },
|
|
1856
|
+
animate: "inFromRight",
|
|
1857
|
+
exit: "outToRight",
|
|
1858
|
+
variants,
|
|
1859
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1860
|
+
"div",
|
|
1865
1861
|
{
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1862
|
+
style: {
|
|
1863
|
+
display: "flex",
|
|
1864
|
+
flex: 1,
|
|
1865
|
+
height: 40,
|
|
1866
|
+
alignItems: "center",
|
|
1867
|
+
borderRadius: 9999,
|
|
1868
|
+
border: "1px solid #6A6A6A",
|
|
1869
|
+
backgroundColor: "#fff",
|
|
1870
|
+
padding: "0 4px",
|
|
1871
|
+
gap: 6
|
|
1871
1872
|
},
|
|
1872
|
-
|
|
1873
|
-
|
|
1873
|
+
children: [
|
|
1874
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", flex: 1, marginLeft: 12 }, children: [
|
|
1875
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginRight: 8, color: "#929292", flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(ChatSearchIcon, { className: "w-5 h-5" }) }),
|
|
1876
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginRight: 8, height: 24, width: 1, flexShrink: 0, backgroundColor: "#e1e1e1" } }),
|
|
1877
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1878
|
+
"input",
|
|
1879
|
+
{
|
|
1880
|
+
ref: inputRef,
|
|
1881
|
+
value: q,
|
|
1882
|
+
onChange: (e) => {
|
|
1883
|
+
setQ(e.target.value);
|
|
1884
|
+
onSearchChange?.(e.target.value);
|
|
1885
|
+
},
|
|
1886
|
+
placeholder: "Search",
|
|
1887
|
+
style: {
|
|
1888
|
+
flex: 1,
|
|
1889
|
+
height: "100%",
|
|
1890
|
+
background: "transparent",
|
|
1891
|
+
fontSize: 15,
|
|
1892
|
+
outline: "none",
|
|
1893
|
+
border: "none",
|
|
1894
|
+
color: "#2c2c2c"
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
)
|
|
1898
|
+
] }),
|
|
1899
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1900
|
+
"button",
|
|
1901
|
+
{
|
|
1902
|
+
title: "Close search",
|
|
1903
|
+
onClick: () => {
|
|
1904
|
+
setSearching(false);
|
|
1905
|
+
setQ("");
|
|
1906
|
+
onSearchChange?.("");
|
|
1907
|
+
},
|
|
1908
|
+
style: { ...btnStyle, height: 32, width: 32 },
|
|
1909
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChatXIcon, { className: "w-5 h-5" })
|
|
1910
|
+
}
|
|
1911
|
+
)
|
|
1912
|
+
]
|
|
1874
1913
|
}
|
|
1875
|
-
)
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
)
|
|
1914
|
+
)
|
|
1915
|
+
},
|
|
1916
|
+
"search"
|
|
1917
|
+
) })
|
|
1918
|
+
}
|
|
1919
|
+
);
|
|
1881
1920
|
};
|
|
1882
1921
|
var ChatListHeader_default = ChatListHeader;
|
|
1883
1922
|
var Row = ({ icon, label, value, highlight }) => {
|
|
@@ -1935,7 +1974,7 @@ var ChatAddressCard = ({ mine, card, className }) => {
|
|
|
1935
1974
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1936
1975
|
"div",
|
|
1937
1976
|
{
|
|
1938
|
-
className:
|
|
1977
|
+
className: clsx16__default.default(
|
|
1939
1978
|
"w-[340px] rounded-md bg-[#f8f8f8] p-2",
|
|
1940
1979
|
mine ? "ml-auto" : "mr-auto",
|
|
1941
1980
|
className
|
|
@@ -2083,7 +2122,7 @@ var ChatBubbleAudio = ({ mine, audio }) => {
|
|
|
2083
2122
|
type: "button",
|
|
2084
2123
|
"aria-label": playing ? "Pause" : "Play",
|
|
2085
2124
|
onClick: toggle,
|
|
2086
|
-
className:
|
|
2125
|
+
className: clsx16__default.default(
|
|
2087
2126
|
"grid h-7 w-[34px] place-items-center rounded-md transition-colors",
|
|
2088
2127
|
mine ? "bg-[#F1F1F1] text-[#00486F]" : "bg-[#F1F1F1] text-[#00486F]"
|
|
2089
2128
|
),
|
|
@@ -2154,7 +2193,7 @@ var extColor2 = (ext) => {
|
|
|
2154
2193
|
var FileChip = ({ file }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3 rounded-sm border border-[#e1e1e1] bg-white px-3 py-2", children: [
|
|
2155
2194
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
2156
2195
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
2157
|
-
/* @__PURE__ */ jsxRuntime.jsx(FileIcon, { className:
|
|
2196
|
+
/* @__PURE__ */ jsxRuntime.jsx(FileIcon, { className: clsx16__default.default("h-[18px] w-[18px]", extColor2(file.ext)) }),
|
|
2158
2197
|
" ",
|
|
2159
2198
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-xs font-normal text-black", children: file.name })
|
|
2160
2199
|
] }),
|
|
@@ -2269,14 +2308,14 @@ var ChatBubbleText = ({ mine, text }) => {
|
|
|
2269
2308
|
const color = mine ? "bg-[#f8f8f8] border-[#f1f1f1]" : "bg-white border-[#EFEFEF]";
|
|
2270
2309
|
const corner = mine ? "rounded-tr-[6px]" : "rounded-tl-md";
|
|
2271
2310
|
const textFormatting = "whitespace-pre-wrap break-words";
|
|
2272
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2311
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx16__default.default(base, color, corner, textFormatting), children: text });
|
|
2273
2312
|
};
|
|
2274
2313
|
var ChatBubbleText_default = ChatBubbleText;
|
|
2275
2314
|
var ChatBusinessCard = ({ mine, card }) => {
|
|
2276
2315
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2277
2316
|
"div",
|
|
2278
2317
|
{
|
|
2279
|
-
className:
|
|
2318
|
+
className: clsx16__default.default(
|
|
2280
2319
|
"relative h-[208px] w-[355px] overflow-hidden rounded-[12px] bg-white bg-cover bg-no-repeat",
|
|
2281
2320
|
"shadow-[0_2px_12px_rgba(59,51,51,0.1)]",
|
|
2282
2321
|
mine ? "ml-auto" : "mr-auto"
|
|
@@ -2336,13 +2375,13 @@ var MessageHoverActions = ({
|
|
|
2336
2375
|
const showTranslate = !isItemButton || isItemButton.includes("translate");
|
|
2337
2376
|
const hasAny = showReplay || showTranslate;
|
|
2338
2377
|
const isActive = (k) => !!activeButtons?.includes(k);
|
|
2339
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2378
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx16__default.default("relative inline-flex group/message", className), children: [
|
|
2340
2379
|
children,
|
|
2341
2380
|
hasAny && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2342
2381
|
"div",
|
|
2343
2382
|
{
|
|
2344
2383
|
"aria-hidden": true,
|
|
2345
|
-
className:
|
|
2384
|
+
className: clsx16__default.default(
|
|
2346
2385
|
"absolute inset-y-0 w-2",
|
|
2347
2386
|
mine ? "right-full" : "left-full",
|
|
2348
2387
|
"pointer-events-auto"
|
|
@@ -2352,7 +2391,7 @@ var MessageHoverActions = ({
|
|
|
2352
2391
|
hasAny && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2353
2392
|
"div",
|
|
2354
2393
|
{
|
|
2355
|
-
className:
|
|
2394
|
+
className: clsx16__default.default(
|
|
2356
2395
|
"absolute bottom-0 pointer-events-auto transition-opacity",
|
|
2357
2396
|
sidePos,
|
|
2358
2397
|
railNudge,
|
|
@@ -2372,7 +2411,7 @@ var MessageHoverActions = ({
|
|
|
2372
2411
|
e.stopPropagation();
|
|
2373
2412
|
onReply?.();
|
|
2374
2413
|
},
|
|
2375
|
-
className:
|
|
2414
|
+
className: clsx16__default.default(
|
|
2376
2415
|
"inline-flex h-[22px] w-[22px] items-center justify-center rounded-sm bg-white text-[#2c2c2c] shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:bg-[#f8f8f8]",
|
|
2377
2416
|
isActive("replay") && "bg-[#636363] text-white"
|
|
2378
2417
|
),
|
|
@@ -2393,7 +2432,7 @@ var MessageHoverActions = ({
|
|
|
2393
2432
|
e.stopPropagation();
|
|
2394
2433
|
onTranslate?.();
|
|
2395
2434
|
},
|
|
2396
|
-
className:
|
|
2435
|
+
className: clsx16__default.default(
|
|
2397
2436
|
"inline-flex h-[22px] w-[22px] items-center justify-center rounded-sm bg-white text-[#2c2c2c] shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:bg-[#f8f8f8]",
|
|
2398
2437
|
isActive("translate") && "!bg-[#636363] text-white"
|
|
2399
2438
|
),
|
|
@@ -2449,7 +2488,7 @@ var ChatMessageItem = ({
|
|
|
2449
2488
|
setTranslated((v) => !v);
|
|
2450
2489
|
onTranslate?.();
|
|
2451
2490
|
};
|
|
2452
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2491
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx16__default.default("mb-4", className), "data-msg-id": id, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx16__default.default("flex items-end gap-3", mine && "justify-end"), children: [
|
|
2453
2492
|
!mine && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${showStatus ? "mb-5" : "mb-0"}`, children: initialSrc ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative h-10 w-10 shrink-0 rounded-full border border-[#F1F1F1]", children: [
|
|
2454
2493
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2455
2494
|
"img",
|
|
@@ -2471,19 +2510,19 @@ var ChatMessageItem = ({
|
|
|
2471
2510
|
]
|
|
2472
2511
|
}
|
|
2473
2512
|
) }),
|
|
2474
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2513
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx16__default.default("flex flex-col gap-1 w-full"), children: [
|
|
2475
2514
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2476
2515
|
"div",
|
|
2477
2516
|
{
|
|
2478
|
-
className:
|
|
2517
|
+
className: clsx16__default.default(
|
|
2479
2518
|
" text-xs font-light text-[#636363]",
|
|
2480
2519
|
mine ? "text-right" : "text-left"
|
|
2481
2520
|
),
|
|
2482
2521
|
children: time
|
|
2483
2522
|
}
|
|
2484
2523
|
),
|
|
2485
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2486
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2524
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx16__default.default("flex flex-col gap-1 w-full", mine ? "items-end" : "items-start"), children: [
|
|
2525
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx16__default.default("flex w-full", mine ? "justify-end" : "justify-start"), children: replyTo && /* @__PURE__ */ jsxRuntime.jsx(ReplyCard_default, { jumpOnClick: true, refMsg: replyTo, compact: true, className: "mb-1" }) }),
|
|
2487
2526
|
businessCard ? /* @__PURE__ */ jsxRuntime.jsx(ChatBusinessCard_default, { mine, card: businessCard }) : null,
|
|
2488
2527
|
addressCard ? /* @__PURE__ */ jsxRuntime.jsx(ChatAddressCard_default, { mine, card: addressCard }) : null,
|
|
2489
2528
|
images?.length ? /* @__PURE__ */ jsxRuntime.jsx(MessageHoverActions_default, { mine, onReply, isItemButton: ["replay"], children: /* @__PURE__ */ jsxRuntime.jsx(ChatBubbleImages_default, { images }) }) : null,
|
|
@@ -2500,7 +2539,7 @@ var ChatMessageItem = ({
|
|
|
2500
2539
|
children: /* @__PURE__ */ jsxRuntime.jsx(ChatBubbleText_default, { mine, text: displayText })
|
|
2501
2540
|
}
|
|
2502
2541
|
) : null,
|
|
2503
|
-
showStatus && /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2542
|
+
showStatus && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx16__default.default("text-xs text-[#9AA1A9]", mine ? "text-right" : "text-left"), children: status })
|
|
2504
2543
|
] })
|
|
2505
2544
|
] })
|
|
2506
2545
|
] }) });
|
|
@@ -2509,7 +2548,7 @@ var ChatMessageItem_default = ChatMessageItem;
|
|
|
2509
2548
|
var ChatScroll = ({
|
|
2510
2549
|
top,
|
|
2511
2550
|
children,
|
|
2512
|
-
|
|
2551
|
+
style,
|
|
2513
2552
|
bottomAlignWhenShort = false,
|
|
2514
2553
|
scrollKey
|
|
2515
2554
|
}) => {
|
|
@@ -2531,17 +2570,26 @@ var ChatScroll = ({
|
|
|
2531
2570
|
{
|
|
2532
2571
|
ref,
|
|
2533
2572
|
"data-chat-scroll": true,
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2573
|
+
style: {
|
|
2574
|
+
height: "100%",
|
|
2575
|
+
minHeight: 0,
|
|
2576
|
+
overflowY: "auto",
|
|
2577
|
+
backgroundColor: "#fff",
|
|
2578
|
+
padding: 16,
|
|
2579
|
+
// custom scrollbar — hide track for clean look
|
|
2580
|
+
scrollbarWidth: "thin",
|
|
2581
|
+
scrollbarColor: "#d1d5db transparent",
|
|
2582
|
+
...style
|
|
2583
|
+
},
|
|
2538
2584
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2539
2585
|
"div",
|
|
2540
2586
|
{
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2587
|
+
style: {
|
|
2588
|
+
minHeight: "100%",
|
|
2589
|
+
display: "flex",
|
|
2590
|
+
flexDirection: "column",
|
|
2591
|
+
justifyContent: bottomAlignWhenShort ? "flex-end" : "flex-start"
|
|
2592
|
+
},
|
|
2545
2593
|
children: [
|
|
2546
2594
|
top,
|
|
2547
2595
|
children
|
|
@@ -2588,7 +2636,7 @@ var ChatThreadItem = ({
|
|
|
2588
2636
|
"button",
|
|
2589
2637
|
{
|
|
2590
2638
|
onClick,
|
|
2591
|
-
className:
|
|
2639
|
+
className: clsx16__default.default(
|
|
2592
2640
|
"relative w-full text-left px-5 py-2 hover:bg-[#f8f8f8] focus:outline-none h-[75px]",
|
|
2593
2641
|
active && "bg-[#f8f8f8]",
|
|
2594
2642
|
className
|
|
@@ -2641,39 +2689,64 @@ var ChatThreadItem_default = ChatThreadItem;
|
|
|
2641
2689
|
var typingdotanimation2_default = { v: "5.12.1", fr: 25, ip: 0, op: 59, w: 400, h: 100, nm: "Composizione 1", ddd: 0, assets: [{ id: "comp_0", nm: "barra", fr: 25, layers: [{ ddd: 0, ind: 1, ty: 4, nm: "barra contorni", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 1, k: [{ i: { x: 0.541, y: 1 }, o: { x: 0.158, y: 0 }, t: 0, s: [47, 189.5, 0], to: [48.333, 0, 0], ti: [-48.333, 0, 0] }, { t: 60, s: [337, 189.5, 0] }], ix: 2, l: 2 }, a: { a: 0, k: [57.25, 4.75, 0], ix: 1, l: 2 }, s: { a: 0, k: [100, 100, 100], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[2.485, 0], [0, 0], [0, 2.485], [-2.485, 0], [0, 0], [0, -2.485]], o: [[0, 0], [-2.485, 0], [0, -2.485], [0, 0], [2.485, 0], [0, 2.485]], v: [[52.5, 4.5], [-52.5, 4.5], [-57, 0], [-52.5, -4.5], [52.5, -4.5], [57, 0]], c: true }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: false }, { ty: "fl", c: { a: 1, k: [{ i: { x: [0.833], y: [1] }, o: { x: [0.167], y: [0] }, t: 0, s: [0.058823529631, 0.800000011921, 0.807843148708, 1] }, { i: { x: [0.833], y: [0.999] }, o: { x: [0.167], y: [1e-3] }, t: 23, s: [0, 0.419607847929, 0.470588237047, 1] }, { t: 49, s: [0.376470595598, 0.435294121504, 0.482352942228, 1] }], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Riempimento 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [57.25, 4.75], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Gruppo 1", np: 2, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: false }], ip: 0, op: 250, st: 0, ct: 1, bm: 0 }] }], layers: [{ ddd: 0, ind: 1, ty: 0, nm: "barra", refId: "comp_0", sr: 0.89999997615814, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [201, 50, 0], ix: 2, l: 2 }, a: { a: 0, k: [190, 190, 0], ix: 1, l: 2 }, s: { a: 0, k: [120, 120, 100], ix: 6, l: 2 } }, ao: 0, hasMask: true, masksProperties: [{ inv: false, mode: "a", pt: { a: 0, k: { i: [[2.347, 0], [0, 0], [0, -2.347], [-2.347, 0], [0, 0], [0, 2.347]], o: [[0, 0], [-2.347, 0], [0, 2.347], [0, 0], [2.347, 0], [0, -2.347]], v: [[270.25, 185], [108.75, 185], [104.5, 189.25], [108.75, 193.5], [270.25, 193.5], [274.5, 189.25]], c: true }, ix: 1 }, o: { a: 0, k: 100, ix: 3 }, x: { a: 0, k: 0, ix: 4 }, nm: "Mask 1" }], w: 380, h: 380, ip: 0, op: 59, st: 0, bm: 0 }], markers: [], props: {} };
|
|
2642
2690
|
var Lottie2 = _Lottie__default.default.default ?? _Lottie__default.default;
|
|
2643
2691
|
var TypingIndicator = ({
|
|
2644
|
-
size = 18,
|
|
2645
2692
|
loop = true,
|
|
2646
2693
|
autoplay = true,
|
|
2647
|
-
className,
|
|
2648
2694
|
ariaLabel = "Typing\u2026",
|
|
2649
|
-
avatarSize = 40
|
|
2695
|
+
avatarSize = 40,
|
|
2696
|
+
style
|
|
2650
2697
|
}) => {
|
|
2651
2698
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2652
2699
|
"div",
|
|
2653
2700
|
{
|
|
2654
|
-
className: cn("relative flex items-end gap-[6px]", className),
|
|
2655
2701
|
role: "status",
|
|
2656
2702
|
"aria-label": ariaLabel,
|
|
2703
|
+
style: {
|
|
2704
|
+
position: "relative",
|
|
2705
|
+
display: "flex",
|
|
2706
|
+
alignItems: "flex-end",
|
|
2707
|
+
gap: 6,
|
|
2708
|
+
...style
|
|
2709
|
+
},
|
|
2657
2710
|
children: [
|
|
2658
2711
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2659
2712
|
"div",
|
|
2660
2713
|
{
|
|
2661
|
-
|
|
2662
|
-
|
|
2714
|
+
style: {
|
|
2715
|
+
position: "relative",
|
|
2716
|
+
flexShrink: 0,
|
|
2717
|
+
borderRadius: "50%",
|
|
2718
|
+
border: "1px solid #F1F1F1",
|
|
2719
|
+
width: avatarSize,
|
|
2720
|
+
height: avatarSize
|
|
2721
|
+
},
|
|
2663
2722
|
children: [
|
|
2664
2723
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2665
2724
|
"img",
|
|
2666
2725
|
{
|
|
2667
2726
|
src: "/chat/img/girl_support.png",
|
|
2668
2727
|
alt: "avatar image",
|
|
2669
|
-
|
|
2728
|
+
style: { height: "100%", width: "100%", borderRadius: "50%", objectFit: "cover" }
|
|
2670
2729
|
}
|
|
2671
2730
|
),
|
|
2672
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2731
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2732
|
+
"span",
|
|
2733
|
+
{
|
|
2734
|
+
style: {
|
|
2735
|
+
position: "absolute",
|
|
2736
|
+
bottom: 0,
|
|
2737
|
+
right: 0,
|
|
2738
|
+
height: 11.25,
|
|
2739
|
+
width: 11.25,
|
|
2740
|
+
borderRadius: "50%",
|
|
2741
|
+
backgroundColor: "#328545",
|
|
2742
|
+
outline: "2px solid #fff"
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
)
|
|
2673
2746
|
]
|
|
2674
2747
|
}
|
|
2675
2748
|
),
|
|
2676
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
2749
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "absolute", bottom: -13, left: 30 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2677
2750
|
Lottie2,
|
|
2678
2751
|
{
|
|
2679
2752
|
animationData: typingdotanimation2_default,
|
|
@@ -2887,6 +2960,7 @@ var avatarBgByInitial = {
|
|
|
2887
2960
|
B: "#F0EDEB",
|
|
2888
2961
|
b: "#F0EDEB"
|
|
2889
2962
|
};
|
|
2963
|
+
var GRADIENT_BORDER = "linear-gradient(236.83deg, rgba(51,201,212,0.3) 0.4%, rgba(39,83,251,0.3) 30.28%, rgba(39,83,251,0.3) 50.2%, rgba(39,83,251,0.3) 65.14%, rgba(235,67,255,0.3) 100%)";
|
|
2890
2964
|
var InboxPopup = ({ adapter, uiCallbacks }) => {
|
|
2891
2965
|
const { close, selectThread, selectedThreadId, reference } = useChatUI();
|
|
2892
2966
|
const { isOpen: isGalleryOpen, closeGallery } = useGallery();
|
|
@@ -2932,16 +3006,12 @@ var InboxPopup = ({ adapter, uiCallbacks }) => {
|
|
|
2932
3006
|
const idButtonLabel = activeThread?.orderId ? "View Order" : activeThread?.inquiryId ? "View Inquiry" : void 0;
|
|
2933
3007
|
const idValue = activeThread?.orderId ?? activeThread?.inquiryId ?? void 0;
|
|
2934
3008
|
const [showDelete, setShowDelete] = React10.useState(false);
|
|
2935
|
-
const [isLoading, setIsLoading] = React10.useState(false);
|
|
2936
3009
|
const scrollKey = `${activeId}-${messages.length}-${rev}`;
|
|
2937
|
-
const prevActiveIdRef =
|
|
3010
|
+
const prevActiveIdRef = React10.useRef(activeId);
|
|
2938
3011
|
React10.useEffect(() => {
|
|
2939
3012
|
if (prevActiveIdRef.current !== activeId) {
|
|
2940
3013
|
prevActiveIdRef.current = activeId;
|
|
2941
|
-
setIsLoading(true);
|
|
2942
|
-
const t = setTimeout(() => setIsLoading(false), 300);
|
|
2943
3014
|
if (activeId) adapter.threads.markRead?.(activeId);
|
|
2944
|
-
return () => clearTimeout(t);
|
|
2945
3015
|
}
|
|
2946
3016
|
}, [activeId, adapter]);
|
|
2947
3017
|
const toRef2 = (m) => ({
|
|
@@ -2969,13 +3039,18 @@ var InboxPopup = ({ adapter, uiCallbacks }) => {
|
|
|
2969
3039
|
message: "The chat has been deleted successfully."
|
|
2970
3040
|
});
|
|
2971
3041
|
};
|
|
2972
|
-
|
|
3042
|
+
const filteredThreads = threads.filter((t) => {
|
|
3043
|
+
if (!searchQuery.trim()) return true;
|
|
3044
|
+
const q = searchQuery.toLowerCase();
|
|
3045
|
+
return t.title.toLowerCase().includes(q) || t.last?.toLowerCase().includes(q) || t.orderId?.toLowerCase().includes(q) || t.inquiryId?.toLowerCase().includes(q);
|
|
3046
|
+
});
|
|
3047
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "fixed", bottom: 16, right: 16, zIndex: 10002 }, children: [
|
|
2973
3048
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2974
3049
|
framerMotion.motion.button,
|
|
2975
3050
|
{
|
|
2976
3051
|
"aria-label": "Close chat",
|
|
2977
3052
|
onClick: close,
|
|
2978
|
-
|
|
3053
|
+
style: { position: "fixed", inset: 0, background: "transparent", border: "none", cursor: "auto" },
|
|
2979
3054
|
initial: { opacity: 0 },
|
|
2980
3055
|
animate: { opacity: 1 },
|
|
2981
3056
|
exit: { opacity: 0 },
|
|
@@ -2987,12 +3062,14 @@ var InboxPopup = ({ adapter, uiCallbacks }) => {
|
|
|
2987
3062
|
{
|
|
2988
3063
|
role: "dialog",
|
|
2989
3064
|
"aria-modal": "true",
|
|
2990
|
-
className: "relative rounded-[20px] p-[3px]",
|
|
2991
3065
|
style: {
|
|
3066
|
+
position: "relative",
|
|
2992
3067
|
width: 800,
|
|
2993
3068
|
height: 650,
|
|
3069
|
+
borderRadius: 20,
|
|
3070
|
+
padding: 3,
|
|
2994
3071
|
boxShadow: "0px 2px 12px 0px #3B33331A",
|
|
2995
|
-
background:
|
|
3072
|
+
background: GRADIENT_BORDER
|
|
2996
3073
|
},
|
|
2997
3074
|
initial: { x: "110%" },
|
|
2998
3075
|
animate: { x: 0 },
|
|
@@ -3001,119 +3078,192 @@ var InboxPopup = ({ adapter, uiCallbacks }) => {
|
|
|
3001
3078
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3002
3079
|
"div",
|
|
3003
3080
|
{
|
|
3004
|
-
|
|
3005
|
-
|
|
3081
|
+
style: {
|
|
3082
|
+
position: "relative",
|
|
3083
|
+
height: "100%",
|
|
3084
|
+
width: "100%",
|
|
3085
|
+
overflow: "hidden",
|
|
3086
|
+
borderRadius: 18,
|
|
3087
|
+
backgroundColor: "#fff",
|
|
3088
|
+
overscrollBehavior: "contain"
|
|
3089
|
+
},
|
|
3006
3090
|
children: [
|
|
3007
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
onDelete: () => setShowDelete(true)
|
|
3020
|
-
}) ?? null
|
|
3021
|
-
}
|
|
3022
|
-
) }),
|
|
3023
|
-
idValue && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3024
|
-
ChatInquiryBar_default,
|
|
3025
|
-
{
|
|
3026
|
-
id: idValue,
|
|
3027
|
-
label: idLabel,
|
|
3028
|
-
buttonLabel: idButtonLabel,
|
|
3029
|
-
onView: () => {
|
|
3030
|
-
const type = activeThread?.orderId ? "order" : "inquiry";
|
|
3031
|
-
uiCallbacks?.onNavigate?.({ type, id: idValue });
|
|
3032
|
-
}
|
|
3033
|
-
}
|
|
3034
|
-
) }),
|
|
3035
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative h-full min-h-0", children: [
|
|
3036
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3037
|
-
ChatScroll_default,
|
|
3091
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3092
|
+
"div",
|
|
3093
|
+
{
|
|
3094
|
+
style: {
|
|
3095
|
+
display: "grid",
|
|
3096
|
+
gridTemplateColumns: "1fr 310px",
|
|
3097
|
+
height: "100%",
|
|
3098
|
+
minHeight: 0
|
|
3099
|
+
},
|
|
3100
|
+
children: [
|
|
3101
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3102
|
+
"div",
|
|
3038
3103
|
{
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3104
|
+
style: {
|
|
3105
|
+
display: "flex",
|
|
3106
|
+
flexDirection: "column",
|
|
3107
|
+
height: "100%",
|
|
3108
|
+
minHeight: 0,
|
|
3109
|
+
borderRight: "1px solid #9BBCCF"
|
|
3110
|
+
},
|
|
3111
|
+
children: [
|
|
3112
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: 64, flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3113
|
+
ChatHeader,
|
|
3114
|
+
{
|
|
3115
|
+
left: activeThread?.avatarSrc ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3116
|
+
ChatIdentity_default,
|
|
3117
|
+
{
|
|
3118
|
+
variant: "avatar",
|
|
3119
|
+
src: activeThread.avatarSrc,
|
|
3120
|
+
online,
|
|
3121
|
+
title,
|
|
3122
|
+
subtitle,
|
|
3123
|
+
verified: isVerified,
|
|
3124
|
+
subtitleVariant: "muted"
|
|
3125
|
+
}
|
|
3126
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3127
|
+
ChatIdentity_default,
|
|
3128
|
+
{
|
|
3129
|
+
variant: "initial",
|
|
3130
|
+
initial,
|
|
3131
|
+
bg: avatarBg,
|
|
3132
|
+
online,
|
|
3133
|
+
title,
|
|
3134
|
+
subtitle,
|
|
3135
|
+
verified: isVerified,
|
|
3136
|
+
subtitleVariant: "muted"
|
|
3137
|
+
}
|
|
3138
|
+
),
|
|
3139
|
+
right: uiCallbacks?.renderKebabMenu?.({
|
|
3140
|
+
pinned: Boolean(activeThread?.pinned),
|
|
3141
|
+
onPinToggle: () => {
|
|
3142
|
+
if (activeId) adapter.threads.pin(activeId, !activeThread?.pinned);
|
|
3143
|
+
},
|
|
3144
|
+
onDelete: () => setShowDelete(true)
|
|
3145
|
+
}) ?? null
|
|
3146
|
+
}
|
|
3147
|
+
) }),
|
|
3148
|
+
idValue && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3149
|
+
ChatInquiryBar_default,
|
|
3047
3150
|
{
|
|
3048
|
-
id:
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3151
|
+
id: idValue,
|
|
3152
|
+
label: idLabel,
|
|
3153
|
+
buttonLabel: idButtonLabel,
|
|
3154
|
+
onView: () => {
|
|
3155
|
+
const type = activeThread?.orderId ? "order" : "inquiry";
|
|
3156
|
+
uiCallbacks?.onNavigate?.({ type, id: idValue });
|
|
3157
|
+
}
|
|
3158
|
+
}
|
|
3159
|
+
) }),
|
|
3160
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minHeight: 0, position: "relative" }, children: [
|
|
3161
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3162
|
+
ChatScroll_default,
|
|
3163
|
+
{
|
|
3164
|
+
className: "h-full pb-10",
|
|
3165
|
+
bottomAlignWhenShort: false,
|
|
3166
|
+
scrollKey,
|
|
3167
|
+
style: { height: "100%", overflowY: "auto" },
|
|
3168
|
+
children: messages.map((m, idx) => {
|
|
3169
|
+
const mine = m.author === "you";
|
|
3170
|
+
const isLast = idx === messages.length - 1;
|
|
3171
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3172
|
+
ChatMessageItem_default,
|
|
3173
|
+
{
|
|
3174
|
+
id: m.id,
|
|
3175
|
+
mine,
|
|
3176
|
+
time: m.time ?? "",
|
|
3177
|
+
authorInitial: typeof m.author === "string" ? m.author : "U",
|
|
3178
|
+
avatarBg,
|
|
3179
|
+
text: m.text ?? m.content,
|
|
3180
|
+
businessCard: m.businessCard,
|
|
3181
|
+
addressCard: m.addressCard,
|
|
3182
|
+
images: m.images,
|
|
3183
|
+
files: m.files,
|
|
3184
|
+
audio: m.audio,
|
|
3185
|
+
replyTo: m.replyTo,
|
|
3186
|
+
showStatus: isLast,
|
|
3187
|
+
status: activeThread?.status?.kind === "seen" ? "Seen" : "Delivered",
|
|
3188
|
+
onReply: () => setReplyTo(toRef2(m)),
|
|
3189
|
+
initialSrc: m.avatarSrc
|
|
3190
|
+
},
|
|
3191
|
+
m.id
|
|
3192
|
+
);
|
|
3193
|
+
})
|
|
3194
|
+
}
|
|
3195
|
+
),
|
|
3196
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3197
|
+
"div",
|
|
3198
|
+
{
|
|
3199
|
+
style: {
|
|
3200
|
+
position: "absolute",
|
|
3201
|
+
left: 0,
|
|
3202
|
+
right: 0,
|
|
3203
|
+
bottom: 0,
|
|
3204
|
+
display: "flex",
|
|
3205
|
+
alignItems: "center",
|
|
3206
|
+
justifyContent: "flex-start",
|
|
3207
|
+
padding: "4px 16px 8px",
|
|
3208
|
+
background: "#fff",
|
|
3209
|
+
pointerEvents: "none"
|
|
3210
|
+
},
|
|
3211
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(TypingIndicator_default, { style: { pointerEvents: "auto" } })
|
|
3212
|
+
}
|
|
3213
|
+
)
|
|
3214
|
+
] }),
|
|
3215
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3216
|
+
ChatFooter_default,
|
|
3217
|
+
{
|
|
3218
|
+
replyTo,
|
|
3219
|
+
clearReply: () => setReplyTo(void 0),
|
|
3220
|
+
onAfterSend: () => setRev((v) => v + 1),
|
|
3221
|
+
onSend: (payload) => {
|
|
3222
|
+
if (activeId) adapter.messages.send(activeId, payload);
|
|
3223
|
+
}
|
|
3064
3224
|
},
|
|
3065
|
-
|
|
3066
|
-
)
|
|
3067
|
-
|
|
3225
|
+
activeId
|
|
3226
|
+
) })
|
|
3227
|
+
]
|
|
3068
3228
|
}
|
|
3069
3229
|
),
|
|
3070
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
status,
|
|
3108
|
-
avatarText: t.avatarText ?? "",
|
|
3109
|
-
avatarSrc: t.avatarSrc
|
|
3110
|
-
},
|
|
3111
|
-
t.id
|
|
3112
|
-
);
|
|
3113
|
-
}) })
|
|
3114
|
-
] })
|
|
3115
|
-
] }),
|
|
3116
|
-
/* @__PURE__ */ jsxRuntime.jsx(ChatConfirmModal, { open: showDelete, onClose: () => setShowDelete(false), onConfirm: handleConfirmDelete }),
|
|
3230
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, children: [
|
|
3231
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(ChatListHeader_default, { onClose: close, onSearchChange: (val) => setSearchQuery(val) }) }),
|
|
3232
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, minHeight: 0, overflowY: "auto" }, children: filteredThreads.map((t) => {
|
|
3233
|
+
const status = t.status ?? (t.unread && t.unread > 0 ? { kind: "new", count: t.unread } : { kind: "seen" });
|
|
3234
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3235
|
+
ChatThreadItem_default,
|
|
3236
|
+
{
|
|
3237
|
+
onClick: () => {
|
|
3238
|
+
setReplyTo(void 0);
|
|
3239
|
+
selectThread(t.id);
|
|
3240
|
+
},
|
|
3241
|
+
active: t.id === activeId,
|
|
3242
|
+
pinned: Boolean(t.pinned),
|
|
3243
|
+
online: t.online,
|
|
3244
|
+
verified: Boolean(t.badge),
|
|
3245
|
+
title: t.title,
|
|
3246
|
+
preview: t.last ?? "",
|
|
3247
|
+
time: t.time ?? "",
|
|
3248
|
+
status,
|
|
3249
|
+
avatarText: t.avatarText ?? "",
|
|
3250
|
+
avatarSrc: t.avatarSrc
|
|
3251
|
+
},
|
|
3252
|
+
t.id
|
|
3253
|
+
);
|
|
3254
|
+
}) })
|
|
3255
|
+
] })
|
|
3256
|
+
]
|
|
3257
|
+
}
|
|
3258
|
+
),
|
|
3259
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3260
|
+
ChatConfirmModal,
|
|
3261
|
+
{
|
|
3262
|
+
open: showDelete,
|
|
3263
|
+
onClose: () => setShowDelete(false),
|
|
3264
|
+
onConfirm: handleConfirmDelete
|
|
3265
|
+
}
|
|
3266
|
+
),
|
|
3117
3267
|
/* @__PURE__ */ jsxRuntime.jsx(ChatImagePreviewModal_default, { isOpen: isGalleryOpen, onClose: closeGallery })
|
|
3118
3268
|
]
|
|
3119
3269
|
}
|
|
@@ -3123,6 +3273,7 @@ var InboxPopup = ({ adapter, uiCallbacks }) => {
|
|
|
3123
3273
|
] });
|
|
3124
3274
|
};
|
|
3125
3275
|
var InboxPopup_default = InboxPopup;
|
|
3276
|
+
var GRADIENT_BORDER2 = "linear-gradient(236.83deg, rgba(51,201,212,0.3) 0.4%, rgba(39,83,251,0.3) 30.28%, rgba(39,83,251,0.3) 50.2%, rgba(39,83,251,0.3) 65.14%, rgba(235,67,255,0.3) 100%)";
|
|
3126
3277
|
function coalesceThreadId(reference, threads) {
|
|
3127
3278
|
const referenceId = reference?.id;
|
|
3128
3279
|
if (reference?.kind === "quotation") {
|
|
@@ -3175,14 +3326,13 @@ var SinglePopup = ({ adapter, uiCallbacks }) => {
|
|
|
3175
3326
|
setScrollKey(Date.now());
|
|
3176
3327
|
setReplyTo(void 0);
|
|
3177
3328
|
}, [activeId, adapter]);
|
|
3178
|
-
|
|
3179
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed bottom-4 right-4 z-[10002]", children: [
|
|
3329
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "fixed", bottom: 16, right: 16, zIndex: 10002 }, children: [
|
|
3180
3330
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3181
3331
|
framerMotion.motion.button,
|
|
3182
3332
|
{
|
|
3183
3333
|
"aria-label": "Close chat",
|
|
3184
3334
|
onClick: close,
|
|
3185
|
-
|
|
3335
|
+
style: { position: "fixed", inset: 0, background: "transparent", border: "none", cursor: "auto" },
|
|
3186
3336
|
initial: { opacity: 0 },
|
|
3187
3337
|
animate: { opacity: 1 },
|
|
3188
3338
|
exit: { opacity: 0 },
|
|
@@ -3194,10 +3344,14 @@ var SinglePopup = ({ adapter, uiCallbacks }) => {
|
|
|
3194
3344
|
{
|
|
3195
3345
|
role: "dialog",
|
|
3196
3346
|
"aria-modal": "true",
|
|
3197
|
-
className: "relative h-[650px] w-[450px] rounded-[20px] p-[2px]",
|
|
3198
3347
|
style: {
|
|
3348
|
+
position: "relative",
|
|
3349
|
+
height: 650,
|
|
3350
|
+
width: 450,
|
|
3351
|
+
borderRadius: 20,
|
|
3352
|
+
padding: 2,
|
|
3199
3353
|
boxShadow: "0px 2px 12px 0px #3B33331A",
|
|
3200
|
-
background:
|
|
3354
|
+
background: GRADIENT_BORDER2
|
|
3201
3355
|
},
|
|
3202
3356
|
initial: { x: "110%" },
|
|
3203
3357
|
animate: { x: 0 },
|
|
@@ -3206,10 +3360,18 @@ var SinglePopup = ({ adapter, uiCallbacks }) => {
|
|
|
3206
3360
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3207
3361
|
"div",
|
|
3208
3362
|
{
|
|
3209
|
-
|
|
3210
|
-
|
|
3363
|
+
style: {
|
|
3364
|
+
display: "flex",
|
|
3365
|
+
flexDirection: "column",
|
|
3366
|
+
height: "100%",
|
|
3367
|
+
width: "100%",
|
|
3368
|
+
overflow: "hidden",
|
|
3369
|
+
borderRadius: 18,
|
|
3370
|
+
backgroundColor: "#fff",
|
|
3371
|
+
overscrollBehavior: "contain"
|
|
3372
|
+
},
|
|
3211
3373
|
children: [
|
|
3212
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
3374
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: 64, flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3213
3375
|
ChatHeader,
|
|
3214
3376
|
{
|
|
3215
3377
|
left: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3229,41 +3391,61 @@ var SinglePopup = ({ adapter, uiCallbacks }) => {
|
|
|
3229
3391
|
{
|
|
3230
3392
|
type: "button",
|
|
3231
3393
|
onClick: close,
|
|
3232
|
-
|
|
3394
|
+
style: {
|
|
3395
|
+
display: "flex",
|
|
3396
|
+
alignItems: "center",
|
|
3397
|
+
justifyContent: "center",
|
|
3398
|
+
height: 34,
|
|
3399
|
+
width: 34,
|
|
3400
|
+
borderRadius: "50%",
|
|
3401
|
+
backgroundColor: "#fff",
|
|
3402
|
+
color: "#000",
|
|
3403
|
+
border: "none",
|
|
3404
|
+
boxShadow: "0px 2px 4px 0px #A5A3AE4D",
|
|
3405
|
+
cursor: "pointer"
|
|
3406
|
+
},
|
|
3233
3407
|
children: /* @__PURE__ */ jsxRuntime.jsx(ChatXIcon, { className: "h-6 w-6" })
|
|
3234
3408
|
}
|
|
3235
3409
|
)
|
|
3236
3410
|
}
|
|
3237
3411
|
) }),
|
|
3238
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
mine
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3412
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, minHeight: 0, position: "relative" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3413
|
+
ChatScroll_default,
|
|
3414
|
+
{
|
|
3415
|
+
bottomAlignWhenShort: false,
|
|
3416
|
+
scrollKey,
|
|
3417
|
+
style: { height: "100%", overflowY: "auto" },
|
|
3418
|
+
children: [
|
|
3419
|
+
messages.map((m, idx) => {
|
|
3420
|
+
const mine = m.author === "you";
|
|
3421
|
+
const isLast = idx === messages.length - 1;
|
|
3422
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3423
|
+
ChatMessageItem_default,
|
|
3424
|
+
{
|
|
3425
|
+
id: m.id,
|
|
3426
|
+
mine,
|
|
3427
|
+
time: m.time ?? "",
|
|
3428
|
+
authorInitial: typeof m.author === "string" ? m.author : "U",
|
|
3429
|
+
text: m.text ?? m.content,
|
|
3430
|
+
businessCard: m.businessCard,
|
|
3431
|
+
addressCard: m.addressCard,
|
|
3432
|
+
images: m.images,
|
|
3433
|
+
files: m.files,
|
|
3434
|
+
audio: m.audio,
|
|
3435
|
+
replyTo: m.replyTo,
|
|
3436
|
+
initialSrc: m.avatarSrc,
|
|
3437
|
+
showStatus: isLast,
|
|
3438
|
+
status: activeThread?.status?.kind === "seen" ? "Seen" : "Delivered",
|
|
3439
|
+
onReply: () => setReplyTo(toRef(m))
|
|
3440
|
+
},
|
|
3441
|
+
m.id
|
|
3442
|
+
);
|
|
3443
|
+
}),
|
|
3444
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "flex-start" }, children: /* @__PURE__ */ jsxRuntime.jsx(TypingIndicator_default, {}) })
|
|
3445
|
+
]
|
|
3446
|
+
}
|
|
3447
|
+
) }),
|
|
3448
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3267
3449
|
ChatFooter_default,
|
|
3268
3450
|
{
|
|
3269
3451
|
variant: "single",
|