@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,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as o, Fragment as
|
|
2
|
-
import { useState as m, useCallback as
|
|
3
|
-
import {
|
|
4
|
-
import { S as P, D as f, a as
|
|
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 { b8 as I, a4 as t, b9 as j, ba as w, U as B, u as U, Z as z, ac as E, bb as F, af as R, a2 as x, bc as $, bd as A, be as O, bf as H } from "./main-B25iFKAC.js";
|
|
4
|
+
import { S as P, D as f, a as b, b as u, e as D, f as v } from "./SideDrawer-A_1ECqD2.js";
|
|
5
5
|
t(j)`
|
|
6
6
|
display: flex;
|
|
7
7
|
box-sizing: border-box;
|
|
@@ -73,13 +73,13 @@ const y = t(B)`
|
|
|
73
73
|
padding: var(--ethora-space-4, 16px);
|
|
74
74
|
border-radius: var(--ethora-radius-md, 12px);
|
|
75
75
|
gap: var(--ethora-space-2, 8px);
|
|
76
|
-
`,
|
|
76
|
+
`, Z = t.div`
|
|
77
77
|
font-size: var(--ethora-font-size-xs, 12px);
|
|
78
78
|
line-height: var(--ethora-line-height-normal, 1.5);
|
|
79
79
|
color: var(--ethora-color-text, #141414);
|
|
80
80
|
display: flex;
|
|
81
81
|
text-align: start;
|
|
82
|
-
`,
|
|
82
|
+
`, N = ({
|
|
83
83
|
handleCloseModal: r
|
|
84
84
|
}) => {
|
|
85
85
|
const { config: l } = U((s) => s.chatSettingStore), e = z(), { showToast: d } = E(), [C, c] = m(!1), [i, g] = m(!1), S = async () => {
|
|
@@ -87,7 +87,7 @@ const y = t(B)`
|
|
|
87
87
|
x.log(p);
|
|
88
88
|
const L = new Blob([p], { type: "text/plain" }), h = URL.createObjectURL(L), n = document.createElement("a");
|
|
89
89
|
n.href = h, n.download = "mydata.json", document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(h);
|
|
90
|
-
}, k =
|
|
90
|
+
}, k = M(async () => {
|
|
91
91
|
if (!i) {
|
|
92
92
|
g(!0);
|
|
93
93
|
try {
|
|
@@ -103,7 +103,7 @@ const y = t(B)`
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}, [i, d, e]);
|
|
106
|
-
return /* @__PURE__ */ o(
|
|
106
|
+
return /* @__PURE__ */ o(T, { children: [
|
|
107
107
|
/* @__PURE__ */ o(
|
|
108
108
|
P,
|
|
109
109
|
{
|
|
@@ -112,8 +112,8 @@ const y = t(B)`
|
|
|
112
112
|
backLabel: e("action.back"),
|
|
113
113
|
children: [
|
|
114
114
|
/* @__PURE__ */ o(f, { children: [
|
|
115
|
-
/* @__PURE__ */ a(
|
|
116
|
-
/* @__PURE__ */ a(
|
|
115
|
+
/* @__PURE__ */ a(b, { children: e("settings.manageData.section.export") }),
|
|
116
|
+
/* @__PURE__ */ a(u, { children: /* @__PURE__ */ o(D, { children: [
|
|
117
117
|
/* @__PURE__ */ a(v, { children: e("settings.manageData.downloadDescription") }),
|
|
118
118
|
/* @__PURE__ */ a(
|
|
119
119
|
y,
|
|
@@ -127,8 +127,8 @@ const y = t(B)`
|
|
|
127
127
|
] }) })
|
|
128
128
|
] }),
|
|
129
129
|
/* @__PURE__ */ o(f, { children: [
|
|
130
|
-
/* @__PURE__ */ a(
|
|
131
|
-
/* @__PURE__ */ a(
|
|
130
|
+
/* @__PURE__ */ a(b, { children: e("settings.manageData.deleteLabel") }),
|
|
131
|
+
/* @__PURE__ */ a(u, { children: /* @__PURE__ */ o(D, { children: [
|
|
132
132
|
/* @__PURE__ */ a(v, { children: e("settings.manageData.deleteDescription") }),
|
|
133
133
|
/* @__PURE__ */ o(
|
|
134
134
|
W,
|
|
@@ -137,7 +137,7 @@ const y = t(B)`
|
|
|
137
137
|
style: { marginTop: "var(--ethora-space-2, 8px)" },
|
|
138
138
|
children: [
|
|
139
139
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a($, { color: A(l) }) }),
|
|
140
|
-
/* @__PURE__ */ a(
|
|
140
|
+
/* @__PURE__ */ a(Z, { children: e("settings.manageData.deleteDisclosure") })
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
),
|
|
@@ -174,5 +174,5 @@ const y = t(B)`
|
|
|
174
174
|
] });
|
|
175
175
|
};
|
|
176
176
|
export {
|
|
177
|
-
|
|
177
|
+
N as default
|
|
178
178
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as fs, jsx as ie, Fragment as hs } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Y as ei } from "./main-B25iFKAC.js";
|
|
4
4
|
function zr(e) {
|
|
5
5
|
const t = [], n = String(e || "");
|
|
6
6
|
let r = n.indexOf(","), u = 0, i = !1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as a, jsxs as i, Fragment as
|
|
1
|
+
import { jsx as a, jsxs as i, Fragment as G } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as J, useState as h, useMemo as I, useEffect as V } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { S as ce, i as le, j as de, f as S } from "./SideDrawer-
|
|
3
|
+
import { Z as Y, a as Z, bi as K, u as z, aS as W, aR as X, aT as ee, bj as re, bk as te, a_ as ae, bl as oe, bm as se, bn as ne, a4 as c, _ as ie } from "./main-B25iFKAC.js";
|
|
4
|
+
import { S as ce, i as le, j as de, f as S } from "./SideDrawer-A_1ECqD2.js";
|
|
5
5
|
function he(t) {
|
|
6
6
|
const e = /^(\d{4})-(\d{2})-(\d{2})$/.exec(t || "");
|
|
7
7
|
if (!e) return;
|
|
@@ -52,7 +52,7 @@ const ge = c.div`
|
|
|
52
52
|
`, be = c.div`
|
|
53
53
|
display: flex;
|
|
54
54
|
gap: var(--ethora-space-2, 8px);
|
|
55
|
-
`,
|
|
55
|
+
`, H = c.button`
|
|
56
56
|
flex: 1 1 0;
|
|
57
57
|
height: 32px;
|
|
58
58
|
border: 1px solid
|
|
@@ -175,34 +175,34 @@ const ge = c.div`
|
|
|
175
175
|
`, Re = ({
|
|
176
176
|
handleCloseModal: t
|
|
177
177
|
}) => {
|
|
178
|
-
const e = Y(), l =
|
|
178
|
+
const e = Y(), l = Z(), k = K(767), p = J(null), u = z((r) => r.rooms.rooms), n = z(
|
|
179
179
|
(r) => r.rooms.activeRoomJID
|
|
180
|
-
), b =
|
|
181
|
-
|
|
180
|
+
), b = z((r) => r.rooms.usersSet);
|
|
181
|
+
z(
|
|
182
182
|
(r) => r.chatSettingStore.user?.xmppUsername
|
|
183
183
|
);
|
|
184
184
|
const [d, x] = h(""), [s, O] = h(
|
|
185
185
|
n ? "chat" : "all"
|
|
186
|
-
), F = n ? n.split("@")[0] : void 0, [C,
|
|
186
|
+
), F = n ? n.split("@")[0] : void 0, [C, U] = h(!1), [m, T] = h(""), [f, L] = h(""), [g, M] = h(
|
|
187
187
|
null
|
|
188
|
-
), [v, N] = h(""), y = ue(m, f),
|
|
188
|
+
), [v, N] = h(""), y = ue(m, f), _ = I(
|
|
189
189
|
() => ({
|
|
190
190
|
fromUserId: g?.id,
|
|
191
191
|
since: y ? void 0 : he(m),
|
|
192
192
|
until: y ? void 0 : pe(f)
|
|
193
193
|
}),
|
|
194
194
|
[g?.id, m, f, y]
|
|
195
|
-
), w = (g ? 1 : 0) + (m ? 1 : 0) + (f ? 1 : 0),
|
|
196
|
-
|
|
197
|
-
}, Q = n ? u[n] : void 0, { members: D } =
|
|
195
|
+
), w = (g ? 1 : 0) + (m ? 1 : 0) + (f ? 1 : 0), E = () => {
|
|
196
|
+
M(null), N(""), T(""), L("");
|
|
197
|
+
}, Q = n ? u[n] : void 0, { members: D } = W(
|
|
198
198
|
n || void 0,
|
|
199
|
-
s === "chat" &&
|
|
200
|
-
),
|
|
199
|
+
s === "chat" && X(Q) && (C || v.trim() !== "")
|
|
200
|
+
), j = I(() => {
|
|
201
201
|
if (!v.trim()) return [];
|
|
202
202
|
let r;
|
|
203
203
|
if (s === "chat") {
|
|
204
|
-
const
|
|
205
|
-
D.length > 0 ? r = ee([...
|
|
204
|
+
const B = n && u[n]?.members || [];
|
|
205
|
+
D.length > 0 ? r = ee([...B, ...D]) : r = B;
|
|
206
206
|
} else
|
|
207
207
|
r = Object.values(b || {});
|
|
208
208
|
return fe(r, v);
|
|
@@ -210,14 +210,14 @@ const ge = c.div`
|
|
|
210
210
|
y ? "" : d,
|
|
211
211
|
s,
|
|
212
212
|
F,
|
|
213
|
-
|
|
213
|
+
_
|
|
214
214
|
);
|
|
215
215
|
V(() => {
|
|
216
216
|
p.current?.focus();
|
|
217
217
|
}, []);
|
|
218
|
-
const { open:
|
|
219
|
-
|
|
220
|
-
}, R = I(() => o.items, [o.items]),
|
|
218
|
+
const { open: P } = te(), q = (r) => {
|
|
219
|
+
P(r) && k && l(ie(void 0));
|
|
220
|
+
}, R = I(() => o.items, [o.items]), A = d.trim();
|
|
221
221
|
return /* @__PURE__ */ a(
|
|
222
222
|
ce,
|
|
223
223
|
{
|
|
@@ -244,7 +244,7 @@ const ge = c.div`
|
|
|
244
244
|
] }),
|
|
245
245
|
/* @__PURE__ */ i(be, { role: "group", "aria-label": e("search.messages.scope"), children: [
|
|
246
246
|
/* @__PURE__ */ a(
|
|
247
|
-
|
|
247
|
+
H,
|
|
248
248
|
{
|
|
249
249
|
type: "button",
|
|
250
250
|
$active: s === "chat",
|
|
@@ -255,7 +255,7 @@ const ge = c.div`
|
|
|
255
255
|
}
|
|
256
256
|
),
|
|
257
257
|
/* @__PURE__ */ a(
|
|
258
|
-
|
|
258
|
+
H,
|
|
259
259
|
{
|
|
260
260
|
type: "button",
|
|
261
261
|
$active: s === "all",
|
|
@@ -271,7 +271,7 @@ const ge = c.div`
|
|
|
271
271
|
type: "button",
|
|
272
272
|
$active: C || w > 0,
|
|
273
273
|
"aria-expanded": C,
|
|
274
|
-
onClick: () =>
|
|
274
|
+
onClick: () => U((r) => !r),
|
|
275
275
|
children: [
|
|
276
276
|
e("search.messages.filters"),
|
|
277
277
|
w > 0 && /* @__PURE__ */ a("span", { children: w })
|
|
@@ -288,7 +288,7 @@ const ge = c.div`
|
|
|
288
288
|
{
|
|
289
289
|
type: "button",
|
|
290
290
|
"aria-label": e("search.messages.filterClear"),
|
|
291
|
-
onClick: () =>
|
|
291
|
+
onClick: () => M(null),
|
|
292
292
|
children: "×"
|
|
293
293
|
}
|
|
294
294
|
)
|
|
@@ -302,14 +302,14 @@ const ge = c.div`
|
|
|
302
302
|
}
|
|
303
303
|
)
|
|
304
304
|
] }),
|
|
305
|
-
!g &&
|
|
305
|
+
!g && j.length > 0 && /* @__PURE__ */ a(Se, { role: "listbox", children: j.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
|
|
306
306
|
"button",
|
|
307
307
|
{
|
|
308
308
|
type: "button",
|
|
309
309
|
role: "option",
|
|
310
310
|
"aria-selected": !1,
|
|
311
311
|
onClick: () => {
|
|
312
|
-
|
|
312
|
+
M(r), N("");
|
|
313
313
|
},
|
|
314
314
|
children: r.name
|
|
315
315
|
}
|
|
@@ -323,7 +323,7 @@ const ge = c.div`
|
|
|
323
323
|
type: "date",
|
|
324
324
|
value: m,
|
|
325
325
|
max: f || void 0,
|
|
326
|
-
onChange: (r) =>
|
|
326
|
+
onChange: (r) => T(r.target.value)
|
|
327
327
|
}
|
|
328
328
|
)
|
|
329
329
|
] }),
|
|
@@ -341,9 +341,9 @@ const ge = c.div`
|
|
|
341
341
|
] })
|
|
342
342
|
] }),
|
|
343
343
|
y && /* @__PURE__ */ a(S, { role: "alert", children: e("search.messages.dateOrder") }),
|
|
344
|
-
w > 0 && /* @__PURE__ */ a(Ce, { type: "button", onClick:
|
|
344
|
+
w > 0 && /* @__PURE__ */ a(Ce, { type: "button", onClick: E, children: e("search.messages.filterClearAll") })
|
|
345
345
|
] }),
|
|
346
|
-
!o.searchable && /* @__PURE__ */ a(S, { children:
|
|
346
|
+
!o.searchable && /* @__PURE__ */ a(S, { children: A ? e("search.messages.tooShort", { count: oe }) : e("search.messages.hint") }),
|
|
347
347
|
o.searchable && o.status === "loading" && /* @__PURE__ */ a(S, { role: "status", children: e("search.messages.searching") }),
|
|
348
348
|
o.status === "error" && /* @__PURE__ */ i(S, { role: "alert", children: [
|
|
349
349
|
e("search.messages.error"),
|
|
@@ -351,15 +351,15 @@ const ge = c.div`
|
|
|
351
351
|
/* @__PURE__ */ a("button", { type: "button", onClick: o.retry, children: e("search.messages.retry") })
|
|
352
352
|
] }),
|
|
353
353
|
o.searchable && o.status === "done" && R.length === 0 && /* @__PURE__ */ a(S, { children: e("search.messages.empty") }),
|
|
354
|
-
R.length > 0 && /* @__PURE__ */ i(
|
|
354
|
+
R.length > 0 && /* @__PURE__ */ i(G, { children: [
|
|
355
355
|
/* @__PURE__ */ a(we, { role: "status", children: e("search.messages.count", { count: o.total }) }),
|
|
356
356
|
/* @__PURE__ */ a(
|
|
357
357
|
se,
|
|
358
358
|
{
|
|
359
359
|
hits: R,
|
|
360
|
-
query:
|
|
360
|
+
query: A,
|
|
361
361
|
showRoom: s === "all",
|
|
362
|
-
onOpen:
|
|
362
|
+
onOpen: q
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
365
|
o.hasMore && /* @__PURE__ */ a(
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import { S as
|
|
1
|
+
import { jsxs as p, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useRef as B, useCallback as N, useEffect as P, useMemo as z } from "react";
|
|
3
|
+
import { c as T, bo as E, Z as U, a as F, bi as H, u as A, a_ as J, a4 as c, ap as Z, _ as q } from "./main-B25iFKAC.js";
|
|
4
|
+
import { S as G, i as V, j as K, f as S } from "./SideDrawer-A_1ECqD2.js";
|
|
5
5
|
const I = 50;
|
|
6
6
|
async function Q({
|
|
7
7
|
offset: r = 0,
|
|
8
8
|
limit: t = I,
|
|
9
9
|
signal: u
|
|
10
10
|
} = {}) {
|
|
11
|
-
const x =
|
|
11
|
+
const x = T.getState().chatSettingStore.user?.token || "", s = (await E.get("/v1/chats/public", {
|
|
12
12
|
params: { limit: Math.min(t, I), offset: r },
|
|
13
13
|
headers: { Authorization: x },
|
|
14
14
|
signal: u
|
|
@@ -103,23 +103,23 @@ const W = c.ul`
|
|
|
103
103
|
`, oe = (r) => (r.title || r.name).trim().charAt(0).toUpperCase() || "#", le = ({
|
|
104
104
|
handleCloseModal: r
|
|
105
105
|
}) => {
|
|
106
|
-
const t =
|
|
106
|
+
const t = U(), u = F(), x = H(767), b = A((e) => e.rooms.rooms), s = A(
|
|
107
107
|
(e) => e.chatSettingStore.config?.xmppSettings?.conference
|
|
108
|
-
), [l, i] =
|
|
108
|
+
), [l, i] = d([]), [j, $] = d(0), [v, D] = d(0), [n, w] = d("loading"), [h, L] = d(""), m = B(0), f = N(async (e) => {
|
|
109
109
|
const o = ++m.current;
|
|
110
110
|
w(e ? "loadingMore" : "loading");
|
|
111
111
|
try {
|
|
112
112
|
const g = await Q({ offset: e });
|
|
113
113
|
if (o !== m.current) return;
|
|
114
114
|
i((k) => {
|
|
115
|
-
const
|
|
116
|
-
return e ? [...k, ...g.items.filter((C) => !
|
|
115
|
+
const _ = new Set(k.map((C) => C.name));
|
|
116
|
+
return e ? [...k, ...g.items.filter((C) => !_.has(C.name))] : g.items;
|
|
117
117
|
}), $(g.total), D(g.nextOffset), w("done");
|
|
118
118
|
} catch {
|
|
119
119
|
o === m.current && w("error");
|
|
120
120
|
}
|
|
121
121
|
}, []);
|
|
122
|
-
|
|
122
|
+
P(() => (f(0), () => {
|
|
123
123
|
m.current += 1;
|
|
124
124
|
}), [f]);
|
|
125
125
|
const O = z(
|
|
@@ -130,18 +130,18 @@ const W = c.ul`
|
|
|
130
130
|
return e ? l.filter(
|
|
131
131
|
(o) => o.title.toLowerCase().includes(e) || o.description.toLowerCase().includes(e)
|
|
132
132
|
) : l;
|
|
133
|
-
}, [l, h]),
|
|
133
|
+
}, [l, h]), R = (e) => {
|
|
134
134
|
const o = (s || "").trim();
|
|
135
|
-
o && (u(
|
|
135
|
+
o && (u(Z({ roomJID: `${e.name}@${o}` })), x && u(q(void 0)));
|
|
136
136
|
}, M = v < j;
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
|
|
137
|
+
return /* @__PURE__ */ p(
|
|
138
|
+
G,
|
|
139
139
|
{
|
|
140
140
|
title: t("publicChats.title"),
|
|
141
141
|
onClose: r,
|
|
142
142
|
backLabel: t("action.close"),
|
|
143
143
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ p(V, { children: [
|
|
145
145
|
/* @__PURE__ */ a(J, {}),
|
|
146
146
|
/* @__PURE__ */ a(
|
|
147
147
|
K,
|
|
@@ -155,7 +155,7 @@ const W = c.ul`
|
|
|
155
155
|
)
|
|
156
156
|
] }),
|
|
157
157
|
n === "loading" && /* @__PURE__ */ a(S, { role: "status", children: t("publicChats.loading") }),
|
|
158
|
-
n === "error" && /* @__PURE__ */
|
|
158
|
+
n === "error" && /* @__PURE__ */ p(S, { role: "alert", children: [
|
|
159
159
|
t("publicChats.error"),
|
|
160
160
|
" ",
|
|
161
161
|
/* @__PURE__ */ a("button", { type: "button", onClick: () => {
|
|
@@ -165,9 +165,9 @@ const W = c.ul`
|
|
|
165
165
|
n !== "loading" && n !== "error" && y.length === 0 && /* @__PURE__ */ a(S, { children: h.trim() && M ? t("publicChats.emptyFilterMore") : t("publicChats.empty") }),
|
|
166
166
|
y.length > 0 && /* @__PURE__ */ a(W, { children: y.map((e) => {
|
|
167
167
|
const o = O.has(e.name);
|
|
168
|
-
return /* @__PURE__ */
|
|
168
|
+
return /* @__PURE__ */ p(X, { children: [
|
|
169
169
|
/* @__PURE__ */ a(Y, { $src: e.picture, "aria-hidden": "true", children: !e.picture && oe(e) }),
|
|
170
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ p(ee, { children: [
|
|
171
171
|
/* @__PURE__ */ a("strong", { children: e.title || t("search.messages.chat") }),
|
|
172
172
|
e.description && /* @__PURE__ */ a("span", { children: e.description })
|
|
173
173
|
] }),
|
|
@@ -176,7 +176,7 @@ const W = c.ul`
|
|
|
176
176
|
{
|
|
177
177
|
type: "button",
|
|
178
178
|
$open: o,
|
|
179
|
-
onClick: () =>
|
|
179
|
+
onClick: () => R(e),
|
|
180
180
|
children: t(o ? "publicChats.open" : "publicChats.join")
|
|
181
181
|
}
|
|
182
182
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useId as f, useRef as v } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Z as g, a5 as u, bi as m, bp as b, U as w, bq as y, a4 as e, br as D, bs as k } from "./main-B25iFKAC.js";
|
|
4
4
|
const c = 767, R = `${c}px`, z = e.div`
|
|
5
5
|
position: relative;
|
|
6
6
|
pointer-events: auto;
|
|
@@ -20,7 +20,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
20
20
|
@media (min-width: 768px) {
|
|
21
21
|
border-left: 1px solid var(--ethora-color-border, #e6e8ec);
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
23
|
+
`, B = e.header`
|
|
24
24
|
display: flex;
|
|
25
25
|
align-items: center;
|
|
26
26
|
gap: var(--ethora-space-2, 8px);
|
|
@@ -28,7 +28,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
28
28
|
padding: var(--ethora-space-2, 8px) var(--ethora-space-3, 12px);
|
|
29
29
|
border-bottom: 1px solid var(--ethora-color-border, #e6e8ec);
|
|
30
30
|
background-color: var(--ethora-color-bg, #fff);
|
|
31
|
-
`,
|
|
31
|
+
`, I = e.h2`
|
|
32
32
|
flex: 1 1 auto;
|
|
33
33
|
margin: 0;
|
|
34
34
|
min-width: 0;
|
|
@@ -58,11 +58,11 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
58
58
|
padding-left: var(--ethora-space-4, 16px);
|
|
59
59
|
padding-right: var(--ethora-space-4, 16px);
|
|
60
60
|
}
|
|
61
|
-
`,
|
|
61
|
+
`, $ = e.section`
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
64
64
|
gap: var(--ethora-space-2, 8px);
|
|
65
|
-
`,
|
|
65
|
+
`, O = e.h3`
|
|
66
66
|
margin: 0;
|
|
67
67
|
padding: 0 var(--ethora-space-1, 4px);
|
|
68
68
|
font-size: var(--ethora-font-size-xs, 12px);
|
|
@@ -70,7 +70,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
70
70
|
letter-spacing: 0.06em;
|
|
71
71
|
text-transform: uppercase;
|
|
72
72
|
color: var(--ethora-color-text-muted, #8c8c8c);
|
|
73
|
-
`,
|
|
73
|
+
`, W = e.div`
|
|
74
74
|
display: flex;
|
|
75
75
|
flex-direction: column;
|
|
76
76
|
box-sizing: border-box;
|
|
@@ -89,7 +89,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
89
89
|
align-items: baseline;
|
|
90
90
|
justify-content: space-between;
|
|
91
91
|
gap: var(--ethora-space-2, 8px);
|
|
92
|
-
`,
|
|
92
|
+
`, q = e.button`
|
|
93
93
|
border: none;
|
|
94
94
|
background: transparent;
|
|
95
95
|
padding: var(--ethora-space-2, 8px) 0;
|
|
@@ -109,11 +109,11 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
109
109
|
outline-offset: 2px;
|
|
110
110
|
border-radius: var(--ethora-radius-sm, 8px);
|
|
111
111
|
}
|
|
112
|
-
`,
|
|
112
|
+
`, F = e.div`
|
|
113
113
|
height: 1px;
|
|
114
114
|
margin: 0 var(--ethora-space-4, 16px);
|
|
115
115
|
background-color: var(--ethora-color-border, #e6e8ec);
|
|
116
|
-
`,
|
|
116
|
+
`, U = e.div`
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
119
119
|
gap: var(--ethora-space-2, 8px);
|
|
@@ -135,7 +135,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
135
135
|
& > svg {
|
|
136
136
|
flex: 0 0 auto;
|
|
137
137
|
}
|
|
138
|
-
`,
|
|
138
|
+
`, V = e.input`
|
|
139
139
|
flex: 1 1 auto;
|
|
140
140
|
min-width: 0;
|
|
141
141
|
border: none;
|
|
@@ -148,7 +148,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
148
148
|
&::placeholder {
|
|
149
149
|
color: var(--ethora-color-text-muted, #8c8c8c);
|
|
150
150
|
}
|
|
151
|
-
`,
|
|
151
|
+
`, X = e.div`
|
|
152
152
|
display: flex;
|
|
153
153
|
flex-direction: column;
|
|
154
154
|
width: 100%;
|
|
@@ -192,11 +192,11 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
192
192
|
gap: var(--ethora-space-1, 4px);
|
|
193
193
|
flex: 1 1 auto;
|
|
194
194
|
min-width: 0;
|
|
195
|
-
`,
|
|
195
|
+
`, j = e.span`
|
|
196
196
|
flex: 0 0 auto;
|
|
197
197
|
display: inline-flex;
|
|
198
198
|
color: var(--ethora-color-text-muted, #8c8c8c);
|
|
199
|
-
`,
|
|
199
|
+
`, M = () => /* @__PURE__ */ o("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ o(
|
|
200
200
|
"path",
|
|
201
201
|
{
|
|
202
202
|
d: "M6 3.5L10.5 8L6 12.5",
|
|
@@ -205,7 +205,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
205
205
|
strokeLinecap: "round",
|
|
206
206
|
strokeLinejoin: "round"
|
|
207
207
|
}
|
|
208
|
-
) }),
|
|
208
|
+
) }), Z = ({
|
|
209
209
|
label: r,
|
|
210
210
|
hint: a,
|
|
211
211
|
onClick: t
|
|
@@ -214,8 +214,8 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
214
214
|
/* @__PURE__ */ o(T, { children: r }),
|
|
215
215
|
a && /* @__PURE__ */ o(C, { children: a })
|
|
216
216
|
] }),
|
|
217
|
-
/* @__PURE__ */ o(
|
|
218
|
-
] }),
|
|
217
|
+
/* @__PURE__ */ o(j, { "aria-hidden": "true", children: /* @__PURE__ */ o(M, {}) })
|
|
218
|
+
] }), G = ({
|
|
219
219
|
title: r,
|
|
220
220
|
onClose: a,
|
|
221
221
|
headerActions: t,
|
|
@@ -235,7 +235,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
235
235
|
"data-testid": "side-drawer",
|
|
236
236
|
$closing: x,
|
|
237
237
|
children: [
|
|
238
|
-
/* @__PURE__ */ i(
|
|
238
|
+
/* @__PURE__ */ i(B, { children: [
|
|
239
239
|
/* @__PURE__ */ o(
|
|
240
240
|
w,
|
|
241
241
|
{
|
|
@@ -244,7 +244,7 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
244
244
|
"aria-label": l ?? h("action.close")
|
|
245
245
|
}
|
|
246
246
|
),
|
|
247
|
-
/* @__PURE__ */ o(
|
|
247
|
+
/* @__PURE__ */ o(I, { id: n, children: r }),
|
|
248
248
|
t && /* @__PURE__ */ o(S, { children: t })
|
|
249
249
|
] }),
|
|
250
250
|
/* @__PURE__ */ o(A, { children: d })
|
|
@@ -253,18 +253,18 @@ const c = 767, R = `${c}px`, z = e.div`
|
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
255
|
export {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
256
|
+
$ as D,
|
|
257
|
+
G as S,
|
|
258
|
+
O as a,
|
|
259
|
+
W as b,
|
|
260
|
+
F as c,
|
|
261
|
+
Z as d,
|
|
262
262
|
_ as e,
|
|
263
263
|
C as f,
|
|
264
264
|
T as g,
|
|
265
265
|
K as h,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
266
|
+
U as i,
|
|
267
|
+
V as j,
|
|
268
|
+
X as k,
|
|
269
|
+
q as l
|
|
270
270
|
};
|