@ethora/chat-component 26.10.7 → 26.10.8
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 +88 -3
- package/dist/ChatProfileModal-83t5BRkI.js +2298 -0
- package/dist/{FilePreviewModal-DlOjnYzv.js → FilePreviewModal-DxUGjSHe.js} +130 -130
- package/dist/{ManageDataModal-BZLGJZze.js → ManageDataModal-DFE_Wegj.js} +14 -14
- package/dist/{MarkdownBody-CtArwCDa.js → MarkdownBody-uFITrPjT.js} +1 -1
- package/dist/{MessageSearchModal-CcUnfZlU.js → MessageSearchModal-CsbTWgNm.js} +32 -32
- package/dist/{PublicChatsModal-BWn0NXVo.js → PublicChatsModal-bDOp3IL9.js} +19 -19
- package/dist/{SideDrawer-CqZl9sxK.js → SideDrawer-A_1ECqD2.js} +28 -28
- package/dist/{UserProfileModal-D0JZ3-uy.js → UserProfileModal-Ca5wHYvr.js} +124 -120
- package/dist/{UserSettingsModal-OvykYDsT.js → UserSettingsModal-CAyyQGV6.js} +2 -2
- package/dist/{VideoCallOverlay-DrvO2v_g.js → VideoCallOverlay-BMiQh8kI.js} +5908 -4168
- package/dist/{VisibilityModal-pOF9-UXR.js → VisibilityModal-BXyIy7_J.js} +7 -7
- package/dist/assets/icons.d.ts +4 -0
- package/dist/calls/callDisplay.d.ts +22 -0
- package/dist/calls/callMode.d.ts +105 -0
- package/dist/calls/openScheduledCall.d.ts +20 -0
- package/dist/calls/p2p/P2PCallController.d.ts +160 -0
- package/dist/calls/p2p/icePolicy.d.ts +36 -0
- package/dist/calls/p2p/negotiator.d.ts +56 -0
- package/dist/calls/p2p/p2pRuntime.d.ts +35 -0
- package/dist/calls/p2p/signalInbox.d.ts +34 -0
- package/dist/calls/p2p/signalStanza.d.ts +51 -0
- package/dist/calls/placeCall.d.ts +20 -0
- package/dist/calls/scheduledCall.d.ts +101 -0
- package/dist/calls/scheduledCallActions.d.ts +12 -0
- package/dist/calls/scheduledCallFormat.d.ts +13 -0
- package/dist/calls/scheduledCallsConfig.d.ts +27 -0
- package/dist/calls/senderTrust.d.ts +7 -0
- package/dist/calls/startCall.d.ts +16 -0
- package/dist/components/MainComponents/ChatWrapper.d.ts +1 -0
- package/dist/components/MainComponents/LoginWrapper.d.ts +1 -0
- package/dist/components/MainComponents/ProfileImagePlaceholder.d.ts +1 -0
- package/dist/components/MainComponents/ReduxWrapper.d.ts +6 -0
- package/dist/components/MenuRoom/MenuRoom.d.ts +1 -0
- package/dist/components/Modals/NewChatModal/styledNewChatComponents.d.ts +27 -0
- package/dist/components/Modals/styledModalComponents.d.ts +21 -0
- package/dist/components/ScheduledCalls/ScheduleCallModal.d.ts +3 -0
- package/dist/components/ScheduledCalls/ScheduledCallCancelConfirm.d.ts +8 -0
- package/dist/components/ScheduledCalls/ScheduledCallCard.d.ts +7 -0
- package/dist/components/ScheduledCalls/ScheduledCallLayer.d.ts +15 -0
- package/dist/components/ScheduledCalls/ScheduledCallPreJoin.d.ts +3 -0
- package/dist/components/VideoCalls/P2PCallRunner.d.ts +1 -0
- package/dist/components/VideoCalls/P2PCallSession.d.ts +14 -0
- package/dist/components/VideoCalls/VideoCallSession.d.ts +37 -0
- package/dist/{handleCopyClick-BUbVvd2G.js → handleCopyClick-BX1fcFGN.js} +1 -1
- package/dist/helpers/callPush.d.ts +2 -0
- package/dist/helpers/canLeaveRoom.d.ts +3 -0
- package/dist/helpers/chatComponentConfigEvents.d.ts +16 -0
- package/dist/helpers/liveConfig.d.ts +46 -0
- package/dist/helpers/reportRoom.d.ts +18 -0
- package/dist/helpers/scheduledCallMessage.d.ts +23 -0
- package/dist/helpers/storeConsole.d.ts +1 -0
- package/dist/hooks/useNow.d.ts +6 -0
- package/dist/hooks/useRemoteAppearance.d.ts +21 -0
- package/dist/hooks/useTypography.d.ts +4 -0
- package/dist/{main-CpHMnydn.js → main-B25iFKAC.js} +15794 -13324
- package/dist/main.d.ts +3 -1
- package/dist/main.js +28 -26
- package/dist/networking/api-requests/callState.api.d.ts +24 -0
- package/dist/networking/api-requests/remoteAppearance.api.d.ts +20 -0
- package/dist/networking/api-requests/rooms.api.d.ts +2 -1
- package/dist/networking/api-requests/scheduledCalls.api.d.ts +19 -0
- package/dist/networking/ethoraEvents.d.ts +14 -1
- package/dist/networking/xmpp/notifyXmppEvent.d.ts +6 -0
- package/dist/roomStore/callSlice.d.ts +23 -1
- package/dist/roomStore/chatSettingsSlice.d.ts +9 -1
- package/dist/roomStore/index.d.ts +4 -0
- package/dist/roomStore/scheduledCallSlice.d.ts +47 -0
- package/dist/types/models/config.model.d.ts +71 -1
- package/dist/types/models/message.model.d.ts +2 -0
- package/dist/types/models/room.model.d.ts +2 -0
- package/dist/types/models/scheduledCall.model.d.ts +116 -0
- package/package.json +1 -1
- package/dist/ChatProfileModal-BDZvd0rm.js +0 -2168
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsxs as g, Fragment as T, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Ce, useState as D, useCallback as b, useImperativeHandle as Se, useRef as ie, useMemo as
|
|
3
|
-
import { a as De,
|
|
4
|
-
import { D as L, a as
|
|
5
|
-
import { P as pe, a as
|
|
6
|
-
const
|
|
7
|
-
const l = atob(p.split(",")[1]),
|
|
2
|
+
import { forwardRef as Ce, useState as D, useCallback as b, useImperativeHandle as Se, useRef as ie, useMemo as J } from "react";
|
|
3
|
+
import { a as De, Z as G, a0 as Ie, a1 as ke, a2 as le, P as ce, a3 as W, a4 as I, a5 as Ue, a6 as Ne, a7 as Pe, a8 as de, a9 as Re, aa as Ae, ab as Fe, ac as je, u as O, ad as Be, ae as ze, af as Ee, ag as $e, ah as Oe, ai as re, _ as K, aj as Te, ak as Le, al as Me, d as Xe, am as He, an as Je, ao as We, ap as te, U as V, aq as Ke, ar as Ve, as as qe, at as ne, au as A, av as Ge, aw as _e, V as Ze, T as Qe, ax as Ye, ay as eo, az as oo, aA as ao } from "./main-B25iFKAC.js";
|
|
4
|
+
import { D as L, a as q, b as ro, e as to, f as no, S as so } from "./SideDrawer-A_1ECqD2.js";
|
|
5
|
+
import { P as pe, a as io, D as lo, b as co, h as po } from "./handleCopyClick-BX1fcFGN.js";
|
|
6
|
+
const mo = (p, t) => {
|
|
7
|
+
const l = atob(p.split(",")[1]), u = new ArrayBuffer(l.length), e = new Uint8Array(u);
|
|
8
8
|
for (let n = 0; n < l.length; n++)
|
|
9
9
|
e[n] = l.charCodeAt(n);
|
|
10
10
|
const i = new Blob([e], { type: "image/jpeg" });
|
|
11
11
|
return new File([i], t, { type: "image/jpeg" });
|
|
12
|
-
},
|
|
12
|
+
}, uo = I.div`
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
gap: var(--ethora-space-4, 16px);
|
|
16
16
|
width: 100%;
|
|
17
17
|
`, me = Ce(
|
|
18
|
-
({ setIsEditing: p, modalUser: t, config: l },
|
|
19
|
-
const e = De(), i =
|
|
18
|
+
({ setIsEditing: p, modalUser: t, config: l }, u) => {
|
|
19
|
+
const e = De(), i = G(), [n, a] = D(t?.firstName || ""), [h, F] = D(t?.lastName || ""), [y, k] = D(t?.description || ""), [v, C] = D(
|
|
20
20
|
t?.profileImage
|
|
21
21
|
), S = b(async () => {
|
|
22
22
|
try {
|
|
23
23
|
let c = new FormData();
|
|
24
24
|
if (typeof v == "string" && v.startsWith("data:image/")) {
|
|
25
|
-
const N =
|
|
25
|
+
const N = mo(v, "profileImage.jpg");
|
|
26
26
|
c.append("file", N);
|
|
27
27
|
} else v instanceof File && c.append("file", v);
|
|
28
28
|
c.append("firstName", n), c.append("lastName", h), c.append("description", y);
|
|
@@ -48,7 +48,7 @@ const po = (p, t) => {
|
|
|
48
48
|
v,
|
|
49
49
|
p
|
|
50
50
|
]);
|
|
51
|
-
Se(
|
|
51
|
+
Se(u, () => ({ save: S }), [S]);
|
|
52
52
|
const x = (c) => {
|
|
53
53
|
C(c);
|
|
54
54
|
};
|
|
@@ -65,7 +65,7 @@ const po = (p, t) => {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
) }),
|
|
68
|
-
/* @__PURE__ */ o(L, { children: /* @__PURE__ */ g(
|
|
68
|
+
/* @__PURE__ */ o(L, { children: /* @__PURE__ */ g(uo, { children: [
|
|
69
69
|
/* @__PURE__ */ o(
|
|
70
70
|
W,
|
|
71
71
|
{
|
|
@@ -85,7 +85,7 @@ const po = (p, t) => {
|
|
|
85
85
|
placeholder: i("field.lastName"),
|
|
86
86
|
label: i("field.lastName"),
|
|
87
87
|
value: h,
|
|
88
|
-
onChange: (c) =>
|
|
88
|
+
onChange: (c) => F(c.target.value)
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
91
|
/* @__PURE__ */ o(
|
|
@@ -111,17 +111,17 @@ const fo = de`
|
|
|
111
111
|
to {
|
|
112
112
|
transform: rotate(180deg);
|
|
113
113
|
}
|
|
114
|
-
`,
|
|
114
|
+
`, ho = de`
|
|
115
115
|
from {
|
|
116
116
|
transform: rotate(180deg);
|
|
117
117
|
}
|
|
118
118
|
to {
|
|
119
119
|
transform: rotate(0deg);
|
|
120
120
|
}
|
|
121
|
-
`,
|
|
121
|
+
`, go = I.div`
|
|
122
122
|
position: relative;
|
|
123
123
|
width: 100%;
|
|
124
|
-
`,
|
|
124
|
+
`, vo = I.div`
|
|
125
125
|
border: 1px solid
|
|
126
126
|
${({ $borderColor: p, $isOpen: t }) => t ? p || "var(--ethora-color-primary, #0052cd)" : p || "var(--ethora-color-border, #e6e8ec)"};
|
|
127
127
|
padding: 0 16px;
|
|
@@ -148,16 +148,16 @@ const fo = de`
|
|
|
148
148
|
outline: 2px solid var(--ethora-color-primary, #0052cd);
|
|
149
149
|
outline-offset: 1px;
|
|
150
150
|
}
|
|
151
|
-
`, vo = I.span`
|
|
152
|
-
color: var(--ethora-color-text-muted, #8c8c8c);
|
|
153
151
|
`, bo = I.span`
|
|
152
|
+
color: var(--ethora-color-text-muted, #8c8c8c);
|
|
153
|
+
`, yo = I.span`
|
|
154
154
|
margin-left: 10px;
|
|
155
155
|
display: inline-block;
|
|
156
156
|
color: var(--ethora-color-text-muted, #8c8c8c);
|
|
157
157
|
font-size: 12px;
|
|
158
|
-
animation: ${(p) => p.$isOpen ? fo :
|
|
158
|
+
animation: ${(p) => p.$isOpen ? fo : ho} 0.3s ease
|
|
159
159
|
forwards;
|
|
160
|
-
`,
|
|
160
|
+
`, wo = I.div`
|
|
161
161
|
position: absolute;
|
|
162
162
|
top: 100%;
|
|
163
163
|
left: 0;
|
|
@@ -171,7 +171,7 @@ const fo = de`
|
|
|
171
171
|
box-shadow: var(--ethora-shadow-md, 0 4px 12px rgba(16, 24, 40, 0.1));
|
|
172
172
|
z-index: 100;
|
|
173
173
|
${Pe}
|
|
174
|
-
`,
|
|
174
|
+
`, xo = I.input`
|
|
175
175
|
width: 100%;
|
|
176
176
|
padding: 12px 16px;
|
|
177
177
|
border: none;
|
|
@@ -196,17 +196,17 @@ const fo = de`
|
|
|
196
196
|
&:hover {
|
|
197
197
|
background-color: ${({ $selected: p }) => p ? "var(--ethora-color-primary-soft, #e7edf9)" : "var(--ethora-color-bg-hover, #f0f2f5)"};
|
|
198
198
|
}
|
|
199
|
-
`,
|
|
199
|
+
`, Co = ({
|
|
200
200
|
options: p,
|
|
201
201
|
placeholder: t,
|
|
202
202
|
onSelect: l,
|
|
203
|
-
accentColor:
|
|
203
|
+
accentColor: u,
|
|
204
204
|
selectedValue: e
|
|
205
205
|
}) => {
|
|
206
|
-
const i =
|
|
206
|
+
const i = G(), [n, a] = D(!1), [h, F] = D(
|
|
207
207
|
e
|
|
208
208
|
), [y, k] = D(""), v = ie(null), C = () => a((r) => !r), S = (r) => {
|
|
209
|
-
|
|
209
|
+
F(r), l(r), a(!1), k("");
|
|
210
210
|
}, x = p.filter(
|
|
211
211
|
(r) => r.name.toLowerCase().includes(y.toLowerCase())
|
|
212
212
|
), c = b(() => a(!1), []);
|
|
@@ -219,30 +219,30 @@ const fo = de`
|
|
|
219
219
|
});
|
|
220
220
|
const U = (r) => {
|
|
221
221
|
r.key === "Enter" || r.key === " " ? (r.preventDefault(), C()) : r.key === "Escape" && n && a(!1);
|
|
222
|
-
}, N = (r,
|
|
223
|
-
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), S(
|
|
222
|
+
}, N = (r, j) => {
|
|
223
|
+
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), S(j));
|
|
224
224
|
};
|
|
225
|
-
return /* @__PURE__ */ g(
|
|
225
|
+
return /* @__PURE__ */ g(go, { ref: v, children: [
|
|
226
226
|
/* @__PURE__ */ g(
|
|
227
|
-
|
|
227
|
+
vo,
|
|
228
228
|
{
|
|
229
229
|
$isOpen: n,
|
|
230
230
|
onClick: C,
|
|
231
231
|
onKeyDown: U,
|
|
232
|
-
$borderColor:
|
|
232
|
+
$borderColor: u,
|
|
233
233
|
role: "button",
|
|
234
234
|
tabIndex: 0,
|
|
235
235
|
"aria-haspopup": "listbox",
|
|
236
236
|
"aria-expanded": n,
|
|
237
237
|
children: [
|
|
238
|
-
h ? /* @__PURE__ */ o("span", { children: h.name }) : /* @__PURE__ */ o(
|
|
239
|
-
/* @__PURE__ */ o(
|
|
238
|
+
h ? /* @__PURE__ */ o("span", { children: h.name }) : /* @__PURE__ */ o(bo, { children: t }),
|
|
239
|
+
/* @__PURE__ */ o(yo, { style: { color: u }, $isOpen: n, children: "▼" })
|
|
240
240
|
]
|
|
241
241
|
}
|
|
242
242
|
),
|
|
243
|
-
n && /* @__PURE__ */ g(
|
|
243
|
+
n && /* @__PURE__ */ g(wo, { role: "listbox", children: [
|
|
244
244
|
/* @__PURE__ */ o(
|
|
245
|
-
|
|
245
|
+
xo,
|
|
246
246
|
{
|
|
247
247
|
type: "text",
|
|
248
248
|
placeholder: i("search.placeholder"),
|
|
@@ -254,7 +254,7 @@ const fo = de`
|
|
|
254
254
|
se,
|
|
255
255
|
{
|
|
256
256
|
onClick: () => S(r),
|
|
257
|
-
onKeyDown: (
|
|
257
|
+
onKeyDown: (j) => N(j, r),
|
|
258
258
|
role: "option",
|
|
259
259
|
tabIndex: 0,
|
|
260
260
|
"aria-selected": h?.id === r.id,
|
|
@@ -265,38 +265,38 @@ const fo = de`
|
|
|
265
265
|
)) : /* @__PURE__ */ o(se, { children: i("select.noOptions") })
|
|
266
266
|
] })
|
|
267
267
|
] });
|
|
268
|
-
},
|
|
268
|
+
}, No = ({
|
|
269
269
|
handleCloseModal: p
|
|
270
270
|
}) => {
|
|
271
|
-
const t = Re(), { client: l } =
|
|
272
|
-
|
|
273
|
-
const { showToast:
|
|
271
|
+
const t = Re(), { client: l } = Ae();
|
|
272
|
+
Fe();
|
|
273
|
+
const { showToast: u } = je(), e = G(), { config: i, user: n, selectedUser: a, langSource: h } = O(
|
|
274
274
|
(s) => s.chatSettingStore
|
|
275
|
-
),
|
|
275
|
+
), F = O((s) => s.call.phase), y = O((s) => s.rooms.rooms), k = O(
|
|
276
276
|
(s) => s.rooms.activeRoomJID
|
|
277
|
-
), [v, C] = D(!1), S = ie(null), x = i?.videoCalls, c = i?.e2ee?.enabled === !0, U = x?.enabled === !0 && !!x?.livekitUrl?.trim() && (x?.allowedRoomTypes
|
|
278
|
-
t(
|
|
279
|
-
}, []),
|
|
280
|
-
|
|
281
|
-
}, []),
|
|
277
|
+
), [v, C] = D(!1), S = ie(null), x = i?.videoCalls, c = i?.e2ee?.enabled === !0, U = x?.enabled === !0 && !!x?.livekitUrl?.trim() && Be("private", x?.allowedRoomTypes), N = U && x?.enableAudioCalls === !0, r = F !== "idle", j = b(() => {
|
|
278
|
+
t(ze()), p();
|
|
279
|
+
}, []), _ = b(() => {
|
|
280
|
+
Ee.performLogout();
|
|
281
|
+
}, []), ue = J(
|
|
282
282
|
() => [
|
|
283
283
|
{
|
|
284
284
|
label: e("action.logOut"),
|
|
285
285
|
icon: /* @__PURE__ */ o($e, {}),
|
|
286
286
|
onClick: () => {
|
|
287
|
-
|
|
287
|
+
_();
|
|
288
288
|
},
|
|
289
289
|
styles: { color: "var(--ethora-color-danger, #D92D20)" }
|
|
290
290
|
}
|
|
291
291
|
],
|
|
292
|
-
[
|
|
293
|
-
),
|
|
294
|
-
t(
|
|
292
|
+
[_, e]
|
|
293
|
+
), fe = (s) => {
|
|
294
|
+
t(ao(s.id));
|
|
295
295
|
}, he = b(() => {
|
|
296
296
|
C(!0);
|
|
297
297
|
}, []), ge = async (s, d) => {
|
|
298
298
|
try {
|
|
299
|
-
const m =
|
|
299
|
+
const m = eo(
|
|
300
300
|
s,
|
|
301
301
|
i?.xmppSettings?.conference,
|
|
302
302
|
d
|
|
@@ -305,7 +305,7 @@ const fo = de`
|
|
|
305
305
|
return console.error(
|
|
306
306
|
"handleRoomCreation: failed to normalize new private room",
|
|
307
307
|
s
|
|
308
|
-
),
|
|
308
|
+
), u({
|
|
309
309
|
id: Date.now().toString(),
|
|
310
310
|
title: e("toast.error"),
|
|
311
311
|
message: e("toast.couldNotOpenPrivateChat"),
|
|
@@ -313,7 +313,7 @@ const fo = de`
|
|
|
313
313
|
duration: 4e3
|
|
314
314
|
}), null;
|
|
315
315
|
if (t(
|
|
316
|
-
|
|
316
|
+
oo({
|
|
317
317
|
room: m,
|
|
318
318
|
xmpp: l
|
|
319
319
|
})
|
|
@@ -329,7 +329,7 @@ const fo = de`
|
|
|
329
329
|
console.warn("getHistoryStanza failed (non-fatal):", w);
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
return t(te({ roomJID: m.jid })),
|
|
332
|
+
return t(te({ roomJID: m.jid })), u({
|
|
333
333
|
id: Date.now().toString(),
|
|
334
334
|
title: e("toast.success"),
|
|
335
335
|
message: e("toast.roomCreatedSuccess"),
|
|
@@ -344,9 +344,9 @@ const fo = de`
|
|
|
344
344
|
a?.name || `${a?.firstName || ""} ${a?.lastName || ""}`
|
|
345
345
|
).trim() || "";
|
|
346
346
|
if (i?.newArch !== !1) {
|
|
347
|
-
const
|
|
348
|
-
if (!
|
|
349
|
-
return
|
|
347
|
+
const X = a?.xmppUsername || a?.userJID || a?.id;
|
|
348
|
+
if (!X)
|
|
349
|
+
return u({
|
|
350
350
|
id: Date.now().toString(),
|
|
351
351
|
title: e("toast.error"),
|
|
352
352
|
message: e("toast.couldNotResolveRecipient"),
|
|
@@ -354,18 +354,18 @@ const fo = de`
|
|
|
354
354
|
duration: 4e3
|
|
355
355
|
}), null;
|
|
356
356
|
try {
|
|
357
|
-
const
|
|
358
|
-
return
|
|
359
|
-
jid:
|
|
360
|
-
bareName:
|
|
361
|
-
peerXmppUsername: String(
|
|
357
|
+
const $ = await Oe(X, s), H = await ge($, 2);
|
|
358
|
+
return H?.jid ? {
|
|
359
|
+
jid: H.jid,
|
|
360
|
+
bareName: H.jid.split("@")[0],
|
|
361
|
+
peerXmppUsername: String(X).split("@")[0],
|
|
362
362
|
peerDisplay: d
|
|
363
363
|
} : null;
|
|
364
|
-
} catch (
|
|
365
|
-
return console.error("postPrivateRoom failed:",
|
|
364
|
+
} catch ($) {
|
|
365
|
+
return console.error("postPrivateRoom failed:", $), u({
|
|
366
366
|
id: Date.now().toString(),
|
|
367
367
|
title: e("toast.error"),
|
|
368
|
-
message:
|
|
368
|
+
message: $?.message || e("toast.failedToCreatePrivateChat"),
|
|
369
369
|
type: "error",
|
|
370
370
|
duration: 4e3
|
|
371
371
|
}), null;
|
|
@@ -382,9 +382,9 @@ const fo = de`
|
|
|
382
382
|
peerXmppUsername: m,
|
|
383
383
|
peerDisplay: d
|
|
384
384
|
} : null;
|
|
385
|
-
}, [a, i?.newArch, l, n]),
|
|
385
|
+
}, [a, i?.newArch, l, n]), E = b(
|
|
386
386
|
async (s) => {
|
|
387
|
-
|
|
387
|
+
u({
|
|
388
388
|
id: Date.now().toString(),
|
|
389
389
|
title: e("toast.roomCreationTitle"),
|
|
390
390
|
message: e("toast.roomCreating"),
|
|
@@ -392,39 +392,43 @@ const fo = de`
|
|
|
392
392
|
duration: 3e3
|
|
393
393
|
}), await z(s), t(K());
|
|
394
394
|
},
|
|
395
|
-
[z, t,
|
|
395
|
+
[z, t, u, e]
|
|
396
|
+
), Z = b(
|
|
397
|
+
() => E(!1),
|
|
398
|
+
[E]
|
|
396
399
|
), Q = b(
|
|
397
|
-
() =>
|
|
398
|
-
[
|
|
399
|
-
), Y = b(
|
|
400
|
-
() => $(!0),
|
|
401
|
-
[$]
|
|
400
|
+
() => E(!0),
|
|
401
|
+
[E]
|
|
402
402
|
), M = b(
|
|
403
403
|
async (s) => {
|
|
404
404
|
const d = await z();
|
|
405
405
|
if (!d) return;
|
|
406
406
|
const m = d.peerDisplay || d.bareName;
|
|
407
407
|
t(
|
|
408
|
-
|
|
408
|
+
Te({
|
|
409
409
|
roomJid: d.jid,
|
|
410
410
|
roomName: m,
|
|
411
411
|
roomBareName: d.bareName,
|
|
412
412
|
kind: s,
|
|
413
413
|
peerXmppUsername: d.peerXmppUsername || null
|
|
414
414
|
})
|
|
415
|
-
), d.peerXmppUsername &&
|
|
415
|
+
), d.peerXmppUsername && Le(s, {
|
|
416
416
|
peerXmppUsername: d.peerXmppUsername,
|
|
417
417
|
roomBareName: d.bareName
|
|
418
418
|
}), t(K());
|
|
419
419
|
try {
|
|
420
|
-
await
|
|
420
|
+
await Me({
|
|
421
|
+
chatName: d.bareName,
|
|
422
|
+
kind: s,
|
|
423
|
+
peerXmppUsername: d.peerXmppUsername || null
|
|
424
|
+
});
|
|
421
425
|
} catch (w) {
|
|
422
426
|
const P = w instanceof Error ? w.message : e("toast.failedToCreateCall");
|
|
423
|
-
t(
|
|
427
|
+
t(Xe(P));
|
|
424
428
|
}
|
|
425
429
|
},
|
|
426
430
|
[z, t, e]
|
|
427
|
-
),
|
|
431
|
+
), Y = !!a && i?.features?.userBlock === !0 && !i?.disableUserBlock, ee = b(async () => {
|
|
428
432
|
const s = a?.xmppUsername || a?.userJID || a?.id;
|
|
429
433
|
if (s)
|
|
430
434
|
try {
|
|
@@ -436,32 +440,32 @@ const fo = de`
|
|
|
436
440
|
Object.values(y || {}).forEach((P) => {
|
|
437
441
|
P.type !== "private" || !(P.members || []).some(
|
|
438
442
|
(R) => R.xmppUsername && R.xmppUsername !== m && R.xmppUsername.split("@")[0] === d
|
|
439
|
-
) || (t(
|
|
440
|
-
}), w && (typeof window < "u" && window.history.pushState(null, "", window.location.pathname), t(te({ roomJID: null }))), t(K()),
|
|
443
|
+
) || (t(We({ jid: P.jid })), P.jid === k && (w = !0));
|
|
444
|
+
}), w && (typeof window < "u" && window.history.pushState(null, "", window.location.pathname), t(te({ roomJID: null }))), t(K()), u({
|
|
441
445
|
id: Date.now().toString(),
|
|
442
446
|
title: e("toast.success"),
|
|
443
447
|
message: e("toast.blockedSuccess"),
|
|
444
448
|
type: "success"
|
|
445
449
|
});
|
|
446
450
|
} catch (d) {
|
|
447
|
-
le.log("Block user failed", d),
|
|
451
|
+
le.log("Block user failed", d), u({
|
|
448
452
|
id: Date.now().toString(),
|
|
449
453
|
title: e("toast.error"),
|
|
450
454
|
message: e("toast.blockFailed"),
|
|
451
455
|
type: "error"
|
|
452
456
|
});
|
|
453
457
|
}
|
|
454
|
-
}, [a, t,
|
|
458
|
+
}, [a, t, u, e, n?.xmppUsername, y, k]), f = a ?? n, ve = () => {
|
|
455
459
|
if (h)
|
|
456
460
|
return ne.find((s) => s.id === h);
|
|
457
461
|
}, be = a ? void 0 : /* @__PURE__ */ g(T, { children: [
|
|
458
|
-
/* @__PURE__ */ o(V, { onClick: he, "aria-label": e("action.editProfile"), children: /* @__PURE__ */ o(
|
|
462
|
+
/* @__PURE__ */ o(V, { onClick: he, "aria-label": e("action.editProfile"), children: /* @__PURE__ */ o(Ke, { color: "var(--ethora-color-text-muted, #8C8C8C)" }) }),
|
|
459
463
|
/* @__PURE__ */ o(
|
|
460
|
-
|
|
464
|
+
Ve,
|
|
461
465
|
{
|
|
462
|
-
options:
|
|
466
|
+
options: ue,
|
|
463
467
|
position: "left",
|
|
464
|
-
menuIcon: /* @__PURE__ */ o(
|
|
468
|
+
menuIcon: /* @__PURE__ */ o(qe, {})
|
|
465
469
|
}
|
|
466
470
|
)
|
|
467
471
|
] }), ye = /* @__PURE__ */ g(T, { children: [
|
|
@@ -485,39 +489,39 @@ const fo = de`
|
|
|
485
489
|
children: e("action.save")
|
|
486
490
|
}
|
|
487
491
|
)
|
|
488
|
-
] }), oe = a && a.xmppUsername !== n.xmppUsername && !i?.disableProfilesInteractions, we =
|
|
492
|
+
] }), oe = a && a.xmppUsername !== n.xmppUsername && !i?.disableProfilesInteractions, we = J(
|
|
489
493
|
() => /* @__PURE__ */ g(T, { children: [
|
|
490
494
|
/* @__PURE__ */ g(pe, { children: [
|
|
491
495
|
/* @__PURE__ */ o(
|
|
492
496
|
ce,
|
|
493
497
|
{
|
|
494
|
-
icon:
|
|
495
|
-
name:
|
|
498
|
+
icon: f?.profileImage ?? null,
|
|
499
|
+
name: f?.name ?? f?.firstName,
|
|
496
500
|
size: 96
|
|
497
501
|
}
|
|
498
502
|
),
|
|
499
|
-
/* @__PURE__ */ o(
|
|
503
|
+
/* @__PURE__ */ o(io, { children: f?.name ? `${f?.name}` : `${f?.firstName} ${f?.lastName}` })
|
|
500
504
|
] }),
|
|
501
505
|
/* @__PURE__ */ g(L, { children: [
|
|
502
|
-
/* @__PURE__ */ o(
|
|
506
|
+
/* @__PURE__ */ o(q, { children: e("modal.profile.about") }),
|
|
503
507
|
/* @__PURE__ */ o(
|
|
504
|
-
|
|
508
|
+
lo,
|
|
505
509
|
{
|
|
506
|
-
$empty: !(
|
|
507
|
-
children:
|
|
510
|
+
$empty: !(f?.description && f?.description?.length > 4),
|
|
511
|
+
children: f?.description && f?.description?.length > 4 ? f.description : e("modal.profile.noDescription")
|
|
508
512
|
}
|
|
509
513
|
)
|
|
510
514
|
] }),
|
|
511
515
|
!a && i?.translates?.enabled && /* @__PURE__ */ g(L, { children: [
|
|
512
|
-
/* @__PURE__ */ o(
|
|
513
|
-
/* @__PURE__ */ o(
|
|
514
|
-
/* @__PURE__ */ o(
|
|
516
|
+
/* @__PURE__ */ o(q, { children: e("modal.profile.preferences") }),
|
|
517
|
+
/* @__PURE__ */ o(ro, { children: /* @__PURE__ */ g(to, { children: [
|
|
518
|
+
/* @__PURE__ */ o(no, { children: e("modal.profile.languageHint") }),
|
|
515
519
|
/* @__PURE__ */ o(
|
|
516
|
-
|
|
520
|
+
Co,
|
|
517
521
|
{
|
|
518
522
|
options: ne,
|
|
519
523
|
placeholder: e("language.select"),
|
|
520
|
-
onSelect:
|
|
524
|
+
onSelect: fe,
|
|
521
525
|
accentColor: i?.colors?.primary,
|
|
522
526
|
selectedValue: ve()
|
|
523
527
|
}
|
|
@@ -525,30 +529,30 @@ const fo = de`
|
|
|
525
529
|
] }) })
|
|
526
530
|
] }),
|
|
527
531
|
oe && /* @__PURE__ */ g(L, { children: [
|
|
528
|
-
/* @__PURE__ */ o(
|
|
529
|
-
/* @__PURE__ */ g(
|
|
532
|
+
/* @__PURE__ */ o(q, { children: e("modal.profile.actions") }),
|
|
533
|
+
/* @__PURE__ */ g(co, { children: [
|
|
530
534
|
/* @__PURE__ */ o(
|
|
531
|
-
|
|
535
|
+
A,
|
|
532
536
|
{
|
|
533
537
|
StartIcon: /* @__PURE__ */ o(Ge, {}),
|
|
534
|
-
onClick:
|
|
538
|
+
onClick: Z,
|
|
535
539
|
variant: "filled",
|
|
536
540
|
children: e("action.message")
|
|
537
541
|
}
|
|
538
542
|
),
|
|
539
543
|
c && /* @__PURE__ */ o(
|
|
540
|
-
|
|
544
|
+
A,
|
|
541
545
|
{
|
|
542
546
|
StartIcon: /* @__PURE__ */ o(_e, { color: "var(--ethora-color-text-on-primary, #FFFFFF)" }),
|
|
543
|
-
onClick:
|
|
547
|
+
onClick: Q,
|
|
544
548
|
variant: "filled",
|
|
545
549
|
children: e("action.encryptedMessage")
|
|
546
550
|
}
|
|
547
551
|
),
|
|
548
552
|
U && /* @__PURE__ */ o(
|
|
549
|
-
|
|
553
|
+
A,
|
|
550
554
|
{
|
|
551
|
-
StartIcon: /* @__PURE__ */ o(
|
|
555
|
+
StartIcon: /* @__PURE__ */ o(Ze, { color: "var(--ethora-color-text-on-primary, #FFFFFF)" }),
|
|
552
556
|
onClick: () => {
|
|
553
557
|
M("video");
|
|
554
558
|
},
|
|
@@ -558,7 +562,7 @@ const fo = de`
|
|
|
558
562
|
}
|
|
559
563
|
),
|
|
560
564
|
N && /* @__PURE__ */ o(
|
|
561
|
-
|
|
565
|
+
A,
|
|
562
566
|
{
|
|
563
567
|
StartIcon: /* @__PURE__ */ o(Qe, { color: "var(--ethora-color-text-on-primary, #FFFFFF)" }),
|
|
564
568
|
onClick: () => {
|
|
@@ -570,15 +574,15 @@ const fo = de`
|
|
|
570
574
|
}
|
|
571
575
|
),
|
|
572
576
|
/* @__PURE__ */ o(
|
|
573
|
-
|
|
577
|
+
A,
|
|
574
578
|
{
|
|
575
|
-
onClick: () =>
|
|
579
|
+
onClick: () => po(a.id),
|
|
576
580
|
variant: "outlined",
|
|
577
581
|
children: e("action.copyUserId")
|
|
578
582
|
}
|
|
579
583
|
),
|
|
580
|
-
|
|
581
|
-
|
|
584
|
+
Y && /* @__PURE__ */ o(
|
|
585
|
+
A,
|
|
582
586
|
{
|
|
583
587
|
StartIcon: /* @__PURE__ */ o(Ye, {}),
|
|
584
588
|
onClick: ee,
|
|
@@ -591,15 +595,15 @@ const fo = de`
|
|
|
591
595
|
] })
|
|
592
596
|
] }),
|
|
593
597
|
[
|
|
594
|
-
|
|
598
|
+
f,
|
|
595
599
|
U,
|
|
596
|
-
|
|
600
|
+
Y,
|
|
597
601
|
N,
|
|
598
602
|
r,
|
|
599
603
|
M,
|
|
600
604
|
ee,
|
|
605
|
+
Z,
|
|
601
606
|
Q,
|
|
602
|
-
Y,
|
|
603
607
|
c,
|
|
604
608
|
a,
|
|
605
609
|
oe,
|
|
@@ -608,28 +612,28 @@ const fo = de`
|
|
|
608
612
|
h,
|
|
609
613
|
e
|
|
610
614
|
]
|
|
611
|
-
), xe =
|
|
615
|
+
), xe = J(
|
|
612
616
|
() => /* @__PURE__ */ o(
|
|
613
617
|
me,
|
|
614
618
|
{
|
|
615
619
|
ref: S,
|
|
616
620
|
setIsEditing: C,
|
|
617
|
-
modalUser:
|
|
621
|
+
modalUser: f,
|
|
618
622
|
config: i
|
|
619
623
|
}
|
|
620
624
|
),
|
|
621
|
-
[
|
|
625
|
+
[f]
|
|
622
626
|
);
|
|
623
627
|
return /* @__PURE__ */ o(
|
|
624
|
-
|
|
628
|
+
so,
|
|
625
629
|
{
|
|
626
630
|
title: e("modal.profile.title"),
|
|
627
|
-
onClose:
|
|
631
|
+
onClose: j,
|
|
628
632
|
headerActions: v ? ye : be,
|
|
629
633
|
children: v ? xe : we
|
|
630
634
|
}
|
|
631
635
|
);
|
|
632
636
|
};
|
|
633
637
|
export {
|
|
634
|
-
|
|
638
|
+
No as default
|
|
635
639
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import m, { useCallback as D, useMemo as h } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { S as b, D as u, a as k, b as y, c as S, d as f } from "./SideDrawer-
|
|
3
|
+
import { Z as g, a as p, _ as w, $ as l } from "./main-B25iFKAC.js";
|
|
4
|
+
import { S as b, D as u, a as k, b as y, c as S, d as f } from "./SideDrawer-A_1ECqD2.js";
|
|
5
5
|
const T = ({
|
|
6
6
|
handleCloseModal: n
|
|
7
7
|
}) => {
|