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/es/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as isMessageEdited, $n as useStableId, $r as ChannelListContextProvider, $t as IconFolder, A as WithAudioPlayback, An as IconSearch, Ar as DialogPortalEntry, At as IconBookmarkRemove, B as ACTIONS_NOT_WORKING_IN_THREAD, Bn as IconUser, Br as useOpenedDialogCount, Bt as IconCopy, C as insertIntro, Cn as IconPlusSmall, Cr as DialogManagerProvider, Ct as IconArrowUpRight, D as makeDateMessageId, Dn as IconReorder, Dr as useModalDialogManager, Dt as IconBellOff, E as isLocalMessage, En as IconRefresh, Er as useDialogManager, Et as IconBell, F as defaultRegisterAudioPlayerError, Fn as IconTranslate, Fr as useDialogIsTopmost, Ft as IconChevronDown, G as countEmojis, Gn as IconVideo, Gr as useComponentContext, Gt as IconEmojiAdd, H as OPTIONAL_MESSAGE_ACTIONS, Hn as IconUserCheck, Hr as DialogManager, Ht as IconDownload, I as elementIsPlaying, In as IconTrophy, Ir as useDialogOnNearestManager, It as IconChevronLeft, J as getNonImageAttachments, Jn as IconXCircle, Jr as useChatContext, Jt as IconExclamationMarkFill, K as getImages, Kn as IconVideoFill, Kr as ChatContext, Kt as IconExclamationCircleFill, L as LegacyThreadContext, Ln as IconUnpin, Lr as useModalDialog, Lt as IconChevronRight, M as useAudioPlayer, Mn as IconShield, Mr as modalDialogId, Mt as IconCheckmark, N as useInteractionAnnouncements, Nn as IconThread, Nr as useDialog, Nt as IconCheckmark1Small, O as makeIntroMessage, On as IconReply, Or as useNearestDialogManagerContext, Ot as IconBolt, P as AudioPlayer, Pn as IconThreadFill, Pr as useDialogIsOpen, Pt as IconChecks, Q as isMessageDeleted, Qn as Button, Qr as ChannelListContext, Qt as IconFlag, R as useLegacyThreadContext, Rn as IconUnsupportedAttachment, Rr as useModalDialogIsOpen, Rt as IconClock, S as hasMoreMessagesProbably, Sn as IconPlus, Sr as predefinedFormatters, St as IconArrowUp, T as isIntroMessage, Tn as IconQuote, Tr as modalDialogManagerId, Tt as IconAudio, U as areMessagePropsEqual, Un as IconUserRemove, Ur as ComponentContext, Ut as IconEdit, V as MESSAGE_ACTIONS, Vn as IconUserAdd, Vr as useStateStore, Vt as IconDelete, W as areMessageUIPropsEqual, Wn as IconUsers, Wr as ComponentProvider, Wt as IconEmoji, X as isMessageBlocked, Xn as IconXmarkSmall, Xr as ChannelStateProvider, Xt as IconEyeFill, Y as getReadByTooltipText, Yn as IconXmark, Yr as ChannelStateContext, Yt as IconExclamationTriangleFill, Z as isMessageBounced, Zn as createIcon, Zr as useChannelStateContext, Zt as IconFile, _ as Channel, _n as IconNoSign, _r as getDateString, _t as EmptyStateIndicator, a as ChatView, an as IconLoading, ar as isNotificationTargetPanel, at as messageHasGiphyAttachment, b as getIsFirstUnreadMessage, bn as IconPin, br as isLanguageSupported, bt as IconArrowDownCircle, c as ChatViewSelectorButton, cn as IconMenu, cr as useAriaLiveAnnouncer, ct as messageHasSingleAttachment, d as useActiveThread, dn as IconMessageBubbles, dr as useTypingContext, dt as EMOJI_REGEX, ei as useChannelListContext, en as IconGiphy, er as addNotificationTargetTag, et as isMessageErrorRetryable, f as useChatViewContext, fn as IconMicrophoneSolid, fr as TranslationContext, ft as CHANNEL_CONTAINER_ID, g as useThreadContext, gn as IconMute, gr as defaultTranslatorFunction, gt as useEditMessageHandler, h as ThreadProvider, hn as IconMore, hr as defaultDateTimeParser, ht as useMentionsHandlers, i as useNotificationTarget, in as IconLink, ir as isNotificationForPanel, it as messageHasAttachments, j as useActiveAudioPlayer, jn as IconSend, jr as Portal, jt as IconCamera, k as processMessages, kn as IconRetry, kr as DialogPortalDestination, kt as IconBookmark, l as ChatViewThreadsSelectorButton, ln as IconMessageBubble, lr as TypingContext, lt as messageTextHasEmojisOnly, m as ThreadContext, mn as IconMinusCircle, mr as useTranslationContext, mt as LoadingChannel, n as hasSystemNotificationTag, ni as ChannelActionProvider, nn as IconInfo, nr as getNotificationTargetPanels, nt as isUserMuted, o as ChatViewChannelsSelectorButton, on as IconLocation, or as useDebouncedAnnounce, ot as messageHasQuotedMessage, p as useThreadsViewContext, pn as IconMinus, pr as TranslationProvider, pt as LoadingErrorIndicator, q as getMessageActions, qn as IconVoice, qr as ChatProvider, qt as IconExclamationMark, r as useNotificationApi, ri as useChannelActionContext, rn as IconLeave, rr as getNotificationTargetTag, rt as mapToUserNameOrId, s as ChatViewContext, sn as IconMegaphone, sr as AriaLiveAnnouncerContext, st as messageHasReactions, t as SYSTEM_NOTIFICATION_TAG, ti as ChannelActionContext, tn as IconImage, tr as getNotificationTargetPanel, tt as isNetworkSendFailure, u as defaultChatViewSelectorItemSet, un as IconMessageBubbleFill, ur as TypingProvider, ut as validateAndGetMessage, v as getChannel, vn as IconNotification, vr as isDate, vt as IconArchive, w as isDateSeparatorMessage, wn as IconPoll, wr as ModalDialogManagerProvider, wt as IconAttachment, x as getLastReceived, xn as IconPlayFill, xr as isNumberOrString, xt as IconArrowLeft, y as getGroupStyles, yn as IconPauseFill, yr as isDayOrMoment, yt as IconArrowDown, z as usePopoverPosition, zn as IconUpload, zr as useModalDialogIsTopmost, zt as IconCommand } from "./useNotificationApi.ed6bff88.mjs";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as BaseContextMenuButton, A as Gallery, At as AriaLiveOutlet, B as formatTime, Bt as useMessageTranslationViewContext, C as Checkbox, Ct as useAriaIdentifiers, D as SwitchFieldDescription, Dt as useNotifications, E as SwitchField, Et as LoadingIndicator, F as toGalleryItemDescriptors, Ft as ModalContextProvider, G as MessageTimestamp, H as FILE_ICON_GRAPHIC_CLASSNAME, Ht as MessageProvider, I as useGalleryContext, It as useModalContext, J as imageToLink, K as Timestamp, L as toBaseImageDescriptors, Lt as MessageTranslationViewContext, M as VideoThumbnail, Mt as AriaLiveOutletContext, N as VideoPlayer, Nt as useAriaLiveOutletContext, O as SwitchFieldLabel, Ot as NotificationConfigurationProvider, P as GalleryContext, Pt as ModalContext, Q as Prompt, R as BaseImage, Rt as MessageTranslationViewProvider, S as TextInput, St as Root, T as Switch, Tt as FileSizeIndicator, U as FILE_ICON_NO_LABEL_CLASSNAME, Ut as useMessageContext, V as FileIcon, Vt as MessageContext, W as DownloadButton, X as extractDisplayInfo, Y as htmlToTextPlugin, Z as GlobalModal, _ as getLatestMessagePreview, _t as Avatar, a as pickNewest, at as ContextMenuHeader, b as ListItemLayout, bt as Alert, c as useIsUserMuted, ct as EmojiContextMenuButton, d as useSelectedChannelState, dt as createRovingFocusKeyDownHandler, et as ContextMenu, f as isDmChannel, ft as getNextRovingFocusIndex, g as getGroupChannelDisplayInfo, gt as ErrorBadge, h as getChannelDisplayImage, ht as Badge, i as createDefaultPickNext, it as ContextMenuContent, j as GalleryUI, jt as VisuallyHidden, k as SwitchFieldTitle, kt as useNotificationConfigurationContext, l as useIsChannelMuted, lt as UserContextMenuButton, m as useChannelDisplayName, mt as ChannelAvatar, nt as ContextMenuBody, o as pickOldest, ot as ContextMenuRoot, p as useChannelPreviewInfo, pt as GroupAvatar, q as plusPlusToEmphasis, r as NotificationList, rt as ContextMenuButton, s as Notification, st as DEFAULT_CONTEXT_MENU_KEYBOARD_NAVIGATION_ITEM_SELECTOR, t as useChannelHeaderOnlineStatus, tt as ContextMenuBackButton, u as useChannelMembershipState, ut as useContextMenuContext, v as getLatestMessagePreviewText, vt as DialogAnchor, w as Checkmark, wt as useStableCallback, x as ListItemLayoutContent, xt as Header, y as renderPreviewText, yt as useDialogAnchor, z as ImagePlaceholder, zt as getTranslatedMessageText } from "./useChannelHeaderOnlineStatus.d6065c22.mjs";
|
|
3
3
|
import { a as useMessageComposerContext, i as MessageComposerContextProvider, n as useIsCooldownActive, r as MessageComposerContext, t as useMessageComposerController } from "./useMessageComposerController.d50f6168.mjs";
|
|
4
4
|
import { a as getExtensionFromMimeType, i as dataTransferItemsToFiles, n as toAudioBuffer, o as getRecordedMediaTypeFromMimeType, r as createFileFromBlobs, s as useHandleFileChangeWrapper, t as renderAudio } from "./audioProcessing.766ca76c.mjs";
|
|
5
5
|
import React, { Component, Fragment, createContext, createElement, forwardRef, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
@@ -10332,14 +10332,14 @@ var DefaultCalloutDialog = ({ children, className, onClose }) => {
|
|
|
10332
10332
|
//#endregion
|
|
10333
10333
|
//#region src/components/Avatar/AvatarStack.tsx
|
|
10334
10334
|
function AvatarStack({ badgeSize, capLimit = 3, component: Component = "div", displayInfo = [], size }) {
|
|
10335
|
-
const { Avatar: Avatar$
|
|
10335
|
+
const { Avatar: Avatar$6 = Avatar } = useComponentContext(AvatarStack.name);
|
|
10336
10336
|
const displayInfoToRender = useMemo(() => displayInfo.length > capLimit ? displayInfo.slice(0, capLimit) : displayInfo, [displayInfo, capLimit]);
|
|
10337
10337
|
const overflowCount = displayInfo.length - displayInfoToRender.length;
|
|
10338
10338
|
if (!displayInfo.length) return null;
|
|
10339
10339
|
return /* @__PURE__ */ jsxs(Component, {
|
|
10340
10340
|
className: clsx("str-chat__avatar-stack", { [`str-chat__avatar-stack--size-${size}`]: typeof size === "string" }),
|
|
10341
10341
|
"data-testid": "avatar-stack",
|
|
10342
|
-
children: [displayInfoToRender.map((info, index) => /* @__PURE__ */ jsx(Avatar$
|
|
10342
|
+
children: [displayInfoToRender.map((info, index) => /* @__PURE__ */ jsx(Avatar$6, {
|
|
10343
10343
|
imageUrl: info.imageUrl,
|
|
10344
10344
|
size,
|
|
10345
10345
|
userName: info.userName
|
|
@@ -10665,14 +10665,11 @@ var MessageAlsoSentInChannelIndicator = () => {
|
|
|
10665
10665
|
//#endregion
|
|
10666
10666
|
//#region src/components/Message/MessageRepliesCountButton.tsx
|
|
10667
10667
|
function UnMemoizedMessageRepliesCountButton(props) {
|
|
10668
|
-
const { AvatarStack: AvatarStack$
|
|
10668
|
+
const { AvatarStack: AvatarStack$4 = AvatarStack, extractDisplayInfo: extractDisplayInfo$9 = extractDisplayInfo } = useComponentContext(MessageRepliesCountButton.name);
|
|
10669
10669
|
const { labelPlural, labelSingle, onClick, reply_count: replyCount = 0, thread_participants: threadParticipants = [] } = props;
|
|
10670
10670
|
const { channelCapabilities } = useChannelStateContext();
|
|
10671
10671
|
const { t } = useTranslationContext("MessageRepliesCountButton");
|
|
10672
|
-
const avatarStackDisplayInfo = useMemo(() => threadParticipants.slice(0, 3).map((
|
|
10673
|
-
imageUrl: participant.image,
|
|
10674
|
-
userName: participant.name || participant.id
|
|
10675
|
-
})), [threadParticipants]);
|
|
10672
|
+
const avatarStackDisplayInfo = useMemo(() => threadParticipants.slice(0, 3).map((user) => extractDisplayInfo$9({ user })), [extractDisplayInfo$9, threadParticipants]);
|
|
10676
10673
|
if (!replyCount) return null;
|
|
10677
10674
|
let replyCountText = t("replyCount", { count: replyCount });
|
|
10678
10675
|
if (labelPlural && replyCount > 1) replyCountText = `${replyCount} ${labelPlural}`;
|
|
@@ -10684,7 +10681,7 @@ function UnMemoizedMessageRepliesCountButton(props) {
|
|
|
10684
10681
|
"data-testid": "replies-count-button",
|
|
10685
10682
|
disabled: !channelCapabilities["send-reply"],
|
|
10686
10683
|
onClick,
|
|
10687
|
-
children: [replyCountText, /* @__PURE__ */ jsx(AvatarStack$
|
|
10684
|
+
children: [replyCountText, /* @__PURE__ */ jsx(AvatarStack$4, {
|
|
10688
10685
|
displayInfo: avatarStackDisplayInfo,
|
|
10689
10686
|
size: "xs"
|
|
10690
10687
|
})]
|
|
@@ -15012,15 +15009,16 @@ var PollVoteTimestamp = ({ timestamp }) => {
|
|
|
15012
15009
|
var PollVoteAuthor = ({ vote }) => {
|
|
15013
15010
|
const { t } = useTranslationContext();
|
|
15014
15011
|
const { client } = useChatContext();
|
|
15012
|
+
const { Avatar: Avatar$5 = Avatar, extractDisplayInfo: extractDisplayInfo$8 = extractDisplayInfo } = useComponentContext();
|
|
15015
15013
|
const displayName = client.user?.id && client.user.id === vote.user?.id ? t("You") : vote.user?.name || vote.user?.id || t("Anonymous");
|
|
15016
15014
|
return /* @__PURE__ */ jsxs("div", {
|
|
15017
15015
|
className: "str-chat__poll-vote__author",
|
|
15018
|
-
children: [vote.user && /* @__PURE__ */
|
|
15016
|
+
children: [vote.user && /* @__PURE__ */ createElement(Avatar$5, {
|
|
15017
|
+
...extractDisplayInfo$8({ user: vote.user }),
|
|
15019
15018
|
className: "str-chat__avatar--poll-vote-author",
|
|
15020
|
-
|
|
15021
|
-
size: "md"
|
|
15022
|
-
|
|
15023
|
-
}, `poll-vote-${vote.id}-avatar-${vote.user.id}`), /* @__PURE__ */ jsx("div", {
|
|
15019
|
+
key: `poll-vote-${vote.id}-avatar-${vote.user.id}`,
|
|
15020
|
+
size: "md"
|
|
15021
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
15024
15022
|
className: "str-chat__poll-vote__author__name",
|
|
15025
15023
|
children: displayName
|
|
15026
15024
|
})]
|
|
@@ -15566,7 +15564,7 @@ var PollOptionSelector = ({ displayAvatarCount, option, voteCountVerbose }) => {
|
|
|
15566
15564
|
const { t } = useTranslationContext();
|
|
15567
15565
|
const { channelCapabilities = {} } = useChannelStateContext("PollOptionsShortlist");
|
|
15568
15566
|
const { message } = useMessageContext();
|
|
15569
|
-
const { AvatarStack: AvatarStack$
|
|
15567
|
+
const { AvatarStack: AvatarStack$3 = AvatarStack, extractDisplayInfo: extractDisplayInfo$7 = extractDisplayInfo } = useComponentContext();
|
|
15570
15568
|
const { poll } = usePollContext();
|
|
15571
15569
|
const { is_closed, latest_votes_by_option, maxVotedOptionIds, ownVotesByOptionId, vote_counts_by_option, voting_visibility } = useStateStore(poll.state, pollStateSelector$2);
|
|
15572
15570
|
const canCastVote = channelCapabilities["cast-poll-vote"] && !is_closed;
|
|
@@ -15583,12 +15581,9 @@ var PollOptionSelector = ({ displayAvatarCount, option, voteCountVerbose }) => {
|
|
|
15583
15581
|
ownVotesByOptionId,
|
|
15584
15582
|
poll
|
|
15585
15583
|
]);
|
|
15586
|
-
const avatarDisplayInfo = useMemo(() => latest_votes_by_option?.[option.id] && latest_votes_by_option[option.id].filter((vote) => !!vote.user && !isVoteAnswer(vote)).slice(0, displayAvatarCount).map(
|
|
15587
|
-
id: user.id,
|
|
15588
|
-
imageUrl: user.image,
|
|
15589
|
-
userName: user.name
|
|
15590
|
-
})), [
|
|
15584
|
+
const avatarDisplayInfo = useMemo(() => latest_votes_by_option?.[option.id] && latest_votes_by_option[option.id].filter((vote) => !!vote.user && !isVoteAnswer(vote)).slice(0, displayAvatarCount).map(extractDisplayInfo$7), [
|
|
15591
15585
|
displayAvatarCount,
|
|
15586
|
+
extractDisplayInfo$7,
|
|
15592
15587
|
latest_votes_by_option,
|
|
15593
15588
|
option.id
|
|
15594
15589
|
]);
|
|
@@ -15614,7 +15609,7 @@ var PollOptionSelector = ({ displayAvatarCount, option, voteCountVerbose }) => {
|
|
|
15614
15609
|
className: "str-chat__poll-option-votes",
|
|
15615
15610
|
children: [displayAvatarCount && voting_visibility === "public" && /* @__PURE__ */ jsx("div", {
|
|
15616
15611
|
className: "str-chat__poll-option-voters",
|
|
15617
|
-
children: /* @__PURE__ */ jsx(AvatarStack$
|
|
15612
|
+
children: /* @__PURE__ */ jsx(AvatarStack$3, {
|
|
15618
15613
|
displayInfo: avatarDisplayInfo,
|
|
15619
15614
|
size: "xs"
|
|
15620
15615
|
})
|
|
@@ -17621,16 +17616,23 @@ var UserGroupItem = ({ entity, focused, ...buttonProps }) => {
|
|
|
17621
17616
|
* UI component for mentions rendered in suggestion list
|
|
17622
17617
|
*/
|
|
17623
17618
|
var UserItem = ({ entity, focused, ...buttonProps }) => {
|
|
17619
|
+
const { Avatar: Avatar$4 = Avatar, extractDisplayInfo: extractDisplayInfo$6 = extractDisplayInfo } = useComponentContext();
|
|
17624
17620
|
const hasEntity = !!Object.keys(entity).length;
|
|
17625
17621
|
const titleAttribute = entity.name || entity.id || "";
|
|
17626
|
-
const LeadingSlot = useMemo(() =>
|
|
17627
|
-
|
|
17628
|
-
|
|
17629
|
-
|
|
17630
|
-
|
|
17631
|
-
|
|
17632
|
-
|
|
17633
|
-
|
|
17622
|
+
const LeadingSlot = useMemo(() => {
|
|
17623
|
+
const displayInfo = extractDisplayInfo$6({ user: entity });
|
|
17624
|
+
return function UserItemAvatar() {
|
|
17625
|
+
return /* @__PURE__ */ jsx(Avatar$4, {
|
|
17626
|
+
...displayInfo,
|
|
17627
|
+
"aria-hidden": true,
|
|
17628
|
+
size: "md"
|
|
17629
|
+
});
|
|
17630
|
+
};
|
|
17631
|
+
}, [
|
|
17632
|
+
Avatar$4,
|
|
17633
|
+
entity,
|
|
17634
|
+
extractDisplayInfo$6
|
|
17635
|
+
]);
|
|
17634
17636
|
if (!hasEntity) return null;
|
|
17635
17637
|
return /* @__PURE__ */ jsx(ListItemLayout, {
|
|
17636
17638
|
contentClassName: "str-chat__context-menu__button__label",
|
|
@@ -19113,7 +19115,7 @@ var MessageReactionsDetailLoadingIndicator = () => {
|
|
|
19113
19115
|
var MessageReactionsDetail = ({ handleFetchReactions, handleReaction, onSelectedReactionTypeChange, own_reactions, reactionDetailsSort: propReactionDetailsSort, reactionGroups, reactions, selectedReactionType, totalReactionCount }) => {
|
|
19114
19116
|
const [extendedReactionListOpen, setExtendedReactionListOpen] = useState(false);
|
|
19115
19117
|
const { client } = useChatContext();
|
|
19116
|
-
const { Avatar: Avatar$
|
|
19118
|
+
const { Avatar: Avatar$3 = Avatar, extractDisplayInfo: extractDisplayInfo$5 = extractDisplayInfo, LoadingIndicator = MessageReactionsDetailLoadingIndicator, reactionOptions = defaultReactionOptions, ReactionSelectorExtendedList = ReactionSelector.ExtendedList } = useComponentContext(MessageReactionsDetail.name);
|
|
19117
19119
|
const { t } = useTranslationContext();
|
|
19118
19120
|
const { handleReaction: contextHandleReaction, message, reactionDetailsSort: contextReactionDetailsSort } = useMessageContext(MessageReactionsDetail.name);
|
|
19119
19121
|
const reactionDetailsSort = propReactionDetailsSort ?? contextReactionDetailsSort ?? defaultReactionDetailsSort;
|
|
@@ -19195,12 +19197,11 @@ var MessageReactionsDetail = ({ handleFetchReactions, handleReaction, onSelected
|
|
|
19195
19197
|
return /* @__PURE__ */ jsxs("div", {
|
|
19196
19198
|
className: "str-chat__message-reactions-detail__user-list-item",
|
|
19197
19199
|
children: [
|
|
19198
|
-
/* @__PURE__ */ jsx(Avatar$
|
|
19200
|
+
/* @__PURE__ */ jsx(Avatar$3, {
|
|
19201
|
+
...extractDisplayInfo$5({ user: user ?? void 0 }),
|
|
19199
19202
|
className: "str-chat__avatar--with-border",
|
|
19200
19203
|
"data-testid": "avatar",
|
|
19201
|
-
|
|
19202
|
-
size: "md",
|
|
19203
|
-
userName: user?.name || user?.id
|
|
19204
|
+
size: "md"
|
|
19204
19205
|
}),
|
|
19205
19206
|
/* @__PURE__ */ jsxs("div", {
|
|
19206
19207
|
className: "str-chat__message-reactions-detail__user-list-item-info",
|
|
@@ -20397,7 +20398,7 @@ var MessageUIWithContext = ({ endOfGroup, firstOfGroup, groupedByUser, handleAct
|
|
|
20397
20398
|
const { t } = useTranslationContext("MessageUI");
|
|
20398
20399
|
const [isBounceDialogOpen, setIsBounceDialogOpen] = useState(false);
|
|
20399
20400
|
const reminder = useMessageReminder(message.id);
|
|
20400
|
-
const { Attachment: Attachment$13 = Attachment, Avatar: Avatar$
|
|
20401
|
+
const { Attachment: Attachment$13 = Attachment, Avatar: Avatar$2 = Avatar, extractDisplayInfo: extractDisplayInfo$4 = 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 = MessageTimestamp, MessageTranslationIndicator: MessageTranslationIndicator$1 = MessageTranslationIndicator, PinIndicator: PinIndicator$1 = PinIndicator, QuotedMessage: QuotedMessage$1 = QuotedMessage, ReminderNotification: ReminderNotification$1 = ReminderNotification, StreamedMessageText: StreamedMessageText$1 = StreamedMessageText } = useComponentContext("MessageUI");
|
|
20401
20402
|
const isAIGenerated = useMemo(() => isMessageAIGenerated?.(message), [isMessageAIGenerated, message]);
|
|
20402
20403
|
const isDeleted = isMessageDeleted(message);
|
|
20403
20404
|
const finalAttachments = useMemo(() => !message.shared_location && !message.attachments ? [] : !message.shared_location ? message.attachments : [message.shared_location, ...message.attachments ?? []], [message]);
|
|
@@ -20463,13 +20464,12 @@ var MessageUIWithContext = ({ endOfGroup, firstOfGroup, groupedByUser, handleAct
|
|
|
20463
20464
|
message.show_in_channel && /* @__PURE__ */ jsx(MessageAlsoSentInChannelIndicator$1, {}),
|
|
20464
20465
|
!!reminder && /* @__PURE__ */ jsx(ReminderNotification$1, { reminder }),
|
|
20465
20466
|
/* @__PURE__ */ jsx(MessageTranslationIndicator$1, { message }),
|
|
20466
|
-
message.user && /* @__PURE__ */ jsx(Avatar$
|
|
20467
|
+
message.user && /* @__PURE__ */ jsx(Avatar$2, {
|
|
20468
|
+
...extractDisplayInfo$4({ user: message.user ?? void 0 }),
|
|
20467
20469
|
className: "str-chat__avatar--with-border",
|
|
20468
|
-
imageUrl: message.user.image,
|
|
20469
20470
|
onClick: onUserClick,
|
|
20470
20471
|
onMouseOver: onUserHover,
|
|
20471
|
-
size: "md"
|
|
20472
|
-
userName: message.user.name || message.user.id
|
|
20472
|
+
size: "md"
|
|
20473
20473
|
}),
|
|
20474
20474
|
/* @__PURE__ */ jsxs("div", {
|
|
20475
20475
|
"aria-label": messageInnerAriaLabel,
|
|
@@ -21601,6 +21601,7 @@ var InfiniteScroll = (props) => {
|
|
|
21601
21601
|
*/
|
|
21602
21602
|
var UnMemoizedTypingIndicator = (props) => {
|
|
21603
21603
|
const { isMessageListScrolledToBottom = true, scrollToBottom, threadList } = props;
|
|
21604
|
+
const { AvatarStack: AvatarStack$2 = AvatarStack, extractDisplayInfo: extractDisplayInfo$3 = extractDisplayInfo } = useComponentContext();
|
|
21604
21605
|
const { channelConfig, thread } = useChannelStateContext("TypingIndicator");
|
|
21605
21606
|
const parentId = useThreadContext()?.id ?? thread?.id;
|
|
21606
21607
|
const { client } = useChatContext("TypingIndicator");
|
|
@@ -21611,11 +21612,7 @@ var UnMemoizedTypingIndicator = (props) => {
|
|
|
21611
21612
|
const { displayUsers } = useDebouncedTypingActive(threadList ? typingInThread : typingInChannel);
|
|
21612
21613
|
const showIndicator = displayUsers.length > 0;
|
|
21613
21614
|
const typingAnnouncement = useMemo(() => getTypingStatusMessage(displayUsers, t), [displayUsers, t]);
|
|
21614
|
-
const displayInfo = useMemo(() => displayUsers.map(
|
|
21615
|
-
id: user?.id,
|
|
21616
|
-
imageUrl: user?.image,
|
|
21617
|
-
userName: user?.name
|
|
21618
|
-
})), [displayUsers]);
|
|
21615
|
+
const displayInfo = useMemo(() => displayUsers.map(extractDisplayInfo$3), [displayUsers, extractDisplayInfo$3]);
|
|
21619
21616
|
useEffect(() => {
|
|
21620
21617
|
if (showIndicator && isMessageListScrolledToBottom) scrollToBottom();
|
|
21621
21618
|
}, [
|
|
@@ -21631,7 +21628,7 @@ var UnMemoizedTypingIndicator = (props) => {
|
|
|
21631
21628
|
children: [
|
|
21632
21629
|
displayInfo.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
21633
21630
|
"aria-hidden": "true",
|
|
21634
|
-
children: /* @__PURE__ */ jsx(AvatarStack, {
|
|
21631
|
+
children: /* @__PURE__ */ jsx(AvatarStack$2, {
|
|
21635
21632
|
badgeSize: "md",
|
|
21636
21633
|
displayInfo,
|
|
21637
21634
|
size: "md"
|
|
@@ -23875,6 +23872,7 @@ var UserSearchResultItem = ({ item }) => {
|
|
|
23875
23872
|
const { setChannels } = useChannelListContext();
|
|
23876
23873
|
const { directMessagingChannelType } = useSearchContext();
|
|
23877
23874
|
const { t } = useTranslationContext();
|
|
23875
|
+
const { Avatar: Avatar$1 = Avatar, extractDisplayInfo: extractDisplayInfo$2 = extractDisplayInfo } = useComponentContext();
|
|
23878
23876
|
const onClick = useCallback(() => {
|
|
23879
23877
|
const newChannel = client.channel(directMessagingChannelType, { members: [client.userID, item.id] });
|
|
23880
23878
|
newChannel.watch();
|
|
@@ -23895,11 +23893,10 @@ var UserSearchResultItem = ({ item }) => {
|
|
|
23895
23893
|
"data-testid": "search-result-user",
|
|
23896
23894
|
onClick,
|
|
23897
23895
|
role: "option",
|
|
23898
|
-
children: [/* @__PURE__ */ jsx(Avatar, {
|
|
23899
|
-
|
|
23896
|
+
children: [/* @__PURE__ */ jsx(Avatar$1, {
|
|
23897
|
+
...extractDisplayInfo$2({ user: item }),
|
|
23900
23898
|
isOnline: item.online,
|
|
23901
|
-
size: "xl"
|
|
23902
|
-
userName: item.name || item.id
|
|
23899
|
+
size: "xl"
|
|
23903
23900
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23904
23901
|
className: "str-chat__search-result-data",
|
|
23905
23902
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -25423,6 +25420,7 @@ var composeThreadListItemAccessibleLabel = (data, config = {}) => composeAccessi
|
|
|
25423
25420
|
var ThreadListItemUI = ({ accessibleLabelConfig, resetHighlighting, ...props }) => {
|
|
25424
25421
|
const { client, isMessageAIGenerated } = useChatContext();
|
|
25425
25422
|
const thread = useThreadListItemContext();
|
|
25423
|
+
const { AvatarStack: AvatarStack$1 = AvatarStack, extractDisplayInfo: extractDisplayInfo$1 = extractDisplayInfo } = useComponentContext();
|
|
25426
25424
|
const selector = useCallback((nextValue) => ({
|
|
25427
25425
|
channel: nextValue.channel,
|
|
25428
25426
|
deletedAt: nextValue.deletedAt,
|
|
@@ -25493,12 +25491,8 @@ var ThreadListItemUI = ({ accessibleLabelConfig, resetHighlighting, ...props })
|
|
|
25493
25491
|
};
|
|
25494
25492
|
const displayInfo = useMemo(() => {
|
|
25495
25493
|
if (!participants) return [];
|
|
25496
|
-
return participants.slice(0, 3).map(
|
|
25497
|
-
|
|
25498
|
-
imageUrl: participant.user?.image,
|
|
25499
|
-
userName: participant.user?.name || participant.user.id
|
|
25500
|
-
}));
|
|
25501
|
-
}, [participants]);
|
|
25494
|
+
return participants.slice(0, 3).map(extractDisplayInfo$1);
|
|
25495
|
+
}, [extractDisplayInfo$1, participants]);
|
|
25502
25496
|
useEffect(() => {
|
|
25503
25497
|
if (!resetHighlighting) return;
|
|
25504
25498
|
const reset = resetHighlighting;
|
|
@@ -25537,7 +25531,7 @@ var ThreadListItemUI = ({ accessibleLabelConfig, resetHighlighting, ...props })
|
|
|
25537
25531
|
className: "str-chat__thread-list-item__content-trailing",
|
|
25538
25532
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
25539
25533
|
className: "str-chat__thread-list-item__reply-information",
|
|
25540
|
-
children: [/* @__PURE__ */ jsx(AvatarStack, {
|
|
25534
|
+
children: [/* @__PURE__ */ jsx(AvatarStack$1, {
|
|
25541
25535
|
displayInfo,
|
|
25542
25536
|
size: "sm"
|
|
25543
25537
|
}), /* @__PURE__ */ jsx("span", {
|
|
@@ -26148,7 +26142,7 @@ var useChat = ({ client, defaultLanguage = "en", i18nInstance }) => {
|
|
|
26148
26142
|
};
|
|
26149
26143
|
useEffect(() => {
|
|
26150
26144
|
if (!client) return;
|
|
26151
|
-
const version = "14.
|
|
26145
|
+
const version = "14.10.0";
|
|
26152
26146
|
const userAgent = client.getUserAgent();
|
|
26153
26147
|
if (!userAgent.includes("stream-chat-react")) client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
|
|
26154
26148
|
client.threads.registerSubscriptions();
|