@ethora/chat-component 26.7.5 → 26.7.7
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/README.md +72 -16
- package/dist/ChatProfileModal-DehQM4Bo.js +2135 -0
- package/dist/FilePreviewModal-BcZLtVAy.js +743 -0
- package/dist/ManageDataModal-DWabKhSC.js +178 -0
- package/dist/MarkdownBody-CSY3YKDh.js +16874 -0
- package/dist/SideDrawer-DewJ-iPn.js +270 -0
- package/dist/UserProfileModal-BHZ0TULc.js +574 -0
- package/dist/UserSettingsModal-BxwVWNKo.js +50 -0
- package/dist/{VideoCallOverlay-C4M2I9oV.js → VideoCallOverlay-D5SuimGP.js} +9 -10
- package/dist/VisibilityModal-Bd67b4EM.js +132 -0
- package/dist/assets/icons.d.ts +30 -0
- package/dist/components/ContextMenu/ContextMenuComponents.d.ts +1 -3
- package/dist/components/EmojiPicker/LazyEmojiPicker.d.ts +3 -0
- package/dist/components/ExampleComponents/CustomMessage.d.ts +3 -3
- package/dist/components/Files/FilesList.d.ts +12 -0
- package/dist/components/Files/FilesPanel.d.ts +3 -0
- package/dist/components/Files/fileCategory.d.ts +13 -0
- package/dist/components/InputComponents/AttachmentPreview.d.ts +17 -0
- package/dist/components/InputComponents/MentionDropdown.d.ts +13 -0
- package/dist/components/InputComponents/MentionPickerModal.d.ts +19 -0
- package/dist/components/MainComponents/AttachmentList.d.ts +7 -0
- package/dist/components/MainComponents/ChatErrorBoundary.d.ts +53 -0
- package/dist/components/MainComponents/ChatErrorScreen.d.ts +24 -0
- package/dist/components/MainComponents/ChatRoomOpeningPreview.d.ts +24 -0
- package/dist/components/MainComponents/ChatWrapper.d.ts +1 -0
- package/dist/components/MainComponents/ChooseChatMessage.d.ts +11 -1
- package/dist/components/MainComponents/HeaderLogo.d.ts +18 -0
- package/dist/components/MainComponents/MediaMessage.d.ts +5 -0
- package/dist/components/MainComponents/MessageContainer.d.ts +2 -2
- package/dist/components/MainComponents/ReduxWrapper.d.ts +1 -2
- package/dist/components/MainComponents/SystemMessage.d.ts +1 -2
- package/dist/components/MenuRoom/MenuRoom.d.ts +1 -0
- package/dist/components/MessageBubble/CustomDivider.d.ts +3 -3
- package/dist/components/MessageBubble/Message.d.ts +2 -2
- package/dist/components/MessageBubble/MessageTranslate.d.ts +28 -10
- package/dist/components/MessageBubble/QuickReplies.d.ts +6 -5
- package/dist/components/Modals/ChatProfileModal/ChatProfileMemberRow.d.ts +18 -0
- package/dist/components/Modals/FilePreviewModal/FilePreviewModal.d.ts +17 -0
- package/dist/components/Modals/FilePreviewModal/ImageLightbox.d.ts +35 -0
- package/dist/components/Modals/FilePreviewModal/PdfView.d.ts +14 -3
- package/dist/components/Modals/Modal/Modal.d.ts +10 -0
- package/dist/components/Modals/Modal/ModalContent.d.ts +21 -0
- package/dist/components/Modals/ModalBox/ModalBox.d.ts +9 -0
- package/dist/components/Modals/ModalReportChat/ModalReportChat.d.ts +6 -1
- package/dist/components/Modals/ModalWrapper/ModalWrapper.d.ts +8 -0
- package/dist/components/Modals/NewChatModal/styledNewChatComponents.d.ts +12 -0
- package/dist/components/Modals/SettingsModals/SharedStyledComponents.d.ts +12 -0
- package/dist/components/Modals/SettingsModals/Visibility/StyledComponents.d.ts +1 -1
- package/dist/components/Modals/SideDrawer/DrawerProfileParts.d.ts +42 -0
- package/dist/components/Modals/SideDrawer/SideDrawer.d.ts +64 -0
- package/dist/components/Modals/SidePanel/SidePanel.d.ts +31 -0
- package/dist/components/Modals/UserProfileModal/EditUserModal.d.ts +5 -1
- package/dist/components/Modals/modalComponents.d.ts +6 -0
- package/dist/components/Modals/motionVariants.d.ts +37 -0
- package/dist/components/Modals/styledModalComponents.d.ts +13 -3
- package/dist/components/RoomComponents/ChatRoomItem.d.ts +0 -1
- package/dist/components/RoomComponents/OnlineUsersPopover.d.ts +0 -1
- package/dist/components/UsersList/StyledComponents.d.ts +5 -1
- package/dist/components/UsersList/UsersList.d.ts +23 -0
- package/dist/components/styled/Button.d.ts +11 -1
- package/dist/components/styled/ChatWrapperBox.d.ts +3 -1
- package/dist/components/styled/PdfMessage.d.ts +13 -0
- package/dist/components/styled/RoomListComponents/index.d.ts +22 -1
- package/dist/components/styled/SendInput.d.ts +19 -5
- package/dist/components/styled/StyledComponents.d.ts +1 -1
- package/dist/components/styled/StyledInputComponents/MediaComponents.d.ts +18 -0
- package/dist/components/styled/StyledInputComponents/StyledInputComponents.d.ts +21 -0
- package/dist/components/styled/TreadLabel.d.ts +2 -2
- package/dist/components/styled/UnsupportedType.d.ts +1 -1
- package/dist/context/ModalTransitionContext.d.ts +2 -0
- package/dist/examples/quiz/QuizDemo.d.ts +3 -0
- package/dist/examples/quiz/quizScript.d.ts +38 -0
- package/dist/examples/quiz/useDemoSession.d.ts +42 -0
- package/dist/examples/quiz/useQuizFlow.d.ts +47 -0
- package/dist/firebase-config.d.ts +2 -4
- package/dist/handleCopyClick-BoZWTBLC.js +108 -0
- package/dist/helpers/MarkdownBody.d.ts +7 -0
- package/dist/helpers/attachments.d.ts +33 -0
- package/dist/helpers/botMarkup.d.ts +30 -0
- package/dist/helpers/buildChatShareLink.d.ts +20 -0
- package/dist/helpers/cacheScope.d.ts +15 -1
- package/dist/helpers/constants/MODAL_TYPES.d.ts +13 -7
- package/dist/helpers/createRoomFromApi.d.ts +1 -1
- package/dist/helpers/ethoraLogger.d.ts +8 -0
- package/dist/helpers/fileKind.d.ts +17 -0
- package/dist/helpers/formatNumberWithCommas.d.ts +1 -1
- package/dist/helpers/hiddenRooms.d.ts +1 -1
- package/dist/helpers/historyPreloadScheduler.d.ts +1 -0
- package/dist/helpers/lazyEmoji.d.ts +3 -0
- package/dist/helpers/localStorageUser.d.ts +1 -1
- package/dist/helpers/markdownSanitizeSchema.d.ts +3 -0
- package/dist/helpers/mentions.d.ts +63 -0
- package/dist/helpers/parseMessageBody.d.ts +12 -2
- package/dist/helpers/pdf/loadPdfjs.d.ts +64 -0
- package/dist/helpers/remarkLineBreaks.d.ts +42 -0
- package/dist/helpers/resolveMessageTranslation.d.ts +34 -0
- package/dist/helpers/roomImageGallery.d.ts +53 -0
- package/dist/helpers/secureFileUrl.d.ts +8 -0
- package/dist/helpers/sendFailureWatchdog.d.ts +62 -0
- package/dist/helpers/transformTranslatations.d.ts +1 -2
- package/dist/hooks/pushSubscriptionSweep.d.ts +41 -0
- package/dist/hooks/useChatOpenPhase.d.ts +21 -0
- package/dist/hooks/useChatWrapperInit.d.ts +1 -0
- package/dist/hooks/useDelayedAction.d.ts +22 -0
- package/dist/hooks/useExclusiveRightPane.d.ts +25 -0
- package/dist/hooks/useExitTransition.d.ts +24 -0
- package/dist/hooks/useFilesEndpointSupport.d.ts +9 -0
- package/dist/hooks/useGetNewArchRoom.d.ts +3 -1
- package/dist/hooks/useInView.d.ts +17 -0
- package/dist/hooks/useMentionComposer.d.ts +45 -0
- package/dist/hooks/useMessageHeapState.d.ts +1 -1
- package/dist/hooks/useMessageTranslation.d.ts +4 -3
- package/dist/hooks/useModalDismiss.d.ts +27 -0
- package/dist/hooks/useMyFiles.d.ts +16 -0
- package/dist/hooks/usePdfThumbnail.d.ts +22 -0
- package/dist/hooks/useQRCodeChatHandler.d.ts +29 -1
- package/dist/hooks/useRoomMute.d.ts +19 -0
- package/dist/hooks/useRoomState.d.ts +1 -1
- package/dist/hooks/useSendMessage.d.ts +4 -3
- package/dist/hooks/useTypography.d.ts +1 -1
- package/dist/hooks/useUnreadMessagesCounter.d.ts +11 -2
- package/dist/index.esm-B-3fyDHY.js +28 -0
- package/dist/index.esm-CRM4VCRa.js +943 -0
- package/dist/index.esm-msbp26WN.js +3352 -0
- package/dist/index.esm2017-CL0mvq6y.js +1578 -0
- package/dist/main-C2FKeV6y.js +32375 -0
- package/dist/main.css +1 -1
- package/dist/main.d.ts +14 -0
- package/dist/main.js +18 -18
- package/dist/module-DGXkb0R_.js +2960 -0
- package/dist/native-CDi4YD_s.js +13 -0
- package/dist/networking/api-requests/files.api.d.ts +19 -0
- package/dist/networking/api-requests/rooms.api.d.ts +10 -2
- package/dist/networking/api-requests/translate.api.d.ts +15 -0
- package/dist/networking/api-requests/user.api.d.ts +2 -0
- package/dist/networking/sharedRequest.d.ts +4 -0
- package/dist/networking/xmpp/allRoomPresences.xmpp.d.ts +3 -1
- package/dist/networking/xmpp/createTimeoutPromise.xmpp.d.ts +14 -0
- package/dist/networking/xmpp/sendTextMessage.xmpp.d.ts +2 -1
- package/dist/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.d.ts +2 -1
- package/dist/networking/xmppClient.d.ts +12 -3
- package/dist/pdf-B5b7qHu6.js +17130 -0
- package/dist/pdf.worker.min-COYn-gId.js +24385 -0
- package/dist/roomStore/index.d.ts +20 -0
- package/dist/roomStore/persistEncryption.d.ts +51 -0
- package/dist/roomStore/roomsSlice.d.ts +49 -6
- package/dist/styles/classNames.d.ts +35 -0
- package/dist/styles/motion.d.ts +71 -0
- package/dist/styles/tokens.d.ts +27 -0
- package/dist/testIds.d.ts +1 -1
- package/dist/types/models/attachment.model.d.ts +33 -0
- package/dist/types/models/config.model.d.ts +160 -19
- package/dist/types/models/file.model.d.ts +20 -0
- package/dist/types/models/message.model.d.ts +15 -6
- package/dist/types/models/room.model.d.ts +40 -2
- package/dist/types/types.d.ts +3 -1
- package/dist/utils/resendMessage.d.ts +22 -1
- package/dist/utils/translateModePolicy.d.ts +1 -0
- package/dist/wavesurfer.esm-D_a19qBW.js +952 -0
- package/package.json +22 -2
- package/dist/VideoCallOverlay-C4M2I9oV.js.map +0 -1
- package/dist/components/MainComponents/VirtualList.d.ts +0 -10
- package/dist/components/Modals/SettingsModals/BlockedUsers/BlockedUsersModal.d.ts +0 -6
- package/dist/components/Modals/SettingsModals/DocumentShares/DocumentSharesModal.d.ts +0 -6
- package/dist/components/Modals/SettingsModals/ManageDataModal/StyledComponents.d.ts +0 -0
- package/dist/components/Modals/SettingsModals/ProfileShares/ProfileShares.d.ts +0 -6
- package/dist/components/Modals/SettingsModals/Referrals/Referrals.d.ts +0 -6
- package/dist/hooks/useMessageQueue.d.ts +0 -4
- package/dist/main-DeiuFYsl.js +0 -55812
- package/dist/main-DeiuFYsl.js.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/networking/xmpp/getHistory.xmpp.d.ts +0 -3
- package/dist/networking/xmpp/listenerManager.d.ts +0 -17
- package/dist/utils/xmppMemoryMonitor.d.ts +0 -16
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { jsxs as o, Fragment as T, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useCallback as M } from "react";
|
|
3
|
+
import { av as B, v as t, aw as I, ax as w, B as j, u as z, n as F, F as E, ay as R, J as U, t as x, az as A, aA as $, aB as O, aC as H } from "./main-C2FKeV6y.js";
|
|
4
|
+
import { S as J, D as f, a as u, b as D, e as v, f as b } from "./SideDrawer-DewJ-iPn.js";
|
|
5
|
+
t(I)`
|
|
6
|
+
display: flex;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
align-items: flex-start;
|
|
9
|
+
gap: 32px;
|
|
10
|
+
`;
|
|
11
|
+
t.div`
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: 16px;
|
|
15
|
+
width: 100%;
|
|
16
|
+
`;
|
|
17
|
+
t.div`
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: 8px;
|
|
21
|
+
`;
|
|
22
|
+
t(w)`
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
text-align: start;
|
|
25
|
+
flex-wrap: wrap;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
`;
|
|
29
|
+
t.div`
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 4px;
|
|
33
|
+
`;
|
|
34
|
+
t(w)`
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
text-align: start;
|
|
37
|
+
color: var(--ethora-color-text-muted, #8c8c8c);
|
|
38
|
+
`;
|
|
39
|
+
const y = t(j)`
|
|
40
|
+
min-height: 44px;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
gap: var(--ethora-space-1, 4px);
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
text-align: center;
|
|
47
|
+
width: 100%;
|
|
48
|
+
padding: var(--ethora-space-2, 8px) var(--ethora-space-4, 16px);
|
|
49
|
+
border-radius: var(--ethora-radius-md, 12px);
|
|
50
|
+
border: 1px solid ${({ borderColor: r }) => r};
|
|
51
|
+
font-weight: var(--ethora-font-weight-semibold, 600);
|
|
52
|
+
transition: background-color var(--ethora-motion-fast, 150ms),
|
|
53
|
+
box-shadow var(--ethora-motion-fast, 150ms);
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background-color: var(--ethora-color-bg-hover, #f0f2f5);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:focus-visible {
|
|
60
|
+
outline: 2px solid var(--ethora-color-primary, #0052cd);
|
|
61
|
+
outline-offset: 2px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:active {
|
|
65
|
+
box-shadow: var(--ethora-shadow-sm, 0 1px 2px rgba(16, 24, 40, 0.06));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
${B}
|
|
69
|
+
`, P = t.div`
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: flex-start;
|
|
72
|
+
background-color: ${({ bgColor: r }) => r};
|
|
73
|
+
padding: var(--ethora-space-4, 16px);
|
|
74
|
+
border-radius: var(--ethora-radius-md, 12px);
|
|
75
|
+
gap: var(--ethora-space-2, 8px);
|
|
76
|
+
`, W = t.div`
|
|
77
|
+
font-size: var(--ethora-font-size-xs, 12px);
|
|
78
|
+
line-height: var(--ethora-line-height-normal, 1.5);
|
|
79
|
+
color: var(--ethora-color-text, #141414);
|
|
80
|
+
display: flex;
|
|
81
|
+
text-align: start;
|
|
82
|
+
`, Q = ({
|
|
83
|
+
handleCloseModal: r
|
|
84
|
+
}) => {
|
|
85
|
+
const { config: l } = z((s) => s.chatSettingStore), e = F(), { showToast: d } = E(), [C, c] = m(!1), [i, g] = m(!1), S = async () => {
|
|
86
|
+
const p = (await H()).data;
|
|
87
|
+
x.log(p);
|
|
88
|
+
const L = new Blob([p], { type: "text/plain" }), h = URL.createObjectURL(L), n = document.createElement("a");
|
|
89
|
+
n.href = h, n.download = "mydata.json", document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(h);
|
|
90
|
+
}, k = M(async () => {
|
|
91
|
+
if (!i) {
|
|
92
|
+
g(!0);
|
|
93
|
+
try {
|
|
94
|
+
await R(), c(!1), await U.performLogout();
|
|
95
|
+
} catch (s) {
|
|
96
|
+
x.error("Failed to delete account", s), d({
|
|
97
|
+
id: Date.now().toString(),
|
|
98
|
+
title: e("toast.error"),
|
|
99
|
+
message: e("settings.manageData.deleteFailed"),
|
|
100
|
+
type: "error",
|
|
101
|
+
duration: 4e3
|
|
102
|
+
}), g(!1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}, [i, d, e]);
|
|
106
|
+
return /* @__PURE__ */ o(T, { children: [
|
|
107
|
+
/* @__PURE__ */ o(
|
|
108
|
+
J,
|
|
109
|
+
{
|
|
110
|
+
title: e("settings.manageData.title"),
|
|
111
|
+
onClose: r,
|
|
112
|
+
backLabel: e("action.back"),
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ o(f, { children: [
|
|
115
|
+
/* @__PURE__ */ a(u, { children: e("settings.manageData.section.export") }),
|
|
116
|
+
/* @__PURE__ */ a(D, { children: /* @__PURE__ */ o(v, { children: [
|
|
117
|
+
/* @__PURE__ */ a(b, { children: e("settings.manageData.downloadDescription") }),
|
|
118
|
+
/* @__PURE__ */ a(
|
|
119
|
+
y,
|
|
120
|
+
{
|
|
121
|
+
borderColor: l?.colors?.primary || "var(--ethora-color-primary, #0052CD)",
|
|
122
|
+
onClick: S,
|
|
123
|
+
style: { marginTop: "var(--ethora-space-2, 8px)" },
|
|
124
|
+
children: e("settings.manageData.downloadLabel")
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] }) })
|
|
128
|
+
] }),
|
|
129
|
+
/* @__PURE__ */ o(f, { children: [
|
|
130
|
+
/* @__PURE__ */ a(u, { children: e("settings.manageData.deleteLabel") }),
|
|
131
|
+
/* @__PURE__ */ a(D, { children: /* @__PURE__ */ o(v, { children: [
|
|
132
|
+
/* @__PURE__ */ a(b, { children: e("settings.manageData.deleteDescription") }),
|
|
133
|
+
/* @__PURE__ */ o(
|
|
134
|
+
P,
|
|
135
|
+
{
|
|
136
|
+
bgColor: l?.colors?.secondary || "var(--ethora-color-primary-soft, #E7EDF9)",
|
|
137
|
+
style: { marginTop: "var(--ethora-space-2, 8px)" },
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(A, { color: $(l) }) }),
|
|
140
|
+
/* @__PURE__ */ a(W, { children: e("settings.manageData.deleteDisclosure") })
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ a(
|
|
145
|
+
y,
|
|
146
|
+
{
|
|
147
|
+
borderColor: "var(--ethora-color-danger, #D92D20)",
|
|
148
|
+
style: {
|
|
149
|
+
color: "var(--ethora-color-danger, #D92D20)",
|
|
150
|
+
marginTop: "var(--ethora-space-2, 8px)"
|
|
151
|
+
},
|
|
152
|
+
onClick: () => c(!0),
|
|
153
|
+
children: e("action.deleteMyAccount")
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
] }) })
|
|
157
|
+
] })
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
C && /* @__PURE__ */ a(
|
|
162
|
+
O,
|
|
163
|
+
{
|
|
164
|
+
title: e("settings.manageData.deleteConfirmTitle"),
|
|
165
|
+
description: e("settings.manageData.deleteConfirmDescription"),
|
|
166
|
+
buttonText: e(i ? "settings.manageData.deleting" : "action.deleteMyAccount"),
|
|
167
|
+
backgroundColorButton: "var(--ethora-color-danger, #D92D20)",
|
|
168
|
+
handleClick: k,
|
|
169
|
+
handleCloseModal: () => {
|
|
170
|
+
i || c(!1);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] });
|
|
175
|
+
};
|
|
176
|
+
export {
|
|
177
|
+
Q as default
|
|
178
|
+
};
|