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.node.cjs
CHANGED
|
@@ -20184,6 +20184,7 @@ __export(src_exports, {
|
|
|
20184
20184
|
Message: () => Message,
|
|
20185
20185
|
MessageActions: () => MessageActions,
|
|
20186
20186
|
MessageActionsBox: () => MessageActionsBox,
|
|
20187
|
+
MessageActionsWrapper: () => MessageActionsWrapper,
|
|
20187
20188
|
MessageBounceProvider: () => MessageBounceProvider,
|
|
20188
20189
|
MessageContext: () => MessageContext,
|
|
20189
20190
|
MessageDeleted: () => MessageDeleted,
|
|
@@ -20723,20 +20724,20 @@ var useDialog = ({ id }) => {
|
|
|
20723
20724
|
var useDialogIsOpen = (id) => {
|
|
20724
20725
|
const { dialogManager } = useDialogManager();
|
|
20725
20726
|
const dialogIsOpenSelector = (0, import_react7.useCallback)(
|
|
20726
|
-
({ dialogsById }) =>
|
|
20727
|
+
({ dialogsById }) => ({ isOpen: !!dialogsById[id]?.isOpen }),
|
|
20727
20728
|
[id]
|
|
20728
20729
|
);
|
|
20729
|
-
return useStateStore(dialogManager.state, dialogIsOpenSelector)
|
|
20730
|
+
return useStateStore(dialogManager.state, dialogIsOpenSelector).isOpen;
|
|
20730
20731
|
};
|
|
20731
|
-
var openedDialogCountSelector = (nextValue) =>
|
|
20732
|
-
Object.values(nextValue.dialogsById).reduce((count, dialog) => {
|
|
20732
|
+
var openedDialogCountSelector = (nextValue) => ({
|
|
20733
|
+
openedDialogCount: Object.values(nextValue.dialogsById).reduce((count, dialog) => {
|
|
20733
20734
|
if (dialog.isOpen) return count + 1;
|
|
20734
20735
|
return count;
|
|
20735
20736
|
}, 0)
|
|
20736
|
-
|
|
20737
|
+
});
|
|
20737
20738
|
var useOpenedDialogCount = () => {
|
|
20738
20739
|
const { dialogManager } = useDialogManager();
|
|
20739
|
-
return useStateStore(dialogManager.state, openedDialogCountSelector)
|
|
20740
|
+
return useStateStore(dialogManager.state, openedDialogCountSelector).openedDialogCount;
|
|
20740
20741
|
};
|
|
20741
20742
|
|
|
20742
20743
|
// src/components/Dialog/DialogPortal.tsx
|
|
@@ -38742,6 +38743,7 @@ var de_default = {
|
|
|
38742
38743
|
"People matching": "Passende Personen",
|
|
38743
38744
|
Pin: "Pin",
|
|
38744
38745
|
"Pinned by": "Gepinnt von",
|
|
38746
|
+
Quote: "Quote",
|
|
38745
38747
|
"Recording format is not supported and cannot be reproduced": "Aufnahmeformat wird nicht unterst\xFCtzt und kann nicht wiedergegeben werden",
|
|
38746
38748
|
Reply: "Antworten",
|
|
38747
38749
|
"Reply to Message": "Auf Nachricht antworten",
|
|
@@ -38895,6 +38897,7 @@ var en_default = {
|
|
|
38895
38897
|
"People matching": "People matching",
|
|
38896
38898
|
Pin: "Pin",
|
|
38897
38899
|
"Pinned by": "Pinned by",
|
|
38900
|
+
Quote: "Quote",
|
|
38898
38901
|
"Recording format is not supported and cannot be reproduced": "Recording format is not supported and cannot be reproduced",
|
|
38899
38902
|
Reply: "Reply",
|
|
38900
38903
|
"Reply to Message": "Reply to Message",
|
|
@@ -39038,6 +39041,7 @@ var es_default = {
|
|
|
39038
39041
|
"People matching": "Personas que coinciden",
|
|
39039
39042
|
Pin: "Alfiler",
|
|
39040
39043
|
"Pinned by": "Fijado por",
|
|
39044
|
+
Quote: "Quote",
|
|
39041
39045
|
"Recording format is not supported and cannot be reproduced": "El formato de grabaci\xF3n no es compatible y no se puede reproducir",
|
|
39042
39046
|
Reply: "Respuesta",
|
|
39043
39047
|
"Reply to Message": "Responder al mensaje",
|
|
@@ -39195,6 +39199,7 @@ var fr_default = {
|
|
|
39195
39199
|
"People matching": "Correspondance de personnes",
|
|
39196
39200
|
Pin: "\xC9pingle",
|
|
39197
39201
|
"Pinned by": "\xC9pingl\xE9 par",
|
|
39202
|
+
Quote: "Quote",
|
|
39198
39203
|
"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",
|
|
39199
39204
|
Reply: "R\xE9ponse",
|
|
39200
39205
|
"Reply to Message": "R\xE9pondre au message",
|
|
@@ -39353,6 +39358,7 @@ var hi_default = {
|
|
|
39353
39358
|
"People matching": "\u092E\u0947\u0932 \u0916\u093E\u0924\u0947 \u0932\u094B\u0917",
|
|
39354
39359
|
Pin: "\u092A\u093F\u0928",
|
|
39355
39360
|
"Pinned by": "\u0926\u094D\u0935\u093E\u0930\u093E \u092A\u093F\u0928 \u0915\u093F\u092F\u093E \u0917\u092F\u093E",
|
|
39361
|
+
Quote: "Quote",
|
|
39356
39362
|
"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",
|
|
39357
39363
|
Reply: "\u091C\u0935\u093E\u092C \u0926\u0947 \u0926\u094B",
|
|
39358
39364
|
"Reply to Message": "\u0938\u0902\u0926\u0947\u0936 \u0915\u093E \u091C\u0935\u093E\u092C \u0926\u0947\u0902",
|
|
@@ -39506,6 +39512,7 @@ var it_default = {
|
|
|
39506
39512
|
"People matching": "Persone che corrispondono",
|
|
39507
39513
|
Pin: "Pin",
|
|
39508
39514
|
"Pinned by": "Appuntato da",
|
|
39515
|
+
Quote: "Quote",
|
|
39509
39516
|
"Recording format is not supported and cannot be reproduced": "Il formato di registrazione non \xE8 supportato e non pu\xF2 essere riprodotto",
|
|
39510
39517
|
Reply: "Rispondere",
|
|
39511
39518
|
"Reply to Message": "Rispondi al messaggio",
|
|
@@ -39663,6 +39670,7 @@ var ja_default = {
|
|
|
39663
39670
|
"People matching": "\u4E00\u81F4\u3059\u308B\u4EBA",
|
|
39664
39671
|
Pin: "\u30D4\u30F3",
|
|
39665
39672
|
"Pinned by": "\u30D4\u30F3\u3057\u305F\u65B9",
|
|
39673
|
+
Quote: "Quote",
|
|
39666
39674
|
"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",
|
|
39667
39675
|
Reply: "\u8FD4\u4E8B",
|
|
39668
39676
|
"Reply to Message": "\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u8FD4\u4FE1",
|
|
@@ -39814,6 +39822,7 @@ var ko_default = {
|
|
|
39814
39822
|
"People matching": "\uC77C\uCE58\uD558\uB294 \uC0AC\uB78C",
|
|
39815
39823
|
Pin: "\uD540",
|
|
39816
39824
|
"Pinned by": "\uD540\uD588\uB358 \uBD84:",
|
|
39825
|
+
Quote: "Quote",
|
|
39817
39826
|
"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",
|
|
39818
39827
|
Reply: "\uB2F5\uC7A5",
|
|
39819
39828
|
"Reply to Message": "\uBA54\uC2DC\uC9C0\uC5D0 \uB2F5\uC7A5",
|
|
@@ -39965,6 +39974,7 @@ var nl_default = {
|
|
|
39965
39974
|
"People matching": "Mensen die matchen",
|
|
39966
39975
|
Pin: "Pin",
|
|
39967
39976
|
"Pinned by": "Vastgemaakt door",
|
|
39977
|
+
Quote: "Quote",
|
|
39968
39978
|
"Recording format is not supported and cannot be reproduced": "Opnameformaat wordt niet ondersteund en kan niet worden gereproduceerd",
|
|
39969
39979
|
Reply: "Antwoord",
|
|
39970
39980
|
"Reply to Message": "Antwoord op bericht",
|
|
@@ -40118,6 +40128,7 @@ var pt_default = {
|
|
|
40118
40128
|
"People matching": "Pessoas correspondentes",
|
|
40119
40129
|
Pin: "Fixar",
|
|
40120
40130
|
"Pinned by": "Fixado por",
|
|
40131
|
+
Quote: "Quote",
|
|
40121
40132
|
"Recording format is not supported and cannot be reproduced": "Formato de grava\xE7\xE3o n\xE3o \xE9 suportado e n\xE3o pode ser reproduzido",
|
|
40122
40133
|
Reply: "Responder",
|
|
40123
40134
|
"Reply to Message": "Responder a mensagem",
|
|
@@ -40275,6 +40286,7 @@ var ru_default = {
|
|
|
40275
40286
|
"People matching": "\u0421\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u043B\u044E\u0434\u0438",
|
|
40276
40287
|
Pin: "\u0428\u0442\u044B\u0440\u044C",
|
|
40277
40288
|
"Pinned by": "\u0417\u0430\u043A\u0440\u0435\u043F\u043B\u0435\u043D\u043E",
|
|
40289
|
+
Quote: "Quote",
|
|
40278
40290
|
"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",
|
|
40279
40291
|
Reply: "\u041E\u0442\u0432\u0435\u0447\u0430\u0442\u044C",
|
|
40280
40292
|
"Reply to Message": "\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C \u043D\u0430 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
|
|
@@ -40436,6 +40448,7 @@ var tr_default = {
|
|
|
40436
40448
|
"People matching": "E\u015Fle\u015Fen ki\u015Filer",
|
|
40437
40449
|
Pin: "Toplu i\u011Fne",
|
|
40438
40450
|
"Pinned by": "Sabitleyen",
|
|
40451
|
+
Quote: "Quote",
|
|
40439
40452
|
"Recording format is not supported and cannot be reproduced": "Kay\u0131t format\u0131 desteklenmiyor ve \xE7o\u011Falt\u0131lam\u0131yor",
|
|
40440
40453
|
Reply: "Cevapla",
|
|
40441
40454
|
"Reply to Message": "Mesaj\u0131 Cevapla",
|
|
@@ -43920,10 +43933,12 @@ var ThreadAdapter = ({ children }) => {
|
|
|
43920
43933
|
useActiveThread({ activeThread });
|
|
43921
43934
|
return /* @__PURE__ */ import_react89.default.createElement(ThreadProvider, { thread: activeThread }, children);
|
|
43922
43935
|
};
|
|
43923
|
-
var selector = (
|
|
43936
|
+
var selector = ({ unreadThreadCount }) => ({
|
|
43937
|
+
unreadThreadCount
|
|
43938
|
+
});
|
|
43924
43939
|
var ChatViewSelector = () => {
|
|
43925
43940
|
const { client } = useChatContext();
|
|
43926
|
-
const
|
|
43941
|
+
const { unreadThreadCount } = useStateStore(client.threads.state, selector);
|
|
43927
43942
|
const { activeChatView, setActiveChatView } = (0, import_react89.useContext)(ChatViewContext);
|
|
43928
43943
|
return /* @__PURE__ */ import_react89.default.createElement("div", { className: "str-chat__chat-view__selector" }, /* @__PURE__ */ import_react89.default.createElement(
|
|
43929
43944
|
"button",
|
|
@@ -43986,16 +44001,16 @@ var ThreadListItemUI = (props) => {
|
|
|
43986
44001
|
const { client } = useChatContext();
|
|
43987
44002
|
const thread = useThreadListItemContext();
|
|
43988
44003
|
const selector6 = (0, import_react90.useCallback)(
|
|
43989
|
-
(nextValue) =>
|
|
43990
|
-
nextValue.
|
|
43991
|
-
|
|
43992
|
-
nextValue.
|
|
43993
|
-
nextValue.
|
|
43994
|
-
nextValue.
|
|
43995
|
-
|
|
44004
|
+
(nextValue) => ({
|
|
44005
|
+
channel: nextValue.channel,
|
|
44006
|
+
deletedAt: nextValue.deletedAt,
|
|
44007
|
+
latestReply: nextValue.replies.at(-1),
|
|
44008
|
+
ownUnreadMessageCount: client.userID && nextValue.read[client.userID]?.unreadMessageCount || 0,
|
|
44009
|
+
parentMessage: nextValue.parentMessage
|
|
44010
|
+
}),
|
|
43996
44011
|
[client]
|
|
43997
44012
|
);
|
|
43998
|
-
const
|
|
44013
|
+
const { channel, deletedAt, latestReply, ownUnreadMessageCount, parentMessage } = useStateStore(
|
|
43999
44014
|
thread.state,
|
|
44000
44015
|
selector6
|
|
44001
44016
|
);
|
|
@@ -44034,10 +44049,12 @@ var ThreadListEmptyPlaceholder = () => /* @__PURE__ */ import_react92.default.cr
|
|
|
44034
44049
|
|
|
44035
44050
|
// src/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.tsx
|
|
44036
44051
|
var import_react93 = __toESM(require("react"));
|
|
44037
|
-
var selector2 = (nextValue) =>
|
|
44052
|
+
var selector2 = (nextValue) => ({
|
|
44053
|
+
unseenThreadIds: nextValue.unseenThreadIds
|
|
44054
|
+
});
|
|
44038
44055
|
var ThreadListUnseenThreadsBanner = () => {
|
|
44039
44056
|
const { client } = useChatContext();
|
|
44040
|
-
const
|
|
44057
|
+
const { unseenThreadIds } = useStateStore(client.threads.state, selector2);
|
|
44041
44058
|
if (!unseenThreadIds.length) return null;
|
|
44042
44059
|
return /* @__PURE__ */ import_react93.default.createElement("div", { className: "str-chat__unseen-threads-banner" }, unseenThreadIds.length, " unread threads", /* @__PURE__ */ import_react93.default.createElement(
|
|
44043
44060
|
"button",
|
|
@@ -44051,17 +44068,19 @@ var ThreadListUnseenThreadsBanner = () => {
|
|
|
44051
44068
|
|
|
44052
44069
|
// src/components/Threads/ThreadList/ThreadListLoadingIndicator.tsx
|
|
44053
44070
|
var import_react94 = __toESM(require("react"));
|
|
44054
|
-
var selector3 = (nextValue) =>
|
|
44071
|
+
var selector3 = (nextValue) => ({
|
|
44072
|
+
isLoadingNext: nextValue.pagination.isLoadingNext
|
|
44073
|
+
});
|
|
44055
44074
|
var ThreadListLoadingIndicator = () => {
|
|
44056
44075
|
const { LoadingIndicator: LoadingIndicator2 = LoadingIndicator } = useComponentContext();
|
|
44057
44076
|
const { client } = useChatContext();
|
|
44058
|
-
const
|
|
44077
|
+
const { isLoadingNext } = useStateStore(client.threads.state, selector3);
|
|
44059
44078
|
if (!isLoadingNext) return null;
|
|
44060
44079
|
return /* @__PURE__ */ import_react94.default.createElement("div", { className: "str-chat__thread-list-loading-indicator" }, /* @__PURE__ */ import_react94.default.createElement(LoadingIndicator2, null));
|
|
44061
44080
|
};
|
|
44062
44081
|
|
|
44063
44082
|
// src/components/Threads/ThreadList/ThreadList.tsx
|
|
44064
|
-
var selector4 = (nextValue) =>
|
|
44083
|
+
var selector4 = (nextValue) => ({ threads: nextValue.threads });
|
|
44065
44084
|
var computeItemKey = (_, item) => item.id;
|
|
44066
44085
|
var useThreadList = () => {
|
|
44067
44086
|
const { client } = useChatContext();
|
|
@@ -44090,7 +44109,7 @@ var ThreadList = ({ virtuosoProps }) => {
|
|
|
44090
44109
|
ThreadListLoadingIndicator: ThreadListLoadingIndicator2 = ThreadListLoadingIndicator,
|
|
44091
44110
|
ThreadListUnseenThreadsBanner: ThreadListUnseenThreadsBanner2 = ThreadListUnseenThreadsBanner
|
|
44092
44111
|
} = useComponentContext();
|
|
44093
|
-
const
|
|
44112
|
+
const { threads } = useStateStore(client.threads.state, selector4);
|
|
44094
44113
|
useThreadList();
|
|
44095
44114
|
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(
|
|
44096
44115
|
import_react_virtuoso.Virtuoso,
|
|
@@ -45096,8 +45115,7 @@ var ReactionSelector = import_react108.default.memo(
|
|
|
45096
45115
|
|
|
45097
45116
|
// src/components/Reactions/ReactionSelectorWithButton.tsx
|
|
45098
45117
|
var ReactionSelectorWithButton = ({
|
|
45099
|
-
ReactionIcon: ReactionIcon2
|
|
45100
|
-
theme
|
|
45118
|
+
ReactionIcon: ReactionIcon2
|
|
45101
45119
|
}) => {
|
|
45102
45120
|
const { t: t2 } = useTranslationContext("ReactionSelectorWithButton");
|
|
45103
45121
|
const { isMyMessage, message } = useMessageContext("MessageOptions");
|
|
@@ -45120,7 +45138,7 @@ var ReactionSelectorWithButton = ({
|
|
|
45120
45138
|
{
|
|
45121
45139
|
"aria-expanded": dialogIsOpen,
|
|
45122
45140
|
"aria-label": t2("aria/Open Reaction Selector"),
|
|
45123
|
-
className:
|
|
45141
|
+
className: "str-chat__message-reactions-button",
|
|
45124
45142
|
"data-testid": "message-reaction-action",
|
|
45125
45143
|
onClick: () => dialog?.toggle(),
|
|
45126
45144
|
ref: buttonRef
|
|
@@ -45175,7 +45193,7 @@ var UnMemoizedMessageOptions = (props) => {
|
|
|
45175
45193
|
},
|
|
45176
45194
|
/* @__PURE__ */ import_react110.default.createElement(ThreadIcon2, { className: "str-chat__message-action-icon" })
|
|
45177
45195
|
),
|
|
45178
|
-
shouldShowReactions && /* @__PURE__ */ import_react110.default.createElement(ReactionSelectorWithButton, { ReactionIcon: ReactionIcon2
|
|
45196
|
+
shouldShowReactions && /* @__PURE__ */ import_react110.default.createElement(ReactionSelectorWithButton, { ReactionIcon: ReactionIcon2 })
|
|
45179
45197
|
);
|
|
45180
45198
|
};
|
|
45181
45199
|
var MessageOptions = import_react110.default.memo(
|
|
@@ -47247,9 +47265,12 @@ var MessageSimpleWithContext = (props) => {
|
|
|
47247
47265
|
Attachment: Attachment2 = Attachment,
|
|
47248
47266
|
Avatar: Avatar2 = Avatar,
|
|
47249
47267
|
EditMessageInput = EditMessageForm,
|
|
47268
|
+
MessageOptions: MessageOptions2 = MessageOptions,
|
|
47269
|
+
// TODO: remove this "passthrough" in the next
|
|
47270
|
+
// major release and use the new default instead
|
|
47271
|
+
MessageActions: MessageActions2 = MessageOptions2,
|
|
47250
47272
|
MessageDeleted: MessageDeleted2 = MessageDeleted,
|
|
47251
47273
|
MessageBouncePrompt: MessageBouncePrompt2 = MessageBouncePrompt,
|
|
47252
|
-
MessageOptions: MessageOptions2 = MessageOptions,
|
|
47253
47274
|
MessageRepliesCountButton: MessageRepliesCountButton2 = MessageRepliesCountButton,
|
|
47254
47275
|
MessageStatus: MessageStatus2 = MessageStatus,
|
|
47255
47276
|
MessageTimestamp: MessageTimestamp2 = MessageTimestamp,
|
|
@@ -47331,7 +47352,7 @@ var MessageSimpleWithContext = (props) => {
|
|
|
47331
47352
|
onClick: handleClick,
|
|
47332
47353
|
onKeyUp: handleClick
|
|
47333
47354
|
},
|
|
47334
|
-
/* @__PURE__ */ import_react151.default.createElement(
|
|
47355
|
+
/* @__PURE__ */ import_react151.default.createElement(MessageActions2, null),
|
|
47335
47356
|
/* @__PURE__ */ import_react151.default.createElement("div", { className: "str-chat__message-reactions-host" }, hasReactions && /* @__PURE__ */ import_react151.default.createElement(ReactionsList2, { reverse: true })),
|
|
47336
47357
|
/* @__PURE__ */ import_react151.default.createElement("div", { className: "str-chat__message-bubble" }, message.attachments?.length && !message.quoted_message ? /* @__PURE__ */ import_react151.default.createElement(Attachment2, { actionHandler: handleAction, attachments: message.attachments }) : null, /* @__PURE__ */ import_react151.default.createElement(MessageText, { message, renderText: renderText2 }), message.mml && /* @__PURE__ */ import_react151.default.createElement(
|
|
47337
47358
|
MML,
|
|
@@ -50571,6 +50592,7 @@ var ChannelInner = (props) => {
|
|
|
50571
50592
|
LinkPreviewList: props.LinkPreviewList,
|
|
50572
50593
|
LoadingIndicator: props.LoadingIndicator,
|
|
50573
50594
|
Message: props.Message,
|
|
50595
|
+
MessageActions: props.MessageActions,
|
|
50574
50596
|
MessageBouncePrompt: props.MessageBouncePrompt,
|
|
50575
50597
|
MessageDeleted: props.MessageDeleted,
|
|
50576
50598
|
MessageListNotifications: props.MessageListNotifications,
|
|
@@ -50620,6 +50642,7 @@ var ChannelInner = (props) => {
|
|
|
50620
50642
|
props.LinkPreviewList,
|
|
50621
50643
|
props.LoadingIndicator,
|
|
50622
50644
|
props.Message,
|
|
50645
|
+
props.MessageActions,
|
|
50623
50646
|
props.MessageBouncePrompt,
|
|
50624
50647
|
props.MessageDeleted,
|
|
50625
50648
|
props.MessageListNotifications,
|
|
@@ -52356,12 +52379,12 @@ var Thread = (props) => {
|
|
|
52356
52379
|
/* @__PURE__ */ import_react221.default.createElement(ThreadInner, { ...props, key: `thread-${(thread ?? threadInstance)?.id}-${channel?.cid}` })
|
|
52357
52380
|
);
|
|
52358
52381
|
};
|
|
52359
|
-
var selector5 = (nextValue) =>
|
|
52360
|
-
nextValue.
|
|
52361
|
-
nextValue.pagination.isLoadingPrev,
|
|
52362
|
-
nextValue.
|
|
52363
|
-
nextValue.
|
|
52364
|
-
|
|
52382
|
+
var selector5 = (nextValue) => ({
|
|
52383
|
+
isLoadingNext: nextValue.pagination.isLoadingNext,
|
|
52384
|
+
isLoadingPrev: nextValue.pagination.isLoadingPrev,
|
|
52385
|
+
parentMessage: nextValue.parentMessage,
|
|
52386
|
+
replies: nextValue.replies
|
|
52387
|
+
});
|
|
52365
52388
|
var ThreadInner = (props) => {
|
|
52366
52389
|
const {
|
|
52367
52390
|
additionalMessageInputProps,
|
|
@@ -52376,7 +52399,7 @@ var ThreadInner = (props) => {
|
|
|
52376
52399
|
virtualized
|
|
52377
52400
|
} = props;
|
|
52378
52401
|
const threadInstance = useThreadContext();
|
|
52379
|
-
const
|
|
52402
|
+
const { isLoadingNext, isLoadingPrev, parentMessage, replies } = useStateStore(threadInstance?.state, selector5) ?? {};
|
|
52380
52403
|
const {
|
|
52381
52404
|
thread,
|
|
52382
52405
|
threadHasMore,
|
|
@@ -52408,7 +52431,7 @@ var ThreadInner = (props) => {
|
|
|
52408
52431
|
loadingMoreNewer: isLoadingNext,
|
|
52409
52432
|
loadMore: threadInstance.loadPrevPage,
|
|
52410
52433
|
loadMoreNewer: threadInstance.loadNextPage,
|
|
52411
|
-
messages:
|
|
52434
|
+
messages: replies
|
|
52412
52435
|
} : {
|
|
52413
52436
|
hasMore: threadHasMore,
|
|
52414
52437
|
loadingMore: threadLoadingMore,
|
|
@@ -52559,6 +52582,7 @@ var Window = import_react222.default.memo(UnMemoizedWindow);
|
|
|
52559
52582
|
Message,
|
|
52560
52583
|
MessageActions,
|
|
52561
52584
|
MessageActionsBox,
|
|
52585
|
+
MessageActionsWrapper,
|
|
52562
52586
|
MessageBounceProvider,
|
|
52563
52587
|
MessageContext,
|
|
52564
52588
|
MessageDeleted,
|