stream-chat-react 14.0.0-beta.2 → 14.0.0-beta.4
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.236d404c.js +4670 -0
- package/dist/cjs/WithAudioPlayback.236d404c.js.map +1 -0
- package/dist/{audioProcessing-BbOs2wMd.js → cjs/audioProcessing.56e5db9d.js} +1 -1
- package/dist/cjs/audioProcessing.56e5db9d.js.map +1 -0
- package/dist/cjs/emojis.js +2 -2
- package/dist/cjs/emojis.js.map +1 -1
- package/dist/cjs/index.js +807 -485
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mp3-encoder.js +1 -1
- package/dist/css/emoji-replacement.css +34 -0
- package/dist/css/emoji-replacement.css.map +1 -0
- package/dist/css/index.css +190 -51
- package/dist/css/index.css.map +1 -1
- package/dist/es/WithAudioPlayback.89700cb5.mjs +4654 -0
- package/dist/es/WithAudioPlayback.89700cb5.mjs.map +1 -0
- package/dist/{audioProcessing-ByEVSjGG.mjs → es/audioProcessing.21cb49e1.mjs} +1 -1
- package/dist/es/audioProcessing.21cb49e1.mjs.map +1 -0
- package/dist/es/emojis.mjs +2 -2
- package/dist/es/emojis.mjs.map +1 -1
- package/dist/es/index.mjs +857 -535
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/mp3-encoder.mjs +1 -1
- package/dist/types/components/Attachment/Giphy.d.ts.map +1 -1
- package/dist/types/components/Attachment/VoiceRecording.d.ts.map +1 -1
- package/dist/types/components/AudioPlayback/AudioPlayer.d.ts.map +1 -1
- package/dist/types/components/BaseImage/toBaseImageDescriptors.d.ts +1 -1
- package/dist/types/components/BaseImage/toBaseImageDescriptors.d.ts.map +1 -1
- package/dist/types/components/ChannelList/hooks/useMobileNavigation.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/ChannelListItemActionButtons.d.ts +3 -1
- package/dist/types/components/ChannelListItem/ChannelListItemActionButtons.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/ChannelListItemActionButtons.defaults.d.ts +6 -3
- package/dist/types/components/ChannelListItem/ChannelListItemActionButtons.defaults.d.ts.map +1 -1
- package/dist/types/components/Chat/hooks/useSplitActionSet.d.ts +5 -0
- package/dist/types/components/Chat/hooks/useSplitActionSet.d.ts.map +1 -1
- package/dist/types/components/Dialog/components/ContextMenu.d.ts +119 -3
- package/dist/types/components/Dialog/components/ContextMenu.d.ts.map +1 -1
- package/dist/types/components/Dialog/hooks/useDialog.d.ts +1 -1
- package/dist/types/components/Dialog/hooks/useDialog.d.ts.map +1 -1
- package/dist/types/components/Dialog/service/DialogAnchor.d.ts +14 -1
- package/dist/types/components/Dialog/service/DialogAnchor.d.ts.map +1 -1
- package/dist/types/components/Dialog/service/DialogManager.d.ts +14 -3
- package/dist/types/components/Dialog/service/DialogManager.d.ts.map +1 -1
- package/dist/types/components/Dialog/service/DialogPortal.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/Gallery/GalleryContext.d.ts +1 -1
- package/dist/types/components/Gallery/GalleryContext.d.ts.map +1 -1
- package/dist/types/components/Icons/IconGiphy.d.ts.map +1 -1
- package/dist/types/components/Icons/icons.d.ts +56 -340
- package/dist/types/components/Icons/icons.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/MessageActions/MessageActions.d.ts +14 -3
- package/dist/types/components/MessageActions/MessageActions.d.ts.map +1 -1
- package/dist/types/components/MessageActions/MessageActions.defaults.d.ts +1 -1
- package/dist/types/components/MessageActions/MessageActions.defaults.d.ts.map +1 -1
- package/dist/types/components/MessageActions/QuickMessageActionButton.d.ts.map +1 -1
- package/dist/types/components/MessageActions/hooks/useBaseMessageActionSetFilter.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentSelector/AttachmentSelector.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/MessageList/useScrollLocationLogic.d.ts +18 -0
- package/dist/types/components/MessageList/hooks/MessageList/useScrollLocationLogic.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotes.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.map +1 -1
- package/dist/types/components/Reactions/MessageReactionsDetail.d.ts +1 -0
- package/dist/types/components/Reactions/MessageReactionsDetail.d.ts.map +1 -1
- package/dist/types/components/Reactions/ReactionSelector.d.ts +1 -1
- package/dist/types/components/Reactions/ReactionSelector.d.ts.map +1 -1
- package/dist/types/components/TextareaComposer/SuggestionList/SuggestionList.d.ts.map +1 -1
- package/dist/types/components/TextareaComposer/TextareaComposer.d.ts.map +1 -1
- package/dist/types/context/ChannelListContext.d.ts +1 -1
- package/dist/types/context/ChannelListContext.d.ts.map +1 -1
- package/dist/types/context/ComponentContext.d.ts +5 -1
- package/dist/types/context/ComponentContext.d.ts.map +1 -1
- package/dist/types/context/DialogManagerContext.d.ts +11 -7
- package/dist/types/context/DialogManagerContext.d.ts.map +1 -1
- package/package.json +5 -4
- package/dist/WithAudioPlayback-C1hfFIcu.mjs +0 -4716
- package/dist/WithAudioPlayback-C1hfFIcu.mjs.map +0 -1
- package/dist/WithAudioPlayback-myzUS2m6.js +0 -4732
- package/dist/WithAudioPlayback-myzUS2m6.js.map +0 -1
- 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/audioProcessing-BbOs2wMd.js.map +0 -1
- package/dist/audioProcessing-ByEVSjGG.mjs.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/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/{assets → css/assets}/EmojiOneColor.woff2 +0 -0
- /package/dist/{assets → css/assets}/NotoColorEmoji-flags.woff2 +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -4,8 +4,8 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const clsx = require("clsx");
|
|
5
5
|
const nanoid = require("nanoid");
|
|
6
6
|
const React = require("react");
|
|
7
|
-
const audioProcessing = require("
|
|
8
|
-
const WithAudioPlayback = require("
|
|
7
|
+
const audioProcessing = require("./audioProcessing.56e5db9d.js");
|
|
8
|
+
const WithAudioPlayback = require("./WithAudioPlayback.236d404c.js");
|
|
9
9
|
const streamChat = require("stream-chat");
|
|
10
10
|
const throttle = require("lodash.throttle");
|
|
11
11
|
const linkify = require("linkifyjs");
|
|
@@ -19,7 +19,6 @@ const unistUtilVisit = require("unist-util-visit");
|
|
|
19
19
|
const i18n = require("i18next");
|
|
20
20
|
const Dayjs = require("dayjs");
|
|
21
21
|
const uniqBy = require("lodash.uniqby");
|
|
22
|
-
const tsPattern = require("ts-pattern");
|
|
23
22
|
const shim = require("use-sync-external-store/shim");
|
|
24
23
|
const debounce = require("lodash.debounce");
|
|
25
24
|
const fixWebmDuration = require("fix-webm-duration");
|
|
@@ -89,10 +88,11 @@ const useAIState = (channel) => {
|
|
|
89
88
|
return { aiState };
|
|
90
89
|
};
|
|
91
90
|
class DialogManager {
|
|
92
|
-
constructor({ id } = {}) {
|
|
91
|
+
constructor({ closeOnClickOutside = true, id } = {}) {
|
|
93
92
|
this.state = new streamChat.StateStore({
|
|
94
93
|
dialogsById: {}
|
|
95
94
|
});
|
|
95
|
+
this.closeOnClickOutside = closeOnClickOutside;
|
|
96
96
|
this.id = id ?? nanoid.nanoid();
|
|
97
97
|
}
|
|
98
98
|
get openDialogCount() {
|
|
@@ -107,13 +107,14 @@ class DialogManager {
|
|
|
107
107
|
get(id) {
|
|
108
108
|
return this.state.getLatestValue().dialogsById[id];
|
|
109
109
|
}
|
|
110
|
-
getOrCreate({ id }) {
|
|
110
|
+
getOrCreate({ closeOnClickOutside, id }) {
|
|
111
111
|
let dialog = this.state.getLatestValue().dialogsById[id];
|
|
112
112
|
if (!dialog) {
|
|
113
113
|
dialog = {
|
|
114
114
|
close: () => {
|
|
115
115
|
this.close(id);
|
|
116
116
|
},
|
|
117
|
+
closeOnClickOutside,
|
|
117
118
|
id,
|
|
118
119
|
isOpen: false,
|
|
119
120
|
open: () => {
|
|
@@ -129,21 +130,22 @@ class DialogManager {
|
|
|
129
130
|
};
|
|
130
131
|
this.state.next((current) => ({
|
|
131
132
|
...current,
|
|
132
|
-
|
|
133
|
+
dialogsById: { ...current.dialogsById, [id]: dialog }
|
|
133
134
|
}));
|
|
134
135
|
}
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
const shouldUpdateDialogSettings = dialog.closeOnClickOutside !== closeOnClickOutside || !!dialog.removalTimeout;
|
|
137
|
+
if (shouldUpdateDialogSettings) {
|
|
138
|
+
if (dialog.removalTimeout) clearTimeout(dialog.removalTimeout);
|
|
139
|
+
dialog = {
|
|
140
|
+
...dialog,
|
|
141
|
+
closeOnClickOutside,
|
|
142
|
+
removalTimeout: void 0
|
|
143
|
+
};
|
|
137
144
|
this.state.next((current) => ({
|
|
138
145
|
...current,
|
|
139
|
-
|
|
140
|
-
dialogsById
|
|
141
|
-
|
|
142
|
-
[id]: {
|
|
143
|
-
...dialog,
|
|
144
|
-
removalTimeout: void 0
|
|
145
|
-
}
|
|
146
|
-
}
|
|
146
|
+
dialogsById: {
|
|
147
|
+
...current.dialogsById,
|
|
148
|
+
[id]: dialog
|
|
147
149
|
}
|
|
148
150
|
}));
|
|
149
151
|
}
|
|
@@ -220,7 +222,11 @@ class DialogManager {
|
|
|
220
222
|
}));
|
|
221
223
|
}
|
|
222
224
|
}
|
|
223
|
-
const useDialog = ({
|
|
225
|
+
const useDialog = ({
|
|
226
|
+
closeOnClickOutside,
|
|
227
|
+
dialogManagerId,
|
|
228
|
+
id
|
|
229
|
+
}) => {
|
|
224
230
|
const { dialogManager } = useDialogManager({ dialogManagerId });
|
|
225
231
|
React.useEffect(
|
|
226
232
|
() => () => {
|
|
@@ -228,7 +234,7 @@ const useDialog = ({ dialogManagerId, id }) => {
|
|
|
228
234
|
},
|
|
229
235
|
[dialogManager, id]
|
|
230
236
|
);
|
|
231
|
-
return dialogManager.getOrCreate({ id });
|
|
237
|
+
return dialogManager.getOrCreate({ closeOnClickOutside, id });
|
|
232
238
|
};
|
|
233
239
|
const useDialogOnNearestManager = ({ id }) => {
|
|
234
240
|
const { dialogManager } = useNearestDialogManagerContext() ?? {};
|
|
@@ -275,9 +281,37 @@ const Portal = ({
|
|
|
275
281
|
if (!portalDestination) return null;
|
|
276
282
|
return reactDom.createPortal(children, portalDestination);
|
|
277
283
|
};
|
|
284
|
+
const shouldCloseOnOutsideClick = ({
|
|
285
|
+
dialog,
|
|
286
|
+
managerCloseOnClickOutside
|
|
287
|
+
}) => dialog.closeOnClickOutside ?? managerCloseOnClickOutside;
|
|
278
288
|
const DialogPortalDestination = () => {
|
|
279
289
|
const { dialogManager } = useNearestDialogManagerContext() ?? {};
|
|
280
290
|
const openedDialogCount = useOpenedDialogCount({ dialogManagerId: dialogManager?.id });
|
|
291
|
+
const [destinationRoot, setDestinationRoot] = React.useState(null);
|
|
292
|
+
React.useEffect(() => {
|
|
293
|
+
if (!destinationRoot || !dialogManager) return;
|
|
294
|
+
const handleDocumentClick = (event) => {
|
|
295
|
+
if (destinationRoot.contains(event.target)) return;
|
|
296
|
+
setTimeout(() => {
|
|
297
|
+
Object.values(dialogManager.state.getLatestValue().dialogsById).forEach(
|
|
298
|
+
(dialog) => {
|
|
299
|
+
if (!dialog.isOpen) return;
|
|
300
|
+
if (!shouldCloseOnOutsideClick({
|
|
301
|
+
dialog,
|
|
302
|
+
managerCloseOnClickOutside: dialogManager.closeOnClickOutside
|
|
303
|
+
}))
|
|
304
|
+
return;
|
|
305
|
+
dialogManager.close(dialog.id);
|
|
306
|
+
}
|
|
307
|
+
);
|
|
308
|
+
}, 0);
|
|
309
|
+
};
|
|
310
|
+
document.addEventListener("click", handleDocumentClick, { capture: true });
|
|
311
|
+
return () => {
|
|
312
|
+
document.removeEventListener("click", handleDocumentClick, { capture: true });
|
|
313
|
+
};
|
|
314
|
+
}, [destinationRoot, dialogManager]);
|
|
281
315
|
if (!openedDialogCount) return null;
|
|
282
316
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
283
317
|
"div",
|
|
@@ -285,7 +319,22 @@ const DialogPortalDestination = () => {
|
|
|
285
319
|
className: "str-chat__dialog-overlay",
|
|
286
320
|
"data-str-chat__portal-id": dialogManager?.id,
|
|
287
321
|
"data-testid": "str-chat__dialog-overlay",
|
|
288
|
-
onClick: () =>
|
|
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
|
+
ref: setDestinationRoot,
|
|
289
338
|
style: {
|
|
290
339
|
"--str-chat__dialog-overlay-height": openedDialogCount > 0 ? "100%" : "0"
|
|
291
340
|
}
|
|
@@ -307,11 +356,16 @@ const DialogPortalEntry = ({
|
|
|
307
356
|
};
|
|
308
357
|
const dialogManagersRegistry = new streamChat.StateStore({});
|
|
309
358
|
const getDialogManager = (id) => dialogManagersRegistry.getLatestValue()[id];
|
|
310
|
-
const getOrCreateDialogManager = (
|
|
359
|
+
const getOrCreateDialogManager = ({
|
|
360
|
+
closeOnClickOutside,
|
|
361
|
+
id
|
|
362
|
+
}) => {
|
|
311
363
|
let manager = getDialogManager(id);
|
|
312
364
|
if (!manager) {
|
|
313
|
-
manager = new DialogManager({ id });
|
|
365
|
+
manager = new DialogManager({ closeOnClickOutside, id });
|
|
314
366
|
dialogManagersRegistry.partialNext({ [id]: manager });
|
|
367
|
+
} else if (typeof closeOnClickOutside === "boolean") {
|
|
368
|
+
manager.closeOnClickOutside = closeOnClickOutside;
|
|
315
369
|
}
|
|
316
370
|
return manager;
|
|
317
371
|
};
|
|
@@ -322,20 +376,21 @@ const removeDialogManager = (id) => {
|
|
|
322
376
|
const DialogManagerProviderContext = React.createContext(void 0);
|
|
323
377
|
const DialogManagerProvider = ({
|
|
324
378
|
children,
|
|
379
|
+
closeOnClickOutside,
|
|
325
380
|
id
|
|
326
381
|
}) => {
|
|
327
382
|
const [dialogManager, setDialogManager] = React.useState(() => {
|
|
328
383
|
if (id) return getDialogManager(id) ?? null;
|
|
329
|
-
return new DialogManager();
|
|
384
|
+
return new DialogManager({ closeOnClickOutside });
|
|
330
385
|
});
|
|
331
386
|
React.useEffect(() => {
|
|
332
387
|
if (!id) return;
|
|
333
|
-
setDialogManager(getOrCreateDialogManager(id));
|
|
388
|
+
setDialogManager(getOrCreateDialogManager({ closeOnClickOutside, id }));
|
|
334
389
|
return () => {
|
|
335
390
|
removeDialogManager(id);
|
|
336
391
|
setDialogManager(null);
|
|
337
392
|
};
|
|
338
|
-
}, [id]);
|
|
393
|
+
}, [closeOnClickOutside, id]);
|
|
339
394
|
if (!dialogManager) return null;
|
|
340
395
|
return /* @__PURE__ */ jsxRuntime.jsxs(DialogManagerProviderContext.Provider, { value: { dialogManager }, children: [
|
|
341
396
|
children,
|
|
@@ -679,39 +734,37 @@ const IconGiphy = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
|
679
734
|
className: clsx("str-chat__icon--giphy", className),
|
|
680
735
|
viewBox: "0 0 16 16",
|
|
681
736
|
children: [
|
|
682
|
-
/* @__PURE__ */ jsxRuntime.
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
] }),
|
|
714
|
-
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "clip0_4197_15218", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "16", width: "16" }) }) })
|
|
737
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "black", height: "16", rx: "8", width: "16" }),
|
|
738
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
739
|
+
"path",
|
|
740
|
+
{
|
|
741
|
+
clipRule: "evenodd",
|
|
742
|
+
d: "M5.27976 4.40015H10.7206V11.5999H5.2793L5.27976 4.40015Z",
|
|
743
|
+
fill: "black",
|
|
744
|
+
fillRule: "evenodd"
|
|
745
|
+
}
|
|
746
|
+
),
|
|
747
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.19189 4.1333H5.27969V11.8669H4.19189V4.1333Z", fill: "#04FF8E" }),
|
|
748
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.7202 6.26685H11.808V11.8668H10.7202V6.26685Z", fill: "#8E2EFF" }),
|
|
749
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.19189 11.5999H11.8079V12.6667H4.19189V11.5999Z", fill: "#00C5FF" }),
|
|
750
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.19189 3.33325H8.54403V4.40005H4.19189V3.33325Z", fill: "#FFF152" }),
|
|
751
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
752
|
+
"path",
|
|
753
|
+
{
|
|
754
|
+
d: "M10.72 5.46638V4.40005H9.63174V3.33325H8.54395V6.53318H11.8078V5.46638",
|
|
755
|
+
fill: "#FF5B5B"
|
|
756
|
+
}
|
|
757
|
+
),
|
|
758
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.7202 7.6V6.5332H11.808", fill: "#551C99" }),
|
|
759
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
760
|
+
"path",
|
|
761
|
+
{
|
|
762
|
+
clipRule: "evenodd",
|
|
763
|
+
d: "M8.54432 3.33325V4.40005H7.45605",
|
|
764
|
+
fill: "#999131",
|
|
765
|
+
fillRule: "evenodd"
|
|
766
|
+
}
|
|
767
|
+
)
|
|
715
768
|
]
|
|
716
769
|
}
|
|
717
770
|
);
|
|
@@ -725,7 +778,7 @@ const PlayButton = ({ className, isPlaying, ...props }) => /* @__PURE__ */ jsxRu
|
|
|
725
778
|
size: "sm",
|
|
726
779
|
variant: "secondary",
|
|
727
780
|
...props,
|
|
728
|
-
children: isPlaying ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
781
|
+
children: isPlaying ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPauseFill, {}) : /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlayFill, {})
|
|
729
782
|
}
|
|
730
783
|
);
|
|
731
784
|
const Anonymous$b = "Anonym";
|
|
@@ -8464,7 +8517,7 @@ const LoadingChannels = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className
|
|
|
8464
8517
|
/* @__PURE__ */ jsxRuntime.jsx(LoadingItems, {}),
|
|
8465
8518
|
/* @__PURE__ */ jsxRuntime.jsx(LoadingItems, {})
|
|
8466
8519
|
] });
|
|
8467
|
-
const LoadingIndicator = (props) => /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
8520
|
+
const LoadingIndicator = (props) => /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconLoading, { ...props, className: "str-chat__loading-indicator" });
|
|
8468
8521
|
const UnMemoizedCustomNotification = (props) => {
|
|
8469
8522
|
const { active, children, className, type } = props;
|
|
8470
8523
|
if (!active) return null;
|
|
@@ -9054,6 +9107,7 @@ function useDialogAnchor({
|
|
|
9054
9107
|
setPopperElement(null);
|
|
9055
9108
|
}
|
|
9056
9109
|
return {
|
|
9110
|
+
placement: stabilisedChosenPlacement ?? chosenPlacement,
|
|
9057
9111
|
setPopperElement,
|
|
9058
9112
|
styles: {
|
|
9059
9113
|
left: x ?? 0,
|
|
@@ -9066,6 +9120,8 @@ const DialogAnchor = ({
|
|
|
9066
9120
|
allowFlip = true,
|
|
9067
9121
|
children,
|
|
9068
9122
|
className,
|
|
9123
|
+
closeOnClickOutside,
|
|
9124
|
+
closeTransitionMs = 0,
|
|
9069
9125
|
dialogManagerId,
|
|
9070
9126
|
focus: focus$1 = true,
|
|
9071
9127
|
id,
|
|
@@ -9078,12 +9134,44 @@ const DialogAnchor = ({
|
|
|
9078
9134
|
updatePositionOnContentResize,
|
|
9079
9135
|
...restDivProps
|
|
9080
9136
|
}) => {
|
|
9081
|
-
const dialog = useDialog({ dialogManagerId, id });
|
|
9137
|
+
const dialog = useDialog({ closeOnClickOutside, dialogManagerId, id });
|
|
9082
9138
|
const open = useDialogIsOpen(id, dialogManagerId);
|
|
9083
|
-
const
|
|
9139
|
+
const [shouldRender, setShouldRender] = React.useState(open);
|
|
9140
|
+
const closeTimeoutRef = React.useRef(null);
|
|
9141
|
+
const isClosing = !open && shouldRender;
|
|
9142
|
+
React.useEffect(() => {
|
|
9143
|
+
if (open) {
|
|
9144
|
+
setShouldRender(true);
|
|
9145
|
+
if (closeTimeoutRef.current) {
|
|
9146
|
+
clearTimeout(closeTimeoutRef.current);
|
|
9147
|
+
closeTimeoutRef.current = null;
|
|
9148
|
+
}
|
|
9149
|
+
return;
|
|
9150
|
+
}
|
|
9151
|
+
if (!shouldRender) return;
|
|
9152
|
+
if (!closeTransitionMs) {
|
|
9153
|
+
setShouldRender(false);
|
|
9154
|
+
return;
|
|
9155
|
+
}
|
|
9156
|
+
closeTimeoutRef.current = setTimeout(() => {
|
|
9157
|
+
setShouldRender(false);
|
|
9158
|
+
closeTimeoutRef.current = null;
|
|
9159
|
+
}, closeTransitionMs);
|
|
9160
|
+
}, [closeTransitionMs, open, shouldRender]);
|
|
9161
|
+
React.useEffect(
|
|
9162
|
+
() => () => {
|
|
9163
|
+
if (closeTimeoutRef.current) clearTimeout(closeTimeoutRef.current);
|
|
9164
|
+
},
|
|
9165
|
+
[]
|
|
9166
|
+
);
|
|
9167
|
+
const {
|
|
9168
|
+
placement: chosenPlacement,
|
|
9169
|
+
setPopperElement,
|
|
9170
|
+
styles
|
|
9171
|
+
} = useDialogAnchor({
|
|
9084
9172
|
allowFlip,
|
|
9085
9173
|
offset,
|
|
9086
|
-
open,
|
|
9174
|
+
open: shouldRender,
|
|
9087
9175
|
placement,
|
|
9088
9176
|
referenceElement,
|
|
9089
9177
|
updateKey,
|
|
@@ -9100,7 +9188,7 @@ const DialogAnchor = ({
|
|
|
9100
9188
|
document.removeEventListener("keyup", hideOnEscape);
|
|
9101
9189
|
};
|
|
9102
9190
|
}, [dialog, open]);
|
|
9103
|
-
if (!
|
|
9191
|
+
if (!shouldRender) {
|
|
9104
9192
|
return null;
|
|
9105
9193
|
}
|
|
9106
9194
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogPortalEntry, { dialogId: id, dialogManagerId, children: /* @__PURE__ */ jsxRuntime.jsx(focus.FocusScope, { autoFocus: focus$1, contain: trapFocus, restoreFocus: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9108,6 +9196,8 @@ const DialogAnchor = ({
|
|
|
9108
9196
|
{
|
|
9109
9197
|
...restDivProps,
|
|
9110
9198
|
className: clsx("str-chat__dialog-contents", className),
|
|
9199
|
+
"data-str-chat-dialog-state": isClosing ? "closing" : "open",
|
|
9200
|
+
"data-str-chat-placement": chosenPlacement,
|
|
9111
9201
|
"data-testid": "str-chat__dialog-contents",
|
|
9112
9202
|
ref: setPopperElement,
|
|
9113
9203
|
style: styles,
|
|
@@ -9139,7 +9229,7 @@ const DefaultCalloutDialog = ({ children, className, onClose }) => /* @__PURE__
|
|
|
9139
9229
|
onClick: onClose,
|
|
9140
9230
|
size: "sm",
|
|
9141
9231
|
variant: "secondary",
|
|
9142
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
9232
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
9143
9233
|
}
|
|
9144
9234
|
)
|
|
9145
9235
|
] });
|
|
@@ -9209,7 +9299,7 @@ const Avatar = ({
|
|
|
9209
9299
|
}
|
|
9210
9300
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9211
9301
|
!!sizeAwareInitials.length && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__avatar-initials", "data-testid": "avatar-fallback", children: sizeAwareInitials }),
|
|
9212
|
-
!sizeAwareInitials.length && /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
9302
|
+
!sizeAwareInitials.length && /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconUser, {})
|
|
9213
9303
|
] })
|
|
9214
9304
|
]
|
|
9215
9305
|
}
|
|
@@ -9238,7 +9328,7 @@ const ErrorBadge = ({
|
|
|
9238
9328
|
className,
|
|
9239
9329
|
size = "sm",
|
|
9240
9330
|
...rest
|
|
9241
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...rest, className, size, variant: "error", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
9331
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { ...rest, className, size, variant: "error", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationMarkFill, {}) });
|
|
9242
9332
|
function AvatarStack({
|
|
9243
9333
|
badgeSize,
|
|
9244
9334
|
component: Component = "div",
|
|
@@ -9450,16 +9540,152 @@ const EmojiContextMenuButton = ({
|
|
|
9450
9540
|
]
|
|
9451
9541
|
}
|
|
9452
9542
|
);
|
|
9453
|
-
const
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9543
|
+
const ContextMenuButtonWithSubmenu = ({
|
|
9544
|
+
children,
|
|
9545
|
+
className,
|
|
9546
|
+
Submenu,
|
|
9547
|
+
submenuContainerProps,
|
|
9548
|
+
submenuPlacement = "right-start",
|
|
9549
|
+
submenuRollAxis = "x",
|
|
9550
|
+
...buttonProps
|
|
9457
9551
|
}) => {
|
|
9552
|
+
const { className: submenuClassName, ...submenuContainerRestProps } = submenuContainerProps ?? {};
|
|
9553
|
+
const buttonRef = React.useRef(null);
|
|
9554
|
+
const [dialogContainer, setDialogContainer] = React.useState(null);
|
|
9555
|
+
const keepSubmenuOpenFlag = React.useRef(false);
|
|
9556
|
+
const dialogCloseTimeout = React.useRef(null);
|
|
9557
|
+
const dialogId2 = React.useMemo(() => `submenu-${Math.random().toString(36).slice(2)}`, []);
|
|
9558
|
+
const { dialog, dialogManager } = useDialogOnNearestManager({ id: dialogId2 });
|
|
9559
|
+
const dialogIsOpen = useDialogIsOpen(dialogId2, dialogManager?.id);
|
|
9560
|
+
const {
|
|
9561
|
+
placement: chosenPlacement,
|
|
9562
|
+
setPopperElement,
|
|
9563
|
+
styles
|
|
9564
|
+
} = useDialogAnchor({
|
|
9565
|
+
open: dialogIsOpen,
|
|
9566
|
+
placement: submenuPlacement,
|
|
9567
|
+
referenceElement: buttonRef.current
|
|
9568
|
+
});
|
|
9569
|
+
const closeDialogLazily = React.useCallback(() => {
|
|
9570
|
+
if (dialogCloseTimeout.current) clearTimeout(dialogCloseTimeout.current);
|
|
9571
|
+
dialogCloseTimeout.current = setTimeout(() => {
|
|
9572
|
+
if (keepSubmenuOpenFlag.current) return;
|
|
9573
|
+
dialog.close();
|
|
9574
|
+
}, 100);
|
|
9575
|
+
}, [dialog]);
|
|
9576
|
+
const keepSubmenuOpen = React.useCallback(() => {
|
|
9577
|
+
keepSubmenuOpenFlag.current = true;
|
|
9578
|
+
}, []);
|
|
9579
|
+
const allowToCloseSubmenu = React.useCallback(() => {
|
|
9580
|
+
keepSubmenuOpenFlag.current = false;
|
|
9581
|
+
}, []);
|
|
9582
|
+
const closeSubmenu = React.useCallback(() => {
|
|
9583
|
+
allowToCloseSubmenu();
|
|
9584
|
+
closeDialogLazily();
|
|
9585
|
+
}, [allowToCloseSubmenu, closeDialogLazily]);
|
|
9586
|
+
const handleClose = React.useCallback(
|
|
9587
|
+
(event) => {
|
|
9588
|
+
const parentButton = buttonRef.current;
|
|
9589
|
+
if (!dialogIsOpen || !parentButton) return;
|
|
9590
|
+
event.stopPropagation();
|
|
9591
|
+
closeDialogLazily();
|
|
9592
|
+
parentButton.focus();
|
|
9593
|
+
},
|
|
9594
|
+
[closeDialogLazily, dialogIsOpen, buttonRef]
|
|
9595
|
+
);
|
|
9596
|
+
const handleFocusParentButton = () => {
|
|
9597
|
+
if (dialogIsOpen) return;
|
|
9598
|
+
dialog.open();
|
|
9599
|
+
keepSubmenuOpen();
|
|
9600
|
+
};
|
|
9601
|
+
React.useEffect(() => {
|
|
9602
|
+
const parentButton = buttonRef.current;
|
|
9603
|
+
if (!dialogIsOpen || !parentButton) return;
|
|
9604
|
+
const hideOnEscape = (event) => {
|
|
9605
|
+
if (event.key !== "Escape") return;
|
|
9606
|
+
handleClose(event);
|
|
9607
|
+
closeSubmenu();
|
|
9608
|
+
};
|
|
9609
|
+
document.addEventListener("keyup", hideOnEscape, { capture: true });
|
|
9610
|
+
return () => {
|
|
9611
|
+
document.removeEventListener("keyup", hideOnEscape, { capture: true });
|
|
9612
|
+
};
|
|
9613
|
+
}, [dialogIsOpen, handleClose, closeSubmenu]);
|
|
9614
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9615
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9616
|
+
BaseContextMenuButton,
|
|
9617
|
+
{
|
|
9618
|
+
"aria-selected": "false",
|
|
9619
|
+
className: clsx(className, "str_chat__button-with-submenu", {
|
|
9620
|
+
"str_chat__button-with-submenu--submenu-open": dialogIsOpen
|
|
9621
|
+
}),
|
|
9622
|
+
hasSubMenu: true,
|
|
9623
|
+
onBlur: closeSubmenu,
|
|
9624
|
+
onClick: (event) => {
|
|
9625
|
+
event.stopPropagation();
|
|
9626
|
+
dialog.toggle();
|
|
9627
|
+
},
|
|
9628
|
+
onFocus: handleFocusParentButton,
|
|
9629
|
+
onMouseEnter: handleFocusParentButton,
|
|
9630
|
+
onMouseLeave: closeSubmenu,
|
|
9631
|
+
role: "option",
|
|
9632
|
+
...buttonProps,
|
|
9633
|
+
ref: buttonRef,
|
|
9634
|
+
children
|
|
9635
|
+
}
|
|
9636
|
+
),
|
|
9637
|
+
dialogIsOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9638
|
+
"div",
|
|
9639
|
+
{
|
|
9640
|
+
className: clsx("str-chat__context-menu__submenu-container", submenuClassName),
|
|
9641
|
+
"data-str-chat-placement": chosenPlacement,
|
|
9642
|
+
"data-str-chat-roll-axis": submenuRollAxis,
|
|
9643
|
+
onBlur: (event) => {
|
|
9644
|
+
const isBlurredDescendant = event.relatedTarget instanceof Node && dialogContainer?.contains(event.relatedTarget);
|
|
9645
|
+
if (isBlurredDescendant) return;
|
|
9646
|
+
closeSubmenu();
|
|
9647
|
+
},
|
|
9648
|
+
onFocus: keepSubmenuOpen,
|
|
9649
|
+
onMouseEnter: keepSubmenuOpen,
|
|
9650
|
+
onMouseLeave: closeSubmenu,
|
|
9651
|
+
ref: (element) => {
|
|
9652
|
+
setPopperElement(element);
|
|
9653
|
+
setDialogContainer(element);
|
|
9654
|
+
},
|
|
9655
|
+
style: styles,
|
|
9656
|
+
tabIndex: -1,
|
|
9657
|
+
...submenuContainerRestProps,
|
|
9658
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Submenu, {})
|
|
9659
|
+
}
|
|
9660
|
+
)
|
|
9661
|
+
] });
|
|
9662
|
+
};
|
|
9663
|
+
const ContextMenuButton = (props) => {
|
|
9664
|
+
const {
|
|
9665
|
+
Submenu,
|
|
9666
|
+
submenuContainerProps,
|
|
9667
|
+
submenuPlacement,
|
|
9668
|
+
submenuRollAxis,
|
|
9669
|
+
...buttonProps
|
|
9670
|
+
} = props;
|
|
9458
9671
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
9672
|
+
if (Submenu) {
|
|
9673
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9674
|
+
ContextMenuButtonWithSubmenu,
|
|
9675
|
+
{
|
|
9676
|
+
...buttonProps,
|
|
9677
|
+
Submenu,
|
|
9678
|
+
submenuContainerProps,
|
|
9679
|
+
submenuPlacement,
|
|
9680
|
+
submenuRollAxis
|
|
9681
|
+
}
|
|
9682
|
+
);
|
|
9683
|
+
}
|
|
9684
|
+
const { onBlur, onFocus, ...baseButtonProps } = buttonProps;
|
|
9459
9685
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9460
9686
|
BaseContextMenuButton,
|
|
9461
9687
|
{
|
|
9462
|
-
...
|
|
9688
|
+
...baseButtonProps,
|
|
9463
9689
|
"aria-selected": isFocused ? "true" : "false",
|
|
9464
9690
|
onBlur: (e) => {
|
|
9465
9691
|
setIsFocused(false);
|
|
@@ -9508,12 +9734,14 @@ function ContextMenuContent({
|
|
|
9508
9734
|
backLabel = "Back",
|
|
9509
9735
|
children,
|
|
9510
9736
|
className,
|
|
9737
|
+
enableAnimations = true,
|
|
9511
9738
|
Header: Header2,
|
|
9512
9739
|
items,
|
|
9513
9740
|
ItemsWrapper,
|
|
9514
9741
|
menuClassName,
|
|
9515
9742
|
onClose,
|
|
9516
9743
|
onMenuLevelChange,
|
|
9744
|
+
transitionDirection,
|
|
9517
9745
|
...props
|
|
9518
9746
|
}) {
|
|
9519
9747
|
const rootLevel = React.useMemo(
|
|
@@ -9526,6 +9754,7 @@ function ContextMenuContent({
|
|
|
9526
9754
|
[Header2, items, ItemsWrapper, menuClassName]
|
|
9527
9755
|
);
|
|
9528
9756
|
const [menuStack, setMenuStack] = React.useState(() => [rootLevel]);
|
|
9757
|
+
const [menuBodyAnimationKey, setMenuBodyAnimationKey] = React.useState(0);
|
|
9529
9758
|
const activeMenu = menuStack[menuStack.length - 1];
|
|
9530
9759
|
const ActiveMenuItemsWrapper = activeMenu.ItemsWrapper ?? React.Fragment;
|
|
9531
9760
|
const closeMenu = React.useCallback(() => {
|
|
@@ -9549,10 +9778,9 @@ function ContextMenuContent({
|
|
|
9549
9778
|
[ItemsWrapper]
|
|
9550
9779
|
);
|
|
9551
9780
|
const returnToParentMenu = React.useCallback(() => {
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
}, []);
|
|
9781
|
+
if (menuStack.length <= 1) return;
|
|
9782
|
+
setMenuStack((current) => current.slice(0, current.length - 1));
|
|
9783
|
+
}, [menuStack.length]);
|
|
9556
9784
|
React.useEffect(() => {
|
|
9557
9785
|
setMenuStack((current) => {
|
|
9558
9786
|
if (current.length === 1 && current[0] === rootLevel) return current;
|
|
@@ -9562,42 +9790,116 @@ function ContextMenuContent({
|
|
|
9562
9790
|
React.useEffect(() => {
|
|
9563
9791
|
onMenuLevelChange?.(menuStack.length);
|
|
9564
9792
|
}, [menuStack.length, onMenuLevelChange]);
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9793
|
+
React.useEffect(() => {
|
|
9794
|
+
if (!transitionDirection) return;
|
|
9795
|
+
setMenuBodyAnimationKey((value) => value + 1);
|
|
9796
|
+
}, [transitionDirection, menuStack.length]);
|
|
9797
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuContext.Provider, { value: { closeMenu, openSubmenu, returnToParentMenu }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9798
|
+
ContextMenuRoot,
|
|
9799
|
+
{
|
|
9800
|
+
className: clsx(className, activeMenu.menuClassName),
|
|
9801
|
+
"data-str-chat-enable-animations": enableAnimations,
|
|
9802
|
+
...props,
|
|
9803
|
+
children: [
|
|
9804
|
+
activeMenu.Header ? /* @__PURE__ */ jsxRuntime.jsx(activeMenu.Header, {}) : menuStack.length > 1 ? /* @__PURE__ */ jsxRuntime.jsx(ContextMenuHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(ContextMenuBackButton, { onClick: returnToParentMenu, children: [
|
|
9805
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconChevronLeft, {}),
|
|
9806
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: backLabel })
|
|
9807
|
+
] }) }) : null,
|
|
9808
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9809
|
+
ContextMenuBody,
|
|
9810
|
+
{
|
|
9811
|
+
className: clsx({
|
|
9812
|
+
"str-chat__context-menu__body--submenu-backward": transitionDirection === "backward",
|
|
9813
|
+
"str-chat__context-menu__body--submenu-forward": transitionDirection === "forward"
|
|
9814
|
+
}),
|
|
9815
|
+
children: activeMenu.Submenu ? /* @__PURE__ */ jsxRuntime.jsx(activeMenu.Submenu, {}) : /* @__PURE__ */ jsxRuntime.jsx(ActiveMenuItemsWrapper, { children: typeof children !== "undefined" ? children : activeMenu.items?.map((Item2, index) => /* @__PURE__ */ jsxRuntime.jsx(Item2, {}, `context-menu-item-${index}`)) })
|
|
9816
|
+
},
|
|
9817
|
+
`context-menu-body-${menuStack.length}-${menuBodyAnimationKey}`
|
|
9818
|
+
)
|
|
9819
|
+
]
|
|
9820
|
+
}
|
|
9821
|
+
) });
|
|
9572
9822
|
}
|
|
9573
9823
|
const ContextMenu = (props) => {
|
|
9824
|
+
const { ContextMenuContent: ContextMenuContentComponent = ContextMenuContent } = WithAudioPlayback.useComponentContext();
|
|
9574
9825
|
const {
|
|
9575
9826
|
allowFlip,
|
|
9827
|
+
closeOnClickOutside,
|
|
9828
|
+
closeTransitionMs = 130,
|
|
9576
9829
|
dialogManagerId,
|
|
9577
9830
|
focus: focus2,
|
|
9578
9831
|
id,
|
|
9579
9832
|
placement,
|
|
9580
9833
|
referenceElement,
|
|
9834
|
+
submenuTransitionDurationMs,
|
|
9581
9835
|
tabIndex,
|
|
9582
9836
|
trapFocus,
|
|
9583
9837
|
...menuProps
|
|
9584
9838
|
} = props;
|
|
9839
|
+
const resolvedSubmenuTransitionDurationMs = submenuTransitionDurationMs ?? 460;
|
|
9585
9840
|
const isAnchored = id != null;
|
|
9586
9841
|
const [menuLevel, setMenuLevel] = React.useState(1);
|
|
9842
|
+
const [transitionDirection, setTransitionDirection] = React.useState(void 0);
|
|
9843
|
+
const [contentResetToken, setContentResetToken] = React.useState(0);
|
|
9844
|
+
const transitionTimeoutRef = React.useRef(null);
|
|
9845
|
+
const previousMenuLevelRef = React.useRef(1);
|
|
9587
9846
|
const open = useDialogIsOpen(id ?? "", dialogManagerId);
|
|
9847
|
+
const previousOpenRef = React.useRef(open);
|
|
9588
9848
|
React.useEffect(() => {
|
|
9589
|
-
if (isAnchored
|
|
9849
|
+
if (!isAnchored) return;
|
|
9850
|
+
if (previousOpenRef.current && !open) {
|
|
9851
|
+
setMenuLevel(1);
|
|
9852
|
+
setTransitionDirection(void 0);
|
|
9853
|
+
setContentResetToken((value) => value + 1);
|
|
9854
|
+
previousMenuLevelRef.current = 1;
|
|
9855
|
+
if (transitionTimeoutRef.current) {
|
|
9856
|
+
clearTimeout(transitionTimeoutRef.current);
|
|
9857
|
+
transitionTimeoutRef.current = null;
|
|
9858
|
+
}
|
|
9859
|
+
}
|
|
9860
|
+
previousOpenRef.current = open;
|
|
9590
9861
|
}, [isAnchored, open]);
|
|
9591
|
-
|
|
9592
|
-
|
|
9862
|
+
React.useEffect(
|
|
9863
|
+
() => () => {
|
|
9864
|
+
if (transitionTimeoutRef.current) {
|
|
9865
|
+
clearTimeout(transitionTimeoutRef.current);
|
|
9866
|
+
}
|
|
9867
|
+
},
|
|
9868
|
+
[]
|
|
9869
|
+
);
|
|
9870
|
+
const handleMenuLevelChange = React.useCallback(
|
|
9871
|
+
(level) => {
|
|
9872
|
+
if (isAnchored) {
|
|
9873
|
+
const previousLevel = previousMenuLevelRef.current;
|
|
9874
|
+
if (level !== previousLevel) {
|
|
9875
|
+
setTransitionDirection(level > previousLevel ? "forward" : "backward");
|
|
9876
|
+
if (transitionTimeoutRef.current) clearTimeout(transitionTimeoutRef.current);
|
|
9877
|
+
transitionTimeoutRef.current = setTimeout(() => {
|
|
9878
|
+
setTransitionDirection(void 0);
|
|
9879
|
+
transitionTimeoutRef.current = null;
|
|
9880
|
+
}, resolvedSubmenuTransitionDurationMs);
|
|
9881
|
+
}
|
|
9882
|
+
previousMenuLevelRef.current = level;
|
|
9883
|
+
setMenuLevel(level);
|
|
9884
|
+
return;
|
|
9885
|
+
}
|
|
9886
|
+
menuProps.onMenuLevelChange?.(level);
|
|
9887
|
+
},
|
|
9888
|
+
[isAnchored, menuProps, resolvedSubmenuTransitionDurationMs]
|
|
9889
|
+
);
|
|
9890
|
+
const content = /* @__PURE__ */ React.createElement(
|
|
9891
|
+
ContextMenuContentComponent,
|
|
9593
9892
|
{
|
|
9594
9893
|
...menuProps,
|
|
9595
|
-
|
|
9894
|
+
key: `context-menu-content-${contentResetToken}`,
|
|
9895
|
+
onMenuLevelChange: handleMenuLevelChange,
|
|
9896
|
+
transitionDirection
|
|
9596
9897
|
}
|
|
9597
9898
|
);
|
|
9598
9899
|
if (isAnchored) {
|
|
9599
9900
|
const {
|
|
9600
9901
|
backLabel: _b,
|
|
9902
|
+
enableAnimations: _ea,
|
|
9601
9903
|
Header: _h,
|
|
9602
9904
|
items: _i,
|
|
9603
9905
|
ItemsWrapper: _w,
|
|
@@ -9610,6 +9912,8 @@ const ContextMenu = (props) => {
|
|
|
9610
9912
|
DialogAnchor,
|
|
9611
9913
|
{
|
|
9612
9914
|
allowFlip,
|
|
9915
|
+
closeOnClickOutside,
|
|
9916
|
+
closeTransitionMs,
|
|
9613
9917
|
dialogManagerId,
|
|
9614
9918
|
focus: focus2,
|
|
9615
9919
|
id,
|
|
@@ -9640,7 +9944,7 @@ const PromptHeader = ({ className, close, description, title }) => /* @__PURE__
|
|
|
9640
9944
|
onClick: close,
|
|
9641
9945
|
size: "sm",
|
|
9642
9946
|
variant: "secondary",
|
|
9643
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
9947
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
9644
9948
|
}
|
|
9645
9949
|
)
|
|
9646
9950
|
] });
|
|
@@ -9709,7 +10013,7 @@ const ViewerHeader = ({
|
|
|
9709
10013
|
onClick: close,
|
|
9710
10014
|
size: "sm",
|
|
9711
10015
|
variant: "secondary",
|
|
9712
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
10016
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
9713
10017
|
}
|
|
9714
10018
|
)
|
|
9715
10019
|
] });
|
|
@@ -9846,7 +10150,7 @@ function MessageBouncePrompt({ children }) {
|
|
|
9846
10150
|
Alert.Header,
|
|
9847
10151
|
{
|
|
9848
10152
|
className: "str-chat__message-bounce-alert-header",
|
|
9849
|
-
Icon: WithAudioPlayback.
|
|
10153
|
+
Icon: WithAudioPlayback.IconExclamationMark,
|
|
9850
10154
|
title: !children ? t("This message did not meet our content guidelines") : void 0,
|
|
9851
10155
|
children
|
|
9852
10156
|
}
|
|
@@ -9897,7 +10201,7 @@ const MessageBubble = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.js
|
|
|
9897
10201
|
const MessageDeletedBubble = () => {
|
|
9898
10202
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
9899
10203
|
return /* @__PURE__ */ jsxRuntime.jsx(MessageBubble, { "data-testid": "message-deleted-bubble", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__message-text", children: [
|
|
9900
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
10204
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconNoSign, {}),
|
|
9901
10205
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("Message deleted") })
|
|
9902
10206
|
] }) });
|
|
9903
10207
|
};
|
|
@@ -9947,7 +10251,9 @@ const useBaseMessageActionSetFilter = (messageActionSet, disable = false) => {
|
|
|
9947
10251
|
if (isBounced || isInitialMessage || // not sure whether this thing even works anymore
|
|
9948
10252
|
!message.type || message.type === "system" || message.type === "ephemeral" || message.status === "sending")
|
|
9949
10253
|
return [];
|
|
9950
|
-
return messageActionSet.filter((
|
|
10254
|
+
return messageActionSet.filter((action) => {
|
|
10255
|
+
if (action.placement === "quick-dropdown-toggle") return true;
|
|
10256
|
+
const type = action.type;
|
|
9951
10257
|
if (WithAudioPlayback.ACTIONS_NOT_WORKING_IN_THREAD.includes(type) && isMessageThreadReply)
|
|
9952
10258
|
return false;
|
|
9953
10259
|
if (message.error) {
|
|
@@ -10038,7 +10344,7 @@ const MessageAlsoSentInChannelIndicator = () => {
|
|
|
10038
10344
|
};
|
|
10039
10345
|
if (!message?.show_in_channel) return null;
|
|
10040
10346
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__message-also-sent-in-channel", role: "status", children: [
|
|
10041
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
10347
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconArrowUpRight, {}),
|
|
10042
10348
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: threadList ? t("Also sent in channel") : t("Replied to a thread") }),
|
|
10043
10349
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: " · " }),
|
|
10044
10350
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10252,7 +10558,7 @@ const UnMemoizedMessageStatus = (props) => {
|
|
|
10252
10558
|
children: t("Delivered")
|
|
10253
10559
|
}
|
|
10254
10560
|
),
|
|
10255
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
10561
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconChecks, { className: "str-chat__message-status-delivered" })
|
|
10256
10562
|
] })),
|
|
10257
10563
|
read && (MessageReadStatus ? /* @__PURE__ */ jsxRuntime.jsx(MessageReadStatus, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10258
10564
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10264,7 +10570,7 @@ const UnMemoizedMessageStatus = (props) => {
|
|
|
10264
10570
|
children: WithAudioPlayback.getReadByTooltipText(readBy, t, client, tooltipUserNameMapper)
|
|
10265
10571
|
}
|
|
10266
10572
|
),
|
|
10267
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
10573
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconChecks, { className: "str-chat__message-status-read" }),
|
|
10268
10574
|
readersWithoutOwnUser.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10269
10575
|
"span",
|
|
10270
10576
|
{
|
|
@@ -11756,7 +12062,7 @@ const ImagePlaceholder = ({ className }) => {
|
|
|
11756
12062
|
className: clsx("str-chat__image-placeholder", className),
|
|
11757
12063
|
"data-testid": "str-chat__base-image-placeholder",
|
|
11758
12064
|
role: "img",
|
|
11759
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
12065
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconImage, {})
|
|
11760
12066
|
}
|
|
11761
12067
|
);
|
|
11762
12068
|
};
|
|
@@ -11855,6 +12161,7 @@ const toBaseImageDescriptors = (attachment, options = {}) => {
|
|
|
11855
12161
|
title: attachment.title
|
|
11856
12162
|
};
|
|
11857
12163
|
}
|
|
12164
|
+
return void 0;
|
|
11858
12165
|
};
|
|
11859
12166
|
const BASE_FILE_ICON_CLASSNAME = "str-chat__file-icon";
|
|
11860
12167
|
const FILE_ICON_GRAPHIC_CLASSNAME = "str-chat__file-icon__graphic";
|
|
@@ -12817,16 +13124,16 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
12817
13124
|
};
|
|
12818
13125
|
if (!groupedAttachments.total) return result;
|
|
12819
13126
|
if (groupedAttachments.polls.length > 0)
|
|
12820
|
-
return { ...result, Icon: WithAudioPlayback.
|
|
13127
|
+
return { ...result, Icon: WithAudioPlayback.IconPoll, previewType: "poll" };
|
|
12821
13128
|
if (groupedAttachments.locations.length > 0)
|
|
12822
|
-
return { ...result, Icon: WithAudioPlayback.
|
|
13129
|
+
return { ...result, Icon: WithAudioPlayback.IconLocation, previewType: "location" };
|
|
12823
13130
|
if (groupedAttachments.giphies.length > 0 && groupedAttachments.giphies.length === groupedAttachments.total) {
|
|
12824
13131
|
const giphyAttachment = groupedAttachments.giphies[0];
|
|
12825
13132
|
const giphyVersion = giphyAttachment.giphy?.[giphyVersionName];
|
|
12826
13133
|
const src = giphyVersion?.url || giphyAttachment.thumb_url || giphyAttachment.image_url || "";
|
|
12827
13134
|
return {
|
|
12828
13135
|
...result,
|
|
12829
|
-
Icon: WithAudioPlayback.
|
|
13136
|
+
Icon: WithAudioPlayback.IconFile,
|
|
12830
13137
|
PreviewImage: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12831
13138
|
BaseImage,
|
|
12832
13139
|
{
|
|
@@ -12843,7 +13150,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
12843
13150
|
const fileAttachment = groupedAttachments.documents[0];
|
|
12844
13151
|
return {
|
|
12845
13152
|
...result,
|
|
12846
|
-
Icon: WithAudioPlayback.
|
|
13153
|
+
Icon: WithAudioPlayback.IconFile,
|
|
12847
13154
|
PreviewImage: /* @__PURE__ */ jsxRuntime.jsx(FileIcon, { fileName: fileAttachment.title, mimeType: fileAttachment.mime_type }),
|
|
12848
13155
|
previewType: "file"
|
|
12849
13156
|
};
|
|
@@ -12852,7 +13159,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
12852
13159
|
const linkAttachment = groupedAttachments.links[0];
|
|
12853
13160
|
return {
|
|
12854
13161
|
...result,
|
|
12855
|
-
Icon: WithAudioPlayback.
|
|
13162
|
+
Icon: WithAudioPlayback.IconLink,
|
|
12856
13163
|
PreviewImage: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12857
13164
|
BaseImage,
|
|
12858
13165
|
{
|
|
@@ -12880,7 +13187,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
12880
13187
|
title: videoAttachment.title
|
|
12881
13188
|
}
|
|
12882
13189
|
),
|
|
12883
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__attachment-preview__thumbnail__play-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
13190
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__attachment-preview__thumbnail__play-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlayFill, {}) })
|
|
12884
13191
|
] }),
|
|
12885
13192
|
previewType: "video"
|
|
12886
13193
|
};
|
|
@@ -12889,7 +13196,7 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
12889
13196
|
const imageAttachment = groupedAttachments.images[0];
|
|
12890
13197
|
return {
|
|
12891
13198
|
...result,
|
|
12892
|
-
Icon: WithAudioPlayback.
|
|
13199
|
+
Icon: WithAudioPlayback.IconVideoFill,
|
|
12893
13200
|
PreviewImage: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12894
13201
|
BaseImage,
|
|
12895
13202
|
{
|
|
@@ -12903,8 +13210,8 @@ const getAttachmentIconWithType = (quotedMessage, giphyVersionName) => {
|
|
|
12903
13210
|
};
|
|
12904
13211
|
}
|
|
12905
13212
|
if (groupedAttachments.voiceRecordings.length === groupedAttachments.total)
|
|
12906
|
-
return { ...result, Icon: WithAudioPlayback.
|
|
12907
|
-
return { ...result, Icon: WithAudioPlayback.
|
|
13213
|
+
return { ...result, Icon: WithAudioPlayback.IconVoice, previewType: "voice" };
|
|
13214
|
+
return { ...result, Icon: WithAudioPlayback.IconFile, previewType: "mixed" };
|
|
12908
13215
|
};
|
|
12909
13216
|
const QuotedMessagePreview = ({
|
|
12910
13217
|
getQuotedMessageAuthor,
|
|
@@ -13055,7 +13362,7 @@ const reminderStateSelector = (state) => ({
|
|
|
13055
13362
|
function SavedForLaterContent() {
|
|
13056
13363
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
13057
13364
|
return /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "str-chat__message-saved-for-later", children: [
|
|
13058
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
13365
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconSave, {}),
|
|
13059
13366
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("Saved for later") })
|
|
13060
13367
|
] });
|
|
13061
13368
|
}
|
|
@@ -13099,7 +13406,7 @@ function RemindMeContent({ reminder }) {
|
|
|
13099
13406
|
});
|
|
13100
13407
|
};
|
|
13101
13408
|
return /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "str-chat__message-reminder", children: [
|
|
13102
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
13409
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconBell, {}),
|
|
13103
13410
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("Reminder set") }),
|
|
13104
13411
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: " · " }),
|
|
13105
13412
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "str-chat__message-reminder__time-left", children: renderTime() })
|
|
@@ -13812,10 +14119,10 @@ const TextInput = React.forwardRef(function TextInput2({
|
|
|
13812
14119
|
const displayMessage = displayError || displaySuccess || displayNeutralMessage;
|
|
13813
14120
|
const messageId = displayMessage ? `${id}-message` : void 0;
|
|
13814
14121
|
const messageContent = displayError ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13815
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: errorMessageIcon ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
14122
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: errorMessageIcon ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationMark, {}) }),
|
|
13816
14123
|
errorMessage ?? message
|
|
13817
14124
|
] }) : displaySuccess ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13818
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: successMessageIcon ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
14125
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "str-chat__form-text-input__message-icon", children: successMessageIcon ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconCheckmark, {}) }),
|
|
13819
14126
|
successMessage
|
|
13820
14127
|
] }) : displayNeutralMessage ? message : null;
|
|
13821
14128
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -14692,7 +14999,8 @@ const PollOptionWithVotes = ({
|
|
|
14692
14999
|
"div",
|
|
14693
15000
|
{
|
|
14694
15001
|
className: clsx("str-chat__poll-option", {
|
|
14695
|
-
"str-chat__poll-option--has-more-votes": isVotesPreview && voteCount > countVotesPreview
|
|
15002
|
+
"str-chat__poll-option--has-more-votes": isVotesPreview && voteCount > countVotesPreview,
|
|
15003
|
+
"str-chat__poll-option--has-votes": voteCount
|
|
14696
15004
|
}),
|
|
14697
15005
|
children: [
|
|
14698
15006
|
/* @__PURE__ */ jsxRuntime.jsx(PollOptionWithVotesHeader, { option, optionOrderNumber: orderNumber }),
|
|
@@ -15258,7 +15566,7 @@ const OptionFieldSet = () => {
|
|
|
15258
15566
|
className: "str-chat__form__input-field__value",
|
|
15259
15567
|
error: !!error,
|
|
15260
15568
|
id: option.id,
|
|
15261
|
-
leading: draggable ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
15569
|
+
leading: draggable ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconReorder, { className: "str-chat__drag-handle" }) : void 0,
|
|
15262
15570
|
message: error ? /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "poll-option-input-field-error", children: knownValidationErrors[error] ?? t("Error") }) : void 0,
|
|
15263
15571
|
onBlur: () => {
|
|
15264
15572
|
pollComposer.handleFieldBlur("options");
|
|
@@ -15297,7 +15605,7 @@ const RemoveOptionButton = ({ className, ...props }) => /* @__PURE__ */ jsxRunti
|
|
|
15297
15605
|
size: "sm",
|
|
15298
15606
|
variant: "secondary",
|
|
15299
15607
|
...props,
|
|
15300
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
15608
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconMinusCircle, {})
|
|
15301
15609
|
}
|
|
15302
15610
|
);
|
|
15303
15611
|
const PollCreationDialogControls = ({
|
|
@@ -15333,7 +15641,7 @@ const PollCreationDialogControls = ({
|
|
|
15333
15641
|
},
|
|
15334
15642
|
type: "submit",
|
|
15335
15643
|
children: [
|
|
15336
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
15644
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconSend, {}),
|
|
15337
15645
|
t("Send poll")
|
|
15338
15646
|
]
|
|
15339
15647
|
}
|
|
@@ -15415,12 +15723,12 @@ const AttachmentSelectorContextProvider = ({
|
|
|
15415
15723
|
}) => /* @__PURE__ */ jsxRuntime.jsx(AttachmentSelectorContext.Provider, { value, children });
|
|
15416
15724
|
const useAttachmentSelectorContext = () => React.useContext(AttachmentSelectorContext);
|
|
15417
15725
|
const icons = {
|
|
15418
|
-
ban: WithAudioPlayback.
|
|
15419
|
-
flag: WithAudioPlayback.
|
|
15726
|
+
ban: WithAudioPlayback.IconUserRemove,
|
|
15727
|
+
flag: WithAudioPlayback.IconFlag,
|
|
15420
15728
|
giphy: IconGiphy,
|
|
15421
15729
|
mute: WithAudioPlayback.IconMute,
|
|
15422
|
-
unban: WithAudioPlayback.
|
|
15423
|
-
unmute: WithAudioPlayback.
|
|
15730
|
+
unban: WithAudioPlayback.IconUserAdd,
|
|
15731
|
+
unmute: WithAudioPlayback.IconAudio
|
|
15424
15732
|
};
|
|
15425
15733
|
const CommandsMenuClassName = "str-chat__context-menu--commands";
|
|
15426
15734
|
const CommandsSubmenuHeader = () => {
|
|
@@ -15512,7 +15820,7 @@ const AttachmentSelectorMenuInitButtonIcon = ({ className }) => {
|
|
|
15512
15820
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className, children: /* @__PURE__ */ jsxRuntime.jsx(AttachmentSelectorInitiationButtonContents, {}) });
|
|
15513
15821
|
}
|
|
15514
15822
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15515
|
-
WithAudioPlayback.
|
|
15823
|
+
WithAudioPlayback.IconPlus,
|
|
15516
15824
|
{
|
|
15517
15825
|
className: clsx("str-chat__attachment-selector__menu-button__icon", className)
|
|
15518
15826
|
}
|
|
@@ -15575,7 +15883,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15575
15883
|
{
|
|
15576
15884
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__create-poll-button",
|
|
15577
15885
|
hasSubMenu: hasSubmenu,
|
|
15578
|
-
Icon: WithAudioPlayback.
|
|
15886
|
+
Icon: WithAudioPlayback.IconCommand,
|
|
15579
15887
|
onClick: () => {
|
|
15580
15888
|
if (!hasSubmenu) return;
|
|
15581
15889
|
openSubmenu({
|
|
@@ -15596,7 +15904,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15596
15904
|
ContextMenuButton,
|
|
15597
15905
|
{
|
|
15598
15906
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__upload-file-button",
|
|
15599
|
-
Icon: WithAudioPlayback.
|
|
15907
|
+
Icon: WithAudioPlayback.IconAttachment,
|
|
15600
15908
|
onClick: () => {
|
|
15601
15909
|
fileInput?.click();
|
|
15602
15910
|
closeMenu();
|
|
@@ -15612,7 +15920,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15612
15920
|
ContextMenuButton,
|
|
15613
15921
|
{
|
|
15614
15922
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__add-location-button",
|
|
15615
|
-
Icon: WithAudioPlayback.
|
|
15923
|
+
Icon: WithAudioPlayback.IconLocation,
|
|
15616
15924
|
onClick: () => {
|
|
15617
15925
|
openModalForAction("addLocation");
|
|
15618
15926
|
closeMenu();
|
|
@@ -15628,7 +15936,7 @@ const DefaultAttachmentSelectorComponents = {
|
|
|
15628
15936
|
ContextMenuButton,
|
|
15629
15937
|
{
|
|
15630
15938
|
className: "str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__create-poll-button",
|
|
15631
|
-
Icon: WithAudioPlayback.
|
|
15939
|
+
Icon: WithAudioPlayback.IconPoll,
|
|
15632
15940
|
onClick: () => {
|
|
15633
15941
|
openModalForAction("createPoll");
|
|
15634
15942
|
closeMenu();
|
|
@@ -15705,7 +16013,7 @@ const AttachmentSelector = ({
|
|
|
15705
16013
|
getModalPortalDestination
|
|
15706
16014
|
}) => {
|
|
15707
16015
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
15708
|
-
const { Modal = GlobalModal } = WithAudioPlayback.useComponentContext();
|
|
16016
|
+
const { ContextMenu: ContextMenuComponent = ContextMenu, Modal = GlobalModal } = WithAudioPlayback.useComponentContext();
|
|
15709
16017
|
const { channelCapabilities } = WithAudioPlayback.useChannelStateContext();
|
|
15710
16018
|
const messageComposer = WithAudioPlayback.useMessageComposerController();
|
|
15711
16019
|
const isCooldownActive = WithAudioPlayback.useIsCooldownActive();
|
|
@@ -15765,7 +16073,7 @@ const AttachmentSelector = ({
|
|
|
15765
16073
|
}
|
|
15766
16074
|
),
|
|
15767
16075
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15768
|
-
|
|
16076
|
+
ContextMenuComponent,
|
|
15769
16077
|
{
|
|
15770
16078
|
allowFlip: true,
|
|
15771
16079
|
backLabel: t("Back"),
|
|
@@ -15961,7 +16269,7 @@ const FileAttachmentPreview = ({
|
|
|
15961
16269
|
uploadState === "uploading" && /* @__PURE__ */ jsxRuntime.jsx(LoadingIndicatorIcon, {}),
|
|
15962
16270
|
!hasError && /* @__PURE__ */ jsxRuntime.jsx(FileSizeIndicator, { fileSize: attachment.file_size }),
|
|
15963
16271
|
hasFatalError && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__attachment-preview-file__fatal-error", children: [
|
|
15964
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16272
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationMark, {}),
|
|
15965
16273
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: hasSizeLimitError ? t("File too large") : uploadState === "blocked" ? t("Upload blocked") : t("Upload failed") })
|
|
15966
16274
|
] }),
|
|
15967
16275
|
hasRetriableError && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__attachment-preview-file__retriable-error", children: [
|
|
@@ -16517,7 +16825,7 @@ const AudioAttachmentPreview = ({
|
|
|
16517
16825
|
}
|
|
16518
16826
|
)
|
|
16519
16827
|
] }) : hasFatalError ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__attachment-preview-file__fatal-error", children: [
|
|
16520
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16828
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationMark, {}),
|
|
16521
16829
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: hasSizeLimitError ? t("File too large") : uploadState === "blocked" ? t("Upload blocked") : t("Upload failed") })
|
|
16522
16830
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__attachment-preview-file__retriable-error", children: [
|
|
16523
16831
|
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationTriangle, {}),
|
|
@@ -16616,10 +16924,10 @@ const MediaAttachmentPreview = ({
|
|
|
16616
16924
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx("str-chat__attachment-preview-media__overlay"), children: [
|
|
16617
16925
|
isUploading && /* @__PURE__ */ jsxRuntime.jsx(LoadingIndicator2, {}),
|
|
16618
16926
|
streamChat.isVideoAttachment(attachment) && !hasUploadError && uploadState !== "uploading" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__attachment-preview-media__video-indicator", children: [
|
|
16619
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16927
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconVideoFill, {}),
|
|
16620
16928
|
attachment.duration && /* @__PURE__ */ jsxRuntime.jsx("div", { children: attachment.duration })
|
|
16621
16929
|
] }),
|
|
16622
|
-
hasFatalError && /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16930
|
+
hasFatalError && /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconExclamationMark, {}),
|
|
16623
16931
|
hasRetriableError && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16624
16932
|
WithAudioPlayback.Button,
|
|
16625
16933
|
{
|
|
@@ -16631,7 +16939,7 @@ const MediaAttachmentPreview = ({
|
|
|
16631
16939
|
onClick: retry,
|
|
16632
16940
|
size: "sm",
|
|
16633
16941
|
variant: "danger",
|
|
16634
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
16942
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconRetry, {})
|
|
16635
16943
|
}
|
|
16636
16944
|
)
|
|
16637
16945
|
] })
|
|
@@ -16702,7 +17010,7 @@ const GalleryHeader = ({ currentItem }) => {
|
|
|
16702
17010
|
className: "str-chat__gallery__action-button str-chat__gallery__action-button--close",
|
|
16703
17011
|
onClick: modalContext.close,
|
|
16704
17012
|
title: t("Close"),
|
|
16705
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17013
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
16706
17014
|
}
|
|
16707
17015
|
) : null
|
|
16708
17016
|
] })
|
|
@@ -16749,9 +17057,9 @@ const VideoThumbnail = ({
|
|
|
16749
17057
|
onClick: onPlay,
|
|
16750
17058
|
size: "lg",
|
|
16751
17059
|
variant: "secondary",
|
|
16752
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17060
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlayFill, {})
|
|
16753
17061
|
}
|
|
16754
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment__video-thumbnail__play-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17062
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment__video-thumbnail__play-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlayFill, {}) })
|
|
16755
17063
|
] });
|
|
16756
17064
|
};
|
|
16757
17065
|
const SWIPE_THRESHOLD = 50;
|
|
@@ -17175,7 +17483,7 @@ const CommandChip = ({ command }) => {
|
|
|
17175
17483
|
textComposer.setCommand(null);
|
|
17176
17484
|
textareaRef.current?.focus();
|
|
17177
17485
|
},
|
|
17178
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17486
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
17179
17487
|
}
|
|
17180
17488
|
)
|
|
17181
17489
|
] });
|
|
@@ -17240,7 +17548,7 @@ const LinkPreviewCard = ({ linkPreview }) => {
|
|
|
17240
17548
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__link-preview-card__content-title", children: linkPreview.title }),
|
|
17241
17549
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__link-preview-card__content-description", children: linkPreview.text }),
|
|
17242
17550
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__link-preview-card__content__url", children: [
|
|
17243
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17551
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconLink, {}),
|
|
17244
17552
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: linkPreview.og_scrape_url })
|
|
17245
17553
|
] })
|
|
17246
17554
|
] }),
|
|
@@ -17318,7 +17626,7 @@ const AudioRecordingPlayback = ({
|
|
|
17318
17626
|
onClick: audioPlayer.togglePlay,
|
|
17319
17627
|
size: "sm",
|
|
17320
17628
|
variant: "secondary",
|
|
17321
|
-
children: isPlaying ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17629
|
+
children: isPlaying ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPauseFill, {}) : /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlayFill, {})
|
|
17322
17630
|
}
|
|
17323
17631
|
),
|
|
17324
17632
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17436,7 +17744,7 @@ const AudioRecordingPreview = () => {
|
|
|
17436
17744
|
};
|
|
17437
17745
|
}, [recorder, startCounter, stopCounter]);
|
|
17438
17746
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__audio-recorder__recording-preview", children: [
|
|
17439
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17747
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconVoice, {}),
|
|
17440
17748
|
/* @__PURE__ */ jsxRuntime.jsx(RecordingTimer, { durationSeconds: secondsElapsed }),
|
|
17441
17749
|
/* @__PURE__ */ jsxRuntime.jsx(AudioRecordingWaveform, {})
|
|
17442
17750
|
] });
|
|
@@ -17456,7 +17764,7 @@ const ToggleRecordingButton = () => {
|
|
|
17456
17764
|
onClick: () => isRecording(recordingState) ? recorder?.pause() : recorder?.resume(),
|
|
17457
17765
|
size: "sm",
|
|
17458
17766
|
variant: "secondary",
|
|
17459
|
-
children: isRecording(recordingState) ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17767
|
+
children: isRecording(recordingState) ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPauseFill, {}) : /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconVoice, {})
|
|
17460
17768
|
}
|
|
17461
17769
|
);
|
|
17462
17770
|
};
|
|
@@ -17491,7 +17799,7 @@ const AudioRecorderRecordingControls = () => {
|
|
|
17491
17799
|
},
|
|
17492
17800
|
size: "sm",
|
|
17493
17801
|
variant: "secondary",
|
|
17494
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17802
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconDelete, {})
|
|
17495
17803
|
}
|
|
17496
17804
|
),
|
|
17497
17805
|
/* @__PURE__ */ jsxRuntime.jsx(ToggleRecordingButton, {}),
|
|
@@ -17588,7 +17896,7 @@ const DefaultStartRecordingAudioButton = React.forwardRef(function StartRecordin
|
|
|
17588
17896
|
variant: "secondary",
|
|
17589
17897
|
...props,
|
|
17590
17898
|
ref,
|
|
17591
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
17899
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconVoice, {})
|
|
17592
17900
|
}
|
|
17593
17901
|
);
|
|
17594
17902
|
});
|
|
@@ -17629,7 +17937,7 @@ const SendToChannelCheckbox = () => {
|
|
|
17629
17937
|
type: "checkbox"
|
|
17630
17938
|
}
|
|
17631
17939
|
),
|
|
17632
|
-
/* @__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.
|
|
17940
|
+
/* @__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, {}) }) }),
|
|
17633
17941
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "str-chat__send-to-channel-checkbox__label", children: labelText })
|
|
17634
17942
|
]
|
|
17635
17943
|
}
|
|
@@ -17795,7 +18103,10 @@ const SuggestionList = ({
|
|
|
17795
18103
|
setFocusedItemIndex,
|
|
17796
18104
|
suggestionItemComponents = defaultComponents
|
|
17797
18105
|
}) => {
|
|
17798
|
-
const {
|
|
18106
|
+
const {
|
|
18107
|
+
AutocompleteSuggestionItem = SuggestionListItem,
|
|
18108
|
+
ContextMenu: ContextMenuComponent = ContextMenu
|
|
18109
|
+
} = WithAudioPlayback.useComponentContext();
|
|
17799
18110
|
const { textareaRef } = WithAudioPlayback.useMessageComposerContext();
|
|
17800
18111
|
const messageComposer = WithAudioPlayback.useMessageComposerController();
|
|
17801
18112
|
const { textComposer } = messageComposer;
|
|
@@ -17913,7 +18224,7 @@ const SuggestionList = ({
|
|
|
17913
18224
|
zIndex: 1e3
|
|
17914
18225
|
},
|
|
17915
18226
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17916
|
-
|
|
18227
|
+
ContextMenuComponent,
|
|
17917
18228
|
{
|
|
17918
18229
|
className: clsx("str-chat__suggestion-list", className),
|
|
17919
18230
|
Header: suggestions.searchSource.type === "commands" ? CommandsMenuHeader : void 0,
|
|
@@ -18139,12 +18450,6 @@ const TextareaComposer = ({
|
|
|
18139
18450
|
if (!textareaRef.current || textareaIsFocused || !focus2) return;
|
|
18140
18451
|
textareaRef.current.focus();
|
|
18141
18452
|
}, [attachments, focus2, quotedMessage, textareaRef]);
|
|
18142
|
-
React.useEffect(
|
|
18143
|
-
() => () => {
|
|
18144
|
-
messageComposer.clear();
|
|
18145
|
-
},
|
|
18146
|
-
[messageComposer]
|
|
18147
|
-
);
|
|
18148
18453
|
React.useLayoutEffect(() => {
|
|
18149
18454
|
const textarea = textareaRef.current;
|
|
18150
18455
|
if (!textarea || isComposing) return;
|
|
@@ -18292,7 +18597,7 @@ const FileDragAndDropContent = ({
|
|
|
18292
18597
|
}) => {
|
|
18293
18598
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
18294
18599
|
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: [
|
|
18295
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
18600
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconUpload, {}),
|
|
18296
18601
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("Drag your files here") })
|
|
18297
18602
|
] }) });
|
|
18298
18603
|
};
|
|
@@ -18328,7 +18633,7 @@ const SendButton = ({ children, sendMessage, ...rest }) => {
|
|
|
18328
18633
|
size: "sm",
|
|
18329
18634
|
variant: "primary",
|
|
18330
18635
|
...rest,
|
|
18331
|
-
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
18636
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconSend, {})
|
|
18332
18637
|
}
|
|
18333
18638
|
);
|
|
18334
18639
|
};
|
|
@@ -18364,7 +18669,7 @@ const MessageComposerActions = () => {
|
|
|
18364
18669
|
const stopGenerating = React.useCallback(() => channel?.stopAIResponse(), [channel]);
|
|
18365
18670
|
const shouldDisplayStopAIGeneration = [AIStates.Thinking, AIStates.Generating].includes(aiState) && !!StopAIGenerationButton$1;
|
|
18366
18671
|
const recordingEnabled = !!(recordingController.recorder && navigator.mediaDevices);
|
|
18367
|
-
let content = SendButton$1 ? /* @__PURE__ */ jsxRuntime.jsx(SendButton$1, { sendMessage: handleSubmit }) : /* @__PURE__ */ jsxRuntime.jsx(SendButton, { sendMessage: handleSubmit, children: editedMessage || command ? /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
18672
|
+
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, {}) });
|
|
18368
18673
|
if (shouldDisplayStopAIGeneration) {
|
|
18369
18674
|
content = /* @__PURE__ */ jsxRuntime.jsx(StopAIGenerationButton$1, { onClick: stopGenerating });
|
|
18370
18675
|
} else if (hideSendButton) return null;
|
|
@@ -18380,7 +18685,7 @@ const AdditionalMessageComposerActions = () => {
|
|
|
18380
18685
|
const isCooldownActive = WithAudioPlayback.useIsCooldownActive();
|
|
18381
18686
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-composer__additional-actions", children: !isCooldownActive && EmojiPicker ? /* @__PURE__ */ jsxRuntime.jsx(EmojiPicker, {}) : null });
|
|
18382
18687
|
};
|
|
18383
|
-
const GeolocationPreviewImage = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__location-preview-image", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
18688
|
+
const GeolocationPreviewImage = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__location-preview-image", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconLocation, {}) });
|
|
18384
18689
|
const GeolocationPreview = ({
|
|
18385
18690
|
location,
|
|
18386
18691
|
PreviewImage = GeolocationPreviewImage,
|
|
@@ -18598,7 +18903,7 @@ const MessageComposerProvider = (props) => {
|
|
|
18598
18903
|
const messageComposer = WithAudioPlayback.useMessageComposerController();
|
|
18599
18904
|
React.useEffect(
|
|
18600
18905
|
() => () => {
|
|
18601
|
-
messageComposer.createDraft();
|
|
18906
|
+
messageComposer.createDraft().finally(() => messageComposer.clear());
|
|
18602
18907
|
},
|
|
18603
18908
|
[messageComposer]
|
|
18604
18909
|
);
|
|
@@ -18916,7 +19221,7 @@ const useChat = ({
|
|
|
18916
19221
|
};
|
|
18917
19222
|
React.useEffect(() => {
|
|
18918
19223
|
if (!client) return;
|
|
18919
|
-
const version = "14.0.0-beta.
|
|
19224
|
+
const version = "14.0.0-beta.4";
|
|
18920
19225
|
const userAgent = client.getUserAgent();
|
|
18921
19226
|
if (!userAgent.includes("stream-chat-react")) {
|
|
18922
19227
|
client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
|
|
@@ -19083,7 +19388,7 @@ const ThreadHeader = (props) => {
|
|
|
19083
19388
|
onClick: closeThread,
|
|
19084
19389
|
size: "md",
|
|
19085
19390
|
variant: "secondary",
|
|
19086
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
19391
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
19087
19392
|
}
|
|
19088
19393
|
)
|
|
19089
19394
|
] });
|
|
@@ -19391,7 +19696,7 @@ const ReactionSelector = (props) => {
|
|
|
19391
19696
|
onClick: () => setExtendedListOpen(true),
|
|
19392
19697
|
size: "sm",
|
|
19393
19698
|
variant: "secondary",
|
|
19394
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
19699
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconPlus, {})
|
|
19395
19700
|
}
|
|
19396
19701
|
)
|
|
19397
19702
|
] }),
|
|
@@ -19417,10 +19722,10 @@ const ReactionSelector = (props) => {
|
|
|
19417
19722
|
) })
|
|
19418
19723
|
] });
|
|
19419
19724
|
};
|
|
19420
|
-
ReactionSelector.getDialogId = (
|
|
19725
|
+
ReactionSelector.getDialogId = ({ messageId, threadList }) => {
|
|
19421
19726
|
const dialogIdNamespace = threadList ? "-thread" : "";
|
|
19422
|
-
return `reaction-selector${dialogIdNamespace}
|
|
19423
|
-
}
|
|
19727
|
+
return `reaction-selector${dialogIdNamespace}-${messageId}`;
|
|
19728
|
+
};
|
|
19424
19729
|
ReactionSelector.displayName = "ReactionSelector";
|
|
19425
19730
|
const ReactionSelectorWithButton = ({
|
|
19426
19731
|
ReactionIcon
|
|
@@ -19505,6 +19810,7 @@ const QuickMessageActionsButton = ({ className, ...props }) => /* @__PURE__ */ j
|
|
|
19505
19810
|
appearance: "ghost",
|
|
19506
19811
|
circular: true,
|
|
19507
19812
|
className: clsx("str-chat__message-actions-box-button", className),
|
|
19813
|
+
size: "sm",
|
|
19508
19814
|
variant: "secondary",
|
|
19509
19815
|
...props
|
|
19510
19816
|
}
|
|
@@ -19571,7 +19877,7 @@ const DefaultMessageActionComponents = {
|
|
|
19571
19877
|
"aria-label": t("aria/Open Thread"),
|
|
19572
19878
|
className: msgActionsBoxButtonClassName,
|
|
19573
19879
|
"data-testid": "thread-action",
|
|
19574
|
-
Icon: WithAudioPlayback.
|
|
19880
|
+
Icon: WithAudioPlayback.IconThread,
|
|
19575
19881
|
onClick: (e) => {
|
|
19576
19882
|
handleOpenThread(e);
|
|
19577
19883
|
closeMenu();
|
|
@@ -19598,7 +19904,7 @@ const DefaultMessageActionComponents = {
|
|
|
19598
19904
|
{
|
|
19599
19905
|
"aria-label": t("aria/Quote Message"),
|
|
19600
19906
|
className: msgActionsBoxButtonClassName,
|
|
19601
|
-
Icon: WithAudioPlayback.
|
|
19907
|
+
Icon: WithAudioPlayback.IconQuote,
|
|
19602
19908
|
onClick: () => {
|
|
19603
19909
|
handleQuote();
|
|
19604
19910
|
closeMenu();
|
|
@@ -19635,7 +19941,7 @@ const DefaultMessageActionComponents = {
|
|
|
19635
19941
|
{
|
|
19636
19942
|
"aria-label": t("aria/Copy Message Text"),
|
|
19637
19943
|
className: msgActionsBoxButtonClassName,
|
|
19638
|
-
Icon: WithAudioPlayback.
|
|
19944
|
+
Icon: WithAudioPlayback.IconCopy,
|
|
19639
19945
|
onClick: () => {
|
|
19640
19946
|
if (message.text) navigator.clipboard.writeText(message.text);
|
|
19641
19947
|
closeMenu();
|
|
@@ -19653,7 +19959,7 @@ const DefaultMessageActionComponents = {
|
|
|
19653
19959
|
{
|
|
19654
19960
|
"aria-label": t("aria/Resend Message"),
|
|
19655
19961
|
className: msgActionsBoxButtonClassName,
|
|
19656
|
-
Icon: WithAudioPlayback.
|
|
19962
|
+
Icon: WithAudioPlayback.IconRetry,
|
|
19657
19963
|
onClick: () => {
|
|
19658
19964
|
handleRetry(message);
|
|
19659
19965
|
closeMenu();
|
|
@@ -19672,7 +19978,7 @@ const DefaultMessageActionComponents = {
|
|
|
19672
19978
|
{
|
|
19673
19979
|
"aria-label": t("aria/Edit Message"),
|
|
19674
19980
|
className: msgActionsBoxButtonClassName,
|
|
19675
|
-
Icon: WithAudioPlayback.
|
|
19981
|
+
Icon: WithAudioPlayback.IconEdit,
|
|
19676
19982
|
onClick: () => {
|
|
19677
19983
|
messageComposer.initState({ composition: message });
|
|
19678
19984
|
closeMenu();
|
|
@@ -19690,7 +19996,7 @@ const DefaultMessageActionComponents = {
|
|
|
19690
19996
|
{
|
|
19691
19997
|
"aria-label": t("aria/Mark Message Unread"),
|
|
19692
19998
|
className: msgActionsBoxButtonClassName,
|
|
19693
|
-
Icon: WithAudioPlayback.
|
|
19999
|
+
Icon: WithAudioPlayback.IconNotification,
|
|
19694
20000
|
onClick: (event) => {
|
|
19695
20001
|
handleMarkUnread(event);
|
|
19696
20002
|
closeMenu();
|
|
@@ -19713,7 +20019,7 @@ const DefaultMessageActionComponents = {
|
|
|
19713
20019
|
"aria-label": reminder ? t("aria/Remind Me Message") : t("aria/Remove Reminder"),
|
|
19714
20020
|
className: msgActionsBoxButtonClassName,
|
|
19715
20021
|
hasSubMenu: !reminder,
|
|
19716
|
-
Icon: reminder ? WithAudioPlayback.IconBellOff : WithAudioPlayback.
|
|
20022
|
+
Icon: reminder ? WithAudioPlayback.IconBellOff : WithAudioPlayback.IconBell,
|
|
19717
20023
|
onClick: () => {
|
|
19718
20024
|
if (reminder) {
|
|
19719
20025
|
client.reminders.deleteReminder(reminder.id);
|
|
@@ -19742,7 +20048,7 @@ const DefaultMessageActionComponents = {
|
|
|
19742
20048
|
{
|
|
19743
20049
|
"aria-label": reminder ? t("aria/Remove Save For Later") : t("aria/Bookmark Message"),
|
|
19744
20050
|
className: msgActionsBoxButtonClassName,
|
|
19745
|
-
Icon: reminder ? WithAudioPlayback.
|
|
20051
|
+
Icon: reminder ? WithAudioPlayback.IconUnsave : WithAudioPlayback.IconSave,
|
|
19746
20052
|
onClick: () => {
|
|
19747
20053
|
if (reminder) client.reminders.deleteReminder(reminder.id);
|
|
19748
20054
|
else client.reminders.createReminder({ messageId: message.id });
|
|
@@ -19761,7 +20067,7 @@ const DefaultMessageActionComponents = {
|
|
|
19761
20067
|
{
|
|
19762
20068
|
"aria-label": t("aria/Flag Message"),
|
|
19763
20069
|
className: msgActionsBoxButtonClassName,
|
|
19764
|
-
Icon: WithAudioPlayback.
|
|
20070
|
+
Icon: WithAudioPlayback.IconFlag,
|
|
19765
20071
|
onClick: (event) => {
|
|
19766
20072
|
handleFlag(event);
|
|
19767
20073
|
closeMenu();
|
|
@@ -19781,7 +20087,7 @@ const DefaultMessageActionComponents = {
|
|
|
19781
20087
|
{
|
|
19782
20088
|
"aria-label": isMuted ? t("aria/Unmute User") : t("aria/Mute User"),
|
|
19783
20089
|
className: msgActionsBoxButtonClassName,
|
|
19784
|
-
Icon: isMuted ? WithAudioPlayback.
|
|
20090
|
+
Icon: isMuted ? WithAudioPlayback.IconAudio : WithAudioPlayback.IconMute,
|
|
19785
20091
|
onClick: (event) => {
|
|
19786
20092
|
handleMute(event);
|
|
19787
20093
|
closeMenu();
|
|
@@ -19804,7 +20110,7 @@ const DefaultMessageActionComponents = {
|
|
|
19804
20110
|
{
|
|
19805
20111
|
"aria-label": t("aria/Delete Message"),
|
|
19806
20112
|
className: msgActionsBoxButtonClassName,
|
|
19807
|
-
Icon: WithAudioPlayback.
|
|
20113
|
+
Icon: WithAudioPlayback.IconDelete,
|
|
19808
20114
|
onClick: () => {
|
|
19809
20115
|
setOpenModal(true);
|
|
19810
20116
|
},
|
|
@@ -19850,7 +20156,7 @@ const DefaultMessageActionComponents = {
|
|
|
19850
20156
|
{
|
|
19851
20157
|
"aria-label": isBlocked ? t("aria/Unblock User") : t("aria/Block User"),
|
|
19852
20158
|
className: clsx(msgActionsBoxButtonClassName),
|
|
19853
|
-
Icon: isBlocked ? WithAudioPlayback.
|
|
20159
|
+
Icon: isBlocked ? WithAudioPlayback.IconUserCheck : WithAudioPlayback.IconNoSign,
|
|
19854
20160
|
onClick: () => {
|
|
19855
20161
|
const targetId = message.user?.id;
|
|
19856
20162
|
if (targetId) {
|
|
@@ -19865,8 +20171,34 @@ const DefaultMessageActionComponents = {
|
|
|
19865
20171
|
}
|
|
19866
20172
|
},
|
|
19867
20173
|
quick: {
|
|
20174
|
+
// eslint-disable-next-line react/display-name
|
|
20175
|
+
DropdownToggle: React.forwardRef((_, ref) => {
|
|
20176
|
+
const { t } = WithAudioPlayback.useTranslationContext();
|
|
20177
|
+
const { message } = useMessageContext();
|
|
20178
|
+
const dropdownDialogIsOpen = useDialogIsOpen(
|
|
20179
|
+
MessageActions.getDialogId({ messageId: message.id })
|
|
20180
|
+
);
|
|
20181
|
+
const { dialog } = useDialogOnNearestManager({
|
|
20182
|
+
id: MessageActions.getDialogId({ messageId: message.id })
|
|
20183
|
+
});
|
|
20184
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20185
|
+
QuickMessageActionsButton,
|
|
20186
|
+
{
|
|
20187
|
+
"aria-expanded": dropdownDialogIsOpen,
|
|
20188
|
+
"aria-haspopup": "true",
|
|
20189
|
+
"aria-label": t("aria/Open Message Actions Menu"),
|
|
20190
|
+
className: "str-chat__message-actions-box-button",
|
|
20191
|
+
"data-testid": "message-actions-toggle-button",
|
|
20192
|
+
onClick: () => {
|
|
20193
|
+
dialog?.toggle();
|
|
20194
|
+
},
|
|
20195
|
+
ref,
|
|
20196
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconMore, { className: "str-chat__message-action-icon" })
|
|
20197
|
+
}
|
|
20198
|
+
);
|
|
20199
|
+
}),
|
|
19868
20200
|
React() {
|
|
19869
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ReactionSelectorWithButton, { ReactionIcon: WithAudioPlayback.
|
|
20201
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ReactionSelectorWithButton, { ReactionIcon: WithAudioPlayback.IconEmoji });
|
|
19870
20202
|
},
|
|
19871
20203
|
Reply() {
|
|
19872
20204
|
const { handleOpenThread } = useMessageContext();
|
|
@@ -19878,14 +20210,17 @@ const DefaultMessageActionComponents = {
|
|
|
19878
20210
|
className: "str-chat__message-reply-in-thread-button",
|
|
19879
20211
|
"data-testid": "thread-action",
|
|
19880
20212
|
onClick: handleOpenThread,
|
|
19881
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
20213
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconReply, { className: "str-chat__message-action-icon" })
|
|
19882
20214
|
}
|
|
19883
20215
|
);
|
|
19884
20216
|
}
|
|
19885
20217
|
}
|
|
19886
20218
|
};
|
|
19887
20219
|
const defaultMessageActionSet = [
|
|
19888
|
-
|
|
20220
|
+
{
|
|
20221
|
+
Component: DefaultMessageActionComponents.quick.DropdownToggle,
|
|
20222
|
+
placement: "quick-dropdown-toggle"
|
|
20223
|
+
},
|
|
19889
20224
|
{
|
|
19890
20225
|
Component: DefaultMessageActionComponents.quick.Reply,
|
|
19891
20226
|
placement: "quick",
|
|
@@ -19975,14 +20310,14 @@ function useFetchReactions(options) {
|
|
|
19975
20310
|
const handleFetchReactions = propHandleFetchReactions ?? contextHandleFetchReactions;
|
|
19976
20311
|
const [refetchNonce, setRefetchNonce] = React.useState(null);
|
|
19977
20312
|
React.useEffect(() => {
|
|
19978
|
-
if (!shouldFetch
|
|
20313
|
+
if (!shouldFetch) {
|
|
19979
20314
|
return;
|
|
19980
20315
|
}
|
|
19981
20316
|
let cancel = false;
|
|
19982
20317
|
(async () => {
|
|
19983
20318
|
try {
|
|
19984
20319
|
setIsLoading(true);
|
|
19985
|
-
const reactions2 = await handleFetchReactions(reactionType, sort);
|
|
20320
|
+
const reactions2 = await handleFetchReactions(reactionType ?? void 0, sort);
|
|
19986
20321
|
if (!cancel) {
|
|
19987
20322
|
setReactions(reactions2);
|
|
19988
20323
|
}
|
|
@@ -20006,6 +20341,16 @@ function useFetchReactions(options) {
|
|
|
20006
20341
|
return { isLoading, reactions, refetch };
|
|
20007
20342
|
}
|
|
20008
20343
|
const defaultReactionDetailsSort = { created_at: -1 };
|
|
20344
|
+
const MessageReactionsDetailLoadingIndicator = () => {
|
|
20345
|
+
const elements = React.useMemo(
|
|
20346
|
+
() => Array.from({ length: 3 }, (_, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__message-reactions-detail__skeleton-item", children: [
|
|
20347
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-reactions-detail__skeleton-avatar" }),
|
|
20348
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-reactions-detail__skeleton-line" })
|
|
20349
|
+
] }, index)),
|
|
20350
|
+
[]
|
|
20351
|
+
);
|
|
20352
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: elements });
|
|
20353
|
+
};
|
|
20009
20354
|
function MessageReactionsDetail({
|
|
20010
20355
|
handleFetchReactions,
|
|
20011
20356
|
onSelectedReactionTypeChange,
|
|
@@ -20016,7 +20361,11 @@ function MessageReactionsDetail({
|
|
|
20016
20361
|
totalReactionCount
|
|
20017
20362
|
}) {
|
|
20018
20363
|
const { client } = WithAudioPlayback.useChatContext();
|
|
20019
|
-
const {
|
|
20364
|
+
const {
|
|
20365
|
+
Avatar: Avatar$1 = Avatar,
|
|
20366
|
+
LoadingIndicator: LoadingIndicator2 = MessageReactionsDetailLoadingIndicator,
|
|
20367
|
+
reactionOptions = defaultReactionOptions
|
|
20368
|
+
} = WithAudioPlayback.useComponentContext(MessageReactionsDetail.name);
|
|
20020
20369
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
20021
20370
|
const {
|
|
20022
20371
|
handleReaction: contextHandleReaction,
|
|
@@ -20043,7 +20392,7 @@ function MessageReactionsDetail({
|
|
|
20043
20392
|
"div",
|
|
20044
20393
|
{
|
|
20045
20394
|
className: "str-chat__message-reactions-detail",
|
|
20046
|
-
"data-testid": "reactions-
|
|
20395
|
+
"data-testid": "message-reactions-detail",
|
|
20047
20396
|
children: [
|
|
20048
20397
|
typeof totalReactionCount === "number" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-reactions-detail__total-count", children: t("{{ count }} reactions", { count: totalReactionCount }) }),
|
|
20049
20398
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-reactions-detail__reaction-type-list-container", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "str-chat__message-reactions-detail__reaction-type-list", children: reactions.map(
|
|
@@ -20056,7 +20405,9 @@ function MessageReactionsDetail({
|
|
|
20056
20405
|
{
|
|
20057
20406
|
"aria-pressed": reactionType === selectedReactionType,
|
|
20058
20407
|
className: "str-chat__message-reactions-detail__reaction-type-list-item-button",
|
|
20059
|
-
onClick: () => onSelectedReactionTypeChange?.(
|
|
20408
|
+
onClick: () => onSelectedReactionTypeChange?.(
|
|
20409
|
+
selectedReactionType === reactionType ? null : reactionType
|
|
20410
|
+
),
|
|
20060
20411
|
children: [
|
|
20061
20412
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "str-chat__message-reactions-detail__reaction-type-list-item-icon", children: /* @__PURE__ */ jsxRuntime.jsx(EmojiComponent, {}) }),
|
|
20062
20413
|
reactionCount > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -20080,22 +20431,10 @@ function MessageReactionsDetail({
|
|
|
20080
20431
|
className: "str-chat__message-reactions-detail__user-list",
|
|
20081
20432
|
"data-testid": "all-reacting-users",
|
|
20082
20433
|
children: [
|
|
20083
|
-
areReactionsLoading && /* @__PURE__ */ jsxRuntime.
|
|
20084
|
-
|
|
20085
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-reactions-detail__skeleton-avatar" }),
|
|
20086
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-reactions-detail__skeleton-line" })
|
|
20087
|
-
] }),
|
|
20088
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__message-reactions-detail__skeleton-item", children: [
|
|
20089
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-reactions-detail__skeleton-avatar" }),
|
|
20090
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-reactions-detail__skeleton-line" })
|
|
20091
|
-
] }),
|
|
20092
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__message-reactions-detail__skeleton-item", children: [
|
|
20093
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-reactions-detail__skeleton-avatar" }),
|
|
20094
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-reactions-detail__skeleton-line" })
|
|
20095
|
-
] })
|
|
20096
|
-
] }),
|
|
20097
|
-
!areReactionsLoading && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: reactionDetailsWithLegacyFallback.map(({ user }) => {
|
|
20434
|
+
areReactionsLoading && /* @__PURE__ */ jsxRuntime.jsx(LoadingIndicator2, {}),
|
|
20435
|
+
!areReactionsLoading && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: reactionDetailsWithLegacyFallback.map(({ type, user }) => {
|
|
20098
20436
|
const belongsToCurrentUser = client.user?.id === user?.id;
|
|
20437
|
+
const EmojiComponent = Array.isArray(reactionOptions) ? void 0 : reactionOptions.quick[type]?.Component ?? reactionOptions.extended?.[type]?.Component;
|
|
20099
20438
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20100
20439
|
"div",
|
|
20101
20440
|
{
|
|
@@ -20120,23 +20459,23 @@ function MessageReactionsDetail({
|
|
|
20120
20459
|
children: belongsToCurrentUser ? t("You") : user?.name || user?.id
|
|
20121
20460
|
}
|
|
20122
20461
|
),
|
|
20123
|
-
belongsToCurrentUser &&
|
|
20462
|
+
belongsToCurrentUser && /* @__PURE__ */ jsxRuntime.jsx(
|
|
20124
20463
|
"button",
|
|
20125
20464
|
{
|
|
20126
20465
|
className: "str-chat__message-reactions-detail__user-list-item-button",
|
|
20127
20466
|
"data-testid": "remove-reaction-button",
|
|
20128
|
-
onClick: (e) => {
|
|
20129
|
-
contextHandleReaction(
|
|
20130
|
-
|
|
20131
|
-
});
|
|
20467
|
+
onClick: async (e) => {
|
|
20468
|
+
await contextHandleReaction(type, e);
|
|
20469
|
+
refetch();
|
|
20132
20470
|
},
|
|
20133
20471
|
children: t("Tap to remove")
|
|
20134
20472
|
}
|
|
20135
20473
|
)
|
|
20136
|
-
] })
|
|
20474
|
+
] }),
|
|
20475
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "str-chat__message-reactions-detail__user-list-item-icon", children: EmojiComponent && !selectedReactionType && /* @__PURE__ */ jsxRuntime.jsx(EmojiComponent, {}) })
|
|
20137
20476
|
]
|
|
20138
20477
|
},
|
|
20139
|
-
user?.id
|
|
20478
|
+
`${user?.id}-${type}`
|
|
20140
20479
|
);
|
|
20141
20480
|
}) })
|
|
20142
20481
|
]
|
|
@@ -20285,6 +20624,7 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20285
20624
|
const divRef = React.useRef(null);
|
|
20286
20625
|
const dialogId2 = `message-reactions-detail-${message.id}`;
|
|
20287
20626
|
const { dialog, dialogManager } = useDialogOnNearestManager({ id: dialogId2 });
|
|
20627
|
+
const isDialogOpen = useDialogIsOpen(dialogId2, dialogManager?.id);
|
|
20288
20628
|
const handleReactionButtonClick = (reactionType) => {
|
|
20289
20629
|
if (totalReactionCount > MAX_MESSAGE_REACTIONS_TO_FETCH) {
|
|
20290
20630
|
return;
|
|
@@ -20319,6 +20659,8 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20319
20659
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20320
20660
|
FragmentOrButton,
|
|
20321
20661
|
{
|
|
20662
|
+
"aria-expanded": isDialogOpen,
|
|
20663
|
+
"aria-pressed": isDialogOpen,
|
|
20322
20664
|
buttonIf: visualStyle === "clustered",
|
|
20323
20665
|
className: "str-chat__message-reactions__list-button",
|
|
20324
20666
|
onClick: () => handleReactionButtonClick(existingReactions[0]?.reactionType ?? null),
|
|
@@ -20356,9 +20698,7 @@ const UnMemoizedMessageReactions = (props) => {
|
|
|
20356
20698
|
"button",
|
|
20357
20699
|
{
|
|
20358
20700
|
className: "str-chat__message-reactions__list-item-button",
|
|
20359
|
-
onClick: () => handleReactionButtonClick(
|
|
20360
|
-
existingReactions.at(-1)?.reactionType ?? null
|
|
20361
|
-
),
|
|
20701
|
+
onClick: () => handleReactionButtonClick(null),
|
|
20362
20702
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "str-chat__message-reactions__overflow-count", children: [
|
|
20363
20703
|
"+",
|
|
20364
20704
|
totalReactionCount - cappedExistingReactions.reactionCountToDisplay
|
|
@@ -20483,91 +20823,74 @@ const StreamEmoji = ({
|
|
|
20483
20823
|
const useSplitActionSet = (actionSet) => React.useMemo(() => {
|
|
20484
20824
|
const quickActionSet = [];
|
|
20485
20825
|
const dropdownActionSet = [];
|
|
20826
|
+
let quickDropdownToggleAction;
|
|
20486
20827
|
for (const action of actionSet) {
|
|
20487
20828
|
if (action.placement === "quick")
|
|
20488
20829
|
quickActionSet.push(action);
|
|
20489
20830
|
if (action.placement === "dropdown")
|
|
20490
20831
|
dropdownActionSet.push(action);
|
|
20832
|
+
if (action.placement === "quick-dropdown-toggle") {
|
|
20833
|
+
quickDropdownToggleAction ?? (quickDropdownToggleAction = action);
|
|
20834
|
+
}
|
|
20491
20835
|
}
|
|
20492
|
-
return { dropdownActionSet, quickActionSet };
|
|
20836
|
+
return { dropdownActionSet, quickActionSet, quickDropdownToggleAction };
|
|
20493
20837
|
}, [actionSet]);
|
|
20494
20838
|
const MessageActions = ({
|
|
20495
20839
|
disableBaseMessageActionSetFilter = false,
|
|
20496
20840
|
messageActionSet = defaultMessageActionSet
|
|
20497
20841
|
}) => {
|
|
20498
|
-
const { theme } = WithAudioPlayback.useChatContext();
|
|
20499
20842
|
const { isMyMessage, message, threadList } = useMessageContext();
|
|
20843
|
+
const { ContextMenu: ContextMenuComponent = ContextMenu } = WithAudioPlayback.useComponentContext();
|
|
20500
20844
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
20501
20845
|
const [actionsBoxButtonElement, setActionsBoxButtonElement] = React.useState(null);
|
|
20502
20846
|
const filteredMessageActionSet = useBaseMessageActionSetFilter(
|
|
20503
20847
|
messageActionSet,
|
|
20504
20848
|
disableBaseMessageActionSetFilter
|
|
20505
20849
|
);
|
|
20506
|
-
const { dropdownActionSet, quickActionSet } = useSplitActionSet(
|
|
20507
|
-
|
|
20508
|
-
);
|
|
20509
|
-
const dropdownDialogId = `message-actions--${message.id}`;
|
|
20850
|
+
const { dropdownActionSet, quickActionSet, quickDropdownToggleAction } = useSplitActionSet(filteredMessageActionSet);
|
|
20851
|
+
const messageActionsDialogId = MessageActions.getDialogId({ messageId: message.id });
|
|
20510
20852
|
const reactionSelectorDialogId = ReactionSelector.getDialogId({
|
|
20511
20853
|
messageId: message.id,
|
|
20512
20854
|
threadList
|
|
20513
20855
|
});
|
|
20514
|
-
const { dialog, dialogManager } = useDialogOnNearestManager({
|
|
20515
|
-
|
|
20856
|
+
const { dialog, dialogManager } = useDialogOnNearestManager({
|
|
20857
|
+
id: messageActionsDialogId
|
|
20858
|
+
});
|
|
20859
|
+
const messageActionsDialogIsOpen = useDialogIsOpen(
|
|
20860
|
+
messageActionsDialogId,
|
|
20861
|
+
dialogManager?.id
|
|
20862
|
+
);
|
|
20516
20863
|
const reactionSelectorDialogIsOpen = useDialogIsOpen(
|
|
20517
20864
|
reactionSelectorDialogId,
|
|
20518
20865
|
dialogManager?.id
|
|
20519
20866
|
);
|
|
20520
|
-
const contextMenuItems = React.useMemo(
|
|
20521
|
-
() => dropdownActionSet.map(({ Component }) => {
|
|
20522
|
-
const ActionItem = (menuProps) => /* @__PURE__ */ jsxRuntime.jsx(Component, { ...menuProps });
|
|
20523
|
-
return ActionItem;
|
|
20524
|
-
}),
|
|
20525
|
-
[dropdownActionSet]
|
|
20526
|
-
);
|
|
20527
20867
|
if (dropdownActionSet.length + quickActionSet.length === 0) {
|
|
20528
20868
|
return null;
|
|
20529
20869
|
}
|
|
20530
20870
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20531
20871
|
"div",
|
|
20532
20872
|
{
|
|
20533
|
-
className: clsx(
|
|
20534
|
-
"str-chat__message-options--active":
|
|
20873
|
+
className: clsx("str-chat__message-options", {
|
|
20874
|
+
"str-chat__message-options--active": messageActionsDialogIsOpen || reactionSelectorDialogIsOpen
|
|
20535
20875
|
}),
|
|
20536
20876
|
children: [
|
|
20537
|
-
dropdownActionSet.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20538
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20539
|
-
WithAudioPlayback.Button,
|
|
20540
|
-
{
|
|
20541
|
-
appearance: "ghost",
|
|
20542
|
-
"aria-expanded": dropdownDialogIsOpen,
|
|
20543
|
-
"aria-haspopup": "true",
|
|
20544
|
-
"aria-label": t("aria/Open Message Actions Menu"),
|
|
20545
|
-
circular: true,
|
|
20546
|
-
className: "str-chat__message-actions-box-button",
|
|
20547
|
-
"data-testid": "message-actions-toggle-button",
|
|
20548
|
-
onClick: () => {
|
|
20549
|
-
dialog?.toggle();
|
|
20550
|
-
},
|
|
20551
|
-
ref: setActionsBoxButtonElement,
|
|
20552
|
-
variant: "secondary",
|
|
20553
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconDotGrid1x3Horizontal, { className: "str-chat__message-action-icon" })
|
|
20554
|
-
}
|
|
20555
|
-
),
|
|
20877
|
+
quickDropdownToggleAction && dropdownActionSet.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20878
|
+
/* @__PURE__ */ jsxRuntime.jsx(quickDropdownToggleAction.Component, { ref: setActionsBoxButtonElement }),
|
|
20556
20879
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20557
|
-
|
|
20880
|
+
ContextMenuComponent,
|
|
20558
20881
|
{
|
|
20559
20882
|
backLabel: t("Back"),
|
|
20560
20883
|
className: clsx("str-chat__message-actions-box", {
|
|
20561
|
-
"str-chat__message-actions-box--open":
|
|
20884
|
+
"str-chat__message-actions-box--open": messageActionsDialogIsOpen
|
|
20562
20885
|
}),
|
|
20563
20886
|
dialogManagerId: dialogManager?.id,
|
|
20564
|
-
id:
|
|
20565
|
-
items: contextMenuItems,
|
|
20887
|
+
id: messageActionsDialogId,
|
|
20566
20888
|
onClose: dialog?.close,
|
|
20567
20889
|
placement: isMyMessage() ? "top-end" : "top-start",
|
|
20568
20890
|
referenceElement: actionsBoxButtonElement,
|
|
20569
20891
|
tabIndex: -1,
|
|
20570
|
-
trapFocus: true
|
|
20892
|
+
trapFocus: true,
|
|
20893
|
+
children: dropdownActionSet.map(({ Component, type }) => /* @__PURE__ */ jsxRuntime.jsx(Component, {}, type))
|
|
20571
20894
|
}
|
|
20572
20895
|
)
|
|
20573
20896
|
] }),
|
|
@@ -20576,6 +20899,8 @@ const MessageActions = ({
|
|
|
20576
20899
|
}
|
|
20577
20900
|
);
|
|
20578
20901
|
};
|
|
20902
|
+
MessageActions.getDialogId = ({ messageId }) => `message-actions-${messageId}`;
|
|
20903
|
+
MessageActions.displayName = "MessageActions";
|
|
20579
20904
|
const MessageUIWithContext = ({
|
|
20580
20905
|
endOfGroup,
|
|
20581
20906
|
firstOfGroup,
|
|
@@ -21402,6 +21727,7 @@ const useScrollLocationLogic = (params) => {
|
|
|
21402
21727
|
const closeToBottom = React.useRef(false);
|
|
21403
21728
|
const closeToTop = React.useRef(false);
|
|
21404
21729
|
const previousScrollTopRef = React.useRef(0);
|
|
21730
|
+
const previousMessagesLengthRef = React.useRef(messages.length);
|
|
21405
21731
|
const anchorRestoreCleanupRef = React.useRef(null);
|
|
21406
21732
|
const captureAnchor = React.useCallback(() => {
|
|
21407
21733
|
if (!listElement) return null;
|
|
@@ -21553,6 +21879,60 @@ const useScrollLocationLogic = (params) => {
|
|
|
21553
21879
|
scrollToBottom();
|
|
21554
21880
|
}
|
|
21555
21881
|
}, [disableAutoScrollToBottom, justReachedLatestMessageSet, listElement, hasMoreNewer]);
|
|
21882
|
+
React.useLayoutEffect(() => {
|
|
21883
|
+
if (!listElement || disableAutoScrollToBottom || hasMoreNewer || suppressAutoscroll || justReachedLatestMessageSet || isRestoringOlderAnchorRef.current) {
|
|
21884
|
+
return;
|
|
21885
|
+
}
|
|
21886
|
+
const initialDistanceToBottom = listElement.scrollHeight - (listElement.scrollTop + listElement.clientHeight);
|
|
21887
|
+
const messagesHydrated = previousMessagesLengthRef.current === 0 && messages.length > 0;
|
|
21888
|
+
if (initialDistanceToBottom > scrolledUpThreshold && !messagesHydrated) {
|
|
21889
|
+
return;
|
|
21890
|
+
}
|
|
21891
|
+
let keepPinnedToBottom = true;
|
|
21892
|
+
const maybeScrollToBottom = () => {
|
|
21893
|
+
if (keepPinnedToBottom) {
|
|
21894
|
+
scrollToBottom();
|
|
21895
|
+
}
|
|
21896
|
+
};
|
|
21897
|
+
maybeScrollToBottom();
|
|
21898
|
+
const settleDelays = [80, messagesHydrated ? 260 : 420, 900, 1700];
|
|
21899
|
+
const settleTimeoutIds = settleDelays.map(
|
|
21900
|
+
(delay) => setTimeout(maybeScrollToBottom, delay)
|
|
21901
|
+
);
|
|
21902
|
+
const stopKeepingPinnedToBottom = () => {
|
|
21903
|
+
keepPinnedToBottom = false;
|
|
21904
|
+
};
|
|
21905
|
+
listElement.addEventListener("pointerdown", stopKeepingPinnedToBottom, {
|
|
21906
|
+
passive: true
|
|
21907
|
+
});
|
|
21908
|
+
listElement.addEventListener("touchstart", stopKeepingPinnedToBottom, {
|
|
21909
|
+
passive: true
|
|
21910
|
+
});
|
|
21911
|
+
listElement.addEventListener("wheel", stopKeepingPinnedToBottom, {
|
|
21912
|
+
passive: true
|
|
21913
|
+
});
|
|
21914
|
+
listElement.addEventListener("keydown", stopKeepingPinnedToBottom);
|
|
21915
|
+
const pinWindowTimeoutId = setTimeout(() => {
|
|
21916
|
+
stopKeepingPinnedToBottom();
|
|
21917
|
+
}, 2200);
|
|
21918
|
+
return () => {
|
|
21919
|
+
settleTimeoutIds.forEach(clearTimeout);
|
|
21920
|
+
clearTimeout(pinWindowTimeoutId);
|
|
21921
|
+
listElement.removeEventListener("pointerdown", stopKeepingPinnedToBottom);
|
|
21922
|
+
listElement.removeEventListener("touchstart", stopKeepingPinnedToBottom);
|
|
21923
|
+
listElement.removeEventListener("wheel", stopKeepingPinnedToBottom);
|
|
21924
|
+
listElement.removeEventListener("keydown", stopKeepingPinnedToBottom);
|
|
21925
|
+
};
|
|
21926
|
+
}, [
|
|
21927
|
+
disableAutoScrollToBottom,
|
|
21928
|
+
hasMoreNewer,
|
|
21929
|
+
justReachedLatestMessageSet,
|
|
21930
|
+
listElement,
|
|
21931
|
+
messages.length,
|
|
21932
|
+
scrollToBottom,
|
|
21933
|
+
scrolledUpThreshold,
|
|
21934
|
+
suppressAutoscroll
|
|
21935
|
+
]);
|
|
21556
21936
|
const updateScrollTop = useMessageListScrollManager({
|
|
21557
21937
|
captureAnchor,
|
|
21558
21938
|
disableScrollManagement: disableScrollManagement || isRestoringOlderAnchorRef.current,
|
|
@@ -21579,6 +21959,9 @@ const useScrollLocationLogic = (params) => {
|
|
|
21579
21959
|
React.useLayoutEffect(() => {
|
|
21580
21960
|
previousHasMoreNewerRef.current = hasMoreNewer;
|
|
21581
21961
|
}, [hasMoreNewer]);
|
|
21962
|
+
React.useLayoutEffect(() => {
|
|
21963
|
+
previousMessagesLengthRef.current = messages.length;
|
|
21964
|
+
}, [messages.length]);
|
|
21582
21965
|
const onScroll = React.useCallback(
|
|
21583
21966
|
(event) => {
|
|
21584
21967
|
const element = event.target;
|
|
@@ -21587,8 +21970,10 @@ const useScrollLocationLogic = (params) => {
|
|
|
21587
21970
|
updateScrollTop(scrollTop, captureAnchor);
|
|
21588
21971
|
const offsetHeight = element.offsetHeight;
|
|
21589
21972
|
const scrollHeight = element.scrollHeight;
|
|
21973
|
+
const distanceToBottom = scrollHeight - (scrollTop + offsetHeight);
|
|
21974
|
+
const bottomEnterThreshold = Math.max(Math.floor(scrolledUpThreshold * 0.6), 24);
|
|
21590
21975
|
const prevCloseToBottom = closeToBottom.current;
|
|
21591
|
-
closeToBottom.current =
|
|
21976
|
+
closeToBottom.current = prevCloseToBottom ? distanceToBottom < scrolledUpThreshold : distanceToBottom < bottomEnterThreshold;
|
|
21592
21977
|
closeToTop.current = scrollTop < scrolledUpThreshold;
|
|
21593
21978
|
if (closeToBottom.current) {
|
|
21594
21979
|
setHasNewMessages(false);
|
|
@@ -21633,7 +22018,7 @@ const UnreadMessagesSeparator = ({
|
|
|
21633
22018
|
onClick: () => markRead(),
|
|
21634
22019
|
size: "sm",
|
|
21635
22020
|
variant: "secondary",
|
|
21636
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
22021
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
21637
22022
|
}
|
|
21638
22023
|
)
|
|
21639
22024
|
]
|
|
@@ -21853,7 +22238,7 @@ const UnreadMessagesNotification = ({
|
|
|
21853
22238
|
]
|
|
21854
22239
|
}
|
|
21855
22240
|
),
|
|
21856
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.Button, { appearance: "outline", onClick: () => markRead(), variant: "secondary", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
22241
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.Button, { appearance: "outline", onClick: () => markRead(), variant: "secondary", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {}) })
|
|
21857
22242
|
]
|
|
21858
22243
|
}
|
|
21859
22244
|
);
|
|
@@ -23523,11 +23908,17 @@ const useConnectionRecoveredListener = (forceUpdate) => {
|
|
|
23523
23908
|
const MOBILE_NAV_BREAKPOINT = 768;
|
|
23524
23909
|
const useMobileNavigation = (channelListRef, navOpen, closeMobileNav) => {
|
|
23525
23910
|
React.useEffect(() => {
|
|
23911
|
+
const isClickInsideChannelList = (event) => {
|
|
23912
|
+
const channelListElement = channelListRef.current;
|
|
23913
|
+
if (!channelListElement) return false;
|
|
23914
|
+
const eventPath = event.composedPath();
|
|
23915
|
+
return eventPath.includes(channelListElement);
|
|
23916
|
+
};
|
|
23526
23917
|
const handleClickOutside = (event) => {
|
|
23527
23918
|
if (typeof window !== "undefined" && window.innerWidth >= MOBILE_NAV_BREAKPOINT) {
|
|
23528
23919
|
return;
|
|
23529
23920
|
}
|
|
23530
|
-
if (closeMobileNav && channelListRef.current && !
|
|
23921
|
+
if (closeMobileNav && channelListRef.current && !isClickInsideChannelList(event) && navOpen) {
|
|
23531
23922
|
closeMobileNav();
|
|
23532
23923
|
}
|
|
23533
23924
|
};
|
|
@@ -24220,7 +24611,7 @@ const SearchBar = () => {
|
|
|
24220
24611
|
"str-chat__search-bar__input-wrapper--active": isActive
|
|
24221
24612
|
}),
|
|
24222
24613
|
children: [
|
|
24223
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
24614
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconSearch, {}),
|
|
24224
24615
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24225
24616
|
"input",
|
|
24226
24617
|
{
|
|
@@ -24264,7 +24655,7 @@ const SearchBar = () => {
|
|
|
24264
24655
|
ref: clearButtonRef,
|
|
24265
24656
|
size: "xs",
|
|
24266
24657
|
variant: "secondary",
|
|
24267
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
24658
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXCircle, {})
|
|
24268
24659
|
}
|
|
24269
24660
|
)
|
|
24270
24661
|
]
|
|
@@ -24657,7 +25048,7 @@ const UnMemoizedLoadMoreButton = ({
|
|
|
24657
25048
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__load-more-button", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
24658
25049
|
WithAudioPlayback.Button,
|
|
24659
25050
|
{
|
|
24660
|
-
appearance: "
|
|
25051
|
+
appearance: "ghost",
|
|
24661
25052
|
"aria-label": t("aria/Load More Channels"),
|
|
24662
25053
|
"data-testid": "load-more-button",
|
|
24663
25054
|
disabled: loading,
|
|
@@ -25265,6 +25656,36 @@ const useArchiveActionButtonBehavior = () => {
|
|
|
25265
25656
|
};
|
|
25266
25657
|
};
|
|
25267
25658
|
const defaultChannelActionSet = [
|
|
25659
|
+
{
|
|
25660
|
+
// eslint-disable-next-line react/display-name
|
|
25661
|
+
Component: React.forwardRef((_, ref) => {
|
|
25662
|
+
const { channel } = useChannelListItemContext();
|
|
25663
|
+
const dialogId2 = ChannelListItemActionButtons.getDialogId({
|
|
25664
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
25665
|
+
channelId: channel.id
|
|
25666
|
+
});
|
|
25667
|
+
const { dialog, dialogManager } = useDialogOnNearestManager({ id: dialogId2 });
|
|
25668
|
+
const dialogIsOpen = useDialogIsOpen(dialogId2, dialogManager?.id);
|
|
25669
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
25670
|
+
WithAudioPlayback.Button,
|
|
25671
|
+
{
|
|
25672
|
+
appearance: "ghost",
|
|
25673
|
+
"aria-expanded": dialogIsOpen,
|
|
25674
|
+
"aria-pressed": dialogIsOpen,
|
|
25675
|
+
circular: true,
|
|
25676
|
+
onClick: (e) => {
|
|
25677
|
+
e.stopPropagation();
|
|
25678
|
+
dialog.toggle();
|
|
25679
|
+
},
|
|
25680
|
+
ref,
|
|
25681
|
+
size: "sm",
|
|
25682
|
+
variant: "secondary",
|
|
25683
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconMore, {})
|
|
25684
|
+
}
|
|
25685
|
+
);
|
|
25686
|
+
}),
|
|
25687
|
+
placement: "quick-dropdown-toggle"
|
|
25688
|
+
},
|
|
25268
25689
|
{
|
|
25269
25690
|
Component() {
|
|
25270
25691
|
const behaviorProps = useArchiveActionButtonBehavior();
|
|
@@ -25352,7 +25773,7 @@ const defaultChannelActionSet = [
|
|
|
25352
25773
|
{
|
|
25353
25774
|
"aria-label": title,
|
|
25354
25775
|
disabled: inProgress,
|
|
25355
|
-
Icon: WithAudioPlayback.
|
|
25776
|
+
Icon: WithAudioPlayback.IconNoSign,
|
|
25356
25777
|
onClick: async () => {
|
|
25357
25778
|
try {
|
|
25358
25779
|
setInProgress(true);
|
|
@@ -25397,7 +25818,7 @@ const defaultChannelActionSet = [
|
|
|
25397
25818
|
const membership = useChannelMembershipState(channel);
|
|
25398
25819
|
const dialogId2 = ChannelListItemActionButtons.getDialogId(
|
|
25399
25820
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
25400
|
-
channel.id
|
|
25821
|
+
{ channelId: channel.id }
|
|
25401
25822
|
);
|
|
25402
25823
|
const { dialog } = useDialogOnNearestManager({ id: dialogId2 });
|
|
25403
25824
|
const [inProgress, setInProgress] = React.useState(false);
|
|
@@ -25458,7 +25879,7 @@ const defaultChannelActionSet = [
|
|
|
25458
25879
|
{
|
|
25459
25880
|
"aria-label": title,
|
|
25460
25881
|
disabled: inProgress,
|
|
25461
|
-
Icon: WithAudioPlayback.
|
|
25882
|
+
Icon: WithAudioPlayback.IconLeave,
|
|
25462
25883
|
onClick: async (e) => {
|
|
25463
25884
|
e.stopPropagation();
|
|
25464
25885
|
try {
|
|
@@ -25499,59 +25920,23 @@ const useBaseChannelActionSetFilter = (channelActionSet) => {
|
|
|
25499
25920
|
const connectedUserIsMember = typeof membership.user !== "undefined";
|
|
25500
25921
|
const ownCapabilities = channel.data?.own_capabilities;
|
|
25501
25922
|
return React.useMemo(() => {
|
|
25502
|
-
const filtered = channelActionSet.filter(
|
|
25503
|
-
(action)
|
|
25504
|
-
|
|
25505
|
-
|
|
25506
|
-
|
|
25507
|
-
|
|
25508
|
-
|
|
25509
|
-
|
|
25510
|
-
|
|
25511
|
-
|
|
25512
|
-
|
|
25513
|
-
|
|
25514
|
-
|
|
25515
|
-
|
|
25516
|
-
|
|
25517
|
-
|
|
25518
|
-
|
|
25519
|
-
},
|
|
25520
|
-
isDirectMessageChannel: false
|
|
25521
|
-
},
|
|
25522
|
-
{
|
|
25523
|
-
action: { placement: "dropdown", type: "mute" },
|
|
25524
|
-
isDirectMessageChannel: true,
|
|
25525
|
-
ownCapabilities: tsPattern.P.when(
|
|
25526
|
-
(capabilities) => capabilities?.includes("mute-channel")
|
|
25527
|
-
)
|
|
25528
|
-
},
|
|
25529
|
-
{
|
|
25530
|
-
action: { placement: "quick", type: "mute" },
|
|
25531
|
-
isDirectMessageChannel: false,
|
|
25532
|
-
ownCapabilities: tsPattern.P.when(
|
|
25533
|
-
(capabilities) => capabilities?.includes("mute-channel")
|
|
25534
|
-
)
|
|
25535
|
-
},
|
|
25536
|
-
{
|
|
25537
|
-
action: { type: "ban" },
|
|
25538
|
-
memberCount: tsPattern.P.number.gt(0).and(tsPattern.P.number.lte(2)),
|
|
25539
|
-
ownCapabilities: tsPattern.P.when(
|
|
25540
|
-
(capabilities) => capabilities?.includes("ban-channel-members")
|
|
25541
|
-
)
|
|
25542
|
-
},
|
|
25543
|
-
{
|
|
25544
|
-
action: { type: "leave" },
|
|
25545
|
-
ownCapabilities: tsPattern.P.when(
|
|
25546
|
-
(capabilities) => capabilities?.includes("leave-channel")
|
|
25547
|
-
)
|
|
25548
|
-
},
|
|
25549
|
-
{
|
|
25550
|
-
action: { connectedUserIsMember: true, type: "pin" }
|
|
25551
|
-
},
|
|
25552
|
-
() => true
|
|
25553
|
-
).otherwise(() => false)
|
|
25554
|
-
);
|
|
25923
|
+
const filtered = channelActionSet.filter((action) => {
|
|
25924
|
+
if (action.placement === "quick-dropdown-toggle") return true;
|
|
25925
|
+
switch (action.type) {
|
|
25926
|
+
case "archive":
|
|
25927
|
+
return connectedUserIsMember && (action.placement === "quick" && isDirectMessageChannel || action.placement === "dropdown" && !isDirectMessageChannel);
|
|
25928
|
+
case "mute":
|
|
25929
|
+
return ownCapabilities?.includes("mute-channel") && (action.placement === "dropdown" && isDirectMessageChannel || action.placement === "quick" && !isDirectMessageChannel);
|
|
25930
|
+
case "ban":
|
|
25931
|
+
return memberCount > 0 && memberCount <= 2 && ownCapabilities?.includes("ban-channel-members");
|
|
25932
|
+
case "leave":
|
|
25933
|
+
return ownCapabilities?.includes("leave-channel");
|
|
25934
|
+
case "pin":
|
|
25935
|
+
return connectedUserIsMember;
|
|
25936
|
+
default:
|
|
25937
|
+
return true;
|
|
25938
|
+
}
|
|
25939
|
+
});
|
|
25555
25940
|
return filtered;
|
|
25556
25941
|
}, [
|
|
25557
25942
|
channelActionSet,
|
|
@@ -25562,17 +25947,18 @@ const useBaseChannelActionSetFilter = (channelActionSet) => {
|
|
|
25562
25947
|
]);
|
|
25563
25948
|
};
|
|
25564
25949
|
const ChannelListItemActionButtons = () => {
|
|
25950
|
+
const { ContextMenu: ContextMenuComponent = ContextMenu } = WithAudioPlayback.useComponentContext();
|
|
25565
25951
|
const { channel } = useChannelListItemContext();
|
|
25566
25952
|
const [referenceElement, setReferenceElement] = React.useState(null);
|
|
25567
|
-
const dialogId2 = ChannelListItemActionButtons.getDialogId(
|
|
25953
|
+
const dialogId2 = ChannelListItemActionButtons.getDialogId({
|
|
25568
25954
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
25569
|
-
channel.id
|
|
25570
|
-
);
|
|
25955
|
+
channelId: channel.id
|
|
25956
|
+
});
|
|
25571
25957
|
const { dialog, dialogManager } = useDialogOnNearestManager({ id: dialogId2 });
|
|
25572
25958
|
const dialogIsOpen = useDialogIsOpen(dialogId2, dialogManager?.id);
|
|
25573
25959
|
const filteredActionSet = useBaseChannelActionSetFilter(defaultChannelActionSet);
|
|
25574
|
-
const
|
|
25575
|
-
if (
|
|
25960
|
+
const { dropdownActionSet, quickActionSet, quickDropdownToggleAction } = useSplitActionSet(filteredActionSet);
|
|
25961
|
+
if (quickActionSet.length + dropdownActionSet.length === 0) {
|
|
25576
25962
|
return null;
|
|
25577
25963
|
}
|
|
25578
25964
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -25582,26 +25968,10 @@ const ChannelListItemActionButtons = () => {
|
|
|
25582
25968
|
"str-chat__channel-list-item__action-buttons--active": dialogIsOpen
|
|
25583
25969
|
}),
|
|
25584
25970
|
children: [
|
|
25585
|
-
|
|
25586
|
-
|
|
25587
|
-
{
|
|
25588
|
-
appearance: "ghost",
|
|
25589
|
-
"aria-expanded": dialogIsOpen,
|
|
25590
|
-
"aria-pressed": dialogIsOpen,
|
|
25591
|
-
circular: true,
|
|
25592
|
-
onClick: (e) => {
|
|
25593
|
-
e.stopPropagation();
|
|
25594
|
-
dialog.toggle();
|
|
25595
|
-
},
|
|
25596
|
-
ref: setReferenceElement,
|
|
25597
|
-
size: "sm",
|
|
25598
|
-
variant: "secondary",
|
|
25599
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconDotGrid1x3Horizontal, {})
|
|
25600
|
-
}
|
|
25601
|
-
),
|
|
25602
|
-
splitActionSet.quickActionSet.map(({ Component, type }) => /* @__PURE__ */ jsxRuntime.jsx(Component, {}, type)),
|
|
25971
|
+
quickDropdownToggleAction && dropdownActionSet.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(quickDropdownToggleAction.Component, { ref: setReferenceElement }),
|
|
25972
|
+
quickActionSet.map(({ Component, type }) => /* @__PURE__ */ jsxRuntime.jsx(Component, {}, type)),
|
|
25603
25973
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25604
|
-
|
|
25974
|
+
ContextMenuComponent,
|
|
25605
25975
|
{
|
|
25606
25976
|
className: "str-chat__channel-list-item__action-buttons-context-menu",
|
|
25607
25977
|
dialogManagerId: dialogManager?.id,
|
|
@@ -25611,14 +25981,14 @@ const ChannelListItemActionButtons = () => {
|
|
|
25611
25981
|
referenceElement,
|
|
25612
25982
|
tabIndex: -1,
|
|
25613
25983
|
trapFocus: true,
|
|
25614
|
-
children:
|
|
25984
|
+
children: dropdownActionSet.map(({ Component, type }) => /* @__PURE__ */ jsxRuntime.jsx(Component, {}, type))
|
|
25615
25985
|
}
|
|
25616
25986
|
)
|
|
25617
25987
|
]
|
|
25618
25988
|
}
|
|
25619
25989
|
);
|
|
25620
25990
|
};
|
|
25621
|
-
ChannelListItemActionButtons.getDialogId = (channelId) => `channel-action-buttons-${channelId}`;
|
|
25991
|
+
ChannelListItemActionButtons.getDialogId = ({ channelId }) => `channel-action-buttons-${channelId}`;
|
|
25622
25992
|
ChannelListItemActionButtons.displayName = "ChannelListItemActionButtons";
|
|
25623
25993
|
function ChannelListItemTimestamp({ lastMessage }) {
|
|
25624
25994
|
const { t, tDateTimeParser } = WithAudioPlayback.useTranslationContext("ChannelListItemTimestamp");
|
|
@@ -25768,21 +26138,21 @@ const useLatestMessagePreview = ({
|
|
|
25768
26138
|
]);
|
|
25769
26139
|
};
|
|
25770
26140
|
const deliveryStatusIconMap = {
|
|
25771
|
-
delivered: WithAudioPlayback.
|
|
25772
|
-
read: WithAudioPlayback.
|
|
26141
|
+
delivered: WithAudioPlayback.IconChecks,
|
|
26142
|
+
read: WithAudioPlayback.IconChecks,
|
|
25773
26143
|
sending: WithAudioPlayback.IconClock,
|
|
25774
26144
|
sent: WithAudioPlayback.IconCheckmark1Small
|
|
25775
26145
|
};
|
|
25776
26146
|
const contentTypeIconMap = {
|
|
25777
|
-
deleted: WithAudioPlayback.
|
|
25778
|
-
error: WithAudioPlayback.
|
|
25779
|
-
file: WithAudioPlayback.
|
|
25780
|
-
giphy: WithAudioPlayback.
|
|
25781
|
-
image: WithAudioPlayback.
|
|
25782
|
-
link: WithAudioPlayback.
|
|
25783
|
-
location: WithAudioPlayback.
|
|
26147
|
+
deleted: WithAudioPlayback.IconNoSign,
|
|
26148
|
+
error: WithAudioPlayback.IconExclamationCircleFill,
|
|
26149
|
+
file: WithAudioPlayback.IconFile,
|
|
26150
|
+
giphy: WithAudioPlayback.IconFile,
|
|
26151
|
+
image: WithAudioPlayback.IconCamera,
|
|
26152
|
+
link: WithAudioPlayback.IconLink,
|
|
26153
|
+
location: WithAudioPlayback.IconLocation,
|
|
25784
26154
|
video: WithAudioPlayback.IconVideo,
|
|
25785
|
-
voice: WithAudioPlayback.
|
|
26155
|
+
voice: WithAudioPlayback.IconVoice
|
|
25786
26156
|
};
|
|
25787
26157
|
const SummarizedMessagePreview = ({
|
|
25788
26158
|
latestMessage,
|
|
@@ -26378,7 +26748,7 @@ const ThreadListItem = ({
|
|
|
26378
26748
|
const ThreadListEmptyPlaceholder = () => {
|
|
26379
26749
|
const { t } = WithAudioPlayback.useTranslationContext("ThreadListEmptyPlaceholder");
|
|
26380
26750
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__thread-list-empty-placeholder", children: [
|
|
26381
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
26751
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconMessageBubbles, {}),
|
|
26382
26752
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("Reply to a message to start a thread") })
|
|
26383
26753
|
] });
|
|
26384
26754
|
};
|
|
@@ -26401,7 +26771,7 @@ const ThreadListUnseenThreadsBanner = () => {
|
|
|
26401
26771
|
onClick: () => client.threads.reload(),
|
|
26402
26772
|
children: [
|
|
26403
26773
|
!isLoading && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
26404
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
26774
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconRefresh, {}),
|
|
26405
26775
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("ThreadListUnseenThreadsBanner/unreadThreads", {
|
|
26406
26776
|
count: unseenThreadIds.length
|
|
26407
26777
|
}) })
|
|
@@ -26556,11 +26926,11 @@ const ThreadList = ({ virtuosoProps }) => {
|
|
|
26556
26926
|
);
|
|
26557
26927
|
};
|
|
26558
26928
|
const IconsBySeverity = {
|
|
26559
|
-
error: WithAudioPlayback.
|
|
26929
|
+
error: WithAudioPlayback.IconExclamationMark,
|
|
26560
26930
|
info: null,
|
|
26561
|
-
//
|
|
26562
|
-
loading: WithAudioPlayback.
|
|
26563
|
-
success: WithAudioPlayback.
|
|
26931
|
+
// IconInfo,
|
|
26932
|
+
loading: WithAudioPlayback.IconRefresh,
|
|
26933
|
+
success: WithAudioPlayback.IconCheckmark,
|
|
26564
26934
|
warning: WithAudioPlayback.IconExclamationTriangle
|
|
26565
26935
|
};
|
|
26566
26936
|
const DefaultNotificationIcon = ({ notification }) => {
|
|
@@ -26639,7 +27009,7 @@ const Notification = React.forwardRef(
|
|
|
26639
27009
|
onClick: handleDismiss,
|
|
26640
27010
|
size: "sm",
|
|
26641
27011
|
variant: "secondary",
|
|
26642
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
27012
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconXmark, {})
|
|
26643
27013
|
}
|
|
26644
27014
|
)
|
|
26645
27015
|
]
|
|
@@ -26944,7 +27314,7 @@ const VoiceRecordingPlayerUI = ({ audioPlayer }) => {
|
|
|
26944
27314
|
secondsElapsed
|
|
26945
27315
|
} = WithAudioPlayback.useStateStore(audioPlayer?.state, audioPlayerStateSelector) ?? {};
|
|
26946
27316
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: rootClassName, "data-testid": "voice-recording-widget", children: [
|
|
26947
|
-
/* @__PURE__ */ jsxRuntime.jsx(PlayButton, { isPlaying: !!isPlaying, onClick: audioPlayer.togglePlay }),
|
|
27317
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment__voice-recording-widget__play-button-container", children: /* @__PURE__ */ jsxRuntime.jsx(PlayButton, { isPlaying: !!isPlaying, onClick: audioPlayer.togglePlay }) }),
|
|
26948
27318
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment__voice-recording-widget__metadata", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__message-attachment__voice-recording-widget__audio-state", children: [
|
|
26949
27319
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment__voice-recording-widget__timer", children: durationSeconds ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
26950
27320
|
DurationDisplay,
|
|
@@ -27201,7 +27571,7 @@ const ThumbnailButton = ({
|
|
|
27201
27571
|
"aria-hidden": "true",
|
|
27202
27572
|
className: "str-chat__modal-gallery__image-load-failed-overlay",
|
|
27203
27573
|
"data-testid": "str-chat__modal-gallery__image-load-failed-overlay",
|
|
27204
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__modal-gallery__image-retry-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
27574
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__modal-gallery__image-retry-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconRetry, {}) })
|
|
27205
27575
|
}
|
|
27206
27576
|
),
|
|
27207
27577
|
showOverlay && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__modal-gallery__placeholder", children: [
|
|
@@ -27292,7 +27662,7 @@ const CardContent = (props) => {
|
|
|
27292
27662
|
className: "str-chat__message-attachment-card--source-link",
|
|
27293
27663
|
"data-testid": "card-source-link",
|
|
27294
27664
|
children: [
|
|
27295
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
27665
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconLink, {}),
|
|
27296
27666
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment-card--url", children: url })
|
|
27297
27667
|
]
|
|
27298
27668
|
}
|
|
@@ -27353,23 +27723,44 @@ const FileAttachment = ({ attachment }) => {
|
|
|
27353
27723
|
);
|
|
27354
27724
|
};
|
|
27355
27725
|
const Giphy = ({ attachment }) => {
|
|
27356
|
-
const { giphyVersion: giphyVersionName } = WithAudioPlayback.useChannelStateContext();
|
|
27726
|
+
const { giphyVersion: giphyVersionName, imageAttachmentSizeHandler } = WithAudioPlayback.useChannelStateContext();
|
|
27357
27727
|
const { BaseImage: BaseImage$1 = BaseImage } = WithAudioPlayback.useComponentContext();
|
|
27358
27728
|
const { t } = WithAudioPlayback.useTranslationContext();
|
|
27359
27729
|
const usesDefaultBaseImage = BaseImage$1 === BaseImage;
|
|
27730
|
+
const imageElement = React.useRef(null);
|
|
27731
|
+
const [attachmentConfiguration, setAttachmentConfiguration] = React.useState(void 0);
|
|
27360
27732
|
const imageDescriptors = React.useMemo(
|
|
27361
27733
|
() => toGalleryItemDescriptors(attachment, { giphyVersionName }),
|
|
27362
27734
|
[attachment, giphyVersionName]
|
|
27363
27735
|
);
|
|
27364
|
-
|
|
27365
|
-
const
|
|
27736
|
+
const alt = imageDescriptors && imageDescriptors.alt;
|
|
27737
|
+
const dimensions = imageDescriptors && imageDescriptors.dimensions;
|
|
27738
|
+
const imageUrl = imageDescriptors && imageDescriptors.imageUrl;
|
|
27739
|
+
const title = imageDescriptors && imageDescriptors.title;
|
|
27740
|
+
const resolvedImageUrl = attachmentConfiguration?.url || imageUrl;
|
|
27741
|
+
const imageStyleVariables = React.useMemo(() => {
|
|
27742
|
+
const originalHeight = Number(dimensions?.height);
|
|
27743
|
+
const originalWidth = Number(dimensions?.width);
|
|
27744
|
+
return {
|
|
27745
|
+
"--original-height": String(originalHeight > 1 ? originalHeight : 1e6),
|
|
27746
|
+
"--original-width": String(originalWidth > 1 ? originalWidth : 1e6)
|
|
27747
|
+
};
|
|
27748
|
+
}, [dimensions?.height, dimensions?.width]);
|
|
27749
|
+
React.useLayoutEffect(() => {
|
|
27750
|
+
if (!imageElement.current || !imageAttachmentSizeHandler) return;
|
|
27751
|
+
const config = imageAttachmentSizeHandler(attachment, imageElement.current);
|
|
27752
|
+
setAttachmentConfiguration(config);
|
|
27753
|
+
}, [attachment, imageAttachmentSizeHandler]);
|
|
27754
|
+
if (!imageUrl) return null;
|
|
27366
27755
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx(`str-chat__message-attachment-giphy`), children: [
|
|
27367
27756
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27368
27757
|
BaseImage$1,
|
|
27369
27758
|
{
|
|
27370
27759
|
alt: alt ?? title ?? t("User uploaded content"),
|
|
27371
27760
|
height: dimensions?.height,
|
|
27372
|
-
|
|
27761
|
+
ref: imageElement,
|
|
27762
|
+
src: resolvedImageUrl,
|
|
27763
|
+
style: imageStyleVariables,
|
|
27373
27764
|
width: dimensions?.width,
|
|
27374
27765
|
...usesDefaultBaseImage ? { showDownloadButtonOnError: false } : {}
|
|
27375
27766
|
}
|
|
@@ -27442,7 +27833,7 @@ const DefaultGeolocationAttachmentMapPlaceholder = ({
|
|
|
27442
27833
|
className: "str-chat__message-attachment-geolocation__placeholder",
|
|
27443
27834
|
"data-testid": "geolocation-attachment-map-placeholder",
|
|
27444
27835
|
children: [
|
|
27445
|
-
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.
|
|
27836
|
+
/* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconLocation, {}),
|
|
27446
27837
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27447
27838
|
"a",
|
|
27448
27839
|
{
|
|
@@ -27984,162 +28375,91 @@ exports.ChatViewThreadsSelectorButton = WithAudioPlayback.ChatViewThreadsSelecto
|
|
|
27984
28375
|
exports.ComponentContext = WithAudioPlayback.ComponentContext;
|
|
27985
28376
|
exports.ComponentProvider = WithAudioPlayback.ComponentProvider;
|
|
27986
28377
|
exports.EmptyStateIndicator = WithAudioPlayback.EmptyStateIndicator;
|
|
27987
|
-
exports.IconApiAggregate = WithAudioPlayback.IconApiAggregate;
|
|
27988
|
-
exports.IconApples = WithAudioPlayback.IconApples;
|
|
27989
28378
|
exports.IconArchive = WithAudioPlayback.IconArchive;
|
|
27990
|
-
exports.IconArrowBoxLeft = WithAudioPlayback.IconArrowBoxLeft;
|
|
27991
28379
|
exports.IconArrowDown = WithAudioPlayback.IconArrowDown;
|
|
27992
28380
|
exports.IconArrowDownCircle = WithAudioPlayback.IconArrowDownCircle;
|
|
27993
28381
|
exports.IconArrowLeft = WithAudioPlayback.IconArrowLeft;
|
|
27994
28382
|
exports.IconArrowRight = WithAudioPlayback.IconArrowRight;
|
|
27995
|
-
exports.IconArrowRightUp = WithAudioPlayback.IconArrowRightUp;
|
|
27996
|
-
exports.IconArrowRotateClockwise = WithAudioPlayback.IconArrowRotateClockwise;
|
|
27997
|
-
exports.IconArrowRotateRightLeftRepeatRefresh = WithAudioPlayback.IconArrowRotateRightLeftRepeatRefresh;
|
|
27998
|
-
exports.IconArrowShareLeft = WithAudioPlayback.IconArrowShareLeft;
|
|
27999
28383
|
exports.IconArrowUp = WithAudioPlayback.IconArrowUp;
|
|
28000
|
-
exports.
|
|
28001
|
-
exports.
|
|
28002
|
-
exports.
|
|
28003
|
-
exports.
|
|
28384
|
+
exports.IconArrowUpRight = WithAudioPlayback.IconArrowUpRight;
|
|
28385
|
+
exports.IconAttachment = WithAudioPlayback.IconAttachment;
|
|
28386
|
+
exports.IconAudio = WithAudioPlayback.IconAudio;
|
|
28387
|
+
exports.IconBell = WithAudioPlayback.IconBell;
|
|
28004
28388
|
exports.IconBellOff = WithAudioPlayback.IconBellOff;
|
|
28005
|
-
exports.IconBookmark = WithAudioPlayback.IconBookmark;
|
|
28006
|
-
exports.IconBookmarkRemove = WithAudioPlayback.IconBookmarkRemove;
|
|
28007
|
-
exports.IconBrowserAISparkle = WithAudioPlayback.IconBrowserAISparkle;
|
|
28008
|
-
exports.IconBubble2ChatMessage = WithAudioPlayback.IconBubble2ChatMessage;
|
|
28009
|
-
exports.IconBubble2Solid = WithAudioPlayback.IconBubble2Solid;
|
|
28010
28389
|
exports.IconBubble3ChatMessage = WithAudioPlayback.IconBubble3ChatMessage;
|
|
28011
|
-
exports.IconBubble3Solid = WithAudioPlayback.IconBubble3Solid;
|
|
28012
|
-
exports.IconBubbleAnnotation2ChatMessage = WithAudioPlayback.IconBubbleAnnotation2ChatMessage;
|
|
28013
|
-
exports.IconBubbleText6ChatMessage = WithAudioPlayback.IconBubbleText6ChatMessage;
|
|
28014
|
-
exports.IconBubbleText6Solid = WithAudioPlayback.IconBubbleText6Solid;
|
|
28015
28390
|
exports.IconBubbleText6SolidChatMessage = WithAudioPlayback.IconBubbleText6SolidChatMessage;
|
|
28016
|
-
exports.
|
|
28017
|
-
exports.
|
|
28018
|
-
exports.IconBubbles = WithAudioPlayback.IconBubbles;
|
|
28019
|
-
exports.IconCalendar1 = WithAudioPlayback.IconCalendar1;
|
|
28020
|
-
exports.IconCallCancel = WithAudioPlayback.IconCallCancel;
|
|
28021
|
-
exports.IconCamera1 = WithAudioPlayback.IconCamera1;
|
|
28022
|
-
exports.IconCar1 = WithAudioPlayback.IconCar1;
|
|
28023
|
-
exports.IconCat = WithAudioPlayback.IconCat;
|
|
28024
|
-
exports.IconChainLink = WithAudioPlayback.IconChainLink;
|
|
28025
|
-
exports.IconChart5 = WithAudioPlayback.IconChart5;
|
|
28391
|
+
exports.IconCamera = WithAudioPlayback.IconCamera;
|
|
28392
|
+
exports.IconCheckmark = WithAudioPlayback.IconCheckmark;
|
|
28026
28393
|
exports.IconCheckmark1Small = WithAudioPlayback.IconCheckmark1Small;
|
|
28027
|
-
exports.
|
|
28028
|
-
exports.IconCheckmark2Small = WithAudioPlayback.IconCheckmark2Small;
|
|
28394
|
+
exports.IconChecks = WithAudioPlayback.IconChecks;
|
|
28029
28395
|
exports.IconChevronDown = WithAudioPlayback.IconChevronDown;
|
|
28030
|
-
exports.IconChevronGrabberVerticalSelector = WithAudioPlayback.IconChevronGrabberVerticalSelector;
|
|
28031
28396
|
exports.IconChevronLeft = WithAudioPlayback.IconChevronLeft;
|
|
28032
28397
|
exports.IconChevronRight = WithAudioPlayback.IconChevronRight;
|
|
28033
|
-
exports.IconChevronTop = WithAudioPlayback.IconChevronTop;
|
|
28034
|
-
exports.IconCircleBanSign = WithAudioPlayback.IconCircleBanSign;
|
|
28035
|
-
exports.IconCircleCheck = WithAudioPlayback.IconCircleCheck;
|
|
28036
|
-
exports.IconCircleInfoTooltip = WithAudioPlayback.IconCircleInfoTooltip;
|
|
28037
|
-
exports.IconCircleMinus = WithAudioPlayback.IconCircleMinus;
|
|
28038
|
-
exports.IconCircleQuestionmark = WithAudioPlayback.IconCircleQuestionmark;
|
|
28039
|
-
exports.IconCircleQuestionmarkFilled = WithAudioPlayback.IconCircleQuestionmarkFilled;
|
|
28040
|
-
exports.IconCircleX = WithAudioPlayback.IconCircleX;
|
|
28041
28398
|
exports.IconClock = WithAudioPlayback.IconClock;
|
|
28042
|
-
exports.
|
|
28043
|
-
exports.
|
|
28044
|
-
exports.IconCode = WithAudioPlayback.IconCode;
|
|
28045
|
-
exports.IconCodeBrackets = WithAudioPlayback.IconCodeBrackets;
|
|
28046
|
-
exports.IconCodeEditorInsert = WithAudioPlayback.IconCodeEditorInsert;
|
|
28047
|
-
exports.IconCompass = WithAudioPlayback.IconCompass;
|
|
28048
|
-
exports.IconCreditCard2Billing = WithAudioPlayback.IconCreditCard2Billing;
|
|
28049
|
-
exports.IconCrossMedium = WithAudioPlayback.IconCrossMedium;
|
|
28399
|
+
exports.IconCommand = WithAudioPlayback.IconCommand;
|
|
28400
|
+
exports.IconCopy = WithAudioPlayback.IconCopy;
|
|
28050
28401
|
exports.IconCrossSmall = WithAudioPlayback.IconCrossSmall;
|
|
28051
|
-
exports.
|
|
28052
|
-
exports.
|
|
28053
|
-
exports.
|
|
28054
|
-
exports.
|
|
28055
|
-
exports.
|
|
28056
|
-
exports.
|
|
28057
|
-
exports.IconEmojiAddReaction = WithAudioPlayback.IconEmojiAddReaction;
|
|
28058
|
-
exports.IconEmojiSad = WithAudioPlayback.IconEmojiSad;
|
|
28059
|
-
exports.IconEmojiSmile = WithAudioPlayback.IconEmojiSmile;
|
|
28060
|
-
exports.IconExclamation = WithAudioPlayback.IconExclamation;
|
|
28061
|
-
exports.IconExclamationCircle = WithAudioPlayback.IconExclamationCircle;
|
|
28062
|
-
exports.IconExclamationCircle1 = WithAudioPlayback.IconExclamationCircle1;
|
|
28402
|
+
exports.IconDelete = WithAudioPlayback.IconDelete;
|
|
28403
|
+
exports.IconEdit = WithAudioPlayback.IconEdit;
|
|
28404
|
+
exports.IconEmoji = WithAudioPlayback.IconEmoji;
|
|
28405
|
+
exports.IconExclamationCircleFill = WithAudioPlayback.IconExclamationCircleFill;
|
|
28406
|
+
exports.IconExclamationMark = WithAudioPlayback.IconExclamationMark;
|
|
28407
|
+
exports.IconExclamationMarkFill = WithAudioPlayback.IconExclamationMarkFill;
|
|
28063
28408
|
exports.IconExclamationTriangle = WithAudioPlayback.IconExclamationTriangle;
|
|
28064
|
-
exports.IconExclamationTriangle1 = WithAudioPlayback.IconExclamationTriangle1;
|
|
28065
28409
|
exports.IconEyeOpen = WithAudioPlayback.IconEyeOpen;
|
|
28066
|
-
exports.
|
|
28067
|
-
exports.
|
|
28068
|
-
exports.
|
|
28069
|
-
exports.
|
|
28070
|
-
exports.IconFlag2 = WithAudioPlayback.IconFlag2;
|
|
28071
|
-
exports.IconGauge = WithAudioPlayback.IconGauge;
|
|
28072
|
-
exports.IconGoogle = WithAudioPlayback.IconGoogle;
|
|
28073
|
-
exports.IconHashtagChannel = WithAudioPlayback.IconHashtagChannel;
|
|
28074
|
-
exports.IconHeart2 = WithAudioPlayback.IconHeart2;
|
|
28075
|
-
exports.IconHistory = WithAudioPlayback.IconHistory;
|
|
28076
|
-
exports.IconImages1Alt = WithAudioPlayback.IconImages1Alt;
|
|
28077
|
-
exports.IconInvite = WithAudioPlayback.IconInvite;
|
|
28078
|
-
exports.IconLayersBehind = WithAudioPlayback.IconLayersBehind;
|
|
28410
|
+
exports.IconFile = WithAudioPlayback.IconFile;
|
|
28411
|
+
exports.IconFlag = WithAudioPlayback.IconFlag;
|
|
28412
|
+
exports.IconImage = WithAudioPlayback.IconImage;
|
|
28413
|
+
exports.IconInfo = WithAudioPlayback.IconInfo;
|
|
28079
28414
|
exports.IconLayoutAlignLeft = WithAudioPlayback.IconLayoutAlignLeft;
|
|
28080
|
-
exports.
|
|
28415
|
+
exports.IconLeave = WithAudioPlayback.IconLeave;
|
|
28081
28416
|
exports.IconLightBulbSimple = WithAudioPlayback.IconLightBulbSimple;
|
|
28082
|
-
exports.
|
|
28083
|
-
exports.
|
|
28084
|
-
exports.
|
|
28085
|
-
exports.
|
|
28086
|
-
exports.
|
|
28087
|
-
exports.
|
|
28088
|
-
exports.
|
|
28089
|
-
exports.
|
|
28090
|
-
exports.IconMinusLarge = WithAudioPlayback.IconMinusLarge;
|
|
28417
|
+
exports.IconLink = WithAudioPlayback.IconLink;
|
|
28418
|
+
exports.IconLoading = WithAudioPlayback.IconLoading;
|
|
28419
|
+
exports.IconLocation = WithAudioPlayback.IconLocation;
|
|
28420
|
+
exports.IconMessageBubble = WithAudioPlayback.IconMessageBubble;
|
|
28421
|
+
exports.IconMessageBubbleFill = WithAudioPlayback.IconMessageBubbleFill;
|
|
28422
|
+
exports.IconMessageBubbles = WithAudioPlayback.IconMessageBubbles;
|
|
28423
|
+
exports.IconMinus = WithAudioPlayback.IconMinus;
|
|
28424
|
+
exports.IconMinusCircle = WithAudioPlayback.IconMinusCircle;
|
|
28091
28425
|
exports.IconMinusSmall = WithAudioPlayback.IconMinusSmall;
|
|
28426
|
+
exports.IconMore = WithAudioPlayback.IconMore;
|
|
28092
28427
|
exports.IconMute = WithAudioPlayback.IconMute;
|
|
28093
|
-
exports.
|
|
28094
|
-
exports.
|
|
28095
|
-
exports.
|
|
28096
|
-
exports.IconPaperPlaneTopRight = WithAudioPlayback.IconPaperPlaneTopRight;
|
|
28097
|
-
exports.IconPaperclip = WithAudioPlayback.IconPaperclip;
|
|
28098
|
-
exports.IconParagraphsText = WithAudioPlayback.IconParagraphsText;
|
|
28099
|
-
exports.IconPause = WithAudioPlayback.IconPause;
|
|
28100
|
-
exports.IconPencil = WithAudioPlayback.IconPencil;
|
|
28101
|
-
exports.IconPeople = WithAudioPlayback.IconPeople;
|
|
28102
|
-
exports.IconPeople2 = WithAudioPlayback.IconPeople2;
|
|
28103
|
-
exports.IconPeopleAdd = WithAudioPlayback.IconPeopleAdd;
|
|
28104
|
-
exports.IconPeopleAdded = WithAudioPlayback.IconPeopleAdded;
|
|
28105
|
-
exports.IconPeopleCircle = WithAudioPlayback.IconPeopleCircle;
|
|
28106
|
-
exports.IconPeopleCopy = WithAudioPlayback.IconPeopleCopy;
|
|
28107
|
-
exports.IconPeopleEditUserRights = WithAudioPlayback.IconPeopleEditUserRights;
|
|
28108
|
-
exports.IconPeopleRemove = WithAudioPlayback.IconPeopleRemove;
|
|
28109
|
-
exports.IconPersona = WithAudioPlayback.IconPersona;
|
|
28428
|
+
exports.IconNoSign = WithAudioPlayback.IconNoSign;
|
|
28429
|
+
exports.IconNotification = WithAudioPlayback.IconNotification;
|
|
28430
|
+
exports.IconPauseFill = WithAudioPlayback.IconPauseFill;
|
|
28110
28431
|
exports.IconPin = WithAudioPlayback.IconPin;
|
|
28111
|
-
exports.
|
|
28112
|
-
exports.
|
|
28432
|
+
exports.IconPlayFill = WithAudioPlayback.IconPlayFill;
|
|
28433
|
+
exports.IconPlus = WithAudioPlayback.IconPlus;
|
|
28113
28434
|
exports.IconPlusSmall = WithAudioPlayback.IconPlusSmall;
|
|
28114
|
-
exports.
|
|
28115
|
-
exports.
|
|
28435
|
+
exports.IconPoll = WithAudioPlayback.IconPoll;
|
|
28436
|
+
exports.IconQuote = WithAudioPlayback.IconQuote;
|
|
28437
|
+
exports.IconRefresh = WithAudioPlayback.IconRefresh;
|
|
28438
|
+
exports.IconReorder = WithAudioPlayback.IconReorder;
|
|
28439
|
+
exports.IconReply = WithAudioPlayback.IconReply;
|
|
28440
|
+
exports.IconRetry = WithAudioPlayback.IconRetry;
|
|
28441
|
+
exports.IconSave = WithAudioPlayback.IconSave;
|
|
28442
|
+
exports.IconSearch = WithAudioPlayback.IconSearch;
|
|
28443
|
+
exports.IconSend = WithAudioPlayback.IconSend;
|
|
28116
28444
|
exports.IconSettingsGear2 = WithAudioPlayback.IconSettingsGear2;
|
|
28117
|
-
exports.
|
|
28118
|
-
exports.
|
|
28119
|
-
exports.IconShapesTriangleSquareCircle = WithAudioPlayback.IconShapesTriangleSquareCircle;
|
|
28120
|
-
exports.IconShareRedirectLink = WithAudioPlayback.IconShareRedirectLink;
|
|
28121
|
-
exports.IconShield = WithAudioPlayback.IconShield;
|
|
28122
|
-
exports.IconSquareBehindSquare2_Copy = WithAudioPlayback.IconSquareBehindSquare2_Copy;
|
|
28123
|
-
exports.IconSquareCircleTopRightFeeds = WithAudioPlayback.IconSquareCircleTopRightFeeds;
|
|
28124
|
-
exports.IconStop = WithAudioPlayback.IconStop;
|
|
28125
|
-
exports.IconTable = WithAudioPlayback.IconTable;
|
|
28126
|
-
exports.IconTeam = WithAudioPlayback.IconTeam;
|
|
28127
|
-
exports.IconTennis = WithAudioPlayback.IconTennis;
|
|
28128
|
-
exports.IconTextToImageURLEnrichment = WithAudioPlayback.IconTextToImageURLEnrichment;
|
|
28445
|
+
exports.IconThread = WithAudioPlayback.IconThread;
|
|
28446
|
+
exports.IconThreadFill = WithAudioPlayback.IconThreadFill;
|
|
28129
28447
|
exports.IconThunder = WithAudioPlayback.IconThunder;
|
|
28130
28448
|
exports.IconTranslate = WithAudioPlayback.IconTranslate;
|
|
28131
|
-
exports.IconTrashBin = WithAudioPlayback.IconTrashBin;
|
|
28132
|
-
exports.IconTrending4 = WithAudioPlayback.IconTrending4;
|
|
28133
28449
|
exports.IconTrophy = WithAudioPlayback.IconTrophy;
|
|
28134
|
-
exports.IconUnlocked = WithAudioPlayback.IconUnlocked;
|
|
28135
28450
|
exports.IconUnpin = WithAudioPlayback.IconUnpin;
|
|
28136
|
-
exports.
|
|
28451
|
+
exports.IconUnsave = WithAudioPlayback.IconUnsave;
|
|
28452
|
+
exports.IconUpload = WithAudioPlayback.IconUpload;
|
|
28453
|
+
exports.IconUser = WithAudioPlayback.IconUser;
|
|
28454
|
+
exports.IconUserAdd = WithAudioPlayback.IconUserAdd;
|
|
28455
|
+
exports.IconUserCheck = WithAudioPlayback.IconUserCheck;
|
|
28456
|
+
exports.IconUserRemove = WithAudioPlayback.IconUserRemove;
|
|
28137
28457
|
exports.IconVideo = WithAudioPlayback.IconVideo;
|
|
28138
|
-
exports.
|
|
28139
|
-
exports.
|
|
28140
|
-
exports.
|
|
28141
|
-
exports.
|
|
28142
|
-
exports.
|
|
28458
|
+
exports.IconVideoFill = WithAudioPlayback.IconVideoFill;
|
|
28459
|
+
exports.IconVoice = WithAudioPlayback.IconVoice;
|
|
28460
|
+
exports.IconVoiceFill = WithAudioPlayback.IconVoiceFill;
|
|
28461
|
+
exports.IconXCircle = WithAudioPlayback.IconXCircle;
|
|
28462
|
+
exports.IconXmark = WithAudioPlayback.IconXmark;
|
|
28143
28463
|
exports.LoadingChannel = WithAudioPlayback.LoadingChannel;
|
|
28144
28464
|
exports.LoadingErrorIndicator = WithAudioPlayback.LoadingErrorIndicator;
|
|
28145
28465
|
exports.MESSAGE_ACTIONS = WithAudioPlayback.MESSAGE_ACTIONS;
|
|
@@ -28266,6 +28586,7 @@ exports.ContextMenu = ContextMenu;
|
|
|
28266
28586
|
exports.ContextMenuBackButton = ContextMenuBackButton;
|
|
28267
28587
|
exports.ContextMenuBody = ContextMenuBody;
|
|
28268
28588
|
exports.ContextMenuButton = ContextMenuButton;
|
|
28589
|
+
exports.ContextMenuContent = ContextMenuContent;
|
|
28269
28590
|
exports.ContextMenuHeader = ContextMenuHeader;
|
|
28270
28591
|
exports.ContextMenuRoot = ContextMenuRoot;
|
|
28271
28592
|
exports.CooldownTimer = CooldownTimer;
|
|
@@ -28338,6 +28659,7 @@ exports.MessageListContextProvider = MessageListContextProvider;
|
|
|
28338
28659
|
exports.MessageProvider = MessageProvider;
|
|
28339
28660
|
exports.MessageReactions = MessageReactions;
|
|
28340
28661
|
exports.MessageReactionsDetail = MessageReactionsDetail;
|
|
28662
|
+
exports.MessageReactionsDetailLoadingIndicator = MessageReactionsDetailLoadingIndicator;
|
|
28341
28663
|
exports.MessageRepliesCountButton = MessageRepliesCountButton;
|
|
28342
28664
|
exports.MessageSearchResultItem = MessageSearchResultItem;
|
|
28343
28665
|
exports.MessageStatus = MessageStatus;
|