stream-chat-react 14.0.0-beta.3 → 14.0.0-beta.5
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/WithAudioPlayback.0c10cb67.js +4638 -0
- package/dist/cjs/WithAudioPlayback.0c10cb67.js.map +1 -0
- package/dist/cjs/emojis.js +2 -2
- package/dist/cjs/emojis.js.map +1 -1
- package/dist/cjs/index.js +262 -364
- package/dist/cjs/index.js.map +1 -1
- package/dist/css/emoji-replacement.css +34 -0
- package/dist/css/emoji-replacement.css.map +1 -0
- package/dist/css/index.css +81 -78
- package/dist/css/index.css.map +1 -1
- package/dist/es/WithAudioPlayback.e7821fd4.mjs +4622 -0
- package/dist/es/WithAudioPlayback.e7821fd4.mjs.map +1 -0
- package/dist/es/emojis.mjs +2 -2
- package/dist/es/emojis.mjs.map +1 -1
- package/dist/es/index.mjs +323 -425
- package/dist/es/index.mjs.map +1 -1
- package/dist/types/components/ChannelHeader/ChannelHeader.d.ts +1 -1
- package/dist/types/components/ChannelHeader/ChannelHeader.d.ts.map +1 -1
- package/dist/types/components/Dialog/service/DialogPortal.d.ts.map +1 -1
- package/dist/types/components/Form/SwitchField.d.ts.map +1 -1
- package/dist/types/components/Form/TextInput.d.ts +2 -2
- package/dist/types/components/Form/TextInput.d.ts.map +1 -1
- package/dist/types/components/Icons/icons.d.ts +57 -373
- package/dist/types/components/Icons/icons.d.ts.map +1 -1
- package/dist/types/components/Icons/index.d.ts +0 -1
- package/dist/types/components/Icons/index.d.ts.map +1 -1
- package/dist/types/components/Loading/LoadingIndicator.d.ts +2 -2
- package/dist/types/components/Loading/LoadingIndicator.d.ts.map +1 -1
- package/dist/types/components/Message/Message.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useUserRole.d.ts.map +1 -1
- package/dist/types/components/Message/types.d.ts +1 -5
- package/dist/types/components/Message/types.d.ts.map +1 -1
- package/dist/types/components/MessageActions/MessageActions.defaults.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/MessageComposerUI.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/hooks/useSubmitHandler.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/preEditSnapshot.d.ts +16 -0
- package/dist/types/components/MessageComposer/preEditSnapshot.d.ts.map +1 -0
- package/dist/types/components/MessageList/MessageList.d.ts +1 -1
- package/dist/types/components/MessageList/MessageList.d.ts.map +1 -1
- package/dist/types/components/MessageList/VirtualizedMessageList.d.ts +1 -1
- package/dist/types/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
- package/dist/types/components/MessageList/VirtualizedMessageListComponents.d.ts.map +1 -1
- package/dist/types/components/Poll/PollCreationDialog/OptionFieldSet.d.ts.map +1 -1
- package/dist/types/components/Reactions/MessageReactions.d.ts +4 -16
- package/dist/types/components/Reactions/MessageReactions.d.ts.map +1 -1
- package/dist/types/components/Reactions/MessageReactionsDetail.d.ts +4 -4
- package/dist/types/components/Reactions/MessageReactionsDetail.d.ts.map +1 -1
- package/dist/types/components/Reactions/hooks/useProcessReactions.d.ts +4 -2
- package/dist/types/components/Reactions/hooks/useProcessReactions.d.ts.map +1 -1
- package/dist/types/components/Reactions/types.d.ts +0 -1
- package/dist/types/components/Reactions/types.d.ts.map +1 -1
- package/dist/types/components/SummarizedMessagePreview/SummarizedMessagePreview.d.ts.map +1 -1
- package/dist/types/components/SummarizedMessagePreview/hooks/useLatestMessagePreview.d.ts.map +1 -1
- package/dist/types/components/Thread/ThreadHeader.d.ts +1 -1
- package/dist/types/components/Thread/ThreadHeader.d.ts.map +1 -1
- package/dist/types/context/MessageBounceContext.d.ts.map +1 -1
- package/dist/types/context/MessageContext.d.ts +1 -5
- package/dist/types/context/MessageContext.d.ts.map +1 -1
- package/package.json +3 -4
- package/dist/assets/icons/stream-chat-icons.eot +0 -0
- package/dist/assets/icons/stream-chat-icons.svg +0 -50
- package/dist/assets/icons/stream-chat-icons.ttf +0 -0
- package/dist/assets/icons/stream-chat-icons.woff +0 -0
- package/dist/assets/icons/stream-chat-icons.woff2 +0 -0
- package/dist/cjs/WithAudioPlayback.4a84360f.js +0 -4727
- package/dist/cjs/WithAudioPlayback.4a84360f.js.map +0 -1
- package/dist/css/v2/emoji-mart.css +0 -1
- package/dist/css/v2/emoji-replacement.css +0 -1
- package/dist/css/v2/index.css +0 -1
- package/dist/css/v2/index.layout.css +0 -1
- package/dist/es/WithAudioPlayback.a3d5a2fc.mjs +0 -4711
- package/dist/es/WithAudioPlayback.a3d5a2fc.mjs.map +0 -1
- package/dist/scss/v2/AIStateIndicator/AIStateIndicator-layout.scss +0 -3
- package/dist/scss/v2/AIStateIndicator/AIStateIndicator-theme.scss +0 -7
- package/dist/scss/v2/AttachmentList/AttachmentList-layout.scss +0 -701
- package/dist/scss/v2/AttachmentList/AttachmentList-theme.scss +0 -605
- package/dist/scss/v2/AttachmentPreviewList/AttachmentPreviewList-layout.scss +0 -141
- package/dist/scss/v2/AttachmentPreviewList/AttachmentPreviewList-theme.scss +0 -190
- package/dist/scss/v2/AudioRecorder/AudioRecorder-layout.scss +0 -139
- package/dist/scss/v2/AudioRecorder/AudioRecorder-theme.scss +0 -61
- package/dist/scss/v2/Autocomplete/Autocomplete-layout.scss +0 -94
- package/dist/scss/v2/Autocomplete/Autocomplete-theme.scss +0 -220
- package/dist/scss/v2/Avatar/Avatar-layout.scss +0 -137
- package/dist/scss/v2/Avatar/Avatar-theme.scss +0 -64
- package/dist/scss/v2/BaseImage/BaseImage-layout.scss +0 -21
- package/dist/scss/v2/BaseImage/BaseImage-theme.scss +0 -35
- package/dist/scss/v2/BaseImage/index.scss +0 -2
- package/dist/scss/v2/Channel/Channel-layout.scss +0 -141
- package/dist/scss/v2/Channel/Channel-theme.scss +0 -100
- package/dist/scss/v2/ChannelHeader/ChannelHeader-layout.scss +0 -27
- package/dist/scss/v2/ChannelHeader/ChannelHeader-theme.scss +0 -43
- package/dist/scss/v2/ChannelList/ChannelList-layout.scss +0 -65
- package/dist/scss/v2/ChannelList/ChannelList-theme.scss +0 -89
- package/dist/scss/v2/ChannelPreview/ChannelPreview-layout.scss +0 -126
- package/dist/scss/v2/ChannelPreview/ChannelPreview-theme.scss +0 -148
- package/dist/scss/v2/ChannelSearch/ChannelSearch-layout.scss +0 -122
- package/dist/scss/v2/ChannelSearch/ChannelSearch-theme.scss +0 -238
- package/dist/scss/v2/ChatView/ChatView-layout.scss +0 -43
- package/dist/scss/v2/ChatView/ChatView-theme.scss +0 -32
- package/dist/scss/v2/Dialog/Dialog-layout.scss +0 -70
- package/dist/scss/v2/Dialog/Dialog-theme.scss +0 -103
- package/dist/scss/v2/DragAndDropContainer/DragAndDropContainer-layout.scss +0 -5
- package/dist/scss/v2/DragAndDropContainer/DragAndDropContainer-theme.scss +0 -47
- package/dist/scss/v2/DropzoneContainer/DropzoneContainer-layout.scss +0 -14
- package/dist/scss/v2/DropzoneContainer/DropzoneContainer-theme.scss +0 -17
- package/dist/scss/v2/EditMessageForm/EditMessageForm-layout.scss +0 -51
- package/dist/scss/v2/EditMessageForm/EditMessageForm-theme.scss +0 -50
- package/dist/scss/v2/Form/Form-layout.scss +0 -49
- package/dist/scss/v2/Form/Form-theme.scss +0 -82
- package/dist/scss/v2/Icon/Icon-layout.scss +0 -98
- package/dist/scss/v2/Icon/Icon-theme.scss +0 -17
- package/dist/scss/v2/ImageCarousel/ImageCarousel-layout.scss +0 -51
- package/dist/scss/v2/ImageCarousel/ImageCarousel-theme.scss +0 -30
- package/dist/scss/v2/InfiniteScrollPaginator/InfiniteScrollPaginator-layout.scss +0 -4
- package/dist/scss/v2/LinkPreview/LinkPreview-layout.scss +0 -67
- package/dist/scss/v2/LinkPreview/LinkPreview-theme.scss +0 -32
- package/dist/scss/v2/LinkPreview/index.scss +0 -2
- package/dist/scss/v2/LoadingIndicator/LoadingIndicator-layout.scss +0 -64
- package/dist/scss/v2/LoadingIndicator/LoadingIndicator-theme.scss +0 -14
- package/dist/scss/v2/Location/Location-layout.scss +0 -52
- package/dist/scss/v2/Location/Location-theme.scss +0 -32
- package/dist/scss/v2/Message/Message-layout.scss +0 -619
- package/dist/scss/v2/Message/Message-theme.scss +0 -483
- package/dist/scss/v2/MessageActionsBox/MessageActionsBox-layout.scss +0 -21
- package/dist/scss/v2/MessageActionsBox/MessageActionsBox-theme.scss +0 -85
- package/dist/scss/v2/MessageBouncePrompt/MessageBouncePrompt-layout.scss +0 -19
- package/dist/scss/v2/MessageBouncePrompt/MessageBouncePrompt-theme.scss +0 -51
- package/dist/scss/v2/MessageInput/MessageInput-layout.scss +0 -268
- package/dist/scss/v2/MessageInput/MessageInput-theme.scss +0 -359
- package/dist/scss/v2/MessageList/MessageList-layout.scss +0 -65
- package/dist/scss/v2/MessageList/MessageList-theme.scss +0 -107
- package/dist/scss/v2/MessageList/VirtualizedMessageList-layout.scss +0 -57
- package/dist/scss/v2/MessageList/VirtualizedMessageList-theme.scss +0 -41
- package/dist/scss/v2/MessageReactions/MessageReactions-layout.scss +0 -143
- package/dist/scss/v2/MessageReactions/MessageReactions-theme.scss +0 -92
- package/dist/scss/v2/MessageReactions/MessageReactionsSelector-layout.scss +0 -86
- package/dist/scss/v2/MessageReactions/MessageReactionsSelector-theme.scss +0 -94
- package/dist/scss/v2/Modal/Modal-layout.scss +0 -74
- package/dist/scss/v2/Modal/Modal-theme.scss +0 -109
- package/dist/scss/v2/Notification/MessageNotification-layout.scss +0 -12
- package/dist/scss/v2/Notification/MessageNotification-theme.scss +0 -34
- package/dist/scss/v2/Notification/Notification-layout.scss +0 -7
- package/dist/scss/v2/Notification/Notification-theme.scss +0 -32
- package/dist/scss/v2/Notification/NotificationList-layout.scss +0 -11
- package/dist/scss/v2/Notification/NotificationList-theme.scss +0 -31
- package/dist/scss/v2/Poll/Poll-layout.scss +0 -493
- package/dist/scss/v2/Poll/Poll-theme.scss +0 -178
- package/dist/scss/v2/Search/Search-layout.scss +0 -148
- package/dist/scss/v2/Search/Search-theme.scss +0 -222
- package/dist/scss/v2/Thread/Thread-layout.scss +0 -65
- package/dist/scss/v2/Thread/Thread-theme.scss +0 -82
- package/dist/scss/v2/ThreadList/ThreadList-layout.scss +0 -152
- package/dist/scss/v2/ThreadList/ThreadList-theme.scss +0 -75
- package/dist/scss/v2/Tooltip/Tooltip-layout.scss +0 -10
- package/dist/scss/v2/Tooltip/Tooltip-theme.scss +0 -36
- package/dist/scss/v2/TypingIndicator/TypingIndicator-layout.scss +0 -31
- package/dist/scss/v2/TypingIndicator/TypingIndicator-theme.scss +0 -68
- package/dist/scss/v2/UnreadCountBadge/UnreadCountBadge-layout.scss +0 -49
- package/dist/scss/v2/UnreadCountBadge/UnreadCountBadge-theme.scss +0 -11
- package/dist/scss/v2/_base.scss +0 -65
- package/dist/scss/v2/_emoji-replacement.scss +0 -45
- package/dist/scss/v2/_global-layout-variables.scss +0 -65
- package/dist/scss/v2/_global-theme-variables.scss +0 -173
- package/dist/scss/v2/_icons.scss +0 -36
- package/dist/scss/v2/_palette-variables.scss +0 -55
- package/dist/scss/v2/_utils.scss +0 -212
- package/dist/scss/v2/_variables.scss +0 -2
- package/dist/scss/v2/common/CTAButton/CTAButton-layout.scss +0 -4
- package/dist/scss/v2/common/CTAButton/CTAButton-theme.scss +0 -42
- package/dist/scss/v2/common/CircleFAButton/CircleFAButton-layout.scss +0 -14
- package/dist/scss/v2/common/CircleFAButton/CircleFAButton-theme.scss +0 -35
- package/dist/scss/v2/index.layout.scss +0 -49
- package/dist/scss/v2/index.scss +0 -50
- package/dist/scss/v2/vendor/emoji-mart.scss +0 -514
- package/dist/scss/v2/vendor/react-image-gallery.scss +0 -258
- package/dist/types/components/Icons/IconGiphy.d.ts +0 -3
- package/dist/types/components/Icons/IconGiphy.d.ts.map +0 -1
- /package/dist/{assets → css/assets}/EmojiOneColor.woff2 +0 -0
- /package/dist/{assets → css/assets}/NotoColorEmoji-flags.woff2 +0 -0
package/dist/es/index.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import clsx from "clsx";
|
|
|
3
3
|
import { nanoid } from "nanoid";
|
|
4
4
|
import React, { useState, useEffect, useCallback, useLayoutEffect, useMemo, useContext, createContext, useRef, forwardRef, createElement, Component, Fragment as Fragment$1 } from "react";
|
|
5
5
|
import { u as useHandleFileChangeWrapper, d as dataTransferItemsToFiles, r as renderAudio, t as toAudioBuffer, c as createFileFromBlobs, g as getExtensionFromMimeType, a as getRecordedMediaTypeFromMimeType } from "./audioProcessing.21cb49e1.mjs";
|
|
6
|
-
import { u as useStateStore, a as useMessageComposerController, i as isMessageBounced, b as useChannelActionContext, C as ComponentContext, c as useTranslationContext, d as useChannelStateContext, e as useChatContext, f as isNotificationForPanel, B as
|
|
7
|
-
import { bu, bx,
|
|
6
|
+
import { u as useStateStore, a as useMessageComposerController, i as isMessageBounced, b as useChannelActionContext, C as ComponentContext, c as useTranslationContext, d as useChannelStateContext, e as useChatContext, f as isNotificationForPanel, B as Button, I as IconPauseFill, g as IconPlayFill, h as getDefaultExportFromCjs, j as defaultTranslatorFunction, p as predefinedFormatters, L as LocalizedFormat, k as calendar, l as IconLoading, m as isNetworkSendFailure, v as validateAndGetMessage, n as isUserMuted, o as defaultPinPermissions, q as useThreadContext, r as usePopoverPosition, s as useComponentContext, t as IconXmark, w as IconUser, x as IconExclamationMarkFill, y as IconChevronRight, z as IconChevronLeft, A as IconArrowLeft, D as IconExclamationMark, E as IconNoSign, F as isMessageErrorRetryable, G as ACTIONS_NOT_WORKING_IN_THREAD, H as useNotificationTarget, J as IconArrowUpRight, K as addNotificationTargetTag, M as IconPin, N as mapToUserNameOrId, O as IconClock, P as IconCheckmark1Small, Q as IconChecks, R as getReadByTooltipText, S as messageHasAttachments, T as messageTextHasEmojisOnly, U as isDate, V as getDateString, W as IconTranslate, X as useMessageComposerContext, Y as useIsCooldownActive, Z as IconCrossSmall, _ as IconImage, $ as IconPoll, a0 as IconLocation, a1 as IconFile, a2 as IconLink, a3 as IconVideo, a4 as IconVideoFill, a5 as IconVoice, a6 as IconSave, a7 as IconBell, a8 as IconChevronDown, a9 as IconPlusSmall, aa as IconCheckmark, ab as DEFAULT_LOAD_PAGE_SCROLL_THRESHOLD, ac as IconTrophy, ad as IconReorder, ae as IconMinusCircle, af as IconSend, ag as IconAudio, ah as IconUserAdd, ai as IconMute, aj as IconGiphy, ak as IconFlag, al as IconUserRemove, am as IconAttachment, an as IconCommand, ao as CHANNEL_CONTAINER_ID, ap as IconPlus, aq as IconExclamationTriangle, ar as useAudioPlayer, as as IconRetry, at as IconArrowDownCircle, au as IconBolt, av as IconDelete, aw as IconUpload, ax as MessageComposerContextProvider, ay as useTypingContext, az as defaultDateTimeParser, aA as isLanguageSupported, aB as IconSidebar, aC as useChatViewContext, aD as MESSAGE_ACTIONS, aE as LegacyThreadContext, aF as IconReply, aG as IconEmoji, aH as IconMore, aI as IconUserCheck, aJ as IconUnsave, aK as IconBellOff, aL as IconNotification, aM as IconEdit, aN as IconCopy, aO as IconUnpin, aP as IconQuote, aQ as IconThread, aR as areMessageUIPropsEqual, aS as isDateSeparatorMessage, aT as isMessageBlocked, aU as messageHasSingleAttachment, aV as messageHasGiphyAttachment, aW as messageHasReactions, aX as isMessageEdited, aY as countEmojis, aZ as areMessagePropsEqual, a_ as getMessageActions, a$ as processMessages, b0 as insertIntro, b1 as getGroupStyles, b2 as getLastReceived, b3 as IconArrowUp, b4 as isIntroMessage, b5 as isLocalMessage, b6 as getIsFirstUnreadMessage, b7 as IconArrowDown, b8 as DEFAULT_NEXT_CHANNEL_PAGE_SIZE, b9 as EmptyStateIndicator, ba as getChannel, bb as IconSearch, bc as IconXCircle, bd as useChannelListContext, be as DEFAULT_JUMP_TO_PAGE_SIZE, bf as ChannelListContextProvider, bg as IconArchive, bh as IconLeave, bi as IconCamera, bj as IconExclamationCircleFill, bk as ChatProvider, bl as TranslationProvider, bm as useThreadsViewContext, bn as IconMessageBubbles, bo as IconRefresh, bp as IconEyeOpen } from "./WithAudioPlayback.e7821fd4.mjs";
|
|
7
|
+
import { bu, bx, bY, bZ, b_, b$, c0, c1, bz, bC, by, bB, bD, c2, bG, bH, bI, bJ, bK, c3, bL, bW, bX, c4, c5, c6, br, bF, bE, bs, bt, bM, bN, bT, bU, bQ, bR, c7, bS, c8, bP, bO, bq, bA, bv, bw, bV } from "./WithAudioPlayback.e7821fd4.mjs";
|
|
8
8
|
import { StateStore, formatMessage, MessageComposer as MessageComposer$1, isGiphyAttachment, isScrapedContent, isLocalVideoAttachment, isVideoAttachment, isLocalImageAttachment, isImageAttachment, isAudioAttachment, isVoiceRecordingAttachment, isFileAttachment, isVoteAnswer, VotingVisibility, isLocalVoiceRecordingAttachment, isLocalAudioAttachment, isLocalFileAttachment, isLocalAttachment, LinkPreviewsManager, SearchController, ChannelSearchSource, UserSearchSource, MessageSearchSource, StreamChat, isSharedLocationResponse, LiveLocationManager } from "stream-chat";
|
|
9
9
|
import throttle from "lodash.throttle";
|
|
10
10
|
import * as linkify from "linkifyjs";
|
|
@@ -275,7 +275,8 @@ const DialogPortalDestination = () => {
|
|
|
275
275
|
useEffect(() => {
|
|
276
276
|
if (!destinationRoot || !dialogManager) return;
|
|
277
277
|
const handleDocumentClick = (event) => {
|
|
278
|
-
|
|
278
|
+
const target = event.target;
|
|
279
|
+
if (target !== destinationRoot && destinationRoot.contains(target)) return;
|
|
279
280
|
setTimeout(() => {
|
|
280
281
|
Object.values(dialogManager.state.getLatestValue().dialogsById).forEach(
|
|
281
282
|
(dialog) => {
|
|
@@ -302,21 +303,6 @@ const DialogPortalDestination = () => {
|
|
|
302
303
|
className: "str-chat__dialog-overlay",
|
|
303
304
|
"data-str-chat__portal-id": dialogManager?.id,
|
|
304
305
|
"data-testid": "str-chat__dialog-overlay",
|
|
305
|
-
onClick: (event) => {
|
|
306
|
-
if (!dialogManager) return;
|
|
307
|
-
if (event.target !== event.currentTarget) return;
|
|
308
|
-
Object.values(dialogManager.state.getLatestValue().dialogsById).forEach(
|
|
309
|
-
(dialog) => {
|
|
310
|
-
if (!dialog.isOpen) return;
|
|
311
|
-
if (!shouldCloseOnOutsideClick({
|
|
312
|
-
dialog,
|
|
313
|
-
managerCloseOnClickOutside: dialogManager.closeOnClickOutside
|
|
314
|
-
}))
|
|
315
|
-
return;
|
|
316
|
-
dialogManager.close(dialog.id);
|
|
317
|
-
}
|
|
318
|
-
);
|
|
319
|
-
},
|
|
320
306
|
ref: setDestinationRoot,
|
|
321
307
|
style: {
|
|
322
308
|
"--str-chat__dialog-overlay-height": openedDialogCount > 0 ? "100%" : "0"
|
|
@@ -474,6 +460,38 @@ const useMessageContext = (_componentName) => {
|
|
|
474
460
|
}
|
|
475
461
|
return contextValue;
|
|
476
462
|
};
|
|
463
|
+
const snapshots = /* @__PURE__ */ new WeakMap();
|
|
464
|
+
const savePreEditSnapshot = (messageComposer) => {
|
|
465
|
+
if (snapshots.has(messageComposer)) return;
|
|
466
|
+
const composerState = messageComposer.state.getLatestValue();
|
|
467
|
+
const textState = messageComposer.textComposer.state.getLatestValue();
|
|
468
|
+
const attachmentState = messageComposer.attachmentManager.state.getLatestValue();
|
|
469
|
+
const linkPreviewState = messageComposer.linkPreviewsManager.state.getLatestValue();
|
|
470
|
+
const locationState = messageComposer.locationComposer.state.getLatestValue();
|
|
471
|
+
const pollState = messageComposer.pollComposer.state.getLatestValue();
|
|
472
|
+
const customDataState = messageComposer.customDataManager.state.getLatestValue();
|
|
473
|
+
snapshots.set(messageComposer, () => {
|
|
474
|
+
messageComposer.state.next(composerState);
|
|
475
|
+
messageComposer.textComposer.state.next(textState);
|
|
476
|
+
messageComposer.attachmentManager.state.next(attachmentState);
|
|
477
|
+
messageComposer.linkPreviewsManager.state.next(linkPreviewState);
|
|
478
|
+
messageComposer.locationComposer.state.next(locationState);
|
|
479
|
+
messageComposer.pollComposer.state.next(pollState);
|
|
480
|
+
messageComposer.customDataManager.state.next(customDataState);
|
|
481
|
+
});
|
|
482
|
+
};
|
|
483
|
+
const restorePreEditSnapshot = (messageComposer) => {
|
|
484
|
+
const restore = snapshots.get(messageComposer);
|
|
485
|
+
snapshots.delete(messageComposer);
|
|
486
|
+
if (restore) {
|
|
487
|
+
restore();
|
|
488
|
+
} else {
|
|
489
|
+
messageComposer.clear();
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
const discardPreEditSnapshot = (messageComposer) => {
|
|
493
|
+
snapshots.delete(messageComposer);
|
|
494
|
+
};
|
|
477
495
|
const MessageBounceContext = createContext(
|
|
478
496
|
void 0
|
|
479
497
|
);
|
|
@@ -502,6 +520,7 @@ function MessageBounceProvider({ children }) {
|
|
|
502
520
|
const handleEdit = useCallback(
|
|
503
521
|
(e) => {
|
|
504
522
|
e.preventDefault();
|
|
523
|
+
savePreEditSnapshot(messageComposer);
|
|
505
524
|
messageComposer.initState({ composition: message });
|
|
506
525
|
},
|
|
507
526
|
[message, messageComposer]
|
|
@@ -710,49 +729,6 @@ const useNotifications = (options) => {
|
|
|
710
729
|
const { notifications } = useStateStore(client.notifications.store, selector2);
|
|
711
730
|
return notifications;
|
|
712
731
|
};
|
|
713
|
-
const IconGiphy = ({ className, ...props }) => /* @__PURE__ */ jsxs(
|
|
714
|
-
BaseIcon,
|
|
715
|
-
{
|
|
716
|
-
...props,
|
|
717
|
-
className: clsx("str-chat__icon--giphy", className),
|
|
718
|
-
viewBox: "0 0 16 16",
|
|
719
|
-
children: [
|
|
720
|
-
/* @__PURE__ */ jsxs("g", { clipPath: "url(#clip0_4197_15218)", children: [
|
|
721
|
-
/* @__PURE__ */ jsx(
|
|
722
|
-
"path",
|
|
723
|
-
{
|
|
724
|
-
clipRule: "evenodd",
|
|
725
|
-
d: "M3.33674 1.82861H12.6639V14.171H3.33594L3.33674 1.82861Z",
|
|
726
|
-
fill: "black",
|
|
727
|
-
fillRule: "evenodd"
|
|
728
|
-
}
|
|
729
|
-
),
|
|
730
|
-
/* @__PURE__ */ jsx("path", { d: "M1.47217 1.37109H3.33697V14.6287H1.47217V1.37109Z", fill: "#04FF8E" }),
|
|
731
|
-
/* @__PURE__ */ jsx("path", { d: "M12.6631 5.02881H14.5279V14.6288H12.6631V5.02881Z", fill: "#8E2EFF" }),
|
|
732
|
-
/* @__PURE__ */ jsx("path", { d: "M1.47217 14.1714H14.5282V16.0002H1.47217V14.1714Z", fill: "#00C5FF" }),
|
|
733
|
-
/* @__PURE__ */ jsx("path", { d: "M1.47217 0H8.93297V1.8288H1.47217V0Z", fill: "#FFF152" }),
|
|
734
|
-
/* @__PURE__ */ jsx(
|
|
735
|
-
"path",
|
|
736
|
-
{
|
|
737
|
-
d: "M12.663 3.6568V1.8288H10.7974V0H8.93262V5.4856H14.5278V3.6568",
|
|
738
|
-
fill: "#FF5B5B"
|
|
739
|
-
}
|
|
740
|
-
),
|
|
741
|
-
/* @__PURE__ */ jsx("path", { d: "M12.6631 7.31464V5.48584H14.5279", fill: "#551C99" }),
|
|
742
|
-
/* @__PURE__ */ jsx(
|
|
743
|
-
"path",
|
|
744
|
-
{
|
|
745
|
-
clipRule: "evenodd",
|
|
746
|
-
d: "M8.93298 0V1.8288H7.06738",
|
|
747
|
-
fill: "#999131",
|
|
748
|
-
fillRule: "evenodd"
|
|
749
|
-
}
|
|
750
|
-
)
|
|
751
|
-
] }),
|
|
752
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_4197_15218", children: /* @__PURE__ */ jsx("rect", { fill: "white", height: "16", width: "16" }) }) })
|
|
753
|
-
]
|
|
754
|
-
}
|
|
755
|
-
);
|
|
756
732
|
const PlayButton = ({ className, isPlaying, ...props }) => /* @__PURE__ */ jsx(
|
|
757
733
|
Button,
|
|
758
734
|
{
|
|
@@ -763,7 +739,7 @@ const PlayButton = ({ className, isPlaying, ...props }) => /* @__PURE__ */ jsx(
|
|
|
763
739
|
size: "sm",
|
|
764
740
|
variant: "secondary",
|
|
765
741
|
...props,
|
|
766
|
-
children: isPlaying ? /* @__PURE__ */ jsx(
|
|
742
|
+
children: isPlaying ? /* @__PURE__ */ jsx(IconPauseFill, {}) : /* @__PURE__ */ jsx(IconPlayFill, {})
|
|
767
743
|
}
|
|
768
744
|
);
|
|
769
745
|
const Anonymous$b = "Anonym";
|
|
@@ -7287,10 +7263,10 @@ function requireRelativeTime() {
|
|
|
7287
7263
|
function i(r2, t2, e2, o2) {
|
|
7288
7264
|
return n.fromToBase(r2, t2, e2, o2);
|
|
7289
7265
|
}
|
|
7290
|
-
e.en.relativeTime = o, n.fromToBase = function(t2, n2, i2,
|
|
7266
|
+
e.en.relativeTime = o, n.fromToBase = function(t2, n2, i2, d2, u2) {
|
|
7291
7267
|
for (var a, f, s, l = i2.$locale().relativeTime || o, h = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m = h.length, c = 0; c < m; c += 1) {
|
|
7292
7268
|
var y = h[c];
|
|
7293
|
-
y.d && (a =
|
|
7269
|
+
y.d && (a = d2 ? e(t2).diff(i2, y.d, true) : i2.diff(t2, y.d, true));
|
|
7294
7270
|
var p = (r.rounding || Math.round)(Math.abs(a));
|
|
7295
7271
|
if (s = a > 0, p <= y.r || !y.r) {
|
|
7296
7272
|
p <= 1 && c > 0 && (y = h[c - 1]);
|
|
@@ -7360,77 +7336,77 @@ function requireDuration() {
|
|
|
7360
7336
|
}
|
|
7361
7337
|
return this;
|
|
7362
7338
|
}
|
|
7363
|
-
var
|
|
7364
|
-
return
|
|
7339
|
+
var c9 = h2.prototype;
|
|
7340
|
+
return c9.calMilliseconds = function() {
|
|
7365
7341
|
var t2 = this;
|
|
7366
7342
|
this.$ms = Object.keys(this.$d).reduce(function(s2, n2) {
|
|
7367
7343
|
return s2 + (t2.$d[n2] || 0) * e[n2];
|
|
7368
7344
|
}, 0);
|
|
7369
|
-
},
|
|
7345
|
+
}, c9.parseFromMilliseconds = function() {
|
|
7370
7346
|
var t2 = this.$ms;
|
|
7371
7347
|
this.$d.years = a(t2 / 31536e6), t2 %= 31536e6, this.$d.months = a(t2 / 2592e6), t2 %= 2592e6, this.$d.days = a(t2 / 864e5), t2 %= 864e5, this.$d.hours = a(t2 / 36e5), t2 %= 36e5, this.$d.minutes = a(t2 / 6e4), t2 %= 6e4, this.$d.seconds = a(t2 / 1e3), t2 %= 1e3, this.$d.milliseconds = t2;
|
|
7372
|
-
},
|
|
7348
|
+
}, c9.toISOString = function() {
|
|
7373
7349
|
var t2 = d(this.$d.years, "Y"), s2 = d(this.$d.months, "M"), n2 = +this.$d.days || 0;
|
|
7374
7350
|
this.$d.weeks && (n2 += 7 * this.$d.weeks);
|
|
7375
7351
|
var i2 = d(n2, "D"), e2 = d(this.$d.hours, "H"), r2 = d(this.$d.minutes, "M"), o2 = this.$d.seconds || 0;
|
|
7376
7352
|
this.$d.milliseconds && (o2 += this.$d.milliseconds / 1e3);
|
|
7377
|
-
var u3 = d(o2, "S"), h3 = t2.negative || s2.negative || i2.negative || e2.negative || r2.negative || u3.negative, a2 = e2.format || r2.format || u3.format ? "T" : "",
|
|
7378
|
-
return "P" ===
|
|
7379
|
-
},
|
|
7353
|
+
var u3 = d(o2, "S"), h3 = t2.negative || s2.negative || i2.negative || e2.negative || r2.negative || u3.negative, a2 = e2.format || r2.format || u3.format ? "T" : "", c10 = (h3 ? "-" : "") + "P" + t2.format + s2.format + i2.format + a2 + e2.format + r2.format + u3.format;
|
|
7354
|
+
return "P" === c10 || "-P" === c10 ? "P0D" : c10;
|
|
7355
|
+
}, c9.toJSON = function() {
|
|
7380
7356
|
return this.toISOString();
|
|
7381
|
-
},
|
|
7357
|
+
}, c9.format = function(t2) {
|
|
7382
7358
|
var i2 = t2 || "YYYY-MM-DDTHH:mm:ss", e2 = { Y: this.$d.years, YY: s.s(this.$d.years, 2, "0"), YYYY: s.s(this.$d.years, 4, "0"), M: this.$d.months, MM: s.s(this.$d.months, 2, "0"), D: this.$d.days, DD: s.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: s.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: s.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: s.s(this.$d.seconds, 2, "0"), SSS: s.s(this.$d.milliseconds, 3, "0") };
|
|
7383
7359
|
return i2.replace(n, function(t3, s2) {
|
|
7384
7360
|
return s2 || String(e2[t3]);
|
|
7385
7361
|
});
|
|
7386
|
-
},
|
|
7362
|
+
}, c9.as = function(t2) {
|
|
7387
7363
|
return this.$ms / e[u2(t2)];
|
|
7388
|
-
},
|
|
7364
|
+
}, c9.get = function(t2) {
|
|
7389
7365
|
var s2 = this.$ms, n2 = u2(t2);
|
|
7390
7366
|
return "milliseconds" === n2 ? s2 %= 1e3 : s2 = "weeks" === n2 ? a(s2 / e[n2]) : this.$d[n2], 0 === s2 ? 0 : s2;
|
|
7391
|
-
},
|
|
7367
|
+
}, c9.add = function(t2, s2, n2) {
|
|
7392
7368
|
var i2;
|
|
7393
7369
|
return i2 = s2 ? t2 * e[u2(s2)] : r(t2) ? t2.$ms : o(t2, this).$ms, o(this.$ms + i2 * (n2 ? -1 : 1), this);
|
|
7394
|
-
},
|
|
7370
|
+
}, c9.subtract = function(t2, s2) {
|
|
7395
7371
|
return this.add(t2, s2, true);
|
|
7396
|
-
},
|
|
7372
|
+
}, c9.locale = function(t2) {
|
|
7397
7373
|
var s2 = this.clone();
|
|
7398
7374
|
return s2.$l = t2, s2;
|
|
7399
|
-
},
|
|
7375
|
+
}, c9.clone = function() {
|
|
7400
7376
|
return o(this.$ms, this);
|
|
7401
|
-
},
|
|
7377
|
+
}, c9.humanize = function(s2) {
|
|
7402
7378
|
return t().add(this.$ms, "ms").locale(this.$l).fromNow(!s2);
|
|
7403
|
-
},
|
|
7379
|
+
}, c9.milliseconds = function() {
|
|
7404
7380
|
return this.get("milliseconds");
|
|
7405
|
-
},
|
|
7381
|
+
}, c9.asMilliseconds = function() {
|
|
7406
7382
|
return this.as("milliseconds");
|
|
7407
|
-
},
|
|
7383
|
+
}, c9.seconds = function() {
|
|
7408
7384
|
return this.get("seconds");
|
|
7409
|
-
},
|
|
7385
|
+
}, c9.asSeconds = function() {
|
|
7410
7386
|
return this.as("seconds");
|
|
7411
|
-
},
|
|
7387
|
+
}, c9.minutes = function() {
|
|
7412
7388
|
return this.get("minutes");
|
|
7413
|
-
},
|
|
7389
|
+
}, c9.asMinutes = function() {
|
|
7414
7390
|
return this.as("minutes");
|
|
7415
|
-
},
|
|
7391
|
+
}, c9.hours = function() {
|
|
7416
7392
|
return this.get("hours");
|
|
7417
|
-
},
|
|
7393
|
+
}, c9.asHours = function() {
|
|
7418
7394
|
return this.as("hours");
|
|
7419
|
-
},
|
|
7395
|
+
}, c9.days = function() {
|
|
7420
7396
|
return this.get("days");
|
|
7421
|
-
},
|
|
7397
|
+
}, c9.asDays = function() {
|
|
7422
7398
|
return this.as("days");
|
|
7423
|
-
},
|
|
7399
|
+
}, c9.weeks = function() {
|
|
7424
7400
|
return this.get("weeks");
|
|
7425
|
-
},
|
|
7401
|
+
}, c9.asWeeks = function() {
|
|
7426
7402
|
return this.as("weeks");
|
|
7427
|
-
},
|
|
7403
|
+
}, c9.months = function() {
|
|
7428
7404
|
return this.get("months");
|
|
7429
|
-
},
|
|
7405
|
+
}, c9.asMonths = function() {
|
|
7430
7406
|
return this.as("months");
|
|
7431
|
-
},
|
|
7407
|
+
}, c9.years = function() {
|
|
7432
7408
|
return this.get("years");
|
|
7433
|
-
},
|
|
7409
|
+
}, c9.asYears = function() {
|
|
7434
7410
|
return this.as("years");
|
|
7435
7411
|
}, h2;
|
|
7436
7412
|
})();
|
|
@@ -7785,7 +7761,7 @@ class NotificationTranslationTopic extends TranslationTopic {
|
|
|
7785
7761
|
}
|
|
7786
7762
|
}
|
|
7787
7763
|
var de$1 = { exports: {} };
|
|
7788
|
-
var
|
|
7764
|
+
var de = de$1.exports;
|
|
7789
7765
|
var hasRequiredDe;
|
|
7790
7766
|
function requireDe() {
|
|
7791
7767
|
if (hasRequiredDe) return de$1.exports;
|
|
@@ -7793,7 +7769,7 @@ function requireDe() {
|
|
|
7793
7769
|
(function(module, exports$1) {
|
|
7794
7770
|
!(function(e, n) {
|
|
7795
7771
|
module.exports = n(Dayjs);
|
|
7796
|
-
})(
|
|
7772
|
+
})(de, function(e) {
|
|
7797
7773
|
e = e && e.hasOwnProperty("default") ? e.default : e;
|
|
7798
7774
|
var n = { s: "ein paar Sekunden", m: ["eine Minute", "einer Minute"], mm: "%d Minuten", h: ["eine Stunde", "einer Stunde"], hh: "%d Stunden", d: ["ein Tag", "einem Tag"], dd: ["%d Tage", "%d Tagen"], M: ["ein Monat", "einem Monat"], MM: ["%d Monate", "%d Monaten"], y: ["ein Jahr", "einem Jahr"], yy: ["%d Jahre", "%d Jahren"] };
|
|
7799
7775
|
function t(e2, t2, a2) {
|
|
@@ -8502,7 +8478,7 @@ const LoadingChannels = () => /* @__PURE__ */ jsxs("div", { className: "str-chat
|
|
|
8502
8478
|
/* @__PURE__ */ jsx(LoadingItems, {}),
|
|
8503
8479
|
/* @__PURE__ */ jsx(LoadingItems, {})
|
|
8504
8480
|
] });
|
|
8505
|
-
const LoadingIndicator = (props) => /* @__PURE__ */ jsx(
|
|
8481
|
+
const LoadingIndicator = (props) => /* @__PURE__ */ jsx(IconLoading, { ...props, className: "str-chat__loading-indicator" });
|
|
8506
8482
|
const UnMemoizedCustomNotification = (props) => {
|
|
8507
8483
|
const { active, children, className, type } = props;
|
|
8508
8484
|
if (!active) return null;
|
|
@@ -8910,7 +8886,7 @@ const useUserRole = (message, onlySenderCanEdit, disableQuotedMessages) => {
|
|
|
8910
8886
|
const isOwner = channel.state.membership.role === "owner";
|
|
8911
8887
|
const isModerator = client.user?.role === "channel_moderator" || channel.state.membership.role === "channel_moderator" || channel.state.membership.role === "moderator" || channel.state.membership.is_moderator === true || channel.state.membership.channel_role === "channel_moderator";
|
|
8912
8888
|
const isMyMessage = client.userID === message.user?.id;
|
|
8913
|
-
const canEdit = !message.poll && (!onlySenderCanEdit && channelCapabilities["update-any-message"] || isMyMessage && channelCapabilities["update-own-message"]);
|
|
8889
|
+
const canEdit = !message.poll && message.command !== "giphy" && (!onlySenderCanEdit && channelCapabilities["update-any-message"] || isMyMessage && channelCapabilities["update-own-message"]);
|
|
8914
8890
|
const canDelete = channelCapabilities["delete-any-message"] || isMyMessage && channelCapabilities["delete-own-message"];
|
|
8915
8891
|
const canFlag = !isMyMessage && channelCapabilities["flag-message"];
|
|
8916
8892
|
const canMute = !isMyMessage && channelCapabilities["mute-channel"];
|
|
@@ -9214,7 +9190,7 @@ const DefaultCalloutDialog = ({ children, className, onClose }) => /* @__PURE__
|
|
|
9214
9190
|
onClick: onClose,
|
|
9215
9191
|
size: "sm",
|
|
9216
9192
|
variant: "secondary",
|
|
9217
|
-
children: /* @__PURE__ */ jsx(
|
|
9193
|
+
children: /* @__PURE__ */ jsx(IconXmark, {})
|
|
9218
9194
|
}
|
|
9219
9195
|
)
|
|
9220
9196
|
] });
|
|
@@ -9284,7 +9260,7 @@ const Avatar = ({
|
|
|
9284
9260
|
}
|
|
9285
9261
|
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9286
9262
|
!!sizeAwareInitials.length && /* @__PURE__ */ jsx("div", { className: "str-chat__avatar-initials", "data-testid": "avatar-fallback", children: sizeAwareInitials }),
|
|
9287
|
-
!sizeAwareInitials.length && /* @__PURE__ */ jsx(
|
|
9263
|
+
!sizeAwareInitials.length && /* @__PURE__ */ jsx(IconUser, {})
|
|
9288
9264
|
] })
|
|
9289
9265
|
]
|
|
9290
9266
|
}
|
|
@@ -9313,7 +9289,7 @@ const ErrorBadge = ({
|
|
|
9313
9289
|
className,
|
|
9314
9290
|
size = "sm",
|
|
9315
9291
|
...rest
|
|
9316
|
-
}) => /* @__PURE__ */ jsx(Badge, { ...rest, className, size, variant: "error", children: /* @__PURE__ */ jsx(
|
|
9292
|
+
}) => /* @__PURE__ */ jsx(Badge, { ...rest, className, size, variant: "error", children: /* @__PURE__ */ jsx(IconExclamationMarkFill, {}) });
|
|
9317
9293
|
function AvatarStack({
|
|
9318
9294
|
badgeSize,
|
|
9319
9295
|
component: Component2 = "div",
|
|
@@ -9929,7 +9905,7 @@ const PromptHeader = ({ className, close, description, title }) => /* @__PURE__
|
|
|
9929
9905
|
onClick: close,
|
|
9930
9906
|
size: "sm",
|
|
9931
9907
|
variant: "secondary",
|
|
9932
|
-
children: /* @__PURE__ */ jsx(
|
|
9908
|
+
children: /* @__PURE__ */ jsx(IconXmark, {})
|
|
9933
9909
|
}
|
|
9934
9910
|
)
|
|
9935
9911
|
] });
|
|
@@ -9998,7 +9974,7 @@ const ViewerHeader = ({
|
|
|
9998
9974
|
onClick: close,
|
|
9999
9975
|
size: "sm",
|
|
10000
9976
|
variant: "secondary",
|
|
10001
|
-
children: /* @__PURE__ */ jsx(
|
|
9977
|
+
children: /* @__PURE__ */ jsx(IconXmark, {})
|
|
10002
9978
|
}
|
|
10003
9979
|
)
|
|
10004
9980
|
] });
|
|
@@ -10135,7 +10111,7 @@ function MessageBouncePrompt({ children }) {
|
|
|
10135
10111
|
Alert.Header,
|
|
10136
10112
|
{
|
|
10137
10113
|
className: "str-chat__message-bounce-alert-header",
|
|
10138
|
-
Icon:
|
|
10114
|
+
Icon: IconExclamationMark,
|
|
10139
10115
|
title: !children ? t("This message did not meet our content guidelines") : void 0,
|
|
10140
10116
|
children
|
|
10141
10117
|
}
|
|
@@ -10186,7 +10162,7 @@ const MessageBubble = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
|
10186
10162
|
const MessageDeletedBubble = () => {
|
|
10187
10163
|
const { t } = useTranslationContext();
|
|
10188
10164
|
return /* @__PURE__ */ jsx(MessageBubble, { "data-testid": "message-deleted-bubble", children: /* @__PURE__ */ jsxs("div", { className: "str-chat__message-text", children: [
|
|
10189
|
-
/* @__PURE__ */ jsx(
|
|
10165
|
+
/* @__PURE__ */ jsx(IconNoSign, {}),
|
|
10190
10166
|
/* @__PURE__ */ jsx("span", { children: t("Message deleted") })
|
|
10191
10167
|
] }) });
|
|
10192
10168
|
};
|
|
@@ -10329,7 +10305,7 @@ const MessageAlsoSentInChannelIndicator = () => {
|
|
|
10329
10305
|
};
|
|
10330
10306
|
if (!message?.show_in_channel) return null;
|
|
10331
10307
|
return /* @__PURE__ */ jsxs("div", { className: "str-chat__message-also-sent-in-channel", role: "status", children: [
|
|
10332
|
-
/* @__PURE__ */ jsx(
|
|
10308
|
+
/* @__PURE__ */ jsx(IconArrowUpRight, {}),
|
|
10333
10309
|
/* @__PURE__ */ jsx("span", { children: threadList ? t("Also sent in channel") : t("Replied to a thread") }),
|
|
10334
10310
|
/* @__PURE__ */ jsx("span", { children: " · " }),
|
|
10335
10311
|
/* @__PURE__ */ jsx(
|
|
@@ -10543,7 +10519,7 @@ const UnMemoizedMessageStatus = (props) => {
|
|
|
10543
10519
|
children: t("Delivered")
|
|
10544
10520
|
}
|
|
10545
10521
|
),
|
|
10546
|
-
/* @__PURE__ */ jsx(
|
|
10522
|
+
/* @__PURE__ */ jsx(IconChecks, { className: "str-chat__message-status-delivered" })
|
|
10547
10523
|
] })),
|
|
10548
10524
|
read && (MessageReadStatus ? /* @__PURE__ */ jsx(MessageReadStatus, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10549
10525
|
/* @__PURE__ */ jsx(
|
|
@@ -10555,7 +10531,7 @@ const UnMemoizedMessageStatus = (props) => {
|
|
|
10555
10531
|
children: getReadByTooltipText(readBy, t, client, tooltipUserNameMapper)
|
|
10556
10532
|
}
|
|
10557
10533
|
),
|
|
10558
|
-
/* @__PURE__ */ jsx(
|
|
10534
|
+
/* @__PURE__ */ jsx(IconChecks, { className: "str-chat__message-status-read" }),
|
|
10559
10535
|
readersWithoutOwnUser.length > 1 && /* @__PURE__ */ jsx(
|
|
10560
10536
|
"span",
|
|
10561
10537
|
{
|
|
@@ -11179,6 +11155,7 @@ const useSubmitHandler = (props) => {
|
|
|
11179
11155
|
if (messageComposer.editedMessage && localMessage.type !== "error") {
|
|
11180
11156
|
try {
|
|
11181
11157
|
await editMessage(localMessage, sendOptions);
|
|
11158
|
+
discardPreEditSnapshot(messageComposer);
|
|
11182
11159
|
messageComposer.clear();
|
|
11183
11160
|
} catch (err) {
|
|
11184
11161
|
client.notifications.addError({
|
|
@@ -12047,7 +12024,7 @@ const ImagePlaceholder = ({ className }) => {
|
|
|
12047
12024
|
className: clsx("str-chat__image-placeholder", className),
|
|
12048
12025
|
"data-testid": "str-chat__base-image-placeholder",
|
|
12049
12026
|
role: "img",
|
|
12050
|
-
children: /* @__PURE__ */ jsx(
|
|
12027
|
+
children: /* @__PURE__ */ jsx(IconImage, {})
|
|
12051
12028
|
}
|
|
12052
12029
|
);
|
|
12053
12030
|
};
|
|
@@ -13109,16 +13086,16 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13109
13086
|
};
|
|
13110
13087
|
if (!groupedAttachments.total) return result;
|
|
13111
13088
|
if (groupedAttachments.polls.length > 0)
|
|
13112
|
-
return { ...result, Icon:
|
|
13089
|
+
return { ...result, Icon: IconPoll, previewType: "poll" };
|
|
13113
13090
|
if (groupedAttachments.locations.length > 0)
|
|
13114
|
-
return { ...result, Icon:
|
|
13091
|
+
return { ...result, Icon: IconLocation, previewType: "location" };
|
|
13115
13092
|
if (groupedAttachments.giphies.length > 0 && groupedAttachments.giphies.length === groupedAttachments.total) {
|
|
13116
13093
|
const giphyAttachment = groupedAttachments.giphies[0];
|
|
13117
13094
|
const giphyVersion = giphyAttachment.giphy?.[giphyVersionName];
|
|
13118
13095
|
const src = giphyVersion?.url || giphyAttachment.thumb_url || giphyAttachment.image_url || "";
|
|
13119
13096
|
return {
|
|
13120
13097
|
...result,
|
|
13121
|
-
Icon:
|
|
13098
|
+
Icon: IconFile,
|
|
13122
13099
|
PreviewImage: /* @__PURE__ */ jsx(
|
|
13123
13100
|
BaseImage,
|
|
13124
13101
|
{
|
|
@@ -13135,7 +13112,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13135
13112
|
const fileAttachment = groupedAttachments.documents[0];
|
|
13136
13113
|
return {
|
|
13137
13114
|
...result,
|
|
13138
|
-
Icon:
|
|
13115
|
+
Icon: IconFile,
|
|
13139
13116
|
PreviewImage: /* @__PURE__ */ jsx(FileIcon, { fileName: fileAttachment.title, mimeType: fileAttachment.mime_type }),
|
|
13140
13117
|
previewType: "file"
|
|
13141
13118
|
};
|
|
@@ -13144,7 +13121,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13144
13121
|
const linkAttachment = groupedAttachments.links[0];
|
|
13145
13122
|
return {
|
|
13146
13123
|
...result,
|
|
13147
|
-
Icon:
|
|
13124
|
+
Icon: IconLink,
|
|
13148
13125
|
PreviewImage: /* @__PURE__ */ jsx(
|
|
13149
13126
|
BaseImage,
|
|
13150
13127
|
{
|
|
@@ -13172,7 +13149,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13172
13149
|
title: videoAttachment.title
|
|
13173
13150
|
}
|
|
13174
13151
|
),
|
|
13175
|
-
/* @__PURE__ */ jsx("div", { className: "str-chat__attachment-preview__thumbnail__play-indicator", children: /* @__PURE__ */ jsx(
|
|
13152
|
+
/* @__PURE__ */ jsx("div", { className: "str-chat__attachment-preview__thumbnail__play-indicator", children: /* @__PURE__ */ jsx(IconPlayFill, {}) })
|
|
13176
13153
|
] }),
|
|
13177
13154
|
previewType: "video"
|
|
13178
13155
|
};
|
|
@@ -13181,7 +13158,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13181
13158
|
const imageAttachment = groupedAttachments.images[0];
|
|
13182
13159
|
return {
|
|
13183
13160
|
...result,
|
|
13184
|
-
Icon:
|
|
13161
|
+
Icon: IconVideoFill,
|
|
13185
13162
|
PreviewImage: /* @__PURE__ */ jsx(
|
|
13186
13163
|
BaseImage,
|
|
13187
13164
|
{
|
|
@@ -13195,8 +13172,8 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13195
13172
|
};
|
|
13196
13173
|
}
|
|
13197
13174
|
if (groupedAttachments.voiceRecordings.length === groupedAttachments.total)
|
|
13198
|
-
return { ...result, Icon:
|
|
13199
|
-
return { ...result, Icon:
|
|
13175
|
+
return { ...result, Icon: IconVoice, previewType: "voice" };
|
|
13176
|
+
return { ...result, Icon: IconFile, previewType: "mixed" };
|
|
13200
13177
|
};
|
|
13201
13178
|
const QuotedMessagePreview = ({
|
|
13202
13179
|
getQuotedMessageAuthor,
|
|
@@ -13347,7 +13324,7 @@ const reminderStateSelector = (state) => ({
|
|
|
13347
13324
|
function SavedForLaterContent() {
|
|
13348
13325
|
const { t } = useTranslationContext();
|
|
13349
13326
|
return /* @__PURE__ */ jsxs("p", { className: "str-chat__message-saved-for-later", children: [
|
|
13350
|
-
/* @__PURE__ */ jsx(
|
|
13327
|
+
/* @__PURE__ */ jsx(IconSave, {}),
|
|
13351
13328
|
/* @__PURE__ */ jsx("span", { children: t("Saved for later") })
|
|
13352
13329
|
] });
|
|
13353
13330
|
}
|
|
@@ -13391,7 +13368,7 @@ function RemindMeContent({ reminder }) {
|
|
|
13391
13368
|
});
|
|
13392
13369
|
};
|
|
13393
13370
|
return /* @__PURE__ */ jsxs("p", { className: "str-chat__message-reminder", children: [
|
|
13394
|
-
/* @__PURE__ */ jsx(
|
|
13371
|
+
/* @__PURE__ */ jsx(IconBell, {}),
|
|
13395
13372
|
/* @__PURE__ */ jsx("span", { children: t("Reminder set") }),
|
|
13396
13373
|
/* @__PURE__ */ jsx("span", { children: " · " }),
|
|
13397
13374
|
/* @__PURE__ */ jsx("span", { className: "str-chat__message-reminder__time-left", children: renderTime() })
|
|
@@ -13569,15 +13546,7 @@ const SwitchField = ({
|
|
|
13569
13546
|
ref: inputRef
|
|
13570
13547
|
}
|
|
13571
13548
|
),
|
|
13572
|
-
title ? /* @__PURE__ */ jsx(
|
|
13573
|
-
SwitchFieldLabel,
|
|
13574
|
-
{
|
|
13575
|
-
description,
|
|
13576
|
-
htmlFor: id,
|
|
13577
|
-
onClick: () => inputRef.current?.click(),
|
|
13578
|
-
title
|
|
13579
|
-
}
|
|
13580
|
-
) : children,
|
|
13549
|
+
title ? /* @__PURE__ */ jsx(SwitchFieldLabel, { description, htmlFor: id, title }) : children,
|
|
13581
13550
|
/* @__PURE__ */ jsx(
|
|
13582
13551
|
Switch,
|
|
13583
13552
|
{
|
|
@@ -14104,10 +14073,10 @@ const TextInput = forwardRef(function TextInput2({
|
|
|
14104
14073
|
const displayMessage = displayError || displaySuccess || displayNeutralMessage;
|
|
14105
14074
|
const messageId = displayMessage ? `${id}-message` : void 0;
|
|
14106
14075
|
const messageContent = displayError ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14107
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: errorMessageIcon ?? /* @__PURE__ */ jsx(
|
|
14076
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: errorMessageIcon ?? /* @__PURE__ */ jsx(IconExclamationMark, {}) }),
|
|
14108
14077
|
errorMessage ?? message
|
|
14109
14078
|
] }) : displaySuccess ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14110
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: successMessageIcon ?? /* @__PURE__ */ jsx(
|
|
14079
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: successMessageIcon ?? /* @__PURE__ */ jsx(IconCheckmark, {}) }),
|
|
14111
14080
|
successMessage
|
|
14112
14081
|
] }) : displayNeutralMessage ? message : null;
|
|
14113
14082
|
return /* @__PURE__ */ jsxs(
|
|
@@ -14636,7 +14605,7 @@ const PollVoteTimestamp = ({ timestamp }) => {
|
|
|
14636
14605
|
const PollVoteAuthor = ({ vote }) => {
|
|
14637
14606
|
const { t } = useTranslationContext();
|
|
14638
14607
|
const { client } = useChatContext();
|
|
14639
|
-
const displayName = client.user?.id && client.user.id === vote.user?.id ? t("You") : vote.user?.name || t("Anonymous");
|
|
14608
|
+
const displayName = client.user?.id && client.user.id === vote.user?.id ? t("You") : vote.user?.name || vote.user?.id || t("Anonymous");
|
|
14640
14609
|
return /* @__PURE__ */ jsxs("div", { className: "str-chat__poll-vote__author", children: [
|
|
14641
14610
|
vote.user && /* @__PURE__ */ jsx(
|
|
14642
14611
|
Avatar,
|
|
@@ -15551,7 +15520,7 @@ const OptionFieldSet = () => {
|
|
|
15551
15520
|
className: "str-chat__form__input-field__value",
|
|
15552
15521
|
error: !!error,
|
|
15553
15522
|
id: option.id,
|
|
15554
|
-
leading: draggable ? /* @__PURE__ */ jsx(
|
|
15523
|
+
leading: draggable ? /* @__PURE__ */ jsx(IconReorder, { className: "str-chat__drag-handle" }) : void 0,
|
|
15555
15524
|
message: error ? /* @__PURE__ */ jsx("span", { "data-testid": "poll-option-input-field-error", children: knownValidationErrors[error] ?? t("Error") }) : void 0,
|
|
15556
15525
|
onBlur: () => {
|
|
15557
15526
|
pollComposer.handleFieldBlur("options");
|
|
@@ -15590,7 +15559,7 @@ const RemoveOptionButton = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
15590
15559
|
size: "sm",
|
|
15591
15560
|
variant: "secondary",
|
|
15592
15561
|
...props,
|
|
15593
|
-
children: /* @__PURE__ */ jsx(
|
|
15562
|
+
children: /* @__PURE__ */ jsx(IconMinusCircle, {})
|
|
15594
15563
|
}
|
|
15595
15564
|
);
|
|
15596
15565
|
const PollCreationDialogControls = ({
|
|
@@ -15626,7 +15595,7 @@ const PollCreationDialogControls = ({
|
|
|
15626
15595
|
},
|
|
15627
15596
|
type: "submit",
|
|
15628
15597
|
children: [
|
|
15629
|
-
/* @__PURE__ */ jsx(
|
|
15598
|
+
/* @__PURE__ */ jsx(IconSend, {}),
|
|
15630
15599
|
t("Send poll")
|
|
15631
15600
|
]
|
|
15632
15601
|
}
|
|
@@ -15708,12 +15677,12 @@ const AttachmentSelectorContextProvider = ({
|
|
|
15708
15677
|
}) => /* @__PURE__ */ jsx(AttachmentSelectorContext.Provider, { value, children });
|
|
15709
15678
|
const useAttachmentSelectorContext = () => useContext(AttachmentSelectorContext);
|
|
15710
15679
|
const icons = {
|
|
15711
|
-
ban:
|
|
15712
|
-
flag:
|
|
15680
|
+
ban: IconUserRemove,
|
|
15681
|
+
flag: IconFlag,
|
|
15713
15682
|
giphy: IconGiphy,
|
|
15714
15683
|
mute: IconMute,
|
|
15715
|
-
unban:
|
|
15716
|
-
unmute:
|
|
15684
|
+
unban: IconUserAdd,
|
|
15685
|
+
unmute: IconAudio
|
|
15717
15686
|
};
|
|
15718
15687
|
const CommandsMenuClassName = "str-chat__context-menu--commands";
|
|
15719
15688
|
const CommandsSubmenuHeader = () => {
|
|
@@ -15805,7 +15774,7 @@ const AttachmentSelectorMenuInitButtonIcon = ({ className }) => {
|
|
|
15805
15774
|
return /* @__PURE__ */ jsx("span", { className, children: /* @__PURE__ */ jsx(AttachmentSelectorInitiationButtonContents, {}) });
|
|
15806
15775
|
}
|
|
15807
15776
|
return /* @__PURE__ */ jsx(
|
|
15808
|
-
|
|
15777
|
+
IconPlus,
|
|
15809
15778
|
{
|
|
15810
15779
|
className: clsx("str-chat__attachment-selector__menu-button__icon", className)
|
|
15811
15780
|
}
|
|
@@ -15868,7 +15837,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15868
15837
|
{
|
|
15869
15838
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__create-poll-button",
|
|
15870
15839
|
hasSubMenu: hasSubmenu,
|
|
15871
|
-
Icon:
|
|
15840
|
+
Icon: IconCommand,
|
|
15872
15841
|
onClick: () => {
|
|
15873
15842
|
if (!hasSubmenu) return;
|
|
15874
15843
|
openSubmenu({
|
|
@@ -15889,7 +15858,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15889
15858
|
ContextMenuButton,
|
|
15890
15859
|
{
|
|
15891
15860
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__upload-file-button",
|
|
15892
|
-
Icon:
|
|
15861
|
+
Icon: IconAttachment,
|
|
15893
15862
|
onClick: () => {
|
|
15894
15863
|
fileInput?.click();
|
|
15895
15864
|
closeMenu();
|
|
@@ -15905,7 +15874,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15905
15874
|
ContextMenuButton,
|
|
15906
15875
|
{
|
|
15907
15876
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__add-location-button",
|
|
15908
|
-
Icon:
|
|
15877
|
+
Icon: IconLocation,
|
|
15909
15878
|
onClick: () => {
|
|
15910
15879
|
openModalForAction("addLocation");
|
|
15911
15880
|
closeMenu();
|
|
@@ -15921,7 +15890,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15921
15890
|
ContextMenuButton,
|
|
15922
15891
|
{
|
|
15923
15892
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__create-poll-button",
|
|
15924
|
-
Icon:
|
|
15893
|
+
Icon: IconPoll,
|
|
15925
15894
|
onClick: () => {
|
|
15926
15895
|
openModalForAction("createPoll");
|
|
15927
15896
|
closeMenu();
|
|
@@ -16254,7 +16223,7 @@ const FileAttachmentPreview = ({
|
|
|
16254
16223
|
uploadState === "uploading" && /* @__PURE__ */ jsx(LoadingIndicatorIcon, {}),
|
|
16255
16224
|
!hasError && /* @__PURE__ */ jsx(FileSizeIndicator, { fileSize: attachment.file_size }),
|
|
16256
16225
|
hasFatalError && /* @__PURE__ */ jsxs("div", { className: "str-chat__attachment-preview-file__fatal-error", children: [
|
|
16257
|
-
/* @__PURE__ */ jsx(
|
|
16226
|
+
/* @__PURE__ */ jsx(IconExclamationMark, {}),
|
|
16258
16227
|
/* @__PURE__ */ jsx("span", { children: hasSizeLimitError ? t("File too large") : uploadState === "blocked" ? t("Upload blocked") : t("Upload failed") })
|
|
16259
16228
|
] }),
|
|
16260
16229
|
hasRetriableError && /* @__PURE__ */ jsxs("div", { className: "str-chat__attachment-preview-file__retriable-error", children: [
|
|
@@ -16810,7 +16779,7 @@ const AudioAttachmentPreview = ({
|
|
|
16810
16779
|
}
|
|
16811
16780
|
)
|
|
16812
16781
|
] }) : hasFatalError ? /* @__PURE__ */ jsxs("div", { className: "str-chat__attachment-preview-file__fatal-error", children: [
|
|
16813
|
-
/* @__PURE__ */ jsx(
|
|
16782
|
+
/* @__PURE__ */ jsx(IconExclamationMark, {}),
|
|
16814
16783
|
/* @__PURE__ */ jsx("span", { children: hasSizeLimitError ? t("File too large") : uploadState === "blocked" ? t("Upload blocked") : t("Upload failed") })
|
|
16815
16784
|
] }) : /* @__PURE__ */ jsxs("div", { className: "str-chat__attachment-preview-file__retriable-error", children: [
|
|
16816
16785
|
/* @__PURE__ */ jsx(IconExclamationTriangle, {}),
|
|
@@ -16909,10 +16878,10 @@ const MediaAttachmentPreview = ({
|
|
|
16909
16878
|
/* @__PURE__ */ jsxs("div", { className: clsx("str-chat__attachment-preview-media__overlay"), children: [
|
|
16910
16879
|
isUploading && /* @__PURE__ */ jsx(LoadingIndicator2, {}),
|
|
16911
16880
|
isVideoAttachment(attachment) && !hasUploadError && uploadState !== "uploading" && /* @__PURE__ */ jsxs("div", { className: "str-chat__attachment-preview-media__video-indicator", children: [
|
|
16912
|
-
/* @__PURE__ */ jsx(
|
|
16881
|
+
/* @__PURE__ */ jsx(IconVideoFill, {}),
|
|
16913
16882
|
attachment.duration && /* @__PURE__ */ jsx("div", { children: attachment.duration })
|
|
16914
16883
|
] }),
|
|
16915
|
-
hasFatalError && /* @__PURE__ */ jsx(
|
|
16884
|
+
hasFatalError && /* @__PURE__ */ jsx(IconExclamationMark, {}),
|
|
16916
16885
|
hasRetriableError && /* @__PURE__ */ jsx(
|
|
16917
16886
|
Button,
|
|
16918
16887
|
{
|
|
@@ -16924,7 +16893,7 @@ const MediaAttachmentPreview = ({
|
|
|
16924
16893
|
onClick: retry,
|
|
16925
16894
|
size: "sm",
|
|
16926
16895
|
variant: "danger",
|
|
16927
|
-
children: /* @__PURE__ */ jsx(
|
|
16896
|
+
children: /* @__PURE__ */ jsx(IconRetry, {})
|
|
16928
16897
|
}
|
|
16929
16898
|
)
|
|
16930
16899
|
] })
|
|
@@ -16995,7 +16964,7 @@ const GalleryHeader = ({ currentItem }) => {
|
|
|
16995
16964
|
className: "str-chat__gallery__action-button str-chat__gallery__action-button--close",
|
|
16996
16965
|
onClick: modalContext.close,
|
|
16997
16966
|
title: t("Close"),
|
|
16998
|
-
children: /* @__PURE__ */ jsx(
|
|
16967
|
+
children: /* @__PURE__ */ jsx(IconXmark, {})
|
|
16999
16968
|
}
|
|
17000
16969
|
) : null
|
|
17001
16970
|
] })
|
|
@@ -17042,9 +17011,9 @@ const VideoThumbnail = ({
|
|
|
17042
17011
|
onClick: onPlay,
|
|
17043
17012
|
size: "lg",
|
|
17044
17013
|
variant: "secondary",
|
|
17045
|
-
children: /* @__PURE__ */ jsx(
|
|
17014
|
+
children: /* @__PURE__ */ jsx(IconPlayFill, {})
|
|
17046
17015
|
}
|
|
17047
|
-
) : /* @__PURE__ */ jsx("div", { className: "str-chat__message-attachment__video-thumbnail__play-indicator", children: /* @__PURE__ */ jsx(
|
|
17016
|
+
) : /* @__PURE__ */ jsx("div", { className: "str-chat__message-attachment__video-thumbnail__play-indicator", children: /* @__PURE__ */ jsx(IconPlayFill, {}) })
|
|
17048
17017
|
] });
|
|
17049
17018
|
};
|
|
17050
17019
|
const SWIPE_THRESHOLD = 50;
|
|
@@ -17458,7 +17427,7 @@ const CommandChip = ({ command }) => {
|
|
|
17458
17427
|
const { textareaRef } = useMessageComposerContext();
|
|
17459
17428
|
if (!command) return null;
|
|
17460
17429
|
return /* @__PURE__ */ jsxs("div", { className: "str-chat__command-chip", children: [
|
|
17461
|
-
/* @__PURE__ */ jsx(
|
|
17430
|
+
/* @__PURE__ */ jsx(IconBolt, {}),
|
|
17462
17431
|
/* @__PURE__ */ jsx("span", { children: command.name }),
|
|
17463
17432
|
/* @__PURE__ */ jsx(
|
|
17464
17433
|
"button",
|
|
@@ -17468,7 +17437,7 @@ const CommandChip = ({ command }) => {
|
|
|
17468
17437
|
textComposer.setCommand(null);
|
|
17469
17438
|
textareaRef.current?.focus();
|
|
17470
17439
|
},
|
|
17471
|
-
children: /* @__PURE__ */ jsx(
|
|
17440
|
+
children: /* @__PURE__ */ jsx(IconXmark, {})
|
|
17472
17441
|
}
|
|
17473
17442
|
)
|
|
17474
17443
|
] });
|
|
@@ -17533,7 +17502,7 @@ const LinkPreviewCard = ({ linkPreview }) => {
|
|
|
17533
17502
|
/* @__PURE__ */ jsx("div", { className: "str-chat__link-preview-card__content-title", children: linkPreview.title }),
|
|
17534
17503
|
/* @__PURE__ */ jsx("div", { className: "str-chat__link-preview-card__content-description", children: linkPreview.text }),
|
|
17535
17504
|
/* @__PURE__ */ jsxs("div", { className: "str-chat__link-preview-card__content__url", children: [
|
|
17536
|
-
/* @__PURE__ */ jsx(
|
|
17505
|
+
/* @__PURE__ */ jsx(IconLink, {}),
|
|
17537
17506
|
/* @__PURE__ */ jsx("span", { children: linkPreview.og_scrape_url })
|
|
17538
17507
|
] })
|
|
17539
17508
|
] }),
|
|
@@ -17611,7 +17580,7 @@ const AudioRecordingPlayback = ({
|
|
|
17611
17580
|
onClick: audioPlayer.togglePlay,
|
|
17612
17581
|
size: "sm",
|
|
17613
17582
|
variant: "secondary",
|
|
17614
|
-
children: isPlaying ? /* @__PURE__ */ jsx(
|
|
17583
|
+
children: isPlaying ? /* @__PURE__ */ jsx(IconPauseFill, {}) : /* @__PURE__ */ jsx(IconPlayFill, {})
|
|
17615
17584
|
}
|
|
17616
17585
|
),
|
|
17617
17586
|
/* @__PURE__ */ jsx(
|
|
@@ -17729,7 +17698,7 @@ const AudioRecordingPreview = () => {
|
|
|
17729
17698
|
};
|
|
17730
17699
|
}, [recorder, startCounter, stopCounter]);
|
|
17731
17700
|
return /* @__PURE__ */ jsxs("div", { className: "str-chat__audio-recorder__recording-preview", children: [
|
|
17732
|
-
/* @__PURE__ */ jsx(
|
|
17701
|
+
/* @__PURE__ */ jsx(IconVoice, {}),
|
|
17733
17702
|
/* @__PURE__ */ jsx(RecordingTimer, { durationSeconds: secondsElapsed }),
|
|
17734
17703
|
/* @__PURE__ */ jsx(AudioRecordingWaveform, {})
|
|
17735
17704
|
] });
|
|
@@ -17749,7 +17718,7 @@ const ToggleRecordingButton = () => {
|
|
|
17749
17718
|
onClick: () => isRecording(recordingState) ? recorder?.pause() : recorder?.resume(),
|
|
17750
17719
|
size: "sm",
|
|
17751
17720
|
variant: "secondary",
|
|
17752
|
-
children: isRecording(recordingState) ? /* @__PURE__ */ jsx(
|
|
17721
|
+
children: isRecording(recordingState) ? /* @__PURE__ */ jsx(IconPauseFill, {}) : /* @__PURE__ */ jsx(IconVoice, {})
|
|
17753
17722
|
}
|
|
17754
17723
|
);
|
|
17755
17724
|
};
|
|
@@ -17784,7 +17753,7 @@ const AudioRecorderRecordingControls = () => {
|
|
|
17784
17753
|
},
|
|
17785
17754
|
size: "sm",
|
|
17786
17755
|
variant: "secondary",
|
|
17787
|
-
children: /* @__PURE__ */ jsx(
|
|
17756
|
+
children: /* @__PURE__ */ jsx(IconDelete, {})
|
|
17788
17757
|
}
|
|
17789
17758
|
),
|
|
17790
17759
|
/* @__PURE__ */ jsx(ToggleRecordingButton, {}),
|
|
@@ -17881,7 +17850,7 @@ const DefaultStartRecordingAudioButton = forwardRef(function StartRecordingAudio
|
|
|
17881
17850
|
variant: "secondary",
|
|
17882
17851
|
...props,
|
|
17883
17852
|
ref,
|
|
17884
|
-
children: /* @__PURE__ */ jsx(
|
|
17853
|
+
children: /* @__PURE__ */ jsx(IconVoice, {})
|
|
17885
17854
|
}
|
|
17886
17855
|
);
|
|
17887
17856
|
});
|
|
@@ -17922,7 +17891,7 @@ const SendToChannelCheckbox = () => {
|
|
|
17922
17891
|
type: "checkbox"
|
|
17923
17892
|
}
|
|
17924
17893
|
),
|
|
17925
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "str-chat__send-to-channel-checkbox__visual", children: /* @__PURE__ */ jsx("span", { className: "str-chat__send-to-channel-checkbox__checkmark", children: /* @__PURE__ */ jsx(
|
|
17894
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "str-chat__send-to-channel-checkbox__visual", children: /* @__PURE__ */ jsx("span", { className: "str-chat__send-to-channel-checkbox__checkmark", children: /* @__PURE__ */ jsx(IconCheckmark, {}) }) }),
|
|
17926
17895
|
/* @__PURE__ */ jsx("span", { className: "str-chat__send-to-channel-checkbox__label", children: labelText })
|
|
17927
17896
|
]
|
|
17928
17897
|
}
|
|
@@ -18582,7 +18551,7 @@ const FileDragAndDropContent = ({
|
|
|
18582
18551
|
}) => {
|
|
18583
18552
|
const { t } = useTranslationContext();
|
|
18584
18553
|
return /* @__PURE__ */ jsx("div", { className: "str-chat__dropzone-container__content", children: isDragRejected ? /* @__PURE__ */ jsx("p", { children: t("Some of the files will not be accepted") }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18585
|
-
/* @__PURE__ */ jsx(
|
|
18554
|
+
/* @__PURE__ */ jsx(IconUpload, {}),
|
|
18586
18555
|
/* @__PURE__ */ jsx("p", { children: t("Drag your files here") })
|
|
18587
18556
|
] }) });
|
|
18588
18557
|
};
|
|
@@ -18618,7 +18587,7 @@ const SendButton = ({ children, sendMessage, ...rest }) => {
|
|
|
18618
18587
|
size: "sm",
|
|
18619
18588
|
variant: "primary",
|
|
18620
18589
|
...rest,
|
|
18621
|
-
children: children ?? /* @__PURE__ */ jsx(
|
|
18590
|
+
children: children ?? /* @__PURE__ */ jsx(IconSend, {})
|
|
18622
18591
|
}
|
|
18623
18592
|
);
|
|
18624
18593
|
};
|
|
@@ -18654,7 +18623,7 @@ const MessageComposerActions = () => {
|
|
|
18654
18623
|
const stopGenerating = useCallback(() => channel?.stopAIResponse(), [channel]);
|
|
18655
18624
|
const shouldDisplayStopAIGeneration = [AIStates.Thinking, AIStates.Generating].includes(aiState) && !!StopAIGenerationButton$1;
|
|
18656
18625
|
const recordingEnabled = !!(recordingController.recorder && navigator.mediaDevices);
|
|
18657
|
-
let content = SendButton$1 ? /* @__PURE__ */ jsx(SendButton$1, { sendMessage: handleSubmit }) : /* @__PURE__ */ jsx(SendButton, { sendMessage: handleSubmit, children: editedMessage || command ? /* @__PURE__ */ jsx(
|
|
18626
|
+
let content = SendButton$1 ? /* @__PURE__ */ jsx(SendButton$1, { sendMessage: handleSubmit }) : /* @__PURE__ */ jsx(SendButton, { sendMessage: handleSubmit, children: editedMessage || command ? /* @__PURE__ */ jsx(IconCheckmark, {}) : /* @__PURE__ */ jsx(IconSend, {}) });
|
|
18658
18627
|
if (shouldDisplayStopAIGeneration) {
|
|
18659
18628
|
content = /* @__PURE__ */ jsx(StopAIGenerationButton$1, { onClick: stopGenerating });
|
|
18660
18629
|
} else if (hideSendButton) return null;
|
|
@@ -18670,7 +18639,7 @@ const AdditionalMessageComposerActions = () => {
|
|
|
18670
18639
|
const isCooldownActive = useIsCooldownActive();
|
|
18671
18640
|
return /* @__PURE__ */ jsx("div", { className: "str-chat__message-composer__additional-actions", children: !isCooldownActive && EmojiPicker ? /* @__PURE__ */ jsx(EmojiPicker, {}) : null });
|
|
18672
18641
|
};
|
|
18673
|
-
const GeolocationPreviewImage = () => /* @__PURE__ */ jsx("div", { className: "str-chat__location-preview-image", children: /* @__PURE__ */ jsx(
|
|
18642
|
+
const GeolocationPreviewImage = () => /* @__PURE__ */ jsx("div", { className: "str-chat__location-preview-image", children: /* @__PURE__ */ jsx(IconLocation, {}) });
|
|
18674
18643
|
const GeolocationPreview = ({
|
|
18675
18644
|
location,
|
|
18676
18645
|
PreviewImage = GeolocationPreviewImage,
|
|
@@ -18763,7 +18732,7 @@ const MessageComposerPreviews = () => {
|
|
|
18763
18732
|
{
|
|
18764
18733
|
message: editedMessage,
|
|
18765
18734
|
onCancel: () => {
|
|
18766
|
-
messageComposer
|
|
18735
|
+
restorePreEditSnapshot(messageComposer);
|
|
18767
18736
|
}
|
|
18768
18737
|
}
|
|
18769
18738
|
) }) : /* @__PURE__ */ jsx(QuotedMessagePreview$1, {}),
|
|
@@ -19206,7 +19175,7 @@ const useChat = ({
|
|
|
19206
19175
|
};
|
|
19207
19176
|
useEffect(() => {
|
|
19208
19177
|
if (!client) return;
|
|
19209
|
-
const version = "14.0.0-beta.
|
|
19178
|
+
const version = "14.0.0-beta.5";
|
|
19210
19179
|
const userAgent = client.getUserAgent();
|
|
19211
19180
|
if (!userAgent.includes("stream-chat-react")) {
|
|
19212
19181
|
client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
|
|
@@ -19340,7 +19309,7 @@ const ThreadHeaderSubtitle = ({
|
|
|
19340
19309
|
) });
|
|
19341
19310
|
};
|
|
19342
19311
|
const ThreadHeader = (props) => {
|
|
19343
|
-
const { closeThread, MenuIcon =
|
|
19312
|
+
const { closeThread, MenuIcon = IconSidebar, overrideTitle, thread } = props;
|
|
19344
19313
|
const { t } = useTranslationContext();
|
|
19345
19314
|
const { channel } = useChannelStateContext();
|
|
19346
19315
|
const { activeChatView } = useChatViewContext();
|
|
@@ -19350,7 +19319,7 @@ const ThreadHeader = (props) => {
|
|
|
19350
19319
|
const replyCount = threadInstance ? replyCountThreadInstance : thread ? thread.reply_count ?? 0 : 0;
|
|
19351
19320
|
const threadDisplayName = overrideTitle ?? channelDisplayTitle ?? displayNameFromParentMessage(thread) ?? void 0;
|
|
19352
19321
|
return /* @__PURE__ */ jsxs("div", { className: "str-chat__thread-header", children: [
|
|
19353
|
-
activeChatView === "threads" && /* @__PURE__ */ jsx(ToggleSidebarButton, { canCollapse: !!threadInstance, mode: "expand", children: /* @__PURE__ */ jsx(MenuIcon, {}) }),
|
|
19322
|
+
/* @__PURE__ */ jsx("div", { className: "str-chat__thread-header__start", children: activeChatView === "threads" && /* @__PURE__ */ jsx(ToggleSidebarButton, { canCollapse: !!threadInstance, mode: "expand", children: /* @__PURE__ */ jsx(MenuIcon, {}) }) }),
|
|
19354
19323
|
/* @__PURE__ */ jsxs("div", { className: "str-chat__thread-header-details", children: [
|
|
19355
19324
|
/* @__PURE__ */ jsx("div", { className: "str-chat__thread-header-title", children: t("Thread") }),
|
|
19356
19325
|
/* @__PURE__ */ jsx(
|
|
@@ -19362,7 +19331,7 @@ const ThreadHeader = (props) => {
|
|
|
19362
19331
|
}
|
|
19363
19332
|
)
|
|
19364
19333
|
] }),
|
|
19365
|
-
!threadInstance && /* @__PURE__ */ jsx(
|
|
19334
|
+
/* @__PURE__ */ jsx("div", { className: "str-chat__thread-header__end", children: !threadInstance && /* @__PURE__ */ jsx(
|
|
19366
19335
|
Button,
|
|
19367
19336
|
{
|
|
19368
19337
|
appearance: "ghost",
|
|
@@ -19373,9 +19342,9 @@ const ThreadHeader = (props) => {
|
|
|
19373
19342
|
onClick: closeThread,
|
|
19374
19343
|
size: "md",
|
|
19375
19344
|
variant: "secondary",
|
|
19376
|
-
children: /* @__PURE__ */ jsx(
|
|
19345
|
+
children: /* @__PURE__ */ jsx(IconXmark, {})
|
|
19377
19346
|
}
|
|
19378
|
-
)
|
|
19347
|
+
) })
|
|
19379
19348
|
] });
|
|
19380
19349
|
};
|
|
19381
19350
|
const threadStateSelector = ({ replyCount }) => ({
|
|
@@ -19681,7 +19650,7 @@ const ReactionSelector = (props) => {
|
|
|
19681
19650
|
onClick: () => setExtendedListOpen(true),
|
|
19682
19651
|
size: "sm",
|
|
19683
19652
|
variant: "secondary",
|
|
19684
|
-
children: /* @__PURE__ */ jsx(
|
|
19653
|
+
children: /* @__PURE__ */ jsx(IconPlus, {})
|
|
19685
19654
|
}
|
|
19686
19655
|
)
|
|
19687
19656
|
] }),
|
|
@@ -19862,7 +19831,7 @@ const DefaultMessageActionComponents = {
|
|
|
19862
19831
|
"aria-label": t("aria/Open Thread"),
|
|
19863
19832
|
className: msgActionsBoxButtonClassName,
|
|
19864
19833
|
"data-testid": "thread-action",
|
|
19865
|
-
Icon:
|
|
19834
|
+
Icon: IconThread,
|
|
19866
19835
|
onClick: (e) => {
|
|
19867
19836
|
handleOpenThread(e);
|
|
19868
19837
|
closeMenu();
|
|
@@ -19889,7 +19858,7 @@ const DefaultMessageActionComponents = {
|
|
|
19889
19858
|
{
|
|
19890
19859
|
"aria-label": t("aria/Quote Message"),
|
|
19891
19860
|
className: msgActionsBoxButtonClassName,
|
|
19892
|
-
Icon:
|
|
19861
|
+
Icon: IconQuote,
|
|
19893
19862
|
onClick: () => {
|
|
19894
19863
|
handleQuote();
|
|
19895
19864
|
closeMenu();
|
|
@@ -19926,7 +19895,7 @@ const DefaultMessageActionComponents = {
|
|
|
19926
19895
|
{
|
|
19927
19896
|
"aria-label": t("aria/Copy Message Text"),
|
|
19928
19897
|
className: msgActionsBoxButtonClassName,
|
|
19929
|
-
Icon:
|
|
19898
|
+
Icon: IconCopy,
|
|
19930
19899
|
onClick: () => {
|
|
19931
19900
|
if (message.text) navigator.clipboard.writeText(message.text);
|
|
19932
19901
|
closeMenu();
|
|
@@ -19944,7 +19913,7 @@ const DefaultMessageActionComponents = {
|
|
|
19944
19913
|
{
|
|
19945
19914
|
"aria-label": t("aria/Resend Message"),
|
|
19946
19915
|
className: msgActionsBoxButtonClassName,
|
|
19947
|
-
Icon:
|
|
19916
|
+
Icon: IconRetry,
|
|
19948
19917
|
onClick: () => {
|
|
19949
19918
|
handleRetry(message);
|
|
19950
19919
|
closeMenu();
|
|
@@ -19963,8 +19932,9 @@ const DefaultMessageActionComponents = {
|
|
|
19963
19932
|
{
|
|
19964
19933
|
"aria-label": t("aria/Edit Message"),
|
|
19965
19934
|
className: msgActionsBoxButtonClassName,
|
|
19966
|
-
Icon:
|
|
19935
|
+
Icon: IconEdit,
|
|
19967
19936
|
onClick: () => {
|
|
19937
|
+
savePreEditSnapshot(messageComposer);
|
|
19968
19938
|
messageComposer.initState({ composition: message });
|
|
19969
19939
|
closeMenu();
|
|
19970
19940
|
},
|
|
@@ -19981,7 +19951,7 @@ const DefaultMessageActionComponents = {
|
|
|
19981
19951
|
{
|
|
19982
19952
|
"aria-label": t("aria/Mark Message Unread"),
|
|
19983
19953
|
className: msgActionsBoxButtonClassName,
|
|
19984
|
-
Icon:
|
|
19954
|
+
Icon: IconNotification,
|
|
19985
19955
|
onClick: (event) => {
|
|
19986
19956
|
handleMarkUnread(event);
|
|
19987
19957
|
closeMenu();
|
|
@@ -20004,7 +19974,7 @@ const DefaultMessageActionComponents = {
|
|
|
20004
19974
|
"aria-label": reminder ? t("aria/Remind Me Message") : t("aria/Remove Reminder"),
|
|
20005
19975
|
className: msgActionsBoxButtonClassName,
|
|
20006
19976
|
hasSubMenu: !reminder,
|
|
20007
|
-
Icon: reminder ? IconBellOff :
|
|
19977
|
+
Icon: reminder ? IconBellOff : IconBell,
|
|
20008
19978
|
onClick: () => {
|
|
20009
19979
|
if (reminder) {
|
|
20010
19980
|
client.reminders.deleteReminder(reminder.id);
|
|
@@ -20033,7 +20003,7 @@ const DefaultMessageActionComponents = {
|
|
|
20033
20003
|
{
|
|
20034
20004
|
"aria-label": reminder ? t("aria/Remove Save For Later") : t("aria/Bookmark Message"),
|
|
20035
20005
|
className: msgActionsBoxButtonClassName,
|
|
20036
|
-
Icon: reminder ?
|
|
20006
|
+
Icon: reminder ? IconUnsave : IconSave,
|
|
20037
20007
|
onClick: () => {
|
|
20038
20008
|
if (reminder) client.reminders.deleteReminder(reminder.id);
|
|
20039
20009
|
else client.reminders.createReminder({ messageId: message.id });
|
|
@@ -20052,7 +20022,7 @@ const DefaultMessageActionComponents = {
|
|
|
20052
20022
|
{
|
|
20053
20023
|
"aria-label": t("aria/Flag Message"),
|
|
20054
20024
|
className: msgActionsBoxButtonClassName,
|
|
20055
|
-
Icon:
|
|
20025
|
+
Icon: IconFlag,
|
|
20056
20026
|
onClick: (event) => {
|
|
20057
20027
|
handleFlag(event);
|
|
20058
20028
|
closeMenu();
|
|
@@ -20072,7 +20042,7 @@ const DefaultMessageActionComponents = {
|
|
|
20072
20042
|
{
|
|
20073
20043
|
"aria-label": isMuted ? t("aria/Unmute User") : t("aria/Mute User"),
|
|
20074
20044
|
className: msgActionsBoxButtonClassName,
|
|
20075
|
-
Icon: isMuted ?
|
|
20045
|
+
Icon: isMuted ? IconAudio : IconMute,
|
|
20076
20046
|
onClick: (event) => {
|
|
20077
20047
|
handleMute(event);
|
|
20078
20048
|
closeMenu();
|
|
@@ -20095,7 +20065,7 @@ const DefaultMessageActionComponents = {
|
|
|
20095
20065
|
{
|
|
20096
20066
|
"aria-label": t("aria/Delete Message"),
|
|
20097
20067
|
className: msgActionsBoxButtonClassName,
|
|
20098
|
-
Icon:
|
|
20068
|
+
Icon: IconDelete,
|
|
20099
20069
|
onClick: () => {
|
|
20100
20070
|
setOpenModal(true);
|
|
20101
20071
|
},
|
|
@@ -20141,7 +20111,7 @@ const DefaultMessageActionComponents = {
|
|
|
20141
20111
|
{
|
|
20142
20112
|
"aria-label": isBlocked ? t("aria/Unblock User") : t("aria/Block User"),
|
|
20143
20113
|
className: clsx(msgActionsBoxButtonClassName),
|
|
20144
|
-
Icon: isBlocked ?
|
|
20114
|
+
Icon: isBlocked ? IconUserCheck : IconNoSign,
|
|
20145
20115
|
onClick: () => {
|
|
20146
20116
|
const targetId = message.user?.id;
|
|
20147
20117
|
if (targetId) {
|
|
@@ -20178,12 +20148,12 @@ const DefaultMessageActionComponents = {
|
|
|
20178
20148
|
dialog?.toggle();
|
|
20179
20149
|
},
|
|
20180
20150
|
ref,
|
|
20181
|
-
children: /* @__PURE__ */ jsx(
|
|
20151
|
+
children: /* @__PURE__ */ jsx(IconMore, { className: "str-chat__message-action-icon" })
|
|
20182
20152
|
}
|
|
20183
20153
|
);
|
|
20184
20154
|
}),
|
|
20185
20155
|
React() {
|
|
20186
|
-
return /* @__PURE__ */ jsx(ReactionSelectorWithButton, { ReactionIcon:
|
|
20156
|
+
return /* @__PURE__ */ jsx(ReactionSelectorWithButton, { ReactionIcon: IconEmoji });
|
|
20187
20157
|
},
|
|
20188
20158
|
Reply() {
|
|
20189
20159
|
const { handleOpenThread } = useMessageContext();
|
|
@@ -20195,7 +20165,7 @@ const DefaultMessageActionComponents = {
|
|
|
20195
20165
|
className: "str-chat__message-reply-in-thread-button",
|
|
20196
20166
|
"data-testid": "thread-action",
|
|
20197
20167
|
onClick: handleOpenThread,
|
|
20198
|
-
children: /* @__PURE__ */ jsx(
|
|
20168
|
+
children: /* @__PURE__ */ jsx(IconReply, { className: "str-chat__message-action-icon" })
|
|
20199
20169
|
}
|
|
20200
20170
|
);
|
|
20201
20171
|
}
|
|
@@ -20340,9 +20310,9 @@ function MessageReactionsDetail({
|
|
|
20340
20310
|
handleFetchReactions,
|
|
20341
20311
|
onSelectedReactionTypeChange,
|
|
20342
20312
|
reactionDetailsSort: propReactionDetailsSort,
|
|
20313
|
+
reactionGroups,
|
|
20343
20314
|
reactions,
|
|
20344
20315
|
selectedReactionType,
|
|
20345
|
-
sortReactionDetails: propSortReactionDetails,
|
|
20346
20316
|
totalReactionCount
|
|
20347
20317
|
}) {
|
|
20348
20318
|
const { client } = useChatContext();
|
|
@@ -20354,10 +20324,8 @@ function MessageReactionsDetail({
|
|
|
20354
20324
|
const { t } = useTranslationContext();
|
|
20355
20325
|
const {
|
|
20356
20326
|
handleReaction: contextHandleReaction,
|
|
20357
|
-
reactionDetailsSort: contextReactionDetailsSort
|
|
20358
|
-
sortReactionDetails: contextSortReactionDetails
|
|
20327
|
+
reactionDetailsSort: contextReactionDetailsSort
|
|
20359
20328
|
} = useMessageContext(MessageReactionsDetail.name);
|
|
20360
|
-
const legacySortReactionDetails = propSortReactionDetails ?? contextSortReactionDetails;
|
|
20361
20329
|
const reactionDetailsSort = propReactionDetailsSort ?? contextReactionDetailsSort ?? defaultReactionDetailsSort;
|
|
20362
20330
|
const {
|
|
20363
20331
|
isLoading: areReactionsLoading,
|
|
@@ -20369,10 +20337,6 @@ function MessageReactionsDetail({
|
|
|
20369
20337
|
shouldFetch: true,
|
|
20370
20338
|
sort: reactionDetailsSort
|
|
20371
20339
|
});
|
|
20372
|
-
const reactionDetailsWithLegacyFallback = useMemo(
|
|
20373
|
-
() => legacySortReactionDetails ? [...reactionDetails].sort(legacySortReactionDetails) : reactionDetails,
|
|
20374
|
-
[legacySortReactionDetails, reactionDetails]
|
|
20375
|
-
);
|
|
20376
20340
|
return /* @__PURE__ */ jsxs(
|
|
20377
20341
|
"div",
|
|
20378
20342
|
{
|
|
@@ -20417,7 +20381,7 @@ function MessageReactionsDetail({
|
|
|
20417
20381
|
"data-testid": "all-reacting-users",
|
|
20418
20382
|
children: [
|
|
20419
20383
|
areReactionsLoading && /* @__PURE__ */ jsx(LoadingIndicator2, {}),
|
|
20420
|
-
!areReactionsLoading && /* @__PURE__ */ jsx(Fragment, { children:
|
|
20384
|
+
!areReactionsLoading && /* @__PURE__ */ jsx(Fragment, { children: reactionDetails.map(({ type, user }) => {
|
|
20421
20385
|
const belongsToCurrentUser = client.user?.id === user?.id;
|
|
20422
20386
|
const EmojiComponent = Array.isArray(reactionOptions) ? void 0 : reactionOptions.quick[type]?.Component ?? reactionOptions.extended?.[type]?.Component;
|
|
20423
20387
|
return /* @__PURE__ */ jsxs(
|
|
@@ -20450,8 +20414,13 @@ function MessageReactionsDetail({
|
|
|
20450
20414
|
className: "str-chat__message-reactions-detail__user-list-item-button",
|
|
20451
20415
|
"data-testid": "remove-reaction-button",
|
|
20452
20416
|
onClick: async (e) => {
|
|
20417
|
+
const reactionCountBeforeRemoval = reactionGroups?.[type]?.count ?? 0;
|
|
20453
20418
|
await contextHandleReaction(type, e);
|
|
20454
|
-
|
|
20419
|
+
if (reactionCountBeforeRemoval <= 1) {
|
|
20420
|
+
onSelectedReactionTypeChange?.(null);
|
|
20421
|
+
} else {
|
|
20422
|
+
refetch();
|
|
20423
|
+
}
|
|
20455
20424
|
},
|
|
20456
20425
|
children: t("Tap to remove")
|
|
20457
20426
|
}
|
|
@@ -20480,17 +20449,15 @@ const useProcessReactions = (params) => {
|
|
|
20480
20449
|
const {
|
|
20481
20450
|
own_reactions: propOwnReactions,
|
|
20482
20451
|
reaction_groups: propReactionGroups,
|
|
20483
|
-
reactionOptions: propReactionOptions,
|
|
20484
20452
|
reactions: propReactions,
|
|
20485
20453
|
sortReactions: propSortReactions
|
|
20486
20454
|
} = params;
|
|
20487
20455
|
const { message, sortReactions: contextSortReactions } = useMessageContext();
|
|
20488
|
-
const { reactionOptions
|
|
20489
|
-
const reactionOptions = propReactionOptions ?? contextReactionOptions;
|
|
20456
|
+
const { reactionOptions = defaultReactionOptions } = useComponentContext();
|
|
20490
20457
|
const sortReactions = propSortReactions ?? contextSortReactions ?? defaultReactionsSort;
|
|
20491
|
-
const latestReactions = propReactions
|
|
20492
|
-
const ownReactions = propOwnReactions
|
|
20493
|
-
const reactionGroups = propReactionGroups
|
|
20458
|
+
const latestReactions = propReactions ?? message.latest_reactions;
|
|
20459
|
+
const ownReactions = propOwnReactions ?? message?.own_reactions;
|
|
20460
|
+
const reactionGroups = propReactionGroups ?? message?.reaction_groups ?? void 0;
|
|
20494
20461
|
const isOwnReaction = useCallback(
|
|
20495
20462
|
(reactionType) => ownReactions?.some((reaction) => reaction.type === reactionType) ?? false,
|
|
20496
20463
|
[ownReactions]
|
|
@@ -20574,6 +20541,7 @@ const useProcessReactions = (params) => {
|
|
|
20574
20541
|
return {
|
|
20575
20542
|
existingReactions,
|
|
20576
20543
|
hasReactions,
|
|
20544
|
+
reactionGroups,
|
|
20577
20545
|
totalReactionCount,
|
|
20578
20546
|
uniqueReactionTypeCount
|
|
20579
20547
|
};
|
|
@@ -20590,16 +20558,22 @@ const FragmentOrButton = ({
|
|
|
20590
20558
|
};
|
|
20591
20559
|
const UnMemoizedMessageReactions = (props) => {
|
|
20592
20560
|
const {
|
|
20561
|
+
capLimit: { clustered: capLimitClustered = 5, segmented: capLimitSegmented = 4 } = {},
|
|
20593
20562
|
flipHorizontalPosition = false,
|
|
20594
20563
|
handleFetchReactions,
|
|
20595
20564
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20596
20565
|
reactionDetailsSort,
|
|
20597
|
-
sortReactionDetails,
|
|
20598
20566
|
verticalPosition = "top",
|
|
20599
20567
|
visualStyle = "clustered",
|
|
20600
20568
|
...rest
|
|
20601
20569
|
} = props;
|
|
20602
|
-
const {
|
|
20570
|
+
const {
|
|
20571
|
+
existingReactions,
|
|
20572
|
+
hasReactions,
|
|
20573
|
+
reactionGroups,
|
|
20574
|
+
totalReactionCount,
|
|
20575
|
+
uniqueReactionTypeCount
|
|
20576
|
+
} = useProcessReactions(rest);
|
|
20603
20577
|
const [selectedReactionType, setSelectedReactionType] = useState(
|
|
20604
20578
|
null
|
|
20605
20579
|
);
|
|
@@ -20618,16 +20592,27 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20618
20592
|
dialog.open();
|
|
20619
20593
|
};
|
|
20620
20594
|
const cappedExistingReactions = useMemo(() => {
|
|
20621
|
-
if (visualStyle
|
|
20622
|
-
const
|
|
20595
|
+
if (visualStyle === "segmented" && verticalPosition !== "top") return null;
|
|
20596
|
+
const capLimit = visualStyle === "segmented" ? capLimitSegmented : capLimitClustered;
|
|
20597
|
+
const sliced = existingReactions.slice(0, capLimit);
|
|
20623
20598
|
return {
|
|
20599
|
+
/**
|
|
20600
|
+
* Accumulated reaction count of capped reaction types, first four in case of
|
|
20601
|
+
* segmented(top) and first five in case of clustered(top/bottom) variations.
|
|
20602
|
+
*/
|
|
20624
20603
|
reactionCountToDisplay: sliced.reduce(
|
|
20625
20604
|
(accumulatedCount, { reactionCount }) => accumulatedCount + reactionCount,
|
|
20626
20605
|
0
|
|
20627
20606
|
),
|
|
20628
20607
|
reactionsToDisplay: sliced
|
|
20629
20608
|
};
|
|
20630
|
-
}, [
|
|
20609
|
+
}, [
|
|
20610
|
+
capLimitClustered,
|
|
20611
|
+
capLimitSegmented,
|
|
20612
|
+
existingReactions,
|
|
20613
|
+
verticalPosition,
|
|
20614
|
+
visualStyle
|
|
20615
|
+
]);
|
|
20631
20616
|
if (!hasReactions) return null;
|
|
20632
20617
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20633
20618
|
/* @__PURE__ */ jsx(
|
|
@@ -20648,7 +20633,7 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20648
20633
|
"aria-pressed": isDialogOpen,
|
|
20649
20634
|
buttonIf: visualStyle === "clustered",
|
|
20650
20635
|
className: "str-chat__message-reactions__list-button",
|
|
20651
|
-
onClick: () => handleReactionButtonClick(
|
|
20636
|
+
onClick: () => handleReactionButtonClick(null),
|
|
20652
20637
|
children: [
|
|
20653
20638
|
/* @__PURE__ */ jsxs("ul", { className: "str-chat__message-reactions__list", children: [
|
|
20654
20639
|
(cappedExistingReactions?.reactionsToDisplay ?? existingReactions).map(
|
|
@@ -20679,7 +20664,7 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20679
20664
|
reactionType
|
|
20680
20665
|
)
|
|
20681
20666
|
),
|
|
20682
|
-
uniqueReactionTypeCount > 4 && cappedExistingReactions && /* @__PURE__ */ jsx("li", { className: "str-chat__message-reactions__list-item str-chat__message-reactions__list-item--more", children: /* @__PURE__ */ jsx(
|
|
20667
|
+
uniqueReactionTypeCount > 4 && cappedExistingReactions && visualStyle === "segmented" && /* @__PURE__ */ jsx("li", { className: "str-chat__message-reactions__list-item str-chat__message-reactions__list-item--more", children: /* @__PURE__ */ jsx(
|
|
20683
20668
|
"button",
|
|
20684
20669
|
{
|
|
20685
20670
|
className: "str-chat__message-reactions__list-item-button",
|
|
@@ -20712,9 +20697,9 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20712
20697
|
{
|
|
20713
20698
|
handleFetchReactions,
|
|
20714
20699
|
onSelectedReactionTypeChange: setSelectedReactionType,
|
|
20700
|
+
reactionGroups,
|
|
20715
20701
|
reactions: existingReactions,
|
|
20716
20702
|
selectedReactionType,
|
|
20717
|
-
sortReactionDetails,
|
|
20718
20703
|
totalReactionCount
|
|
20719
20704
|
}
|
|
20720
20705
|
)
|
|
@@ -21195,7 +21180,6 @@ const Message = (props) => {
|
|
|
21195
21180
|
pinPermissions,
|
|
21196
21181
|
reactionDetailsSort,
|
|
21197
21182
|
retrySendMessage: propRetrySendMessage,
|
|
21198
|
-
sortReactionDetails,
|
|
21199
21183
|
sortReactions
|
|
21200
21184
|
} = props;
|
|
21201
21185
|
const { client } = useChatContext("Message");
|
|
@@ -21289,7 +21273,6 @@ const Message = (props) => {
|
|
|
21289
21273
|
readBy: props.readBy,
|
|
21290
21274
|
renderText: props.renderText,
|
|
21291
21275
|
returnAllReadData: props.returnAllReadData,
|
|
21292
|
-
sortReactionDetails,
|
|
21293
21276
|
sortReactions,
|
|
21294
21277
|
threadList: props.threadList,
|
|
21295
21278
|
unsafeHTML: props.unsafeHTML,
|
|
@@ -22003,7 +21986,7 @@ const UnreadMessagesSeparator = ({
|
|
|
22003
21986
|
onClick: () => markRead(),
|
|
22004
21987
|
size: "sm",
|
|
22005
21988
|
variant: "secondary",
|
|
22006
|
-
children: /* @__PURE__ */ jsx(
|
|
21989
|
+
children: /* @__PURE__ */ jsx(IconXmark, {})
|
|
22007
21990
|
}
|
|
22008
21991
|
)
|
|
22009
21992
|
]
|
|
@@ -22223,7 +22206,7 @@ const UnreadMessagesNotification = ({
|
|
|
22223
22206
|
]
|
|
22224
22207
|
}
|
|
22225
22208
|
),
|
|
22226
|
-
/* @__PURE__ */ jsx(Button, { appearance: "outline", onClick: () => markRead(), variant: "secondary", children: /* @__PURE__ */ jsx(
|
|
22209
|
+
/* @__PURE__ */ jsx(Button, { appearance: "outline", onClick: () => markRead(), variant: "secondary", children: /* @__PURE__ */ jsx(IconXmark, {}) })
|
|
22227
22210
|
]
|
|
22228
22211
|
}
|
|
22229
22212
|
);
|
|
@@ -22918,7 +22901,6 @@ const MessageListWithContext = (props) => {
|
|
|
22918
22901
|
returnAllReadData = false,
|
|
22919
22902
|
reviewProcessedMessage,
|
|
22920
22903
|
showUnreadNotificationAlways,
|
|
22921
|
-
sortReactionDetails,
|
|
22922
22904
|
sortReactions,
|
|
22923
22905
|
suppressAutoscroll,
|
|
22924
22906
|
threadList = false,
|
|
@@ -23036,7 +23018,6 @@ const MessageListWithContext = (props) => {
|
|
|
23036
23018
|
renderText: props.renderText,
|
|
23037
23019
|
retrySendMessage: props.retrySendMessage,
|
|
23038
23020
|
showAvatar: props.showAvatar,
|
|
23039
|
-
sortReactionDetails,
|
|
23040
23021
|
sortReactions,
|
|
23041
23022
|
unsafeHTML
|
|
23042
23023
|
},
|
|
@@ -23331,7 +23312,6 @@ const messageRenderer = (virtuosoIndex, _data, virtuosoContext) => {
|
|
|
23331
23312
|
renderText: renderText2,
|
|
23332
23313
|
returnAllReadData,
|
|
23333
23314
|
showAvatar,
|
|
23334
|
-
sortReactionDetails,
|
|
23335
23315
|
sortReactions,
|
|
23336
23316
|
threadList,
|
|
23337
23317
|
unreadMessageCount = 0,
|
|
@@ -23381,7 +23361,6 @@ const messageRenderer = (virtuosoIndex, _data, virtuosoContext) => {
|
|
|
23381
23361
|
renderText: renderText2,
|
|
23382
23362
|
returnAllReadData,
|
|
23383
23363
|
showAvatar,
|
|
23384
|
-
sortReactionDetails,
|
|
23385
23364
|
sortReactions,
|
|
23386
23365
|
threadList
|
|
23387
23366
|
}
|
|
@@ -23466,7 +23445,6 @@ const VirtualizedMessageListWithContext = (props) => {
|
|
|
23466
23445
|
shouldGroupByUser = false,
|
|
23467
23446
|
showAvatar,
|
|
23468
23447
|
showUnreadNotificationAlways,
|
|
23469
|
-
sortReactionDetails,
|
|
23470
23448
|
sortReactions,
|
|
23471
23449
|
stickToBottomScrollBehavior = "smooth",
|
|
23472
23450
|
suppressAutoscroll,
|
|
@@ -23735,7 +23713,6 @@ const VirtualizedMessageListWithContext = (props) => {
|
|
|
23735
23713
|
returnAllReadData,
|
|
23736
23714
|
shouldGroupByUser,
|
|
23737
23715
|
showAvatar,
|
|
23738
|
-
sortReactionDetails,
|
|
23739
23716
|
sortReactions,
|
|
23740
23717
|
threadList,
|
|
23741
23718
|
unreadMessageCount: channelUnreadUiState?.unread_messages,
|
|
@@ -24596,7 +24573,7 @@ const SearchBar = () => {
|
|
|
24596
24573
|
"str-chat__search-bar__input-wrapper--active": isActive
|
|
24597
24574
|
}),
|
|
24598
24575
|
children: [
|
|
24599
|
-
/* @__PURE__ */ jsx(
|
|
24576
|
+
/* @__PURE__ */ jsx(IconSearch, {}),
|
|
24600
24577
|
/* @__PURE__ */ jsx(
|
|
24601
24578
|
"input",
|
|
24602
24579
|
{
|
|
@@ -24640,7 +24617,7 @@ const SearchBar = () => {
|
|
|
24640
24617
|
ref: clearButtonRef,
|
|
24641
24618
|
size: "xs",
|
|
24642
24619
|
variant: "secondary",
|
|
24643
|
-
children: /* @__PURE__ */ jsx(
|
|
24620
|
+
children: /* @__PURE__ */ jsx(IconXCircle, {})
|
|
24644
24621
|
}
|
|
24645
24622
|
)
|
|
24646
24623
|
]
|
|
@@ -25074,7 +25051,7 @@ const LoadMorePaginator = React.memo(
|
|
|
25074
25051
|
UnMemoizedLoadMorePaginator
|
|
25075
25052
|
);
|
|
25076
25053
|
const ChannelListHeader = ({
|
|
25077
|
-
ToggleButtonIcon =
|
|
25054
|
+
ToggleButtonIcon = IconSidebar
|
|
25078
25055
|
}) => {
|
|
25079
25056
|
const { t } = useTranslationContext();
|
|
25080
25057
|
const { channel, navOpen } = useChatContext();
|
|
@@ -25246,11 +25223,11 @@ const UnMemoizedChannelList = (props) => {
|
|
|
25246
25223
|
}
|
|
25247
25224
|
);
|
|
25248
25225
|
const showChannelList = !searchIsActive;
|
|
25249
|
-
return /* @__PURE__ */ jsx(
|
|
25226
|
+
return /* @__PURE__ */ jsx(
|
|
25250
25227
|
ChannelListContextProvider,
|
|
25251
25228
|
{
|
|
25252
25229
|
value: { channels, hasNextPage, loadNextPage, setChannels },
|
|
25253
|
-
children: /* @__PURE__ */
|
|
25230
|
+
children: /* @__PURE__ */ jsx("div", { className, ref: channelListRef, children: /* @__PURE__ */ jsxs(DialogManagerProvider, { id: `channel-list-dialog-manager-${stableId}`, children: [
|
|
25254
25231
|
/* @__PURE__ */ jsx(ChannelListHeader, {}),
|
|
25255
25232
|
showChannelSearch && /* @__PURE__ */ jsx(Search$12, {}),
|
|
25256
25233
|
showChannelList && /* @__PURE__ */ jsx(
|
|
@@ -25272,9 +25249,9 @@ const UnMemoizedChannelList = (props) => {
|
|
|
25272
25249
|
}
|
|
25273
25250
|
),
|
|
25274
25251
|
/* @__PURE__ */ jsx(NotificationList$1, { panel: "channel-list" })
|
|
25275
|
-
] })
|
|
25252
|
+
] }) })
|
|
25276
25253
|
}
|
|
25277
|
-
)
|
|
25254
|
+
);
|
|
25278
25255
|
};
|
|
25279
25256
|
const ChannelList = React.memo(
|
|
25280
25257
|
UnMemoizedChannelList
|
|
@@ -25665,7 +25642,7 @@ const defaultChannelActionSet = [
|
|
|
25665
25642
|
ref,
|
|
25666
25643
|
size: "sm",
|
|
25667
25644
|
variant: "secondary",
|
|
25668
|
-
children: /* @__PURE__ */ jsx(
|
|
25645
|
+
children: /* @__PURE__ */ jsx(IconMore, {})
|
|
25669
25646
|
}
|
|
25670
25647
|
);
|
|
25671
25648
|
}),
|
|
@@ -25758,7 +25735,7 @@ const defaultChannelActionSet = [
|
|
|
25758
25735
|
{
|
|
25759
25736
|
"aria-label": title,
|
|
25760
25737
|
disabled: inProgress,
|
|
25761
|
-
Icon:
|
|
25738
|
+
Icon: IconNoSign,
|
|
25762
25739
|
onClick: async () => {
|
|
25763
25740
|
try {
|
|
25764
25741
|
setInProgress(true);
|
|
@@ -25864,7 +25841,7 @@ const defaultChannelActionSet = [
|
|
|
25864
25841
|
{
|
|
25865
25842
|
"aria-label": title,
|
|
25866
25843
|
disabled: inProgress,
|
|
25867
|
-
Icon:
|
|
25844
|
+
Icon: IconLeave,
|
|
25868
25845
|
onClick: async (e) => {
|
|
25869
25846
|
e.stopPropagation();
|
|
25870
25847
|
try {
|
|
@@ -26001,11 +25978,13 @@ function ChannelListItemTimestamp({ lastMessage }) {
|
|
|
26001
25978
|
function getAttachmentContentType(attachment) {
|
|
26002
25979
|
if (!attachment) return "text";
|
|
26003
25980
|
if (attachment.type === "giphy") return "giphy";
|
|
26004
|
-
if (attachment.type === "image")
|
|
25981
|
+
if (attachment.type === "image") {
|
|
25982
|
+
if (attachment.og_scrape_url || attachment.title_link) return "link";
|
|
25983
|
+
return "image";
|
|
25984
|
+
}
|
|
26005
25985
|
if (attachment.type === "video") return "video";
|
|
26006
25986
|
if (attachment.type === "voiceRecording") return "voice";
|
|
26007
25987
|
if (attachment.type === "file") return "file";
|
|
26008
|
-
if (attachment.og_scrape_url || attachment.title_link) return "link";
|
|
26009
25988
|
return "file";
|
|
26010
25989
|
}
|
|
26011
25990
|
function getAttachmentFallbackText(type, count, t) {
|
|
@@ -26085,13 +26064,13 @@ const useLatestMessagePreview = ({
|
|
|
26085
26064
|
} else {
|
|
26086
26065
|
contentType = "file";
|
|
26087
26066
|
}
|
|
26088
|
-
let text2 = contentType === "giphy" ? "
|
|
26067
|
+
let text2 = contentType === "giphy" ? `GIPHY ${firstAttachment.title ?? ""}`.trim() : (
|
|
26089
26068
|
// prioritize message text content if available
|
|
26090
26069
|
textContent || // then fallback text of the single attachment if only one attachment is present and it's not a voice recording (fallback text is generic for voice recordings, so not useful in the preview)
|
|
26091
26070
|
(attachments.length === 1 && contentType !== "voice" ? firstAttachment.fallback || firstAttachment.title : "") || // then generic fallback text based on attachment type and count
|
|
26092
26071
|
getAttachmentFallbackText(contentType, attachments.length, t)
|
|
26093
26072
|
);
|
|
26094
|
-
if (
|
|
26073
|
+
if (attachments.length === 1 && typeof firstAttachment.duration === "number") {
|
|
26095
26074
|
const minutes = Math.floor(firstAttachment.duration / 60);
|
|
26096
26075
|
const seconds = Math.ceil(firstAttachment.duration) % 60;
|
|
26097
26076
|
const durationString = `${minutes}:${seconds.toString().padStart(2, "0")}`;
|
|
@@ -26123,21 +26102,21 @@ const useLatestMessagePreview = ({
|
|
|
26123
26102
|
]);
|
|
26124
26103
|
};
|
|
26125
26104
|
const deliveryStatusIconMap = {
|
|
26126
|
-
delivered:
|
|
26127
|
-
read:
|
|
26105
|
+
delivered: IconChecks,
|
|
26106
|
+
read: IconChecks,
|
|
26128
26107
|
sending: IconClock,
|
|
26129
26108
|
sent: IconCheckmark1Small
|
|
26130
26109
|
};
|
|
26131
26110
|
const contentTypeIconMap = {
|
|
26132
|
-
deleted:
|
|
26133
|
-
error:
|
|
26134
|
-
file:
|
|
26135
|
-
giphy:
|
|
26136
|
-
image:
|
|
26137
|
-
link:
|
|
26138
|
-
location:
|
|
26111
|
+
deleted: IconNoSign,
|
|
26112
|
+
error: IconExclamationCircleFill,
|
|
26113
|
+
file: IconFile,
|
|
26114
|
+
giphy: IconGiphy,
|
|
26115
|
+
image: IconCamera,
|
|
26116
|
+
link: IconLink,
|
|
26117
|
+
location: IconLocation,
|
|
26139
26118
|
video: IconVideo,
|
|
26140
|
-
voice:
|
|
26119
|
+
voice: IconVoice
|
|
26141
26120
|
};
|
|
26142
26121
|
const SummarizedMessagePreview = ({
|
|
26143
26122
|
latestMessage,
|
|
@@ -26733,7 +26712,7 @@ const ThreadListItem = ({
|
|
|
26733
26712
|
const ThreadListEmptyPlaceholder = () => {
|
|
26734
26713
|
const { t } = useTranslationContext("ThreadListEmptyPlaceholder");
|
|
26735
26714
|
return /* @__PURE__ */ jsxs("div", { className: "str-chat__thread-list-empty-placeholder", children: [
|
|
26736
|
-
/* @__PURE__ */ jsx(
|
|
26715
|
+
/* @__PURE__ */ jsx(IconMessageBubbles, {}),
|
|
26737
26716
|
/* @__PURE__ */ jsx("p", { children: t("Reply to a message to start a thread") })
|
|
26738
26717
|
] });
|
|
26739
26718
|
};
|
|
@@ -26756,7 +26735,7 @@ const ThreadListUnseenThreadsBanner = () => {
|
|
|
26756
26735
|
onClick: () => client.threads.reload(),
|
|
26757
26736
|
children: [
|
|
26758
26737
|
!isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26759
|
-
/* @__PURE__ */ jsx(
|
|
26738
|
+
/* @__PURE__ */ jsx(IconRefresh, {}),
|
|
26760
26739
|
/* @__PURE__ */ jsx("span", { children: t("ThreadListUnseenThreadsBanner/unreadThreads", {
|
|
26761
26740
|
count: unseenThreadIds.length
|
|
26762
26741
|
}) })
|
|
@@ -26780,7 +26759,7 @@ const ThreadListLoadingIndicator = () => {
|
|
|
26780
26759
|
return /* @__PURE__ */ jsx("div", { className: "str-chat__thread-list-loading-indicator", children: /* @__PURE__ */ jsx(LoadingIndicator$1, {}) });
|
|
26781
26760
|
};
|
|
26782
26761
|
const ThreadListHeader = ({
|
|
26783
|
-
ToggleButtonIcon =
|
|
26762
|
+
ToggleButtonIcon = IconSidebar
|
|
26784
26763
|
}) => {
|
|
26785
26764
|
const { t } = useTranslationContext();
|
|
26786
26765
|
const { navOpen } = useChatContext();
|
|
@@ -26911,11 +26890,10 @@ const ThreadList = ({ virtuosoProps }) => {
|
|
|
26911
26890
|
);
|
|
26912
26891
|
};
|
|
26913
26892
|
const IconsBySeverity = {
|
|
26914
|
-
error:
|
|
26893
|
+
error: IconExclamationMark,
|
|
26915
26894
|
info: null,
|
|
26916
|
-
|
|
26917
|
-
|
|
26918
|
-
success: IconCheckmark2,
|
|
26895
|
+
loading: IconRefresh,
|
|
26896
|
+
success: IconCheckmark,
|
|
26919
26897
|
warning: IconExclamationTriangle
|
|
26920
26898
|
};
|
|
26921
26899
|
const DefaultNotificationIcon = ({ notification }) => {
|
|
@@ -26994,7 +26972,7 @@ const Notification = forwardRef(
|
|
|
26994
26972
|
onClick: handleDismiss,
|
|
26995
26973
|
size: "sm",
|
|
26996
26974
|
variant: "secondary",
|
|
26997
|
-
children: /* @__PURE__ */ jsx(
|
|
26975
|
+
children: /* @__PURE__ */ jsx(IconXmark, {})
|
|
26998
26976
|
}
|
|
26999
26977
|
)
|
|
27000
26978
|
]
|
|
@@ -27556,7 +27534,7 @@ const ThumbnailButton = ({
|
|
|
27556
27534
|
"aria-hidden": "true",
|
|
27557
27535
|
className: "str-chat__modal-gallery__image-load-failed-overlay",
|
|
27558
27536
|
"data-testid": "str-chat__modal-gallery__image-load-failed-overlay",
|
|
27559
|
-
children: /* @__PURE__ */ jsx("div", { className: "str-chat__modal-gallery__image-retry-indicator", children: /* @__PURE__ */ jsx(
|
|
27537
|
+
children: /* @__PURE__ */ jsx("div", { className: "str-chat__modal-gallery__image-retry-indicator", children: /* @__PURE__ */ jsx(IconRetry, {}) })
|
|
27560
27538
|
}
|
|
27561
27539
|
),
|
|
27562
27540
|
showOverlay && /* @__PURE__ */ jsxs("div", { className: "str-chat__modal-gallery__placeholder", children: [
|
|
@@ -27647,7 +27625,7 @@ const CardContent = (props) => {
|
|
|
27647
27625
|
className: "str-chat__message-attachment-card--source-link",
|
|
27648
27626
|
"data-testid": "card-source-link",
|
|
27649
27627
|
children: [
|
|
27650
|
-
/* @__PURE__ */ jsx(
|
|
27628
|
+
/* @__PURE__ */ jsx(IconLink, {}),
|
|
27651
27629
|
/* @__PURE__ */ jsx("div", { className: "str-chat__message-attachment-card--url", children: url })
|
|
27652
27630
|
]
|
|
27653
27631
|
}
|
|
@@ -27818,7 +27796,7 @@ const DefaultGeolocationAttachmentMapPlaceholder = ({
|
|
|
27818
27796
|
className: "str-chat__message-attachment-geolocation__placeholder",
|
|
27819
27797
|
"data-testid": "geolocation-attachment-map-placeholder",
|
|
27820
27798
|
children: [
|
|
27821
|
-
/* @__PURE__ */ jsx(
|
|
27799
|
+
/* @__PURE__ */ jsx(IconLocation, {}),
|
|
27822
27800
|
/* @__PURE__ */ jsx(
|
|
27823
27801
|
"a",
|
|
27824
27802
|
{
|
|
@@ -28289,7 +28267,7 @@ const ChannelHeader = (props) => {
|
|
|
28289
28267
|
const {
|
|
28290
28268
|
Avatar: Avatar2 = ChannelAvatar,
|
|
28291
28269
|
image: overrideImage,
|
|
28292
|
-
MenuIcon =
|
|
28270
|
+
MenuIcon = IconSidebar,
|
|
28293
28271
|
title: overrideTitle
|
|
28294
28272
|
} = props;
|
|
28295
28273
|
const { channel } = useChannelStateContext();
|
|
@@ -28306,12 +28284,12 @@ const ChannelHeader = (props) => {
|
|
|
28306
28284
|
"str-chat__channel-header--sidebar-collapsed": !navOpen
|
|
28307
28285
|
}),
|
|
28308
28286
|
children: [
|
|
28309
|
-
/* @__PURE__ */ jsx(ToggleSidebarButton, { mode: "expand", children: /* @__PURE__ */ jsx(MenuIcon, {}) }),
|
|
28287
|
+
/* @__PURE__ */ jsx("div", { className: "str-chat__channel-header__start", children: /* @__PURE__ */ jsx(ToggleSidebarButton, { mode: "expand", children: /* @__PURE__ */ jsx(MenuIcon, {}) }) }),
|
|
28310
28288
|
/* @__PURE__ */ jsxs("div", { className: "str-chat__channel-header__data", children: [
|
|
28311
28289
|
/* @__PURE__ */ jsx("div", { className: "str-chat__channel-header__data__title", children: displayTitle }),
|
|
28312
28290
|
/* @__PURE__ */ jsx(ChannelHeaderSubtitle, {})
|
|
28313
28291
|
] }),
|
|
28314
|
-
/* @__PURE__ */ jsx(
|
|
28292
|
+
/* @__PURE__ */ jsx("div", { className: "str-chat__channel-header__end", children: /* @__PURE__ */ jsx(
|
|
28315
28293
|
Avatar2,
|
|
28316
28294
|
{
|
|
28317
28295
|
className: "str-chat__avatar--channel-header",
|
|
@@ -28321,7 +28299,7 @@ const ChannelHeader = (props) => {
|
|
|
28321
28299
|
size: "lg",
|
|
28322
28300
|
userName: displayTitle
|
|
28323
28301
|
}
|
|
28324
|
-
)
|
|
28302
|
+
) })
|
|
28325
28303
|
]
|
|
28326
28304
|
}
|
|
28327
28305
|
);
|
|
@@ -28370,12 +28348,12 @@ export {
|
|
|
28370
28348
|
Card,
|
|
28371
28349
|
CardContainer,
|
|
28372
28350
|
bx as Channel,
|
|
28373
|
-
|
|
28374
|
-
|
|
28351
|
+
bY as ChannelActionContext,
|
|
28352
|
+
bZ as ChannelActionProvider,
|
|
28375
28353
|
ChannelAvatar,
|
|
28376
28354
|
ChannelHeader,
|
|
28377
28355
|
ChannelList,
|
|
28378
|
-
|
|
28356
|
+
b_ as ChannelListContext,
|
|
28379
28357
|
ChannelListContextProvider,
|
|
28380
28358
|
ChannelListItem,
|
|
28381
28359
|
ChannelListItemActionButtons,
|
|
@@ -28383,10 +28361,10 @@ export {
|
|
|
28383
28361
|
ChannelListItemUI,
|
|
28384
28362
|
ChannelListUI,
|
|
28385
28363
|
ChannelSearchResultItem,
|
|
28386
|
-
|
|
28387
|
-
|
|
28364
|
+
b$ as ChannelStateContext,
|
|
28365
|
+
c0 as ChannelStateProvider,
|
|
28388
28366
|
Chat,
|
|
28389
|
-
|
|
28367
|
+
c1 as ChatContext,
|
|
28390
28368
|
ChatProvider,
|
|
28391
28369
|
bz as ChatView,
|
|
28392
28370
|
bC as ChatViewChannelsSelectorButton,
|
|
@@ -28398,7 +28376,7 @@ export {
|
|
|
28398
28376
|
CommandChip,
|
|
28399
28377
|
CommandItem,
|
|
28400
28378
|
ComponentContext,
|
|
28401
|
-
|
|
28379
|
+
c2 as ComponentProvider,
|
|
28402
28380
|
ConnectionStatus,
|
|
28403
28381
|
ContextMenu,
|
|
28404
28382
|
ContextMenuBackButton,
|
|
@@ -28444,163 +28422,83 @@ export {
|
|
|
28444
28422
|
GlobalModal,
|
|
28445
28423
|
GroupAvatar,
|
|
28446
28424
|
Header$1 as Header,
|
|
28447
|
-
bG as IconApiAggregate,
|
|
28448
|
-
bH as IconApples,
|
|
28449
28425
|
IconArchive,
|
|
28450
|
-
IconArrowBoxLeft,
|
|
28451
28426
|
IconArrowDown,
|
|
28452
28427
|
IconArrowDownCircle,
|
|
28453
28428
|
IconArrowLeft,
|
|
28454
|
-
bI as IconArrowRight,
|
|
28455
|
-
IconArrowRightUp,
|
|
28456
|
-
IconArrowRotateClockwise,
|
|
28457
|
-
IconArrowRotateRightLeftRepeatRefresh,
|
|
28458
|
-
IconArrowShareLeft,
|
|
28459
28429
|
IconArrowUp,
|
|
28460
|
-
|
|
28461
|
-
|
|
28462
|
-
|
|
28463
|
-
|
|
28430
|
+
IconArrowUpRight,
|
|
28431
|
+
IconAttachment,
|
|
28432
|
+
IconAudio,
|
|
28433
|
+
IconBell,
|
|
28464
28434
|
IconBellOff,
|
|
28465
|
-
|
|
28466
|
-
|
|
28467
|
-
|
|
28468
|
-
bN as IconBubble2ChatMessage,
|
|
28469
|
-
bO as IconBubble2Solid,
|
|
28470
|
-
bP as IconBubble3ChatMessage,
|
|
28471
|
-
bQ as IconBubble3Solid,
|
|
28472
|
-
bR as IconBubbleAnnotation2ChatMessage,
|
|
28473
|
-
IconBubbleText6ChatMessage,
|
|
28474
|
-
bT as IconBubbleText6Solid,
|
|
28475
|
-
bS as IconBubbleText6SolidChatMessage,
|
|
28476
|
-
IconBubbleWideNotificationChatMessage,
|
|
28477
|
-
bU as IconBubbleWideSparkleChatMessage,
|
|
28478
|
-
IconBubbles,
|
|
28479
|
-
bV as IconCalendar1,
|
|
28480
|
-
bW as IconCallCancel,
|
|
28481
|
-
IconCamera1,
|
|
28482
|
-
bX as IconCar1,
|
|
28483
|
-
bY as IconCat,
|
|
28484
|
-
IconChainLink,
|
|
28485
|
-
IconChart5,
|
|
28435
|
+
IconBolt,
|
|
28436
|
+
IconCamera,
|
|
28437
|
+
IconCheckmark,
|
|
28486
28438
|
IconCheckmark1Small,
|
|
28487
|
-
|
|
28488
|
-
bZ as IconCheckmark2Small,
|
|
28439
|
+
IconChecks,
|
|
28489
28440
|
IconChevronDown,
|
|
28490
|
-
b_ as IconChevronGrabberVerticalSelector,
|
|
28491
28441
|
IconChevronLeft,
|
|
28492
28442
|
IconChevronRight,
|
|
28493
|
-
b$ as IconChevronTop,
|
|
28494
|
-
IconCircleBanSign,
|
|
28495
|
-
c0 as IconCircleCheck,
|
|
28496
|
-
c1 as IconCircleInfoTooltip,
|
|
28497
|
-
IconCircleMinus,
|
|
28498
|
-
c2 as IconCircleQuestionmark,
|
|
28499
|
-
c3 as IconCircleQuestionmarkFilled,
|
|
28500
|
-
IconCircleX,
|
|
28501
28443
|
IconClock,
|
|
28502
|
-
|
|
28503
|
-
|
|
28504
|
-
c5 as IconCode,
|
|
28505
|
-
c6 as IconCodeBrackets,
|
|
28506
|
-
c7 as IconCodeEditorInsert,
|
|
28507
|
-
c8 as IconCompass,
|
|
28508
|
-
c9 as IconCreditCard2Billing,
|
|
28509
|
-
IconCrossMedium,
|
|
28444
|
+
IconCommand,
|
|
28445
|
+
IconCopy,
|
|
28510
28446
|
IconCrossSmall,
|
|
28511
|
-
|
|
28512
|
-
|
|
28513
|
-
|
|
28514
|
-
|
|
28515
|
-
|
|
28516
|
-
|
|
28517
|
-
cc as IconEmojiAddReaction,
|
|
28518
|
-
cd as IconEmojiSad,
|
|
28519
|
-
IconEmojiSmile,
|
|
28520
|
-
IconExclamation,
|
|
28521
|
-
IconExclamationCircle,
|
|
28522
|
-
IconExclamationCircle1,
|
|
28447
|
+
IconDelete,
|
|
28448
|
+
IconEdit,
|
|
28449
|
+
IconEmoji,
|
|
28450
|
+
IconExclamationCircleFill,
|
|
28451
|
+
IconExclamationMark,
|
|
28452
|
+
IconExclamationMarkFill,
|
|
28523
28453
|
IconExclamationTriangle,
|
|
28524
|
-
ce as IconExclamationTriangle1,
|
|
28525
28454
|
IconEyeOpen,
|
|
28526
|
-
|
|
28527
|
-
|
|
28528
|
-
cf as IconFilledCircleInfoTooltip,
|
|
28529
|
-
cg as IconFilter1,
|
|
28530
|
-
IconFlag2,
|
|
28531
|
-
ch as IconGauge,
|
|
28455
|
+
IconFile,
|
|
28456
|
+
IconFlag,
|
|
28532
28457
|
IconGiphy,
|
|
28533
|
-
|
|
28534
|
-
|
|
28535
|
-
|
|
28536
|
-
|
|
28537
|
-
|
|
28538
|
-
|
|
28539
|
-
|
|
28540
|
-
|
|
28541
|
-
|
|
28542
|
-
|
|
28543
|
-
cq as IconLimits,
|
|
28544
|
-
cr as IconLineChart3,
|
|
28545
|
-
IconLoadingCircle,
|
|
28546
|
-
cs as IconLock,
|
|
28547
|
-
IconMagnifyingGlassSearch,
|
|
28548
|
-
IconMapPin,
|
|
28549
|
-
IconMicrophone,
|
|
28550
|
-
ct as IconMicrophoneSolid,
|
|
28551
|
-
cu as IconMinusLarge,
|
|
28552
|
-
cv as IconMinusSmall,
|
|
28458
|
+
IconImage,
|
|
28459
|
+
IconLeave,
|
|
28460
|
+
IconLink,
|
|
28461
|
+
IconLoading,
|
|
28462
|
+
IconLocation,
|
|
28463
|
+
bG as IconMessageBubble,
|
|
28464
|
+
bH as IconMessageBubbleFill,
|
|
28465
|
+
IconMessageBubbles,
|
|
28466
|
+
IconMinusCircle,
|
|
28467
|
+
IconMore,
|
|
28553
28468
|
IconMute,
|
|
28554
|
-
|
|
28555
|
-
|
|
28556
|
-
|
|
28557
|
-
cy as IconPaperPlaneTopRight,
|
|
28558
|
-
IconPaperclip,
|
|
28559
|
-
cz as IconParagraphsText,
|
|
28560
|
-
IconPause,
|
|
28561
|
-
cA as IconPencil,
|
|
28562
|
-
IconPeople,
|
|
28563
|
-
cB as IconPeople2,
|
|
28564
|
-
IconPeopleAdd,
|
|
28565
|
-
IconPeopleAdded,
|
|
28566
|
-
cC as IconPeopleCircle,
|
|
28567
|
-
cD as IconPeopleCopy,
|
|
28568
|
-
cE as IconPeopleEditUserRights,
|
|
28569
|
-
IconPeopleRemove,
|
|
28570
|
-
cF as IconPersona,
|
|
28469
|
+
IconNoSign,
|
|
28470
|
+
IconNotification,
|
|
28471
|
+
IconPauseFill,
|
|
28571
28472
|
IconPin,
|
|
28572
|
-
|
|
28573
|
-
|
|
28473
|
+
IconPlayFill,
|
|
28474
|
+
IconPlus,
|
|
28574
28475
|
IconPlusSmall,
|
|
28575
|
-
|
|
28576
|
-
|
|
28577
|
-
|
|
28578
|
-
|
|
28579
|
-
|
|
28580
|
-
|
|
28581
|
-
|
|
28582
|
-
|
|
28583
|
-
|
|
28584
|
-
|
|
28585
|
-
|
|
28586
|
-
|
|
28587
|
-
cQ as IconTeam,
|
|
28588
|
-
cR as IconTennis,
|
|
28589
|
-
cS as IconTextToImageURLEnrichment,
|
|
28590
|
-
IconThunder,
|
|
28476
|
+
IconPoll,
|
|
28477
|
+
IconQuote,
|
|
28478
|
+
IconRefresh,
|
|
28479
|
+
IconReorder,
|
|
28480
|
+
IconReply,
|
|
28481
|
+
IconRetry,
|
|
28482
|
+
IconSave,
|
|
28483
|
+
IconSearch,
|
|
28484
|
+
IconSend,
|
|
28485
|
+
IconSidebar,
|
|
28486
|
+
IconThread,
|
|
28487
|
+
bI as IconThreadFill,
|
|
28591
28488
|
IconTranslate,
|
|
28592
|
-
IconTrashBin,
|
|
28593
|
-
cT as IconTrending4,
|
|
28594
28489
|
IconTrophy,
|
|
28595
|
-
cU as IconUnlocked,
|
|
28596
28490
|
IconUnpin,
|
|
28597
|
-
|
|
28491
|
+
IconUnsave,
|
|
28492
|
+
IconUpload,
|
|
28493
|
+
IconUser,
|
|
28494
|
+
IconUserAdd,
|
|
28495
|
+
IconUserCheck,
|
|
28496
|
+
IconUserRemove,
|
|
28598
28497
|
IconVideo,
|
|
28599
|
-
|
|
28600
|
-
|
|
28601
|
-
|
|
28602
|
-
|
|
28603
|
-
cY as IconWebhook,
|
|
28498
|
+
IconVideoFill,
|
|
28499
|
+
IconVoice,
|
|
28500
|
+
IconXCircle,
|
|
28501
|
+
IconXmark,
|
|
28604
28502
|
ImageComponent,
|
|
28605
28503
|
ImageContainer,
|
|
28606
28504
|
ImagePlaceholder,
|
|
@@ -28609,9 +28507,9 @@ export {
|
|
|
28609
28507
|
LinkPreviewList,
|
|
28610
28508
|
LoadMoreButton,
|
|
28611
28509
|
LoadMorePaginator,
|
|
28612
|
-
|
|
28510
|
+
bJ as LoadingChannel,
|
|
28613
28511
|
LoadingChannels,
|
|
28614
|
-
|
|
28512
|
+
bK as LoadingErrorIndicator,
|
|
28615
28513
|
LoadingIndicator,
|
|
28616
28514
|
LoadingIndicatorIcon,
|
|
28617
28515
|
MAX_MESSAGE_REACTIONS_TO_FETCH,
|
|
@@ -28626,7 +28524,7 @@ export {
|
|
|
28626
28524
|
MessageBouncePrompt,
|
|
28627
28525
|
MessageBounceProvider,
|
|
28628
28526
|
MessageComposer,
|
|
28629
|
-
|
|
28527
|
+
c3 as MessageComposerContext,
|
|
28630
28528
|
MessageComposerContextProvider,
|
|
28631
28529
|
MessageComposerUI,
|
|
28632
28530
|
MessageContext,
|
|
@@ -28659,7 +28557,7 @@ export {
|
|
|
28659
28557
|
NotificationList,
|
|
28660
28558
|
NotificationTranslationTopic,
|
|
28661
28559
|
NumericInput,
|
|
28662
|
-
|
|
28560
|
+
bL as OPTIONAL_MESSAGE_ACTIONS,
|
|
28663
28561
|
OtherFilesContainer,
|
|
28664
28562
|
PauseIcon,
|
|
28665
28563
|
PinIndicator,
|
|
@@ -28726,22 +28624,22 @@ export {
|
|
|
28726
28624
|
TextInputFieldSet,
|
|
28727
28625
|
TextareaComposer,
|
|
28728
28626
|
Thread,
|
|
28729
|
-
|
|
28627
|
+
bW as ThreadContext,
|
|
28730
28628
|
ThreadHeader,
|
|
28731
28629
|
ThreadList,
|
|
28732
28630
|
ThreadListItem,
|
|
28733
28631
|
ThreadListItemUI,
|
|
28734
|
-
|
|
28632
|
+
bX as ThreadProvider,
|
|
28735
28633
|
ThreadStart,
|
|
28736
28634
|
Tooltip,
|
|
28737
28635
|
TranslationBuilder,
|
|
28738
|
-
|
|
28636
|
+
c4 as TranslationContext,
|
|
28739
28637
|
TranslationProvider,
|
|
28740
28638
|
TranslationTopic,
|
|
28741
|
-
|
|
28639
|
+
c5 as TypingContext,
|
|
28742
28640
|
TypingIndicator,
|
|
28743
28641
|
TypingIndicatorHeader,
|
|
28744
|
-
|
|
28642
|
+
c6 as TypingProvider,
|
|
28745
28643
|
UNREAD_MESSAGE_SEPARATOR_CLASS,
|
|
28746
28644
|
UnMemoizedLoadMorePaginator,
|
|
28747
28645
|
UnreadMessagesNotification,
|
|
@@ -28799,21 +28697,21 @@ export {
|
|
|
28799
28697
|
getCssDimensionsVariables,
|
|
28800
28698
|
getGroupChannelDisplayInfo,
|
|
28801
28699
|
getGroupStyles,
|
|
28802
|
-
|
|
28700
|
+
bM as getImages,
|
|
28803
28701
|
getIsFirstUnreadMessage,
|
|
28804
28702
|
getLastReceived,
|
|
28805
28703
|
getLatestMessagePreview,
|
|
28806
28704
|
getMessageActions,
|
|
28807
|
-
|
|
28808
|
-
|
|
28809
|
-
|
|
28705
|
+
bN as getNonImageAttachments,
|
|
28706
|
+
bT as getNotificationTargetPanel,
|
|
28707
|
+
bU as getNotificationTargetTag,
|
|
28810
28708
|
getReadByTooltipText,
|
|
28811
28709
|
getTextareaCaretRect,
|
|
28812
28710
|
getTranslatedMessageText,
|
|
28813
28711
|
getWholeChar,
|
|
28814
28712
|
handleActionWarning,
|
|
28815
|
-
|
|
28816
|
-
|
|
28713
|
+
bQ as hasMoreMessagesProbably,
|
|
28714
|
+
bR as hasNotMoreMessages,
|
|
28817
28715
|
hiTranslations,
|
|
28818
28716
|
htmlToTextPlugin,
|
|
28819
28717
|
imageToLink,
|
|
@@ -28823,7 +28721,7 @@ export {
|
|
|
28823
28721
|
isChrome,
|
|
28824
28722
|
isDate,
|
|
28825
28723
|
isDateSeparatorMessage,
|
|
28826
|
-
|
|
28724
|
+
c7 as isDayOrMoment,
|
|
28827
28725
|
isFirefox,
|
|
28828
28726
|
isGalleryAttachmentType,
|
|
28829
28727
|
isIntroMessage,
|
|
@@ -28835,8 +28733,8 @@ export {
|
|
|
28835
28733
|
isMessageErrorRetryable,
|
|
28836
28734
|
isNetworkSendFailure,
|
|
28837
28735
|
isNotificationForPanel,
|
|
28838
|
-
|
|
28839
|
-
|
|
28736
|
+
bS as isNotificationTargetPanel,
|
|
28737
|
+
c8 as isNumberOrString,
|
|
28840
28738
|
isSafari,
|
|
28841
28739
|
isSvgAttachment,
|
|
28842
28740
|
isUserMuted,
|
|
@@ -28844,8 +28742,8 @@ export {
|
|
|
28844
28742
|
jaTranslations,
|
|
28845
28743
|
keepLineBreaksPlugin,
|
|
28846
28744
|
koTranslations,
|
|
28847
|
-
|
|
28848
|
-
|
|
28745
|
+
bP as makeDateMessageId,
|
|
28746
|
+
bO as makeIntroMessage,
|
|
28849
28747
|
mapEmojiMartData,
|
|
28850
28748
|
mapToUserNameOrId,
|
|
28851
28749
|
markDownRenderers,
|
|
@@ -28923,7 +28821,7 @@ export {
|
|
|
28923
28821
|
useFlagHandler,
|
|
28924
28822
|
useGalleryContext,
|
|
28925
28823
|
useLastReadData,
|
|
28926
|
-
|
|
28824
|
+
bV as useLegacyThreadContext,
|
|
28927
28825
|
useLiveLocationSharingManager,
|
|
28928
28826
|
useMarkUnreadHandler,
|
|
28929
28827
|
useMentionsHandler,
|