@ethora/chat-component-rn 26.8.1 → 26.8.3
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 +110 -0
- package/README.md +70 -11
- package/lib/commonjs/assets/EmptyChatIllustration.js +7 -6
- package/lib/commonjs/assets/EmptyChatIllustration.js.map +1 -1
- package/lib/commonjs/assets/icons.js +7 -2
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/AuthForms/Login.js +27 -12
- package/lib/commonjs/components/AuthForms/Login.js.map +1 -1
- package/lib/commonjs/components/ContextMenu/ContextMenuComponents.js +12 -4
- package/lib/commonjs/components/ContextMenu/ContextMenuComponents.js.map +1 -1
- package/lib/commonjs/components/DropdownMenu/DropdownMenu.js +16 -9
- package/lib/commonjs/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/lib/commonjs/components/ExampleComponents/CustomMessage.js +25 -7
- package/lib/commonjs/components/ExampleComponents/CustomMessage.js.map +1 -1
- package/lib/commonjs/components/ExampleComponents/CustomTypingIndicatorExamples.js +18 -6
- package/lib/commonjs/components/ExampleComponents/CustomTypingIndicatorExamples.js.map +1 -1
- package/lib/commonjs/components/Header/HeaderRoomList.js +34 -10
- package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/commonjs/components/InputComponents/Search.js +13 -4
- package/lib/commonjs/components/InputComponents/Search.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +18 -6
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +154 -15
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatWrapper.js +42 -19
- package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js +37 -10
- package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js.map +1 -1
- package/lib/commonjs/components/MainComponents/LoginWrapper.js +2 -1
- package/lib/commonjs/components/MainComponents/LoginWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaMessage.js +72 -28
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js +5 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +22 -8
- package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js +14 -13
- package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RNStyled.js +12 -4
- package/lib/commonjs/components/MainComponents/RNStyled.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js +25 -8
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +214 -38
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/Select.js +29 -8
- package/lib/commonjs/components/MainComponents/Select.js.map +1 -1
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +329 -99
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/BottomReplyContainer.js +24 -8
- package/lib/commonjs/components/MessageBubble/BottomReplyContainer.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/Message.js +46 -24
- package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js +15 -4
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageReaction.js +10 -5
- package/lib/commonjs/components/MessageBubble/MessageReaction.js.map +1 -1
- package/lib/commonjs/components/Modals/AddMembersModal/AddMembersModal.js +1 -5
- package/lib/commonjs/components/Modals/AddMembersModal/AddMembersModal.js.map +1 -1
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +345 -118
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +599 -203
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/DeleteChatModal.js +5 -7
- package/lib/commonjs/components/Modals/ChatProfileModal/DeleteChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +230 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +89 -36
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js +2 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
- package/lib/commonjs/components/Modals/Modal/Modal.js +8 -0
- package/lib/commonjs/components/Modals/Modal/Modal.js.map +1 -1
- package/lib/commonjs/components/Modals/ModalHeaderComponent.js +8 -2
- package/lib/commonjs/components/Modals/ModalHeaderComponent.js.map +1 -1
- package/lib/commonjs/components/Modals/ModalWrapper/ModalWrapper.js +8 -8
- package/lib/commonjs/components/Modals/ModalWrapper/ModalWrapper.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js +3 -6
- package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +205 -106
- package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
- package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +563 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +215 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +7 -9
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js +8 -6
- package/lib/commonjs/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/Referrals/Referrals.js +7 -2
- package/lib/commonjs/components/Modals/SettingsModals/Referrals/Referrals.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/SharedStyledComponents.js +7 -3
- package/lib/commonjs/components/Modals/SettingsModals/SharedStyledComponents.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/RadioInput.js +10 -6
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/RadioInput.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/VisibilityModal.js +7 -6
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/VisibilityModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +10 -22
- package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +510 -244
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +77 -46
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/commonjs/components/Modals/styledModalComponents.js +68 -17
- package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +30 -10
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js +6 -2
- package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +22 -3
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +17 -3
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +17 -3
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/StyledRoomComponents.js +6 -0
- package/lib/commonjs/components/RoomComponents/styled/StyledRoomComponents.js.map +1 -1
- package/lib/commonjs/components/Thread/ThreadWrapper.js +9 -2
- package/lib/commonjs/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/commonjs/components/Toast/Toast.js +3 -1
- package/lib/commonjs/components/Toast/Toast.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js +6 -3
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/commonjs/components/styled/AudioMessage.js +18 -12
- package/lib/commonjs/components/styled/AudioMessage.js.map +1 -1
- package/lib/commonjs/components/styled/Button.js +18 -9
- package/lib/commonjs/components/styled/Button.js.map +1 -1
- package/lib/commonjs/components/styled/DateLabel.js +8 -5
- package/lib/commonjs/components/styled/DateLabel.js.map +1 -1
- package/lib/commonjs/components/styled/MediaModal.js +27 -21
- package/lib/commonjs/components/styled/MediaModal.js.map +1 -1
- package/lib/commonjs/components/styled/MessageImage.js +37 -9
- package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
- package/lib/commonjs/components/styled/RoomListComponents/index.js +60 -38
- package/lib/commonjs/components/styled/RoomListComponents/index.js.map +1 -1
- package/lib/commonjs/components/styled/SendInput.js +93 -19
- package/lib/commonjs/components/styled/SendInput.js.map +1 -1
- package/lib/commonjs/components/styled/StyledComponents.js +75 -25
- package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInput.js +32 -18
- package/lib/commonjs/components/styled/StyledInput.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/CustomTypingIndicator.js +13 -8
- package/lib/commonjs/components/styled/StyledInputComponents/CustomTypingIndicator.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/MediaComponents.js +20 -9
- package/lib/commonjs/components/styled/StyledInputComponents/MediaComponents.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +50 -22
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/commonjs/components/styled/TreadLabel.js +6 -3
- package/lib/commonjs/components/styled/TreadLabel.js.map +1 -1
- package/lib/commonjs/components/styled/UnsupportedType.js +14 -4
- package/lib/commonjs/components/styled/UnsupportedType.js.map +1 -1
- package/lib/commonjs/components/styled/VideoMessage.js +119 -61
- package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
- package/lib/commonjs/context/MessageNotificationContext.js +14 -3
- package/lib/commonjs/context/MessageNotificationContext.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +184 -59
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/helpers/createMessageFromXml.js +19 -1
- package/lib/commonjs/helpers/createMessageFromXml.js.map +1 -1
- package/lib/commonjs/helpers/ensureScopedChatCache.js +2 -2
- package/lib/commonjs/helpers/ensureScopedChatCache.js.map +1 -1
- package/lib/commonjs/helpers/getChatBackground.js +26 -0
- package/lib/commonjs/helpers/getChatBackground.js.map +1 -0
- package/lib/commonjs/helpers/getDateLabelColor.js +3 -1
- package/lib/commonjs/helpers/getDateLabelColor.js.map +1 -1
- package/lib/commonjs/helpers/getDisplayFileName.js +79 -0
- package/lib/commonjs/helpers/getDisplayFileName.js.map +1 -0
- package/lib/commonjs/helpers/getIconColor.js +4 -1
- package/lib/commonjs/helpers/getIconColor.js.map +1 -1
- package/lib/commonjs/helpers/getSenderNameColor.js +3 -1
- package/lib/commonjs/helpers/getSenderNameColor.js.map +1 -1
- package/lib/commonjs/helpers/getServerReadTimestamp.js +188 -0
- package/lib/commonjs/helpers/getServerReadTimestamp.js.map +1 -0
- package/lib/commonjs/helpers/historyPreloadScheduler.js +65 -2
- package/lib/commonjs/helpers/historyPreloadScheduler.js.map +1 -1
- package/lib/commonjs/helpers/initXmppRooms.js +14 -8
- package/lib/commonjs/helpers/initXmppRooms.js.map +1 -1
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js +51 -9
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/commonjs/helpers/isOwnMessage.js +75 -0
- package/lib/commonjs/helpers/isOwnMessage.js.map +1 -0
- package/lib/commonjs/helpers/keyboardLayout.js +12 -2
- package/lib/commonjs/helpers/keyboardLayout.js.map +1 -1
- package/lib/commonjs/helpers/markdownParser.js +27 -5
- package/lib/commonjs/helpers/markdownParser.js.map +1 -1
- package/lib/commonjs/helpers/mediaLibraryRuntime.js +31 -0
- package/lib/commonjs/helpers/mediaLibraryRuntime.js.map +1 -0
- package/lib/commonjs/helpers/mimeToExtension.js +6 -14
- package/lib/commonjs/helpers/mimeToExtension.js.map +1 -1
- package/lib/commonjs/helpers/msgSortableMs.js +37 -0
- package/lib/commonjs/helpers/msgSortableMs.js.map +1 -0
- package/lib/commonjs/helpers/parseMessageBody.js +82 -24
- package/lib/commonjs/helpers/parseMessageBody.js.map +1 -1
- package/lib/commonjs/helpers/persistCrypto.js +122 -0
- package/lib/commonjs/helpers/persistCrypto.js.map +1 -0
- package/lib/commonjs/helpers/pickImageAsset.js +68 -0
- package/lib/commonjs/helpers/pickImageAsset.js.map +1 -0
- package/lib/commonjs/helpers/pushPayload.js +71 -0
- package/lib/commonjs/helpers/pushPayload.js.map +1 -0
- package/lib/commonjs/helpers/resolveInitBeforeLoadUser.js +130 -17
- package/lib/commonjs/helpers/resolveInitBeforeLoadUser.js.map +1 -1
- package/lib/commonjs/helpers/secureFileUrl.js +101 -0
- package/lib/commonjs/helpers/secureFileUrl.js.map +1 -0
- package/lib/commonjs/helpers/secureKeyValue.js +83 -0
- package/lib/commonjs/helpers/secureKeyValue.js.map +1 -0
- package/lib/commonjs/helpers/secureStoreRuntime.js +59 -0
- package/lib/commonjs/helpers/secureStoreRuntime.js.map +1 -0
- package/lib/commonjs/helpers/secureUserStorage.js +75 -0
- package/lib/commonjs/helpers/secureUserStorage.js.map +1 -0
- package/lib/commonjs/helpers/shallowEqual.js +36 -0
- package/lib/commonjs/helpers/shallowEqual.js.map +1 -0
- package/lib/commonjs/helpers/sheetGestures.js +32 -0
- package/lib/commonjs/helpers/sheetGestures.js.map +1 -0
- package/lib/commonjs/hooks/useChatRoomFocus.js +45 -12
- package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/commonjs/hooks/useChatWrapperInit.js +30 -10
- package/lib/commonjs/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/commonjs/hooks/useComposing.js +27 -0
- package/lib/commonjs/hooks/useComposing.js.map +1 -1
- package/lib/commonjs/hooks/useCustomTypingIndicator.js +7 -3
- package/lib/commonjs/hooks/useCustomTypingIndicator.js.map +1 -1
- package/lib/commonjs/hooks/useFileToken.js +10 -0
- package/lib/commonjs/hooks/useFileToken.js.map +1 -0
- package/lib/commonjs/hooks/useLogout.js +33 -10
- package/lib/commonjs/hooks/useLogout.js.map +1 -1
- package/lib/commonjs/hooks/usePendingNotification.js +8 -11
- package/lib/commonjs/hooks/usePendingNotification.js.map +1 -1
- package/lib/commonjs/hooks/useSendMessage.js +50 -14
- package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
- package/lib/commonjs/hooks/useTheme.js +35 -0
- package/lib/commonjs/hooks/useTheme.js.map +1 -0
- package/lib/commonjs/hooks/useUnreadMessagesCounter.js +6 -1
- package/lib/commonjs/hooks/useUnreadMessagesCounter.js.map +1 -1
- package/lib/commonjs/i18n/strings.js +163 -37
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/main.js +119 -0
- package/lib/commonjs/main.js.map +1 -1
- package/lib/commonjs/networking/api-requests/auth.api.js +134 -60
- package/lib/commonjs/networking/api-requests/auth.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/push.api.js +130 -45
- package/lib/commonjs/networking/api-requests/push.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/roomMembers.api.js +1 -1
- package/lib/commonjs/networking/api-requests/roomMembers.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +22 -9
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/user.api.js +68 -9
- package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
- package/lib/commonjs/networking/apiClient.js +62 -112
- package/lib/commonjs/networking/apiClient.js.map +1 -1
- package/lib/commonjs/networking/authRefresh.js +332 -0
- package/lib/commonjs/networking/authRefresh.js.map +1 -0
- package/lib/commonjs/networking/stanzaHandlers.js +41 -28
- package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js +46 -8
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js +8 -1
- package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
- package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js +124 -8
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.js +26 -7
- package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/commonjs/roomStore/index.js +35 -2
- package/lib/commonjs/roomStore/index.js.map +1 -1
- package/lib/commonjs/roomStore/persistence.js +226 -23
- package/lib/commonjs/roomStore/persistence.js.map +1 -1
- package/lib/commonjs/roomStore/roomsSlice.js +151 -38
- package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
- package/lib/commonjs/services/pushRegistration.js +250 -0
- package/lib/commonjs/services/pushRegistration.js.map +1 -0
- package/lib/commonjs/services/pushSubscriptionService.js +15 -37
- package/lib/commonjs/services/pushSubscriptionService.js.map +1 -1
- package/lib/commonjs/theme/index.js +38 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/styled.d.js +4 -0
- package/lib/commonjs/theme/styled.d.js.map +1 -0
- package/lib/commonjs/theme/theme.js +137 -0
- package/lib/commonjs/theme/theme.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/assets/EmptyChatIllustration.js +7 -6
- package/lib/module/assets/EmptyChatIllustration.js.map +1 -1
- package/lib/module/assets/icons.js +6 -1
- package/lib/module/assets/icons.js.map +1 -1
- package/lib/module/components/AuthForms/Login.js +27 -12
- package/lib/module/components/AuthForms/Login.js.map +1 -1
- package/lib/module/components/ContextMenu/ContextMenuComponents.js +12 -4
- package/lib/module/components/ContextMenu/ContextMenuComponents.js.map +1 -1
- package/lib/module/components/DropdownMenu/DropdownMenu.js +16 -9
- package/lib/module/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/lib/module/components/ExampleComponents/CustomMessage.js +25 -7
- package/lib/module/components/ExampleComponents/CustomMessage.js.map +1 -1
- package/lib/module/components/ExampleComponents/CustomTypingIndicatorExamples.js +18 -6
- package/lib/module/components/ExampleComponents/CustomTypingIndicatorExamples.js.map +1 -1
- package/lib/module/components/Header/HeaderRoomList.js +34 -10
- package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/module/components/InputComponents/Search.js +13 -4
- package/lib/module/components/InputComponents/Search.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +18 -6
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +156 -17
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/ChatWrapper.js +43 -20
- package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/LanguageSelectorModal.js +37 -10
- package/lib/module/components/MainComponents/LanguageSelectorModal.js.map +1 -1
- package/lib/module/components/MainComponents/LoginWrapper.js +2 -1
- package/lib/module/components/MainComponents/LoginWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/MediaMessage.js +72 -29
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/MessageContainer.js +5 -1
- package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +22 -8
- package/lib/module/components/MainComponents/MessageList.js.map +1 -1
- package/lib/module/components/MainComponents/ProfileImagePlaceholder.js +14 -13
- package/lib/module/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
- package/lib/module/components/MainComponents/RNStyled.js +12 -4
- package/lib/module/components/MainComponents/RNStyled.js.map +1 -1
- package/lib/module/components/MainComponents/ReduxWrapper.js +25 -8
- package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +213 -38
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/MainComponents/Select.js +29 -8
- package/lib/module/components/MainComponents/Select.js.map +1 -1
- package/lib/module/components/Menu/HeaderRoomListMenu.js +331 -102
- package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/module/components/MessageBubble/BottomReplyContainer.js +24 -8
- package/lib/module/components/MessageBubble/BottomReplyContainer.js.map +1 -1
- package/lib/module/components/MessageBubble/Message.js +47 -25
- package/lib/module/components/MessageBubble/Message.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageInteractions.js +15 -4
- package/lib/module/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageReaction.js +10 -5
- package/lib/module/components/MessageBubble/MessageReaction.js.map +1 -1
- package/lib/module/components/Modals/AddMembersModal/AddMembersModal.js +2 -6
- package/lib/module/components/Modals/AddMembersModal/AddMembersModal.js.map +1 -1
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js +336 -121
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +603 -208
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/DeleteChatModal.js +6 -8
- package/lib/module/components/Modals/ChatProfileModal/DeleteChatModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +225 -0
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +90 -37
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/PdfView.js +2 -1
- package/lib/module/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
- package/lib/module/components/Modals/Modal/Modal.js +9 -1
- package/lib/module/components/Modals/Modal/Modal.js.map +1 -1
- package/lib/module/components/Modals/ModalHeaderComponent.js +8 -2
- package/lib/module/components/Modals/ModalHeaderComponent.js.map +1 -1
- package/lib/module/components/Modals/ModalWrapper/ModalWrapper.js +10 -10
- package/lib/module/components/Modals/ModalWrapper/ModalWrapper.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/ModalContent.js +4 -7
- package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/NewChatModal.js +208 -108
- package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
- package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +555 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +210 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +8 -10
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js +8 -6
- package/lib/module/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/Referrals/Referrals.js +7 -2
- package/lib/module/components/Modals/SettingsModals/Referrals/Referrals.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/SharedStyledComponents.js +7 -3
- package/lib/module/components/Modals/SettingsModals/SharedStyledComponents.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/Visibility/RadioInput.js +10 -6
- package/lib/module/components/Modals/SettingsModals/Visibility/RadioInput.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/Visibility/VisibilityModal.js +7 -6
- package/lib/module/components/Modals/SettingsModals/Visibility/VisibilityModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +11 -24
- package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +512 -248
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +79 -48
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/module/components/Modals/styledModalComponents.js +67 -16
- package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +30 -10
- package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastAudioMessage.js +6 -2
- package/lib/module/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js +22 -3
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +17 -3
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +17 -3
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/StyledRoomComponents.js +6 -0
- package/lib/module/components/RoomComponents/styled/StyledRoomComponents.js.map +1 -1
- package/lib/module/components/Thread/ThreadWrapper.js +9 -2
- package/lib/module/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/module/components/Toast/Toast.js +3 -1
- package/lib/module/components/Toast/Toast.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallSession.js +6 -3
- package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/module/components/styled/AudioMessage.js +18 -12
- package/lib/module/components/styled/AudioMessage.js.map +1 -1
- package/lib/module/components/styled/Button.js +17 -9
- package/lib/module/components/styled/Button.js.map +1 -1
- package/lib/module/components/styled/DateLabel.js +8 -5
- package/lib/module/components/styled/DateLabel.js.map +1 -1
- package/lib/module/components/styled/MediaModal.js +29 -23
- package/lib/module/components/styled/MediaModal.js.map +1 -1
- package/lib/module/components/styled/MessageImage.js +37 -9
- package/lib/module/components/styled/MessageImage.js.map +1 -1
- package/lib/module/components/styled/RoomListComponents/index.js +62 -39
- package/lib/module/components/styled/RoomListComponents/index.js.map +1 -1
- package/lib/module/components/styled/SendInput.js +94 -20
- package/lib/module/components/styled/SendInput.js.map +1 -1
- package/lib/module/components/styled/StyledComponents.js +75 -25
- package/lib/module/components/styled/StyledComponents.js.map +1 -1
- package/lib/module/components/styled/StyledInput.js +32 -18
- package/lib/module/components/styled/StyledInput.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/CustomTypingIndicator.js +13 -8
- package/lib/module/components/styled/StyledInputComponents/CustomTypingIndicator.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/MediaComponents.js +20 -9
- package/lib/module/components/styled/StyledInputComponents/MediaComponents.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +50 -22
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/module/components/styled/TreadLabel.js +6 -3
- package/lib/module/components/styled/TreadLabel.js.map +1 -1
- package/lib/module/components/styled/UnsupportedType.js +14 -4
- package/lib/module/components/styled/UnsupportedType.js.map +1 -1
- package/lib/module/components/styled/VideoMessage.js +120 -62
- package/lib/module/components/styled/VideoMessage.js.map +1 -1
- package/lib/module/context/MessageNotificationContext.js +14 -3
- package/lib/module/context/MessageNotificationContext.js.map +1 -1
- package/lib/module/context/xmppProvider.js +184 -60
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/helpers/createMessageFromXml.js +19 -1
- package/lib/module/helpers/createMessageFromXml.js.map +1 -1
- package/lib/module/helpers/ensureScopedChatCache.js +2 -2
- package/lib/module/helpers/ensureScopedChatCache.js.map +1 -1
- package/lib/module/helpers/getChatBackground.js +22 -0
- package/lib/module/helpers/getChatBackground.js.map +1 -0
- package/lib/module/helpers/getDateLabelColor.js +4 -1
- package/lib/module/helpers/getDateLabelColor.js.map +1 -1
- package/lib/module/helpers/getDisplayFileName.js +73 -0
- package/lib/module/helpers/getDisplayFileName.js.map +1 -0
- package/lib/module/helpers/getIconColor.js +5 -1
- package/lib/module/helpers/getIconColor.js.map +1 -1
- package/lib/module/helpers/getSenderNameColor.js +4 -1
- package/lib/module/helpers/getSenderNameColor.js.map +1 -1
- package/lib/module/helpers/getServerReadTimestamp.js +181 -0
- package/lib/module/helpers/getServerReadTimestamp.js.map +1 -0
- package/lib/module/helpers/historyPreloadScheduler.js +66 -3
- package/lib/module/helpers/historyPreloadScheduler.js.map +1 -1
- package/lib/module/helpers/initXmppRooms.js +14 -8
- package/lib/module/helpers/initXmppRooms.js.map +1 -1
- package/lib/module/helpers/insertMessageWithDelimiter.js +52 -9
- package/lib/module/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/module/helpers/isOwnMessage.js +70 -0
- package/lib/module/helpers/isOwnMessage.js.map +1 -0
- package/lib/module/helpers/keyboardLayout.js +12 -2
- package/lib/module/helpers/keyboardLayout.js.map +1 -1
- package/lib/module/helpers/markdownParser.js +27 -5
- package/lib/module/helpers/markdownParser.js.map +1 -1
- package/lib/module/helpers/mediaLibraryRuntime.js +25 -0
- package/lib/module/helpers/mediaLibraryRuntime.js.map +1 -0
- package/lib/module/helpers/mimeToExtension.js +6 -13
- package/lib/module/helpers/mimeToExtension.js.map +1 -1
- package/lib/module/helpers/msgSortableMs.js +32 -0
- package/lib/module/helpers/msgSortableMs.js.map +1 -0
- package/lib/module/helpers/parseMessageBody.js +82 -24
- package/lib/module/helpers/parseMessageBody.js.map +1 -1
- package/lib/module/helpers/persistCrypto.js +115 -0
- package/lib/module/helpers/persistCrypto.js.map +1 -0
- package/lib/module/helpers/pickImageAsset.js +63 -0
- package/lib/module/helpers/pickImageAsset.js.map +1 -0
- package/lib/module/helpers/pushPayload.js +63 -0
- package/lib/module/helpers/pushPayload.js.map +1 -0
- package/lib/module/helpers/resolveInitBeforeLoadUser.js +130 -16
- package/lib/module/helpers/resolveInitBeforeLoadUser.js.map +1 -1
- package/lib/module/helpers/secureFileUrl.js +91 -0
- package/lib/module/helpers/secureFileUrl.js.map +1 -0
- package/lib/module/helpers/secureKeyValue.js +75 -0
- package/lib/module/helpers/secureKeyValue.js.map +1 -0
- package/lib/module/helpers/secureStoreRuntime.js +52 -0
- package/lib/module/helpers/secureStoreRuntime.js.map +1 -0
- package/lib/module/helpers/secureUserStorage.js +72 -0
- package/lib/module/helpers/secureUserStorage.js.map +1 -0
- package/lib/module/helpers/shallowEqual.js +31 -0
- package/lib/module/helpers/shallowEqual.js.map +1 -0
- package/lib/module/helpers/sheetGestures.js +26 -0
- package/lib/module/helpers/sheetGestures.js.map +1 -0
- package/lib/module/hooks/useChatRoomFocus.js +46 -13
- package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/module/hooks/useChatWrapperInit.js +30 -10
- package/lib/module/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/module/hooks/useComposing.js +28 -1
- package/lib/module/hooks/useComposing.js.map +1 -1
- package/lib/module/hooks/useCustomTypingIndicator.js +8 -3
- package/lib/module/hooks/useCustomTypingIndicator.js.map +1 -1
- package/lib/module/hooks/useFileToken.js +5 -0
- package/lib/module/hooks/useFileToken.js.map +1 -0
- package/lib/module/hooks/useLogout.js +33 -10
- package/lib/module/hooks/useLogout.js.map +1 -1
- package/lib/module/hooks/usePendingNotification.js +8 -11
- package/lib/module/hooks/usePendingNotification.js.map +1 -1
- package/lib/module/hooks/useSendMessage.js +52 -16
- package/lib/module/hooks/useSendMessage.js.map +1 -1
- package/lib/module/hooks/useTheme.js +30 -0
- package/lib/module/hooks/useTheme.js.map +1 -0
- package/lib/module/hooks/useUnreadMessagesCounter.js +6 -1
- package/lib/module/hooks/useUnreadMessagesCounter.js.map +1 -1
- package/lib/module/i18n/strings.js +163 -37
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/main.js +17 -2
- package/lib/module/main.js.map +1 -1
- package/lib/module/networking/api-requests/auth.api.js +131 -59
- package/lib/module/networking/api-requests/auth.api.js.map +1 -1
- package/lib/module/networking/api-requests/push.api.js +119 -45
- package/lib/module/networking/api-requests/push.api.js.map +1 -1
- package/lib/module/networking/api-requests/roomMembers.api.js +1 -1
- package/lib/module/networking/api-requests/roomMembers.api.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +21 -9
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/api-requests/user.api.js +64 -7
- package/lib/module/networking/api-requests/user.api.js.map +1 -1
- package/lib/module/networking/apiClient.js +61 -113
- package/lib/module/networking/apiClient.js.map +1 -1
- package/lib/module/networking/authRefresh.js +321 -0
- package/lib/module/networking/authRefresh.js.map +1 -0
- package/lib/module/networking/stanzaHandlers.js +41 -28
- package/lib/module/networking/stanzaHandlers.js.map +1 -1
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js +46 -8
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/module/networking/xmpp/presenceInRoom.xmpp.js +8 -1
- package/lib/module/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
- package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
- package/lib/module/networking/xmppClient.js +124 -8
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/roomStore/chatSettingsSlice.js +26 -7
- package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/module/roomStore/index.js +37 -4
- package/lib/module/roomStore/index.js.map +1 -1
- package/lib/module/roomStore/persistence.js +223 -22
- package/lib/module/roomStore/persistence.js.map +1 -1
- package/lib/module/roomStore/roomsSlice.js +139 -34
- package/lib/module/roomStore/roomsSlice.js.map +1 -1
- package/lib/module/services/pushRegistration.js +239 -0
- package/lib/module/services/pushRegistration.js.map +1 -0
- package/lib/module/services/pushSubscriptionService.js +15 -37
- package/lib/module/services/pushSubscriptionService.js.map +1 -1
- package/lib/module/theme/index.js +7 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/styled.d.js +6 -0
- package/lib/module/theme/styled.d.js.map +1 -0
- package/lib/module/theme/theme.js +131 -0
- package/lib/module/theme/theme.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/assets/EmptyChatIllustration.d.ts +1 -0
- package/lib/typescript/assets/EmptyChatIllustration.d.ts.map +1 -1
- package/lib/typescript/assets/icons.d.ts +24 -0
- package/lib/typescript/assets/icons.d.ts.map +1 -1
- package/lib/typescript/components/AuthForms/Login.d.ts.map +1 -1
- package/lib/typescript/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/lib/typescript/components/ExampleComponents/CustomMessage.d.ts.map +1 -1
- package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
- package/lib/typescript/components/InputComponents/Search.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/LanguageSelectorModal.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/LoginWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts +10 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ProfileImagePlaceholder.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomList.d.ts +7 -0
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/Select.d.ts.map +1 -1
- package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts +3 -0
- package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/BottomReplyContainer.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageInteractions.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageReaction.d.ts.map +1 -1
- package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts +9 -0
- package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts +10 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/DeleteChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts +9 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -0
- 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/Modal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ModalHeaderComponent.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ModalWrapper/ModalWrapper.d.ts.map +1 -1
- package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts +4 -2
- package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts +1 -1
- package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/NewChatModal/UpdNewChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts +75 -0
- package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts.map +1 -0
- package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts +25 -0
- package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts.map +1 -0
- package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts +6 -1
- package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/Referrals/Referrals.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/SharedStyledComponents.d.ts +2 -2
- package/lib/typescript/components/Modals/SettingsModals/SharedStyledComponents.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/Visibility/RadioInput.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/Visibility/VisibilityModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/EditUserModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts +16 -0
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts +1 -0
- package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/styledModalComponents.d.ts +2 -0
- package/lib/typescript/components/Modals/styledModalComponents.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastAudioMessage.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/StyledRoomComponents.d.ts.map +1 -1
- package/lib/typescript/components/Thread/ThreadWrapper.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
- package/lib/typescript/components/styled/AudioMessage.d.ts.map +1 -1
- package/lib/typescript/components/styled/Button.d.ts.map +1 -1
- package/lib/typescript/components/styled/DateLabel.d.ts.map +1 -1
- package/lib/typescript/components/styled/MediaModal.d.ts +2 -2
- package/lib/typescript/components/styled/MediaModal.d.ts.map +1 -1
- package/lib/typescript/components/styled/MessageImage.d.ts +14 -0
- package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
- package/lib/typescript/components/styled/RoomListComponents/index.d.ts.map +1 -1
- package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledComponents.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledInput.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledInputComponents/MediaComponents.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
- package/lib/typescript/components/styled/TreadLabel.d.ts.map +1 -1
- package/lib/typescript/components/styled/UnsupportedType.d.ts.map +1 -1
- package/lib/typescript/components/styled/VideoMessage.d.ts +8 -0
- package/lib/typescript/components/styled/VideoMessage.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/createMessageFromXml.d.ts.map +1 -1
- package/lib/typescript/helpers/getAvatarColor.d.ts +1 -1
- package/lib/typescript/helpers/getChatBackground.d.ts +15 -0
- package/lib/typescript/helpers/getChatBackground.d.ts.map +1 -0
- package/lib/typescript/helpers/getDateLabelColor.d.ts +3 -7
- package/lib/typescript/helpers/getDateLabelColor.d.ts.map +1 -1
- package/lib/typescript/helpers/getDisplayFileName.d.ts +49 -0
- package/lib/typescript/helpers/getDisplayFileName.d.ts.map +1 -0
- package/lib/typescript/helpers/getIconColor.d.ts +4 -7
- package/lib/typescript/helpers/getIconColor.d.ts.map +1 -1
- package/lib/typescript/helpers/getSenderNameColor.d.ts +3 -7
- package/lib/typescript/helpers/getSenderNameColor.d.ts.map +1 -1
- package/lib/typescript/helpers/getServerReadTimestamp.d.ts +108 -0
- package/lib/typescript/helpers/getServerReadTimestamp.d.ts.map +1 -0
- package/lib/typescript/helpers/historyPreloadScheduler.d.ts.map +1 -1
- package/lib/typescript/helpers/initXmppRooms.d.ts.map +1 -1
- package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts +1 -1
- package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts.map +1 -1
- package/lib/typescript/helpers/isOwnMessage.d.ts +36 -0
- package/lib/typescript/helpers/isOwnMessage.d.ts.map +1 -0
- package/lib/typescript/helpers/keyboardLayout.d.ts +5 -1
- package/lib/typescript/helpers/keyboardLayout.d.ts.map +1 -1
- package/lib/typescript/helpers/markdownParser.d.ts +8 -1
- package/lib/typescript/helpers/markdownParser.d.ts.map +1 -1
- package/lib/typescript/helpers/mediaLibraryRuntime.d.ts +3 -0
- package/lib/typescript/helpers/mediaLibraryRuntime.d.ts.map +1 -0
- package/lib/typescript/helpers/mimeToExtension.d.ts +0 -15
- package/lib/typescript/helpers/mimeToExtension.d.ts.map +1 -1
- package/lib/typescript/helpers/msgSortableMs.d.ts +2 -0
- package/lib/typescript/helpers/msgSortableMs.d.ts.map +1 -0
- package/lib/typescript/helpers/parseMessageBody.d.ts +8 -1
- package/lib/typescript/helpers/parseMessageBody.d.ts.map +1 -1
- package/lib/typescript/helpers/persistCrypto.d.ts +13 -0
- package/lib/typescript/helpers/persistCrypto.d.ts.map +1 -0
- package/lib/typescript/helpers/pickImageAsset.d.ts +27 -0
- package/lib/typescript/helpers/pickImageAsset.d.ts.map +1 -0
- package/lib/typescript/helpers/pushPayload.d.ts +7 -0
- package/lib/typescript/helpers/pushPayload.d.ts.map +1 -0
- package/lib/typescript/helpers/resolveInitBeforeLoadUser.d.ts.map +1 -1
- package/lib/typescript/helpers/secureFileUrl.d.ts +7 -0
- package/lib/typescript/helpers/secureFileUrl.d.ts.map +1 -0
- package/lib/typescript/helpers/secureKeyValue.d.ts +13 -0
- package/lib/typescript/helpers/secureKeyValue.d.ts.map +1 -0
- package/lib/typescript/helpers/secureStoreRuntime.d.ts +29 -0
- package/lib/typescript/helpers/secureStoreRuntime.d.ts.map +1 -0
- package/lib/typescript/helpers/secureUserStorage.d.ts +23 -0
- package/lib/typescript/helpers/secureUserStorage.d.ts.map +1 -0
- package/lib/typescript/helpers/shallowEqual.d.ts +11 -0
- package/lib/typescript/helpers/shallowEqual.d.ts.map +1 -0
- package/lib/typescript/helpers/sheetGestures.d.ts +20 -0
- package/lib/typescript/helpers/sheetGestures.d.ts.map +1 -0
- package/lib/typescript/hooks/useChatRoomFocus.d.ts +4 -1
- package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
- package/lib/typescript/hooks/useChatWrapperInit.d.ts.map +1 -1
- package/lib/typescript/hooks/useComposing.d.ts.map +1 -1
- package/lib/typescript/hooks/useCustomTypingIndicator.d.ts +2 -0
- package/lib/typescript/hooks/useCustomTypingIndicator.d.ts.map +1 -1
- package/lib/typescript/hooks/useFileToken.d.ts +2 -0
- package/lib/typescript/hooks/useFileToken.d.ts.map +1 -0
- package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
- package/lib/typescript/hooks/usePendingNotification.d.ts.map +1 -1
- package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
- package/lib/typescript/hooks/useTheme.d.ts +16 -0
- package/lib/typescript/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/hooks/useUnreadMessagesCounter.d.ts +1 -0
- package/lib/typescript/hooks/useUnreadMessagesCounter.d.ts.map +1 -1
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/main.d.ts +16 -2
- package/lib/typescript/main.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/auth.api.d.ts +3 -1
- package/lib/typescript/networking/api-requests/auth.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/push.api.d.ts +46 -3
- package/lib/typescript/networking/api-requests/push.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +1 -0
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/user.api.d.ts +27 -0
- package/lib/typescript/networking/api-requests/user.api.d.ts.map +1 -1
- package/lib/typescript/networking/apiClient.d.ts +12 -6
- package/lib/typescript/networking/apiClient.d.ts.map +1 -1
- package/lib/typescript/networking/authRefresh.d.ts +95 -0
- package/lib/typescript/networking/authRefresh.d.ts.map +1 -0
- package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts +10 -2
- package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/subscribeToRoomMessages.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts +14 -0
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts +16 -0
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
- package/lib/typescript/roomStore/index.d.ts.map +1 -1
- package/lib/typescript/roomStore/persistence.d.ts +18 -1
- package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts +43 -3
- package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
- package/lib/typescript/services/pushRegistration.d.ts +21 -0
- package/lib/typescript/services/pushRegistration.d.ts.map +1 -0
- package/lib/typescript/services/pushSubscriptionService.d.ts +1 -5
- package/lib/typescript/services/pushSubscriptionService.d.ts.map +1 -1
- package/lib/typescript/theme/index.d.ts +5 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/theme/theme.d.ts +113 -0
- package/lib/typescript/theme/theme.d.ts.map +1 -0
- package/lib/typescript/types/models/room.model.d.ts +1 -0
- package/lib/typescript/types/models/room.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +70 -5
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +41 -28
- package/src/assets/EmptyChatIllustration.tsx +7 -5
- package/src/assets/icons.tsx +72 -9
- package/src/components/AuthForms/Login.tsx +14 -12
- package/src/components/ContextMenu/ContextMenuComponents.tsx +4 -4
- package/src/components/DropdownMenu/DropdownMenu.tsx +14 -6
- package/src/components/ExampleComponents/CustomMessage.tsx +9 -8
- package/src/components/ExampleComponents/CustomTypingIndicatorExamples.tsx +6 -6
- package/src/components/Header/HeaderRoomList.tsx +35 -8
- package/src/components/InputComponents/Search.tsx +7 -4
- package/src/components/MainComponents/ChatHeader.tsx +18 -6
- package/src/components/MainComponents/ChatRoom.tsx +164 -15
- package/src/components/MainComponents/ChatWrapper.tsx +44 -26
- package/src/components/MainComponents/LanguageSelectorModal.tsx +33 -7
- package/src/components/MainComponents/LoginWrapper.tsx +1 -0
- package/src/components/MainComponents/MediaMessage.tsx +63 -26
- package/src/components/MainComponents/MessageContainer.tsx +5 -1
- package/src/components/MainComponents/MessageList.tsx +36 -7
- package/src/components/MainComponents/ProfileImagePlaceholder.tsx +21 -14
- package/src/components/MainComponents/RNStyled.tsx +4 -4
- package/src/components/MainComponents/ReduxWrapper.tsx +23 -7
- package/src/components/MainComponents/RoomList.tsx +243 -40
- package/src/components/MainComponents/Select.tsx +13 -8
- package/src/components/Menu/HeaderRoomListMenu.tsx +347 -77
- package/src/components/MessageBubble/BottomReplyContainer.tsx +16 -11
- package/src/components/MessageBubble/Message.tsx +48 -25
- package/src/components/MessageBubble/MessageInteractions.tsx +17 -4
- package/src/components/MessageBubble/MessageReaction.tsx +9 -4
- package/src/components/Modals/AddMembersModal/AddMembersModal.tsx +2 -2
- package/src/components/Modals/AttachSheet/AttachSheet.tsx +376 -106
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +639 -283
- package/src/components/Modals/ChatProfileModal/DeleteChatModal.tsx +6 -4
- package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +248 -0
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +93 -47
- package/src/components/Modals/FilePreviewModal/PdfView.tsx +2 -1
- package/src/components/Modals/Modal/Modal.tsx +7 -0
- package/src/components/Modals/ModalHeaderComponent.tsx +9 -2
- package/src/components/Modals/ModalWrapper/ModalWrapper.tsx +14 -6
- package/src/components/Modals/NewChatModal/ModalContent.tsx +8 -5
- package/src/components/Modals/NewChatModal/NewChatModal.tsx +223 -119
- package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +12 -1
- package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +624 -0
- package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +224 -0
- package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +16 -7
- package/src/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.tsx +8 -6
- package/src/components/Modals/SettingsModals/Referrals/Referrals.tsx +5 -3
- package/src/components/Modals/SettingsModals/SharedStyledComponents.ts +4 -4
- package/src/components/Modals/SettingsModals/Visibility/RadioInput.tsx +9 -5
- package/src/components/Modals/SettingsModals/Visibility/VisibilityModal.tsx +7 -7
- package/src/components/Modals/UserProfileModal/EditUserModal.tsx +12 -26
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +621 -307
- package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +84 -58
- package/src/components/Modals/styledModalComponents.tsx +31 -16
- package/src/components/RoomComponents/ChatRoomItem.tsx +30 -6
- package/src/components/RoomComponents/styled/LastAudioMessage.tsx +4 -2
- package/src/components/RoomComponents/styled/LastMessageFile.tsx +28 -4
- package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +18 -3
- package/src/components/RoomComponents/styled/LastMessageVideo.tsx +18 -3
- package/src/components/RoomComponents/styled/StyledRoomComponents.ts +2 -0
- package/src/components/Thread/ThreadWrapper.tsx +6 -5
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/VideoCalls/VideoCallSession.tsx +8 -3
- package/src/components/styled/AudioMessage.tsx +14 -10
- package/src/components/styled/Button.tsx +15 -8
- package/src/components/styled/DateLabel.tsx +7 -3
- package/src/components/styled/MediaModal.tsx +30 -25
- package/src/components/styled/MessageImage.tsx +53 -7
- package/src/components/styled/RoomListComponents/index.tsx +60 -35
- package/src/components/styled/SendInput.tsx +106 -20
- package/src/components/styled/StyledComponents.ts +38 -25
- package/src/components/styled/StyledInput.tsx +35 -21
- package/src/components/styled/StyledInputComponents/CustomTypingIndicator.tsx +8 -8
- package/src/components/styled/StyledInputComponents/MediaComponents.tsx +20 -7
- package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +26 -23
- package/src/components/styled/TreadLabel.tsx +9 -3
- package/src/components/styled/UnsupportedType.tsx +14 -4
- package/src/components/styled/VideoMessage.tsx +131 -54
- package/src/context/MessageNotificationContext.tsx +18 -4
- package/src/context/xmppProvider.tsx +216 -57
- package/src/helpers/createMessageFromXml.ts +20 -1
- package/src/helpers/ensureScopedChatCache.ts +2 -2
- package/src/helpers/getChatBackground.ts +20 -0
- package/src/helpers/getDateLabelColor.ts +5 -3
- package/src/helpers/getDisplayFileName.ts +87 -0
- package/src/helpers/getIconColor.ts +6 -3
- package/src/helpers/getSenderNameColor.ts +5 -3
- package/src/helpers/getServerReadTimestamp.ts +197 -0
- package/src/helpers/historyPreloadScheduler.ts +80 -3
- package/src/helpers/initXmppRooms.tsx +14 -10
- package/src/helpers/insertMessageWithDelimiter.ts +55 -19
- package/src/helpers/isOwnMessage.ts +90 -0
- package/src/helpers/keyboardLayout.ts +23 -2
- package/src/helpers/markdownParser.tsx +29 -5
- package/src/helpers/mediaLibraryRuntime.ts +25 -0
- package/src/helpers/mimeToExtension.ts +6 -22
- package/src/helpers/msgSortableMs.ts +25 -0
- package/src/helpers/parseMessageBody.tsx +79 -26
- package/src/helpers/persistCrypto.ts +127 -0
- package/src/helpers/pickImageAsset.ts +68 -0
- package/src/helpers/pushPayload.ts +62 -0
- package/src/helpers/resolveInitBeforeLoadUser.ts +125 -18
- package/src/helpers/secureFileUrl.ts +103 -0
- package/src/helpers/secureKeyValue.ts +80 -0
- package/src/helpers/secureStoreRuntime.ts +62 -0
- package/src/helpers/secureUserStorage.ts +80 -0
- package/src/helpers/shallowEqual.ts +33 -0
- package/src/helpers/sheetGestures.ts +25 -0
- package/src/hooks/useChatRoomFocus.ts +49 -9
- package/src/hooks/useChatWrapperInit.ts +30 -10
- package/src/hooks/useComposing.tsx +37 -1
- package/src/hooks/useCustomTypingIndicator.tsx +7 -3
- package/src/hooks/useFileToken.ts +7 -0
- package/src/hooks/useLogout.tsx +39 -12
- package/src/hooks/usePendingNotification.ts +5 -11
- package/src/hooks/useSendMessage.tsx +60 -15
- package/src/hooks/useTheme.ts +41 -0
- package/src/hooks/useUnreadMessagesCounter.ts +11 -0
- package/src/i18n/strings.ts +163 -37
- package/src/main.ts +57 -2
- package/src/networking/api-requests/auth.api.ts +156 -48
- package/src/networking/api-requests/push.api.ts +185 -62
- package/src/networking/api-requests/roomMembers.api.ts +1 -1
- package/src/networking/api-requests/rooms.api.ts +18 -9
- package/src/networking/api-requests/user.api.ts +79 -7
- package/src/networking/apiClient.ts +68 -123
- package/src/networking/authRefresh.ts +451 -0
- package/src/networking/stanzaHandlers.ts +44 -28
- package/src/networking/xmpp/flushLastViewedToPrivateStore.ts +71 -10
- package/src/networking/xmpp/presenceInRoom.xmpp.ts +6 -1
- package/src/networking/xmpp/subscribeToRoomMessages.xmpp.ts +12 -1
- package/src/networking/xmppClient.ts +141 -9
- package/src/roomStore/chatSettingsSlice.ts +34 -10
- package/src/roomStore/index.ts +40 -4
- package/src/roomStore/persistence.ts +234 -24
- package/src/roomStore/roomsSlice.ts +161 -29
- package/src/services/pushRegistration.ts +356 -0
- package/src/services/pushSubscriptionService.ts +18 -47
- package/src/theme/index.ts +10 -0
- package/src/theme/styled.d.ts +9 -0
- package/src/theme/theme.ts +243 -0
- package/src/types/models/room.model.ts +1 -0
- package/src/types/types.ts +96 -5
- package/src/version.ts +1 -1
- package/lib/commonjs/context/PushNotificationProvider.js +0 -79
- package/lib/commonjs/context/PushNotificationProvider.js.map +0 -1
- package/lib/commonjs/hooks/usePushNotifications.js +0 -110
- package/lib/commonjs/hooks/usePushNotifications.js.map +0 -1
- package/lib/commonjs/services/pushNotifications.js +0 -143
- package/lib/commonjs/services/pushNotifications.js.map +0 -1
- package/lib/module/context/PushNotificationProvider.js +0 -79
- package/lib/module/context/PushNotificationProvider.js.map +0 -1
- package/lib/module/hooks/usePushNotifications.js +0 -106
- package/lib/module/hooks/usePushNotifications.js.map +0 -1
- package/lib/module/services/pushNotifications.js +0 -130
- package/lib/module/services/pushNotifications.js.map +0 -1
- package/lib/typescript/context/PushNotificationProvider.d.ts +0 -2
- package/lib/typescript/context/PushNotificationProvider.d.ts.map +0 -1
- package/lib/typescript/hooks/usePushNotifications.d.ts +0 -5
- package/lib/typescript/hooks/usePushNotifications.d.ts.map +0 -1
- package/lib/typescript/services/pushNotifications.d.ts +0 -10
- package/lib/typescript/services/pushNotifications.d.ts.map +0 -1
- package/src/context/PushNotificationProvider.tsx +0 -78
- package/src/hooks/usePushNotifications.ts +0 -131
- package/src/services/pushNotifications.ts +0 -170
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
/** @format */
|
|
4
4
|
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
6
|
import React, { useMemo } from 'react';
|
|
6
7
|
import { View, StyleSheet, Image, Text } from 'react-native';
|
|
7
8
|
import { ProfileImagePlaceholder } from '../MainComponents/ProfileImagePlaceholder';
|
|
8
9
|
import { useChatSettingState } from '../../hooks/useChatSettingState';
|
|
9
10
|
import { BurgerMenuIcon } from '../../assets/icons';
|
|
10
11
|
import Button from '../styled/Button';
|
|
12
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
13
|
+
import { useT } from '../../i18n/useT';
|
|
11
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
15
|
export const HeaderRoomList = ({
|
|
13
16
|
setDrawerOpen
|
|
@@ -17,6 +20,10 @@ export const HeaderRoomList = ({
|
|
|
17
20
|
user,
|
|
18
21
|
selectedUser
|
|
19
22
|
} = useChatSettingState();
|
|
23
|
+
const theme = useTheme();
|
|
24
|
+
const t = useT();
|
|
25
|
+
const insets = useSafeAreaInsets();
|
|
26
|
+
const topInset = config?.headerLayout?.safeAreaTop ? insets.top : 0;
|
|
20
27
|
const modalUser = selectedUser ?? user;
|
|
21
28
|
const HeaderLogo = useMemo(() => {
|
|
22
29
|
const image = config?.headerLogo;
|
|
@@ -37,17 +44,23 @@ export const HeaderRoomList = ({
|
|
|
37
44
|
return /*#__PURE__*/_jsx(View, {});
|
|
38
45
|
}, [config?.backgroundChat?.image]);
|
|
39
46
|
return /*#__PURE__*/_jsxs(View, {
|
|
40
|
-
style: styles.headerContainer,
|
|
47
|
+
style: [styles.headerContainer, {
|
|
48
|
+
backgroundColor: theme.surface,
|
|
49
|
+
shadowColor: theme.shadow
|
|
50
|
+
}, topInset ? {
|
|
51
|
+
paddingTop: 16 + topInset
|
|
52
|
+
} : null],
|
|
41
53
|
children: [!config?.disableRoomMenu && config?.headerMenu ? /*#__PURE__*/_jsx(View, {
|
|
42
54
|
style: styles.leftContainer,
|
|
43
55
|
children: /*#__PURE__*/_jsx(Button, {
|
|
56
|
+
testID: "room-list-burger",
|
|
44
57
|
style: styles.menuButton,
|
|
45
58
|
color: "black",
|
|
46
59
|
unstyled: true,
|
|
47
60
|
EndIcon: /*#__PURE__*/_jsx(BurgerMenuIcon, {
|
|
48
|
-
color:
|
|
61
|
+
color: theme.icon
|
|
49
62
|
}),
|
|
50
|
-
onPress: () => config?.headerMenu
|
|
63
|
+
onPress: () => typeof config?.headerMenu === 'function' ? config.headerMenu() : setDrawerOpen()
|
|
51
64
|
})
|
|
52
65
|
}) : /*#__PURE__*/_jsx(View, {
|
|
53
66
|
style: styles.leftContainer
|
|
@@ -56,16 +69,17 @@ export const HeaderRoomList = ({
|
|
|
56
69
|
children: config?.headerLogo ? HeaderLogo : /*#__PURE__*/_jsx(Text, {
|
|
57
70
|
style: {
|
|
58
71
|
fontWeight: 500,
|
|
59
|
-
fontSize: 18
|
|
72
|
+
fontSize: 18,
|
|
73
|
+
color: theme.text
|
|
60
74
|
},
|
|
61
|
-
children:
|
|
75
|
+
children: t('roomList.title')
|
|
62
76
|
})
|
|
63
77
|
}), /*#__PURE__*/_jsx(View, {
|
|
64
78
|
style: styles.rightContainer,
|
|
65
79
|
children: /*#__PURE__*/_jsx(ProfileImagePlaceholder, {
|
|
66
80
|
icon: modalUser?.profileImage ?? null,
|
|
67
81
|
name: modalUser?.name ?? modalUser?.firstName,
|
|
68
|
-
size:
|
|
82
|
+
size: 36,
|
|
69
83
|
click: {
|
|
70
84
|
isClick: true,
|
|
71
85
|
onPress: setDrawerOpen
|
|
@@ -80,9 +94,19 @@ const styles = StyleSheet.create({
|
|
|
80
94
|
alignItems: 'center',
|
|
81
95
|
paddingHorizontal: 16,
|
|
82
96
|
paddingTop: 16,
|
|
83
|
-
paddingBottom:
|
|
97
|
+
paddingBottom: 12,
|
|
84
98
|
minHeight: 56,
|
|
85
|
-
justifyContent: 'space-between'
|
|
99
|
+
justifyContent: 'space-between',
|
|
100
|
+
borderBottomLeftRadius: 20,
|
|
101
|
+
borderBottomRightRadius: 20,
|
|
102
|
+
shadowOffset: {
|
|
103
|
+
width: 0,
|
|
104
|
+
height: 4
|
|
105
|
+
},
|
|
106
|
+
shadowOpacity: 0.06,
|
|
107
|
+
shadowRadius: 12,
|
|
108
|
+
elevation: 4,
|
|
109
|
+
zIndex: 2
|
|
86
110
|
},
|
|
87
111
|
menuButton: {
|
|
88
112
|
padding: 8,
|
|
@@ -90,7 +114,7 @@ const styles = StyleSheet.create({
|
|
|
90
114
|
backgroundColor: 'transparent'
|
|
91
115
|
},
|
|
92
116
|
leftContainer: {
|
|
93
|
-
width:
|
|
117
|
+
width: 44,
|
|
94
118
|
alignItems: 'flex-start',
|
|
95
119
|
justifyContent: 'center'
|
|
96
120
|
},
|
|
@@ -102,7 +126,7 @@ const styles = StyleSheet.create({
|
|
|
102
126
|
justifyContent: 'center'
|
|
103
127
|
},
|
|
104
128
|
rightContainer: {
|
|
105
|
-
width:
|
|
129
|
+
width: 44,
|
|
106
130
|
alignItems: 'flex-end',
|
|
107
131
|
justifyContent: 'center'
|
|
108
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","View","StyleSheet","Image","Text","ProfileImagePlaceholder","useChatSettingState","BurgerMenuIcon","Button","jsx","_jsx","jsxs","_jsxs","HeaderRoomList","setDrawerOpen","config","user","selectedUser","modalUser","HeaderLogo","image","headerLogo","SvgComponent","source","uri","backgroundChat","style","styles","headerContainer","children","disableRoomMenu","headerMenu","leftContainer","menuButton","color","unstyled","EndIcon","
|
|
1
|
+
{"version":3,"names":["useSafeAreaInsets","React","useMemo","View","StyleSheet","Image","Text","ProfileImagePlaceholder","useChatSettingState","BurgerMenuIcon","Button","useTheme","useT","jsx","_jsx","jsxs","_jsxs","HeaderRoomList","setDrawerOpen","config","user","selectedUser","theme","t","insets","topInset","headerLayout","safeAreaTop","top","modalUser","HeaderLogo","image","headerLogo","SvgComponent","source","uri","backgroundChat","style","styles","headerContainer","backgroundColor","surface","shadowColor","shadow","paddingTop","children","disableRoomMenu","headerMenu","leftContainer","testID","menuButton","color","unstyled","EndIcon","icon","onPress","centerContainer","fontWeight","fontSize","text","rightContainer","profileImage","name","firstName","size","click","isClick","create","flexDirection","alignItems","paddingHorizontal","paddingBottom","minHeight","justifyContent","borderBottomLeftRadius","borderBottomRightRadius","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","zIndex","padding","borderRadius","position","left","right"],"sourceRoot":"../../../../src","sources":["components/Header/HeaderRoomList.tsx"],"mappings":";;AAAA;;AAEA,SAASA,iBAAiB,QAAQ,gCAAgC;AAClE,OAAOC,KAAK,IAAQC,OAAO,QAAQ,OAAO;AAC1C,SAASC,IAAI,EAAEC,UAAU,EAAEC,KAAK,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,uBAAuB,QAAQ,2CAA2C;AACnF,SAASC,mBAAm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,EAAE,EAAE;IACTR,UAAU,EAAE,UAAU;IACtBI,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import React, { useState, useEffect, useRef } from 'react';
|
|
4
4
|
import styled, { css } from 'styled-components/native';
|
|
5
5
|
import { TextInput, TouchableOpacity } from 'react-native';
|
|
6
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
6
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
8
|
const shouldForwardProp = prop => prop !== 'animated' && prop !== 'expanded' && prop !== 'direction';
|
|
8
9
|
const SearchInputWrapper = styled.View.withConfig({
|
|
@@ -11,7 +12,9 @@ const SearchInputWrapper = styled.View.withConfig({
|
|
|
11
12
|
position: relative;
|
|
12
13
|
flex-direction: row;
|
|
13
14
|
align-items: center;
|
|
14
|
-
background-color:
|
|
15
|
+
background-color: ${({
|
|
16
|
+
theme
|
|
17
|
+
}) => theme.surface};
|
|
15
18
|
border-radius: 16px;
|
|
16
19
|
height: 44px;
|
|
17
20
|
padding: 0 12px;
|
|
@@ -30,14 +33,18 @@ const SearchIcon = styled(TouchableOpacity)`
|
|
|
30
33
|
margin-right: 8px;
|
|
31
34
|
align-items: center;
|
|
32
35
|
justify-content: center;
|
|
33
|
-
color:
|
|
36
|
+
color: ${({
|
|
37
|
+
theme
|
|
38
|
+
}) => theme.textMuted};
|
|
34
39
|
`;
|
|
35
40
|
const StyledInput = styled(TextInput)`
|
|
36
41
|
background-color: transparent;
|
|
37
42
|
border: none;
|
|
38
43
|
flex: 1;
|
|
39
44
|
font-size: 16px;
|
|
40
|
-
color:
|
|
45
|
+
color: ${({
|
|
46
|
+
theme
|
|
47
|
+
}) => theme.text};
|
|
41
48
|
opacity: ${({
|
|
42
49
|
animated,
|
|
43
50
|
expanded
|
|
@@ -59,6 +66,7 @@ const SearchInput = ({
|
|
|
59
66
|
placeholder,
|
|
60
67
|
...props
|
|
61
68
|
}) => {
|
|
69
|
+
const theme = useTheme();
|
|
62
70
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
63
71
|
const [isTyping, setIsTyping] = useState(false);
|
|
64
72
|
const inputRef = useRef(null);
|
|
@@ -98,7 +106,8 @@ const SearchInput = ({
|
|
|
98
106
|
expanded: isExpanded,
|
|
99
107
|
onChangeText: handleInput,
|
|
100
108
|
placeholder: placeholder,
|
|
101
|
-
placeholderTextColor:
|
|
109
|
+
placeholderTextColor: theme.textMuted,
|
|
110
|
+
keyboardAppearance: theme.dark ? 'dark' : 'light',
|
|
102
111
|
...props
|
|
103
112
|
})]
|
|
104
113
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","useEffect","useRef","styled","css","TextInput","TouchableOpacity","jsx","_jsx","jsxs","_jsxs","shouldForwardProp","prop","SearchInputWrapper","View","withConfig","animated","expanded","SearchIcon","StyledInput","SearchInput","icon","direction","placeholder","props","isExpanded","setIsExpanded","isTyping","setIsTyping","inputRef","handleFocus","handleBlur","handleInput","
|
|
1
|
+
{"version":3,"names":["React","useState","useEffect","useRef","styled","css","TextInput","TouchableOpacity","useTheme","jsx","_jsx","jsxs","_jsxs","shouldForwardProp","prop","SearchInputWrapper","View","withConfig","theme","surface","animated","expanded","SearchIcon","textMuted","StyledInput","text","SearchInput","icon","direction","placeholder","props","isExpanded","setIsExpanded","isTyping","setIsTyping","inputRef","handleFocus","handleBlur","handleInput","timeout","setTimeout","current","focus","clearTimeout","onTouchStart","children","onPress","ref","onBlur","onChangeText","placeholderTextColor","keyboardAppearance","dark"],"sourceRoot":"../../../../src","sources":["components/InputComponents/Search.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAC1D,OAAOC,MAAM,IAAIC,GAAG,QAAQ,0BAA0B;AACtD,SACEC,SAAS,EAETC,gBAAgB,QAEX,cAAc;AACrB,SAASC,QAAQ,QAAQ,sBAA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;IAAI,CACK,CACb,eACDjB,IAAA,CAACc,WAAW;MACVuB,GAAG,EAAEZ,QAAS;MACda,MAAM,EAAEX,UAAW;MACnBjB,QAAQ,EAAEA,QAAS;MACnBC,QAAQ,EAAEU,UAAW;MACrBkB,YAAY,EAAEX,WAAY;MAC1BT,WAAW,EAAEA,WAAY;MACzBqB,oBAAoB,EAAEhC,KAAK,CAACK,SAAU;MACtC4B,kBAAkB,EAAEjC,KAAK,CAACkC,IAAI,GAAG,MAAM,GAAG,OAAQ;MAAA,GAC9CtB;IAAK,CACV,CAAC;EAAA,CACgB,CAAC;AAEzB,CAAC;AAED,SAASJ,WAAW","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/** @format */
|
|
4
4
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
7
|
import { CenterContainer, ChatContainerHeader, ChatContainerHeaderBoxInfo, ChatContainerHeaderInfo, ChatContainerHeaderLabel } from '../styled/StyledComponents';
|
|
7
8
|
import RoomList from './RoomList';
|
|
8
9
|
import { ProfileImagePlaceholder } from './ProfileImagePlaceholder';
|
|
@@ -19,8 +20,11 @@ import { MODAL_TYPES } from '../../helpers/constants/MODAL_TYPES';
|
|
|
19
20
|
import { RoomMenu } from '../MenuRoom/MenuRoom';
|
|
20
21
|
import { useRoomState } from '../../hooks/useRoomState';
|
|
21
22
|
import { useChatSettingState } from '../../hooks/useChatSettingState';
|
|
23
|
+
import { useFileToken } from '../../hooks/useFileToken';
|
|
24
|
+
import { appendFileToken } from '../../helpers/secureFileUrl';
|
|
22
25
|
import { View, StyleSheet, Text, Keyboard } from 'react-native';
|
|
23
26
|
import { getIconColor } from '../../helpers/getIconColor';
|
|
27
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
24
28
|
import { resolveHeaderHeight } from '../../helpers/headerLayout';
|
|
25
29
|
import { getElementFont } from '../../helpers/getElementFont';
|
|
26
30
|
import { useT } from '../../i18n/useT';
|
|
@@ -29,6 +33,7 @@ const ChatHeader = ({
|
|
|
29
33
|
currentRoom,
|
|
30
34
|
handleBackClick
|
|
31
35
|
}) => {
|
|
36
|
+
const fileToken = useFileToken();
|
|
32
37
|
const dispatch = useDispatch();
|
|
33
38
|
const {
|
|
34
39
|
client
|
|
@@ -42,6 +47,7 @@ const ChatHeader = ({
|
|
|
42
47
|
const {
|
|
43
48
|
config
|
|
44
49
|
} = useChatSettingState();
|
|
50
|
+
const theme = useTheme();
|
|
45
51
|
const t = useT();
|
|
46
52
|
const handleChangeChat = chat => {
|
|
47
53
|
dispatch(setCurrentRoom({
|
|
@@ -78,25 +84,29 @@ const ChatHeader = ({
|
|
|
78
84
|
// here so `height` defines the band exactly (content centers via the
|
|
79
85
|
// styled `align-items: center`); the styled 12px vertical padding would
|
|
80
86
|
// otherwise add on top of it.
|
|
81
|
-
const
|
|
87
|
+
const insets = useSafeAreaInsets();
|
|
88
|
+
const topInset = config?.headerLayout?.safeAreaTop ? insets.top : 0;
|
|
89
|
+
const headerHeight = resolveHeaderHeight(config?.headerLayout?.height) + topInset;
|
|
82
90
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
83
91
|
children: [/*#__PURE__*/_jsxs(ChatContainerHeader, {
|
|
84
92
|
style: {
|
|
85
93
|
height: headerHeight,
|
|
86
|
-
paddingTop:
|
|
94
|
+
paddingTop: topInset,
|
|
87
95
|
paddingBottom: 0
|
|
88
96
|
},
|
|
89
97
|
children: [handleBackClick && !config?.headerChatMenu ? /*#__PURE__*/_jsx(View, {
|
|
90
98
|
style: styles.leftContainer,
|
|
91
99
|
children: /*#__PURE__*/_jsx(Button, {
|
|
92
|
-
EndIcon: /*#__PURE__*/_jsx(BackIcon, {
|
|
100
|
+
EndIcon: /*#__PURE__*/_jsx(BackIcon, {
|
|
101
|
+
color: theme.textSecondary
|
|
102
|
+
}),
|
|
93
103
|
onPress: () => handleBackClick(false)
|
|
94
104
|
})
|
|
95
105
|
}) : !config?.disableChatHeaderBurgerMenuIcon ? /*#__PURE__*/_jsx(View, {
|
|
96
106
|
style: styles.leftContainer,
|
|
97
107
|
children: /*#__PURE__*/_jsx(Button, {
|
|
98
108
|
style: styles.menuButton,
|
|
99
|
-
color:
|
|
109
|
+
color: theme.text,
|
|
100
110
|
unstyled: true,
|
|
101
111
|
EndIcon: /*#__PURE__*/_jsx(BurgerMenuIcon, {
|
|
102
112
|
color: getIconColor(config)
|
|
@@ -133,7 +143,7 @@ const ChatHeader = ({
|
|
|
133
143
|
children: [/*#__PURE__*/_jsx(ProfileImagePlaceholder, {
|
|
134
144
|
name: currentRoom?.title || currentRoom?.name,
|
|
135
145
|
size: 40,
|
|
136
|
-
icon: currentRoom?.icon,
|
|
146
|
+
icon: appendFileToken(currentRoom?.icon, fileToken),
|
|
137
147
|
active: !config?.disableChatInfo?.disableChatHeaderMenu,
|
|
138
148
|
click: config?.disableChatInfo?.disableChatHeaderMenu ? undefined : {
|
|
139
149
|
isClick: true,
|
|
@@ -150,7 +160,9 @@ const ChatHeader = ({
|
|
|
150
160
|
children: composing ? /*#__PURE__*/_jsx(Composing, {
|
|
151
161
|
usersTyping: currentRoom?.composingList
|
|
152
162
|
}) : config?.disableUserCount ? undefined : /*#__PURE__*/_jsx(ChatContainerHeaderLabel, {
|
|
153
|
-
style: [styles.subLabel,
|
|
163
|
+
style: [styles.subLabel, {
|
|
164
|
+
color: theme.textSecondary
|
|
165
|
+
}, getElementFont(config, 'headerSubtitle')],
|
|
154
166
|
children: /*#__PURE__*/_jsx(Text, {
|
|
155
167
|
children: t(Number(currentRoom?.usersCnt) === 1 ? 'header.userCountSingular' : 'header.userCountPlural', {
|
|
156
168
|
count: Number(currentRoom?.usersCnt) || 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","CenterContainer","ChatContainerHeader","ChatContainerHeaderBoxInfo","ChatContainerHeaderInfo","ChatContainerHeaderLabel","RoomList","ProfileImagePlaceholder","Button","BackIcon","BurgerMenuIcon","CallButtons","LanguageSelectorButton","useDispatch","Composing","deleteRoom","setCurrentRoom","setIsLoading","useXmppClient","setActiveModal","MODAL_TYPES","RoomMenu","useRoomState","useChatSettingState","View","StyleSheet","Text","Keyboard","getIconColor","resolveHeaderHeight","getElementFont","useT","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ChatHeader","currentRoom","handleBackClick","dispatch","client","roomsList","activeRoomJID","jid","roomState","room","composing","config","t","handleChangeChat","chat","roomJID","chatJID","loading","handleLeaveClick","leaveTheRoomStanza","nextRoomJID","Object","keys","handleHeaderChatMenu","dismiss","headerChatMenu","openChatInfo","CHAT_PROFILE","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useSafeAreaInsets","CenterContainer","ChatContainerHeader","ChatContainerHeaderBoxInfo","ChatContainerHeaderInfo","ChatContainerHeaderLabel","RoomList","ProfileImagePlaceholder","Button","BackIcon","BurgerMenuIcon","CallButtons","LanguageSelectorButton","useDispatch","Composing","deleteRoom","setCurrentRoom","setIsLoading","useXmppClient","setActiveModal","MODAL_TYPES","RoomMenu","useRoomState","useChatSettingState","useFileToken","appendFileToken","View","StyleSheet","Text","Keyboard","getIconColor","useTheme","resolveHeaderHeight","getElementFont","useT","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ChatHeader","currentRoom","handleBackClick","fileToken","dispatch","client","roomsList","activeRoomJID","jid","roomState","room","composing","config","theme","t","handleChangeChat","chat","roomJID","chatJID","loading","handleLeaveClick","leaveTheRoomStanza","nextRoomJID","Object","keys","handleHeaderChatMenu","dismiss","headerChatMenu","openChatInfo","CHAT_PROFILE","insets","topInset","headerLayout","safeAreaTop","top","headerHeight","height","children","style","paddingTop","paddingBottom","styles","leftContainer","EndIcon","color","textSecondary","onPress","disableChatHeaderBurgerMenuIcon","menuButton","text","unstyled","minHeight","rightSpace","disableRoomConfig","leftSpace","chatHeaderBurgerMenu","chats","values","burgerMenu","onRoomClick","disabled","disableChatInfo","disableChatHeaderMenu","name","title","size","icon","active","click","undefined","isClick","numberOfLines","ellipsizeMode","fontSize","typography","headerTitle","fontWeight","usersTyping","composingList","disableUserCount","subLabel","Number","usersCnt","count","rightContainer","disableRoomMenu","chatHeaderAdditional","enabled","element","create","padding","borderRadius","backgroundColor","alignItems","width","flexDirection","justifyContent","gap","flexShrink"],"sourceRoot":"../../../../src","sources":["components/MainComponents/ChatHeader.tsx"],"mappings":";;AAAA;;AAEA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SACEC,eAAe,EACfC,mBAAmB,EACnBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,wBAAwB,QACnB,4BAA4B;AACnC,OAAOC,QAAQ,MAAM,YAAY;AAEjC,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,OAAOC,MAAM,MAAM,kBAAkB;AACrC,SAASC,QAAQ,EAAEC,cAAc,QAAQ,oBAAoB;AAC7D,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,WAAW,QAAQ,aAAa;AACzC,OAAOC,SAAS,MAAM,2CAA2C;AACjE,SACEC,UAAU,EACVC,cAAc,EACdC,YAAY,QACP,4BAA4B;AACnC,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,cAAc,QAAQ,mCAAmC;AAClE,SAASC,WAAW,QAAQ,qCAAqC;AACjE,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,IAAI,EAAEC,UAAU,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAC/D,SAASC,YAAY,QAAQ,4BAA4B;AACzD,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,SAASC,mBAAmB,QAA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W,EAAEiF,QAAQ,CAAC,IAAI;kBAAE,CAC9C;gBAAC,CACG;cAAC,CACiB;YAC3B,CACG,CAAC;UAAA,CACgB,CAAC;QAAA,CACA,CAAC;MAAA,CACd,CAAC,eAElBrF,KAAA,CAACZ,IAAI;QAACqD,KAAK,EAAEG,MAAM,CAAC2C,cAAe;QAAA/C,QAAA,gBAGjC1C,IAAA,CAACxB,sBAAsB,IAAE,CAAC,eAC1BwB,IAAA,CAACzB,WAAW,IAAE,CAAC,EACd,CAAC0C,MAAM,EAAEiD,eAAe,EAAEwB,eAAe,iBACxC1F,IAAA,CAACf,QAAQ;UAACwC,gBAAgB,EAAEA;QAAiB,CAAE,CAChD;MAAA,CACG,CAAC;IAAA,CACY,CAAC,EACrBR,MAAM,EAAE0E,oBAAoB,EAAEC,OAAO,IAClC3E,MAAM,CAAC0E,oBAAoB,CAACE,OAAO,CAAC,CAAC;EAAA,CACzC,CAAC;AAEP,CAAC;AAED,MAAM/C,MAAM,GAAGvD,UAAU,CAACuG,MAAM,CAAC;EAC/BT,QAAQ,EAAE;IACRpC,KAAK,EAAE,SAAS;IAChB6B,QAAQ,EAAE;EACZ,CAAC;EACDzB,UAAU,EAAE;IACV0C,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE;EACnB,CAAC;EACDlD,aAAa,EAAE;IACbmD,UAAU,EAAE,YAAY;IACxBC,KAAK,EAAE;EACT,CAAC;EACDV,cAAc,EAAE;IACdW,aAAa,EAAE,KAAK;IACpBF,UAAU,EAAE,QAAQ;IACpBG,cAAc,EAAE,UAAU;IAC1BC,GAAG,EAAE,CAAC;IACN;IACA;IACA;IACA;IACA;IACAC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAelG,UAAU","ignoreList":[]}
|
|
@@ -7,7 +7,7 @@ import { ChatContainer, NonRoomChat } from '../styled/StyledComponents';
|
|
|
7
7
|
import { useDispatch } from 'react-redux';
|
|
8
8
|
import MessageList from './MessageList';
|
|
9
9
|
import SendInput from '../styled/SendInput';
|
|
10
|
-
import { clearVisibleRoom, deleteRoomMessage, setEditAction, setLastViewedTimestamp, setVisibleRoom } from '../../roomStore/roomsSlice';
|
|
10
|
+
import { clearReadBoundary, clearVisibleRoom, deleteRoomMessage, setEditAction, setLastViewedTimestamp, setReadBoundary, setVisibleRoom } from '../../roomStore/roomsSlice';
|
|
11
11
|
import Loader from '../styled/Loader';
|
|
12
12
|
import { useXmppClient } from '../../context/xmppProvider';
|
|
13
13
|
import ChatHeader from './ChatHeader';
|
|
@@ -16,18 +16,22 @@ import NewChatModal from '../Modals/NewChatModal/NewChatModal';
|
|
|
16
16
|
import { EditWrapper } from './EditWrapper';
|
|
17
17
|
import { EmptyChatIllustration } from '../../assets/EmptyChatIllustration';
|
|
18
18
|
import { getIconColor } from '../../helpers/getIconColor';
|
|
19
|
+
import { getChatBackgroundColor } from '../../helpers/getChatBackground';
|
|
19
20
|
import { ChooseChatMessage } from './ChooseChatMessage';
|
|
20
21
|
import { useSendMessage } from '../../hooks/useSendMessage';
|
|
21
22
|
import { useRoomInitialization } from '../../hooks/useRoomInitialization';
|
|
22
23
|
import { useRoomState } from '../../hooks/useRoomState';
|
|
23
24
|
import { useChatSettingState } from '../../hooks/useChatSettingState';
|
|
25
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
26
|
+
import { isOwnMessage } from '../../helpers/isOwnMessage';
|
|
24
27
|
import CustomTypingIndicator from '../styled/StyledInputComponents/CustomTypingIndicator';
|
|
25
28
|
// import {PanGestureHandler} from 'react-native-gesture-handler';
|
|
26
29
|
|
|
27
|
-
import { Platform, View } from 'react-native';
|
|
30
|
+
import { AppState, Keyboard, Platform, View } from 'react-native';
|
|
28
31
|
import { KeyboardAvoidingView, KeyboardStickyView } from 'react-native-keyboard-controller';
|
|
29
32
|
import useComposing from '../../hooks/useComposing';
|
|
30
33
|
import { store } from '../../roomStore';
|
|
34
|
+
import { getFlushBoundaryTs, getReadMarkerTimestamp } from '../../helpers/getServerReadTimestamp';
|
|
31
35
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
32
36
|
import { getInputDockPaddingBottom, getKeyboardVerticalOffset } from '../../helpers/keyboardLayout';
|
|
33
37
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -45,6 +49,7 @@ const ChatRoom = /*#__PURE__*/React.memo(({
|
|
|
45
49
|
} = useXmppClient();
|
|
46
50
|
const dispatch = useDispatch();
|
|
47
51
|
const insets = useSafeAreaInsets();
|
|
52
|
+
const theme = useTheme();
|
|
48
53
|
const [isLoadingMore, setIsLoadingMore] = useState(false);
|
|
49
54
|
const {
|
|
50
55
|
user,
|
|
@@ -80,6 +85,43 @@ const ChatRoom = /*#__PURE__*/React.memo(({
|
|
|
80
85
|
sendStartComposing,
|
|
81
86
|
sendEndComposing
|
|
82
87
|
} = useComposing(configWithEventHandlers || storeConfig);
|
|
88
|
+
|
|
89
|
+
// Under the sticky keyboard strategy, the input dock's position is
|
|
90
|
+
// driven by KeyboardStickyView's native-animated offset. If the app
|
|
91
|
+
// is backgrounded while the keyboard-close animation hasn't finished,
|
|
92
|
+
// the OS removes the keyboard from the app-switcher snapshot but the
|
|
93
|
+
// shared value hasn't caught up to "closed" yet, so the input appears
|
|
94
|
+
// to float in that preview.
|
|
95
|
+
//
|
|
96
|
+
// NOTE on what this does and doesn't fix: iOS actually captures that
|
|
97
|
+
// preview during the active→inactive transition, BEFORE 'background'
|
|
98
|
+
// fires — so dismissing here on 'background' lands too late to affect
|
|
99
|
+
// the snapshot already taken, and is effectively a no-op for the exact
|
|
100
|
+
// iOS symptom in bug #37. An earlier version keyed this off 'inactive'
|
|
101
|
+
// instead, which does land in time, but 'inactive' also fires for
|
|
102
|
+
// Control Center, share sheets, and permission prompts — none of which
|
|
103
|
+
// should close the user's keyboard — so that traded a rare cosmetic
|
|
104
|
+
// preview glitch for a much more common false dismissal. Kept on
|
|
105
|
+
// 'background': it still resets the offset for genuine backgrounding
|
|
106
|
+
// (home button, app switch) and for Android's recents preview (RN's
|
|
107
|
+
// AppState has no 'inactive' there), at the cost of leaving the iOS
|
|
108
|
+
// switcher-preview glitch itself unresolved. Both symptoms are cosmetic
|
|
109
|
+
// per the QA report, which explicitly accepted leaving this imperfect
|
|
110
|
+
// rather than risk destabilizing the sticky strategy. Sticky-only;
|
|
111
|
+
// doesn't touch the other keyboard strategies.
|
|
112
|
+
const stickyInputEnabled = !configWithEventHandlers?.disableKeyboardAvoidingView && !!configWithEventHandlers?.keyboardStickyInput;
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
if (!stickyInputEnabled) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const onAppStateChange = nextState => {
|
|
118
|
+
if (nextState === 'background') {
|
|
119
|
+
Keyboard.dismiss();
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const subscription = AppState.addEventListener('change', onAppStateChange);
|
|
123
|
+
return () => subscription.remove();
|
|
124
|
+
}, [stickyInputEnabled]);
|
|
83
125
|
const sendMessage = useCallback(message => {
|
|
84
126
|
if (!activeRoomJID) {
|
|
85
127
|
return;
|
|
@@ -129,31 +171,103 @@ const ChatRoom = /*#__PURE__*/React.memo(({
|
|
|
129
171
|
useEffect(() => {
|
|
130
172
|
clientRef.current = client;
|
|
131
173
|
}, [client]);
|
|
174
|
+
|
|
175
|
+
// Tracks what the user actually saw: `null` while they're at the
|
|
176
|
+
// bottom (safe to mark everything read), or the timestamp of the
|
|
177
|
+
// newest message visible when they scrolled away from it. Reported
|
|
178
|
+
// by MessageList via onReadBoundaryChange, and mirrored into redux
|
|
179
|
+
// (`rooms.readBoundaries`) rather than kept only in a local ref - it
|
|
180
|
+
// is the single source of truth every "leaving this room" path
|
|
181
|
+
// consults (xmppProvider's AppState background handler, its
|
|
182
|
+
// `isVisible=false` handler, the live `advance()` effect, and
|
|
183
|
+
// `useChatRoomFocus`'s `leaveRoom`), not just this component's own
|
|
184
|
+
// unmount cleanup below. Without a boundary, leaving a room (or
|
|
185
|
+
// backgrounding) while scrolled up stamped `now()` (bug #33) or,
|
|
186
|
+
// after the #38 fix, the newest acked message regardless of scroll
|
|
187
|
+
// position (bug #42) - both silently discard genuinely-unread
|
|
188
|
+
// messages.
|
|
189
|
+
//
|
|
190
|
+
// MessageList reports the boundary from onScroll, which fires on
|
|
191
|
+
// every frame of a drag (the "back at the bottom" branch re-reports
|
|
192
|
+
// `null` each time). Mirror only actual CHANGES into redux: an
|
|
193
|
+
// unconditional dispatch per scroll frame would run the whole
|
|
194
|
+
// middleware chain and, worse, reset persistenceMiddleware's 200 ms
|
|
195
|
+
// debounce on every frame, starving the persisted write for as long
|
|
196
|
+
// as the user keeps scrolling.
|
|
197
|
+
const lastBoundarySentRef = useRef(null);
|
|
198
|
+
const handleReadBoundaryChange = useCallback(boundaryTs => {
|
|
199
|
+
if (!activeRoomJID) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const next = boundaryTs && boundaryTs > 0 ? boundaryTs : null;
|
|
203
|
+
if (lastBoundarySentRef.current === next) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
lastBoundarySentRef.current = next;
|
|
207
|
+
dispatch(setReadBoundary({
|
|
208
|
+
jid: activeRoomJID,
|
|
209
|
+
ts: next
|
|
210
|
+
}));
|
|
211
|
+
}, [activeRoomJID, dispatch]);
|
|
132
212
|
useEffect(() => {
|
|
133
213
|
if (!activeRoomJID) {
|
|
134
214
|
return;
|
|
135
215
|
}
|
|
216
|
+
lastBoundarySentRef.current = null;
|
|
217
|
+
dispatch(setReadBoundary({
|
|
218
|
+
jid: activeRoomJID,
|
|
219
|
+
ts: null
|
|
220
|
+
}));
|
|
136
221
|
dispatch(setVisibleRoom({
|
|
137
222
|
roomJID: activeRoomJID
|
|
138
223
|
}));
|
|
139
224
|
setIsLoadingMore(false);
|
|
140
225
|
return () => {
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
226
|
+
const state = store.getState();
|
|
227
|
+
const rooms = state.rooms?.rooms;
|
|
228
|
+
const heapState = state.roomHeapSlice;
|
|
229
|
+
const boundaryTs = state.rooms?.readBoundaries?.[activeRoomJID] ?? null;
|
|
230
|
+
// getReadMarkerTimestamp honours the boundary (the newest message
|
|
231
|
+
// the user actually reached) when one is set, and otherwise falls
|
|
232
|
+
// back to the newest server-acked message - never the device
|
|
233
|
+
// clock: a fast device clock would write a future marker that the
|
|
234
|
+
// forward-only private-store merge could never correct (bug #38).
|
|
235
|
+
const timestamp = getReadMarkerTimestamp(rooms?.[activeRoomJID], heapState, boundaryTs);
|
|
236
|
+
if (timestamp > 0) {
|
|
237
|
+
dispatch(setLastViewedTimestamp({
|
|
238
|
+
chatJID: activeRoomJID,
|
|
239
|
+
timestamp
|
|
240
|
+
}));
|
|
241
|
+
}
|
|
146
242
|
dispatch(clearVisibleRoom());
|
|
147
243
|
const liveClient = clientRef.current;
|
|
148
244
|
if (liveClient) {
|
|
149
|
-
liveClient.flushLastViewedToPrivateStoreStanza(
|
|
150
|
-
visibleRoomJID: activeRoomJID
|
|
245
|
+
liveClient.flushLastViewedToPrivateStoreStanza(rooms, {
|
|
246
|
+
visibleRoomJID: activeRoomJID,
|
|
247
|
+
// Carry the same boundary to the SERVER marker. Without
|
|
248
|
+
// this the flush defaults to "everything" for the visible
|
|
249
|
+
// room, so messages the user never scrolled down to come
|
|
250
|
+
// back as read on the next login - the local count was
|
|
251
|
+
// right but the server overrode it.
|
|
252
|
+
// Clamped through the same helper as the local stamp -
|
|
253
|
+
// an unclamped boundary would bypass the newest-acked
|
|
254
|
+
// ceiling on the one path where a bad value is permanent
|
|
255
|
+
// (the private-store merge is forward-only, bug #38).
|
|
256
|
+
visibleRoomTs: getFlushBoundaryTs(rooms?.[activeRoomJID], heapState, boundaryTs)
|
|
151
257
|
}).catch(() => {});
|
|
152
258
|
}
|
|
153
259
|
dispatch(deleteRoomMessage({
|
|
154
260
|
roomJID: activeRoomJID,
|
|
155
261
|
messageId: 'delimiter-new'
|
|
156
262
|
}));
|
|
263
|
+
// The room is genuinely being left (unmount, or activeRoomJID
|
|
264
|
+
// changed to a different room) - release the boundary now that
|
|
265
|
+
// it's been consumed, so a stale value can't leak into the next
|
|
266
|
+
// time this room becomes visible.
|
|
267
|
+
dispatch(clearReadBoundary({
|
|
268
|
+
jid: activeRoomJID
|
|
269
|
+
}));
|
|
270
|
+
lastBoundarySentRef.current = null;
|
|
157
271
|
setIsLoadingMore(false);
|
|
158
272
|
};
|
|
159
273
|
}, [activeRoomJID, dispatch]);
|
|
@@ -177,7 +291,9 @@ const ChatRoom = /*#__PURE__*/React.memo(({
|
|
|
177
291
|
});
|
|
178
292
|
const inputDockPaddingBottom = getInputDockPaddingBottom({
|
|
179
293
|
platform: Platform.OS,
|
|
180
|
-
bottomInset: insets.bottom
|
|
294
|
+
bottomInset: insets.bottom,
|
|
295
|
+
configuredPadding: configWithEventHandlers?.inputDockPaddingBottom,
|
|
296
|
+
hostOwnsLayout: !!configWithEventHandlers?.disableKeyboardAvoidingView
|
|
181
297
|
});
|
|
182
298
|
|
|
183
299
|
// Keyboard avoidance is delegated to react-native-keyboard-controller's
|
|
@@ -225,9 +341,22 @@ const ChatRoom = /*#__PURE__*/React.memo(({
|
|
|
225
341
|
// a KeyboardStickyView so it (and only it) lifts with the keyboard.
|
|
226
342
|
const InputDockTag = stickyInput ? KeyboardStickyView : View;
|
|
227
343
|
const inputDockProps = {
|
|
344
|
+
// The dock carries the composer's white surface all the way to the
|
|
345
|
+
// bottom edge, so it needs the same rounded top and upward shadow —
|
|
346
|
+
// a square white block behind a rounded composer just hid the corners.
|
|
228
347
|
style: {
|
|
229
348
|
paddingBottom: inputDockPaddingBottom,
|
|
230
|
-
backgroundColor:
|
|
349
|
+
backgroundColor: theme.surface,
|
|
350
|
+
borderTopLeftRadius: 20,
|
|
351
|
+
borderTopRightRadius: 20,
|
|
352
|
+
shadowColor: theme.shadow,
|
|
353
|
+
shadowOffset: {
|
|
354
|
+
width: 0,
|
|
355
|
+
height: -4
|
|
356
|
+
},
|
|
357
|
+
shadowOpacity: 0.06,
|
|
358
|
+
shadowRadius: 12,
|
|
359
|
+
elevation: 8
|
|
231
360
|
},
|
|
232
361
|
...(stickyInput ? {
|
|
233
362
|
offset: {
|
|
@@ -238,8 +367,14 @@ const ChatRoom = /*#__PURE__*/React.memo(({
|
|
|
238
367
|
};
|
|
239
368
|
return /*#__PURE__*/_jsx(KeyboardWrapper, {
|
|
240
369
|
...keyboardWrapperProps,
|
|
241
|
-
children: /*#__PURE__*/_jsxs(ChatContainer
|
|
242
|
-
|
|
370
|
+
children: /*#__PURE__*/_jsxs(ChatContainer
|
|
371
|
+
// The conversation's own colour, not white: the header's rounded
|
|
372
|
+
// bottom corners and the composer's rounded top corners reveal
|
|
373
|
+
// THIS view, so a white parent made both look square.
|
|
374
|
+
, {
|
|
375
|
+
style: [{
|
|
376
|
+
backgroundColor: getChatBackgroundColor(configWithEventHandlers)
|
|
377
|
+
}, configWithEventHandlers?.chatRoomStyles],
|
|
243
378
|
children: [!configWithEventHandlers?.disableHeader && /*#__PURE__*/_jsx(ChatHeader, {
|
|
244
379
|
currentRoom: roomsList[activeRoomJID],
|
|
245
380
|
handleBackClick: handleBackClick
|
|
@@ -263,14 +398,17 @@ const ChatRoom = /*#__PURE__*/React.memo(({
|
|
|
263
398
|
alignItems: 'center'
|
|
264
399
|
},
|
|
265
400
|
children: /*#__PURE__*/_jsx(EmptyChatIllustration, {
|
|
266
|
-
color: getIconColor(configWithEventHandlers)
|
|
401
|
+
color: getIconColor(configWithEventHandlers),
|
|
402
|
+
panelColor: theme.dark ? theme.surfaceSecondary : undefined
|
|
267
403
|
})
|
|
268
404
|
}) : !roomMessages || roomMessages.length === 0 ? /*#__PURE__*/_jsx(View, {
|
|
269
405
|
style: {
|
|
270
406
|
flex: 1,
|
|
271
407
|
justifyContent: 'center',
|
|
272
408
|
alignItems: 'center',
|
|
273
|
-
|
|
409
|
+
// Empty rooms used to flip to white, which broke the
|
|
410
|
+
// header's rounded corners in exactly the same way.
|
|
411
|
+
backgroundColor: getChatBackgroundColor(configWithEventHandlers)
|
|
274
412
|
},
|
|
275
413
|
children: /*#__PURE__*/_jsx(NoMessagesPlaceholder, {})
|
|
276
414
|
}) : CustomScrollableArea ? /*#__PURE__*/_jsx(CustomScrollableArea, {
|
|
@@ -285,7 +423,7 @@ const ChatRoom = /*#__PURE__*/React.memo(({
|
|
|
285
423
|
loadMoreMessages: loadMoreMessages,
|
|
286
424
|
renderMessage: decorated => CustomMessageComponent ? /*#__PURE__*/_jsx(CustomMessageComponent, {
|
|
287
425
|
message: decorated.message,
|
|
288
|
-
isUser: decorated.message
|
|
426
|
+
isUser: isOwnMessage(decorated.message, user),
|
|
289
427
|
isReply: false
|
|
290
428
|
}) : null,
|
|
291
429
|
scrollController: {
|
|
@@ -310,7 +448,8 @@ const ChatRoom = /*#__PURE__*/React.memo(({
|
|
|
310
448
|
roomJID: activeRoomJID,
|
|
311
449
|
config: configWithEventHandlers,
|
|
312
450
|
loading: isLoadingMore,
|
|
313
|
-
isReply: false
|
|
451
|
+
isReply: false,
|
|
452
|
+
onReadBoundaryChange: handleReadBoundaryChange
|
|
314
453
|
})
|
|
315
454
|
}), editAction && editAction.isEdit && /*#__PURE__*/_jsx(EditWrapper, {
|
|
316
455
|
text: editAction.text || '',
|