stream-chat-react 10.18.0 → 10.20.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/README.md +1 -1
- package/dist/browser.full-bundle.js +116 -43
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +5 -5
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/Channel/Channel.d.ts +74 -62
- package/dist/components/Channel/Channel.d.ts.map +1 -1
- package/dist/components/Channel/Channel.js +9 -4
- package/dist/components/Message/renderText/index.d.ts +3 -1
- package/dist/components/Message/renderText/index.d.ts.map +1 -1
- package/dist/components/Message/renderText/index.js +2 -1
- package/dist/components/Message/renderText/rehypePlugins/emojiMarkdownPlugin.d.ts +3 -0
- package/dist/components/Message/renderText/rehypePlugins/emojiMarkdownPlugin.d.ts.map +1 -0
- package/dist/components/Message/renderText/rehypePlugins/emojiMarkdownPlugin.js +10 -0
- package/dist/components/Message/renderText/rehypePlugins/index.d.ts +3 -0
- package/dist/components/Message/renderText/rehypePlugins/index.d.ts.map +1 -0
- package/dist/components/Message/renderText/rehypePlugins/index.js +2 -0
- package/dist/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.d.ts +5 -0
- package/dist/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.d.ts.map +1 -0
- package/dist/components/Message/renderText/{rehypePlugins.js → rehypePlugins/mentionsMarkdownPlugin.js} +1 -9
- package/dist/components/Message/renderText/remarkPlugins/htmlToTextPlugin.d.ts +3 -0
- package/dist/components/Message/renderText/remarkPlugins/htmlToTextPlugin.d.ts.map +1 -0
- package/dist/components/Message/renderText/remarkPlugins/htmlToTextPlugin.js +10 -0
- package/dist/components/Message/renderText/remarkPlugins/index.d.ts +3 -0
- package/dist/components/Message/renderText/remarkPlugins/index.d.ts.map +1 -0
- package/dist/components/Message/renderText/remarkPlugins/index.js +2 -0
- package/dist/components/Message/renderText/remarkPlugins/keepLineBreaksPlugin.d.ts +3 -0
- package/dist/components/Message/renderText/remarkPlugins/keepLineBreaksPlugin.d.ts.map +1 -0
- package/dist/components/Message/renderText/remarkPlugins/keepLineBreaksPlugin.js +32 -0
- package/dist/components/Message/renderText/types.d.ts +3 -0
- package/dist/components/Message/renderText/types.d.ts.map +1 -0
- package/dist/components/Message/renderText/types.js +1 -0
- package/dist/components/MessageList/CustomNotification.d.ts.map +1 -1
- package/dist/components/MessageList/CustomNotification.js +1 -1
- package/dist/components/MessageList/MessageList.d.ts.map +1 -1
- package/dist/components/MessageList/MessageList.js +2 -1
- package/dist/context/MessageListContext.d.ts +16 -0
- package/dist/context/MessageListContext.d.ts.map +1 -0
- package/dist/context/MessageListContext.js +17 -0
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +1 -0
- package/dist/css/index.css +1 -1
- package/dist/css/v2/index.css +1 -1
- package/dist/css/v2/index.layout.css +1 -1
- package/dist/index.cjs.js +106 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/scss/MessageInput.scss +6 -0
- package/dist/scss/v2/Autocomplete/Autocomplete-layout.scss +7 -0
- package/dist/scss/v2/ChannelHeader/ChannelHeader-layout.scss +4 -0
- package/dist/scss/v2/ChannelPreview/ChannelPreview-layout.scss +1 -0
- package/dist/scss/v2/ChannelSearch/ChannelSearch-layout.scss +5 -0
- package/dist/scss/v2/Message/Message-layout.scss +8 -0
- package/dist/scss/v2/MessageList/MessageList-layout.scss +1 -0
- package/dist/scss/v2/MessageList/VirtualizedMessageList-layout.scss +4 -0
- package/dist/scss/v2/Notification/Notification-layout.scss +4 -0
- package/dist/scss/v2/Thread/Thread-layout.scss +4 -0
- package/dist/scss/v2/Tooltip/Tooltip-layout.scss +1 -0
- package/dist/scss/v2/_utils.scss +5 -0
- package/dist/utils/getChannel.d.ts +4 -2
- package/dist/utils/getChannel.d.ts.map +1 -1
- package/dist/utils/getChannel.js +3 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/components/Message/renderText/rehypePlugins.d.ts +0 -7
- package/dist/components/Message/renderText/rehypePlugins.d.ts.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -429,6 +429,23 @@ var useMessageInputContext = function (componentName) {
|
|
|
429
429
|
return contextValue;
|
|
430
430
|
};
|
|
431
431
|
|
|
432
|
+
var MessageListContext = React.createContext(undefined);
|
|
433
|
+
/**
|
|
434
|
+
* Context provider for components rendered within the `MessageList`
|
|
435
|
+
*/
|
|
436
|
+
var MessageListContextProvider = function (_a) {
|
|
437
|
+
var children = _a.children, value = _a.value;
|
|
438
|
+
return (React__default["default"].createElement(MessageListContext.Provider, { value: value }, children));
|
|
439
|
+
};
|
|
440
|
+
var useMessageListContext = function (componentName) {
|
|
441
|
+
var contextValue = React.useContext(MessageListContext);
|
|
442
|
+
if (!contextValue) {
|
|
443
|
+
console.warn("The useMessageListContext hook was called outside of the MessageListContext provider. Make sure this hook is called within the MessageList component. The errored call is located in the ".concat(componentName, " component."));
|
|
444
|
+
return {};
|
|
445
|
+
}
|
|
446
|
+
return contextValue;
|
|
447
|
+
};
|
|
448
|
+
|
|
432
449
|
var Cancel$b="Stornieren";var Close$b="Schließen";var Delete$b="Löschen";var Delivered$b="Zugestellt";var Flag$b="Meldung";var Menu$b="Menü";var Mute$b="Stumm schalten";var New$b="Neu";var Pin$b="Pin";var Reply$b="Antworten";var Search$b="Suche";var Send$b="Senden";var Shuffle$b="Mischen";var Thread$c="Thread";var Unmute$b="Stummschaltung aufheben";var Unpin$b="Pin entfernen";var live$b="live";var replyCount_one$b="1 Antwort";var replyCount_other$b="{{ count }} Antworten";var searchResultsCount_one$b="1 Ergebnis";var searchResultsCount_other$b="{{ count }} Ergebnisse";var deTranslations = {"Attach files":"Dateien anhängen",Cancel:Cancel$b,"Channel Missing":"Kanal fehlt",Close:Close$b,"Close emoji picker":"Emoji-Picker schließen","Commands matching":"Übereinstimmende Befehle","Connection failure, reconnecting now...":"Verbindungsfehler, Wiederherstellung der Verbindung...",Delete:Delete$b,Delivered:Delivered$b,"Drag your files here":"Ziehen Sie Ihre Dateien hierher","Drag your files here to add to your post":"Ziehen Sie Ihre Dateien hierher, um sie Ihrem Beitrag hinzuzufügen","Edit Message":"Nachricht bearbeiten","Edit message request failed":"Anfrage zum Bearbeiten der Nachricht fehlgeschlagen","Emoji matching":"Emoji passend","Empty message...":"Leere Nachricht...","Error adding flag":"Fehler beim Hinzufügen des Flags","Error connecting to chat, refresh the page to try again.":"Verbindungsfehler zum Chat, Aktualisiere die Seite um es erneut zu versuchen.","Error deleting message":"Fehler beim Löschen der Nachricht","Error muting a user ...":"Fehler beim Stummschalten eines Nutzers.","Error pinning message":"Fehler beim Pinnen der Nachricht","Error removing message pin":"Fehler beim Entfernen der gepinnten Nachricht","Error unmuting a user ...":"Stummschaltung des Nutzers fehlgeschlagen ...","Error uploading file":"Fehler beim Hochladen der Datei","Error uploading image":"Hochladen des Bildes fehlgeschlagen","Error · Unsent":"Fehler nicht gesendet","Error: {{ errorMessage }}":"Fehler: {{ errorMessage }}",Flag:Flag$b,"Latest Messages":"Neueste Nachrichten","Load more":"Mehr laden",Menu:Menu$b,"Message Failed · Click to try again":"Nachricht fehlgeschlagen · Klicken, um es erneut zu versuchen","Message Failed · Unauthorized":"Nachricht fehlgeschlagen · Nicht autorisiert","Message deleted":"Nachricht gelöscht","Message has been successfully flagged":"Nachricht wurde erfolgreich gemeldet","Message pinned":"Nachricht gepinnt",Mute:Mute$b,New:New$b,"New Messages!":"Neue Nachrichten!","No chats here yet…":"Noch keine Chats hier...","No results found":"keine Ergebnisse gefunden","Nothing yet...":"Noch nichts...","Open emoji picker":"Emoji-Picker öffnen","People matching":"Passende Personen","Pick your emoji":"Emoji wählen",Pin:Pin$b,"Pinned by":"Gepinnt von",Reply:Reply$b,"Reply to Message":"Auf Nachricht antworten",Search:Search$b,"Searching...":"Suchen...",Send:Send$b,"Send message request failed":"Senden der Nachrichtenanfrage fehlgeschlagen","Sending...":"Senden...",Shuffle:Shuffle$b,"Slow Mode ON":"Slow-Mode EIN","Some of the files will not be accepted":"Einige der Dateien werden nicht akzeptiert","This message was deleted...":"Diese Nachricht wurde gelöscht...",Thread:Thread$c,"Type your message":"Nachricht eingeben",Unmute:Unmute$b,Unpin:Unpin$b,"Upload type: \"{{ type }}\" is not allowed":"Upload-Typ: \"{{ type }}\" ist nicht erlaubt","Wait until all attachments have uploaded":"Bitte warten, bis alle Anhänge hochgeladen wurden","You have no channels currently":"Du hast momentan noch keinen Channels","You've reached the maximum number of files":"Die maximale Dateianzahl ist erreicht","ban-command-args":"[@Benutzername] [Text]","ban-command-description":"Einen Benutzer verbannen","giphy-command-args":"[Text]","giphy-command-description":"Poste ein zufälliges Gif in den Kanal",live:live$b,"mute-command-args":"[@Benutzername]","mute-command-description":"Stummschalten eines Benutzers",replyCount_one:replyCount_one$b,replyCount_other:replyCount_other$b,searchResultsCount_one:searchResultsCount_one$b,searchResultsCount_other:searchResultsCount_other$b,"this content could not be displayed":"Dieser Inhalt konnte nicht angezeigt werden","unban-command-args":"[@Benutzername]","unban-command-description":"Einen Benutzer entbannen","unmute-command-args":"[@Benutzername]","unmute-command-description":"Stummschaltung eines Benutzers aufheben","{{ commaSeparatedUsers }} and {{ moreCount }} more":"{{ commaSeparatedUsers }} und {{moreCount}} Mehr","{{ commaSeparatedUsers }}, and {{ lastUser }}":"{{ commaSeparatedUsers }} und {{ lastUser }}","{{ firstUser }} and {{ secondUser }}":"{{ firstUser }} und {{ secondUser }}","{{ imageCount }} more":"{{ imageCount }} mehr","{{ memberCount }} members":"{{ memberCount }} Mitglieder","{{ user }} has been muted":"{{ user }} wurde stummgeschaltet","{{ user }} has been unmuted":"{{ user }} wurde nicht stummgeschaltet","{{ user }} is typing...":"{{ user }} tippt...","{{ users }} and more are typing...":"{{ users }} und mehr tippen...","{{ users }} and {{ user }} are typing...":"{{ users }} und {{ user }} tippen...","{{ watcherCount }} online":"{{ watcherCount }} online","🏙 Attachment...":"🏙 Anhang..."};
|
|
433
450
|
|
|
434
451
|
var Cancel$a="Cancel";var Close$a="Close";var Delete$a="Delete";var Delivered$a="Delivered";var Flag$a="Flag";var Menu$a="Menu";var Mute$a="Mute";var New$a="New";var Pin$a="Pin";var Reply$a="Reply";var Search$a="Search";var Send$a="Send";var Shuffle$a="Shuffle";var Thread$b="Thread";var Unmute$a="Unmute";var Unpin$a="Unpin";var live$a="live";var replyCount_one$a="1 reply";var replyCount_other$a="{{ count }} replies";var searchResultsCount_one$a="1 result";var searchResultsCount_other$a="{{ count }} results";var enTranslations = {"Attach files":"Attach files",Cancel:Cancel$a,"Channel Missing":"Channel Missing",Close:Close$a,"Close emoji picker":"Close emoji picker","Commands matching":"Commands matching","Connection failure, reconnecting now...":"Connection failure, reconnecting now...",Delete:Delete$a,Delivered:Delivered$a,"Drag your files here":"Drag your files here","Drag your files here to add to your post":"Drag your files here to add to your post","Edit Message":"Edit Message","Edit message request failed":"Edit message request failed","Emoji matching":"Emoji matching","Empty message...":"Empty message...","Error adding flag":"Error adding flag","Error connecting to chat, refresh the page to try again.":"Error connecting to chat, refresh the page to try again.","Error deleting message":"Error deleting message","Error muting a user ...":"Error muting a user ...","Error pinning message":"Error pinning message","Error removing message pin":"Error removing message pin","Error unmuting a user ...":"Error unmuting a user ...","Error uploading file":"Error uploading file","Error uploading image":"Error uploading image","Error · Unsent":"Error · Unsent","Error: {{ errorMessage }}":"Error: {{ errorMessage }}",Flag:Flag$a,"Latest Messages":"Latest Messages","Load more":"Load more",Menu:Menu$a,"Message Failed · Click to try again":"Message Failed · Click to try again","Message Failed · Unauthorized":"Message Failed · Unauthorized","Message deleted":"Message deleted","Message has been successfully flagged":"Message has been successfully flagged","Message pinned":"Message pinned",Mute:Mute$a,New:New$a,"New Messages!":"New Messages!","No chats here yet…":"No chats here yet…","No results found":"No results found","Nothing yet...":"Nothing yet...","Open emoji picker":"Open emoji picker","People matching":"People matching","Pick your emoji":"Pick your emoji",Pin:Pin$a,"Pinned by":"Pinned by",Reply:Reply$a,"Reply to Message":"Reply to Message",Search:Search$a,"Searching...":"Searching...",Send:Send$a,"Send message request failed":"Send message request failed","Sending...":"Sending...",Shuffle:Shuffle$a,"Slow Mode ON":"Slow Mode ON","Some of the files will not be accepted":"Some of the files will not be accepted","This message was deleted...":"This message was deleted...",Thread:Thread$b,"Type your message":"Type your message",Unmute:Unmute$a,Unpin:Unpin$a,"Upload type: \"{{ type }}\" is not allowed":"Upload type: \"{{ type }}\" is not allowed","Wait until all attachments have uploaded":"Wait until all attachments have uploaded","You have no channels currently":"You have no channels currently","You've reached the maximum number of files":"You've reached the maximum number of files",live:live$a,replyCount_one:replyCount_one$a,replyCount_other:replyCount_other$a,searchResultsCount_one:searchResultsCount_one$a,searchResultsCount_other:searchResultsCount_other$a,"this content could not be displayed":"this content could not be displayed","{{ commaSeparatedUsers }} and {{ moreCount }} more":"{{ commaSeparatedUsers }} and {{ moreCount }} more","{{ commaSeparatedUsers }}, and {{ lastUser }}":"{{ commaSeparatedUsers }}, and {{ lastUser }}","{{ firstUser }} and {{ secondUser }}":"{{ firstUser }} and {{ secondUser }}","{{ imageCount }} more":"{{ imageCount }} more","{{ memberCount }} members":"{{ memberCount }} members","{{ user }} has been muted":"{{ user }} has been muted","{{ user }} has been unmuted":"{{ user }} has been unmuted","{{ user }} is typing...":"{{ user }} is typing...","{{ users }} and more are typing...":"{{ users }} and more are typing...","{{ users }} and {{ user }} are typing...":"{{ users }} and {{ user }} are typing...","{{ watcherCount }} online":"{{ watcherCount }} online","🏙 Attachment...":"🏙 Attachment..."};
|
|
@@ -4404,6 +4421,28 @@ var DefaultSuggestionListHeader = function (props) {
|
|
|
4404
4421
|
return null;
|
|
4405
4422
|
};
|
|
4406
4423
|
|
|
4424
|
+
function escapeRegExp(text) {
|
|
4425
|
+
return text.replace(/[-[\]{}()*+?.,/\\^$|#]/g, '\\$&');
|
|
4426
|
+
}
|
|
4427
|
+
var detectHttp = /(http(s?):\/\/)?(www\.)?/;
|
|
4428
|
+
var messageCodeBlocks = function (message) {
|
|
4429
|
+
var codeRegex = /```[a-z]*\n[\s\S]*?\n```|`[a-z]*[\s\S]*?`/gm;
|
|
4430
|
+
var matches = message.match(codeRegex);
|
|
4431
|
+
return matches || [];
|
|
4432
|
+
};
|
|
4433
|
+
var matchMarkdownLinks = function (message) {
|
|
4434
|
+
var regexMdLinks = /\[([^[]+)\](\(.*\))/gm;
|
|
4435
|
+
var matches = message.match(regexMdLinks);
|
|
4436
|
+
var singleMatch = /\[([^[]+)\]\((.*)\)/;
|
|
4437
|
+
var links = matches
|
|
4438
|
+
? matches.map(function (match) {
|
|
4439
|
+
var i = singleMatch.exec(match);
|
|
4440
|
+
return i && [i[1], i[2]];
|
|
4441
|
+
})
|
|
4442
|
+
: [];
|
|
4443
|
+
return links.flat();
|
|
4444
|
+
};
|
|
4445
|
+
|
|
4407
4446
|
/**
|
|
4408
4447
|
* @typedef {import('unist').Node} Node
|
|
4409
4448
|
* @typedef {import('unist').Parent} Parent
|
|
@@ -5127,6 +5166,14 @@ var u = /**
|
|
|
5127
5166
|
}
|
|
5128
5167
|
);
|
|
5129
5168
|
|
|
5169
|
+
var emojiMarkdownPlugin = function () {
|
|
5170
|
+
var replace = function (match) {
|
|
5171
|
+
return u('element', { tagName: 'emoji' }, [u('text', match)]);
|
|
5172
|
+
};
|
|
5173
|
+
var transform = function (node) { return findAndReplace$1(node, emojiRegex__default["default"](), replace); };
|
|
5174
|
+
return transform;
|
|
5175
|
+
};
|
|
5176
|
+
|
|
5130
5177
|
/**
|
|
5131
5178
|
* @param {string} d
|
|
5132
5179
|
* @returns {string}
|
|
@@ -5347,28 +5394,6 @@ const visit =
|
|
|
5347
5394
|
}
|
|
5348
5395
|
);
|
|
5349
5396
|
|
|
5350
|
-
function escapeRegExp(text) {
|
|
5351
|
-
return text.replace(/[-[\]{}()*+?.,/\\^$|#]/g, '\\$&');
|
|
5352
|
-
}
|
|
5353
|
-
var detectHttp = /(http(s?):\/\/)?(www\.)?/;
|
|
5354
|
-
var messageCodeBlocks = function (message) {
|
|
5355
|
-
var codeRegex = /```[a-z]*\n[\s\S]*?\n```|`[a-z]*[\s\S]*?`/gm;
|
|
5356
|
-
var matches = message.match(codeRegex);
|
|
5357
|
-
return matches || [];
|
|
5358
|
-
};
|
|
5359
|
-
var matchMarkdownLinks = function (message) {
|
|
5360
|
-
var regexMdLinks = /\[([^[]+)\](\(.*\))/gm;
|
|
5361
|
-
var matches = message.match(regexMdLinks);
|
|
5362
|
-
var singleMatch = /\[([^[]+)\]\((.*)\)/;
|
|
5363
|
-
var links = matches
|
|
5364
|
-
? matches.map(function (match) {
|
|
5365
|
-
var i = singleMatch.exec(match);
|
|
5366
|
-
return i && [i[1], i[2]];
|
|
5367
|
-
})
|
|
5368
|
-
: [];
|
|
5369
|
-
return links.flat();
|
|
5370
|
-
};
|
|
5371
|
-
|
|
5372
5397
|
var mentionsMarkdownPlugin = function (mentioned_users) { return function () {
|
|
5373
5398
|
var mentioned_usernames = mentioned_users
|
|
5374
5399
|
.map(function (user) { return user.name || user.id; })
|
|
@@ -5417,13 +5442,46 @@ var mentionsMarkdownPlugin = function (mentioned_users) { return function () {
|
|
|
5417
5442
|
};
|
|
5418
5443
|
return transform;
|
|
5419
5444
|
}; };
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5445
|
+
|
|
5446
|
+
var visitor$1 = function (node) {
|
|
5447
|
+
if (node.type !== 'html')
|
|
5448
|
+
return;
|
|
5449
|
+
node.type = 'text';
|
|
5450
|
+
};
|
|
5451
|
+
var transform$1 = function (tree) {
|
|
5452
|
+
visit(tree, visitor$1);
|
|
5453
|
+
};
|
|
5454
|
+
var htmlToTextPlugin = function () { return transform$1; };
|
|
5455
|
+
|
|
5456
|
+
var visitor = function (node, index, parent) {
|
|
5457
|
+
if (index === null || index === 0)
|
|
5458
|
+
return;
|
|
5459
|
+
if (!parent)
|
|
5460
|
+
return;
|
|
5461
|
+
if (!node.position)
|
|
5462
|
+
return;
|
|
5463
|
+
var prevSibling = parent.children.at(index - 1);
|
|
5464
|
+
if (!(prevSibling === null || prevSibling === void 0 ? void 0 : prevSibling.position))
|
|
5465
|
+
return;
|
|
5466
|
+
if (node.position.start.line === prevSibling.position.start.line)
|
|
5467
|
+
return false;
|
|
5468
|
+
var ownStartLine = node.position.start.line;
|
|
5469
|
+
var prevEndLine = prevSibling.position.end.line;
|
|
5470
|
+
// the -1 is adjustment for the single line break into which multiple line breaks are converted
|
|
5471
|
+
var countTruncatedLineBreaks = ownStartLine - prevEndLine - 1;
|
|
5472
|
+
if (countTruncatedLineBreaks < 1)
|
|
5473
|
+
return;
|
|
5474
|
+
var lineBreaks = Array.from({ length: countTruncatedLineBreaks }, function () {
|
|
5475
|
+
return u('break', { tagName: 'br' });
|
|
5476
|
+
});
|
|
5477
|
+
// @ts-ignore
|
|
5478
|
+
parent.children = __spreadArray(__spreadArray(__spreadArray([], parent.children.slice(0, index), true), lineBreaks, true), parent.children.slice(index), true);
|
|
5479
|
+
return;
|
|
5480
|
+
};
|
|
5481
|
+
var transform = function (tree) {
|
|
5482
|
+
visit(tree, visitor);
|
|
5426
5483
|
};
|
|
5484
|
+
var keepLineBreaksPlugin = function () { return transform; };
|
|
5427
5485
|
|
|
5428
5486
|
const protocols = ['http', 'https', 'mailto', 'tel'];
|
|
5429
5487
|
|
|
@@ -32936,12 +32994,13 @@ var WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL = {};
|
|
|
32936
32994
|
* Calls channel.watch() if it was not already recently called. Waits for watch promise to resolve even if it was invoked previously.
|
|
32937
32995
|
* @param client
|
|
32938
32996
|
* @param members
|
|
32997
|
+
* @param options
|
|
32939
32998
|
* @param type
|
|
32940
32999
|
* @param id
|
|
32941
33000
|
* @param channel
|
|
32942
33001
|
*/
|
|
32943
33002
|
var getChannel = function (_a) {
|
|
32944
|
-
var channel = _a.channel, client = _a.client, id = _a.id, members = _a.members, type = _a.type;
|
|
33003
|
+
var channel = _a.channel, client = _a.client, id = _a.id, members = _a.members, options = _a.options, type = _a.type;
|
|
32945
33004
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
32946
33005
|
var theChannel, originalCid, queryPromise;
|
|
32947
33006
|
return __generator(this, function (_b) {
|
|
@@ -32966,7 +33025,7 @@ var getChannel = function (_a) {
|
|
|
32966
33025
|
_b.sent();
|
|
32967
33026
|
return [3 /*break*/, 4];
|
|
32968
33027
|
case 2:
|
|
32969
|
-
WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid] = theChannel.watch();
|
|
33028
|
+
WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid] = theChannel.watch(options);
|
|
32970
33029
|
return [4 /*yield*/, WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid]];
|
|
32971
33030
|
case 3:
|
|
32972
33031
|
_b.sent();
|
|
@@ -33098,12 +33157,11 @@ var UnMemoizedChannel = function (props) {
|
|
|
33098
33157
|
if (!(channel === null || channel === void 0 ? void 0 : channel.cid)) {
|
|
33099
33158
|
return React__default["default"].createElement("div", { className: className }, EmptyPlaceholder);
|
|
33100
33159
|
}
|
|
33101
|
-
// @ts-ignore
|
|
33102
33160
|
return React__default["default"].createElement(ChannelInner, __assign({}, props, { channel: channel, key: channel.cid }));
|
|
33103
33161
|
};
|
|
33104
33162
|
var ChannelInner = function (props) {
|
|
33105
33163
|
var _a;
|
|
33106
|
-
var acceptedFiles = props.acceptedFiles, activeUnreadHandler = props.activeUnreadHandler, channel = props.channel, children = props.children, doDeleteMessageRequest = props.doDeleteMessageRequest, doMarkReadRequest = props.doMarkReadRequest, doSendMessageRequest = props.doSendMessageRequest, doUpdateMessageRequest = props.doUpdateMessageRequest, _b = props.dragAndDropWindow, dragAndDropWindow = _b === void 0 ? false : _b, _c = props.emojiData, emojiData = _c === void 0 ? defaultEmojiData : _c, enrichURLForPreviewConfig = props.enrichURLForPreviewConfig, _d = props.initializeOnMount, initializeOnMount = _d === void 0 ? true : _d, _e = props.LoadingErrorIndicator, LoadingErrorIndicator$1 = _e === void 0 ? LoadingErrorIndicator : _e, _f = props.LoadingIndicator, LoadingIndicator = _f === void 0 ? LoadingChannel : _f, maxNumberOfFiles = props.maxNumberOfFiles, _g = props.multipleUploads, multipleUploads = _g === void 0 ? true : _g, onMentionsClick = props.onMentionsClick, onMentionsHover = props.onMentionsHover, _h = props.optionalMessageInputProps, optionalMessageInputProps = _h === void 0 ? {} : _h, skipMessageDataMemoization = props.skipMessageDataMemoization;
|
|
33164
|
+
var acceptedFiles = props.acceptedFiles, activeUnreadHandler = props.activeUnreadHandler, channel = props.channel, channelQueryOptions = props.channelQueryOptions, children = props.children, doDeleteMessageRequest = props.doDeleteMessageRequest, doMarkReadRequest = props.doMarkReadRequest, doSendMessageRequest = props.doSendMessageRequest, doUpdateMessageRequest = props.doUpdateMessageRequest, _b = props.dragAndDropWindow, dragAndDropWindow = _b === void 0 ? false : _b, _c = props.emojiData, emojiData = _c === void 0 ? defaultEmojiData : _c, enrichURLForPreviewConfig = props.enrichURLForPreviewConfig, _d = props.initializeOnMount, initializeOnMount = _d === void 0 ? true : _d, _e = props.LoadingErrorIndicator, LoadingErrorIndicator$1 = _e === void 0 ? LoadingErrorIndicator : _e, _f = props.LoadingIndicator, LoadingIndicator = _f === void 0 ? LoadingChannel : _f, maxNumberOfFiles = props.maxNumberOfFiles, _g = props.multipleUploads, multipleUploads = _g === void 0 ? true : _g, onMentionsClick = props.onMentionsClick, onMentionsHover = props.onMentionsHover, _h = props.optionalMessageInputProps, optionalMessageInputProps = _h === void 0 ? {} : _h, skipMessageDataMemoization = props.skipMessageDataMemoization;
|
|
33107
33165
|
var _j = useChatContext('Channel'), client = _j.client, customClasses = _j.customClasses, latestMessageDatesByChannels = _j.latestMessageDatesByChannels, mutes = _j.mutes, theme = _j.theme;
|
|
33108
33166
|
var t = useTranslationContext('Channel').t;
|
|
33109
33167
|
var _k = useChannelContainerClasses({ customClasses: customClasses }), channelClass = _k.channelClass, chatClass = _k.chatClass, chatContainerClass = _k.chatContainerClass, windowsEmojiClass = _k.windowsEmojiClass;
|
|
@@ -33253,7 +33311,7 @@ var ChannelInner = function (props) {
|
|
|
33253
33311
|
}
|
|
33254
33312
|
}
|
|
33255
33313
|
}
|
|
33256
|
-
return [4 /*yield*/, getChannel({ channel: channel, client: client, members: members })];
|
|
33314
|
+
return [4 /*yield*/, getChannel({ channel: channel, client: client, members: members, options: channelQueryOptions })];
|
|
33257
33315
|
case 2:
|
|
33258
33316
|
_d.sent();
|
|
33259
33317
|
config = channel.getConfig();
|
|
@@ -33294,7 +33352,13 @@ var ChannelInner = function (props) {
|
|
|
33294
33352
|
client.off('user.deleted', handleEvent);
|
|
33295
33353
|
notificationTimeouts.forEach(clearTimeout);
|
|
33296
33354
|
};
|
|
33297
|
-
}, [
|
|
33355
|
+
}, [
|
|
33356
|
+
channel.cid,
|
|
33357
|
+
channelQueryOptions,
|
|
33358
|
+
doMarkReadRequest,
|
|
33359
|
+
channelConfig === null || channelConfig === void 0 ? void 0 : channelConfig.read_events,
|
|
33360
|
+
initializeOnMount,
|
|
33361
|
+
]);
|
|
33298
33362
|
React.useEffect(function () {
|
|
33299
33363
|
var _a;
|
|
33300
33364
|
if (!state.thread)
|
|
@@ -35052,7 +35116,7 @@ var UnMemoizedChannelList = function (props) {
|
|
|
35052
35116
|
*/
|
|
35053
35117
|
var ChannelList = React__default["default"].memo(UnMemoizedChannelList);
|
|
35054
35118
|
|
|
35055
|
-
var version = '10.
|
|
35119
|
+
var version = '10.20.0';
|
|
35056
35120
|
|
|
35057
35121
|
var useChat = function (_a) {
|
|
35058
35122
|
var _b, _c;
|
|
@@ -36066,7 +36130,7 @@ var UnMemoizedCustomNotification = function (props) {
|
|
|
36066
36130
|
var active = props.active, children = props.children, className = props.className, type = props.type;
|
|
36067
36131
|
if (!active)
|
|
36068
36132
|
return null;
|
|
36069
|
-
return (React__default["default"].createElement("div", { "aria-live": 'polite', className: clsx("str-chat__custom-notification notification-".concat(type), "str-chat__notification", className), "data-testid": 'custom-notification' }, children));
|
|
36133
|
+
return (React__default["default"].createElement("div", { "aria-live": 'polite', className: clsx("str-chat__custom-notification notification-".concat(type), "str-chat__notification", "str-chat-react__notification", className), "data-testid": 'custom-notification' }, children));
|
|
36070
36134
|
};
|
|
36071
36135
|
var CustomNotification = React__default["default"].memo(UnMemoizedCustomNotification);
|
|
36072
36136
|
|
|
@@ -36506,7 +36570,7 @@ var MessageListWithContext = function (props) {
|
|
|
36506
36570
|
}
|
|
36507
36571
|
}, [highlightedMessageId]);
|
|
36508
36572
|
var showEmptyStateIndicator = elements.length === 0 && !threadList;
|
|
36509
|
-
return (React__default["default"].createElement(
|
|
36573
|
+
return (React__default["default"].createElement(MessageListContextProvider, { value: { listElement: listElement, scrollToBottom: scrollToBottom } },
|
|
36510
36574
|
React__default["default"].createElement(MessageListMainPanel, null,
|
|
36511
36575
|
React__default["default"].createElement("div", { className: "".concat(messageListClass, " ").concat(threadListClass), onScroll: onScroll, ref: setListElement, tabIndex: 0 }, showEmptyStateIndicator ? (React__default["default"].createElement(EmptyStateIndicator$1, { key: 'empty-state-indicator', listType: threadList ? 'thread' : 'message' })) : (React__default["default"].createElement(InfiniteScroll, __assign({ className: 'str-chat__reverse-infinite-scroll str-chat__message-list-scroll', "data-testid": 'reverse-infinite-scroll', hasNextPage: props.hasMoreNewer, hasPreviousPage: props.hasMore, head: props.head, isLoading: props.loadingMore, loader: React__default["default"].createElement("div", { className: 'str-chat__list__loading', key: 'loading-indicator' }, props.loadingMore && React__default["default"].createElement(LoadingIndicator$1, { size: 20 })), loadNextPage: loadMoreNewer, loadPreviousPage: loadMore }, props.internalInfiniteScrollProps, { threshold: loadMoreScrollThreshold }),
|
|
36512
36576
|
React__default["default"].createElement("ul", { className: 'str-chat__ul', ref: setUlElement }, elements),
|
|
@@ -37244,6 +37308,8 @@ exports.MessageInputContextProvider = MessageInputContextProvider;
|
|
|
37244
37308
|
exports.MessageInputFlat = MessageInputFlat;
|
|
37245
37309
|
exports.MessageInputSmall = MessageInputSmall;
|
|
37246
37310
|
exports.MessageList = MessageList;
|
|
37311
|
+
exports.MessageListContext = MessageListContext;
|
|
37312
|
+
exports.MessageListContextProvider = MessageListContextProvider;
|
|
37247
37313
|
exports.MessageNotification = MessageNotification;
|
|
37248
37314
|
exports.MessageOptions = MessageOptions;
|
|
37249
37315
|
exports.MessageProvider = MessageProvider;
|
|
@@ -37330,6 +37396,7 @@ exports.handleActionWarning = handleActionWarning;
|
|
|
37330
37396
|
exports.hasMoreMessagesProbably = hasMoreMessagesProbably;
|
|
37331
37397
|
exports.hasNotMoreMessages = hasNotMoreMessages;
|
|
37332
37398
|
exports.hiTranslations = hiTranslations;
|
|
37399
|
+
exports.htmlToTextPlugin = htmlToTextPlugin;
|
|
37333
37400
|
exports.insertIntro = insertIntro;
|
|
37334
37401
|
exports.isAudioAttachment = isAudioAttachment;
|
|
37335
37402
|
exports.isChannel = isChannel;
|
|
@@ -37347,6 +37414,7 @@ exports.isUploadedImage = isUploadedImage;
|
|
|
37347
37414
|
exports.isUserMuted = isUserMuted;
|
|
37348
37415
|
exports.itTranslations = itTranslations;
|
|
37349
37416
|
exports.jaTranslations = jaTranslations;
|
|
37417
|
+
exports.keepLineBreaksPlugin = keepLineBreaksPlugin;
|
|
37350
37418
|
exports.koTranslations = koTranslations;
|
|
37351
37419
|
exports.makeDateMessageId = makeDateMessageId;
|
|
37352
37420
|
exports.mapToUserNameOrId = mapToUserNameOrId;
|
|
@@ -37403,6 +37471,7 @@ exports.useMentionsHandler = useMentionsHandler;
|
|
|
37403
37471
|
exports.useMessageContext = useMessageContext;
|
|
37404
37472
|
exports.useMessageInputContext = useMessageInputContext;
|
|
37405
37473
|
exports.useMessageInputState = useMessageInputState;
|
|
37474
|
+
exports.useMessageListContext = useMessageListContext;
|
|
37406
37475
|
exports.useMessageListElements = useMessageListElements;
|
|
37407
37476
|
exports.useMessageListScrollManager = useMessageListScrollManager;
|
|
37408
37477
|
exports.useMessageNewListener = useMessageNewListener;
|