@ethora/chat-component 26.9.8 → 26.10.3
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 +2 -1
- package/dist/{ChatProfileModal-3UH0H5Ec.js → ChatProfileModal-D73ioMj9.js} +44 -44
- package/dist/FilePreviewModal-BeGa8s4u.js +1763 -0
- package/dist/{ManageDataModal-BblTuE9g.js → ManageDataModal-DxhvKwLo.js} +17 -17
- package/dist/{MarkdownBody-RMEx8yW2.js → MarkdownBody-fzjy9KUP.js} +1 -1
- package/dist/{MessageSearchModal-CrYR2EH8.js → MessageSearchModal-3I0b3Nut.js} +40 -40
- package/dist/{PublicChatsModal-Bi5r4mrV.js → PublicChatsModal-Dzwl63q-.js} +19 -19
- package/dist/{SideDrawer-CDAoobvX.js → SideDrawer-BPebE2tZ.js} +37 -37
- package/dist/{UserProfileModal-4Frgvam-.js → UserProfileModal-BS5FZdJb.js} +10 -10
- package/dist/{UserSettingsModal-C-mb-9cb.js → UserSettingsModal-pBqmF_r2.js} +5 -5
- package/dist/{VideoCallOverlay-92dFLb9U.js → VideoCallOverlay-PIg8Z5Xr.js} +3824 -3708
- package/dist/{VisibilityModal-zIAV6dAP.js → VisibilityModal-CnBRSRQ9.js} +11 -11
- package/dist/api.config.d.ts +0 -23
- package/dist/assets/icons.d.ts +2 -3
- package/dist/components/ContextMenu/ContextMenuComponents.d.ts +24 -8
- package/dist/components/ExampleComponents/CustomMessage.d.ts +27 -9
- package/dist/components/Files/fileCategory.d.ts +4 -2
- package/dist/components/MainComponents/AlbumGrid.d.ts +22 -0
- package/dist/components/MainComponents/AttachmentList.d.ts +6 -6
- package/dist/components/MainComponents/ChooseChatMessage.d.ts +12 -4
- package/dist/components/MainComponents/EditWrapper.d.ts +12 -4
- package/dist/components/MainComponents/ImageUnavailable.d.ts +21 -0
- package/dist/components/MainComponents/MediaUploadOverlay.d.ts +31 -0
- package/dist/components/MainComponents/MessageContainer.d.ts +3 -0
- package/dist/components/MainComponents/MessageList.d.ts +2 -1
- package/dist/components/MainComponents/SystemMessage.d.ts +3 -1
- package/dist/components/MessageBubble/CustomDivider.d.ts +3 -1
- package/dist/components/MessageBubble/MediaCaption.d.ts +9 -0
- package/dist/components/MessageBubble/MessageAvatarPhoto.d.ts +17 -0
- package/dist/components/MessageBubble/MessageReaction.d.ts +6 -0
- package/dist/components/MessageBubble/MessageReply.d.ts +3 -1
- package/dist/components/MessageBubble/QuickReplies.d.ts +2 -0
- package/dist/components/Modals/FilePreviewModal/FilePreviewModal.d.ts +8 -10
- package/dist/components/Modals/FilePreviewModal/ImageLightbox.d.ts +4 -0
- package/dist/components/Modals/FilePreviewModal/PdfView.d.ts +4 -0
- package/dist/components/Modals/FilePreviewModal/ViewerChrome.d.ts +100 -0
- package/dist/components/Modals/MessageSearchModal/MessageHitResults.d.ts +3 -1
- package/dist/components/Modals/ModalReportChat/ModalReportChat.d.ts +3 -1
- package/dist/components/Modals/NewChatModal/styledNewChatComponents.d.ts +15 -5
- package/dist/components/Modals/SettingsModals/SharedStyledComponents.d.ts +27 -15
- package/dist/components/Modals/SettingsModals/Visibility/StyledComponents.d.ts +18 -6
- package/dist/components/Modals/SideDrawer/DrawerProfileParts.d.ts +27 -9
- package/dist/components/Modals/SideDrawer/SideDrawer.d.ts +39 -13
- package/dist/components/Modals/motionVariants.d.ts +8 -10
- package/dist/components/Modals/styledModalComponents.d.ts +53 -25
- package/dist/components/Notification/index.d.ts +3 -1
- package/dist/components/RoomComponents/LastMessageItem.d.ts +2 -0
- package/dist/components/RoomComponents/styled/LastMessageMedia.d.ts +19 -0
- package/dist/components/RoomComponents/styled/LastTextMessage.d.ts +2 -2
- package/dist/components/RoomComponents/styled/StyledRoomComponents.d.ts +29 -8
- package/dist/components/UsersList/StyledComponents.d.ts +18 -6
- package/dist/components/VideoCalls/VideoCallSession.d.ts +13 -0
- package/dist/components/styled/ChatWrapperBox.d.ts +9 -2
- package/dist/components/styled/DateLabel.d.ts +3 -1
- package/dist/components/styled/FileCard.d.ts +20 -0
- package/dist/components/styled/Loader.d.ts +3 -1
- package/dist/components/styled/MediaModal.d.ts +6 -2
- package/dist/components/styled/MediaSurface.d.ts +56 -0
- package/dist/components/styled/MessageImage.d.ts +9 -10
- package/dist/components/styled/NewMessageLabel.d.ts +3 -1
- package/dist/components/styled/RoomListComponents/index.d.ts +66 -22
- package/dist/components/styled/SendInput.d.ts +12 -2
- package/dist/components/styled/StyledComponents.d.ts +199 -41
- package/dist/components/styled/StyledInputComponents/MediaComponents.d.ts +78 -24
- package/dist/components/styled/StyledInputComponents/StyledInputComponents.d.ts +60 -22
- package/dist/components/styled/StyledInputComponents/VideoComponents.d.ts +18 -6
- package/dist/components/styled/TreadLabel.d.ts +3 -1
- package/dist/components/styled/UnsupportedType.d.ts +1 -0
- package/dist/components/styled/VideoMessage.d.ts +13 -6
- package/dist/e2ee/callKey.d.ts +32 -0
- package/dist/e2ee/fileEnvelope.d.ts +16 -5
- package/dist/e2ee/omemo.d.ts +18 -0
- package/dist/firebase-messaging-sw.js +20 -3
- package/dist/{handleCopyClick-BtXos0AJ.js → handleCopyClick-vPvh9hOU.js} +1 -1
- package/dist/helpers/albumLayout.d.ts +53 -0
- package/dist/helpers/attachments.d.ts +22 -1
- package/dist/helpers/avatarImageCache.d.ts +9 -0
- package/dist/helpers/caption.d.ts +63 -0
- package/dist/helpers/composerFocus.d.ts +22 -0
- package/dist/helpers/createMainMessageForThread.d.ts +1 -1
- package/dist/helpers/downloadFile.d.ts +19 -0
- package/dist/helpers/fileKind.d.ts +17 -0
- package/dist/helpers/lastMessagePreview.d.ts +55 -0
- package/dist/helpers/mapWithConcurrency.d.ts +8 -0
- package/dist/helpers/mediaBox.d.ts +110 -0
- package/dist/helpers/mediaBubble.d.ts +67 -0
- package/dist/helpers/mediaLabel.d.ts +10 -0
- package/dist/helpers/mediaSendRetry.d.ts +25 -0
- package/dist/helpers/messageRuns.d.ts +10 -0
- package/dist/helpers/receiptState.d.ts +48 -0
- package/dist/helpers/repairFilenameEncoding.d.ts +11 -0
- package/dist/helpers/roomImageGallery.d.ts +34 -0
- package/dist/helpers/safeUrl.d.ts +15 -0
- package/dist/helpers/secureFileUrl.d.ts +4 -1
- package/dist/helpers/textareaFit.d.ts +31 -0
- package/dist/helpers/timestamp.d.ts +7 -0
- package/dist/helpers/userEntry.d.ts +14 -0
- package/dist/helpers/viewerSender.d.ts +47 -0
- package/dist/hooks/useAvatarImage.d.ts +21 -0
- package/dist/hooks/useIsMobileViewport.d.ts +5 -0
- package/dist/hooks/useMediaProbe.d.ts +41 -0
- package/dist/hooks/usePaneWidthVar.d.ts +11 -0
- package/dist/hooks/usePdfThumbnail.d.ts +0 -1
- package/dist/hooks/usePrefersReducedMotion.d.ts +2 -0
- package/dist/hooks/useRoomInitialization.d.ts +2 -2
- package/dist/hooks/useRoomUrl.d.ts +2 -2
- package/dist/hooks/useSendMessage.d.ts +4 -1
- package/dist/{main-BnLtessp.js → main-CghdNDlB.js} +20803 -16260
- package/dist/main.js +10 -10
- package/dist/networking/api-requests/auth.api.d.ts +13 -5
- package/dist/networking/api-requests/user.api.d.ts +4 -4
- package/dist/networking/callKeyStanza.d.ts +7 -0
- package/dist/networking/deliveryReceiptBatcher.d.ts +53 -0
- package/dist/networking/displayedMarkerThrottle.d.ts +29 -0
- package/dist/networking/receiptsPolicy.d.ts +32 -0
- package/dist/networking/stanzaHandlers.d.ts +4 -2
- package/dist/networking/xmpp/sendDisplayedMarker.xmpp.d.ts +2 -0
- package/dist/networking/xmpp/sendMediaMessage.xmpp.d.ts +8 -0
- package/dist/networking/xmpp/sendReceivedReceipt.xmpp.d.ts +2 -0
- package/dist/networking/xmppClient.d.ts +5 -0
- package/dist/roomStore/callSlice.d.ts +6 -1
- package/dist/roomStore/index.d.ts +10 -0
- package/dist/roomStore/roomsSlice.d.ts +22 -3
- package/dist/styles/motion.d.ts +22 -2
- package/dist/types/models/attachment.model.d.ts +19 -0
- package/dist/types/models/config.model.d.ts +56 -2
- package/dist/types/models/customComponents.model.d.ts +2 -0
- package/dist/types/models/message.model.d.ts +9 -0
- package/dist/types/models/modal.model.d.ts +19 -0
- package/dist/types/models/room.model.d.ts +17 -0
- package/dist/types/models/xmpp.model.d.ts +3 -0
- package/dist/utils/messageNotificationContent.d.ts +34 -0
- package/dist/version.d.ts +1 -1
- package/package.json +8 -7
- package/public/firebase-messaging-sw.js +20 -3
- package/dist/FilePreviewModal-Cgj1iHry.js +0 -743
- package/dist/components/RoomComponents/styled/LastAudioMessage.d.ts +0 -6
- package/dist/components/RoomComponents/styled/LastMessageFile.d.ts +0 -6
- package/dist/components/RoomComponents/styled/LastMessagePhoto.d.ts +0 -6
- package/dist/components/RoomComponents/styled/LastMessageVideo.d.ts +0 -6
package/README.md
CHANGED
|
@@ -355,6 +355,7 @@ Below is a grouped reference for all `config` options.
|
|
|
355
355
|
| `historyPreload` | `{ mode?: 'staged' \| 'all' \| 'off'; topRooms?: number; concurrency?: number }` | Background message-history preload after connect, for accounts with many rooms. Default `{ mode: 'staged', topRooms: 8, concurrency: 3 }`. `staged`: the `topRooms` most recently active rooms get a full page loaded, `concurrency` at a time, and rooms the backend gave no `lastMessage` for get a one-message preview (up to 4x `topRooms` of them); every other room loads the moment it is opened. A room the user opens jumps the queue, and a reconnect only re-queues rooms that are not already preloaded. `all`: preload every room (the old behaviour; fine for a handful of rooms). `off`: no background preload at all. The room list's last message, time and unread badge come from `GET /v1/chats/my` (`lastMessage`, `unreadCount`) when the backend sends them, so they render without waiting for any history; a backend without those fields falls back to the history preload. The older `historyQoS.preloadTopKRooms` / `stagedPreloadConcurrency` are still honoured when the matching field here is not set; pinning `historyQoS.stagedPreloadEnabled: false` keeps the legacy startup catch-up path. |
|
|
356
356
|
| `historyQoS.joinHistoryStanzas` | `number` | Messages the MUC service replays on every room join (sent as `<history maxstanzas="N"/>`). Default `0`: history comes from the message archive only, so connecting an account with many rooms no longer pulls the server default (up to 20 messages) per room. Raise it only if a room of yours has no archiving and relies on the join replay. |
|
|
357
357
|
| `historyQoS.joinConcurrency` | `number` | Rooms joined in parallel by the background join sweep. The room list is shown as soon as `/chats/my` returns; every room is then joined in the background (the open room first, then most recent activity; a room you open while it is queued jumps the queue). Default `5`. |
|
|
358
|
+
| `receipts` | `{ mode?: 'auto' \| 'all' \| 'off'; deliveryMaxRoomSize?: number; readMaxRoomSize?: number; maxAgeDays?: number; coalesceMs?: number }` | Which delivery (XEP-0184) and read (XEP-0333) receipts this client sends. The client always displays the receipts it receives. Defaults `{ mode: 'auto', deliveryMaxRoomSize: 20, readMaxRoomSize: 100, maxAgeDays: 7, coalesceMs: 1500 }`. `auto`: delivery receipts only in rooms of up to `deliveryMaxRoomSize` other members, read markers only in rooms of up to `readMaxRoomSize` other members, and no delivery receipt for messages older than `maxAgeDays`. `all`: always send (still coalesced). `off`: send no delivery or read signal. Private 1:1 rooms and rooms of unknown size always send. Delivery receipts are sent at most once per `coalesceMs` window per room (the newest message in the window is the one acknowledged) and are not archived by the server. Read markers are sent at most every 3 seconds per room. |
|
|
358
359
|
|
|
359
360
|
### UI and Layout
|
|
360
361
|
|
|
@@ -362,7 +363,7 @@ Below is a grouped reference for all `config` options.
|
|
|
362
363
|
| --- | --- | --- |
|
|
363
364
|
| `disableHeader` | `boolean` | Hide chat header. |
|
|
364
365
|
| `disableMedia` | `boolean` | Disable media sending/processing paths. |
|
|
365
|
-
| `attachments` | `{ maxFiles?; maxFileSizeMb?; accept? }` | Composer attachment limits. `maxFiles` defaults to `
|
|
366
|
+
| `attachments` | `{ maxFiles?; maxFileSizeMb?; accept? }` | Composer attachment limits. `maxFiles` defaults to `10` (also the hard cap, set by the stanza payload size); `maxFileSizeMb` adds a client-side per-file check (omit for none); `accept` is passed straight to the file picker. Picking several files sends them as **one** message. |
|
|
366
367
|
| `pdfPreview` | `{ enabled?; workerSrc?; libUrl?; maxFileSizeMb? }` | First-page PDF thumbnails inside bubbles and in the composer tray. On by default; `enabled: false` keeps the static document card. pdf.js is code-split and only fetched when a PDF actually shows up. By default it runs on the main thread, which needs no bundler asset wiring: set `workerSrc` to a pdf.js worker URL you host to move parsing off it. Set `libUrl` to the URL of a pdf.js ES module build to load it at runtime instead of the copy bundled with the component (pair it with `workerSrc`); useful when you ship the component as one self-contained script and do not want pdf.js (about 1.7 MB) inside it. `maxFileSizeMb` (default `25`) is the size past which a document is not auto-rendered. |
|
|
367
368
|
| `disableRooms` | `boolean` | Hide/disable room list area. |
|
|
368
369
|
| `disableRoomMenu` | `boolean` | Disable room menu controls. |
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as T, jsxs as j, Fragment as Ct } from "react/jsx-runtime";
|
|
2
2
|
import $e, { useRef as wt, useState as re, useMemo as le } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { S as It, f as Pr, b as Ne, D as ce, a as pe, d as xr, e as Sr, g as Ke, h as Xe, i as _r, j as Mr, k as Ar, l as Je } from "./SideDrawer-
|
|
5
|
-
import { h as Dr, P as Or, a as Lr, c as Br, D as Ir, d as kr, e as Ve, f as Ze } from "./handleCopyClick-
|
|
3
|
+
import { w as Kt, b as Rt, x as de, a9 as Xt, B as oe, E as Y, a as je, u as fe, aa as Ue, N as Pt, F as xt, ab as St, ac as _t, ad as Mt, ae as Jt, af as Ie, ag as Vt, ah as Zt, a7 as er, Q as At, a2 as tr, ai as rr, aj as ke, ak as nr, al as ye, am as Dt, an as Ot, P as Lt, $ as Bt, D as or, ao as ar, ap as ir, aq as sr, ar as lr, as as ur, at as cr, au as He, av as fr, y as be, aw as dr, ax as hr, ay as pr, az as vr, M as Ye, aA as mr, aB as gr, aC as yr, aD as We, aE as br, aF as Er, a0 as Tr, aG as Cr, aH as wr, R as Rr, aI as Ge } from "./main-CghdNDlB.js";
|
|
4
|
+
import { S as It, f as Pr, b as Ne, D as ce, a as pe, d as xr, e as Sr, g as Ke, h as Xe, i as _r, j as Mr, k as Ar, l as Je } from "./SideDrawer-BPebE2tZ.js";
|
|
5
|
+
import { h as Dr, P as Or, a as Lr, c as Br, D as Ir, d as kr, e as Ve, f as Ze } from "./handleCopyClick-vPvh9hOU.js";
|
|
6
6
|
var ue = {}, ve = { exports: {} }, me = { exports: {} }, k = {};
|
|
7
7
|
var et;
|
|
8
8
|
function Nr() {
|
|
@@ -111,7 +111,7 @@ function $r() {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
var p = t, C = e, Q = o, K = l, ae = d, ie = s, W = u, X = v, Z = m,
|
|
114
|
+
var p = t, C = e, Q = o, K = l, ae = d, ie = s, W = u, X = v, Z = m, z = a, G = r, q = c, ee = i, te = !1;
|
|
115
115
|
function ne(b) {
|
|
116
116
|
return te || (te = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), h(b) || $(b) === t;
|
|
117
117
|
}
|
|
@@ -148,10 +148,10 @@ function $r() {
|
|
|
148
148
|
function L(b) {
|
|
149
149
|
return $(b) === c;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function F(b) {
|
|
152
152
|
return $(b) === i;
|
|
153
153
|
}
|
|
154
|
-
N.AsyncMode = p, N.ConcurrentMode = C, N.ContextConsumer = Q, N.ContextProvider = K, N.Element = ae, N.ForwardRef = ie, N.Fragment = W, N.Lazy = X, N.Memo = Z, N.Portal =
|
|
154
|
+
N.AsyncMode = p, N.ConcurrentMode = C, N.ContextConsumer = Q, N.ContextProvider = K, N.Element = ae, N.ForwardRef = ie, N.Fragment = W, N.Lazy = X, N.Memo = Z, N.Portal = z, N.Profiler = G, N.StrictMode = q, N.Suspense = ee, N.isAsyncMode = ne, N.isConcurrentMode = h, N.isContextConsumer = E, N.isContextProvider = M, N.isElement = S, N.isForwardRef = R, N.isFragment = D, N.isLazy = x, N.isMemo = _, N.isPortal = O, N.isProfiler = I, N.isStrictMode = L, N.isSuspense = F, N.isValidElementType = A, N.typeOf = $;
|
|
155
155
|
})()), N;
|
|
156
156
|
}
|
|
157
157
|
var rt;
|
|
@@ -319,8 +319,8 @@ function qr() {
|
|
|
319
319
|
function P(h) {
|
|
320
320
|
if (process.env.NODE_ENV !== "production")
|
|
321
321
|
var E = {}, M = 0;
|
|
322
|
-
function S(D, x, _, O, I, L,
|
|
323
|
-
if (O = O || f, L = L || _,
|
|
322
|
+
function S(D, x, _, O, I, L, F) {
|
|
323
|
+
if (O = O || f, L = L || _, F !== a) {
|
|
324
324
|
if (t) {
|
|
325
325
|
var b = new Error(
|
|
326
326
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -415,7 +415,7 @@ function qr() {
|
|
|
415
415
|
for (var _ = M[S], O = 0; O < h.length; O++)
|
|
416
416
|
if (v(_, h[O]))
|
|
417
417
|
return null;
|
|
418
|
-
var I = JSON.stringify(h, function(
|
|
418
|
+
var I = JSON.stringify(h, function(F, b) {
|
|
419
419
|
var H = ee(b);
|
|
420
420
|
return H === "symbol" ? String(b) : b;
|
|
421
421
|
});
|
|
@@ -452,7 +452,7 @@ function qr() {
|
|
|
452
452
|
}
|
|
453
453
|
function S(R, D, x, _, O) {
|
|
454
454
|
for (var I = [], L = 0; L < h.length; L++) {
|
|
455
|
-
var
|
|
455
|
+
var F = h[L], b = F(R, D, x, _, O, a);
|
|
456
456
|
if (b == null)
|
|
457
457
|
return null;
|
|
458
458
|
b.data && u(b.data, "expectedType") && I.push(b.data.expectedType);
|
|
@@ -464,7 +464,7 @@ function qr() {
|
|
|
464
464
|
}
|
|
465
465
|
function ie() {
|
|
466
466
|
function h(E, M, S, R, D) {
|
|
467
|
-
return
|
|
467
|
+
return z(E[M]) ? null : new g("Invalid " + R + " `" + D + "` supplied to " + ("`" + S + "`, expected a ReactNode."));
|
|
468
468
|
}
|
|
469
469
|
return P(h);
|
|
470
470
|
}
|
|
@@ -482,9 +482,9 @@ function qr() {
|
|
|
482
482
|
var L = h[I];
|
|
483
483
|
if (typeof L != "function")
|
|
484
484
|
return W(R, D, x, I, ee(L));
|
|
485
|
-
var
|
|
486
|
-
if (
|
|
487
|
-
return
|
|
485
|
+
var F = L(_, I, R, D, x + "." + I, a);
|
|
486
|
+
if (F)
|
|
487
|
+
return F;
|
|
488
488
|
}
|
|
489
489
|
return null;
|
|
490
490
|
}
|
|
@@ -497,15 +497,15 @@ function qr() {
|
|
|
497
497
|
return new g("Invalid " + D + " `" + x + "` of type `" + O + "` " + ("supplied to `" + R + "`, expected `object`."));
|
|
498
498
|
var I = d({}, M[S], h);
|
|
499
499
|
for (var L in I) {
|
|
500
|
-
var
|
|
501
|
-
if (u(h, L) && typeof
|
|
502
|
-
return W(R, D, x, L, ee(
|
|
503
|
-
if (!
|
|
500
|
+
var F = h[L];
|
|
501
|
+
if (u(h, L) && typeof F != "function")
|
|
502
|
+
return W(R, D, x, L, ee(F));
|
|
503
|
+
if (!F)
|
|
504
504
|
return new g(
|
|
505
505
|
"Invalid " + D + " `" + x + "` key `" + L + "` supplied to `" + R + "`.\nBad object: " + JSON.stringify(M[S], null, " ") + `
|
|
506
506
|
Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
507
507
|
);
|
|
508
|
-
var b =
|
|
508
|
+
var b = F(_, L, R, D, x + "." + L, a);
|
|
509
509
|
if (b)
|
|
510
510
|
return b;
|
|
511
511
|
}
|
|
@@ -513,7 +513,7 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
513
513
|
}
|
|
514
514
|
return P(E);
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function z(h) {
|
|
517
517
|
switch (typeof h) {
|
|
518
518
|
case "number":
|
|
519
519
|
case "string":
|
|
@@ -523,7 +523,7 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
523
523
|
return !h;
|
|
524
524
|
case "object":
|
|
525
525
|
if (Array.isArray(h))
|
|
526
|
-
return h.every(
|
|
526
|
+
return h.every(z);
|
|
527
527
|
if (h === null || o(h))
|
|
528
528
|
return !0;
|
|
529
529
|
var E = i(h);
|
|
@@ -531,12 +531,12 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
531
531
|
var M = E.call(h), S;
|
|
532
532
|
if (E !== h.entries) {
|
|
533
533
|
for (; !(S = M.next()).done; )
|
|
534
|
-
if (!
|
|
534
|
+
if (!z(S.value))
|
|
535
535
|
return !1;
|
|
536
536
|
} else
|
|
537
537
|
for (; !(S = M.next()).done; ) {
|
|
538
538
|
var R = S.value;
|
|
539
|
-
if (R && !
|
|
539
|
+
if (R && !z(R[1]))
|
|
540
540
|
return !1;
|
|
541
541
|
}
|
|
542
542
|
} else
|
|
@@ -586,7 +586,7 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
586
586
|
}, Re;
|
|
587
587
|
}
|
|
588
588
|
var Pe, lt;
|
|
589
|
-
function
|
|
589
|
+
function Fr() {
|
|
590
590
|
if (lt) return Pe;
|
|
591
591
|
lt = 1;
|
|
592
592
|
var n = /* @__PURE__ */ qe();
|
|
@@ -640,7 +640,7 @@ function $t() {
|
|
|
640
640
|
var n = kt(), d = !0;
|
|
641
641
|
ve.exports = /* @__PURE__ */ qr()(n.isElement, d);
|
|
642
642
|
} else
|
|
643
|
-
ve.exports = /* @__PURE__ */
|
|
643
|
+
ve.exports = /* @__PURE__ */ Fr()();
|
|
644
644
|
return ve.exports;
|
|
645
645
|
}
|
|
646
646
|
var xe, ct;
|
|
@@ -662,7 +662,7 @@ function Ut() {
|
|
|
662
662
|
}), Se;
|
|
663
663
|
}
|
|
664
664
|
var _e, dt;
|
|
665
|
-
function
|
|
665
|
+
function zr() {
|
|
666
666
|
if (dt) return _e;
|
|
667
667
|
dt = 1;
|
|
668
668
|
var n = Ut();
|
|
@@ -968,7 +968,7 @@ function qt() {
|
|
|
968
968
|
return De = n, De;
|
|
969
969
|
}
|
|
970
970
|
var Oe, mt;
|
|
971
|
-
function
|
|
971
|
+
function Ft() {
|
|
972
972
|
if (mt) return Oe;
|
|
973
973
|
mt = 1;
|
|
974
974
|
var n = qt();
|
|
@@ -1009,7 +1009,7 @@ var Le, gt;
|
|
|
1009
1009
|
function Yr() {
|
|
1010
1010
|
if (gt) return Le;
|
|
1011
1011
|
gt = 1;
|
|
1012
|
-
var n = Ut(), d =
|
|
1012
|
+
var n = Ut(), d = Ft(), a = qt(), u = {
|
|
1013
1013
|
PATTERN000: 0,
|
|
1014
1014
|
PATTERN001: 1,
|
|
1015
1015
|
PATTERN010: 2,
|
|
@@ -1185,7 +1185,7 @@ var Be, yt;
|
|
|
1185
1185
|
function Wr() {
|
|
1186
1186
|
if (yt) return Be;
|
|
1187
1187
|
yt = 1;
|
|
1188
|
-
var n =
|
|
1188
|
+
var n = zr(), d = Qr(), a = Hr(), u = Yr(), c = Ft();
|
|
1189
1189
|
function r(o, t) {
|
|
1190
1190
|
this.typeNumber = o, this.errorCorrectLevel = t, this.modules = null, this.moduleCount = 0, this.dataCache = null, this.dataList = [];
|
|
1191
1191
|
}
|
|
@@ -1414,15 +1414,15 @@ function Kr() {
|
|
|
1414
1414
|
var X = W.modules;
|
|
1415
1415
|
return t.default.createElement(s.default, n({}, ie, {
|
|
1416
1416
|
bgColor: B,
|
|
1417
|
-
bgD: X.map(function(Z,
|
|
1417
|
+
bgD: X.map(function(Z, z) {
|
|
1418
1418
|
return Z.map(function(G, q) {
|
|
1419
|
-
return G ? "" : "M " + q + " " +
|
|
1419
|
+
return G ? "" : "M " + q + " " + z + " l 1 0 0 1 -1 0 Z";
|
|
1420
1420
|
}).join(" ");
|
|
1421
1421
|
}).join(" "),
|
|
1422
1422
|
fgColor: $,
|
|
1423
|
-
fgD: X.map(function(Z,
|
|
1423
|
+
fgD: X.map(function(Z, z) {
|
|
1424
1424
|
return Z.map(function(G, q) {
|
|
1425
|
-
return G ? "M " + q + " " +
|
|
1425
|
+
return G ? "M " + q + " " + z + " l 1 0 0 1 -1 0 Z" : "";
|
|
1426
1426
|
}).join(" ");
|
|
1427
1427
|
}).join(" "),
|
|
1428
1428
|
ref: P,
|
|
@@ -1842,10 +1842,10 @@ const Jr = /* @__PURE__ */ Kt(Xr), Vr = "chatId", Zr = (n, d, a) => {
|
|
|
1842
1842
|
setMuted: ae
|
|
1843
1843
|
} = sr(C?.jid), ie = K && !p?.disableRoomMute, W = lr(C?.jid), X = fe(
|
|
1844
1844
|
(w) => w.chatSettingStore.user?.fileToken || ""
|
|
1845
|
-
), Z = le(() => new Set(W), [W]),
|
|
1845
|
+
), Z = le(() => new Set(W), [W]), z = ur(C), { members: G, state: q } = cr(C?.jid, z), ee = z && q === "loading", te = le(() => {
|
|
1846
1846
|
const w = Array.isArray(C?.members) ? C.members : [];
|
|
1847
|
-
return !
|
|
1848
|
-
}, [C?.members,
|
|
1847
|
+
return !z || G.length === 0 ? He(w) : He([...w, ...G]);
|
|
1848
|
+
}, [C?.members, z, G]), ne = le(() => {
|
|
1849
1849
|
const w = g.trim().toLowerCase();
|
|
1850
1850
|
if (!w) return te;
|
|
1851
1851
|
const U = B.getState().rooms.usersSet;
|
|
@@ -1871,7 +1871,7 @@ const Jr = /* @__PURE__ */ Kt(Xr), Vr = "chatId", Zr = (n, d, a) => {
|
|
|
1871
1871
|
if (!U || typeof document > "u") return;
|
|
1872
1872
|
const V = document.createElement("a");
|
|
1873
1873
|
V.href = U, V.download = w.originalname || "file", document.body.appendChild(V), V.click(), V.remove();
|
|
1874
|
-
},
|
|
1874
|
+
}, F = (w) => {
|
|
1875
1875
|
_(w._id).catch(() => {
|
|
1876
1876
|
});
|
|
1877
1877
|
}, b = async (w) => {
|
|
@@ -1913,7 +1913,7 @@ const Jr = /* @__PURE__ */ Kt(Xr), Vr = "chatId", Zr = (n, d, a) => {
|
|
|
1913
1913
|
}
|
|
1914
1914
|
}, J = p?.disableRoomConfig === !0, he = async () => {
|
|
1915
1915
|
A.setRoomImageStanza(C.jid, null, "icon", "none"), y(ye({ jid: C.jid, updates: { icon: null } }));
|
|
1916
|
-
},
|
|
1916
|
+
}, zt = (w) => {
|
|
1917
1917
|
y(be(Ye.PROFILE)), y(
|
|
1918
1918
|
Rr({
|
|
1919
1919
|
id: w._id,
|
|
@@ -1940,7 +1940,7 @@ const Jr = /* @__PURE__ */ Kt(Xr), Vr = "chatId", Zr = (n, d, a) => {
|
|
|
1940
1940
|
const Ht = (() => {
|
|
1941
1941
|
const w = Dt(C), U = dr(w, e);
|
|
1942
1942
|
return w === 1 ? t("modal.chatProfile.memberCountSingular", { count: U }) : t("modal.chatProfile.memberCountPlural", { count: U });
|
|
1943
|
-
})(),
|
|
1943
|
+
})(), Fe = !p?.disableChatInfo?.disableDescription, ze = !p?.disableChatInfo?.disableType;
|
|
1944
1944
|
return /* @__PURE__ */ j(
|
|
1945
1945
|
It,
|
|
1946
1946
|
{
|
|
@@ -1994,10 +1994,10 @@ const Jr = /* @__PURE__ */ Kt(Xr), Vr = "chatId", Zr = (n, d, a) => {
|
|
|
1994
1994
|
] })
|
|
1995
1995
|
] }),
|
|
1996
1996
|
C.role === "moderator" && C.type === "group" && !J && /* @__PURE__ */ T(un, {}),
|
|
1997
|
-
(
|
|
1997
|
+
(Fe || ze) && /* @__PURE__ */ j(ce, { children: [
|
|
1998
1998
|
/* @__PURE__ */ T(pe, { children: t("modal.chatProfile.aboutSection") }),
|
|
1999
|
-
|
|
2000
|
-
|
|
1999
|
+
Fe && /* @__PURE__ */ T(Ir, { $empty: !C?.description, children: C?.description || t("modal.profile.noDescription") }),
|
|
2000
|
+
ze && /* @__PURE__ */ j(kr, { children: [
|
|
2001
2001
|
/* @__PURE__ */ T(pr, { color: "currentColor" }),
|
|
2002
2002
|
t(
|
|
2003
2003
|
C.type === "private" ? "modal.chatProfile.typePrivate" : C.type === "group" ? "modal.chatProfile.typeGroup" : "modal.chatProfile.typePublic"
|
|
@@ -2063,7 +2063,7 @@ const Jr = /* @__PURE__ */ Kt(Xr), Vr = "chatId", Zr = (n, d, a) => {
|
|
|
2063
2063
|
showMenu: $.xmppUsername !== w.xmppUsername && C.role === "moderator" && C.type !== "private" && !J,
|
|
2064
2064
|
menuOptions: Qt(w.xmppUsername),
|
|
2065
2065
|
moreOptionsLabel: t("action.moreOptions"),
|
|
2066
|
-
onAvatarClick:
|
|
2066
|
+
onAvatarClick: zt
|
|
2067
2067
|
},
|
|
2068
2068
|
yr(w) || w._id
|
|
2069
2069
|
)),
|
|
@@ -2120,7 +2120,7 @@ const Jr = /* @__PURE__ */ Kt(Xr), Vr = "chatId", Zr = (n, d, a) => {
|
|
|
2120
2120
|
fileToken: X,
|
|
2121
2121
|
onPreview: I,
|
|
2122
2122
|
onDownload: L,
|
|
2123
|
-
onDelete:
|
|
2123
|
+
onDelete: F,
|
|
2124
2124
|
compact: !0
|
|
2125
2125
|
}
|
|
2126
2126
|
)
|