@ethora/chat-component-rn 26.7.2 → 26.7.4
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 +45 -0
- package/README.md +9 -8
- package/lib/commonjs/assets/icons.js +7 -2
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/Header/HeaderRoomList.js +20 -6
- package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +86 -7
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatWrapper.js +18 -0
- package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +11 -4
- package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js +5 -5
- package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +62 -32
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +208 -70
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +307 -99
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +544 -200
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +226 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +6 -2
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.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/NewChatModal/NewChatModal.js +202 -104
- package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +556 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +210 -0
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +507 -244
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +74 -46
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/commonjs/components/Modals/styledModalComponents.js +9 -2
- package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +17 -7
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/commonjs/components/styled/SendInput.js +80 -1
- package/lib/commonjs/components/styled/SendInput.js.map +1 -1
- package/lib/commonjs/components/styled/StyledComponents.js +9 -3
- package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +12 -0
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/helpers/getChatBackground.js +23 -0
- package/lib/commonjs/helpers/getChatBackground.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/mediaLibraryRuntime.js +31 -0
- package/lib/commonjs/helpers/mediaLibraryRuntime.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/useChatWrapperInit.js +15 -0
- 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/useSendMessage.js +27 -1
- package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
- package/lib/commonjs/hooks/useUnreadMessagesCounter.js +6 -1
- package/lib/commonjs/hooks/useUnreadMessagesCounter.js.map +1 -1
- package/lib/commonjs/i18n/strings.js +121 -1
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/networking/api-requests/user.api.js +59 -0
- package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js +6 -2
- package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.js +3 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/commonjs/roomStore/roomsSlice.js +2 -2
- package/lib/commonjs/roomStore/roomsSlice.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/Header/HeaderRoomList.js +20 -6
- package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +87 -8
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/ChatWrapper.js +19 -1
- package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +11 -4
- package/lib/module/components/MainComponents/MessageList.js.map +1 -1
- package/lib/module/components/MainComponents/ProfileImagePlaceholder.js +5 -5
- package/lib/module/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +62 -32
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/Menu/HeaderRoomListMenu.js +211 -73
- package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js +298 -102
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +547 -204
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +223 -0
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +6 -2
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.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/NewChatModal/NewChatModal.js +205 -106
- package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +548 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +205 -0
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +509 -248
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +76 -48
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/module/components/Modals/styledModalComponents.js +9 -2
- package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +17 -7
- package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/module/components/styled/SendInput.js +80 -1
- package/lib/module/components/styled/SendInput.js.map +1 -1
- package/lib/module/components/styled/StyledComponents.js +9 -3
- package/lib/module/components/styled/StyledComponents.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/module/context/xmppProvider.js +12 -0
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/helpers/getChatBackground.js +18 -0
- package/lib/module/helpers/getChatBackground.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/mediaLibraryRuntime.js +25 -0
- package/lib/module/helpers/mediaLibraryRuntime.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/useChatWrapperInit.js +15 -0
- 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/useSendMessage.js +28 -2
- package/lib/module/hooks/useSendMessage.js.map +1 -1
- package/lib/module/hooks/useUnreadMessagesCounter.js +6 -1
- package/lib/module/hooks/useUnreadMessagesCounter.js.map +1 -1
- package/lib/module/i18n/strings.js +121 -1
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/networking/api-requests/user.api.js +56 -0
- package/lib/module/networking/api-requests/user.api.js.map +1 -1
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js +6 -2
- package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/roomStore/chatSettingsSlice.js +3 -1
- package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/module/roomStore/roomsSlice.js +1 -1
- package/lib/module/roomStore/roomsSlice.js.map +1 -1
- package/lib/typescript/assets/icons.d.ts +12 -0
- package/lib/typescript/assets/icons.d.ts.map +1 -1
- package/lib/typescript/components/Header/HeaderRoomList.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/MessageList.d.ts +10 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/Menu/HeaderRoomListMenu.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/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/Modal/Modal.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/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/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.map +1 -1
- package/lib/typescript/components/RoomComponents/ChatRoomItem.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/context/xmppProvider.d.ts.map +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/historyPreloadScheduler.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/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/useChatWrapperInit.d.ts.map +1 -1
- package/lib/typescript/hooks/useComposing.d.ts.map +1 -1
- package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
- 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/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/xmpp/flushLastViewedToPrivateStore.d.ts +1 -0
- package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts +1 -0
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
- package/lib/typescript/roomStore/roomsSlice.d.ts +1 -0
- package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +9 -5
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/assets/icons.tsx +29 -9
- package/src/components/Header/HeaderRoomList.tsx +20 -5
- package/src/components/MainComponents/ChatRoom.tsx +92 -8
- package/src/components/MainComponents/ChatWrapper.tsx +19 -1
- package/src/components/MainComponents/MessageList.tsx +21 -3
- package/src/components/MainComponents/ProfileImagePlaceholder.tsx +5 -5
- package/src/components/MainComponents/RoomList.tsx +65 -34
- package/src/components/Menu/HeaderRoomListMenu.tsx +209 -64
- package/src/components/Modals/AttachSheet/AttachSheet.tsx +318 -86
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +599 -278
- package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +244 -0
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +4 -2
- package/src/components/Modals/Modal/Modal.tsx +7 -0
- package/src/components/Modals/NewChatModal/NewChatModal.tsx +219 -117
- package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +615 -0
- package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +217 -0
- package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +14 -4
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +617 -307
- package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +75 -58
- package/src/components/Modals/styledModalComponents.tsx +9 -2
- package/src/components/RoomComponents/ChatRoomItem.tsx +14 -7
- package/src/components/styled/SendInput.tsx +83 -2
- package/src/components/styled/StyledComponents.ts +9 -3
- package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +11 -4
- package/src/context/xmppProvider.tsx +14 -0
- package/src/helpers/getChatBackground.ts +18 -0
- package/src/helpers/historyPreloadScheduler.ts +80 -3
- package/src/helpers/mediaLibraryRuntime.ts +25 -0
- package/src/helpers/shallowEqual.ts +33 -0
- package/src/helpers/sheetGestures.ts +25 -0
- package/src/hooks/useChatWrapperInit.ts +15 -0
- package/src/hooks/useComposing.tsx +37 -1
- package/src/hooks/useSendMessage.tsx +32 -2
- package/src/hooks/useUnreadMessagesCounter.ts +11 -0
- package/src/i18n/strings.ts +121 -1
- package/src/networking/api-requests/user.api.ts +71 -0
- package/src/networking/xmpp/flushLastViewedToPrivateStore.ts +17 -3
- package/src/networking/xmppClient.ts +5 -1
- package/src/roomStore/chatSettingsSlice.ts +3 -1
- package/src/roomStore/roomsSlice.ts +1 -1
- package/src/types/types.ts +16 -5
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** @format */
|
|
4
|
+
|
|
5
|
+
import React, { useRef, useState } from 'react';
|
|
6
|
+
import { Animated, Dimensions, Easing, Modal, Pressable, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
7
|
+
import { MoreIcon } from '../../../assets/icons';
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
+
/** Fallbacks used for the very first frame, before the card is measured. */
|
|
10
|
+
const ESTIMATED_WIDTH = 220;
|
|
11
|
+
const ESTIMATED_HEIGHT = 160;
|
|
12
|
+
const GAP = 8;
|
|
13
|
+
/** Roughly a notch inset + the header band, used until measured. */
|
|
14
|
+
const DEFAULT_TOP = 104;
|
|
15
|
+
const EDGE = 12;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The "…" overflow menu shared by the chat and user profile screens.
|
|
19
|
+
*
|
|
20
|
+
* The shared `DropdownMenu` pins its card at a hard-coded `top: 95`, which
|
|
21
|
+
* on this screen landed it over the host's own tab bar, unanchored to the
|
|
22
|
+
* button. This one measures the button and grows the card out of it: the
|
|
23
|
+
* card scales up from its top-right corner (translate → scale → translate
|
|
24
|
+
* back, which is how you fake a transform-origin in React Native) so the
|
|
25
|
+
* menu visibly unfolds from the three dots.
|
|
26
|
+
*/
|
|
27
|
+
const ProfileMenu = ({
|
|
28
|
+
items,
|
|
29
|
+
testIDPrefix = 'chat-profile'
|
|
30
|
+
}) => {
|
|
31
|
+
const buttonRef = useRef(null);
|
|
32
|
+
const [open, setOpen] = useState(false);
|
|
33
|
+
const [anchor, setAnchor] = useState({
|
|
34
|
+
top: DEFAULT_TOP,
|
|
35
|
+
right: EDGE
|
|
36
|
+
});
|
|
37
|
+
const [size, setSize] = useState({
|
|
38
|
+
width: ESTIMATED_WIDTH,
|
|
39
|
+
height: ESTIMATED_HEIGHT
|
|
40
|
+
});
|
|
41
|
+
const progress = useRef(new Animated.Value(0)).current;
|
|
42
|
+
const animate = (to, done) => Animated.timing(progress, {
|
|
43
|
+
toValue: to,
|
|
44
|
+
duration: to ? 180 : 140,
|
|
45
|
+
easing: to ? Easing.out(Easing.back(1.3)) : Easing.in(Easing.quad),
|
|
46
|
+
useNativeDriver: true
|
|
47
|
+
}).start(({
|
|
48
|
+
finished
|
|
49
|
+
}) => finished && done?.());
|
|
50
|
+
|
|
51
|
+
// Anchor to the button's window frame — that is the same coordinate
|
|
52
|
+
// space the <Modal> lays out in, so no insets to subtract. Measured on
|
|
53
|
+
// layout (and again on open) rather than *before* opening: on some hosts
|
|
54
|
+
// the measure callback never fires, and gating the open on it would mean
|
|
55
|
+
// a menu that simply doesn't appear.
|
|
56
|
+
const measure = () => buttonRef.current?.measureInWindow?.((x, y, width, height) => {
|
|
57
|
+
if (typeof y !== 'number' || typeof x !== 'number') {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const screenWidth = Dimensions.get('window').width;
|
|
61
|
+
setAnchor({
|
|
62
|
+
top: y + height + GAP,
|
|
63
|
+
right: Math.max(screenWidth - (x + width), EDGE)
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
const openMenu = () => {
|
|
67
|
+
measure();
|
|
68
|
+
progress.setValue(0);
|
|
69
|
+
setOpen(true);
|
|
70
|
+
animate(1);
|
|
71
|
+
};
|
|
72
|
+
const closeMenu = then => animate(0, () => {
|
|
73
|
+
setOpen(false);
|
|
74
|
+
then?.();
|
|
75
|
+
});
|
|
76
|
+
const scale = progress.interpolate({
|
|
77
|
+
inputRange: [0, 1],
|
|
78
|
+
outputRange: [0.2, 1]
|
|
79
|
+
});
|
|
80
|
+
if (items.length === 0) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
84
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
85
|
+
ref: buttonRef,
|
|
86
|
+
collapsable: false,
|
|
87
|
+
onLayout: measure,
|
|
88
|
+
children: /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
89
|
+
testID: `${testIDPrefix}-menu`,
|
|
90
|
+
activeOpacity: 0.7,
|
|
91
|
+
onPress: openMenu,
|
|
92
|
+
style: styles.button,
|
|
93
|
+
children: /*#__PURE__*/_jsx(MoreIcon, {
|
|
94
|
+
color: "#FFFFFF"
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
}), /*#__PURE__*/_jsxs(Modal, {
|
|
98
|
+
transparent: true,
|
|
99
|
+
visible: open,
|
|
100
|
+
animationType: "none",
|
|
101
|
+
onRequestClose: () => closeMenu(),
|
|
102
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
103
|
+
testID: `${testIDPrefix}-menu-backdrop`,
|
|
104
|
+
style: StyleSheet.absoluteFill,
|
|
105
|
+
onPress: () => closeMenu()
|
|
106
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
107
|
+
testID: `${testIDPrefix}-menu-card`,
|
|
108
|
+
onLayout: e => {
|
|
109
|
+
const {
|
|
110
|
+
width,
|
|
111
|
+
height
|
|
112
|
+
} = e.nativeEvent.layout;
|
|
113
|
+
if (width && height) {
|
|
114
|
+
setSize({
|
|
115
|
+
width,
|
|
116
|
+
height
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
style: [styles.card, {
|
|
121
|
+
top: anchor.top,
|
|
122
|
+
right: anchor.right,
|
|
123
|
+
opacity: progress,
|
|
124
|
+
transform: [
|
|
125
|
+
// Move the origin to the card's top-right corner, scale
|
|
126
|
+
// there, then move back — RN has no transform-origin.
|
|
127
|
+
{
|
|
128
|
+
translateX: size.width / 2
|
|
129
|
+
}, {
|
|
130
|
+
translateY: -size.height / 2
|
|
131
|
+
}, {
|
|
132
|
+
scale
|
|
133
|
+
}, {
|
|
134
|
+
translateX: -size.width / 2
|
|
135
|
+
}, {
|
|
136
|
+
translateY: size.height / 2
|
|
137
|
+
}]
|
|
138
|
+
}],
|
|
139
|
+
children: items.map((item, index) => /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
140
|
+
testID: `${testIDPrefix}-menu-${item.key}`,
|
|
141
|
+
activeOpacity: 0.6,
|
|
142
|
+
style: [styles.row, index > 0 && styles.rowDivider],
|
|
143
|
+
onPress: () => closeMenu(item.onPress),
|
|
144
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
145
|
+
style: [styles.label, item.destructive && styles.destructive],
|
|
146
|
+
children: item.label
|
|
147
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
148
|
+
style: styles.icon,
|
|
149
|
+
children: item.icon
|
|
150
|
+
})]
|
|
151
|
+
}, item.key))
|
|
152
|
+
})]
|
|
153
|
+
})]
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
const styles = StyleSheet.create({
|
|
157
|
+
button: {
|
|
158
|
+
width: 40,
|
|
159
|
+
height: 40,
|
|
160
|
+
borderRadius: 20,
|
|
161
|
+
backgroundColor: 'rgba(0,0,0,0.28)',
|
|
162
|
+
alignItems: 'center',
|
|
163
|
+
justifyContent: 'center'
|
|
164
|
+
},
|
|
165
|
+
card: {
|
|
166
|
+
position: 'absolute',
|
|
167
|
+
minWidth: 200,
|
|
168
|
+
backgroundColor: '#FFFFFF',
|
|
169
|
+
borderRadius: 14,
|
|
170
|
+
paddingVertical: 4,
|
|
171
|
+
shadowColor: '#121219',
|
|
172
|
+
shadowOffset: {
|
|
173
|
+
width: 0,
|
|
174
|
+
height: 6
|
|
175
|
+
},
|
|
176
|
+
shadowOpacity: 0.18,
|
|
177
|
+
shadowRadius: 16,
|
|
178
|
+
elevation: 12
|
|
179
|
+
},
|
|
180
|
+
row: {
|
|
181
|
+
flexDirection: 'row',
|
|
182
|
+
alignItems: 'center',
|
|
183
|
+
justifyContent: 'space-between',
|
|
184
|
+
gap: 24,
|
|
185
|
+
paddingHorizontal: 16,
|
|
186
|
+
paddingVertical: 13
|
|
187
|
+
},
|
|
188
|
+
rowDivider: {
|
|
189
|
+
borderTopWidth: StyleSheet.hairlineWidth,
|
|
190
|
+
borderTopColor: '#EFEFF2'
|
|
191
|
+
},
|
|
192
|
+
label: {
|
|
193
|
+
fontSize: 16,
|
|
194
|
+
color: '#141414'
|
|
195
|
+
},
|
|
196
|
+
destructive: {
|
|
197
|
+
color: '#E53935'
|
|
198
|
+
},
|
|
199
|
+
icon: {
|
|
200
|
+
width: 22,
|
|
201
|
+
alignItems: 'center'
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
export default ProfileMenu;
|
|
205
|
+
//# sourceMappingURL=ProfileMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useRef","useState","Animated","Dimensions","Easing","Modal","Pressable","StyleSheet","Text","TouchableOpacity","View","MoreIcon","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ESTIMATED_WIDTH","ESTIMATED_HEIGHT","GAP","DEFAULT_TOP","EDGE","ProfileMenu","items","testIDPrefix","buttonRef","open","setOpen","anchor","setAnchor","top","right","size","setSize","width","height","progress","Value","current","animate","to","done","timing","toValue","duration","easing","out","back","in","quad","useNativeDriver","start","finished","measure","measureInWindow","x","y","screenWidth","get","Math","max","openMenu","setValue","closeMenu","then","scale","interpolate","inputRange","outputRange","length","children","ref","collapsable","onLayout","testID","activeOpacity","onPress","style","styles","button","color","transparent","visible","animationType","onRequestClose","absoluteFill","e","nativeEvent","layout","card","opacity","transform","translateX","translateY","map","item","index","key","row","rowDivider","label","destructive","icon","create","borderRadius","backgroundColor","alignItems","justifyContent","position","minWidth","paddingVertical","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","flexDirection","gap","paddingHorizontal","borderTopWidth","hairlineWidth","borderTopColor","fontSize"],"sourceRoot":"../../../../../src","sources":["components/Modals/ProfileHeader/ProfileMenu.tsx"],"mappings":";;AAAA;;AAEA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/C,SACEC,QAAQ,EACRC,UAAU,EACVC,MAAM,EACNC,KAAK,EACLC,SAAS,EACTC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,QACC,cAAc;AACrB,SAASC,QAAQ,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAUjD;AACA,MAAMC,eAAe,GAAG,GAAG;AAC3B,MAAMC,gBAAgB,GAAG,GAAG;AAC5B,MAAMC,GAAG,GAAG,CAAC;AACb;AACA,MAAMC,WAAW,GAAG,GAAG;AACvB,MAA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AAQ,EAAE,GAAG;IACbJ,eAAe,EAAE,SAAS;IAC1BD,YAAY,EAAE,EAAE;IAChBM,eAAe,EAAE,CAAC;IAClBC,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE;MAAE9E,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrC8E,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE;EACb,CAAC;EACDjB,GAAG,EAAE;IACHkB,aAAa,EAAE,KAAK;IACpBV,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BU,GAAG,EAAE,EAAE;IACPC,iBAAiB,EAAE,EAAE;IACrBR,eAAe,EAAE;EACnB,CAAC;EACDX,UAAU,EAAE;IACVoB,cAAc,EAAEjH,UAAU,CAACkH,aAAa;IACxCC,cAAc,EAAE;EAClB,CAAC;EACDrB,KAAK,EAAE;IACLsB,QAAQ,EAAE,EAAE;IACZ1C,KAAK,EAAE;EACT,CAAC;EACDqB,WAAW,EAAE;IACXrB,KAAK,EAAE;EACT,CAAC;EACDsB,IAAI,EAAE;IACJpE,KAAK,EAAE,EAAE;IACTwE,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAepF,WAAW","ignoreList":[]}
|
|
@@ -12,7 +12,9 @@ import { useToast } from '../../../context/ToastContext';
|
|
|
12
12
|
import { updateRoom } from '../../../roomStore/roomsSlice';
|
|
13
13
|
import { Text } from 'react-native';
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
|
-
const SelectUsersModal = (
|
|
15
|
+
const SelectUsersModal = ({
|
|
16
|
+
trigger
|
|
17
|
+
}) => {
|
|
16
18
|
const {
|
|
17
19
|
showToast
|
|
18
20
|
} = useToast();
|
|
@@ -57,7 +59,7 @@ const SelectUsersModal = () => {
|
|
|
57
59
|
setIsLoading(false);
|
|
58
60
|
};
|
|
59
61
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
60
|
-
children: [/*#__PURE__*/_jsx(ActionButton, {
|
|
62
|
+
children: [trigger ? trigger(handleOpenModal) : /*#__PURE__*/_jsx(ActionButton, {
|
|
61
63
|
variant: "filled",
|
|
62
64
|
unstyled: true,
|
|
63
65
|
onPress: handleOpenModal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","useDispatch","useSelector","getActiveRoom","ActionButton","CloseButton","GroupContainer","ModalBackground","ModalContainer","Button","UsersList","Loader","postAddRoomMember","useToast","updateRoom","Text","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SelectUsersModal","showToast","dispatch","loading","setIsLoading","isModalOpen","setIsModalOpen","selectedUsers","setSelectedUsers","activeRoom","state","handleOpenModal","handleCloseModal","handleAdd","existingXmppUsernames","members","map","member","xmppUsername","usersArray","filter","user","includes","newMembers","chatName","jid","split","updates","usersCnt","length","id","Date","now","toString","title","message","type","duration","error","console","children","variant","unstyled","onPress","style","fontSize","flexDirection","position","width","minHeight","minWidth","maxHeight","headerElement","text"],"sourceRoot":"../../../../../src","sources":["components/Modals/SelectUsersModal/SelectUsersModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AACtD,SAASC,aAAa,QAAmB,oBAAoB;AAC7D,SACEC,YAAY,EACZC,WAAW,EACXC,cAAc,EACdC,eAAe,EACfC,cAAc,QACT,0BAA0B;AACjC,OAAOC,MAAM,MAAM,qBAAqB;AAExC,OAAOC,SAAS,MAAM,2BAA2B;AACjD,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,iBAAiB,QAAQ,4CAA4C;AAC9E,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,UAAU,QAAQ,+BAA+B;AAC1D,SAASC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;
|
|
1
|
+
{"version":3,"names":["React","useState","useDispatch","useSelector","getActiveRoom","ActionButton","CloseButton","GroupContainer","ModalBackground","ModalContainer","Button","UsersList","Loader","postAddRoomMember","useToast","updateRoom","Text","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SelectUsersModal","trigger","showToast","dispatch","loading","setIsLoading","isModalOpen","setIsModalOpen","selectedUsers","setSelectedUsers","activeRoom","state","handleOpenModal","handleCloseModal","handleAdd","existingXmppUsernames","members","map","member","xmppUsername","usersArray","filter","user","includes","newMembers","chatName","jid","split","updates","usersCnt","length","id","Date","now","toString","title","message","type","duration","error","console","children","variant","unstyled","onPress","style","fontSize","flexDirection","position","width","minHeight","minWidth","maxHeight","headerElement","text"],"sourceRoot":"../../../../../src","sources":["components/Modals/SelectUsersModal/SelectUsersModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AACtD,SAASC,aAAa,QAAmB,oBAAoB;AAC7D,SACEC,YAAY,EACZC,WAAW,EACXC,cAAc,EACdC,eAAe,EACfC,cAAc,QACT,0BAA0B;AACjC,OAAOC,MAAM,MAAM,qBAAqB;AAExC,OAAOC,SAAS,MAAM,2BAA2B;AACjD,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,iBAAiB,QAAQ,4CAA4C;AAC9E,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,UAAU,QAAQ,+BAA+B;AAC1D,SAASC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAQpC,MAAMC,gBAAiD,GAAGA,CAAC;EAAEC;AAAQ,CAAC,KAAK;EACzE,MAAM;IAAEC;EAAU,CAAC,GAAGX,QAAQ,CAAC,CAAC;EAChC,MAAMY,QAAQ,GAAGxB,WAA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