@ethora/chat-component-rn 26.8.5 → 26.8.7
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/CHANGELOG.md +26 -0
- package/README.md +95 -0
- package/lib/commonjs/assets/emojiData.js +40 -0
- package/lib/commonjs/assets/emojiData.js.map +1 -0
- package/lib/commonjs/assets/icons.js +5 -3
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +35 -15
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +33 -24
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatWrapper.js +22 -16
- package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/EncryptedSendNotice.js +47 -0
- package/lib/commonjs/components/MainComponents/EncryptedSendNotice.js.map +1 -0
- package/lib/commonjs/components/MainComponents/EncryptionCard.js +286 -0
- package/lib/commonjs/components/MainComponents/EncryptionCard.js.map +1 -0
- package/lib/commonjs/components/MainComponents/MediaMessage.js +7 -0
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js +4 -12
- package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +110 -35
- package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js +5 -0
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +32 -29
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomStack.js +133 -65
- package/lib/commonjs/components/MainComponents/RoomStack.js.map +1 -1
- package/lib/commonjs/components/MainComponents/SealedAttachment.js +231 -0
- package/lib/commonjs/components/MainComponents/SealedAttachment.js.map +1 -0
- package/lib/commonjs/components/MainComponents/SystemMessage.js +6 -2
- package/lib/commonjs/components/MainComponents/SystemMessage.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/Avatar.js +5 -1
- package/lib/commonjs/components/MessageBubble/Avatar.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/BottomReplyContainer.js +18 -21
- package/lib/commonjs/components/MessageBubble/BottomReplyContainer.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/EmojiPickerSheet.js +447 -0
- package/lib/commonjs/components/MessageBubble/EmojiPickerSheet.js.map +1 -0
- package/lib/commonjs/components/MessageBubble/Message.js +264 -136
- package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js +215 -13
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageReaction.js +113 -94
- package/lib/commonjs/components/MessageBubble/MessageReaction.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageReply.js +66 -24
- package/lib/commonjs/components/MessageBubble/MessageReply.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +7 -4
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +159 -16
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js +4 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
- package/lib/commonjs/components/Modals/Modal/SwipeBackLayer.js +76 -44
- package/lib/commonjs/components/Modals/Modal/SwipeBackLayer.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +29 -6
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +5 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +37 -13
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/LastMessageItem.js +6 -0
- package/lib/commonjs/components/RoomComponents/LastMessageItem.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js +2 -2
- package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageEmoji.js +8 -9
- package/lib/commonjs/components/RoomComponents/styled/LastMessageEmoji.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +4 -6
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +2 -2
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageSealed.js +41 -0
- package/lib/commonjs/components/RoomComponents/styled/LastMessageSealed.js.map +1 -0
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +2 -2
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/commonjs/components/Thread/ThreadWrapper.js +273 -152
- package/lib/commonjs/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/commonjs/components/UsersList/UsersList.js +2 -1
- package/lib/commonjs/components/UsersList/UsersList.js.map +1 -1
- package/lib/commonjs/components/styled/DateLabel.js +6 -3
- package/lib/commonjs/components/styled/DateLabel.js.map +1 -1
- package/lib/commonjs/components/styled/SendInput.js +4 -2
- package/lib/commonjs/components/styled/SendInput.js.map +1 -1
- package/lib/commonjs/context/MessageNotificationContext.js +188 -9
- package/lib/commonjs/context/MessageNotificationContext.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +22 -7
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/e2ee/crypto.js +207 -0
- package/lib/commonjs/e2ee/crypto.js.map +1 -0
- package/lib/commonjs/e2ee/deviceStore.js +84 -0
- package/lib/commonjs/e2ee/deviceStore.js.map +1 -0
- package/lib/commonjs/e2ee/fileCipher.js +95 -0
- package/lib/commonjs/e2ee/fileCipher.js.map +1 -0
- package/lib/commonjs/e2ee/fileEnvelope.js +79 -0
- package/lib/commonjs/e2ee/fileEnvelope.js.map +1 -0
- package/lib/commonjs/e2ee/index.js +210 -0
- package/lib/commonjs/e2ee/index.js.map +1 -0
- package/lib/commonjs/e2ee/limits.js +9 -0
- package/lib/commonjs/e2ee/limits.js.map +1 -0
- package/lib/commonjs/e2ee/ns.js +8 -0
- package/lib/commonjs/e2ee/ns.js.map +1 -0
- package/lib/commonjs/e2ee/omemo.js +622 -0
- package/lib/commonjs/e2ee/omemo.js.map +1 -0
- package/lib/commonjs/e2ee/protobuf.js +149 -0
- package/lib/commonjs/e2ee/protobuf.js.map +1 -0
- package/lib/commonjs/e2ee/ratchet.js +238 -0
- package/lib/commonjs/e2ee/ratchet.js.map +1 -0
- package/lib/commonjs/e2ee/sealedBody.js +23 -0
- package/lib/commonjs/e2ee/sealedBody.js.map +1 -0
- package/lib/commonjs/e2ee/sealedFiles.js +174 -0
- package/lib/commonjs/e2ee/sealedFiles.js.map +1 -0
- package/lib/commonjs/e2ee/send.js +54 -0
- package/lib/commonjs/e2ee/send.js.map +1 -0
- package/lib/commonjs/e2ee/stanza.js +114 -0
- package/lib/commonjs/e2ee/stanza.js.map +1 -0
- package/lib/commonjs/e2ee/store.js +43 -0
- package/lib/commonjs/e2ee/store.js.map +1 -0
- package/lib/commonjs/helpers/accountName.js +23 -0
- package/lib/commonjs/helpers/accountName.js.map +1 -0
- package/lib/commonjs/helpers/createMessageFromXml.js +19 -4
- package/lib/commonjs/helpers/createMessageFromXml.js.map +1 -1
- package/lib/commonjs/helpers/createRoomFromApi.js +36 -2
- package/lib/commonjs/helpers/createRoomFromApi.js.map +1 -1
- package/lib/commonjs/helpers/createUserNameFromSetUser.js +2 -1
- package/lib/commonjs/helpers/createUserNameFromSetUser.js.map +1 -1
- package/lib/commonjs/helpers/displayName.js +16 -0
- package/lib/commonjs/helpers/displayName.js.map +1 -0
- package/lib/commonjs/helpers/emoji.js +51 -0
- package/lib/commonjs/helpers/emoji.js.map +1 -0
- package/lib/commonjs/helpers/haptics.js +29 -0
- package/lib/commonjs/helpers/haptics.js.map +1 -0
- package/lib/commonjs/helpers/historyPreloadScheduler.js +32 -66
- package/lib/commonjs/helpers/historyPreloadScheduler.js.map +1 -1
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js +21 -12
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/commonjs/helpers/mamReactions.js +57 -0
- package/lib/commonjs/helpers/mamReactions.js.map +1 -0
- package/lib/commonjs/helpers/parseMessageReference.js +42 -0
- package/lib/commonjs/helpers/parseMessageReference.js.map +1 -0
- package/lib/commonjs/helpers/persistCrypto.js +5 -0
- package/lib/commonjs/helpers/persistCrypto.js.map +1 -1
- package/lib/commonjs/helpers/reactionsConfig.js +17 -0
- package/lib/commonjs/helpers/reactionsConfig.js.map +1 -0
- package/lib/commonjs/helpers/secureKeyValue.js +20 -0
- package/lib/commonjs/helpers/secureKeyValue.js.map +1 -1
- package/lib/commonjs/helpers/updateMessagesTillLast.js +17 -2
- package/lib/commonjs/helpers/updateMessagesTillLast.js.map +1 -1
- package/lib/commonjs/helpers/videoCache.js +136 -0
- package/lib/commonjs/helpers/videoCache.js.map +1 -0
- package/lib/commonjs/hooks/useHeapSender.js +3 -1
- package/lib/commonjs/hooks/useHeapSender.js.map +1 -1
- package/lib/commonjs/hooks/useLogout.js +8 -0
- package/lib/commonjs/hooks/useLogout.js.map +1 -1
- package/lib/commonjs/hooks/useMessageHeapState.js +3 -2
- package/lib/commonjs/hooks/useMessageHeapState.js.map +1 -1
- package/lib/commonjs/hooks/useRoomInitialization.js +16 -7
- package/lib/commonjs/hooks/useRoomInitialization.js.map +1 -1
- package/lib/commonjs/hooks/useSendMessage.js +85 -15
- package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
- package/lib/commonjs/hooks/useUnreadMessagesCounter.js +1 -1
- package/lib/commonjs/hooks/useUnreadMessagesCounter.js.map +1 -1
- package/lib/commonjs/i18n/strings.js +180 -0
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/main.js +13 -0
- package/lib/commonjs/main.js.map +1 -1
- package/lib/commonjs/networking/api-requests/auth.api.js +4 -1
- package/lib/commonjs/networking/api-requests/auth.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +111 -17
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/stanzaHandlers.js +106 -50
- package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
- package/lib/commonjs/networking/xmpp/getHistory.xmpp.js +29 -74
- package/lib/commonjs/networking/xmpp/getHistory.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/handleStanzas.xmpp.js +44 -0
- package/lib/commonjs/networking/xmpp/handleStanzas.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/mamRouter.js +186 -0
- package/lib/commonjs/networking/xmpp/mamRouter.js.map +1 -0
- package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js +41 -4
- package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/sendMediaMessage.xmpp.js +16 -3
- package/lib/commonjs/networking/xmpp/sendMediaMessage.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/sendTextMessage.xmpp.js +13 -6
- package/lib/commonjs/networking/xmpp/sendTextMessage.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.js +14 -6
- package/lib/commonjs/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js +104 -23
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/roomStore/Middleware/newMessageMidlleware.js +29 -34
- package/lib/commonjs/roomStore/Middleware/newMessageMidlleware.js.map +1 -1
- package/lib/commonjs/roomStore/Middleware/perfMiddleware.js +51 -0
- package/lib/commonjs/roomStore/Middleware/perfMiddleware.js.map +1 -0
- package/lib/commonjs/roomStore/Middleware/reactionsMiddleware.js +66 -43
- package/lib/commonjs/roomStore/Middleware/reactionsMiddleware.js.map +1 -1
- package/lib/commonjs/roomStore/Middleware/unreadMidlleware.js +88 -68
- package/lib/commonjs/roomStore/Middleware/unreadMidlleware.js.map +1 -1
- package/lib/commonjs/roomStore/index.js +18 -14
- package/lib/commonjs/roomStore/index.js.map +1 -1
- package/lib/commonjs/roomStore/persistBackend.js +93 -0
- package/lib/commonjs/roomStore/persistBackend.js.map +1 -0
- package/lib/commonjs/roomStore/persistence.js +253 -51
- package/lib/commonjs/roomStore/persistence.js.map +1 -1
- package/lib/commonjs/roomStore/roomsSlice.js +282 -136
- package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
- package/lib/commonjs/theme/theme.js +3 -0
- package/lib/commonjs/theme/theme.js.map +1 -1
- package/lib/commonjs/utils/devLogger.js +14 -0
- package/lib/commonjs/utils/devLogger.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/assets/emojiData.js +36 -0
- package/lib/module/assets/emojiData.js.map +1 -0
- package/lib/module/assets/icons.js +4 -2
- package/lib/module/assets/icons.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +37 -17
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +34 -25
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/ChatWrapper.js +23 -17
- package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/EncryptedSendNotice.js +42 -0
- package/lib/module/components/MainComponents/EncryptedSendNotice.js.map +1 -0
- package/lib/module/components/MainComponents/EncryptionCard.js +281 -0
- package/lib/module/components/MainComponents/EncryptionCard.js.map +1 -0
- package/lib/module/components/MainComponents/MediaMessage.js +7 -0
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/MessageContainer.js +7 -14
- package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +110 -35
- package/lib/module/components/MainComponents/MessageList.js.map +1 -1
- package/lib/module/components/MainComponents/ReduxWrapper.js +5 -0
- package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +32 -29
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/MainComponents/RoomStack.js +131 -63
- package/lib/module/components/MainComponents/RoomStack.js.map +1 -1
- package/lib/module/components/MainComponents/SealedAttachment.js +224 -0
- package/lib/module/components/MainComponents/SealedAttachment.js.map +1 -0
- package/lib/module/components/MainComponents/SystemMessage.js +6 -2
- package/lib/module/components/MainComponents/SystemMessage.js.map +1 -1
- package/lib/module/components/MessageBubble/Avatar.js +5 -1
- package/lib/module/components/MessageBubble/Avatar.js.map +1 -1
- package/lib/module/components/MessageBubble/BottomReplyContainer.js +19 -22
- package/lib/module/components/MessageBubble/BottomReplyContainer.js.map +1 -1
- package/lib/module/components/MessageBubble/EmojiPickerSheet.js +438 -0
- package/lib/module/components/MessageBubble/EmojiPickerSheet.js.map +1 -0
- package/lib/module/components/MessageBubble/Message.js +269 -140
- package/lib/module/components/MessageBubble/Message.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageInteractions.js +217 -15
- package/lib/module/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageReaction.js +115 -94
- package/lib/module/components/MessageBubble/MessageReaction.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageReply.js +65 -24
- package/lib/module/components/MessageBubble/MessageReply.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +7 -4
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +161 -18
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/PdfView.js +4 -0
- package/lib/module/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
- package/lib/module/components/Modals/Modal/SwipeBackLayer.js +76 -44
- package/lib/module/components/Modals/Modal/SwipeBackLayer.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +32 -8
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +4 -0
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +37 -13
- package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/module/components/RoomComponents/LastMessageItem.js +6 -0
- package/lib/module/components/RoomComponents/LastMessageItem.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastAudioMessage.js +2 -2
- package/lib/module/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageEmoji.js +8 -9
- package/lib/module/components/RoomComponents/styled/LastMessageEmoji.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js +4 -6
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +2 -2
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageSealed.js +36 -0
- package/lib/module/components/RoomComponents/styled/LastMessageSealed.js.map +1 -0
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +2 -2
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/module/components/Thread/ThreadWrapper.js +273 -153
- package/lib/module/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/module/components/UsersList/UsersList.js +2 -1
- package/lib/module/components/UsersList/UsersList.js.map +1 -1
- package/lib/module/components/styled/DateLabel.js +6 -3
- package/lib/module/components/styled/DateLabel.js.map +1 -1
- package/lib/module/components/styled/SendInput.js +4 -2
- package/lib/module/components/styled/SendInput.js.map +1 -1
- package/lib/module/context/MessageNotificationContext.js +190 -11
- package/lib/module/context/MessageNotificationContext.js.map +1 -1
- package/lib/module/context/xmppProvider.js +22 -7
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/e2ee/crypto.js +170 -0
- package/lib/module/e2ee/crypto.js.map +1 -0
- package/lib/module/e2ee/deviceStore.js +77 -0
- package/lib/module/e2ee/deviceStore.js.map +1 -0
- package/lib/module/e2ee/fileCipher.js +90 -0
- package/lib/module/e2ee/fileCipher.js.map +1 -0
- package/lib/module/e2ee/fileEnvelope.js +66 -0
- package/lib/module/e2ee/fileEnvelope.js.map +1 -0
- package/lib/module/e2ee/index.js +185 -0
- package/lib/module/e2ee/index.js.map +1 -0
- package/lib/module/e2ee/limits.js +5 -0
- package/lib/module/e2ee/limits.js.map +1 -0
- package/lib/module/e2ee/ns.js +4 -0
- package/lib/module/e2ee/ns.js.map +1 -0
- package/lib/module/e2ee/omemo.js +610 -0
- package/lib/module/e2ee/omemo.js.map +1 -0
- package/lib/module/e2ee/protobuf.js +140 -0
- package/lib/module/e2ee/protobuf.js.map +1 -0
- package/lib/module/e2ee/ratchet.js +228 -0
- package/lib/module/e2ee/ratchet.js.map +1 -0
- package/lib/module/e2ee/sealedBody.js +19 -0
- package/lib/module/e2ee/sealedBody.js.map +1 -0
- package/lib/module/e2ee/sealedFiles.js +154 -0
- package/lib/module/e2ee/sealedFiles.js.map +1 -0
- package/lib/module/e2ee/send.js +48 -0
- package/lib/module/e2ee/send.js.map +1 -0
- package/lib/module/e2ee/stanza.js +107 -0
- package/lib/module/e2ee/stanza.js.map +1 -0
- package/lib/module/e2ee/store.js +35 -0
- package/lib/module/e2ee/store.js.map +1 -0
- package/lib/module/helpers/accountName.js +18 -0
- package/lib/module/helpers/accountName.js.map +1 -0
- package/lib/module/helpers/createMessageFromXml.js +19 -4
- package/lib/module/helpers/createMessageFromXml.js.map +1 -1
- package/lib/module/helpers/createRoomFromApi.js +36 -2
- package/lib/module/helpers/createRoomFromApi.js.map +1 -1
- package/lib/module/helpers/createUserNameFromSetUser.js +3 -1
- package/lib/module/helpers/createUserNameFromSetUser.js.map +1 -1
- package/lib/module/helpers/displayName.js +11 -0
- package/lib/module/helpers/displayName.js.map +1 -0
- package/lib/module/helpers/emoji.js +44 -0
- package/lib/module/helpers/emoji.js.map +1 -0
- package/lib/module/helpers/haptics.js +24 -0
- package/lib/module/helpers/haptics.js.map +1 -0
- package/lib/module/helpers/historyPreloadScheduler.js +32 -66
- package/lib/module/helpers/historyPreloadScheduler.js.map +1 -1
- package/lib/module/helpers/insertMessageWithDelimiter.js +21 -12
- package/lib/module/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/module/helpers/mamReactions.js +51 -0
- package/lib/module/helpers/mamReactions.js.map +1 -0
- package/lib/module/helpers/parseMessageReference.js +37 -0
- package/lib/module/helpers/parseMessageReference.js.map +1 -0
- package/lib/module/helpers/persistCrypto.js +4 -0
- package/lib/module/helpers/persistCrypto.js.map +1 -1
- package/lib/module/helpers/reactionsConfig.js +10 -0
- package/lib/module/helpers/reactionsConfig.js.map +1 -0
- package/lib/module/helpers/secureKeyValue.js +19 -0
- package/lib/module/helpers/secureKeyValue.js.map +1 -1
- package/lib/module/helpers/updateMessagesTillLast.js +17 -2
- package/lib/module/helpers/updateMessagesTillLast.js.map +1 -1
- package/lib/module/helpers/videoCache.js +125 -0
- package/lib/module/helpers/videoCache.js.map +1 -0
- package/lib/module/hooks/useHeapSender.js +3 -1
- package/lib/module/hooks/useHeapSender.js.map +1 -1
- package/lib/module/hooks/useLogout.js +8 -0
- package/lib/module/hooks/useLogout.js.map +1 -1
- package/lib/module/hooks/useMessageHeapState.js +3 -2
- package/lib/module/hooks/useMessageHeapState.js.map +1 -1
- package/lib/module/hooks/useRoomInitialization.js +17 -8
- package/lib/module/hooks/useRoomInitialization.js.map +1 -1
- package/lib/module/hooks/useSendMessage.js +85 -15
- package/lib/module/hooks/useSendMessage.js.map +1 -1
- package/lib/module/hooks/useUnreadMessagesCounter.js +1 -1
- package/lib/module/hooks/useUnreadMessagesCounter.js.map +1 -1
- package/lib/module/i18n/strings.js +180 -0
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/main.js +1 -0
- package/lib/module/main.js.map +1 -1
- package/lib/module/networking/api-requests/auth.api.js +4 -1
- package/lib/module/networking/api-requests/auth.api.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +109 -18
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/stanzaHandlers.js +107 -51
- package/lib/module/networking/stanzaHandlers.js.map +1 -1
- package/lib/module/networking/xmpp/getHistory.xmpp.js +29 -74
- package/lib/module/networking/xmpp/getHistory.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/handleStanzas.xmpp.js +42 -0
- package/lib/module/networking/xmpp/handleStanzas.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/mamRouter.js +175 -0
- package/lib/module/networking/xmpp/mamRouter.js.map +1 -0
- package/lib/module/networking/xmpp/presenceInRoom.xmpp.js +38 -2
- package/lib/module/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/sendMediaMessage.xmpp.js +16 -3
- package/lib/module/networking/xmpp/sendMediaMessage.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/sendTextMessage.xmpp.js +13 -6
- package/lib/module/networking/xmpp/sendTextMessage.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.js +14 -6
- package/lib/module/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.js.map +1 -1
- package/lib/module/networking/xmppClient.js +105 -24
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/roomStore/Middleware/newMessageMidlleware.js +29 -34
- package/lib/module/roomStore/Middleware/newMessageMidlleware.js.map +1 -1
- package/lib/module/roomStore/Middleware/perfMiddleware.js +45 -0
- package/lib/module/roomStore/Middleware/perfMiddleware.js.map +1 -0
- package/lib/module/roomStore/Middleware/reactionsMiddleware.js +66 -43
- package/lib/module/roomStore/Middleware/reactionsMiddleware.js.map +1 -1
- package/lib/module/roomStore/Middleware/unreadMidlleware.js +89 -69
- package/lib/module/roomStore/Middleware/unreadMidlleware.js.map +1 -1
- package/lib/module/roomStore/index.js +19 -15
- package/lib/module/roomStore/index.js.map +1 -1
- package/lib/module/roomStore/persistBackend.js +86 -0
- package/lib/module/roomStore/persistBackend.js.map +1 -0
- package/lib/module/roomStore/persistence.js +253 -49
- package/lib/module/roomStore/persistence.js.map +1 -1
- package/lib/module/roomStore/roomsSlice.js +275 -134
- package/lib/module/roomStore/roomsSlice.js.map +1 -1
- package/lib/module/theme/theme.js +3 -0
- package/lib/module/theme/theme.js.map +1 -1
- package/lib/module/utils/devLogger.js +13 -0
- package/lib/module/utils/devLogger.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/assets/emojiData.d.ts +8 -0
- package/lib/typescript/assets/emojiData.d.ts.map +1 -0
- package/lib/typescript/assets/icons.d.ts +8 -0
- package/lib/typescript/assets/icons.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/EncryptedSendNotice.d.ts +4 -0
- package/lib/typescript/components/MainComponents/EncryptedSendNotice.d.ts.map +1 -0
- package/lib/typescript/components/MainComponents/EncryptionCard.d.ts +10 -0
- package/lib/typescript/components/MainComponents/EncryptionCard.d.ts.map +1 -0
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageContainer.d.ts +2 -2
- package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomStack.d.ts +7 -2
- package/lib/typescript/components/MainComponents/RoomStack.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/SealedAttachment.d.ts +13 -0
- package/lib/typescript/components/MainComponents/SealedAttachment.d.ts.map +1 -0
- package/lib/typescript/components/MainComponents/SystemMessage.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/Avatar.d.ts +2 -0
- package/lib/typescript/components/MessageBubble/Avatar.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/BottomReplyContainer.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/EmojiPickerSheet.d.ts +11 -0
- package/lib/typescript/components/MessageBubble/EmojiPickerSheet.d.ts.map +1 -0
- package/lib/typescript/components/MessageBubble/Message.d.ts +2 -2
- package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageInteractions.d.ts +2 -0
- package/lib/typescript/components/MessageBubble/MessageInteractions.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageReaction.d.ts +1 -0
- package/lib/typescript/components/MessageBubble/MessageReaction.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageReply.d.ts +7 -7
- package/lib/typescript/components/MessageBubble/MessageReply.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/FilePreviewModal/PdfView.d.ts.map +1 -1
- package/lib/typescript/components/Modals/Modal/SwipeBackLayer.d.ts +2 -1
- package/lib/typescript/components/Modals/Modal/SwipeBackLayer.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts +2 -2
- package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/LastMessageItem.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastAudioMessage.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageEmoji.d.ts +3 -6
- package/lib/typescript/components/RoomComponents/styled/LastMessageEmoji.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageSealed.d.ts +7 -0
- package/lib/typescript/components/RoomComponents/styled/LastMessageSealed.d.ts.map +1 -0
- package/lib/typescript/components/Thread/ThreadWrapper.d.ts +7 -1
- package/lib/typescript/components/Thread/ThreadWrapper.d.ts.map +1 -1
- package/lib/typescript/components/UsersList/UsersList.d.ts.map +1 -1
- package/lib/typescript/components/styled/DateLabel.d.ts +1 -0
- package/lib/typescript/components/styled/DateLabel.d.ts.map +1 -1
- package/lib/typescript/components/styled/SendInput.d.ts +1 -0
- package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
- package/lib/typescript/context/MessageNotificationContext.d.ts.map +1 -1
- package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
- package/lib/typescript/e2ee/crypto.d.ts +28 -0
- package/lib/typescript/e2ee/crypto.d.ts.map +1 -0
- package/lib/typescript/e2ee/deviceStore.d.ts +4 -0
- package/lib/typescript/e2ee/deviceStore.d.ts.map +1 -0
- package/lib/typescript/e2ee/fileCipher.d.ts +7 -0
- package/lib/typescript/e2ee/fileCipher.d.ts.map +1 -0
- package/lib/typescript/e2ee/fileEnvelope.d.ts +27 -0
- package/lib/typescript/e2ee/fileEnvelope.d.ts.map +1 -0
- package/lib/typescript/e2ee/index.d.ts +23 -0
- package/lib/typescript/e2ee/index.d.ts.map +1 -0
- package/lib/typescript/e2ee/limits.d.ts +3 -0
- package/lib/typescript/e2ee/limits.d.ts.map +1 -0
- package/lib/typescript/e2ee/ns.d.ts +2 -0
- package/lib/typescript/e2ee/ns.d.ts.map +1 -0
- package/lib/typescript/e2ee/omemo.d.ts +64 -0
- package/lib/typescript/e2ee/omemo.d.ts.map +1 -0
- package/lib/typescript/e2ee/protobuf.d.ts +25 -0
- package/lib/typescript/e2ee/protobuf.d.ts.map +1 -0
- package/lib/typescript/e2ee/ratchet.d.ts +39 -0
- package/lib/typescript/e2ee/ratchet.d.ts.map +1 -0
- package/lib/typescript/e2ee/sealedBody.d.ts +2 -0
- package/lib/typescript/e2ee/sealedBody.d.ts.map +1 -0
- package/lib/typescript/e2ee/sealedFiles.d.ts +31 -0
- package/lib/typescript/e2ee/sealedFiles.d.ts.map +1 -0
- package/lib/typescript/e2ee/send.d.ts +6 -0
- package/lib/typescript/e2ee/send.d.ts.map +1 -0
- package/lib/typescript/e2ee/stanza.d.ts +8 -0
- package/lib/typescript/e2ee/stanza.d.ts.map +1 -0
- package/lib/typescript/e2ee/store.d.ts +16 -0
- package/lib/typescript/e2ee/store.d.ts.map +1 -0
- package/lib/typescript/helpers/accountName.d.ts +7 -0
- package/lib/typescript/helpers/accountName.d.ts.map +1 -0
- package/lib/typescript/helpers/createMessageFromXml.d.ts.map +1 -1
- package/lib/typescript/helpers/createRoomFromApi.d.ts.map +1 -1
- package/lib/typescript/helpers/createUserNameFromSetUser.d.ts.map +1 -1
- package/lib/typescript/helpers/displayName.d.ts +2 -0
- package/lib/typescript/helpers/displayName.d.ts.map +1 -0
- package/lib/typescript/helpers/emoji.d.ts +6 -0
- package/lib/typescript/helpers/emoji.d.ts.map +1 -0
- package/lib/typescript/helpers/haptics.d.ts +3 -0
- package/lib/typescript/helpers/haptics.d.ts.map +1 -0
- package/lib/typescript/helpers/historyPreloadScheduler.d.ts +1 -0
- package/lib/typescript/helpers/historyPreloadScheduler.d.ts.map +1 -1
- package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts.map +1 -1
- package/lib/typescript/helpers/mamReactions.d.ts +13 -0
- package/lib/typescript/helpers/mamReactions.d.ts.map +1 -0
- package/lib/typescript/helpers/parseMessageReference.d.ts +16 -0
- package/lib/typescript/helpers/parseMessageReference.d.ts.map +1 -0
- package/lib/typescript/helpers/persistCrypto.d.ts +1 -0
- package/lib/typescript/helpers/persistCrypto.d.ts.map +1 -1
- package/lib/typescript/helpers/reactionsConfig.d.ts +5 -0
- package/lib/typescript/helpers/reactionsConfig.d.ts.map +1 -0
- package/lib/typescript/helpers/secureKeyValue.d.ts +4 -0
- package/lib/typescript/helpers/secureKeyValue.d.ts.map +1 -1
- package/lib/typescript/helpers/updateMessagesTillLast.d.ts.map +1 -1
- package/lib/typescript/helpers/videoCache.d.ts +19 -0
- package/lib/typescript/helpers/videoCache.d.ts.map +1 -0
- package/lib/typescript/hooks/useHeapSender.d.ts.map +1 -1
- package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
- package/lib/typescript/hooks/useMessageHeapState.d.ts.map +1 -1
- package/lib/typescript/hooks/useRoomInitialization.d.ts +2 -2
- package/lib/typescript/hooks/useRoomInitialization.d.ts.map +1 -1
- package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/main.d.ts +2 -0
- package/lib/typescript/main.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/auth.api.d.ts +4 -1
- package/lib/typescript/networking/api-requests/auth.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +22 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/stanzaHandlers.d.ts +4 -2
- package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/getHistory.xmpp.d.ts +3 -1
- package/lib/typescript/networking/xmpp/getHistory.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/handleStanzas.xmpp.d.ts +1 -0
- package/lib/typescript/networking/xmpp/handleStanzas.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/mamRouter.d.ts +23 -0
- package/lib/typescript/networking/xmpp/mamRouter.d.ts.map +1 -0
- package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts +1 -0
- package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/sendMediaMessage.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/sendTextMessage.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts +22 -1
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/roomStore/Middleware/newMessageMidlleware.d.ts.map +1 -1
- package/lib/typescript/roomStore/Middleware/perfMiddleware.d.ts +4 -0
- package/lib/typescript/roomStore/Middleware/perfMiddleware.d.ts.map +1 -0
- package/lib/typescript/roomStore/Middleware/reactionsMiddleware.d.ts +9 -0
- package/lib/typescript/roomStore/Middleware/reactionsMiddleware.d.ts.map +1 -1
- package/lib/typescript/roomStore/Middleware/unreadMidlleware.d.ts.map +1 -1
- package/lib/typescript/roomStore/index.d.ts.map +1 -1
- package/lib/typescript/roomStore/persistBackend.d.ts +11 -0
- package/lib/typescript/roomStore/persistBackend.d.ts.map +1 -0
- package/lib/typescript/roomStore/persistence.d.ts +5 -6
- package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts +41 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
- package/lib/typescript/theme/theme.d.ts +4 -1
- package/lib/typescript/theme/theme.d.ts.map +1 -1
- package/lib/typescript/types/models/message.model.d.ts +9 -0
- package/lib/typescript/types/models/message.model.d.ts.map +1 -1
- package/lib/typescript/types/models/room.model.d.ts +21 -0
- package/lib/typescript/types/models/room.model.d.ts.map +1 -1
- package/lib/typescript/types/models/xmpp.model.d.ts +6 -1
- package/lib/typescript/types/models/xmpp.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +19 -3
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/utils/devLogger.d.ts +8 -0
- package/lib/typescript/utils/devLogger.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +14 -1
- package/src/assets/emojiData.ts +2146 -0
- package/src/assets/icons.tsx +32 -5
- package/src/components/MainComponents/ChatHeader.tsx +46 -16
- package/src/components/MainComponents/ChatRoom.tsx +46 -30
- package/src/components/MainComponents/ChatWrapper.tsx +28 -10
- package/src/components/MainComponents/EncryptedSendNotice.tsx +35 -0
- package/src/components/MainComponents/EncryptionCard.tsx +287 -0
- package/src/components/MainComponents/MediaMessage.tsx +5 -0
- package/src/components/MainComponents/MessageContainer.tsx +7 -15
- package/src/components/MainComponents/MessageList.tsx +96 -43
- package/src/components/MainComponents/ReduxWrapper.tsx +5 -0
- package/src/components/MainComponents/RoomList.tsx +28 -29
- package/src/components/MainComponents/RoomStack.tsx +156 -83
- package/src/components/MainComponents/SealedAttachment.tsx +251 -0
- package/src/components/MainComponents/SystemMessage.tsx +6 -2
- package/src/components/MessageBubble/Avatar.tsx +7 -1
- package/src/components/MessageBubble/BottomReplyContainer.tsx +20 -21
- package/src/components/MessageBubble/EmojiPickerSheet.tsx +468 -0
- package/src/components/MessageBubble/Message.tsx +242 -93
- package/src/components/MessageBubble/MessageInteractions.tsx +215 -15
- package/src/components/MessageBubble/MessageReaction.tsx +120 -96
- package/src/components/MessageBubble/MessageReply.tsx +65 -32
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +7 -4
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +181 -35
- package/src/components/Modals/FilePreviewModal/PdfView.tsx +4 -0
- package/src/components/Modals/Modal/SwipeBackLayer.tsx +114 -63
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +53 -8
- package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +5 -0
- package/src/components/RoomComponents/ChatRoomItem.tsx +34 -15
- package/src/components/RoomComponents/LastMessageItem.tsx +5 -0
- package/src/components/RoomComponents/styled/LastAudioMessage.tsx +3 -1
- package/src/components/RoomComponents/styled/LastMessageEmoji.tsx +7 -8
- package/src/components/RoomComponents/styled/LastMessageFile.tsx +2 -2
- package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +1 -1
- package/src/components/RoomComponents/styled/LastMessageSealed.tsx +31 -0
- package/src/components/RoomComponents/styled/LastMessageVideo.tsx +1 -1
- package/src/components/Thread/ThreadWrapper.tsx +287 -198
- package/src/components/UsersList/UsersList.tsx +2 -1
- package/src/components/styled/DateLabel.tsx +7 -3
- package/src/components/styled/SendInput.tsx +5 -2
- package/src/context/MessageNotificationContext.tsx +205 -7
- package/src/context/xmppProvider.tsx +29 -9
- package/src/e2ee/crypto.ts +194 -0
- package/src/e2ee/deviceStore.ts +80 -0
- package/src/e2ee/fileCipher.ts +86 -0
- package/src/e2ee/fileEnvelope.ts +115 -0
- package/src/e2ee/index.ts +192 -0
- package/src/e2ee/limits.ts +2 -0
- package/src/e2ee/ns.ts +1 -0
- package/src/e2ee/omemo.ts +802 -0
- package/src/e2ee/protobuf.ts +188 -0
- package/src/e2ee/ratchet.ts +271 -0
- package/src/e2ee/sealedBody.ts +17 -0
- package/src/e2ee/sealedFiles.ts +181 -0
- package/src/e2ee/send.ts +70 -0
- package/src/e2ee/stanza.ts +133 -0
- package/src/e2ee/store.ts +54 -0
- package/src/helpers/accountName.ts +15 -0
- package/src/helpers/createMessageFromXml.ts +31 -6
- package/src/helpers/createRoomFromApi.tsx +37 -1
- package/src/helpers/createUserNameFromSetUser.ts +2 -1
- package/src/helpers/displayName.ts +9 -0
- package/src/helpers/emoji.ts +39 -0
- package/src/helpers/haptics.ts +19 -0
- package/src/helpers/historyPreloadScheduler.ts +37 -69
- package/src/helpers/insertMessageWithDelimiter.ts +23 -16
- package/src/helpers/mamReactions.ts +59 -0
- package/src/helpers/parseMessageReference.ts +38 -0
- package/src/helpers/persistCrypto.ts +5 -0
- package/src/helpers/reactionsConfig.ts +13 -0
- package/src/helpers/secureKeyValue.ts +15 -0
- package/src/helpers/updateMessagesTillLast.tsx +14 -2
- package/src/helpers/videoCache.ts +138 -0
- package/src/hooks/useHeapSender.tsx +3 -2
- package/src/hooks/useLogout.tsx +9 -0
- package/src/hooks/useMessageHeapState.tsx +6 -2
- package/src/hooks/useRoomInitialization.tsx +32 -15
- package/src/hooks/useSendMessage.tsx +89 -16
- package/src/hooks/useUnreadMessagesCounter.ts +1 -1
- package/src/i18n/strings.ts +180 -0
- package/src/main.ts +2 -0
- package/src/networking/api-requests/auth.api.ts +9 -1
- package/src/networking/api-requests/rooms.api.ts +121 -18
- package/src/networking/stanzaHandlers.ts +116 -60
- package/src/networking/xmpp/getHistory.xmpp.ts +44 -106
- package/src/networking/xmpp/handleStanzas.xmpp.ts +51 -0
- package/src/networking/xmpp/mamRouter.ts +176 -0
- package/src/networking/xmpp/presenceInRoom.xmpp.ts +46 -3
- package/src/networking/xmpp/sendMediaMessage.xmpp.ts +19 -1
- package/src/networking/xmpp/sendTextMessage.xmpp.ts +17 -10
- package/src/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.ts +23 -10
- package/src/networking/xmppClient.ts +111 -20
- package/src/roomStore/Middleware/newMessageMidlleware.tsx +35 -38
- package/src/roomStore/Middleware/perfMiddleware.ts +50 -0
- package/src/roomStore/Middleware/reactionsMiddleware.tsx +53 -52
- package/src/roomStore/Middleware/unreadMidlleware.tsx +92 -80
- package/src/roomStore/index.ts +28 -27
- package/src/roomStore/persistBackend.ts +93 -0
- package/src/roomStore/persistence.ts +295 -73
- package/src/roomStore/roomsSlice.ts +304 -155
- package/src/theme/theme.ts +10 -1
- package/src/types/models/message.model.ts +9 -0
- package/src/types/models/room.model.ts +22 -0
- package/src/types/models/xmpp.model.ts +4 -2
- package/src/types/types.ts +19 -3
- package/src/utils/devLogger.ts +16 -0
- package/src/version.ts +1 -1
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.RoomStack = exports.PUSH = exports.POP = exports.LIST_DIM = exports.EDGE_WIDTH = exports.COMPLETE_VELOCITY = exports.COMPLETE_DISTANCE = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
9
|
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
11
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
11
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -21,16 +20,33 @@ const LIST_PARALLAX = 0.3;
|
|
|
21
20
|
const LIST_DIM = exports.LIST_DIM = 0.25;
|
|
22
21
|
const PUSH = exports.PUSH = {
|
|
23
22
|
duration: 320,
|
|
24
|
-
easing:
|
|
23
|
+
easing: _reactNative.Easing.bezier(0.2, 0.8, 0.2, 1)
|
|
25
24
|
};
|
|
26
25
|
const POP = exports.POP = {
|
|
27
26
|
duration: 240,
|
|
28
|
-
easing:
|
|
27
|
+
easing: _reactNative.Easing.out(_reactNative.Easing.cubic)
|
|
29
28
|
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Holds its children still while `frozen`: the list under an open room is
|
|
32
|
+
* fully covered, so re-rendering it on every store update (each incoming
|
|
33
|
+
* message) is wasted work on the JS thread. It thaws as soon as it is
|
|
34
|
+
* about to be seen again.
|
|
35
|
+
*/
|
|
36
|
+
const Freezable = /*#__PURE__*/(0, _react.memo)(({
|
|
37
|
+
children
|
|
38
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
39
|
+
children: children
|
|
40
|
+
}), (_prev, next) => next.frozen);
|
|
30
41
|
/**
|
|
31
42
|
* Two-layer stack for the list → room navigation: the room slides in over
|
|
32
43
|
* the list, and a swipe from the left edge drags it back out, following the
|
|
33
44
|
* finger, with the list parallaxing in underneath (the iOS navigation feel).
|
|
45
|
+
*
|
|
46
|
+
* Driven by RN's own `Animated` (native driver), not Reanimated: every layer
|
|
47
|
+
* derives from ONE value through interpolation, so the layers cannot drift
|
|
48
|
+
* apart, and a React re-render mid-flight cannot reset a layer to the style
|
|
49
|
+
* it was first rendered with.
|
|
34
50
|
*/
|
|
35
51
|
const RoomStack = exports.RoomStack = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
36
52
|
list,
|
|
@@ -42,43 +58,83 @@ const RoomStack = exports.RoomStack = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
42
58
|
const {
|
|
43
59
|
width: windowWidth
|
|
44
60
|
} = (0, _reactNative.useWindowDimensions)();
|
|
45
|
-
const width = (0,
|
|
61
|
+
const [width, setWidth] = (0, _react.useState)(windowWidth);
|
|
62
|
+
const widthRef = (0, _react.useRef)(width);
|
|
63
|
+
widthRef.current = width;
|
|
46
64
|
const hasRoom = !!room;
|
|
47
65
|
// Room's horizontal offset: 0 = covering the list, `width` = off-screen.
|
|
48
66
|
// A room already open on the first render is shown in place.
|
|
49
|
-
const x = (0,
|
|
50
|
-
const closing = (0,
|
|
67
|
+
const x = (0, _react.useRef)(new _reactNative.Animated.Value(hasRoom ? 0 : windowWidth)).current;
|
|
68
|
+
const closing = (0, _react.useRef)(false);
|
|
69
|
+
|
|
70
|
+
// True while the list is (about to be) visible under a moving room.
|
|
71
|
+
const [peeking, setPeeking] = (0, _react.useState)(false);
|
|
72
|
+
// Bumped after every completed pop — see the settle effect below.
|
|
73
|
+
const [popCount, setPopCount] = (0, _react.useState)(0);
|
|
74
|
+
const slideTo = (0, _react.useCallback)((toValue, config, done) => {
|
|
75
|
+
_reactNative.Animated.timing(x, {
|
|
76
|
+
toValue,
|
|
77
|
+
...config,
|
|
78
|
+
useNativeDriver: true
|
|
79
|
+
}).start(({
|
|
80
|
+
finished
|
|
81
|
+
}) => done?.(finished));
|
|
82
|
+
}, [x]);
|
|
51
83
|
const isFirstRender = (0, _react.useRef)(true);
|
|
52
84
|
(0, _react.useEffect)(() => {
|
|
53
85
|
if (isFirstRender.current) {
|
|
54
86
|
isFirstRender.current = false;
|
|
55
87
|
return;
|
|
56
88
|
}
|
|
57
|
-
closing.
|
|
89
|
+
closing.current = false;
|
|
90
|
+
setPeeking(false);
|
|
91
|
+
x.stopAnimation();
|
|
92
|
+
x.setValue(widthRef.current);
|
|
58
93
|
if (hasRoom) {
|
|
59
|
-
|
|
60
|
-
x.value = (0, _reactNativeReanimated.withTiming)(0, PUSH);
|
|
61
|
-
} else {
|
|
62
|
-
x.value = width.value;
|
|
94
|
+
slideTo(0, PUSH);
|
|
63
95
|
}
|
|
64
96
|
}, [hasRoom]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
65
97
|
|
|
66
98
|
const onBackRef = (0, _react.useRef)(onBack);
|
|
67
99
|
onBackRef.current = onBack;
|
|
68
|
-
const finish = (0, _react.useCallback)(() =>
|
|
69
|
-
|
|
70
|
-
|
|
100
|
+
const finish = (0, _react.useCallback)(() => {
|
|
101
|
+
onBackRef.current();
|
|
102
|
+
setPopCount(count => count + 1);
|
|
103
|
+
}, []);
|
|
104
|
+
|
|
105
|
+
// `onBack` normally clears the room, and the effect above takes over.
|
|
106
|
+
// If the room is still (or again) there after a pop — something
|
|
107
|
+
// re-selected it — bring it back on screen: a room parked off-screen
|
|
108
|
+
// would leave the list visible but untouchable.
|
|
109
|
+
const hasRoomRef = (0, _react.useRef)(hasRoom);
|
|
110
|
+
hasRoomRef.current = hasRoom;
|
|
111
|
+
(0, _react.useEffect)(() => {
|
|
112
|
+
if (popCount === 0 || !hasRoomRef.current) {
|
|
71
113
|
return;
|
|
72
114
|
}
|
|
73
|
-
closing.
|
|
74
|
-
|
|
75
|
-
|
|
115
|
+
closing.current = false;
|
|
116
|
+
setPeeking(false);
|
|
117
|
+
slideTo(0, POP);
|
|
118
|
+
}, [popCount]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
119
|
+
|
|
120
|
+
const slideOut = (0, _react.useCallback)(() => {
|
|
121
|
+
closing.current = true;
|
|
122
|
+
setPeeking(true);
|
|
123
|
+
slideTo(widthRef.current, POP, finished => {
|
|
76
124
|
if (finished) {
|
|
77
|
-
|
|
125
|
+
finish();
|
|
126
|
+
} else {
|
|
127
|
+
closing.current = false;
|
|
78
128
|
}
|
|
79
129
|
});
|
|
80
|
-
}, [finish]);
|
|
81
|
-
|
|
130
|
+
}, [finish, slideTo]);
|
|
131
|
+
const pop = (0, _react.useCallback)(() => {
|
|
132
|
+
if (closing.current) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
_reactNative.Keyboard.dismiss();
|
|
136
|
+
slideOut();
|
|
137
|
+
}, [slideOut]);
|
|
82
138
|
(0, _react.useImperativeHandle)(ref, () => ({
|
|
83
139
|
pop
|
|
84
140
|
}), [pop]);
|
|
@@ -92,80 +148,92 @@ const RoomStack = exports.RoomStack = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
92
148
|
});
|
|
93
149
|
return () => sub.remove();
|
|
94
150
|
}, [hasRoom, hardwareBack, pop]);
|
|
95
|
-
const
|
|
96
|
-
const swipeBack = _reactNativeGestureHandler.Gesture.Pan().hitSlop({
|
|
151
|
+
const swipeBack = (0, _react.useMemo)(() => _reactNativeGestureHandler.Gesture.Pan().runOnJS(true).hitSlop({
|
|
97
152
|
left: 0,
|
|
98
153
|
width: EDGE_WIDTH
|
|
99
154
|
}).activeOffsetX(12).failOffsetY([-16, 16]).onStart(() => {
|
|
100
|
-
(
|
|
155
|
+
if (closing.current) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
_reactNative.Keyboard.dismiss();
|
|
159
|
+
setPeeking(true);
|
|
160
|
+
x.stopAnimation();
|
|
101
161
|
}).onUpdate(e => {
|
|
102
|
-
if (closing.
|
|
162
|
+
if (closing.current) {
|
|
103
163
|
return;
|
|
104
164
|
}
|
|
105
|
-
x.
|
|
165
|
+
x.setValue(Math.min(Math.max(e.translationX, 0), widthRef.current));
|
|
106
166
|
}).onEnd(e => {
|
|
107
|
-
if (closing.
|
|
167
|
+
if (closing.current) {
|
|
108
168
|
return;
|
|
109
169
|
}
|
|
110
|
-
const complete =
|
|
170
|
+
const complete = e.translationX > widthRef.current * COMPLETE_DISTANCE || e.velocityX > COMPLETE_VELOCITY;
|
|
111
171
|
if (complete) {
|
|
112
|
-
|
|
113
|
-
x.value = (0, _reactNativeReanimated.withTiming)(width.value, POP, finished => {
|
|
114
|
-
if (finished) {
|
|
115
|
-
(0, _reactNativeReanimated.runOnJS)(finish)();
|
|
116
|
-
}
|
|
117
|
-
});
|
|
172
|
+
slideOut();
|
|
118
173
|
} else {
|
|
119
|
-
|
|
174
|
+
slideTo(0, POP, () => setPeeking(false));
|
|
120
175
|
}
|
|
121
|
-
});
|
|
176
|
+
}), [slideOut, slideTo, x]);
|
|
122
177
|
const onLayout = (0, _react.useCallback)(e => {
|
|
123
178
|
const next = e.nativeEvent.layout.width;
|
|
124
|
-
if (next > 0 && next !==
|
|
179
|
+
if (next > 0 && next !== widthRef.current) {
|
|
125
180
|
// Keep an off-screen room off-screen when the container resizes.
|
|
126
|
-
if (
|
|
127
|
-
x.
|
|
181
|
+
if (!hasRoomRef.current) {
|
|
182
|
+
x.setValue(next);
|
|
128
183
|
}
|
|
129
|
-
|
|
184
|
+
setWidth(next);
|
|
130
185
|
}
|
|
131
|
-
}, []);
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
const dimStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
148
|
-
opacity: (0, _reactNativeReanimated.interpolate)(x.value, [0, width.value], [LIST_DIM, 0])
|
|
149
|
-
}));
|
|
186
|
+
}, [x]);
|
|
187
|
+
const {
|
|
188
|
+
listShift,
|
|
189
|
+
dimOpacity
|
|
190
|
+
} = (0, _react.useMemo)(() => ({
|
|
191
|
+
listShift: x.interpolate({
|
|
192
|
+
inputRange: [0, width],
|
|
193
|
+
outputRange: [-width * LIST_PARALLAX, 0],
|
|
194
|
+
extrapolate: 'clamp'
|
|
195
|
+
}),
|
|
196
|
+
dimOpacity: x.interpolate({
|
|
197
|
+
inputRange: [0, width],
|
|
198
|
+
outputRange: [LIST_DIM, 0],
|
|
199
|
+
extrapolate: 'clamp'
|
|
200
|
+
})
|
|
201
|
+
}), [x, width]);
|
|
150
202
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
151
203
|
style: styles.container,
|
|
152
204
|
onLayout: onLayout,
|
|
153
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
154
|
-
style: [styles.layer,
|
|
205
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
206
|
+
style: [styles.layer,
|
|
207
|
+
// Without a room the list always rests in place, whatever the
|
|
208
|
+
// animated value is doing.
|
|
209
|
+
hasRoom ? {
|
|
210
|
+
transform: [{
|
|
211
|
+
translateX: listShift
|
|
212
|
+
}]
|
|
213
|
+
} : null],
|
|
155
214
|
pointerEvents: hasRoom ? 'none' : 'auto',
|
|
156
215
|
accessibilityElementsHidden: hasRoom,
|
|
157
216
|
importantForAccessibility: hasRoom ? 'no-hide-descendants' : 'auto',
|
|
158
|
-
children:
|
|
217
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Freezable, {
|
|
218
|
+
frozen: hasRoom && !peeking,
|
|
219
|
+
children: list
|
|
220
|
+
})
|
|
159
221
|
}), hasRoom && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
160
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
222
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
161
223
|
pointerEvents: "none",
|
|
162
|
-
style: [styles.layer, styles.dim,
|
|
224
|
+
style: [styles.layer, styles.dim, {
|
|
225
|
+
opacity: dimOpacity
|
|
226
|
+
}]
|
|
163
227
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
|
|
164
228
|
gesture: swipeBack,
|
|
165
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
229
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
166
230
|
style: [styles.layer, styles.room, {
|
|
167
231
|
backgroundColor: roomBackground
|
|
168
|
-
},
|
|
232
|
+
}, {
|
|
233
|
+
transform: [{
|
|
234
|
+
translateX: x
|
|
235
|
+
}]
|
|
236
|
+
}],
|
|
169
237
|
children: room
|
|
170
238
|
})
|
|
171
239
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_reactNativeGestureHandler","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EDGE_WIDTH","exports","COMPLETE_DISTANCE","COMPLETE_VELOCITY","LIST_PARALLAX","LIST_DIM","PUSH","duration","easing","Easing","bezier","POP","out","cubic","RoomStack","forwardRef","list","room","onBack","roomBackground","hardwareBack","ref","width","windowWidth","useWindowDimensions","useSharedValue","hasRoom","x","closing","isFirstRender","useRef","useEffect","current","value","withTiming","onBackRef","finish","useCallback","pop","Keyboard","dismiss","finished","runOnJS","useImperativeHandle","undefined","sub","BackHandler","addEventListener","remove","dismissKeyboard","swipeBack","Gesture","Pan","hitSlop","left","activeOffsetX","failOffsetY","onStart","onUpdate","Math","min","max","translationX","onEnd","complete","velocityX","onLayout","next","nativeEvent","layout","roomStyle","useAnimatedStyle","transform","translateX","listStyle","covered","dimStyle","opacity","interpolate","jsxs","View","style","styles","container","children","jsx","layer","pointerEvents","accessibilityElementsHidden","importantForAccessibility","Fragment","dim","GestureDetector","gesture","backgroundColor","displayName","StyleSheet","create","flex","overflow","position","top","right","bottom","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius"],"sourceRoot":"../../../../src","sources":["components/MainComponents/RoomStack.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAQA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAQA,IAAAG,0BAAA,GAAAH,OAAA;AAAwE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA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AAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTjD,IAAI,EAAE;EACR,CAAC;EACDqC,GAAG,EAAE;IACHG,eAAe,EAAE;EACnB,CAAC;EACD7E,IAAI,EAAE;IACJuF,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEnF,KAAK,EAAE,CAAC,CAAC;MAAEoF,MAAM,EAAE;IAAE,CAAC;IACtCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeGestureHandler","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EDGE_WIDTH","exports","COMPLETE_DISTANCE","COMPLETE_VELOCITY","LIST_PARALLAX","LIST_DIM","PUSH","duration","easing","Easing","bezier","POP","out","cubic","Freezable","memo","children","jsx","Fragment","_prev","next","frozen","RoomStack","forwardRef","list","room","onBack","roomBackground","hardwareBack","ref","width","windowWidth","useWindowDimensions","setWidth","useState","widthRef","useRef","current","hasRoom","x","Animated","Value","closing","peeking","setPeeking","popCount","setPopCount","slideTo","useCallback","toValue","config","done","timing","useNativeDriver","start","finished","isFirstRender","useEffect","stopAnimation","setValue","onBackRef","finish","count","hasRoomRef","slideOut","pop","Keyboard","dismiss","useImperativeHandle","undefined","sub","BackHandler","addEventListener","remove","swipeBack","useMemo","Gesture","Pan","runOnJS","hitSlop","left","activeOffsetX","failOffsetY","onStart","onUpdate","Math","min","max","translationX","onEnd","complete","velocityX","onLayout","nativeEvent","layout","listShift","dimOpacity","interpolate","inputRange","outputRange","extrapolate","jsxs","View","style","styles","container","layer","transform","translateX","pointerEvents","accessibilityElementsHidden","importantForAccessibility","dim","opacity","GestureDetector","gesture","backgroundColor","displayName","StyleSheet","create","flex","overflow","position","top","right","bottom","shadowColor","shadowOffset","height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exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.sealedAttachmentsOf = exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _icons = require("../../assets/icons");
|
|
10
|
+
var _UnsupportedType = _interopRequireDefault(require("../styled/UnsupportedType"));
|
|
11
|
+
var _MessageImage = _interopRequireDefault(require("../styled/MessageImage"));
|
|
12
|
+
var _VideoMessage = _interopRequireDefault(require("../styled/VideoMessage"));
|
|
13
|
+
var _AudioMessage = _interopRequireDefault(require("../styled/AudioMessage"));
|
|
14
|
+
var _MediaComponents = require("../styled/StyledInputComponents/MediaComponents");
|
|
15
|
+
var _useTheme = require("../../hooks/useTheme");
|
|
16
|
+
var _useT = require("../../i18n/useT");
|
|
17
|
+
var _useChatSettingState = require("../../hooks/useChatSettingState");
|
|
18
|
+
var _secureFileUrl = require("../../helpers/secureFileUrl");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
22
|
+
const sealedFiles = () => require('../../e2ee/sealedFiles');
|
|
23
|
+
const sealedAttachmentsOf = message => {
|
|
24
|
+
if (!message) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
let raw = message.attachments;
|
|
28
|
+
if (typeof raw === 'string') {
|
|
29
|
+
try {
|
|
30
|
+
raw = JSON.parse(raw);
|
|
31
|
+
} catch {
|
|
32
|
+
raw = undefined;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (Array.isArray(raw) && raw.length > 0) {
|
|
36
|
+
return raw.filter(item => item && typeof item.location === 'string' && item.location).map(item => ({
|
|
37
|
+
location: item.location,
|
|
38
|
+
size: item.size
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
return message.location ? [{
|
|
42
|
+
location: message.location,
|
|
43
|
+
size: message.size
|
|
44
|
+
}] : [];
|
|
45
|
+
};
|
|
46
|
+
exports.sealedAttachmentsOf = sealedAttachmentsOf;
|
|
47
|
+
const formatBytes = value => {
|
|
48
|
+
const bytes = Number(value);
|
|
49
|
+
if (!Number.isFinite(bytes) || bytes <= 0) {
|
|
50
|
+
return '';
|
|
51
|
+
}
|
|
52
|
+
if (bytes < 1024) {
|
|
53
|
+
return `${bytes} B`;
|
|
54
|
+
}
|
|
55
|
+
if (bytes < 1024 * 1024) {
|
|
56
|
+
return `${(bytes / 1024).toFixed(0)} KB`;
|
|
57
|
+
}
|
|
58
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
59
|
+
};
|
|
60
|
+
const SealedItem = ({
|
|
61
|
+
attachment,
|
|
62
|
+
keyMaterial,
|
|
63
|
+
isUser
|
|
64
|
+
}) => {
|
|
65
|
+
const theme = (0, _useTheme.useTheme)();
|
|
66
|
+
const t = (0, _useT.useT)();
|
|
67
|
+
const {
|
|
68
|
+
config
|
|
69
|
+
} = (0, _useChatSettingState.useChatSettingState)();
|
|
70
|
+
const [state, setState] = (0, _react.useState)('idle');
|
|
71
|
+
const [progress, setProgress] = (0, _react.useState)(0);
|
|
72
|
+
const [opened, setOpened] = (0, _react.useState)(null);
|
|
73
|
+
const mounted = (0, _react.useRef)(true);
|
|
74
|
+
(0, _react.useEffect)(() => () => {
|
|
75
|
+
mounted.current = false;
|
|
76
|
+
}, []);
|
|
77
|
+
const {
|
|
78
|
+
location
|
|
79
|
+
} = attachment;
|
|
80
|
+
(0, _react.useEffect)(() => {
|
|
81
|
+
if (!keyMaterial || !location) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
let active = true;
|
|
85
|
+
sealedFiles().findOpened(location).then(found => {
|
|
86
|
+
if (active && found) {
|
|
87
|
+
setOpened(found);
|
|
88
|
+
}
|
|
89
|
+
}).catch(() => {});
|
|
90
|
+
return () => {
|
|
91
|
+
active = false;
|
|
92
|
+
};
|
|
93
|
+
}, [keyMaterial, location]);
|
|
94
|
+
const handlePress = (0, _react.useCallback)(async () => {
|
|
95
|
+
if (opened || !keyMaterial || !location || state === 'working') {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
setState('working');
|
|
99
|
+
setProgress(0);
|
|
100
|
+
try {
|
|
101
|
+
const file = await sealedFiles().openSealedAttachment(location, (0, _secureFileUrl.withFileToken)(location), keyMaterial, fraction => {
|
|
102
|
+
if (mounted.current) {
|
|
103
|
+
setProgress(fraction);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
if (!mounted.current) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
setOpened(file);
|
|
110
|
+
setState('idle');
|
|
111
|
+
} catch (error) {
|
|
112
|
+
console.warn('sealed attachment could not be opened', error);
|
|
113
|
+
if (mounted.current) {
|
|
114
|
+
setState('failed');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}, [keyMaterial, location, opened, state]);
|
|
118
|
+
if (opened) {
|
|
119
|
+
if (opened.mimetype.startsWith('image/')) {
|
|
120
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
121
|
+
testID: "sealed-attachment-image",
|
|
122
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageImage.default, {
|
|
123
|
+
fileName: opened.name,
|
|
124
|
+
originalName: opened.name,
|
|
125
|
+
fileURL: opened.uri,
|
|
126
|
+
locationPreview: opened.uri,
|
|
127
|
+
mimetype: opened.mimetype
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
if (opened.mimetype.startsWith('video/')) {
|
|
132
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoMessage.default, {
|
|
133
|
+
fileName: opened.name,
|
|
134
|
+
originalName: opened.name,
|
|
135
|
+
fileURL: opened.uri,
|
|
136
|
+
mimetype: opened.mimetype
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
if (opened.mimetype.startsWith('audio/')) {
|
|
140
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AudioMessage.default, {
|
|
141
|
+
src: opened.uri,
|
|
142
|
+
mimeType: opened.mimetype,
|
|
143
|
+
fileName: opened.name,
|
|
144
|
+
originalName: opened.name
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
148
|
+
testID: "sealed-attachment",
|
|
149
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UnsupportedType.default, {
|
|
150
|
+
fileURL: opened.uri,
|
|
151
|
+
fileName: opened.name,
|
|
152
|
+
originalName: opened.name,
|
|
153
|
+
mimetype: opened.mimetype,
|
|
154
|
+
isUser: isUser
|
|
155
|
+
})
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
const canOpen = !!keyMaterial && !!location;
|
|
159
|
+
const working = state === 'working';
|
|
160
|
+
const note = !canOpen ? t(config?.e2ee?.enabled === true ? 'media.sealedUnavailable' : 'media.sealedUnsupported') : working ? `${t('media.sealedDownloading')} ${Math.round(progress * 100)}%` : state === 'failed' ? t('media.sealedDownloadFailed') : formatBytes(attachment.size) || t('media.sealedDownload');
|
|
161
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MediaComponents.UnsupportedContainer, {
|
|
162
|
+
isUser: isUser,
|
|
163
|
+
onPress: handlePress,
|
|
164
|
+
disabled: !canOpen || working,
|
|
165
|
+
activeOpacity: canOpen && !working ? 0.7 : 1,
|
|
166
|
+
testID: "sealed-attachment",
|
|
167
|
+
accessibilityRole: "button",
|
|
168
|
+
accessibilityLabel: t(canOpen ? 'media.sealedDownload' : 'media.sealedFile'),
|
|
169
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_MediaComponents.BackgroundFile, {
|
|
170
|
+
children: working ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
171
|
+
size: "small",
|
|
172
|
+
color: theme.textSecondary
|
|
173
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LockIcon, {
|
|
174
|
+
width: 26,
|
|
175
|
+
height: 26,
|
|
176
|
+
color: theme.textSecondary
|
|
177
|
+
})
|
|
178
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MediaComponents.FileInformation, {
|
|
179
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_MediaComponents.FileName, {
|
|
180
|
+
numberOfLines: 1,
|
|
181
|
+
isUser: isUser,
|
|
182
|
+
colorIsUser: config?.colors?.primary,
|
|
183
|
+
colorUsers: config?.colors?.secondary,
|
|
184
|
+
children: t('media.sealedFile')
|
|
185
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_MediaComponents.FileSizeContainer, {
|
|
186
|
+
style: styles.note,
|
|
187
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MediaComponents.FileSize, {
|
|
188
|
+
numberOfLines: 2,
|
|
189
|
+
style: state === 'failed' && canOpen ? {
|
|
190
|
+
color: theme.danger
|
|
191
|
+
} : undefined,
|
|
192
|
+
children: note
|
|
193
|
+
})
|
|
194
|
+
})]
|
|
195
|
+
})]
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
const SealedAttachment = ({
|
|
199
|
+
message,
|
|
200
|
+
isUser
|
|
201
|
+
}) => {
|
|
202
|
+
const attachments = sealedAttachmentsOf(message);
|
|
203
|
+
const keys = message?.e2eeKeys;
|
|
204
|
+
if (attachments.length === 0) {
|
|
205
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SealedItem, {
|
|
206
|
+
attachment: {
|
|
207
|
+
location: ''
|
|
208
|
+
},
|
|
209
|
+
isUser: isUser
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
213
|
+
style: styles.stack,
|
|
214
|
+
children: attachments.map((attachment, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(SealedItem, {
|
|
215
|
+
attachment: attachment,
|
|
216
|
+
keyMaterial: keys?.[index],
|
|
217
|
+
isUser: isUser
|
|
218
|
+
}, attachment.location || index))
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
var _default = exports.default = SealedAttachment;
|
|
222
|
+
const styles = _reactNative.StyleSheet.create({
|
|
223
|
+
stack: {
|
|
224
|
+
gap: 8
|
|
225
|
+
},
|
|
226
|
+
note: {
|
|
227
|
+
flexShrink: 1,
|
|
228
|
+
borderRadius: 10
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
//# sourceMappingURL=SealedAttachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_icons","_UnsupportedType","_interopRequireDefault","_MessageImage","_VideoMessage","_AudioMessage","_MediaComponents","_useTheme","_useT","_useChatSettingState","_secureFileUrl","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sealedFiles","sealedAttachmentsOf","message","raw","attachments","JSON","parse","undefined","Array","isArray","length","filter","item","location","map","size","exports","formatBytes","value","bytes","Number","isFinite","toFixed","SealedItem","attachment","keyMaterial","isUser","theme","useTheme","useT","config","useChatSettingState","state","setState","useState","progress","setProgress","opened","setOpened","mounted","useRef","useEffect","current","active","findOpened","then","found","catch","handlePress","useCallback","file","openSealedAttachment","withFileToken","fraction","error","console","warn","mimetype","startsWith","jsx","View","testID","children","fileName","name","originalName","fileURL","uri","locationPreview","src","mimeType","canOpen","working","note","e2ee","enabled","Math","round","jsxs","UnsupportedContainer","onPress","disabled","activeOpacity","accessibilityRole","accessibilityLabel","BackgroundFile","ActivityIndicator","color","textSecondary","LockIcon","width","height","FileInformation","FileName","numberOfLines","colorIsUser","colors","primary","colorUsers","secondary","FileSizeContainer","style","styles","FileSize","danger","SealedAttachment","keys","e2eeKeys","stack","index","_default","StyleSheet","create","gap","flexShrink","borderRadius"],"sourceRoot":"../../../../src","sources":["components/MainComponents/SealedAttachment.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,aAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,aAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,gBAAA,GAAAR,OAAA;AAQA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,oBAAA,GAAAX,OAAA;AAEA,IAAAY,cAAA,GAAAZ,OAAA;AAA4D,IAAAa,WAAA,GAAAb,OAAA;AAAA,SAAAI,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAf,wBAAAe,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAnB,uBAAA,YAAAA,CAAAe,CAAA,EAAAG,CAAA,SAAAA,CAAA,IA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ETC,UAAU,EAAEA,UAAW;MACvBC,WAAW,EAAEiF,IAAI,GAAGG,KAAK,CAAE;MAC3BnF,MAAM,EAAEA;IAAO,GAHVF,UAAU,CAACX,QAAQ,IAAIgG,KAI7B,CACF;EAAC,CACE,CAAC;AAEX,CAAC;AAAC,IAAAC,QAAA,GAAA9F,OAAA,CAAAjC,OAAA,GAEa0H,gBAAgB;AAE/B,MAAMH,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC/BJ,KAAK,EAAE;IACLK,GAAG,EAAE;EACP,CAAC;EACDxC,IAAI,EAAE;IACJyC,UAAU,EAAE,CAAC;IACbC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,21 +6,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _useTheme = require("../../hooks/useTheme");
|
|
9
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
12
|
const SystemMessage = ({
|
|
12
13
|
messageText,
|
|
13
14
|
colors
|
|
14
15
|
}) => {
|
|
16
|
+
// Same pill as the day separator; `colors.secondary` is not a pill
|
|
17
|
+
// colour (see DateLabel).
|
|
18
|
+
const theme = (0, _useTheme.useTheme)();
|
|
15
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
16
20
|
style: styles.container,
|
|
17
21
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
18
22
|
style: [styles.bubble, {
|
|
19
|
-
backgroundColor:
|
|
23
|
+
backgroundColor: theme.dateLabelBackground
|
|
20
24
|
}],
|
|
21
25
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
22
26
|
style: [styles.text, {
|
|
23
|
-
color: colors?.primary ||
|
|
27
|
+
color: colors?.primary || theme.dateLabel
|
|
24
28
|
}],
|
|
25
29
|
children: messageText
|
|
26
30
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","SystemMessage","messageText","colors","jsx","View","style","styles","container","children","bubble","backgroundColor","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_useTheme","_jsxRuntime","e","__esModule","default","SystemMessage","messageText","colors","theme","useTheme","jsx","View","style","styles","container","children","bubble","backgroundColor","dateLabelBackground","Text","text","color","primary","dateLabel","_default","exports","StyleSheet","create","width","alignItems","paddingVertical","paddingHorizontal","maxWidth","borderRadius","fontSize","lineHeight","fontWeight","textAlign"],"sourceRoot":"../../../../src","sources":["components/MainComponents/SystemMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAAgD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAOhD,MAAMG,aAA2C,GAAGA,CAAC;EACnDC,WAAW;EACXC;AACF,CAAC,KAAK;EACJ;EACA;EACA,MAAMC,KAAK,GAAG,IAAAC,kBAAQ,EAAC,CAAC;EACxB,oBACE,IAAAR,WAAA,CAAAS,GAAA,EAACX,YAAA,CAAAY,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,eAK5B,IAAAd,WAAA,CAAAS,GAAA,EAACX,YAAA,CAAAY,IAAI;MACHC,KAAK,EAAE,CACLC,MAAM,CAACG,MAAM,EACb;QAAEC,eAAe,EAAET,KAAK,CAACU;MAAoB,CAAC,CAC9C;MAAAH,QAAA,eAEF,IAAAd,WAAA,CAAAS,GAAA,EAACX,YAAA,CAAAoB,IAAI;QAACP,KAAK,EAAE,CAACC,MAAM,CAACO,IAAI,EAAE;UAAEC,KAAK,EAAEd,MAAM,EAAEe,OAAO,IAAId,KAAK,CAACe;QAAU,CAAC,CAAE;QAAAR,QAAA,EACvET;MAAW,CACR;IAAC,CACH;EAAC,CACH,CAAC;AAEX,CAAC;AAAC,IAAAkB,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEaC,aAAa;AAE5B,MAAMQ,MAAM,GAAGa,uBAAU,CAACC,MAAM,CAAC;EAC/Bb,SAAS,EAAE;IACTc,KAAK,EAAE,MAAM;IACbC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE;EACrB,CAAC;EACDf,MAAM,EAAE;IACNgB,QAAQ,EAAE,KAAK;IACfC,YAAY,EAAE,EAAE;IAChBH,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE;EACrB,CAAC;EACDX,IAAI,EAAE;IACJc,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE,KAAK;IACjBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -40,7 +40,8 @@ const Avatar = ({
|
|
|
40
40
|
username,
|
|
41
41
|
firstName,
|
|
42
42
|
lastName,
|
|
43
|
-
style
|
|
43
|
+
style,
|
|
44
|
+
textSize
|
|
44
45
|
}) => {
|
|
45
46
|
const {
|
|
46
47
|
config
|
|
@@ -79,6 +80,9 @@ const Avatar = ({
|
|
|
79
80
|
bgColor: backgroundColor?.backgroundColor,
|
|
80
81
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AvatarText, {
|
|
81
82
|
color: (0, _getAvatarColor.getAvatarTextColor)(backgroundColor?.backgroundColor),
|
|
83
|
+
style: textSize ? {
|
|
84
|
+
fontSize: textSize
|
|
85
|
+
} : undefined,
|
|
82
86
|
children: getInitials()
|
|
83
87
|
})
|
|
84
88
|
});
|