stream-chat-react-native-core 4.0.0 → 4.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/README.md +1 -13
- package/lib/commonjs/components/Attachment/Attachment.js +17 -16
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js +5 -5
- package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +19 -16
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +9 -9
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +5 -5
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileIcon.js +1 -1
- package/lib/commonjs/components/Attachment/FileIcon.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +124 -122
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +113 -149
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js +46 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/types.js +4 -0
- package/lib/commonjs/{styleguideComponents/Reanimated.js.map → components/Attachment/utils/buildGallery/types.js.map} +0 -0
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js +14 -0
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
- package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +10 -9
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerError.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js +12 -9
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/CameraSelectorIcon.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/FileSelectorIcon.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/ImageSelectorIcon.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +25 -49
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/{CommandsItem.js → AutoCompleteSuggestionCommandIcon.js} +21 -94
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +145 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +248 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +223 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -0
- package/lib/commonjs/components/Avatar/Avatar.js +14 -8
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +11 -9
- package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +304 -203
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +7 -5
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +7 -5
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +13 -31
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js +35 -0
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -0
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +7 -7
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +6 -5
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js +7 -8
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +5 -4
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js +8 -5
- package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +18 -18
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelList/Skeleton.js +15 -14
- package/lib/commonjs/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +2 -2
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js +2 -2
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useConnectionRecovered.js +3 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js +2 -2
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js +3 -3
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js +2 -2
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +96 -63
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelList/utils.js +1 -1
- package/lib/commonjs/components/ChannelList/utils.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +3 -3
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +5 -5
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +6 -6
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +50 -21
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +51 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +5 -5
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +3 -3
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js +16 -7
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js +2 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +9 -5
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js +40 -31
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +91 -59
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +3 -3
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +13 -13
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +32 -17
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +8 -8
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +6 -6
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/commonjs/components/Indicators/EmptyStateIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingDot.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingDots.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +10 -10
- package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js +21 -13
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +1 -1
- package/lib/commonjs/components/Message/Message.js +153 -855
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +7 -7
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +42 -40
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +9 -7
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +35 -23
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +122 -0
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +27 -11
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +6 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +32 -15
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +29 -25
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +8 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +87 -114
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +89 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +208 -27
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +240 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +1 -5
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js +307 -0
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +563 -0
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -0
- package/lib/commonjs/components/Message/utils/messageActions.js +17 -15
- package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/removeReservedFields.js.map +1 -1
- package/lib/commonjs/components/MessageInput/AttachButton.js +7 -5
- package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +4 -4
- package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CooldownTimer.js +78 -0
- package/lib/commonjs/components/MessageInput/CooldownTimer.js.map +1 -0
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +33 -28
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +10 -10
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +18 -23
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +94 -66
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +4 -4
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +9 -7
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js +71 -0
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -0
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +12 -11
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js +63 -0
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -0
- package/lib/commonjs/components/MessageInput/hooks/useCountdown.js +57 -0
- package/lib/commonjs/components/MessageInput/hooks/useCountdown.js.map +1 -0
- package/lib/commonjs/components/MessageList/DateHeader.js +3 -3
- package/lib/commonjs/components/MessageList/DateHeader.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js +5 -4
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +5 -5
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +5 -5
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +5 -5
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +101 -62
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js +7 -7
- package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/commonjs/components/MessageList/NetworkDownIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +8 -6
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +6 -6
- package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +3 -3
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js +24 -11
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js +2 -2
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js +2 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js +11 -10
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js +3 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/{module/components/MessageOverlay/MessageActions.js → commonjs/components/MessageOverlay/MessageActionList.js} +33 -85
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +131 -0
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +100 -85
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +38 -0
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +18 -19
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +32 -35
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js +41 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js +37 -0
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -0
- package/lib/commonjs/components/Reply/Reply.js +26 -20
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/Spinner/Spinner.js +1 -1
- package/lib/commonjs/components/Thread/Thread.js +15 -6
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +14 -13
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/commonjs/components/docs/ListProps.md +1 -1
- package/lib/commonjs/components/docs/data.js +45 -45
- package/lib/commonjs/components/docs/data.js.map +1 -1
- package/lib/commonjs/components/index.js +133 -55
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +3 -3
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +3 -3
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +3 -3
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +3 -3
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +5 -5
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js +3 -3
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +3 -3
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +3 -3
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +3 -3
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +3 -3
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +106 -71
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +9 -5
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js +10 -3
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +6 -20
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js +36 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +105 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +3 -3
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +2 -2
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +50 -50
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +61 -0
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -0
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +3 -3
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +21 -34
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/ThemeContext.js +3 -3
- package/lib/commonjs/contexts/themeContext/ThemeContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +48 -20
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +3 -3
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +4 -4
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +3 -3
- package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/commonjs/contexts/utils/getDisplayName.js.map +1 -1
- package/lib/commonjs/emoji-data/compiled.js +0 -315
- package/lib/commonjs/emoji-data/compiled.js.map +1 -1
- package/lib/commonjs/emoji-data/emojiNames.js +0 -105
- package/lib/commonjs/emoji-data/emojiNames.js.map +1 -1
- package/lib/commonjs/emoji-data/emojis.js +0 -175
- package/lib/commonjs/emoji-data/emojis.js.map +1 -1
- package/lib/commonjs/emoji-data/index.js +2 -2
- package/lib/commonjs/emoji-data/index.js.map +1 -1
- package/lib/commonjs/hooks/useAppStateListener.js +8 -5
- package/lib/commonjs/hooks/useAppStateListener.js.map +1 -1
- package/lib/commonjs/hooks/useIsMountedRef.js +19 -0
- package/lib/commonjs/hooks/useIsMountedRef.js.map +1 -0
- package/lib/commonjs/hooks/useStreami18n.js +5 -2
- package/lib/commonjs/hooks/useStreami18n.js.map +1 -1
- package/lib/commonjs/i18n/en.json +9 -3
- package/lib/commonjs/i18n/fr.json +9 -3
- package/lib/commonjs/i18n/hi.json +9 -3
- package/lib/commonjs/i18n/it.json +9 -3
- package/lib/commonjs/i18n/ja.json +67 -0
- package/lib/commonjs/i18n/ko.json +67 -0
- package/lib/commonjs/i18n/nl.json +9 -3
- package/lib/commonjs/i18n/ru.json +9 -3
- package/lib/commonjs/i18n/tr.json +10 -4
- package/lib/commonjs/icons/ArrowRight.js +1 -1
- package/lib/commonjs/icons/AtMentions.js +1 -1
- package/lib/commonjs/icons/Attach.js +1 -1
- package/lib/commonjs/icons/Audio.js +1 -1
- package/lib/commonjs/icons/CSV.js +1 -1
- package/lib/commonjs/icons/Camera.js +1 -1
- package/lib/commonjs/icons/Check.js +1 -1
- package/lib/commonjs/icons/CheckAll.js +1 -1
- package/lib/commonjs/icons/CheckSend.js +1 -1
- package/lib/commonjs/icons/CircleClose.js +1 -1
- package/lib/commonjs/icons/CirclePlus.js +1 -1
- package/lib/commonjs/icons/CircleRight.js +1 -1
- package/lib/commonjs/icons/Close.js +1 -1
- package/lib/commonjs/icons/Copy.js +1 -1
- package/lib/commonjs/icons/CurveLineLeftUp.js +1 -1
- package/lib/commonjs/icons/DOC.js +1 -1
- package/lib/commonjs/icons/DOCX.js +1 -1
- package/lib/commonjs/icons/Delete.js +1 -1
- package/lib/commonjs/icons/Down.js +1 -1
- package/lib/commonjs/icons/DownloadArrow.js +1 -1
- package/lib/commonjs/icons/DownloadCloud.js +1 -1
- package/lib/commonjs/icons/Edit.js +1 -1
- package/lib/commonjs/icons/Error.js +1 -1
- package/lib/commonjs/icons/Eye.js +1 -1
- package/lib/commonjs/icons/Flag.js +1 -1
- package/lib/commonjs/icons/Folder.js +1 -1
- package/lib/commonjs/icons/GenericFile.js +1 -1
- package/lib/commonjs/icons/GiphyIcon.js +1 -1
- package/lib/commonjs/icons/Grid.js +1 -1
- package/lib/commonjs/icons/Group.js +1 -1
- package/lib/commonjs/icons/HTML.js +1 -1
- package/lib/commonjs/icons/Imgur.js +1 -1
- package/lib/commonjs/icons/LOLReaction.js +1 -1
- package/lib/commonjs/icons/Lightning.js +1 -1
- package/lib/commonjs/icons/Link.js +1 -1
- package/lib/commonjs/icons/Loading.js +1 -1
- package/lib/commonjs/icons/Logo.js +1 -1
- package/lib/commonjs/icons/LoveReaction.js +1 -1
- package/lib/commonjs/icons/MD.js +1 -1
- package/lib/commonjs/icons/MailOpen.js +1 -1
- package/lib/commonjs/icons/MenuPointHorizontal.js +1 -1
- package/lib/commonjs/icons/MenuPointVertical.js +1 -1
- package/lib/commonjs/icons/MessageFlag.js +1 -1
- package/lib/commonjs/icons/MessageIcon.js +1 -1
- package/lib/commonjs/icons/Mute.js +1 -1
- package/lib/commonjs/icons/Notification.js +1 -1
- package/lib/commonjs/icons/ODT.js +1 -1
- package/lib/commonjs/icons/PDF.js +1 -1
- package/lib/commonjs/icons/PPT.js +1 -1
- package/lib/commonjs/icons/PPTX.js +1 -1
- package/lib/commonjs/icons/Picture.js +1 -1
- package/lib/commonjs/icons/Pin.js +42 -0
- package/lib/commonjs/icons/Pin.js.map +1 -0
- package/lib/commonjs/icons/PinHeader.js +38 -0
- package/lib/commonjs/icons/PinHeader.js.map +1 -0
- package/lib/commonjs/icons/RAR.js +1 -1
- package/lib/commonjs/icons/RTF.js +1 -1
- package/lib/commonjs/icons/Refresh.js +1 -1
- package/lib/commonjs/icons/SEVEN_Z.js +1 -1
- package/lib/commonjs/icons/Search.js +1 -1
- package/lib/commonjs/icons/SendRight.js +1 -1
- package/lib/commonjs/icons/SendUp.js +1 -1
- package/lib/commonjs/icons/Share.js +1 -1
- package/lib/commonjs/icons/ShareRightArrow.js +1 -1
- package/lib/commonjs/icons/Smile.js +1 -1
- package/lib/commonjs/icons/Sound.js +1 -1
- package/lib/commonjs/icons/TAR.js +1 -1
- package/lib/commonjs/icons/TXT.js +1 -1
- package/lib/commonjs/icons/ThreadReply.js +1 -1
- package/lib/commonjs/icons/ThumbsDownReaction.js +1 -1
- package/lib/commonjs/icons/ThumbsUpReaction.js +1 -1
- package/lib/commonjs/icons/Time.js +1 -1
- package/lib/commonjs/icons/Unknown.js +1 -1
- package/lib/commonjs/icons/Unpin.js +38 -0
- package/lib/commonjs/icons/Unpin.js.map +1 -0
- package/lib/commonjs/icons/User.js +1 -1
- package/lib/commonjs/icons/UserAdd.js +1 -1
- package/lib/commonjs/icons/UserAdmin.js +62 -0
- package/lib/commonjs/icons/UserAdmin.js.map +1 -0
- package/lib/commonjs/icons/UserDelete.js +1 -1
- package/lib/commonjs/icons/UserMinus.js +1 -1
- package/lib/commonjs/icons/WutReaction.js +1 -1
- package/lib/commonjs/icons/XLS.js +1 -1
- package/lib/commonjs/icons/XLSX.js +1 -1
- package/lib/commonjs/icons/ZIP.js +1 -1
- package/lib/commonjs/icons/index.js +39 -26
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/icons/utils/base.js +2 -2
- package/lib/commonjs/index.js +6 -6
- package/lib/commonjs/init.js +13 -0
- package/lib/commonjs/init.js.map +1 -0
- package/lib/commonjs/mock-builders/api/error.js +1 -1
- package/lib/commonjs/mock-builders/api/queryChannels.js +1 -1
- package/lib/commonjs/mock-builders/api/queryChannels.js.map +1 -1
- package/lib/commonjs/mock-builders/api/sendMessage.js +4 -1
- package/lib/commonjs/mock-builders/api/sendMessage.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/attachment.js +1 -3
- package/lib/commonjs/mock-builders/generator/attachment.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/channel.js +101 -50
- package/lib/commonjs/mock-builders/generator/channel.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/user.js +32 -33
- package/lib/commonjs/mock-builders/generator/user.js.map +1 -1
- package/lib/commonjs/mock-builders/mock.js +3 -3
- package/lib/commonjs/mock-builders/mock.js.map +1 -1
- package/lib/commonjs/mock-builders/native/react-native-mock.js +1 -1
- package/lib/commonjs/mock-builders/native/react-native-mock.js.map +1 -1
- package/lib/commonjs/native.js +1 -7
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/utils/Streami18n.js +10 -0
- package/lib/commonjs/utils/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/date.js +13 -0
- package/lib/commonjs/utils/date.js.map +1 -0
- package/lib/commonjs/utils/getResizedImageUrl.js +37 -0
- package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -0
- package/lib/commonjs/utils/getUrlOfImageAttachment.js +9 -0
- package/lib/commonjs/utils/getUrlOfImageAttachment.js.map +1 -0
- package/lib/commonjs/utils/utils.js +39 -19
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +17 -16
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js +5 -5
- package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +19 -16
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +9 -9
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +5 -5
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/FileIcon.js +1 -1
- package/lib/module/components/Attachment/FileIcon.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +124 -122
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +113 -149
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js +46 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/types.js +4 -0
- package/lib/module/{styleguideComponents/Reanimated.js.map → components/Attachment/utils/buildGallery/types.js.map} +0 -0
- package/lib/module/components/Attachment/utils/getAspectRatio.js +14 -0
- package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -0
- package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
- package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +10 -9
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerError.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js +12 -9
- package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/CameraSelectorIcon.js +1 -1
- package/lib/module/components/AttachmentPicker/components/FileSelectorIcon.js +1 -1
- package/lib/module/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +1 -1
- package/lib/module/components/AttachmentPicker/components/ImageSelectorIcon.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +25 -49
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/{CommandsItem.js → AutoCompleteSuggestionCommandIcon.js} +21 -94
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +145 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +248 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +223 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -0
- package/lib/module/components/Avatar/Avatar.js +14 -8
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +11 -9
- package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +304 -203
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js +7 -5
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +7 -5
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +13 -31
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js +35 -0
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -0
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +7 -7
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +6 -5
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js +7 -8
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +5 -4
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js +8 -5
- package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +18 -18
- package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/module/components/ChannelList/Skeleton.js +15 -14
- package/lib/module/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +2 -2
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js +2 -2
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useConnectionRecovered.js +3 -1
- package/lib/module/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js +2 -2
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js +3 -3
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js +2 -2
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +96 -63
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelList/utils.js +1 -1
- package/lib/module/components/ChannelList/utils.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +3 -3
- package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +5 -5
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +6 -6
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +50 -21
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +51 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +5 -5
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +3 -3
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js +16 -7
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js +2 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +9 -5
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js +40 -31
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +91 -59
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +3 -3
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +13 -13
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +32 -17
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +8 -8
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js +6 -6
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/module/components/Indicators/EmptyStateIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingDot.js +1 -1
- package/lib/module/components/Indicators/LoadingDots.js +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js.map +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +10 -10
- package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js +21 -13
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +1 -1
- package/lib/module/components/Message/Message.js +153 -855
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +7 -7
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +42 -40
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +9 -7
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +35 -23
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +122 -0
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/MessageReplies.js +27 -11
- package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +6 -6
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +32 -15
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +29 -25
- package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +8 -4
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +87 -114
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +89 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +208 -27
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +240 -0
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
- package/lib/module/components/Message/hooks/useCreateMessageContext.js +1 -5
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js +307 -0
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -0
- package/lib/module/components/Message/hooks/useMessageActions.js +563 -0
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -0
- package/lib/module/components/Message/utils/messageActions.js +17 -15
- package/lib/module/components/Message/utils/messageActions.js.map +1 -1
- package/lib/module/components/Message/utils/removeReservedFields.js.map +1 -1
- package/lib/module/components/MessageInput/AttachButton.js +7 -5
- package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +4 -4
- package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/module/components/MessageInput/CooldownTimer.js +78 -0
- package/lib/module/components/MessageInput/CooldownTimer.js.map +1 -0
- package/lib/module/components/MessageInput/FileUploadPreview.js +33 -28
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +10 -10
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +18 -23
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +94 -66
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +4 -4
- package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendButton.js +9 -7
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js +71 -0
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -0
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +12 -11
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/module/components/MessageInput/UploadProgressIndicator.js +1 -1
- package/lib/module/components/MessageInput/hooks/useCooldown.js +63 -0
- package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -0
- package/lib/module/components/MessageInput/hooks/useCountdown.js +57 -0
- package/lib/module/components/MessageInput/hooks/useCountdown.js.map +1 -0
- package/lib/module/components/MessageList/DateHeader.js +3 -3
- package/lib/module/components/MessageList/DateHeader.js.map +1 -1
- package/lib/module/components/MessageList/InlineDateSeparator.js +5 -4
- package/lib/module/components/MessageList/InlineDateSeparator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +5 -5
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +5 -5
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +5 -5
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineUnreadIndicator.js +1 -1
- package/lib/module/components/MessageList/MessageList.js +101 -62
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/MessageSystem.js +7 -7
- package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/module/components/MessageList/NetworkDownIndicator.js +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +8 -6
- package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +6 -6
- package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicatorContainer.js +3 -3
- package/lib/module/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js +24 -11
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useTypingString.js +2 -2
- package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/module/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js +2 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/module/components/MessageList/utils/getGroupStyles.js +11 -10
- package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js +3 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/{commonjs/components/MessageOverlay/MessageActions.js → module/components/MessageOverlay/MessageActionList.js} +33 -85
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -0
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +131 -0
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -0
- package/lib/module/components/MessageOverlay/MessageOverlay.js +100 -85
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js +38 -0
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +1 -0
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +18 -19
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +32 -35
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js +41 -0
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js +37 -0
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -0
- package/lib/module/components/Reply/Reply.js +26 -20
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/Spinner/Spinner.js +1 -1
- package/lib/module/components/Thread/Thread.js +15 -6
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +14 -13
- package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/module/components/docs/ListProps.md +1 -1
- package/lib/module/components/docs/data.js +45 -45
- package/lib/module/components/docs/data.js.map +1 -1
- package/lib/module/components/index.js +133 -55
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +3 -3
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +3 -3
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +3 -3
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +3 -3
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +5 -5
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js +3 -3
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +3 -3
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +3 -3
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +3 -3
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +3 -3
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +106 -71
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +9 -5
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js +10 -3
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +6 -20
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js +36 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +105 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
- package/lib/module/contexts/messagesContext/MessagesContext.js +3 -3
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +2 -2
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +50 -50
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +61 -0
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -0
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +3 -3
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +21 -34
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/themeContext/ThemeContext.js +3 -3
- package/lib/module/contexts/themeContext/ThemeContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +48 -20
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +3 -3
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +4 -4
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +3 -3
- package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/module/contexts/utils/getDisplayName.js.map +1 -1
- package/lib/module/emoji-data/compiled.js +0 -315
- package/lib/module/emoji-data/compiled.js.map +1 -1
- package/lib/module/emoji-data/emojiNames.js +0 -105
- package/lib/module/emoji-data/emojiNames.js.map +1 -1
- package/lib/module/emoji-data/emojis.js +0 -175
- package/lib/module/emoji-data/emojis.js.map +1 -1
- package/lib/module/emoji-data/index.js +2 -2
- package/lib/module/emoji-data/index.js.map +1 -1
- package/lib/module/hooks/useAppStateListener.js +8 -5
- package/lib/module/hooks/useAppStateListener.js.map +1 -1
- package/lib/module/hooks/useIsMountedRef.js +19 -0
- package/lib/module/hooks/useIsMountedRef.js.map +1 -0
- package/lib/module/hooks/useStreami18n.js +5 -2
- package/lib/module/hooks/useStreami18n.js.map +1 -1
- package/lib/module/i18n/en.json +9 -3
- package/lib/module/i18n/fr.json +9 -3
- package/lib/module/i18n/hi.json +9 -3
- package/lib/module/i18n/it.json +9 -3
- package/lib/module/i18n/ja.json +67 -0
- package/lib/module/i18n/ko.json +67 -0
- package/lib/module/i18n/nl.json +9 -3
- package/lib/module/i18n/ru.json +9 -3
- package/lib/module/i18n/tr.json +10 -4
- package/lib/module/icons/ArrowRight.js +1 -1
- package/lib/module/icons/AtMentions.js +1 -1
- package/lib/module/icons/Attach.js +1 -1
- package/lib/module/icons/Audio.js +1 -1
- package/lib/module/icons/CSV.js +1 -1
- package/lib/module/icons/Camera.js +1 -1
- package/lib/module/icons/Check.js +1 -1
- package/lib/module/icons/CheckAll.js +1 -1
- package/lib/module/icons/CheckSend.js +1 -1
- package/lib/module/icons/CircleClose.js +1 -1
- package/lib/module/icons/CirclePlus.js +1 -1
- package/lib/module/icons/CircleRight.js +1 -1
- package/lib/module/icons/Close.js +1 -1
- package/lib/module/icons/Copy.js +1 -1
- package/lib/module/icons/CurveLineLeftUp.js +1 -1
- package/lib/module/icons/DOC.js +1 -1
- package/lib/module/icons/DOCX.js +1 -1
- package/lib/module/icons/Delete.js +1 -1
- package/lib/module/icons/Down.js +1 -1
- package/lib/module/icons/DownloadArrow.js +1 -1
- package/lib/module/icons/DownloadCloud.js +1 -1
- package/lib/module/icons/Edit.js +1 -1
- package/lib/module/icons/Error.js +1 -1
- package/lib/module/icons/Eye.js +1 -1
- package/lib/module/icons/Flag.js +1 -1
- package/lib/module/icons/Folder.js +1 -1
- package/lib/module/icons/GenericFile.js +1 -1
- package/lib/module/icons/GiphyIcon.js +1 -1
- package/lib/module/icons/Grid.js +1 -1
- package/lib/module/icons/Group.js +1 -1
- package/lib/module/icons/HTML.js +1 -1
- package/lib/module/icons/Imgur.js +1 -1
- package/lib/module/icons/LOLReaction.js +1 -1
- package/lib/module/icons/Lightning.js +1 -1
- package/lib/module/icons/Link.js +1 -1
- package/lib/module/icons/Loading.js +1 -1
- package/lib/module/icons/Logo.js +1 -1
- package/lib/module/icons/LoveReaction.js +1 -1
- package/lib/module/icons/MD.js +1 -1
- package/lib/module/icons/MailOpen.js +1 -1
- package/lib/module/icons/MenuPointHorizontal.js +1 -1
- package/lib/module/icons/MenuPointVertical.js +1 -1
- package/lib/module/icons/MessageFlag.js +1 -1
- package/lib/module/icons/MessageIcon.js +1 -1
- package/lib/module/icons/Mute.js +1 -1
- package/lib/module/icons/Notification.js +1 -1
- package/lib/module/icons/ODT.js +1 -1
- package/lib/module/icons/PDF.js +1 -1
- package/lib/module/icons/PPT.js +1 -1
- package/lib/module/icons/PPTX.js +1 -1
- package/lib/module/icons/Picture.js +1 -1
- package/lib/module/icons/Pin.js +42 -0
- package/lib/module/icons/Pin.js.map +1 -0
- package/lib/module/icons/PinHeader.js +38 -0
- package/lib/module/icons/PinHeader.js.map +1 -0
- package/lib/module/icons/RAR.js +1 -1
- package/lib/module/icons/RTF.js +1 -1
- package/lib/module/icons/Refresh.js +1 -1
- package/lib/module/icons/SEVEN_Z.js +1 -1
- package/lib/module/icons/Search.js +1 -1
- package/lib/module/icons/SendRight.js +1 -1
- package/lib/module/icons/SendUp.js +1 -1
- package/lib/module/icons/Share.js +1 -1
- package/lib/module/icons/ShareRightArrow.js +1 -1
- package/lib/module/icons/Smile.js +1 -1
- package/lib/module/icons/Sound.js +1 -1
- package/lib/module/icons/TAR.js +1 -1
- package/lib/module/icons/TXT.js +1 -1
- package/lib/module/icons/ThreadReply.js +1 -1
- package/lib/module/icons/ThumbsDownReaction.js +1 -1
- package/lib/module/icons/ThumbsUpReaction.js +1 -1
- package/lib/module/icons/Time.js +1 -1
- package/lib/module/icons/Unknown.js +1 -1
- package/lib/module/icons/Unpin.js +38 -0
- package/lib/module/icons/Unpin.js.map +1 -0
- package/lib/module/icons/User.js +1 -1
- package/lib/module/icons/UserAdd.js +1 -1
- package/lib/module/icons/UserAdmin.js +62 -0
- package/lib/module/icons/UserAdmin.js.map +1 -0
- package/lib/module/icons/UserDelete.js +1 -1
- package/lib/module/icons/UserMinus.js +1 -1
- package/lib/module/icons/WutReaction.js +1 -1
- package/lib/module/icons/XLS.js +1 -1
- package/lib/module/icons/XLSX.js +1 -1
- package/lib/module/icons/ZIP.js +1 -1
- package/lib/module/icons/index.js +39 -26
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/icons/utils/base.js +2 -2
- package/lib/module/index.js +6 -6
- package/lib/module/init.js +13 -0
- package/lib/module/init.js.map +1 -0
- package/lib/module/mock-builders/api/error.js +1 -1
- package/lib/module/mock-builders/api/queryChannels.js +1 -1
- package/lib/module/mock-builders/api/queryChannels.js.map +1 -1
- package/lib/module/mock-builders/api/sendMessage.js +4 -1
- package/lib/module/mock-builders/api/sendMessage.js.map +1 -1
- package/lib/module/mock-builders/generator/attachment.js +1 -3
- package/lib/module/mock-builders/generator/attachment.js.map +1 -1
- package/lib/module/mock-builders/generator/channel.js +101 -50
- package/lib/module/mock-builders/generator/channel.js.map +1 -1
- package/lib/module/mock-builders/generator/user.js +32 -33
- package/lib/module/mock-builders/generator/user.js.map +1 -1
- package/lib/module/mock-builders/mock.js +3 -3
- package/lib/module/mock-builders/mock.js.map +1 -1
- package/lib/module/mock-builders/native/react-native-mock.js +1 -1
- package/lib/module/mock-builders/native/react-native-mock.js.map +1 -1
- package/lib/module/native.js +1 -7
- package/lib/module/native.js.map +1 -1
- package/lib/module/utils/Streami18n.js +10 -0
- package/lib/module/utils/Streami18n.js.map +1 -1
- package/lib/module/utils/date.js +13 -0
- package/lib/module/utils/date.js.map +1 -0
- package/lib/module/utils/getResizedImageUrl.js +37 -0
- package/lib/module/utils/getResizedImageUrl.js.map +1 -0
- package/lib/module/utils/getUrlOfImageAttachment.js +9 -0
- package/lib/module/utils/getUrlOfImageAttachment.js.map +1 -0
- package/lib/module/utils/utils.js +39 -19
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +6 -6
- package/lib/typescript/components/Attachment/AttachmentActions.d.ts +5 -5
- package/lib/typescript/components/Attachment/Card.d.ts +7 -5
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +6 -6
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +4 -4
- package/lib/typescript/components/Attachment/Gallery.d.ts +19 -6
- package/lib/typescript/components/Attachment/Giphy.d.ts +7 -7
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +23 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +7 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +7 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +7 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +10 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +137 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/types.d.ts +23 -0
- package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +9 -0
- package/lib/typescript/components/Attachment/utils/getGalleryImageBorderRadius.d.ts +22 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +10 -4
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.d.ts +5 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +8 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +10 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +21 -0
- package/lib/typescript/components/Avatar/Avatar.d.ts +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +13 -16
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +3 -70
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +3 -126
- package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +7 -0
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateThreadContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateTypingContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +15 -15
- package/lib/typescript/components/ChannelList/ChannelListMessenger.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useAddedToChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelDeleted.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelHidden.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelTruncated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelUpdated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelVisible.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useConnectionRecovered.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessage.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useUserPresence.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +11 -9
- package/lib/typescript/components/ChannelList/utils.d.ts +7 -7
- package/lib/typescript/components/ChannelPreview/ChannelAvatar.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +7 -7
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +4 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +6 -6
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +9 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewTitle.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts +15 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts +4 -4
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +5 -5
- package/lib/typescript/components/Chat/Chat.d.ts +3 -3
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useMutedUsers.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +13 -10
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.d.ts +1 -0
- package/lib/typescript/components/Indicators/LoadingErrorIndicator.d.ts +1 -1
- package/lib/typescript/components/KeyboardCompatibleView/KeyboardCompatibleView.d.ts +2 -1
- package/lib/typescript/components/Message/Message.d.ts +14 -13
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +5 -5
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +6 -6
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +8 -8
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +8 -0
- package/lib/typescript/components/Message/MessageSimple/MessageReplies.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageRepliesAvatars.d.ts +3 -3
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +7 -6
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +5 -4
- package/lib/typescript/components/Message/MessageSimple/utils/parseLinks.d.ts +7 -0
- package/lib/typescript/components/Message/MessageSimple/utils/parseLinks.test.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +21 -6
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.test.d.ts +1 -0
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +15 -0
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +26 -0
- package/lib/typescript/components/Message/utils/messageActions.d.ts +22 -21
- package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +2 -2
- package/lib/typescript/components/MessageInput/AttachButton.d.ts +5 -5
- package/lib/typescript/components/MessageInput/CommandsButton.d.ts +5 -5
- package/lib/typescript/components/MessageInput/CooldownTimer.d.ts +10 -0
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/ImageUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/InputButtons.d.ts +5 -5
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +4 -4
- package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +5 -5
- package/lib/typescript/components/MessageInput/SendButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/SendMessageDisallowedIndicator.d.ts +1 -0
- package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts +2 -2
- package/lib/typescript/components/MessageInput/hooks/useCooldown.d.ts +9 -0
- package/lib/typescript/components/MessageInput/hooks/useCountdown.d.ts +8 -0
- package/lib/typescript/components/MessageList/InlineLoadingMoreIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreRecentIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreThreadIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/MessageList.d.ts +8 -7
- package/lib/typescript/components/MessageList/MessageSystem.d.ts +5 -5
- package/lib/typescript/components/MessageList/TypingIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/TypingIndicatorContainer.d.ts +4 -4
- package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +6 -5
- package/lib/typescript/components/MessageList/hooks/useTypingString.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/filterTypingUsers.d.ts +3 -3
- package/lib/typescript/components/MessageList/utils/getDateSeparators.d.ts +4 -4
- package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +5 -5
- package/lib/typescript/components/MessageList/utils/getLastReceivedMessage.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +8 -5
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +12 -0
- package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts +21 -0
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +6 -6
- package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts +6 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +6 -7
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +3 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts +7 -0
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +12 -0
- package/lib/typescript/components/Reply/Reply.d.ts +5 -5
- package/lib/typescript/components/Thread/Thread.d.ts +8 -8
- package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts +2 -2
- package/lib/typescript/components/index.d.ts +13 -7
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +2 -2
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +39 -40
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +30 -22
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +19 -19
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +17 -17
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +11 -11
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +8 -8
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +2 -2
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +12 -16
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +53 -42
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +3 -3
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +3 -3
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +31 -32
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts +12 -0
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts +1 -0
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +77 -166
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +15 -8
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts +2 -2
- package/lib/typescript/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.d.ts +25 -0
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +8 -8
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +29 -28
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +46 -17
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +10 -10
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +2 -2
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts +8 -8
- package/lib/typescript/contexts/utils/getDisplayName.d.ts +2 -2
- package/lib/typescript/hooks/useIsMountedRef.d.ts +20 -0
- package/lib/typescript/i18n/en.json +9 -3
- package/lib/typescript/i18n/fr.json +9 -3
- package/lib/typescript/i18n/hi.json +9 -3
- package/lib/typescript/i18n/it.json +9 -3
- package/lib/typescript/i18n/ja.json +67 -0
- package/lib/typescript/i18n/ko.json +67 -0
- package/lib/typescript/i18n/nl.json +9 -3
- package/lib/typescript/i18n/ru.json +9 -3
- package/lib/typescript/i18n/tr.json +10 -4
- package/lib/typescript/icons/{Left.d.ts → Pin.d.ts} +1 -1
- package/lib/typescript/icons/PinHeader.d.ts +3 -0
- package/lib/typescript/icons/{Right.d.ts → Unpin.d.ts} +1 -1
- package/lib/typescript/icons/UserAdmin.d.ts +3 -0
- package/lib/typescript/icons/index.d.ts +3 -2
- package/lib/typescript/init.d.ts +2 -0
- package/lib/typescript/native.d.ts +1 -9
- package/lib/typescript/types/types.d.ts +16 -13
- package/lib/typescript/utils/Streami18n.d.ts +17 -9
- package/lib/typescript/utils/date.d.ts +2 -0
- package/lib/typescript/utils/getResizedImageUrl.d.ts +20 -0
- package/lib/typescript/utils/getUrlOfImageAttachment.d.ts +7 -0
- package/lib/typescript/utils/utils.d.ts +36 -30
- package/package.json +15 -20
- package/src/components/Attachment/Attachment.tsx +20 -61
- package/src/components/Attachment/AttachmentActions.tsx +17 -57
- package/src/components/Attachment/Card.tsx +22 -52
- package/src/components/Attachment/FileAttachment.tsx +16 -51
- package/src/components/Attachment/FileAttachmentGroup.tsx +16 -57
- package/src/components/Attachment/FileIcon.tsx +2 -2
- package/src/components/Attachment/Gallery.tsx +209 -241
- package/src/components/Attachment/Giphy.tsx +84 -128
- package/src/components/Attachment/__tests__/Attachment.test.js +27 -19
- package/src/components/Attachment/__tests__/Gallery.test.js +233 -0
- package/src/components/Attachment/__tests__/buildGallery.test.js +131 -0
- package/src/components/Attachment/utils/buildGallery/buildGallery.ts +77 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +91 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +99 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +66 -0
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +48 -0
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +188 -0
- package/src/components/Attachment/utils/buildGallery/types.ts +27 -0
- package/src/components/Attachment/utils/getAspectRatio.ts +21 -0
- package/src/components/Attachment/utils/getGalleryImageBorderRadius.ts +71 -0
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +4 -2
- package/src/components/AttachmentPicker/components/AttachmentSelectionBar.tsx +15 -3
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +66 -96
- package/src/components/AutoCompleteInput/{CommandsItem.tsx → AutoCompleteSuggestionCommandIcon.tsx} +7 -59
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +102 -0
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +149 -0
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +209 -0
- package/src/components/AutoCompleteInput/__tests__/AutoCompleteInput.test.js +10 -16
- package/src/components/Avatar/Avatar.tsx +8 -11
- package/src/components/Avatar/GroupAvatar.tsx +7 -21
- package/src/components/Avatar/__tests__/Avatar.test.js +2 -33
- package/src/components/Channel/Channel.tsx +495 -477
- package/src/components/Channel/__tests__/Channel.test.js +63 -100
- package/src/components/Channel/__tests__/ownCapabilities.test.js +376 -0
- package/src/components/Channel/hooks/useCreateChannelContext.ts +11 -25
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +54 -69
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +17 -49
- package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +39 -0
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +16 -32
- package/src/components/Channel/hooks/useCreateThreadContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateTypingContext.ts +4 -19
- package/src/components/ChannelList/ChannelList.tsx +36 -58
- package/src/components/ChannelList/ChannelListFooterLoadingIndicator.tsx +2 -3
- package/src/components/ChannelList/ChannelListHeaderErrorIndicator.tsx +3 -7
- package/src/components/ChannelList/ChannelListHeaderNetworkDownIndicator.tsx +5 -2
- package/src/components/ChannelList/ChannelListLoadingIndicator.tsx +5 -1
- package/src/components/ChannelList/ChannelListMessenger.tsx +22 -74
- package/src/components/ChannelList/Skeleton.tsx +2 -1
- package/src/components/ChannelList/__tests__/ChannelList.test.js +75 -16
- package/src/components/ChannelList/__tests__/ChannelListMessenger.test.js +46 -14
- package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +17 -39
- package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +17 -39
- package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +17 -39
- package/src/components/ChannelList/hooks/listeners/useConnectionRecovered.ts +8 -20
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +13 -36
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +17 -39
- package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +11 -33
- package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +5 -21
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +95 -70
- package/src/components/ChannelList/utils.ts +9 -42
- package/src/components/ChannelPreview/ChannelAvatar.tsx +6 -29
- package/src/components/ChannelPreview/ChannelPreview.tsx +21 -54
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +14 -24
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +39 -56
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +50 -0
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +10 -30
- package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +7 -28
- package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +7 -27
- package/src/components/ChannelPreview/__tests__/ChannelPreview.test.js +16 -22
- package/src/components/ChannelPreview/__tests__/ChannelPreviewMessenger.test.js +23 -14
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +15 -30
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +8 -30
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +9 -30
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +31 -81
- package/src/components/Chat/Chat.tsx +19 -44
- package/src/components/Chat/__tests__/Chat.test.js +12 -47
- package/src/components/Chat/hooks/useCreateChatContext.ts +4 -19
- package/src/components/Chat/hooks/useIsOnline.ts +45 -56
- package/src/components/Chat/hooks/useMutedUsers.ts +5 -20
- package/src/components/ImageGallery/ImageGallery.tsx +110 -86
- package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +1 -2
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +20 -15
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +45 -25
- package/src/components/ImageGallery/components/ImageGrid.tsx +47 -33
- package/src/components/ImageGallery/components/ImageGridHandle.tsx +1 -0
- package/src/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.tsx +31 -0
- package/src/components/Indicators/LoadingErrorIndicator.tsx +1 -1
- package/src/components/Indicators/LoadingIndicator.tsx +1 -2
- package/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx +9 -2
- package/src/components/Message/Message.tsx +196 -688
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +14 -56
- package/src/components/Message/MessageSimple/MessageContent.tsx +42 -87
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +24 -63
- package/src/components/Message/MessageSimple/MessageFooter.tsx +60 -84
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +109 -0
- package/src/components/Message/MessageSimple/MessageReplies.tsx +19 -60
- package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +7 -29
- package/src/components/Message/MessageSimple/MessageSimple.tsx +64 -78
- package/src/components/Message/MessageSimple/MessageStatus.tsx +35 -88
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +24 -66
- package/src/components/Message/MessageSimple/ReactionList.tsx +110 -163
- package/src/components/Message/MessageSimple/__tests__/Message.test.js +24 -258
- package/src/components/Message/MessageSimple/__tests__/MessageAvatar.test.js +9 -8
- package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +63 -46
- package/src/components/Message/MessageSimple/__tests__/MessagePinnedHeader.test.js +53 -0
- package/src/components/Message/MessageSimple/__tests__/MessageReplies.test.js +13 -9
- package/src/components/Message/MessageSimple/__tests__/MessageStatus.test.js +11 -47
- package/src/components/Message/MessageSimple/__tests__/MessageTextContainer.test.js +2 -2
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageAvatar.test.js.snap +35 -22
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessagePinnedHeader.test.js.snap +80 -0
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageReplies.test.js.snap +72 -46
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageStatus.test.js.snap +77 -48
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageTextContainer.test.js.snap +6 -18
- package/src/components/Message/MessageSimple/utils/parseLinks.test.ts +100 -0
- package/src/components/Message/MessageSimple/utils/parseLinks.ts +95 -0
- package/src/components/Message/MessageSimple/utils/renderText.test.tsx +70 -0
- package/src/components/Message/MessageSimple/utils/renderText.tsx +138 -63
- package/src/components/Message/hooks/useCreateMessageContext.ts +5 -26
- package/src/components/Message/hooks/useMessageActionHandlers.ts +157 -0
- package/src/components/Message/hooks/useMessageActions.tsx +371 -0
- package/src/components/Message/utils/messageActions.ts +53 -54
- package/src/components/Message/utils/removeReservedFields.ts +3 -18
- package/src/components/MessageInput/AttachButton.tsx +15 -57
- package/src/components/MessageInput/CommandsButton.tsx +16 -58
- package/src/components/MessageInput/CooldownTimer.tsx +67 -0
- package/src/components/MessageInput/FileUploadPreview.tsx +86 -118
- package/src/components/MessageInput/ImageUploadPreview.tsx +15 -58
- package/src/components/MessageInput/InputButtons.tsx +17 -64
- package/src/components/MessageInput/MessageInput.tsx +83 -97
- package/src/components/MessageInput/MoreOptionsButton.tsx +14 -56
- package/src/components/MessageInput/SendButton.tsx +14 -55
- package/src/components/MessageInput/SendMessageDisallowedIndicator.tsx +47 -0
- package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +6 -21
- package/src/components/MessageInput/__tests__/AttachButton.test.js +2 -2
- package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +193 -97
- package/src/components/MessageInput/__tests__/ImageUploadPreview.test.js +35 -35
- package/src/components/MessageInput/__tests__/MessageInput.test.js +29 -17
- package/src/components/MessageInput/__tests__/SendButton.test.js +2 -2
- package/src/components/MessageInput/__tests__/UploadProgressIndicator.test.js +2 -2
- package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap +134 -52
- package/src/components/MessageInput/__tests__/__snapshots__/FileUploadPreview.test.js.snap +3955 -1647
- package/src/components/MessageInput/__tests__/__snapshots__/ImageUploadPreview.test.js.snap +1964 -1464
- package/src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap +633 -326
- package/src/components/MessageInput/__tests__/__snapshots__/SendButton.test.js.snap +224 -124
- package/src/components/MessageInput/__tests__/__snapshots__/UploadProgressIndicator.test.js.snap +85 -17
- package/src/components/MessageInput/hooks/useCooldown.ts +48 -0
- package/src/components/MessageInput/hooks/useCountdown.ts +48 -0
- package/src/components/MessageList/DateHeader.tsx +2 -2
- package/src/components/MessageList/InlineDateSeparator.tsx +5 -2
- package/src/components/MessageList/InlineLoadingMoreIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreRecentIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreThreadIndicator.tsx +3 -18
- package/src/components/MessageList/MessageList.tsx +181 -159
- package/src/components/MessageList/MessageSystem.tsx +7 -28
- package/src/components/MessageList/ScrollToBottomButton.tsx +6 -1
- package/src/components/MessageList/TypingIndicator.tsx +4 -20
- package/src/components/MessageList/TypingIndicatorContainer.tsx +14 -47
- package/src/components/MessageList/__tests__/MessageList.test.js +231 -152
- package/src/components/MessageList/__tests__/MessageSystem.test.js +3 -3
- package/src/components/MessageList/__tests__/ScrollToBottomButton.test.js +13 -8
- package/src/components/MessageList/__tests__/TypingIndicator.test.js +14 -97
- package/src/components/MessageList/__tests__/__snapshots__/MessageSystem.test.js.snap +9 -4
- package/src/components/MessageList/__tests__/__snapshots__/ScrollToBottomButton.test.js.snap +78 -32
- package/src/components/MessageList/__tests__/__snapshots__/TypingIndicator.test.js.snap +60 -57
- package/src/components/MessageList/hooks/useMessageList.ts +39 -62
- package/src/components/MessageList/hooks/useTypingString.ts +6 -22
- package/src/components/MessageList/utils/filterTypingUsers.ts +7 -28
- package/src/components/MessageList/utils/getDateSeparators.ts +10 -30
- package/src/components/MessageList/utils/getGroupStyles.ts +23 -44
- package/src/components/MessageList/utils/getLastReceivedMessage.ts +9 -19
- package/src/components/MessageList/utils/getReadStates.ts +5 -20
- package/src/components/MessageOverlay/MessageActionList.tsx +170 -0
- package/src/components/MessageOverlay/MessageActionListItem.tsx +124 -0
- package/src/components/MessageOverlay/MessageOverlay.tsx +264 -268
- package/src/components/MessageOverlay/OverlayBackdrop.tsx +18 -0
- package/src/components/MessageOverlay/OverlayReactionList.tsx +24 -82
- package/src/components/MessageOverlay/OverlayReactions.tsx +12 -8
- package/src/components/MessageOverlay/OverlayReactionsAvatar.tsx +27 -0
- package/src/components/MessageOverlay/hooks/useMessageActionAnimation.tsx +44 -0
- package/src/components/Reply/Reply.tsx +44 -81
- package/src/components/Thread/Thread.tsx +31 -57
- package/src/components/Thread/__tests__/Thread.test.js +58 -77
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +874 -1011
- package/src/components/Thread/components/ThreadFooterComponent.tsx +13 -49
- package/src/components/docs/ListProps.md +1 -1
- package/src/components/docs/data.js +38 -37
- package/src/components/index.ts +13 -7
- package/src/contexts/activeChannelsRefContext/ActiveChannelsRefContext.tsx +1 -2
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +10 -9
- package/src/contexts/channelContext/ChannelContext.tsx +43 -79
- package/src/contexts/channelsContext/ChannelsContext.tsx +37 -63
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +39 -117
- package/src/contexts/channelsStateContext/useChannelState.ts +29 -61
- package/src/contexts/chatContext/ChatContext.tsx +15 -51
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +13 -56
- package/src/contexts/keyboardContext/KeyboardContext.tsx +13 -8
- package/src/contexts/messageContext/MessageContext.tsx +16 -57
- package/src/contexts/messageInputContext/MessageInputContext.tsx +146 -157
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +13 -26
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +15 -34
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +41 -97
- package/src/contexts/messageOverlayContext/hooks/useResettableState.test.tsx +46 -0
- package/src/contexts/messageOverlayContext/hooks/useResettableState.ts +22 -0
- package/src/contexts/messagesContext/MessagesContext.tsx +96 -234
- package/src/contexts/overlayContext/OverlayContext.tsx +35 -35
- package/src/contexts/overlayContext/OverlayProvider.tsx +52 -62
- package/src/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.tsx +38 -0
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +14 -55
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +59 -80
- package/src/contexts/suggestionsContext/__tests__/Suggestions.test.js +4 -2
- package/src/contexts/themeContext/ThemeContext.tsx +1 -0
- package/src/contexts/themeContext/utils/theme.ts +92 -36
- package/src/contexts/threadContext/ThreadContext.tsx +14 -48
- package/src/contexts/translationContext/TranslationContext.tsx +15 -10
- package/src/contexts/typingContext/TypingContext.tsx +12 -46
- package/src/contexts/utils/getDisplayName.ts +3 -1
- package/src/emoji-data/compiled.ts +1830 -9609
- package/src/emoji-data/emojiNames.ts +0 -140
- package/src/emoji-data/emojis.ts +0 -210
- package/src/emoji-data/index.js +1 -1
- package/src/hooks/useAppStateListener.ts +26 -12
- package/src/hooks/useIsMountedRef.ts +36 -0
- package/src/hooks/useStreami18n.ts +5 -3
- package/src/i18n/en.json +9 -3
- package/src/i18n/fr.json +9 -3
- package/src/i18n/hi.json +9 -3
- package/src/i18n/it.json +9 -3
- package/src/i18n/ja.json +67 -0
- package/src/i18n/ko.json +67 -0
- package/src/i18n/nl.json +9 -3
- package/src/i18n/ru.json +9 -3
- package/src/i18n/tr.json +10 -4
- package/src/icons/Pin.tsx +17 -0
- package/src/icons/PinHeader.tsx +12 -0
- package/src/icons/Unpin.tsx +12 -0
- package/src/icons/UserAdmin.tsx +23 -0
- package/src/icons/index.ts +3 -2
- package/src/init.ts +5 -0
- package/src/mock-builders/api/queryChannels.js +1 -1
- package/src/mock-builders/api/sendMessage.js +3 -1
- package/src/mock-builders/generator/attachment.js +0 -2
- package/src/mock-builders/generator/channel.js +101 -46
- package/src/mock-builders/generator/user.js +33 -26
- package/src/mock-builders/mock.js +2 -2
- package/src/mock-builders/native/react-native-mock.js +1 -1
- package/src/native.ts +2 -13
- package/src/types/types.ts +16 -18
- package/src/utils/Streami18n.ts +12 -6
- package/src/utils/__tests__/Streami18n.test.js +9 -45
- package/src/utils/__tests__/getResizedImageUrl.test.js +57 -0
- package/src/utils/__tests__/utils.test.js +19 -0
- package/src/utils/date.ts +4 -0
- package/src/utils/getResizedImageUrl.ts +59 -0
- package/src/utils/getUrlOfImageAttachment.ts +10 -0
- package/src/utils/utils.ts +97 -142
- package/src/version.json +1 -1
- package/lib/commonjs/components/AutoCompleteInput/CommandsHeader.js +0 -78
- package/lib/commonjs/components/AutoCompleteInput/CommandsHeader.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/CommandsItem.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/EmojisHeader.js +0 -81
- package/lib/commonjs/components/AutoCompleteInput/EmojisHeader.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/EmojisItem.js +0 -75
- package/lib/commonjs/components/AutoCompleteInput/EmojisItem.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/MentionsItem.js +0 -125
- package/lib/commonjs/components/AutoCompleteInput/MentionsItem.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/SuggestionsList.js +0 -199
- package/lib/commonjs/components/AutoCompleteInput/SuggestionsList.js.map +0 -1
- package/lib/commonjs/components/Channel/utils/debounce.js +0 -20
- package/lib/commonjs/components/Channel/utils/debounce.js.map +0 -1
- package/lib/commonjs/components/Channel/utils/throttle.js +0 -20
- package/lib/commonjs/components/Channel/utils/throttle.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/MessageActions.js.map +0 -1
- package/lib/commonjs/icons/Left.js +0 -38
- package/lib/commonjs/icons/Left.js.map +0 -1
- package/lib/commonjs/icons/Right.js +0 -38
- package/lib/commonjs/icons/Right.js.map +0 -1
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js +0 -100
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/BottomSheet.js +0 -25
- package/lib/commonjs/styleguideComponents/BottomSheet.js.map +0 -1
- package/lib/commonjs/styleguideComponents/JsDoc.js +0 -87
- package/lib/commonjs/styleguideComponents/JsDoc.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Markdown.js +0 -12
- package/lib/commonjs/styleguideComponents/Markdown.js.map +0 -1
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js +0 -92
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/PropsRenderer.js +0 -267
- package/lib/commonjs/styleguideComponents/PropsRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Reanimated.js +0 -2
- package/lib/commonjs/styleguideComponents/Wrapper.js +0 -29
- package/lib/commonjs/styleguideComponents/Wrapper.js.map +0 -1
- package/lib/commonjs/styleguideComponents/register-react-native-web.js +0 -44
- package/lib/commonjs/styleguideComponents/register-react-native-web.js.map +0 -1
- package/lib/commonjs/styleguideComponents/resolveAssetSource.js +0 -11
- package/lib/commonjs/styleguideComponents/resolveAssetSource.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/CommandsHeader.js +0 -78
- package/lib/module/components/AutoCompleteInput/CommandsHeader.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/CommandsItem.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/EmojisHeader.js +0 -81
- package/lib/module/components/AutoCompleteInput/EmojisHeader.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/EmojisItem.js +0 -75
- package/lib/module/components/AutoCompleteInput/EmojisItem.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/MentionsItem.js +0 -125
- package/lib/module/components/AutoCompleteInput/MentionsItem.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/SuggestionsList.js +0 -199
- package/lib/module/components/AutoCompleteInput/SuggestionsList.js.map +0 -1
- package/lib/module/components/Channel/utils/debounce.js +0 -20
- package/lib/module/components/Channel/utils/debounce.js.map +0 -1
- package/lib/module/components/Channel/utils/throttle.js +0 -20
- package/lib/module/components/Channel/utils/throttle.js.map +0 -1
- package/lib/module/components/MessageOverlay/MessageActions.js.map +0 -1
- package/lib/module/icons/Left.js +0 -38
- package/lib/module/icons/Left.js.map +0 -1
- package/lib/module/icons/Right.js +0 -38
- package/lib/module/icons/Right.js.map +0 -1
- package/lib/module/styleguideComponents/ArgumentsRenderer.js +0 -100
- package/lib/module/styleguideComponents/ArgumentsRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/BottomSheet.js +0 -25
- package/lib/module/styleguideComponents/BottomSheet.js.map +0 -1
- package/lib/module/styleguideComponents/JsDoc.js +0 -87
- package/lib/module/styleguideComponents/JsDoc.js.map +0 -1
- package/lib/module/styleguideComponents/Markdown.js +0 -12
- package/lib/module/styleguideComponents/Markdown.js.map +0 -1
- package/lib/module/styleguideComponents/PathlineRenderer.js +0 -92
- package/lib/module/styleguideComponents/PathlineRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/PropsRenderer.js +0 -267
- package/lib/module/styleguideComponents/PropsRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/Reanimated.js +0 -2
- package/lib/module/styleguideComponents/Wrapper.js +0 -29
- package/lib/module/styleguideComponents/Wrapper.js.map +0 -1
- package/lib/module/styleguideComponents/register-react-native-web.js +0 -44
- package/lib/module/styleguideComponents/register-react-native-web.js.map +0 -1
- package/lib/module/styleguideComponents/resolveAssetSource.js +0 -11
- package/lib/module/styleguideComponents/resolveAssetSource.js.map +0 -1
- package/lib/typescript/components/AutoCompleteInput/CommandsHeader.d.ts +0 -2
- package/lib/typescript/components/AutoCompleteInput/CommandsItem.d.ts +0 -15
- package/lib/typescript/components/AutoCompleteInput/EmojisHeader.d.ts +0 -5
- package/lib/typescript/components/AutoCompleteInput/EmojisItem.d.ts +0 -12
- package/lib/typescript/components/AutoCompleteInput/MentionsItem.d.ts +0 -16
- package/lib/typescript/components/AutoCompleteInput/SuggestionsList.d.ts +0 -13
- package/lib/typescript/components/Channel/utils/debounce.d.ts +0 -2
- package/lib/typescript/components/Channel/utils/throttle.d.ts +0 -2
- package/lib/typescript/components/MessageOverlay/MessageActions.d.ts +0 -11
- package/src/components/AutoCompleteInput/CommandsHeader.tsx +0 -43
- package/src/components/AutoCompleteInput/EmojisHeader.tsx +0 -45
- package/src/components/AutoCompleteInput/EmojisItem.tsx +0 -52
- package/src/components/AutoCompleteInput/MentionsItem.tsx +0 -74
- package/src/components/AutoCompleteInput/SuggestionsList.tsx +0 -138
- package/src/components/AutoCompleteInput/__tests__/CommandsItem.test.js +0 -29
- package/src/components/AutoCompleteInput/__tests__/MentionsItem.test.js +0 -62
- package/src/components/Channel/utils/debounce.ts +0 -12
- package/src/components/Channel/utils/throttle.ts +0 -12
- package/src/components/MessageList/__tests__/__snapshots__/MessageList.test.js.snap +0 -983
- package/src/components/MessageOverlay/MessageActions.tsx +0 -243
- package/src/icons/Left.tsx +0 -12
- package/src/icons/Right.tsx +0 -12
- package/src/styleguideComponents/ArgumentsRenderer.tsx +0 -59
- package/src/styleguideComponents/BottomSheet.tsx +0 -3
- package/src/styleguideComponents/JsDoc.tsx +0 -43
- package/src/styleguideComponents/Markdown.tsx +0 -1
- package/src/styleguideComponents/PathlineRenderer.tsx +0 -44
- package/src/styleguideComponents/PropsRenderer.tsx +0 -138
- package/src/styleguideComponents/Reanimated.tsx +0 -0
- package/src/styleguideComponents/Wrapper.tsx +0 -6
- package/src/styleguideComponents/register-react-native-web.js +0 -13
- package/src/styleguideComponents/resolveAssetSource.js +0 -2
|
@@ -39,6 +39,10 @@ var _hi2 = _interopRequireDefault(require("../i18n/hi.json"));
|
|
|
39
39
|
|
|
40
40
|
var _it2 = _interopRequireDefault(require("../i18n/it.json"));
|
|
41
41
|
|
|
42
|
+
var _ja2 = _interopRequireDefault(require("../i18n/ja.json"));
|
|
43
|
+
|
|
44
|
+
var _ko2 = _interopRequireDefault(require("../i18n/ko.json"));
|
|
45
|
+
|
|
42
46
|
var _nl2 = _interopRequireDefault(require("../i18n/nl.json"));
|
|
43
47
|
|
|
44
48
|
var _ru2 = _interopRequireDefault(require("../i18n/ru.json"));
|
|
@@ -51,6 +55,10 @@ require("dayjs/locale/hi");
|
|
|
51
55
|
|
|
52
56
|
require("dayjs/locale/it");
|
|
53
57
|
|
|
58
|
+
require("dayjs/locale/ja");
|
|
59
|
+
|
|
60
|
+
require("dayjs/locale/ko");
|
|
61
|
+
|
|
54
62
|
require("dayjs/locale/nl");
|
|
55
63
|
|
|
56
64
|
require("dayjs/locale/ru");
|
|
@@ -204,6 +212,8 @@ var Streami18n = function () {
|
|
|
204
212
|
fr: (0, _defineProperty2["default"])({}, defaultNS, _fr2["default"]),
|
|
205
213
|
hi: (0, _defineProperty2["default"])({}, defaultNS, _hi2["default"]),
|
|
206
214
|
it: (0, _defineProperty2["default"])({}, defaultNS, _it2["default"]),
|
|
215
|
+
ja: (0, _defineProperty2["default"])({}, defaultNS, _ja2["default"]),
|
|
216
|
+
ko: (0, _defineProperty2["default"])({}, defaultNS, _ko2["default"]),
|
|
207
217
|
nl: (0, _defineProperty2["default"])({}, defaultNS, _nl2["default"]),
|
|
208
218
|
ru: (0, _defineProperty2["default"])({}, defaultNS, _ru2["default"]),
|
|
209
219
|
tr: (0, _defineProperty2["default"])({}, defaultNS, _tr2["default"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Streami18n.ts"],"names":["defaultNS","defaultLng","Dayjs","extend","updateLocale","format","L","LL","LLL","LLLL","LT","LTS","calendar","lastDay","lastWeek","nextDay","nextWeek","sameDay","sameElse","meridiem","hour","meridiemHour","meridiemParse","en_locale","formats","months","relativeTime","weekdays","isDayJs","dateTimeParser","undefined","defaultStreami18nOptions","DateTimeParser","dayjsLocaleConfigForLanguage","debug","disableDateTimeTranslations","language","logger","msg","console","warn","Streami18n","options","i18nextConfig","i18nInstance","i18n","createInstance","setLanguageCallback","initialized","t","key","translations","en","enTranslations","fr","frTranslations","hi","hiTranslations","it","itTranslations","nl","nlTranslations","ru","ruTranslations","tr","trTranslations","dayjsLocales","localeExists","isCustomDateTimeParser","Object","keys","Ls","indexOf","validateCurrentLanguage","availableLanguages","currentLanguage","getAvailableLanguages","geti18Instance","getTranslations","finalOptions","LocalizedFormat","localeData","error","Error","JSON","stringify","translationsForLanguage","fallbackLng","interpolation","escapeValue","keySeparator","lng","nsSeparator","parseMissingKeyHandler","addOrUpdateLocale","tDateTimeParser","timestamp","locale","init","resources","translation","customDayjsLocale","addResources","config","name","changeLanguage","callback"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAOA;;AAfA,IAAMA,SAAS,GAAG,aAAlB;AACA,IAAMC,UAAU,GAAG,IAAnB;;AAqBAC,kBAAMC,MAAN,CAAaC,wBAAb;;AAEAF,kBAAME,YAAN,CAAmB,IAAnB,EAAyB;AACvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,CAAC,EAAE,YADG;AAENC,IAAAA,EAAE,EAAE,aAFE;AAGNC,IAAAA,GAAG,EAAE,mBAHC;AAINC,IAAAA,IAAI,EAAE,yBAJA;AAKNC,IAAAA,EAAE,EAAE,QALE;AAMNC,IAAAA,GAAG,EAAE;AANC;AADe,CAAzB;;AAWAT,kBAAME,YAAN,CAAmB,IAAnB,EAAyB;AACvBQ,EAAAA,QAAQ,EAAE;AACRC,IAAAA,OAAO,EAAE,kBADD;AAERC,IAAAA,QAAQ,EAAE,0BAFF;AAGRC,IAAAA,OAAO,EAAE,gBAHD;AAIRC,IAAAA,QAAQ,EAAE,cAJF;AAKRC,IAAAA,OAAO,EAAE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C;AACD;;AACD,qBAAK5B,mBAAL,CAAyBE,EAAzB;AAVJ,kDAYWA,EAZX;;AAAA;AAAA;AAAA;AAcI,qBAAKZ,MAAL,8BAAuC+C,IAAI,CAACC,SAAL,cAAvC;AAdJ,kDAeW,KAAKpC,CAfhB;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;WAmBA,qCAA4ByD,QAA5B,EAA8D;AAC5D,WAAK3D,mBAAL,GAA2B2D,QAA3B;AACD","sourcesContent":["import Dayjs from 'dayjs';\nimport calendar from 'dayjs/plugin/calendar';\nimport localeData from 'dayjs/plugin/localeData';\nimport LocalizedFormat from 'dayjs/plugin/localizedFormat';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport updateLocale from 'dayjs/plugin/updateLocale';\nimport i18n, { FallbackLng, TFunction } from 'i18next';\n\nimport enTranslations from '../i18n/en.json';\nimport frTranslations from '../i18n/fr.json';\nimport hiTranslations from '../i18n/hi.json';\nimport itTranslations from '../i18n/it.json';\nimport nlTranslations from '../i18n/nl.json';\nimport ruTranslations from '../i18n/ru.json';\nimport trTranslations from '../i18n/tr.json';\n\nconst defaultNS = 'translation';\nconst defaultLng = 'en';\n\nimport 'dayjs/locale/fr';\nimport 'dayjs/locale/hi';\nimport 'dayjs/locale/it';\nimport 'dayjs/locale/nl';\nimport 'dayjs/locale/ru';\nimport 'dayjs/locale/tr';\n\n/**\n * These locale imports also set these locales globally.\n * So as a last step we import the english locale to make\n * sure we don't mess up languages in other places in the app.\n */\nimport 'dayjs/locale/en';\n\nimport type moment from 'moment';\n\nimport type { TDateTimeParser } from '../contexts/translationContext/TranslationContext';\nimport type { UnknownType } from '../types/types';\n\nDayjs.extend(updateLocale);\n\nDayjs.updateLocale('en', {\n format: {\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n LT: 'hh:mmA',\n LTS: 'HH:mm:ss',\n },\n});\n\nDayjs.updateLocale('nl', {\n calendar: {\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n sameDay: '[vandaag om] LT',\n sameElse: 'L',\n },\n});\n\nDayjs.updateLocale('it', {\n calendar: {\n lastDay: '[Ieri alle] LT',\n lastWeek: '[lo scorso] dddd [alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n sameDay: '[Oggi alle] LT',\n sameElse: 'L',\n },\n});\n\nDayjs.updateLocale('hi', {\n calendar: {\n lastDay: '[कल] LT',\n lastWeek: '[पिछले] dddd, LT',\n nextDay: '[कल] LT',\n nextWeek: 'dddd, LT',\n sameDay: '[आज] LT',\n sameElse: 'L',\n },\n\n /**\n * Hindi notation for meridiems are quite fuzzy in practice. While there exists\n * a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n */\n meridiem(hour: number) {\n if (hour < 4) return 'रात';\n if (hour < 10) return 'सुबह';\n if (hour < 17) return 'दोपहर';\n if (hour < 20) return 'शाम';\n return 'रात';\n },\n\n meridiemHour(hour: number, meridiem: string) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'रात') return hour < 4 ? hour : hour + 12;\n if (meridiem === 'सुबह') return hour;\n if (meridiem === 'दोपहर') return hour >= 10 ? hour : hour + 12;\n if (meridiem === 'शाम') return hour + 12;\n return hour;\n },\n\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n});\n\nDayjs.updateLocale('fr', {\n calendar: {\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n sameDay: '[Aujourd’hui à] LT',\n sameElse: 'L',\n },\n});\n\nDayjs.updateLocale('tr', {\n calendar: {\n lastDay: '[dün] LT',\n lastWeek: '[geçen] dddd [saat] LT',\n nextDay: '[yarın saat] LT',\n nextWeek: '[gelecek] dddd [saat] LT',\n sameDay: '[bugün saat] LT',\n sameElse: 'L',\n },\n});\n\nDayjs.updateLocale('ru', {\n calendar: {\n lastDay: '[Вчера, в] LT',\n nextDay: '[Завтра, в] LT',\n sameDay: '[Сегодня, в] LT',\n },\n});\n\nconst en_locale = {\n formats: {},\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n relativeTime: {},\n weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n};\n\n// Type guards to check DayJs\nconst isDayJs = (dateTimeParser: typeof Dayjs | typeof moment): dateTimeParser is typeof Dayjs =>\n (dateTimeParser as typeof Dayjs).extend !== undefined;\n\ntype Options = {\n DateTimeParser?: typeof Dayjs | typeof moment;\n dayjsLocaleConfigForLanguage?: Partial<ILocale>;\n debug?: boolean;\n disableDateTimeTranslations?: boolean;\n language?: string;\n logger?: (msg?: string) => void;\n translationsForLanguage?: Partial<typeof enTranslations>;\n};\n\ntype I18NextConfig = {\n debug: boolean;\n fallbackLng: false | FallbackLng;\n interpolation: { escapeValue: boolean };\n keySeparator: false | string;\n lng: string;\n nsSeparator: false | string;\n parseMissingKeyHandler: (key: string) => string;\n};\n\n/**\n * Wrapper around [i18next](https://www.i18next.com/) class for Stream related translations.\n * Instance of this class should be provided to Chat component to handle translations.\n * Stream provides following list of in-built translations:\n * 1. English (en)\n * 2. Dutch (nl)\n * 3. Russian (ru)\n * 4. Turkish (tr)\n * 5. French (fr)\n * 6. Italian (it)\n * 7. Hindi (hi)\n *\n * Simplest way to start using chat components in one of the in-built languages would be following:\n *\n * ```\n * const i18n = new Streami18n({ language 'nl' });\n * <Chat client={chatClient} i18nInstance={i18n}>\n * ...\n * </Chat>\n * ```\n *\n * If you would like to override certain keys in in-built translation.\n * UI will be automatically updated in this case.\n *\n * ```\n * const i18n = new Streami18n({\n * language: 'nl',\n * translationsForLanguage: {\n * 'Nothing yet...': 'Nog Niet ...',\n * '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} en {{ secondUser }} zijn aan het typen...',\n * }\n * });\n *\n * If you would like to register additional languages, use registerTranslation. You can add as many languages as you want:\n *\n * i18n.registerTranslation('zh', {\n * 'Nothing yet...': 'Nog Niet ...',\n * '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} en {{ secondUser }} zijn aan het typen...',\n * });\n *\n * <Chat client={chatClient} i18nInstance={i18n}>\n * ...\n * </Chat>\n * ```\n *\n * You can use the same function to add whole new language as well.\n *\n * ```\n * const i18n = new Streami18n();\n *\n * i18n.registerTranslation('mr', {\n * 'Nothing yet...': 'काहीही नाही ...',\n * '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} आणि {{ secondUser }} टीपी करत आहेत ',\n * });\n *\n * // Make sure to call setLanguage to reflect new language in UI.\n * i18n.setLanguage('it');\n * <Chat client={chatClient} i18nInstance={i18n}>\n * ...\n * </Chat>\n * ```\n *\n * ## Datetime translations\n *\n * Stream react chat components uses [dayjs](https://day.js.org/en/) internally by default to format datetime stamp.\n * e.g., in ChannelPreview, MessageContent components.\n * Dayjs has locale support as well - https://day.js.org/docs/en/i18n/i18n\n * Dayjs is a lightweight alternative to Momentjs with the same modern API.\n *\n * Dayjs provides locale config for plenty of languages, you can check the whole list of locale configs at following url\n * https://github.com/iamkun/dayjs/tree/dev/src/locale\n *\n * You can either provide the dayjs locale config while registering\n * language with Streami18n (either via constructor or registerTranslation()) or you can provide your own Dayjs or Moment instance\n * to Streami18n constructor, which will be then used internally (using the language locale) in components.\n *\n * 1. Via language registration\n *\n * e.g.,\n * ```\n * const i18n = new Streami18n({\n * language: 'nl',\n * dayjsLocaleConfigForLanguage: {\n * months: [...],\n * monthsShort: [...],\n * calendar: {\n * sameDay: ...'\n * }\n * }\n * });\n * ```\n *\n * Similarly, you can add locale config for moment while registering translation via `registerTranslation` function.\n *\n * e.g.,\n * ```\n * const i18n = new Streami18n();\n *\n * i18n.registerTranslation(\n * 'mr',\n * {\n * 'Nothing yet...': 'काहीही नाही ...',\n * '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} आणि {{ secondUser }} टीपी करत आहेत ',\n * },\n * {\n * months: [...],\n * monthsShort: [...],\n * calendar: {\n * sameDay: ...'\n * }\n * }\n * );\n *```\n * 2. Provide your own Moment object\n *\n * ```js\n * import 'moment/locale/nl';\n * import 'moment/locale/it';\n * // or if you want to include all locales\n * import 'moment/min/locales';\n *\n * import Moment from moment\n *\n * const i18n = new Streami18n({\n * language: 'nl',\n * DateTimeParser: Moment\n * })\n * ```\n *\n * 3. Provide your own Dayjs object\n *\n * ```js\n * import Dayjs from 'dayjs'\n *\n * import 'dayjs/locale/nl';\n * import 'dayjs/locale/it';\n * // or if you want to include all locales\n * import 'dayjs/min/locales';\n *\n * const i18n = new Streami18n({\n * language: 'nl',\n * DateTimeParser: Dayjs\n * })\n * ```\n * If you would like to stick with english language for date-times in Stream components, you can set `disableDateTimeTranslations` to true.\n *\n */\nconst defaultStreami18nOptions = {\n DateTimeParser: Dayjs,\n dayjsLocaleConfigForLanguage: null,\n debug: false,\n disableDateTimeTranslations: false,\n language: 'en',\n logger: (msg?: string) => console.warn(msg),\n};\n\nexport class Streami18n {\n i18nInstance = i18n.createInstance();\n Dayjs = null;\n setLanguageCallback: (t: TFunction) => void = () => null;\n initialized = false;\n\n t: TFunction = (key: string) => key;\n tDateTimeParser: TDateTimeParser;\n\n translations: {\n [key: string]: {\n [key: string]: Partial<typeof enTranslations> | UnknownType;\n };\n } = {\n en: { [defaultNS]: enTranslations },\n fr: { [defaultNS]: frTranslations },\n hi: { [defaultNS]: hiTranslations },\n it: { [defaultNS]: itTranslations },\n nl: { [defaultNS]: nlTranslations },\n ru: { [defaultNS]: ruTranslations },\n tr: { [defaultNS]: trTranslations },\n };\n\n /**\n * dayjs.defineLanguage('nl') also changes the global locale. We don't want to do that\n * when a user calls the registerTranslation() function. So instead we will store the\n * locale configs given to the registerTranslation() function in `dayjsLocales` object,\n * and register the required locale with moment when setLanguage is called.\n */\n dayjsLocales: { [key: string]: Partial<ILocale> } = {};\n\n /**\n * Initialize properties used in constructor\n */\n logger: (msg?: string) => void;\n currentLanguage: string;\n DateTimeParser: typeof Dayjs | typeof moment;\n isCustomDateTimeParser: boolean;\n i18nextConfig: I18NextConfig;\n\n /**\n * Constructor accepts following options:\n * - language (String) default: 'en'\n * Language code e.g., en, tr\n *\n * - translationsForLanguage (object)\n * Translations object. Please check src/i18n/en.json for example.\n *\n * - disableDateTimeTranslations (boolean) default: false\n * Disable translations for date-times\n *\n * - debug (boolean) default: false\n * Enable debug mode in internal i18n class\n *\n * - logger (function) default: () => {}\n * Logger function to log warnings/errors from this class\n *\n * - dayjsLocaleConfigForLanguage (object) default: 'enConfig'\n * [Config object](https://momentjs.com/docs/#/i18n/changing-locale/) for internal moment object,\n * corresponding to language (param)\n *\n * - DateTimeParser (function) Moment or Dayjs instance/function.\n * Make sure to load all the required locales in this Moment or Dayjs instance that you will be provide to Streami18n\n *\n * @param {*} options\n */\n constructor(options: Options = {}, i18nextConfig: Partial<I18NextConfig> = {}) {\n const finalOptions = {\n ...defaultStreami18nOptions,\n ...options,\n };\n\n // Prepare the i18next configuration.\n this.logger = finalOptions.logger;\n\n this.currentLanguage = finalOptions.language;\n this.DateTimeParser = finalOptions.DateTimeParser;\n\n try {\n /**\n * This is a shallow check to see if the given parser is an instance of Dayjs.\n * For some reason Dayjs.isDayjs(this.DateTimeParser()) doesn't work.\n */\n if (this.DateTimeParser && isDayJs(this.DateTimeParser)) {\n this.DateTimeParser.extend(LocalizedFormat);\n this.DateTimeParser.extend(calendar);\n this.DateTimeParser.extend(localeData);\n this.DateTimeParser.extend(relativeTime);\n }\n } catch (error) {\n throw new Error(\n `Streami18n: Looks like you wanted to provide a Dayjs instance but something went wrong while adding plugins ${JSON.stringify(\n error,\n )}`,\n );\n }\n\n this.isCustomDateTimeParser = !!options.DateTimeParser;\n const translationsForLanguage = finalOptions.translationsForLanguage;\n\n if (translationsForLanguage) {\n this.translations[this.currentLanguage] = {\n [defaultNS]:\n this.translations[this.currentLanguage] &&\n this.translations[this.currentLanguage][defaultNS]\n ? {\n ...this.translations[this.currentLanguage][defaultNS],\n ...translationsForLanguage,\n }\n : translationsForLanguage,\n };\n }\n\n // If translations don't exist for given language, then set it as empty object.\n if (!this.translations[this.currentLanguage]) {\n this.translations[this.currentLanguage] = {\n [defaultNS]: {},\n };\n }\n\n this.i18nextConfig = {\n debug: finalOptions.debug,\n fallbackLng: false,\n interpolation: { escapeValue: false },\n keySeparator: false,\n lng: this.currentLanguage,\n nsSeparator: false,\n\n parseMissingKeyHandler: (key: string) => {\n this.logger(`Streami18n: Missing translation for key: ${key}`);\n\n return key;\n },\n ...i18nextConfig,\n };\n\n this.validateCurrentLanguage();\n\n const dayjsLocaleConfigForLanguage = finalOptions.dayjsLocaleConfigForLanguage;\n\n if (dayjsLocaleConfigForLanguage) {\n this.addOrUpdateLocale(this.currentLanguage, {\n ...dayjsLocaleConfigForLanguage,\n });\n } else if (!this.localeExists(this.currentLanguage)) {\n this.logger(\n `Streami18n: Streami18n(...) - Locale config for ${this.currentLanguage} does not exist in momentjs.` +\n `Please import the locale file using \"import 'moment/locale/${this.currentLanguage}';\" in your app or ` +\n `register the locale config with Streami18n using registerTranslation(language, translation, customDayjsLocale)`,\n );\n }\n\n this.tDateTimeParser = (timestamp) => {\n if (finalOptions.disableDateTimeTranslations || !this.localeExists(this.currentLanguage)) {\n /**\n * TS needs to know which is being called to accept the chain call\n */\n if (isDayJs(this.DateTimeParser)) {\n return this.DateTimeParser(timestamp).locale(defaultLng);\n }\n return this.DateTimeParser(timestamp).locale(defaultLng);\n }\n if (isDayJs(this.DateTimeParser)) {\n return this.DateTimeParser(timestamp).locale(this.currentLanguage);\n }\n return this.DateTimeParser(timestamp).locale(this.currentLanguage);\n };\n }\n\n /**\n * Initializes the i18next instance with configuration (which enables natural language as default keys)\n */\n async init() {\n this.validateCurrentLanguage();\n\n try {\n this.t = await this.i18nInstance.init({\n ...this.i18nextConfig,\n lng: this.currentLanguage,\n resources: this.translations,\n });\n this.initialized = true;\n } catch (error) {\n this.logger(`Something went wrong with init: ${JSON.stringify(error)}`);\n }\n\n return {\n t: this.t,\n tDateTimeParser: this.tDateTimeParser,\n };\n }\n\n localeExists = (language: string) => {\n if (this.isCustomDateTimeParser) return true;\n\n return Object.keys(Dayjs.Ls).indexOf(language) > -1;\n };\n\n validateCurrentLanguage = () => {\n const availableLanguages = Object.keys(this.translations);\n if (availableLanguages.indexOf(this.currentLanguage) === -1) {\n this.logger(\n `Streami18n: '${this.currentLanguage}' language is not registered.` +\n ` Please make sure to call streami18n.registerTranslation('${this.currentLanguage}', {...}) or ` +\n `use one the built-in supported languages - ${this.getAvailableLanguages()}`,\n );\n\n this.currentLanguage = defaultLng;\n }\n };\n\n /** Returns an instance of i18next used within this class instance */\n geti18Instance = () => this.i18nInstance;\n\n /** Returns list of available languages. */\n getAvailableLanguages = () => Object.keys(this.translations);\n\n /** Returns all the translation dictionary for all inbuilt-languages */\n getTranslations = () => this.translations;\n\n /**\n * Returns current version translator function.\n */\n async getTranslators() {\n if (!this.initialized) {\n if (this.dayjsLocales[this.currentLanguage]) {\n this.addOrUpdateLocale(this.currentLanguage, this.dayjsLocales[this.currentLanguage]);\n }\n return await this.init();\n } else {\n return {\n t: this.t,\n tDateTimeParser: this.tDateTimeParser,\n };\n }\n }\n\n /**\n * Register translation\n */\n registerTranslation(\n language: string,\n translation: Partial<typeof enTranslations> | UnknownType,\n customDayjsLocale?: Partial<ILocale>,\n ) {\n if (!translation) {\n this.logger(\n `Streami18n: registerTranslation(language, translation, customDayjsLocale) called without translation`,\n );\n return;\n }\n\n if (!this.translations[language]) {\n this.translations[language] = { [defaultNS]: translation };\n } else {\n this.translations[language][defaultNS] = translation;\n }\n\n if (customDayjsLocale) {\n this.dayjsLocales[language] = { ...customDayjsLocale };\n } else if (!this.localeExists(language)) {\n this.logger(\n `Streami18n: registerTranslation(language, translation, customDayjsLocale) - ` +\n `Locale config for ${language} does not exist in Dayjs.` +\n `Please import the locale file using \"import 'dayjs/locale/${language}';\" in your app or ` +\n `register the locale config with Streami18n using registerTranslation(language, translation, customDayjsLocale)`,\n );\n }\n\n if (this.initialized) {\n this.i18nInstance.addResources(language, defaultNS, translation);\n }\n }\n\n addOrUpdateLocale(key: string, config: Partial<ILocale>) {\n if (this.localeExists(key)) {\n Dayjs.updateLocale(key, { ...config });\n } else {\n // Merging the custom locale config with en config, so missing keys can default to english.\n Dayjs.locale({ name: key, ...en_locale, ...config }, undefined, true);\n }\n }\n\n /**\n * Changes the language.\n */\n async setLanguage(language: string) {\n this.currentLanguage = language;\n\n if (!this.initialized) return;\n\n try {\n const t = await this.i18nInstance.changeLanguage(language);\n if (this.dayjsLocales[language]) {\n this.addOrUpdateLocale(this.currentLanguage, this.dayjsLocales[this.currentLanguage]);\n }\n this.setLanguageCallback(t);\n\n return t;\n } catch (error) {\n this.logger(`Failed to set language: ${JSON.stringify(error)}`);\n return this.t;\n }\n }\n\n registerSetLanguageCallback(callback: (t: TFunction) => void) {\n this.setLanguageCallback = callback;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["Streami18n.ts"],"names":["defaultNS","defaultLng","Dayjs","extend","updateLocale","format","L","LL","LLL","LLLL","LT","LTS","calendar","lastDay","lastWeek","nextDay","nextWeek","sameDay","sameElse","meridiem","hour","meridiemHour","meridiemParse","en_locale","formats","months","relativeTime","weekdays","isDayJs","dateTimeParser","undefined","defaultStreami18nOptions","DateTimeParser","dayjsLocaleConfigForLanguage","debug","disableDateTimeTranslations","language","logger","msg","console","warn","Streami18n","options","i18nextConfig","i18nInstance","i18n","createInstance","setLanguageCallback","initialized","t","key","translations","en","enTranslations","fr","frTranslations","hi","hiTranslations","it","itTranslations","ja","jaTranslations","ko","koTranslations","nl","nlTranslations","ru","ruTranslations","tr","trTranslations","dayjsLocales","localeExists","isCustomDateTimeParser","Object","keys","Ls","indexOf","validateCurrentLanguage","availableLanguages","currentLanguage","getAvailableLanguages","geti18Instance","getTranslations","finalOptions","LocalizedFormat","localeData","error","Error","JSON","stringify","translationsForLanguage","fallbackLng","interpolation","escapeValue","keySeparator","lng","nsSeparator","parseMissingKeyHandler","addOrUpdateLocale","tDateTimeParser","timestamp","locale","init","resources","translation","customDayjsLocale","addResources","config","name","changeLanguage","callback"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAOA;;AAjBA,IAAMA,SAAS,GAAG,aAAlB;AACA,IAAMC,UAAU,GAAG,IAAnB;;AAoBAC,kBAAMC,MAAN,CAAaC,wBAAb;;AAEAF,kBAAME,YAAN,CAAmB,IAAnB,EAAyB;AACvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,CAAC,EAAE,YADG;AAENC,IAAAA,EAAE,EAAE,aAFE;AAGNC,IAAAA,GAAG,EAAE,mBAHC;AAINC,IAAAA,IAAI,EAAE,yBAJA;AAKNC,IAAAA,EAAE,EAAE,QALE;AAMNC,IAAAA,GAAG,EAAE;AANC;AADe,CAAzB;;AAWAT,kBAAME,YAAN,CAAmB,IAAnB,EAAyB;AACvBQ,EAAAA,QAAQ,EAAE;AACRC,IAAAA,OAAO,EAAE,kBADD;AAERC,IAAAA,QAAQ,EAAE,0BAFF;AAGRC,IAAAA,OAAO,EAAE,gBAHD;AAIRC,IAAAA,QAAQ,EAAE,cAJF;AAKRC,IAAAA,OAAO,EAAE,iBALD;AAMRC,IAAAA,QAAQ,EAAE;AANF;AADa,CAAzB;;AAWAhB,kBAAME,YAAN,CAAmB,IAAnB,EAAyB;AACvBQ,EAAAA,QAAQ,EAAE;AACRC,IAAAA,OAAO,EAAE,gBADD;AAERC,IAAAA,QAAQ,EAA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AAA;AAAA;AAAA;AAcI,qBAAKZ,MAAL,8BAAuCmD,IAAI,CAACC,SAAL,cAAvC;AAdJ,kDAeW,KAAKxC,CAfhB;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;WAmBA,qCAA4B6D,QAA5B,EAA8D;AAC5D,WAAK/D,mBAAL,GAA2B+D,QAA3B;AACD","sourcesContent":["import Dayjs from 'dayjs';\nimport calendar from 'dayjs/plugin/calendar';\nimport localeData from 'dayjs/plugin/localeData';\nimport LocalizedFormat from 'dayjs/plugin/localizedFormat';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport updateLocale from 'dayjs/plugin/updateLocale';\nimport i18n, { FallbackLng, TFunction } from 'i18next';\n\nimport type moment from 'moment';\n\nimport type { TDateTimeParser } from '../contexts/translationContext/TranslationContext';\nimport enTranslations from '../i18n/en.json';\nimport frTranslations from '../i18n/fr.json';\nimport hiTranslations from '../i18n/hi.json';\nimport itTranslations from '../i18n/it.json';\nimport jaTranslations from '../i18n/ja.json';\nimport koTranslations from '../i18n/ko.json';\nimport nlTranslations from '../i18n/nl.json';\nimport ruTranslations from '../i18n/ru.json';\nimport trTranslations from '../i18n/tr.json';\n\nconst defaultNS = 'translation';\nconst defaultLng = 'en';\n\nimport 'dayjs/locale/fr';\nimport 'dayjs/locale/hi';\nimport 'dayjs/locale/it';\nimport 'dayjs/locale/ja';\nimport 'dayjs/locale/ko';\nimport 'dayjs/locale/nl';\nimport 'dayjs/locale/ru';\nimport 'dayjs/locale/tr';\n\n/**\n * These locale imports also set these locales globally.\n * So as a last step we import the english locale to make\n * sure we don't mess up languages in other places in the app.\n */\nimport 'dayjs/locale/en';\n\nimport type { DefaultStreamChatGenerics } from '../types/types';\n\nDayjs.extend(updateLocale);\n\nDayjs.updateLocale('en', {\n format: {\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n LT: 'hh:mmA',\n LTS: 'HH:mm:ss',\n },\n});\n\nDayjs.updateLocale('nl', {\n calendar: {\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n sameDay: '[vandaag om] LT',\n sameElse: 'L',\n },\n});\n\nDayjs.updateLocale('it', {\n calendar: {\n lastDay: '[Ieri alle] LT',\n lastWeek: '[lo scorso] dddd [alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n sameDay: '[Oggi alle] LT',\n sameElse: 'L',\n },\n});\n\nDayjs.updateLocale('hi', {\n calendar: {\n lastDay: '[कल] LT',\n lastWeek: '[पिछले] dddd, LT',\n nextDay: '[कल] LT',\n nextWeek: 'dddd, LT',\n sameDay: '[आज] LT',\n sameElse: 'L',\n },\n\n /**\n * Hindi notation for meridiems are quite fuzzy in practice. While there exists\n * a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n */\n meridiem(hour: number) {\n if (hour < 4) return 'रात';\n if (hour < 10) return 'सुबह';\n if (hour < 17) return 'दोपहर';\n if (hour < 20) return 'शाम';\n return 'रात';\n },\n\n meridiemHour(hour: number, meridiem: string) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'रात') return hour < 4 ? hour : hour + 12;\n if (meridiem === 'सुबह') return hour;\n if (meridiem === 'दोपहर') return hour >= 10 ? hour : hour + 12;\n if (meridiem === 'शाम') return hour + 12;\n return hour;\n },\n\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n});\n\nDayjs.updateLocale('fr', {\n calendar: {\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n sameDay: '[Aujourd’hui à] LT',\n sameElse: 'L',\n },\n});\n\nDayjs.updateLocale('tr', {\n calendar: {\n lastDay: '[dün] LT',\n lastWeek: '[geçen] dddd [saat] LT',\n nextDay: '[yarın saat] LT',\n nextWeek: '[gelecek] dddd [saat] LT',\n sameDay: '[bugün saat] LT',\n sameElse: 'L',\n },\n});\n\nDayjs.updateLocale('ru', {\n calendar: {\n lastDay: '[Вчера, в] LT',\n nextDay: '[Завтра, в] LT',\n sameDay: '[Сегодня, в] LT',\n },\n});\n\nconst en_locale = {\n formats: {},\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n relativeTime: {},\n weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n};\n\n// Type guards to check DayJs\nconst isDayJs = (dateTimeParser: typeof Dayjs | typeof moment): dateTimeParser is typeof Dayjs =>\n (dateTimeParser as typeof Dayjs).extend !== undefined;\n\ntype Options = {\n DateTimeParser?: typeof Dayjs | typeof moment;\n dayjsLocaleConfigForLanguage?: Partial<ILocale>;\n debug?: boolean;\n disableDateTimeTranslations?: boolean;\n language?: string;\n logger?: (msg?: string) => void;\n translationsForLanguage?: Partial<typeof enTranslations>;\n};\n\ntype I18NextConfig = {\n debug: boolean;\n fallbackLng: false | FallbackLng;\n interpolation: { escapeValue: boolean };\n keySeparator: false | string;\n lng: string;\n nsSeparator: false | string;\n parseMissingKeyHandler: (key: string) => string;\n};\n\n/**\n * Wrapper around [i18next](https://www.i18next.com/) class for Stream related translations.\n * Instance of this class should be provided to Chat component to handle translations.\n * Stream provides following list of in-built translations:\n * 1. English (en)\n * 2. Dutch (nl)\n * 3. Russian (ru)\n * 4. Turkish (tr)\n * 5. French (fr)\n * 6. Italian (it)\n * 7. Hindi (hi)\n *\n * Simplest way to start using chat components in one of the in-built languages would be following:\n *\n * ```\n * const i18n = new Streami18n({ language 'nl' });\n * <Chat client={chatClient} i18nInstance={i18n}>\n * ...\n * </Chat>\n * ```\n *\n * If you would like to override certain keys in in-built translation.\n * UI will be automatically updated in this case.\n *\n * ```\n * const i18n = new Streami18n({\n * language: 'nl',\n * translationsForLanguage: {\n * 'Nothing yet...': 'Nog Niet ...',\n * '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} en {{ secondUser }} zijn aan het typen...',\n * }\n * });\n *\n * If you would like to register additional languages, use registerTranslation. You can add as many languages as you want:\n *\n * i18n.registerTranslation('zh', {\n * 'Nothing yet...': 'Nog Niet ...',\n * '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} en {{ secondUser }} zijn aan het typen...',\n * });\n *\n * <Chat client={chatClient} i18nInstance={i18n}>\n * ...\n * </Chat>\n * ```\n *\n * You can use the same function to add whole new language as well.\n *\n * ```\n * const i18n = new Streami18n();\n *\n * i18n.registerTranslation('mr', {\n * 'Nothing yet...': 'काहीही नाही ...',\n * '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} आणि {{ secondUser }} टीपी करत आहेत ',\n * });\n *\n * // Make sure to call setLanguage to reflect new language in UI.\n * i18n.setLanguage('it');\n * <Chat client={chatClient} i18nInstance={i18n}>\n * ...\n * </Chat>\n * ```\n *\n * ## Datetime translations\n *\n * Stream react chat components uses [dayjs](https://day.js.org/en/) internally by default to format datetime stamp.\n * e.g., in ChannelPreview, MessageContent components.\n * Dayjs has locale support as well - https://day.js.org/docs/en/i18n/i18n\n * Dayjs is a lightweight alternative to Momentjs with the same modern API.\n *\n * Dayjs provides locale config for plenty of languages, you can check the whole list of locale configs at following url\n * https://github.com/iamkun/dayjs/tree/dev/src/locale\n *\n * You can either provide the dayjs locale config while registering\n * language with Streami18n (either via constructor or registerTranslation()) or you can provide your own Dayjs or Moment instance\n * to Streami18n constructor, which will be then used internally (using the language locale) in components.\n *\n * 1. Via language registration\n *\n * e.g.,\n * ```\n * const i18n = new Streami18n({\n * language: 'nl',\n * dayjsLocaleConfigForLanguage: {\n * months: [...],\n * monthsShort: [...],\n * calendar: {\n * sameDay: ...'\n * }\n * }\n * });\n * ```\n *\n * Similarly, you can add locale config for moment while registering translation via `registerTranslation` function.\n *\n * e.g.,\n * ```\n * const i18n = new Streami18n();\n *\n * i18n.registerTranslation(\n * 'mr',\n * {\n * 'Nothing yet...': 'काहीही नाही ...',\n * '{{ firstUser }} and {{ secondUser }} are typing...': '{{ firstUser }} आणि {{ secondUser }} टीपी करत आहेत ',\n * },\n * {\n * months: [...],\n * monthsShort: [...],\n * calendar: {\n * sameDay: ...'\n * }\n * }\n * );\n *```\n * 2. Provide your own Moment object\n *\n * ```js\n * import 'moment/locale/nl';\n * import 'moment/locale/it';\n * // or if you want to include all locales\n * import 'moment/min/locales';\n *\n * import Moment from moment\n *\n * const i18n = new Streami18n({\n * language: 'nl',\n * DateTimeParser: Moment\n * })\n * ```\n *\n * 3. Provide your own Dayjs object\n *\n * ```js\n * import Dayjs from 'dayjs'\n *\n * import 'dayjs/locale/nl';\n * import 'dayjs/locale/it';\n * // or if you want to include all locales\n * import 'dayjs/min/locales';\n *\n * const i18n = new Streami18n({\n * language: 'nl',\n * DateTimeParser: Dayjs\n * })\n * ```\n * If you would like to stick with english language for date-times in Stream components, you can set `disableDateTimeTranslations` to true.\n *\n */\nconst defaultStreami18nOptions = {\n DateTimeParser: Dayjs,\n dayjsLocaleConfigForLanguage: null,\n debug: false,\n disableDateTimeTranslations: false,\n language: 'en',\n logger: (msg?: string) => console.warn(msg),\n};\n\nexport class Streami18n {\n i18nInstance = i18n.createInstance();\n Dayjs = null;\n setLanguageCallback: (t: TFunction) => void = () => null;\n initialized = false;\n\n t: TFunction = (key: string) => key;\n tDateTimeParser: TDateTimeParser;\n\n translations: {\n [key: string]: {\n [key: string]: Partial<typeof enTranslations> | DefaultStreamChatGenerics;\n };\n } = {\n en: { [defaultNS]: enTranslations },\n fr: { [defaultNS]: frTranslations },\n hi: { [defaultNS]: hiTranslations },\n it: { [defaultNS]: itTranslations },\n ja: { [defaultNS]: jaTranslations },\n ko: { [defaultNS]: koTranslations },\n nl: { [defaultNS]: nlTranslations },\n ru: { [defaultNS]: ruTranslations },\n tr: { [defaultNS]: trTranslations },\n };\n\n /**\n * dayjs.defineLanguage('nl') also changes the global locale. We don't want to do that\n * when a user calls the registerTranslation() function. So instead we will store the\n * locale configs given to the registerTranslation() function in `dayjsLocales` object,\n * and register the required locale with moment when setLanguage is called.\n */\n dayjsLocales: { [key: string]: Partial<ILocale> } = {};\n\n /**\n * Initialize properties used in constructor\n */\n logger: (msg?: string) => void;\n currentLanguage: string;\n DateTimeParser: typeof Dayjs | typeof moment;\n isCustomDateTimeParser: boolean;\n i18nextConfig: I18NextConfig;\n\n /**\n * Constructor accepts following options:\n * - language (String) default: 'en'\n * Language code e.g., en, tr\n *\n * - translationsForLanguage (object)\n * Translations object. Please check src/i18n/en.json for example.\n *\n * - disableDateTimeTranslations (boolean) default: false\n * Disable translations for date-times\n *\n * - debug (boolean) default: false\n * Enable debug mode in internal i18n class\n *\n * - logger (function) default: () => {}\n * Logger function to log warnings/errors from this class\n *\n * - dayjsLocaleConfigForLanguage (object) default: 'enConfig'\n * [Config object](https://momentjs.com/docs/#/i18n/changing-locale/) for internal moment object,\n * corresponding to language (param)\n *\n * - DateTimeParser (function) Moment or Dayjs instance/function.\n * Make sure to load all the required locales in this Moment or Dayjs instance that you will be provide to Streami18n\n *\n * @param {*} options\n */\n constructor(options: Options = {}, i18nextConfig: Partial<I18NextConfig> = {}) {\n const finalOptions = {\n ...defaultStreami18nOptions,\n ...options,\n };\n\n // Prepare the i18next configuration.\n this.logger = finalOptions.logger;\n\n this.currentLanguage = finalOptions.language;\n this.DateTimeParser = finalOptions.DateTimeParser;\n\n try {\n /**\n * This is a shallow check to see if the given parser is an instance of Dayjs.\n * For some reason Dayjs.isDayjs(this.DateTimeParser()) doesn't work.\n */\n if (this.DateTimeParser && isDayJs(this.DateTimeParser)) {\n this.DateTimeParser.extend(LocalizedFormat);\n this.DateTimeParser.extend(calendar);\n this.DateTimeParser.extend(localeData);\n this.DateTimeParser.extend(relativeTime);\n }\n } catch (error) {\n throw new Error(\n `Streami18n: Looks like you wanted to provide a Dayjs instance but something went wrong while adding plugins ${JSON.stringify(\n error,\n )}`,\n );\n }\n\n this.isCustomDateTimeParser = !!options.DateTimeParser;\n const translationsForLanguage = finalOptions.translationsForLanguage;\n\n if (translationsForLanguage) {\n this.translations[this.currentLanguage] = {\n [defaultNS]:\n this.translations[this.currentLanguage] &&\n this.translations[this.currentLanguage][defaultNS]\n ? {\n ...this.translations[this.currentLanguage][defaultNS],\n ...translationsForLanguage,\n }\n : translationsForLanguage,\n };\n }\n\n // If translations don't exist for given language, then set it as empty object.\n if (!this.translations[this.currentLanguage]) {\n this.translations[this.currentLanguage] = {\n [defaultNS]: {},\n };\n }\n\n this.i18nextConfig = {\n debug: finalOptions.debug,\n fallbackLng: false,\n interpolation: { escapeValue: false },\n keySeparator: false,\n lng: this.currentLanguage,\n nsSeparator: false,\n\n parseMissingKeyHandler: (key: string) => {\n this.logger(`Streami18n: Missing translation for key: ${key}`);\n\n return key;\n },\n ...i18nextConfig,\n };\n\n this.validateCurrentLanguage();\n\n const dayjsLocaleConfigForLanguage = finalOptions.dayjsLocaleConfigForLanguage;\n\n if (dayjsLocaleConfigForLanguage) {\n this.addOrUpdateLocale(this.currentLanguage, {\n ...dayjsLocaleConfigForLanguage,\n });\n } else if (!this.localeExists(this.currentLanguage)) {\n this.logger(\n `Streami18n: Streami18n(...) - Locale config for ${this.currentLanguage} does not exist in momentjs.` +\n `Please import the locale file using \"import 'moment/locale/${this.currentLanguage}';\" in your app or ` +\n `register the locale config with Streami18n using registerTranslation(language, translation, customDayjsLocale)`,\n );\n }\n\n this.tDateTimeParser = (timestamp) => {\n if (finalOptions.disableDateTimeTranslations || !this.localeExists(this.currentLanguage)) {\n /**\n * TS needs to know which is being called to accept the chain call\n */\n if (isDayJs(this.DateTimeParser)) {\n return this.DateTimeParser(timestamp).locale(defaultLng);\n }\n return this.DateTimeParser(timestamp).locale(defaultLng);\n }\n if (isDayJs(this.DateTimeParser)) {\n return this.DateTimeParser(timestamp).locale(this.currentLanguage);\n }\n return this.DateTimeParser(timestamp).locale(this.currentLanguage);\n };\n }\n\n /**\n * Initializes the i18next instance with configuration (which enables natural language as default keys)\n */\n async init() {\n this.validateCurrentLanguage();\n\n try {\n this.t = await this.i18nInstance.init({\n ...this.i18nextConfig,\n lng: this.currentLanguage,\n resources: this.translations,\n });\n this.initialized = true;\n } catch (error) {\n this.logger(`Something went wrong with init: ${JSON.stringify(error)}`);\n }\n\n return {\n t: this.t,\n tDateTimeParser: this.tDateTimeParser,\n };\n }\n\n localeExists = (language: string) => {\n if (this.isCustomDateTimeParser) return true;\n\n return Object.keys(Dayjs.Ls).indexOf(language) > -1;\n };\n\n validateCurrentLanguage = () => {\n const availableLanguages = Object.keys(this.translations);\n if (availableLanguages.indexOf(this.currentLanguage) === -1) {\n this.logger(\n `Streami18n: '${this.currentLanguage}' language is not registered.` +\n ` Please make sure to call streami18n.registerTranslation('${this.currentLanguage}', {...}) or ` +\n `use one the built-in supported languages - ${this.getAvailableLanguages()}`,\n );\n\n this.currentLanguage = defaultLng;\n }\n };\n\n /** Returns an instance of i18next used within this class instance */\n geti18Instance = () => this.i18nInstance;\n\n /** Returns list of available languages. */\n getAvailableLanguages = () => Object.keys(this.translations);\n\n /** Returns all the translation dictionary for all inbuilt-languages */\n getTranslations = () => this.translations;\n\n /**\n * Returns current version translator function.\n */\n async getTranslators() {\n if (!this.initialized) {\n if (this.dayjsLocales[this.currentLanguage]) {\n this.addOrUpdateLocale(this.currentLanguage, this.dayjsLocales[this.currentLanguage]);\n }\n return await this.init();\n } else {\n return {\n t: this.t,\n tDateTimeParser: this.tDateTimeParser,\n };\n }\n }\n\n /**\n * Register translation\n */\n registerTranslation(\n language: string,\n translation: Partial<typeof enTranslations> | DefaultStreamChatGenerics,\n customDayjsLocale?: Partial<ILocale>,\n ) {\n if (!translation) {\n this.logger(\n `Streami18n: registerTranslation(language, translation, customDayjsLocale) called without translation`,\n );\n return;\n }\n\n if (!this.translations[language]) {\n this.translations[language] = { [defaultNS]: translation };\n } else {\n this.translations[language][defaultNS] = translation;\n }\n\n if (customDayjsLocale) {\n this.dayjsLocales[language] = { ...customDayjsLocale };\n } else if (!this.localeExists(language)) {\n this.logger(\n `Streami18n: registerTranslation(language, translation, customDayjsLocale) - ` +\n `Locale config for ${language} does not exist in Dayjs.` +\n `Please import the locale file using \"import 'dayjs/locale/${language}';\" in your app or ` +\n `register the locale config with Streami18n using registerTranslation(language, translation, customDayjsLocale)`,\n );\n }\n\n if (this.initialized) {\n this.i18nInstance.addResources(language, defaultNS, translation);\n }\n }\n\n addOrUpdateLocale(key: string, config: Partial<ILocale>) {\n if (this.localeExists(key)) {\n Dayjs.updateLocale(key, { ...config });\n } else {\n // Merging the custom locale config with en config, so missing keys can default to english.\n Dayjs.locale({ name: key, ...en_locale, ...config }, undefined, true);\n }\n }\n\n /**\n * Changes the language.\n */\n async setLanguage(language: string) {\n this.currentLanguage = language;\n\n if (!this.initialized) return;\n\n try {\n const t = await this.i18nInstance.changeLanguage(language);\n if (this.dayjsLocales[language]) {\n this.addOrUpdateLocale(this.currentLanguage, this.dayjsLocales[this.currentLanguage]);\n }\n this.setLanguageCallback(t);\n\n return t;\n } catch (error) {\n this.logger(`Failed to set language: ${JSON.stringify(error)}`);\n return this.t;\n }\n }\n\n registerSetLanguageCallback(callback: (t: TFunction) => void) {\n this.setLanguageCallback = callback;\n }\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.secondsUntil = exports.ONE_SECOND_IN_MS = void 0;
|
|
5
|
+
var ONE_SECOND_IN_MS = 1000;
|
|
6
|
+
exports.ONE_SECOND_IN_MS = ONE_SECOND_IN_MS;
|
|
7
|
+
|
|
8
|
+
var secondsUntil = function secondsUntil(date) {
|
|
9
|
+
return Math.trunc((date.getTime() - Date.now()) / ONE_SECOND_IN_MS);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.secondsUntil = secondsUntil;
|
|
13
|
+
//# sourceMappingURL=date.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["date.ts"],"names":["ONE_SECOND_IN_MS","secondsUntil","date","Math","trunc","getTime","Date","now"],"mappings":";;;;AAAO,IAAMA,gBAAgB,GAAG,IAAzB;;;AAEA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAACC,IAAD;AAAA,SAC1BC,IAAI,CAACC,KAAL,CAAW,CAACF,IAAI,CAACG,OAAL,KAAiBC,IAAI,CAACC,GAAL,EAAlB,IAAgCP,gBAA3C,CAD0B;AAAA,CAArB","sourcesContent":["export const ONE_SECOND_IN_MS = 1000;\n\nexport const secondsUntil = (date: Date) =>\n Math.trunc((date.getTime() - Date.now()) / ONE_SECOND_IN_MS);\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.getResizedImageUrl = getResizedImageUrl;
|
|
5
|
+
|
|
6
|
+
var _reactNative = require("react-native");
|
|
7
|
+
|
|
8
|
+
function getResizedImageUrl(_ref) {
|
|
9
|
+
var height = _ref.height,
|
|
10
|
+
_ref$resize = _ref.resize,
|
|
11
|
+
resize = _ref$resize === void 0 ? 'clip' : _ref$resize,
|
|
12
|
+
url = _ref.url,
|
|
13
|
+
width = _ref.width;
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
var parsedUrl = new URL(url);
|
|
17
|
+
var originalHeight = parsedUrl.searchParams.get('oh');
|
|
18
|
+
var originalWidth = parsedUrl.searchParams.get('ow');
|
|
19
|
+
var isResizableUrl = url.includes('.stream-io-cdn.com') && originalHeight && originalWidth;
|
|
20
|
+
if (!isResizableUrl || !height && !width) return url;
|
|
21
|
+
|
|
22
|
+
if (height) {
|
|
23
|
+
parsedUrl.searchParams.set('h', "" + _reactNative.PixelRatio.getPixelSizeForLayoutSize(Number(height)));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (width) {
|
|
27
|
+
parsedUrl.searchParams.set('w', "" + _reactNative.PixelRatio.getPixelSizeForLayoutSize(Number(width)));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
parsedUrl.searchParams.set('resize', "" + resize);
|
|
31
|
+
return parsedUrl.toString();
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.warn(error);
|
|
34
|
+
return url;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=getResizedImageUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["getResizedImageUrl.ts"],"names":["getResizedImageUrl","height","resize","url","width","parsedUrl","URL","originalHeight","searchParams","get","originalWidth","isResizableUrl","includes","set","PixelRatio","getPixelSizeForLayoutSize","Number","toString","error","console","warn"],"mappings":";;;;;AAAA;;AAqBO,SAASA,kBAAT,OAKsB;AAAA,MAJ3BC,MAI2B,QAJ3BA,MAI2B;AAAA,yBAH3BC,MAG2B;AAAA,MAH3BA,MAG2B,4BAHlB,MAGkB;AAAA,MAF3BC,GAE2B,QAF3BA,GAE2B;AAAA,MAD3BC,KAC2B,QAD3BA,KAC2B;;AAC3B,MAAI;AACF,QAAMC,SAAS,GAAG,IAAIC,GAAJ,CAAQH,GAAR,CAAlB;AAEA,QAAMI,cAAc,GAAGF,SAAS,CAACG,YAAV,CAAuBC,GAAvB,CAA2B,IAA3B,CAAvB;AACA,QAAMC,aAAa,GAAGL,SAAS,CAACG,YAAV,CAAuBC,GAAvB,CAA2B,IAA3B,CAAtB;AAKA,QAAME,cAAc,GAAGR,GAAG,CAACS,QAAJ,CAAa,oBAAb,KAAsCL,cAAtC,IAAwDG,aAA/E;AAEA,QAAI,CAACC,cAAD,IAAoB,CAACV,MAAD,IAAW,CAACG,KAApC,EAA4C,OAAOD,GAAP;;AAE5C,QAAIF,MAAJ,EAAY;AACVI,MAAAA,SAAS,CAACG,YAAV,CAAuBK,GAAvB,CAA2B,GAA3B,OAAmCC,wBAAWC,yBAAX,CAAqCC,MAAM,CAACf,MAAD,CAA3C,CAAnC;AACD;;AAED,QAAIG,KAAJ,EAAW;AACTC,MAAAA,SAAS,CAACG,YAAV,CAAuBK,GAAvB,CAA2B,GAA3B,OAAmCC,wBAAWC,yBAAX,CAAqCC,MAAM,CAACZ,KAAD,CAA3C,CAAnC;AACD;;AAEDC,IAAAA,SAAS,CAACG,YAAV,CAAuBK,GAAvB,CAA2B,QAA3B,OAAwCX,MAAxC;AAEA,WAAOG,SAAS,CAACY,QAAV,EAAP;AACD,GAxBD,CAwBE,OAAOC,KAAP,EAAc;AAGdC,IAAAA,OAAO,CAACC,IAAR,CAAaF,KAAb;AAEA,WAAOf,GAAP;AACD;AACF","sourcesContent":["import { PixelRatio } from 'react-native';\n\ntype GetResizedImageUrlParams = {\n url: string;\n height?: string | number;\n resize?: 'clip' | 'crop' | 'fill' | 'scale';\n width?: string | number;\n};\n\n/**\n * Any file or image upload done through stream's chat SDK or components get uploaded\n * to CloudFront CDN. Following function returns a url of resized image (to given width and height).\n * It can be used to avoid rendering heavy images on UI, for the sake of performance.\n *\n * This function accepts an object with following properties:\n * - height: height of the resized image.\n * - url: url of the image.\n * - width: width of the resized image.\n *\n * @returns {string} Url of the image with given height and width.\n */\nexport function getResizedImageUrl({\n height,\n resize = 'clip',\n url,\n width,\n}: GetResizedImageUrlParams) {\n try {\n const parsedUrl = new URL(url);\n\n const originalHeight = parsedUrl.searchParams.get('oh');\n const originalWidth = parsedUrl.searchParams.get('ow');\n\n // If url is not from new cloudfront CDN (which offers fast image resizing), then return the url as it is.\n // Check for oh and ow parameters in the url, is just to differentiate between old and new CDN.\n // In case of old CDN we don't want to do any kind of resizing.\n const isResizableUrl = url.includes('.stream-io-cdn.com') && originalHeight && originalWidth;\n\n if (!isResizableUrl || (!height && !width)) return url;\n\n if (height) {\n parsedUrl.searchParams.set('h', `${PixelRatio.getPixelSizeForLayoutSize(Number(height))}`);\n }\n\n if (width) {\n parsedUrl.searchParams.set('w', `${PixelRatio.getPixelSizeForLayoutSize(Number(width))}`);\n }\n\n parsedUrl.searchParams.set('resize', `${resize}`);\n\n return parsedUrl.toString();\n } catch (error) {\n // There is some issue with the url.\n // Simply return the original url, there is no need to break the app for this.\n console.warn(error);\n\n return url;\n }\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.getUrlOfImageAttachment = getUrlOfImageAttachment;
|
|
5
|
+
|
|
6
|
+
function getUrlOfImageAttachment(image) {
|
|
7
|
+
return image.image_url || image.thumb_url;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=getUrlOfImageAttachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["getUrlOfImageAttachment.ts"],"names":["getUrlOfImageAttachment","image","image_url","thumb_url"],"mappings":";;;;;AAOO,SAASA,uBAAT,CAAiCC,KAAjC,EAAoD;AACzD,SAAOA,KAAK,CAACC,SAAN,IAAmBD,KAAK,CAACE,SAAhC;AACD","sourcesContent":["import type { Attachment } from 'stream-chat';\n\n/**\n * Extract url of image from image attachment.\n * @param image Image attachment\n * @returns {string}\n */\nexport function getUrlOfImageAttachment(image: Attachment) {\n return image.image_url || image.thumb_url;\n}\n"]}
|
|
@@ -3,7 +3,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.vw = exports.vh = exports.urlRegex = exports.queryUsersDebounced = exports.queryMembersDebounced = exports.makeImageCompatibleUrl = exports.isMentionTrigger = exports.isEmojiTrigger = exports.isCommandTrigger = exports.getUrlWithoutParams = exports.generateRandomId = exports.emojiRegex = exports.ProgressIndicatorTypes = exports.MessageStatusTypes = exports.FileState = exports.ACITriggerSettings = void 0;
|
|
7
7
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
|
|
@@ -13,10 +13,10 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
13
13
|
|
|
14
14
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
15
15
|
|
|
16
|
-
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
17
|
-
|
|
18
16
|
var _reactNative = require("react-native");
|
|
19
17
|
|
|
18
|
+
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
19
|
+
|
|
20
20
|
var _compiled = require("../emoji-data/compiled");
|
|
21
21
|
|
|
22
22
|
var FileState = Object.freeze({
|
|
@@ -32,6 +32,12 @@ var ProgressIndicatorTypes = Object.freeze({
|
|
|
32
32
|
RETRY: 'retry'
|
|
33
33
|
});
|
|
34
34
|
exports.ProgressIndicatorTypes = ProgressIndicatorTypes;
|
|
35
|
+
var MessageStatusTypes = {
|
|
36
|
+
FAILED: 'failed',
|
|
37
|
+
RECEIVED: 'received',
|
|
38
|
+
SENDING: 'sending'
|
|
39
|
+
};
|
|
40
|
+
exports.MessageStatusTypes = MessageStatusTypes;
|
|
35
41
|
var defaultAutoCompleteSuggestionsLimit = 10;
|
|
36
42
|
var defaultMentionAllAppUsersQuery = {
|
|
37
43
|
filters: {},
|
|
@@ -76,7 +82,9 @@ var getMembersAndWatchers = function getMembersAndWatchers(channel) {
|
|
|
76
82
|
|
|
77
83
|
var queryMembers = function () {
|
|
78
84
|
var _ref = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(channel, query, onReady) {
|
|
79
|
-
var
|
|
85
|
+
var options,
|
|
86
|
+
_options$limit,
|
|
87
|
+
limit,
|
|
80
88
|
response,
|
|
81
89
|
_users,
|
|
82
90
|
_args = arguments;
|
|
@@ -85,14 +93,15 @@ var queryMembers = function () {
|
|
|
85
93
|
while (1) {
|
|
86
94
|
switch (_context.prev = _context.next) {
|
|
87
95
|
case 0:
|
|
88
|
-
|
|
96
|
+
options = _args.length > 3 && _args[3] !== undefined ? _args[3] : {};
|
|
97
|
+
_options$limit = options.limit, limit = _options$limit === void 0 ? defaultAutoCompleteSuggestionsLimit : _options$limit;
|
|
89
98
|
|
|
90
99
|
if (!(typeof query === 'string')) {
|
|
91
|
-
_context.next =
|
|
100
|
+
_context.next = 9;
|
|
92
101
|
break;
|
|
93
102
|
}
|
|
94
103
|
|
|
95
|
-
_context.next =
|
|
104
|
+
_context.next = 5;
|
|
96
105
|
return channel.queryMembers({
|
|
97
106
|
name: {
|
|
98
107
|
$autocomplete: query
|
|
@@ -101,7 +110,7 @@ var queryMembers = function () {
|
|
|
101
110
|
limit: limit
|
|
102
111
|
});
|
|
103
112
|
|
|
104
|
-
case
|
|
113
|
+
case 5:
|
|
105
114
|
response = _context.sent;
|
|
106
115
|
_users = [];
|
|
107
116
|
response.members.forEach(function (member) {
|
|
@@ -112,7 +121,7 @@ var queryMembers = function () {
|
|
|
112
121
|
onReady(_users);
|
|
113
122
|
}
|
|
114
123
|
|
|
115
|
-
case
|
|
124
|
+
case 9:
|
|
116
125
|
case "end":
|
|
117
126
|
return _context.stop();
|
|
118
127
|
}
|
|
@@ -134,7 +143,7 @@ exports.queryMembersDebounced = queryMembersDebounced;
|
|
|
134
143
|
var queryUsers = function () {
|
|
135
144
|
var _ref2 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(client, query, onReady) {
|
|
136
145
|
var options,
|
|
137
|
-
_options$
|
|
146
|
+
_options$limit2,
|
|
138
147
|
limit,
|
|
139
148
|
_options$mentionAllAp,
|
|
140
149
|
mentionAllAppUsersQuery,
|
|
@@ -154,7 +163,7 @@ var queryUsers = function () {
|
|
|
154
163
|
break;
|
|
155
164
|
}
|
|
156
165
|
|
|
157
|
-
_options$
|
|
166
|
+
_options$limit2 = options.limit, limit = _options$limit2 === void 0 ? defaultAutoCompleteSuggestionsLimit : _options$limit2, _options$mentionAllAp = options.mentionAllAppUsersQuery, mentionAllAppUsersQuery = _options$mentionAllAp === void 0 ? defaultMentionAllAppUsersQuery : _options$mentionAllAp;
|
|
158
167
|
filters = (0, _extends2["default"])({
|
|
159
168
|
id: {
|
|
160
169
|
$ne: client.userID
|
|
@@ -234,12 +243,11 @@ var ACITriggerSettings = function ACITriggerSettings(_ref3) {
|
|
|
234
243
|
onMentionSelectItem = _ref3.onMentionSelectItem;
|
|
235
244
|
return {
|
|
236
245
|
'/': {
|
|
237
|
-
component: 'CommandsItem',
|
|
238
246
|
dataProvider: function dataProvider(query, text, onReady) {
|
|
239
247
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
240
248
|
if (text.indexOf('/') !== 0) return [];
|
|
241
|
-
var _options$
|
|
242
|
-
limit = _options$
|
|
249
|
+
var _options$limit3 = options.limit,
|
|
250
|
+
limit = _options$limit3 === void 0 ? defaultAutoCompleteSuggestionsLimit : _options$limit3;
|
|
243
251
|
var selectedCommands = !query ? getCommands(channel) : getCommands(channel).filter(function (command) {
|
|
244
252
|
var _command$name;
|
|
245
253
|
|
|
@@ -277,10 +285,10 @@ var ACITriggerSettings = function ACITriggerSettings(_ref3) {
|
|
|
277
285
|
key: "" + entity.name,
|
|
278
286
|
text: "/" + entity.name
|
|
279
287
|
};
|
|
280
|
-
}
|
|
288
|
+
},
|
|
289
|
+
type: 'command'
|
|
281
290
|
},
|
|
282
291
|
':': {
|
|
283
|
-
component: 'EmojisItem',
|
|
284
292
|
dataProvider: function dataProvider(query, _, onReady) {
|
|
285
293
|
if (!query) return [];
|
|
286
294
|
|
|
@@ -324,13 +332,13 @@ var ACITriggerSettings = function ACITriggerSettings(_ref3) {
|
|
|
324
332
|
key: entity.name,
|
|
325
333
|
text: entity.unicode
|
|
326
334
|
};
|
|
327
|
-
}
|
|
335
|
+
},
|
|
336
|
+
type: 'emoji'
|
|
328
337
|
},
|
|
329
338
|
'@': {
|
|
330
339
|
callback: function callback(item) {
|
|
331
340
|
onMentionSelectItem(item);
|
|
332
341
|
},
|
|
333
|
-
component: 'MentionsItem',
|
|
334
342
|
dataProvider: function dataProvider(query, _, onReady) {
|
|
335
343
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {
|
|
336
344
|
limit: defaultAutoCompleteSuggestionsLimit,
|
|
@@ -391,7 +399,8 @@ var ACITriggerSettings = function ACITriggerSettings(_ref3) {
|
|
|
391
399
|
key: entity.id,
|
|
392
400
|
text: "@" + (entity.name || entity.id)
|
|
393
401
|
};
|
|
394
|
-
}
|
|
402
|
+
},
|
|
403
|
+
type: 'mention'
|
|
395
404
|
}
|
|
396
405
|
};
|
|
397
406
|
};
|
|
@@ -404,6 +413,15 @@ var makeImageCompatibleUrl = function makeImageCompatibleUrl(url) {
|
|
|
404
413
|
|
|
405
414
|
exports.makeImageCompatibleUrl = makeImageCompatibleUrl;
|
|
406
415
|
|
|
416
|
+
var getUrlWithoutParams = function getUrlWithoutParams(url) {
|
|
417
|
+
if (!url) return url;
|
|
418
|
+
var indexOfQuestion = url.indexOf('?');
|
|
419
|
+
if (indexOfQuestion === -1) return url;
|
|
420
|
+
return url.substring(0, url.indexOf('?'));
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
exports.getUrlWithoutParams = getUrlWithoutParams;
|
|
424
|
+
|
|
407
425
|
var vw = function vw(percentageWidth) {
|
|
408
426
|
var rounded = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
409
427
|
var value = _reactNative.Dimensions.get('window').width * (percentageWidth / 100);
|
|
@@ -431,4 +449,6 @@ var generateRandomId = function generateRandomId() {
|
|
|
431
449
|
exports.generateRandomId = generateRandomId;
|
|
432
450
|
var emojiRegex = /^(\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83E\uDDD1(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uD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-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFE])|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83E\uDDD1(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFD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F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])+$/;
|
|
433
451
|
exports.emojiRegex = emojiRegex;
|
|
452
|
+
var urlRegex = /(?:\s|^)((?:https?:\/\/)?(?:[a-z0-9-]+(?:\.[a-z0-9-]+)+)(?::[0-9]+)?(?:\/(?:[^\s]+)?)?)/g;
|
|
453
|
+
exports.urlRegex = urlRegex;
|
|
434
454
|
//# sourceMappingURL=utils.js.map
|