@ermis-network/ermis-chat-react 1.0.9 → 2.0.0
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/dist/index.cjs +15288 -4203
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +701 -195
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +862 -94
- package/dist/index.d.ts +862 -94
- package/dist/index.mjs +15238 -4179
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -4
- package/src/channelTypeUtils.ts +1 -1
- package/src/components/Avatar.tsx +2 -1
- package/src/components/Channel.tsx +6 -2
- package/src/components/ChannelActions.tsx +61 -2
- package/src/components/ChannelHeader.tsx +19 -5
- package/src/components/ChannelInfo/AddMemberModal.tsx +5 -1
- package/src/components/ChannelInfo/ChannelInfo.tsx +330 -187
- package/src/components/ChannelInfo/ChannelInfoTabs.tsx +59 -297
- package/src/components/ChannelInfo/ChannelSettingsPanel.tsx +30 -174
- package/src/components/ChannelInfo/EditChannelModal.tsx +4 -1
- package/src/components/ChannelInfo/MediaGridItem.tsx +12 -2
- package/src/components/ChannelInfo/MemberListItem.tsx +2 -3
- package/src/components/ChannelInfo/MessageSearchPanel.tsx +27 -126
- package/src/components/ChannelInfo/States.tsx +1 -1
- package/src/components/ChannelInfo/index.ts +3 -0
- package/src/components/ChannelInfo/useChannelInfoTabs.tsx +386 -0
- package/src/components/ChannelInfo/useChannelSettings.ts +212 -0
- package/src/components/ChannelInfo/useMessageSearch.tsx +141 -0
- package/src/components/ChannelList.tsx +177 -290
- package/src/components/CreateChannelModal.tsx +166 -88
- package/src/components/Dropdown.tsx +1 -16
- package/src/components/EditPreview.tsx +1 -0
- package/src/components/ErmisCallProvider.tsx +72 -17
- package/src/components/ErmisCallUI.tsx +43 -20
- package/src/components/FlatTopicGroupItem.tsx +232 -0
- package/src/components/ForwardMessageModal.tsx +31 -77
- package/src/components/MediaLightbox.tsx +62 -40
- package/src/components/MentionSuggestions.tsx +47 -35
- package/src/components/MessageActionsBox.tsx +4 -1
- package/src/components/MessageInput.tsx +126 -7
- package/src/components/MessageInputDefaults.tsx +127 -1
- package/src/components/MessageItem.tsx +93 -26
- package/src/components/MessageQuickReactions.tsx +153 -26
- package/src/components/MessageReactions.tsx +2 -1
- package/src/components/MessageRenderers.tsx +111 -39
- package/src/components/Panel.tsx +1 -14
- package/src/components/PinnedMessages.tsx +17 -5
- package/src/components/PreviewOverlay.tsx +24 -0
- package/src/components/ReadReceipts.tsx +2 -1
- package/src/components/TopicList.tsx +221 -0
- package/src/components/TopicModal.tsx +4 -1
- package/src/components/TypingIndicator.tsx +14 -5
- package/src/components/UserPicker.tsx +87 -10
- package/src/components/VirtualMessageList.tsx +106 -20
- package/src/context/ChatComponentsContext.tsx +14 -0
- package/src/context/ChatProvider.tsx +18 -14
- package/src/context/ErmisCallContext.tsx +4 -0
- package/src/hooks/useChannelCapabilities.ts +7 -4
- package/src/hooks/useChannelData.ts +10 -3
- package/src/hooks/useChannelListUpdates.ts +72 -20
- package/src/hooks/useChannelMessages.ts +72 -10
- package/src/hooks/useChannelRowUpdates.ts +24 -5
- package/src/hooks/useChatUser.ts +31 -0
- package/src/hooks/useContactChannels.ts +45 -0
- package/src/hooks/useContactCount.ts +50 -0
- package/src/hooks/useDownloadHandler.ts +36 -0
- package/src/hooks/useDragAndDrop.ts +79 -0
- package/src/hooks/useForwardMessage.ts +112 -0
- package/src/hooks/useInviteChannels.ts +88 -0
- package/src/hooks/useInviteCount.ts +104 -0
- package/src/hooks/useMentions.ts +0 -1
- package/src/hooks/useMessageActions.ts +13 -10
- package/src/hooks/usePendingState.ts +21 -4
- package/src/hooks/usePreviewState.ts +69 -0
- package/src/hooks/useStickerPicker.ts +62 -0
- package/src/hooks/useTopicGroupUpdates.ts +197 -0
- package/src/index.ts +56 -6
- package/src/messageTypeUtils.ts +13 -1
- package/src/styles/_base.css +0 -1
- package/src/styles/_call-ui.css +59 -2
- package/src/styles/_channel-info.css +41 -4
- package/src/styles/_channel-list.css +97 -57
- package/src/styles/_create-channel-modal.css +10 -0
- package/src/styles/_forward-modal.css +16 -1
- package/src/styles/_media-lightbox.css +32 -0
- package/src/styles/_mentions.css +1 -1
- package/src/styles/_message-actions.css +3 -4
- package/src/styles/_message-bubble.css +286 -107
- package/src/styles/_message-input.css +131 -0
- package/src/styles/_message-list.css +33 -17
- package/src/styles/_message-quick-reactions.css +40 -9
- package/src/styles/_message-reactions.css +4 -0
- package/src/styles/_modal.css +2 -1
- package/src/styles/_preview-overlay.css +38 -0
- package/src/styles/_tokens.css +17 -15
- package/src/styles/_typing-indicator.css +7 -1
- package/src/styles/index.css +1 -0
- package/src/types.ts +362 -14
- package/src/utils/avatarColors.ts +48 -0
- package/src/utils.ts +193 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
import React$1 from 'react';
|
|
2
|
-
import
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import * as _ermis_network_ermis_chat_sdk from '@ermis-network/ermis-chat-sdk';
|
|
4
|
+
import { Channel as Channel$1, Attachment, FormatMessageResponse, ChannelFilters, ChannelSort, ChannelQueryOptions, SystemMessageTranslations, SignalMessageTranslations, ErmisChat, UserCallInfo, MessageLabel, ExtendableGenerics, DefaultGenerics, UserResponse, ErmisCallNode, CallStatus } from '@ermis-network/ermis-chat-sdk';
|
|
3
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
6
|
import { VListHandle } from 'virtua';
|
|
5
7
|
|
|
8
|
+
type ChatComponentsContextValue = {
|
|
9
|
+
ModalComponent?: React__default.ComponentType<ModalProps>;
|
|
10
|
+
DropdownComponent?: React__default.ComponentType<DropdownProps>;
|
|
11
|
+
PanelComponent?: React__default.ComponentType<PanelProps>;
|
|
12
|
+
ForwardMessageModalComponent?: React__default.ComponentType<ForwardMessageModalProps>;
|
|
13
|
+
ChannelListErrorIndicator?: React__default.ComponentType<{
|
|
14
|
+
text?: string;
|
|
15
|
+
onRetry?: () => void;
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
|
|
6
19
|
type Theme = 'dark' | 'light';
|
|
7
20
|
type ReadStateEntry = {
|
|
8
21
|
last_read: Date | string;
|
|
@@ -43,9 +56,12 @@ type ChatContextValue = {
|
|
|
43
56
|
/** Indicates whether the direct call feature is enabled */
|
|
44
57
|
enableCall?: boolean;
|
|
45
58
|
};
|
|
59
|
+
|
|
46
60
|
type ChatProviderProps = {
|
|
47
61
|
client: ErmisChat;
|
|
48
62
|
children: React.ReactNode;
|
|
63
|
+
/** Global UI primitive components registry */
|
|
64
|
+
components?: ChatComponentsContextValue;
|
|
49
65
|
/** Initial theme, defaults to 'dark' */
|
|
50
66
|
initialTheme?: Theme;
|
|
51
67
|
/** Enable direct call feature (Audio/Video). If enabled, configures internal CallProvider */
|
|
@@ -167,6 +183,9 @@ type ErmisCallRingingProps = {
|
|
|
167
183
|
endCallLabel: string;
|
|
168
184
|
audioCallBadgeLabel: string;
|
|
169
185
|
videoCallBadgeLabel: string;
|
|
186
|
+
isAccepting?: boolean;
|
|
187
|
+
isRejecting?: boolean;
|
|
188
|
+
isEnding?: boolean;
|
|
170
189
|
};
|
|
171
190
|
/** Props for the Connected Audio state view */
|
|
172
191
|
type ErmisCallConnectedAudioProps = {
|
|
@@ -210,6 +229,7 @@ type ErmisCallControlsBarProps = {
|
|
|
210
229
|
selectedVideoDeviceId: string;
|
|
211
230
|
switchAudioDevice: (id: string) => Promise<void>;
|
|
212
231
|
switchVideoDevice: (id: string) => Promise<void>;
|
|
232
|
+
isEnding?: boolean;
|
|
213
233
|
};
|
|
214
234
|
type AvatarProps = {
|
|
215
235
|
/** Image URL */
|
|
@@ -296,8 +316,10 @@ type ChannelActionLabels = {
|
|
|
296
316
|
closeTopic?: string;
|
|
297
317
|
reopenTopic?: string;
|
|
298
318
|
createTopic?: string;
|
|
319
|
+
deleteTopic?: string;
|
|
299
320
|
deleteChannel?: string;
|
|
300
321
|
leaveChannel?: string;
|
|
322
|
+
truncateChannel?: string;
|
|
301
323
|
};
|
|
302
324
|
type ChannelActionIcons = {
|
|
303
325
|
PinIcon?: React.ReactNode;
|
|
@@ -308,8 +330,10 @@ type ChannelActionIcons = {
|
|
|
308
330
|
CloseTopicIcon?: React.ReactNode;
|
|
309
331
|
ReopenTopicIcon?: React.ReactNode;
|
|
310
332
|
CreateTopicIcon?: React.ReactNode;
|
|
333
|
+
DeleteTopicIcon?: React.ReactNode;
|
|
311
334
|
DeleteChannelIcon?: React.ReactNode;
|
|
312
335
|
LeaveChannelIcon?: React.ReactNode;
|
|
336
|
+
TruncateChannelIcon?: React.ReactNode;
|
|
313
337
|
};
|
|
314
338
|
type ChannelActionsProps = {
|
|
315
339
|
channel: Channel$1;
|
|
@@ -321,7 +345,7 @@ type ChannelItemProps = {
|
|
|
321
345
|
isActive: boolean;
|
|
322
346
|
hasUnread: boolean;
|
|
323
347
|
unreadCount: number;
|
|
324
|
-
lastMessageText:
|
|
348
|
+
lastMessageText: React.ReactNode;
|
|
325
349
|
lastMessageUser: string;
|
|
326
350
|
lastMessageTimestamp?: Date | string | null;
|
|
327
351
|
onSelect: (channel: Channel$1) => void;
|
|
@@ -344,6 +368,10 @@ type ChannelItemProps = {
|
|
|
344
368
|
onEditTopic?: (channel: Channel$1) => void;
|
|
345
369
|
/** Handler when Close/Reopen Topic action is triggered */
|
|
346
370
|
onToggleCloseTopic?: (channel: Channel$1, isClosed: boolean) => void;
|
|
371
|
+
/** Handler when Delete Topic action is triggered */
|
|
372
|
+
onDeleteTopic?: (channel: Channel$1) => void;
|
|
373
|
+
/** Handler when Truncate Channel action is triggered */
|
|
374
|
+
onTruncateChannel?: (channel: Channel$1) => void;
|
|
347
375
|
/** Array of action IDs to hide from the actions dropdown */
|
|
348
376
|
hiddenActions?: string[];
|
|
349
377
|
/** Custom labels for default channel actions */
|
|
@@ -353,6 +381,60 @@ type ChannelItemProps = {
|
|
|
353
381
|
/** Whether the other user in this direct channel is online (friend channels only) */
|
|
354
382
|
isOnline?: boolean;
|
|
355
383
|
};
|
|
384
|
+
type TopicPillProps = {
|
|
385
|
+
/** The topic channel to display as a pill */
|
|
386
|
+
topic: Channel$1;
|
|
387
|
+
/** Size of the topic avatar in pixels (default: 16) */
|
|
388
|
+
avatarSize?: number;
|
|
389
|
+
};
|
|
390
|
+
type TopicListProps = {
|
|
391
|
+
/** Parent channel that has topics enabled */
|
|
392
|
+
channel: Channel$1;
|
|
393
|
+
/** Custom channel item component for each topic row */
|
|
394
|
+
ChannelItemComponent?: React.ComponentType<ChannelItemProps>;
|
|
395
|
+
/** Custom avatar for the general (parent) topic */
|
|
396
|
+
GeneralAvatarComponent?: React.ComponentType<AvatarProps>;
|
|
397
|
+
/** Custom avatar for sub-topic items */
|
|
398
|
+
TopicAvatarComponent?: React.ComponentType<AvatarProps>;
|
|
399
|
+
/** Custom avatar component (fallback) */
|
|
400
|
+
AvatarComponent?: React.ComponentType<AvatarProps>;
|
|
401
|
+
/** Label for the general topic (default: 'general') */
|
|
402
|
+
generalTopicLabel?: string;
|
|
403
|
+
/** Pinned icon component */
|
|
404
|
+
PinnedIconComponent?: React.ComponentType;
|
|
405
|
+
/** Custom channel actions component */
|
|
406
|
+
ChannelActionsComponent?: React.ComponentType<ChannelActionsProps>;
|
|
407
|
+
/** Called when a topic is selected */
|
|
408
|
+
onSelectTopic?: (topic: Channel$1) => void;
|
|
409
|
+
/** Handler for Edit Topic action */
|
|
410
|
+
onEditTopic?: (channel: Channel$1) => void;
|
|
411
|
+
/** Handler for Close/Reopen Topic action */
|
|
412
|
+
onToggleCloseTopic?: (channel: Channel$1, isClosed: boolean) => void;
|
|
413
|
+
/** Handler for Delete Topic action */
|
|
414
|
+
onDeleteTopic?: (channel: Channel$1) => void;
|
|
415
|
+
/** Actions to hide */
|
|
416
|
+
hiddenActions?: string[];
|
|
417
|
+
/** Custom action labels */
|
|
418
|
+
actionLabels?: ChannelActionLabels;
|
|
419
|
+
/** Custom action icons */
|
|
420
|
+
actionIcons?: ChannelActionIcons;
|
|
421
|
+
/** Icon for closed topics */
|
|
422
|
+
closedTopicIcon?: React.ReactNode;
|
|
423
|
+
/** Badge label for pending members */
|
|
424
|
+
pendingBadgeLabel?: string;
|
|
425
|
+
/** Badge label for blocked members */
|
|
426
|
+
blockedBadgeLabel?: string;
|
|
427
|
+
/** Auto-scroll the topic list to the top when the current user sends a message (default: true) */
|
|
428
|
+
scrollToTopOnOwnMessage?: boolean;
|
|
429
|
+
deletedMessageLabel?: React.ReactNode;
|
|
430
|
+
stickerMessageLabel?: React.ReactNode;
|
|
431
|
+
photoMessageLabel?: React.ReactNode;
|
|
432
|
+
videoMessageLabel?: React.ReactNode;
|
|
433
|
+
voiceRecordingMessageLabel?: React.ReactNode;
|
|
434
|
+
fileMessageLabel?: React.ReactNode;
|
|
435
|
+
systemMessageTranslations?: SystemMessageTranslations;
|
|
436
|
+
signalMessageTranslations?: SignalMessageTranslations;
|
|
437
|
+
};
|
|
356
438
|
type ChannelListProps = {
|
|
357
439
|
filters?: ChannelFilters;
|
|
358
440
|
sort?: ChannelSort;
|
|
@@ -360,6 +442,8 @@ type ChannelListProps = {
|
|
|
360
442
|
renderChannel?: (channel: Channel$1, isActive: boolean) => React.ReactNode;
|
|
361
443
|
onChannelSelect?: (channel: Channel$1) => void;
|
|
362
444
|
className?: string;
|
|
445
|
+
/** Whether to show pending invites visually in the main list (default: true) */
|
|
446
|
+
showPendingInvites?: boolean;
|
|
363
447
|
/** Array of action IDs to hide from the actions dropdown */
|
|
364
448
|
hiddenActions?: string[];
|
|
365
449
|
LoadingIndicator?: React.ComponentType<{
|
|
@@ -379,18 +463,33 @@ type ChannelListProps = {
|
|
|
379
463
|
pendingBadgeLabel?: string;
|
|
380
464
|
/** Label for the loading indicator */
|
|
381
465
|
loadingLabel?: string;
|
|
382
|
-
/**
|
|
466
|
+
/** Component to display when there is an error loading channels */
|
|
467
|
+
ErrorIndicator?: React.ComponentType<{
|
|
468
|
+
text?: string;
|
|
469
|
+
onRetry?: () => void;
|
|
470
|
+
}>;
|
|
471
|
+
/** Label to display in the error indicator */
|
|
472
|
+
errorLabel?: string;
|
|
473
|
+
/** Label to display in the empty state indicator */
|
|
383
474
|
emptyStateLabel?: string;
|
|
384
475
|
/** Label for the blocked channel badge hover */
|
|
385
476
|
blockedBadgeLabel?: string;
|
|
386
|
-
/**
|
|
387
|
-
|
|
388
|
-
/**
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
|
|
477
|
+
/** Label for deleted messages in the preview strip (default: 'This message was deleted') */
|
|
478
|
+
deletedMessageLabel?: React.ReactNode;
|
|
479
|
+
/** Label for sticker messages in the preview strip (default: 'Sticker') */
|
|
480
|
+
stickerMessageLabel?: React.ReactNode;
|
|
481
|
+
/** Label for photo messages in the preview strip (default: '📷 Photo') */
|
|
482
|
+
photoMessageLabel?: React.ReactNode;
|
|
483
|
+
/** Label for video messages in the preview strip (default: '🎬 Video') */
|
|
484
|
+
videoMessageLabel?: React.ReactNode;
|
|
485
|
+
/** Label for voice message in the preview strip (default: '🎤 Voice message') */
|
|
486
|
+
voiceRecordingMessageLabel?: React.ReactNode;
|
|
487
|
+
/** Label for file messages in the preview strip (default: '📎 File') */
|
|
488
|
+
fileMessageLabel?: React.ReactNode;
|
|
489
|
+
/** Custom translation templates for system messages in the preview strip */
|
|
490
|
+
systemMessageTranslations?: SystemMessageTranslations;
|
|
491
|
+
/** Custom translation templates for signal (call) messages in the preview strip */
|
|
492
|
+
signalMessageTranslations?: SignalMessageTranslations;
|
|
394
493
|
/** Handler when Add Topic button is clicked on a team channel */
|
|
395
494
|
onAddTopic?: (channel: Channel$1) => void;
|
|
396
495
|
/** Optional custom emoji picker for TopicModal */
|
|
@@ -403,12 +502,30 @@ type ChannelListProps = {
|
|
|
403
502
|
onEditTopic?: (channel: Channel$1) => void;
|
|
404
503
|
/** Handler when Close/Reopen Topic action is triggered */
|
|
405
504
|
onToggleCloseTopic?: (channel: Channel$1, isClosed: boolean) => void;
|
|
505
|
+
/** Handler when Delete Topic action is triggered */
|
|
506
|
+
onDeleteTopic?: (channel: Channel$1) => void;
|
|
507
|
+
/** Handler when Truncate action is triggered */
|
|
508
|
+
onTruncateChannel?: (channel: Channel$1) => void;
|
|
406
509
|
/** Custom labels for default channel actions */
|
|
407
510
|
actionLabels?: ChannelActionLabels;
|
|
408
511
|
/** Custom icons for default channel actions */
|
|
409
512
|
actionIcons?: ChannelActionIcons;
|
|
410
513
|
/** Show online/offline indicator dots on channel item avatars for friend channels (default: true) */
|
|
411
514
|
showOnlineStatus?: boolean;
|
|
515
|
+
/** Handler when a topic-enabled channel is clicked — enables drill-down mode */
|
|
516
|
+
onTopicDrillDown?: (channel: Channel$1) => void;
|
|
517
|
+
/** Max number of topic pills shown in the preview strip (default: 3) */
|
|
518
|
+
maxVisibleTopics?: number;
|
|
519
|
+
/** Label for the overflow indicator when topics exceed maxVisibleTopics (default: '...') */
|
|
520
|
+
moreTopicsLabel?: string;
|
|
521
|
+
/** Label for the general topic pill (default: 'general') */
|
|
522
|
+
generalTopicLabel?: string;
|
|
523
|
+
/** Custom component for rendering each topic pill in the preview strip */
|
|
524
|
+
TopicPillComponent?: React.ComponentType<TopicPillProps>;
|
|
525
|
+
/** Custom component to replace the entire flat topic group item */
|
|
526
|
+
FlatTopicGroupItemComponent?: React.ComponentType<any>;
|
|
527
|
+
/** Auto-scroll the channel list to the top when the current user sends a message (default: true) */
|
|
528
|
+
scrollToTopOnOwnMessage?: boolean;
|
|
412
529
|
};
|
|
413
530
|
type AttachmentProps = {
|
|
414
531
|
attachment: Attachment;
|
|
@@ -418,6 +535,9 @@ type AttachmentProps = {
|
|
|
418
535
|
type MessageRendererProps = {
|
|
419
536
|
message: FormatMessageResponse;
|
|
420
537
|
isOwnMessage: boolean;
|
|
538
|
+
systemMessageTranslations?: SystemMessageTranslations;
|
|
539
|
+
signalMessageTranslations?: SignalMessageTranslations;
|
|
540
|
+
onMentionClick?: (userId: string) => void;
|
|
421
541
|
};
|
|
422
542
|
type MessageBubbleProps = {
|
|
423
543
|
message: FormatMessageResponse;
|
|
@@ -445,6 +565,12 @@ type MediaLightboxProps = {
|
|
|
445
565
|
type MessageListProps = {
|
|
446
566
|
/** Fully custom render for each message */
|
|
447
567
|
renderMessage?: (message: FormatMessageResponse, isOwnMessage: boolean) => React.ReactNode;
|
|
568
|
+
/** Handler when a mention is clicked */
|
|
569
|
+
onMentionClick?: (userId: string) => void;
|
|
570
|
+
/** Handler when a sender's username is clicked in the message list */
|
|
571
|
+
onUserNameClick?: (userId: string) => void;
|
|
572
|
+
/** Handler when clicking to add a custom reaction */
|
|
573
|
+
onAddReactionClick?: (e: React.MouseEvent, messageId: string) => void;
|
|
448
574
|
/** Additional CSS class name */
|
|
449
575
|
className?: string;
|
|
450
576
|
/** Custom empty state component */
|
|
@@ -459,6 +585,8 @@ type MessageListProps = {
|
|
|
459
585
|
loadMoreLimit?: number;
|
|
460
586
|
/** Custom date separator component */
|
|
461
587
|
DateSeparatorComponent?: React.ComponentType<DateSeparatorProps>;
|
|
588
|
+
/** Locale string for date separator labels (e.g. 'vi', 'en-US'). Falls back to browser default. */
|
|
589
|
+
dateLocale?: string;
|
|
462
590
|
/** Custom message item component (replaces the entire row) */
|
|
463
591
|
MessageItemComponent?: React.ComponentType<MessageItemProps>;
|
|
464
592
|
/** Custom system message item component */
|
|
@@ -518,6 +646,29 @@ type MessageListProps = {
|
|
|
518
646
|
}>;
|
|
519
647
|
/** I18n Label for pending invitee notification */
|
|
520
648
|
pendingInviteeLabel?: string | ((inviteeName?: string) => string);
|
|
649
|
+
/** I18n Label for pinned messages header */
|
|
650
|
+
pinnedMessagesLabel?: string | ((count: number) => string);
|
|
651
|
+
/** I18n Label for seeing all pinned messages */
|
|
652
|
+
seeAllLabel?: string;
|
|
653
|
+
/** I18n Label for collapsing pinned messages */
|
|
654
|
+
collapseLabel?: string;
|
|
655
|
+
/** I18n Label for unpinning a message */
|
|
656
|
+
unpinLabel?: string;
|
|
657
|
+
/** I18n Label for sticker message preview */
|
|
658
|
+
stickerLabel?: string;
|
|
659
|
+
/** I18n Label for typing indicator */
|
|
660
|
+
typingIndicatorLabel?: (users: Array<{
|
|
661
|
+
id: string;
|
|
662
|
+
name?: string;
|
|
663
|
+
}>) => string;
|
|
664
|
+
/** I18n Label for deleted display messages (display_type === 'deleted') */
|
|
665
|
+
deletedMessageLabel?: string;
|
|
666
|
+
/** Custom translation templates for system messages */
|
|
667
|
+
systemMessageTranslations?: SystemMessageTranslations;
|
|
668
|
+
/** Custom translation templates for signal (call) messages */
|
|
669
|
+
signalMessageTranslations?: SignalMessageTranslations;
|
|
670
|
+
/** Whether to include hidden (deleted) messages in the initial channel query. Defaults to true. */
|
|
671
|
+
includeHiddenMessages?: boolean;
|
|
521
672
|
};
|
|
522
673
|
type ReactionUser = {
|
|
523
674
|
id: string;
|
|
@@ -541,6 +692,8 @@ type MessageReactionsProps = {
|
|
|
541
692
|
onClickReaction?: (type: string) => void;
|
|
542
693
|
/** Whether interactions are disabled */
|
|
543
694
|
disabled?: boolean;
|
|
695
|
+
/** Whether the message is from the current user */
|
|
696
|
+
isOwnMessage?: boolean;
|
|
544
697
|
};
|
|
545
698
|
type ReadReceiptUser = {
|
|
546
699
|
id: string;
|
|
@@ -598,11 +751,24 @@ type MessageItemProps = {
|
|
|
598
751
|
forwardedLabel?: string;
|
|
599
752
|
/** I18n Label for edited state */
|
|
600
753
|
editedLabel?: string;
|
|
754
|
+
/** I18n Label for deleted display messages (display_type === 'deleted') */
|
|
755
|
+
deletedMessageLabel?: React.ReactNode;
|
|
756
|
+
/** Custom translation templates for system messages */
|
|
757
|
+
systemMessageTranslations?: SystemMessageTranslations;
|
|
758
|
+
/** Custom translation templates for signal (call) messages */
|
|
759
|
+
signalMessageTranslations?: SignalMessageTranslations;
|
|
760
|
+
/** Handler when a mention is clicked */
|
|
761
|
+
onMentionClick?: (userId: string) => void;
|
|
762
|
+
/** Handler when a sender's username is clicked in the message list */
|
|
763
|
+
onUserNameClick?: (userId: string) => void;
|
|
764
|
+
/** Handler when clicking to add a custom reaction */
|
|
765
|
+
onAddReactionClick?: (e: React.MouseEvent, messageId: string) => void;
|
|
601
766
|
};
|
|
602
767
|
type SystemMessageItemProps = {
|
|
603
768
|
message: FormatMessageResponse;
|
|
604
769
|
isOwnMessage: boolean;
|
|
605
770
|
SystemRenderer: React.ComponentType<MessageRendererProps>;
|
|
771
|
+
systemMessageTranslations?: SystemMessageTranslations;
|
|
606
772
|
};
|
|
607
773
|
type SendButtonProps = {
|
|
608
774
|
disabled: boolean;
|
|
@@ -612,6 +778,10 @@ type AttachButtonProps = {
|
|
|
612
778
|
disabled: boolean;
|
|
613
779
|
onClick: () => void;
|
|
614
780
|
};
|
|
781
|
+
type VoiceRecordButtonProps = {
|
|
782
|
+
disabled: boolean;
|
|
783
|
+
onRecordComplete: (file: File) => void;
|
|
784
|
+
};
|
|
615
785
|
/** Props passed to a consumer-provided emoji picker component */
|
|
616
786
|
type EmojiPickerProps = {
|
|
617
787
|
/** Called when user selects an emoji — insert the emoji string into the input */
|
|
@@ -619,6 +789,17 @@ type EmojiPickerProps = {
|
|
|
619
789
|
/** Called when the picker should close (e.g. click outside) */
|
|
620
790
|
onClose: () => void;
|
|
621
791
|
};
|
|
792
|
+
/** Props for the preview overlay when a user has not joined a public channel */
|
|
793
|
+
type PreviewOverlayProps = {
|
|
794
|
+
/** Title shown in the preview overlay */
|
|
795
|
+
title?: string;
|
|
796
|
+
/** Label for the join button */
|
|
797
|
+
buttonLabel?: string;
|
|
798
|
+
/** Action when the join button is clicked */
|
|
799
|
+
onJoin?: () => void;
|
|
800
|
+
/** Custom class name */
|
|
801
|
+
className?: string;
|
|
802
|
+
};
|
|
622
803
|
/** Props passed to the emoji button component */
|
|
623
804
|
type EmojiButtonProps = {
|
|
624
805
|
/** Whether the picker is currently open */
|
|
@@ -637,6 +818,8 @@ type MessageInputProps = {
|
|
|
637
818
|
SendButton?: React.ComponentType<SendButtonProps>;
|
|
638
819
|
/** Custom attach button component */
|
|
639
820
|
AttachButton?: React.ComponentType<AttachButtonProps>;
|
|
821
|
+
/** Custom voice record button component */
|
|
822
|
+
VoiceRecordButtonComponent?: React.ComponentType<VoiceRecordButtonProps>;
|
|
640
823
|
/** Custom file preview component */
|
|
641
824
|
FilesPreviewComponent?: React.ComponentType<FilesPreviewProps>;
|
|
642
825
|
/** Custom mention suggestions component */
|
|
@@ -675,6 +858,38 @@ type MessageInputProps = {
|
|
|
675
858
|
slowModeLabel?: (cooldown: number) => React.ReactNode;
|
|
676
859
|
/** I18n Label for closed topic */
|
|
677
860
|
closedTopicLabel?: string;
|
|
861
|
+
/** I18n Label for replying state */
|
|
862
|
+
replyingToLabel?: string;
|
|
863
|
+
/** I18n Label for editing state */
|
|
864
|
+
editingMessageLabel?: string;
|
|
865
|
+
/** I18n Label for Drag and Drop overlay */
|
|
866
|
+
dragAndDropLabel?: string;
|
|
867
|
+
/** Custom component for Drag and Drop overlay */
|
|
868
|
+
DragAndDropOverlayComponent?: React.ComponentType<{
|
|
869
|
+
dragAndDropLabel: string;
|
|
870
|
+
}>;
|
|
871
|
+
/** Custom component for the Preview Overlay (shown instead of input in unjoined public channels) */
|
|
872
|
+
PreviewOverlayComponent?: React.ComponentType<PreviewOverlayProps>;
|
|
873
|
+
/** I18n Title for Preview Overlay */
|
|
874
|
+
previewOverlayTitle?: string;
|
|
875
|
+
/** I18n Label for Join Button in Preview Overlay */
|
|
876
|
+
joinChannelLabel?: string;
|
|
877
|
+
/** Disable stickers entirely */
|
|
878
|
+
disableStickers?: boolean;
|
|
879
|
+
/** URL for the sticker picker iframe (default: https://sticker.ermis.network) */
|
|
880
|
+
stickerIframeUrl?: string;
|
|
881
|
+
/** Custom sticker picker component */
|
|
882
|
+
StickerPickerComponent?: React.ComponentType<{
|
|
883
|
+
stickerIframeUrl: string;
|
|
884
|
+
onClose: () => void;
|
|
885
|
+
}>;
|
|
886
|
+
/** Custom sticker button component */
|
|
887
|
+
StickerButtonComponent?: React.ComponentType<{
|
|
888
|
+
active: boolean;
|
|
889
|
+
onClick: () => void;
|
|
890
|
+
}>;
|
|
891
|
+
/** I18n Label for maximum characters exceeded error */
|
|
892
|
+
maxCharsLabel?: string;
|
|
678
893
|
};
|
|
679
894
|
type ReplyPreviewProps = {
|
|
680
895
|
message: FormatMessageResponse;
|
|
@@ -722,6 +937,8 @@ type PinnedMessageItemProps = {
|
|
|
722
937
|
onClickMessage?: (messageId: string) => void;
|
|
723
938
|
onUnpin?: (messageId: string) => void;
|
|
724
939
|
AvatarComponent: React.ComponentType<AvatarProps>;
|
|
940
|
+
unpinLabel?: string;
|
|
941
|
+
stickerLabel?: string;
|
|
725
942
|
};
|
|
726
943
|
type PinnedMessagesProps = {
|
|
727
944
|
/** Additional CSS class name */
|
|
@@ -734,6 +951,12 @@ type PinnedMessagesProps = {
|
|
|
734
951
|
onClickMessage?: (messageId: string) => void;
|
|
735
952
|
/** Max messages to show in collapsed state (default: 1) */
|
|
736
953
|
maxCollapsed?: number;
|
|
954
|
+
/** I18n Labels */
|
|
955
|
+
pinnedMessagesLabel?: string | ((count: number) => string);
|
|
956
|
+
seeAllLabel?: string;
|
|
957
|
+
collapseLabel?: string;
|
|
958
|
+
unpinLabel?: string;
|
|
959
|
+
stickerLabel?: string;
|
|
737
960
|
};
|
|
738
961
|
type QuotedMessagePreviewProps = {
|
|
739
962
|
/** The quoted (replied-to) message object */
|
|
@@ -824,6 +1047,36 @@ interface ModalProps {
|
|
|
824
1047
|
hideCloseButton?: boolean;
|
|
825
1048
|
closeOnOutsideClick?: boolean;
|
|
826
1049
|
}
|
|
1050
|
+
interface DropdownProps {
|
|
1051
|
+
/** Whether the dropdown is open */
|
|
1052
|
+
isOpen: boolean;
|
|
1053
|
+
/** Rect from getBoundingClientRect() of the anchor element */
|
|
1054
|
+
anchorRect: DOMRect | null;
|
|
1055
|
+
/** Callback when dropdown requests to close (e.g., click outside, scroll, Escape) */
|
|
1056
|
+
onClose: () => void;
|
|
1057
|
+
/** Dropdown menu content */
|
|
1058
|
+
children: React.ReactNode;
|
|
1059
|
+
/** Horizontal alignment relative to the anchor. Default: 'left' */
|
|
1060
|
+
align?: 'left' | 'right';
|
|
1061
|
+
/** Optional custom CSS class for the container */
|
|
1062
|
+
className?: string;
|
|
1063
|
+
/** Optional custom CSS style for the container */
|
|
1064
|
+
style?: React.CSSProperties;
|
|
1065
|
+
}
|
|
1066
|
+
type PanelProps = {
|
|
1067
|
+
/** Whether the panel is visible */
|
|
1068
|
+
isOpen: boolean;
|
|
1069
|
+
/** Called when user clicks the back button */
|
|
1070
|
+
onClose: () => void;
|
|
1071
|
+
/** Panel title shown in the header */
|
|
1072
|
+
title?: string;
|
|
1073
|
+
/** Panel body content */
|
|
1074
|
+
children: React.ReactNode;
|
|
1075
|
+
/** Optional header content (replaces default title + back button) */
|
|
1076
|
+
headerContent?: React.ReactNode;
|
|
1077
|
+
/** Additional CSS class name */
|
|
1078
|
+
className?: string;
|
|
1079
|
+
};
|
|
827
1080
|
/** Attachment item from the channel attachment query API */
|
|
828
1081
|
type AttachmentItem = {
|
|
829
1082
|
id: string;
|
|
@@ -846,6 +1099,12 @@ type AttachmentItem = {
|
|
|
846
1099
|
text?: string;
|
|
847
1100
|
};
|
|
848
1101
|
type MediaTab = 'members' | 'media' | 'links' | 'files';
|
|
1102
|
+
type ChannelInfoTabHeaderProps = {
|
|
1103
|
+
activeTab: MediaTab;
|
|
1104
|
+
onTabChange: (tab: MediaTab) => void;
|
|
1105
|
+
availableTabs: MediaTab[];
|
|
1106
|
+
tabCounts: Record<MediaTab, number>;
|
|
1107
|
+
};
|
|
849
1108
|
type ChannelInfoMemberItemProps = {
|
|
850
1109
|
member: ChannelInfoMember;
|
|
851
1110
|
AvatarComponent: React.ComponentType<AvatarProps>;
|
|
@@ -859,6 +1118,8 @@ type ChannelInfoMemberItemProps = {
|
|
|
859
1118
|
canPromote?: boolean;
|
|
860
1119
|
onDemote?: (id: string) => void;
|
|
861
1120
|
canDemote?: boolean;
|
|
1121
|
+
/** Custom labels for member roles (owner, moder, member, pending) */
|
|
1122
|
+
roleLabels?: Record<string, string>;
|
|
862
1123
|
};
|
|
863
1124
|
type ChannelInfoMediaItemProps = {
|
|
864
1125
|
item: AttachmentItem;
|
|
@@ -901,23 +1162,35 @@ type ChannelInfoActionsProps = {
|
|
|
901
1162
|
onSettingsClick?: () => void;
|
|
902
1163
|
onLeaveChannel?: () => void;
|
|
903
1164
|
onDeleteChannel?: () => void;
|
|
1165
|
+
onTruncateChannel?: () => void;
|
|
904
1166
|
onBlockUser?: () => void;
|
|
905
1167
|
onUnblockUser?: () => void;
|
|
1168
|
+
onPin?: () => void;
|
|
1169
|
+
onUnpin?: () => void;
|
|
906
1170
|
isTeamChannel?: boolean;
|
|
907
1171
|
isTopic?: boolean;
|
|
908
1172
|
isClosedTopic?: boolean;
|
|
909
1173
|
isBlocked?: boolean;
|
|
1174
|
+
isPinned?: boolean;
|
|
910
1175
|
currentUserRole?: string;
|
|
911
1176
|
searchLabel?: string;
|
|
912
1177
|
settingsLabel?: string;
|
|
913
1178
|
deleteLabel?: string;
|
|
1179
|
+
truncateLabel?: string;
|
|
914
1180
|
leaveLabel?: string;
|
|
915
1181
|
blockLabel?: string;
|
|
916
1182
|
unblockLabel?: string;
|
|
1183
|
+
pinLabel?: string;
|
|
1184
|
+
unpinLabel?: string;
|
|
917
1185
|
onCloseTopic?: () => void;
|
|
918
1186
|
onReopenTopic?: () => void;
|
|
919
1187
|
closeTopicLabel?: string;
|
|
920
1188
|
reopenTopicLabel?: string;
|
|
1189
|
+
onDeleteTopic?: () => void;
|
|
1190
|
+
deleteTopicLabel?: string;
|
|
1191
|
+
onCreateTopic?: () => void;
|
|
1192
|
+
createTopicLabel?: string;
|
|
1193
|
+
topicsEnabled?: boolean;
|
|
921
1194
|
};
|
|
922
1195
|
type ChannelInfoMember = {
|
|
923
1196
|
id: string;
|
|
@@ -929,6 +1202,7 @@ type ChannelInfoMember = {
|
|
|
929
1202
|
type EditChannelData = {
|
|
930
1203
|
name?: string;
|
|
931
1204
|
image?: string;
|
|
1205
|
+
banner?: string;
|
|
932
1206
|
description?: string;
|
|
933
1207
|
public?: boolean;
|
|
934
1208
|
};
|
|
@@ -1031,6 +1305,7 @@ type ChannelInfoTabsProps = {
|
|
|
1031
1305
|
onUnbanMember?: (id: string) => void;
|
|
1032
1306
|
onPromoteMember?: (id: string) => void;
|
|
1033
1307
|
onDemoteMember?: (id: string) => void;
|
|
1308
|
+
isPreviewMode?: boolean;
|
|
1034
1309
|
/** Label for the 'Add Member' button in the Members tab (default: 'Add Member') */
|
|
1035
1310
|
addMemberButtonLabel?: string;
|
|
1036
1311
|
/** Custom component for the 'Add Member' button */
|
|
@@ -1041,7 +1316,16 @@ type ChannelInfoTabsProps = {
|
|
|
1041
1316
|
LinkItemComponent?: React.ComponentType<ChannelInfoLinkItemProps>;
|
|
1042
1317
|
FileItemComponent?: React.ComponentType<ChannelInfoFileItemProps>;
|
|
1043
1318
|
EmptyStateComponent?: React.ComponentType<ChannelInfoEmptyStateProps>;
|
|
1044
|
-
LoadingComponent?: React.ComponentType
|
|
1319
|
+
LoadingComponent?: React.ComponentType<{
|
|
1320
|
+
tab?: string;
|
|
1321
|
+
}>;
|
|
1322
|
+
/** Custom component for the tab header buttons */
|
|
1323
|
+
TabHeaderComponent?: React.ComponentType<ChannelInfoTabHeaderProps>;
|
|
1324
|
+
/** Whether the tabs panel is currently visible — controls data fetching (default: true) */
|
|
1325
|
+
isVisible?: boolean;
|
|
1326
|
+
roleLabels?: Record<string, string>;
|
|
1327
|
+
/** Ref or Element of the parent scrollable container — used for virtualization sync (default: undefined) */
|
|
1328
|
+
scrollContainerRef?: React.RefObject<HTMLDivElement | null> | HTMLDivElement | null;
|
|
1045
1329
|
};
|
|
1046
1330
|
type ChannelInfoProps = {
|
|
1047
1331
|
/** Optional channel override. Defaults to activeChannel from context */
|
|
@@ -1054,6 +1338,8 @@ type ChannelInfoProps = {
|
|
|
1054
1338
|
onClose?: () => void;
|
|
1055
1339
|
/** Custom Title String for the banner */
|
|
1056
1340
|
title?: string;
|
|
1341
|
+
/** Whether the panel is visible — controls data fetching timing (default: true) */
|
|
1342
|
+
isVisible?: boolean;
|
|
1057
1343
|
/** Custom components to replace internal sections */
|
|
1058
1344
|
HeaderComponent?: React.ComponentType<ChannelInfoHeaderProps>;
|
|
1059
1345
|
CoverComponent?: React.ComponentType<ChannelInfoCoverProps>;
|
|
@@ -1063,13 +1349,19 @@ type ChannelInfoProps = {
|
|
|
1063
1349
|
AddMemberModalComponent?: React.ComponentType<AddMemberModalProps>;
|
|
1064
1350
|
/** Custom component replacing the entire EditChannelModal */
|
|
1065
1351
|
EditChannelModalComponent?: React.ComponentType<EditChannelModalProps>;
|
|
1352
|
+
/** Custom component replacing the entire EditTopicModal */
|
|
1353
|
+
EditTopicModalComponent?: React.ComponentType<TopicModalProps>;
|
|
1066
1354
|
/** Custom sub-component overrides (passed through to TabsComponent) */
|
|
1067
1355
|
MemberItemComponent?: React.ComponentType<ChannelInfoMemberItemProps>;
|
|
1068
1356
|
MediaItemComponent?: React.ComponentType<ChannelInfoMediaItemProps>;
|
|
1069
1357
|
LinkItemComponent?: React.ComponentType<ChannelInfoLinkItemProps>;
|
|
1070
1358
|
FileItemComponent?: React.ComponentType<ChannelInfoFileItemProps>;
|
|
1071
1359
|
EmptyStateComponent?: React.ComponentType<ChannelInfoEmptyStateProps>;
|
|
1072
|
-
LoadingComponent?: React.ComponentType
|
|
1360
|
+
LoadingComponent?: React.ComponentType<{
|
|
1361
|
+
tab?: string;
|
|
1362
|
+
}>;
|
|
1363
|
+
/** Custom component for the tab header buttons (passed through to TabsComponent) */
|
|
1364
|
+
TabHeaderComponent?: React.ComponentType<ChannelInfoTabHeaderProps>;
|
|
1073
1365
|
/** Add Member customization (passed through to AddMemberModal) */
|
|
1074
1366
|
addMemberModalTitle?: string;
|
|
1075
1367
|
addMemberSearchPlaceholder?: string;
|
|
@@ -1099,14 +1391,26 @@ type ChannelInfoProps = {
|
|
|
1099
1391
|
editChannelMaxImageSize?: number;
|
|
1100
1392
|
editChannelMaxImageSizeError?: string;
|
|
1101
1393
|
/** Action Labels */
|
|
1394
|
+
/** Custom component for the search panel */
|
|
1395
|
+
MessageSearchPanelComponent?: React.ComponentType<MessageSearchPanelProps>;
|
|
1396
|
+
/** Custom component for the channel settings panel */
|
|
1397
|
+
ChannelSettingsPanelComponent?: React.ComponentType<ChannelSettingsPanelProps>;
|
|
1102
1398
|
actionsSearchLabel?: string;
|
|
1103
1399
|
actionsSettingsLabel?: string;
|
|
1104
1400
|
actionsDeleteLabel?: string;
|
|
1401
|
+
actionsTruncateLabel?: string;
|
|
1105
1402
|
actionsLeaveLabel?: string;
|
|
1403
|
+
actionsPinLabel?: string;
|
|
1404
|
+
actionsUnpinLabel?: string;
|
|
1405
|
+
actionsPinTopicLabel?: string;
|
|
1406
|
+
actionsUnpinTopicLabel?: string;
|
|
1106
1407
|
/** Action callbacks */
|
|
1107
1408
|
onSearchClick?: () => void;
|
|
1108
1409
|
onLeaveChannel?: () => void;
|
|
1109
1410
|
onDeleteChannel?: () => void;
|
|
1411
|
+
onTruncateChannel?: (channel: Channel$1) => void;
|
|
1412
|
+
onPinChannel?: () => void;
|
|
1413
|
+
onUnpinChannel?: () => void;
|
|
1110
1414
|
onAddMemberClick?: () => void;
|
|
1111
1415
|
onRemoveMember?: (id: string) => void;
|
|
1112
1416
|
onBanMember?: (id: string) => void;
|
|
@@ -1121,10 +1425,63 @@ type ChannelInfoProps = {
|
|
|
1121
1425
|
actionsUnblockLabel?: string;
|
|
1122
1426
|
actionsCloseTopicLabel?: string;
|
|
1123
1427
|
actionsReopenTopicLabel?: string;
|
|
1428
|
+
actionsDeleteTopicLabel?: string;
|
|
1429
|
+
actionsCreateTopicLabel?: string;
|
|
1430
|
+
onDeleteTopic?: (channel: Channel$1) => void;
|
|
1431
|
+
onCreateTopic?: (channel: Channel$1) => void;
|
|
1124
1432
|
/** Settings Panel Topics Labels */
|
|
1125
1433
|
settingsWorkspaceTopicsTitle?: string;
|
|
1126
1434
|
settingsTopicsFeatureName?: string;
|
|
1127
1435
|
settingsTopicsFeatureDescription?: string;
|
|
1436
|
+
/** Custom labels for member roles (owner, moder, member, pending) */
|
|
1437
|
+
roleLabels?: Record<string, string>;
|
|
1438
|
+
};
|
|
1439
|
+
type SearchResultMessage = {
|
|
1440
|
+
id: string;
|
|
1441
|
+
text?: string;
|
|
1442
|
+
user_id?: string;
|
|
1443
|
+
user?: {
|
|
1444
|
+
id?: string;
|
|
1445
|
+
name?: string;
|
|
1446
|
+
avatar?: string;
|
|
1447
|
+
image?: string;
|
|
1448
|
+
avatar_url?: string;
|
|
1449
|
+
};
|
|
1450
|
+
created_at?: string;
|
|
1451
|
+
[key: string]: any;
|
|
1452
|
+
};
|
|
1453
|
+
type MessageSearchPanelProps = {
|
|
1454
|
+
isOpen: boolean;
|
|
1455
|
+
onClose: () => void;
|
|
1456
|
+
channel: Channel$1;
|
|
1457
|
+
/** Custom avatar component */
|
|
1458
|
+
AvatarComponent?: React.ComponentType<AvatarProps>;
|
|
1459
|
+
/** Title for the panel */
|
|
1460
|
+
title?: string;
|
|
1461
|
+
/** Search input placeholder */
|
|
1462
|
+
placeholder?: string;
|
|
1463
|
+
/** Text shown when loading */
|
|
1464
|
+
loadingText?: string;
|
|
1465
|
+
/** Text shown when no more messages or no results */
|
|
1466
|
+
emptyText?: string;
|
|
1467
|
+
/** Debounce wait time in ms (default: 500) */
|
|
1468
|
+
debounceMs?: number;
|
|
1469
|
+
};
|
|
1470
|
+
type ChannelSettingsPanelProps = {
|
|
1471
|
+
isOpen: boolean;
|
|
1472
|
+
onClose: () => void;
|
|
1473
|
+
channel: Channel$1;
|
|
1474
|
+
/** Title for the settings panel */
|
|
1475
|
+
title?: string;
|
|
1476
|
+
/** Custom slow mode options */
|
|
1477
|
+
slowModeOptions?: {
|
|
1478
|
+
label: string;
|
|
1479
|
+
value: number;
|
|
1480
|
+
}[];
|
|
1481
|
+
/** I18n labels for Topics settings */
|
|
1482
|
+
workspaceTopicsTitle?: string;
|
|
1483
|
+
topicsFeatureName?: string;
|
|
1484
|
+
topicsFeatureDescription?: string;
|
|
1128
1485
|
};
|
|
1129
1486
|
/** Individual user item in UserPicker */
|
|
1130
1487
|
type UserPickerUser = {
|
|
@@ -1182,6 +1539,45 @@ type UserPickerProps = {
|
|
|
1182
1539
|
emptyText?: string;
|
|
1183
1540
|
loadingMoreText?: string;
|
|
1184
1541
|
selectedEmptyLabel?: string;
|
|
1542
|
+
friendsOnly?: boolean;
|
|
1543
|
+
};
|
|
1544
|
+
type CreateChannelTabsProps = {
|
|
1545
|
+
activeTab: 'messaging' | 'team';
|
|
1546
|
+
onTabChange: (tab: 'messaging' | 'team') => void;
|
|
1547
|
+
disabled?: boolean;
|
|
1548
|
+
directTabLabel?: string;
|
|
1549
|
+
groupTabLabel?: string;
|
|
1550
|
+
};
|
|
1551
|
+
type CreateChannelFooterProps = {
|
|
1552
|
+
tab: 'messaging' | 'team';
|
|
1553
|
+
step: 1 | 2;
|
|
1554
|
+
onCancel: () => void;
|
|
1555
|
+
onNext: () => void;
|
|
1556
|
+
onBack: () => void;
|
|
1557
|
+
onCreate: () => void;
|
|
1558
|
+
isCreating: boolean;
|
|
1559
|
+
isValid: boolean;
|
|
1560
|
+
hasExistingDirectChannel?: boolean;
|
|
1561
|
+
cancelButtonLabel?: string;
|
|
1562
|
+
createButtonLabel?: string;
|
|
1563
|
+
creatingButtonLabel?: string;
|
|
1564
|
+
messageButtonLabel?: string;
|
|
1565
|
+
nextButtonLabel?: string;
|
|
1566
|
+
backButtonLabel?: string;
|
|
1567
|
+
};
|
|
1568
|
+
type CreateChannelGroupFieldsProps = {
|
|
1569
|
+
name: string;
|
|
1570
|
+
onNameChange: (name: string) => void;
|
|
1571
|
+
description: string;
|
|
1572
|
+
onDescriptionChange: (desc: string) => void;
|
|
1573
|
+
isPublic: boolean;
|
|
1574
|
+
onPublicChange: (isPublic: boolean) => void;
|
|
1575
|
+
disabled?: boolean;
|
|
1576
|
+
groupNameLabel?: string;
|
|
1577
|
+
groupNamePlaceholder?: string;
|
|
1578
|
+
groupDescriptionLabel?: string;
|
|
1579
|
+
groupDescriptionPlaceholder?: string;
|
|
1580
|
+
groupPublicLabel?: string;
|
|
1185
1581
|
};
|
|
1186
1582
|
type CreateChannelModalProps = {
|
|
1187
1583
|
isOpen: boolean;
|
|
@@ -1190,6 +1586,15 @@ type CreateChannelModalProps = {
|
|
|
1190
1586
|
/** Override visual components */
|
|
1191
1587
|
AvatarComponent?: React.ComponentType<AvatarProps>;
|
|
1192
1588
|
UserItemComponent?: React.ComponentType<UserPickerItemProps>;
|
|
1589
|
+
TabsComponent?: React.ComponentType<CreateChannelTabsProps>;
|
|
1590
|
+
FooterComponent?: React.ComponentType<CreateChannelFooterProps>;
|
|
1591
|
+
GroupFieldsComponent?: React.ComponentType<CreateChannelGroupFieldsProps>;
|
|
1592
|
+
SearchInputComponent?: React.ComponentType<{
|
|
1593
|
+
value: string;
|
|
1594
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
1595
|
+
placeholder: string;
|
|
1596
|
+
}>;
|
|
1597
|
+
SelectedBoxComponent?: React.ComponentType<UserPickerSelectedBoxProps>;
|
|
1193
1598
|
/** i18n labels */
|
|
1194
1599
|
title?: string;
|
|
1195
1600
|
directTabLabel?: string;
|
|
@@ -1205,6 +1610,9 @@ type CreateChannelModalProps = {
|
|
|
1205
1610
|
createButtonLabel?: string;
|
|
1206
1611
|
creatingButtonLabel?: string;
|
|
1207
1612
|
messageButtonLabel?: string;
|
|
1613
|
+
nextButtonLabel?: string;
|
|
1614
|
+
backButtonLabel?: string;
|
|
1615
|
+
emptyStateLabel?: string;
|
|
1208
1616
|
/** File upload configuration for group channel images */
|
|
1209
1617
|
imageAccept?: string;
|
|
1210
1618
|
maxImageSize?: number;
|
|
@@ -1235,10 +1643,41 @@ type TopicModalProps = {
|
|
|
1235
1643
|
savingButtonLabel?: string;
|
|
1236
1644
|
};
|
|
1237
1645
|
|
|
1238
|
-
declare const ChatProvider:
|
|
1646
|
+
declare const ChatProvider: React__default.FC<ChatProviderProps>;
|
|
1239
1647
|
|
|
1240
1648
|
declare const useChatClient: () => ChatContextValue;
|
|
1241
1649
|
|
|
1650
|
+
declare const useChatUser: <ErmisChatGenerics extends ExtendableGenerics = DefaultGenerics>() => {
|
|
1651
|
+
user: UserResponse<ErmisChatGenerics> | undefined;
|
|
1652
|
+
};
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* A hook that retrieves all pending invite channels from the SDK's local cache
|
|
1656
|
+
* without triggering an extra API network query.
|
|
1657
|
+
*
|
|
1658
|
+
* Re-renders automatically when related events (e.g., invites, accepts, deletes) arrive.
|
|
1659
|
+
*/
|
|
1660
|
+
declare function useInviteChannels(): Channel$1[];
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
* A hook that retrieves all friend (contact) channels from the SDK's local cache
|
|
1664
|
+
* without triggering an extra API network query.
|
|
1665
|
+
*
|
|
1666
|
+
* A contact is defined as a direct (1-1) channel where both members
|
|
1667
|
+
* hold the 'owner' channel_role.
|
|
1668
|
+
*
|
|
1669
|
+
* Re-renders automatically when related events arrive.
|
|
1670
|
+
*/
|
|
1671
|
+
declare function useContactChannels(): Channel$1[];
|
|
1672
|
+
|
|
1673
|
+
declare const useInviteCount: () => {
|
|
1674
|
+
inviteCount: number;
|
|
1675
|
+
};
|
|
1676
|
+
|
|
1677
|
+
declare const useContactCount: () => {
|
|
1678
|
+
contactCount: number;
|
|
1679
|
+
};
|
|
1680
|
+
|
|
1242
1681
|
declare const useChannel: () => UseChannelReturn;
|
|
1243
1682
|
|
|
1244
1683
|
/**
|
|
@@ -1252,7 +1691,7 @@ declare const useChannel: () => UseChannelReturn;
|
|
|
1252
1691
|
* `channel.state.unreadCount` before our listener fires, so we only
|
|
1253
1692
|
* need to re-order / flush the React state.
|
|
1254
1693
|
*/
|
|
1255
|
-
declare function useChannelListUpdates(channels: Channel$1[], setChannels: React.Dispatch<React.SetStateAction<Channel$1[]
|
|
1694
|
+
declare function useChannelListUpdates(channels: Channel$1[], setChannels: React.Dispatch<React.SetStateAction<Channel$1[]>>, onOwnMessageNew?: () => void): void;
|
|
1256
1695
|
|
|
1257
1696
|
/**
|
|
1258
1697
|
* Custom hook to abstract real-time row-level updates for a single channel.
|
|
@@ -1332,26 +1771,228 @@ declare function useOnlineUsers(channels: Channel$1[]): Set<string>;
|
|
|
1332
1771
|
*/
|
|
1333
1772
|
declare function usePendingState(channel: Channel$1 | null | undefined, currentUserId?: string): {
|
|
1334
1773
|
isPending: boolean;
|
|
1774
|
+
inviteUpdateCount: number;
|
|
1775
|
+
};
|
|
1776
|
+
|
|
1777
|
+
/**
|
|
1778
|
+
* Hook that tracks whether the current user is previewing a public channel
|
|
1779
|
+
* without being a member.
|
|
1780
|
+
*/
|
|
1781
|
+
declare function usePreviewState(channel: Channel$1 | null | undefined, currentUserId?: string): {
|
|
1782
|
+
isPreviewMode: boolean;
|
|
1783
|
+
};
|
|
1784
|
+
|
|
1785
|
+
/** Preview data for the most recent message across the topic group */
|
|
1786
|
+
type LatestMessagePreview = {
|
|
1787
|
+
text: React__default.ReactNode;
|
|
1788
|
+
user: string;
|
|
1789
|
+
timestamp?: string | Date;
|
|
1790
|
+
/** Topic name if the message came from a sub-topic, null if from general/parent */
|
|
1791
|
+
sourceName: string | null;
|
|
1792
|
+
};
|
|
1793
|
+
type TopicGroupUpdatesOptions = {
|
|
1794
|
+
deletedMessageLabel?: React__default.ReactNode;
|
|
1795
|
+
stickerMessageLabel?: React__default.ReactNode;
|
|
1796
|
+
photoMessageLabel?: React__default.ReactNode;
|
|
1797
|
+
videoMessageLabel?: React__default.ReactNode;
|
|
1798
|
+
voiceRecordingMessageLabel?: React__default.ReactNode;
|
|
1799
|
+
fileMessageLabel?: React__default.ReactNode;
|
|
1800
|
+
systemMessageTranslations?: SystemMessageTranslations;
|
|
1801
|
+
signalMessageTranslations?: SignalMessageTranslations;
|
|
1802
|
+
};
|
|
1803
|
+
/**
|
|
1804
|
+
* Hook encapsulating realtime logic for a topic-enabled channel group.
|
|
1805
|
+
*
|
|
1806
|
+
* Subscribes to message and pin events on the parent channel AND all its
|
|
1807
|
+
* topics to compute:
|
|
1808
|
+
* - sorted topics list (pinned first, then by last activity)
|
|
1809
|
+
* - aggregated unread count across parent + all topics
|
|
1810
|
+
* - boolean flag indicating if any unread exists
|
|
1811
|
+
* - latest message preview across parent + all topics
|
|
1812
|
+
*/
|
|
1813
|
+
declare function useTopicGroupUpdates(channel: Channel$1, currentUserId?: string, options?: TopicGroupUpdatesOptions): {
|
|
1814
|
+
topics: Channel$1[];
|
|
1815
|
+
aggregatedUnreadCount: number;
|
|
1816
|
+
hasUnread: boolean;
|
|
1817
|
+
updateCount: number;
|
|
1818
|
+
latestMessagePreview: LatestMessagePreview | null;
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1821
|
+
declare function useDragAndDrop(onFilesDrop: (files: FileList) => void, disabled?: boolean): {
|
|
1822
|
+
isDragging: boolean;
|
|
1823
|
+
};
|
|
1824
|
+
|
|
1825
|
+
type UseMessageSendOptions = {
|
|
1826
|
+
activeChannel: Channel$1 | null;
|
|
1827
|
+
editableRef: React.RefObject<HTMLDivElement | null>;
|
|
1828
|
+
files: FilePreviewItem[];
|
|
1829
|
+
setFiles: React.Dispatch<React.SetStateAction<FilePreviewItem[]>>;
|
|
1830
|
+
hasContent: boolean;
|
|
1831
|
+
setHasContent: (value: boolean) => void;
|
|
1832
|
+
isTeamChannel: boolean;
|
|
1833
|
+
buildPayload: () => {
|
|
1834
|
+
text: string;
|
|
1835
|
+
mentioned_all: boolean;
|
|
1836
|
+
mentioned_users: string[];
|
|
1837
|
+
};
|
|
1838
|
+
reset: () => void;
|
|
1839
|
+
syncMessages: () => void;
|
|
1840
|
+
onSend?: (text: string) => void;
|
|
1841
|
+
onBeforeSend?: (text: string, attachments: FilePreviewItem[]) => boolean | Promise<boolean>;
|
|
1842
|
+
/** Message being replied to */
|
|
1843
|
+
quotedMessage?: FormatMessageResponse | null;
|
|
1844
|
+
/** Clear quoted message after send */
|
|
1845
|
+
clearQuotedMessage?: () => void;
|
|
1846
|
+
/** Message being edited */
|
|
1847
|
+
editingMessage?: FormatMessageResponse | null;
|
|
1848
|
+
/** Clear edited message after send */
|
|
1849
|
+
clearEditingMessage?: () => void;
|
|
1850
|
+
};
|
|
1851
|
+
declare function useMessageSend({ activeChannel, editableRef, files, setFiles, hasContent, setHasContent, isTeamChannel, buildPayload, reset, syncMessages, onSend, onBeforeSend, quotedMessage, clearQuotedMessage, editingMessage, clearEditingMessage, }: UseMessageSendOptions): {
|
|
1852
|
+
sending: boolean;
|
|
1853
|
+
handleSend: () => Promise<void>;
|
|
1854
|
+
};
|
|
1855
|
+
|
|
1856
|
+
type UseFileUploadOptions = {
|
|
1857
|
+
activeChannel: Channel$1 | null;
|
|
1858
|
+
editableRef: React.RefObject<HTMLDivElement | null>;
|
|
1859
|
+
setHasContent: (value: boolean) => void;
|
|
1860
|
+
};
|
|
1861
|
+
declare function useFileUpload({ activeChannel, editableRef, setHasContent }: UseFileUploadOptions): {
|
|
1862
|
+
files: FilePreviewItem[];
|
|
1863
|
+
setFiles: React$1.Dispatch<React$1.SetStateAction<FilePreviewItem[]>>;
|
|
1864
|
+
fileInputRef: React$1.RefObject<HTMLInputElement>;
|
|
1865
|
+
handleFilesSelected: (selectedFiles: FileList | null) => void;
|
|
1866
|
+
handleRemoveFile: (id: string) => void;
|
|
1867
|
+
handleAttachClick: () => void;
|
|
1868
|
+
cleanupFiles: () => void;
|
|
1869
|
+
};
|
|
1870
|
+
|
|
1871
|
+
type UseEmojiPickerOptions = {
|
|
1872
|
+
editableRef: React.RefObject<HTMLDivElement | null>;
|
|
1873
|
+
setHasContent: (value: boolean) => void;
|
|
1874
|
+
};
|
|
1875
|
+
declare function useEmojiPicker({ editableRef, setHasContent }: UseEmojiPickerOptions): {
|
|
1876
|
+
emojiPickerOpen: boolean;
|
|
1877
|
+
handleEmojiSelect: (emoji: string) => void;
|
|
1878
|
+
handleEmojiClose: () => void;
|
|
1879
|
+
toggleEmojiPicker: () => void;
|
|
1880
|
+
};
|
|
1881
|
+
|
|
1882
|
+
type UseStickerPickerOptions = {
|
|
1883
|
+
activeChannel?: Channel$1 | null;
|
|
1884
|
+
stickerIframeUrl?: string;
|
|
1885
|
+
};
|
|
1886
|
+
declare function useStickerPicker({ activeChannel, stickerIframeUrl, }: UseStickerPickerOptions): {
|
|
1887
|
+
stickerPickerOpen: boolean;
|
|
1888
|
+
toggleStickerPicker: () => void;
|
|
1889
|
+
closeStickerPicker: () => void;
|
|
1890
|
+
handleStickerSend: (stickerUrl: string) => Promise<void>;
|
|
1891
|
+
};
|
|
1892
|
+
|
|
1893
|
+
declare const useChannelCapabilities: () => {
|
|
1894
|
+
isGroupChannel: boolean;
|
|
1895
|
+
isOwner: boolean;
|
|
1896
|
+
isModerator: boolean;
|
|
1897
|
+
isOwnerOrModerator: boolean;
|
|
1898
|
+
hasCapability: (cap: string) => boolean;
|
|
1899
|
+
role: any;
|
|
1900
|
+
capabilities: string[];
|
|
1901
|
+
};
|
|
1902
|
+
|
|
1903
|
+
declare const useChannelMembers: (channel: Channel$1 | null | undefined) => {
|
|
1904
|
+
members: Record<string, unknown>[];
|
|
1905
|
+
memberUpdateCount: number;
|
|
1906
|
+
};
|
|
1907
|
+
declare const useChannelProfile: (channel: Channel$1 | null | undefined) => {
|
|
1908
|
+
channelName: string;
|
|
1909
|
+
channelImage: string | undefined;
|
|
1910
|
+
channelDescription: string | undefined;
|
|
1911
|
+
isPinned: boolean;
|
|
1335
1912
|
};
|
|
1336
1913
|
|
|
1337
1914
|
/**
|
|
1338
1915
|
* Avatar component with image or initial fallback.
|
|
1339
1916
|
*/
|
|
1340
|
-
declare const Avatar:
|
|
1917
|
+
declare const Avatar: React__default.FC<AvatarProps>;
|
|
1341
1918
|
|
|
1342
1919
|
declare function computeDefaultActions(channel: Channel$1, currentUserId?: string, options?: {
|
|
1343
1920
|
onAddTopic?: (channel: Channel$1) => void;
|
|
1344
1921
|
onEditTopic?: (channel: Channel$1) => void;
|
|
1345
1922
|
onToggleCloseTopic?: (channel: Channel$1, isClosed: boolean) => void;
|
|
1923
|
+
onDeleteTopic?: (channel: Channel$1) => void;
|
|
1924
|
+
onTruncateChannel?: (channel: Channel$1) => void;
|
|
1346
1925
|
isBlocked?: boolean;
|
|
1347
1926
|
actionLabels?: ChannelActionLabels;
|
|
1348
1927
|
actionIcons?: ChannelActionIcons;
|
|
1349
1928
|
}): ChannelAction[];
|
|
1350
|
-
declare const DefaultChannelActions:
|
|
1929
|
+
declare const DefaultChannelActions: React__default.FC<ChannelActionsProps>;
|
|
1351
1930
|
|
|
1352
|
-
declare const ChannelItem:
|
|
1353
|
-
declare const
|
|
1354
|
-
|
|
1931
|
+
declare const ChannelItem: React__default.FC<ChannelItemProps>;
|
|
1932
|
+
declare const DefaultPinnedIcon: React__default.MemoExoticComponent<() => react_jsx_runtime.JSX.Element>;
|
|
1933
|
+
type ChannelRowProps = {
|
|
1934
|
+
channel: Channel$1;
|
|
1935
|
+
isActive: boolean;
|
|
1936
|
+
handleSelect: (c: Channel$1) => void;
|
|
1937
|
+
renderChannel?: (c: Channel$1, active: boolean) => React__default.ReactNode;
|
|
1938
|
+
ChannelItemComponent: React__default.ComponentType<ChannelItemProps>;
|
|
1939
|
+
AvatarComponent: React__default.ComponentType<any>;
|
|
1940
|
+
currentUserId?: string;
|
|
1941
|
+
pendingBadgeLabel?: string;
|
|
1942
|
+
blockedBadgeLabel?: string;
|
|
1943
|
+
closedTopicIcon?: React__default.ReactNode;
|
|
1944
|
+
PinnedIconComponent?: React__default.ComponentType;
|
|
1945
|
+
ChannelActionsComponent?: React__default.ComponentType<ChannelActionsProps>;
|
|
1946
|
+
onAddTopic?: (channel: Channel$1) => void;
|
|
1947
|
+
onEditTopic?: (channel: Channel$1) => void;
|
|
1948
|
+
onToggleCloseTopic?: (channel: Channel$1, isClosed: boolean) => void;
|
|
1949
|
+
onDeleteTopic?: (channel: Channel$1) => void;
|
|
1950
|
+
onTruncateChannel?: (channel: Channel$1) => void;
|
|
1951
|
+
hiddenActions?: string[];
|
|
1952
|
+
actionLabels?: ChannelActionLabels;
|
|
1953
|
+
actionIcons?: ChannelActionIcons;
|
|
1954
|
+
isOnline?: boolean;
|
|
1955
|
+
deletedMessageLabel?: React__default.ReactNode;
|
|
1956
|
+
stickerMessageLabel?: React__default.ReactNode;
|
|
1957
|
+
photoMessageLabel?: React__default.ReactNode;
|
|
1958
|
+
videoMessageLabel?: React__default.ReactNode;
|
|
1959
|
+
voiceRecordingMessageLabel?: React__default.ReactNode;
|
|
1960
|
+
fileMessageLabel?: React__default.ReactNode;
|
|
1961
|
+
systemMessageTranslations?: SystemMessageTranslations;
|
|
1962
|
+
signalMessageTranslations?: SignalMessageTranslations;
|
|
1963
|
+
};
|
|
1964
|
+
declare const ChannelRow: React__default.FC<ChannelRowProps>;
|
|
1965
|
+
declare const ChannelList: React__default.FC<ChannelListProps>;
|
|
1966
|
+
|
|
1967
|
+
type FlatTopicGroupItemProps = {
|
|
1968
|
+
channel: Channel$1;
|
|
1969
|
+
isActive: boolean;
|
|
1970
|
+
onDrillDown?: (channel: Channel$1) => void;
|
|
1971
|
+
AvatarComponent: React__default.ComponentType<AvatarProps>;
|
|
1972
|
+
maxVisibleTopics?: number;
|
|
1973
|
+
moreTopicsLabel?: string;
|
|
1974
|
+
/** Label for the general pill (default: 'general') */
|
|
1975
|
+
generalTopicLabel?: string;
|
|
1976
|
+
TopicPillComponent?: React__default.ComponentType<TopicPillProps>;
|
|
1977
|
+
PinnedIconComponent?: React__default.ComponentType;
|
|
1978
|
+
ChannelActionsComponent?: React__default.ComponentType<ChannelActionsProps>;
|
|
1979
|
+
onAddTopic?: (channel: Channel$1) => void;
|
|
1980
|
+
onTruncateChannel?: (channel: Channel$1) => void;
|
|
1981
|
+
hiddenActions?: string[];
|
|
1982
|
+
actionLabels?: ChannelActionLabels;
|
|
1983
|
+
actionIcons?: ChannelActionIcons;
|
|
1984
|
+
deletedMessageLabel?: React__default.ReactNode;
|
|
1985
|
+
stickerMessageLabel?: React__default.ReactNode;
|
|
1986
|
+
photoMessageLabel?: React__default.ReactNode;
|
|
1987
|
+
videoMessageLabel?: React__default.ReactNode;
|
|
1988
|
+
voiceRecordingMessageLabel?: React__default.ReactNode;
|
|
1989
|
+
fileMessageLabel?: React__default.ReactNode;
|
|
1990
|
+
systemMessageTranslations?: SystemMessageTranslations;
|
|
1991
|
+
signalMessageTranslations?: SignalMessageTranslations;
|
|
1992
|
+
};
|
|
1993
|
+
declare const FlatTopicGroupItem: React__default.FC<FlatTopicGroupItemProps>;
|
|
1994
|
+
|
|
1995
|
+
declare const TopicList: React__default.FC<TopicListProps>;
|
|
1355
1996
|
|
|
1356
1997
|
/**
|
|
1357
1998
|
* Channel wrapper component.
|
|
@@ -1361,7 +2002,7 @@ declare const ChannelList: React$1.FC<ChannelListProps>;
|
|
|
1361
2002
|
* Receives `{ channel, name, image }` as props.
|
|
1362
2003
|
* - `EmptyStateIndicator` — custom component when no channel is selected.
|
|
1363
2004
|
*/
|
|
1364
|
-
declare const Channel:
|
|
2005
|
+
declare const Channel: React__default.FC<ChannelProps>;
|
|
1365
2006
|
|
|
1366
2007
|
/**
|
|
1367
2008
|
* ChannelHeader displays the active channel's avatar and name.
|
|
@@ -1377,43 +2018,29 @@ declare const Channel: React$1.FC<ChannelProps>;
|
|
|
1377
2018
|
*
|
|
1378
2019
|
* For a fully custom header, use `Channel`'s `HeaderComponent` prop instead.
|
|
1379
2020
|
*/
|
|
1380
|
-
declare const ChannelHeader:
|
|
2021
|
+
declare const ChannelHeader: React__default.FC<ChannelHeaderProps>;
|
|
1381
2022
|
|
|
1382
|
-
declare const VirtualMessageList:
|
|
2023
|
+
declare const VirtualMessageList: React__default.FC<MessageListProps>;
|
|
1383
2024
|
|
|
1384
|
-
declare const PinnedMessages:
|
|
2025
|
+
declare const PinnedMessages: React__default.FC<PinnedMessagesProps>;
|
|
1385
2026
|
|
|
1386
|
-
declare const MessageItem:
|
|
1387
|
-
declare const SystemMessageItem:
|
|
2027
|
+
declare const MessageItem: React__default.FC<MessageItemProps>;
|
|
2028
|
+
declare const SystemMessageItem: React__default.FC<SystemMessageItemProps>;
|
|
1388
2029
|
|
|
1389
|
-
declare const MessageActionsBox:
|
|
2030
|
+
declare const MessageActionsBox: React__default.FC<MessageActionsBoxProps>;
|
|
1390
2031
|
|
|
1391
2032
|
/** Dispatch a global event to close all open dropdowns */
|
|
1392
2033
|
declare const closeAllDropdowns: () => void;
|
|
1393
|
-
interface DropdownProps {
|
|
1394
|
-
/** Whether the dropdown is open */
|
|
1395
|
-
isOpen: boolean;
|
|
1396
|
-
/** Rect from getBoundingClientRect() of the anchor element */
|
|
1397
|
-
anchorRect: DOMRect | null;
|
|
1398
|
-
/** Callback when dropdown requests to close (e.g., click outside, scroll, Escape) */
|
|
1399
|
-
onClose: () => void;
|
|
1400
|
-
/** Dropdown menu content */
|
|
1401
|
-
children: React$1.ReactNode;
|
|
1402
|
-
/** Horizontal alignment relative to the anchor. Default: 'left' */
|
|
1403
|
-
align?: 'left' | 'right';
|
|
1404
|
-
/** Optional custom CSS class for the container */
|
|
1405
|
-
className?: string;
|
|
1406
|
-
/** Optional custom CSS style for the container */
|
|
1407
|
-
style?: React$1.CSSProperties;
|
|
1408
|
-
}
|
|
1409
|
-
declare const Dropdown: React$1.FC<DropdownProps>;
|
|
1410
2034
|
|
|
1411
|
-
declare const
|
|
2035
|
+
declare const Dropdown: React__default.FC<DropdownProps>;
|
|
1412
2036
|
|
|
1413
|
-
declare const
|
|
2037
|
+
declare const MessageReactions: React__default.FC<MessageReactionsProps>;
|
|
2038
|
+
|
|
2039
|
+
declare const MessageQuickReactions: React__default.FC<{
|
|
1414
2040
|
message: FormatMessageResponse;
|
|
1415
2041
|
isOwnMessage: boolean;
|
|
1416
2042
|
disabled?: boolean;
|
|
2043
|
+
onAddReactionClick?: (e: React__default.MouseEvent, messageId: string) => void;
|
|
1417
2044
|
}>;
|
|
1418
2045
|
|
|
1419
2046
|
type MessageActionList = {
|
|
@@ -1435,6 +2062,10 @@ type MessageActionList = {
|
|
|
1435
2062
|
};
|
|
1436
2063
|
declare const useMessageActions: (message: FormatMessageResponse, isOwnMessage: boolean) => MessageActionList;
|
|
1437
2064
|
|
|
2065
|
+
/**
|
|
2066
|
+
* Remove Vietnamese diacritics (accents) from a string.
|
|
2067
|
+
*/
|
|
2068
|
+
declare function removeAccents(str: string): string;
|
|
1438
2069
|
/**
|
|
1439
2070
|
* Format a Date or date-string to a short time string (HH:MM).
|
|
1440
2071
|
*/
|
|
@@ -1445,8 +2076,10 @@ declare function formatTime(date: Date | string | undefined): string;
|
|
|
1445
2076
|
declare function getDateKey(date: Date | string | undefined): string;
|
|
1446
2077
|
/**
|
|
1447
2078
|
* Format a date into a human-friendly label (Today / Yesterday / full date).
|
|
2079
|
+
* When `locale` is provided, "Today" / "Yesterday" are localised via
|
|
2080
|
+
* `Intl.RelativeTimeFormat` and the full date uses that locale for formatting.
|
|
1448
2081
|
*/
|
|
1449
|
-
declare function formatDateLabel(date: Date | string | undefined): string;
|
|
2082
|
+
declare function formatDateLabel(date: Date | string | undefined, locale?: string): string;
|
|
1450
2083
|
/**
|
|
1451
2084
|
* Get the user id from a message, checking multiple possible sources.
|
|
1452
2085
|
*/
|
|
@@ -1459,6 +2092,53 @@ declare function replaceMentionsForPreview(text: string, message: FormatMessageR
|
|
|
1459
2092
|
mentioned_users?: string[];
|
|
1460
2093
|
mentioned_all?: boolean;
|
|
1461
2094
|
}, userMap: Record<string, string>, renderWrapper?: (userId: string, name: string) => string): string;
|
|
2095
|
+
/**
|
|
2096
|
+
* Common helper to build a dictionary of User ID -> Display Name
|
|
2097
|
+
* from the channel state, used for rendering Mentions and System logs.
|
|
2098
|
+
*/
|
|
2099
|
+
declare function buildUserMap(channelState: any, extraUsers?: Record<string, any>): Record<string, string>;
|
|
2100
|
+
/**
|
|
2101
|
+
* Format a date string into a relative label:
|
|
2102
|
+
* "Today", "Yesterday", "Xd ago", or "Mon DD" / "Mon DD, YYYY".
|
|
2103
|
+
*/
|
|
2104
|
+
declare function formatRelativeDate(dateStr: string): string;
|
|
2105
|
+
/**
|
|
2106
|
+
* Get a human-readable preview string for the last message,
|
|
2107
|
+
* handling regular, system, and signal message types.
|
|
2108
|
+
*/
|
|
2109
|
+
declare function getLastMessagePreview(channel: Channel$1, myUserId?: string, options?: {
|
|
2110
|
+
deletedMessageLabel?: React__default.ReactNode;
|
|
2111
|
+
stickerMessageLabel?: React__default.ReactNode;
|
|
2112
|
+
photoMessageLabel?: React__default.ReactNode;
|
|
2113
|
+
videoMessageLabel?: React__default.ReactNode;
|
|
2114
|
+
voiceRecordingMessageLabel?: React__default.ReactNode;
|
|
2115
|
+
fileMessageLabel?: React__default.ReactNode;
|
|
2116
|
+
systemMessageTranslations?: SystemMessageTranslations;
|
|
2117
|
+
signalMessageTranslations?: SignalMessageTranslations;
|
|
2118
|
+
}): {
|
|
2119
|
+
text: React__default.ReactNode;
|
|
2120
|
+
user: string;
|
|
2121
|
+
timestamp?: string | Date;
|
|
2122
|
+
};
|
|
2123
|
+
/**
|
|
2124
|
+
* Count the number of words in a string.
|
|
2125
|
+
* A word is defined as a non-empty sequence of characters separated by whitespace.
|
|
2126
|
+
*/
|
|
2127
|
+
declare function countWords(str: string): number;
|
|
2128
|
+
|
|
2129
|
+
/**
|
|
2130
|
+
* Hash-based avatar color palette.
|
|
2131
|
+
*
|
|
2132
|
+
* Each user/channel is assigned a deterministic gradient based on
|
|
2133
|
+
* the hash of their name. This provides visual variety in the
|
|
2134
|
+
* channel list and improves readability over a single brand-color
|
|
2135
|
+
* fallback.
|
|
2136
|
+
*/
|
|
2137
|
+
/**
|
|
2138
|
+
* Returns a CSS `linear-gradient(...)` string for a given name.
|
|
2139
|
+
* The same name always produces the same gradient (deterministic).
|
|
2140
|
+
*/
|
|
2141
|
+
declare function getAvatarGradient(name?: string): string;
|
|
1462
2142
|
|
|
1463
2143
|
/** Channel supports group features: roles, capabilities, settings, topics, edit, delete */
|
|
1464
2144
|
declare function isGroupChannel(channel: Channel$1 | null | undefined): boolean;
|
|
@@ -1532,46 +2212,65 @@ declare function isVoiceRecordingAttachment(attachment: any): boolean;
|
|
|
1532
2212
|
declare function isLinkPreviewAttachment(attachment: any): boolean;
|
|
1533
2213
|
declare function isImage(attachment: any): boolean;
|
|
1534
2214
|
declare function isVideo(attachment: any): boolean;
|
|
2215
|
+
declare const MESSAGE_DISPLAY_TYPES: {
|
|
2216
|
+
readonly NORMAL: "normal";
|
|
2217
|
+
readonly DELETED: "deleted";
|
|
2218
|
+
};
|
|
2219
|
+
type MessageDisplayType = (typeof MESSAGE_DISPLAY_TYPES)[keyof typeof MESSAGE_DISPLAY_TYPES] | string;
|
|
2220
|
+
/** Check if a message was deleted for current user (display_type === 'deleted') */
|
|
2221
|
+
declare function isDeletedDisplayMessage(message: any): boolean;
|
|
1535
2222
|
|
|
1536
|
-
declare const MessageAttachment:
|
|
1537
|
-
declare const AttachmentList:
|
|
2223
|
+
declare const MessageAttachment: React__default.FC<AttachmentProps>;
|
|
2224
|
+
declare const AttachmentList: React__default.FC<{
|
|
1538
2225
|
attachments?: Attachment[];
|
|
1539
2226
|
}>;
|
|
1540
2227
|
/** Regular message: text with @mentions + attachments */
|
|
1541
|
-
declare const RegularMessage:
|
|
2228
|
+
declare const RegularMessage: React__default.FC<MessageRendererProps>;
|
|
1542
2229
|
/** System message: centered info text, parsed from raw format */
|
|
1543
|
-
declare const SystemMessage:
|
|
2230
|
+
declare const SystemMessage: React__default.FC<MessageRendererProps>;
|
|
1544
2231
|
/** Signal message: call events */
|
|
1545
|
-
declare const SignalMessage:
|
|
2232
|
+
declare const SignalMessage: React__default.FC<MessageRendererProps>;
|
|
1546
2233
|
/** Poll message */
|
|
1547
|
-
declare const PollMessage:
|
|
2234
|
+
declare const PollMessage: React__default.FC<MessageRendererProps>;
|
|
1548
2235
|
/** Sticker message */
|
|
1549
|
-
declare const StickerMessage:
|
|
2236
|
+
declare const StickerMessage: React__default.FC<MessageRendererProps>;
|
|
1550
2237
|
/** Error message */
|
|
1551
|
-
declare const ErrorMessage:
|
|
2238
|
+
declare const ErrorMessage: React__default.FC<MessageRendererProps>;
|
|
1552
2239
|
/**
|
|
1553
2240
|
* Map from MessageLabel → component.
|
|
1554
2241
|
* Consumer can override individual renderers via the `messageRenderers` prop.
|
|
1555
2242
|
*/
|
|
1556
|
-
declare const defaultMessageRenderers: Record<MessageLabel,
|
|
2243
|
+
declare const defaultMessageRenderers: Record<MessageLabel, React__default.ComponentType<MessageRendererProps>>;
|
|
1557
2244
|
|
|
1558
2245
|
/**
|
|
1559
2246
|
* MediaLightbox – full-screen overlay for viewing images & videos.
|
|
1560
2247
|
* Supports prev/next navigation, keyboard controls, and image zoom.
|
|
1561
2248
|
* Renders via React portal into document.body.
|
|
1562
2249
|
*/
|
|
1563
|
-
declare const MediaLightbox:
|
|
2250
|
+
declare const MediaLightbox: React__default.FC<MediaLightboxProps>;
|
|
1564
2251
|
|
|
1565
|
-
declare const MessageInput:
|
|
2252
|
+
declare const MessageInput: React__default.FC<MessageInputProps>;
|
|
1566
2253
|
|
|
1567
2254
|
/**
|
|
1568
2255
|
* FilesPreview — renders selected files with thumbnails and remove buttons.
|
|
1569
2256
|
* Shown above the text input area in MessageInput.
|
|
1570
2257
|
*/
|
|
1571
|
-
declare const FilesPreview:
|
|
2258
|
+
declare const FilesPreview: React__default.FC<FilesPreviewProps>;
|
|
2259
|
+
|
|
2260
|
+
declare const MentionSuggestions: React__default.FC<MentionSuggestionsProps>;
|
|
1572
2261
|
|
|
1573
|
-
declare const
|
|
2262
|
+
declare const EditPreview: React__default.FC<{
|
|
2263
|
+
message: FormatMessageResponse;
|
|
2264
|
+
onDismiss: () => void;
|
|
2265
|
+
editingMessageLabel?: string;
|
|
2266
|
+
}>;
|
|
1574
2267
|
|
|
2268
|
+
declare const PreviewOverlay: React__default.FC<PreviewOverlayProps>;
|
|
2269
|
+
|
|
2270
|
+
/**
|
|
2271
|
+
* Returns the raw HTML string for a mention span, useful for initializing contenteditable divs.
|
|
2272
|
+
*/
|
|
2273
|
+
declare function getMentionHtml(userId: string, displayName: string): string;
|
|
1575
2274
|
declare function useMentions({ members, currentUserId, editableRef, }: UseMentionsOptions): UseMentionsReturn;
|
|
1576
2275
|
|
|
1577
2276
|
type UseScrollToMessageOptions = {
|
|
@@ -1626,22 +2325,45 @@ type UseChannelMessagesOptions = {
|
|
|
1626
2325
|
isAtBottomRef: React.MutableRefObject<boolean>;
|
|
1627
2326
|
/** Called to reset load-more state when channel switches */
|
|
1628
2327
|
onChannelSwitch?: () => void;
|
|
2328
|
+
/** Whether to include hidden (deleted) messages in the initial channel query */
|
|
2329
|
+
includeHiddenMessages?: boolean;
|
|
2330
|
+
/** Ref to the message list container for smooth opacity transitions */
|
|
2331
|
+
containerRef?: React.RefObject<HTMLDivElement>;
|
|
1629
2332
|
};
|
|
2333
|
+
declare const markChannelAsFullyQueried: (cid: string) => Set<string>;
|
|
1630
2334
|
/**
|
|
1631
2335
|
* Subscribes to channel message events and handles:
|
|
1632
2336
|
* - message.new → sync + scroll to bottom
|
|
1633
2337
|
* - message.updated / message.deleted → sync only
|
|
1634
2338
|
* - Channel switch → reset state + scroll to bottom
|
|
1635
2339
|
*/
|
|
1636
|
-
declare function useChannelMessages({ scrollToBottom, jumpingRef, isAtBottomRef, onChannelSwitch, }: UseChannelMessagesOptions): void;
|
|
2340
|
+
declare function useChannelMessages({ scrollToBottom, jumpingRef, isAtBottomRef, onChannelSwitch, includeHiddenMessages, containerRef, }: UseChannelMessagesOptions): void;
|
|
2341
|
+
|
|
2342
|
+
declare function useForwardMessage(message: FormatMessageResponse, onDismiss: () => void): {
|
|
2343
|
+
search: string;
|
|
2344
|
+
setSearch: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
2345
|
+
selectedChannels: Set<string>;
|
|
2346
|
+
toggleChannel: (channel: Channel$1) => void;
|
|
2347
|
+
sending: boolean;
|
|
2348
|
+
results: {
|
|
2349
|
+
success: string[];
|
|
2350
|
+
failed: string[];
|
|
2351
|
+
} | null;
|
|
2352
|
+
setResults: React$1.Dispatch<React$1.SetStateAction<{
|
|
2353
|
+
success: string[];
|
|
2354
|
+
failed: string[];
|
|
2355
|
+
} | null>>;
|
|
2356
|
+
filteredChannels: Channel$1<_ermis_network_ermis_chat_sdk.DefaultGenerics>[];
|
|
2357
|
+
handleSend: () => Promise<void>;
|
|
2358
|
+
};
|
|
1637
2359
|
|
|
1638
|
-
declare const QuotedMessagePreview:
|
|
2360
|
+
declare const QuotedMessagePreview: React__default.FC<QuotedMessagePreviewProps>;
|
|
1639
2361
|
|
|
1640
|
-
declare const ReplyPreview:
|
|
2362
|
+
declare const ReplyPreview: React__default.FC<ReplyPreviewProps>;
|
|
1641
2363
|
|
|
1642
|
-
declare const ForwardMessageModal:
|
|
2364
|
+
declare const ForwardMessageModal: React__default.FC<ForwardMessageModalProps>;
|
|
1643
2365
|
|
|
1644
|
-
declare const TopicModal:
|
|
2366
|
+
declare const TopicModal: React__default.FC<TopicModalProps>;
|
|
1645
2367
|
|
|
1646
2368
|
type TypingUser = {
|
|
1647
2369
|
id: string;
|
|
@@ -1659,48 +2381,90 @@ declare function useTypingIndicator(): {
|
|
|
1659
2381
|
};
|
|
1660
2382
|
|
|
1661
2383
|
type TypingIndicatorProps = {
|
|
1662
|
-
/** Custom render function for the typing text */
|
|
1663
|
-
|
|
2384
|
+
/** Custom render function for the typing text (I18n) */
|
|
2385
|
+
typingIndicatorLabel?: (users: TypingUser[]) => string;
|
|
2386
|
+
/** Custom render function for the typing text (JSX) */
|
|
2387
|
+
renderText?: (users: TypingUser[]) => React__default.ReactNode;
|
|
1664
2388
|
};
|
|
1665
2389
|
/**
|
|
1666
2390
|
* Displays a "X is typing..." indicator below the message list.
|
|
1667
2391
|
* Automatically subscribes to typing events via the useTypingIndicator hook.
|
|
1668
2392
|
*/
|
|
1669
|
-
declare const TypingIndicator:
|
|
2393
|
+
declare const TypingIndicator: React__default.FC<TypingIndicatorProps>;
|
|
1670
2394
|
|
|
1671
|
-
declare const DefaultChannelInfoHeader:
|
|
1672
|
-
declare const DefaultChannelInfoCover:
|
|
1673
|
-
declare const DefaultChannelInfoActions:
|
|
1674
|
-
declare const ChannelInfo:
|
|
2395
|
+
declare const DefaultChannelInfoHeader: React__default.FC<ChannelInfoHeaderProps>;
|
|
2396
|
+
declare const DefaultChannelInfoCover: React__default.FC<ChannelInfoCoverProps>;
|
|
2397
|
+
declare const DefaultChannelInfoActions: React__default.FC<ChannelInfoActionsProps>;
|
|
2398
|
+
declare const ChannelInfo: React__default.FC<ChannelInfoProps>;
|
|
1675
2399
|
|
|
1676
|
-
declare const DefaultChannelInfoTabs:
|
|
2400
|
+
declare const DefaultChannelInfoTabs: React__default.FC<ChannelInfoTabsProps>;
|
|
1677
2401
|
|
|
1678
|
-
declare const
|
|
2402
|
+
declare const HighlightedText: React__default.FC<{
|
|
2403
|
+
text: string;
|
|
2404
|
+
term: string;
|
|
2405
|
+
}>;
|
|
2406
|
+
declare const MessageSearchPanel: React__default.FC<MessageSearchPanelProps>;
|
|
1679
2407
|
|
|
1680
|
-
type
|
|
1681
|
-
|
|
2408
|
+
type UseMessageSearchProps = {
|
|
2409
|
+
channel: Channel$1;
|
|
1682
2410
|
isOpen: boolean;
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
2411
|
+
debounceMs?: number;
|
|
2412
|
+
};
|
|
2413
|
+
declare const useMessageSearch: ({ channel, isOpen, debounceMs }: UseMessageSearchProps) => {
|
|
2414
|
+
query: string;
|
|
2415
|
+
setQuery: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
2416
|
+
results: SearchResultMessage[];
|
|
2417
|
+
loading: boolean;
|
|
2418
|
+
hasMore: boolean;
|
|
2419
|
+
loadingMore: boolean;
|
|
2420
|
+
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
2421
|
+
handleScroll: (e: React.UIEvent<HTMLElement>) => void;
|
|
2422
|
+
resetSearch: () => void;
|
|
2423
|
+
userMaps: {
|
|
2424
|
+
original: Record<string, string>;
|
|
2425
|
+
lower: Record<string, string>;
|
|
2426
|
+
};
|
|
1693
2427
|
};
|
|
2428
|
+
|
|
2429
|
+
declare const ChannelSettingsPanel: React__default.FC<ChannelSettingsPanelProps>;
|
|
2430
|
+
|
|
2431
|
+
interface UseChannelSettingsOptions {
|
|
2432
|
+
channel: Channel$1 | undefined;
|
|
2433
|
+
isOpen?: boolean;
|
|
2434
|
+
onClose?: () => void;
|
|
2435
|
+
currentUserRole?: string;
|
|
2436
|
+
}
|
|
2437
|
+
declare const useChannelSettings: ({ channel, isOpen, onClose, currentUserRole }: UseChannelSettingsOptions) => {
|
|
2438
|
+
slowMode: number;
|
|
2439
|
+
setSlowMode: React$1.Dispatch<React$1.SetStateAction<number>>;
|
|
2440
|
+
topicsEnabled: boolean;
|
|
2441
|
+
setTopicsEnabled: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
2442
|
+
capabilities: Record<string, boolean>;
|
|
2443
|
+
toggleCapability: (key: string) => void;
|
|
2444
|
+
keywords: string[];
|
|
2445
|
+
newKeyword: string;
|
|
2446
|
+
setNewKeyword: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
2447
|
+
handleAddNewKeyword: () => void;
|
|
2448
|
+
handleRemoveKeyword: (kw: string) => void;
|
|
2449
|
+
isSaving: boolean;
|
|
2450
|
+
error: string | null;
|
|
2451
|
+
isDirty: boolean;
|
|
2452
|
+
isOwner: boolean;
|
|
2453
|
+
handleSave: () => Promise<void>;
|
|
2454
|
+
};
|
|
2455
|
+
|
|
2456
|
+
declare const Modal: React__default.FC<ModalProps>;
|
|
2457
|
+
|
|
1694
2458
|
/**
|
|
1695
2459
|
* Reusable sliding panel component.
|
|
1696
2460
|
* Slides in from the right to overlay itself on whatever container it's placed in.
|
|
1697
2461
|
* Use it like a Modal but inside a sidebar — call `isOpen` to show/hide.
|
|
1698
2462
|
*/
|
|
1699
|
-
declare const Panel:
|
|
2463
|
+
declare const Panel: React__default.FC<PanelProps>;
|
|
1700
2464
|
|
|
1701
|
-
declare const UserPicker:
|
|
2465
|
+
declare const UserPicker: React__default.FC<UserPickerProps>;
|
|
1702
2466
|
|
|
1703
|
-
declare const CreateChannelModal:
|
|
2467
|
+
declare const CreateChannelModal: React__default.FC<CreateChannelModalProps>;
|
|
1704
2468
|
|
|
1705
2469
|
type CallContextValue = {
|
|
1706
2470
|
callNode: ErmisCallNode | null;
|
|
@@ -1733,13 +2497,17 @@ type CallContextValue = {
|
|
|
1733
2497
|
isRemoteVideoMuted: boolean;
|
|
1734
2498
|
upgradeCall: () => Promise<void>;
|
|
1735
2499
|
callDuration: number;
|
|
2500
|
+
isAccepting: boolean;
|
|
2501
|
+
isRejecting: boolean;
|
|
2502
|
+
isEnding: boolean;
|
|
2503
|
+
resetCall: () => void;
|
|
1736
2504
|
};
|
|
1737
|
-
declare const ErmisCallContext:
|
|
2505
|
+
declare const ErmisCallContext: React__default.Context<CallContextValue | undefined>;
|
|
1738
2506
|
|
|
1739
2507
|
declare const useCallContext: () => CallContextValue;
|
|
1740
2508
|
|
|
1741
|
-
declare const ErmisCallProvider:
|
|
2509
|
+
declare const ErmisCallProvider: React__default.FC<ErmisCallProviderProps>;
|
|
1742
2510
|
|
|
1743
|
-
declare const ErmisCallUI:
|
|
2511
|
+
declare const ErmisCallUI: React__default.FC<ErmisCallUIProps>;
|
|
1744
2512
|
|
|
1745
|
-
export { ATTACHMENT_TYPES, type AddMemberButtonProps, type AddMemberModalProps, type AddMemberUserItemProps, type AttachButtonProps, type AttachmentItem, AttachmentList, type AttachmentProps, type AttachmentType, Avatar, type AvatarProps, CHANNEL_ROLES, type CallContextValue, Channel, type ChannelAction, type ChannelActionsProps, ChannelHeader, type ChannelHeaderData, type ChannelHeaderProps, ChannelInfo, type ChannelInfoActionsProps, type ChannelInfoCoverProps, type ChannelInfoEmptyStateProps, type ChannelInfoFileItemProps, type ChannelInfoHeaderProps, type ChannelInfoLinkItemProps, type ChannelInfoMediaItemProps, type ChannelInfoMemberItemProps, type ChannelInfoProps, type ChannelInfoTabsProps, ChannelItem, type ChannelItemProps, ChannelList, type ChannelListProps, type ChannelProps, type ChannelRole,
|
|
2513
|
+
export { ATTACHMENT_TYPES, type AddMemberButtonProps, type AddMemberModalProps, type AddMemberUserItemProps, type AttachButtonProps, type AttachmentItem, AttachmentList, type AttachmentProps, type AttachmentType, Avatar, type AvatarProps, CHANNEL_ROLES, type CallContextValue, Channel, type ChannelAction, type ChannelActionsProps, ChannelHeader, type ChannelHeaderData, type ChannelHeaderProps, ChannelInfo, type ChannelInfoActionsProps, type ChannelInfoCoverProps, type ChannelInfoEmptyStateProps, type ChannelInfoFileItemProps, type ChannelInfoHeaderProps, type ChannelInfoLinkItemProps, type ChannelInfoMediaItemProps, type ChannelInfoMemberItemProps, type ChannelInfoProps, type ChannelInfoTabHeaderProps, type ChannelInfoTabsProps, ChannelItem, type ChannelItemProps, ChannelList, type ChannelListProps, type ChannelProps, type ChannelRole, ChannelRow, ChannelSettingsPanel, type ChannelSettingsPanelProps, type ChatContextValue, ChatProvider, type ChatProviderProps, CreateChannelModal, type CreateChannelModalProps, type DateSeparatorProps, DefaultChannelActions, DefaultChannelInfoActions, DefaultChannelInfoCover, DefaultChannelInfoHeader, DefaultChannelInfoTabs, DefaultPinnedIcon, Dropdown, type DropdownProps, type EditChannelData, type EditChannelModalProps, EditPreview, type EmojiButtonProps, type EmojiPickerProps, type ErmisCallConnectedAudioProps, type ErmisCallConnectedVideoProps, ErmisCallContext, type ErmisCallControlsBarProps, type ErmisCallErrorProps, ErmisCallProvider, type ErmisCallProviderProps, type ErmisCallRingingProps, ErmisCallUI, type ErmisCallUIProps, ErrorMessage, type FilePreviewItem, FilesPreview, type FilesPreviewProps, FlatTopicGroupItem, type ForwardChannelItemProps, ForwardMessageModal, type ForwardMessageModalProps, HighlightedText, type JumpToLatestProps, type LatestReaction, MESSAGE_DISPLAY_TYPES, MESSAGE_TYPES, MediaLightbox, type MediaLightboxItem, type MediaLightboxProps, type MediaTab, type MentionMember, type MentionPayload, MentionSuggestions, type MentionSuggestionsProps, MessageActionsBox, type MessageActionsBoxProps, MessageAttachment, type MessageBubbleProps, type MessageDisplayType, MessageInput, type MessageInputProps, MessageItem, type MessageItemProps, type MessageListProps, MessageQuickReactions, MessageReactions, type MessageReactionsProps, type MessageRendererProps, MessageSearchPanel, type MessageSearchPanelProps, type MessageType, Modal, type ModalProps, type OnlineStatus, Panel, type PinnedMessageItemProps, PinnedMessages, type PinnedMessagesProps, PollMessage, PreviewOverlay, QuotedMessagePreview, type QuotedMessagePreviewProps, type ReactionUser, RegularMessage, ReplyPreview, type ReplyPreviewProps, type SendButtonProps, SignalMessage, StickerMessage, SystemMessage, SystemMessageItem, type SystemMessageItemProps, type Theme, TopicList, type TopicListProps, TopicModal, type TopicModalProps, type TopicPillProps, TypingIndicator, type TypingIndicatorProps, type TypingUser, type UseChannelMessagesOptions, type UseChannelReturn, type UseLoadMessagesOptions, type UseLoadMessagesReturn, type UseMentionsOptions, type UseMentionsReturn, type UseScrollToMessageOptions, type UseScrollToMessageReturn, type UseStickerPickerOptions, UserPicker, type UserPickerItemProps, type UserPickerProps, type UserPickerSelectedBoxProps, type UserPickerUser, VirtualMessageList, buildUserMap, canBanTargetMember, canDemoteTargetMember, canManageChannel, canPromoteTargetMember, canRemoveTargetMember, closeAllDropdowns, computeDefaultActions, countWords, dedupMessages, defaultMessageRenderers, formatDateLabel, formatRelativeDate, formatTime, getAvatarGradient, getDateKey, getLastMessagePreview, getMentionHtml, getMessageUserId, hasTopicsEnabled, isDeletedDisplayMessage, isDirectChannel, isFriendChannel, isGeneralProxy, isGroupChannel, isImage, isImageAttachment, isLinkPreviewAttachment, isOwnerMember, isPendingMember, isPublicGroupChannel, isRegularMessage, isSignalMessage, isSkippedMember, isStickerMessage, isSystemMessage, isTopicChannel, isVideo, isVideoAttachment, isVoiceRecordingAttachment, markChannelAsFullyQueried, removeAccents, replaceMentionsForPreview, supportsBlocking, useBannedState, useBlockedState, useCallContext, useChannel, useChannelCapabilities, useChannelListUpdates, useChannelMembers, useChannelMessages, useChannelProfile, useChannelRowUpdates, useChannelSettings, useChatClient, useChatUser, useContactChannels, useContactCount, useDragAndDrop, useEmojiPicker, useFileUpload, useForwardMessage, useInviteChannels, useInviteCount, useLoadMessages, useMentions, useMessageActions, useMessageSearch, useMessageSend, useOnlineStatus, useOnlineUsers, usePendingState, usePreviewState, useScrollToMessage, useStickerPicker, useTopicGroupUpdates, useTypingIndicator };
|