@linktr.ee/messaging-react 1.31.0 → 1.32.0
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.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx as e, jsxs as i, Fragment as ge } from "react/jsx-runtime";
|
|
|
2
2
|
import A from "classnames";
|
|
3
3
|
import U, { createContext as Ke, useContext as Qe, useCallback as R, useState as T, useRef as Q, useEffect as Z, useMemo as Ue, Suspense as et } from "react";
|
|
4
4
|
import { StreamChatService as xt } from "@linktr.ee/messaging-core";
|
|
5
|
-
import { Chat as bt, ChannelList as Ct, DateSeparator as pt, useChannelStateContext as
|
|
6
|
-
import { StarIcon as Fe, GiftIcon as Qt, XIcon as Ge, SpinnerGapIcon as
|
|
5
|
+
import { Chat as bt, ChannelList as Ct, DateSeparator as pt, useChannelStateContext as xe, useChatContext as tt, areMessageUIPropsEqual as Nt, useMessageReminder as yt, useComponentContext as vt, Attachment as wt, EditMessageModal as _t, MessageBlocked as Et, MessageBouncePrompt as St, MessageDeleted as It, MessageIsThreadReplyInChannelButtonIndicator as Mt, MessageRepliesCountButton as kt, ReminderNotification as Tt, StreamedMessageText as Dt, messageHasAttachments as Rt, messageHasReactions as At, isDateSeparatorMessage as Lt, isMessageBlocked as Pt, isMessageBounced as Ut, MessageBounceModal as Ft, MessageText as ze, Poll as Ot, MessageErrorIcon as Bt, useMessageContext as st, useMessageComposer as Gt, useStateStore as $t, MessageInput as jt, useMessageInputContext as zt, useMessageComposerHasSendableData as Vt, SimpleAttachmentSelector as Ht, QuotedMessagePreview as Yt, AttachmentPreviewList as Wt, TextareaComposer as qt, MessageTimestamp as Ae, Channel as Zt, WithComponents as Jt, Window as Xt, MessageList as Kt } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Fe, GiftIcon as Qt, XIcon as Ge, SpinnerGapIcon as Se, SignOutIcon as es, ProhibitInsetIcon as Ve, FlagIcon as ts, ArrowUpIcon as ss, SparkleIcon as ns, ProhibitIcon as as, ArrowLeftIcon as He, DotsThreeIcon as Ye, MagnifyingGlassIcon as rs, ChatCircleDotsIcon as We } from "@phosphor-icons/react";
|
|
7
7
|
import { LinkPreviewsManager as qe } from "stream-chat";
|
|
8
8
|
const nt = Ke({
|
|
9
9
|
service: null,
|
|
@@ -577,7 +577,7 @@ const ps = { last_message_at: -1 }, it = U.memo(
|
|
|
577
577
|
}
|
|
578
578
|
);
|
|
579
579
|
it.displayName = "ChannelList";
|
|
580
|
-
const
|
|
580
|
+
const Ee = ({
|
|
581
581
|
variant: t = "default",
|
|
582
582
|
className: s,
|
|
583
583
|
children: n,
|
|
@@ -759,41 +759,41 @@ const Ns = ({
|
|
|
759
759
|
),
|
|
760
760
|
/* @__PURE__ */ i("ul", { className: "flex flex-col gap-2 mt-2", children: [
|
|
761
761
|
c && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
762
|
-
|
|
762
|
+
Ee,
|
|
763
763
|
{
|
|
764
764
|
onClick: f,
|
|
765
765
|
disabled: M,
|
|
766
766
|
"aria-busy": M,
|
|
767
767
|
children: [
|
|
768
|
-
M ? /* @__PURE__ */ e(
|
|
768
|
+
M ? /* @__PURE__ */ e(Se, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(es, { className: "h-5 w-5" }),
|
|
769
769
|
/* @__PURE__ */ e("span", { children: "Delete Conversation" })
|
|
770
770
|
]
|
|
771
771
|
}
|
|
772
772
|
) }),
|
|
773
773
|
/* @__PURE__ */ e("li", { children: N ? /* @__PURE__ */ i(
|
|
774
|
-
|
|
774
|
+
Ee,
|
|
775
775
|
{
|
|
776
776
|
onClick: C,
|
|
777
777
|
disabled: S,
|
|
778
778
|
"aria-busy": S,
|
|
779
779
|
children: [
|
|
780
|
-
S ? /* @__PURE__ */ e(
|
|
780
|
+
S ? /* @__PURE__ */ e(Se, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Ve, { className: "h-5 w-5" }),
|
|
781
781
|
/* @__PURE__ */ e("span", { children: "Unblock" })
|
|
782
782
|
]
|
|
783
783
|
}
|
|
784
784
|
) : /* @__PURE__ */ i(
|
|
785
|
-
|
|
785
|
+
Ee,
|
|
786
786
|
{
|
|
787
787
|
onClick: d,
|
|
788
788
|
disabled: S,
|
|
789
789
|
"aria-busy": S,
|
|
790
790
|
children: [
|
|
791
|
-
S ? /* @__PURE__ */ e(
|
|
791
|
+
S ? /* @__PURE__ */ e(Se, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Ve, { className: "h-5 w-5" }),
|
|
792
792
|
/* @__PURE__ */ e("span", { children: "Block" })
|
|
793
793
|
]
|
|
794
794
|
}
|
|
795
795
|
) }),
|
|
796
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
796
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(Ee, { variant: "danger", onClick: _, children: [
|
|
797
797
|
/* @__PURE__ */ e(ts, { className: "h-5 w-5" }),
|
|
798
798
|
/* @__PURE__ */ e("span", { children: "Report" })
|
|
799
799
|
] }) }),
|
|
@@ -809,7 +809,7 @@ function vs(t) {
|
|
|
809
809
|
return t != null && t.length ? t.some((s) => s.type === Be) ? "down" : t.some((s) => s.type === Oe) ? "up" : null : null;
|
|
810
810
|
}
|
|
811
811
|
function ws(t) {
|
|
812
|
-
const { channel: s } =
|
|
812
|
+
const { channel: s } = xe(), { client: n } = tt("useMessageVote"), o = Ue(
|
|
813
813
|
() => vs(t.own_reactions),
|
|
814
814
|
[t.own_reactions]
|
|
815
815
|
), l = R(async () => {
|
|
@@ -897,7 +897,7 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
897
897
|
}
|
|
898
898
|
)
|
|
899
899
|
] }), Ls = (t) => {
|
|
900
|
-
var K,
|
|
900
|
+
var K, pe, Ne, ye, le, ve, we, _e, ie, E, j, P, $, he;
|
|
901
901
|
const {
|
|
902
902
|
additionalMessageInputProps: s,
|
|
903
903
|
chatbotVotingEnabled: n,
|
|
@@ -914,7 +914,7 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
914
914
|
message: a,
|
|
915
915
|
renderText: w,
|
|
916
916
|
threadList: N
|
|
917
|
-
} = t, { client: x } = tt("CustomMessage"), { channel: M } =
|
|
917
|
+
} = t, { client: x } = tt("CustomMessage"), { channel: M } = xe("CustomMessage"), { isUnlocking: k, onUnlockClick: S, onFetchSource: I, onDownloadClick: D } = Ts("LockedAttachment"), [f, d] = T(!1), C = yt(a.id), { selected: _, voteUp: y, voteDown: p } = ws(a), {
|
|
918
918
|
Attachment: F = wt,
|
|
919
919
|
EditMessageModal: ee = _t,
|
|
920
920
|
MessageBlocked: Y = Et,
|
|
@@ -952,13 +952,13 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
952
952
|
"str-chat__message--highlighted": b,
|
|
953
953
|
"str-chat__message--pinned pinned-message": a.pinned,
|
|
954
954
|
"str-chat__message--with-reactions": G,
|
|
955
|
-
"str-chat__message-send-can-be-retried": (a == null ? void 0 : a.status) === "failed" && ((
|
|
955
|
+
"str-chat__message-send-can-be-retried": (a == null ? void 0 : a.status) === "failed" && ((pe = a == null ? void 0 : a.error) == null ? void 0 : pe.status) !== 403,
|
|
956
956
|
"str-chat__message-with-thread-link": q || se,
|
|
957
957
|
"str-chat__virtual-message__wrapper--end": l,
|
|
958
958
|
"str-chat__virtual-message__wrapper--first": m,
|
|
959
959
|
"str-chat__virtual-message__wrapper--group": r
|
|
960
960
|
}
|
|
961
|
-
), ae = a.poll_id && x.polls.fromState(a.poll_id),
|
|
961
|
+
), ae = a.poll_id && x.polls.fromState(a.poll_id), Ce = Cs(a), re = $e(a), De = bs(a), be = !!(B != null && B.length && !a.quoted_message), oe = re && X && be;
|
|
962
962
|
return /* @__PURE__ */ i(ge, { children: [
|
|
963
963
|
o && /* @__PURE__ */ e(
|
|
964
964
|
ee,
|
|
@@ -1007,12 +1007,12 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1007
1007
|
X ? /* @__PURE__ */ e(
|
|
1008
1008
|
Je.Creator,
|
|
1009
1009
|
{
|
|
1010
|
-
title: (
|
|
1011
|
-
mimeType: (
|
|
1010
|
+
title: (Ne = a.metadata) == null ? void 0 : Ne.attachment_title,
|
|
1011
|
+
mimeType: (ye = a.metadata) == null ? void 0 : ye.attachment_mime_type,
|
|
1012
1012
|
thumbnailUrl: (le = a.metadata) == null ? void 0 : le.attachment_thumbnail,
|
|
1013
|
-
amountText: (
|
|
1014
|
-
detail: (
|
|
1015
|
-
paymentStatus: (
|
|
1013
|
+
amountText: (ve = a.metadata) == null ? void 0 : ve.amount_text,
|
|
1014
|
+
detail: (we = a.metadata) == null ? void 0 : we.attachment_detail,
|
|
1015
|
+
paymentStatus: (_e = a.metadata) == null ? void 0 : _e.payment_status
|
|
1016
1016
|
}
|
|
1017
1017
|
) : /* @__PURE__ */ e(
|
|
1018
1018
|
Je.Visitor,
|
|
@@ -1030,7 +1030,7 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1030
1030
|
}
|
|
1031
1031
|
),
|
|
1032
1032
|
a.text && /* @__PURE__ */ e("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ e("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ e(ze, { message: a, renderText: w }) }) })
|
|
1033
|
-
] }) :
|
|
1033
|
+
] }) : Ce ? (
|
|
1034
1034
|
/* Tip-only messages render as a standalone bubble */
|
|
1035
1035
|
/* @__PURE__ */ e(Le, { message: a, standalone: !0 })
|
|
1036
1036
|
) : /* @__PURE__ */ i("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
@@ -1039,7 +1039,7 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1039
1039
|
Le,
|
|
1040
1040
|
{
|
|
1041
1041
|
message: a,
|
|
1042
|
-
hasAttachment:
|
|
1042
|
+
hasAttachment: be,
|
|
1043
1043
|
isMyMessage: X
|
|
1044
1044
|
}
|
|
1045
1045
|
),
|
|
@@ -1064,7 +1064,7 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1064
1064
|
Le,
|
|
1065
1065
|
{
|
|
1066
1066
|
message: a,
|
|
1067
|
-
hasAttachment:
|
|
1067
|
+
hasAttachment: be,
|
|
1068
1068
|
isMyMessage: X
|
|
1069
1069
|
}
|
|
1070
1070
|
),
|
|
@@ -1155,7 +1155,8 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1155
1155
|
l.og_scrape_url
|
|
1156
1156
|
)) }) : null;
|
|
1157
1157
|
}, Gs = () => {
|
|
1158
|
-
|
|
1158
|
+
var m;
|
|
1159
|
+
const { channel: t } = xe(), s = ((m = t == null ? void 0 : t.data) == null ? void 0 : m.frozen) === !0, { handleSubmit: n } = zt(), o = Vt();
|
|
1159
1160
|
return /* @__PURE__ */ i(ge, { children: [
|
|
1160
1161
|
/* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e(Ht, {}) }),
|
|
1161
1162
|
/* @__PURE__ */ i("div", { className: "central-container min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
|
|
@@ -1166,9 +1167,12 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1166
1167
|
/* @__PURE__ */ e("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ e(
|
|
1167
1168
|
qt,
|
|
1168
1169
|
{
|
|
1170
|
+
"aria-disabled": s || void 0,
|
|
1169
1171
|
className: "w-full resize-none outline-none leading-6",
|
|
1170
|
-
autoFocus: !
|
|
1171
|
-
maxRows: 4
|
|
1172
|
+
autoFocus: !s,
|
|
1173
|
+
maxRows: 4,
|
|
1174
|
+
readOnly: s,
|
|
1175
|
+
tabIndex: s ? -1 : void 0
|
|
1172
1176
|
}
|
|
1173
1177
|
) }),
|
|
1174
1178
|
/* @__PURE__ */ e(
|
|
@@ -1177,8 +1181,8 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1177
1181
|
"aria-label": "Send",
|
|
1178
1182
|
className: "str-chat__send-button mt-auto flex justify-center items-center flex-shrink-0 rounded-full size-8 bg-[#121110] disabled:bg-[#F1F0EE] disabled:text-black/20 text-white focus-ring",
|
|
1179
1183
|
"data-testid": "send-button",
|
|
1180
|
-
disabled: !
|
|
1181
|
-
onClick:
|
|
1184
|
+
disabled: s || !o,
|
|
1185
|
+
onClick: n,
|
|
1182
1186
|
type: "button",
|
|
1183
1187
|
children: /* @__PURE__ */ e(ss, { className: "size-4" })
|
|
1184
1188
|
}
|
|
@@ -1188,10 +1192,22 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1188
1192
|
] });
|
|
1189
1193
|
}, $s = ({
|
|
1190
1194
|
renderActions: t
|
|
1191
|
-
}) =>
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
+
}) => {
|
|
1196
|
+
var o;
|
|
1197
|
+
const { channel: s } = xe(), n = ((o = s == null ? void 0 : s.data) == null ? void 0 : o.frozen) === !0;
|
|
1198
|
+
return /* @__PURE__ */ i(
|
|
1199
|
+
"div",
|
|
1200
|
+
{
|
|
1201
|
+
inert: n ? "" : void 0,
|
|
1202
|
+
"aria-disabled": n || void 0,
|
|
1203
|
+
className: "message-input flex items-center gap-2 p-4 aria-disabled:opacity-40",
|
|
1204
|
+
children: [
|
|
1205
|
+
t == null ? void 0 : t(),
|
|
1206
|
+
/* @__PURE__ */ e(jt, { Input: Gs })
|
|
1207
|
+
]
|
|
1208
|
+
}
|
|
1209
|
+
);
|
|
1210
|
+
}, js = [
|
|
1195
1211
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
1196
1212
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
1197
1213
|
], zs = {
|
|
@@ -1348,11 +1364,11 @@ const Ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1348
1364
|
s && /* @__PURE__ */ e("span", { className: "text-stone", children: s })
|
|
1349
1365
|
]
|
|
1350
1366
|
}
|
|
1351
|
-
),
|
|
1367
|
+
), Me = U.memo(() => /* @__PURE__ */ e("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
1352
1368
|
/* @__PURE__ */ e(Ks, { className: "w-6 h-6" }),
|
|
1353
1369
|
/* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
1354
1370
|
] }) }));
|
|
1355
|
-
|
|
1371
|
+
Me.displayName = "LoadingState";
|
|
1356
1372
|
const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Qs = ({
|
|
1357
1373
|
onBack: t,
|
|
1358
1374
|
showBackButton: s,
|
|
@@ -1361,7 +1377,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1361
1377
|
showStarButton: l = !1
|
|
1362
1378
|
}) => {
|
|
1363
1379
|
var g, v, a, w, N;
|
|
1364
|
-
const { channel: m } =
|
|
1380
|
+
const { channel: m } = xe(), r = U.useMemo(() => Object.values(m.state.members || {}).find(
|
|
1365
1381
|
(M) => {
|
|
1366
1382
|
var k;
|
|
1367
1383
|
return ((k = M.user) == null ? void 0 : k.id) && M.user.id !== m._client.userID;
|
|
@@ -1509,7 +1525,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1509
1525
|
customChannelActions: w,
|
|
1510
1526
|
renderMessage: N
|
|
1511
1527
|
}) => {
|
|
1512
|
-
const { channel: x } =
|
|
1528
|
+
const { channel: x } = xe(), M = Q(null), k = U.useMemo(() => Object.values(x.state.members || {}).find(
|
|
1513
1529
|
(C) => {
|
|
1514
1530
|
var _;
|
|
1515
1531
|
return ((_ = C.user) == null ? void 0 : _.id) && C.user.id !== x._client.userID;
|
|
@@ -1645,7 +1661,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1645
1661
|
channel: t,
|
|
1646
1662
|
MessageSystem: Js,
|
|
1647
1663
|
EmptyStateIndicator: h,
|
|
1648
|
-
LoadingIndicator:
|
|
1664
|
+
LoadingIndicator: Me,
|
|
1649
1665
|
DateSeparator: ys,
|
|
1650
1666
|
doSendMessageRequest: f,
|
|
1651
1667
|
children: /* @__PURE__ */ e(
|
|
@@ -1844,7 +1860,7 @@ const sn = ({
|
|
|
1844
1860
|
C && /* @__PURE__ */ e("p", { className: "text-xs text-stone truncate", children: C })
|
|
1845
1861
|
] })
|
|
1846
1862
|
] }),
|
|
1847
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: x === f.id ? /* @__PURE__ */ e(
|
|
1863
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: x === f.id ? /* @__PURE__ */ e(Se, { className: "h-5 w-5 text-primary animate-spin" }) : /* @__PURE__ */ e(We, { className: "h-5 w-5 text-stone" }) })
|
|
1848
1864
|
] })
|
|
1849
1865
|
}
|
|
1850
1866
|
) }, f.id);
|
|
@@ -1999,7 +2015,7 @@ const sn = ({
|
|
|
1999
2015
|
] }) })
|
|
2000
2016
|
);
|
|
2001
2017
|
ft.displayName = "EmptyState";
|
|
2002
|
-
const
|
|
2018
|
+
const Ie = U.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ i("div", { className: "text-center max-w-sm", children: [
|
|
2003
2019
|
/* @__PURE__ */ e("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ e("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
2004
2020
|
/* @__PURE__ */ e("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
2005
2021
|
/* @__PURE__ */ e("p", { className: "text-stone text-sm mb-6", children: t }),
|
|
@@ -2013,7 +2029,7 @@ const Se = U.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { clas
|
|
|
2013
2029
|
}
|
|
2014
2030
|
)
|
|
2015
2031
|
] }) }));
|
|
2016
|
-
|
|
2032
|
+
Ie.displayName = "ErrorState";
|
|
2017
2033
|
const gn = ({
|
|
2018
2034
|
capabilities: t = {},
|
|
2019
2035
|
className: s,
|
|
@@ -2051,10 +2067,10 @@ const gn = ({
|
|
|
2051
2067
|
refreshConnection: J,
|
|
2052
2068
|
debug: L
|
|
2053
2069
|
} = os(), [W, z] = T(null), [de, me] = T(!1), [te, ue] = T(!1), [G, O] = T(!1), [B, q] = T(/* @__PURE__ */ new Set()), [se, Te] = T(0), [V, H] = T(!1), [X, ne] = T(null), ae = Q(null), {
|
|
2054
|
-
participantSource:
|
|
2070
|
+
participantSource: Ce,
|
|
2055
2071
|
participantLabel: re = "participants",
|
|
2056
2072
|
showDeleteConversation: De = !0
|
|
2057
|
-
} = t,
|
|
2073
|
+
} = t, be = U.useMemo(() => {
|
|
2058
2074
|
const E = p == null ? void 0 : p.userID;
|
|
2059
2075
|
return {
|
|
2060
2076
|
...{
|
|
@@ -2168,14 +2184,14 @@ const gn = ({
|
|
|
2168
2184
|
L,
|
|
2169
2185
|
l
|
|
2170
2186
|
]);
|
|
2171
|
-
const
|
|
2187
|
+
const pe = R(
|
|
2172
2188
|
(E) => {
|
|
2173
2189
|
z(E), l == null || l(E);
|
|
2174
2190
|
},
|
|
2175
2191
|
[l]
|
|
2176
|
-
),
|
|
2192
|
+
), Ne = R(() => {
|
|
2177
2193
|
V || z(null);
|
|
2178
|
-
}, [V]),
|
|
2194
|
+
}, [V]), ye = R(
|
|
2179
2195
|
async (E) => {
|
|
2180
2196
|
var j;
|
|
2181
2197
|
if (y)
|
|
@@ -2204,29 +2220,29 @@ const gn = ({
|
|
|
2204
2220
|
), le = R(() => {
|
|
2205
2221
|
var E;
|
|
2206
2222
|
O(!1), (E = ae.current) == null || E.close();
|
|
2207
|
-
}, []),
|
|
2223
|
+
}, []), ve = R(
|
|
2208
2224
|
(E) => {
|
|
2209
2225
|
E.target === ae.current && le();
|
|
2210
2226
|
},
|
|
2211
2227
|
[le]
|
|
2212
|
-
),
|
|
2228
|
+
), we = R(
|
|
2213
2229
|
async (E) => {
|
|
2214
2230
|
L && console.log("[MessagingShell] Leaving conversation:", E.id), z(null), H(!1), oe.current = null, await K();
|
|
2215
2231
|
},
|
|
2216
2232
|
[K, L]
|
|
2217
|
-
),
|
|
2233
|
+
), _e = R(
|
|
2218
2234
|
async (E) => {
|
|
2219
2235
|
L && console.log("[MessagingShell] Blocking participant:", E), z(null), H(!1), oe.current = null, await K();
|
|
2220
2236
|
},
|
|
2221
2237
|
[K, L]
|
|
2222
2238
|
), ie = !!W;
|
|
2223
|
-
return ee ? /* @__PURE__ */ e("div", { className: A("h-full", s), children: /* @__PURE__ */ e(
|
|
2224
|
-
|
|
2239
|
+
return ee ? /* @__PURE__ */ e("div", { className: A("h-full", s), children: /* @__PURE__ */ e(Me, {}) }) : Y ? /* @__PURE__ */ e("div", { className: A("h-full", s), children: /* @__PURE__ */ e(Ie, { message: Y, onBack: J }) }) : !F || !p ? /* @__PURE__ */ e("div", { className: A("h-full", s), children: /* @__PURE__ */ e(
|
|
2240
|
+
Ie,
|
|
2225
2241
|
{
|
|
2226
2242
|
message: "Not connected to messaging service",
|
|
2227
2243
|
onBack: J
|
|
2228
2244
|
}
|
|
2229
|
-
) }) : X ? /* @__PURE__ */ e("div", { className: A("h-full", s), children: /* @__PURE__ */ e(
|
|
2245
|
+
) }) : X ? /* @__PURE__ */ e("div", { className: A("h-full", s), children: /* @__PURE__ */ e(Ie, { message: X }) }) : /* @__PURE__ */ i(
|
|
2230
2246
|
"div",
|
|
2231
2247
|
{
|
|
2232
2248
|
className: A(
|
|
@@ -2251,9 +2267,9 @@ const gn = ({
|
|
|
2251
2267
|
children: /* @__PURE__ */ e(
|
|
2252
2268
|
it,
|
|
2253
2269
|
{
|
|
2254
|
-
onChannelSelect:
|
|
2270
|
+
onChannelSelect: pe,
|
|
2255
2271
|
selectedChannel: W || void 0,
|
|
2256
|
-
filters:
|
|
2272
|
+
filters: be,
|
|
2257
2273
|
channelRenderFilterFn: g,
|
|
2258
2274
|
customEmptyStateIndicator: v,
|
|
2259
2275
|
renderMessagePreview: D
|
|
@@ -2277,13 +2293,13 @@ const gn = ({
|
|
|
2277
2293
|
ht,
|
|
2278
2294
|
{
|
|
2279
2295
|
channel: W,
|
|
2280
|
-
onBack:
|
|
2296
|
+
onBack: Ne,
|
|
2281
2297
|
showBackButton: !V,
|
|
2282
2298
|
renderMessageInputActions: n,
|
|
2283
2299
|
renderConversationFooter: o,
|
|
2284
2300
|
renderChannelBanner: f,
|
|
2285
|
-
onLeaveConversation:
|
|
2286
|
-
onBlockParticipant:
|
|
2301
|
+
onLeaveConversation: we,
|
|
2302
|
+
onBlockParticipant: _e,
|
|
2287
2303
|
CustomChannelEmptyState: h,
|
|
2288
2304
|
showDeleteConversation: De,
|
|
2289
2305
|
onDeleteConversationClick: a,
|
|
@@ -2301,7 +2317,7 @@ const gn = ({
|
|
|
2301
2317
|
W.id
|
|
2302
2318
|
) }) : r ? (
|
|
2303
2319
|
// Show loading while creating/loading direct conversation channel
|
|
2304
|
-
/* @__PURE__ */ e(
|
|
2320
|
+
/* @__PURE__ */ e(Me, {})
|
|
2305
2321
|
) : /* @__PURE__ */ e(
|
|
2306
2322
|
ft,
|
|
2307
2323
|
{
|
|
@@ -2312,19 +2328,19 @@ const gn = ({
|
|
|
2312
2328
|
}
|
|
2313
2329
|
)
|
|
2314
2330
|
] }),
|
|
2315
|
-
|
|
2331
|
+
Ce && // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
2316
2332
|
/* @__PURE__ */ e(
|
|
2317
2333
|
"dialog",
|
|
2318
2334
|
{
|
|
2319
2335
|
ref: ae,
|
|
2320
2336
|
className: "mes-dialog",
|
|
2321
|
-
onClick:
|
|
2337
|
+
onClick: ve,
|
|
2322
2338
|
onClose: le,
|
|
2323
2339
|
children: /* @__PURE__ */ e("div", { className: "h-full w-full bg-white shadow-max-elevation-light", children: /* @__PURE__ */ e(
|
|
2324
2340
|
sn,
|
|
2325
2341
|
{
|
|
2326
|
-
participantSource:
|
|
2327
|
-
onSelectParticipant:
|
|
2342
|
+
participantSource: Ce,
|
|
2343
|
+
onSelectParticipant: ye,
|
|
2328
2344
|
onClose: le,
|
|
2329
2345
|
existingParticipantIds: B,
|
|
2330
2346
|
participantLabel: re,
|
|
@@ -2442,7 +2458,7 @@ const gn = ({
|
|
|
2442
2458
|
};
|
|
2443
2459
|
};
|
|
2444
2460
|
export {
|
|
2445
|
-
|
|
2461
|
+
Ee as ActionButton,
|
|
2446
2462
|
ce as Avatar,
|
|
2447
2463
|
Xs as ChannelEmptyState,
|
|
2448
2464
|
it as ChannelList,
|