@ethora/chat-component-rn 26.4.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/LICENSE +661 -0
- package/README.md +148 -0
- package/empty-shim.js +15 -0
- package/index.js +13 -0
- package/metro.js +72 -0
- package/package.json +99 -0
- package/src/api.config.ts +34 -0
- package/src/assets/BG.png +0 -0
- package/src/assets/BG.tsx +56 -0
- package/src/assets/File.svg +4 -0
- package/src/assets/ForzaCare.png +0 -0
- package/src/assets/ForzaCare.tsx +27 -0
- package/src/assets/icons.tsx +685 -0
- package/src/assets/images.tsx +41 -0
- package/src/assets/test.xml +243 -0
- package/src/components/AuthForms/Login.tsx +295 -0
- package/src/components/AuthForms/LoginAnonym.tsx +68 -0
- package/src/components/AuthForms/Register.tsx +8 -0
- package/src/components/ContextMenu/ContextMenuComponents.tsx +87 -0
- package/src/components/DropdownMenu/DropdownMenu.tsx +244 -0
- package/src/components/ExampleComponents/CustomMessage.tsx +92 -0
- package/src/components/ExampleComponents/CustomTypingIndicatorExamples.tsx +239 -0
- package/src/components/Header/HeaderRoomList.tsx +104 -0
- package/src/components/InputComponents/AudioInput.tsx +24 -0
- package/src/components/InputComponents/AudioRecorder.tsx +100 -0
- package/src/components/InputComponents/MediaInput.tsx +114 -0
- package/src/components/InputComponents/RecordingIndicator.tsx +77 -0
- package/src/components/InputComponents/Search.tsx +135 -0
- package/src/components/InputComponents/TextInput.tsx +66 -0
- package/src/components/MainComponents/ChatHeader.tsx +163 -0
- package/src/components/MainComponents/ChatRoom.tsx +392 -0
- package/src/components/MainComponents/ChatWrapper.tsx +318 -0
- package/src/components/MainComponents/ChooseChatMessage.tsx +44 -0
- package/src/components/MainComponents/ConnectionBanner.tsx +33 -0
- package/src/components/MainComponents/EditWrapper.tsx +72 -0
- package/src/components/MainComponents/LoginWrapper.tsx +134 -0
- package/src/components/MainComponents/MediaMessage.tsx +55 -0
- package/src/components/MainComponents/MessageContainer.tsx +122 -0
- package/src/components/MainComponents/MessageList.tsx +429 -0
- package/src/components/MainComponents/NoMessagesPlaceholder.tsx +49 -0
- package/src/components/MainComponents/ProfileImagePlaceholder.tsx +143 -0
- package/src/components/MainComponents/RNStyled.tsx +34 -0
- package/src/components/MainComponents/ReduxWrapper.tsx +40 -0
- package/src/components/MainComponents/RoomList.tsx +246 -0
- package/src/components/MainComponents/Select.tsx +165 -0
- package/src/components/MainComponents/Switch.tsx +73 -0
- package/src/components/MainComponents/SystemMessage.tsx +42 -0
- package/src/components/Menu/HeaderRoomListMenu.tsx +169 -0
- package/src/components/MenuRoom/MenuRoom.tsx +46 -0
- package/src/components/MessageBubble/Avatar.tsx +84 -0
- package/src/components/MessageBubble/BottomReplyContainer.tsx +117 -0
- package/src/components/MessageBubble/CustomDivider.tsx +10 -0
- package/src/components/MessageBubble/DeletedMessage.tsx +36 -0
- package/src/components/MessageBubble/Message.tsx +400 -0
- package/src/components/MessageBubble/MessageInteractions.tsx +247 -0
- package/src/components/MessageBubble/MessageReaction.tsx +149 -0
- package/src/components/MessageBubble/MessageReply.tsx +50 -0
- package/src/components/MessageBubble/MessageTranslations.tsx +30 -0
- package/src/components/Modals/AddMembersModal/AddMembersModal.tsx +142 -0
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +471 -0
- package/src/components/Modals/ChatProfileModal/DeleteChatModal.tsx +91 -0
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +298 -0
- package/src/components/Modals/Modal/Modal.tsx +52 -0
- package/src/components/Modals/ModalHeaderComponent.tsx +41 -0
- package/src/components/Modals/ModalSelectMedia/ModalSelectMedia.tsx +285 -0
- package/src/components/Modals/ModalWrapper/ModalWrapper.tsx +103 -0
- package/src/components/Modals/NewChatModal/ModalContent.tsx +151 -0
- package/src/components/Modals/NewChatModal/NewChatModal.tsx +391 -0
- package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +136 -0
- package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +134 -0
- package/src/components/Modals/SettingsModals/BlockedUsers/BlockedUsersModal.tsx +63 -0
- package/src/components/Modals/SettingsModals/DocumentShares/DocumentSharesModal.tsx +115 -0
- package/src/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.tsx +121 -0
- package/src/components/Modals/SettingsModals/ManageDataModal/StyledComponents.ts +0 -0
- package/src/components/Modals/SettingsModals/ProfileShares/ProfileShares.tsx +65 -0
- package/src/components/Modals/SettingsModals/Referrals/Referrals.tsx +90 -0
- package/src/components/Modals/SettingsModals/SharedStyledComponents.ts +74 -0
- package/src/components/Modals/SettingsModals/Visibility/RadioInput.tsx +59 -0
- package/src/components/Modals/SettingsModals/Visibility/StyledComponents.ts +32 -0
- package/src/components/Modals/SettingsModals/Visibility/VisibilityModal.tsx +146 -0
- package/src/components/Modals/UserProfileModal/EditUserModal.tsx +163 -0
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +410 -0
- package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +85 -0
- package/src/components/Modals/styledModalComponents.tsx +181 -0
- package/src/components/OperationalModal/OperationalModal.tsx +78 -0
- package/src/components/RoomComponents/ChatRoomItem.tsx +219 -0
- package/src/components/RoomComponents/LastMessageItem.tsx +47 -0
- package/src/components/RoomComponents/styled/LastAudioMessage.tsx +62 -0
- package/src/components/RoomComponents/styled/LastMessageEmoji.tsx +26 -0
- package/src/components/RoomComponents/styled/LastMessageFile.tsx +54 -0
- package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +54 -0
- package/src/components/RoomComponents/styled/LastMessageVideo.tsx +70 -0
- package/src/components/RoomComponents/styled/LastTextMessage.tsx +65 -0
- package/src/components/RoomComponents/styled/StyledRoomComponents.ts +53 -0
- package/src/components/SortDropDown/index.tsx +76 -0
- package/src/components/Thread/ThreadHeader.tsx +41 -0
- package/src/components/Thread/ThreadWrapper.tsx +270 -0
- package/src/components/Toast/Toast.tsx +128 -0
- package/src/components/Toast/index.ts +13 -0
- package/src/components/UsersList/StyledComponents.ts +30 -0
- package/src/components/UsersList/UsersList.tsx +112 -0
- package/src/components/styled/ActionButton.tsx +40 -0
- package/src/components/styled/AudioMessage.tsx +82 -0
- package/src/components/styled/Button.tsx +107 -0
- package/src/components/styled/ChatWrapperBox.tsx +9 -0
- package/src/components/styled/DateLabel.tsx +77 -0
- package/src/components/styled/Loader.tsx +65 -0
- package/src/components/styled/MediaFilePreview.tsx +42 -0
- package/src/components/styled/MediaModal.tsx +54 -0
- package/src/components/styled/MessageImage.tsx +54 -0
- package/src/components/styled/NewMessageLabel.tsx +50 -0
- package/src/components/styled/RoomListComponents/index.tsx +164 -0
- package/src/components/styled/SendInput.tsx +297 -0
- package/src/components/styled/StyledComponents.ts +320 -0
- package/src/components/styled/StyledInput.tsx +101 -0
- package/src/components/styled/StyledInputComponents/AudioComponents.tsx +1 -0
- package/src/components/styled/StyledInputComponents/Composing.tsx +97 -0
- package/src/components/styled/StyledInputComponents/CustomTypingIndicator.tsx +261 -0
- package/src/components/styled/StyledInputComponents/MediaComponents.tsx +90 -0
- package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +131 -0
- package/src/components/styled/StyledInputComponents/VideoComponents.tsx +49 -0
- package/src/components/styled/TreadLabel.tsx +50 -0
- package/src/components/styled/UnsupportedType.tsx +95 -0
- package/src/components/styled/VideoMessage.tsx +68 -0
- package/src/context/MessageNotificationContext.tsx +335 -0
- package/src/context/PushNotificationProvider.tsx +78 -0
- package/src/context/ToastContext.tsx +63 -0
- package/src/context/toastProvider.tsx +0 -0
- package/src/context/xmppProvider.tsx +364 -0
- package/src/helpers/block_scroll.ts +95 -0
- package/src/helpers/chatAutoEnterer.ts +46 -0
- package/src/helpers/checkUniqueUsers.tsx +31 -0
- package/src/helpers/constants/CHAT_TYPES.ts +6 -0
- package/src/helpers/constants/LANGUAGE_OPTIONS.ts +14 -0
- package/src/helpers/constants/LOCAL_STORAGE.ts +3 -0
- package/src/helpers/constants/MESSAGE_INTERACTIONS.ts +29 -0
- package/src/helpers/constants/MODAL_TYPES.ts +57 -0
- package/src/helpers/constants/PLATFORM_CONSTANTS.ts +3 -0
- package/src/helpers/createMainMessageForThread.ts +23 -0
- package/src/helpers/createMessageFromXml.ts +118 -0
- package/src/helpers/createRoomFromApi.tsx +27 -0
- package/src/helpers/createUserNameFromSetUser.ts +15 -0
- package/src/helpers/dateComparison.ts +12 -0
- package/src/helpers/debounce.ts +10 -0
- package/src/helpers/ensureScopedChatCache.ts +61 -0
- package/src/helpers/extractUniqueMembersFromRooms.ts +45 -0
- package/src/helpers/formatNumberWithCommas.ts +3 -0
- package/src/helpers/getBooleanFromString.ts +7 -0
- package/src/helpers/getDataFromXml.ts +80 -0
- package/src/helpers/getNumberFromString.ts +5 -0
- package/src/helpers/getRoomsWithRetry.ts +45 -0
- package/src/helpers/getTintedColor.ts +28 -0
- package/src/helpers/getUnnamedUsers.ts +39 -0
- package/src/helpers/handleCopyClick.ts +3 -0
- package/src/helpers/handleXmppError.ts +14 -0
- package/src/helpers/hashcolor.ts +34 -0
- package/src/helpers/historyPreloadScheduler.ts +264 -0
- package/src/helpers/initRoomsPresence.ts +32 -0
- package/src/helpers/initXmppRooms.tsx +71 -0
- package/src/helpers/insertMessageWithDelimiter.ts +96 -0
- package/src/helpers/isChatIdPresentInArray.ts +54 -0
- package/src/helpers/localStorageUser.ts +9 -0
- package/src/helpers/markdownParser.tsx +295 -0
- package/src/helpers/nanoToMs.ts +3 -0
- package/src/helpers/parseMessageBody.tsx +516 -0
- package/src/helpers/parseUrls.tsx +42 -0
- package/src/helpers/resolveInitBeforeLoadUser.ts +240 -0
- package/src/helpers/storeConsole.ts +26 -0
- package/src/helpers/transformTranslatations.ts +16 -0
- package/src/helpers/updateMessagesTillLast.tsx +104 -0
- package/src/helpers/updatedChatLastTimestamps.ts +29 -0
- package/src/helpers/validator.ts +20 -0
- package/src/helpers/walletUsername.ts +12 -0
- package/src/hooks/hooks.ts +6 -0
- package/src/hooks/useChatSettingState.tsx +38 -0
- package/src/hooks/useChatWrapperInit.ts +266 -0
- package/src/hooks/useComposing.tsx +59 -0
- package/src/hooks/useCustomTypingIndicator.tsx +193 -0
- package/src/hooks/useEventHandlers.tsx +81 -0
- package/src/hooks/useGetNewArchRoom.tsx +57 -0
- package/src/hooks/useHeapSender.tsx +88 -0
- package/src/hooks/useLocalStorage.tsx +53 -0
- package/src/hooks/useLogout.tsx +31 -0
- package/src/hooks/useMessageHeapState.tsx +11 -0
- package/src/hooks/useMessageLoaderQueue.tsx +90 -0
- package/src/hooks/useMessageQueue.ts +146 -0
- package/src/hooks/usePendingNotification.ts +49 -0
- package/src/hooks/usePrevious.tsx +15 -0
- package/src/hooks/usePushNotifications.ts +106 -0
- package/src/hooks/useQRCodeChatHandler.ts +58 -0
- package/src/hooks/useRoomInitialization.tsx +160 -0
- package/src/hooks/useRoomState.tsx +47 -0
- package/src/hooks/useRoomUrl.tsx +41 -0
- package/src/hooks/useSendMessage.tsx +306 -0
- package/src/hooks/useUnreadMessagesCounter.ts +55 -0
- package/src/hooks/useXmppInitialization.ts +148 -0
- package/src/main.ts +45 -0
- package/src/networking/api-requests/auth.api.ts +140 -0
- package/src/networking/api-requests/push.api.ts +55 -0
- package/src/networking/api-requests/roomMembers.api.ts +20 -0
- package/src/networking/api-requests/rooms.api.ts +142 -0
- package/src/networking/api-requests/user.api.ts +65 -0
- package/src/networking/apiClient.ts +149 -0
- package/src/networking/helpers/refreshChecker.ts +13 -0
- package/src/networking/stanzaHandlers.ts +418 -0
- package/src/networking/xmpp/actionSetTimestampToPrivateStore.xmpp.ts +37 -0
- package/src/networking/xmpp/allRoomPresences.xmpp.ts +10 -0
- package/src/networking/xmpp/createPrivateRoom.xmpp.ts +26 -0
- package/src/networking/xmpp/createRoom.xmpp.ts +35 -0
- package/src/networking/xmpp/createRoomPresence.xmpp.ts +74 -0
- package/src/networking/xmpp/createTimeoutPromise.xmpp.ts +15 -0
- package/src/networking/xmpp/deleteMessage.xmpp.ts +19 -0
- package/src/networking/xmpp/editMessage.xmpp.ts +46 -0
- package/src/networking/xmpp/getChatsPrivateStoreRequest.xmpp.ts +57 -0
- package/src/networking/xmpp/getHistory.xmpp.ts +140 -0
- package/src/networking/xmpp/getLastMessageArchive.xmpp.ts +24 -0
- package/src/networking/xmpp/getRoomInfo.xmpp.ts +15 -0
- package/src/networking/xmpp/getRoomMembers.xmpp.ts +13 -0
- package/src/networking/xmpp/getRooms.xmpp.ts +43 -0
- package/src/networking/xmpp/getRoomsPaged.xmpp.ts +59 -0
- package/src/networking/xmpp/handlePong.xmpp.ts +7 -0
- package/src/networking/xmpp/handleStanzas.xmpp.ts +55 -0
- package/src/networking/xmpp/inviteRoomRequest.xmpp.ts +25 -0
- package/src/networking/xmpp/leaveTheRoom.xmpp.ts +15 -0
- package/src/networking/xmpp/listenerManager.ts +116 -0
- package/src/networking/xmpp/presenceInRoom.xmpp.ts +57 -0
- package/src/networking/xmpp/roomConfig.xmpp.ts +71 -0
- package/src/networking/xmpp/sendMediaMessage.xmpp.ts +97 -0
- package/src/networking/xmpp/sendMessageReaction.xmpp.ts +41 -0
- package/src/networking/xmpp/sendPing.xmpp.ts +21 -0
- package/src/networking/xmpp/sendTextMessage.xmpp.ts +99 -0
- package/src/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.ts +44 -0
- package/src/networking/xmpp/sendTypingRequest.xmpp.ts +26 -0
- package/src/networking/xmpp/setChatsPrivateStoreRequest.xmpp.ts +48 -0
- package/src/networking/xmpp/setMeAsOwner.xmpp.ts +52 -0
- package/src/networking/xmpp/setRoomImage.xmpp.ts +26 -0
- package/src/networking/xmpp/setVCard.xmpp.ts +19 -0
- package/src/networking/xmpp/subscribeToRoomMessages.xmpp.ts +75 -0
- package/src/networking/xmppClient.ts +603 -0
- package/src/roomStore/Middleware/logoutMiddleware.tsx +24 -0
- package/src/roomStore/Middleware/newMessageMidlleware.tsx +87 -0
- package/src/roomStore/Middleware/reactionsMiddleware.tsx +77 -0
- package/src/roomStore/Middleware/testMiddleware.tsx +20 -0
- package/src/roomStore/Middleware/unreadMidlleware.tsx +58 -0
- package/src/roomStore/chatSettingsSlice.ts +178 -0
- package/src/roomStore/index.ts +68 -0
- package/src/roomStore/persistence.ts +152 -0
- package/src/roomStore/roomHeapSlice.ts +37 -0
- package/src/roomStore/roomsSlice.ts +353 -0
- package/src/services/pushNotifications.ts +170 -0
- package/src/services/pushSubscriptionService.ts +145 -0
- package/src/types/messages.ts +61 -0
- package/src/types/models/action.model.ts +30 -0
- package/src/types/models/config.model.ts +16 -0
- package/src/types/models/customComponents.model.ts +53 -0
- package/src/types/models/language.model.ts +11 -0
- package/src/types/models/media.model.ts +5 -0
- package/src/types/models/message.model.ts +69 -0
- package/src/types/models/modal.model.ts +9 -0
- package/src/types/models/room.model.ts +120 -0
- package/src/types/models/user.model.ts +90 -0
- package/src/types/models/xmpp.model.ts +155 -0
- package/src/types/types.ts +505 -0
- package/src/utils/PriorityQueue.ts +47 -0
- package/src/utils/actionHelpers.ts +40 -0
- package/src/utils/actionLogger.ts +64 -0
- package/src/utils/clientRegistry.ts +80 -0
- package/src/utils/devLogger.ts +197 -0
- package/src/utils/messageNotificationManager.ts +108 -0
- package/src/utils/resendMessage.ts +87 -0
- package/src/utils/toastEmitter.ts +27 -0
- package/src/utils/xmppMemoryMonitor.ts +63 -0
- package/src/version.ts +1 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
CenterContainer,
|
|
4
|
+
UserInfo,
|
|
5
|
+
UserName,
|
|
6
|
+
UserStatus,
|
|
7
|
+
ModalContainerFullScreen,
|
|
8
|
+
ActionButton,
|
|
9
|
+
Label,
|
|
10
|
+
BorderedContainer,
|
|
11
|
+
LabelData,
|
|
12
|
+
ModalBackground,
|
|
13
|
+
ModalContainer,
|
|
14
|
+
CloseButton,
|
|
15
|
+
ModalTitle,
|
|
16
|
+
GroupContainer,
|
|
17
|
+
} from '../styledModalComponents';
|
|
18
|
+
import { ChatIcon, DeleteIcon, DownloadIcon, EditIcon, IconDoc, LeaveIcon, MoreIcon } from '../../../assets/icons';
|
|
19
|
+
import ModalHeaderComponent from '../ModalHeaderComponent';
|
|
20
|
+
import { useSelector } from 'react-redux';
|
|
21
|
+
import { RootState } from '../../../roomStore';
|
|
22
|
+
import { ProfileImagePlaceholder } from '../../MainComponents/ProfileImagePlaceholder';
|
|
23
|
+
import Button from '../../styled/Button';
|
|
24
|
+
import DropdownMenu from '../../DropdownMenu/DropdownMenu';
|
|
25
|
+
import {
|
|
26
|
+
logout,
|
|
27
|
+
setActiveModal,
|
|
28
|
+
setLangSource,
|
|
29
|
+
setSelectedUser,
|
|
30
|
+
} from '../../../roomStore/chatSettingsSlice';
|
|
31
|
+
import { addRoomViaApi, setCurrentRoom, setLogoutState } from '../../../roomStore/roomsSlice';
|
|
32
|
+
import EditUserModal from './EditUserModal';
|
|
33
|
+
import { walletToUsername } from '../../../helpers/walletUsername';
|
|
34
|
+
import { useXmppClient } from '../../../context/xmppProvider';
|
|
35
|
+
import Loader from '../../styled/Loader';
|
|
36
|
+
import { ApiRoom, IRoom, Iso639_1Codes } from '../../../types/types';
|
|
37
|
+
import Select from '../../MainComponents/Select';
|
|
38
|
+
import { useAppDispatch, useAppSelector } from '../../../hooks/hooks';
|
|
39
|
+
import { ScrollView, Text, View } from 'react-native';
|
|
40
|
+
import { postPrivateRoom } from '../../../networking/api-requests/rooms.api';
|
|
41
|
+
import { createRoomFromApi } from '../../../helpers/createRoomFromApi';
|
|
42
|
+
import { useToast } from '../../../context/ToastContext';
|
|
43
|
+
import { LANGUAGE_OPTIONS } from '../../../helpers/constants/LANGUAGE_OPTIONS';
|
|
44
|
+
import { deleteDocument, getDocuments } from '../../../networking/api-requests/user.api';
|
|
45
|
+
import { useChatSettingState } from '../../../hooks/useChatSettingState';
|
|
46
|
+
import { DateTime } from 'luxon';
|
|
47
|
+
|
|
48
|
+
interface UserProfileModalProps {
|
|
49
|
+
handleCloseModal: any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const UserProfileModal: React.FC<UserProfileModalProps> = ({
|
|
53
|
+
handleCloseModal,
|
|
54
|
+
}) => {
|
|
55
|
+
const dispatch = useAppDispatch();
|
|
56
|
+
|
|
57
|
+
const { client } = useXmppClient();
|
|
58
|
+
const { showToast } = useToast();
|
|
59
|
+
|
|
60
|
+
const { config, user, selectedUser, langSource } = useChatSettingState();
|
|
61
|
+
|
|
62
|
+
const [isEditing, setIsEditing] = useState<boolean>(false);
|
|
63
|
+
const [documents, setDocuments] = useState<any[]>([]);
|
|
64
|
+
const [deleteDocumentId, setDeleteDocumentId] = useState<string>('');
|
|
65
|
+
const [showDelete, setShowDelete] = useState<boolean>(false);
|
|
66
|
+
|
|
67
|
+
const handleDeleteDocument = async () => {
|
|
68
|
+
try {
|
|
69
|
+
await deleteDocument(deleteDocumentId);
|
|
70
|
+
setDocuments(documents.filter((doc) => doc._id !== deleteDocumentId));
|
|
71
|
+
showToast({
|
|
72
|
+
id: Date.now().toString(),
|
|
73
|
+
title: 'Success',
|
|
74
|
+
message: 'Document deleted successfully',
|
|
75
|
+
type: 'success',
|
|
76
|
+
});
|
|
77
|
+
// handleGetDocs();
|
|
78
|
+
} catch (error) {
|
|
79
|
+
console.error('Error deleting document', error);
|
|
80
|
+
showToast({
|
|
81
|
+
id: Date.now().toString(),
|
|
82
|
+
title: 'Error',
|
|
83
|
+
message: 'Failed to delete document',
|
|
84
|
+
type: 'error',
|
|
85
|
+
});
|
|
86
|
+
} finally {
|
|
87
|
+
setShowDelete(false);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const handleGetDocs = async () => {
|
|
92
|
+
try {
|
|
93
|
+
const { data } = await getDocuments(user?.defaultWallet?.walletAddress);
|
|
94
|
+
const items = data.results.filter((el: {locations: unknown[]}) => el.locations[0]);
|
|
95
|
+
|
|
96
|
+
setDocuments(items);
|
|
97
|
+
} catch (error) {
|
|
98
|
+
console.error('Error getting docs', error);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
handleGetDocs();
|
|
104
|
+
}, []);
|
|
105
|
+
|
|
106
|
+
const handleBackClick = useCallback(() => {
|
|
107
|
+
dispatch(setSelectedUser());
|
|
108
|
+
handleCloseModal();
|
|
109
|
+
}, []);
|
|
110
|
+
|
|
111
|
+
const handleLogout = useCallback(() => {
|
|
112
|
+
dispatch(logout());
|
|
113
|
+
dispatch(setLogoutState());
|
|
114
|
+
}, []);
|
|
115
|
+
|
|
116
|
+
const menuOptions = useMemo(
|
|
117
|
+
() => [
|
|
118
|
+
{
|
|
119
|
+
label: 'Log Out',
|
|
120
|
+
icon: <LeaveIcon />,
|
|
121
|
+
onClick: () => {
|
|
122
|
+
handleLogout();
|
|
123
|
+
},
|
|
124
|
+
styles: { color: 'red' },
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
[]
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
const handleSelect = (selected: { name: string; id: Iso639_1Codes }) => {
|
|
131
|
+
dispatch(setLangSource(selected.id));
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const EditClick = useCallback(() => {
|
|
135
|
+
setIsEditing(true);
|
|
136
|
+
}, []);
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
const handleRoomCreation = async (
|
|
140
|
+
newChat: ApiRoom,
|
|
141
|
+
usersArrayLength: number
|
|
142
|
+
) => {
|
|
143
|
+
try {
|
|
144
|
+
const normalizedChat = createRoomFromApi(
|
|
145
|
+
newChat,
|
|
146
|
+
config?.xmppSettings?.conference,
|
|
147
|
+
usersArrayLength
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
dispatch(
|
|
151
|
+
addRoomViaApi({
|
|
152
|
+
room: normalizedChat as IRoom,
|
|
153
|
+
xmpp: client,
|
|
154
|
+
})
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
dispatch(setCurrentRoom({ roomJID: normalizedChat?.jid || '' }));
|
|
158
|
+
|
|
159
|
+
showToast({
|
|
160
|
+
id: Date.now().toString(),
|
|
161
|
+
title: 'Success!',
|
|
162
|
+
message: 'Room created succusfully!',
|
|
163
|
+
type: 'success',
|
|
164
|
+
duration: 3000,
|
|
165
|
+
});
|
|
166
|
+
} catch (error) {
|
|
167
|
+
console.error('Error handling room creation:', error);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const handlePrivateMessage = useCallback(async () => {
|
|
172
|
+
showToast({
|
|
173
|
+
id: Date.now().toString(),
|
|
174
|
+
title: 'Room creation',
|
|
175
|
+
message: 'Room is being created...',
|
|
176
|
+
type: 'info',
|
|
177
|
+
duration: 3000,
|
|
178
|
+
});
|
|
179
|
+
let newRoomJid = '';
|
|
180
|
+
if (config?.newArch) {
|
|
181
|
+
const newRoom = await postPrivateRoom(
|
|
182
|
+
selectedUser?.userJID ?? (selectedUser?.id || '')
|
|
183
|
+
);
|
|
184
|
+
handleRoomCreation(newRoom, 2);
|
|
185
|
+
newRoomJid = newRoom.name;
|
|
186
|
+
} else {
|
|
187
|
+
const selectedUserUsername = walletToUsername(selectedUser?.id || '');
|
|
188
|
+
const myUsername = walletToUsername(user.defaultWallet.walletAddress);
|
|
189
|
+
|
|
190
|
+
const combinedWalletAddress = [myUsername, selectedUserUsername]
|
|
191
|
+
.sort()
|
|
192
|
+
.join('.');
|
|
193
|
+
|
|
194
|
+
const roomJid = combinedWalletAddress.toLowerCase();
|
|
195
|
+
|
|
196
|
+
const combinedUsersName = [
|
|
197
|
+
user.firstName,
|
|
198
|
+
selectedUser?.name?.split(' ')?.[0] || '',
|
|
199
|
+
]
|
|
200
|
+
.sort()
|
|
201
|
+
.join(' and ');
|
|
202
|
+
|
|
203
|
+
newRoomJid = await client.createPrivateRoomStanza(
|
|
204
|
+
combinedUsersName,
|
|
205
|
+
`Private chat ${combinedUsersName}`,
|
|
206
|
+
roomJid
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
if (newRoomJid) {
|
|
210
|
+
await client.inviteRoomRequestStanza(selectedUserUsername, newRoomJid);
|
|
211
|
+
await client.getRoomsStanza();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
dispatch(setActiveModal());
|
|
216
|
+
}, [selectedUser]);
|
|
217
|
+
|
|
218
|
+
const modalUser: any = selectedUser ?? user;
|
|
219
|
+
|
|
220
|
+
const findLanguage = () => {
|
|
221
|
+
if(!langSource) {return null;}
|
|
222
|
+
|
|
223
|
+
const language = LANGUAGE_OPTIONS.find((lang) => lang.id === langSource);
|
|
224
|
+
return language || null;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const showDeleteModal = (docId: string) => {
|
|
228
|
+
setDeleteDocumentId(docId);
|
|
229
|
+
setShowDelete(true);
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
const DefaultBody = useMemo(
|
|
233
|
+
() => (
|
|
234
|
+
<>
|
|
235
|
+
<ModalHeaderComponent
|
|
236
|
+
handleCloseModal={handleBackClick}
|
|
237
|
+
headerTitle={'Profile'}
|
|
238
|
+
rightMenu={
|
|
239
|
+
!selectedUser && (
|
|
240
|
+
<>
|
|
241
|
+
<Button onPress={EditClick}>
|
|
242
|
+
<EditIcon color="#8C8C8C" />
|
|
243
|
+
</Button>
|
|
244
|
+
<DropdownMenu
|
|
245
|
+
options={menuOptions}
|
|
246
|
+
position="right"
|
|
247
|
+
menuIcon={<MoreIcon />}
|
|
248
|
+
/>
|
|
249
|
+
</>
|
|
250
|
+
)
|
|
251
|
+
}
|
|
252
|
+
/>
|
|
253
|
+
<CenterContainer>
|
|
254
|
+
<ProfileImagePlaceholder
|
|
255
|
+
icon={modalUser?.profileImage ?? null}
|
|
256
|
+
name={modalUser?.name ?? modalUser?.firstName}
|
|
257
|
+
size={120}
|
|
258
|
+
/>
|
|
259
|
+
<UserInfo>
|
|
260
|
+
<UserName>
|
|
261
|
+
{modalUser?.name
|
|
262
|
+
? `${modalUser?.name}`
|
|
263
|
+
: `${modalUser?.firstName} ${modalUser?.lastName}`}
|
|
264
|
+
</UserName>
|
|
265
|
+
{/* <UserStatus>Status</UserStatus> */}
|
|
266
|
+
</UserInfo>
|
|
267
|
+
{!selectedUser && config?.translates?.enabled && (
|
|
268
|
+
<BorderedContainer>
|
|
269
|
+
<Select
|
|
270
|
+
options={LANGUAGE_OPTIONS}
|
|
271
|
+
placeholder={'Select your language'}
|
|
272
|
+
onSelect={handleSelect}
|
|
273
|
+
accentColor={config?.colors?.primary}
|
|
274
|
+
selectedValue={findLanguage()}
|
|
275
|
+
/>
|
|
276
|
+
</BorderedContainer>
|
|
277
|
+
)}
|
|
278
|
+
<BorderedContainer>
|
|
279
|
+
<Label>About</Label>
|
|
280
|
+
<LabelData>
|
|
281
|
+
{modalUser?.description && modalUser?.description?.length > 4
|
|
282
|
+
? modalUser.description
|
|
283
|
+
: 'No description'}
|
|
284
|
+
</LabelData>
|
|
285
|
+
</BorderedContainer>
|
|
286
|
+
|
|
287
|
+
{selectedUser && (
|
|
288
|
+
<>
|
|
289
|
+
<ActionButton
|
|
290
|
+
StartIcon={<ChatIcon />}
|
|
291
|
+
onPress={handlePrivateMessage}
|
|
292
|
+
variant="filled"
|
|
293
|
+
>
|
|
294
|
+
<Text style={{ color: '#ffffff' }}>Message</Text>
|
|
295
|
+
</ActionButton>
|
|
296
|
+
<ActionButton
|
|
297
|
+
onPress={() => {}}
|
|
298
|
+
// onPress={() => handleCopyClick(selectedUser.id)}
|
|
299
|
+
variant="filled"
|
|
300
|
+
>
|
|
301
|
+
<Text style={{ color: '#ffffff' }}>Copy User Id</Text>
|
|
302
|
+
</ActionButton>
|
|
303
|
+
</>
|
|
304
|
+
)}
|
|
305
|
+
|
|
306
|
+
<BorderedContainer>
|
|
307
|
+
<ScrollView
|
|
308
|
+
style={{ maxHeight: 400 }}
|
|
309
|
+
showsVerticalScrollIndicator={true}
|
|
310
|
+
nestedScrollEnabled={true}
|
|
311
|
+
>
|
|
312
|
+
{documents.map((doc) => (
|
|
313
|
+
<View
|
|
314
|
+
key={doc._id}
|
|
315
|
+
style={{
|
|
316
|
+
flexDirection: 'row',
|
|
317
|
+
alignItems: 'center',
|
|
318
|
+
justifyContent: 'space-between',
|
|
319
|
+
gap: 24,
|
|
320
|
+
backgroundColor: '#F3F6FC',
|
|
321
|
+
marginBottom: 8,
|
|
322
|
+
paddingVertical: 8,
|
|
323
|
+
paddingHorizontal: 16,
|
|
324
|
+
borderRadius: 8,
|
|
325
|
+
}}
|
|
326
|
+
>
|
|
327
|
+
<View style={{
|
|
328
|
+
flexDirection: 'row',
|
|
329
|
+
alignItems: 'center',
|
|
330
|
+
gap: 24,
|
|
331
|
+
}}>
|
|
332
|
+
<View><IconDoc/></View>
|
|
333
|
+
<View>
|
|
334
|
+
<Label style={{ paddingBottom: 4 }}>{doc.documentName}</Label>
|
|
335
|
+
<LabelData>
|
|
336
|
+
{DateTime.fromISO(doc.createdAt).toFormat('dd LLL yyyy t')}
|
|
337
|
+
</LabelData>
|
|
338
|
+
</View>
|
|
339
|
+
</View>
|
|
340
|
+
<Button onPress={() => showDeleteModal(doc._id)}>
|
|
341
|
+
<DeleteIcon/>
|
|
342
|
+
</Button>
|
|
343
|
+
</View>
|
|
344
|
+
))}
|
|
345
|
+
</ScrollView>
|
|
346
|
+
</BorderedContainer>
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
{/* <EmptySection /> */}
|
|
350
|
+
</CenterContainer>
|
|
351
|
+
</>
|
|
352
|
+
),
|
|
353
|
+
[modalUser, documents]
|
|
354
|
+
);
|
|
355
|
+
|
|
356
|
+
const EditingBody = useMemo(
|
|
357
|
+
() => (
|
|
358
|
+
<EditUserModal
|
|
359
|
+
setIsEditing={setIsEditing}
|
|
360
|
+
modalUser={modalUser}
|
|
361
|
+
config={config}
|
|
362
|
+
/>
|
|
363
|
+
),
|
|
364
|
+
[modalUser]
|
|
365
|
+
);
|
|
366
|
+
|
|
367
|
+
return (
|
|
368
|
+
<>
|
|
369
|
+
<ModalContainerFullScreen>
|
|
370
|
+
{!isEditing ? DefaultBody : EditingBody}
|
|
371
|
+
</ModalContainerFullScreen>
|
|
372
|
+
|
|
373
|
+
{showDelete && (
|
|
374
|
+
<ModalBackground style={{ position: 'absolute', zIndex: 9999 }}>
|
|
375
|
+
<ModalContainer>
|
|
376
|
+
<CloseButton onPress={() => setShowDelete(false)}>
|
|
377
|
+
<Text style={{ fontSize: 24 }}>×</Text>
|
|
378
|
+
</CloseButton>
|
|
379
|
+
<ModalTitle>Delete this document?</ModalTitle>
|
|
380
|
+
|
|
381
|
+
<GroupContainer>
|
|
382
|
+
<Button
|
|
383
|
+
onPress={() => setShowDelete(false)}
|
|
384
|
+
text={'Cancel'}
|
|
385
|
+
style={{ width: '100%' }}
|
|
386
|
+
unstyled
|
|
387
|
+
variant="filled"
|
|
388
|
+
color="white"
|
|
389
|
+
/>
|
|
390
|
+
<Button
|
|
391
|
+
onPress={handleDeleteDocument}
|
|
392
|
+
text={'Delete'}
|
|
393
|
+
style={{
|
|
394
|
+
width: '100%',
|
|
395
|
+
borderWidth: 1,
|
|
396
|
+
borderColor: 'red',
|
|
397
|
+
}}
|
|
398
|
+
color="red"
|
|
399
|
+
unstyled
|
|
400
|
+
variant="outlined"
|
|
401
|
+
/>
|
|
402
|
+
</GroupContainer>
|
|
403
|
+
</ModalContainer>
|
|
404
|
+
</ModalBackground>
|
|
405
|
+
)}
|
|
406
|
+
</>
|
|
407
|
+
);
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
export default UserProfileModal;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
ModalContainerFullScreen,
|
|
5
|
+
Viewider,
|
|
6
|
+
Label,
|
|
7
|
+
LabelData,
|
|
8
|
+
BorderedContainer,
|
|
9
|
+
CenterContainer,
|
|
10
|
+
} from '../styledModalComponents';
|
|
11
|
+
import ModalHeaderComponent from '../ModalHeaderComponent';
|
|
12
|
+
import Button from '../../styled/Button';
|
|
13
|
+
import { useDispatch } from 'react-redux';
|
|
14
|
+
import { setActiveModal } from '../../../roomStore/chatSettingsSlice';
|
|
15
|
+
import { MODAL_TYPES } from '../../../helpers/constants/MODAL_TYPES';
|
|
16
|
+
|
|
17
|
+
interface UserSettingsModalProps {
|
|
18
|
+
handleCloseModal: any;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const UserSettingsModal: React.FC<UserSettingsModalProps> = ({
|
|
22
|
+
handleCloseModal,
|
|
23
|
+
}) => {
|
|
24
|
+
const options = useMemo(
|
|
25
|
+
() => [
|
|
26
|
+
{ value: 'Manage Data', key: MODAL_TYPES.MANAGE_DATA },
|
|
27
|
+
{ value: 'Visiblility', key: MODAL_TYPES.VISIBILITY },
|
|
28
|
+
// { value: 'Profile Shares', key: MODAL_TYPES.PROFILE_SHARES },
|
|
29
|
+
// { value: 'Document Shares', key: MODAL_TYPES.DOCUMENT_SHARES },
|
|
30
|
+
// { value: 'Blocked Users', key: MODAL_TYPES.BLOCKED_USERS },
|
|
31
|
+
// { value: 'Referrals', key: MODAL_TYPES.REFERRALS },
|
|
32
|
+
],
|
|
33
|
+
[]
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const dispatch = useDispatch();
|
|
37
|
+
|
|
38
|
+
const handleClick = useCallback((key: string) => {
|
|
39
|
+
dispatch(setActiveModal(key));
|
|
40
|
+
}, []);
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<ModalContainerFullScreen>
|
|
44
|
+
<ModalHeaderComponent
|
|
45
|
+
handleCloseModal={handleCloseModal}
|
|
46
|
+
headerTitle={'Settings'}
|
|
47
|
+
/>
|
|
48
|
+
<CenterContainer>
|
|
49
|
+
<BorderedContainer
|
|
50
|
+
style={{
|
|
51
|
+
padding: 16,
|
|
52
|
+
display: 'flex',
|
|
53
|
+
flexDirection: 'column',
|
|
54
|
+
gap: 8,
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
{options.map((option: { value: string; key: string }, index) => (
|
|
58
|
+
<>
|
|
59
|
+
<Button
|
|
60
|
+
variant="default"
|
|
61
|
+
style={{
|
|
62
|
+
minHeight: 40,
|
|
63
|
+
display: 'flex',
|
|
64
|
+
flexDirection: 'column',
|
|
65
|
+
gap: 2,
|
|
66
|
+
width: '100%',
|
|
67
|
+
justifyContent: 'center',
|
|
68
|
+
borderRadius: 0,
|
|
69
|
+
alignItems: 'flex-start',
|
|
70
|
+
}}
|
|
71
|
+
onPress={() => handleClick(option.key)}
|
|
72
|
+
>
|
|
73
|
+
<Label style={{ textAlign: 'center' }}>{option.value}</Label>
|
|
74
|
+
{[2, 3, 4].includes(index) && <LabelData>0</LabelData>}
|
|
75
|
+
</Button>
|
|
76
|
+
{index < 5 && <Viewider />}
|
|
77
|
+
</>
|
|
78
|
+
))}
|
|
79
|
+
</BorderedContainer>
|
|
80
|
+
</CenterContainer>
|
|
81
|
+
</ModalContainerFullScreen>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default UserSettingsModal;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
3
|
+
import styled from 'styled-components/native';
|
|
4
|
+
import Button from '../styled/Button';
|
|
5
|
+
|
|
6
|
+
export const ModalBackground = styled.View`
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
background: rgba(0, 0, 0, 0.5);
|
|
10
|
+
flex: 1;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
z-index: 1000;
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
export const CloseButton = styled.TouchableOpacity`
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 16px;
|
|
19
|
+
right: 16px;
|
|
20
|
+
border: none;
|
|
21
|
+
font-size: 20px;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
color: #888;
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
color: #555;
|
|
27
|
+
background-color: #dddddd;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
export const ModalContainer = styled.View`
|
|
32
|
+
flex: 1;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
background: white;
|
|
36
|
+
padding: 32px 64px;
|
|
37
|
+
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.2);
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: 32px;
|
|
41
|
+
position: relative;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
align-items: center;
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
export const ModalTitle = styled.Text`
|
|
47
|
+
font-size: 20px;
|
|
48
|
+
margin: 0;
|
|
49
|
+
font-weight: 400;
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
export const ModalDescription = styled.Text`
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
margin: 0;
|
|
55
|
+
font-weight: 400;
|
|
56
|
+
`;
|
|
57
|
+
|
|
58
|
+
export const GroupContainer = styled.View`
|
|
59
|
+
display: flex;
|
|
60
|
+
gap: 32px;
|
|
61
|
+
width: 100%;
|
|
62
|
+
padding: 0;
|
|
63
|
+
`;
|
|
64
|
+
|
|
65
|
+
export const ModalContainerFullScreen = styled.View`
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
background-color: #fff;
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
align-items: center;
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
overflow-y: auto;
|
|
74
|
+
`;
|
|
75
|
+
|
|
76
|
+
export const HeaderContainer = styled.View`
|
|
77
|
+
position: relative;
|
|
78
|
+
top: 0;
|
|
79
|
+
width: 100%;
|
|
80
|
+
padding: 2px 8px;
|
|
81
|
+
padding-top: 62px;
|
|
82
|
+
max-height: 24px;
|
|
83
|
+
min-height: 24px;
|
|
84
|
+
background-color: #fff;
|
|
85
|
+
border-bottom-width: 1px;
|
|
86
|
+
border-bottom-color: #f0f0f0;
|
|
87
|
+
z-index: 1;
|
|
88
|
+
flex-direction: row;
|
|
89
|
+
justify-content: space-between;
|
|
90
|
+
align-items: center;
|
|
91
|
+
`;
|
|
92
|
+
|
|
93
|
+
export const HeaderLeft = styled.View`
|
|
94
|
+
flex-direction: row;
|
|
95
|
+
align-items: center;
|
|
96
|
+
gap: 16px;
|
|
97
|
+
`;
|
|
98
|
+
|
|
99
|
+
export const HeaderRight = styled.View`
|
|
100
|
+
flex-direction: row;
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: 16px;
|
|
103
|
+
`;
|
|
104
|
+
|
|
105
|
+
export const CenterContainer = styled(GroupContainer)`
|
|
106
|
+
width: 100%;
|
|
107
|
+
padding: 16px;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
align-items: center;
|
|
110
|
+
`;
|
|
111
|
+
|
|
112
|
+
export const ProfileImage = styled.View`
|
|
113
|
+
width: 120px;
|
|
114
|
+
height: 120px;
|
|
115
|
+
border-radius: 10000px;
|
|
116
|
+
border: 1px solid #f0f0f0;
|
|
117
|
+
`;
|
|
118
|
+
|
|
119
|
+
export const UserInfo = styled.View`
|
|
120
|
+
width: 100%;
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
align-items: center;
|
|
125
|
+
`;
|
|
126
|
+
|
|
127
|
+
export const UserName = styled.Text`
|
|
128
|
+
color: #141414;
|
|
129
|
+
font-size: 24px;
|
|
130
|
+
font-weight: 400;
|
|
131
|
+
`;
|
|
132
|
+
|
|
133
|
+
export const UserStatus = styled.Text`
|
|
134
|
+
color: #8c8c8c;
|
|
135
|
+
font-size: 16px;
|
|
136
|
+
font-weight: 400;
|
|
137
|
+
`;
|
|
138
|
+
|
|
139
|
+
export const BorderedContainer = styled.View`
|
|
140
|
+
width: 100%;
|
|
141
|
+
border-radius: 8px;
|
|
142
|
+
border: 1px solid #f0f0f0;
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
padding: 16px;
|
|
146
|
+
`;
|
|
147
|
+
|
|
148
|
+
export const LabelData = styled.Text`
|
|
149
|
+
color: #8c8c8c;
|
|
150
|
+
font-size: 14px;
|
|
151
|
+
font-weight: 400;
|
|
152
|
+
`;
|
|
153
|
+
|
|
154
|
+
export const Label = styled.Text`
|
|
155
|
+
color: #141414;
|
|
156
|
+
font-size: 16px;
|
|
157
|
+
`;
|
|
158
|
+
|
|
159
|
+
export const ActionButton = styled(Button)`
|
|
160
|
+
width: 100%;
|
|
161
|
+
`;
|
|
162
|
+
|
|
163
|
+
export const EmptySection = styled.View`
|
|
164
|
+
height: 200px;
|
|
165
|
+
border: 1px solid #f0f0f0;
|
|
166
|
+
border-radius: 8px;
|
|
167
|
+
width: 100%;
|
|
168
|
+
display: flex;
|
|
169
|
+
`;
|
|
170
|
+
|
|
171
|
+
export const Viewider = styled.View`
|
|
172
|
+
height: 1px;
|
|
173
|
+
width: 100%;
|
|
174
|
+
background-color: #0052cd0d;
|
|
175
|
+
`;
|
|
176
|
+
|
|
177
|
+
export const Divider = styled.View`
|
|
178
|
+
height: 1px;
|
|
179
|
+
width: 100%;
|
|
180
|
+
background-color: #0052cd0d;
|
|
181
|
+
`;
|