@ethora/chat-component-rn 26.7.3 → 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 +26 -4
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +2 -1
- 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 +552 -213
- 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/helpers/getChatBackground.js +23 -0
- package/lib/commonjs/helpers/getChatBackground.js.map +1 -0
- package/lib/commonjs/helpers/mediaLibraryRuntime.js +31 -0
- package/lib/commonjs/helpers/mediaLibraryRuntime.js.map +1 -0
- package/lib/commonjs/helpers/sheetGestures.js +32 -0
- package/lib/commonjs/helpers/sheetGestures.js.map +1 -0
- 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/roomStore/chatSettingsSlice.js +3 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.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 +26 -4
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +2 -1
- 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 +555 -217
- 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/helpers/getChatBackground.js +18 -0
- package/lib/module/helpers/getChatBackground.js.map +1 -0
- package/lib/module/helpers/mediaLibraryRuntime.js +25 -0
- package/lib/module/helpers/mediaLibraryRuntime.js.map +1 -0
- package/lib/module/helpers/sheetGestures.js +26 -0
- package/lib/module/helpers/sheetGestures.js.map +1 -0
- 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/roomStore/chatSettingsSlice.js +3 -1
- package/lib/module/roomStore/chatSettingsSlice.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/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/helpers/getChatBackground.d.ts +15 -0
- package/lib/typescript/helpers/getChatBackground.d.ts.map +1 -0
- package/lib/typescript/helpers/mediaLibraryRuntime.d.ts +3 -0
- package/lib/typescript/helpers/mediaLibraryRuntime.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/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/roomStore/chatSettingsSlice.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +8 -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 +29 -7
- package/src/components/MainComponents/MessageList.tsx +2 -1
- 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 +598 -279
- 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/helpers/getChatBackground.ts +18 -0
- package/src/helpers/mediaLibraryRuntime.ts +25 -0
- package/src/helpers/sheetGestures.ts +25 -0
- package/src/i18n/strings.ts +121 -1
- package/src/networking/api-requests/user.api.ts +71 -0
- package/src/roomStore/chatSettingsSlice.ts +3 -1
- package/src/types/types.ts +8 -5
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _icons = require("../../../assets/icons");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
/** @format */
|
|
13
|
+
|
|
14
|
+
/** Fallbacks used for the very first frame, before the card is measured. */
|
|
15
|
+
const ESTIMATED_WIDTH = 220;
|
|
16
|
+
const ESTIMATED_HEIGHT = 160;
|
|
17
|
+
const GAP = 8;
|
|
18
|
+
/** Roughly a notch inset + the header band, used until measured. */
|
|
19
|
+
const DEFAULT_TOP = 104;
|
|
20
|
+
const EDGE = 12;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The "…" overflow menu shared by the chat and user profile screens.
|
|
24
|
+
*
|
|
25
|
+
* The shared `DropdownMenu` pins its card at a hard-coded `top: 95`, which
|
|
26
|
+
* on this screen landed it over the host's own tab bar, unanchored to the
|
|
27
|
+
* button. This one measures the button and grows the card out of it: the
|
|
28
|
+
* card scales up from its top-right corner (translate → scale → translate
|
|
29
|
+
* back, which is how you fake a transform-origin in React Native) so the
|
|
30
|
+
* menu visibly unfolds from the three dots.
|
|
31
|
+
*/
|
|
32
|
+
const ProfileMenu = ({
|
|
33
|
+
items,
|
|
34
|
+
testIDPrefix = 'chat-profile'
|
|
35
|
+
}) => {
|
|
36
|
+
const buttonRef = (0, _react.useRef)(null);
|
|
37
|
+
const [open, setOpen] = (0, _react.useState)(false);
|
|
38
|
+
const [anchor, setAnchor] = (0, _react.useState)({
|
|
39
|
+
top: DEFAULT_TOP,
|
|
40
|
+
right: EDGE
|
|
41
|
+
});
|
|
42
|
+
const [size, setSize] = (0, _react.useState)({
|
|
43
|
+
width: ESTIMATED_WIDTH,
|
|
44
|
+
height: ESTIMATED_HEIGHT
|
|
45
|
+
});
|
|
46
|
+
const progress = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
47
|
+
const animate = (to, done) => _reactNative.Animated.timing(progress, {
|
|
48
|
+
toValue: to,
|
|
49
|
+
duration: to ? 180 : 140,
|
|
50
|
+
easing: to ? _reactNative.Easing.out(_reactNative.Easing.back(1.3)) : _reactNative.Easing.in(_reactNative.Easing.quad),
|
|
51
|
+
useNativeDriver: true
|
|
52
|
+
}).start(({
|
|
53
|
+
finished
|
|
54
|
+
}) => finished && done?.());
|
|
55
|
+
|
|
56
|
+
// Anchor to the button's window frame — that is the same coordinate
|
|
57
|
+
// space the <Modal> lays out in, so no insets to subtract. Measured on
|
|
58
|
+
// layout (and again on open) rather than *before* opening: on some hosts
|
|
59
|
+
// the measure callback never fires, and gating the open on it would mean
|
|
60
|
+
// a menu that simply doesn't appear.
|
|
61
|
+
const measure = () => buttonRef.current?.measureInWindow?.((x, y, width, height) => {
|
|
62
|
+
if (typeof y !== 'number' || typeof x !== 'number') {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const screenWidth = _reactNative.Dimensions.get('window').width;
|
|
66
|
+
setAnchor({
|
|
67
|
+
top: y + height + GAP,
|
|
68
|
+
right: Math.max(screenWidth - (x + width), EDGE)
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
const openMenu = () => {
|
|
72
|
+
measure();
|
|
73
|
+
progress.setValue(0);
|
|
74
|
+
setOpen(true);
|
|
75
|
+
animate(1);
|
|
76
|
+
};
|
|
77
|
+
const closeMenu = then => animate(0, () => {
|
|
78
|
+
setOpen(false);
|
|
79
|
+
then?.();
|
|
80
|
+
});
|
|
81
|
+
const scale = progress.interpolate({
|
|
82
|
+
inputRange: [0, 1],
|
|
83
|
+
outputRange: [0.2, 1]
|
|
84
|
+
});
|
|
85
|
+
if (items.length === 0) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
89
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
90
|
+
ref: buttonRef,
|
|
91
|
+
collapsable: false,
|
|
92
|
+
onLayout: measure,
|
|
93
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
94
|
+
testID: `${testIDPrefix}-menu`,
|
|
95
|
+
activeOpacity: 0.7,
|
|
96
|
+
onPress: openMenu,
|
|
97
|
+
style: styles.button,
|
|
98
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.MoreIcon, {
|
|
99
|
+
color: "#FFFFFF"
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Modal, {
|
|
103
|
+
transparent: true,
|
|
104
|
+
visible: open,
|
|
105
|
+
animationType: "none",
|
|
106
|
+
onRequestClose: () => closeMenu(),
|
|
107
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
108
|
+
testID: `${testIDPrefix}-menu-backdrop`,
|
|
109
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
110
|
+
onPress: () => closeMenu()
|
|
111
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
112
|
+
testID: `${testIDPrefix}-menu-card`,
|
|
113
|
+
onLayout: e => {
|
|
114
|
+
const {
|
|
115
|
+
width,
|
|
116
|
+
height
|
|
117
|
+
} = e.nativeEvent.layout;
|
|
118
|
+
if (width && height) {
|
|
119
|
+
setSize({
|
|
120
|
+
width,
|
|
121
|
+
height
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
style: [styles.card, {
|
|
126
|
+
top: anchor.top,
|
|
127
|
+
right: anchor.right,
|
|
128
|
+
opacity: progress,
|
|
129
|
+
transform: [
|
|
130
|
+
// Move the origin to the card's top-right corner, scale
|
|
131
|
+
// there, then move back — RN has no transform-origin.
|
|
132
|
+
{
|
|
133
|
+
translateX: size.width / 2
|
|
134
|
+
}, {
|
|
135
|
+
translateY: -size.height / 2
|
|
136
|
+
}, {
|
|
137
|
+
scale
|
|
138
|
+
}, {
|
|
139
|
+
translateX: -size.width / 2
|
|
140
|
+
}, {
|
|
141
|
+
translateY: size.height / 2
|
|
142
|
+
}]
|
|
143
|
+
}],
|
|
144
|
+
children: items.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
145
|
+
testID: `${testIDPrefix}-menu-${item.key}`,
|
|
146
|
+
activeOpacity: 0.6,
|
|
147
|
+
style: [styles.row, index > 0 && styles.rowDivider],
|
|
148
|
+
onPress: () => closeMenu(item.onPress),
|
|
149
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
150
|
+
style: [styles.label, item.destructive && styles.destructive],
|
|
151
|
+
children: item.label
|
|
152
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
153
|
+
style: styles.icon,
|
|
154
|
+
children: item.icon
|
|
155
|
+
})]
|
|
156
|
+
}, item.key))
|
|
157
|
+
})]
|
|
158
|
+
})]
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
const styles = _reactNative.StyleSheet.create({
|
|
162
|
+
button: {
|
|
163
|
+
width: 40,
|
|
164
|
+
height: 40,
|
|
165
|
+
borderRadius: 20,
|
|
166
|
+
backgroundColor: 'rgba(0,0,0,0.28)',
|
|
167
|
+
alignItems: 'center',
|
|
168
|
+
justifyContent: 'center'
|
|
169
|
+
},
|
|
170
|
+
card: {
|
|
171
|
+
position: 'absolute',
|
|
172
|
+
minWidth: 200,
|
|
173
|
+
backgroundColor: '#FFFFFF',
|
|
174
|
+
borderRadius: 14,
|
|
175
|
+
paddingVertical: 4,
|
|
176
|
+
shadowColor: '#121219',
|
|
177
|
+
shadowOffset: {
|
|
178
|
+
width: 0,
|
|
179
|
+
height: 6
|
|
180
|
+
},
|
|
181
|
+
shadowOpacity: 0.18,
|
|
182
|
+
shadowRadius: 16,
|
|
183
|
+
elevation: 12
|
|
184
|
+
},
|
|
185
|
+
row: {
|
|
186
|
+
flexDirection: 'row',
|
|
187
|
+
alignItems: 'center',
|
|
188
|
+
justifyContent: 'space-between',
|
|
189
|
+
gap: 24,
|
|
190
|
+
paddingHorizontal: 16,
|
|
191
|
+
paddingVertical: 13
|
|
192
|
+
},
|
|
193
|
+
rowDivider: {
|
|
194
|
+
borderTopWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
195
|
+
borderTopColor: '#EFEFF2'
|
|
196
|
+
},
|
|
197
|
+
label: {
|
|
198
|
+
fontSize: 16,
|
|
199
|
+
color: '#141414'
|
|
200
|
+
},
|
|
201
|
+
destructive: {
|
|
202
|
+
color: '#E53935'
|
|
203
|
+
},
|
|
204
|
+
icon: {
|
|
205
|
+
width: 22,
|
|
206
|
+
alignItems: 'center'
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
var _default = exports.default = ProfileMenu;
|
|
210
|
+
//# sourceMappingURL=ProfileMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_icons","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ESTIMATED_WIDTH","ESTIMATED_HEIGHT","GAP","DEFAULT_TOP","EDGE","ProfileMenu","items","testIDPrefix","buttonRef","useRef","open","setOpen","useState","anchor","setAnchor","top","right","size","setSize","width","height","progress","Animated","Value","current","animate","to","done","timing","toValue","duration","easing","Easing","out","back","in","quad","useNativeDriver","start","finished","measure","measureInWindow","x","y","screenWidth","Dimensions","Math","max","openMenu","setValue","closeMenu","then","scale","interpolate","inputRange","outputRange","length","jsxs","Fragment","children","jsx","View","ref","collapsable","onLayout","TouchableOpacity","testID","activeOpacity","onPress","style","styles","button","MoreIcon","color","Modal","transparent","visible","animationType","onRequestClose","Pressable","StyleSheet","absoluteFill","nativeEvent","layout","card","opacity","transform","translateX","translateY","map","item","index","key","row","rowDivider","Text","label","destructive","icon","create","borderRadius","backgroundColor","alignItems","justifyContent","position","minWidth","paddingVertical","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","flexDirection","gap","paddingHorizontal","borderTopWidth","hairlineWidth","borderTopColor","fontSize","_default","exports"],"sourceRoot":"../../../../../src","sources":["components/Modals/ProfileHeader/ProfileMenu.tsx"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAWA,IAAAE,MAAA,GAAAF,OAAA;AAAiD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CA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K,EAAE;EACT,CAAC;EACDyB,IAAI,EAAE;IACJ/E,KAAK,EAAE,EAAE;IACTmF,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAAC,IAAAiB,QAAA,GAAAC,OAAA,CAAAjI,OAAA,GAEYc,WAAW","ignoreList":[]}
|
|
@@ -18,7 +18,9 @@ var _reactNative = require("react-native");
|
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
21
|
-
const SelectUsersModal = (
|
|
21
|
+
const SelectUsersModal = ({
|
|
22
|
+
trigger
|
|
23
|
+
}) => {
|
|
22
24
|
const {
|
|
23
25
|
showToast
|
|
24
26
|
} = (0, _ToastContext.useToast)();
|
|
@@ -63,7 +65,7 @@ const SelectUsersModal = () => {
|
|
|
63
65
|
setIsLoading(false);
|
|
64
66
|
};
|
|
65
67
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
66
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styledModalComponents.ActionButton, {
|
|
68
|
+
children: [trigger ? trigger(handleOpenModal) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledModalComponents.ActionButton, {
|
|
67
69
|
variant: "filled",
|
|
68
70
|
unstyled: true,
|
|
69
71
|
onPress: handleOpenModal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactRedux","_roomStore","_styledModalComponents","_Button","_interopRequireDefault","_UsersList","_Loader","_rooms","_ToastContext","_roomsSlice","_reactNative","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SelectUsersModal","showToast","useToast","dispatch","useDispatch","loading","setIsLoading","useState","isModalOpen","setIsModalOpen","selectedUsers","setSelectedUsers","activeRoom","useSelector","state","getActiveRoom","handleOpenModal","handleCloseModal","handleAdd","existingXmppUsernames","members","map","member","xmppUsername","usersArray","filter","user","includes","newMembers","postAddRoomMember","chatName","jid","split","updateRoom","updates","usersCnt","length","id","Date","now","toString","title","message","type","duration","error","console","jsxs","Fragment","children","jsx","ActionButton","variant","unstyled","onPress","ModalBackground","ModalContainer","CloseButton","Text","style","fontSize","GroupContainer","flexDirection","position","width","minHeight","minWidth","maxHeight","headerElement","text","_default","exports"],"sourceRoot":"../../../../../src","sources":["components/Modals/SelectUsersModal/SelectUsersModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AAOA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,UAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,OAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AAAoC,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAK,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAd,wBAAAc,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAlB,uBAAA,YAAAA,CAAAc,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAG,CAAA,OAAAK,CAAA,IAAAD,CAAA,GAAAS,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAG,CAAA,OAAAK,CAAA,CAAAI,GAAA,IAAAJ,CAAA,CAAAK,GAAA,IAAAN,CAAA,CAAAE,CAAA,EAAAN,CAAA,EAAAK,CAAA,IAAAC,CAAA,CAAAN,CAAA,IAAAH,CAAA,CAAAG,CAAA,WAAAM,CAAA,KAAAT,CAAA,EAAAG,CAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactRedux","_roomStore","_styledModalComponents","_Button","_interopRequireDefault","_UsersList","_Loader","_rooms","_ToastContext","_roomsSlice","_reactNative","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SelectUsersModal","trigger","showToast","useToast","dispatch","useDispatch","loading","setIsLoading","useState","isModalOpen","setIsModalOpen","selectedUsers","setSelectedUsers","activeRoom","useSelector","state","getActiveRoom","handleOpenModal","handleCloseModal","handleAdd","existingXmppUsernames","members","map","member","xmppUsername","usersArray","filter","user","includes","newMembers","postAddRoomMember","chatName","jid","split","updateRoom","updates","usersCnt","length","id","Date","now","toString","title","message","type","duration","error","console","jsxs","Fragment","children","jsx","ActionButton","variant","unstyled","onPress","ModalBackground","ModalContainer","CloseButton","Text","style","fontSize","GroupContainer","flexDirection","position","width","minHeight","minWidth","maxHeight","headerElement","text","_default","exports"],"sourceRoot":"../../../../../src","sources":["components/Modals/SelectUsersModal/SelectUsersModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AAOA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,UAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,OAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AAAoC,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAK,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAd,wBAAAc,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAlB,uBAAA,YAAAA,CAAAc,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAA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