stream-chat-react 8.0.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.full-bundle.js +1820 -609
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +4 -4
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/Attachment/AttachmentActions.d.ts +0 -1
- package/dist/components/Attachment/AttachmentActions.d.ts.map +1 -1
- package/dist/components/Attachment/Audio.d.ts +0 -1
- package/dist/components/Attachment/Audio.d.ts.map +1 -1
- package/dist/components/Attachment/FileAttachment.d.ts +0 -1
- package/dist/components/Attachment/FileAttachment.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/Item.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/Item.js +2 -1
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/Textarea.js +1 -1
- package/dist/components/Channel/Channel.d.ts.map +1 -1
- package/dist/components/Channel/Channel.js +102 -24
- package/dist/components/Channel/channelState.d.ts +17 -0
- package/dist/components/Channel/channelState.d.ts.map +1 -1
- package/dist/components/Channel/channelState.js +24 -2
- package/dist/components/Channel/hooks/useCreateChannelStateContext.d.ts.map +1 -1
- package/dist/components/Channel/hooks/useCreateChannelStateContext.js +7 -1
- package/dist/components/Channel/hooks/useIsMounted.d.ts +0 -1
- package/dist/components/Channel/hooks/useIsMounted.d.ts.map +1 -1
- package/dist/components/Channel/utils.d.ts +5 -0
- package/dist/components/Channel/utils.d.ts.map +1 -0
- package/dist/components/Channel/utils.js +19 -0
- package/dist/components/ChannelHeader/icons.d.ts +0 -1
- package/dist/components/ChannelHeader/icons.d.ts.map +1 -1
- package/dist/components/ChannelHeader/icons.js +1 -1
- package/dist/components/ChannelList/ChannelList.d.ts +2 -3
- package/dist/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/dist/components/ChannelList/ChannelList.js +1 -0
- package/dist/components/ChannelList/hooks/useChannelDeletedListener.d.ts +0 -1
- package/dist/components/ChannelList/hooks/useChannelDeletedListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useChannelHiddenListener.d.ts +0 -1
- package/dist/components/ChannelList/hooks/useChannelHiddenListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useChannelTruncatedListener.d.ts +0 -1
- package/dist/components/ChannelList/hooks/useChannelTruncatedListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useChannelUpdatedListener.d.ts +0 -1
- package/dist/components/ChannelList/hooks/useChannelUpdatedListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useChannelVisibleListener.d.ts +0 -1
- package/dist/components/ChannelList/hooks/useChannelVisibleListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useMessageNewListener.d.ts +0 -1
- package/dist/components/ChannelList/hooks/useMessageNewListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useNotificationAddedToChannelListener.d.ts +0 -1
- package/dist/components/ChannelList/hooks/useNotificationAddedToChannelListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useNotificationMessageNewListener.d.ts +0 -1
- package/dist/components/ChannelList/hooks/useNotificationMessageNewListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useNotificationRemovedFromChannelListener.d.ts +0 -1
- package/dist/components/ChannelList/hooks/useNotificationRemovedFromChannelListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/usePaginatedChannels.d.ts +0 -1
- package/dist/components/ChannelList/hooks/usePaginatedChannels.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useUserPresenceChangedListener.d.ts +0 -1
- package/dist/components/ChannelList/hooks/useUserPresenceChangedListener.d.ts.map +1 -1
- package/dist/components/ChannelPreview/ChannelPreview.d.ts.map +1 -1
- package/dist/components/ChannelPreview/ChannelPreview.js +6 -10
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.d.ts +0 -1
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.d.ts.map +1 -1
- package/dist/components/ChannelPreview/utils.d.ts +0 -1
- package/dist/components/ChannelPreview/utils.d.ts.map +1 -1
- package/dist/components/Chat/Chat.d.ts.map +1 -1
- package/dist/components/Chat/Chat.js +2 -1
- package/dist/components/Chat/hooks/useChat.d.ts +1 -1
- package/dist/components/Chat/hooks/useChat.d.ts.map +1 -1
- package/dist/components/Chat/hooks/useChat.js +12 -7
- package/dist/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
- package/dist/components/Chat/hooks/useCreateChatContext.js +2 -1
- package/dist/components/DateSeparator/DateSeparator.d.ts +0 -1
- package/dist/components/DateSeparator/DateSeparator.d.ts.map +1 -1
- package/dist/components/Gallery/Gallery.d.ts +0 -1
- package/dist/components/Gallery/Gallery.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/InfiniteScrollPaginator/InfiniteScroll.js +16 -45
- package/dist/components/InfiniteScrollPaginator/index.d.ts +0 -2
- package/dist/components/InfiniteScrollPaginator/index.d.ts.map +1 -1
- package/dist/components/InfiniteScrollPaginator/index.js +0 -2
- package/dist/components/Message/FixedHeightMessage.d.ts +0 -1
- package/dist/components/Message/FixedHeightMessage.d.ts.map +1 -1
- package/dist/components/Message/Message.d.ts +0 -1
- package/dist/components/Message/Message.d.ts.map +1 -1
- package/dist/components/Message/Message.js +8 -7
- package/dist/components/Message/MessageCommerce.d.ts +0 -1
- package/dist/components/Message/MessageCommerce.d.ts.map +1 -1
- package/dist/components/Message/MessageDeleted.d.ts +0 -1
- package/dist/components/Message/MessageDeleted.d.ts.map +1 -1
- package/dist/components/Message/MessageRepliesCountButton.d.ts.map +1 -1
- package/dist/components/Message/MessageRepliesCountButton.js +10 -24
- package/dist/components/Message/MessageSimple.d.ts +0 -1
- package/dist/components/Message/MessageSimple.d.ts.map +1 -1
- package/dist/components/Message/MessageSimple.js +2 -2
- package/dist/components/Message/MessageTeam.d.ts +0 -1
- package/dist/components/Message/MessageTeam.d.ts.map +1 -1
- package/dist/components/Message/MessageText.d.ts +0 -1
- package/dist/components/Message/MessageText.d.ts.map +1 -1
- package/dist/components/Message/MessageTimestamp.d.ts +0 -1
- package/dist/components/Message/MessageTimestamp.d.ts.map +1 -1
- package/dist/components/Message/QuotedMessage.d.ts +0 -1
- package/dist/components/Message/QuotedMessage.d.ts.map +1 -1
- package/dist/components/Message/QuotedMessage.js +3 -1
- package/dist/components/Message/hooks/useEditHandler.d.ts +0 -1
- package/dist/components/Message/hooks/useEditHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/useUserHandler.d.ts +0 -1
- package/dist/components/Message/hooks/useUserHandler.d.ts.map +1 -1
- package/dist/components/Message/icons.d.ts +0 -1
- package/dist/components/Message/icons.d.ts.map +1 -1
- package/dist/components/Message/types.d.ts +2 -1
- package/dist/components/Message/types.d.ts.map +1 -1
- package/dist/components/Message/utils.d.ts.map +1 -1
- package/dist/components/Message/utils.js +3 -0
- package/dist/components/MessageActions/MessageActionsBox.d.ts +0 -1
- package/dist/components/MessageActions/MessageActionsBox.d.ts.map +1 -1
- package/dist/components/MessageInput/EditMessageForm.d.ts +0 -1
- package/dist/components/MessageInput/EditMessageForm.d.ts.map +1 -1
- package/dist/components/MessageInput/EmojiPicker.d.ts +0 -1
- package/dist/components/MessageInput/EmojiPicker.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInputFlat.d.ts +0 -1
- package/dist/components/MessageInput/MessageInputFlat.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInputFlat.js +25 -3
- package/dist/components/MessageInput/MessageInputSmall.d.ts +0 -1
- package/dist/components/MessageInput/MessageInputSmall.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInputSmall.js +26 -4
- package/dist/components/MessageInput/QuotedMessagePreview.d.ts +0 -1
- package/dist/components/MessageInput/QuotedMessagePreview.d.ts.map +1 -1
- package/dist/components/MessageInput/UploadsPreview.d.ts +0 -1
- package/dist/components/MessageInput/UploadsPreview.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useAttachments.d.ts +0 -1
- package/dist/components/MessageInput/hooks/useAttachments.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useCooldownTimer.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useCooldownTimer.js +19 -29
- package/dist/components/MessageInput/hooks/useEmojiPicker.d.ts +0 -1
- package/dist/components/MessageInput/hooks/useEmojiPicker.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useFileUploads.d.ts +0 -1
- package/dist/components/MessageInput/hooks/useFileUploads.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useMessageInputText.d.ts +0 -1
- package/dist/components/MessageInput/hooks/useMessageInputText.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useSubmitHandler.d.ts +0 -1
- package/dist/components/MessageInput/hooks/useSubmitHandler.d.ts.map +1 -1
- package/dist/components/MessageList/GiphyPreviewMessage.d.ts +0 -1
- package/dist/components/MessageList/GiphyPreviewMessage.d.ts.map +1 -1
- package/dist/components/MessageList/MessageList.d.ts +8 -3
- package/dist/components/MessageList/MessageList.d.ts.map +1 -1
- package/dist/components/MessageList/MessageList.js +90 -24
- package/dist/components/MessageList/MessageListNotifications.d.ts +1 -0
- package/dist/components/MessageList/MessageListNotifications.d.ts.map +1 -1
- package/dist/components/MessageList/MessageListNotifications.js +2 -2
- package/dist/components/MessageList/VirtualizedMessageList.d.ts +11 -1
- package/dist/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +116 -19
- package/dist/components/MessageList/hooks/index.d.ts +0 -1
- package/dist/components/MessageList/hooks/index.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/index.js +0 -1
- package/dist/components/MessageList/hooks/useEnrichedMessages.d.ts +0 -1
- package/dist/components/MessageList/hooks/useEnrichedMessages.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useEnrichedMessages.js +4 -4
- package/dist/components/MessageList/hooks/useGiphyPreview.d.ts +0 -1
- package/dist/components/MessageList/hooks/useGiphyPreview.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useMessageListElements.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useMessageListElements.js +1 -1
- package/dist/components/MessageList/hooks/useNewMessageNotification.d.ts +1 -2
- package/dist/components/MessageList/hooks/useNewMessageNotification.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useNewMessageNotification.js +6 -2
- package/dist/components/MessageList/hooks/usePrependMessagesCount.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/usePrependMessagesCount.js +2 -0
- package/dist/components/MessageList/hooks/useScrollLocationLogic.d.ts +2 -0
- package/dist/components/MessageList/hooks/useScrollLocationLogic.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useScrollLocationLogic.js +9 -5
- package/dist/components/MessageList/utils.d.ts +24 -6
- package/dist/components/MessageList/utils.d.ts.map +1 -1
- package/dist/components/MessageList/utils.js +31 -23
- package/dist/components/Reactions/ReactionsList.d.ts +0 -1
- package/dist/components/Reactions/ReactionsList.d.ts.map +1 -1
- package/dist/components/Reactions/utils/utils.d.ts +0 -1
- package/dist/components/Reactions/utils/utils.d.ts.map +1 -1
- package/dist/components/Thread/Thread.d.ts +2 -0
- package/dist/components/Thread/Thread.d.ts.map +1 -1
- package/dist/components/Thread/Thread.js +6 -10
- package/dist/context/ChannelActionContext.d.ts +3 -0
- package/dist/context/ChannelActionContext.d.ts.map +1 -1
- package/dist/context/ChannelStateContext.d.ts +5 -1
- package/dist/context/ChannelStateContext.d.ts.map +1 -1
- package/dist/context/ChatContext.d.ts +3 -0
- package/dist/context/ChatContext.d.ts.map +1 -1
- package/dist/context/MessageContext.d.ts +2 -0
- package/dist/context/MessageContext.d.ts.map +1 -1
- package/dist/context/utils/getDisplayName.d.ts +0 -1
- package/dist/context/utils/getDisplayName.d.ts.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/i18n/Streami18n.d.ts +5 -4
- package/dist/i18n/Streami18n.d.ts.map +1 -1
- package/dist/i18n/Streami18n.js +5 -5
- package/dist/i18n/de.json +29 -28
- package/dist/i18n/en.json +3 -2
- package/dist/i18n/es.json +4 -2
- package/dist/i18n/fr.json +4 -2
- package/dist/i18n/hi.json +3 -2
- package/dist/i18n/it.json +4 -2
- package/dist/i18n/ja.json +3 -2
- package/dist/i18n/ko.json +3 -2
- package/dist/i18n/nl.json +3 -2
- package/dist/i18n/pt.json +22 -20
- package/dist/i18n/ru.json +5 -2
- package/dist/i18n/tr.json +3 -2
- package/dist/index.cjs.js +489 -278
- package/dist/index.cjs.js.map +1 -1
- package/dist/scss/Attachment.scss +6 -1
- package/dist/scss/Avatar.scss +1 -1
- package/dist/scss/ChannelHeader.scss +8 -13
- package/dist/scss/Gallery.scss +19 -0
- package/dist/scss/Message.scss +24 -13
- package/dist/scss/MessageInputFlat.scss +20 -0
- package/dist/scss/MessageList.scss +7 -0
- package/dist/scss/ReactionList.scss +2 -1
- package/dist/scss/ReactionSelector.scss +2 -1
- package/dist/scss/SimpleReactionsList.scss +2 -1
- package/dist/scss/SmallMessageInput.scss +34 -0
- package/dist/scss/Thread.scss +5 -1
- package/dist/scss/VirtualMessage.scss +6 -0
- package/dist/scss/_variables.scss +4 -5
- package/dist/stories/connected-user.stories.d.ts +4 -0
- package/dist/stories/connected-user.stories.d.ts.map +1 -0
- package/dist/stories/connected-user.stories.js +81 -0
- package/dist/stories/hello.stories.d.ts +3 -0
- package/dist/stories/hello.stories.d.ts.map +1 -0
- package/dist/stories/hello.stories.js +47 -0
- package/dist/stories/jump-to-message.stories.d.ts +4 -0
- package/dist/stories/jump-to-message.stories.d.ts.map +1 -0
- package/dist/stories/jump-to-message.stories.js +111 -0
- package/dist/stories/utils.d.ts +19 -0
- package/dist/stories/utils.d.ts.map +1 -0
- package/dist/stories/utils.js +5 -0
- package/dist/types/types.d.ts +15 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +20 -12
- package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.d.ts +0 -18
- package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.d.ts.map +0 -1
- package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.js +0 -8
- package/dist/components/InfiniteScrollPaginator/ReverseInfiniteScroll.d.ts +0 -4
- package/dist/components/InfiniteScrollPaginator/ReverseInfiniteScroll.d.ts.map +0 -1
- package/dist/components/InfiniteScrollPaginator/ReverseInfiniteScroll.js +0 -14
- package/dist/components/MessageList/hooks/useCallLoadMore.d.ts +0 -3
- package/dist/components/MessageList/hooks/useCallLoadMore.d.ts.map +0 -1
- package/dist/components/MessageList/hooks/useCallLoadMore.js +0 -8
|
@@ -33,6 +33,11 @@
|
|
|
33
33
|
padding: 0;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/** Let giphies stretch their containers */
|
|
37
|
+
&-attachment--giphy {
|
|
38
|
+
max-width: unset;
|
|
39
|
+
}
|
|
40
|
+
|
|
36
41
|
&--me {
|
|
37
42
|
.str-chat__message-attachment {
|
|
38
43
|
padding-left: 0;
|
|
@@ -161,7 +166,7 @@
|
|
|
161
166
|
}
|
|
162
167
|
|
|
163
168
|
&--media {
|
|
164
|
-
width: 300px;
|
|
169
|
+
max-width: 300px;
|
|
165
170
|
}
|
|
166
171
|
|
|
167
172
|
&-card {
|
package/dist/scss/Avatar.scss
CHANGED
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
.str-chat {
|
|
134
134
|
&__header-livestream {
|
|
135
135
|
position: relative;
|
|
136
|
-
z-index:
|
|
136
|
+
z-index: 2;
|
|
137
137
|
border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
|
|
138
138
|
background: var(--white-snow);
|
|
139
139
|
box-shadow: 0 7px 9px 0 var(--border), 0 1px 0 0 var(--border);
|
|
@@ -263,16 +263,18 @@
|
|
|
263
263
|
.str-chat__header-hamburger {
|
|
264
264
|
width: 30px;
|
|
265
265
|
height: 38px;
|
|
266
|
-
padding: var(--
|
|
266
|
+
padding: var(--xxs-p);
|
|
267
267
|
margin-right: var(--xs-m);
|
|
268
268
|
display: none;
|
|
269
|
-
|
|
270
|
-
justify-content:
|
|
269
|
+
align-items: center;
|
|
270
|
+
justify-content: center;
|
|
271
271
|
cursor: pointer;
|
|
272
|
+
border: none;
|
|
273
|
+
background: transparent;
|
|
272
274
|
|
|
273
275
|
&:hover {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
+
svg path {
|
|
277
|
+
fill: var(--primary-color);
|
|
276
278
|
}
|
|
277
279
|
}
|
|
278
280
|
|
|
@@ -280,10 +282,3 @@
|
|
|
280
282
|
display: flex;
|
|
281
283
|
}
|
|
282
284
|
}
|
|
283
|
-
|
|
284
|
-
.str-chat__header-hamburger--line {
|
|
285
|
-
width: 100%;
|
|
286
|
-
height: 2px;
|
|
287
|
-
background: var(--primary-color);
|
|
288
|
-
border-radius: var(--border-radius-sm);
|
|
289
|
-
}
|
package/dist/scss/Gallery.scss
CHANGED
|
@@ -37,6 +37,25 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
.stream-chat-angular__image-modal {
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
align-items: center;
|
|
44
|
+
|
|
45
|
+
&-stepper {
|
|
46
|
+
padding: 10px;
|
|
47
|
+
border: none;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
background: transparent;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&-image {
|
|
53
|
+
object-fit: cover;
|
|
54
|
+
max-width: 90%;
|
|
55
|
+
max-height: 90%;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
40
59
|
.livestream.str-chat,
|
|
41
60
|
.messaging.str-chat,
|
|
42
61
|
.commerce.str-chat,
|
package/dist/scss/Message.scss
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: flex-end;
|
|
8
8
|
margin-bottom: var(--xxs-m);
|
|
9
|
+
/** clicking on the quoted message navigates to its original location in the message list*/
|
|
10
|
+
cursor: pointer;
|
|
9
11
|
|
|
10
12
|
&-inner {
|
|
11
13
|
display: flex;
|
|
@@ -293,6 +295,7 @@
|
|
|
293
295
|
position: relative;
|
|
294
296
|
margin: calc(var(--xxs-m) / 2) 0;
|
|
295
297
|
width: 100%;
|
|
298
|
+
transition: background-color 0.5s ease-out;
|
|
296
299
|
|
|
297
300
|
&--system {
|
|
298
301
|
text-align: center;
|
|
@@ -370,13 +373,16 @@
|
|
|
370
373
|
border: 1px solid var(--border);
|
|
371
374
|
margin-left: 0; /* set spacing when unfocused */
|
|
372
375
|
|
|
376
|
+
// Fixes emoji display in Chrome https://bugs.chromium.org/p/chromium/issues/detail?id=596223
|
|
377
|
+
.str-chat__emoji-display-fix {
|
|
378
|
+
display: inline-block;
|
|
379
|
+
width: 1.25em;
|
|
380
|
+
}
|
|
381
|
+
|
|
373
382
|
p {
|
|
374
|
-
/* Make sure really long urls and words don't break out
|
|
375
|
-
** https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/ */
|
|
376
|
-
overflow-wrap: break-word;
|
|
383
|
+
/* Make sure really long urls and words don't break out.*/
|
|
377
384
|
word-wrap: break-word;
|
|
378
|
-
|
|
379
|
-
text-overflow: ellipsis;
|
|
385
|
+
word-break: break-word;
|
|
380
386
|
|
|
381
387
|
/* Adds a hyphen where the word breaks, if supported (No Blink) */
|
|
382
388
|
-ms-hyphens: auto;
|
|
@@ -537,6 +543,11 @@
|
|
|
537
543
|
margin-top: var(--md-m);
|
|
538
544
|
}
|
|
539
545
|
|
|
546
|
+
&--highlighted {
|
|
547
|
+
transition: background-color 0.1s ease-out;
|
|
548
|
+
background-color: var(--highlight);
|
|
549
|
+
}
|
|
550
|
+
|
|
540
551
|
&-link {
|
|
541
552
|
color: var(--primary-color);
|
|
542
553
|
font-weight: var(--font-weight-bold);
|
|
@@ -547,13 +558,6 @@
|
|
|
547
558
|
font-weight: var(--font-weight-bold);
|
|
548
559
|
}
|
|
549
560
|
|
|
550
|
-
&-url-link {
|
|
551
|
-
max-width: 150px;
|
|
552
|
-
text-overflow: ellipsis;
|
|
553
|
-
overflow: hidden;
|
|
554
|
-
white-space: nowrap;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
561
|
&--inner {
|
|
558
562
|
display: flex;
|
|
559
563
|
flex-direction: column;
|
|
@@ -747,6 +751,8 @@
|
|
|
747
751
|
flex: initial;
|
|
748
752
|
text-align: left;
|
|
749
753
|
max-width: 460px;
|
|
754
|
+
word-wrap: break-word;
|
|
755
|
+
word-break: break-word;
|
|
750
756
|
|
|
751
757
|
&.str-chat__message-simple-text-inner--is-emoji {
|
|
752
758
|
background: transparent;
|
|
@@ -764,6 +770,12 @@
|
|
|
764
770
|
color: var(--primary-color);
|
|
765
771
|
font-weight: var(--font-weight-bold);
|
|
766
772
|
text-decoration: none;
|
|
773
|
+
|
|
774
|
+
&:active,
|
|
775
|
+
&:focus,
|
|
776
|
+
&:hover {
|
|
777
|
+
text-decoration: underline;
|
|
778
|
+
}
|
|
767
779
|
}
|
|
768
780
|
|
|
769
781
|
blockquote {
|
|
@@ -1189,7 +1201,6 @@
|
|
|
1189
1201
|
// fixes the overall overflow/flex issues together with the rule above
|
|
1190
1202
|
.mml-wrap {
|
|
1191
1203
|
display: block;
|
|
1192
|
-
max-width: none;
|
|
1193
1204
|
// the max-width should match that to .str-chat__message-XXXX-text-inner
|
|
1194
1205
|
max-width: 345px;
|
|
1195
1206
|
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
display: flex;
|
|
44
44
|
text-align: start;
|
|
45
45
|
align-items: flex-end;
|
|
46
|
+
word-break: break-all;
|
|
47
|
+
word-wrap: break-word;
|
|
46
48
|
|
|
47
49
|
.str-chat__message-attachment {
|
|
48
50
|
margin: 0;
|
|
@@ -108,6 +110,10 @@
|
|
|
108
110
|
|
|
109
111
|
.str-chat__textarea {
|
|
110
112
|
flex: 1;
|
|
113
|
+
|
|
114
|
+
&.str-chat-angular__textarea {
|
|
115
|
+
position: relative;
|
|
116
|
+
}
|
|
111
117
|
}
|
|
112
118
|
|
|
113
119
|
.str-chat__textarea > textarea {
|
|
@@ -133,6 +139,13 @@
|
|
|
133
139
|
background: var(--white);
|
|
134
140
|
}
|
|
135
141
|
|
|
142
|
+
.str-chat-angular__cooldown {
|
|
143
|
+
position: absolute;
|
|
144
|
+
top: 50%;
|
|
145
|
+
transform: translateY(-50%);
|
|
146
|
+
left: 25px;
|
|
147
|
+
}
|
|
148
|
+
|
|
136
149
|
&-emojiselect {
|
|
137
150
|
position: absolute;
|
|
138
151
|
top: calc(100% - 45px);
|
|
@@ -142,6 +155,13 @@
|
|
|
142
155
|
padding: 0;
|
|
143
156
|
background-color: transparent;
|
|
144
157
|
|
|
158
|
+
&.str-chat-angular__emojiselect {
|
|
159
|
+
max-width: 28px;
|
|
160
|
+
top: 50%;
|
|
161
|
+
transform: translateY(-50%);
|
|
162
|
+
cursor: initial;
|
|
163
|
+
}
|
|
164
|
+
|
|
145
165
|
svg {
|
|
146
166
|
fill: var(--black);
|
|
147
167
|
opacity: 0.5;
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
padding: var(--xs-p);
|
|
50
50
|
font-family: var(--second-font);
|
|
51
51
|
text-align: center;
|
|
52
|
+
margin-top: var(--xs-m);
|
|
52
53
|
|
|
53
54
|
&.notification-success {
|
|
54
55
|
background: var(--faded-green);
|
|
@@ -61,6 +62,12 @@
|
|
|
61
62
|
border: 1px solid var(--red);
|
|
62
63
|
color: var(--red);
|
|
63
64
|
}
|
|
65
|
+
|
|
66
|
+
&.notification-info {
|
|
67
|
+
background: var(--faded-blue);
|
|
68
|
+
border: 1px solid var(--blue);
|
|
69
|
+
color: var(--blue);
|
|
70
|
+
}
|
|
64
71
|
}
|
|
65
72
|
|
|
66
73
|
.str-chat__connection-issue {
|
|
@@ -36,6 +36,20 @@
|
|
|
36
36
|
background-color: transparent;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
.str-chat-angular__emojiselect {
|
|
40
|
+
width: auto;
|
|
41
|
+
height: auto;
|
|
42
|
+
left: 15px;
|
|
43
|
+
max-width: 20px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.str-chat-angular__cooldown {
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 50%;
|
|
49
|
+
transform: translateY(-50%);
|
|
50
|
+
right: 15px;
|
|
51
|
+
}
|
|
52
|
+
|
|
39
53
|
.rfu-file-upload-button {
|
|
40
54
|
bottom: 9px;
|
|
41
55
|
right: 26px;
|
|
@@ -72,6 +86,12 @@
|
|
|
72
86
|
transform-origin: 100% 100%;
|
|
73
87
|
}
|
|
74
88
|
|
|
89
|
+
&-has-attachments {
|
|
90
|
+
.str-chat__send-button {
|
|
91
|
+
display: block;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
75
95
|
&--send-button {
|
|
76
96
|
background: none;
|
|
77
97
|
border: none;
|
|
@@ -95,11 +115,25 @@
|
|
|
95
115
|
font-size: var(--sm-font);
|
|
96
116
|
padding: 10px 44px 8px 8px;
|
|
97
117
|
|
|
118
|
+
&.str-chat__angular-textarea {
|
|
119
|
+
padding: 10px 35px 8px;
|
|
120
|
+
}
|
|
121
|
+
|
|
98
122
|
&:focus {
|
|
99
123
|
height: 36px;
|
|
100
124
|
}
|
|
101
125
|
}
|
|
102
126
|
|
|
127
|
+
.str-chat-angular__textarea {
|
|
128
|
+
position: relative;
|
|
129
|
+
|
|
130
|
+
+ .str-chat__fileupload-wrapper {
|
|
131
|
+
.rfu-file-upload-button {
|
|
132
|
+
right: 15px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
103
137
|
.str-chat__emojisearch {
|
|
104
138
|
bottom: 100%;
|
|
105
139
|
}
|
package/dist/scss/Thread.scss
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
flex: 1 0 300px;
|
|
4
4
|
min-width: 300px;
|
|
5
5
|
max-width: 300px;
|
|
6
|
-
overflow-y: hidden;
|
|
7
6
|
font-family: var(--second-font);
|
|
8
7
|
overflow: hidden;
|
|
9
8
|
max-height: 100%;
|
|
@@ -224,6 +223,11 @@
|
|
|
224
223
|
}
|
|
225
224
|
}
|
|
226
225
|
}
|
|
226
|
+
|
|
227
|
+
/** Quoted message preview in thread should not be squeezed to less than 100% for better readability */
|
|
228
|
+
.str-chat__input-flat-quoted .quoted-message-preview-content {
|
|
229
|
+
max-width: 100%;
|
|
230
|
+
}
|
|
227
231
|
}
|
|
228
232
|
|
|
229
233
|
.team {
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
display: flex;
|
|
74
74
|
align-items: flex-end;
|
|
75
75
|
margin-bottom: var(--xxs-m);
|
|
76
|
+
cursor: pointer;
|
|
76
77
|
|
|
77
78
|
&-inner {
|
|
78
79
|
display: flex;
|
|
@@ -197,6 +198,11 @@
|
|
|
197
198
|
position: relative;
|
|
198
199
|
cursor: pointer;
|
|
199
200
|
|
|
201
|
+
button {
|
|
202
|
+
border: none;
|
|
203
|
+
background: transparent;
|
|
204
|
+
}
|
|
205
|
+
|
|
200
206
|
svg {
|
|
201
207
|
fill: var(--black);
|
|
202
208
|
opacity: 0.5;
|
|
@@ -18,7 +18,7 @@ $border-color: #00000014;
|
|
|
18
18
|
|
|
19
19
|
$black: #000000;
|
|
20
20
|
$white: #ffffff;
|
|
21
|
-
$grey: #
|
|
21
|
+
$grey: #7a7a7a;
|
|
22
22
|
$darken-grey: #343434;
|
|
23
23
|
$lighten-black: #808080;
|
|
24
24
|
$lighten-grey: #858585;
|
|
@@ -54,6 +54,8 @@ $border-radius: 16px;
|
|
|
54
54
|
--magenta: #{$primary-color};
|
|
55
55
|
--red: #ff0000;
|
|
56
56
|
--faded-red: #d0021b1a;
|
|
57
|
+
--blue: #026afa;
|
|
58
|
+
--faded-blue: #cfe3ff;
|
|
57
59
|
|
|
58
60
|
--dt-bg-team: #{$dt-bg-team};
|
|
59
61
|
|
|
@@ -64,7 +66,7 @@ $border-radius: 16px;
|
|
|
64
66
|
--lighten-grey: #{$lighten-grey};
|
|
65
67
|
|
|
66
68
|
--light-grey: #ebebeb;
|
|
67
|
-
--grey: #{$
|
|
69
|
+
--grey: #{$grey};
|
|
68
70
|
--dark-grey: #{$darken-grey};
|
|
69
71
|
|
|
70
72
|
--green: #28ca42;
|
|
@@ -136,12 +138,10 @@ $border-radius: 16px;
|
|
|
136
138
|
|
|
137
139
|
--bg-gradient-end: #f7f7f7;
|
|
138
140
|
--bg-gradient-start: #fcfcfc;
|
|
139
|
-
--black: #000000;
|
|
140
141
|
--blue-alice: #e9f2ff;
|
|
141
142
|
--border: #00000014; // 14 = 8% opacity; top: x=0, y=-1; bottom: x=0, y=1
|
|
142
143
|
--button-background: #ffffff;
|
|
143
144
|
--button-text: #005fff;
|
|
144
|
-
--grey: #7a7a7a;
|
|
145
145
|
--grey-gainsboro: #dbdbdb;
|
|
146
146
|
--grey-whisper: #ecebeb;
|
|
147
147
|
--highlight: #fbf4dd;
|
|
@@ -151,7 +151,6 @@ $border-radius: 16px;
|
|
|
151
151
|
--shadow-icon: #00000040; // 40 = 25% opacity; x=0, y=0, radius=4
|
|
152
152
|
--targetedMessageBackground: #fbf4dd; // dark mode = #302D22
|
|
153
153
|
--transparent: transparent;
|
|
154
|
-
--white: #ffffff;
|
|
155
154
|
--white-smoke: #f2f2f2;
|
|
156
155
|
--white-snow: #fcfcfc;
|
|
157
156
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connected-user.stories.d.ts","sourceRoot":"","sources":["../../src/stories/connected-user.stories.tsx"],"names":[],"mappings":"AACA,OAAO,+CAA+C,CAAC;AAyFvD,eAAO,MAAM,KAAK,mBAUjB,CAAC;AAEF,eAAO,MAAM,KAAK,mBAUjB,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import '@stream-io/stream-chat-css/dist/css/index.css';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { StreamChat } from 'stream-chat';
|
|
5
|
+
import { Channel, ChannelHeader, ChannelList, Chat, MessageList, useChannelStateContext, Window, } from '../index';
|
|
6
|
+
import { apiKey } from './utils';
|
|
7
|
+
var channelId = import.meta.env.E2E_ADD_MESSAGE_CHANNEL;
|
|
8
|
+
if (!channelId || typeof channelId !== 'string') {
|
|
9
|
+
throw new Error('expected ADD_MESSAGE_CHANNEL');
|
|
10
|
+
}
|
|
11
|
+
var Controls = function () {
|
|
12
|
+
var channel = useChannelStateContext().channel;
|
|
13
|
+
return (React.createElement("div", null,
|
|
14
|
+
React.createElement("button", { "data-testid": 'truncate', onClick: function () { return channel.truncate(); } }, "Truncate"),
|
|
15
|
+
React.createElement("button", { "data-testid": 'add-message', onClick: function () {
|
|
16
|
+
return channel.sendMessage({
|
|
17
|
+
text: 'Hello world!',
|
|
18
|
+
});
|
|
19
|
+
} }, "Add message")));
|
|
20
|
+
};
|
|
21
|
+
// Sort in reverse order to avoid auto-selecting unread channel
|
|
22
|
+
var sort = { last_updated: 1 };
|
|
23
|
+
var chatClient = StreamChat.getInstance(apiKey);
|
|
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) {
|
|
28
|
+
var token = _a.token, userId = _a.userId;
|
|
29
|
+
var _b = useState(false), connected = _b[0], setConnected = _b[1];
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
sharedPromise.then(function () { return chatClient.connectUser({ id: userId }, token); });
|
|
32
|
+
var handleConnectionChange = function (_a) {
|
|
33
|
+
var _b = _a.online, online = _b === void 0 ? false : _b;
|
|
34
|
+
setConnected(online);
|
|
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))))));
|
|
59
|
+
};
|
|
60
|
+
export var User1 = function () {
|
|
61
|
+
var userId = import.meta.env.E2E_TEST_USER_1;
|
|
62
|
+
var token = import.meta.env.E2E_TEST_USER_1_TOKEN;
|
|
63
|
+
if (!userId || typeof userId !== 'string') {
|
|
64
|
+
throw new Error('expected TEST_USER_1');
|
|
65
|
+
}
|
|
66
|
+
if (!token || typeof token !== 'string') {
|
|
67
|
+
throw new Error('expected TEST_USER_1_TOKEN');
|
|
68
|
+
}
|
|
69
|
+
return React.createElement(ConnectedUser, { token: token, userId: userId });
|
|
70
|
+
};
|
|
71
|
+
export var User2 = function () {
|
|
72
|
+
var userId = import.meta.env.E2E_TEST_USER_2;
|
|
73
|
+
var token = import.meta.env.E2E_TEST_USER_2_TOKEN;
|
|
74
|
+
if (!userId || typeof userId !== 'string') {
|
|
75
|
+
throw new Error('expected TEST_USER_2');
|
|
76
|
+
}
|
|
77
|
+
if (!token || typeof token !== 'string') {
|
|
78
|
+
throw new Error('expected TEST_USER_2_TOKEN');
|
|
79
|
+
}
|
|
80
|
+
return React.createElement(ConnectedUser, { token: token, userId: userId });
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hello.stories.d.ts","sourceRoot":"","sources":["../../src/stories/hello.stories.tsx"],"names":[],"mappings":"AACA,OAAO,+CAA+C,CAAC;AA+BvD,eAAO,MAAM,UAAU,mBAmCtB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import '@stream-io/stream-chat-css/dist/css/index.css';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { StreamChat } from 'stream-chat';
|
|
5
|
+
import { Channel, ChannelHeader, ChannelList, Chat, MessageInput, MessageList, Thread, Window, } from '../index';
|
|
6
|
+
import { apiKey } from './utils';
|
|
7
|
+
var channelId = import.meta.env.E2E_ADD_MESSAGE_CHANNEL;
|
|
8
|
+
var userId = import.meta.env.E2E_TEST_USER_1;
|
|
9
|
+
var token = import.meta.env.E2E_TEST_USER_1_TOKEN;
|
|
10
|
+
if (!channelId || typeof channelId !== 'string') {
|
|
11
|
+
throw new Error('expected ADD_MESSAGE_CHANNEL');
|
|
12
|
+
}
|
|
13
|
+
// Sort in reverse order to avoid auto-selecting unread channel
|
|
14
|
+
var sort = { last_updated: 1 };
|
|
15
|
+
var filters = { members: { $in: [userId] }, type: 'messaging' };
|
|
16
|
+
var options = { limit: 10, presence: true, state: true };
|
|
17
|
+
var chatClient = StreamChat.getInstance(apiKey);
|
|
18
|
+
var sharedPromise = Promise.resolve();
|
|
19
|
+
export var BasicSetup = function () {
|
|
20
|
+
var _a = useState(false), connected = _a[0], setConnected = _a[1];
|
|
21
|
+
useEffect(function () {
|
|
22
|
+
sharedPromise.then(function () { return chatClient.connectUser({ id: userId }, token); });
|
|
23
|
+
var handleConnectionChange = function (_a) {
|
|
24
|
+
var _b = _a.online, online = _b === void 0 ? false : _b;
|
|
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
|
+
};
|
|
@@ -0,0 +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;AA2EvD,eAAO,MAAM,wBAAwB,0BAkBpC,CAAC;AAEF,eAAO,MAAM,4BAA4B,0BAoBxC,CAAC"}
|