@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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.secureUserStorage = secureUserStorage;
|
|
7
|
+
var _useLocalStorage = require("../hooks/useLocalStorage");
|
|
8
|
+
var _LOCAL_STORAGE = require("./constants/LOCAL_STORAGE");
|
|
9
|
+
var _secureKeyValue = require("./secureKeyValue");
|
|
10
|
+
// Keychain (iOS) / Keystore-backed EncryptedSharedPreferences (Android)
|
|
11
|
+
// keys for the four live bearer credentials on `User`. Deliberately one
|
|
12
|
+
// key per field rather than one JSON blob: expo-secure-store historically
|
|
13
|
+
// caps a single value's size on Android, and four short JWTs each stay
|
|
14
|
+
// comfortably under that ceiling where one combined blob might not.
|
|
15
|
+
const SECRET_KEYS = {
|
|
16
|
+
token: 'ethora_auth_token',
|
|
17
|
+
refreshToken: 'ethora_auth_refresh_token',
|
|
18
|
+
xmppPassword: 'ethora_auth_xmpp_password',
|
|
19
|
+
fileToken: 'ethora_auth_file_token'
|
|
20
|
+
};
|
|
21
|
+
const SECRET_FIELDS = Object.keys(SECRET_KEYS);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Persisted-user storage, split across two backends behind the exact
|
|
25
|
+
* same `{ get, set, remove }` shape `asyncLocalStorage<User>(...)`
|
|
26
|
+
* already exposed — every existing call site swaps in by changing only
|
|
27
|
+
* the constructor call, `get()`/`set()`/`remove()` keep returning/taking
|
|
28
|
+
* a complete `User`.
|
|
29
|
+
*
|
|
30
|
+
* The four live credentials (REST access + refresh token, XMPP
|
|
31
|
+
* password, secure-media fileToken) never touch plain AsyncStorage:
|
|
32
|
+
* they go through `secureGet`/`secureSet`/`secureRemove` (platform
|
|
33
|
+
* Keychain/Keystore, falling back to namespaced AsyncStorage only when
|
|
34
|
+
* the host hasn't installed the optional `expo-secure-store` peer dep).
|
|
35
|
+
* Everything else on `User` — name, avatar, ids, xmppUsername, wallet
|
|
36
|
+
* address, none of it a bearer credential — keeps living under the
|
|
37
|
+
* existing `ETHORA_USER` AsyncStorage key, unchanged.
|
|
38
|
+
*/
|
|
39
|
+
function secureUserStorage() {
|
|
40
|
+
const get = async () => {
|
|
41
|
+
const profile = await (0, _useLocalStorage.asyncLocalStorage)(_LOCAL_STORAGE.localStorageConstants.ETHORA_USER).get();
|
|
42
|
+
if (!profile) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
const secretValues = await Promise.all(SECRET_FIELDS.map(field => (0, _secureKeyValue.secureGet)(SECRET_KEYS[field])));
|
|
46
|
+
const merged = {
|
|
47
|
+
...profile
|
|
48
|
+
};
|
|
49
|
+
SECRET_FIELDS.forEach((field, i) => {
|
|
50
|
+
merged[field] = secretValues[i] || '';
|
|
51
|
+
});
|
|
52
|
+
return merged;
|
|
53
|
+
};
|
|
54
|
+
const set = async user => {
|
|
55
|
+
const profile = {
|
|
56
|
+
...user
|
|
57
|
+
};
|
|
58
|
+
for (const field of SECRET_FIELDS) {
|
|
59
|
+
profile[field] = '';
|
|
60
|
+
}
|
|
61
|
+
await Promise.all([(0, _useLocalStorage.asyncLocalStorage)(_LOCAL_STORAGE.localStorageConstants.ETHORA_USER).set(profile), ...SECRET_FIELDS.map(field => {
|
|
62
|
+
const value = user?.[field];
|
|
63
|
+
return value ? (0, _secureKeyValue.secureSet)(SECRET_KEYS[field], value) : (0, _secureKeyValue.secureRemove)(SECRET_KEYS[field]);
|
|
64
|
+
})]);
|
|
65
|
+
};
|
|
66
|
+
const remove = async () => {
|
|
67
|
+
await Promise.all([(0, _useLocalStorage.asyncLocalStorage)(_LOCAL_STORAGE.localStorageConstants.ETHORA_USER).remove(), ...SECRET_FIELDS.map(field => (0, _secureKeyValue.secureRemove)(SECRET_KEYS[field]))]);
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
get,
|
|
71
|
+
set,
|
|
72
|
+
remove
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=secureUserStorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_useLocalStorage","require","_LOCAL_STORAGE","_secureKeyValue","SECRET_KEYS","token","refreshToken","xmppPassword","fileToken","SECRET_FIELDS","Object","keys","secureUserStorage","get","profile","asyncLocalStorage","localStorageConstants","ETHORA_USER","secretValues","Promise","all","map","field","secureGet","merged","forEach","i","set","user","value","secureSet","secureRemove","remove"],"sourceRoot":"../../../src","sources":["helpers/secureUserStorage.ts"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMG,WAAW,GAAG;EAClBC,KAAK,EAAE,mBAAmB;EAC1BC,YAAY,EAAE,2BAA2B;EACzCC,YAAY,EAAE,2BAA2B;EACzCC,SAAS,EAAE;AACb,CAAU;AAGV,MAAM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AC1B,WAAW,CAACkB,KAAK,CAAC,EAAEO,KAAK,CAAC,GACpC,IAAAE,4BAAY,EAAC3B,WAAW,CAACkB,KAAK,CAAC,CAAC;IACtC,CAAC,CAAC,CACH,CAAC;EACJ,CAAC;EAED,MAAMU,MAAM,GAAG,MAAAA,CAAA,KAA2B;IACxC,MAAMb,OAAO,CAACC,GAAG,CAAC,CAChB,IAAAL,kCAAiB,EAACC,oCAAqB,CAACC,WAAW,CAAC,CAACe,MAAM,CAAC,CAAC,EAC7D,GAAGvB,aAAa,CAACY,GAAG,CAAEC,KAAK,IAAK,IAAAS,4BAAY,EAAC3B,WAAW,CAACkB,KAAK,CAAC,CAAC,CAAC,CAClE,CAAC;EACJ,CAAC;EAED,OAAO;IAAET,GAAG;IAAEc,GAAG;IAAEK;EAAO,CAAC;AAC7B","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
exports.shallowEqual = shallowEqual;
|
|
8
|
+
/**
|
|
9
|
+
* One-level shallow equality for plain objects. Used to avoid re-dispatching
|
|
10
|
+
* config into redux on every render just because the host passed a fresh
|
|
11
|
+
* object literal with the same values (e.g. `<Chat config={{...}} />`
|
|
12
|
+
* re-created inline) — reference equality alone would fire far too often,
|
|
13
|
+
* and a deep/JSON comparison risks throwing on non-serializable fields
|
|
14
|
+
* (functions, React elements) that configs legitimately carry.
|
|
15
|
+
*/
|
|
16
|
+
function shallowEqual(a, b) {
|
|
17
|
+
if (a === b) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
if (typeof a !== 'object' || typeof b !== 'object' || a === null || b === null) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
const aKeys = Object.keys(a);
|
|
24
|
+
const bKeys = Object.keys(b);
|
|
25
|
+
if (aKeys.length !== bKeys.length) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
for (const key of aKeys) {
|
|
29
|
+
if (a[key] !== b[key]) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
var _default = exports.default = shallowEqual;
|
|
36
|
+
//# sourceMappingURL=shallowEqual.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["shallowEqual","a","b","aKeys","Object","keys","bKeys","length","key","_default","exports","default"],"sourceRoot":"../../../src","sources":["helpers/shallowEqual.ts"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,YAAYA,CAACC,CAAU,EAAEC,CAAU,EAAW;EAC5D,IAAID,CAAC,KAAKC,CAAC,EAAE;IAAC,OAAO,IAAI;EAAC;EAC1B,IACE,OAAOD,CAAC,KAAK,QAAQ,IACrB,OAAOC,CAAC,KAAK,QAAQ,IACrBD,CAAC,KAAK,IAAI,IACVC,CAAC,KAAK,IAAI,EACV;IACA,OAAO,KAAK;EACd;EACA,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACJ,CAA4B,CAAC;EACvD,MAAMK,KAAK,GAAGF,MAAM,CAACC,IAAI,CAACH,CAA4B,CAAC;EACvD,IAAIC,KAAK,CAACI,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE;IAAC,OAAO,KAAK;EAAC;EACjD,KAAK,MAAMC,GAAG,IAAIL,KAAK,EAAE;IACvB,IACGF,CAAC,CAA6BO,GAAG,CAAC,KAClCN,CAAC,CAA6BM,GAAG,CAAC,EACnC;MACA,OAAO,KAAK;IACd;EACF;EACA,OAAO,IAAI;AACb;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcX,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.shouldDismissOnDrag = exports.shouldClaimVerticalDrag = exports.DISMISS_VELOCITY = exports.DISMISS_DISTANCE = void 0;
|
|
7
|
+
/** @format */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Shared thresholds for the drag-to-dismiss gesture on bottom sheets (the
|
|
11
|
+
* attach sheet, the profile headers, the room-list menu). Kept in one
|
|
12
|
+
* place so a pull feels identical wherever the user does it — and so the
|
|
13
|
+
* numbers are unit-testable without a touch event.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** Drag past this many points and letting go dismisses the sheet. */
|
|
17
|
+
const DISMISS_DISTANCE = exports.DISMISS_DISTANCE = 90;
|
|
18
|
+
/** …or flick faster than this, however short the drag. */
|
|
19
|
+
const DISMISS_VELOCITY = exports.DISMISS_VELOCITY = 0.8;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Claim a drag only once it is clearly a downward pull, so a tap on a row
|
|
23
|
+
* still registers and a horizontal swipe stays with whatever scrolls
|
|
24
|
+
* sideways inside the sheet.
|
|
25
|
+
*/
|
|
26
|
+
const shouldClaimVerticalDrag = (dy, dx) => dy > 6 && Math.abs(dy) > Math.abs(dx) * 1.5;
|
|
27
|
+
|
|
28
|
+
/** Far enough / fast enough to let go of the sheet. */
|
|
29
|
+
exports.shouldClaimVerticalDrag = shouldClaimVerticalDrag;
|
|
30
|
+
const shouldDismissOnDrag = (dy, vy) => dy > DISMISS_DISTANCE || vy > DISMISS_VELOCITY;
|
|
31
|
+
exports.shouldDismissOnDrag = shouldDismissOnDrag;
|
|
32
|
+
//# sourceMappingURL=sheetGestures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DISMISS_DISTANCE","exports","DISMISS_VELOCITY","shouldClaimVerticalDrag","dy","dx","Math","abs","shouldDismissOnDrag","vy"],"sourceRoot":"../../../src","sources":["helpers/sheetGestures.ts"],"mappings":";;;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,EAAE;AAClC;AACO,MAAME,gBAAgB,GAAAD,OAAA,CAAAC,gBAAA,GAAG,GAAG;;AAEnC;AACA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAGA,CAACC,EAAU,EAAEC,EAAU,KAC5DD,EAAE,GAAG,CAAC,IAAIE,IAAI,CAACC,GAAG,CAACH,EAAE,CAAC,GAAGE,IAAI,CAACC,GAAG,CAACF,EAAE,CAAC,GAAG,GAAG;;AAE7C;AAAAJ,OAAA,CAAAE,uBAAA,GAAAA,uBAAA;AACO,MAAMK,mBAAmB,GAAGA,CAACJ,EAAU,EAAEK,EAAU,KACxDL,EAAE,GAAGJ,gBAAgB,IAAIS,EAAE,GAAGP,gBAAgB;AAACD,OAAA,CAAAO,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ var _react = require("react");
|
|
|
8
8
|
var _reactRedux = require("react-redux");
|
|
9
9
|
var _roomsSlice = require("../roomStore/roomsSlice");
|
|
10
10
|
var _roomStore = require("../roomStore");
|
|
11
|
+
var _getServerReadTimestamp = require("../helpers/getServerReadTimestamp");
|
|
11
12
|
/**
|
|
12
13
|
* Public hook for consumers embedding `<ChatRoom>` inside a tab-based
|
|
13
14
|
* navigator. Mirrors the mount/unmount unread-tracking that ChatRoom
|
|
@@ -18,7 +19,10 @@ var _roomStore = require("../roomStore");
|
|
|
18
19
|
* Without this hook, `useUnread()` will always return 0 for the chat
|
|
19
20
|
* room because the SDK assumes "mounted == active". With this hook,
|
|
20
21
|
* focus marks the room visible (clearing the badge) and blur stamps
|
|
21
|
-
* `lastViewedTimestamp
|
|
22
|
+
* `lastViewedTimestamp` to the newest SERVER-acknowledged message so
|
|
23
|
+
* future messages count as unread. Deliberately not `Date.now()`: a
|
|
24
|
+
* device clock running ahead would write a future marker that the
|
|
25
|
+
* forward-only private-store merge could never correct again (bug #38).
|
|
22
26
|
*
|
|
23
27
|
* Usage with React Navigation:
|
|
24
28
|
*
|
|
@@ -43,22 +47,51 @@ const useChatRoomFocus = ({
|
|
|
43
47
|
roomJID: null,
|
|
44
48
|
isFocused: false
|
|
45
49
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
|
|
51
|
+
// `clearBoundary`: pass true only when the room the user is leaving is
|
|
52
|
+
// genuinely being released (switching to a different room, or this
|
|
53
|
+
// hook unmounting) - not on a mere same-room blur. `<ChatRoom>`'s
|
|
54
|
+
// MessageList typically stays mounted across a same-room focus loss
|
|
55
|
+
// (the whole point of this hook is that the host keeps `<Chat>`
|
|
56
|
+
// mounted in a hidden tab), so its own scroll-tracking ref is still
|
|
57
|
+
// intact and the redux boundary must stay in sync with it - clearing
|
|
58
|
+
// it here would desync the two.
|
|
59
|
+
const leaveRoom = (jid, clearBoundary) => {
|
|
60
|
+
const state = _roomStore.store.getState();
|
|
61
|
+
const rooms = state.rooms?.rooms;
|
|
62
|
+
const boundaryTs = state.rooms?.readBoundaries?.[jid] ?? null;
|
|
63
|
+
// getReadMarkerTimestamp: honour the boundary (the newest message the
|
|
64
|
+
// user actually reached) when the user left this room scrolled up,
|
|
65
|
+
// otherwise fall back to the newest server-acked message. Only stamp
|
|
66
|
+
// when we actually have something to anchor to - skip rather than
|
|
67
|
+
// fall back to the device clock (bug #38). Ignoring the boundary here
|
|
68
|
+
// would stamp "everything read" regardless of scroll position (bug
|
|
69
|
+
// #42, a regression of #33 reintroduced by #38).
|
|
70
|
+
const timestamp = (0, _getServerReadTimestamp.getReadMarkerTimestamp)(rooms?.[jid], state.roomHeapSlice, boundaryTs);
|
|
71
|
+
if (timestamp > 0) {
|
|
72
|
+
dispatch((0, _roomsSlice.setLastViewedTimestamp)({
|
|
73
|
+
chatJID: jid,
|
|
74
|
+
timestamp
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
52
77
|
dispatch((0, _roomsSlice.clearVisibleRoom)());
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
78
|
+
state.chatSettingStore?.client?.flushLastViewedToPrivateStoreStanza(rooms, {
|
|
79
|
+
visibleRoomJID: jid,
|
|
80
|
+
// Carry the same boundary to the SERVER marker - without it the
|
|
81
|
+
// flush defaults to "everything" for the visible room. Clamped
|
|
82
|
+
// through the same helper as the local stamp above.
|
|
83
|
+
visibleRoomTs: (0, _getServerReadTimestamp.getFlushBoundaryTs)(rooms?.[jid], state.roomHeapSlice, boundaryTs)
|
|
56
84
|
}).catch(() => {});
|
|
85
|
+
if (clearBoundary) {
|
|
86
|
+
dispatch((0, _roomsSlice.clearReadBoundary)({
|
|
87
|
+
jid
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
57
90
|
};
|
|
58
91
|
(0, _react.useEffect)(() => {
|
|
59
92
|
const prev = prevRef.current;
|
|
60
93
|
if (prev.isFocused && prev.roomJID && (prev.roomJID !== roomJID || !isFocused)) {
|
|
61
|
-
leaveRoom(prev.roomJID);
|
|
94
|
+
leaveRoom(prev.roomJID, prev.roomJID !== roomJID);
|
|
62
95
|
}
|
|
63
96
|
if (roomJID && isFocused) {
|
|
64
97
|
dispatch((0, _roomsSlice.setCurrentRoom)({
|
|
@@ -77,7 +110,7 @@ const useChatRoomFocus = ({
|
|
|
77
110
|
return () => {
|
|
78
111
|
const prev = prevRef.current;
|
|
79
112
|
if (prev.isFocused && prev.roomJID) {
|
|
80
|
-
leaveRoom(prev.roomJID);
|
|
113
|
+
leaveRoom(prev.roomJID, true);
|
|
81
114
|
}
|
|
82
115
|
};
|
|
83
116
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactRedux","_roomsSlice","_roomStore","useChatRoomFocus","roomJID","isFocused","dispatch","useDispatch","prevRef","useRef","leaveRoom","jid","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactRedux","_roomsSlice","_roomStore","_getServerReadTimestamp","useChatRoomFocus","roomJID","isFocused","dispatch","useDispatch","prevRef","useRef","leaveRoom","jid","clearBoundary","state","store","getState","rooms","boundaryTs","readBoundaries","timestamp","getReadMarkerTimestamp","roomHeapSlice","setLastViewedTimestamp","chatJID","clearVisibleRoom","chatSettingStore","client","flushLastViewedToPrivateStoreStanza","visibleRoomJID","visibleRoomTs","getFlushBoundaryTs","catch","clearReadBoundary","useEffect","prev","current","setCurrentRoom","setVisibleRoom","exports","_default","default"],"sourceRoot":"../../../src","sources":["hooks/useChatRoomFocus.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAOA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAJ,OAAA;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,gBAAgB,GAAGA,CAAC;EAC/BC,OAAO;EACPC;AACuB,CAAC,KAAK;EAC7B,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,EAAC,CAAC;EAC9B,MAAMC,OAAO,GAAG,IAAAC,aAAM,EAAiD;IACrEL,OAAO,EAAE,IAAI;IACbC,SAAS,EAAE;EACb,CAAC,CAAC;;EAEF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,MAAMK,SAAS,GAAGA,CAACC,GAAW,EAAEC,aAAsB,KAAK;IACzD,MAAMC,KAAK,GAAGC,gBAAK,CAACC,QAAQ,CAAC,CAAC;IAC9B,MAAMC,KAAK,GAAGH,KAAK,CAACG,KAAK,EAAEA,KAAK;IAChC,MAAMC,UAAU,GAAGJ,KAAK,CAACG,KAAK,EAAEE,cAAc,GAAGP,GAAG,CAAC,IAAI,IAAI;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AEjC;MAAQ,CAAC,CAAC,CAAC;IACvC;IAEAI,OAAO,CAAC2B,OAAO,GAAG;MAAE/B,OAAO,EAAEA,OAAO,IAAI,IAAI;MAAEC;IAAU,CAAC;EAC3D,CAAC,EAAE,CAACD,OAAO,EAAEC,SAAS,EAAEC,QAAQ,CAAC,CAAC;EAElC,IAAA2B,gBAAS,EAAC,MAAM;IACd,OAAO,MAAM;MACX,MAAMC,IAAI,GAAG1B,OAAO,CAAC2B,OAAO;MAC5B,IAAID,IAAI,CAAC7B,SAAS,IAAI6B,IAAI,CAAC9B,OAAO,EAAE;QAClCM,SAAS,CAACwB,IAAI,CAAC9B,OAAO,EAAE,IAAI,CAAC;MAC/B;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAACkC,OAAA,CAAAnC,gBAAA,GAAAA,gBAAA;AAAA,IAAAoC,QAAA,GAAAD,OAAA,CAAAE,OAAA,GAEarC,gBAAgB","ignoreList":[]}
|
|
@@ -10,9 +10,8 @@ var _resolveLangSource = require("../helpers/resolveLangSource");
|
|
|
10
10
|
var _xmppProvider = require("../context/xmppProvider");
|
|
11
11
|
var _chatAutoEnterer = require("../helpers/chatAutoEnterer");
|
|
12
12
|
var _initRoomsPresence = require("../helpers/initRoomsPresence");
|
|
13
|
-
var _updatedChatLastTimestamps = require("../helpers/updatedChatLastTimestamps");
|
|
14
13
|
var _updateMessagesTillLast = require("../helpers/updateMessagesTillLast");
|
|
15
|
-
var
|
|
14
|
+
var _authRefresh = require("../networking/authRefresh");
|
|
16
15
|
var _chatSettingsSlice = require("../roomStore/chatSettingsSlice");
|
|
17
16
|
var _roomsSlice = require("../roomStore/roomsSlice");
|
|
18
17
|
var _useRoomState = require("./useRoomState");
|
|
@@ -20,6 +19,7 @@ var _useChatSettingState = require("./useChatSettingState");
|
|
|
20
19
|
var _isChatIdPresentInArray = require("../helpers/isChatIdPresentInArray");
|
|
21
20
|
var _useGetNewArchRoom = _interopRequireDefault(require("./useGetNewArchRoom"));
|
|
22
21
|
var _getRoomsWithRetry = require("../helpers/getRoomsWithRetry");
|
|
22
|
+
var _shallowEqual = require("../helpers/shallowEqual");
|
|
23
23
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
24
|
/** @format */
|
|
25
25
|
|
|
@@ -58,6 +58,20 @@ const useChatWrapperInit = ({
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}, [user.xmppPassword]);
|
|
61
|
+
|
|
62
|
+
// Presentational config flags (e.g. `disableHeader`) can change while the
|
|
63
|
+
// chat stays mounted — sync them to redux whenever `config` actually
|
|
64
|
+
// changes, not just at init. Shallow-equal guard: an inline object
|
|
65
|
+
// literal from the host is a fresh reference every render even when
|
|
66
|
+
// nothing in it changed, and dispatching unconditionally would re-render
|
|
67
|
+
// every config consumer on every host render.
|
|
68
|
+
const lastSyncedConfigRef = (0, _react.useRef)(undefined);
|
|
69
|
+
(0, _react.useEffect)(() => {
|
|
70
|
+
if (!(0, _shallowEqual.shallowEqual)(lastSyncedConfigRef.current, config)) {
|
|
71
|
+
lastSyncedConfigRef.current = config;
|
|
72
|
+
dispatch((0, _chatSettingsSlice.setConfig)(config));
|
|
73
|
+
}
|
|
74
|
+
}, [config, dispatch]);
|
|
61
75
|
const getRoomsWithRertyRequest = async () => {
|
|
62
76
|
setIsRetrying(true);
|
|
63
77
|
const retryRooms = await (0, _getRoomsWithRetry.getRoomsWithRetry)(client, config, syncRooms, roomJID);
|
|
@@ -128,11 +142,17 @@ const useChatWrapperInit = ({
|
|
|
128
142
|
}
|
|
129
143
|
}
|
|
130
144
|
try {
|
|
145
|
+
// getChatsPrivateStoreRequestStanza hydrates redux itself
|
|
146
|
+
// (dispatch(applyPrivateStoreMarkers(...)) internally,
|
|
147
|
+
// clamped + forward-only) - do not also apply the raw
|
|
148
|
+
// return value here. That used to double-dispatch via
|
|
149
|
+
// updatedChatLastTimestamps' unconditional
|
|
150
|
+
// setLastViewedTimestamp, which has neither the
|
|
151
|
+
// forward-only guard nor the future-marker clamp, so on
|
|
152
|
+
// every reconnect it could silently re-clobber a value
|
|
153
|
+
// the clamp had just corrected (bug #38).
|
|
131
154
|
const roomTimestampObject = await newClient.getChatsPrivateStoreRequestStanza();
|
|
132
155
|
console.log('Got chats private store', roomTimestampObject?.length || 0);
|
|
133
|
-
if (roomTimestampObject) {
|
|
134
|
-
(0, _updatedChatLastTimestamps.updatedChatLastTimestamps)(roomTimestampObject, dispatch);
|
|
135
|
-
}
|
|
136
156
|
if (!hasSyncedHistoryRef.current) {
|
|
137
157
|
console.log('Updating messages till last');
|
|
138
158
|
await (0, _updateMessagesTillLast.updateMessagesTillLast)(rooms, newClient);
|
|
@@ -147,7 +167,7 @@ const useChatWrapperInit = ({
|
|
|
147
167
|
setConnectionLost(false);
|
|
148
168
|
}
|
|
149
169
|
{
|
|
150
|
-
config?.refreshTokens?.enabled && (0,
|
|
170
|
+
config?.refreshTokens?.enabled && (0, _authRefresh.refreshAuthTokensQuietly)();
|
|
151
171
|
}
|
|
152
172
|
} catch (error) {
|
|
153
173
|
console.error(' Error during initialization', error);
|
|
@@ -167,11 +187,11 @@ const useChatWrapperInit = ({
|
|
|
167
187
|
setInited(true);
|
|
168
188
|
console.log(' Getting chats private store for existing client');
|
|
169
189
|
try {
|
|
190
|
+
// See the "new client" branch above: getChatsPrivateStoreRequestStanza
|
|
191
|
+
// already hydrates redux (clamped + forward-only); do not
|
|
192
|
+
// also apply the raw return value here.
|
|
170
193
|
const roomTimestampObject = await client.getChatsPrivateStoreRequestStanza();
|
|
171
194
|
console.log('Got chats private store for existing client', roomTimestampObject?.length || 0);
|
|
172
|
-
if (roomTimestampObject) {
|
|
173
|
-
(0, _updatedChatLastTimestamps.updatedChatLastTimestamps)(roomTimestampObject, dispatch);
|
|
174
|
-
}
|
|
175
195
|
if (!hasSyncedHistoryRef.current) {
|
|
176
196
|
console.log('Updating messages till last for existing client');
|
|
177
197
|
await (0, _updateMessagesTillLast.updateMessagesTillLast)(rooms, client);
|
|
@@ -186,7 +206,7 @@ const useChatWrapperInit = ({
|
|
|
186
206
|
setConnectionLost(false);
|
|
187
207
|
}
|
|
188
208
|
{
|
|
189
|
-
config?.refreshTokens?.enabled && (0,
|
|
209
|
+
config?.refreshTokens?.enabled && (0, _authRefresh.refreshAuthTokensQuietly)();
|
|
190
210
|
}
|
|
191
211
|
}
|
|
192
212
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactRedux","_resolveLangSource","_xmppProvider","_chatAutoEnterer","_initRoomsPresence","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactRedux","_resolveLangSource","_xmppProvider","_chatAutoEnterer","_initRoomsPresence","_updateMessagesTillLast","_authRefresh","_chatSettingsSlice","_roomsSlice","_useRoomState","_useChatSettingState","_isChatIdPresentInArray","_useGetNewArchRoom","_interopRequireDefault","_getRoomsWithRetry","_shallowEqual","e","__esModule","default","useChatWrapperInit","roomJID","wasAutoSelected","config","dispatch","useDispatch","inited","setInited","useState","showModal","setShowModal","isConnectionLost","setConnectionLost","isRetrying","setIsRetrying","hasSyncedHistoryRef","useRef","client","initializeClient","setClient","useXmppClient","syncRooms","useGetNewArchRoom","rooms","useSelector","state","roomsList","useRoomState","user","useChatSettingState","useEffect","xmppPassword","console","log","close","lastSyncedConfigRef","undefined","shallowEqual","current","setConfig","getRoomsWithRertyRequest","retryRooms","getRoomsWithRetry","loadRooms","disableLoad","setIsLoading","loading","loadingText","retryTimeout","initXmmpClient","legacyLangSource","resolveLegacyTranslatesLangSource","translates","setLangSource","xmppUsername","error","chatAutoEnterer","newClient","defaultWallet","walletAddress","xmppSettings","status","Object","keys","length","initRoomsPresence","newArch","loadedRooms","enableRoomsRetry","enabled","isSelectedRoomPresent","isChatIdPresentInArray","getRoomsStanza","roomTimestampObject","getChatsPrivateStoreRequestStanza","updateMessagesTillLast","err","warn","refreshTokens","refreshAuthTokensQuietly","setTimeout","clearTimeout","_default","exports"],"sourceRoot":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AC,KAAK,CAAC;QACnBE,iBAAiB,CAAC,IAAI,CAAC;QACvBL,SAAS,CAAC,KAAK,CAAC;QAChBH,QAAQ,CAAC,IAAAyC,wBAAY,EAAC;UAAEC,OAAO,EAAE;QAAM,CAAC,CAAC,CAAC;QAC1CE,YAAY,GAAGgC,UAAU,CAAC/B,cAAc,EAAE,IAAI,CAAC;MACjD;IACF,CAAC;IAEDA,cAAc,CAAC,CAAC;IAEhB,OAAO,MAAM;MACXgC,YAAY,CAACjC,YAAY,CAAC;IAC5B,CAAC;EACH,CAAC,EAAE,CAACpB,IAAI,CAACG,YAAY,EAAEH,IAAI,CAAC0B,YAAY,CAAC,CAAC;EAE1C,OAAO;IACLrC,MAAM;IACNX,MAAM;IACNO,UAAU;IACVJ,SAAS;IACTE,gBAAgB;IAChBQ,SAAS,EAAEA,SAAgB;IAC3BZ,SAAS;IACTG;EACF,CAAC;AACH,CAAC;AAAC,IAAAwE,QAAA,GAAAC,OAAA,CAAApF,OAAA,GAEaC,kBAAkB","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
8
9
|
var _xmppProvider = require("../context/xmppProvider");
|
|
9
10
|
var _reactRedux = require("react-redux");
|
|
10
11
|
var _useChatSettingState = require("./useChatSettingState");
|
|
@@ -18,7 +19,15 @@ const useComposing = config => {
|
|
|
18
19
|
const {
|
|
19
20
|
user
|
|
20
21
|
} = (0, _useChatSettingState.useChatSettingState)();
|
|
22
|
+
// RN keeps a focused TextInput focused when the app is backgrounded or
|
|
23
|
+
// the device is locked — nothing fires `onBlur`, so without this the
|
|
24
|
+
// other participant sees "typing…" for as long as the user is away.
|
|
25
|
+
// Tracks whether the input is *currently* focused, independent of the
|
|
26
|
+
// foreground/background transition, so we know whether to resume
|
|
27
|
+
// composing on return.
|
|
28
|
+
const isFocusedRef = (0, _react.useRef)(false);
|
|
21
29
|
const sendStartComposing = (0, _react.useCallback)(() => {
|
|
30
|
+
isFocusedRef.current = true;
|
|
22
31
|
if (config?.disableTypingIndicator) {
|
|
23
32
|
return;
|
|
24
33
|
}
|
|
@@ -27,6 +36,7 @@ const useComposing = config => {
|
|
|
27
36
|
}
|
|
28
37
|
}, [activeRoomJID, client, config?.disableTypingIndicator, user.firstName, user.lastName]);
|
|
29
38
|
const sendEndComposing = (0, _react.useCallback)(() => {
|
|
39
|
+
isFocusedRef.current = false;
|
|
30
40
|
if (config?.disableTypingIndicator) {
|
|
31
41
|
return;
|
|
32
42
|
}
|
|
@@ -40,6 +50,23 @@ const useComposing = config => {
|
|
|
40
50
|
}, 100);
|
|
41
51
|
return () => clearTimeout(timerId);
|
|
42
52
|
}, [sendEndComposing]);
|
|
53
|
+
|
|
54
|
+
// Foreground/background transition only — a pause in typing must NOT
|
|
55
|
+
// clear the indicator (that would flicker for a slowly-composing user),
|
|
56
|
+
// so this deliberately does not hook keystroke/idle timing at all.
|
|
57
|
+
(0, _react.useEffect)(() => {
|
|
58
|
+
const handleAppStateChange = nextState => {
|
|
59
|
+
if (nextState !== 'active') {
|
|
60
|
+
if (isFocusedRef.current && !config?.disableTypingIndicator && client) {
|
|
61
|
+
client.sendTypingRequestStanza(activeRoomJID || '', `${user.firstName} ${user.lastName}`, false);
|
|
62
|
+
}
|
|
63
|
+
} else if (isFocusedRef.current && !config?.disableTypingIndicator && client) {
|
|
64
|
+
client.sendTypingRequestStanza(activeRoomJID || '', `${user.firstName} ${user.lastName}`, true);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const subscription = _reactNative.AppState.addEventListener('change', handleAppStateChange);
|
|
68
|
+
return () => subscription.remove();
|
|
69
|
+
}, [activeRoomJID, client, config?.disableTypingIndicator, user.firstName, user.lastName]);
|
|
43
70
|
return {
|
|
44
71
|
sendStartComposing,
|
|
45
72
|
sendEndComposing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_xmppProvider","_reactRedux","_useChatSettingState","useComposing","config","client","useXmppClient","activeRoomJID","useSelector","state","rooms","user","useChatSettingState","sendStartComposing","useCallback","disableTypingIndicator","sendTypingRequestStanza","firstName","lastName","sendEndComposing","useEffect","timerId","setTimeout","clearTimeout","_default","exports","default"],"sourceRoot":"../../../src","sources":["hooks/useComposing.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_xmppProvider","_reactRedux","_useChatSettingState","useComposing","config","client","useXmppClient","activeRoomJID","useSelector","state","rooms","user","useChatSettingState","isFocusedRef","useRef","sendStartComposing","useCallback","current","disableTypingIndicator","sendTypingRequestStanza","firstName","lastName","sendEndComposing","useEffect","timerId","setTimeout","clearTimeout","handleAppStateChange","nextState","subscription","AppState","addEventListener","remove","_default","exports","default"],"sourceRoot":"../../../src","sources":["hooks/useComposing.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,oBAAA,GAAAJ,OAAA;AAGA,MAAMK,YAAY,GAAIC,MAAgB,IAAK;EACzC,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,2BAAa,EAAC,CAAC;EAClC,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,uBAAW,EAAEC,KAAgB,IAAKA,KAAK,CAACC,KAAK,CAAC;EACxE,MAAM;IAAEC;EAAK,CAAC,GAAG,IAAAC,wCAAmB,EAAC,CAAC;EACtC;EACA;EACA;EACA;EACA;EACA;EACA,MAAMC,YAAY,GAAG,IAAAC,aAAM,EAAC,KAAK,CAAC;EAElC,MAAMC,kBAAkB,GAAG,IAAAC,kBAAW,EAAC,MAAM;IAC3CH,YAAY,CAACI,OAAO,GAAG,I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E;UACrEA,MAAM,CAACc,uBAAuB,CAC5BZ,aAAa,IAAI,EAAE,EACnB,GAAGI,IAAI,CAACS,SAAS,IAAIT,IAAI,CAACU,QAAQ,EAAE,EACpC,KACF,CAAC;QACH;MACF,CAAC,MAAM,IAAIR,YAAY,CAACI,OAAO,IAAI,CAACb,MAAM,EAAEc,sBAAsB,IAAIb,MAAM,EAAE;QAC5EA,MAAM,CAACc,uBAAuB,CAC5BZ,aAAa,IAAI,EAAE,EACnB,GAAGI,IAAI,CAACS,SAAS,IAAIT,IAAI,CAACU,QAAQ,EAAE,EACpC,IACF,CAAC;MACH;IACF,CAAC;IAED,MAAMQ,YAAY,GAAGC,qBAAQ,CAACC,gBAAgB,CAAC,QAAQ,EAAEJ,oBAAoB,CAAC;IAC9E,OAAO,MAAME,YAAY,CAACG,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,CAACzB,aAAa,EAAEF,MAAM,EAAED,MAAM,EAAEc,sBAAsB,EAAEP,IAAI,CAACS,SAAS,EAAET,IAAI,CAACU,QAAQ,CAAC,CAAC;EAE1F,OAAO;IAAEN,kBAAkB;IAAEO;EAAiB,CAAC;AACjD,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEahC,YAAY","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ var _react = require("react");
|
|
|
8
8
|
var _reactRedux = require("react-redux");
|
|
9
9
|
var _useChatSettingState = require("./useChatSettingState");
|
|
10
10
|
var _CustomTypingIndicator = require("../components/styled/StyledInputComponents/CustomTypingIndicator");
|
|
11
|
+
var _useTheme = require("./useTheme");
|
|
11
12
|
/**
|
|
12
13
|
* Hook for managing custom typing indicator functionality
|
|
13
14
|
* Provides utilities for text generation and typing state management
|
|
@@ -16,6 +17,7 @@ const useCustomTypingIndicator = roomJID => {
|
|
|
16
17
|
const {
|
|
17
18
|
config
|
|
18
19
|
} = (0, _useChatSettingState.useChatSettingState)();
|
|
20
|
+
const theme = (0, _useTheme.useTheme)();
|
|
19
21
|
const {
|
|
20
22
|
rooms
|
|
21
23
|
} = (0, _reactRedux.useSelector)(state => ({
|
|
@@ -67,7 +69,8 @@ const useCustomTypingIndicator = roomJID => {
|
|
|
67
69
|
top: '8px',
|
|
68
70
|
left: '16px',
|
|
69
71
|
right: '16px',
|
|
70
|
-
background:
|
|
72
|
+
background: theme.surface,
|
|
73
|
+
color: theme.text,
|
|
71
74
|
padding: '8px 12px',
|
|
72
75
|
borderRadius: '8px',
|
|
73
76
|
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)',
|
|
@@ -92,7 +95,8 @@ const useCustomTypingIndicator = roomJID => {
|
|
|
92
95
|
position: 'fixed',
|
|
93
96
|
bottom: '80px',
|
|
94
97
|
right: '20px',
|
|
95
|
-
background:
|
|
98
|
+
background: theme.surface,
|
|
99
|
+
color: theme.text,
|
|
96
100
|
padding: '12px 16px',
|
|
97
101
|
borderRadius: '20px',
|
|
98
102
|
boxShadow: '0 4px 16px rgba(0, 0, 0, 0.15)',
|
|
@@ -106,7 +110,7 @@ const useCustomTypingIndicator = roomJID => {
|
|
|
106
110
|
padding: '8px 0'
|
|
107
111
|
};
|
|
108
112
|
}
|
|
109
|
-
}, [typingConfig?.styles]);
|
|
113
|
+
}, [typingConfig?.styles, theme]);
|
|
110
114
|
return {
|
|
111
115
|
isComposing,
|
|
112
116
|
composingList,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactRedux","_useChatSettingState","_CustomTypingIndicator","useCustomTypingIndicator","roomJID","config","useChatSettingState","rooms","useSelector","state","room","isComposing","composing","composingList","getTypingText","useCallback","customText","generateDefaultText","getProcessingText","generateProcessingText","isCustomTypingEnabled","useMemo","customTypingIndicator","enabled","typingConfig","shouldShowIndicator","length","getPositionStyles","position","baseStyles","styles","top","left","right","background","padding","borderRadius","boxShadow","backdropFilter","transform","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactRedux","_useChatSettingState","_CustomTypingIndicator","_useTheme","useCustomTypingIndicator","roomJID","config","useChatSettingState","theme","useTheme","rooms","useSelector","state","room","isComposing","composing","composingList","getTypingText","useCallback","customText","generateDefaultText","getProcessingText","generateProcessingText","isCustomTypingEnabled","useMemo","customTypingIndicator","enabled","typingConfig","shouldShowIndicator","length","getPositionStyles","position","baseStyles","styles","top","left","right","background","surface","color","text","padding","borderRadius","boxShadow","backdropFilter","transform","bottom","exports","createTypingIndicatorConfigs","default","processing","usersTyping","fontSize","fontWeight","floating","customTexts","aiProcessing","states","randomState","Math","floor","random","simple","minimal","_default"],"sourceRoot":"../../../src","sources":["hooks/useCustomTypingIndicator.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AAKA,IAAAI,SAAA,GAAAJ,OAAA;AAEA;AACA;AACA;AACA;AACO,MAAMK,wBAAwB,GAAIC,OAAe,IAAK;EAC3D,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,wCAAmB,EAAC,CAAC;EACxC,MAAMC,KAAK,GAAG,IAAAC,kBAAQ,EAAC,CAAC;EACxB,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAAC,uBAAW,EAAEC,KAAgB,KAAM;IACnDF,KAAK,EAAEE,KAAK,CAACF,KAAK,CAACA;EACrB,CAAC,CAAC,CAAC;EAEH,MAAMG,IAAI,GAAGH,KAAK,CAACL,OAAO,CAAC;EAC3B,MAAMS,WAAW,GAAGD,IAAI,EAAEE,SAAS,IAAI,KAAK;EAC5C,MAAMC,aAAa,GAAGH,IAAI,EAAEG,aAAa,IAAI,EAAE;;EAE/C;EACA,MAAMC,aAAa,GAAG,IAAAC,kBAAW,EAC9BC,UAAyD,IAAK;IAC7D,IAAI,OAAOA,UAAU,KAAK,UAAU,EAAE;MACpC,OAAOA,UAAU,CAACH,aAAa,CAAC;IAClC,CAAC,MAAM,IAAI,O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EDkC,OAAO,EAAGZ,WAAqB,IAAK;MAClC,OAAO,KAAK;IACd;EACF;AACF,CAAC;AAAC,IAAAa,QAAA,GAAAjB,OAAA,CAAAE,OAAA,GAEa7C,wBAAwB","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFileToken = void 0;
|
|
7
|
+
var _reactRedux = require("react-redux");
|
|
8
|
+
const useFileToken = () => (0, _reactRedux.useSelector)(state => state.chatSettingStore.user?.fileToken || '');
|
|
9
|
+
exports.useFileToken = useFileToken;
|
|
10
|
+
//# sourceMappingURL=useFileToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactRedux","require","useFileToken","useSelector","state","chatSettingStore","user","fileToken","exports"],"sourceRoot":"../../../src","sources":["hooks/useFileToken.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,YAAY,GAAGA,CAAA,KAC1B,IAAAC,uBAAW,EACRC,KAAgB,IAAKA,KAAK,CAACC,gBAAgB,CAACC,IAAI,EAAEC,SAAS,IAAI,EAClE,CAAC;AAACC,OAAA,CAAAN,YAAA,GAAAA,YAAA","ignoreList":[]}
|