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/cjs/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const clsx = require("clsx");
|
|
|
5
5
|
const nanoid = require("nanoid");
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const audioProcessing = require("./audioProcessing.56e5db9d.js");
|
|
8
|
-
const WithAudioPlayback = require("./WithAudioPlayback.
|
|
8
|
+
const WithAudioPlayback = require("./WithAudioPlayback.0c10cb67.js");
|
|
9
9
|
const streamChat = require("stream-chat");
|
|
10
10
|
const throttle = require("lodash.throttle");
|
|
11
11
|
const linkify = require("linkifyjs");
|
|
@@ -292,7 +292,8 @@ const DialogPortalDestination = () => {
|
|
|
292
292
|
React.useEffect(() => {
|
|
293
293
|
if (!destinationRoot || !dialogManager) return;
|
|
294
294
|
const handleDocumentClick = (event) => {
|
|
295
|
-
|
|
295
|
+
const target = event.target;
|
|
296
|
+
if (target !== destinationRoot && destinationRoot.contains(target)) return;
|
|
296
297
|
setTimeout(() => {
|
|
297
298
|
Object.values(dialogManager.state.getLatestValue().dialogsById).forEach(
|
|
298
299
|
(dialog) => {
|
|
@@ -319,21 +320,6 @@ const DialogPortalDestination = () => {
|
|
|
319
320
|
className: "str-chat__dialog-overlay",
|
|
320
321
|
"data-str-chat__portal-id": dialogManager?.id,
|
|
321
322
|
"data-testid": "str-chat__dialog-overlay",
|
|
322
|
-
onClick: (event) => {
|
|
323
|
-
if (!dialogManager) return;
|
|
324
|
-
if (event.target !== event.currentTarget) return;
|
|
325
|
-
Object.values(dialogManager.state.getLatestValue().dialogsById).forEach(
|
|
326
|
-
(dialog) => {
|
|
327
|
-
if (!dialog.isOpen) return;
|
|
328
|
-
if (!shouldCloseOnOutsideClick({
|
|
329
|
-
dialog,
|
|
330
|
-
managerCloseOnClickOutside: dialogManager.closeOnClickOutside
|
|
331
|
-
}))
|
|
332
|
-
return;
|
|
333
|
-
dialogManager.close(dialog.id);
|
|
334
|
-
}
|
|
335
|
-
);
|
|
336
|
-
},
|
|
337
323
|
ref: setDestinationRoot,
|
|
338
324
|
style: {
|
|
339
325
|
"--str-chat__dialog-overlay-height": openedDialogCount > 0 ? "100%" : "0"
|
|
@@ -491,6 +477,38 @@ const useMessageContext = (_componentName) => {
|
|
|
491
477
|
}
|
|
492
478
|
return contextValue;
|
|
493
479
|
};
|
|
480
|
+
const snapshots = /* @__PURE__ */ new WeakMap();
|
|
481
|
+
const savePreEditSnapshot = (messageComposer) => {
|
|
482
|
+
if (snapshots.has(messageComposer)) return;
|
|
483
|
+
const composerState = messageComposer.state.getLatestValue();
|
|
484
|
+
const textState = messageComposer.textComposer.state.getLatestValue();
|
|
485
|
+
const attachmentState = messageComposer.attachmentManager.state.getLatestValue();
|
|
486
|
+
const linkPreviewState = messageComposer.linkPreviewsManager.state.getLatestValue();
|
|
487
|
+
const locationState = messageComposer.locationComposer.state.getLatestValue();
|
|
488
|
+
const pollState = messageComposer.pollComposer.state.getLatestValue();
|
|
489
|
+
const customDataState = messageComposer.customDataManager.state.getLatestValue();
|
|
490
|
+
snapshots.set(messageComposer, () => {
|
|
491
|
+
messageComposer.state.next(composerState);
|
|
492
|
+
messageComposer.textComposer.state.next(textState);
|
|
493
|
+
messageComposer.attachmentManager.state.next(attachmentState);
|
|
494
|
+
messageComposer.linkPreviewsManager.state.next(linkPreviewState);
|
|
495
|
+
messageComposer.locationComposer.state.next(locationState);
|
|
496
|
+
messageComposer.pollComposer.state.next(pollState);
|
|
497
|
+
messageComposer.customDataManager.state.next(customDataState);
|
|
498
|
+
});
|
|
499
|
+
};
|
|
500
|
+
const restorePreEditSnapshot = (messageComposer) => {
|
|
501
|
+
const restore = snapshots.get(messageComposer);
|
|
502
|
+
snapshots.delete(messageComposer);
|
|
503
|
+
if (restore) {
|
|
504
|
+
restore();
|
|
505
|
+
} else {
|
|
506
|
+
messageComposer.clear();
|
|
507
|
+
}
|
|
508
|
+
};
|
|
509
|
+
const discardPreEditSnapshot = (messageComposer) => {
|
|
510
|
+
snapshots.delete(messageComposer);
|
|
511
|
+
};
|
|
494
512
|
const MessageBounceContext = React.createContext(
|
|
495
513
|
void 0
|
|
496
514
|
);
|
|
@@ -519,6 +537,7 @@ function MessageBounceProvider({ children }) {
|
|
|
519
537
|
const handleEdit = React.useCallback(
|
|
520
538
|
(e) => {
|
|
521
539
|
e.preventDefault();
|
|
540
|
+
savePreEditSnapshot(messageComposer);
|
|
522
541
|
messageComposer.initState({ composition: message });
|
|
523
542
|
},
|
|
524
543
|
[message, messageComposer]
|
|
@@ -727,49 +746,6 @@ const useNotifications = (options) => {
|
|
|
727
746
|
const { notifications } = WithAudioPlayback.useStateStore(client.notifications.store, selector2);
|
|
728
747
|
return notifications;
|
|
729
748
|
};
|
|
730
|
-
const IconGiphy = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
731
|
-
WithAudioPlayback.BaseIcon,
|
|
732
|
-
{
|
|
733
|
-
...props,
|
|
734
|
-
className: clsx("str-chat__icon--giphy", className),
|
|
735
|
-
viewBox: "0 0 16 16",
|
|
736
|
-
children: [
|
|
737
|
-
/* @__PURE__ */ jsxRuntime.jsxs("g", { clipPath: "url(#clip0_4197_15218)", children: [
|
|
738
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
739
|
-
"path",
|
|
740
|
-
{
|
|
741
|
-
clipRule: "evenodd",
|
|
742
|
-
d: "M3.33674 1.82861H12.6639V14.171H3.33594L3.33674 1.82861Z",
|
|
743
|
-
fill: "black",
|
|
744
|
-
fillRule: "evenodd"
|
|
745
|
-
}
|
|
746
|
-
),
|
|
747
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1.47217 1.37109H3.33697V14.6287H1.47217V1.37109Z", fill: "#04FF8E" }),
|
|
748
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12.6631 5.02881H14.5279V14.6288H12.6631V5.02881Z", fill: "#8E2EFF" }),
|
|
749
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1.47217 14.1714H14.5282V16.0002H1.47217V14.1714Z", fill: "#00C5FF" }),
|
|
750
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1.47217 0H8.93297V1.8288H1.47217V0Z", fill: "#FFF152" }),
|
|
751
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
752
|
-
"path",
|
|
753
|
-
{
|
|
754
|
-
d: "M12.663 3.6568V1.8288H10.7974V0H8.93262V5.4856H14.5278V3.6568",
|
|
755
|
-
fill: "#FF5B5B"
|
|
756
|
-
}
|
|
757
|
-
),
|
|
758
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12.6631 7.31464V5.48584H14.5279", fill: "#551C99" }),
|
|
759
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
760
|
-
"path",
|
|
761
|
-
{
|
|
762
|
-
clipRule: "evenodd",
|
|
763
|
-
d: "M8.93298 0V1.8288H7.06738",
|
|
764
|
-
fill: "#999131",
|
|
765
|
-
fillRule: "evenodd"
|
|
766
|
-
}
|
|
767
|
-
)
|
|
768
|
-
] }),
|
|
769
|
-
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "clip0_4197_15218", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "16", width: "16" }) }) })
|
|
770
|
-
]
|
|
771
|
-
}
|
|
772
|
-
);
|
|
773
749
|
const PlayButton = ({ className, isPlaying, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
774
750
|
WithAudioPlayback.Button,
|
|
775
751
|
{
|
|
@@ -780,7 +756,7 @@ const PlayButton = ({ className, isPlaying, ...props }) => /* @__PURE__ */ jsxRu
|
|
|
780
756
|
size: "sm",
|
|
781
757
|
variant: "secondary",
|
|
782
758
|
...props,
|
|
783
|
-
children: isPlaying ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
759
|
+
children: isPlaying ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPauseFill, {}) : /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlayFill, {})
|
|
784
760
|
}
|
|
785
761
|
);
|
|
786
762
|
const Anonymous$b = "Anonym";
|
|
@@ -8519,7 +8495,7 @@ const LoadingChannels = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className
|
|
|
8519
8495
|
/* @__PURE__ */ jsxRuntime.jsx(LoadingItems, {}),
|
|
8520
8496
|
/* @__PURE__ */ jsxRuntime.jsx(LoadingItems, {})
|
|
8521
8497
|
] });
|
|
8522
|
-
const LoadingIndicator = (props) => /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
8498
|
+
const LoadingIndicator = (props) => /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconLoading, { ...props, className: "str-chat__loading-indicator" });
|
|
8523
8499
|
const UnMemoizedCustomNotification = (props) => {
|
|
8524
8500
|
const { active, children, className, type } = props;
|
|
8525
8501
|
if (!active) return null;
|
|
@@ -8927,7 +8903,7 @@ const useUserRole = (message, onlySenderCanEdit, disableQuotedMessages) => {
|
|
|
8927
8903
|
const isOwner = channel.state.membership.role === "owner";
|
|
8928
8904
|
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";
|
|
8929
8905
|
const isMyMessage = client.userID === message.user?.id;
|
|
8930
|
-
const canEdit = !message.poll && (!onlySenderCanEdit && channelCapabilities["update-any-message"] || isMyMessage && channelCapabilities["update-own-message"]);
|
|
8906
|
+
const canEdit = !message.poll && message.command !== "giphy" && (!onlySenderCanEdit && channelCapabilities["update-any-message"] || isMyMessage && channelCapabilities["update-own-message"]);
|
|
8931
8907
|
const canDelete = channelCapabilities["delete-any-message"] || isMyMessage && channelCapabilities["delete-own-message"];
|
|
8932
8908
|
const canFlag = !isMyMessage && channelCapabilities["flag-message"];
|
|
8933
8909
|
const canMute = !isMyMessage && channelCapabilities["mute-channel"];
|
|
@@ -9231,7 +9207,7 @@ const DefaultCalloutDialog = ({ children, className, onClose }) => /* @__PURE__
|
|
|
9231
9207
|
onClick: onClose,
|
|
9232
9208
|
size: "sm",
|
|
9233
9209
|
variant: "secondary",
|
|
9234
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
9210
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
9235
9211
|
}
|
|
9236
9212
|
)
|
|
9237
9213
|
] });
|
|
@@ -9301,7 +9277,7 @@ const Avatar = ({
|
|
|
9301
9277
|
}
|
|
9302
9278
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9303
9279
|
!!sizeAwareInitials.length && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__avatar-initials", "data-testid": "avatar-fallback", children: sizeAwareInitials }),
|
|
9304
|
-
!sizeAwareInitials.length && /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
9280
|
+
!sizeAwareInitials.length && /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconUser, {})
|
|
9305
9281
|
] })
|
|
9306
9282
|
]
|
|
9307
9283
|
}
|
|
@@ -9330,7 +9306,7 @@ const ErrorBadge = ({
|
|
|
9330
9306
|
className,
|
|
9331
9307
|
size = "sm",
|
|
9332
9308
|
...rest
|
|
9333
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...rest, className, size, variant: "error", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
9309
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...rest, className, size, variant: "error", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationMarkFill, {}) });
|
|
9334
9310
|
function AvatarStack({
|
|
9335
9311
|
badgeSize,
|
|
9336
9312
|
component: Component = "div",
|
|
@@ -9946,7 +9922,7 @@ const PromptHeader = ({ className, close, description, title }) => /* @__PURE__
|
|
|
9946
9922
|
onClick: close,
|
|
9947
9923
|
size: "sm",
|
|
9948
9924
|
variant: "secondary",
|
|
9949
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
9925
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
9950
9926
|
}
|
|
9951
9927
|
)
|
|
9952
9928
|
] });
|
|
@@ -10015,7 +9991,7 @@ const ViewerHeader = ({
|
|
|
10015
9991
|
onClick: close,
|
|
10016
9992
|
size: "sm",
|
|
10017
9993
|
variant: "secondary",
|
|
10018
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
9994
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
10019
9995
|
}
|
|
10020
9996
|
)
|
|
10021
9997
|
] });
|
|
@@ -10152,7 +10128,7 @@ function MessageBouncePrompt({ children }) {
|
|
|
10152
10128
|
Alert.Header,
|
|
10153
10129
|
{
|
|
10154
10130
|
className: "str-chat__message-bounce-alert-header",
|
|
10155
|
-
Icon: WithAudioPlayback.
|
|
10131
|
+
Icon: WithAudioPlayback.IconExclamationMark,
|
|
10156
10132
|
title: !children ? t("This message did not meet our content guidelines") : void 0,
|
|
10157
10133
|
children
|
|
10158
10134
|
}
|
|
@@ -10203,7 +10179,7 @@ const MessageBubble = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.js
|
|
|
10203
10179
|
const MessageDeletedBubble = () => {
|
|
10204
10180
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
10205
10181
|
return /* @__PURE__ */ jsxRuntime.jsx(MessageBubble, { "data-testid": "message-deleted-bubble", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__message-text", children: [
|
|
10206
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
10182
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconNoSign, {}),
|
|
10207
10183
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("Message deleted") })
|
|
10208
10184
|
] }) });
|
|
10209
10185
|
};
|
|
@@ -10346,7 +10322,7 @@ const MessageAlsoSentInChannelIndicator = () => {
|
|
|
10346
10322
|
};
|
|
10347
10323
|
if (!message?.show_in_channel) return null;
|
|
10348
10324
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__message-also-sent-in-channel", role: "status", children: [
|
|
10349
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
10325
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconArrowUpRight, {}),
|
|
10350
10326
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: threadList ? t("Also sent in channel") : t("Replied to a thread") }),
|
|
10351
10327
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: " · " }),
|
|
10352
10328
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10560,7 +10536,7 @@ const UnMemoizedMessageStatus = (props) => {
|
|
|
10560
10536
|
children: t("Delivered")
|
|
10561
10537
|
}
|
|
10562
10538
|
),
|
|
10563
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
10539
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconChecks, { className: "str-chat__message-status-delivered" })
|
|
10564
10540
|
] })),
|
|
10565
10541
|
read && (MessageReadStatus ? /* @__PURE__ */ jsxRuntime.jsx(MessageReadStatus, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10566
10542
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10572,7 +10548,7 @@ const UnMemoizedMessageStatus = (props) => {
|
|
|
10572
10548
|
children: WithAudioPlayback.getReadByTooltipText(readBy, t, client, tooltipUserNameMapper)
|
|
10573
10549
|
}
|
|
10574
10550
|
),
|
|
10575
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
10551
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconChecks, { className: "str-chat__message-status-read" }),
|
|
10576
10552
|
readersWithoutOwnUser.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10577
10553
|
"span",
|
|
10578
10554
|
{
|
|
@@ -11196,6 +11172,7 @@ const useSubmitHandler = (props) => {
|
|
|
11196
11172
|
if (messageComposer.editedMessage && localMessage.type !== "error") {
|
|
11197
11173
|
try {
|
|
11198
11174
|
await editMessage(localMessage, sendOptions);
|
|
11175
|
+
discardPreEditSnapshot(messageComposer);
|
|
11199
11176
|
messageComposer.clear();
|
|
11200
11177
|
} catch (err) {
|
|
11201
11178
|
client.notifications.addError({
|
|
@@ -12064,7 +12041,7 @@ const ImagePlaceholder = ({ className }) => {
|
|
|
12064
12041
|
className: clsx("str-chat__image-placeholder", className),
|
|
12065
12042
|
"data-testid": "str-chat__base-image-placeholder",
|
|
12066
12043
|
role: "img",
|
|
12067
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
12044
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconImage, {})
|
|
12068
12045
|
}
|
|
12069
12046
|
);
|
|
12070
12047
|
};
|
|
@@ -13126,16 +13103,16 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13126
13103
|
};
|
|
13127
13104
|
if (!groupedAttachments.total) return result;
|
|
13128
13105
|
if (groupedAttachments.polls.length > 0)
|
|
13129
|
-
return { ...result, Icon: WithAudioPlayback.
|
|
13106
|
+
return { ...result, Icon: WithAudioPlayback.IconPoll, previewType: "poll" };
|
|
13130
13107
|
if (groupedAttachments.locations.length > 0)
|
|
13131
|
-
return { ...result, Icon: WithAudioPlayback.
|
|
13108
|
+
return { ...result, Icon: WithAudioPlayback.IconLocation, previewType: "location" };
|
|
13132
13109
|
if (groupedAttachments.giphies.length > 0 && groupedAttachments.giphies.length === groupedAttachments.total) {
|
|
13133
13110
|
const giphyAttachment = groupedAttachments.giphies[0];
|
|
13134
13111
|
const giphyVersion = giphyAttachment.giphy?.[giphyVersionName];
|
|
13135
13112
|
const src = giphyVersion?.url || giphyAttachment.thumb_url || giphyAttachment.image_url || "";
|
|
13136
13113
|
return {
|
|
13137
13114
|
...result,
|
|
13138
|
-
Icon: WithAudioPlayback.
|
|
13115
|
+
Icon: WithAudioPlayback.IconFile,
|
|
13139
13116
|
PreviewImage: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13140
13117
|
BaseImage,
|
|
13141
13118
|
{
|
|
@@ -13152,7 +13129,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13152
13129
|
const fileAttachment = groupedAttachments.documents[0];
|
|
13153
13130
|
return {
|
|
13154
13131
|
...result,
|
|
13155
|
-
Icon: WithAudioPlayback.
|
|
13132
|
+
Icon: WithAudioPlayback.IconFile,
|
|
13156
13133
|
PreviewImage: /* @__PURE__ */ jsxRuntime.jsx(FileIcon, { fileName: fileAttachment.title, mimeType: fileAttachment.mime_type }),
|
|
13157
13134
|
previewType: "file"
|
|
13158
13135
|
};
|
|
@@ -13161,7 +13138,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13161
13138
|
const linkAttachment = groupedAttachments.links[0];
|
|
13162
13139
|
return {
|
|
13163
13140
|
...result,
|
|
13164
|
-
Icon: WithAudioPlayback.
|
|
13141
|
+
Icon: WithAudioPlayback.IconLink,
|
|
13165
13142
|
PreviewImage: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13166
13143
|
BaseImage,
|
|
13167
13144
|
{
|
|
@@ -13189,7 +13166,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13189
13166
|
title: videoAttachment.title
|
|
13190
13167
|
}
|
|
13191
13168
|
),
|
|
13192
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__attachment-preview__thumbnail__play-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
13169
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__attachment-preview__thumbnail__play-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlayFill, {}) })
|
|
13193
13170
|
] }),
|
|
13194
13171
|
previewType: "video"
|
|
13195
13172
|
};
|
|
@@ -13198,7 +13175,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13198
13175
|
const imageAttachment = groupedAttachments.images[0];
|
|
13199
13176
|
return {
|
|
13200
13177
|
...result,
|
|
13201
|
-
Icon: WithAudioPlayback.
|
|
13178
|
+
Icon: WithAudioPlayback.IconVideoFill,
|
|
13202
13179
|
PreviewImage: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13203
13180
|
BaseImage,
|
|
13204
13181
|
{
|
|
@@ -13212,8 +13189,8 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
13212
13189
|
};
|
|
13213
13190
|
}
|
|
13214
13191
|
if (groupedAttachments.voiceRecordings.length === groupedAttachments.total)
|
|
13215
|
-
return { ...result, Icon: WithAudioPlayback.
|
|
13216
|
-
return { ...result, Icon: WithAudioPlayback.
|
|
13192
|
+
return { ...result, Icon: WithAudioPlayback.IconVoice, previewType: "voice" };
|
|
13193
|
+
return { ...result, Icon: WithAudioPlayback.IconFile, previewType: "mixed" };
|
|
13217
13194
|
};
|
|
13218
13195
|
const QuotedMessagePreview = ({
|
|
13219
13196
|
getQuotedMessageAuthor,
|
|
@@ -13364,7 +13341,7 @@ const reminderStateSelector = (state) => ({
|
|
|
13364
13341
|
function SavedForLaterContent() {
|
|
13365
13342
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
13366
13343
|
return /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "str-chat__message-saved-for-later", children: [
|
|
13367
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
13344
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconSave, {}),
|
|
13368
13345
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("Saved for later") })
|
|
13369
13346
|
] });
|
|
13370
13347
|
}
|
|
@@ -13408,7 +13385,7 @@ function RemindMeContent({ reminder }) {
|
|
|
13408
13385
|
});
|
|
13409
13386
|
};
|
|
13410
13387
|
return /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "str-chat__message-reminder", children: [
|
|
13411
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
13388
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconBell, {}),
|
|
13412
13389
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("Reminder set") }),
|
|
13413
13390
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: " · " }),
|
|
13414
13391
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "str-chat__message-reminder__time-left", children: renderTime() })
|
|
@@ -13586,15 +13563,7 @@ const SwitchField = ({
|
|
|
13586
13563
|
ref: inputRef
|
|
13587
13564
|
}
|
|
13588
13565
|
),
|
|
13589
|
-
title ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
13590
|
-
SwitchFieldLabel,
|
|
13591
|
-
{
|
|
13592
|
-
description,
|
|
13593
|
-
htmlFor: id,
|
|
13594
|
-
onClick: () => inputRef.current?.click(),
|
|
13595
|
-
title
|
|
13596
|
-
}
|
|
13597
|
-
) : children,
|
|
13566
|
+
title ? /* @__PURE__ */ jsxRuntime.jsx(SwitchFieldLabel, { description, htmlFor: id, title }) : children,
|
|
13598
13567
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13599
13568
|
Switch,
|
|
13600
13569
|
{
|
|
@@ -14121,10 +14090,10 @@ const TextInput = React.forwardRef(function TextInput2({
|
|
|
14121
14090
|
const displayMessage = displayError || displaySuccess || displayNeutralMessage;
|
|
14122
14091
|
const messageId = displayMessage ? `${id}-message` : void 0;
|
|
14123
14092
|
const messageContent = displayError ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14124
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: errorMessageIcon ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
14093
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: errorMessageIcon ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationMark, {}) }),
|
|
14125
14094
|
errorMessage ?? message
|
|
14126
14095
|
] }) : displaySuccess ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14127
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: successMessageIcon ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
14096
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: successMessageIcon ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconCheckmark, {}) }),
|
|
14128
14097
|
successMessage
|
|
14129
14098
|
] }) : displayNeutralMessage ? message : null;
|
|
14130
14099
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -14653,7 +14622,7 @@ const PollVoteTimestamp = ({ timestamp }) => {
|
|
|
14653
14622
|
const PollVoteAuthor = ({ vote }) => {
|
|
14654
14623
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
14655
14624
|
const { client } = WithAudioPlayback.useChatContext();
|
|
14656
|
-
const displayName = client.user?.id && client.user.id === vote.user?.id ? t("You") : vote.user?.name || t("Anonymous");
|
|
14625
|
+
const displayName = client.user?.id && client.user.id === vote.user?.id ? t("You") : vote.user?.name || vote.user?.id || t("Anonymous");
|
|
14657
14626
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__poll-vote__author", children: [
|
|
14658
14627
|
vote.user && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14659
14628
|
Avatar,
|
|
@@ -15568,7 +15537,7 @@ const OptionFieldSet = () => {
|
|
|
15568
15537
|
className: "str-chat__form__input-field__value",
|
|
15569
15538
|
error: !!error,
|
|
15570
15539
|
id: option.id,
|
|
15571
|
-
leading: draggable ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
15540
|
+
leading: draggable ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconReorder, { className: "str-chat__drag-handle" }) : void 0,
|
|
15572
15541
|
message: error ? /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "poll-option-input-field-error", children: knownValidationErrors[error] ?? t("Error") }) : void 0,
|
|
15573
15542
|
onBlur: () => {
|
|
15574
15543
|
pollComposer.handleFieldBlur("options");
|
|
@@ -15607,7 +15576,7 @@ const RemoveOptionButton = ({ className, ...props }) => /* @__PURE__ */ jsxRunti
|
|
|
15607
15576
|
size: "sm",
|
|
15608
15577
|
variant: "secondary",
|
|
15609
15578
|
...props,
|
|
15610
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
15579
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconMinusCircle, {})
|
|
15611
15580
|
}
|
|
15612
15581
|
);
|
|
15613
15582
|
const PollCreationDialogControls = ({
|
|
@@ -15643,7 +15612,7 @@ const PollCreationDialogControls = ({
|
|
|
15643
15612
|
},
|
|
15644
15613
|
type: "submit",
|
|
15645
15614
|
children: [
|
|
15646
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
15615
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconSend, {}),
|
|
15647
15616
|
t("Send poll")
|
|
15648
15617
|
]
|
|
15649
15618
|
}
|
|
@@ -15725,12 +15694,12 @@ const AttachmentSelectorContextProvider = ({
|
|
|
15725
15694
|
}) => /* @__PURE__ */ jsxRuntime.jsx(AttachmentSelectorContext.Provider, { value, children });
|
|
15726
15695
|
const useAttachmentSelectorContext = () => React.useContext(AttachmentSelectorContext);
|
|
15727
15696
|
const icons = {
|
|
15728
|
-
ban: WithAudioPlayback.
|
|
15729
|
-
flag: WithAudioPlayback.
|
|
15730
|
-
giphy: IconGiphy,
|
|
15697
|
+
ban: WithAudioPlayback.IconUserRemove,
|
|
15698
|
+
flag: WithAudioPlayback.IconFlag,
|
|
15699
|
+
giphy: WithAudioPlayback.IconGiphy,
|
|
15731
15700
|
mute: WithAudioPlayback.IconMute,
|
|
15732
|
-
unban: WithAudioPlayback.
|
|
15733
|
-
unmute: WithAudioPlayback.
|
|
15701
|
+
unban: WithAudioPlayback.IconUserAdd,
|
|
15702
|
+
unmute: WithAudioPlayback.IconAudio
|
|
15734
15703
|
};
|
|
15735
15704
|
const CommandsMenuClassName = "str-chat__context-menu--commands";
|
|
15736
15705
|
const CommandsSubmenuHeader = () => {
|
|
@@ -15822,7 +15791,7 @@ const AttachmentSelectorMenuInitButtonIcon = ({ className }) => {
|
|
|
15822
15791
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className, children: /* @__PURE__ */ jsxRuntime.jsx(AttachmentSelectorInitiationButtonContents, {}) });
|
|
15823
15792
|
}
|
|
15824
15793
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15825
|
-
WithAudioPlayback.
|
|
15794
|
+
WithAudioPlayback.IconPlus,
|
|
15826
15795
|
{
|
|
15827
15796
|
className: clsx("str-chat__attachment-selector__menu-button__icon", className)
|
|
15828
15797
|
}
|
|
@@ -15885,7 +15854,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15885
15854
|
{
|
|
15886
15855
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__create-poll-button",
|
|
15887
15856
|
hasSubMenu: hasSubmenu,
|
|
15888
|
-
Icon: WithAudioPlayback.
|
|
15857
|
+
Icon: WithAudioPlayback.IconCommand,
|
|
15889
15858
|
onClick: () => {
|
|
15890
15859
|
if (!hasSubmenu) return;
|
|
15891
15860
|
openSubmenu({
|
|
@@ -15906,7 +15875,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15906
15875
|
ContextMenuButton,
|
|
15907
15876
|
{
|
|
15908
15877
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__upload-file-button",
|
|
15909
|
-
Icon: WithAudioPlayback.
|
|
15878
|
+
Icon: WithAudioPlayback.IconAttachment,
|
|
15910
15879
|
onClick: () => {
|
|
15911
15880
|
fileInput?.click();
|
|
15912
15881
|
closeMenu();
|
|
@@ -15922,7 +15891,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15922
15891
|
ContextMenuButton,
|
|
15923
15892
|
{
|
|
15924
15893
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__add-location-button",
|
|
15925
|
-
Icon: WithAudioPlayback.
|
|
15894
|
+
Icon: WithAudioPlayback.IconLocation,
|
|
15926
15895
|
onClick: () => {
|
|
15927
15896
|
openModalForAction("addLocation");
|
|
15928
15897
|
closeMenu();
|
|
@@ -15938,7 +15907,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15938
15907
|
ContextMenuButton,
|
|
15939
15908
|
{
|
|
15940
15909
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__create-poll-button",
|
|
15941
|
-
Icon: WithAudioPlayback.
|
|
15910
|
+
Icon: WithAudioPlayback.IconPoll,
|
|
15942
15911
|
onClick: () => {
|
|
15943
15912
|
openModalForAction("createPoll");
|
|
15944
15913
|
closeMenu();
|
|
@@ -16271,7 +16240,7 @@ const FileAttachmentPreview = ({
|
|
|
16271
16240
|
uploadState === "uploading" && /* @__PURE__ */ jsxRuntime.jsx(LoadingIndicatorIcon, {}),
|
|
16272
16241
|
!hasError && /* @__PURE__ */ jsxRuntime.jsx(FileSizeIndicator, { fileSize: attachment.file_size }),
|
|
16273
16242
|
hasFatalError && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__attachment-preview-file__fatal-error", children: [
|
|
16274
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16243
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationMark, {}),
|
|
16275
16244
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: hasSizeLimitError ? t("File too large") : uploadState === "blocked" ? t("Upload blocked") : t("Upload failed") })
|
|
16276
16245
|
] }),
|
|
16277
16246
|
hasRetriableError && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__attachment-preview-file__retriable-error", children: [
|
|
@@ -16827,7 +16796,7 @@ const AudioAttachmentPreview = ({
|
|
|
16827
16796
|
}
|
|
16828
16797
|
)
|
|
16829
16798
|
] }) : hasFatalError ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__attachment-preview-file__fatal-error", children: [
|
|
16830
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16799
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationMark, {}),
|
|
16831
16800
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: hasSizeLimitError ? t("File too large") : uploadState === "blocked" ? t("Upload blocked") : t("Upload failed") })
|
|
16832
16801
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__attachment-preview-file__retriable-error", children: [
|
|
16833
16802
|
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationTriangle, {}),
|
|
@@ -16926,10 +16895,10 @@ const MediaAttachmentPreview = ({
|
|
|
16926
16895
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx("str-chat__attachment-preview-media__overlay"), children: [
|
|
16927
16896
|
isUploading && /* @__PURE__ */ jsxRuntime.jsx(LoadingIndicator2, {}),
|
|
16928
16897
|
streamChat.isVideoAttachment(attachment) && !hasUploadError && uploadState !== "uploading" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__attachment-preview-media__video-indicator", children: [
|
|
16929
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16898
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconVideoFill, {}),
|
|
16930
16899
|
attachment.duration && /* @__PURE__ */ jsxRuntime.jsx("div", { children: attachment.duration })
|
|
16931
16900
|
] }),
|
|
16932
|
-
hasFatalError && /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16901
|
+
hasFatalError && /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationMark, {}),
|
|
16933
16902
|
hasRetriableError && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16934
16903
|
WithAudioPlayback.Button,
|
|
16935
16904
|
{
|
|
@@ -16941,7 +16910,7 @@ const MediaAttachmentPreview = ({
|
|
|
16941
16910
|
onClick: retry,
|
|
16942
16911
|
size: "sm",
|
|
16943
16912
|
variant: "danger",
|
|
16944
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16913
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconRetry, {})
|
|
16945
16914
|
}
|
|
16946
16915
|
)
|
|
16947
16916
|
] })
|
|
@@ -17012,7 +16981,7 @@ const GalleryHeader = ({ currentItem }) => {
|
|
|
17012
16981
|
className: "str-chat__gallery__action-button str-chat__gallery__action-button--close",
|
|
17013
16982
|
onClick: modalContext.close,
|
|
17014
16983
|
title: t("Close"),
|
|
17015
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16984
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
17016
16985
|
}
|
|
17017
16986
|
) : null
|
|
17018
16987
|
] })
|
|
@@ -17059,9 +17028,9 @@ const VideoThumbnail = ({
|
|
|
17059
17028
|
onClick: onPlay,
|
|
17060
17029
|
size: "lg",
|
|
17061
17030
|
variant: "secondary",
|
|
17062
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17031
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlayFill, {})
|
|
17063
17032
|
}
|
|
17064
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment__video-thumbnail__play-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17033
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment__video-thumbnail__play-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlayFill, {}) })
|
|
17065
17034
|
] });
|
|
17066
17035
|
};
|
|
17067
17036
|
const SWIPE_THRESHOLD = 50;
|
|
@@ -17475,7 +17444,7 @@ const CommandChip = ({ command }) => {
|
|
|
17475
17444
|
const { textareaRef } = WithAudioPlayback.useMessageComposerContext();
|
|
17476
17445
|
if (!command) return null;
|
|
17477
17446
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__command-chip", children: [
|
|
17478
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17447
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconBolt, {}),
|
|
17479
17448
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: command.name }),
|
|
17480
17449
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17481
17450
|
"button",
|
|
@@ -17485,7 +17454,7 @@ const CommandChip = ({ command }) => {
|
|
|
17485
17454
|
textComposer.setCommand(null);
|
|
17486
17455
|
textareaRef.current?.focus();
|
|
17487
17456
|
},
|
|
17488
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17457
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
17489
17458
|
}
|
|
17490
17459
|
)
|
|
17491
17460
|
] });
|
|
@@ -17550,7 +17519,7 @@ const LinkPreviewCard = ({ linkPreview }) => {
|
|
|
17550
17519
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__link-preview-card__content-title", children: linkPreview.title }),
|
|
17551
17520
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__link-preview-card__content-description", children: linkPreview.text }),
|
|
17552
17521
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__link-preview-card__content__url", children: [
|
|
17553
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17522
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconLink, {}),
|
|
17554
17523
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: linkPreview.og_scrape_url })
|
|
17555
17524
|
] })
|
|
17556
17525
|
] }),
|
|
@@ -17628,7 +17597,7 @@ const AudioRecordingPlayback = ({
|
|
|
17628
17597
|
onClick: audioPlayer.togglePlay,
|
|
17629
17598
|
size: "sm",
|
|
17630
17599
|
variant: "secondary",
|
|
17631
|
-
children: isPlaying ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17600
|
+
children: isPlaying ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPauseFill, {}) : /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlayFill, {})
|
|
17632
17601
|
}
|
|
17633
17602
|
),
|
|
17634
17603
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17746,7 +17715,7 @@ const AudioRecordingPreview = () => {
|
|
|
17746
17715
|
};
|
|
17747
17716
|
}, [recorder, startCounter, stopCounter]);
|
|
17748
17717
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__audio-recorder__recording-preview", children: [
|
|
17749
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17718
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconVoice, {}),
|
|
17750
17719
|
/* @__PURE__ */ jsxRuntime.jsx(RecordingTimer, { durationSeconds: secondsElapsed }),
|
|
17751
17720
|
/* @__PURE__ */ jsxRuntime.jsx(AudioRecordingWaveform, {})
|
|
17752
17721
|
] });
|
|
@@ -17766,7 +17735,7 @@ const ToggleRecordingButton = () => {
|
|
|
17766
17735
|
onClick: () => isRecording(recordingState) ? recorder?.pause() : recorder?.resume(),
|
|
17767
17736
|
size: "sm",
|
|
17768
17737
|
variant: "secondary",
|
|
17769
|
-
children: isRecording(recordingState) ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17738
|
+
children: isRecording(recordingState) ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPauseFill, {}) : /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconVoice, {})
|
|
17770
17739
|
}
|
|
17771
17740
|
);
|
|
17772
17741
|
};
|
|
@@ -17801,7 +17770,7 @@ const AudioRecorderRecordingControls = () => {
|
|
|
17801
17770
|
},
|
|
17802
17771
|
size: "sm",
|
|
17803
17772
|
variant: "secondary",
|
|
17804
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17773
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconDelete, {})
|
|
17805
17774
|
}
|
|
17806
17775
|
),
|
|
17807
17776
|
/* @__PURE__ */ jsxRuntime.jsx(ToggleRecordingButton, {}),
|
|
@@ -17898,7 +17867,7 @@ const DefaultStartRecordingAudioButton = React.forwardRef(function StartRecordin
|
|
|
17898
17867
|
variant: "secondary",
|
|
17899
17868
|
...props,
|
|
17900
17869
|
ref,
|
|
17901
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17870
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconVoice, {})
|
|
17902
17871
|
}
|
|
17903
17872
|
);
|
|
17904
17873
|
});
|
|
@@ -17939,7 +17908,7 @@ const SendToChannelCheckbox = () => {
|
|
|
17939
17908
|
type: "checkbox"
|
|
17940
17909
|
}
|
|
17941
17910
|
),
|
|
17942
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "str-chat__send-to-channel-checkbox__visual", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "str-chat__send-to-channel-checkbox__checkmark", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17911
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "str-chat__send-to-channel-checkbox__visual", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "str-chat__send-to-channel-checkbox__checkmark", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconCheckmark, {}) }) }),
|
|
17943
17912
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "str-chat__send-to-channel-checkbox__label", children: labelText })
|
|
17944
17913
|
]
|
|
17945
17914
|
}
|
|
@@ -18599,7 +18568,7 @@ const FileDragAndDropContent = ({
|
|
|
18599
18568
|
}) => {
|
|
18600
18569
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
18601
18570
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__dropzone-container__content", children: isDragRejected ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: t("Some of the files will not be accepted") }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18602
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
18571
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconUpload, {}),
|
|
18603
18572
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("Drag your files here") })
|
|
18604
18573
|
] }) });
|
|
18605
18574
|
};
|
|
@@ -18635,7 +18604,7 @@ const SendButton = ({ children, sendMessage, ...rest }) => {
|
|
|
18635
18604
|
size: "sm",
|
|
18636
18605
|
variant: "primary",
|
|
18637
18606
|
...rest,
|
|
18638
|
-
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
18607
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconSend, {})
|
|
18639
18608
|
}
|
|
18640
18609
|
);
|
|
18641
18610
|
};
|
|
@@ -18671,7 +18640,7 @@ const MessageComposerActions = () => {
|
|
|
18671
18640
|
const stopGenerating = React.useCallback(() => channel?.stopAIResponse(), [channel]);
|
|
18672
18641
|
const shouldDisplayStopAIGeneration = [AIStates.Thinking, AIStates.Generating].includes(aiState) && !!StopAIGenerationButton$1;
|
|
18673
18642
|
const recordingEnabled = !!(recordingController.recorder && navigator.mediaDevices);
|
|
18674
|
-
let content = SendButton$1 ? /* @__PURE__ */ jsxRuntime.jsx(SendButton$1, { sendMessage: handleSubmit }) : /* @__PURE__ */ jsxRuntime.jsx(SendButton, { sendMessage: handleSubmit, children: editedMessage || command ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
18643
|
+
let content = SendButton$1 ? /* @__PURE__ */ jsxRuntime.jsx(SendButton$1, { sendMessage: handleSubmit }) : /* @__PURE__ */ jsxRuntime.jsx(SendButton, { sendMessage: handleSubmit, children: editedMessage || command ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconCheckmark, {}) : /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconSend, {}) });
|
|
18675
18644
|
if (shouldDisplayStopAIGeneration) {
|
|
18676
18645
|
content = /* @__PURE__ */ jsxRuntime.jsx(StopAIGenerationButton$1, { onClick: stopGenerating });
|
|
18677
18646
|
} else if (hideSendButton) return null;
|
|
@@ -18687,7 +18656,7 @@ const AdditionalMessageComposerActions = () => {
|
|
|
18687
18656
|
const isCooldownActive = WithAudioPlayback.useIsCooldownActive();
|
|
18688
18657
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-composer__additional-actions", children: !isCooldownActive && EmojiPicker ? /* @__PURE__ */ jsxRuntime.jsx(EmojiPicker, {}) : null });
|
|
18689
18658
|
};
|
|
18690
|
-
const GeolocationPreviewImage = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__location-preview-image", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
18659
|
+
const GeolocationPreviewImage = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__location-preview-image", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconLocation, {}) });
|
|
18691
18660
|
const GeolocationPreview = ({
|
|
18692
18661
|
location,
|
|
18693
18662
|
PreviewImage = GeolocationPreviewImage,
|
|
@@ -18780,7 +18749,7 @@ const MessageComposerPreviews = () => {
|
|
|
18780
18749
|
{
|
|
18781
18750
|
message: editedMessage,
|
|
18782
18751
|
onCancel: () => {
|
|
18783
|
-
messageComposer
|
|
18752
|
+
restorePreEditSnapshot(messageComposer);
|
|
18784
18753
|
}
|
|
18785
18754
|
}
|
|
18786
18755
|
) }) : /* @__PURE__ */ jsxRuntime.jsx(QuotedMessagePreview$1, {}),
|
|
@@ -19223,7 +19192,7 @@ const useChat = ({
|
|
|
19223
19192
|
};
|
|
19224
19193
|
React.useEffect(() => {
|
|
19225
19194
|
if (!client) return;
|
|
19226
|
-
const version = "14.0.0-beta.
|
|
19195
|
+
const version = "14.0.0-beta.5";
|
|
19227
19196
|
const userAgent = client.getUserAgent();
|
|
19228
19197
|
if (!userAgent.includes("stream-chat-react")) {
|
|
19229
19198
|
client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
|
|
@@ -19357,7 +19326,7 @@ const ThreadHeaderSubtitle = ({
|
|
|
19357
19326
|
) });
|
|
19358
19327
|
};
|
|
19359
19328
|
const ThreadHeader = (props) => {
|
|
19360
|
-
const { closeThread, MenuIcon = WithAudioPlayback.
|
|
19329
|
+
const { closeThread, MenuIcon = WithAudioPlayback.IconSidebar, overrideTitle, thread } = props;
|
|
19361
19330
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
19362
19331
|
const { channel } = WithAudioPlayback.useChannelStateContext();
|
|
19363
19332
|
const { activeChatView } = WithAudioPlayback.useChatViewContext();
|
|
@@ -19367,7 +19336,7 @@ const ThreadHeader = (props) => {
|
|
|
19367
19336
|
const replyCount = threadInstance ? replyCountThreadInstance : thread ? thread.reply_count ?? 0 : 0;
|
|
19368
19337
|
const threadDisplayName = overrideTitle ?? channelDisplayTitle ?? displayNameFromParentMessage(thread) ?? void 0;
|
|
19369
19338
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__thread-header", children: [
|
|
19370
|
-
activeChatView === "threads" && /* @__PURE__ */ jsxRuntime.jsx(ToggleSidebarButton, { canCollapse: !!threadInstance, mode: "expand", children: /* @__PURE__ */ jsxRuntime.jsx(MenuIcon, {}) }),
|
|
19339
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__thread-header__start", children: activeChatView === "threads" && /* @__PURE__ */ jsxRuntime.jsx(ToggleSidebarButton, { canCollapse: !!threadInstance, mode: "expand", children: /* @__PURE__ */ jsxRuntime.jsx(MenuIcon, {}) }) }),
|
|
19371
19340
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__thread-header-details", children: [
|
|
19372
19341
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__thread-header-title", children: t("Thread") }),
|
|
19373
19342
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -19379,7 +19348,7 @@ const ThreadHeader = (props) => {
|
|
|
19379
19348
|
}
|
|
19380
19349
|
)
|
|
19381
19350
|
] }),
|
|
19382
|
-
!threadInstance && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19351
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__thread-header__end", children: !threadInstance && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19383
19352
|
WithAudioPlayback.Button,
|
|
19384
19353
|
{
|
|
19385
19354
|
appearance: "ghost",
|
|
@@ -19390,9 +19359,9 @@ const ThreadHeader = (props) => {
|
|
|
19390
19359
|
onClick: closeThread,
|
|
19391
19360
|
size: "md",
|
|
19392
19361
|
variant: "secondary",
|
|
19393
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
19362
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
19394
19363
|
}
|
|
19395
|
-
)
|
|
19364
|
+
) })
|
|
19396
19365
|
] });
|
|
19397
19366
|
};
|
|
19398
19367
|
const threadStateSelector = ({ replyCount }) => ({
|
|
@@ -19698,7 +19667,7 @@ const ReactionSelector = (props) => {
|
|
|
19698
19667
|
onClick: () => setExtendedListOpen(true),
|
|
19699
19668
|
size: "sm",
|
|
19700
19669
|
variant: "secondary",
|
|
19701
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
19670
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlus, {})
|
|
19702
19671
|
}
|
|
19703
19672
|
)
|
|
19704
19673
|
] }),
|
|
@@ -19879,7 +19848,7 @@ const DefaultMessageActionComponents = {
|
|
|
19879
19848
|
"aria-label": t("aria/Open Thread"),
|
|
19880
19849
|
className: msgActionsBoxButtonClassName,
|
|
19881
19850
|
"data-testid": "thread-action",
|
|
19882
|
-
Icon: WithAudioPlayback.
|
|
19851
|
+
Icon: WithAudioPlayback.IconThread,
|
|
19883
19852
|
onClick: (e) => {
|
|
19884
19853
|
handleOpenThread(e);
|
|
19885
19854
|
closeMenu();
|
|
@@ -19906,7 +19875,7 @@ const DefaultMessageActionComponents = {
|
|
|
19906
19875
|
{
|
|
19907
19876
|
"aria-label": t("aria/Quote Message"),
|
|
19908
19877
|
className: msgActionsBoxButtonClassName,
|
|
19909
|
-
Icon: WithAudioPlayback.
|
|
19878
|
+
Icon: WithAudioPlayback.IconQuote,
|
|
19910
19879
|
onClick: () => {
|
|
19911
19880
|
handleQuote();
|
|
19912
19881
|
closeMenu();
|
|
@@ -19943,7 +19912,7 @@ const DefaultMessageActionComponents = {
|
|
|
19943
19912
|
{
|
|
19944
19913
|
"aria-label": t("aria/Copy Message Text"),
|
|
19945
19914
|
className: msgActionsBoxButtonClassName,
|
|
19946
|
-
Icon: WithAudioPlayback.
|
|
19915
|
+
Icon: WithAudioPlayback.IconCopy,
|
|
19947
19916
|
onClick: () => {
|
|
19948
19917
|
if (message.text) navigator.clipboard.writeText(message.text);
|
|
19949
19918
|
closeMenu();
|
|
@@ -19961,7 +19930,7 @@ const DefaultMessageActionComponents = {
|
|
|
19961
19930
|
{
|
|
19962
19931
|
"aria-label": t("aria/Resend Message"),
|
|
19963
19932
|
className: msgActionsBoxButtonClassName,
|
|
19964
|
-
Icon: WithAudioPlayback.
|
|
19933
|
+
Icon: WithAudioPlayback.IconRetry,
|
|
19965
19934
|
onClick: () => {
|
|
19966
19935
|
handleRetry(message);
|
|
19967
19936
|
closeMenu();
|
|
@@ -19980,8 +19949,9 @@ const DefaultMessageActionComponents = {
|
|
|
19980
19949
|
{
|
|
19981
19950
|
"aria-label": t("aria/Edit Message"),
|
|
19982
19951
|
className: msgActionsBoxButtonClassName,
|
|
19983
|
-
Icon: WithAudioPlayback.
|
|
19952
|
+
Icon: WithAudioPlayback.IconEdit,
|
|
19984
19953
|
onClick: () => {
|
|
19954
|
+
savePreEditSnapshot(messageComposer);
|
|
19985
19955
|
messageComposer.initState({ composition: message });
|
|
19986
19956
|
closeMenu();
|
|
19987
19957
|
},
|
|
@@ -19998,7 +19968,7 @@ const DefaultMessageActionComponents = {
|
|
|
19998
19968
|
{
|
|
19999
19969
|
"aria-label": t("aria/Mark Message Unread"),
|
|
20000
19970
|
className: msgActionsBoxButtonClassName,
|
|
20001
|
-
Icon: WithAudioPlayback.
|
|
19971
|
+
Icon: WithAudioPlayback.IconNotification,
|
|
20002
19972
|
onClick: (event) => {
|
|
20003
19973
|
handleMarkUnread(event);
|
|
20004
19974
|
closeMenu();
|
|
@@ -20021,7 +19991,7 @@ const DefaultMessageActionComponents = {
|
|
|
20021
19991
|
"aria-label": reminder ? t("aria/Remind Me Message") : t("aria/Remove Reminder"),
|
|
20022
19992
|
className: msgActionsBoxButtonClassName,
|
|
20023
19993
|
hasSubMenu: !reminder,
|
|
20024
|
-
Icon: reminder ? WithAudioPlayback.IconBellOff : WithAudioPlayback.
|
|
19994
|
+
Icon: reminder ? WithAudioPlayback.IconBellOff : WithAudioPlayback.IconBell,
|
|
20025
19995
|
onClick: () => {
|
|
20026
19996
|
if (reminder) {
|
|
20027
19997
|
client.reminders.deleteReminder(reminder.id);
|
|
@@ -20050,7 +20020,7 @@ const DefaultMessageActionComponents = {
|
|
|
20050
20020
|
{
|
|
20051
20021
|
"aria-label": reminder ? t("aria/Remove Save For Later") : t("aria/Bookmark Message"),
|
|
20052
20022
|
className: msgActionsBoxButtonClassName,
|
|
20053
|
-
Icon: reminder ? WithAudioPlayback.
|
|
20023
|
+
Icon: reminder ? WithAudioPlayback.IconUnsave : WithAudioPlayback.IconSave,
|
|
20054
20024
|
onClick: () => {
|
|
20055
20025
|
if (reminder) client.reminders.deleteReminder(reminder.id);
|
|
20056
20026
|
else client.reminders.createReminder({ messageId: message.id });
|
|
@@ -20069,7 +20039,7 @@ const DefaultMessageActionComponents = {
|
|
|
20069
20039
|
{
|
|
20070
20040
|
"aria-label": t("aria/Flag Message"),
|
|
20071
20041
|
className: msgActionsBoxButtonClassName,
|
|
20072
|
-
Icon: WithAudioPlayback.
|
|
20042
|
+
Icon: WithAudioPlayback.IconFlag,
|
|
20073
20043
|
onClick: (event) => {
|
|
20074
20044
|
handleFlag(event);
|
|
20075
20045
|
closeMenu();
|
|
@@ -20089,7 +20059,7 @@ const DefaultMessageActionComponents = {
|
|
|
20089
20059
|
{
|
|
20090
20060
|
"aria-label": isMuted ? t("aria/Unmute User") : t("aria/Mute User"),
|
|
20091
20061
|
className: msgActionsBoxButtonClassName,
|
|
20092
|
-
Icon: isMuted ? WithAudioPlayback.
|
|
20062
|
+
Icon: isMuted ? WithAudioPlayback.IconAudio : WithAudioPlayback.IconMute,
|
|
20093
20063
|
onClick: (event) => {
|
|
20094
20064
|
handleMute(event);
|
|
20095
20065
|
closeMenu();
|
|
@@ -20112,7 +20082,7 @@ const DefaultMessageActionComponents = {
|
|
|
20112
20082
|
{
|
|
20113
20083
|
"aria-label": t("aria/Delete Message"),
|
|
20114
20084
|
className: msgActionsBoxButtonClassName,
|
|
20115
|
-
Icon: WithAudioPlayback.
|
|
20085
|
+
Icon: WithAudioPlayback.IconDelete,
|
|
20116
20086
|
onClick: () => {
|
|
20117
20087
|
setOpenModal(true);
|
|
20118
20088
|
},
|
|
@@ -20158,7 +20128,7 @@ const DefaultMessageActionComponents = {
|
|
|
20158
20128
|
{
|
|
20159
20129
|
"aria-label": isBlocked ? t("aria/Unblock User") : t("aria/Block User"),
|
|
20160
20130
|
className: clsx(msgActionsBoxButtonClassName),
|
|
20161
|
-
Icon: isBlocked ? WithAudioPlayback.
|
|
20131
|
+
Icon: isBlocked ? WithAudioPlayback.IconUserCheck : WithAudioPlayback.IconNoSign,
|
|
20162
20132
|
onClick: () => {
|
|
20163
20133
|
const targetId = message.user?.id;
|
|
20164
20134
|
if (targetId) {
|
|
@@ -20195,12 +20165,12 @@ const DefaultMessageActionComponents = {
|
|
|
20195
20165
|
dialog?.toggle();
|
|
20196
20166
|
},
|
|
20197
20167
|
ref,
|
|
20198
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
20168
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconMore, { className: "str-chat__message-action-icon" })
|
|
20199
20169
|
}
|
|
20200
20170
|
);
|
|
20201
20171
|
}),
|
|
20202
20172
|
React() {
|
|
20203
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ReactionSelectorWithButton, { ReactionIcon: WithAudioPlayback.
|
|
20173
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ReactionSelectorWithButton, { ReactionIcon: WithAudioPlayback.IconEmoji });
|
|
20204
20174
|
},
|
|
20205
20175
|
Reply() {
|
|
20206
20176
|
const { handleOpenThread } = useMessageContext();
|
|
@@ -20212,7 +20182,7 @@ const DefaultMessageActionComponents = {
|
|
|
20212
20182
|
className: "str-chat__message-reply-in-thread-button",
|
|
20213
20183
|
"data-testid": "thread-action",
|
|
20214
20184
|
onClick: handleOpenThread,
|
|
20215
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
20185
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconReply, { className: "str-chat__message-action-icon" })
|
|
20216
20186
|
}
|
|
20217
20187
|
);
|
|
20218
20188
|
}
|
|
@@ -20357,9 +20327,9 @@ function MessageReactionsDetail({
|
|
|
20357
20327
|
handleFetchReactions,
|
|
20358
20328
|
onSelectedReactionTypeChange,
|
|
20359
20329
|
reactionDetailsSort: propReactionDetailsSort,
|
|
20330
|
+
reactionGroups,
|
|
20360
20331
|
reactions,
|
|
20361
20332
|
selectedReactionType,
|
|
20362
|
-
sortReactionDetails: propSortReactionDetails,
|
|
20363
20333
|
totalReactionCount
|
|
20364
20334
|
}) {
|
|
20365
20335
|
const { client } = WithAudioPlayback.useChatContext();
|
|
@@ -20371,10 +20341,8 @@ function MessageReactionsDetail({
|
|
|
20371
20341
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
20372
20342
|
const {
|
|
20373
20343
|
handleReaction: contextHandleReaction,
|
|
20374
|
-
reactionDetailsSort: contextReactionDetailsSort
|
|
20375
|
-
sortReactionDetails: contextSortReactionDetails
|
|
20344
|
+
reactionDetailsSort: contextReactionDetailsSort
|
|
20376
20345
|
} = useMessageContext(MessageReactionsDetail.name);
|
|
20377
|
-
const legacySortReactionDetails = propSortReactionDetails ?? contextSortReactionDetails;
|
|
20378
20346
|
const reactionDetailsSort = propReactionDetailsSort ?? contextReactionDetailsSort ?? defaultReactionDetailsSort;
|
|
20379
20347
|
const {
|
|
20380
20348
|
isLoading: areReactionsLoading,
|
|
@@ -20386,10 +20354,6 @@ function MessageReactionsDetail({
|
|
|
20386
20354
|
shouldFetch: true,
|
|
20387
20355
|
sort: reactionDetailsSort
|
|
20388
20356
|
});
|
|
20389
|
-
const reactionDetailsWithLegacyFallback = React.useMemo(
|
|
20390
|
-
() => legacySortReactionDetails ? [...reactionDetails].sort(legacySortReactionDetails) : reactionDetails,
|
|
20391
|
-
[legacySortReactionDetails, reactionDetails]
|
|
20392
|
-
);
|
|
20393
20357
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20394
20358
|
"div",
|
|
20395
20359
|
{
|
|
@@ -20434,7 +20398,7 @@ function MessageReactionsDetail({
|
|
|
20434
20398
|
"data-testid": "all-reacting-users",
|
|
20435
20399
|
children: [
|
|
20436
20400
|
areReactionsLoading && /* @__PURE__ */ jsxRuntime.jsx(LoadingIndicator2, {}),
|
|
20437
|
-
!areReactionsLoading && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children:
|
|
20401
|
+
!areReactionsLoading && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: reactionDetails.map(({ type, user }) => {
|
|
20438
20402
|
const belongsToCurrentUser = client.user?.id === user?.id;
|
|
20439
20403
|
const EmojiComponent = Array.isArray(reactionOptions) ? void 0 : reactionOptions.quick[type]?.Component ?? reactionOptions.extended?.[type]?.Component;
|
|
20440
20404
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -20467,8 +20431,13 @@ function MessageReactionsDetail({
|
|
|
20467
20431
|
className: "str-chat__message-reactions-detail__user-list-item-button",
|
|
20468
20432
|
"data-testid": "remove-reaction-button",
|
|
20469
20433
|
onClick: async (e) => {
|
|
20434
|
+
const reactionCountBeforeRemoval = reactionGroups?.[type]?.count ?? 0;
|
|
20470
20435
|
await contextHandleReaction(type, e);
|
|
20471
|
-
|
|
20436
|
+
if (reactionCountBeforeRemoval <= 1) {
|
|
20437
|
+
onSelectedReactionTypeChange?.(null);
|
|
20438
|
+
} else {
|
|
20439
|
+
refetch();
|
|
20440
|
+
}
|
|
20472
20441
|
},
|
|
20473
20442
|
children: t("Tap to remove")
|
|
20474
20443
|
}
|
|
@@ -20497,17 +20466,15 @@ const useProcessReactions = (params) => {
|
|
|
20497
20466
|
const {
|
|
20498
20467
|
own_reactions: propOwnReactions,
|
|
20499
20468
|
reaction_groups: propReactionGroups,
|
|
20500
|
-
reactionOptions: propReactionOptions,
|
|
20501
20469
|
reactions: propReactions,
|
|
20502
20470
|
sortReactions: propSortReactions
|
|
20503
20471
|
} = params;
|
|
20504
20472
|
const { message, sortReactions: contextSortReactions } = useMessageContext();
|
|
20505
|
-
const { reactionOptions
|
|
20506
|
-
const reactionOptions = propReactionOptions ?? contextReactionOptions;
|
|
20473
|
+
const { reactionOptions = defaultReactionOptions } = WithAudioPlayback.useComponentContext();
|
|
20507
20474
|
const sortReactions = propSortReactions ?? contextSortReactions ?? defaultReactionsSort;
|
|
20508
|
-
const latestReactions = propReactions
|
|
20509
|
-
const ownReactions = propOwnReactions
|
|
20510
|
-
const reactionGroups = propReactionGroups
|
|
20475
|
+
const latestReactions = propReactions ?? message.latest_reactions;
|
|
20476
|
+
const ownReactions = propOwnReactions ?? message?.own_reactions;
|
|
20477
|
+
const reactionGroups = propReactionGroups ?? message?.reaction_groups ?? void 0;
|
|
20511
20478
|
const isOwnReaction = React.useCallback(
|
|
20512
20479
|
(reactionType) => ownReactions?.some((reaction) => reaction.type === reactionType) ?? false,
|
|
20513
20480
|
[ownReactions]
|
|
@@ -20591,6 +20558,7 @@ const useProcessReactions = (params) => {
|
|
|
20591
20558
|
return {
|
|
20592
20559
|
existingReactions,
|
|
20593
20560
|
hasReactions,
|
|
20561
|
+
reactionGroups,
|
|
20594
20562
|
totalReactionCount,
|
|
20595
20563
|
uniqueReactionTypeCount
|
|
20596
20564
|
};
|
|
@@ -20607,16 +20575,22 @@ const FragmentOrButton = ({
|
|
|
20607
20575
|
};
|
|
20608
20576
|
const UnMemoizedMessageReactions = (props) => {
|
|
20609
20577
|
const {
|
|
20578
|
+
capLimit: { clustered: capLimitClustered = 5, segmented: capLimitSegmented = 4 } = {},
|
|
20610
20579
|
flipHorizontalPosition = false,
|
|
20611
20580
|
handleFetchReactions,
|
|
20612
20581
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20613
20582
|
reactionDetailsSort,
|
|
20614
|
-
sortReactionDetails,
|
|
20615
20583
|
verticalPosition = "top",
|
|
20616
20584
|
visualStyle = "clustered",
|
|
20617
20585
|
...rest
|
|
20618
20586
|
} = props;
|
|
20619
|
-
const {
|
|
20587
|
+
const {
|
|
20588
|
+
existingReactions,
|
|
20589
|
+
hasReactions,
|
|
20590
|
+
reactionGroups,
|
|
20591
|
+
totalReactionCount,
|
|
20592
|
+
uniqueReactionTypeCount
|
|
20593
|
+
} = useProcessReactions(rest);
|
|
20620
20594
|
const [selectedReactionType, setSelectedReactionType] = React.useState(
|
|
20621
20595
|
null
|
|
20622
20596
|
);
|
|
@@ -20635,16 +20609,27 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20635
20609
|
dialog.open();
|
|
20636
20610
|
};
|
|
20637
20611
|
const cappedExistingReactions = React.useMemo(() => {
|
|
20638
|
-
if (visualStyle
|
|
20639
|
-
const
|
|
20612
|
+
if (visualStyle === "segmented" && verticalPosition !== "top") return null;
|
|
20613
|
+
const capLimit = visualStyle === "segmented" ? capLimitSegmented : capLimitClustered;
|
|
20614
|
+
const sliced = existingReactions.slice(0, capLimit);
|
|
20640
20615
|
return {
|
|
20616
|
+
/**
|
|
20617
|
+
* Accumulated reaction count of capped reaction types, first four in case of
|
|
20618
|
+
* segmented(top) and first five in case of clustered(top/bottom) variations.
|
|
20619
|
+
*/
|
|
20641
20620
|
reactionCountToDisplay: sliced.reduce(
|
|
20642
20621
|
(accumulatedCount, { reactionCount }) => accumulatedCount + reactionCount,
|
|
20643
20622
|
0
|
|
20644
20623
|
),
|
|
20645
20624
|
reactionsToDisplay: sliced
|
|
20646
20625
|
};
|
|
20647
|
-
}, [
|
|
20626
|
+
}, [
|
|
20627
|
+
capLimitClustered,
|
|
20628
|
+
capLimitSegmented,
|
|
20629
|
+
existingReactions,
|
|
20630
|
+
verticalPosition,
|
|
20631
|
+
visualStyle
|
|
20632
|
+
]);
|
|
20648
20633
|
if (!hasReactions) return null;
|
|
20649
20634
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20650
20635
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -20665,7 +20650,7 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20665
20650
|
"aria-pressed": isDialogOpen,
|
|
20666
20651
|
buttonIf: visualStyle === "clustered",
|
|
20667
20652
|
className: "str-chat__message-reactions__list-button",
|
|
20668
|
-
onClick: () => handleReactionButtonClick(
|
|
20653
|
+
onClick: () => handleReactionButtonClick(null),
|
|
20669
20654
|
children: [
|
|
20670
20655
|
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "str-chat__message-reactions__list", children: [
|
|
20671
20656
|
(cappedExistingReactions?.reactionsToDisplay ?? existingReactions).map(
|
|
@@ -20696,7 +20681,7 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20696
20681
|
reactionType
|
|
20697
20682
|
)
|
|
20698
20683
|
),
|
|
20699
|
-
uniqueReactionTypeCount > 4 && cappedExistingReactions && /* @__PURE__ */ jsxRuntime.jsx("li", { className: "str-chat__message-reactions__list-item str-chat__message-reactions__list-item--more", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
20684
|
+
uniqueReactionTypeCount > 4 && cappedExistingReactions && visualStyle === "segmented" && /* @__PURE__ */ jsxRuntime.jsx("li", { className: "str-chat__message-reactions__list-item str-chat__message-reactions__list-item--more", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
20700
20685
|
"button",
|
|
20701
20686
|
{
|
|
20702
20687
|
className: "str-chat__message-reactions__list-item-button",
|
|
@@ -20729,9 +20714,9 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20729
20714
|
{
|
|
20730
20715
|
handleFetchReactions,
|
|
20731
20716
|
onSelectedReactionTypeChange: setSelectedReactionType,
|
|
20717
|
+
reactionGroups,
|
|
20732
20718
|
reactions: existingReactions,
|
|
20733
20719
|
selectedReactionType,
|
|
20734
|
-
sortReactionDetails,
|
|
20735
20720
|
totalReactionCount
|
|
20736
20721
|
}
|
|
20737
20722
|
)
|
|
@@ -21212,7 +21197,6 @@ const Message = (props) => {
|
|
|
21212
21197
|
pinPermissions,
|
|
21213
21198
|
reactionDetailsSort,
|
|
21214
21199
|
retrySendMessage: propRetrySendMessage,
|
|
21215
|
-
sortReactionDetails,
|
|
21216
21200
|
sortReactions
|
|
21217
21201
|
} = props;
|
|
21218
21202
|
const { client } = WithAudioPlayback.useChatContext("Message");
|
|
@@ -21306,7 +21290,6 @@ const Message = (props) => {
|
|
|
21306
21290
|
readBy: props.readBy,
|
|
21307
21291
|
renderText: props.renderText,
|
|
21308
21292
|
returnAllReadData: props.returnAllReadData,
|
|
21309
|
-
sortReactionDetails,
|
|
21310
21293
|
sortReactions,
|
|
21311
21294
|
threadList: props.threadList,
|
|
21312
21295
|
unsafeHTML: props.unsafeHTML,
|
|
@@ -22020,7 +22003,7 @@ const UnreadMessagesSeparator = ({
|
|
|
22020
22003
|
onClick: () => markRead(),
|
|
22021
22004
|
size: "sm",
|
|
22022
22005
|
variant: "secondary",
|
|
22023
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
22006
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
22024
22007
|
}
|
|
22025
22008
|
)
|
|
22026
22009
|
]
|
|
@@ -22240,7 +22223,7 @@ const UnreadMessagesNotification = ({
|
|
|
22240
22223
|
]
|
|
22241
22224
|
}
|
|
22242
22225
|
),
|
|
22243
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.Button, { appearance: "outline", onClick: () => markRead(), variant: "secondary", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
22226
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.Button, { appearance: "outline", onClick: () => markRead(), variant: "secondary", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {}) })
|
|
22244
22227
|
]
|
|
22245
22228
|
}
|
|
22246
22229
|
);
|
|
@@ -22935,7 +22918,6 @@ const MessageListWithContext = (props) => {
|
|
|
22935
22918
|
returnAllReadData = false,
|
|
22936
22919
|
reviewProcessedMessage,
|
|
22937
22920
|
showUnreadNotificationAlways,
|
|
22938
|
-
sortReactionDetails,
|
|
22939
22921
|
sortReactions,
|
|
22940
22922
|
suppressAutoscroll,
|
|
22941
22923
|
threadList = false,
|
|
@@ -23053,7 +23035,6 @@ const MessageListWithContext = (props) => {
|
|
|
23053
23035
|
renderText: props.renderText,
|
|
23054
23036
|
retrySendMessage: props.retrySendMessage,
|
|
23055
23037
|
showAvatar: props.showAvatar,
|
|
23056
|
-
sortReactionDetails,
|
|
23057
23038
|
sortReactions,
|
|
23058
23039
|
unsafeHTML
|
|
23059
23040
|
},
|
|
@@ -23348,7 +23329,6 @@ const messageRenderer = (virtuosoIndex, _data, virtuosoContext) => {
|
|
|
23348
23329
|
renderText: renderText2,
|
|
23349
23330
|
returnAllReadData,
|
|
23350
23331
|
showAvatar,
|
|
23351
|
-
sortReactionDetails,
|
|
23352
23332
|
sortReactions,
|
|
23353
23333
|
threadList,
|
|
23354
23334
|
unreadMessageCount = 0,
|
|
@@ -23398,7 +23378,6 @@ const messageRenderer = (virtuosoIndex, _data, virtuosoContext) => {
|
|
|
23398
23378
|
renderText: renderText2,
|
|
23399
23379
|
returnAllReadData,
|
|
23400
23380
|
showAvatar,
|
|
23401
|
-
sortReactionDetails,
|
|
23402
23381
|
sortReactions,
|
|
23403
23382
|
threadList
|
|
23404
23383
|
}
|
|
@@ -23483,7 +23462,6 @@ const VirtualizedMessageListWithContext = (props) => {
|
|
|
23483
23462
|
shouldGroupByUser = false,
|
|
23484
23463
|
showAvatar,
|
|
23485
23464
|
showUnreadNotificationAlways,
|
|
23486
|
-
sortReactionDetails,
|
|
23487
23465
|
sortReactions,
|
|
23488
23466
|
stickToBottomScrollBehavior = "smooth",
|
|
23489
23467
|
suppressAutoscroll,
|
|
@@ -23752,7 +23730,6 @@ const VirtualizedMessageListWithContext = (props) => {
|
|
|
23752
23730
|
returnAllReadData,
|
|
23753
23731
|
shouldGroupByUser,
|
|
23754
23732
|
showAvatar,
|
|
23755
|
-
sortReactionDetails,
|
|
23756
23733
|
sortReactions,
|
|
23757
23734
|
threadList,
|
|
23758
23735
|
unreadMessageCount: channelUnreadUiState?.unread_messages,
|
|
@@ -24613,7 +24590,7 @@ const SearchBar = () => {
|
|
|
24613
24590
|
"str-chat__search-bar__input-wrapper--active": isActive
|
|
24614
24591
|
}),
|
|
24615
24592
|
children: [
|
|
24616
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
24593
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconSearch, {}),
|
|
24617
24594
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24618
24595
|
"input",
|
|
24619
24596
|
{
|
|
@@ -24657,7 +24634,7 @@ const SearchBar = () => {
|
|
|
24657
24634
|
ref: clearButtonRef,
|
|
24658
24635
|
size: "xs",
|
|
24659
24636
|
variant: "secondary",
|
|
24660
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
24637
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXCircle, {})
|
|
24661
24638
|
}
|
|
24662
24639
|
)
|
|
24663
24640
|
]
|
|
@@ -25091,7 +25068,7 @@ const LoadMorePaginator = React.memo(
|
|
|
25091
25068
|
UnMemoizedLoadMorePaginator
|
|
25092
25069
|
);
|
|
25093
25070
|
const ChannelListHeader = ({
|
|
25094
|
-
ToggleButtonIcon = WithAudioPlayback.
|
|
25071
|
+
ToggleButtonIcon = WithAudioPlayback.IconSidebar
|
|
25095
25072
|
}) => {
|
|
25096
25073
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
25097
25074
|
const { channel, navOpen } = WithAudioPlayback.useChatContext();
|
|
@@ -25263,11 +25240,11 @@ const UnMemoizedChannelList = (props) => {
|
|
|
25263
25240
|
}
|
|
25264
25241
|
);
|
|
25265
25242
|
const showChannelList = !searchIsActive;
|
|
25266
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
25243
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
25267
25244
|
WithAudioPlayback.ChannelListContextProvider,
|
|
25268
25245
|
{
|
|
25269
25246
|
value: { channels, hasNextPage, loadNextPage, setChannels },
|
|
25270
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
25247
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className, ref: channelListRef, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogManagerProvider, { id: `channel-list-dialog-manager-${stableId}`, children: [
|
|
25271
25248
|
/* @__PURE__ */ jsxRuntime.jsx(ChannelListHeader, {}),
|
|
25272
25249
|
showChannelSearch && /* @__PURE__ */ jsxRuntime.jsx(Search$12, {}),
|
|
25273
25250
|
showChannelList && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -25289,9 +25266,9 @@ const UnMemoizedChannelList = (props) => {
|
|
|
25289
25266
|
}
|
|
25290
25267
|
),
|
|
25291
25268
|
/* @__PURE__ */ jsxRuntime.jsx(NotificationList$1, { panel: "channel-list" })
|
|
25292
|
-
] })
|
|
25269
|
+
] }) })
|
|
25293
25270
|
}
|
|
25294
|
-
)
|
|
25271
|
+
);
|
|
25295
25272
|
};
|
|
25296
25273
|
const ChannelList = React.memo(
|
|
25297
25274
|
UnMemoizedChannelList
|
|
@@ -25682,7 +25659,7 @@ const defaultChannelActionSet = [
|
|
|
25682
25659
|
ref,
|
|
25683
25660
|
size: "sm",
|
|
25684
25661
|
variant: "secondary",
|
|
25685
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
25662
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconMore, {})
|
|
25686
25663
|
}
|
|
25687
25664
|
);
|
|
25688
25665
|
}),
|
|
@@ -25775,7 +25752,7 @@ const defaultChannelActionSet = [
|
|
|
25775
25752
|
{
|
|
25776
25753
|
"aria-label": title,
|
|
25777
25754
|
disabled: inProgress,
|
|
25778
|
-
Icon: WithAudioPlayback.
|
|
25755
|
+
Icon: WithAudioPlayback.IconNoSign,
|
|
25779
25756
|
onClick: async () => {
|
|
25780
25757
|
try {
|
|
25781
25758
|
setInProgress(true);
|
|
@@ -25881,7 +25858,7 @@ const defaultChannelActionSet = [
|
|
|
25881
25858
|
{
|
|
25882
25859
|
"aria-label": title,
|
|
25883
25860
|
disabled: inProgress,
|
|
25884
|
-
Icon: WithAudioPlayback.
|
|
25861
|
+
Icon: WithAudioPlayback.IconLeave,
|
|
25885
25862
|
onClick: async (e) => {
|
|
25886
25863
|
e.stopPropagation();
|
|
25887
25864
|
try {
|
|
@@ -26018,11 +25995,13 @@ function ChannelListItemTimestamp({ lastMessage }) {
|
|
|
26018
25995
|
function getAttachmentContentType(attachment) {
|
|
26019
25996
|
if (!attachment) return "text";
|
|
26020
25997
|
if (attachment.type === "giphy") return "giphy";
|
|
26021
|
-
if (attachment.type === "image")
|
|
25998
|
+
if (attachment.type === "image") {
|
|
25999
|
+
if (attachment.og_scrape_url || attachment.title_link) return "link";
|
|
26000
|
+
return "image";
|
|
26001
|
+
}
|
|
26022
26002
|
if (attachment.type === "video") return "video";
|
|
26023
26003
|
if (attachment.type === "voiceRecording") return "voice";
|
|
26024
26004
|
if (attachment.type === "file") return "file";
|
|
26025
|
-
if (attachment.og_scrape_url || attachment.title_link) return "link";
|
|
26026
26005
|
return "file";
|
|
26027
26006
|
}
|
|
26028
26007
|
function getAttachmentFallbackText(type, count, t) {
|
|
@@ -26102,13 +26081,13 @@ const useLatestMessagePreview = ({
|
|
|
26102
26081
|
} else {
|
|
26103
26082
|
contentType = "file";
|
|
26104
26083
|
}
|
|
26105
|
-
let text2 = contentType === "giphy" ? "
|
|
26084
|
+
let text2 = contentType === "giphy" ? `GIPHY ${firstAttachment.title ?? ""}`.trim() : (
|
|
26106
26085
|
// prioritize message text content if available
|
|
26107
26086
|
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)
|
|
26108
26087
|
(attachments.length === 1 && contentType !== "voice" ? firstAttachment.fallback || firstAttachment.title : "") || // then generic fallback text based on attachment type and count
|
|
26109
26088
|
getAttachmentFallbackText(contentType, attachments.length, t)
|
|
26110
26089
|
);
|
|
26111
|
-
if (
|
|
26090
|
+
if (attachments.length === 1 && typeof firstAttachment.duration === "number") {
|
|
26112
26091
|
const minutes = Math.floor(firstAttachment.duration / 60);
|
|
26113
26092
|
const seconds = Math.ceil(firstAttachment.duration) % 60;
|
|
26114
26093
|
const durationString = `${minutes}:${seconds.toString().padStart(2, "0")}`;
|
|
@@ -26140,21 +26119,21 @@ const useLatestMessagePreview = ({
|
|
|
26140
26119
|
]);
|
|
26141
26120
|
};
|
|
26142
26121
|
const deliveryStatusIconMap = {
|
|
26143
|
-
delivered: WithAudioPlayback.
|
|
26144
|
-
read: WithAudioPlayback.
|
|
26122
|
+
delivered: WithAudioPlayback.IconChecks,
|
|
26123
|
+
read: WithAudioPlayback.IconChecks,
|
|
26145
26124
|
sending: WithAudioPlayback.IconClock,
|
|
26146
26125
|
sent: WithAudioPlayback.IconCheckmark1Small
|
|
26147
26126
|
};
|
|
26148
26127
|
const contentTypeIconMap = {
|
|
26149
|
-
deleted: WithAudioPlayback.
|
|
26150
|
-
error: WithAudioPlayback.
|
|
26151
|
-
file: WithAudioPlayback.
|
|
26152
|
-
giphy: WithAudioPlayback.
|
|
26153
|
-
image: WithAudioPlayback.
|
|
26154
|
-
link: WithAudioPlayback.
|
|
26155
|
-
location: WithAudioPlayback.
|
|
26128
|
+
deleted: WithAudioPlayback.IconNoSign,
|
|
26129
|
+
error: WithAudioPlayback.IconExclamationCircleFill,
|
|
26130
|
+
file: WithAudioPlayback.IconFile,
|
|
26131
|
+
giphy: WithAudioPlayback.IconGiphy,
|
|
26132
|
+
image: WithAudioPlayback.IconCamera,
|
|
26133
|
+
link: WithAudioPlayback.IconLink,
|
|
26134
|
+
location: WithAudioPlayback.IconLocation,
|
|
26156
26135
|
video: WithAudioPlayback.IconVideo,
|
|
26157
|
-
voice: WithAudioPlayback.
|
|
26136
|
+
voice: WithAudioPlayback.IconVoice
|
|
26158
26137
|
};
|
|
26159
26138
|
const SummarizedMessagePreview = ({
|
|
26160
26139
|
latestMessage,
|
|
@@ -26750,7 +26729,7 @@ const ThreadListItem = ({
|
|
|
26750
26729
|
const ThreadListEmptyPlaceholder = () => {
|
|
26751
26730
|
const { t } = WithAudioPlayback.useTranslationContext("ThreadListEmptyPlaceholder");
|
|
26752
26731
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__thread-list-empty-placeholder", children: [
|
|
26753
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
26732
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconMessageBubbles, {}),
|
|
26754
26733
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("Reply to a message to start a thread") })
|
|
26755
26734
|
] });
|
|
26756
26735
|
};
|
|
@@ -26773,7 +26752,7 @@ const ThreadListUnseenThreadsBanner = () => {
|
|
|
26773
26752
|
onClick: () => client.threads.reload(),
|
|
26774
26753
|
children: [
|
|
26775
26754
|
!isLoading && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
26776
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
26755
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconRefresh, {}),
|
|
26777
26756
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("ThreadListUnseenThreadsBanner/unreadThreads", {
|
|
26778
26757
|
count: unseenThreadIds.length
|
|
26779
26758
|
}) })
|
|
@@ -26797,7 +26776,7 @@ const ThreadListLoadingIndicator = () => {
|
|
|
26797
26776
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__thread-list-loading-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(LoadingIndicator$1, {}) });
|
|
26798
26777
|
};
|
|
26799
26778
|
const ThreadListHeader = ({
|
|
26800
|
-
ToggleButtonIcon = WithAudioPlayback.
|
|
26779
|
+
ToggleButtonIcon = WithAudioPlayback.IconSidebar
|
|
26801
26780
|
}) => {
|
|
26802
26781
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
26803
26782
|
const { navOpen } = WithAudioPlayback.useChatContext();
|
|
@@ -26928,11 +26907,10 @@ const ThreadList = ({ virtuosoProps }) => {
|
|
|
26928
26907
|
);
|
|
26929
26908
|
};
|
|
26930
26909
|
const IconsBySeverity = {
|
|
26931
|
-
error: WithAudioPlayback.
|
|
26910
|
+
error: WithAudioPlayback.IconExclamationMark,
|
|
26932
26911
|
info: null,
|
|
26933
|
-
|
|
26934
|
-
|
|
26935
|
-
success: WithAudioPlayback.IconCheckmark2,
|
|
26912
|
+
loading: WithAudioPlayback.IconRefresh,
|
|
26913
|
+
success: WithAudioPlayback.IconCheckmark,
|
|
26936
26914
|
warning: WithAudioPlayback.IconExclamationTriangle
|
|
26937
26915
|
};
|
|
26938
26916
|
const DefaultNotificationIcon = ({ notification }) => {
|
|
@@ -27011,7 +26989,7 @@ const Notification = React.forwardRef(
|
|
|
27011
26989
|
onClick: handleDismiss,
|
|
27012
26990
|
size: "sm",
|
|
27013
26991
|
variant: "secondary",
|
|
27014
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
26992
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
27015
26993
|
}
|
|
27016
26994
|
)
|
|
27017
26995
|
]
|
|
@@ -27573,7 +27551,7 @@ const ThumbnailButton = ({
|
|
|
27573
27551
|
"aria-hidden": "true",
|
|
27574
27552
|
className: "str-chat__modal-gallery__image-load-failed-overlay",
|
|
27575
27553
|
"data-testid": "str-chat__modal-gallery__image-load-failed-overlay",
|
|
27576
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__modal-gallery__image-retry-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
27554
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__modal-gallery__image-retry-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconRetry, {}) })
|
|
27577
27555
|
}
|
|
27578
27556
|
),
|
|
27579
27557
|
showOverlay && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__modal-gallery__placeholder", children: [
|
|
@@ -27664,7 +27642,7 @@ const CardContent = (props) => {
|
|
|
27664
27642
|
className: "str-chat__message-attachment-card--source-link",
|
|
27665
27643
|
"data-testid": "card-source-link",
|
|
27666
27644
|
children: [
|
|
27667
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
27645
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconLink, {}),
|
|
27668
27646
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment-card--url", children: url })
|
|
27669
27647
|
]
|
|
27670
27648
|
}
|
|
@@ -27771,7 +27749,7 @@ const Giphy = ({ attachment }) => {
|
|
|
27771
27749
|
] });
|
|
27772
27750
|
};
|
|
27773
27751
|
const GiphyBadge = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__giphy-badge", children: [
|
|
27774
|
-
/* @__PURE__ */ jsxRuntime.jsx(IconGiphy, {}),
|
|
27752
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconGiphy, {}),
|
|
27775
27753
|
"Giphy"
|
|
27776
27754
|
] });
|
|
27777
27755
|
const Geolocation = ({
|
|
@@ -27835,7 +27813,7 @@ const DefaultGeolocationAttachmentMapPlaceholder = ({
|
|
|
27835
27813
|
className: "str-chat__message-attachment-geolocation__placeholder",
|
|
27836
27814
|
"data-testid": "geolocation-attachment-map-placeholder",
|
|
27837
27815
|
children: [
|
|
27838
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
27816
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconLocation, {}),
|
|
27839
27817
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27840
27818
|
"a",
|
|
27841
27819
|
{
|
|
@@ -28306,7 +28284,7 @@ const ChannelHeader = (props) => {
|
|
|
28306
28284
|
const {
|
|
28307
28285
|
Avatar: Avatar2 = ChannelAvatar,
|
|
28308
28286
|
image: overrideImage,
|
|
28309
|
-
MenuIcon = WithAudioPlayback.
|
|
28287
|
+
MenuIcon = WithAudioPlayback.IconSidebar,
|
|
28310
28288
|
title: overrideTitle
|
|
28311
28289
|
} = props;
|
|
28312
28290
|
const { channel } = WithAudioPlayback.useChannelStateContext();
|
|
@@ -28323,12 +28301,12 @@ const ChannelHeader = (props) => {
|
|
|
28323
28301
|
"str-chat__channel-header--sidebar-collapsed": !navOpen
|
|
28324
28302
|
}),
|
|
28325
28303
|
children: [
|
|
28326
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToggleSidebarButton, { mode: "expand", children: /* @__PURE__ */ jsxRuntime.jsx(MenuIcon, {}) }),
|
|
28304
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__channel-header__start", children: /* @__PURE__ */ jsxRuntime.jsx(ToggleSidebarButton, { mode: "expand", children: /* @__PURE__ */ jsxRuntime.jsx(MenuIcon, {}) }) }),
|
|
28327
28305
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__channel-header__data", children: [
|
|
28328
28306
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__channel-header__data__title", children: displayTitle }),
|
|
28329
28307
|
/* @__PURE__ */ jsxRuntime.jsx(ChannelHeaderSubtitle, {})
|
|
28330
28308
|
] }),
|
|
28331
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28309
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__channel-header__end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28332
28310
|
Avatar2,
|
|
28333
28311
|
{
|
|
28334
28312
|
className: "str-chat__avatar--channel-header",
|
|
@@ -28338,7 +28316,7 @@ const ChannelHeader = (props) => {
|
|
|
28338
28316
|
size: "lg",
|
|
28339
28317
|
userName: displayTitle
|
|
28340
28318
|
}
|
|
28341
|
-
)
|
|
28319
|
+
) })
|
|
28342
28320
|
]
|
|
28343
28321
|
}
|
|
28344
28322
|
);
|
|
@@ -28377,162 +28355,83 @@ exports.ChatViewThreadsSelectorButton = WithAudioPlayback.ChatViewThreadsSelecto
|
|
|
28377
28355
|
exports.ComponentContext = WithAudioPlayback.ComponentContext;
|
|
28378
28356
|
exports.ComponentProvider = WithAudioPlayback.ComponentProvider;
|
|
28379
28357
|
exports.EmptyStateIndicator = WithAudioPlayback.EmptyStateIndicator;
|
|
28380
|
-
exports.IconApiAggregate = WithAudioPlayback.IconApiAggregate;
|
|
28381
|
-
exports.IconApples = WithAudioPlayback.IconApples;
|
|
28382
28358
|
exports.IconArchive = WithAudioPlayback.IconArchive;
|
|
28383
|
-
exports.IconArrowBoxLeft = WithAudioPlayback.IconArrowBoxLeft;
|
|
28384
28359
|
exports.IconArrowDown = WithAudioPlayback.IconArrowDown;
|
|
28385
28360
|
exports.IconArrowDownCircle = WithAudioPlayback.IconArrowDownCircle;
|
|
28386
28361
|
exports.IconArrowLeft = WithAudioPlayback.IconArrowLeft;
|
|
28387
|
-
exports.IconArrowRight = WithAudioPlayback.IconArrowRight;
|
|
28388
|
-
exports.IconArrowRightUp = WithAudioPlayback.IconArrowRightUp;
|
|
28389
|
-
exports.IconArrowRotateClockwise = WithAudioPlayback.IconArrowRotateClockwise;
|
|
28390
|
-
exports.IconArrowRotateRightLeftRepeatRefresh = WithAudioPlayback.IconArrowRotateRightLeftRepeatRefresh;
|
|
28391
|
-
exports.IconArrowShareLeft = WithAudioPlayback.IconArrowShareLeft;
|
|
28392
28362
|
exports.IconArrowUp = WithAudioPlayback.IconArrowUp;
|
|
28393
|
-
exports.
|
|
28394
|
-
exports.
|
|
28395
|
-
exports.
|
|
28396
|
-
exports.
|
|
28363
|
+
exports.IconArrowUpRight = WithAudioPlayback.IconArrowUpRight;
|
|
28364
|
+
exports.IconAttachment = WithAudioPlayback.IconAttachment;
|
|
28365
|
+
exports.IconAudio = WithAudioPlayback.IconAudio;
|
|
28366
|
+
exports.IconBell = WithAudioPlayback.IconBell;
|
|
28397
28367
|
exports.IconBellOff = WithAudioPlayback.IconBellOff;
|
|
28398
|
-
exports.
|
|
28399
|
-
exports.
|
|
28400
|
-
exports.
|
|
28401
|
-
exports.IconBubble2ChatMessage = WithAudioPlayback.IconBubble2ChatMessage;
|
|
28402
|
-
exports.IconBubble2Solid = WithAudioPlayback.IconBubble2Solid;
|
|
28403
|
-
exports.IconBubble3ChatMessage = WithAudioPlayback.IconBubble3ChatMessage;
|
|
28404
|
-
exports.IconBubble3Solid = WithAudioPlayback.IconBubble3Solid;
|
|
28405
|
-
exports.IconBubbleAnnotation2ChatMessage = WithAudioPlayback.IconBubbleAnnotation2ChatMessage;
|
|
28406
|
-
exports.IconBubbleText6ChatMessage = WithAudioPlayback.IconBubbleText6ChatMessage;
|
|
28407
|
-
exports.IconBubbleText6Solid = WithAudioPlayback.IconBubbleText6Solid;
|
|
28408
|
-
exports.IconBubbleText6SolidChatMessage = WithAudioPlayback.IconBubbleText6SolidChatMessage;
|
|
28409
|
-
exports.IconBubbleWideNotificationChatMessage = WithAudioPlayback.IconBubbleWideNotificationChatMessage;
|
|
28410
|
-
exports.IconBubbleWideSparkleChatMessage = WithAudioPlayback.IconBubbleWideSparkleChatMessage;
|
|
28411
|
-
exports.IconBubbles = WithAudioPlayback.IconBubbles;
|
|
28412
|
-
exports.IconCalendar1 = WithAudioPlayback.IconCalendar1;
|
|
28413
|
-
exports.IconCallCancel = WithAudioPlayback.IconCallCancel;
|
|
28414
|
-
exports.IconCamera1 = WithAudioPlayback.IconCamera1;
|
|
28415
|
-
exports.IconCar1 = WithAudioPlayback.IconCar1;
|
|
28416
|
-
exports.IconCat = WithAudioPlayback.IconCat;
|
|
28417
|
-
exports.IconChainLink = WithAudioPlayback.IconChainLink;
|
|
28418
|
-
exports.IconChart5 = WithAudioPlayback.IconChart5;
|
|
28368
|
+
exports.IconBolt = WithAudioPlayback.IconBolt;
|
|
28369
|
+
exports.IconCamera = WithAudioPlayback.IconCamera;
|
|
28370
|
+
exports.IconCheckmark = WithAudioPlayback.IconCheckmark;
|
|
28419
28371
|
exports.IconCheckmark1Small = WithAudioPlayback.IconCheckmark1Small;
|
|
28420
|
-
exports.
|
|
28421
|
-
exports.IconCheckmark2Small = WithAudioPlayback.IconCheckmark2Small;
|
|
28372
|
+
exports.IconChecks = WithAudioPlayback.IconChecks;
|
|
28422
28373
|
exports.IconChevronDown = WithAudioPlayback.IconChevronDown;
|
|
28423
|
-
exports.IconChevronGrabberVerticalSelector = WithAudioPlayback.IconChevronGrabberVerticalSelector;
|
|
28424
28374
|
exports.IconChevronLeft = WithAudioPlayback.IconChevronLeft;
|
|
28425
28375
|
exports.IconChevronRight = WithAudioPlayback.IconChevronRight;
|
|
28426
|
-
exports.IconChevronTop = WithAudioPlayback.IconChevronTop;
|
|
28427
|
-
exports.IconCircleBanSign = WithAudioPlayback.IconCircleBanSign;
|
|
28428
|
-
exports.IconCircleCheck = WithAudioPlayback.IconCircleCheck;
|
|
28429
|
-
exports.IconCircleInfoTooltip = WithAudioPlayback.IconCircleInfoTooltip;
|
|
28430
|
-
exports.IconCircleMinus = WithAudioPlayback.IconCircleMinus;
|
|
28431
|
-
exports.IconCircleQuestionmark = WithAudioPlayback.IconCircleQuestionmark;
|
|
28432
|
-
exports.IconCircleQuestionmarkFilled = WithAudioPlayback.IconCircleQuestionmarkFilled;
|
|
28433
|
-
exports.IconCircleX = WithAudioPlayback.IconCircleX;
|
|
28434
28376
|
exports.IconClock = WithAudioPlayback.IconClock;
|
|
28435
|
-
exports.
|
|
28436
|
-
exports.
|
|
28437
|
-
exports.IconCode = WithAudioPlayback.IconCode;
|
|
28438
|
-
exports.IconCodeBrackets = WithAudioPlayback.IconCodeBrackets;
|
|
28439
|
-
exports.IconCodeEditorInsert = WithAudioPlayback.IconCodeEditorInsert;
|
|
28440
|
-
exports.IconCompass = WithAudioPlayback.IconCompass;
|
|
28441
|
-
exports.IconCreditCard2Billing = WithAudioPlayback.IconCreditCard2Billing;
|
|
28442
|
-
exports.IconCrossMedium = WithAudioPlayback.IconCrossMedium;
|
|
28377
|
+
exports.IconCommand = WithAudioPlayback.IconCommand;
|
|
28378
|
+
exports.IconCopy = WithAudioPlayback.IconCopy;
|
|
28443
28379
|
exports.IconCrossSmall = WithAudioPlayback.IconCrossSmall;
|
|
28444
|
-
exports.
|
|
28445
|
-
exports.
|
|
28446
|
-
exports.
|
|
28447
|
-
exports.
|
|
28448
|
-
exports.
|
|
28449
|
-
exports.
|
|
28450
|
-
exports.IconEmojiAddReaction = WithAudioPlayback.IconEmojiAddReaction;
|
|
28451
|
-
exports.IconEmojiSad = WithAudioPlayback.IconEmojiSad;
|
|
28452
|
-
exports.IconEmojiSmile = WithAudioPlayback.IconEmojiSmile;
|
|
28453
|
-
exports.IconExclamation = WithAudioPlayback.IconExclamation;
|
|
28454
|
-
exports.IconExclamationCircle = WithAudioPlayback.IconExclamationCircle;
|
|
28455
|
-
exports.IconExclamationCircle1 = WithAudioPlayback.IconExclamationCircle1;
|
|
28380
|
+
exports.IconDelete = WithAudioPlayback.IconDelete;
|
|
28381
|
+
exports.IconEdit = WithAudioPlayback.IconEdit;
|
|
28382
|
+
exports.IconEmoji = WithAudioPlayback.IconEmoji;
|
|
28383
|
+
exports.IconExclamationCircleFill = WithAudioPlayback.IconExclamationCircleFill;
|
|
28384
|
+
exports.IconExclamationMark = WithAudioPlayback.IconExclamationMark;
|
|
28385
|
+
exports.IconExclamationMarkFill = WithAudioPlayback.IconExclamationMarkFill;
|
|
28456
28386
|
exports.IconExclamationTriangle = WithAudioPlayback.IconExclamationTriangle;
|
|
28457
|
-
exports.IconExclamationTriangle1 = WithAudioPlayback.IconExclamationTriangle1;
|
|
28458
28387
|
exports.IconEyeOpen = WithAudioPlayback.IconEyeOpen;
|
|
28459
|
-
exports.
|
|
28460
|
-
exports.
|
|
28461
|
-
exports.
|
|
28462
|
-
exports.
|
|
28463
|
-
exports.
|
|
28464
|
-
exports.
|
|
28465
|
-
exports.
|
|
28466
|
-
exports.
|
|
28467
|
-
exports.
|
|
28468
|
-
exports.
|
|
28469
|
-
exports.
|
|
28470
|
-
exports.
|
|
28471
|
-
exports.
|
|
28472
|
-
exports.IconLayoutAlignLeft = WithAudioPlayback.IconLayoutAlignLeft;
|
|
28473
|
-
exports.IconLayoutGrid1 = WithAudioPlayback.IconLayoutGrid1;
|
|
28474
|
-
exports.IconLightBulbSimple = WithAudioPlayback.IconLightBulbSimple;
|
|
28475
|
-
exports.IconLimits = WithAudioPlayback.IconLimits;
|
|
28476
|
-
exports.IconLineChart3 = WithAudioPlayback.IconLineChart3;
|
|
28477
|
-
exports.IconLoadingCircle = WithAudioPlayback.IconLoadingCircle;
|
|
28478
|
-
exports.IconLock = WithAudioPlayback.IconLock;
|
|
28479
|
-
exports.IconMagnifyingGlassSearch = WithAudioPlayback.IconMagnifyingGlassSearch;
|
|
28480
|
-
exports.IconMapPin = WithAudioPlayback.IconMapPin;
|
|
28481
|
-
exports.IconMicrophone = WithAudioPlayback.IconMicrophone;
|
|
28482
|
-
exports.IconMicrophoneSolid = WithAudioPlayback.IconMicrophoneSolid;
|
|
28483
|
-
exports.IconMinusLarge = WithAudioPlayback.IconMinusLarge;
|
|
28484
|
-
exports.IconMinusSmall = WithAudioPlayback.IconMinusSmall;
|
|
28388
|
+
exports.IconFile = WithAudioPlayback.IconFile;
|
|
28389
|
+
exports.IconFlag = WithAudioPlayback.IconFlag;
|
|
28390
|
+
exports.IconGiphy = WithAudioPlayback.IconGiphy;
|
|
28391
|
+
exports.IconImage = WithAudioPlayback.IconImage;
|
|
28392
|
+
exports.IconLeave = WithAudioPlayback.IconLeave;
|
|
28393
|
+
exports.IconLink = WithAudioPlayback.IconLink;
|
|
28394
|
+
exports.IconLoading = WithAudioPlayback.IconLoading;
|
|
28395
|
+
exports.IconLocation = WithAudioPlayback.IconLocation;
|
|
28396
|
+
exports.IconMessageBubble = WithAudioPlayback.IconMessageBubble;
|
|
28397
|
+
exports.IconMessageBubbleFill = WithAudioPlayback.IconMessageBubbleFill;
|
|
28398
|
+
exports.IconMessageBubbles = WithAudioPlayback.IconMessageBubbles;
|
|
28399
|
+
exports.IconMinusCircle = WithAudioPlayback.IconMinusCircle;
|
|
28400
|
+
exports.IconMore = WithAudioPlayback.IconMore;
|
|
28485
28401
|
exports.IconMute = WithAudioPlayback.IconMute;
|
|
28486
|
-
exports.
|
|
28487
|
-
exports.
|
|
28488
|
-
exports.
|
|
28489
|
-
exports.IconPaperPlaneTopRight = WithAudioPlayback.IconPaperPlaneTopRight;
|
|
28490
|
-
exports.IconPaperclip = WithAudioPlayback.IconPaperclip;
|
|
28491
|
-
exports.IconParagraphsText = WithAudioPlayback.IconParagraphsText;
|
|
28492
|
-
exports.IconPause = WithAudioPlayback.IconPause;
|
|
28493
|
-
exports.IconPencil = WithAudioPlayback.IconPencil;
|
|
28494
|
-
exports.IconPeople = WithAudioPlayback.IconPeople;
|
|
28495
|
-
exports.IconPeople2 = WithAudioPlayback.IconPeople2;
|
|
28496
|
-
exports.IconPeopleAdd = WithAudioPlayback.IconPeopleAdd;
|
|
28497
|
-
exports.IconPeopleAdded = WithAudioPlayback.IconPeopleAdded;
|
|
28498
|
-
exports.IconPeopleCircle = WithAudioPlayback.IconPeopleCircle;
|
|
28499
|
-
exports.IconPeopleCopy = WithAudioPlayback.IconPeopleCopy;
|
|
28500
|
-
exports.IconPeopleEditUserRights = WithAudioPlayback.IconPeopleEditUserRights;
|
|
28501
|
-
exports.IconPeopleRemove = WithAudioPlayback.IconPeopleRemove;
|
|
28502
|
-
exports.IconPersona = WithAudioPlayback.IconPersona;
|
|
28402
|
+
exports.IconNoSign = WithAudioPlayback.IconNoSign;
|
|
28403
|
+
exports.IconNotification = WithAudioPlayback.IconNotification;
|
|
28404
|
+
exports.IconPauseFill = WithAudioPlayback.IconPauseFill;
|
|
28503
28405
|
exports.IconPin = WithAudioPlayback.IconPin;
|
|
28504
|
-
exports.
|
|
28505
|
-
exports.
|
|
28406
|
+
exports.IconPlayFill = WithAudioPlayback.IconPlayFill;
|
|
28407
|
+
exports.IconPlus = WithAudioPlayback.IconPlus;
|
|
28506
28408
|
exports.IconPlusSmall = WithAudioPlayback.IconPlusSmall;
|
|
28507
|
-
exports.
|
|
28508
|
-
exports.
|
|
28509
|
-
exports.
|
|
28510
|
-
exports.
|
|
28511
|
-
exports.
|
|
28512
|
-
exports.
|
|
28513
|
-
exports.
|
|
28514
|
-
exports.
|
|
28515
|
-
exports.
|
|
28516
|
-
exports.
|
|
28517
|
-
exports.
|
|
28518
|
-
exports.
|
|
28519
|
-
exports.IconTeam = WithAudioPlayback.IconTeam;
|
|
28520
|
-
exports.IconTennis = WithAudioPlayback.IconTennis;
|
|
28521
|
-
exports.IconTextToImageURLEnrichment = WithAudioPlayback.IconTextToImageURLEnrichment;
|
|
28522
|
-
exports.IconThunder = WithAudioPlayback.IconThunder;
|
|
28409
|
+
exports.IconPoll = WithAudioPlayback.IconPoll;
|
|
28410
|
+
exports.IconQuote = WithAudioPlayback.IconQuote;
|
|
28411
|
+
exports.IconRefresh = WithAudioPlayback.IconRefresh;
|
|
28412
|
+
exports.IconReorder = WithAudioPlayback.IconReorder;
|
|
28413
|
+
exports.IconReply = WithAudioPlayback.IconReply;
|
|
28414
|
+
exports.IconRetry = WithAudioPlayback.IconRetry;
|
|
28415
|
+
exports.IconSave = WithAudioPlayback.IconSave;
|
|
28416
|
+
exports.IconSearch = WithAudioPlayback.IconSearch;
|
|
28417
|
+
exports.IconSend = WithAudioPlayback.IconSend;
|
|
28418
|
+
exports.IconSidebar = WithAudioPlayback.IconSidebar;
|
|
28419
|
+
exports.IconThread = WithAudioPlayback.IconThread;
|
|
28420
|
+
exports.IconThreadFill = WithAudioPlayback.IconThreadFill;
|
|
28523
28421
|
exports.IconTranslate = WithAudioPlayback.IconTranslate;
|
|
28524
|
-
exports.IconTrashBin = WithAudioPlayback.IconTrashBin;
|
|
28525
|
-
exports.IconTrending4 = WithAudioPlayback.IconTrending4;
|
|
28526
28422
|
exports.IconTrophy = WithAudioPlayback.IconTrophy;
|
|
28527
|
-
exports.IconUnlocked = WithAudioPlayback.IconUnlocked;
|
|
28528
28423
|
exports.IconUnpin = WithAudioPlayback.IconUnpin;
|
|
28529
|
-
exports.
|
|
28424
|
+
exports.IconUnsave = WithAudioPlayback.IconUnsave;
|
|
28425
|
+
exports.IconUpload = WithAudioPlayback.IconUpload;
|
|
28426
|
+
exports.IconUser = WithAudioPlayback.IconUser;
|
|
28427
|
+
exports.IconUserAdd = WithAudioPlayback.IconUserAdd;
|
|
28428
|
+
exports.IconUserCheck = WithAudioPlayback.IconUserCheck;
|
|
28429
|
+
exports.IconUserRemove = WithAudioPlayback.IconUserRemove;
|
|
28530
28430
|
exports.IconVideo = WithAudioPlayback.IconVideo;
|
|
28531
|
-
exports.
|
|
28532
|
-
exports.
|
|
28533
|
-
exports.
|
|
28534
|
-
exports.
|
|
28535
|
-
exports.IconWebhook = WithAudioPlayback.IconWebhook;
|
|
28431
|
+
exports.IconVideoFill = WithAudioPlayback.IconVideoFill;
|
|
28432
|
+
exports.IconVoice = WithAudioPlayback.IconVoice;
|
|
28433
|
+
exports.IconXCircle = WithAudioPlayback.IconXCircle;
|
|
28434
|
+
exports.IconXmark = WithAudioPlayback.IconXmark;
|
|
28536
28435
|
exports.LoadingChannel = WithAudioPlayback.LoadingChannel;
|
|
28537
28436
|
exports.LoadingErrorIndicator = WithAudioPlayback.LoadingErrorIndicator;
|
|
28538
28437
|
exports.MESSAGE_ACTIONS = WithAudioPlayback.MESSAGE_ACTIONS;
|
|
@@ -28698,7 +28597,6 @@ exports.GiphyPreviewMessage = GiphyPreviewMessage;
|
|
|
28698
28597
|
exports.GlobalModal = GlobalModal;
|
|
28699
28598
|
exports.GroupAvatar = GroupAvatar;
|
|
28700
28599
|
exports.Header = Header$1;
|
|
28701
|
-
exports.IconGiphy = IconGiphy;
|
|
28702
28600
|
exports.ImageComponent = ImageComponent;
|
|
28703
28601
|
exports.ImageContainer = ImageContainer;
|
|
28704
28602
|
exports.ImagePlaceholder = ImagePlaceholder;
|