@ethora/chat-component-rn 26.8.4 → 26.8.6
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 +55 -0
- package/lib/commonjs/assets/emojiData.js +40 -0
- package/lib/commonjs/assets/emojiData.js.map +1 -0
- package/lib/commonjs/assets/icons.js +1 -1
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/Header/HeaderRoomList.js +12 -7
- package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +7 -9
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +47 -26
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatWrapper.js +58 -21
- package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/KeyboardInputDock.js +40 -0
- package/lib/commonjs/components/MainComponents/KeyboardInputDock.js.map +1 -0
- 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/RoomList.js +32 -29
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomStack.js +270 -0
- package/lib/commonjs/components/MainComponents/RoomStack.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 +17 -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 +200 -132
- package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js +213 -12
- 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 +6 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/Modal/Modal.js +24 -0
- package/lib/commonjs/components/Modals/Modal/Modal.js.map +1 -1
- package/lib/commonjs/components/Modals/Modal/SwipeBackLayer.js +178 -0
- package/lib/commonjs/components/Modals/Modal/SwipeBackLayer.js.map +1 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +28 -10
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +9 -3
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +5 -4
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.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/Thread/ThreadWrapper.js +265 -152
- package/lib/commonjs/components/Thread/ThreadWrapper.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/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/helpers/createRoomFromApi.js +36 -2
- package/lib/commonjs/helpers/createRoomFromApi.js.map +1 -1
- 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/keyboardLayout.js +23 -1
- package/lib/commonjs/helpers/keyboardLayout.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/reactionsConfig.js +17 -0
- package/lib/commonjs/helpers/reactionsConfig.js.map +1 -0
- package/lib/commonjs/helpers/updateMessagesTillLast.js +17 -2
- package/lib/commonjs/helpers/updateMessagesTillLast.js.map +1 -1
- package/lib/commonjs/hooks/useHeapSender.js +3 -1
- package/lib/commonjs/hooks/useHeapSender.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 +14 -8
- 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/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 +4 -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/xmppClient.js +98 -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 +96 -0
- package/lib/commonjs/roomStore/persistBackend.js.map +1 -0
- package/lib/commonjs/roomStore/persistence.js +245 -50
- 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 +1 -1
- package/lib/module/assets/icons.js.map +1 -1
- package/lib/module/components/Header/HeaderRoomList.js +12 -7
- package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +8 -10
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +49 -28
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/ChatWrapper.js +60 -23
- package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/KeyboardInputDock.js +33 -0
- package/lib/module/components/MainComponents/KeyboardInputDock.js.map +1 -0
- 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/RoomList.js +32 -29
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/MainComponents/RoomStack.js +266 -0
- package/lib/module/components/MainComponents/RoomStack.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 +18 -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 +203 -134
- package/lib/module/components/MessageBubble/Message.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageInteractions.js +215 -14
- 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 +6 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/Modal/Modal.js +25 -1
- package/lib/module/components/Modals/Modal/Modal.js.map +1 -1
- package/lib/module/components/Modals/Modal/SwipeBackLayer.js +172 -0
- package/lib/module/components/Modals/Modal/SwipeBackLayer.js.map +1 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +29 -11
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +10 -4
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +5 -4
- package/lib/module/components/RoomComponents/ChatRoomItem.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/Thread/ThreadWrapper.js +264 -152
- package/lib/module/components/Thread/ThreadWrapper.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/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/helpers/createRoomFromApi.js +36 -2
- package/lib/module/helpers/createRoomFromApi.js.map +1 -1
- 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/keyboardLayout.js +20 -0
- package/lib/module/helpers/keyboardLayout.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/reactionsConfig.js +10 -0
- package/lib/module/helpers/reactionsConfig.js.map +1 -0
- package/lib/module/helpers/updateMessagesTillLast.js +17 -2
- package/lib/module/helpers/updateMessagesTillLast.js.map +1 -1
- package/lib/module/hooks/useHeapSender.js +3 -1
- package/lib/module/hooks/useHeapSender.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 +14 -8
- 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/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 +4 -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/xmppClient.js +99 -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 +89 -0
- package/lib/module/roomStore/persistBackend.js.map +1 -0
- package/lib/module/roomStore/persistence.js +245 -48
- 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/components/Header/HeaderRoomList.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/KeyboardInputDock.d.ts +16 -0
- package/lib/typescript/components/MainComponents/KeyboardInputDock.d.ts.map +1 -0
- 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/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomStack.d.ts +42 -0
- package/lib/typescript/components/MainComponents/RoomStack.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/Modal/Modal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/Modal/SwipeBackLayer.d.ts +16 -0
- package/lib/typescript/components/Modals/Modal/SwipeBackLayer.d.ts.map +1 -0
- package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.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/styled/LastMessageEmoji.d.ts +3 -6
- package/lib/typescript/components/RoomComponents/styled/LastMessageEmoji.d.ts.map +1 -1
- 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/styled/DateLabel.d.ts +1 -0
- package/lib/typescript/components/styled/DateLabel.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/helpers/createRoomFromApi.d.ts.map +1 -1
- 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/keyboardLayout.d.ts +6 -0
- package/lib/typescript/helpers/keyboardLayout.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/reactionsConfig.d.ts +5 -0
- package/lib/typescript/helpers/reactionsConfig.d.ts.map +1 -0
- package/lib/typescript/helpers/updateMessagesTillLast.d.ts.map +1 -1
- package/lib/typescript/hooks/useHeapSender.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/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.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/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 +4 -0
- package/lib/typescript/types/models/message.model.d.ts.map +1 -1
- package/lib/typescript/types/models/room.model.d.ts +16 -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 +15 -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 +10 -1
- package/src/assets/emojiData.ts +2146 -0
- package/src/assets/icons.tsx +5 -5
- package/src/components/Header/HeaderRoomList.tsx +7 -5
- package/src/components/MainComponents/ChatHeader.tsx +16 -7
- package/src/components/MainComponents/ChatRoom.tsx +64 -32
- package/src/components/MainComponents/ChatWrapper.tsx +73 -21
- package/src/components/MainComponents/KeyboardInputDock.tsx +47 -0
- package/src/components/MainComponents/MessageContainer.tsx +7 -15
- package/src/components/MainComponents/MessageList.tsx +96 -43
- package/src/components/MainComponents/RoomList.tsx +28 -29
- package/src/components/MainComponents/RoomStack.tsx +309 -0
- package/src/components/MainComponents/SystemMessage.tsx +6 -2
- package/src/components/MessageBubble/Avatar.tsx +7 -1
- package/src/components/MessageBubble/BottomReplyContainer.tsx +19 -21
- package/src/components/MessageBubble/EmojiPickerSheet.tsx +468 -0
- package/src/components/MessageBubble/Message.tsx +146 -87
- package/src/components/MessageBubble/MessageInteractions.tsx +213 -12
- package/src/components/MessageBubble/MessageReaction.tsx +120 -96
- package/src/components/MessageBubble/MessageReply.tsx +65 -32
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +4 -0
- package/src/components/Modals/Modal/Modal.tsx +32 -1
- package/src/components/Modals/Modal/SwipeBackLayer.tsx +221 -0
- package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +29 -8
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +6 -3
- package/src/components/RoomComponents/ChatRoomItem.tsx +11 -4
- package/src/components/RoomComponents/styled/LastMessageEmoji.tsx +7 -8
- package/src/components/Thread/ThreadWrapper.tsx +274 -198
- package/src/components/styled/DateLabel.tsx +7 -3
- package/src/context/MessageNotificationContext.tsx +205 -7
- package/src/context/xmppProvider.tsx +29 -9
- package/src/helpers/createRoomFromApi.tsx +37 -1
- 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/keyboardLayout.ts +26 -0
- package/src/helpers/mamReactions.ts +59 -0
- package/src/helpers/parseMessageReference.ts +38 -0
- package/src/helpers/reactionsConfig.ts +13 -0
- package/src/helpers/updateMessagesTillLast.tsx +14 -2
- package/src/hooks/useHeapSender.tsx +3 -2
- package/src/hooks/useMessageHeapState.tsx +6 -2
- package/src/hooks/useRoomInitialization.tsx +32 -15
- package/src/hooks/useSendMessage.tsx +18 -11
- package/src/hooks/useUnreadMessagesCounter.ts +1 -1
- package/src/networking/stanzaHandlers.ts +116 -60
- package/src/networking/xmpp/getHistory.xmpp.ts +44 -106
- package/src/networking/xmpp/handleStanzas.xmpp.ts +2 -0
- package/src/networking/xmpp/mamRouter.ts +176 -0
- package/src/networking/xmpp/presenceInRoom.xmpp.ts +46 -3
- package/src/networking/xmppClient.ts +105 -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 +96 -0
- package/src/roomStore/persistence.ts +280 -73
- package/src/roomStore/roomsSlice.ts +304 -155
- package/src/theme/theme.ts +10 -1
- package/src/types/models/message.model.ts +4 -0
- package/src/types/models/room.model.ts +17 -0
- package/src/types/models/xmpp.model.ts +4 -2
- package/src/types/types.ts +15 -3
- package/src/utils/devLogger.ts +16 -0
- package/src/version.ts +1 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { useEffect, useId, useMemo, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { Delimeter, MenuItem } from '../ContextMenu/ContextMenuComponents';
|
|
5
5
|
import { useSelector } from 'react-redux';
|
|
6
6
|
import { MESSAGE_INTERACTIONS, MESSAGE_INTERACTIONS_ICONS } from '../../helpers/constants/MESSAGE_INTERACTIONS';
|
|
7
|
-
import { Text, StyleSheet, View, Pressable, Dimensions, Keyboard } from 'react-native';
|
|
7
|
+
import { Animated, Text, StyleSheet, View, Pressable, Dimensions, Keyboard } from 'react-native';
|
|
8
8
|
import * as Clipboard from 'expo-clipboard';
|
|
9
9
|
import { useToast } from '../../context/ToastContext';
|
|
10
10
|
import { useInteractionsOverlay } from './InteractionsOverlay';
|
|
11
11
|
import { useTheme } from '../../hooks/useTheme';
|
|
12
|
+
import { getEmojiNativeById } from '../../helpers/emoji';
|
|
13
|
+
import { quickReactionIds, reactionPickerEnabled, reactionsEnabled } from '../../helpers/reactionsConfig';
|
|
12
14
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
15
|
const MessageInteractions = ({
|
|
14
16
|
isReply,
|
|
@@ -18,7 +20,9 @@ const MessageInteractions = ({
|
|
|
18
20
|
position,
|
|
19
21
|
handleReplyMessage: replyMessage,
|
|
20
22
|
handleDeleteMessage,
|
|
21
|
-
handleEditMessage
|
|
23
|
+
handleEditMessage,
|
|
24
|
+
handleReactionMessage,
|
|
25
|
+
onOpenEmojiPicker
|
|
22
26
|
}) => {
|
|
23
27
|
const {
|
|
24
28
|
showToast
|
|
@@ -45,6 +49,30 @@ const MessageInteractions = ({
|
|
|
45
49
|
width: 0,
|
|
46
50
|
height: 0
|
|
47
51
|
});
|
|
52
|
+
const [barSize, setBarSize] = useState({
|
|
53
|
+
width: 0,
|
|
54
|
+
height: 0
|
|
55
|
+
});
|
|
56
|
+
const showReactions = reactionsEnabled(config);
|
|
57
|
+
const quickIds = useMemo(() => quickReactionIds(config), [config]);
|
|
58
|
+
const showPicker = reactionPickerEnabled(config) && !!onOpenEmojiPicker;
|
|
59
|
+
|
|
60
|
+
// Entrance: the menu pops out of its anchor (scale + fade) and the chat
|
|
61
|
+
// dims a touch behind it. Started once the menu has been measured and
|
|
62
|
+
// placed — before that it sits invisible at a provisional spot.
|
|
63
|
+
const reveal = useRef(new Animated.Value(0)).current;
|
|
64
|
+
const placed = !!position && !!menuSize.width && !!menuSize.height;
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (!placed) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
Animated.spring(reveal, {
|
|
70
|
+
toValue: 1,
|
|
71
|
+
useNativeDriver: true,
|
|
72
|
+
speed: 24,
|
|
73
|
+
bounciness: 7
|
|
74
|
+
}).start();
|
|
75
|
+
}, [placed, reveal]);
|
|
48
76
|
|
|
49
77
|
// Live keyboard height so the menu knows the REAL space below the message.
|
|
50
78
|
// Without this the position math used the full screen height and happily
|
|
@@ -59,6 +87,18 @@ const MessageInteractions = ({
|
|
|
59
87
|
const subs = [Keyboard.addListener('keyboardDidShow', onShow), Keyboard.addListener('keyboardDidChangeFrame', onShow), Keyboard.addListener('keyboardDidHide', onHide)];
|
|
60
88
|
return () => subs.forEach(s => s.remove());
|
|
61
89
|
}, []);
|
|
90
|
+
const handleBarLayout = e => {
|
|
91
|
+
const {
|
|
92
|
+
width,
|
|
93
|
+
height
|
|
94
|
+
} = e.nativeEvent.layout;
|
|
95
|
+
if (width && height && (width !== barSize.width || height !== barSize.height)) {
|
|
96
|
+
setBarSize({
|
|
97
|
+
width,
|
|
98
|
+
height
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
};
|
|
62
102
|
const handleMenuLayout = e => {
|
|
63
103
|
const {
|
|
64
104
|
width,
|
|
@@ -105,6 +145,7 @@ const MessageInteractions = ({
|
|
|
105
145
|
opacity: 0
|
|
106
146
|
};
|
|
107
147
|
}
|
|
148
|
+
const barReserve = showReactions && barSize.height ? barSize.height + 10 : 0;
|
|
108
149
|
const {
|
|
109
150
|
width: screenWidth,
|
|
110
151
|
height: screenHeight
|
|
@@ -112,19 +153,21 @@ const MessageInteractions = ({
|
|
|
112
153
|
const bottomReserve = (config?.keyboardVerticalOffset ?? 0) + 24;
|
|
113
154
|
const topReserve = 16;
|
|
114
155
|
const sideMargin = 8;
|
|
156
|
+
// Breathing room between the bubble and the menu.
|
|
157
|
+
const gap = 10;
|
|
115
158
|
|
|
116
159
|
// The keyboard occludes the bottom `keyboardHeight` px, so the real
|
|
117
160
|
// visible bottom edge is above it. Measuring space below against this
|
|
118
161
|
// (not the full screen) is what makes the menu flip ABOVE the message
|
|
119
162
|
// when the keyboard is open and the message sits near the input.
|
|
120
163
|
const visibleBottom = screenHeight - keyboardHeight;
|
|
121
|
-
const spaceBelow = visibleBottom - position.bottom - bottomReserve;
|
|
122
|
-
const spaceAbove = position.top - topReserve;
|
|
164
|
+
const spaceBelow = visibleBottom - position.bottom - gap - bottomReserve;
|
|
165
|
+
const spaceAbove = position.top - gap - topReserve - barReserve;
|
|
123
166
|
let top;
|
|
124
167
|
if (spaceBelow >= menuSize.height) {
|
|
125
|
-
top = position.bottom;
|
|
168
|
+
top = position.bottom + gap;
|
|
126
169
|
} else if (spaceAbove >= menuSize.height) {
|
|
127
|
-
top = position.top - menuSize.height;
|
|
170
|
+
top = position.top - gap - menuSize.height;
|
|
128
171
|
} else {
|
|
129
172
|
top = Math.max(topReserve, visibleBottom - menuSize.height - bottomReserve);
|
|
130
173
|
}
|
|
@@ -137,7 +180,44 @@ const MessageInteractions = ({
|
|
|
137
180
|
top,
|
|
138
181
|
left
|
|
139
182
|
};
|
|
140
|
-
}, [position, menuSize, config?.keyboardVerticalOffset, keyboardHeight]);
|
|
183
|
+
}, [position, menuSize, barSize.height, showReactions, config?.keyboardVerticalOffset, keyboardHeight]);
|
|
184
|
+
const barPosition = useMemo(() => {
|
|
185
|
+
if (!position || !showReactions) {
|
|
186
|
+
return undefined;
|
|
187
|
+
}
|
|
188
|
+
if (!barSize.width || !barSize.height) {
|
|
189
|
+
return {
|
|
190
|
+
top: position.top,
|
|
191
|
+
left: position.left,
|
|
192
|
+
opacity: 0
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
const {
|
|
196
|
+
width: screenWidth
|
|
197
|
+
} = Dimensions.get('window');
|
|
198
|
+
const sideMargin = 8;
|
|
199
|
+
const gap = 8;
|
|
200
|
+
const rightAligned = screenWidth - position.right < position.left;
|
|
201
|
+
let left = rightAligned ? position.right - barSize.width : position.left;
|
|
202
|
+
left = Math.max(sideMargin, Math.min(left, screenWidth - barSize.width - sideMargin));
|
|
203
|
+
const above = position.top - gap - barSize.height;
|
|
204
|
+
const menuTop = memoPosition?.top;
|
|
205
|
+
const top = above >= 16 ? above : (menuTop ?? position.bottom) + (menuSize.height || 0) + gap;
|
|
206
|
+
return {
|
|
207
|
+
top,
|
|
208
|
+
left
|
|
209
|
+
};
|
|
210
|
+
}, [position, showReactions, barSize, memoPosition, menuSize.height]);
|
|
211
|
+
const localBarPosition = useMemo(() => {
|
|
212
|
+
if (!barPosition) {
|
|
213
|
+
return undefined;
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
...barPosition,
|
|
217
|
+
top: barPosition.top - originY,
|
|
218
|
+
left: barPosition.left - originX
|
|
219
|
+
};
|
|
220
|
+
}, [barPosition, originX, originY]);
|
|
141
221
|
|
|
142
222
|
// Window coords (memoPosition) → host-local coords. The overlay host
|
|
143
223
|
// sits below the status bar / header, so subtract its measured origin.
|
|
@@ -155,16 +235,93 @@ const MessageInteractions = ({
|
|
|
155
235
|
style: styles.overlayFill,
|
|
156
236
|
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
157
237
|
style: StyleSheet.absoluteFill,
|
|
158
|
-
onPress: closeMenu
|
|
159
|
-
|
|
160
|
-
|
|
238
|
+
onPress: closeMenu,
|
|
239
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
240
|
+
pointerEvents: "none",
|
|
241
|
+
style: [styles.dim, {
|
|
242
|
+
opacity: reveal
|
|
243
|
+
}]
|
|
244
|
+
})
|
|
245
|
+
}), showReactions && /*#__PURE__*/_jsxs(Animated.View, {
|
|
246
|
+
testID: "reaction-bar",
|
|
247
|
+
onLayout: handleBarLayout,
|
|
248
|
+
style: [styles.reactionBar, {
|
|
249
|
+
backgroundColor: theme.surface,
|
|
250
|
+
shadowColor: theme.shadow
|
|
251
|
+
}, localBarPosition, placed && barSize.height ? {
|
|
252
|
+
opacity: reveal,
|
|
253
|
+
transform: [{
|
|
254
|
+
scale: reveal.interpolate({
|
|
255
|
+
inputRange: [0, 1],
|
|
256
|
+
outputRange: [0.6, 1]
|
|
257
|
+
})
|
|
258
|
+
}]
|
|
259
|
+
} : null],
|
|
260
|
+
children: [quickIds.map(id => /*#__PURE__*/_jsx(Pressable, {
|
|
261
|
+
testID: `quick-reaction-${id}`,
|
|
262
|
+
onPress: () => {
|
|
263
|
+
handleReactionMessage(id);
|
|
264
|
+
closeMenu();
|
|
265
|
+
},
|
|
266
|
+
style: ({
|
|
267
|
+
pressed
|
|
268
|
+
}) => [styles.reactionItem, pressed && {
|
|
269
|
+
backgroundColor: theme.surfaceHighlight
|
|
270
|
+
}],
|
|
271
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
272
|
+
style: styles.reactionGlyph,
|
|
273
|
+
children: getEmojiNativeById(id)
|
|
274
|
+
})
|
|
275
|
+
}, id)), showPicker && /*#__PURE__*/_jsx(Pressable, {
|
|
276
|
+
testID: "quick-reaction-more",
|
|
277
|
+
onPress: () => {
|
|
278
|
+
closeMenu();
|
|
279
|
+
onOpenEmojiPicker?.();
|
|
280
|
+
},
|
|
281
|
+
style: ({
|
|
282
|
+
pressed
|
|
283
|
+
}) => [styles.reactionMore, {
|
|
284
|
+
backgroundColor: theme.surfaceSecondary
|
|
285
|
+
}, pressed && {
|
|
286
|
+
backgroundColor: theme.surfaceHighlight
|
|
287
|
+
}],
|
|
288
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
289
|
+
style: [styles.reactionMoreText, {
|
|
290
|
+
color: theme.text
|
|
291
|
+
}],
|
|
292
|
+
children: "+"
|
|
293
|
+
})
|
|
294
|
+
})]
|
|
295
|
+
}), /*#__PURE__*/_jsxs(Animated.View, {
|
|
296
|
+
style: [styles.contextMenu, themedStyles.menu, localPosition, placed ? {
|
|
297
|
+
opacity: reveal,
|
|
298
|
+
transform: [{
|
|
299
|
+
scale: reveal.interpolate({
|
|
300
|
+
inputRange: [0, 1],
|
|
301
|
+
outputRange: [0.6, 1]
|
|
302
|
+
})
|
|
303
|
+
}]
|
|
304
|
+
} : null],
|
|
161
305
|
onLayout: handleMenuLayout,
|
|
162
|
-
children: [/*#__PURE__*/_jsxs(
|
|
306
|
+
children: [!isReply && !config?.disableReplies && /*#__PURE__*/_jsxs(_Fragment, {
|
|
307
|
+
children: [/*#__PURE__*/_jsxs(MenuItem, {
|
|
308
|
+
testID: "menu-reply",
|
|
309
|
+
onPress: handleReplyMessage,
|
|
310
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
311
|
+
style: [styles.menuText, themedStyles.text],
|
|
312
|
+
children: MESSAGE_INTERACTIONS.REPLY
|
|
313
|
+
}), /*#__PURE__*/_jsx(MESSAGE_INTERACTIONS_ICONS.REPLY, {
|
|
314
|
+
color: theme.text
|
|
315
|
+
})]
|
|
316
|
+
}), /*#__PURE__*/_jsx(Delimeter, {})]
|
|
317
|
+
}), /*#__PURE__*/_jsxs(MenuItem, {
|
|
163
318
|
onPress: () => handleCopyMessage(message.body),
|
|
164
319
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
165
320
|
style: [styles.menuText, themedStyles.text],
|
|
166
321
|
children: MESSAGE_INTERACTIONS.COPY
|
|
167
|
-
}), /*#__PURE__*/_jsx(MESSAGE_INTERACTIONS_ICONS.COPY, {
|
|
322
|
+
}), /*#__PURE__*/_jsx(MESSAGE_INTERACTIONS_ICONS.COPY, {
|
|
323
|
+
color: theme.text
|
|
324
|
+
})]
|
|
168
325
|
}), isUser && /*#__PURE__*/_jsxs(_Fragment, {
|
|
169
326
|
children: [message?.isMediafile !== 'true' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
170
327
|
children: [/*#__PURE__*/_jsx(Delimeter, {}), /*#__PURE__*/_jsxs(MenuItem, {
|
|
@@ -172,7 +329,9 @@ const MessageInteractions = ({
|
|
|
172
329
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
173
330
|
style: [styles.menuText, themedStyles.text],
|
|
174
331
|
children: MESSAGE_INTERACTIONS.EDIT
|
|
175
|
-
}), /*#__PURE__*/_jsx(MESSAGE_INTERACTIONS_ICONS.EDIT, {
|
|
332
|
+
}), /*#__PURE__*/_jsx(MESSAGE_INTERACTIONS_ICONS.EDIT, {
|
|
333
|
+
color: theme.text
|
|
334
|
+
})]
|
|
176
335
|
})]
|
|
177
336
|
}), /*#__PURE__*/_jsx(Delimeter, {}), /*#__PURE__*/_jsxs(MenuItem, {
|
|
178
337
|
onPress: handleDeleteMessage,
|
|
@@ -207,6 +366,48 @@ const styles = StyleSheet.create({
|
|
|
207
366
|
...StyleSheet.absoluteFill,
|
|
208
367
|
backgroundColor: 'transparent'
|
|
209
368
|
},
|
|
369
|
+
dim: {
|
|
370
|
+
...StyleSheet.absoluteFill,
|
|
371
|
+
backgroundColor: 'rgba(0,0,0,0.18)'
|
|
372
|
+
},
|
|
373
|
+
reactionBar: {
|
|
374
|
+
position: 'absolute',
|
|
375
|
+
flexDirection: 'row',
|
|
376
|
+
alignItems: 'center',
|
|
377
|
+
paddingHorizontal: 6,
|
|
378
|
+
paddingVertical: 4,
|
|
379
|
+
borderRadius: 28,
|
|
380
|
+
shadowOffset: {
|
|
381
|
+
width: 0,
|
|
382
|
+
height: 2
|
|
383
|
+
},
|
|
384
|
+
shadowOpacity: 0.18,
|
|
385
|
+
shadowRadius: 8,
|
|
386
|
+
elevation: 6
|
|
387
|
+
},
|
|
388
|
+
reactionItem: {
|
|
389
|
+
width: 40,
|
|
390
|
+
height: 40,
|
|
391
|
+
borderRadius: 20,
|
|
392
|
+
alignItems: 'center',
|
|
393
|
+
justifyContent: 'center'
|
|
394
|
+
},
|
|
395
|
+
reactionGlyph: {
|
|
396
|
+
fontSize: 26
|
|
397
|
+
},
|
|
398
|
+
reactionMore: {
|
|
399
|
+
width: 34,
|
|
400
|
+
height: 34,
|
|
401
|
+
borderRadius: 17,
|
|
402
|
+
alignItems: 'center',
|
|
403
|
+
justifyContent: 'center',
|
|
404
|
+
marginLeft: 2
|
|
405
|
+
},
|
|
406
|
+
reactionMoreText: {
|
|
407
|
+
fontSize: 22,
|
|
408
|
+
lineHeight: 24,
|
|
409
|
+
fontWeight: '400'
|
|
410
|
+
},
|
|
210
411
|
contextMenu: {
|
|
211
412
|
position: 'absolute',
|
|
212
413
|
backgroundColor: 'white',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useId","useMemo","useState","Delimeter","MenuItem","useSelector","MESSAGE_INTERACTIONS","MESSAGE_INTERACTIONS_ICONS","Text","StyleSheet","View","Pressable","Dimensions","Keyboard","Clipboard","useToast","useInteractionsOverlay","useTheme","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","MessageInteractions","isReply","isUser","message","closeMenu","position","handleReplyMessage","replyMessage","handleDeleteMessage","handleEditMessage","showToast","present","dismiss","originX","originY","overlayId","theme","themedStyles","menu","backgroundColor","surface","shadowColor","shadow","text","color","config","state","chatSettingStore","menuSize","setMenuSize","width","height","keyboardHeight","setKeyboardHeight","metrics","onShow","e","endCoordinates","onHide","subs","addListener","forEach","s","remove","handleMenuLayout","nativeEvent","layout","handleCopyMessage","setStringAsync","id","Date","now","toString","title","type","err","console","log","memoPosition","undefined","top","bottom","left","opacity","screenWidth","screenHeight","get","bottomReserve","keyboardVerticalOffset","topReserve","sideMargin","visibleBottom","spaceBelow","spaceAbove","Math","max","leftMargin","rightMargin","right","rightAligned","min","localPosition","content","disableInteractions","isDeleted","style","styles","overlayFill","children","absoluteFill","onPress","contextMenu","onLayout","body","menuText","COPY","isMediafile","EDIT","DELETE","create","paddingVertical","paddingHorizontal","borderRadius","shadowOffset","shadowOpacity","shadowRadius","elevation","minWidth","overflow","fontSize","includeFontPadding","textAlignVertical","marginRight"],"sourceRoot":"../../../../src","sources":["components/MessageBubble/MessageInteractions.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,KAAK,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAClE,SAASC,SAAS,EAAEC,QAAQ,QAAQ,sCAAsC;AAC1E,SAASC,WAAW,QAAQ,aAAa;AAEzC,SACEC,oBAAoB,EACpBC,0BAA0B,QACrB,8CAA8C;AAErD,SACEC,IAAI,EACJC,UAAU,EACVC,IAAI,EACJC,SAAS,EACTC,UAAU,EACVC,QAAQ,QAEH,cAAc;AACrB,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,SAASC,QAAQ,QAAQ,4BAA4B;AACrD,SAASC,sBAAsB,QAAQ,uBAAuB;AAC9D,SAASC,QAAQ,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAmBhD,MAAMC,mBAAuD,GAAGA,CAAC;EAC/DC,OAAO;EACPC,MAAM;EACNC,OAAO;EACPC,SAAS;EACTC,QAAQ;EACRC,kBAAkB,EAAEC,YAAY;EAChCC,mBAAmB;EACnBC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAU,CAAC,GAAGnB,QAAQ,CAAC,CAAC;EAChC,MAAM;IAAEoB,OAAO;IAAEC,OAAO;IAAEC,OAAO;IAAEC;EAAQ,CAAC,GAAGtB,sBAAsB,CAAC,CAAC;EACvE,MAAM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AAI2G,OAAO,EAAE;MACXvE,OAAO,CAACI,SAAS,EAAEmE,OAAO,CAAC;IAC7B,CAAC,MAAM;MACLtE,OAAO,CAACG,SAAS,CAAC;IACpB;EACF,CAAC,CAAC;EACFxC,SAAS,CAAC,MAAM,MAAMqC,OAAO,CAACG,SAAS,CAAC,EAAE,CAACH,OAAO,EAAEG,SAAS,CAAC,CAAC;EAE/D,OAAO,IAAI;AACb,CAAC;AAED,eAAef,mBAAmB;AAElC,MAAMsF,MAAM,GAAGrG,UAAU,CAACkH,MAAM,CAAC;EAC/BZ,WAAW,EAAE;IACX,GAAGtG,UAAU,CAACwG,YAAY;IAC1BtE,eAAe,EAAE;EACnB,CAAC;EACDwE,WAAW,EAAE;IACXtF,QAAQ,EAAE,UAAU;IACpBc,eAAe,EAAE,OAAO;IACxBiF,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE,CAAC;IACpBC,YAAY,EAAE,EAAE;IAChBjF,WAAW,EAAE,MAAM;IACnBkF,YAAY,EAAE;MAAEzE,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCyE,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,QAAQ,EAAE,GAAG;IACb;IACA;IACA;IACAC,QAAQ,EAAE;EACZ,CAAC;EACD;EACA;EACA;EACAd,QAAQ,EAAE;IACRe,QAAQ,EAAE,EAAE;IACZrF,KAAK,EAAE,SAAS;IAChBsF,kBAAkB,EAAE,KAAK;IACzBC,iBAAiB,EAAE,QAAQ;IAC3BC,WAAW,EAAE;EACf;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","useEffect","useId","useMemo","useRef","useState","Delimeter","MenuItem","useSelector","MESSAGE_INTERACTIONS","MESSAGE_INTERACTIONS_ICONS","Animated","Text","StyleSheet","View","Pressable","Dimensions","Keyboard","Clipboard","useToast","useInteractionsOverlay","useTheme","getEmojiNativeById","quickReactionIds","reactionPickerEnabled","reactionsEnabled","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","MessageInteractions","isReply","isUser","message","closeMenu","position","handleReplyMessage","replyMessage","handleDeleteMessage","handleEditMessage","handleReactionMessage","onOpenEmojiPicker","showToast","present","dismiss","originX","originY","overlayId","theme","themedStyles","menu","backgroundColor","surface","shadowColor","shadow","text","color","config","state","chatSettingStore","menuSize","setMenuSize","width","height","barSize","setBarSize","showReactions","quickIds","showPicker","reveal","Value","current","placed","spring","toValue","useNativeDriver","speed","bounciness","start","keyboardHeight","setKeyboardHeight","metrics","onShow","e","endCoordinates","onHide","subs","addListener","forEach","s","remove","handleBarLayout","nativeEvent","layout","handleMenuLayout","handleCopyMessage","setStringAsync","id","Date","now","toString","title","type","err","console","log","memoPosition","undefined","top","bottom","left","opacity","barReserve","screenWidth","screenHeight","get","bottomReserve","keyboardVerticalOffset","topReserve","sideMargin","gap","visibleBottom","spaceBelow","spaceAbove","Math","max","leftMargin","rightMargin","right","rightAligned","min","barPosition","above","menuTop","localBarPosition","localPosition","content","disableInteractions","isDeleted","style","styles","overlayFill","children","absoluteFill","onPress","pointerEvents","dim","testID","onLayout","reactionBar","transform","scale","interpolate","inputRange","outputRange","map","pressed","reactionItem","surfaceHighlight","reactionGlyph","reactionMore","surfaceSecondary","reactionMoreText","contextMenu","disableReplies","menuText","REPLY","body","COPY","isMediafile","EDIT","DELETE","create","flexDirection","alignItems","paddingHorizontal","paddingVertical","borderRadius","shadowOffset","shadowOpacity","shadowRadius","elevation","justifyContent","fontSize","marginLeft","lineHeight","fontWeight","minWidth","overflow","includeFontPadding","textAlignVertical","marginRight"],"sourceRoot":"../../../../src","sources":["components/MessageBubble/MessageInteractions.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,KAAK,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1E,SAASC,SAAS,EAAEC,QAAQ,QAAQ,sCAAsC;AAC1E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K,EAAE,SAAS;IAChBqI,kBAAkB,EAAE,KAAK;IACzBC,iBAAiB,EAAE,QAAQ;IAC3BC,WAAW,EAAE;EACf;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,46 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import { View, Text, TouchableOpacity, Animated } from 'react-native';
|
|
6
|
-
import styled from 'styled-components/native';
|
|
3
|
+
import React, { useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { View, Text, TouchableOpacity, Animated, StyleSheet } from 'react-native';
|
|
7
5
|
import { useTheme } from '../../hooks/useTheme';
|
|
6
|
+
import { getEmojiNativeById } from '../../helpers/emoji';
|
|
8
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
const ReactionContainer = styled.View`
|
|
10
|
-
flex-direction: row;
|
|
11
|
-
align-items: center;
|
|
12
|
-
gap: 8px;
|
|
13
|
-
`;
|
|
14
|
-
const ReactionBox = styled(TouchableOpacity)`
|
|
15
|
-
padding: 4px 8px;
|
|
16
|
-
border-radius: 20px;
|
|
17
|
-
background-color: ${({
|
|
18
|
-
active,
|
|
19
|
-
color,
|
|
20
|
-
theme
|
|
21
|
-
}) => active ? color : theme.surface};
|
|
22
|
-
flex-direction: row;
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
elevation: 3;
|
|
26
|
-
`;
|
|
27
|
-
const emojiMap = {
|
|
28
|
-
joy: '😂',
|
|
29
|
-
heart: '❤️',
|
|
30
|
-
fire: '🔥',
|
|
31
|
-
'+1': '👍',
|
|
32
|
-
smile: '😄',
|
|
33
|
-
scream: '😱'
|
|
34
|
-
};
|
|
35
8
|
export const MessageReaction = ({
|
|
36
9
|
reaction,
|
|
37
10
|
color,
|
|
38
11
|
changeReaction,
|
|
39
|
-
userName
|
|
12
|
+
userName,
|
|
13
|
+
interactive = true
|
|
40
14
|
}) => {
|
|
41
15
|
const theme = useTheme();
|
|
42
16
|
const [tooltipEmoji, setTooltipEmoji] = useState(null);
|
|
43
|
-
const fadeAnim = new Animated.Value(0);
|
|
17
|
+
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
18
|
+
const reactionDetails = useMemo(() => {
|
|
19
|
+
const result = {};
|
|
20
|
+
Object.values(reaction || {}).forEach(({
|
|
21
|
+
emoji,
|
|
22
|
+
data
|
|
23
|
+
}) => {
|
|
24
|
+
(emoji || []).forEach(em => {
|
|
25
|
+
if (!result[em]) {
|
|
26
|
+
result[em] = {
|
|
27
|
+
count: 0,
|
|
28
|
+
users: []
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
result[em].count += 1;
|
|
32
|
+
result[em].users.push(`${data?.senderFirstName || ''} ${data?.senderLastName || ''}`.trim());
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
return result;
|
|
36
|
+
}, [reaction]);
|
|
37
|
+
if (!reaction || Object.keys(reactionDetails).length === 0) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
44
40
|
const showTooltip = emoji => {
|
|
45
41
|
setTooltipEmoji(emoji);
|
|
46
42
|
Animated.timing(fadeAnim, {
|
|
@@ -56,90 +52,115 @@ export const MessageReaction = ({
|
|
|
56
52
|
useNativeDriver: true
|
|
57
53
|
}).start(() => setTooltipEmoji(null));
|
|
58
54
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
const reactionDetails = useMemo(() => {
|
|
63
|
-
const result = {};
|
|
64
|
-
Object.values(reaction).forEach(({
|
|
65
|
-
emoji,
|
|
66
|
-
data
|
|
67
|
-
}) => {
|
|
68
|
-
if (emoji && emoji.length > 0) {
|
|
69
|
-
emoji.forEach(em => {
|
|
70
|
-
if (!result[em]) {
|
|
71
|
-
result[em] = {
|
|
72
|
-
count: 0,
|
|
73
|
-
users: []
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
result[em].count += 1;
|
|
77
|
-
result[em].users.push(`${data?.senderFirstName} ${data?.senderLastName}`);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
return result;
|
|
82
|
-
}, [reaction]);
|
|
83
|
-
return /*#__PURE__*/_jsx(ReactionContainer, {
|
|
55
|
+
return /*#__PURE__*/_jsx(View, {
|
|
56
|
+
style: styles.row,
|
|
84
57
|
children: Object.entries(reactionDetails).map(([emoji, details]) => {
|
|
85
|
-
const isUserReacted = userName
|
|
58
|
+
const isUserReacted = !!userName && details.users.includes(userName);
|
|
86
59
|
return /*#__PURE__*/_jsxs(View, {
|
|
87
|
-
style:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
color: color,
|
|
60
|
+
style: styles.chipWrap,
|
|
61
|
+
children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
62
|
+
testID: `reaction-chip-${emoji}`,
|
|
63
|
+
activeOpacity: 0.7,
|
|
64
|
+
disabled: !interactive,
|
|
93
65
|
onPress: () => changeReaction(emoji),
|
|
94
66
|
onLongPress: () => showTooltip(emoji),
|
|
95
67
|
onPressOut: hideTooltip,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
68
|
+
style: [styles.chip, {
|
|
69
|
+
backgroundColor: theme.surface,
|
|
70
|
+
borderColor: isUserReacted ? color : theme.border,
|
|
71
|
+
shadowColor: theme.shadow
|
|
72
|
+
}],
|
|
73
|
+
children: [isUserReacted && /*#__PURE__*/_jsx(View, {
|
|
74
|
+
pointerEvents: "none",
|
|
75
|
+
style: [styles.tint, {
|
|
76
|
+
backgroundColor: `${color}26`
|
|
77
|
+
}]
|
|
78
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
79
|
+
style: styles.glyph,
|
|
80
|
+
children: getEmojiNativeById(emoji)
|
|
102
81
|
}), /*#__PURE__*/_jsx(Text, {
|
|
103
|
-
style: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
color: isUserReacted ? theme.textOnPrimary : color
|
|
107
|
-
},
|
|
82
|
+
style: [styles.count, {
|
|
83
|
+
color: isUserReacted ? color : theme.textSecondary
|
|
84
|
+
}],
|
|
108
85
|
children: details.count
|
|
109
86
|
})]
|
|
110
87
|
}), tooltipEmoji === emoji && /*#__PURE__*/_jsx(Animated.View, {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
left: '50%',
|
|
88
|
+
pointerEvents: "none",
|
|
89
|
+
style: [styles.tooltip, {
|
|
90
|
+
opacity: fadeAnim,
|
|
115
91
|
transform: [{
|
|
116
|
-
translateX: -50
|
|
117
|
-
}, {
|
|
118
92
|
translateY: fadeAnim.interpolate({
|
|
119
93
|
inputRange: [0, 1],
|
|
120
94
|
outputRange: [4, 0]
|
|
121
95
|
})
|
|
122
96
|
}],
|
|
123
|
-
opacity: fadeAnim,
|
|
124
97
|
// Inverted pill: text colour as ground, surface as ink,
|
|
125
98
|
// so it stays high-contrast on both palettes.
|
|
126
|
-
backgroundColor: theme.text
|
|
127
|
-
|
|
128
|
-
paddingHorizontal: 10,
|
|
129
|
-
paddingVertical: 6,
|
|
130
|
-
maxWidth: 220,
|
|
131
|
-
zIndex: 999
|
|
132
|
-
},
|
|
99
|
+
backgroundColor: theme.text
|
|
100
|
+
}],
|
|
133
101
|
children: /*#__PURE__*/_jsx(Text, {
|
|
134
|
-
style: {
|
|
135
|
-
color: theme.surface
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
children: details.users.join(', ')
|
|
102
|
+
style: [styles.tooltipText, {
|
|
103
|
+
color: theme.surface
|
|
104
|
+
}],
|
|
105
|
+
children: details.users.filter(Boolean).join(', ')
|
|
139
106
|
})
|
|
140
107
|
})]
|
|
141
108
|
}, emoji);
|
|
142
109
|
})
|
|
143
110
|
});
|
|
144
111
|
};
|
|
112
|
+
const styles = StyleSheet.create({
|
|
113
|
+
row: {
|
|
114
|
+
flexDirection: 'row',
|
|
115
|
+
flexWrap: 'wrap',
|
|
116
|
+
alignItems: 'center',
|
|
117
|
+
gap: 6
|
|
118
|
+
},
|
|
119
|
+
chipWrap: {
|
|
120
|
+
position: 'relative'
|
|
121
|
+
},
|
|
122
|
+
chip: {
|
|
123
|
+
flexDirection: 'row',
|
|
124
|
+
alignItems: 'center',
|
|
125
|
+
paddingVertical: 3,
|
|
126
|
+
paddingHorizontal: 8,
|
|
127
|
+
borderRadius: 14,
|
|
128
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
129
|
+
shadowOpacity: 0.08,
|
|
130
|
+
shadowOffset: {
|
|
131
|
+
width: 0,
|
|
132
|
+
height: 1
|
|
133
|
+
},
|
|
134
|
+
shadowRadius: 2,
|
|
135
|
+
elevation: 1
|
|
136
|
+
},
|
|
137
|
+
tint: {
|
|
138
|
+
position: "absolute",
|
|
139
|
+
top: 0,
|
|
140
|
+
right: 0,
|
|
141
|
+
bottom: 0,
|
|
142
|
+
left: 0,
|
|
143
|
+
borderRadius: 14
|
|
144
|
+
},
|
|
145
|
+
glyph: {
|
|
146
|
+
fontSize: 16,
|
|
147
|
+
marginRight: 4
|
|
148
|
+
},
|
|
149
|
+
count: {
|
|
150
|
+
fontSize: 13,
|
|
151
|
+
fontWeight: '600'
|
|
152
|
+
},
|
|
153
|
+
tooltip: {
|
|
154
|
+
position: 'absolute',
|
|
155
|
+
bottom: 34,
|
|
156
|
+
left: 0,
|
|
157
|
+
borderRadius: 6,
|
|
158
|
+
paddingHorizontal: 10,
|
|
159
|
+
paddingVertical: 6,
|
|
160
|
+
maxWidth: 220
|
|
161
|
+
},
|
|
162
|
+
tooltipText: {
|
|
163
|
+
fontSize: 12
|
|
164
|
+
}
|
|
165
|
+
});
|
|
145
166
|
//# sourceMappingURL=MessageReaction.js.map
|