stream-chat-react 14.9.0 → 14.10.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/cjs/channel-detail.js +30 -22
- package/dist/cjs/channel-detail.js.map +1 -1
- package/dist/cjs/index.js +51 -57
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{useChannelHeaderOnlineStatus.72753090.js → useChannelHeaderOnlineStatus.6ace991c.js} +42 -26
- package/dist/cjs/useChannelHeaderOnlineStatus.6ace991c.js.map +1 -0
- package/dist/cjs/useNotificationApi.bf76a16b.js.map +1 -1
- package/dist/es/channel-detail.mjs +30 -22
- package/dist/es/channel-detail.mjs.map +1 -1
- package/dist/es/index.mjs +51 -57
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/{useChannelHeaderOnlineStatus.c86db868.mjs → useChannelHeaderOnlineStatus.d6065c22.mjs} +37 -27
- package/dist/es/useChannelHeaderOnlineStatus.d6065c22.mjs.map +1 -0
- package/dist/es/useNotificationApi.ed6bff88.mjs.map +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +7 -2
- package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/components/Avatar/utils.d.ts +3 -0
- package/dist/types/components/Avatar/utils.d.ts.map +1 -0
- package/dist/types/components/ChannelListItem/utils.d.ts.map +1 -1
- package/dist/types/components/Dialog/components/ContextMenu.d.ts.map +1 -1
- package/dist/types/components/Message/MessageRepliesCountButton.d.ts.map +1 -1
- package/dist/types/components/Message/MessageUI.d.ts.map +1 -1
- package/dist/types/components/Poll/PollOptionSelector.d.ts.map +1 -1
- package/dist/types/components/Poll/PollVote.d.ts.map +1 -1
- package/dist/types/components/Reactions/MessageReactionsDetail.d.ts.map +1 -1
- package/dist/types/components/Search/SearchResults/SearchResultItem.d.ts.map +1 -1
- package/dist/types/components/TextareaComposer/SuggestionList/MentionItem/UserItem.d.ts.map +1 -1
- package/dist/types/components/Threads/ThreadList/ThreadListItemUI.d.ts.map +1 -1
- package/dist/types/components/TypingIndicator/TypingIndicator.d.ts.map +1 -1
- package/dist/types/components/TypingIndicator/hooks/useDebouncedTypingActive.d.ts +2 -8
- package/dist/types/components/TypingIndicator/hooks/useDebouncedTypingActive.d.ts.map +1 -1
- package/dist/types/context/ComponentContext.d.ts +4 -0
- package/dist/types/context/ComponentContext.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersAddView.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesView.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/useChannelHeaderOnlineStatus.72753090.js.map +0 -1
- package/dist/es/useChannelHeaderOnlineStatus.c86db868.mjs.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_useNotificationApi = require("./useNotificationApi.bf76a16b.js");
|
|
3
|
-
const require_useChannelHeaderOnlineStatus = require("./useChannelHeaderOnlineStatus.
|
|
3
|
+
const require_useChannelHeaderOnlineStatus = require("./useChannelHeaderOnlineStatus.6ace991c.js");
|
|
4
4
|
const require_useMessageComposerController = require("./useMessageComposerController.f8f20e3d.js");
|
|
5
5
|
const require_audioProcessing = require("./audioProcessing.22303d69.js");
|
|
6
6
|
let react = require("react");
|
|
@@ -10353,14 +10353,14 @@ var DefaultCalloutDialog = ({ children, className, onClose }) => {
|
|
|
10353
10353
|
//#endregion
|
|
10354
10354
|
//#region src/components/Avatar/AvatarStack.tsx
|
|
10355
10355
|
function AvatarStack({ badgeSize, capLimit = 3, component: Component = "div", displayInfo = [], size }) {
|
|
10356
|
-
const { Avatar: Avatar$
|
|
10356
|
+
const { Avatar: Avatar$6 = require_useChannelHeaderOnlineStatus.Avatar } = require_useNotificationApi.useComponentContext(AvatarStack.name);
|
|
10357
10357
|
const displayInfoToRender = (0, react.useMemo)(() => displayInfo.length > capLimit ? displayInfo.slice(0, capLimit) : displayInfo, [displayInfo, capLimit]);
|
|
10358
10358
|
const overflowCount = displayInfo.length - displayInfoToRender.length;
|
|
10359
10359
|
if (!displayInfo.length) return null;
|
|
10360
10360
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Component, {
|
|
10361
10361
|
className: (0, clsx.default)("str-chat__avatar-stack", { [`str-chat__avatar-stack--size-${size}`]: typeof size === "string" }),
|
|
10362
10362
|
"data-testid": "avatar-stack",
|
|
10363
|
-
children: [displayInfoToRender.map((info, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Avatar$
|
|
10363
|
+
children: [displayInfoToRender.map((info, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Avatar$6, {
|
|
10364
10364
|
imageUrl: info.imageUrl,
|
|
10365
10365
|
size,
|
|
10366
10366
|
userName: info.userName
|
|
@@ -10686,14 +10686,11 @@ var MessageAlsoSentInChannelIndicator = () => {
|
|
|
10686
10686
|
//#endregion
|
|
10687
10687
|
//#region src/components/Message/MessageRepliesCountButton.tsx
|
|
10688
10688
|
function UnMemoizedMessageRepliesCountButton(props) {
|
|
10689
|
-
const { AvatarStack: AvatarStack$
|
|
10689
|
+
const { AvatarStack: AvatarStack$4 = AvatarStack, extractDisplayInfo: extractDisplayInfo$9 = require_useChannelHeaderOnlineStatus.extractDisplayInfo } = require_useNotificationApi.useComponentContext(MessageRepliesCountButton.name);
|
|
10690
10690
|
const { labelPlural, labelSingle, onClick, reply_count: replyCount = 0, thread_participants: threadParticipants = [] } = props;
|
|
10691
10691
|
const { channelCapabilities } = require_useNotificationApi.useChannelStateContext();
|
|
10692
10692
|
const { t } = require_useNotificationApi.useTranslationContext("MessageRepliesCountButton");
|
|
10693
|
-
const avatarStackDisplayInfo = (0, react.useMemo)(() => threadParticipants.slice(0, 3).map((
|
|
10694
|
-
imageUrl: participant.image,
|
|
10695
|
-
userName: participant.name || participant.id
|
|
10696
|
-
})), [threadParticipants]);
|
|
10693
|
+
const avatarStackDisplayInfo = (0, react.useMemo)(() => threadParticipants.slice(0, 3).map((user) => extractDisplayInfo$9({ user })), [extractDisplayInfo$9, threadParticipants]);
|
|
10697
10694
|
if (!replyCount) return null;
|
|
10698
10695
|
let replyCountText = t("replyCount", { count: replyCount });
|
|
10699
10696
|
if (labelPlural && replyCount > 1) replyCountText = `${replyCount} ${labelPlural}`;
|
|
@@ -10705,7 +10702,7 @@ function UnMemoizedMessageRepliesCountButton(props) {
|
|
|
10705
10702
|
"data-testid": "replies-count-button",
|
|
10706
10703
|
disabled: !channelCapabilities["send-reply"],
|
|
10707
10704
|
onClick,
|
|
10708
|
-
children: [replyCountText, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarStack$
|
|
10705
|
+
children: [replyCountText, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarStack$4, {
|
|
10709
10706
|
displayInfo: avatarStackDisplayInfo,
|
|
10710
10707
|
size: "xs"
|
|
10711
10708
|
})]
|
|
@@ -15033,15 +15030,16 @@ var PollVoteTimestamp = ({ timestamp }) => {
|
|
|
15033
15030
|
var PollVoteAuthor = ({ vote }) => {
|
|
15034
15031
|
const { t } = require_useNotificationApi.useTranslationContext();
|
|
15035
15032
|
const { client } = require_useNotificationApi.useChatContext();
|
|
15033
|
+
const { Avatar: Avatar$5 = require_useChannelHeaderOnlineStatus.Avatar, extractDisplayInfo: extractDisplayInfo$8 = require_useChannelHeaderOnlineStatus.extractDisplayInfo } = require_useNotificationApi.useComponentContext();
|
|
15036
15034
|
const displayName = client.user?.id && client.user.id === vote.user?.id ? t("You") : vote.user?.name || vote.user?.id || t("Anonymous");
|
|
15037
15035
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15038
15036
|
className: "str-chat__poll-vote__author",
|
|
15039
|
-
children: [vote.user && /* @__PURE__ */ (0,
|
|
15037
|
+
children: [vote.user && /* @__PURE__ */ (0, react.createElement)(Avatar$5, {
|
|
15038
|
+
...extractDisplayInfo$8({ user: vote.user }),
|
|
15040
15039
|
className: "str-chat__avatar--poll-vote-author",
|
|
15041
|
-
|
|
15042
|
-
size: "md"
|
|
15043
|
-
|
|
15044
|
-
}, `poll-vote-${vote.id}-avatar-${vote.user.id}`), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15040
|
+
key: `poll-vote-${vote.id}-avatar-${vote.user.id}`,
|
|
15041
|
+
size: "md"
|
|
15042
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15045
15043
|
className: "str-chat__poll-vote__author__name",
|
|
15046
15044
|
children: displayName
|
|
15047
15045
|
})]
|
|
@@ -15587,7 +15585,7 @@ var PollOptionSelector = ({ displayAvatarCount, option, voteCountVerbose }) => {
|
|
|
15587
15585
|
const { t } = require_useNotificationApi.useTranslationContext();
|
|
15588
15586
|
const { channelCapabilities = {} } = require_useNotificationApi.useChannelStateContext("PollOptionsShortlist");
|
|
15589
15587
|
const { message } = require_useChannelHeaderOnlineStatus.useMessageContext();
|
|
15590
|
-
const { AvatarStack: AvatarStack$
|
|
15588
|
+
const { AvatarStack: AvatarStack$3 = AvatarStack, extractDisplayInfo: extractDisplayInfo$7 = require_useChannelHeaderOnlineStatus.extractDisplayInfo } = require_useNotificationApi.useComponentContext();
|
|
15591
15589
|
const { poll } = usePollContext();
|
|
15592
15590
|
const { is_closed, latest_votes_by_option, maxVotedOptionIds, ownVotesByOptionId, vote_counts_by_option, voting_visibility } = require_useNotificationApi.useStateStore(poll.state, pollStateSelector$2);
|
|
15593
15591
|
const canCastVote = channelCapabilities["cast-poll-vote"] && !is_closed;
|
|
@@ -15604,12 +15602,9 @@ var PollOptionSelector = ({ displayAvatarCount, option, voteCountVerbose }) => {
|
|
|
15604
15602
|
ownVotesByOptionId,
|
|
15605
15603
|
poll
|
|
15606
15604
|
]);
|
|
15607
|
-
const avatarDisplayInfo = (0, react.useMemo)(() => latest_votes_by_option?.[option.id] && latest_votes_by_option[option.id].filter((vote) => !!vote.user && !(0, stream_chat.isVoteAnswer)(vote)).slice(0, displayAvatarCount).map(
|
|
15608
|
-
id: user.id,
|
|
15609
|
-
imageUrl: user.image,
|
|
15610
|
-
userName: user.name
|
|
15611
|
-
})), [
|
|
15605
|
+
const avatarDisplayInfo = (0, react.useMemo)(() => latest_votes_by_option?.[option.id] && latest_votes_by_option[option.id].filter((vote) => !!vote.user && !(0, stream_chat.isVoteAnswer)(vote)).slice(0, displayAvatarCount).map(extractDisplayInfo$7), [
|
|
15612
15606
|
displayAvatarCount,
|
|
15607
|
+
extractDisplayInfo$7,
|
|
15613
15608
|
latest_votes_by_option,
|
|
15614
15609
|
option.id
|
|
15615
15610
|
]);
|
|
@@ -15635,7 +15630,7 @@ var PollOptionSelector = ({ displayAvatarCount, option, voteCountVerbose }) => {
|
|
|
15635
15630
|
className: "str-chat__poll-option-votes",
|
|
15636
15631
|
children: [displayAvatarCount && voting_visibility === "public" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15637
15632
|
className: "str-chat__poll-option-voters",
|
|
15638
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarStack$
|
|
15633
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarStack$3, {
|
|
15639
15634
|
displayInfo: avatarDisplayInfo,
|
|
15640
15635
|
size: "xs"
|
|
15641
15636
|
})
|
|
@@ -17642,16 +17637,23 @@ var UserGroupItem = ({ entity, focused, ...buttonProps }) => {
|
|
|
17642
17637
|
* UI component for mentions rendered in suggestion list
|
|
17643
17638
|
*/
|
|
17644
17639
|
var UserItem = ({ entity, focused, ...buttonProps }) => {
|
|
17640
|
+
const { Avatar: Avatar$4 = require_useChannelHeaderOnlineStatus.Avatar, extractDisplayInfo: extractDisplayInfo$6 = require_useChannelHeaderOnlineStatus.extractDisplayInfo } = require_useNotificationApi.useComponentContext();
|
|
17645
17641
|
const hasEntity = !!Object.keys(entity).length;
|
|
17646
17642
|
const titleAttribute = entity.name || entity.id || "";
|
|
17647
|
-
const LeadingSlot = (0, react.useMemo)(() =>
|
|
17648
|
-
|
|
17649
|
-
|
|
17650
|
-
|
|
17651
|
-
|
|
17652
|
-
|
|
17653
|
-
|
|
17654
|
-
|
|
17643
|
+
const LeadingSlot = (0, react.useMemo)(() => {
|
|
17644
|
+
const displayInfo = extractDisplayInfo$6({ user: entity });
|
|
17645
|
+
return function UserItemAvatar() {
|
|
17646
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Avatar$4, {
|
|
17647
|
+
...displayInfo,
|
|
17648
|
+
"aria-hidden": true,
|
|
17649
|
+
size: "md"
|
|
17650
|
+
});
|
|
17651
|
+
};
|
|
17652
|
+
}, [
|
|
17653
|
+
Avatar$4,
|
|
17654
|
+
entity,
|
|
17655
|
+
extractDisplayInfo$6
|
|
17656
|
+
]);
|
|
17655
17657
|
if (!hasEntity) return null;
|
|
17656
17658
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_useChannelHeaderOnlineStatus.ListItemLayout, {
|
|
17657
17659
|
contentClassName: "str-chat__context-menu__button__label",
|
|
@@ -19134,7 +19136,7 @@ var MessageReactionsDetailLoadingIndicator = () => {
|
|
|
19134
19136
|
var MessageReactionsDetail = ({ handleFetchReactions, handleReaction, onSelectedReactionTypeChange, own_reactions, reactionDetailsSort: propReactionDetailsSort, reactionGroups, reactions, selectedReactionType, totalReactionCount }) => {
|
|
19135
19137
|
const [extendedReactionListOpen, setExtendedReactionListOpen] = (0, react.useState)(false);
|
|
19136
19138
|
const { client } = require_useNotificationApi.useChatContext();
|
|
19137
|
-
const { Avatar: Avatar$
|
|
19139
|
+
const { Avatar: Avatar$3 = require_useChannelHeaderOnlineStatus.Avatar, extractDisplayInfo: extractDisplayInfo$5 = require_useChannelHeaderOnlineStatus.extractDisplayInfo, LoadingIndicator = MessageReactionsDetailLoadingIndicator, reactionOptions = defaultReactionOptions, ReactionSelectorExtendedList = ReactionSelector.ExtendedList } = require_useNotificationApi.useComponentContext(MessageReactionsDetail.name);
|
|
19138
19140
|
const { t } = require_useNotificationApi.useTranslationContext();
|
|
19139
19141
|
const { handleReaction: contextHandleReaction, message, reactionDetailsSort: contextReactionDetailsSort } = require_useChannelHeaderOnlineStatus.useMessageContext(MessageReactionsDetail.name);
|
|
19140
19142
|
const reactionDetailsSort = propReactionDetailsSort ?? contextReactionDetailsSort ?? defaultReactionDetailsSort;
|
|
@@ -19216,12 +19218,11 @@ var MessageReactionsDetail = ({ handleFetchReactions, handleReaction, onSelected
|
|
|
19216
19218
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19217
19219
|
className: "str-chat__message-reactions-detail__user-list-item",
|
|
19218
19220
|
children: [
|
|
19219
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Avatar$
|
|
19221
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Avatar$3, {
|
|
19222
|
+
...extractDisplayInfo$5({ user: user ?? void 0 }),
|
|
19220
19223
|
className: "str-chat__avatar--with-border",
|
|
19221
19224
|
"data-testid": "avatar",
|
|
19222
|
-
|
|
19223
|
-
size: "md",
|
|
19224
|
-
userName: user?.name || user?.id
|
|
19225
|
+
size: "md"
|
|
19225
19226
|
}),
|
|
19226
19227
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19227
19228
|
className: "str-chat__message-reactions-detail__user-list-item-info",
|
|
@@ -20418,7 +20419,7 @@ var MessageUIWithContext = ({ endOfGroup, firstOfGroup, groupedByUser, handleAct
|
|
|
20418
20419
|
const { t } = require_useNotificationApi.useTranslationContext("MessageUI");
|
|
20419
20420
|
const [isBounceDialogOpen, setIsBounceDialogOpen] = (0, react.useState)(false);
|
|
20420
20421
|
const reminder = useMessageReminder(message.id);
|
|
20421
|
-
const { Attachment: Attachment$13 = Attachment, Avatar: Avatar$
|
|
20422
|
+
const { Attachment: Attachment$13 = Attachment, Avatar: Avatar$2 = require_useChannelHeaderOnlineStatus.Avatar, extractDisplayInfo: extractDisplayInfo$4 = require_useChannelHeaderOnlineStatus.extractDisplayInfo, MessageActions: MessageActions$1 = MessageActions, MessageAlsoSentInChannelIndicator: MessageAlsoSentInChannelIndicator$1 = MessageAlsoSentInChannelIndicator, MessageBlocked: MessageBlocked$1 = MessageBlocked, MessageBouncePrompt: MessageBouncePrompt$1 = MessageBouncePrompt, MessageDeleted, MessageDeletedBubble: MessageDeletedBubble$1 = MessageDeletedBubble, MessageEditedIndicator: MessageEditedIndicator$1 = MessageEditedIndicator, MessageReactions: MessageReactions$1 = MessageReactions, MessageRepliesCountButton: MessageRepliesCountButton$1 = MessageRepliesCountButton, MessageStatus: MessageStatus$1 = MessageStatus, MessageTimestamp: MessageTimestamp$1 = require_useChannelHeaderOnlineStatus.MessageTimestamp, MessageTranslationIndicator: MessageTranslationIndicator$1 = MessageTranslationIndicator, PinIndicator: PinIndicator$1 = PinIndicator, QuotedMessage: QuotedMessage$1 = QuotedMessage, ReminderNotification: ReminderNotification$1 = ReminderNotification, StreamedMessageText: StreamedMessageText$1 = StreamedMessageText } = require_useNotificationApi.useComponentContext("MessageUI");
|
|
20422
20423
|
const isAIGenerated = (0, react.useMemo)(() => isMessageAIGenerated?.(message), [isMessageAIGenerated, message]);
|
|
20423
20424
|
const isDeleted = require_useNotificationApi.isMessageDeleted(message);
|
|
20424
20425
|
const finalAttachments = (0, react.useMemo)(() => !message.shared_location && !message.attachments ? [] : !message.shared_location ? message.attachments : [message.shared_location, ...message.attachments ?? []], [message]);
|
|
@@ -20484,13 +20485,12 @@ var MessageUIWithContext = ({ endOfGroup, firstOfGroup, groupedByUser, handleAct
|
|
|
20484
20485
|
message.show_in_channel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MessageAlsoSentInChannelIndicator$1, {}),
|
|
20485
20486
|
!!reminder && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReminderNotification$1, { reminder }),
|
|
20486
20487
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MessageTranslationIndicator$1, { message }),
|
|
20487
|
-
message.user && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Avatar$
|
|
20488
|
+
message.user && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Avatar$2, {
|
|
20489
|
+
...extractDisplayInfo$4({ user: message.user ?? void 0 }),
|
|
20488
20490
|
className: "str-chat__avatar--with-border",
|
|
20489
|
-
imageUrl: message.user.image,
|
|
20490
20491
|
onClick: onUserClick,
|
|
20491
20492
|
onMouseOver: onUserHover,
|
|
20492
|
-
size: "md"
|
|
20493
|
-
userName: message.user.name || message.user.id
|
|
20493
|
+
size: "md"
|
|
20494
20494
|
}),
|
|
20495
20495
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
20496
20496
|
"aria-label": messageInnerAriaLabel,
|
|
@@ -21622,6 +21622,7 @@ var InfiniteScroll = (props) => {
|
|
|
21622
21622
|
*/
|
|
21623
21623
|
var UnMemoizedTypingIndicator = (props) => {
|
|
21624
21624
|
const { isMessageListScrolledToBottom = true, scrollToBottom, threadList } = props;
|
|
21625
|
+
const { AvatarStack: AvatarStack$2 = AvatarStack, extractDisplayInfo: extractDisplayInfo$3 = require_useChannelHeaderOnlineStatus.extractDisplayInfo } = require_useNotificationApi.useComponentContext();
|
|
21625
21626
|
const { channelConfig, thread } = require_useNotificationApi.useChannelStateContext("TypingIndicator");
|
|
21626
21627
|
const parentId = require_useNotificationApi.useThreadContext()?.id ?? thread?.id;
|
|
21627
21628
|
const { client } = require_useNotificationApi.useChatContext("TypingIndicator");
|
|
@@ -21632,11 +21633,7 @@ var UnMemoizedTypingIndicator = (props) => {
|
|
|
21632
21633
|
const { displayUsers } = useDebouncedTypingActive(threadList ? typingInThread : typingInChannel);
|
|
21633
21634
|
const showIndicator = displayUsers.length > 0;
|
|
21634
21635
|
const typingAnnouncement = (0, react.useMemo)(() => getTypingStatusMessage(displayUsers, t), [displayUsers, t]);
|
|
21635
|
-
const displayInfo = (0, react.useMemo)(() => displayUsers.map(
|
|
21636
|
-
id: user?.id,
|
|
21637
|
-
imageUrl: user?.image,
|
|
21638
|
-
userName: user?.name
|
|
21639
|
-
})), [displayUsers]);
|
|
21636
|
+
const displayInfo = (0, react.useMemo)(() => displayUsers.map(extractDisplayInfo$3), [displayUsers, extractDisplayInfo$3]);
|
|
21640
21637
|
(0, react.useEffect)(() => {
|
|
21641
21638
|
if (showIndicator && isMessageListScrolledToBottom) scrollToBottom();
|
|
21642
21639
|
}, [
|
|
@@ -21652,7 +21649,7 @@ var UnMemoizedTypingIndicator = (props) => {
|
|
|
21652
21649
|
children: [
|
|
21653
21650
|
displayInfo.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
21654
21651
|
"aria-hidden": "true",
|
|
21655
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarStack, {
|
|
21652
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarStack$2, {
|
|
21656
21653
|
badgeSize: "md",
|
|
21657
21654
|
displayInfo,
|
|
21658
21655
|
size: "md"
|
|
@@ -23896,6 +23893,7 @@ var UserSearchResultItem = ({ item }) => {
|
|
|
23896
23893
|
const { setChannels } = require_useNotificationApi.useChannelListContext();
|
|
23897
23894
|
const { directMessagingChannelType } = useSearchContext();
|
|
23898
23895
|
const { t } = require_useNotificationApi.useTranslationContext();
|
|
23896
|
+
const { Avatar: Avatar$1 = require_useChannelHeaderOnlineStatus.Avatar, extractDisplayInfo: extractDisplayInfo$2 = require_useChannelHeaderOnlineStatus.extractDisplayInfo } = require_useNotificationApi.useComponentContext();
|
|
23899
23897
|
const onClick = (0, react.useCallback)(() => {
|
|
23900
23898
|
const newChannel = client.channel(directMessagingChannelType, { members: [client.userID, item.id] });
|
|
23901
23899
|
newChannel.watch();
|
|
@@ -23916,11 +23914,10 @@ var UserSearchResultItem = ({ item }) => {
|
|
|
23916
23914
|
"data-testid": "search-result-user",
|
|
23917
23915
|
onClick,
|
|
23918
23916
|
role: "option",
|
|
23919
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
23920
|
-
|
|
23917
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Avatar$1, {
|
|
23918
|
+
...extractDisplayInfo$2({ user: item }),
|
|
23921
23919
|
isOnline: item.online,
|
|
23922
|
-
size: "xl"
|
|
23923
|
-
userName: item.name || item.id
|
|
23920
|
+
size: "xl"
|
|
23924
23921
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
23925
23922
|
className: "str-chat__search-result-data",
|
|
23926
23923
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -25444,6 +25441,7 @@ var composeThreadListItemAccessibleLabel = (data, config = {}) => composeAccessi
|
|
|
25444
25441
|
var ThreadListItemUI = ({ accessibleLabelConfig, resetHighlighting, ...props }) => {
|
|
25445
25442
|
const { client, isMessageAIGenerated } = require_useNotificationApi.useChatContext();
|
|
25446
25443
|
const thread = useThreadListItemContext();
|
|
25444
|
+
const { AvatarStack: AvatarStack$1 = AvatarStack, extractDisplayInfo: extractDisplayInfo$1 = require_useChannelHeaderOnlineStatus.extractDisplayInfo } = require_useNotificationApi.useComponentContext();
|
|
25447
25445
|
const selector = (0, react.useCallback)((nextValue) => ({
|
|
25448
25446
|
channel: nextValue.channel,
|
|
25449
25447
|
deletedAt: nextValue.deletedAt,
|
|
@@ -25514,12 +25512,8 @@ var ThreadListItemUI = ({ accessibleLabelConfig, resetHighlighting, ...props })
|
|
|
25514
25512
|
};
|
|
25515
25513
|
const displayInfo = (0, react.useMemo)(() => {
|
|
25516
25514
|
if (!participants) return [];
|
|
25517
|
-
return participants.slice(0, 3).map(
|
|
25518
|
-
|
|
25519
|
-
imageUrl: participant.user?.image,
|
|
25520
|
-
userName: participant.user?.name || participant.user.id
|
|
25521
|
-
}));
|
|
25522
|
-
}, [participants]);
|
|
25515
|
+
return participants.slice(0, 3).map(extractDisplayInfo$1);
|
|
25516
|
+
}, [extractDisplayInfo$1, participants]);
|
|
25523
25517
|
(0, react.useEffect)(() => {
|
|
25524
25518
|
if (!resetHighlighting) return;
|
|
25525
25519
|
const reset = resetHighlighting;
|
|
@@ -25558,7 +25552,7 @@ var ThreadListItemUI = ({ accessibleLabelConfig, resetHighlighting, ...props })
|
|
|
25558
25552
|
className: "str-chat__thread-list-item__content-trailing",
|
|
25559
25553
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
25560
25554
|
className: "str-chat__thread-list-item__reply-information",
|
|
25561
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarStack, {
|
|
25555
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarStack$1, {
|
|
25562
25556
|
displayInfo,
|
|
25563
25557
|
size: "sm"
|
|
25564
25558
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -26169,7 +26163,7 @@ var useChat = ({ client, defaultLanguage = "en", i18nInstance }) => {
|
|
|
26169
26163
|
};
|
|
26170
26164
|
(0, react.useEffect)(() => {
|
|
26171
26165
|
if (!client) return;
|
|
26172
|
-
const version = "14.
|
|
26166
|
+
const version = "14.10.0";
|
|
26173
26167
|
const userAgent = client.getUserAgent();
|
|
26174
26168
|
if (!userAgent.includes("stream-chat-react")) client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
|
|
26175
26169
|
client.threads.registerSubscriptions();
|