@ethora/chat-component-rn 26.7.10 → 26.8.1
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 +0 -96
- package/README.md +10 -43
- package/lib/commonjs/assets/icons.js +2 -7
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/AuthForms/Login.js +4 -4
- package/lib/commonjs/components/AuthForms/Login.js.map +1 -1
- package/lib/commonjs/components/Header/HeaderRoomList.js +7 -26
- package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +3 -9
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +14 -150
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatWrapper.js +38 -34
- package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/LoginWrapper.js +1 -2
- package/lib/commonjs/components/MainComponents/LoginWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaMessage.js +9 -29
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js +1 -5
- package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +5 -13
- package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js +13 -14
- package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js +24 -3
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +35 -208
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +98 -317
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageTranslate.js +16 -7
- package/lib/commonjs/components/MessageBubble/MessageTranslate.js.map +1 -1
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +112 -320
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +215 -556
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/DeleteChatModal.js +9 -7
- package/lib/commonjs/components/Modals/ChatProfileModal/DeleteChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +27 -69
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js +1 -2
- package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
- package/lib/commonjs/components/Modals/Modal/Modal.js +0 -8
- package/lib/commonjs/components/Modals/Modal/Modal.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js +1 -2
- package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +109 -205
- package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js +0 -8
- package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +2 -4
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +21 -7
- package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +244 -507
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +46 -74
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/commonjs/components/Modals/styledModalComponents.js +2 -9
- package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +39 -23
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +3 -22
- package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +3 -17
- package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +3 -17
- package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js +3 -6
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/commonjs/components/styled/AudioMessage.js +1 -2
- package/lib/commonjs/components/styled/AudioMessage.js.map +1 -1
- package/lib/commonjs/components/styled/DateLabel.js +10 -3
- package/lib/commonjs/components/styled/DateLabel.js.map +1 -1
- package/lib/commonjs/components/styled/MessageImage.js +9 -37
- package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
- package/lib/commonjs/components/styled/NewMessageLabel.js +3 -1
- package/lib/commonjs/components/styled/NewMessageLabel.js.map +1 -1
- package/lib/commonjs/components/styled/SendInput.js +17 -86
- package/lib/commonjs/components/styled/SendInput.js.map +1 -1
- package/lib/commonjs/components/styled/StyledComponents.js +3 -9
- package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +4 -11
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/commonjs/components/styled/UnsupportedType.js +4 -14
- package/lib/commonjs/components/styled/UnsupportedType.js.map +1 -1
- package/lib/commonjs/components/styled/VideoMessage.js +61 -119
- package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +59 -177
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/helpers/createMessageFromXml.js +1 -19
- 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/getDataFromXml.js +24 -1
- package/lib/commonjs/helpers/getDataFromXml.js.map +1 -1
- package/lib/commonjs/helpers/historyPreloadScheduler.js +2 -65
- package/lib/commonjs/helpers/historyPreloadScheduler.js.map +1 -1
- package/lib/commonjs/helpers/initXmppRooms.js +8 -14
- package/lib/commonjs/helpers/initXmppRooms.js.map +1 -1
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js +22 -51
- package/lib/commonjs/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/commonjs/helpers/isUnresolvedSenderId.js +6 -1
- package/lib/commonjs/helpers/isUnresolvedSenderId.js.map +1 -1
- package/lib/commonjs/helpers/keyboardLayout.js +2 -12
- package/lib/commonjs/helpers/keyboardLayout.js.map +1 -1
- package/lib/commonjs/helpers/mimeToExtension.js +14 -6
- package/lib/commonjs/helpers/mimeToExtension.js.map +1 -1
- package/lib/commonjs/helpers/resolveInitBeforeLoadUser.js +17 -130
- package/lib/commonjs/helpers/resolveInitBeforeLoadUser.js.map +1 -1
- package/lib/commonjs/helpers/resolveLangSource.js +38 -0
- package/lib/commonjs/helpers/resolveLangSource.js.map +1 -0
- package/lib/commonjs/helpers/xmppUsername.js +39 -0
- package/lib/commonjs/helpers/xmppUsername.js.map +1 -0
- package/lib/commonjs/hooks/useChatRoomFocus.js +12 -45
- package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/commonjs/hooks/useChatWrapperInit.js +14 -32
- package/lib/commonjs/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/commonjs/hooks/useComposing.js +0 -27
- package/lib/commonjs/hooks/useComposing.js.map +1 -1
- package/lib/commonjs/hooks/useLogout.js +7 -23
- package/lib/commonjs/hooks/useLogout.js.map +1 -1
- package/lib/commonjs/hooks/usePendingNotification.js +11 -8
- package/lib/commonjs/hooks/usePendingNotification.js.map +1 -1
- package/lib/commonjs/hooks/useSendMessage.js +14 -50
- package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
- package/lib/commonjs/hooks/useUnreadMessagesCounter.js +1 -6
- package/lib/commonjs/hooks/useUnreadMessagesCounter.js.map +1 -1
- package/lib/commonjs/i18n/strings.js +133 -121
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/i18n/useT.js +1 -1
- package/lib/commonjs/main.js +0 -44
- package/lib/commonjs/main.js.map +1 -1
- package/lib/commonjs/networking/api-requests/auth.api.js +60 -134
- package/lib/commonjs/networking/api-requests/auth.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 +9 -9
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/user.api.js +9 -68
- package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
- package/lib/commonjs/networking/apiClient.js +112 -62
- package/lib/commonjs/networking/apiClient.js.map +1 -1
- package/lib/commonjs/networking/stanzaHandlers.js +51 -93
- package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js +8 -46
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js +1 -8
- package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js +1 -5
- package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js +8 -124
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.js +7 -26
- package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/commonjs/roomStore/index.js +2 -35
- package/lib/commonjs/roomStore/index.js.map +1 -1
- package/lib/commonjs/roomStore/persistence.js +39 -226
- package/lib/commonjs/roomStore/persistence.js.map +1 -1
- package/lib/commonjs/roomStore/roomsSlice.js +38 -151
- package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
- package/lib/commonjs/services/pushSubscriptionService.js +13 -15
- package/lib/commonjs/services/pushSubscriptionService.js.map +1 -1
- package/lib/commonjs/version.js +3 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/assets/icons.js +1 -6
- package/lib/module/assets/icons.js.map +1 -1
- package/lib/module/components/AuthForms/Login.js +4 -4
- package/lib/module/components/AuthForms/Login.js.map +1 -1
- package/lib/module/components/Header/HeaderRoomList.js +7 -26
- package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +3 -9
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +16 -152
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/ChatWrapper.js +40 -36
- package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/LoginWrapper.js +1 -2
- package/lib/module/components/MainComponents/LoginWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/MediaMessage.js +10 -30
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/MessageContainer.js +1 -5
- package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +5 -13
- package/lib/module/components/MainComponents/MessageList.js.map +1 -1
- package/lib/module/components/MainComponents/ProfileImagePlaceholder.js +13 -14
- package/lib/module/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
- package/lib/module/components/MainComponents/ReduxWrapper.js +26 -5
- package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +35 -207
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/Menu/HeaderRoomListMenu.js +101 -319
- package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageTranslate.js +16 -7
- package/lib/module/components/MessageBubble/MessageTranslate.js.map +1 -1
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js +115 -311
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +219 -559
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/DeleteChatModal.js +9 -7
- package/lib/module/components/Modals/ChatProfileModal/DeleteChatModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +28 -70
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/PdfView.js +1 -2
- package/lib/module/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
- package/lib/module/components/Modals/Modal/Modal.js +1 -9
- package/lib/module/components/Modals/Modal/Modal.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/ModalContent.js +1 -2
- package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/NewChatModal.js +111 -208
- package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js +0 -8
- package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +2 -4
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +23 -9
- package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +248 -509
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +48 -76
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/module/components/Modals/styledModalComponents.js +2 -9
- package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +40 -24
- package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js +3 -22
- package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +3 -17
- package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +3 -17
- package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallSession.js +3 -6
- package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/module/components/styled/AudioMessage.js +1 -2
- package/lib/module/components/styled/AudioMessage.js.map +1 -1
- package/lib/module/components/styled/DateLabel.js +10 -3
- package/lib/module/components/styled/DateLabel.js.map +1 -1
- package/lib/module/components/styled/MessageImage.js +9 -37
- package/lib/module/components/styled/MessageImage.js.map +1 -1
- package/lib/module/components/styled/NewMessageLabel.js +3 -1
- package/lib/module/components/styled/NewMessageLabel.js.map +1 -1
- package/lib/module/components/styled/SendInput.js +18 -87
- package/lib/module/components/styled/SendInput.js.map +1 -1
- package/lib/module/components/styled/StyledComponents.js +3 -9
- package/lib/module/components/styled/StyledComponents.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +4 -11
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/module/components/styled/UnsupportedType.js +4 -14
- package/lib/module/components/styled/UnsupportedType.js.map +1 -1
- package/lib/module/components/styled/VideoMessage.js +62 -120
- package/lib/module/components/styled/VideoMessage.js.map +1 -1
- package/lib/module/context/xmppProvider.js +60 -177
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/helpers/createMessageFromXml.js +1 -19
- 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/getDataFromXml.js +23 -1
- package/lib/module/helpers/getDataFromXml.js.map +1 -1
- package/lib/module/helpers/historyPreloadScheduler.js +3 -66
- package/lib/module/helpers/historyPreloadScheduler.js.map +1 -1
- package/lib/module/helpers/initXmppRooms.js +8 -14
- package/lib/module/helpers/initXmppRooms.js.map +1 -1
- package/lib/module/helpers/insertMessageWithDelimiter.js +22 -52
- package/lib/module/helpers/insertMessageWithDelimiter.js.map +1 -1
- package/lib/module/helpers/isUnresolvedSenderId.js +6 -1
- package/lib/module/helpers/isUnresolvedSenderId.js.map +1 -1
- package/lib/module/helpers/keyboardLayout.js +2 -12
- package/lib/module/helpers/keyboardLayout.js.map +1 -1
- package/lib/module/helpers/mimeToExtension.js +13 -6
- package/lib/module/helpers/mimeToExtension.js.map +1 -1
- package/lib/module/helpers/resolveInitBeforeLoadUser.js +16 -130
- package/lib/module/helpers/resolveInitBeforeLoadUser.js.map +1 -1
- package/lib/module/helpers/resolveLangSource.js +32 -0
- package/lib/module/helpers/resolveLangSource.js.map +1 -0
- package/lib/module/helpers/xmppUsername.js +35 -0
- package/lib/module/helpers/xmppUsername.js.map +1 -0
- package/lib/module/hooks/useChatRoomFocus.js +13 -46
- package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
- package/lib/module/hooks/useChatWrapperInit.js +14 -32
- package/lib/module/hooks/useChatWrapperInit.js.map +1 -1
- package/lib/module/hooks/useComposing.js +1 -28
- package/lib/module/hooks/useComposing.js.map +1 -1
- package/lib/module/hooks/useLogout.js +7 -23
- package/lib/module/hooks/useLogout.js.map +1 -1
- package/lib/module/hooks/usePendingNotification.js +11 -8
- package/lib/module/hooks/usePendingNotification.js.map +1 -1
- package/lib/module/hooks/useSendMessage.js +16 -52
- package/lib/module/hooks/useSendMessage.js.map +1 -1
- package/lib/module/hooks/useUnreadMessagesCounter.js +1 -6
- package/lib/module/hooks/useUnreadMessagesCounter.js.map +1 -1
- package/lib/module/i18n/strings.js +133 -121
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/i18n/useT.js +1 -1
- package/lib/module/main.js +2 -14
- package/lib/module/main.js.map +1 -1
- package/lib/module/networking/api-requests/auth.api.js +59 -131
- package/lib/module/networking/api-requests/auth.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 +9 -9
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/api-requests/user.api.js +7 -64
- package/lib/module/networking/api-requests/user.api.js.map +1 -1
- package/lib/module/networking/apiClient.js +113 -61
- package/lib/module/networking/apiClient.js.map +1 -1
- package/lib/module/networking/stanzaHandlers.js +52 -94
- package/lib/module/networking/stanzaHandlers.js.map +1 -1
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js +8 -46
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/module/networking/xmpp/presenceInRoom.xmpp.js +1 -8
- package/lib/module/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
- package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js +1 -5
- package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
- package/lib/module/networking/xmppClient.js +8 -124
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/roomStore/chatSettingsSlice.js +7 -26
- package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/module/roomStore/index.js +4 -37
- package/lib/module/roomStore/index.js.map +1 -1
- package/lib/module/roomStore/persistence.js +38 -223
- package/lib/module/roomStore/persistence.js.map +1 -1
- package/lib/module/roomStore/roomsSlice.js +34 -139
- package/lib/module/roomStore/roomsSlice.js.map +1 -1
- package/lib/module/services/pushSubscriptionService.js +13 -15
- package/lib/module/services/pushSubscriptionService.js.map +1 -1
- package/lib/module/version.js +3 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/assets/icons.d.ts +0 -16
- 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/Header/HeaderRoomList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/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 +1 -10
- 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 +0 -7
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts +0 -3
- package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageTranslate.d.ts.map +1 -1
- package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts +0 -9
- package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts +0 -10
- 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/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/NewChatModal/ModalContent.d.ts +2 -4
- 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/SelectUsersModal/SelectUsersModal.d.ts +1 -6
- package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.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 +0 -16
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts +0 -1
- package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
- 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/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/VideoCalls/VideoCallSession.d.ts.map +1 -1
- package/lib/typescript/components/styled/AudioMessage.d.ts.map +1 -1
- package/lib/typescript/components/styled/DateLabel.d.ts.map +1 -1
- package/lib/typescript/components/styled/MessageImage.d.ts +0 -14
- package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
- package/lib/typescript/components/styled/NewMessageLabel.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/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
- package/lib/typescript/components/styled/UnsupportedType.d.ts.map +1 -1
- package/lib/typescript/components/styled/VideoMessage.d.ts +0 -8
- package/lib/typescript/components/styled/VideoMessage.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/getDataFromXml.d.ts.map +1 -1
- 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/isUnresolvedSenderId.d.ts.map +1 -1
- package/lib/typescript/helpers/keyboardLayout.d.ts +1 -5
- package/lib/typescript/helpers/keyboardLayout.d.ts.map +1 -1
- package/lib/typescript/helpers/mimeToExtension.d.ts +15 -0
- package/lib/typescript/helpers/mimeToExtension.d.ts.map +1 -1
- package/lib/typescript/helpers/resolveInitBeforeLoadUser.d.ts.map +1 -1
- package/lib/typescript/helpers/resolveLangSource.d.ts +30 -0
- package/lib/typescript/helpers/resolveLangSource.d.ts.map +1 -0
- package/lib/typescript/helpers/xmppUsername.d.ts +13 -0
- package/lib/typescript/helpers/xmppUsername.d.ts.map +1 -0
- package/lib/typescript/hooks/useChatRoomFocus.d.ts +1 -4
- 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/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/useUnreadMessagesCounter.d.ts +0 -1
- package/lib/typescript/hooks/useUnreadMessagesCounter.d.ts.map +1 -1
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/i18n/useT.d.ts +1 -1
- package/lib/typescript/main.d.ts +2 -9
- package/lib/typescript/main.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/auth.api.d.ts +1 -3
- package/lib/typescript/networking/api-requests/auth.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/user.api.d.ts +0 -27
- package/lib/typescript/networking/api-requests/user.api.d.ts.map +1 -1
- package/lib/typescript/networking/apiClient.d.ts +6 -12
- package/lib/typescript/networking/apiClient.d.ts.map +1 -1
- package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts +2 -10
- 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 +0 -14
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts +0 -16
- 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 +1 -18
- package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts +3 -43
- package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
- package/lib/typescript/services/pushSubscriptionService.d.ts +1 -1
- package/lib/typescript/services/pushSubscriptionService.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +5 -50
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/lib/typescript/version.d.ts.map +1 -1
- package/package.json +29 -41
- package/src/assets/icons.tsx +9 -48
- package/src/components/AuthForms/Login.tsx +3 -3
- package/src/components/Header/HeaderRoomList.tsx +6 -24
- package/src/components/MainComponents/ChatHeader.tsx +3 -9
- package/src/components/MainComponents/ChatRoom.tsx +15 -161
- package/src/components/MainComponents/ChatWrapper.tsx +53 -36
- package/src/components/MainComponents/LoginWrapper.tsx +0 -1
- package/src/components/MainComponents/MediaMessage.tsx +8 -26
- package/src/components/MainComponents/MessageContainer.tsx +1 -5
- package/src/components/MainComponents/MessageList.tsx +4 -23
- package/src/components/MainComponents/ProfileImagePlaceholder.tsx +14 -21
- package/src/components/MainComponents/ReduxWrapper.tsx +18 -1
- package/src/components/MainComponents/RoomList.tsx +39 -236
- package/src/components/Menu/HeaderRoomListMenu.tsx +75 -328
- package/src/components/MessageBubble/MessageTranslate.tsx +17 -12
- package/src/components/Modals/AttachSheet/AttachSheet.tsx +99 -331
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +293 -611
- package/src/components/Modals/ChatProfileModal/DeleteChatModal.tsx +9 -7
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +38 -79
- package/src/components/Modals/FilePreviewModal/PdfView.tsx +1 -2
- package/src/components/Modals/Modal/Modal.tsx +0 -7
- package/src/components/Modals/NewChatModal/ModalContent.tsx +3 -6
- package/src/components/Modals/NewChatModal/NewChatModal.tsx +126 -223
- package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +1 -12
- package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +4 -14
- package/src/components/Modals/UserProfileModal/EditUserModal.tsx +25 -9
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +307 -617
- package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +58 -75
- package/src/components/Modals/styledModalComponents.tsx +2 -9
- package/src/components/RoomComponents/ChatRoomItem.tsx +50 -21
- package/src/components/RoomComponents/styled/LastMessageFile.tsx +4 -28
- package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +3 -18
- package/src/components/RoomComponents/styled/LastMessageVideo.tsx +3 -18
- package/src/components/VideoCalls/VideoCallSession.tsx +3 -8
- package/src/components/styled/AudioMessage.tsx +1 -2
- package/src/components/styled/DateLabel.tsx +10 -3
- package/src/components/styled/MessageImage.tsx +7 -53
- package/src/components/styled/NewMessageLabel.tsx +3 -1
- package/src/components/styled/SendInput.tsx +18 -91
- package/src/components/styled/StyledComponents.ts +3 -9
- package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +4 -11
- package/src/components/styled/UnsupportedType.tsx +4 -14
- package/src/components/styled/VideoMessage.tsx +54 -131
- package/src/context/xmppProvider.tsx +57 -209
- package/src/helpers/createMessageFromXml.ts +1 -20
- package/src/helpers/ensureScopedChatCache.ts +2 -2
- package/src/helpers/getDataFromXml.ts +25 -1
- package/src/helpers/historyPreloadScheduler.ts +3 -80
- package/src/helpers/initXmppRooms.tsx +10 -14
- package/src/helpers/insertMessageWithDelimiter.ts +32 -55
- package/src/helpers/isUnresolvedSenderId.ts +9 -1
- package/src/helpers/keyboardLayout.ts +2 -23
- package/src/helpers/mimeToExtension.ts +22 -6
- package/src/helpers/resolveInitBeforeLoadUser.ts +18 -125
- package/src/helpers/resolveLangSource.ts +40 -0
- package/src/helpers/xmppUsername.ts +38 -0
- package/src/hooks/useChatRoomFocus.ts +9 -49
- package/src/hooks/useChatWrapperInit.ts +16 -32
- package/src/hooks/useComposing.tsx +1 -37
- package/src/hooks/useLogout.tsx +9 -29
- package/src/hooks/usePendingNotification.ts +11 -5
- package/src/hooks/useSendMessage.tsx +15 -60
- package/src/hooks/useUnreadMessagesCounter.ts +0 -11
- package/src/i18n/strings.ts +133 -121
- package/src/i18n/useT.ts +1 -1
- package/src/main.ts +2 -26
- package/src/networking/api-requests/auth.api.ts +48 -156
- package/src/networking/api-requests/roomMembers.api.ts +1 -1
- package/src/networking/api-requests/rooms.api.ts +9 -9
- package/src/networking/api-requests/user.api.ts +7 -79
- package/src/networking/apiClient.ts +123 -68
- package/src/networking/stanzaHandlers.ts +51 -92
- package/src/networking/xmpp/flushLastViewedToPrivateStore.ts +10 -71
- package/src/networking/xmpp/presenceInRoom.xmpp.ts +1 -6
- package/src/networking/xmpp/subscribeToRoomMessages.xmpp.ts +1 -12
- package/src/networking/xmppClient.ts +9 -141
- package/src/roomStore/chatSettingsSlice.ts +10 -34
- package/src/roomStore/index.ts +4 -40
- package/src/roomStore/persistence.ts +40 -234
- package/src/roomStore/roomsSlice.ts +29 -161
- package/src/services/pushSubscriptionService.ts +13 -18
- package/src/types/types.ts +5 -72
- package/src/version.ts +3 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +0 -226
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +0 -1
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +0 -556
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +0 -1
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +0 -210
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +0 -1
- package/lib/commonjs/helpers/getChatBackground.js +0 -23
- package/lib/commonjs/helpers/getChatBackground.js.map +0 -1
- package/lib/commonjs/helpers/getDisplayFileName.js +0 -79
- package/lib/commonjs/helpers/getDisplayFileName.js.map +0 -1
- package/lib/commonjs/helpers/getServerReadTimestamp.js +0 -188
- package/lib/commonjs/helpers/getServerReadTimestamp.js.map +0 -1
- package/lib/commonjs/helpers/isOwnMessage.js +0 -75
- package/lib/commonjs/helpers/isOwnMessage.js.map +0 -1
- package/lib/commonjs/helpers/mediaLibraryRuntime.js +0 -31
- package/lib/commonjs/helpers/mediaLibraryRuntime.js.map +0 -1
- package/lib/commonjs/helpers/msgSortableMs.js +0 -37
- package/lib/commonjs/helpers/msgSortableMs.js.map +0 -1
- package/lib/commonjs/helpers/persistCrypto.js +0 -122
- package/lib/commonjs/helpers/persistCrypto.js.map +0 -1
- package/lib/commonjs/helpers/pickImageAsset.js +0 -68
- package/lib/commonjs/helpers/pickImageAsset.js.map +0 -1
- package/lib/commonjs/helpers/pushPayload.js +0 -71
- package/lib/commonjs/helpers/pushPayload.js.map +0 -1
- package/lib/commonjs/helpers/secureFileUrl.js +0 -101
- package/lib/commonjs/helpers/secureFileUrl.js.map +0 -1
- package/lib/commonjs/helpers/secureKeyValue.js +0 -83
- package/lib/commonjs/helpers/secureKeyValue.js.map +0 -1
- package/lib/commonjs/helpers/secureStoreRuntime.js +0 -59
- package/lib/commonjs/helpers/secureStoreRuntime.js.map +0 -1
- package/lib/commonjs/helpers/secureUserStorage.js +0 -75
- package/lib/commonjs/helpers/secureUserStorage.js.map +0 -1
- package/lib/commonjs/helpers/shallowEqual.js +0 -36
- package/lib/commonjs/helpers/shallowEqual.js.map +0 -1
- package/lib/commonjs/helpers/sheetGestures.js +0 -32
- package/lib/commonjs/helpers/sheetGestures.js.map +0 -1
- package/lib/commonjs/hooks/useFileToken.js +0 -10
- package/lib/commonjs/hooks/useFileToken.js.map +0 -1
- package/lib/commonjs/networking/authRefresh.js +0 -332
- package/lib/commonjs/networking/authRefresh.js.map +0 -1
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +0 -223
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +0 -1
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +0 -548
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +0 -1
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +0 -205
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +0 -1
- package/lib/module/helpers/getChatBackground.js +0 -18
- package/lib/module/helpers/getChatBackground.js.map +0 -1
- package/lib/module/helpers/getDisplayFileName.js +0 -73
- package/lib/module/helpers/getDisplayFileName.js.map +0 -1
- package/lib/module/helpers/getServerReadTimestamp.js +0 -181
- package/lib/module/helpers/getServerReadTimestamp.js.map +0 -1
- package/lib/module/helpers/isOwnMessage.js +0 -70
- package/lib/module/helpers/isOwnMessage.js.map +0 -1
- package/lib/module/helpers/mediaLibraryRuntime.js +0 -25
- package/lib/module/helpers/mediaLibraryRuntime.js.map +0 -1
- package/lib/module/helpers/msgSortableMs.js +0 -32
- package/lib/module/helpers/msgSortableMs.js.map +0 -1
- package/lib/module/helpers/persistCrypto.js +0 -115
- package/lib/module/helpers/persistCrypto.js.map +0 -1
- package/lib/module/helpers/pickImageAsset.js +0 -63
- package/lib/module/helpers/pickImageAsset.js.map +0 -1
- package/lib/module/helpers/pushPayload.js +0 -63
- package/lib/module/helpers/pushPayload.js.map +0 -1
- package/lib/module/helpers/secureFileUrl.js +0 -91
- package/lib/module/helpers/secureFileUrl.js.map +0 -1
- package/lib/module/helpers/secureKeyValue.js +0 -75
- package/lib/module/helpers/secureKeyValue.js.map +0 -1
- package/lib/module/helpers/secureStoreRuntime.js +0 -52
- package/lib/module/helpers/secureStoreRuntime.js.map +0 -1
- package/lib/module/helpers/secureUserStorage.js +0 -72
- package/lib/module/helpers/secureUserStorage.js.map +0 -1
- package/lib/module/helpers/shallowEqual.js +0 -31
- package/lib/module/helpers/shallowEqual.js.map +0 -1
- package/lib/module/helpers/sheetGestures.js +0 -26
- package/lib/module/helpers/sheetGestures.js.map +0 -1
- package/lib/module/hooks/useFileToken.js +0 -5
- package/lib/module/hooks/useFileToken.js.map +0 -1
- package/lib/module/networking/authRefresh.js +0 -321
- package/lib/module/networking/authRefresh.js.map +0 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts +0 -9
- package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +0 -1
- package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts +0 -75
- package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts.map +0 -1
- package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts +0 -25
- package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts.map +0 -1
- package/lib/typescript/helpers/getChatBackground.d.ts +0 -15
- package/lib/typescript/helpers/getChatBackground.d.ts.map +0 -1
- package/lib/typescript/helpers/getDisplayFileName.d.ts +0 -49
- package/lib/typescript/helpers/getDisplayFileName.d.ts.map +0 -1
- package/lib/typescript/helpers/getServerReadTimestamp.d.ts +0 -108
- package/lib/typescript/helpers/getServerReadTimestamp.d.ts.map +0 -1
- package/lib/typescript/helpers/isOwnMessage.d.ts +0 -36
- package/lib/typescript/helpers/isOwnMessage.d.ts.map +0 -1
- package/lib/typescript/helpers/mediaLibraryRuntime.d.ts +0 -3
- package/lib/typescript/helpers/mediaLibraryRuntime.d.ts.map +0 -1
- package/lib/typescript/helpers/msgSortableMs.d.ts +0 -2
- package/lib/typescript/helpers/msgSortableMs.d.ts.map +0 -1
- package/lib/typescript/helpers/persistCrypto.d.ts +0 -13
- package/lib/typescript/helpers/persistCrypto.d.ts.map +0 -1
- package/lib/typescript/helpers/pickImageAsset.d.ts +0 -27
- package/lib/typescript/helpers/pickImageAsset.d.ts.map +0 -1
- package/lib/typescript/helpers/pushPayload.d.ts +0 -7
- package/lib/typescript/helpers/pushPayload.d.ts.map +0 -1
- package/lib/typescript/helpers/secureFileUrl.d.ts +0 -7
- package/lib/typescript/helpers/secureFileUrl.d.ts.map +0 -1
- package/lib/typescript/helpers/secureKeyValue.d.ts +0 -13
- package/lib/typescript/helpers/secureKeyValue.d.ts.map +0 -1
- package/lib/typescript/helpers/secureStoreRuntime.d.ts +0 -29
- package/lib/typescript/helpers/secureStoreRuntime.d.ts.map +0 -1
- package/lib/typescript/helpers/secureUserStorage.d.ts +0 -23
- package/lib/typescript/helpers/secureUserStorage.d.ts.map +0 -1
- package/lib/typescript/helpers/shallowEqual.d.ts +0 -11
- package/lib/typescript/helpers/shallowEqual.d.ts.map +0 -1
- package/lib/typescript/helpers/sheetGestures.d.ts +0 -20
- package/lib/typescript/helpers/sheetGestures.d.ts.map +0 -1
- package/lib/typescript/hooks/useFileToken.d.ts +0 -2
- package/lib/typescript/hooks/useFileToken.d.ts.map +0 -1
- package/lib/typescript/networking/authRefresh.d.ts +0 -95
- package/lib/typescript/networking/authRefresh.d.ts.map +0 -1
- package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +0 -244
- package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +0 -615
- package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +0 -217
- package/src/helpers/getChatBackground.ts +0 -18
- package/src/helpers/getDisplayFileName.ts +0 -87
- package/src/helpers/getServerReadTimestamp.ts +0 -197
- package/src/helpers/isOwnMessage.ts +0 -90
- package/src/helpers/mediaLibraryRuntime.ts +0 -25
- package/src/helpers/msgSortableMs.ts +0 -25
- package/src/helpers/persistCrypto.ts +0 -127
- package/src/helpers/pickImageAsset.ts +0 -68
- package/src/helpers/pushPayload.ts +0 -62
- package/src/helpers/secureFileUrl.ts +0 -103
- package/src/helpers/secureKeyValue.ts +0 -80
- package/src/helpers/secureStoreRuntime.ts +0 -62
- package/src/helpers/secureUserStorage.ts +0 -80
- package/src/helpers/shallowEqual.ts +0 -33
- package/src/helpers/sheetGestures.ts +0 -25
- package/src/hooks/useFileToken.ts +0 -7
- package/src/networking/authRefresh.ts +0 -451
|
@@ -1,615 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import {
|
|
5
|
-
Animated,
|
|
6
|
-
Image,
|
|
7
|
-
StyleProp,
|
|
8
|
-
StyleSheet,
|
|
9
|
-
Text,
|
|
10
|
-
TextStyle,
|
|
11
|
-
TouchableOpacity,
|
|
12
|
-
View,
|
|
13
|
-
} from 'react-native';
|
|
14
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
15
|
-
import { BackIcon } from '../../../assets/icons';
|
|
16
|
-
import { getAvatarTextColor } from '../../../helpers/getAvatarColor';
|
|
17
|
-
|
|
18
|
-
/** Height of the expanded photo hero. */
|
|
19
|
-
export const HERO_HEIGHT = 320;
|
|
20
|
-
/** Back / "…" row, directly below the status-bar inset. */
|
|
21
|
-
export const TOP_BAR_BUTTONS = 60;
|
|
22
|
-
/**
|
|
23
|
-
* Avatar + name row underneath it, revealed as the header collapses.
|
|
24
|
-
* Taller than the 48pt avatar it holds, so the row breathes: the extra
|
|
25
|
-
* height splits evenly above and below (the row centres its content),
|
|
26
|
-
* putting real space between the avatar and both the buttons above and
|
|
27
|
-
* the content below.
|
|
28
|
-
*/
|
|
29
|
-
export const TOP_BAR_NAME = 92;
|
|
30
|
-
/** Content band of the collapsed bar, below the status-bar inset. */
|
|
31
|
-
export const TOP_BAR_BAND = TOP_BAR_BUTTONS + TOP_BAR_NAME;
|
|
32
|
-
/** How far above the fully-collapsed point the bar starts fading in. */
|
|
33
|
-
const COLLAPSE_RAMP = 48;
|
|
34
|
-
/**
|
|
35
|
-
* Blur strength once the header is fully collapsed. The design's collapsed
|
|
36
|
-
* bar is frosted heavily — the picture is a mood, not a subject — so this
|
|
37
|
-
* sits near the top of expo-blur's 0-100 range, with a dim over it to keep
|
|
38
|
-
* the white text and the sharp round avatar reading against it.
|
|
39
|
-
*/
|
|
40
|
-
const BLUR_INTENSITY = 92;
|
|
41
|
-
/** Darkening applied on top of the blur (and used alone without it). */
|
|
42
|
-
const FROST_DIM = 'rgba(0,0,0,0.28)';
|
|
43
|
-
/** Height of the readability gradient under the name and buttons. */
|
|
44
|
-
const SCRIM_HEIGHT = 220;
|
|
45
|
-
/** Bands the gradient is built from — enough that no step is visible. */
|
|
46
|
-
const SCRIM_BANDS = 16;
|
|
47
|
-
/** Darkest the gradient gets, at the very bottom of the hero. */
|
|
48
|
-
const SCRIM_MAX_ALPHA = 0.45;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* How far above the hero its backdrop reaches. Over-scrolling downwards
|
|
52
|
-
* exposes that band, and the picture grows into it (anchored at its own
|
|
53
|
-
* bottom edge) rather than a second copy being painted there.
|
|
54
|
-
*/
|
|
55
|
-
const OVERSCROLL_REACH = 400;
|
|
56
|
-
|
|
57
|
-
// expo-blur is an OPTIONAL peer. Having the JS package is not enough — the
|
|
58
|
-
// native view has to be in the binary too, and an app that installed the
|
|
59
|
-
// package without rebuilding renders a red "Unimplemented component:
|
|
60
|
-
// ExpoBlurView" box instead of a blur. `requireNativeModule` throws when
|
|
61
|
-
// that native half is missing, which is the only reliable way to tell the
|
|
62
|
-
// two apart, so probe it once and fall back to a plain dim otherwise.
|
|
63
|
-
let BlurView: any = null;
|
|
64
|
-
try {
|
|
65
|
-
const { requireNativeModule } = require('expo-modules-core');
|
|
66
|
-
requireNativeModule('ExpoBlur');
|
|
67
|
-
BlurView = require('expo-blur').BlurView ?? null;
|
|
68
|
-
} catch {
|
|
69
|
-
BlurView = null;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/** True when the frosted-glass layer is the real thing, not the dim. */
|
|
73
|
-
export const hasNativeBlur = () => !!BlurView;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Bottom-up darkening so white text stays readable over a photo.
|
|
77
|
-
*
|
|
78
|
-
* A single flat overlay (what this was) has a hard top edge that reads as
|
|
79
|
-
* "the bottom half of the picture is dark". There is no gradient
|
|
80
|
-
* dependency in this package, so it is stacked out of thin bands whose
|
|
81
|
-
* alpha ramps quadratically — at 16 bands over 220 pt the steps are below
|
|
82
|
-
* what the eye picks up on a photo.
|
|
83
|
-
*/
|
|
84
|
-
const ScrimGradient: React.FC = () => (
|
|
85
|
-
<View pointerEvents="none" style={styles.scrim}>
|
|
86
|
-
{Array.from({ length: SCRIM_BANDS }, (_, i) => (
|
|
87
|
-
<View
|
|
88
|
-
key={i}
|
|
89
|
-
style={{
|
|
90
|
-
height: SCRIM_HEIGHT / SCRIM_BANDS,
|
|
91
|
-
backgroundColor: `rgba(0,0,0,${(
|
|
92
|
-
SCRIM_MAX_ALPHA * ((i + 1) / SCRIM_BANDS) ** 2
|
|
93
|
-
).toFixed(3)})`,
|
|
94
|
-
}}
|
|
95
|
-
/>
|
|
96
|
-
))}
|
|
97
|
-
</View>
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
const FrostLayer: React.FC<{ tint?: 'dark' | 'light' }> = ({ tint = 'dark' }) =>
|
|
101
|
-
BlurView ? (
|
|
102
|
-
<>
|
|
103
|
-
<BlurView
|
|
104
|
-
intensity={BLUR_INTENSITY}
|
|
105
|
-
tint={tint}
|
|
106
|
-
style={StyleSheet.absoluteFill}
|
|
107
|
-
/>
|
|
108
|
-
<View style={[StyleSheet.absoluteFill, styles.frostDim]} />
|
|
109
|
-
</>
|
|
110
|
-
) : (
|
|
111
|
-
<View style={[StyleSheet.absoluteFill, styles.frostFallback]} />
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
export interface HeroAction {
|
|
115
|
-
key: string;
|
|
116
|
-
label: string;
|
|
117
|
-
/** Rendered inside a circle tinted for the current background. */
|
|
118
|
-
icon: (color: string) => React.ReactNode;
|
|
119
|
-
onPress: () => void;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
interface CommonProps {
|
|
123
|
-
title: string;
|
|
124
|
-
subtitle?: string;
|
|
125
|
-
imageUri?: string | null;
|
|
126
|
-
/** Background when the chat has no picture — one flat colour, no scrims. */
|
|
127
|
-
fallbackColor: string;
|
|
128
|
-
/** Two uppercase letters shown on that background. */
|
|
129
|
-
initials: string;
|
|
130
|
-
scrollY: Animated.Value;
|
|
131
|
-
/** Prefixes every testID, so each screen's tests address their own. */
|
|
132
|
-
testIDPrefix?: string;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/** Everything the screen needs to line its scroll content up with the bar. */
|
|
136
|
-
export const useHeaderMetrics = () => {
|
|
137
|
-
const insets = useSafeAreaInsets();
|
|
138
|
-
const barHeight = insets.top + TOP_BAR_BAND;
|
|
139
|
-
return {
|
|
140
|
-
insets,
|
|
141
|
-
barHeight,
|
|
142
|
-
/** Scroll distance between the expanded hero and the collapsed bar. */
|
|
143
|
-
collapseDistance: Math.max(HERO_HEIGHT - barHeight, 1),
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
const useCollapse = (scrollY: Animated.Value, collapseDistance: number) =>
|
|
148
|
-
scrollY.interpolate({
|
|
149
|
-
inputRange: [
|
|
150
|
-
Math.max(collapseDistance - COLLAPSE_RAMP, 0),
|
|
151
|
-
collapseDistance,
|
|
152
|
-
],
|
|
153
|
-
outputRange: [0, 1],
|
|
154
|
-
extrapolate: 'clamp',
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* The chat picture, blown up to a full-bleed hero with the name, member
|
|
159
|
-
* count and the round action buttons on top of it.
|
|
160
|
-
*
|
|
161
|
-
* It lives INSIDE the ScrollView (rather than behind it) so the action
|
|
162
|
-
* buttons stay tappable — an absolutely-positioned hero would sit under a
|
|
163
|
-
* full-screen scroll surface that swallows every touch. Parallax is done
|
|
164
|
-
* on the inner image instead: the wrapper keeps its layout height while
|
|
165
|
-
* the picture drifts at ~⅓ of the scroll speed, and over-scrolling
|
|
166
|
-
* upwards scales it up the way iOS profile headers do.
|
|
167
|
-
*/
|
|
168
|
-
export const ProfileHero: React.FC<
|
|
169
|
-
CommonProps & {
|
|
170
|
-
actions: HeroAction[];
|
|
171
|
-
/** Rendered to the right of the name (the profile's Leave button). */
|
|
172
|
-
titleAccessory?: React.ReactNode;
|
|
173
|
-
titleStyle?: StyleProp<TextStyle>;
|
|
174
|
-
subtitleStyle?: StyleProp<TextStyle>;
|
|
175
|
-
}
|
|
176
|
-
> = ({
|
|
177
|
-
title,
|
|
178
|
-
subtitle,
|
|
179
|
-
imageUri,
|
|
180
|
-
fallbackColor,
|
|
181
|
-
initials,
|
|
182
|
-
scrollY,
|
|
183
|
-
actions,
|
|
184
|
-
titleAccessory,
|
|
185
|
-
titleStyle,
|
|
186
|
-
subtitleStyle,
|
|
187
|
-
testIDPrefix = 'chat-profile',
|
|
188
|
-
}) => {
|
|
189
|
-
const { collapseDistance } = useHeaderMetrics();
|
|
190
|
-
const parallax = scrollY.interpolate({
|
|
191
|
-
inputRange: [0, HERO_HEIGHT],
|
|
192
|
-
outputRange: [0, HERO_HEIGHT * 0.35],
|
|
193
|
-
// Clamped on the left: with `extend` an over-scroll pulled the picture
|
|
194
|
-
// UP off its own bottom edge, exposing a band of the backdrop colour
|
|
195
|
-
// under it. Pulling down is the scale's job alone.
|
|
196
|
-
extrapolateLeft: 'clamp',
|
|
197
|
-
extrapolateRight: 'clamp',
|
|
198
|
-
});
|
|
199
|
-
const scale = scrollY.interpolate({
|
|
200
|
-
inputRange: [-HERO_HEIGHT, 0],
|
|
201
|
-
outputRange: [2, 1],
|
|
202
|
-
extrapolateRight: 'clamp',
|
|
203
|
-
});
|
|
204
|
-
// The name and buttons are gone well before the collapsed bar arrives,
|
|
205
|
-
// so the two never overlap mid-scroll.
|
|
206
|
-
const contentOpacity = scrollY.interpolate({
|
|
207
|
-
inputRange: [0, HERO_HEIGHT * 0.4],
|
|
208
|
-
outputRange: [1, 0],
|
|
209
|
-
extrapolate: 'clamp',
|
|
210
|
-
});
|
|
211
|
-
const collapsed = useCollapse(scrollY, collapseDistance);
|
|
212
|
-
|
|
213
|
-
// On a photo everything is white over a bottom scrim. On the flat
|
|
214
|
-
// fallback colour there is no scrim at all — that double-tone banding
|
|
215
|
-
// was two stacked scrims showing their seam — so the text takes
|
|
216
|
-
// whichever of black/white reads on that colour.
|
|
217
|
-
const onPhoto = !!imageUri;
|
|
218
|
-
const contentColor = onPhoto ? '#FFFFFF' : getAvatarTextColor(fallbackColor);
|
|
219
|
-
// The glyphs inside the circles are always white — several of the SDK's
|
|
220
|
-
// icons paint white regardless of their `color` prop, so tinting the
|
|
221
|
-
// rest to match the title left a mix of black and white glyphs in one
|
|
222
|
-
// row. The circle darkens instead, which keeps them readable on a light
|
|
223
|
-
// fill as well as on a photo.
|
|
224
|
-
const iconColor = '#FFFFFF';
|
|
225
|
-
const circleTint = onPhoto
|
|
226
|
-
? 'rgba(255,255,255,0.22)'
|
|
227
|
-
: contentColor === '#FFFFFF'
|
|
228
|
-
? 'rgba(255,255,255,0.22)'
|
|
229
|
-
: 'rgba(0,0,0,0.22)';
|
|
230
|
-
|
|
231
|
-
return (
|
|
232
|
-
<View style={[styles.hero, { backgroundColor: fallbackColor }]}>
|
|
233
|
-
<View style={[styles.backdropClip, { backgroundColor: fallbackColor }]}>
|
|
234
|
-
<Animated.View
|
|
235
|
-
style={[
|
|
236
|
-
styles.backdrop,
|
|
237
|
-
{
|
|
238
|
-
transform: [
|
|
239
|
-
{ translateY: parallax },
|
|
240
|
-
// Scale about the bottom edge (translate → scale →
|
|
241
|
-
// translate back, RN has no transform-origin) so pulling
|
|
242
|
-
// down grows the picture upwards into the exposed band by
|
|
243
|
-
// exactly the amount that band opened.
|
|
244
|
-
{ translateY: HERO_HEIGHT / 2 },
|
|
245
|
-
{ scale },
|
|
246
|
-
{ translateY: -HERO_HEIGHT / 2 },
|
|
247
|
-
],
|
|
248
|
-
},
|
|
249
|
-
]}
|
|
250
|
-
>
|
|
251
|
-
{onPhoto ? (
|
|
252
|
-
<Image
|
|
253
|
-
testID={`${testIDPrefix}-hero-image`}
|
|
254
|
-
source={{ uri: imageUri as string }}
|
|
255
|
-
style={StyleSheet.absoluteFill}
|
|
256
|
-
resizeMode="cover"
|
|
257
|
-
/>
|
|
258
|
-
) : (
|
|
259
|
-
<View style={styles.initialsWrap}>
|
|
260
|
-
<Text
|
|
261
|
-
testID={`${testIDPrefix}-hero-initials`}
|
|
262
|
-
style={[styles.heroInitials, { color: contentColor }]}
|
|
263
|
-
>
|
|
264
|
-
{initials}
|
|
265
|
-
</Text>
|
|
266
|
-
</View>
|
|
267
|
-
)}
|
|
268
|
-
</Animated.View>
|
|
269
|
-
|
|
270
|
-
{/* Frosts the picture as the header collapses — the same layer the
|
|
271
|
-
* collapsed bar sits on, so the transition reads as one motion.
|
|
272
|
-
* Only over a photo: there is nothing to blur on a flat colour,
|
|
273
|
-
* and the dim fallback would just darken it into a second shade
|
|
274
|
-
* of itself. */}
|
|
275
|
-
{onPhoto && (
|
|
276
|
-
<Animated.View
|
|
277
|
-
testID={`${testIDPrefix}-hero-blur`}
|
|
278
|
-
pointerEvents="none"
|
|
279
|
-
style={[StyleSheet.absoluteFill, { opacity: collapsed }]}
|
|
280
|
-
>
|
|
281
|
-
<FrostLayer />
|
|
282
|
-
</Animated.View>
|
|
283
|
-
)}
|
|
284
|
-
|
|
285
|
-
{onPhoto && <ScrimGradient />}
|
|
286
|
-
</View>
|
|
287
|
-
|
|
288
|
-
<Animated.View style={[styles.heroContent, { opacity: contentOpacity }]}>
|
|
289
|
-
<View style={styles.titleRow}>
|
|
290
|
-
<Text
|
|
291
|
-
numberOfLines={2}
|
|
292
|
-
style={[
|
|
293
|
-
styles.heroTitle,
|
|
294
|
-
styles.titleText,
|
|
295
|
-
{ color: contentColor },
|
|
296
|
-
titleStyle,
|
|
297
|
-
]}
|
|
298
|
-
>
|
|
299
|
-
{title}
|
|
300
|
-
</Text>
|
|
301
|
-
{titleAccessory}
|
|
302
|
-
</View>
|
|
303
|
-
{!!subtitle && (
|
|
304
|
-
<Text
|
|
305
|
-
style={[
|
|
306
|
-
styles.heroSubtitle,
|
|
307
|
-
{ color: contentColor, opacity: 0.85 },
|
|
308
|
-
subtitleStyle,
|
|
309
|
-
]}
|
|
310
|
-
>
|
|
311
|
-
{subtitle}
|
|
312
|
-
</Text>
|
|
313
|
-
)}
|
|
314
|
-
{actions.length > 0 && (
|
|
315
|
-
<View style={styles.actionsRow}>
|
|
316
|
-
{actions.map((action) => (
|
|
317
|
-
<TouchableOpacity
|
|
318
|
-
key={action.key}
|
|
319
|
-
testID={`${testIDPrefix}-action-${action.key}`}
|
|
320
|
-
activeOpacity={0.7}
|
|
321
|
-
style={styles.action}
|
|
322
|
-
onPress={action.onPress}
|
|
323
|
-
>
|
|
324
|
-
<View
|
|
325
|
-
style={[styles.actionCircle, { backgroundColor: circleTint }]}
|
|
326
|
-
>
|
|
327
|
-
{action.icon(iconColor)}
|
|
328
|
-
</View>
|
|
329
|
-
<Text style={[styles.actionLabel, { color: contentColor }]}>
|
|
330
|
-
{action.label}
|
|
331
|
-
</Text>
|
|
332
|
-
</TouchableOpacity>
|
|
333
|
-
))}
|
|
334
|
-
</View>
|
|
335
|
-
)}
|
|
336
|
-
</Animated.View>
|
|
337
|
-
</View>
|
|
338
|
-
);
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* The bar pinned over the hero: back button and the "…" menu are always
|
|
343
|
-
* there, while the frosted picture, small avatar and name fade in as the
|
|
344
|
-
* hero scrolls away — the collapsed state from the design's third screen.
|
|
345
|
-
*/
|
|
346
|
-
export const ProfileTopBar: React.FC<
|
|
347
|
-
CommonProps & {
|
|
348
|
-
onBack: () => void;
|
|
349
|
-
menu?: React.ReactNode;
|
|
350
|
-
titleStyle?: StyleProp<TextStyle>;
|
|
351
|
-
}
|
|
352
|
-
> = ({
|
|
353
|
-
title,
|
|
354
|
-
subtitle,
|
|
355
|
-
imageUri,
|
|
356
|
-
fallbackColor,
|
|
357
|
-
initials,
|
|
358
|
-
scrollY,
|
|
359
|
-
onBack,
|
|
360
|
-
menu,
|
|
361
|
-
titleStyle,
|
|
362
|
-
testIDPrefix = 'chat-profile',
|
|
363
|
-
}) => {
|
|
364
|
-
const { insets, barHeight, collapseDistance } = useHeaderMetrics();
|
|
365
|
-
const collapsed = useCollapse(scrollY, collapseDistance);
|
|
366
|
-
const rise = collapsed.interpolate({
|
|
367
|
-
inputRange: [0, 1],
|
|
368
|
-
outputRange: [10, 0],
|
|
369
|
-
});
|
|
370
|
-
const onPhoto = !!imageUri;
|
|
371
|
-
const contentColor = onPhoto ? '#FFFFFF' : getAvatarTextColor(fallbackColor);
|
|
372
|
-
|
|
373
|
-
return (
|
|
374
|
-
<View
|
|
375
|
-
pointerEvents="box-none"
|
|
376
|
-
style={[styles.topBar, { height: barHeight, paddingTop: insets.top }]}
|
|
377
|
-
>
|
|
378
|
-
{/* Background layer: the same picture, cropped to the bar and frosted,
|
|
379
|
-
* so nothing flips colour mid-scroll. */}
|
|
380
|
-
<Animated.View
|
|
381
|
-
pointerEvents="none"
|
|
382
|
-
style={[
|
|
383
|
-
StyleSheet.absoluteFill,
|
|
384
|
-
{ backgroundColor: fallbackColor, opacity: collapsed },
|
|
385
|
-
]}
|
|
386
|
-
>
|
|
387
|
-
{onPhoto && (
|
|
388
|
-
<>
|
|
389
|
-
<Image
|
|
390
|
-
source={{ uri: imageUri as string }}
|
|
391
|
-
style={StyleSheet.absoluteFill}
|
|
392
|
-
resizeMode="cover"
|
|
393
|
-
/>
|
|
394
|
-
<FrostLayer />
|
|
395
|
-
</>
|
|
396
|
-
)}
|
|
397
|
-
</Animated.View>
|
|
398
|
-
|
|
399
|
-
<View style={styles.topBarButtons}>
|
|
400
|
-
<TouchableOpacity
|
|
401
|
-
testID={`${testIDPrefix}-back`}
|
|
402
|
-
activeOpacity={0.7}
|
|
403
|
-
onPress={onBack}
|
|
404
|
-
style={styles.roundButton}
|
|
405
|
-
hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}
|
|
406
|
-
>
|
|
407
|
-
<BackIcon color="#FFFFFF" />
|
|
408
|
-
</TouchableOpacity>
|
|
409
|
-
<View style={styles.topBarRight}>{menu}</View>
|
|
410
|
-
</View>
|
|
411
|
-
|
|
412
|
-
{/* Avatar + name on their own row, as in the design's collapsed
|
|
413
|
-
* screen. It only appears once the hero has scrolled away, so it
|
|
414
|
-
* never competes with the big title over the picture. */}
|
|
415
|
-
<Animated.View
|
|
416
|
-
testID={`${testIDPrefix}-collapsed-title`}
|
|
417
|
-
pointerEvents="none"
|
|
418
|
-
style={[
|
|
419
|
-
styles.collapsedTitle,
|
|
420
|
-
{ opacity: collapsed, transform: [{ translateY: rise }] },
|
|
421
|
-
]}
|
|
422
|
-
>
|
|
423
|
-
<View style={styles.collapsedAvatar}>
|
|
424
|
-
{onPhoto ? (
|
|
425
|
-
<Image
|
|
426
|
-
source={{ uri: imageUri as string }}
|
|
427
|
-
style={styles.collapsedAvatarImage}
|
|
428
|
-
/>
|
|
429
|
-
) : (
|
|
430
|
-
<View
|
|
431
|
-
style={[
|
|
432
|
-
styles.collapsedAvatarImage,
|
|
433
|
-
styles.initialsWrap,
|
|
434
|
-
{ backgroundColor: fallbackColor },
|
|
435
|
-
]}
|
|
436
|
-
>
|
|
437
|
-
<Text style={[styles.collapsedInitials, { color: contentColor }]}>
|
|
438
|
-
{initials}
|
|
439
|
-
</Text>
|
|
440
|
-
</View>
|
|
441
|
-
)}
|
|
442
|
-
</View>
|
|
443
|
-
<View style={styles.collapsedText}>
|
|
444
|
-
<Text numberOfLines={1} style={[styles.collapsedName, titleStyle]}>
|
|
445
|
-
{title}
|
|
446
|
-
</Text>
|
|
447
|
-
{!!subtitle && (
|
|
448
|
-
<Text numberOfLines={1} style={styles.collapsedSubtitle}>
|
|
449
|
-
{subtitle}
|
|
450
|
-
</Text>
|
|
451
|
-
)}
|
|
452
|
-
</View>
|
|
453
|
-
</Animated.View>
|
|
454
|
-
</View>
|
|
455
|
-
);
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
const styles = StyleSheet.create({
|
|
459
|
-
hero: {
|
|
460
|
-
width: '100%',
|
|
461
|
-
height: HERO_HEIGHT,
|
|
462
|
-
justifyContent: 'flex-end',
|
|
463
|
-
},
|
|
464
|
-
// Reaches above the hero and clips its own contents, so the picture can
|
|
465
|
-
// grow up into the over-scroll band without spilling over the cards
|
|
466
|
-
// below when it parallaxes down.
|
|
467
|
-
backdropClip: {
|
|
468
|
-
position: 'absolute',
|
|
469
|
-
left: 0,
|
|
470
|
-
right: 0,
|
|
471
|
-
bottom: 0,
|
|
472
|
-
height: HERO_HEIGHT + OVERSCROLL_REACH,
|
|
473
|
-
overflow: 'hidden',
|
|
474
|
-
},
|
|
475
|
-
backdrop: {
|
|
476
|
-
position: 'absolute',
|
|
477
|
-
left: 0,
|
|
478
|
-
right: 0,
|
|
479
|
-
bottom: 0,
|
|
480
|
-
height: HERO_HEIGHT,
|
|
481
|
-
},
|
|
482
|
-
initialsWrap: {
|
|
483
|
-
...StyleSheet.absoluteFill,
|
|
484
|
-
alignItems: 'center',
|
|
485
|
-
justifyContent: 'center',
|
|
486
|
-
},
|
|
487
|
-
heroInitials: {
|
|
488
|
-
fontSize: 64,
|
|
489
|
-
fontWeight: '600',
|
|
490
|
-
// Sit in the upper half so the name below never collides with it.
|
|
491
|
-
marginBottom: 120,
|
|
492
|
-
},
|
|
493
|
-
frostDim: {
|
|
494
|
-
backgroundColor: FROST_DIM,
|
|
495
|
-
},
|
|
496
|
-
frostFallback: {
|
|
497
|
-
backgroundColor: 'rgba(0,0,0,0.35)',
|
|
498
|
-
},
|
|
499
|
-
// Only over a photo: keeps white text readable without tinting the flat
|
|
500
|
-
// fallback colour.
|
|
501
|
-
scrim: {
|
|
502
|
-
...StyleSheet.absoluteFill,
|
|
503
|
-
top: undefined,
|
|
504
|
-
height: SCRIM_HEIGHT,
|
|
505
|
-
justifyContent: 'flex-end',
|
|
506
|
-
},
|
|
507
|
-
heroContent: {
|
|
508
|
-
paddingHorizontal: 20,
|
|
509
|
-
paddingBottom: 20,
|
|
510
|
-
},
|
|
511
|
-
// The accessory (the profile's Leave button) is pushed to the far right;
|
|
512
|
-
// the name takes what is left of the row.
|
|
513
|
-
titleRow: {
|
|
514
|
-
flexDirection: 'row',
|
|
515
|
-
alignItems: 'center',
|
|
516
|
-
justifyContent: 'space-between',
|
|
517
|
-
gap: 12,
|
|
518
|
-
},
|
|
519
|
-
titleText: {
|
|
520
|
-
flexShrink: 1,
|
|
521
|
-
},
|
|
522
|
-
heroTitle: {
|
|
523
|
-
fontSize: 26,
|
|
524
|
-
fontWeight: '600',
|
|
525
|
-
},
|
|
526
|
-
heroSubtitle: {
|
|
527
|
-
fontSize: 14,
|
|
528
|
-
marginTop: 2,
|
|
529
|
-
},
|
|
530
|
-
// Centred: Search / Leave / Report.
|
|
531
|
-
actionsRow: {
|
|
532
|
-
flexDirection: 'row',
|
|
533
|
-
justifyContent: 'center',
|
|
534
|
-
marginTop: 20,
|
|
535
|
-
gap: 16,
|
|
536
|
-
},
|
|
537
|
-
action: {
|
|
538
|
-
alignItems: 'center',
|
|
539
|
-
width: 64,
|
|
540
|
-
},
|
|
541
|
-
actionCircle: {
|
|
542
|
-
width: 56,
|
|
543
|
-
height: 56,
|
|
544
|
-
borderRadius: 28,
|
|
545
|
-
alignItems: 'center',
|
|
546
|
-
justifyContent: 'center',
|
|
547
|
-
},
|
|
548
|
-
actionLabel: {
|
|
549
|
-
fontSize: 12,
|
|
550
|
-
marginTop: 6,
|
|
551
|
-
},
|
|
552
|
-
topBar: {
|
|
553
|
-
position: 'absolute',
|
|
554
|
-
top: 0,
|
|
555
|
-
left: 0,
|
|
556
|
-
right: 0,
|
|
557
|
-
zIndex: 10,
|
|
558
|
-
},
|
|
559
|
-
topBarButtons: {
|
|
560
|
-
height: TOP_BAR_BUTTONS,
|
|
561
|
-
flexDirection: 'row',
|
|
562
|
-
alignItems: 'flex-end',
|
|
563
|
-
paddingBottom: 4,
|
|
564
|
-
// 20 = the collapsed row's 16pt inset + half the difference between
|
|
565
|
-
// the 48pt avatar and these 40pt buttons, so a button's centre line
|
|
566
|
-
// matches the avatar's once the header is collapsed.
|
|
567
|
-
paddingHorizontal: 20,
|
|
568
|
-
},
|
|
569
|
-
roundButton: {
|
|
570
|
-
width: 40,
|
|
571
|
-
height: 40,
|
|
572
|
-
borderRadius: 20,
|
|
573
|
-
backgroundColor: 'rgba(0,0,0,0.28)',
|
|
574
|
-
alignItems: 'center',
|
|
575
|
-
justifyContent: 'center',
|
|
576
|
-
},
|
|
577
|
-
topBarRight: {
|
|
578
|
-
marginLeft: 'auto',
|
|
579
|
-
},
|
|
580
|
-
collapsedTitle: {
|
|
581
|
-
height: TOP_BAR_NAME,
|
|
582
|
-
flexDirection: 'row',
|
|
583
|
-
alignItems: 'center',
|
|
584
|
-
paddingHorizontal: 16,
|
|
585
|
-
gap: 12,
|
|
586
|
-
},
|
|
587
|
-
collapsedAvatar: {
|
|
588
|
-
width: 48,
|
|
589
|
-
height: 48,
|
|
590
|
-
borderRadius: 24,
|
|
591
|
-
overflow: 'hidden',
|
|
592
|
-
backgroundColor: 'rgba(255,255,255,0.2)',
|
|
593
|
-
},
|
|
594
|
-
collapsedAvatarImage: {
|
|
595
|
-
width: '100%',
|
|
596
|
-
height: '100%',
|
|
597
|
-
},
|
|
598
|
-
collapsedInitials: {
|
|
599
|
-
fontSize: 18,
|
|
600
|
-
fontWeight: '600',
|
|
601
|
-
},
|
|
602
|
-
collapsedText: {
|
|
603
|
-
flex: 1,
|
|
604
|
-
},
|
|
605
|
-
collapsedName: {
|
|
606
|
-
color: '#FFFFFF',
|
|
607
|
-
fontSize: 20,
|
|
608
|
-
fontWeight: '600',
|
|
609
|
-
},
|
|
610
|
-
collapsedSubtitle: {
|
|
611
|
-
color: 'rgba(255,255,255,0.8)',
|
|
612
|
-
fontSize: 13,
|
|
613
|
-
marginTop: 1,
|
|
614
|
-
},
|
|
615
|
-
});
|