stream-chat-react 8.1.0 → 8.1.3-beta.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 +50256 -51289
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +6 -5
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/Attachment/Card.d.ts +2 -2
- package/dist/components/Attachment/Card.d.ts.map +1 -1
- package/dist/components/Attachment/utils.d.ts.map +1 -1
- package/dist/components/Attachment/utils.js +2 -1
- package/dist/components/AutoCompleteTextarea/Header.d.ts +1 -2
- package/dist/components/AutoCompleteTextarea/Header.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/Item.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/List.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/List.js +3 -5
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts +1 -3
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/Textarea.js +9 -37
- package/dist/components/AutoCompleteTextarea/index.d.ts +0 -1
- package/dist/components/AutoCompleteTextarea/index.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/index.js +0 -1
- package/dist/components/Channel/Channel.d.ts.map +1 -1
- package/dist/components/Channel/Channel.js +6 -13
- package/dist/components/Channel/hooks/useIsMounted.js +7 -4
- package/dist/components/ChannelHeader/ChannelHeader.d.ts.map +1 -1
- package/dist/components/ChannelHeader/ChannelHeader.js +1 -1
- package/dist/components/ChannelSearch/SearchResults.d.ts.map +1 -1
- package/dist/components/Chat/hooks/useChat.d.ts.map +1 -1
- package/dist/components/Chat/hooks/useChat.js +2 -3
- package/dist/components/ChatDown/ChatDown.d.ts +5 -5
- package/dist/components/ChatDown/ChatDown.d.ts.map +1 -1
- package/dist/components/ChatDown/ChatDown.js +4 -4
- package/dist/components/ChatDown/icons.d.ts +2 -0
- package/dist/components/ChatDown/icons.d.ts.map +1 -0
- package/dist/components/ChatDown/icons.js +7 -0
- package/dist/components/CommandItem/CommandItem.d.ts +2 -2
- package/dist/components/CommandItem/CommandItem.d.ts.map +1 -1
- package/dist/components/DateSeparator/DateSeparator.d.ts +1 -1
- package/dist/components/DateSeparator/DateSeparator.d.ts.map +1 -1
- package/dist/components/DateSeparator/DateSeparator.js +9 -10
- package/dist/components/EmoticonItem/EmoticonItem.d.ts +1 -2
- package/dist/components/EmoticonItem/EmoticonItem.d.ts.map +1 -1
- package/dist/components/EmptyStateIndicator/EmptyStateIndicator.d.ts +1 -2
- package/dist/components/EmptyStateIndicator/EmptyStateIndicator.d.ts.map +1 -1
- package/dist/components/EventComponent/EventComponent.d.ts.map +1 -1
- package/dist/components/EventComponent/EventComponent.js +17 -9
- package/dist/components/Gallery/Gallery.d.ts.map +1 -1
- package/dist/components/Gallery/Gallery.js +11 -8
- package/dist/components/Gallery/Image.d.ts +1 -2
- package/dist/components/Gallery/Image.d.ts.map +1 -1
- package/dist/components/Gallery/ModalWrapper.d.ts +1 -1
- package/dist/components/Gallery/ModalWrapper.d.ts.map +1 -1
- package/dist/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +2 -2
- package/dist/components/InfiniteScrollPaginator/InfiniteScroll.d.ts.map +1 -1
- package/dist/components/LoadMore/LoadMoreButton.d.ts +2 -2
- package/dist/components/LoadMore/LoadMoreButton.d.ts.map +1 -1
- package/dist/components/LoadMore/LoadMorePaginator.d.ts +3 -3
- package/dist/components/LoadMore/LoadMorePaginator.d.ts.map +1 -1
- package/dist/components/Loading/LoadingChannels.d.ts +1 -1
- package/dist/components/Loading/LoadingChannels.d.ts.map +1 -1
- package/dist/components/Loading/LoadingErrorIndicator.d.ts +1 -2
- package/dist/components/Loading/LoadingErrorIndicator.d.ts.map +1 -1
- package/dist/components/Loading/LoadingErrorIndicator.js +1 -1
- package/dist/components/Loading/LoadingIndicator.d.ts +1 -2
- package/dist/components/Loading/LoadingIndicator.d.ts.map +1 -1
- package/dist/components/MML/MML.d.ts +1 -2
- package/dist/components/MML/MML.d.ts.map +1 -1
- package/dist/components/Message/MessageCommerce.d.ts.map +1 -1
- package/dist/components/Message/MessageCommerce.js +2 -1
- package/dist/components/Message/MessageDeleted.d.ts.map +1 -1
- package/dist/components/Message/MessageLivestream.d.ts.map +1 -1
- package/dist/components/Message/MessageLivestream.js +2 -1
- package/dist/components/Message/MessageRepliesCountButton.d.ts +3 -4
- package/dist/components/Message/MessageRepliesCountButton.d.ts.map +1 -1
- package/dist/components/Message/MessageSimple.d.ts.map +1 -1
- package/dist/components/Message/MessageSimple.js +2 -1
- package/dist/components/Message/MessageText.d.ts.map +1 -1
- package/dist/components/Message/MessageTimestamp.d.ts +0 -2
- package/dist/components/Message/MessageTimestamp.d.ts.map +1 -1
- package/dist/components/Message/MessageTimestamp.js +7 -34
- package/dist/components/Message/hooks/usePinHandler.d.ts +1 -1
- package/dist/components/Message/hooks/usePinHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/usePinHandler.js +3 -3
- package/dist/components/MessageActions/MessageActions.d.ts.map +1 -1
- package/dist/components/MessageInput/EditMessageForm.d.ts.map +1 -1
- package/dist/components/MessageInput/EditMessageForm.js +1 -2
- package/dist/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInput.js +1 -5
- package/dist/components/MessageInput/MessageInputFlat.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInputFlat.js +3 -1
- package/dist/components/MessageInput/MessageInputSmall.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInputSmall.js +3 -1
- package/dist/components/MessageInput/QuotedMessagePreview.d.ts.map +1 -1
- package/dist/components/MessageInput/QuotedMessagePreview.js +4 -6
- package/dist/components/MessageInput/hooks/useAttachments.d.ts +4 -4
- package/dist/components/MessageInput/hooks/useCooldownTimer.d.ts +1 -1
- package/dist/components/MessageInput/hooks/useCooldownTimer.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useFileUploads.d.ts +2 -2
- package/dist/components/MessageInput/hooks/useFileUploads.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useImageUploads.d.ts +2 -2
- package/dist/components/MessageInput/hooks/useImageUploads.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useMessageInputState.d.ts +1 -1
- package/dist/components/MessageInput/hooks/useMessageInputState.d.ts.map +1 -1
- package/dist/components/MessageInput/icons.d.ts +4 -4
- package/dist/components/MessageInput/icons.d.ts.map +1 -1
- package/dist/components/MessageList/Center.d.ts +2 -4
- package/dist/components/MessageList/Center.d.ts.map +1 -1
- package/dist/components/MessageList/ConnectionStatus.d.ts +2 -1
- package/dist/components/MessageList/ConnectionStatus.d.ts.map +1 -1
- package/dist/components/MessageList/CustomNotification.d.ts +2 -2
- package/dist/components/MessageList/CustomNotification.d.ts.map +1 -1
- package/dist/components/MessageList/MessageNotification.d.ts +2 -1
- package/dist/components/MessageList/MessageNotification.d.ts.map +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +2 -1
- package/dist/components/MessageList/hooks/useMessageListElements.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useMessageListElements.js +5 -2
- package/dist/components/MessageList/utils.d.ts +1 -0
- package/dist/components/MessageList/utils.d.ts.map +1 -1
- package/dist/components/MessageList/utils.js +27 -13
- package/dist/components/Modal/Modal.d.ts +2 -2
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Reactions/ReactionSelector.d.ts.map +1 -1
- package/dist/components/Reactions/ReactionSelector.js +1 -1
- package/dist/components/SafeAnchor/SafeAnchor.d.ts +2 -2
- package/dist/components/SafeAnchor/SafeAnchor.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/UserItem/UserItem.d.ts +1 -1
- package/dist/components/UserItem/UserItem.d.ts.map +1 -1
- package/dist/constants/messageTypes.d.ts +5 -0
- package/dist/constants/messageTypes.d.ts.map +1 -0
- package/dist/constants/messageTypes.js +4 -0
- package/dist/context/ChannelActionContext.d.ts +4 -1
- package/dist/context/ChannelActionContext.d.ts.map +1 -1
- package/dist/context/ChannelStateContext.d.ts +4 -1
- package/dist/context/ChannelStateContext.d.ts.map +1 -1
- package/dist/context/ChatContext.d.ts +4 -1
- package/dist/context/ChatContext.d.ts.map +1 -1
- package/dist/context/ComponentContext.d.ts +4 -1
- package/dist/context/ComponentContext.d.ts.map +1 -1
- package/dist/context/EmojiContext.d.ts +4 -1
- package/dist/context/EmojiContext.d.ts.map +1 -1
- package/dist/context/MessageContext.d.ts +4 -1
- package/dist/context/MessageContext.d.ts.map +1 -1
- package/dist/context/TranslationContext.d.ts +9 -5
- package/dist/context/TranslationContext.d.ts.map +1 -1
- package/dist/context/TranslationContext.js +6 -8
- package/dist/context/TypingContext.d.ts +4 -1
- package/dist/context/TypingContext.d.ts.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/i18n/Streami18n.d.ts +1 -0
- package/dist/i18n/Streami18n.d.ts.map +1 -1
- package/dist/i18n/Streami18n.js +3 -2
- package/dist/i18n/utils.d.ts +13 -0
- package/dist/i18n/utils.d.ts.map +1 -0
- package/dist/i18n/utils.js +33 -0
- package/dist/index.cjs.js +6980 -7099
- package/dist/index.cjs.js.map +1 -1
- package/dist/scss/ActionsBox.scss +2 -2
- package/dist/scss/Attachment.scss +1 -1
- package/dist/scss/ChannelList.scss +6 -0
- package/dist/scss/ChannelSearch.scss +12 -1
- package/dist/scss/Message.scss +86 -80
- package/dist/scss/MessageInput.scss +8 -2
- package/dist/scss/MessageInputFlat.scss +4 -0
- package/dist/scss/MessageNotification.scss +6 -18
- package/dist/scss/Thread.scss +20 -4
- package/dist/scss/_base.scss +4 -0
- package/dist/stories/connected-user.stories.d.ts.map +1 -1
- package/dist/stories/connected-user.stories.js +13 -41
- package/dist/stories/hello.stories.d.ts.map +1 -1
- package/dist/stories/hello.stories.js +11 -35
- package/dist/stories/jump-to-message.stories.d.ts +2 -2
- package/dist/stories/jump-to-message.stories.d.ts.map +1 -1
- package/dist/stories/jump-to-message.stories.js +20 -50
- package/dist/stories/mark-read.stories.d.ts +4 -0
- package/dist/stories/mark-read.stories.d.ts.map +1 -0
- package/dist/stories/mark-read.stories.js +75 -0
- package/dist/stories/utils.d.ts +7 -0
- package/dist/stories/utils.d.ts.map +1 -1
- package/dist/stories/utils.js +33 -0
- package/dist/types/types.d.ts +4 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +28 -23
- package/dist/assets/str-chat__alert.svg +0 -1
- package/dist/assets/str-chat__connection-error.svg +0 -13
- package/dist/assets/str-chat__file-file.svg +0 -20
- package/dist/assets/str-chat__icon-chevron-down.svg +0 -1
- package/dist/assets/str-chat__icon-search.svg +0 -1
- package/dist/assets/str-chat__icon-send.svg +0 -1
- package/dist/assets/str-chat__icon-sprite.png +0 -0
- package/dist/assets/str-chat__icon-sprite@1x.png +0 -0
- package/dist/assets/str-chat__icon-sprite@2x.png +0 -0
- package/dist/assets/str-chat__icon-sprite@3x.png +0 -0
- package/dist/assets/str-chat__loading-indicator.svg +0 -23
- package/dist/assets/str-chat__reactions-sprite@1x.png +0 -0
- package/dist/assets/str-chat__reactions-sprite@2x.png +0 -0
- package/dist/assets/str-chat__reactions-sprite@3x.png +0 -0
- package/dist/components/AutoCompleteTextarea/listener.d.ts +0 -22
- package/dist/components/AutoCompleteTextarea/listener.d.ts.map +0 -1
- package/dist/components/AutoCompleteTextarea/listener.js +0 -77
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import '@stream-io/stream-chat-css/dist/css/index.css';
|
|
3
|
-
import React
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { apiKey } from './utils';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Channel, ChannelHeader, ChannelList, MessageList, useChannelStateContext, Window, } from '../index';
|
|
5
|
+
import { ConnectedUser } from './utils';
|
|
7
6
|
var channelId = import.meta.env.E2E_ADD_MESSAGE_CHANNEL;
|
|
8
7
|
if (!channelId || typeof channelId !== 'string') {
|
|
9
8
|
throw new Error('expected ADD_MESSAGE_CHANNEL');
|
|
@@ -20,42 +19,15 @@ var Controls = function () {
|
|
|
20
19
|
};
|
|
21
20
|
// Sort in reverse order to avoid auto-selecting unread channel
|
|
22
21
|
var sort = { last_updated: 1 };
|
|
23
|
-
var
|
|
24
|
-
// wait for disconnect to happen since there's only one shared
|
|
25
|
-
// client and two separate Chat components using it to prevent crashes
|
|
26
|
-
var sharedPromise = Promise.resolve();
|
|
27
|
-
var ConnectedUser = function (_a) {
|
|
22
|
+
var WrappedConnectedUser = function (_a) {
|
|
28
23
|
var token = _a.token, userId = _a.userId;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
chatClient.on('connection.changed', handleConnectionChange);
|
|
37
|
-
return function () {
|
|
38
|
-
chatClient.off('connection.changed', handleConnectionChange);
|
|
39
|
-
sharedPromise = chatClient.disconnectUser();
|
|
40
|
-
};
|
|
41
|
-
}, []);
|
|
42
|
-
if (!connected) {
|
|
43
|
-
return React.createElement("p", null,
|
|
44
|
-
"Connecting ",
|
|
45
|
-
userId,
|
|
46
|
-
"...");
|
|
47
|
-
}
|
|
48
|
-
return (React.createElement(React.Fragment, null,
|
|
49
|
-
React.createElement("h3", null,
|
|
50
|
-
"User: ",
|
|
51
|
-
userId),
|
|
52
|
-
React.createElement(Chat, { client: chatClient },
|
|
53
|
-
React.createElement(ChannelList, { filters: { members: { $in: [userId] } }, sort: sort }),
|
|
54
|
-
React.createElement(Channel, null,
|
|
55
|
-
React.createElement(Window, null,
|
|
56
|
-
React.createElement(ChannelHeader, null),
|
|
57
|
-
React.createElement(MessageList, null),
|
|
58
|
-
React.createElement(Controls, null))))));
|
|
24
|
+
return (React.createElement(ConnectedUser, { token: token, userId: userId },
|
|
25
|
+
React.createElement(ChannelList, { filters: { members: { $in: [userId] } }, sort: sort }),
|
|
26
|
+
React.createElement(Channel, null,
|
|
27
|
+
React.createElement(Window, null,
|
|
28
|
+
React.createElement(ChannelHeader, null),
|
|
29
|
+
React.createElement(MessageList, null),
|
|
30
|
+
React.createElement(Controls, null)))));
|
|
59
31
|
};
|
|
60
32
|
export var User1 = function () {
|
|
61
33
|
var userId = import.meta.env.E2E_TEST_USER_1;
|
|
@@ -66,7 +38,7 @@ export var User1 = function () {
|
|
|
66
38
|
if (!token || typeof token !== 'string') {
|
|
67
39
|
throw new Error('expected TEST_USER_1_TOKEN');
|
|
68
40
|
}
|
|
69
|
-
return React.createElement(
|
|
41
|
+
return React.createElement(WrappedConnectedUser, { token: token, userId: userId });
|
|
70
42
|
};
|
|
71
43
|
export var User2 = function () {
|
|
72
44
|
var userId = import.meta.env.E2E_TEST_USER_2;
|
|
@@ -77,5 +49,5 @@ export var User2 = function () {
|
|
|
77
49
|
if (!token || typeof token !== 'string') {
|
|
78
50
|
throw new Error('expected TEST_USER_2_TOKEN');
|
|
79
51
|
}
|
|
80
|
-
return React.createElement(
|
|
52
|
+
return React.createElement(WrappedConnectedUser, { token: token, userId: userId });
|
|
81
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hello.stories.d.ts","sourceRoot":"","sources":["../../src/stories/hello.stories.tsx"],"names":[],"mappings":"AACA,OAAO,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"hello.stories.d.ts","sourceRoot":"","sources":["../../src/stories/hello.stories.tsx"],"names":[],"mappings":"AACA,OAAO,+CAA+C,CAAC;AA2BvD,eAAO,MAAM,UAAU,mBAYtB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import '@stream-io/stream-chat-css/dist/css/index.css';
|
|
3
|
-
import React
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { apiKey } from './utils';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Channel, ChannelHeader, ChannelList, MessageInput, MessageList, Thread, Window, } from '../index';
|
|
5
|
+
import { ConnectedUser } from './utils';
|
|
7
6
|
var channelId = import.meta.env.E2E_ADD_MESSAGE_CHANNEL;
|
|
8
7
|
var userId = import.meta.env.E2E_TEST_USER_1;
|
|
9
8
|
var token = import.meta.env.E2E_TEST_USER_1_TOKEN;
|
|
@@ -14,34 +13,11 @@ if (!channelId || typeof channelId !== 'string') {
|
|
|
14
13
|
var sort = { last_updated: 1 };
|
|
15
14
|
var filters = { members: { $in: [userId] }, type: 'messaging' };
|
|
16
15
|
var options = { limit: 10, presence: true, state: true };
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
setConnected(online);
|
|
26
|
-
};
|
|
27
|
-
chatClient.on('connection.changed', handleConnectionChange);
|
|
28
|
-
return function () {
|
|
29
|
-
chatClient.off('connection.changed', handleConnectionChange);
|
|
30
|
-
sharedPromise = chatClient.disconnectUser();
|
|
31
|
-
};
|
|
32
|
-
}, []);
|
|
33
|
-
if (!connected) {
|
|
34
|
-
return React.createElement("p", null,
|
|
35
|
-
"Connecting ",
|
|
36
|
-
userId,
|
|
37
|
-
"...");
|
|
38
|
-
}
|
|
39
|
-
return (React.createElement(Chat, { client: chatClient },
|
|
40
|
-
React.createElement(ChannelList, { filters: filters, options: options, showChannelSearch: true, sort: sort }),
|
|
41
|
-
React.createElement(Channel, null,
|
|
42
|
-
React.createElement(Window, null,
|
|
43
|
-
React.createElement(ChannelHeader, null),
|
|
44
|
-
React.createElement(MessageList, null),
|
|
45
|
-
React.createElement(MessageInput, { focus: true })),
|
|
46
|
-
React.createElement(Thread, null))));
|
|
47
|
-
};
|
|
16
|
+
export var BasicSetup = function () { return (React.createElement(ConnectedUser, { token: token, userId: userId },
|
|
17
|
+
React.createElement(ChannelList, { filters: filters, options: options, showChannelSearch: true, sort: sort }),
|
|
18
|
+
React.createElement(Channel, null,
|
|
19
|
+
React.createElement(Window, null,
|
|
20
|
+
React.createElement(ChannelHeader, null),
|
|
21
|
+
React.createElement(MessageList, null),
|
|
22
|
+
React.createElement(MessageInput, { focus: true })),
|
|
23
|
+
React.createElement(Thread, null)))); };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@stream-io/stream-chat-css/dist/css/index.css';
|
|
2
|
-
export declare const JumpInRegularMessageList: () => JSX.Element
|
|
3
|
-
export declare const JumpInVirtualizedMessageList: () => JSX.Element
|
|
2
|
+
export declare const JumpInRegularMessageList: () => JSX.Element;
|
|
3
|
+
export declare const JumpInVirtualizedMessageList: () => JSX.Element;
|
|
4
4
|
//# sourceMappingURL=jump-to-message.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-to-message.stories.d.ts","sourceRoot":"","sources":["../../src/stories/jump-to-message.stories.tsx"],"names":[],"mappings":"AAWA,OAAO,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"jump-to-message.stories.d.ts","sourceRoot":"","sources":["../../src/stories/jump-to-message.stories.tsx"],"names":[],"mappings":"AAWA,OAAO,+CAA+C,CAAC;AA0CvD,eAAO,MAAM,wBAAwB,mBAapC,CAAC;AAEF,eAAO,MAAM,4BAA4B,mBAaxC,CAAC"}
|
|
@@ -35,20 +35,18 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
38
|
-
import React
|
|
39
|
-
import {
|
|
40
|
-
import { Channel, Chat, MessageList, useChannelActionContext, VirtualizedMessageList, Window, } from '../index';
|
|
38
|
+
import React from 'react';
|
|
39
|
+
import { Channel, ChannelList, MessageList, useChannelActionContext, useChatContext, VirtualizedMessageList, Window, } from '../index';
|
|
41
40
|
import '@stream-io/stream-chat-css/dist/css/index.css';
|
|
41
|
+
import { ConnectedUser } from './utils';
|
|
42
42
|
void MessageList;
|
|
43
43
|
void VirtualizedMessageList;
|
|
44
|
-
var apiKey = import.meta.env.E2E_APP_KEY;
|
|
45
44
|
var userId = import.meta.env.E2E_TEST_USER_1;
|
|
46
45
|
var userToken = import.meta.env.E2E_TEST_USER_1_TOKEN;
|
|
47
46
|
var channelId = import.meta.env.E2E_JUMP_TO_MESSAGE_CHANNEL;
|
|
48
|
-
var chatClient = StreamChat.getInstance(apiKey);
|
|
49
|
-
chatClient.connectUser({ id: userId }, userToken);
|
|
50
47
|
var JumpToMessage = function () {
|
|
51
48
|
var jumpToMessage = useChannelActionContext().jumpToMessage;
|
|
49
|
+
var chatClient = useChatContext().client;
|
|
52
50
|
return (React.createElement("button", { "data-testid": 'jump-to-message', onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
53
51
|
var results;
|
|
54
52
|
return __generator(this, function (_a) {
|
|
@@ -65,47 +63,19 @@ var JumpToMessage = function () {
|
|
|
65
63
|
}); } }, "Jump to message '29'"));
|
|
66
64
|
};
|
|
67
65
|
var StyleFix = function () { return (React.createElement("style", null, "\n .str-chat {\n height: 700px\n }\n ")); };
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return channel;
|
|
85
|
-
};
|
|
86
|
-
export var JumpInRegularMessageList = function () {
|
|
87
|
-
var channel = useTheJumpChannel();
|
|
88
|
-
if (!channel) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
return (React.createElement("div", null,
|
|
92
|
-
React.createElement(StyleFix, null),
|
|
93
|
-
React.createElement(Chat, { client: chatClient },
|
|
94
|
-
React.createElement(Channel, { channel: channel },
|
|
95
|
-
React.createElement(JumpToMessage, null),
|
|
96
|
-
React.createElement(Window, null,
|
|
97
|
-
React.createElement(MessageList, null))))));
|
|
98
|
-
};
|
|
99
|
-
export var JumpInVirtualizedMessageList = function () {
|
|
100
|
-
var channel = useTheJumpChannel();
|
|
101
|
-
if (!channel) {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
return (React.createElement("div", null,
|
|
105
|
-
React.createElement(StyleFix, null),
|
|
106
|
-
React.createElement(Chat, { client: chatClient },
|
|
107
|
-
React.createElement(Channel, { channel: channel },
|
|
108
|
-
React.createElement(JumpToMessage, null),
|
|
109
|
-
React.createElement(Window, null,
|
|
110
|
-
React.createElement(VirtualizedMessageList, null))))));
|
|
111
|
-
};
|
|
66
|
+
export var JumpInRegularMessageList = function () { return (React.createElement("div", null,
|
|
67
|
+
React.createElement(StyleFix, null),
|
|
68
|
+
React.createElement(ConnectedUser, { token: userToken, userId: userId },
|
|
69
|
+
React.createElement(ChannelList, { filters: { id: { $eq: channelId } } }),
|
|
70
|
+
React.createElement(Channel, null,
|
|
71
|
+
React.createElement(JumpToMessage, null),
|
|
72
|
+
React.createElement(Window, null,
|
|
73
|
+
React.createElement(MessageList, null)))))); };
|
|
74
|
+
export var JumpInVirtualizedMessageList = function () { return (React.createElement("div", null,
|
|
75
|
+
React.createElement(StyleFix, null),
|
|
76
|
+
React.createElement(ConnectedUser, { token: userToken, userId: userId },
|
|
77
|
+
React.createElement(ChannelList, { filters: { id: { $eq: channelId } } }),
|
|
78
|
+
React.createElement(Channel, null,
|
|
79
|
+
React.createElement(JumpToMessage, null),
|
|
80
|
+
React.createElement(Window, null,
|
|
81
|
+
React.createElement(VirtualizedMessageList, null)))))); };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark-read.stories.d.ts","sourceRoot":"","sources":["../../src/stories/mark-read.stories.tsx"],"names":[],"mappings":"AACA,OAAO,+CAA+C,CAAC;AA2FvD,eAAO,MAAM,KAAK,mBAUjB,CAAC;AAEF,eAAO,MAAM,KAAK,mBAUjB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
13
|
+
import '@stream-io/stream-chat-css/dist/css/index.css';
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { v4 as uuid } from 'uuid';
|
|
16
|
+
import { Channel, ChannelHeader, ChannelList, ChannelPreview, MessageList, useChannelStateContext, Window, } from '../index';
|
|
17
|
+
import { ConnectedUser } from './utils';
|
|
18
|
+
var channelId = import.meta.env.E2E_ADD_MESSAGE_CHANNEL;
|
|
19
|
+
if (!channelId || typeof channelId !== 'string') {
|
|
20
|
+
throw new Error('expected ADD_MESSAGE_CHANNEL');
|
|
21
|
+
}
|
|
22
|
+
var Controls = function () {
|
|
23
|
+
var channel = useChannelStateContext().channel;
|
|
24
|
+
return (React.createElement("div", null,
|
|
25
|
+
React.createElement("button", { "data-testid": 'truncate', onClick: function () { return channel.truncate(); } }, "Truncate"),
|
|
26
|
+
React.createElement("button", { "data-testid": 'add-message', onClick: function () {
|
|
27
|
+
return channel.sendMessage({
|
|
28
|
+
text: uuid(),
|
|
29
|
+
});
|
|
30
|
+
} }, "Add message")));
|
|
31
|
+
};
|
|
32
|
+
// Sort in reverse order to avoid auto-selecting unread channel
|
|
33
|
+
var sort = { last_updated: 1 };
|
|
34
|
+
var CustomPreviewUI = function (_a) {
|
|
35
|
+
var _b, _c;
|
|
36
|
+
var activeChannel = _a.activeChannel, channel = _a.channel, displayTitle = _a.displayTitle, setActiveChannel = _a.setActiveChannel, unread = _a.unread, watchers = _a.watchers;
|
|
37
|
+
var avatarName = displayTitle || ((_c = (_b = channel.state.messages[channel.state.messages.length - 1]) === null || _b === void 0 ? void 0 : _b.user) === null || _c === void 0 ? void 0 : _c.id);
|
|
38
|
+
return (React.createElement("div", { "data-testid": "channel-" + channel.id, onClick: function () { return setActiveChannel === null || setActiveChannel === void 0 ? void 0 : setActiveChannel(channel, watchers); }, style: { background: channel.cid === (activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.cid) ? '#fff' : 'initial' } },
|
|
39
|
+
React.createElement("span", null, avatarName),
|
|
40
|
+
" || ",
|
|
41
|
+
React.createElement("span", { "data-testid": 'unread-count' }, unread)));
|
|
42
|
+
};
|
|
43
|
+
var CustomPreview = function (props) { return (React.createElement(ChannelPreview, __assign({}, props, { Preview: CustomPreviewUI }))); };
|
|
44
|
+
var WrappedConnectedUser = function (_a) {
|
|
45
|
+
var token = _a.token, userId = _a.userId;
|
|
46
|
+
return (React.createElement(ConnectedUser, { token: token, userId: userId },
|
|
47
|
+
React.createElement(ChannelList, { filters: { members: { $in: [userId] }, name: { $autocomplete: 'mr-channel' } }, Preview: CustomPreview, setActiveChannelOnMount: false, sort: sort }),
|
|
48
|
+
React.createElement(Channel, null,
|
|
49
|
+
React.createElement(Window, null,
|
|
50
|
+
React.createElement(ChannelHeader, null),
|
|
51
|
+
React.createElement(MessageList, null),
|
|
52
|
+
React.createElement(Controls, null)))));
|
|
53
|
+
};
|
|
54
|
+
export var User1 = function () {
|
|
55
|
+
var userId = import.meta.env.E2E_TEST_USER_1;
|
|
56
|
+
var token = import.meta.env.E2E_TEST_USER_1_TOKEN;
|
|
57
|
+
if (!userId || typeof userId !== 'string') {
|
|
58
|
+
throw new Error('expected TEST_USER_1');
|
|
59
|
+
}
|
|
60
|
+
if (!token || typeof token !== 'string') {
|
|
61
|
+
throw new Error('expected TEST_USER_1_TOKEN');
|
|
62
|
+
}
|
|
63
|
+
return React.createElement(WrappedConnectedUser, { token: token, userId: userId });
|
|
64
|
+
};
|
|
65
|
+
export var User2 = function () {
|
|
66
|
+
var userId = import.meta.env.E2E_TEST_USER_2;
|
|
67
|
+
var token = import.meta.env.E2E_TEST_USER_2_TOKEN;
|
|
68
|
+
if (!userId || typeof userId !== 'string') {
|
|
69
|
+
throw new Error('expected TEST_USER_2');
|
|
70
|
+
}
|
|
71
|
+
if (!token || typeof token !== 'string') {
|
|
72
|
+
throw new Error('expected TEST_USER_2_TOKEN');
|
|
73
|
+
}
|
|
74
|
+
return React.createElement(WrappedConnectedUser, { token: token, userId: userId });
|
|
75
|
+
};
|
package/dist/stories/utils.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { DefaultGenerics } from 'stream-chat';
|
|
1
3
|
export declare const apiKey: string;
|
|
2
4
|
declare type LocalAttachmentType = Record<string, unknown>;
|
|
3
5
|
declare type LocalChannelType = Record<string, unknown>;
|
|
@@ -15,5 +17,10 @@ export declare type StreamChatGenerics = {
|
|
|
15
17
|
reactionType: LocalReactionType;
|
|
16
18
|
userType: LocalUserType;
|
|
17
19
|
};
|
|
20
|
+
export declare type ConnectedUserProps = PropsWithChildren<{
|
|
21
|
+
token: string;
|
|
22
|
+
userId: string;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const ConnectedUser: <SCG extends DefaultGenerics = StreamChatGenerics>({ children, token, userId, }: ConnectedUserProps) => JSX.Element;
|
|
18
25
|
export {};
|
|
19
26
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/stories/utils.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/stories/utils.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAqB,MAAM,aAAa,CAAC;AAMjE,eAAO,MAAM,MAAM,QAAS,CAAC;AAE7B,aAAK,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnD,aAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChD,aAAK,gBAAgB,GAAG,MAAM,CAAC;AAC/B,aAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9C,aAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChD,aAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACjD,aAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7C,oBAAY,kBAAkB,GAAG;IAC/B,cAAc,EAAE,mBAAmB,CAAC;IACpC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,cAAc,CAAC;IAC1B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,YAAY,EAAE,iBAAiB,CAAC;IAChC,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF,oBAAY,kBAAkB,GAAG,iBAAiB,CAAC;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa,mFAIvB,kBAAkB,gBA+BpB,CAAC"}
|
package/dist/stories/utils.js
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { Chat } from '../';
|
|
3
|
+
import { StreamChat } from 'stream-chat';
|
|
1
4
|
var appKey = import.meta.env.E2E_APP_KEY;
|
|
2
5
|
if (!appKey || typeof appKey !== 'string') {
|
|
3
6
|
throw new Error('expected APP_KEY');
|
|
4
7
|
}
|
|
5
8
|
export var apiKey = appKey;
|
|
9
|
+
export var ConnectedUser = function (_a) {
|
|
10
|
+
var children = _a.children, token = _a.token, userId = _a.userId;
|
|
11
|
+
var _b = useState(null), client = _b[0], setClient = _b[1];
|
|
12
|
+
useEffect(function () {
|
|
13
|
+
var c = new StreamChat(apiKey);
|
|
14
|
+
var handleConnectionChange = function (_a) {
|
|
15
|
+
var _b = _a.online, online = _b === void 0 ? false : _b;
|
|
16
|
+
if (!online)
|
|
17
|
+
console.log('connection lost');
|
|
18
|
+
setClient(c);
|
|
19
|
+
};
|
|
20
|
+
c.on('connection.changed', handleConnectionChange);
|
|
21
|
+
c.connectUser({ id: userId }, token);
|
|
22
|
+
return function () {
|
|
23
|
+
c.off('connection.changed', handleConnectionChange);
|
|
24
|
+
c.disconnectUser().then(function () { return console.log('connection closed'); });
|
|
25
|
+
};
|
|
26
|
+
}, [userId, token]);
|
|
27
|
+
if (!client) {
|
|
28
|
+
return React.createElement("p", null,
|
|
29
|
+
"Waiting for connection to be established with user: ",
|
|
30
|
+
userId,
|
|
31
|
+
"...");
|
|
32
|
+
}
|
|
33
|
+
return (React.createElement(React.Fragment, null,
|
|
34
|
+
React.createElement("h3", null,
|
|
35
|
+
"User: ",
|
|
36
|
+
userId),
|
|
37
|
+
React.createElement(Chat, { client: client }, children)));
|
|
38
|
+
};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
1
2
|
import type { LoadingIndicatorProps } from '../components/Loading/LoadingIndicator';
|
|
2
3
|
import type { Event, ExtendableGenerics, LiteralStringForUnion, Mute } from 'stream-chat';
|
|
3
4
|
export declare type UnknownType = Record<string, unknown>;
|
|
5
|
+
export declare type PropsWithChildrenOnly = PropsWithChildren<Record<never, never>>;
|
|
4
6
|
export declare type CustomTrigger = {
|
|
5
7
|
[key: string]: {
|
|
6
8
|
componentProps: UnknownType;
|
|
7
9
|
data: UnknownType;
|
|
8
10
|
};
|
|
9
11
|
};
|
|
12
|
+
export declare type CustomMessageType = 'channel.intro' | 'message.date';
|
|
10
13
|
export declare type DefaultAttachmentType = UnknownType & {
|
|
11
14
|
asset_url?: string;
|
|
12
15
|
file_size?: number;
|
|
@@ -32,7 +35,7 @@ export declare type DefaultStreamChatGenerics = ExtendableGenerics & {
|
|
|
32
35
|
userType: DefaultUserType;
|
|
33
36
|
};
|
|
34
37
|
export declare type DefaultMessageType<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = UnknownType & {
|
|
35
|
-
customType?:
|
|
38
|
+
customType?: CustomMessageType;
|
|
36
39
|
date?: string | Date;
|
|
37
40
|
errorStatusCode?: number;
|
|
38
41
|
event?: Event<StreamChatGenerics>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE1F,oBAAY,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"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"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "8.1.
|
|
1
|
+
export declare const version = "8.1.3-beta.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iBAAiB,CAAC"}
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var version = '8.1.
|
|
1
|
+
export var version = '8.1.3-beta.1';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.3-beta.1",
|
|
4
4
|
"description": "React components to create chat conversations or livestream style chat",
|
|
5
5
|
"author": "GetStream",
|
|
6
6
|
"homepage": "https://getstream.io/chat/",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"sideEffects": [
|
|
17
17
|
"*.css"
|
|
18
18
|
],
|
|
19
|
+
"source": "src/index.tsx",
|
|
19
20
|
"jsdelivr": "./dist/browser.full-bundle.min.js",
|
|
20
21
|
"keywords": [
|
|
21
22
|
"chat",
|
|
@@ -43,24 +44,24 @@
|
|
|
43
44
|
"pretty-bytes": "^5.4.1",
|
|
44
45
|
"prop-types": "^15.7.2",
|
|
45
46
|
"react-fast-compare": "^3.2.0",
|
|
46
|
-
"react-file-utils": "1.1.
|
|
47
|
+
"react-file-utils": "^1.1.11",
|
|
47
48
|
"react-image-gallery": "^1.2.7",
|
|
48
|
-
"react-is": "^
|
|
49
|
+
"react-is": "^18.1.0",
|
|
49
50
|
"react-markdown": "^5.0.3",
|
|
50
51
|
"react-player": "^2.7.0",
|
|
51
52
|
"react-textarea-autosize": "^8.3.0",
|
|
52
|
-
"react-virtuoso": "^2.
|
|
53
|
+
"react-virtuoso": "^2.10.2",
|
|
53
54
|
"textarea-caret": "^3.1.0",
|
|
54
55
|
"uuid": "^8.3.1"
|
|
55
56
|
},
|
|
56
57
|
"optionalDependencies": {
|
|
57
58
|
"@stream-io/transliterate": "^1.5.5",
|
|
58
|
-
"mml-react": "^0.4.
|
|
59
|
+
"mml-react": "^0.4.7"
|
|
59
60
|
},
|
|
60
61
|
"peerDependencies": {
|
|
61
|
-
"react": "^17.0.0 || ^16.8.0",
|
|
62
|
-
"react-dom": "^17.0.0 || ^16.8.0",
|
|
63
|
-
"stream-chat": "^6.
|
|
62
|
+
"react": "^18.0.0 || ^17.0.0 || ^16.8.0",
|
|
63
|
+
"react-dom": "^18.0.0 || ^17.0.0 || ^16.8.0",
|
|
64
|
+
"stream-chat": "^6.5.0"
|
|
64
65
|
},
|
|
65
66
|
"files": [
|
|
66
67
|
"dist",
|
|
@@ -77,7 +78,9 @@
|
|
|
77
78
|
"@babel/preset-env": "^7.12.7",
|
|
78
79
|
"@babel/preset-react": "^7.12.7",
|
|
79
80
|
"@babel/preset-typescript": "^7.12.7",
|
|
80
|
-
"@
|
|
81
|
+
"@commitlint/cli": "^16.2.3",
|
|
82
|
+
"@commitlint/config-conventional": "^16.2.1",
|
|
83
|
+
"@ladle/react": "^0.11.0",
|
|
81
84
|
"@playwright/test": "^1.20.0",
|
|
82
85
|
"@rollup/plugin-babel": "^5.2.1",
|
|
83
86
|
"@rollup/plugin-image": "^2.1.1",
|
|
@@ -86,23 +89,24 @@
|
|
|
86
89
|
"@rollup/plugin-replace": "^2.3.4",
|
|
87
90
|
"@rollup/plugin-typescript": "8.2.1",
|
|
88
91
|
"@semantic-release/changelog": "^6.0.1",
|
|
92
|
+
"@semantic-release/git": "^10.0.1",
|
|
89
93
|
"@stream-io/rollup-plugin-node-builtins": "^2.1.5",
|
|
90
|
-
"@testing-library/jest-dom": "5.
|
|
91
|
-
"@testing-library/react": "^
|
|
92
|
-
"@testing-library/react-hooks": "^
|
|
94
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
95
|
+
"@testing-library/react": "^13.1.1",
|
|
96
|
+
"@testing-library/react-hooks": "^8.0.0",
|
|
93
97
|
"@types/deep-equal": "^1.0.1",
|
|
94
98
|
"@types/dotenv": "^8.2.0",
|
|
95
|
-
"@types/emoji-mart": "^3.0.
|
|
99
|
+
"@types/emoji-mart": "^3.0.9",
|
|
96
100
|
"@types/linkifyjs": "^2.1.3",
|
|
97
101
|
"@types/lodash.debounce": "^4.0.6",
|
|
98
102
|
"@types/lodash.isequal": "^4.5.5",
|
|
99
103
|
"@types/lodash.throttle": "^4.1.6",
|
|
100
104
|
"@types/lodash.uniqby": "^4.7.6",
|
|
101
105
|
"@types/moment": "^2.13.0",
|
|
102
|
-
"@types/react": "
|
|
103
|
-
"@types/react-dom": "^
|
|
106
|
+
"@types/react": "^18.0.8",
|
|
107
|
+
"@types/react-dom": "^18.0.3",
|
|
104
108
|
"@types/react-image-gallery": "^1.0.5",
|
|
105
|
-
"@types/react-is": "^17.0.
|
|
109
|
+
"@types/react-is": "^17.0.3",
|
|
106
110
|
"@types/textarea-caret": "3.0.0",
|
|
107
111
|
"@types/uuid": "^8.3.0",
|
|
108
112
|
"@typescript-eslint/eslint-plugin": "4.27.0",
|
|
@@ -142,14 +146,14 @@
|
|
|
142
146
|
"husky": "^4.3.0",
|
|
143
147
|
"i18next-parser": "^6.0.0",
|
|
144
148
|
"jest": "^26.6.3",
|
|
145
|
-
"jest-axe": "^
|
|
149
|
+
"jest-axe": "^6.0.0",
|
|
146
150
|
"moment": "^2.29.1",
|
|
147
151
|
"postcss": "^8.1.10",
|
|
148
152
|
"postcss-loader": "^4.1.0",
|
|
149
153
|
"prettier": "^2.2.0",
|
|
150
|
-
"react": "^
|
|
151
|
-
"react-dom": "^
|
|
152
|
-
"react-test-renderer": "^
|
|
154
|
+
"react": "^18.1.0",
|
|
155
|
+
"react-dom": "^18.1.0",
|
|
156
|
+
"react-test-renderer": "^18.1.0",
|
|
153
157
|
"rollup": "^2.33.3",
|
|
154
158
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
155
159
|
"rollup-plugin-copy": "^3.4.0",
|
|
@@ -161,7 +165,7 @@
|
|
|
161
165
|
"rollup-plugin-visualizer": "^4.2.0",
|
|
162
166
|
"semantic-release": "^19.0.2",
|
|
163
167
|
"semantic-release-cli": "^5.4.4",
|
|
164
|
-
"stream-chat": "6.
|
|
168
|
+
"stream-chat": "^6.5.0",
|
|
165
169
|
"style-loader": "^2.0.0",
|
|
166
170
|
"ts-jest": "^26.5.1",
|
|
167
171
|
"tslib": "2.3.0",
|
|
@@ -173,12 +177,13 @@
|
|
|
173
177
|
},
|
|
174
178
|
"husky": {
|
|
175
179
|
"hooks": {
|
|
176
|
-
"pre-commit": "dotgit/hooks/pre-commit-format.sh && dotgit/hooks/pre-commit-reject-binaries.py"
|
|
180
|
+
"pre-commit": "dotgit/hooks/pre-commit-format.sh && dotgit/hooks/pre-commit-reject-binaries.py",
|
|
181
|
+
"commit-msg": "npx commitlint --edit $1"
|
|
177
182
|
}
|
|
178
183
|
},
|
|
179
184
|
"scripts": {
|
|
180
185
|
"analyze": "yarn build -- --stats && webpack-bundle-analyzer build/bundle-stats.json",
|
|
181
|
-
"build": "rm -rf dist && mkdir -p dist/assets
|
|
186
|
+
"build": "rm -rf dist && mkdir -p dist/assets && yarn --silent copy-version && yarn build-translations && yarn types && yarn bundle",
|
|
182
187
|
"bundle": "rollup -c",
|
|
183
188
|
"bundle-size": "BUNDLE_SIZE=true yarn bundle",
|
|
184
189
|
"build-translations": "i18next",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="14" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M7 0a7 7 0 1 0 0 14A7 7 0 0 0 7 0zm.875 10.938a.438.438 0 0 1-.438.437h-.875a.438.438 0 0 1-.437-.438v-.874c0-.242.196-.438.438-.438h.875c.241 0 .437.196.437.438v.874zm0-2.626a.438.438 0 0 1-.438.438h-.875a.438.438 0 0 1-.437-.438v-5.25c0-.241.196-.437.438-.437h.875c.241 0 .437.196.437.438v5.25z" fill="#EA152F" fill-rule="evenodd"/></svg>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="78px" height="78px" viewBox="0 0 78 78" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<!-- Generator: Sketch 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
|
|
4
|
-
<title>Combined Shape</title>
|
|
5
|
-
<desc>Created with Sketch.</desc>
|
|
6
|
-
<g id="Interactions" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
7
|
-
<g id="Connection-Error-_-Connectivity" transform="translate(-270.000000, -30.000000)" fill="#CF1F25">
|
|
8
|
-
<g id="109-network-connection" transform="translate(270.000000, 30.000000)">
|
|
9
|
-
<path d="M66.4609744,11.414231 C81.6225232,26.5757798 81.6225232,51.157545 66.4609744,66.3188467 C51.2994256,81.4803954 26.7176604,81.4803954 11.5563587,66.3188467 C-3.60519004,51.1572979 -3.60519004,26.5755327 11.5563587,11.414231 C26.7179075,-3.74731776 51.2996727,-3.74731776 66.4609744,11.414231 Z M54.7853215,45.8823776 L54.7853215,40.5882574 C54.7853215,39.613638 53.9952341,38.8235506 53.0206147,38.8235506 L44.9576695,38.8235506 L41.428256,42.3529641 L51.255555,42.3529641 L51.255555,45.8823776 L54.7853215,45.8823776 Z M40.6659027,43.1153174 L37.8988425,45.8823776 L40.6659027,45.8823776 L40.6659027,43.1153174 Z M51.1764962,56.4702653 L58.2353232,56.4702653 C59.2099355,56.4702653 60.00003,55.6801708 60.00003,54.7055585 L60.00003,51.176145 C60.00003,50.2015327 59.2099355,49.4114382 58.2353232,49.4114382 L51.1764962,49.4114382 C50.2018839,49.4114382 49.4117894,50.2015327 49.4117894,51.176145 L49.4117894,54.7055585 C49.4117894,55.6801708 50.2018839,56.4702653 51.1764962,56.4702653 Z M35.2941353,56.4702653 L42.3529624,56.4702653 C43.3275746,56.4702653 44.1176691,55.6801708 44.1176691,54.7055585 L44.1176691,51.176145 C44.1176691,50.2015327 43.3275746,49.4114382 42.3529624,49.4114382 L35.2941353,49.4114382 C34.319523,49.4114382 33.5294285,50.2015327 33.5294285,51.176145 L33.5294285,54.7055585 C33.5294285,55.6801708 34.319523,56.4702653 35.2941353,56.4702653 Z M56.6964989,19.0874231 C56.007381,18.3985134 54.8903216,18.3985134 54.2012036,19.087423 L45.882376,27.4062507 L45.882376,19.4117761 C45.882376,18.4371568 45.0922885,17.6470693 44.1176692,17.6470693 L33.5294286,17.6470693 C32.5548092,17.6470694 31.7647218,18.4371568 31.7647218,19.4117761 L31.7647218,30.0000167 C31.7647219,30.9746363 32.5548092,31.7647237 33.5294285,31.7647237 L41.5239031,31.7647237 L34.4650761,38.8235508 L24.7058947,38.8235508 C23.7312753,38.8235508 22.9411879,39.6136382 22.9411879,40.5882575 L22.9411879,45.8823778 L26.4706014,45.8823778 L26.4706014,42.3529643 L30.9356624,42.3529643 L23.8768354,49.4117914 L19.4117743,49.4117914 C18.4371549,49.4117914 17.6470675,50.2018788 17.6470675,51.1764981 L17.6470675,54.7059117 C17.6504049,54.9674302 17.7129076,55.2248042 17.8298886,55.4587302 L16.4456526,56.8429662 C15.7446193,57.5200453 15.7252005,58.6372282 16.4022825,59.3382615 C17.0793616,60.0392948 18.1965445,60.0587136 18.8975778,59.3816316 C18.9122847,59.3674273 18.9267436,59.3529684 18.940948,59.3382615 L56.6964963,21.5830662 C57.3856425,20.8939094 57.3856425,19.7765747 56.6964963,19.0874179 Z" id="Combined-Shape"></path>
|
|
10
|
-
</g>
|
|
11
|
-
</g>
|
|
12
|
-
</g>
|
|
13
|
-
</svg>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="25px" height="30px" viewBox="0 0 25 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<!-- Generator: Sketch 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
|
|
4
|
-
<title>file icon</title>
|
|
5
|
-
<desc>Created with Sketch.</desc>
|
|
6
|
-
<g id="Team-Chat" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
7
|
-
<g id="LIGHT_02-Team-Chat" transform="translate(-399.000000, -2328.000000)">
|
|
8
|
-
<g id="Channel-Conversations" transform="translate(300.000000, 0.000000)">
|
|
9
|
-
<g id="ConversationMessageView" transform="translate(40.000000, 2239.000000)">
|
|
10
|
-
<g id="MessageContent_file" transform="translate(49.000000, 83.000000)">
|
|
11
|
-
<g id="file-icon" transform="translate(10.000000, 6.000000)">
|
|
12
|
-
<path d="M0,1.99161703 C0,0.891677316 0.889763236,0 2.00359486,0 L22.9964051,0 C24.10296,0 25,0.89784041 25,1.99161703 L25,28.008383 C25,29.1083227 24.1102368,30 22.9964051,30 L2.00359486,30 C0.897039974,30 0,29.1021596 0,28.008383 L0,1.99161703 Z" id="placeholder" fill="#D1D1D1"></path>
|
|
13
|
-
<path d="M5,5 L20,5 L20,7 L5,7 L5,5 Z M5,9 L20,9 L20,11 L5,11 L5,9 Z M5,13 L20,13 L20,15 L5,15 L5,13 Z M5,17 L12,17 L12,19 L5,19 L5,17 Z" id="lines" fill="#FFFFFF"></path>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
16
|
-
</g>
|
|
17
|
-
</g>
|
|
18
|
-
</g>
|
|
19
|
-
</g>
|
|
20
|
-
</svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="8" height="5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="b" d="M.667.667L4 4 7.333.667z"/><filter x="-7.5%" y="-15%" width="115%" height="160%" filterUnits="objectBoundingBox" id="a"><feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.685858243 0" in="shadowOffsetOuter1"/></filter></defs><g fill="none" fill-rule="evenodd"><use fill="#000" filter="url(#a)" xlink:href="#b"/><use fill-opacity=".7" fill="#FFF" xlink:href="#b"/></g></svg>
|