@linktr.ee/messaging-react 1.22.0-rc-1771558667 → 1.22.0-rc-1771558865
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 +133 -133
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CustomSystemMessage/index.tsx +2 -2
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as we } from "react/jsx-runtime";
|
|
2
2
|
import D from "classnames";
|
|
3
|
-
import B, { createContext as es, useContext as ss, useCallback as L, useState as I, useRef as Y, useEffect as q, useMemo as
|
|
3
|
+
import B, { createContext as es, useContext as ss, useCallback as L, useState as I, useRef as Y, useEffect as q, useMemo as Ne } from "react";
|
|
4
4
|
import { StreamChatService as ts } from "@linktr.ee/messaging-core";
|
|
5
|
-
import { Chat as ns, ChannelList as rs, DateSeparator as as, useChannelStateContext as
|
|
6
|
-
import { GiftIcon as $s, XIcon as
|
|
5
|
+
import { Chat as ns, ChannelList as rs, DateSeparator as as, useChannelStateContext as ye, useChatContext as Ue, areMessageUIPropsEqual as ls, useMessageReminder as os, useComponentContext as is, Attachment as cs, EditMessageModal as ds, MessageBlocked as us, MessageBouncePrompt as ms, MessageDeleted as hs, MessageIsThreadReplyInChannelButtonIndicator as fs, MessageRepliesCountButton as gs, ReminderNotification as xs, StreamedMessageText as bs, messageHasAttachments as Ns, messageHasReactions as Cs, isDateSeparatorMessage as vs, isMessageBlocked as ws, isMessageBounced as ys, MessageBounceModal as ps, Poll as Es, MessageText as _s, MessageErrorIcon as Is, useMessageContext as Ss, useMessageComposer as Ms, useStateStore as ks, MessageInput as Ds, useMessageInputContext as Ts, useMessageComposerHasSendableData as Rs, SimpleAttachmentSelector as Fs, QuotedMessagePreview as Ls, AttachmentPreviewList as Ps, TextareaComposer as Us, MessageTimestamp as Ie, Channel as Os, WithComponents as As, Window as Bs, MessageList as js } from "stream-chat-react";
|
|
6
|
+
import { GiftIcon as $s, XIcon as fe, ArrowUpIcon as zs, SparkleIcon as Gs, ArrowLeftIcon as Se, StarIcon as Me, DotsThreeIcon as ke, SpinnerGapIcon as ue, SignOutIcon as Hs, ProhibitInsetIcon as De, FlagIcon as Vs, MagnifyingGlassIcon as Ws, ChatCircleDotsIcon as Te } from "@phosphor-icons/react";
|
|
7
7
|
import { LinkPreviewsManager as Re } from "stream-chat";
|
|
8
8
|
const Oe = es({
|
|
9
9
|
service: null,
|
|
@@ -15,7 +15,7 @@ const Oe = es({
|
|
|
15
15
|
refreshConnection: async () => {
|
|
16
16
|
},
|
|
17
17
|
debug: !1
|
|
18
|
-
}),
|
|
18
|
+
}), ge = () => ss(Oe), Ut = ({
|
|
19
19
|
children: s,
|
|
20
20
|
user: t,
|
|
21
21
|
serviceConfig: n,
|
|
@@ -216,18 +216,18 @@ const Oe = es({
|
|
|
216
216
|
children: s
|
|
217
217
|
}
|
|
218
218
|
) : s });
|
|
219
|
-
},
|
|
219
|
+
}, Ys = () => ge(), qs = (s, t) => {
|
|
220
220
|
const n = new Date(
|
|
221
221
|
Date.UTC(s.getUTCFullYear(), s.getUTCMonth(), s.getUTCDate())
|
|
222
222
|
), o = new Date(
|
|
223
223
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
224
224
|
).getTime() - n.getTime();
|
|
225
225
|
return Math.floor(o / (1e3 * 60 * 60 * 24));
|
|
226
|
-
},
|
|
226
|
+
}, Zs = (s) => {
|
|
227
227
|
const t = /* @__PURE__ */ new Date();
|
|
228
228
|
if (Math.floor((t.getTime() - s.getTime()) / 1e3) < 60)
|
|
229
229
|
return "Just now";
|
|
230
|
-
const r =
|
|
230
|
+
const r = qs(s, t);
|
|
231
231
|
return r === 0 ? s.toLocaleTimeString([], {
|
|
232
232
|
hour: "numeric",
|
|
233
233
|
minute: "2-digit",
|
|
@@ -317,22 +317,22 @@ const K = ({
|
|
|
317
317
|
)
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
|
-
},
|
|
320
|
+
}, Xs = () => /* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ e(
|
|
321
321
|
"path",
|
|
322
322
|
{
|
|
323
323
|
d: "M10.003 5a.705.705 0 0 1-.469.67L6.7 6.7 5.67 9.535a.715.715 0 0 1-1.34 0L3.3 6.7.466 5.67a.715.715 0 0 1 0-1.34L3.3 3.3 4.33.466a.715.715 0 0 1 1.34 0L6.7 3.3l2.834 1.03a.705.705 0 0 1 .469.67",
|
|
324
324
|
fill: "currentColor"
|
|
325
325
|
}
|
|
326
|
-
) }),
|
|
326
|
+
) }), Ks = (s) => {
|
|
327
327
|
var t;
|
|
328
328
|
return ((t = s.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
329
|
-
},
|
|
329
|
+
}, et = (s) => {
|
|
330
330
|
var t;
|
|
331
331
|
return ((t = s.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
332
332
|
}, pe = (s) => {
|
|
333
333
|
var t;
|
|
334
334
|
return ((t = s.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
335
|
-
}, Ae = (s) =>
|
|
335
|
+
}, Ae = (s) => Ks(s) || et(s), st = (s) => {
|
|
336
336
|
var t;
|
|
337
337
|
return Ae(s) && !((t = s.text) != null && t.trim());
|
|
338
338
|
}, Le = ({
|
|
@@ -353,7 +353,7 @@ const K = ({
|
|
|
353
353
|
] });
|
|
354
354
|
}
|
|
355
355
|
return /* @__PURE__ */ i("div", { className: "message-tag message-tag--chatbot", children: [
|
|
356
|
-
/* @__PURE__ */ e("span", { className: "message-tag__icon", style: { marginTop: -1 }, children: /* @__PURE__ */ e(
|
|
356
|
+
/* @__PURE__ */ e("span", { className: "message-tag__icon", style: { marginTop: -1 }, children: /* @__PURE__ */ e(Xs, {}) }),
|
|
357
357
|
/* @__PURE__ */ e("span", { className: "message-tag__label", children: "Chatbot" })
|
|
358
358
|
] });
|
|
359
359
|
}, Be = B.memo(
|
|
@@ -381,7 +381,7 @@ const K = ({
|
|
|
381
381
|
if (a != null && a.text) return a.text;
|
|
382
382
|
const _ = (R = a == null ? void 0 : a.attachments) == null ? void 0 : R[0];
|
|
383
383
|
return _ ? _.og_scrape_url ? _.og_scrape_url : _.type === "image" ? "📷 Sent an image" : _.type === "video" ? "🎥 Sent a video" : _.type === "audio" ? "🎵 Sent audio" : _.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
384
|
-
})(), v = a != null && a.created_at ?
|
|
384
|
+
})(), v = a != null && a.created_at ? Zs(new Date(a.created_at)) : "", k = a ? pe(a) : !1, b = d ? d(a, S) : `${k ? "✨ " : ""}${S}`, m = o ?? 0;
|
|
385
385
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
386
386
|
channelId: s == null ? void 0 : s.id,
|
|
387
387
|
isSelected: l,
|
|
@@ -449,7 +449,7 @@ const je = B.memo(
|
|
|
449
449
|
}) => {
|
|
450
450
|
const l = B.useRef(0);
|
|
451
451
|
l.current++;
|
|
452
|
-
const { debug: u = !1 } =
|
|
452
|
+
const { debug: u = !1 } = ge();
|
|
453
453
|
u && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
454
454
|
renderCount: l.current,
|
|
455
455
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
@@ -528,22 +528,22 @@ function $e({ label: s, className: t, children: n, ...r }) {
|
|
|
528
528
|
);
|
|
529
529
|
}
|
|
530
530
|
function ze({ onClick: s }) {
|
|
531
|
-
return /* @__PURE__ */ e($e, { label: "Close", onClick: s, className: "p-1", children: /* @__PURE__ */ e(
|
|
531
|
+
return /* @__PURE__ */ e($e, { label: "Close", onClick: s, className: "p-1", children: /* @__PURE__ */ e(fe, { className: "h-5 w-5 text-stone", weight: "bold" }) });
|
|
532
532
|
}
|
|
533
|
-
const
|
|
534
|
-
function
|
|
535
|
-
return s != null && s.length ? s.some((t) => t.type ===
|
|
533
|
+
const tt = (s) => /* @__PURE__ */ e(as, { ...s, position: "center" }), Ce = "vote_up", ve = "vote_down";
|
|
534
|
+
function nt(s) {
|
|
535
|
+
return s != null && s.length ? s.some((t) => t.type === ve) ? "down" : s.some((t) => t.type === Ce) ? "up" : null : null;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
const { channel: t } =
|
|
539
|
-
() =>
|
|
537
|
+
function rt(s) {
|
|
538
|
+
const { channel: t } = ye(), { client: n } = Ue("useMessageVote"), r = Ne(
|
|
539
|
+
() => nt(s.own_reactions),
|
|
540
540
|
[s.own_reactions]
|
|
541
541
|
), o = L(async () => {
|
|
542
542
|
if (n != null && n.userID)
|
|
543
543
|
try {
|
|
544
|
-
r === "up" ? await t.deleteReaction(s.id,
|
|
544
|
+
r === "up" ? await t.deleteReaction(s.id, Ce) : await t.sendReaction(
|
|
545
545
|
s.id,
|
|
546
|
-
{ type:
|
|
546
|
+
{ type: Ce },
|
|
547
547
|
{ enforce_unique: !0, skip_push: !0 }
|
|
548
548
|
);
|
|
549
549
|
} catch {
|
|
@@ -551,9 +551,9 @@ function at(s) {
|
|
|
551
551
|
}, [t, n == null ? void 0 : n.userID, s.id, r]), d = L(async () => {
|
|
552
552
|
if (n != null && n.userID)
|
|
553
553
|
try {
|
|
554
|
-
r === "down" ? await t.deleteReaction(s.id,
|
|
554
|
+
r === "down" ? await t.deleteReaction(s.id, ve) : await t.sendReaction(
|
|
555
555
|
s.id,
|
|
556
|
-
{ type:
|
|
556
|
+
{ type: ve },
|
|
557
557
|
{ enforce_unique: !0, skip_push: !0 }
|
|
558
558
|
);
|
|
559
559
|
} catch {
|
|
@@ -561,7 +561,7 @@ function at(s) {
|
|
|
561
561
|
}, [t, n == null ? void 0 : n.userID, s.id, r]);
|
|
562
562
|
return { selected: r, voteUp: o, voteDown: d };
|
|
563
563
|
}
|
|
564
|
-
const
|
|
564
|
+
const at = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
565
565
|
"path",
|
|
566
566
|
{
|
|
567
567
|
d: "M4.667 7.333l2.666-6A1.333 1.333 0 018.667 2v2.667a.667.667 0 00.666.666h3.764a1.334 1.334 0 011.192 1.93l-2.333 4.666a1.333 1.333 0 01-1.193.738H4.667m0-5.334v5.334m0-5.334H2.667a1.333 1.333 0 00-1.334 1.334v2.666a1.333 1.333 0 001.334 1.334h2",
|
|
@@ -571,7 +571,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
571
571
|
strokeLinejoin: "round",
|
|
572
572
|
fill: s ? "currentColor" : "none"
|
|
573
573
|
}
|
|
574
|
-
) }),
|
|
574
|
+
) }), lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
575
575
|
"path",
|
|
576
576
|
{
|
|
577
577
|
d: "M11.333 8.667l-2.666 6A1.333 1.333 0 017.333 14v-2.667a.667.667 0 00-.666-.666H2.903a1.334 1.334 0 01-1.192-1.93l2.333-4.666a1.333 1.333 0 011.193-.738h6.096m0 5.334V3.333m0 5.334h2a1.333 1.333 0 001.334-1.334V4.667a1.333 1.333 0 00-1.334-1.334h-2",
|
|
@@ -581,7 +581,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
581
581
|
strokeLinejoin: "round",
|
|
582
582
|
fill: s ? "currentColor" : "none"
|
|
583
583
|
}
|
|
584
|
-
) }),
|
|
584
|
+
) }), ot = ({
|
|
585
585
|
selected: s,
|
|
586
586
|
onVoteUp: t,
|
|
587
587
|
onVoteDown: n
|
|
@@ -594,7 +594,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
594
594
|
onClick: t,
|
|
595
595
|
"aria-label": "Helpful",
|
|
596
596
|
"aria-pressed": s === "up",
|
|
597
|
-
children: /* @__PURE__ */ e(
|
|
597
|
+
children: /* @__PURE__ */ e(at, { filled: s === "up" })
|
|
598
598
|
}
|
|
599
599
|
),
|
|
600
600
|
/* @__PURE__ */ e(
|
|
@@ -605,11 +605,11 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
605
605
|
onClick: n,
|
|
606
606
|
"aria-label": "Not helpful",
|
|
607
607
|
"aria-pressed": s === "down",
|
|
608
|
-
children: /* @__PURE__ */ e(
|
|
608
|
+
children: /* @__PURE__ */ e(lt, { filled: s === "down" })
|
|
609
609
|
}
|
|
610
610
|
)
|
|
611
|
-
] }),
|
|
612
|
-
var
|
|
611
|
+
] }), it = (s) => {
|
|
612
|
+
var X, le;
|
|
613
613
|
const {
|
|
614
614
|
additionalMessageInputProps: t,
|
|
615
615
|
chatbotVotingEnabled: n,
|
|
@@ -626,7 +626,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
626
626
|
message: a,
|
|
627
627
|
renderText: E,
|
|
628
628
|
threadList: S
|
|
629
|
-
} = s, { client: v } = Ue("CustomMessage"), [k, b] = I(!1), m = os(a.id), { selected: w, voteUp: T, voteDown: h } =
|
|
629
|
+
} = s, { client: v } = Ue("CustomMessage"), [k, b] = I(!1), m = os(a.id), { selected: w, voteUp: T, voteDown: h } = rt(a), {
|
|
630
630
|
Attachment: c = cs,
|
|
631
631
|
EditMessageModal: x = ds,
|
|
632
632
|
MessageBlocked: A = us,
|
|
@@ -637,10 +637,10 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
637
637
|
ReminderNotification: z = xs,
|
|
638
638
|
StreamedMessageText: ee = bs,
|
|
639
639
|
PinIndicator: Z
|
|
640
|
-
} = is("CustomMessage"), se = Ns(a), te = Cs(a), re =
|
|
640
|
+
} = is("CustomMessage"), se = Ns(a), te = Cs(a), re = Ne(
|
|
641
641
|
() => N == null ? void 0 : N(a),
|
|
642
642
|
[N, a]
|
|
643
|
-
), V =
|
|
643
|
+
), V = Ne(
|
|
644
644
|
() => !a.shared_location && !a.attachments ? [] : a.shared_location ? [a.shared_location, ...a.attachments ?? []] : a.attachments,
|
|
645
645
|
[a]
|
|
646
646
|
);
|
|
@@ -650,7 +650,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
650
650
|
return /* @__PURE__ */ e(R, { message: a });
|
|
651
651
|
if (ws(a))
|
|
652
652
|
return /* @__PURE__ */ e(A, {});
|
|
653
|
-
const
|
|
653
|
+
const J = !S && !!a.reply_count, P = !S && a.show_in_channel && a.parent_id, U = a.status === "failed" && ((X = a.error) == null ? void 0 : X.status) !== 403, G = ys(a);
|
|
654
654
|
let F;
|
|
655
655
|
U ? F = () => g(a) : G && (F = () => b(!0));
|
|
656
656
|
const W = D(
|
|
@@ -665,13 +665,13 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
665
665
|
"str-chat__message--pinned pinned-message": a.pinned,
|
|
666
666
|
"str-chat__message--with-reactions": te,
|
|
667
667
|
"str-chat__message-send-can-be-retried": (a == null ? void 0 : a.status) === "failed" && ((le = a == null ? void 0 : a.error) == null ? void 0 : le.status) !== 403,
|
|
668
|
-
"str-chat__message-with-thread-link":
|
|
668
|
+
"str-chat__message-with-thread-link": J || P,
|
|
669
669
|
"str-chat__virtual-message__wrapper--end": o,
|
|
670
670
|
"str-chat__virtual-message__wrapper--first": d,
|
|
671
671
|
"str-chat__virtual-message__wrapper--group": l
|
|
672
672
|
}
|
|
673
|
-
), ae = a.poll_id && v.polls.fromState(a.poll_id),
|
|
674
|
-
return /* @__PURE__ */ i(
|
|
673
|
+
), ae = a.poll_id && v.polls.fromState(a.poll_id), Q = st(a);
|
|
674
|
+
return /* @__PURE__ */ i(we, { children: [
|
|
675
675
|
r && /* @__PURE__ */ e(
|
|
676
676
|
x,
|
|
677
677
|
{
|
|
@@ -715,7 +715,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
715
715
|
marginInlineEnd: 0,
|
|
716
716
|
marginInlineStart: 0
|
|
717
717
|
},
|
|
718
|
-
children:
|
|
718
|
+
children: Q ? (
|
|
719
719
|
/* Tip-only messages render as a standalone bubble */
|
|
720
720
|
/* @__PURE__ */ e(Le, { message: a, standalone: !0 })
|
|
721
721
|
) : /* @__PURE__ */ i("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
@@ -739,7 +739,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
739
739
|
] }),
|
|
740
740
|
/* @__PURE__ */ e(Le, { message: a }),
|
|
741
741
|
n && pe(a) && /* @__PURE__ */ e(
|
|
742
|
-
|
|
742
|
+
ot,
|
|
743
743
|
{
|
|
744
744
|
selected: w,
|
|
745
745
|
onVoteUp: T,
|
|
@@ -749,7 +749,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
749
749
|
] })
|
|
750
750
|
}
|
|
751
751
|
),
|
|
752
|
-
|
|
752
|
+
J && /* @__PURE__ */ e(
|
|
753
753
|
H,
|
|
754
754
|
{
|
|
755
755
|
onClick: f,
|
|
@@ -759,17 +759,17 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
759
759
|
P && /* @__PURE__ */ e(M, {})
|
|
760
760
|
] }, a.id)
|
|
761
761
|
] });
|
|
762
|
-
},
|
|
763
|
-
|
|
762
|
+
}, ct = B.memo(
|
|
763
|
+
it,
|
|
764
764
|
ls
|
|
765
|
-
),
|
|
765
|
+
), dt = (s) => {
|
|
766
766
|
const t = Ss("CustomMessage");
|
|
767
|
-
return /* @__PURE__ */ e(
|
|
768
|
-
},
|
|
767
|
+
return /* @__PURE__ */ e(ct, { ...t, ...s });
|
|
768
|
+
}, ut = (s) => ({
|
|
769
769
|
linkPreviews: Array.from(s.previews.values()).filter(
|
|
770
770
|
(t) => Re.previewIsLoaded(t) || Re.previewIsLoading(t)
|
|
771
771
|
)
|
|
772
|
-
}),
|
|
772
|
+
}), mt = ({
|
|
773
773
|
link: s,
|
|
774
774
|
onDismiss: t
|
|
775
775
|
}) => {
|
|
@@ -799,7 +799,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
799
799
|
},
|
|
800
800
|
className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl",
|
|
801
801
|
"aria-label": "Close link preview",
|
|
802
|
-
children: /* @__PURE__ */ e(
|
|
802
|
+
children: /* @__PURE__ */ e(fe, { className: "size-4 text-black/90" })
|
|
803
803
|
}
|
|
804
804
|
),
|
|
805
805
|
/* @__PURE__ */ i("div", { className: "p-2", children: [
|
|
@@ -809,28 +809,28 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
809
809
|
]
|
|
810
810
|
}
|
|
811
811
|
);
|
|
812
|
-
},
|
|
812
|
+
}, ht = () => {
|
|
813
813
|
const { linkPreviewsManager: s } = Ms(), { linkPreviews: t } = ks(
|
|
814
814
|
s.state,
|
|
815
|
-
|
|
815
|
+
ut
|
|
816
816
|
), n = (o) => {
|
|
817
817
|
s.dismissPreview(o);
|
|
818
818
|
};
|
|
819
819
|
return t.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center w-full gap-2 mb-4", children: t.map((o) => /* @__PURE__ */ e(
|
|
820
|
-
|
|
820
|
+
mt,
|
|
821
821
|
{
|
|
822
822
|
link: o,
|
|
823
823
|
onDismiss: n
|
|
824
824
|
},
|
|
825
825
|
o.og_scrape_url
|
|
826
826
|
)) }) : null;
|
|
827
|
-
},
|
|
827
|
+
}, ft = () => {
|
|
828
828
|
const { handleSubmit: s } = Ts(), t = Rs();
|
|
829
|
-
return /* @__PURE__ */ i(
|
|
829
|
+
return /* @__PURE__ */ i(we, { children: [
|
|
830
830
|
/* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e(Fs, {}) }),
|
|
831
831
|
/* @__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: [
|
|
832
832
|
/* @__PURE__ */ e(Ls, {}),
|
|
833
|
-
/* @__PURE__ */ e(
|
|
833
|
+
/* @__PURE__ */ e(ht, {}),
|
|
834
834
|
/* @__PURE__ */ e(Ps, {}),
|
|
835
835
|
/* @__PURE__ */ i("div", { className: "flex", children: [
|
|
836
836
|
/* @__PURE__ */ e("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ e(
|
|
@@ -856,18 +856,18 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
856
856
|
] })
|
|
857
857
|
] })
|
|
858
858
|
] });
|
|
859
|
-
},
|
|
859
|
+
}, gt = ({
|
|
860
860
|
renderActions: s
|
|
861
861
|
}) => /* @__PURE__ */ i("div", { className: "message-input flex items-center gap-2 p-4", children: [
|
|
862
862
|
s && (s == null ? void 0 : s()),
|
|
863
|
-
/* @__PURE__ */ e(Ds, { Input:
|
|
864
|
-
] }),
|
|
863
|
+
/* @__PURE__ */ e(Ds, { Input: ft })
|
|
864
|
+
] }), xt = [
|
|
865
865
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
866
866
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
867
|
-
],
|
|
867
|
+
], bt = {
|
|
868
868
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
869
869
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
870
|
-
}, Pe = (s) =>
|
|
870
|
+
}, Pe = (s) => xt.includes(s), Nt = (s) => {
|
|
871
871
|
var r;
|
|
872
872
|
const t = (r = s.metadata) == null ? void 0 : r.custom_type;
|
|
873
873
|
if (Pe(t))
|
|
@@ -875,11 +875,11 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
875
875
|
const n = s.dm_agent_system_type;
|
|
876
876
|
if (Pe(n))
|
|
877
877
|
return n;
|
|
878
|
-
},
|
|
878
|
+
}, Ct = (s) => {
|
|
879
879
|
var r;
|
|
880
|
-
const t = s.message.hide_date === !0, n =
|
|
880
|
+
const t = s.message.hide_date === !0, n = Nt(s.message);
|
|
881
881
|
if (n) {
|
|
882
|
-
const o = ((r = s.message.text) == null ? void 0 : r.trim()) ||
|
|
882
|
+
const o = ((r = s.message.text) == null ? void 0 : r.trim()) || bt[n];
|
|
883
883
|
return /* @__PURE__ */ i("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
884
884
|
/* @__PURE__ */ i(
|
|
885
885
|
"div",
|
|
@@ -904,7 +904,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
904
904
|
className: "mes-dm-agent-system-message__close",
|
|
905
905
|
"aria-hidden": !0,
|
|
906
906
|
"data-testid": "dm-agent-system-message-close",
|
|
907
|
-
children: /* @__PURE__ */ e(
|
|
907
|
+
children: /* @__PURE__ */ e(fe, { size: 14, weight: "regular", "aria-hidden": !0 })
|
|
908
908
|
}
|
|
909
909
|
)
|
|
910
910
|
]
|
|
@@ -921,7 +921,7 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
921
921
|
] }),
|
|
922
922
|
!t && /* @__PURE__ */ e(Ie, { message: s.message })
|
|
923
923
|
] });
|
|
924
|
-
},
|
|
924
|
+
}, vt = () => null, wt = ({ className: s, message: t }) => /* @__PURE__ */ i(
|
|
925
925
|
"div",
|
|
926
926
|
{
|
|
927
927
|
className: D("flex items-center justify-center h-full", s),
|
|
@@ -965,11 +965,11 @@ const lt = ({ filled: s }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
965
965
|
]
|
|
966
966
|
}
|
|
967
967
|
), he = B.memo(() => /* @__PURE__ */ e("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
968
|
-
/* @__PURE__ */ e(
|
|
968
|
+
/* @__PURE__ */ e(wt, { className: "w-6 h-6" }),
|
|
969
969
|
/* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
970
970
|
] }) }));
|
|
971
971
|
he.displayName = "LoadingState";
|
|
972
|
-
const
|
|
972
|
+
const yt = ({
|
|
973
973
|
onBack: s,
|
|
974
974
|
showBackButton: t,
|
|
975
975
|
onShowInfo: n,
|
|
@@ -977,7 +977,7 @@ const pt = ({
|
|
|
977
977
|
showStarButton: o = !1
|
|
978
978
|
}) => {
|
|
979
979
|
var y, a, E, S, v, k;
|
|
980
|
-
const { channel: d } =
|
|
980
|
+
const { channel: d } = ye(), l = B.useMemo(() => Object.values(d.state.members || {}).find(
|
|
981
981
|
(m) => {
|
|
982
982
|
var w;
|
|
983
983
|
return ((w = m.user) == null ? void 0 : w.id) && m.user.id !== d._client.userID;
|
|
@@ -1121,7 +1121,7 @@ const pt = ({
|
|
|
1121
1121
|
] })
|
|
1122
1122
|
] })
|
|
1123
1123
|
] });
|
|
1124
|
-
},
|
|
1124
|
+
}, pt = ({
|
|
1125
1125
|
dialogRef: s,
|
|
1126
1126
|
onClose: t,
|
|
1127
1127
|
participant: n,
|
|
@@ -1135,8 +1135,8 @@ const pt = ({
|
|
|
1135
1135
|
onReportParticipantClick: C,
|
|
1136
1136
|
customChannelActions: N
|
|
1137
1137
|
}) => {
|
|
1138
|
-
var ee, Z, se, te, re, V,
|
|
1139
|
-
const { service: y, debug: a } =
|
|
1138
|
+
var ee, Z, se, te, re, V, J;
|
|
1139
|
+
const { service: y, debug: a } = ge(), [E, S] = I(!1), [v, k] = I(!1), [b, m] = I(!1), w = L(async () => {
|
|
1140
1140
|
var P;
|
|
1141
1141
|
if (!(!y || !((P = n == null ? void 0 : n.user) != null && P.id)))
|
|
1142
1142
|
try {
|
|
@@ -1202,7 +1202,7 @@ const pt = ({
|
|
|
1202
1202
|
);
|
|
1203
1203
|
};
|
|
1204
1204
|
if (!n) return null;
|
|
1205
|
-
const A = ((Z = n.user) == null ? void 0 : Z.name) || ((se = n.user) == null ? void 0 : se.id) || "Unknown member", _ = (te = n.user) == null ? void 0 : te.image, R = (re = n.user) == null ? void 0 : re.email, M = (V = n.user) == null ? void 0 : V.username, H = R || (M ? `linktr.ee/${M}` : void 0), z = ((
|
|
1205
|
+
const A = ((Z = n.user) == null ? void 0 : Z.name) || ((se = n.user) == null ? void 0 : se.id) || "Unknown member", _ = (te = n.user) == null ? void 0 : te.image, R = (re = n.user) == null ? void 0 : re.email, M = (V = n.user) == null ? void 0 : V.username, H = R || (M ? `linktr.ee/${M}` : void 0), z = ((J = n.user) == null ? void 0 : J.id) || "unknown";
|
|
1206
1206
|
return (
|
|
1207
1207
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
1208
1208
|
/* @__PURE__ */ e(
|
|
@@ -1265,7 +1265,7 @@ const pt = ({
|
|
|
1265
1265
|
disabled: v,
|
|
1266
1266
|
"aria-busy": v,
|
|
1267
1267
|
children: [
|
|
1268
|
-
v ? /* @__PURE__ */ e(ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(
|
|
1268
|
+
v ? /* @__PURE__ */ e(ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Hs, { className: "h-5 w-5" }),
|
|
1269
1269
|
/* @__PURE__ */ e("span", { children: "Delete Conversation" })
|
|
1270
1270
|
]
|
|
1271
1271
|
}
|
|
@@ -1294,7 +1294,7 @@ const pt = ({
|
|
|
1294
1294
|
}
|
|
1295
1295
|
) }),
|
|
1296
1296
|
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(de, { variant: "danger", onClick: x, children: [
|
|
1297
|
-
/* @__PURE__ */ e(
|
|
1297
|
+
/* @__PURE__ */ e(Vs, { className: "h-5 w-5" }),
|
|
1298
1298
|
/* @__PURE__ */ e("span", { children: "Report" })
|
|
1299
1299
|
] }) }),
|
|
1300
1300
|
N
|
|
@@ -1304,7 +1304,7 @@ const pt = ({
|
|
|
1304
1304
|
}
|
|
1305
1305
|
)
|
|
1306
1306
|
);
|
|
1307
|
-
},
|
|
1307
|
+
}, Et = ({
|
|
1308
1308
|
onBack: s,
|
|
1309
1309
|
showBackButton: t,
|
|
1310
1310
|
renderMessageInputActions: n,
|
|
@@ -1319,7 +1319,7 @@ const pt = ({
|
|
|
1319
1319
|
renderChannelBanner: N,
|
|
1320
1320
|
customChannelActions: y
|
|
1321
1321
|
}) => {
|
|
1322
|
-
const { channel: a } =
|
|
1322
|
+
const { channel: a } = ye(), E = Y(null), S = B.useMemo(() => Object.values(a.state.members || {}).find(
|
|
1323
1323
|
(w) => {
|
|
1324
1324
|
var T;
|
|
1325
1325
|
return ((T = w.user) == null ? void 0 : T.id) && w.user.id !== a._client.userID;
|
|
@@ -1337,16 +1337,16 @@ const pt = ({
|
|
|
1337
1337
|
var m;
|
|
1338
1338
|
(m = E.current) == null || m.close();
|
|
1339
1339
|
}, []);
|
|
1340
|
-
return /* @__PURE__ */ i(
|
|
1340
|
+
return /* @__PURE__ */ i(we, { children: [
|
|
1341
1341
|
/* @__PURE__ */ e(
|
|
1342
1342
|
As,
|
|
1343
1343
|
{
|
|
1344
1344
|
overrides: {
|
|
1345
|
-
Message: (m) => /* @__PURE__ */ e(
|
|
1345
|
+
Message: (m) => /* @__PURE__ */ e(dt, { ...m, chatbotVotingEnabled: C })
|
|
1346
1346
|
},
|
|
1347
1347
|
children: /* @__PURE__ */ i(Bs, { children: [
|
|
1348
1348
|
/* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(
|
|
1349
|
-
|
|
1349
|
+
yt,
|
|
1350
1350
|
{
|
|
1351
1351
|
onBack: s,
|
|
1352
1352
|
showBackButton: t,
|
|
@@ -1365,7 +1365,7 @@ const pt = ({
|
|
|
1365
1365
|
}
|
|
1366
1366
|
) }),
|
|
1367
1367
|
/* @__PURE__ */ e(
|
|
1368
|
-
|
|
1368
|
+
gt,
|
|
1369
1369
|
{
|
|
1370
1370
|
renderActions: () => n == null ? void 0 : n(a)
|
|
1371
1371
|
}
|
|
@@ -1374,7 +1374,7 @@ const pt = ({
|
|
|
1374
1374
|
}
|
|
1375
1375
|
),
|
|
1376
1376
|
/* @__PURE__ */ e(
|
|
1377
|
-
|
|
1377
|
+
pt,
|
|
1378
1378
|
{
|
|
1379
1379
|
dialogRef: E,
|
|
1380
1380
|
onClose: b,
|
|
@@ -1400,7 +1400,7 @@ const pt = ({
|
|
|
1400
1400
|
onLeaveConversation: o,
|
|
1401
1401
|
onBlockParticipant: d,
|
|
1402
1402
|
className: l,
|
|
1403
|
-
CustomChannelEmptyState: u =
|
|
1403
|
+
CustomChannelEmptyState: u = vt,
|
|
1404
1404
|
showDeleteConversation: f = !0,
|
|
1405
1405
|
onDeleteConversationClick: g,
|
|
1406
1406
|
onBlockParticipantClick: C,
|
|
@@ -1444,13 +1444,13 @@ const pt = ({
|
|
|
1444
1444
|
Os,
|
|
1445
1445
|
{
|
|
1446
1446
|
channel: s,
|
|
1447
|
-
MessageSystem:
|
|
1447
|
+
MessageSystem: Ct,
|
|
1448
1448
|
EmptyStateIndicator: u,
|
|
1449
1449
|
LoadingIndicator: he,
|
|
1450
|
-
DateSeparator:
|
|
1450
|
+
DateSeparator: tt,
|
|
1451
1451
|
doSendMessageRequest: m,
|
|
1452
1452
|
children: /* @__PURE__ */ e(
|
|
1453
|
-
|
|
1453
|
+
Et,
|
|
1454
1454
|
{
|
|
1455
1455
|
onBack: t,
|
|
1456
1456
|
showBackButton: n,
|
|
@@ -1475,7 +1475,7 @@ const pt = ({
|
|
|
1475
1475
|
}
|
|
1476
1476
|
);
|
|
1477
1477
|
Ge.displayName = "ChannelView";
|
|
1478
|
-
function
|
|
1478
|
+
function _t({
|
|
1479
1479
|
searchQuery: s,
|
|
1480
1480
|
setSearchQuery: t,
|
|
1481
1481
|
placeholder: n
|
|
@@ -1483,7 +1483,7 @@ function It({
|
|
|
1483
1483
|
const r = Y(null);
|
|
1484
1484
|
return /* @__PURE__ */ i("div", { className: "relative", children: [
|
|
1485
1485
|
/* @__PURE__ */ e(
|
|
1486
|
-
|
|
1486
|
+
Ws,
|
|
1487
1487
|
{
|
|
1488
1488
|
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-stone",
|
|
1489
1489
|
weight: "bold"
|
|
@@ -1509,12 +1509,12 @@ function It({
|
|
|
1509
1509
|
t(""), (o = r.current) == null || o.focus();
|
|
1510
1510
|
},
|
|
1511
1511
|
className: "absolute right-3 top-1/2 -translate-y-1/2 p-1 text-stone hover:text-charcoal",
|
|
1512
|
-
children: /* @__PURE__ */ e(
|
|
1512
|
+
children: /* @__PURE__ */ e(fe, { className: "h-4 w-4", weight: "bold" })
|
|
1513
1513
|
}
|
|
1514
1514
|
)
|
|
1515
1515
|
] });
|
|
1516
1516
|
}
|
|
1517
|
-
const
|
|
1517
|
+
const It = ({
|
|
1518
1518
|
participantSource: s,
|
|
1519
1519
|
onSelectParticipant: t,
|
|
1520
1520
|
onClose: n,
|
|
@@ -1523,7 +1523,7 @@ const St = ({
|
|
|
1523
1523
|
searchPlaceholder: d = "Search participants...",
|
|
1524
1524
|
className: l
|
|
1525
1525
|
}) => {
|
|
1526
|
-
const { debug: u } =
|
|
1526
|
+
const { debug: u } = ge(), [f, g] = I(""), [C, N] = I([]), [y, a] = I(!1), [E, S] = I(null), [v, k] = I(
|
|
1527
1527
|
null
|
|
1528
1528
|
), b = Y(!1);
|
|
1529
1529
|
q(() => {
|
|
@@ -1589,7 +1589,7 @@ const St = ({
|
|
|
1589
1589
|
s.totalCount !== void 0 && ` • ${s.totalCount} ${o} total`
|
|
1590
1590
|
] }),
|
|
1591
1591
|
/* @__PURE__ */ e(
|
|
1592
|
-
|
|
1592
|
+
_t,
|
|
1593
1593
|
{
|
|
1594
1594
|
searchQuery: f,
|
|
1595
1595
|
setSearchQuery: g,
|
|
@@ -1651,7 +1651,7 @@ const St = ({
|
|
|
1651
1651
|
] }) })
|
|
1652
1652
|
] }) })
|
|
1653
1653
|
] });
|
|
1654
|
-
},
|
|
1654
|
+
}, St = ({ className: s }) => /* @__PURE__ */ i(
|
|
1655
1655
|
"svg",
|
|
1656
1656
|
{
|
|
1657
1657
|
width: "140",
|
|
@@ -1787,7 +1787,7 @@ const St = ({
|
|
|
1787
1787
|
}
|
|
1788
1788
|
), He = B.memo(
|
|
1789
1789
|
({ hasChannels: s, channelsLoaded: t }) => /* @__PURE__ */ e("div", { className: "messaging-empty-state flex items-center justify-center h-full p-8 text-balance", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center max-w-sm text-center", children: [
|
|
1790
|
-
/* @__PURE__ */ e(
|
|
1790
|
+
/* @__PURE__ */ e(St, {}),
|
|
1791
1791
|
t && !s && /* @__PURE__ */ i("div", { className: "mt-8", children: [
|
|
1792
1792
|
/* @__PURE__ */ e("h2", { className: "font-medium text-black text-[18px] mb-2", children: "Your inbox is empty" }),
|
|
1793
1793
|
/* @__PURE__ */ e("p", { className: "text-[#676B5F] text-sm mb-6", children: "Share with your followers to start receiving messages" })
|
|
@@ -1810,7 +1810,7 @@ const me = B.memo(({ message: s, onBack: t }) => /* @__PURE__ */ e("div", { clas
|
|
|
1810
1810
|
)
|
|
1811
1811
|
] }) }));
|
|
1812
1812
|
me.displayName = "ErrorState";
|
|
1813
|
-
const
|
|
1813
|
+
const Ot = ({
|
|
1814
1814
|
capabilities: s = {},
|
|
1815
1815
|
className: t,
|
|
1816
1816
|
renderMessageInputActions: n,
|
|
@@ -1842,7 +1842,7 @@ const At = ({
|
|
|
1842
1842
|
error: _,
|
|
1843
1843
|
refreshConnection: R,
|
|
1844
1844
|
debug: M
|
|
1845
|
-
} =
|
|
1845
|
+
} = Ys(), [H, z] = I(null), [ee, Z] = I(!1), [se, te] = I(!1), [re, V] = I(!1), [J, P] = I(/* @__PURE__ */ new Set()), [U, G] = I(0), [F, W] = I(!1), [ae, Q] = I(null), X = Y(null), {
|
|
1846
1846
|
participantSource: le,
|
|
1847
1847
|
participantLabel: Ee = "participants",
|
|
1848
1848
|
showDeleteConversation: Ve = !0
|
|
@@ -1874,13 +1874,13 @@ const At = ({
|
|
|
1874
1874
|
{ limit: 100 }
|
|
1875
1875
|
), O = /* @__PURE__ */ new Set();
|
|
1876
1876
|
$.forEach((j) => {
|
|
1877
|
-
const
|
|
1878
|
-
Object.values(
|
|
1877
|
+
const xe = j.state.members;
|
|
1878
|
+
Object.values(xe).forEach((Ke) => {
|
|
1879
1879
|
var _e;
|
|
1880
|
-
const
|
|
1881
|
-
|
|
1880
|
+
const be = (_e = Ke.user) == null ? void 0 : _e.id;
|
|
1881
|
+
be && be !== p && O.add(be);
|
|
1882
1882
|
});
|
|
1883
|
-
}), P((j) => j.size === O.size && [...j].every((
|
|
1883
|
+
}), P((j) => j.size === O.size && [...j].every((xe) => O.has(xe)) ? j : O), Z($.length > 0), te(!0), oe.current = p, M && console.log("[MessagingShell] Channels synced successfully:", {
|
|
1884
1884
|
channelCount: $.length,
|
|
1885
1885
|
memberCount: O.size
|
|
1886
1886
|
});
|
|
@@ -1911,7 +1911,7 @@ const At = ({
|
|
|
1911
1911
|
{ limit: 1 }
|
|
1912
1912
|
);
|
|
1913
1913
|
if (O.length > 0)
|
|
1914
|
-
z(O[0]), W(!0),
|
|
1914
|
+
z(O[0]), W(!0), Q(null), r && r(O[0]), M && console.log(
|
|
1915
1915
|
"[MessagingShell] Initial conversation loaded:",
|
|
1916
1916
|
O[0].id
|
|
1917
1917
|
);
|
|
@@ -1927,7 +1927,7 @@ const At = ({
|
|
|
1927
1927
|
email: l.email,
|
|
1928
1928
|
phone: l.phone
|
|
1929
1929
|
});
|
|
1930
|
-
z(j), W(!0),
|
|
1930
|
+
z(j), W(!0), Q(null), r && r(j), M && console.log(
|
|
1931
1931
|
"[MessagingShell] Channel created and loaded:",
|
|
1932
1932
|
j.id
|
|
1933
1933
|
);
|
|
@@ -1935,10 +1935,10 @@ const At = ({
|
|
|
1935
1935
|
console.error(
|
|
1936
1936
|
"[MessagingShell] Failed to create conversation:",
|
|
1937
1937
|
j
|
|
1938
|
-
),
|
|
1938
|
+
), Q("Failed to create conversation");
|
|
1939
1939
|
}
|
|
1940
1940
|
} else
|
|
1941
|
-
|
|
1941
|
+
Q(
|
|
1942
1942
|
"No conversation found with this account"
|
|
1943
1943
|
), M && console.log(
|
|
1944
1944
|
"[MessagingShell] No conversation found for:",
|
|
@@ -1948,7 +1948,7 @@ const At = ({
|
|
|
1948
1948
|
console.error(
|
|
1949
1949
|
"[MessagingShell] Failed to load initial conversation:",
|
|
1950
1950
|
O
|
|
1951
|
-
),
|
|
1951
|
+
), Q("Failed to load conversation");
|
|
1952
1952
|
}
|
|
1953
1953
|
})();
|
|
1954
1954
|
}, [
|
|
@@ -1987,7 +1987,7 @@ const At = ({
|
|
|
1987
1987
|
} catch (j) {
|
|
1988
1988
|
console.warn("[MessagingShell] Failed to unhide channel:", j);
|
|
1989
1989
|
}
|
|
1990
|
-
z(O), V(!1), ($ =
|
|
1990
|
+
z(O), V(!1), ($ = X.current) == null || $.close(), o == null || o(p);
|
|
1991
1991
|
} catch (O) {
|
|
1992
1992
|
console.error("[MessagingShell] Failed to start conversation:", O);
|
|
1993
1993
|
}
|
|
@@ -1995,18 +1995,18 @@ const At = ({
|
|
|
1995
1995
|
[h, o, M]
|
|
1996
1996
|
), ie = L(() => {
|
|
1997
1997
|
var p;
|
|
1998
|
-
V(!1), (p =
|
|
1999
|
-
}, []),
|
|
1998
|
+
V(!1), (p = X.current) == null || p.close();
|
|
1999
|
+
}, []), Je = L(
|
|
2000
2000
|
(p) => {
|
|
2001
|
-
p.target ===
|
|
2001
|
+
p.target === X.current && ie();
|
|
2002
2002
|
},
|
|
2003
2003
|
[ie]
|
|
2004
|
-
),
|
|
2004
|
+
), Qe = L(
|
|
2005
2005
|
async (p) => {
|
|
2006
2006
|
M && console.log("[MessagingShell] Leaving conversation:", p.id), z(null), W(!1), oe.current = null, await ne();
|
|
2007
2007
|
},
|
|
2008
2008
|
[ne, M]
|
|
2009
|
-
),
|
|
2009
|
+
), Xe = L(
|
|
2010
2010
|
async (p) => {
|
|
2011
2011
|
M && console.log("[MessagingShell] Blocking participant:", p), z(null), W(!1), oe.current = null, await ne();
|
|
2012
2012
|
},
|
|
@@ -2072,8 +2072,8 @@ const At = ({
|
|
|
2072
2072
|
showBackButton: !F,
|
|
2073
2073
|
renderMessageInputActions: n,
|
|
2074
2074
|
renderChannelBanner: w,
|
|
2075
|
-
onLeaveConversation:
|
|
2076
|
-
onBlockParticipant:
|
|
2075
|
+
onLeaveConversation: Qe,
|
|
2076
|
+
onBlockParticipant: Xe,
|
|
2077
2077
|
CustomChannelEmptyState: u,
|
|
2078
2078
|
showDeleteConversation: Ve,
|
|
2079
2079
|
onDeleteConversationClick: N,
|
|
@@ -2104,17 +2104,17 @@ const At = ({
|
|
|
2104
2104
|
/* @__PURE__ */ e(
|
|
2105
2105
|
"dialog",
|
|
2106
2106
|
{
|
|
2107
|
-
ref:
|
|
2107
|
+
ref: X,
|
|
2108
2108
|
className: "mes-dialog",
|
|
2109
|
-
onClick:
|
|
2109
|
+
onClick: Je,
|
|
2110
2110
|
onClose: ie,
|
|
2111
2111
|
children: /* @__PURE__ */ e("div", { className: "h-full w-full bg-white shadow-max-elevation-light", children: /* @__PURE__ */ e(
|
|
2112
|
-
|
|
2112
|
+
It,
|
|
2113
2113
|
{
|
|
2114
2114
|
participantSource: le,
|
|
2115
2115
|
onSelectParticipant: Ze,
|
|
2116
2116
|
onClose: ie,
|
|
2117
|
-
existingParticipantIds:
|
|
2117
|
+
existingParticipantIds: J,
|
|
2118
2118
|
participantLabel: Ee,
|
|
2119
2119
|
searchPlaceholder: `Search ${Ee}...`
|
|
2120
2120
|
},
|
|
@@ -2125,7 +2125,7 @@ const At = ({
|
|
|
2125
2125
|
]
|
|
2126
2126
|
}
|
|
2127
2127
|
);
|
|
2128
|
-
},
|
|
2128
|
+
}, Mt = ({
|
|
2129
2129
|
question: s,
|
|
2130
2130
|
onClick: t,
|
|
2131
2131
|
loading: n = !1,
|
|
@@ -2147,7 +2147,7 @@ const At = ({
|
|
|
2147
2147
|
),
|
|
2148
2148
|
children: s
|
|
2149
2149
|
}
|
|
2150
|
-
),
|
|
2150
|
+
), At = ({
|
|
2151
2151
|
faqs: s,
|
|
2152
2152
|
onFaqClick: t,
|
|
2153
2153
|
loadingFaqId: n,
|
|
@@ -2176,7 +2176,7 @@ const At = ({
|
|
|
2176
2176
|
children: [
|
|
2177
2177
|
r && /* @__PURE__ */ e("p", { className: "text-md text-charcoal mb-4", children: r }),
|
|
2178
2178
|
u.map((f) => /* @__PURE__ */ e(
|
|
2179
|
-
|
|
2179
|
+
Mt,
|
|
2180
2180
|
{
|
|
2181
2181
|
question: f.question,
|
|
2182
2182
|
onClick: () => t(f.id),
|
|
@@ -2188,7 +2188,7 @@ const At = ({
|
|
|
2188
2188
|
}
|
|
2189
2189
|
)
|
|
2190
2190
|
] }) });
|
|
2191
|
-
},
|
|
2191
|
+
}, Bt = (s, t = {}) => {
|
|
2192
2192
|
const { initialSearch: n = "", pageSize: r = 20 } = t, [o, d] = I([]), [l, u] = I(!1), [f, g] = I(null), [C, N] = I(n), [y, a] = I(!0), [E, S] = I(), v = L(async (w = !1, T) => {
|
|
2193
2193
|
if (l) return;
|
|
2194
2194
|
const h = T !== void 0 ? T : C;
|
|
@@ -2232,18 +2232,18 @@ const At = ({
|
|
|
2232
2232
|
export {
|
|
2233
2233
|
de as ActionButton,
|
|
2234
2234
|
K as Avatar,
|
|
2235
|
-
|
|
2235
|
+
vt as ChannelEmptyState,
|
|
2236
2236
|
je as ChannelList,
|
|
2237
2237
|
Ge as ChannelView,
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2238
|
+
At as FaqList,
|
|
2239
|
+
Mt as FaqListItem,
|
|
2240
|
+
ot as MessageVoteButtons,
|
|
2241
|
+
Ut as MessagingProvider,
|
|
2242
|
+
Ot as MessagingShell,
|
|
2243
|
+
It as ParticipantPicker,
|
|
2244
|
+
Zs as formatRelativeTime,
|
|
2245
|
+
rt as useMessageVote,
|
|
2246
|
+
Ys as useMessaging,
|
|
2247
|
+
Bt as useParticipants
|
|
2248
2248
|
};
|
|
2249
2249
|
//# sourceMappingURL=index.js.map
|