stream-chat-react 12.2.2 → 12.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Channel/Channel.d.ts +1 -1
- package/dist/components/Channel/Channel.js +2 -0
- package/dist/components/ChatAutoComplete/ChatAutoComplete.d.ts +1 -1
- package/dist/components/ChatView/ChatView.js +4 -2
- package/dist/components/Dialog/hooks/useDialog.js +6 -6
- package/dist/components/Message/MessageOptions.js +1 -1
- package/dist/components/Message/MessageSimple.js +5 -2
- package/dist/components/Message/utils.d.ts +1 -1
- package/dist/components/MessageActions/MessageActions.d.ts +2 -1
- package/dist/components/MessageActions/MessageActions.js +1 -1
- package/dist/components/Reactions/ReactionSelectorWithButton.d.ts +1 -2
- package/dist/components/Reactions/ReactionSelectorWithButton.js +2 -2
- package/dist/components/Thread/Thread.js +8 -8
- package/dist/components/Threads/ThreadList/ThreadList.js +2 -2
- package/dist/components/Threads/ThreadList/ThreadListItemUI.js +8 -8
- package/dist/components/Threads/ThreadList/ThreadListLoadingIndicator.js +4 -2
- package/dist/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.js +4 -2
- package/dist/components/Threads/hooks/useThreadManagerState.js +1 -1
- package/dist/context/ComponentContext.d.ts +7 -1
- package/dist/experimental/MessageActions/MessageActions.d.ts +17 -0
- package/dist/experimental/MessageActions/MessageActions.js +48 -0
- package/dist/experimental/MessageActions/defaults.d.ts +5 -0
- package/dist/experimental/MessageActions/defaults.js +93 -0
- package/dist/experimental/MessageActions/hooks/index.d.ts +2 -0
- package/dist/experimental/MessageActions/hooks/index.js +2 -0
- package/dist/experimental/MessageActions/hooks/useBaseMessageActionSetFilter.d.ts +8 -0
- package/dist/experimental/MessageActions/hooks/useBaseMessageActionSetFilter.js +57 -0
- package/dist/experimental/MessageActions/hooks/useSplitMessageActionSet.d.ts +5 -0
- package/dist/experimental/MessageActions/hooks/useSplitMessageActionSet.js +12 -0
- package/dist/experimental/MessageActions/index.d.ts +3 -0
- package/dist/experimental/MessageActions/index.js +3 -0
- package/dist/experimental/index.browser.cjs +1091 -0
- package/dist/experimental/index.browser.cjs.map +7 -0
- package/dist/experimental/index.d.ts +1 -0
- package/dist/experimental/index.js +1 -0
- package/dist/experimental/index.node.cjs +1099 -0
- package/dist/experimental/index.node.cjs.map +7 -0
- package/dist/i18n/Streami18n.d.ts +1 -0
- package/dist/i18n/de.json +1 -0
- package/dist/i18n/en.json +1 -0
- package/dist/i18n/es.json +1 -0
- package/dist/i18n/fr.json +1 -0
- package/dist/i18n/hi.json +1 -0
- package/dist/i18n/it.json +1 -0
- package/dist/i18n/ja.json +1 -0
- package/dist/i18n/ko.json +1 -0
- package/dist/i18n/nl.json +1 -0
- package/dist/i18n/pt.json +1 -0
- package/dist/i18n/ru.json +1 -0
- package/dist/i18n/tr.json +1 -0
- package/dist/index.browser.cjs +59 -36
- package/dist/index.browser.cjs.map +3 -3
- package/dist/index.node.cjs +60 -36
- package/dist/index.node.cjs.map +3 -3
- package/dist/store/hooks/useStateStore.d.ts +2 -2
- package/package.json +18 -3
package/dist/index.browser.cjs
CHANGED
|
@@ -17487,6 +17487,7 @@ __export(src_exports, {
|
|
|
17487
17487
|
Message: () => Message,
|
|
17488
17488
|
MessageActions: () => MessageActions,
|
|
17489
17489
|
MessageActionsBox: () => MessageActionsBox,
|
|
17490
|
+
MessageActionsWrapper: () => MessageActionsWrapper,
|
|
17490
17491
|
MessageBounceProvider: () => MessageBounceProvider,
|
|
17491
17492
|
MessageContext: () => MessageContext,
|
|
17492
17493
|
MessageDeleted: () => MessageDeleted,
|
|
@@ -18026,20 +18027,20 @@ var useDialog = ({ id }) => {
|
|
|
18026
18027
|
var useDialogIsOpen = (id) => {
|
|
18027
18028
|
const { dialogManager } = useDialogManager();
|
|
18028
18029
|
const dialogIsOpenSelector = (0, import_react7.useCallback)(
|
|
18029
|
-
({ dialogsById }) =>
|
|
18030
|
+
({ dialogsById }) => ({ isOpen: !!dialogsById[id]?.isOpen }),
|
|
18030
18031
|
[id]
|
|
18031
18032
|
);
|
|
18032
|
-
return useStateStore(dialogManager.state, dialogIsOpenSelector)
|
|
18033
|
+
return useStateStore(dialogManager.state, dialogIsOpenSelector).isOpen;
|
|
18033
18034
|
};
|
|
18034
|
-
var openedDialogCountSelector = (nextValue) =>
|
|
18035
|
-
Object.values(nextValue.dialogsById).reduce((count, dialog) => {
|
|
18035
|
+
var openedDialogCountSelector = (nextValue) => ({
|
|
18036
|
+
openedDialogCount: Object.values(nextValue.dialogsById).reduce((count, dialog) => {
|
|
18036
18037
|
if (dialog.isOpen) return count + 1;
|
|
18037
18038
|
return count;
|
|
18038
18039
|
}, 0)
|
|
18039
|
-
|
|
18040
|
+
});
|
|
18040
18041
|
var useOpenedDialogCount = () => {
|
|
18041
18042
|
const { dialogManager } = useDialogManager();
|
|
18042
|
-
return useStateStore(dialogManager.state, openedDialogCountSelector)
|
|
18043
|
+
return useStateStore(dialogManager.state, openedDialogCountSelector).openedDialogCount;
|
|
18043
18044
|
};
|
|
18044
18045
|
|
|
18045
18046
|
// src/components/Dialog/DialogPortal.tsx
|
|
@@ -34175,6 +34176,7 @@ var de_default = {
|
|
|
34175
34176
|
"People matching": "Passende Personen",
|
|
34176
34177
|
Pin: "Pin",
|
|
34177
34178
|
"Pinned by": "Gepinnt von",
|
|
34179
|
+
Quote: "Quote",
|
|
34178
34180
|
"Recording format is not supported and cannot be reproduced": "Aufnahmeformat wird nicht unterst\xFCtzt und kann nicht wiedergegeben werden",
|
|
34179
34181
|
Reply: "Antworten",
|
|
34180
34182
|
"Reply to Message": "Auf Nachricht antworten",
|
|
@@ -34328,6 +34330,7 @@ var en_default = {
|
|
|
34328
34330
|
"People matching": "People matching",
|
|
34329
34331
|
Pin: "Pin",
|
|
34330
34332
|
"Pinned by": "Pinned by",
|
|
34333
|
+
Quote: "Quote",
|
|
34331
34334
|
"Recording format is not supported and cannot be reproduced": "Recording format is not supported and cannot be reproduced",
|
|
34332
34335
|
Reply: "Reply",
|
|
34333
34336
|
"Reply to Message": "Reply to Message",
|
|
@@ -34471,6 +34474,7 @@ var es_default = {
|
|
|
34471
34474
|
"People matching": "Personas que coinciden",
|
|
34472
34475
|
Pin: "Alfiler",
|
|
34473
34476
|
"Pinned by": "Fijado por",
|
|
34477
|
+
Quote: "Quote",
|
|
34474
34478
|
"Recording format is not supported and cannot be reproduced": "El formato de grabaci\xF3n no es compatible y no se puede reproducir",
|
|
34475
34479
|
Reply: "Respuesta",
|
|
34476
34480
|
"Reply to Message": "Responder al mensaje",
|
|
@@ -34628,6 +34632,7 @@ var fr_default = {
|
|
|
34628
34632
|
"People matching": "Correspondance de personnes",
|
|
34629
34633
|
Pin: "\xC9pingle",
|
|
34630
34634
|
"Pinned by": "\xC9pingl\xE9 par",
|
|
34635
|
+
Quote: "Quote",
|
|
34631
34636
|
"Recording format is not supported and cannot be reproduced": "Le format d'enregistrement n'est pas pris en charge et ne peut pas \xEAtre reproduit",
|
|
34632
34637
|
Reply: "R\xE9ponse",
|
|
34633
34638
|
"Reply to Message": "R\xE9pondre au message",
|
|
@@ -34786,6 +34791,7 @@ var hi_default = {
|
|
|
34786
34791
|
"People matching": "\u092E\u0947\u0932 \u0916\u093E\u0924\u0947 \u0932\u094B\u0917",
|
|
34787
34792
|
Pin: "\u092A\u093F\u0928",
|
|
34788
34793
|
"Pinned by": "\u0926\u094D\u0935\u093E\u0930\u093E \u092A\u093F\u0928 \u0915\u093F\u092F\u093E \u0917\u092F\u093E",
|
|
34794
|
+
Quote: "Quote",
|
|
34789
34795
|
"Recording format is not supported and cannot be reproduced": "\u0930\u0947\u0915\u0949\u0930\u094D\u0921\u093F\u0902\u0917 \u092B\u093C\u0949\u0930\u094D\u092E\u0947\u091F \u0938\u092E\u0930\u094D\u0925\u093F\u0924 \u0928\u0939\u0940\u0902 \u0939\u0948 \u0914\u0930 \u092A\u0941\u0928\u0903 \u0909\u0924\u094D\u092A\u0928\u094D\u0928 \u0928\u0939\u0940\u0902 \u0915\u093F\u092F\u093E \u091C\u093E \u0938\u0915\u0924\u093E",
|
|
34790
34796
|
Reply: "\u091C\u0935\u093E\u092C \u0926\u0947 \u0926\u094B",
|
|
34791
34797
|
"Reply to Message": "\u0938\u0902\u0926\u0947\u0936 \u0915\u093E \u091C\u0935\u093E\u092C \u0926\u0947\u0902",
|
|
@@ -34939,6 +34945,7 @@ var it_default = {
|
|
|
34939
34945
|
"People matching": "Persone che corrispondono",
|
|
34940
34946
|
Pin: "Pin",
|
|
34941
34947
|
"Pinned by": "Appuntato da",
|
|
34948
|
+
Quote: "Quote",
|
|
34942
34949
|
"Recording format is not supported and cannot be reproduced": "Il formato di registrazione non \xE8 supportato e non pu\xF2 essere riprodotto",
|
|
34943
34950
|
Reply: "Rispondere",
|
|
34944
34951
|
"Reply to Message": "Rispondi al messaggio",
|
|
@@ -35096,6 +35103,7 @@ var ja_default = {
|
|
|
35096
35103
|
"People matching": "\u4E00\u81F4\u3059\u308B\u4EBA",
|
|
35097
35104
|
Pin: "\u30D4\u30F3",
|
|
35098
35105
|
"Pinned by": "\u30D4\u30F3\u3057\u305F\u65B9",
|
|
35106
|
+
Quote: "Quote",
|
|
35099
35107
|
"Recording format is not supported and cannot be reproduced": "\u9332\u97F3\u5F62\u5F0F\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u304A\u3089\u305A\u3001\u518D\u751F\u3067\u304D\u307E\u305B\u3093",
|
|
35100
35108
|
Reply: "\u8FD4\u4E8B",
|
|
35101
35109
|
"Reply to Message": "\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u8FD4\u4FE1",
|
|
@@ -35247,6 +35255,7 @@ var ko_default = {
|
|
|
35247
35255
|
"People matching": "\uC77C\uCE58\uD558\uB294 \uC0AC\uB78C",
|
|
35248
35256
|
Pin: "\uD540",
|
|
35249
35257
|
"Pinned by": "\uD540\uD588\uB358 \uBD84:",
|
|
35258
|
+
Quote: "Quote",
|
|
35250
35259
|
"Recording format is not supported and cannot be reproduced": "\uB179\uC74C \uD615\uC2DD\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC7AC\uC0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
35251
35260
|
Reply: "\uB2F5\uC7A5",
|
|
35252
35261
|
"Reply to Message": "\uBA54\uC2DC\uC9C0\uC5D0 \uB2F5\uC7A5",
|
|
@@ -35398,6 +35407,7 @@ var nl_default = {
|
|
|
35398
35407
|
"People matching": "Mensen die matchen",
|
|
35399
35408
|
Pin: "Pin",
|
|
35400
35409
|
"Pinned by": "Vastgemaakt door",
|
|
35410
|
+
Quote: "Quote",
|
|
35401
35411
|
"Recording format is not supported and cannot be reproduced": "Opnameformaat wordt niet ondersteund en kan niet worden gereproduceerd",
|
|
35402
35412
|
Reply: "Antwoord",
|
|
35403
35413
|
"Reply to Message": "Antwoord op bericht",
|
|
@@ -35551,6 +35561,7 @@ var pt_default = {
|
|
|
35551
35561
|
"People matching": "Pessoas correspondentes",
|
|
35552
35562
|
Pin: "Fixar",
|
|
35553
35563
|
"Pinned by": "Fixado por",
|
|
35564
|
+
Quote: "Quote",
|
|
35554
35565
|
"Recording format is not supported and cannot be reproduced": "Formato de grava\xE7\xE3o n\xE3o \xE9 suportado e n\xE3o pode ser reproduzido",
|
|
35555
35566
|
Reply: "Responder",
|
|
35556
35567
|
"Reply to Message": "Responder a mensagem",
|
|
@@ -35708,6 +35719,7 @@ var ru_default = {
|
|
|
35708
35719
|
"People matching": "\u0421\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u043B\u044E\u0434\u0438",
|
|
35709
35720
|
Pin: "\u0428\u0442\u044B\u0440\u044C",
|
|
35710
35721
|
"Pinned by": "\u0417\u0430\u043A\u0440\u0435\u043F\u043B\u0435\u043D\u043E",
|
|
35722
|
+
Quote: "Quote",
|
|
35711
35723
|
"Recording format is not supported and cannot be reproduced": "\u0424\u043E\u0440\u043C\u0430\u0442 \u0437\u0430\u043F\u0438\u0441\u0438 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0438 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0432\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0434\u0435\u043D",
|
|
35712
35724
|
Reply: "\u041E\u0442\u0432\u0435\u0447\u0430\u0442\u044C",
|
|
35713
35725
|
"Reply to Message": "\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C \u043D\u0430 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
|
|
@@ -35869,6 +35881,7 @@ var tr_default = {
|
|
|
35869
35881
|
"People matching": "E\u015Fle\u015Fen ki\u015Filer",
|
|
35870
35882
|
Pin: "Toplu i\u011Fne",
|
|
35871
35883
|
"Pinned by": "Sabitleyen",
|
|
35884
|
+
Quote: "Quote",
|
|
35872
35885
|
"Recording format is not supported and cannot be reproduced": "Kay\u0131t format\u0131 desteklenmiyor ve \xE7o\u011Falt\u0131lam\u0131yor",
|
|
35873
35886
|
Reply: "Cevapla",
|
|
35874
35887
|
"Reply to Message": "Mesaj\u0131 Cevapla",
|
|
@@ -39353,10 +39366,12 @@ var ThreadAdapter = ({ children }) => {
|
|
|
39353
39366
|
useActiveThread({ activeThread });
|
|
39354
39367
|
return /* @__PURE__ */ import_react89.default.createElement(ThreadProvider, { thread: activeThread }, children);
|
|
39355
39368
|
};
|
|
39356
|
-
var selector = (
|
|
39369
|
+
var selector = ({ unreadThreadCount }) => ({
|
|
39370
|
+
unreadThreadCount
|
|
39371
|
+
});
|
|
39357
39372
|
var ChatViewSelector = () => {
|
|
39358
39373
|
const { client } = useChatContext();
|
|
39359
|
-
const
|
|
39374
|
+
const { unreadThreadCount } = useStateStore(client.threads.state, selector);
|
|
39360
39375
|
const { activeChatView, setActiveChatView } = (0, import_react89.useContext)(ChatViewContext);
|
|
39361
39376
|
return /* @__PURE__ */ import_react89.default.createElement("div", { className: "str-chat__chat-view__selector" }, /* @__PURE__ */ import_react89.default.createElement(
|
|
39362
39377
|
"button",
|
|
@@ -39419,16 +39434,16 @@ var ThreadListItemUI = (props) => {
|
|
|
39419
39434
|
const { client } = useChatContext();
|
|
39420
39435
|
const thread = useThreadListItemContext();
|
|
39421
39436
|
const selector6 = (0, import_react90.useCallback)(
|
|
39422
|
-
(nextValue) =>
|
|
39423
|
-
nextValue.
|
|
39424
|
-
|
|
39425
|
-
nextValue.
|
|
39426
|
-
nextValue.
|
|
39427
|
-
nextValue.
|
|
39428
|
-
|
|
39437
|
+
(nextValue) => ({
|
|
39438
|
+
channel: nextValue.channel,
|
|
39439
|
+
deletedAt: nextValue.deletedAt,
|
|
39440
|
+
latestReply: nextValue.replies.at(-1),
|
|
39441
|
+
ownUnreadMessageCount: client.userID && nextValue.read[client.userID]?.unreadMessageCount || 0,
|
|
39442
|
+
parentMessage: nextValue.parentMessage
|
|
39443
|
+
}),
|
|
39429
39444
|
[client]
|
|
39430
39445
|
);
|
|
39431
|
-
const
|
|
39446
|
+
const { channel, deletedAt, latestReply, ownUnreadMessageCount, parentMessage } = useStateStore(
|
|
39432
39447
|
thread.state,
|
|
39433
39448
|
selector6
|
|
39434
39449
|
);
|
|
@@ -39467,10 +39482,12 @@ var ThreadListEmptyPlaceholder = () => /* @__PURE__ */ import_react92.default.cr
|
|
|
39467
39482
|
|
|
39468
39483
|
// src/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.tsx
|
|
39469
39484
|
var import_react93 = __toESM(require("react"));
|
|
39470
|
-
var selector2 = (nextValue) =>
|
|
39485
|
+
var selector2 = (nextValue) => ({
|
|
39486
|
+
unseenThreadIds: nextValue.unseenThreadIds
|
|
39487
|
+
});
|
|
39471
39488
|
var ThreadListUnseenThreadsBanner = () => {
|
|
39472
39489
|
const { client } = useChatContext();
|
|
39473
|
-
const
|
|
39490
|
+
const { unseenThreadIds } = useStateStore(client.threads.state, selector2);
|
|
39474
39491
|
if (!unseenThreadIds.length) return null;
|
|
39475
39492
|
return /* @__PURE__ */ import_react93.default.createElement("div", { className: "str-chat__unseen-threads-banner" }, unseenThreadIds.length, " unread threads", /* @__PURE__ */ import_react93.default.createElement(
|
|
39476
39493
|
"button",
|
|
@@ -39484,17 +39501,19 @@ var ThreadListUnseenThreadsBanner = () => {
|
|
|
39484
39501
|
|
|
39485
39502
|
// src/components/Threads/ThreadList/ThreadListLoadingIndicator.tsx
|
|
39486
39503
|
var import_react94 = __toESM(require("react"));
|
|
39487
|
-
var selector3 = (nextValue) =>
|
|
39504
|
+
var selector3 = (nextValue) => ({
|
|
39505
|
+
isLoadingNext: nextValue.pagination.isLoadingNext
|
|
39506
|
+
});
|
|
39488
39507
|
var ThreadListLoadingIndicator = () => {
|
|
39489
39508
|
const { LoadingIndicator: LoadingIndicator2 = LoadingIndicator } = useComponentContext();
|
|
39490
39509
|
const { client } = useChatContext();
|
|
39491
|
-
const
|
|
39510
|
+
const { isLoadingNext } = useStateStore(client.threads.state, selector3);
|
|
39492
39511
|
if (!isLoadingNext) return null;
|
|
39493
39512
|
return /* @__PURE__ */ import_react94.default.createElement("div", { className: "str-chat__thread-list-loading-indicator" }, /* @__PURE__ */ import_react94.default.createElement(LoadingIndicator2, null));
|
|
39494
39513
|
};
|
|
39495
39514
|
|
|
39496
39515
|
// src/components/Threads/ThreadList/ThreadList.tsx
|
|
39497
|
-
var selector4 = (nextValue) =>
|
|
39516
|
+
var selector4 = (nextValue) => ({ threads: nextValue.threads });
|
|
39498
39517
|
var computeItemKey = (_, item2) => item2.id;
|
|
39499
39518
|
var useThreadList = () => {
|
|
39500
39519
|
const { client } = useChatContext();
|
|
@@ -39523,7 +39542,7 @@ var ThreadList = ({ virtuosoProps }) => {
|
|
|
39523
39542
|
ThreadListLoadingIndicator: ThreadListLoadingIndicator2 = ThreadListLoadingIndicator,
|
|
39524
39543
|
ThreadListUnseenThreadsBanner: ThreadListUnseenThreadsBanner2 = ThreadListUnseenThreadsBanner
|
|
39525
39544
|
} = useComponentContext();
|
|
39526
|
-
const
|
|
39545
|
+
const { threads } = useStateStore(client.threads.state, selector4);
|
|
39527
39546
|
useThreadList();
|
|
39528
39547
|
return /* @__PURE__ */ import_react95.default.createElement("div", { className: "str-chat__thread-list-container" }, /* @__PURE__ */ import_react95.default.createElement(ThreadListUnseenThreadsBanner2, null), /* @__PURE__ */ import_react95.default.createElement(
|
|
39529
39548
|
import_react_virtuoso.Virtuoso,
|
|
@@ -40529,8 +40548,7 @@ var ReactionSelector = import_react108.default.memo(
|
|
|
40529
40548
|
|
|
40530
40549
|
// src/components/Reactions/ReactionSelectorWithButton.tsx
|
|
40531
40550
|
var ReactionSelectorWithButton = ({
|
|
40532
|
-
ReactionIcon: ReactionIcon2
|
|
40533
|
-
theme
|
|
40551
|
+
ReactionIcon: ReactionIcon2
|
|
40534
40552
|
}) => {
|
|
40535
40553
|
const { t: t2 } = useTranslationContext("ReactionSelectorWithButton");
|
|
40536
40554
|
const { isMyMessage, message } = useMessageContext("MessageOptions");
|
|
@@ -40553,7 +40571,7 @@ var ReactionSelectorWithButton = ({
|
|
|
40553
40571
|
{
|
|
40554
40572
|
"aria-expanded": dialogIsOpen,
|
|
40555
40573
|
"aria-label": t2("aria/Open Reaction Selector"),
|
|
40556
|
-
className:
|
|
40574
|
+
className: "str-chat__message-reactions-button",
|
|
40557
40575
|
"data-testid": "message-reaction-action",
|
|
40558
40576
|
onClick: () => dialog?.toggle(),
|
|
40559
40577
|
ref: buttonRef
|
|
@@ -40608,7 +40626,7 @@ var UnMemoizedMessageOptions = (props) => {
|
|
|
40608
40626
|
},
|
|
40609
40627
|
/* @__PURE__ */ import_react110.default.createElement(ThreadIcon2, { className: "str-chat__message-action-icon" })
|
|
40610
40628
|
),
|
|
40611
|
-
shouldShowReactions && /* @__PURE__ */ import_react110.default.createElement(ReactionSelectorWithButton, { ReactionIcon: ReactionIcon2
|
|
40629
|
+
shouldShowReactions && /* @__PURE__ */ import_react110.default.createElement(ReactionSelectorWithButton, { ReactionIcon: ReactionIcon2 })
|
|
40612
40630
|
);
|
|
40613
40631
|
};
|
|
40614
40632
|
var MessageOptions = import_react110.default.memo(
|
|
@@ -42680,9 +42698,12 @@ var MessageSimpleWithContext = (props) => {
|
|
|
42680
42698
|
Attachment: Attachment2 = Attachment,
|
|
42681
42699
|
Avatar: Avatar2 = Avatar,
|
|
42682
42700
|
EditMessageInput = EditMessageForm,
|
|
42701
|
+
MessageOptions: MessageOptions2 = MessageOptions,
|
|
42702
|
+
// TODO: remove this "passthrough" in the next
|
|
42703
|
+
// major release and use the new default instead
|
|
42704
|
+
MessageActions: MessageActions2 = MessageOptions2,
|
|
42683
42705
|
MessageDeleted: MessageDeleted2 = MessageDeleted,
|
|
42684
42706
|
MessageBouncePrompt: MessageBouncePrompt2 = MessageBouncePrompt,
|
|
42685
|
-
MessageOptions: MessageOptions2 = MessageOptions,
|
|
42686
42707
|
MessageRepliesCountButton: MessageRepliesCountButton2 = MessageRepliesCountButton,
|
|
42687
42708
|
MessageStatus: MessageStatus2 = MessageStatus,
|
|
42688
42709
|
MessageTimestamp: MessageTimestamp2 = MessageTimestamp,
|
|
@@ -42764,7 +42785,7 @@ var MessageSimpleWithContext = (props) => {
|
|
|
42764
42785
|
onClick: handleClick,
|
|
42765
42786
|
onKeyUp: handleClick
|
|
42766
42787
|
},
|
|
42767
|
-
/* @__PURE__ */ import_react152.default.createElement(
|
|
42788
|
+
/* @__PURE__ */ import_react152.default.createElement(MessageActions2, null),
|
|
42768
42789
|
/* @__PURE__ */ import_react152.default.createElement("div", { className: "str-chat__message-reactions-host" }, hasReactions && /* @__PURE__ */ import_react152.default.createElement(ReactionsList2, { reverse: true })),
|
|
42769
42790
|
/* @__PURE__ */ import_react152.default.createElement("div", { className: "str-chat__message-bubble" }, message.attachments?.length && !message.quoted_message ? /* @__PURE__ */ import_react152.default.createElement(Attachment2, { actionHandler: handleAction, attachments: message.attachments }) : null, /* @__PURE__ */ import_react152.default.createElement(MessageText, { message, renderText: renderText2 }), message.mml && /* @__PURE__ */ import_react152.default.createElement(
|
|
42770
42791
|
MML3,
|
|
@@ -46004,6 +46025,7 @@ var ChannelInner = (props) => {
|
|
|
46004
46025
|
LinkPreviewList: props.LinkPreviewList,
|
|
46005
46026
|
LoadingIndicator: props.LoadingIndicator,
|
|
46006
46027
|
Message: props.Message,
|
|
46028
|
+
MessageActions: props.MessageActions,
|
|
46007
46029
|
MessageBouncePrompt: props.MessageBouncePrompt,
|
|
46008
46030
|
MessageDeleted: props.MessageDeleted,
|
|
46009
46031
|
MessageListNotifications: props.MessageListNotifications,
|
|
@@ -46053,6 +46075,7 @@ var ChannelInner = (props) => {
|
|
|
46053
46075
|
props.LinkPreviewList,
|
|
46054
46076
|
props.LoadingIndicator,
|
|
46055
46077
|
props.Message,
|
|
46078
|
+
props.MessageActions,
|
|
46056
46079
|
props.MessageBouncePrompt,
|
|
46057
46080
|
props.MessageDeleted,
|
|
46058
46081
|
props.MessageListNotifications,
|
|
@@ -47789,12 +47812,12 @@ var Thread = (props) => {
|
|
|
47789
47812
|
/* @__PURE__ */ import_react222.default.createElement(ThreadInner, { ...props, key: `thread-${(thread ?? threadInstance)?.id}-${channel?.cid}` })
|
|
47790
47813
|
);
|
|
47791
47814
|
};
|
|
47792
|
-
var selector5 = (nextValue) =>
|
|
47793
|
-
nextValue.
|
|
47794
|
-
nextValue.pagination.isLoadingPrev,
|
|
47795
|
-
nextValue.
|
|
47796
|
-
nextValue.
|
|
47797
|
-
|
|
47815
|
+
var selector5 = (nextValue) => ({
|
|
47816
|
+
isLoadingNext: nextValue.pagination.isLoadingNext,
|
|
47817
|
+
isLoadingPrev: nextValue.pagination.isLoadingPrev,
|
|
47818
|
+
parentMessage: nextValue.parentMessage,
|
|
47819
|
+
replies: nextValue.replies
|
|
47820
|
+
});
|
|
47798
47821
|
var ThreadInner = (props) => {
|
|
47799
47822
|
const {
|
|
47800
47823
|
additionalMessageInputProps,
|
|
@@ -47809,7 +47832,7 @@ var ThreadInner = (props) => {
|
|
|
47809
47832
|
virtualized
|
|
47810
47833
|
} = props;
|
|
47811
47834
|
const threadInstance = useThreadContext();
|
|
47812
|
-
const
|
|
47835
|
+
const { isLoadingNext, isLoadingPrev, parentMessage, replies } = useStateStore(threadInstance?.state, selector5) ?? {};
|
|
47813
47836
|
const {
|
|
47814
47837
|
thread,
|
|
47815
47838
|
threadHasMore,
|
|
@@ -47841,7 +47864,7 @@ var ThreadInner = (props) => {
|
|
|
47841
47864
|
loadingMoreNewer: isLoadingNext,
|
|
47842
47865
|
loadMore: threadInstance.loadPrevPage,
|
|
47843
47866
|
loadMoreNewer: threadInstance.loadNextPage,
|
|
47844
|
-
messages:
|
|
47867
|
+
messages: replies
|
|
47845
47868
|
} : {
|
|
47846
47869
|
hasMore: threadHasMore,
|
|
47847
47870
|
loadingMore: threadLoadingMore,
|