stream-chat-react 11.1.2 → 11.2.1
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/browser.full-bundle.js +41 -36
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +2 -2
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/ChannelList/ChannelList.d.ts +2 -0
- package/dist/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/dist/components/ChannelList/ChannelList.js +2 -2
- package/dist/components/ChannelList/hooks/useMessageNewListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useMessageNewListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useMessageNewListener.js +16 -11
- package/dist/components/Emojis/index.cjs.js +1 -1
- package/dist/components/MessageInput/icons.js +4 -4
- package/dist/{icons-a35a8ee7.js → icons-b84cd102.js} +4 -4
- package/dist/index.cjs.js +20 -15
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -1
|
@@ -42452,14 +42452,14 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, streamChat, React
|
|
|
42452
42452
|
|
|
42453
42453
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
|
|
42454
42454
|
(function (module) {
|
|
42455
|
-
function _typeof(
|
|
42455
|
+
function _typeof(o) {
|
|
42456
42456
|
"@babel/helpers - typeof";
|
|
42457
42457
|
|
|
42458
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
42459
|
-
return typeof
|
|
42460
|
-
} : function (
|
|
42461
|
-
return
|
|
42462
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(
|
|
42458
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
42459
|
+
return typeof o;
|
|
42460
|
+
} : function (o) {
|
|
42461
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
42462
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
|
|
42463
42463
|
}
|
|
42464
42464
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
42465
42465
|
} (_typeof$1));
|
|
@@ -42469,28 +42469,28 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, streamChat, React
|
|
|
42469
42469
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
|
|
42470
42470
|
(function (module) {
|
|
42471
42471
|
var _typeof = _typeof$1.exports["default"];
|
|
42472
|
-
function
|
|
42473
|
-
if (
|
|
42474
|
-
var
|
|
42475
|
-
if (
|
|
42476
|
-
var
|
|
42477
|
-
if (
|
|
42472
|
+
function toPrimitive(t, r) {
|
|
42473
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
42474
|
+
var e = t[Symbol.toPrimitive];
|
|
42475
|
+
if (void 0 !== e) {
|
|
42476
|
+
var i = e.call(t, r || "default");
|
|
42477
|
+
if ("object" != _typeof(i)) return i;
|
|
42478
42478
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
42479
42479
|
}
|
|
42480
|
-
return (
|
|
42480
|
+
return ("string" === r ? String : Number)(t);
|
|
42481
42481
|
}
|
|
42482
|
-
module.exports =
|
|
42482
|
+
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
42483
42483
|
} (toPrimitive));
|
|
42484
42484
|
|
|
42485
42485
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
|
|
42486
42486
|
(function (module) {
|
|
42487
42487
|
var _typeof = _typeof$1.exports["default"];
|
|
42488
42488
|
var toPrimitive$1 = toPrimitive.exports;
|
|
42489
|
-
function
|
|
42490
|
-
var
|
|
42491
|
-
return _typeof(
|
|
42489
|
+
function toPropertyKey(t) {
|
|
42490
|
+
var i = toPrimitive$1(t, "string");
|
|
42491
|
+
return "symbol" == _typeof(i) ? i : String(i);
|
|
42492
42492
|
}
|
|
42493
|
-
module.exports =
|
|
42493
|
+
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
42494
42494
|
} (toPropertyKey));
|
|
42495
42495
|
|
|
42496
42496
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
|
|
@@ -47674,14 +47674,14 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, streamChat, React
|
|
|
47674
47674
|
|
|
47675
47675
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var EmojiIconLarge = function () {
|
|
47676
47676
|
var t = useTranslationContext('EmojiIconLarge').t;
|
|
47677
|
-
return (React__default["default"].createElement("svg", { height: '28', width: '28', xmlns: 'http://www.w3.org/2000/svg' },
|
|
47677
|
+
return (React__default["default"].createElement("svg", { height: '28', viewBox: '0 0 28 28', width: '28', xmlns: 'http://www.w3.org/2000/svg' },
|
|
47678
47678
|
React__default["default"].createElement("title", null, t('Open emoji picker')),
|
|
47679
47679
|
React__default["default"].createElement("g", { clipRule: 'evenodd', fillRule: 'evenodd' },
|
|
47680
47680
|
React__default["default"].createElement("path", { d: 'M14 4.4C8.6 4.4 4.4 8.6 4.4 14c0 5.4 4.2 9.6 9.6 9.6c5.4 0 9.6-4.2 9.6-9.6c0-5.4-4.2-9.6-9.6-9.6zM2 14c0-6.6 5.4-12 12-12s12 5.4 12 12s-5.4 12-12 12s-12-5.4-12-12zM12.8 11c0 1-.8 1.8-1.8 1.8s-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8s1.8.8 1.8 1.8zM18.8 11c0 1-.8 1.8-1.8 1.8s-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8s1.8.8 1.8 1.8zM8.6 15.4c.6-.4 1.2-.2 1.6.2c.6.8 1.6 1.8 3 2c1.2.4 2.8.2 4.8-2c.4-.4 1.2-.6 1.6 0c.4.4.6 1.2 0 1.6c-2.2 2.6-4.8 3.4-7 3c-2-.4-3.6-1.8-4.4-3c-.4-.6-.2-1.2.4-1.8z' }))));
|
|
47681
47681
|
};
|
|
47682
47682
|
var EmojiIconSmall = function () {
|
|
47683
47683
|
var t = useTranslationContext('EmojiIconSmall').t;
|
|
47684
|
-
return (React__default["default"].createElement("svg", { height: '14', width: '14', xmlns: 'http://www.w3.org/2000/svg' },
|
|
47684
|
+
return (React__default["default"].createElement("svg", { height: '14', viewBox: '0 0 14 14', width: '14', xmlns: 'http://www.w3.org/2000/svg' },
|
|
47685
47685
|
React__default["default"].createElement("title", null, t('Open emoji picker')),
|
|
47686
47686
|
React__default["default"].createElement("g", { clipRule: 'evenodd', fillRule: 'evenodd' },
|
|
47687
47687
|
React__default["default"].createElement("path", { d: 'M6.7 1.42C3.73 1.42 1.42 3.73 1.42 6.7c0 2.97 2.31 5.28 5.28 5.28c2.97 0 5.28-2.31 5.28-5.28c0-2.97-2.31-5.28-5.28-5.28zM.1 6.7c0-3.63 2.97-6.6 6.6-6.6s6.6 2.97 6.6 6.6s-2.97 6.6-6.6 6.6s-6.6-2.97-6.6-6.6zM6.04 5.05c0 .55-.44.99-.99.99s-.99-.44-.99-.99s.44-.99.99-.99s.99.44.99.99zM9.34 5.05c0 .55-.44.99-.99.99s-.99-.44-.99-.99s.44-.99.99-.99s.99.44.99.99zM3.73 7.47c.33-.22.66-.11.88.11c.33.44.88.99 1.65 1.1c.66.22 1.54.11 2.64-1.1c.22-.22.66-.33.88 0c.22.22.33.66 0 .88c-1.21 1.43-2.64 1.87-3.85 1.65c-1.1-.22-1.98-.99-2.42-1.65c-.22-.33-.11-.66.22-.99z' }))));
|
|
@@ -47692,13 +47692,13 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, streamChat, React
|
|
|
47692
47692
|
React__default["default"].createElement("path", { d: 'M14 4.4C8.6 4.4 4.4 8.6 4.4 14c0 5.4 4.2 9.6 9.6 9.6c5.4 0 9.6-4.2 9.6-9.6c0-5.4-4.2-9.6-9.6-9.6zM2 14c0-6.6 5.4-12 12-12s12 5.4 12 12s-5.4 12-12 12s-12-5.4-12-12zM12.8 11c0 1-.8 1.8-1.8 1.8s-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8s1.8.8 1.8 1.8zM18.8 11c0 1-.8 1.8-1.8 1.8s-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8s1.8.8 1.8 1.8zM8.6 15.4c.6-.4 1.2-.2 1.6.2c.6.8 1.6 1.8 3 2c1.2.4 2.8.2 4.8-2c.4-.4 1.2-.6 1.6 0c.4.4.6 1.2 0 1.6c-2.2 2.6-4.8 3.4-7 3c-2-.4-3.6-1.8-4.4-3c-.4-.6-.2-1.2.4-1.8z' })))); };
|
|
47693
47693
|
var FileUploadIcon = function () {
|
|
47694
47694
|
var t = useTranslationContext('FileUploadIcon').t;
|
|
47695
|
-
return (React__default["default"].createElement("svg", { height: '14', width: '14', xmlns: 'http://www.w3.org/2000/svg' },
|
|
47695
|
+
return (React__default["default"].createElement("svg", { height: '14', viewBox: '0 0 14 14', width: '14', xmlns: 'http://www.w3.org/2000/svg' },
|
|
47696
47696
|
React__default["default"].createElement("title", null, t('Attach files')),
|
|
47697
47697
|
React__default["default"].createElement("path", { d: 'M7 .5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5S.5 10.59.5 7 3.41.5 7 .5zm0 12c3.031 0 5.5-2.469 5.5-5.5S10.031 1.5 7 1.5A5.506 5.506 0 0 0 1.5 7c0 3.034 2.469 5.5 5.5 5.5zM7.506 3v3.494H11v1.05H7.506V11h-1.05V7.544H3v-1.05h3.456V3h1.05z', fillRule: 'nonzero' })));
|
|
47698
47698
|
};
|
|
47699
47699
|
var FileUploadIconFlat = function () {
|
|
47700
47700
|
var t = useTranslationContext('FileUploadIconFlat').t;
|
|
47701
|
-
return (React__default["default"].createElement("svg", { height: '14', width: '14', xmlns: 'http://www.w3.org/2000/svg' },
|
|
47701
|
+
return (React__default["default"].createElement("svg", { height: '14', viewBox: '0 0 14 14', width: '14', xmlns: 'http://www.w3.org/2000/svg' },
|
|
47702
47702
|
React__default["default"].createElement("title", null, t('Attach files')),
|
|
47703
47703
|
React__default["default"].createElement("path", { d: 'M1.667.333h10.666c.737 0 1.334.597 1.334 1.334v10.666c0 .737-.597 1.334-1.334 1.334H1.667a1.333 1.333 0 0 1-1.334-1.334V1.667C.333.93.93.333 1.667.333zm2 1.334a1.667 1.667 0 1 0 0 3.333 1.667 1.667 0 0 0 0-3.333zm-2 9.333v1.333h10.666v-4l-2-2-4 4-2-2L1.667 11z', fillRule: 'nonzero' })));
|
|
47704
47704
|
};
|
|
@@ -51437,22 +51437,27 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, streamChat, React
|
|
|
51437
51437
|
return uniqBy(__spreadArray([channel], channels, true), 'cid');
|
|
51438
51438
|
};
|
|
51439
51439
|
|
|
51440
|
-
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useMessageNewListener = function (setChannels, lockChannelOrder, allowNewMessagesFromUnfilteredChannels) {
|
|
51440
|
+
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useMessageNewListener = function (setChannels, customHandler, lockChannelOrder, allowNewMessagesFromUnfilteredChannels) {
|
|
51441
51441
|
if (lockChannelOrder === void 0) { lockChannelOrder = false; }
|
|
51442
51442
|
if (allowNewMessagesFromUnfilteredChannels === void 0) { allowNewMessagesFromUnfilteredChannels = true; }
|
|
51443
51443
|
var client = useChatContext('useMessageNewListener').client;
|
|
51444
51444
|
React$2.useEffect(function () {
|
|
51445
51445
|
var handleEvent = function (event) {
|
|
51446
|
-
|
|
51447
|
-
|
|
51448
|
-
|
|
51449
|
-
|
|
51450
|
-
|
|
51451
|
-
|
|
51452
|
-
|
|
51453
|
-
|
|
51454
|
-
|
|
51455
|
-
|
|
51446
|
+
if (customHandler && typeof customHandler === 'function') {
|
|
51447
|
+
customHandler(setChannels, event);
|
|
51448
|
+
}
|
|
51449
|
+
else {
|
|
51450
|
+
setChannels(function (channels) {
|
|
51451
|
+
var channelInList = channels.filter(function (channel) { return channel.cid === event.cid; }).length > 0;
|
|
51452
|
+
if (!channelInList && allowNewMessagesFromUnfilteredChannels && event.channel_type) {
|
|
51453
|
+
var channel = client.channel(event.channel_type, event.channel_id);
|
|
51454
|
+
return uniqBy(__spreadArray([channel], channels, true), 'cid');
|
|
51455
|
+
}
|
|
51456
|
+
if (!lockChannelOrder)
|
|
51457
|
+
return moveChannelUp({ channels: channels, cid: event.cid || '' });
|
|
51458
|
+
return channels;
|
|
51459
|
+
});
|
|
51460
|
+
}
|
|
51456
51461
|
};
|
|
51457
51462
|
client.on('message.new', handleEvent);
|
|
51458
51463
|
return function () {
|
|
@@ -52296,7 +52301,7 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, streamChat, React
|
|
|
52296
52301
|
var DEFAULT_SORT = {};
|
|
52297
52302
|
var UnMemoizedChannelList = function (props) {
|
|
52298
52303
|
var _a, _b;
|
|
52299
|
-
var additionalChannelSearchProps = props.additionalChannelSearchProps, _c = props.Avatar, Avatar$1 = _c === void 0 ? Avatar : _c, allowNewMessagesFromUnfilteredChannels = props.allowNewMessagesFromUnfilteredChannels, channelRenderFilterFn = props.channelRenderFilterFn, _d = props.ChannelSearch, ChannelSearch$1 = _d === void 0 ? ChannelSearch : _d, customActiveChannel = props.customActiveChannel, _e = props.EmptyStateIndicator, EmptyStateIndicator$1 = _e === void 0 ? EmptyStateIndicator : _e, filters = props.filters, _f = props.LoadingErrorIndicator, LoadingErrorIndicator = _f === void 0 ? ChatDown : _f, _g = props.LoadingIndicator, LoadingIndicator = _g === void 0 ? LoadingChannels : _g, _h = props.List, List = _h === void 0 ? ChannelListMessenger : _h, lockChannelOrder = props.lockChannelOrder, onAddedToChannel = props.onAddedToChannel, onChannelDeleted = props.onChannelDeleted, onChannelHidden = props.onChannelHidden, onChannelTruncated = props.onChannelTruncated, onChannelUpdated = props.onChannelUpdated, onChannelVisible = props.onChannelVisible, onMessageNew = props.onMessageNew, onRemovedFromChannel = props.onRemovedFromChannel, options = props.options, _j = props.Paginator, Paginator = _j === void 0 ? LoadMorePaginator : _j, Preview = props.Preview, recoveryThrottleIntervalMs = props.recoveryThrottleIntervalMs, renderChannels = props.renderChannels, _k = props.sendChannelsToList, sendChannelsToList = _k === void 0 ? false : _k, _l = props.setActiveChannelOnMount, setActiveChannelOnMount = _l === void 0 ? true : _l, _m = props.showChannelSearch, showChannelSearch = _m === void 0 ? false : _m, _o = props.sort, sort = _o === void 0 ? DEFAULT_SORT : _o, _p = props.watchers, watchers = _p === void 0 ? {} : _p;
|
|
52304
|
+
var additionalChannelSearchProps = props.additionalChannelSearchProps, _c = props.Avatar, Avatar$1 = _c === void 0 ? Avatar : _c, allowNewMessagesFromUnfilteredChannels = props.allowNewMessagesFromUnfilteredChannels, channelRenderFilterFn = props.channelRenderFilterFn, _d = props.ChannelSearch, ChannelSearch$1 = _d === void 0 ? ChannelSearch : _d, customActiveChannel = props.customActiveChannel, _e = props.EmptyStateIndicator, EmptyStateIndicator$1 = _e === void 0 ? EmptyStateIndicator : _e, filters = props.filters, _f = props.LoadingErrorIndicator, LoadingErrorIndicator = _f === void 0 ? ChatDown : _f, _g = props.LoadingIndicator, LoadingIndicator = _g === void 0 ? LoadingChannels : _g, _h = props.List, List = _h === void 0 ? ChannelListMessenger : _h, lockChannelOrder = props.lockChannelOrder, onAddedToChannel = props.onAddedToChannel, onChannelDeleted = props.onChannelDeleted, onChannelHidden = props.onChannelHidden, onChannelTruncated = props.onChannelTruncated, onChannelUpdated = props.onChannelUpdated, onChannelVisible = props.onChannelVisible, onMessageNew = props.onMessageNew, onMessageNewHandler = props.onMessageNewHandler, onRemovedFromChannel = props.onRemovedFromChannel, options = props.options, _j = props.Paginator, Paginator = _j === void 0 ? LoadMorePaginator : _j, Preview = props.Preview, recoveryThrottleIntervalMs = props.recoveryThrottleIntervalMs, renderChannels = props.renderChannels, _k = props.sendChannelsToList, sendChannelsToList = _k === void 0 ? false : _k, _l = props.setActiveChannelOnMount, setActiveChannelOnMount = _l === void 0 ? true : _l, _m = props.showChannelSearch, showChannelSearch = _m === void 0 ? false : _m, _o = props.sort, sort = _o === void 0 ? DEFAULT_SORT : _o, _p = props.watchers, watchers = _p === void 0 ? {} : _p;
|
|
52300
52305
|
var _q = useChatContext('ChannelList'), channel = _q.channel, channelsQueryState = _q.channelsQueryState, client = _q.client, closeMobileNav = _q.closeMobileNav, customClasses = _q.customClasses, _r = _q.navOpen, navOpen = _r === void 0 ? false : _r, setActiveChannel = _q.setActiveChannel, theme = _q.theme, useImageFlagEmojisOnWindows = _q.useImageFlagEmojisOnWindows;
|
|
52301
52306
|
var channelListRef = React$2.useRef(null);
|
|
52302
52307
|
var _s = React$2.useState(0), channelUpdateCount = _s[0], setChannelUpdateCount = _s[1];
|
|
@@ -52363,7 +52368,7 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, streamChat, React
|
|
|
52363
52368
|
var _u = usePaginatedChannels(client, filters || DEFAULT_FILTERS, sort || DEFAULT_SORT, options || DEFAULT_OPTIONS, activeChannelHandler, recoveryThrottleIntervalMs), channels = _u.channels, hasNextPage = _u.hasNextPage, loadNextPage = _u.loadNextPage, setChannels = _u.setChannels;
|
|
52364
52369
|
var loadedChannels = channelRenderFilterFn ? channelRenderFilterFn(channels) : channels;
|
|
52365
52370
|
useMobileNavigation(channelListRef, navOpen, closeMobileNav);
|
|
52366
|
-
useMessageNewListener(setChannels, lockChannelOrder, allowNewMessagesFromUnfilteredChannels);
|
|
52371
|
+
useMessageNewListener(setChannels, onMessageNewHandler, lockChannelOrder, allowNewMessagesFromUnfilteredChannels);
|
|
52367
52372
|
useNotificationMessageNewListener(setChannels, onMessageNew, allowNewMessagesFromUnfilteredChannels);
|
|
52368
52373
|
useNotificationAddedToChannelListener(setChannels, onAddedToChannel, allowNewMessagesFromUnfilteredChannels);
|
|
52369
52374
|
useNotificationRemovedFromChannelListener(setChannels, onRemovedFromChannel);
|
|
@@ -52425,7 +52430,7 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, streamChat, React
|
|
|
52425
52430
|
|
|
52426
52431
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
|
|
52427
52432
|
|
|
52428
|
-
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '11.1
|
|
52433
|
+
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '11.2.1';
|
|
52429
52434
|
|
|
52430
52435
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useChat = function (_a) {
|
|
52431
52436
|
var _b, _c;
|