@cometchat/chat-uikit-react 6.0.6 → 6.1.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/assets/audio_filter_icon.svg +3 -0
- package/dist/assets/chats_filter_icon.svg +1 -0
- package/dist/assets/file_filter_icon.svg +4 -0
- package/dist/assets/group_filter_icon.svg +3 -0
- package/dist/assets/link_filter_icon.svg +3 -0
- package/dist/assets/link_icon_2x.svg +3 -0
- package/dist/assets/messages_filter_icon.svg +1 -0
- package/dist/assets/photo_filter_icon.svg +3 -0
- package/dist/assets/search_message_icon.svg +14 -0
- package/dist/assets/unread_filter_icon.svg +7 -0
- package/dist/assets/video_filter_icon.svg +3 -0
- package/dist/index.d.ts +493 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/CometChatActionSheet.css +1 -4
- package/dist/styles/CometChatChangeScope.css +1 -4
- package/dist/styles/CometChatConversations.css +16 -1
- package/dist/styles/CometChatEmojiKeyboard.css +1 -6
- package/dist/styles/CometChatGroupMembers.css +7 -2
- package/dist/styles/CometChatList.css +12 -3
- package/dist/styles/CometChatMessageComposer.css +34 -1
- package/dist/styles/CometChatMessageHeader.css +55 -12
- package/dist/styles/CometChatMessageInformation.css +7 -7
- package/dist/styles/CometChatMessageList.css +42 -13
- package/dist/styles/CometChatReactionList.css +0 -6
- package/dist/styles/CometChatSearch.css +948 -0
- package/dist/styles/CometChatThreadHeader.css +18 -3
- package/dist/styles/StickersKeyboard.css +0 -20
- package/dist/styles/components/CometChatActionSheet.css +1 -4
- package/dist/styles/components/CometChatChangeScope.css +1 -4
- package/dist/styles/components/CometChatConversations.css +16 -1
- package/dist/styles/components/CometChatEmojiKeyboard.css +1 -6
- package/dist/styles/components/CometChatGroupMembers.css +7 -2
- package/dist/styles/components/CometChatList.css +12 -3
- package/dist/styles/components/CometChatMessageComposer.css +34 -1
- package/dist/styles/components/CometChatMessageHeader.css +55 -12
- package/dist/styles/components/CometChatMessageInformation.css +7 -7
- package/dist/styles/components/CometChatMessageList.css +42 -13
- package/dist/styles/components/CometChatReactionList.css +0 -6
- package/dist/styles/components/CometChatSearch.css +948 -0
- package/dist/styles/components/CometChatThreadHeader.css +18 -3
- package/dist/styles/components/StickersKeyboard.css +0 -20
- package/dist/styles/components/index.css +5 -0
- package/dist/styles/index.css +5 -0
- package/dist/types/Enums/Enums.d.ts +37 -0
- package/dist/types/components/BaseComponents/CometChatContextMenu/CometChatContextMenu.d.ts +1 -0
- package/dist/types/components/BaseComponents/CometChatList/CometChatList.d.ts +29 -4
- package/dist/types/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +5 -0
- package/dist/types/components/CometChatConversations/CometChatConversations.d.ts +18 -0
- package/dist/types/components/CometChatGroupMembers/CometChatGroupMembers.d.ts +5 -0
- package/dist/types/components/CometChatGroups/CometChatGroups.d.ts +5 -0
- package/dist/types/components/CometChatMessageComposer/CometChatMessageComposer.d.ts +5 -0
- package/dist/types/components/CometChatMessageHeader/CometChatMessageHeader.d.ts +15 -0
- package/dist/types/components/CometChatMessageInformation/CometChatMessageInformation.d.ts +5 -0
- package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +11 -0
- package/dist/types/components/CometChatMessageList/useCometChatMessageList.d.ts +1 -1
- package/dist/types/components/CometChatSearch/CometChatSearch.d.ts +240 -0
- package/dist/types/components/CometChatSearch/SearchConversationsManager.d.ts +50 -0
- package/dist/types/components/CometChatSearch/useCometChatSearchConversationsList.d.ts +207 -0
- package/dist/types/components/CometChatSearch/useCometChatSearchMessagesList.d.ts +127 -0
- package/dist/types/components/CometChatThreadHeader/CometChatThreadHeader.d.ts +13 -0
- package/dist/types/components/CometChatUserMemberWrapper/CometChatUserMemberWrapper.d.ts +48 -0
- package/dist/types/components/CometChatUsers/CometChatUsers.d.ts +6 -0
- package/dist/types/formatters/CometChatFormatters/CometChatTextHighlightFormatter/CometChatTextHighlightFormatter.d.ts +26 -0
- package/dist/types/formatters/index.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/modals/CometChatSearchFilterOption.d.ts +34 -0
- package/dist/types/utils/SearchUtils.d.ts +30 -0
- package/dist/types/utils/util.d.ts +7 -0
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -288,18 +288,103 @@ declare enum MentionsVisibility {
|
|
|
288
288
|
groupConversationOnly = 1,
|
|
289
289
|
both = 2
|
|
290
290
|
}
|
|
291
|
+
/**
|
|
292
|
+
* Specifies the scope of the search functionality.
|
|
293
|
+
*
|
|
294
|
+
* @remarks
|
|
295
|
+
* - `Conversations`: Limits the search to conversations only.
|
|
296
|
+
* - `Messages`: Limits the search to messages only.
|
|
297
|
+
*
|
|
298
|
+
*/
|
|
299
|
+
declare enum CometChatSearchScope {
|
|
300
|
+
Conversations = "conversations",
|
|
301
|
+
Messages = "messages"
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Specifies the filters available for the search functionality.
|
|
305
|
+
*
|
|
306
|
+
* @remarks
|
|
307
|
+
* - `Messages`: Filters to search within messages.
|
|
308
|
+
* - `Conversations`: Filters to search within conversations.
|
|
309
|
+
* - `Unread`: Filters to search for unread messages.
|
|
310
|
+
* - `Groups`: Filters to search within groups.
|
|
311
|
+
* - `Photos`: Filters to search for photo messages.
|
|
312
|
+
* - `Videos`: Filters to search for video messages.
|
|
313
|
+
* - `Links`: Filters to search for links shared in messages.
|
|
314
|
+
* - `Documents`: Filters to search for document files.
|
|
315
|
+
* - `Audio`: Filters to search for audio messages.
|
|
316
|
+
*/
|
|
317
|
+
declare enum CometChatSearchFilter {
|
|
318
|
+
Messages = "messages",
|
|
319
|
+
Conversations = "conversations",
|
|
320
|
+
Unread = "unread",
|
|
321
|
+
Groups = "groups",
|
|
322
|
+
Photos = "photos",
|
|
323
|
+
Videos = "videos",
|
|
324
|
+
Links = "links",
|
|
325
|
+
Documents = "files",
|
|
326
|
+
Audio = "audio"
|
|
327
|
+
}
|
|
291
328
|
|
|
292
329
|
interface MentionsProps {
|
|
330
|
+
/**
|
|
331
|
+
* Determines the type of list to display - either users or group members.
|
|
332
|
+
* @defaultValue `UserMemberListType.users`
|
|
333
|
+
*/
|
|
293
334
|
userMemberListType?: UserMemberListType;
|
|
335
|
+
/**
|
|
336
|
+
* Callback function invoked when a user or group member item is clicked.
|
|
337
|
+
* @param user - The clicked user (CometChat.User) or group member (CometChat.GroupMember)
|
|
338
|
+
* @returns void
|
|
339
|
+
*/
|
|
294
340
|
onItemClick?: (user: CometChat.User | CometChat.GroupMember) => void;
|
|
341
|
+
/**
|
|
342
|
+
* A custom view to render each user or group member item in the list.
|
|
343
|
+
*
|
|
344
|
+
* @param item - An instance of CometChat.User or CometChat.GroupMember to be rendered
|
|
345
|
+
* @returns A JSX element representing the custom item view
|
|
346
|
+
*/
|
|
295
347
|
itemView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element;
|
|
348
|
+
/**
|
|
349
|
+
* The search keyword used to filter users or group members.
|
|
350
|
+
*/
|
|
296
351
|
searchKeyword?: string;
|
|
352
|
+
/**
|
|
353
|
+
* The group instance for which to display group members.
|
|
354
|
+
*/
|
|
297
355
|
group?: CometChat.Group;
|
|
356
|
+
/**
|
|
357
|
+
* A custom view to render the subtitle for each user or group member item.
|
|
358
|
+
* @param item - An instance of CometChat.User or CometChat.GroupMember
|
|
359
|
+
* @returns A JSX element representing the custom subtitle view
|
|
360
|
+
*/
|
|
298
361
|
subtitleView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element;
|
|
362
|
+
/**
|
|
363
|
+
* A request builder to fetch users with custom parameters.
|
|
364
|
+
*/
|
|
299
365
|
usersRequestBuilder?: CometChat.UsersRequestBuilder;
|
|
366
|
+
/**
|
|
367
|
+
* Callback function invoked when the list is empty (no users or group members found).
|
|
368
|
+
*
|
|
369
|
+
* @returns void
|
|
370
|
+
*/
|
|
300
371
|
onEmpty?: () => void;
|
|
372
|
+
/**
|
|
373
|
+
* A request builder to fetch group members with custom parameters.
|
|
374
|
+
*/
|
|
301
375
|
groupMemberRequestBuilder?: CometChat.GroupMembersRequestBuilder;
|
|
376
|
+
/**
|
|
377
|
+
* Callback function invoked when an error occurs while fetching users or group members.
|
|
378
|
+
*
|
|
379
|
+
* @returns void
|
|
380
|
+
*/
|
|
302
381
|
onError?: () => void;
|
|
382
|
+
/**
|
|
383
|
+
* Controls the visibility of the scrollbar in the list.
|
|
384
|
+
*
|
|
385
|
+
* @defaultValue `false`
|
|
386
|
+
*/
|
|
387
|
+
showScrollbar?: boolean;
|
|
303
388
|
}
|
|
304
389
|
declare function CometChatUserMemberWrapper(props: MentionsProps): react_jsx_runtime.JSX.Element;
|
|
305
390
|
|
|
@@ -1125,6 +1210,32 @@ declare class CometChatUrlsFormatter extends CometChatTextFormatter {
|
|
|
1125
1210
|
registerEventListeners(element: HTMLElement, classList: DOMTokenList): HTMLElement;
|
|
1126
1211
|
}
|
|
1127
1212
|
|
|
1213
|
+
/**
|
|
1214
|
+
* Class that handles the text highlighting for specific patterns.
|
|
1215
|
+
* CometChatTextHighlightFormatter is a child class of CometChatTextFormatter.
|
|
1216
|
+
* It extends the functionality of text formatting to specifically highlight text patterns.
|
|
1217
|
+
* It can be used to highlight specific words or patterns.
|
|
1218
|
+
*/
|
|
1219
|
+
declare class CometChatTextHighlightFormatter extends CometChatTextFormatter {
|
|
1220
|
+
constructor(pattern?: string | RegExp);
|
|
1221
|
+
/**
|
|
1222
|
+
* Sets the text pattern to highlight
|
|
1223
|
+
* @param pattern The text pattern (string or RegExp) to highlight
|
|
1224
|
+
*/
|
|
1225
|
+
setText(pattern: string | RegExp): void;
|
|
1226
|
+
/**
|
|
1227
|
+
* Generates a unique ID for the highlight span
|
|
1228
|
+
*/
|
|
1229
|
+
getUniqueId(): string;
|
|
1230
|
+
/**
|
|
1231
|
+
* Format the text by applying highlighting to matches of the regex pattern
|
|
1232
|
+
* @param inputText The text to format
|
|
1233
|
+
* @param params Optional parameters
|
|
1234
|
+
* @returns The formatted text with highlights
|
|
1235
|
+
*/
|
|
1236
|
+
getFormattedText(inputText: string | null): string | void;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1128
1239
|
/**
|
|
1129
1240
|
* CometChatMessageTemplate is a pre-defined structure for creating message views
|
|
1130
1241
|
* that can be used as a starting point or blueprint for creating message views,
|
|
@@ -2145,6 +2256,8 @@ interface ListProps<T> {
|
|
|
2145
2256
|
* Hide the search bar
|
|
2146
2257
|
*
|
|
2147
2258
|
* @defaulValue `false`
|
|
2259
|
+
* @remarks
|
|
2260
|
+
* This property is ignored when a custom `searchView` is provided
|
|
2148
2261
|
*/
|
|
2149
2262
|
hideSearch?: boolean;
|
|
2150
2263
|
/**
|
|
@@ -2243,11 +2356,34 @@ interface ListProps<T> {
|
|
|
2243
2356
|
*/
|
|
2244
2357
|
onError?: ((error: CometChat.CometChatException) => void) | null;
|
|
2245
2358
|
/**
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2359
|
+
* Title of the component
|
|
2360
|
+
*
|
|
2361
|
+
* @defaultValue `""`
|
|
2362
|
+
*/
|
|
2250
2363
|
title?: string;
|
|
2364
|
+
/**
|
|
2365
|
+
* A custom search bar component to display in the header.
|
|
2366
|
+
*
|
|
2367
|
+
* @remarks
|
|
2368
|
+
* When provided, this component overrides the default search bar and the `hideSearch` property.
|
|
2369
|
+
* The custom search view will be displayed even if `hideSearch` is set to true.
|
|
2370
|
+
*/
|
|
2371
|
+
searchView?: JSX.Element;
|
|
2372
|
+
/**
|
|
2373
|
+
* Callback triggered when the search bar is clicked.
|
|
2374
|
+
*/
|
|
2375
|
+
onSearchBarClicked?: () => void;
|
|
2376
|
+
/**
|
|
2377
|
+
* Show shimmer effect on top of the list
|
|
2378
|
+
*
|
|
2379
|
+
* @defaultValue `false`
|
|
2380
|
+
*/
|
|
2381
|
+
showShimmerOnTop?: boolean;
|
|
2382
|
+
/**
|
|
2383
|
+
* Controls the visibility of the scrollbar in the list.
|
|
2384
|
+
* @defaultValue `false`
|
|
2385
|
+
*/
|
|
2386
|
+
showScrollbar?: boolean;
|
|
2251
2387
|
}
|
|
2252
2388
|
/**
|
|
2253
2389
|
* Renders a list component that can display a title, search bar,
|
|
@@ -3351,6 +3487,11 @@ interface CallLogsProps {
|
|
|
3351
3487
|
* @returns A JSX element to be rendered as the trailing view.
|
|
3352
3488
|
*/
|
|
3353
3489
|
trailingView?: (call: any) => JSX.Element;
|
|
3490
|
+
/**
|
|
3491
|
+
* Controls the visibility of the scrollbar in the list.
|
|
3492
|
+
* @defaultValue `false`
|
|
3493
|
+
*/
|
|
3494
|
+
showScrollbar?: boolean;
|
|
3354
3495
|
}
|
|
3355
3496
|
declare const CometChatCallLogs: (props: CallLogsProps) => react_jsx_runtime.JSX.Element;
|
|
3356
3497
|
|
|
@@ -3502,6 +3643,24 @@ interface ConversationsProps {
|
|
|
3502
3643
|
* @returns A JSX element to be rendered as the trailing view.
|
|
3503
3644
|
*/
|
|
3504
3645
|
trailingView?: (conversation: CometChat.Conversation) => JSX.Element;
|
|
3646
|
+
/**
|
|
3647
|
+
* A custom search bar component to display in the Conversations header.
|
|
3648
|
+
*/
|
|
3649
|
+
searchView?: JSX.Element;
|
|
3650
|
+
/**
|
|
3651
|
+
* Callback triggered when the search bar is clicked.
|
|
3652
|
+
*/
|
|
3653
|
+
onSearchBarClicked?: () => void;
|
|
3654
|
+
/**
|
|
3655
|
+
* Determines whether to display the search bar in the Conversations header.
|
|
3656
|
+
*
|
|
3657
|
+
* @defaultValue `false`
|
|
3658
|
+
*/
|
|
3659
|
+
showSearchBar?: boolean;
|
|
3660
|
+
/** Controls the visibility of the scrollbar in the list.
|
|
3661
|
+
* @defaultValue `false`
|
|
3662
|
+
*/
|
|
3663
|
+
showScrollbar?: boolean;
|
|
3505
3664
|
}
|
|
3506
3665
|
/**
|
|
3507
3666
|
* Renders a scrollable list of conversations that has been created in a CometChat app
|
|
@@ -3662,6 +3821,11 @@ interface GroupMembersProps {
|
|
|
3662
3821
|
* @returns A JSX element to be rendered as the trailing view.
|
|
3663
3822
|
*/
|
|
3664
3823
|
trailingView?: (groupMember: CometChat.GroupMember) => JSX.Element;
|
|
3824
|
+
/**
|
|
3825
|
+
* Controls the visibility of the scrollbar in the list.
|
|
3826
|
+
* @defaultValue `false`
|
|
3827
|
+
*/
|
|
3828
|
+
showScrollbar?: boolean;
|
|
3665
3829
|
}
|
|
3666
3830
|
declare function CometChatGroupMembers(props: GroupMembersProps): react_jsx_runtime.JSX.Element;
|
|
3667
3831
|
|
|
@@ -3785,6 +3949,11 @@ interface GroupsProps {
|
|
|
3785
3949
|
* @returns A JSX element to be rendered as the trailing view.
|
|
3786
3950
|
*/
|
|
3787
3951
|
trailingView?: (group: CometChat.Group) => JSX.Element;
|
|
3952
|
+
/**
|
|
3953
|
+
* Controls the visibility of the scrollbar in the list.
|
|
3954
|
+
* @defaultValue `false`
|
|
3955
|
+
*/
|
|
3956
|
+
showScrollbar?: boolean;
|
|
3788
3957
|
}
|
|
3789
3958
|
/**
|
|
3790
3959
|
* Renders a scrollable list of groups that has been created in a CometChat app
|
|
@@ -3961,6 +4130,11 @@ interface MessageComposerProps {
|
|
|
3961
4130
|
* A custom header section displayed at the top of the message composer, often used for media previews or additional information.
|
|
3962
4131
|
*/
|
|
3963
4132
|
headerView?: JSX.Element;
|
|
4133
|
+
/**
|
|
4134
|
+
* Controls the visibility of the scrollbar in the list.
|
|
4135
|
+
* @defaultValue `false`
|
|
4136
|
+
*/
|
|
4137
|
+
showScrollbar?: boolean;
|
|
3964
4138
|
}
|
|
3965
4139
|
/**
|
|
3966
4140
|
* Renders a message composer to send messages to a user or group of a CometChat App
|
|
@@ -3976,6 +4150,16 @@ interface MessageHeaderProps {
|
|
|
3976
4150
|
* @default false
|
|
3977
4151
|
*/
|
|
3978
4152
|
showConversationSummaryButton?: boolean;
|
|
4153
|
+
/**
|
|
4154
|
+
* Shows the search option.
|
|
4155
|
+
* @default false
|
|
4156
|
+
*/
|
|
4157
|
+
showSearchOption?: boolean;
|
|
4158
|
+
/**
|
|
4159
|
+
* Callback function triggered when search option is clicked.
|
|
4160
|
+
* @returns void
|
|
4161
|
+
*/
|
|
4162
|
+
onSearchOptionClicked?: () => void;
|
|
3979
4163
|
/**
|
|
3980
4164
|
* Hides the back button in the header in mobile view.
|
|
3981
4165
|
* @deprecated Use 'showBackButton' prop instead. This prop is deprecated and will be removed in future versions.
|
|
@@ -4062,6 +4246,11 @@ interface MessageHeaderProps {
|
|
|
4062
4246
|
* Format for displaying the "last active" timestamp in the message header.
|
|
4063
4247
|
*/
|
|
4064
4248
|
lastActiveAtDateTimeFormat?: CalendarObject;
|
|
4249
|
+
/**
|
|
4250
|
+
* Callback function triggered when the message header item is clicked.
|
|
4251
|
+
* @returns void
|
|
4252
|
+
*/
|
|
4253
|
+
onItemClick?: () => void;
|
|
4065
4254
|
}
|
|
4066
4255
|
/** Functional component for rendering the CometChatMessageHeader */
|
|
4067
4256
|
declare const CometChatMessageHeader: (props: MessageHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -4277,6 +4466,17 @@ interface MessageListProps {
|
|
|
4277
4466
|
* Format for timestamps displayed in message details (e.g., delivery or read time).
|
|
4278
4467
|
*/
|
|
4279
4468
|
messageInfoDateTimeFormat?: CalendarObject;
|
|
4469
|
+
/**
|
|
4470
|
+
* ID of the message to automatically scroll to when the message list loads.
|
|
4471
|
+
* @type {string}
|
|
4472
|
+
* @optional
|
|
4473
|
+
*/
|
|
4474
|
+
goToMessageId?: string;
|
|
4475
|
+
/**
|
|
4476
|
+
* Controls the visibility of the scrollbar in the list.
|
|
4477
|
+
* @defaultValue `false`
|
|
4478
|
+
*/
|
|
4479
|
+
showScrollbar?: boolean;
|
|
4280
4480
|
}
|
|
4281
4481
|
declare const CometChatMessageList: (props: MessageListProps) => react_jsx_runtime.JSX.Element;
|
|
4282
4482
|
|
|
@@ -4433,6 +4633,12 @@ interface UsersProps {
|
|
|
4433
4633
|
* @returns A JSX element to be rendered as the trailing view.
|
|
4434
4634
|
*/
|
|
4435
4635
|
trailingView?: (user: CometChat.User) => JSX.Element;
|
|
4636
|
+
/**
|
|
4637
|
+
* Controls the visibility of the scrollbar in the list list.
|
|
4638
|
+
*
|
|
4639
|
+
* @defaultValue `false`
|
|
4640
|
+
*/
|
|
4641
|
+
showScrollbar?: boolean;
|
|
4436
4642
|
}
|
|
4437
4643
|
/**
|
|
4438
4644
|
* Renders a scrollable list of users that has been created in a CometChat app
|
|
@@ -4468,6 +4674,11 @@ interface MessageInformationProps {
|
|
|
4468
4674
|
* Array of text formatters for custom styling or formatting of message text bubbles.
|
|
4469
4675
|
*/
|
|
4470
4676
|
textFormatters?: CometChatTextFormatter[];
|
|
4677
|
+
/**
|
|
4678
|
+
* Controls the visibility of the scrollbar in the list.
|
|
4679
|
+
* @defaultValue `false`
|
|
4680
|
+
*/
|
|
4681
|
+
showScrollbar?: boolean;
|
|
4471
4682
|
}
|
|
4472
4683
|
declare const CometChatMessageInformation: (props: MessageInformationProps) => react_jsx_runtime.JSX.Element;
|
|
4473
4684
|
|
|
@@ -5007,6 +5218,7 @@ interface ContextMenuProps {
|
|
|
5007
5218
|
closeOnOutsideClick?: boolean;
|
|
5008
5219
|
disableBackgroundInteraction?: boolean;
|
|
5009
5220
|
useParentContainer?: boolean;
|
|
5221
|
+
useParentHeight?: boolean;
|
|
5010
5222
|
}
|
|
5011
5223
|
/**
|
|
5012
5224
|
* CometChatContextMenu is a composite component used to display menu data in required format.
|
|
@@ -5805,6 +6017,13 @@ declare function sanitizeCalendarObject(calendarObject?: CalendarObject): {
|
|
|
5805
6017
|
};
|
|
5806
6018
|
declare function fireClickEvent(): void;
|
|
5807
6019
|
declare const decodeHTML: (input: string) => string;
|
|
6020
|
+
/**
|
|
6021
|
+
* Custom React hook for creating debounced callbacks with automatic cleanup.
|
|
6022
|
+
*/
|
|
6023
|
+
declare const useDebouncedCallback: (callback: () => void, delay: number) => {
|
|
6024
|
+
debouncedCallback: () => void;
|
|
6025
|
+
cleanup: () => void;
|
|
6026
|
+
};
|
|
5808
6027
|
|
|
5809
6028
|
/**
|
|
5810
6029
|
* Utility class for managing local storage with change detection capabilities.
|
|
@@ -5898,6 +6117,19 @@ interface CometChatThreadHeaderProps {
|
|
|
5898
6117
|
* Array of text formatters for custom styling or formatting of message text bubbles.
|
|
5899
6118
|
*/
|
|
5900
6119
|
textFormatters?: CometChatTextFormatter[];
|
|
6120
|
+
/**
|
|
6121
|
+
* Callback function triggered when the subtitle is clicked.
|
|
6122
|
+
*/
|
|
6123
|
+
onSubtitleClicked?: () => void;
|
|
6124
|
+
/**
|
|
6125
|
+
* Custom subtitle view to display below the thread title.
|
|
6126
|
+
*/
|
|
6127
|
+
subtitleView?: JSX.Element;
|
|
6128
|
+
/**
|
|
6129
|
+
* Controls the visibility of the scrollbar in the list.
|
|
6130
|
+
* @defaultValue `false`
|
|
6131
|
+
*/
|
|
6132
|
+
showScrollbar?: boolean;
|
|
5901
6133
|
}
|
|
5902
6134
|
declare const CometChatThreadHeader: (props: CometChatThreadHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
5903
6135
|
|
|
@@ -6041,5 +6273,261 @@ declare function useRefSync<T>(value: T): React__default.MutableRefObject<T>;
|
|
|
6041
6273
|
declare function useStateRef<T>(initialValue: T): [T, (node: T) => void];
|
|
6042
6274
|
declare function useCometChatErrorHandler(onError?: ((error: CometChat.CometChatException) => void) | null): (error: unknown, source?: string) => void;
|
|
6043
6275
|
|
|
6044
|
-
|
|
6276
|
+
/**
|
|
6277
|
+
* Checks if two dates (timestamps) are from different months or years
|
|
6278
|
+
*
|
|
6279
|
+
* @param firstDate - First timestamp to compare in milliseconds
|
|
6280
|
+
* @param secondDate - Second timestamp to compare in milliseconds
|
|
6281
|
+
* @param errorHandler - Optional error handler function for exception handling
|
|
6282
|
+
* @returns boolean indicating if the dates belong to different months or years
|
|
6283
|
+
*/
|
|
6284
|
+
declare function isMonthDifferent(firstDate?: number, secondDate?: number, errorHandler?: (error: unknown, source?: string) => void): boolean;
|
|
6285
|
+
/**
|
|
6286
|
+
* Get common date format based on provided custom format
|
|
6287
|
+
* @returns CalendarObject with format specifications
|
|
6288
|
+
*/
|
|
6289
|
+
declare function getCommonDateFormat(customFormat?: CalendarObject): CalendarObject;
|
|
6290
|
+
/**
|
|
6291
|
+
* Checks if message search criteria are valid
|
|
6292
|
+
* Returns true if search keyword exists or if valid filters are active
|
|
6293
|
+
*/
|
|
6294
|
+
declare function hasValidMessageSearchCriteria(searchKeyword: string, filters: CometChatSearchFilter[]): boolean;
|
|
6295
|
+
/**
|
|
6296
|
+
* Checks if conversation search criteria are valid
|
|
6297
|
+
* Returns true if search keyword exists or if valid filters are active
|
|
6298
|
+
*/
|
|
6299
|
+
declare function hasValidConversationSearchCriteria(searchKeyword: string, filters: CometChatSearchFilter[]): boolean;
|
|
6300
|
+
/**
|
|
6301
|
+
* Checks if a message has link preview metadata
|
|
6302
|
+
*/
|
|
6303
|
+
declare function hasLink(metadata: any): boolean;
|
|
6304
|
+
|
|
6305
|
+
/**
|
|
6306
|
+
* Props for the CometChatSearch component
|
|
6307
|
+
*/
|
|
6308
|
+
interface SearchProps {
|
|
6309
|
+
/**
|
|
6310
|
+
* Callback triggered when the back button is clicked
|
|
6311
|
+
* Use this to handle navigation when user clicks the back button
|
|
6312
|
+
*
|
|
6313
|
+
* @defaultValue () => {}
|
|
6314
|
+
*/
|
|
6315
|
+
onBack?: () => void;
|
|
6316
|
+
/**
|
|
6317
|
+
* Whether to hide the back button
|
|
6318
|
+
*
|
|
6319
|
+
* @defaultValue false - back button is shown
|
|
6320
|
+
*/
|
|
6321
|
+
hideBackButton?: boolean;
|
|
6322
|
+
/**
|
|
6323
|
+
* Callback triggered when a conversation is clicked in search results
|
|
6324
|
+
* Receives the conversation object and the search keyword that was used
|
|
6325
|
+
*
|
|
6326
|
+
* @param conversation - The conversation that was clicked
|
|
6327
|
+
* @param searchKeyword - The keyword that was used in the search
|
|
6328
|
+
*/
|
|
6329
|
+
onConversationClicked?: (conversation: CometChat.Conversation, searchKeyword?: string) => void;
|
|
6330
|
+
/**
|
|
6331
|
+
* Callback triggered when a message is clicked in search results
|
|
6332
|
+
* Receives the message object and the search keyword that was used
|
|
6333
|
+
*
|
|
6334
|
+
* @param message - The message that was clicked
|
|
6335
|
+
* @param searchKeyword - The keyword that was used in the search
|
|
6336
|
+
*/
|
|
6337
|
+
onMessageClicked?: (message: CometChat.BaseMessage, searchKeyword?: string) => void;
|
|
6338
|
+
/**
|
|
6339
|
+
* Array of search filters to display in the filter bar
|
|
6340
|
+
* These allow users to narrow down their search results
|
|
6341
|
+
*
|
|
6342
|
+
* @defaultValue All available filters (Audio, Documents, Groups, Photos, Videos, Links, Unread)
|
|
6343
|
+
*/
|
|
6344
|
+
searchFilters?: Array<CometChatSearchFilter>;
|
|
6345
|
+
/**
|
|
6346
|
+
* Filter that should be active by default when the component loads
|
|
6347
|
+
* This allows pre-filtering the search results
|
|
6348
|
+
*/
|
|
6349
|
+
initialSearchFilter?: CometChatSearchFilter;
|
|
6350
|
+
/**
|
|
6351
|
+
* Scopes to search in (Conversations, Messages, or both)
|
|
6352
|
+
* Controls whether to search in conversations, messages, or both
|
|
6353
|
+
*
|
|
6354
|
+
* @defaultValue [CometChatSearchScope.All] - searches in both conversations and messages
|
|
6355
|
+
*/
|
|
6356
|
+
searchIn?: Array<CometChatSearchScope>;
|
|
6357
|
+
/**
|
|
6358
|
+
* Custom view for conversation items in the search results
|
|
6359
|
+
* Use this to completely customize how conversation items are rendered
|
|
6360
|
+
*
|
|
6361
|
+
* @param conversation - The conversation object to render
|
|
6362
|
+
* @returns JSX element representing the conversation item
|
|
6363
|
+
*/
|
|
6364
|
+
conversationItemView?: (conversation: CometChat.Conversation) => JSX.Element;
|
|
6365
|
+
/**
|
|
6366
|
+
* Custom leading view for conversation items (typically avatar/icon)
|
|
6367
|
+
* Use this to customize just the leading section of conversation items
|
|
6368
|
+
*
|
|
6369
|
+
* @param conversation - The conversation object to render the leading view for
|
|
6370
|
+
* @returns JSX element for the leading part of the conversation item
|
|
6371
|
+
*/
|
|
6372
|
+
conversationLeadingView?: (conversation: CometChat.Conversation) => JSX.Element;
|
|
6373
|
+
/**
|
|
6374
|
+
* Custom title view for conversation items
|
|
6375
|
+
* Use this to customize how the title of conversation items is displayed
|
|
6376
|
+
*
|
|
6377
|
+
* @param conversation - The conversation object to render the title for
|
|
6378
|
+
* @returns JSX element for the title of the conversation item
|
|
6379
|
+
*/
|
|
6380
|
+
conversationTitleView?: (conversation: CometChat.Conversation) => JSX.Element;
|
|
6381
|
+
/**
|
|
6382
|
+
* Custom subtitle view for conversation items
|
|
6383
|
+
* Use this to customize how the subtitle (typically last message) is displayed
|
|
6384
|
+
*
|
|
6385
|
+
* @param conversation - The conversation object to render the subtitle for
|
|
6386
|
+
* @returns JSX element for the subtitle of the conversation item
|
|
6387
|
+
*/
|
|
6388
|
+
conversationSubtitleView?: (conversation: CometChat.Conversation) => JSX.Element;
|
|
6389
|
+
/**
|
|
6390
|
+
* Custom trailing view for conversation items (typically timestamp)
|
|
6391
|
+
* Use this to customize what appears at the end of conversation items
|
|
6392
|
+
*
|
|
6393
|
+
* @param conversation - The conversation object to render the trailing view for
|
|
6394
|
+
* @returns JSX element for the trailing part of the conversation item
|
|
6395
|
+
*/
|
|
6396
|
+
conversationTrailingView?: (conversation: CometChat.Conversation) => JSX.Element;
|
|
6397
|
+
/**
|
|
6398
|
+
* Request builder for conversations search
|
|
6399
|
+
* Use this to customize the conversation search request parameters
|
|
6400
|
+
*
|
|
6401
|
+
* @defaultValue New instance with default parameters and search keyword
|
|
6402
|
+
*/
|
|
6403
|
+
conversationsRequestBuilder?: CometChat.ConversationsRequestBuilder;
|
|
6404
|
+
/**
|
|
6405
|
+
* Custom view for message items in the search results
|
|
6406
|
+
* Use this to completely customize how message items are rendered
|
|
6407
|
+
*
|
|
6408
|
+
* @param message - The message object to render
|
|
6409
|
+
* @returns JSX element representing the message item
|
|
6410
|
+
*/
|
|
6411
|
+
messageItemView?: (message: CometChat.BaseMessage) => JSX.Element;
|
|
6412
|
+
/**
|
|
6413
|
+
* Custom leading view for message items (typically sender avatar/icon)
|
|
6414
|
+
* Use this to customize just the leading section of message items
|
|
6415
|
+
*
|
|
6416
|
+
* @param message - The message object to render the leading view for
|
|
6417
|
+
* @returns JSX element for the leading part of the message item
|
|
6418
|
+
*/
|
|
6419
|
+
messageLeadingView?: (message: CometChat.BaseMessage) => JSX.Element;
|
|
6420
|
+
/**
|
|
6421
|
+
* Custom title view for message items (typically sender name)
|
|
6422
|
+
* Use this to customize how the title of message items is displayed
|
|
6423
|
+
*
|
|
6424
|
+
* @param message - The message object to render the title for
|
|
6425
|
+
* @returns JSX element for the title of the message item
|
|
6426
|
+
*/
|
|
6427
|
+
messageTitleView?: (message: CometChat.BaseMessage) => JSX.Element;
|
|
6428
|
+
/**
|
|
6429
|
+
* Custom subtitle view for message items (typically message content)
|
|
6430
|
+
* Use this to customize how the subtitle/content is displayed
|
|
6431
|
+
*
|
|
6432
|
+
* @param message - The message object to render the subtitle for
|
|
6433
|
+
* @returns JSX element for the subtitle of the message item
|
|
6434
|
+
*/
|
|
6435
|
+
messageSubtitleView?: (message: CometChat.BaseMessage) => JSX.Element;
|
|
6436
|
+
/**
|
|
6437
|
+
* Custom trailing view for message items (typically timestamp)
|
|
6438
|
+
* Use this to customize what appears at the end of message items
|
|
6439
|
+
*
|
|
6440
|
+
* @param message - The message object to render the trailing view for
|
|
6441
|
+
* @returns JSX element for the trailing part of the message item
|
|
6442
|
+
*/
|
|
6443
|
+
messageTrailingView?: (message: CometChat.BaseMessage) => JSX.Element;
|
|
6444
|
+
/**
|
|
6445
|
+
* Request builder for messages search
|
|
6446
|
+
* Use this to customize the message search request parameters
|
|
6447
|
+
*
|
|
6448
|
+
* @defaultValue New instance with default parameters and search keyword
|
|
6449
|
+
*/
|
|
6450
|
+
messagesRequestBuilder?: CometChat.MessagesRequestBuilder;
|
|
6451
|
+
/**
|
|
6452
|
+
* Custom view for empty state when no search results are found
|
|
6453
|
+
* This will be displayed when search returns no results
|
|
6454
|
+
*/
|
|
6455
|
+
emptyView?: JSX.Element;
|
|
6456
|
+
/**
|
|
6457
|
+
* Custom view for error state when search fails
|
|
6458
|
+
* This will be displayed when an error occurs during search
|
|
6459
|
+
*/
|
|
6460
|
+
errorView?: JSX.Element;
|
|
6461
|
+
/**
|
|
6462
|
+
* Custom view for loading state during search
|
|
6463
|
+
* This will be displayed while search is in progress
|
|
6464
|
+
*/
|
|
6465
|
+
loadingView?: JSX.Element;
|
|
6466
|
+
/**
|
|
6467
|
+
* Custom view for initial state before user enters a search query
|
|
6468
|
+
* This will be displayed when the search component first loads
|
|
6469
|
+
*
|
|
6470
|
+
* @defaultValue Basic prompt encouraging user to search
|
|
6471
|
+
*/
|
|
6472
|
+
initialView?: JSX.Element;
|
|
6473
|
+
/**
|
|
6474
|
+
* Format for message sent date/time in the UI
|
|
6475
|
+
* Customize how timestamps are displayed in message items
|
|
6476
|
+
*/
|
|
6477
|
+
messageSentAtDateTimeFormat?: CalendarObject;
|
|
6478
|
+
/**
|
|
6479
|
+
* Custom text formatters for message content
|
|
6480
|
+
* Use these to customize how message text is formatted (e.g., emoji, links, mentions)
|
|
6481
|
+
*/
|
|
6482
|
+
textFormatters?: CometChatTextFormatter[];
|
|
6483
|
+
/**
|
|
6484
|
+
* Whether to hide the group type icon in group conversations
|
|
6485
|
+
*
|
|
6486
|
+
* @defaultValue false - group type icons are shown
|
|
6487
|
+
*/
|
|
6488
|
+
hideGroupType?: boolean;
|
|
6489
|
+
/**
|
|
6490
|
+
* Whether to hide user online/offline status indicators
|
|
6491
|
+
*
|
|
6492
|
+
* @defaultValue false - user status is shown
|
|
6493
|
+
*/
|
|
6494
|
+
hideUserStatus?: boolean;
|
|
6495
|
+
/**
|
|
6496
|
+
* Whether to hide message receipt indicators (sent/delivered/read)
|
|
6497
|
+
*
|
|
6498
|
+
* @defaultValue false - receipts are shown
|
|
6499
|
+
*/
|
|
6500
|
+
hideReceipts?: boolean;
|
|
6501
|
+
/**
|
|
6502
|
+
* User ID to search within specific user's messages
|
|
6503
|
+
* When provided, search will be limited to messages with this user
|
|
6504
|
+
*/
|
|
6505
|
+
uid?: string;
|
|
6506
|
+
/**
|
|
6507
|
+
* Group ID to search within specific group's messages
|
|
6508
|
+
* When provided, search will be limited to messages in this group
|
|
6509
|
+
*/
|
|
6510
|
+
guid?: string;
|
|
6511
|
+
/**
|
|
6512
|
+
* Custom options for conversation items in search results
|
|
6513
|
+
* Function that returns array of options (e.g., for context menu)
|
|
6514
|
+
*
|
|
6515
|
+
* @param conversation - The conversation to generate options for
|
|
6516
|
+
* @returns Array of option objects or null for no options
|
|
6517
|
+
*/
|
|
6518
|
+
conversationOptions?: ((conversation: CometChat.Conversation) => CometChatOption[]) | null;
|
|
6519
|
+
/**
|
|
6520
|
+
* Custom error handler for search operations
|
|
6521
|
+
* Override the default error handling behavior
|
|
6522
|
+
*
|
|
6523
|
+
* @param error - The error that occurred during a search operation
|
|
6524
|
+
*/
|
|
6525
|
+
onError?: (error: CometChat.CometChatException) => void;
|
|
6526
|
+
}
|
|
6527
|
+
/**
|
|
6528
|
+
* CometChatSearch component for searching conversations and messages in CometChat
|
|
6529
|
+
*/
|
|
6530
|
+
declare function CometChatSearch(props: SearchProps): react_jsx_runtime.JSX.Element;
|
|
6531
|
+
|
|
6532
|
+
export { AuxiliaryButtonAlignment, ButtonAction, CalendarObject, CallButtonConfiguration, CallWorkflow, CallingConfiguration, CallingDetailsUtils, CallingExtension, CallingExtensionDecorator, ChatConfigurator, ChatSdkEventInitializer, CollaborativeDocumentConfiguration, CollaborativeDocumentExtension, CollaborativeDocumentExtensionDecorator, CollaborativeWhiteBoardExtensionDecorator, CollaborativeWhiteboardConfiguration, CollaborativeWhiteboardExtension, CometChatActionBubble, CometChatActionSheet, CometChatActions, CometChatActionsIcon, CometChatActionsView, CometChatAudioBubble, CometChatAvatar, CometChatButton, CometChatCallBubble, CometChatCallButtons, CometChatCallEvents, CometChatCallLogs, CometChatChangeScope, CometChatCheckbox, CometChatConfirmDialog, CometChatContextMenu, CometChatConversationEvents, CometChatConversations, CometChatDate, CometChatDeleteBubble, CometChatDocumentBubble, CometChatDropDown, CometChatEditPreview, CometChatEmojiKeyboard, CometChatFileBubble, CometChatFullScreenViewer, CometChatGroupEvents, CometChatGroupMembers, CometChatGroups, CometChatImageBubble, CometChatIncomingCall, CometChatList, CometChatListItem, CometChatLocalize, CometChatMediaRecorder, CometChatMentionsFormatter, CometChatMessageBubble, CometChatMessageComposer, CometChatMessageComposerAction, CometChatMessageEvents, CometChatMessageHeader, CometChatMessageInformation, CometChatMessageList, CometChatMessageOption, CometChatMessageTemplate, CometChatOngoingCall, CometChatOption, CometChatOutgoingCall, CometChatPopover, CometChatRadioButton, CometChatReactionInfo, CometChatReactionList, CometChatReactions, CometChatSearch, CometChatSearchBar, CometChatSearchFilter, CometChatSearchScope, CometChatTextBubble, CometChatTextFormatter, CometChatTextHighlightFormatter, CometChatThreadHeader, CometChatToast, CometChatUIEvents, CometChatUIKit, CometChatUIKitCalls, CometChatUIKitConstants, CometChatUIKitLoginListener, CometChatUIKitUtility, CometChatUrlsFormatter, CometChatUserEvents, CometChatUserMemberWrapper, CometChatUsers, CometChatUtilityConstants, CometChatVideoBubble, ConversationUtils, DataSource, DataSourceDecorator, DateTimePickerMode, DocumentIconAlignment, ElementType, EnterKeyBehavior, ExtensionsDataSource, GroupMemberUtils, HTTPSRequestMethods, IconButtonAlignment, LabelAlignment, LinkPreviewExtension, LinkPreviewExtensionDecorator, MentionsTargetElement, MentionsVisibility, MessageBubbleAlignment, MessageListAlignment, MessageReceiptUtils, MessageStatus, MessageTranslationExtension, MessageTranslationExtensionDecorator, MessageUtils, MessagesDataSource, MouseEventSource, OutgoingCallConfiguration, PanelAlignment, Placement$1 as Placement, PollsConfiguration, PollsExtension, PollsExtensionDecorator, PreviewMessageMode, Receipts, RecordingType, SelectionMode, States, StickersExtension, StickersExtensionDecorator, StorageUtils, TabAlignment, TabsVisibility, ThumbnailGenerationExtension, ThumbnailGenerationExtensionDecorator, TimestampAlignment, TitleAlignment, UIKitSettings, UIKitSettingsBuilder, UserMemberListType, closeCurrentMediaPlayer, convertMinutesToHoursMinutesSeconds, convertSecondsToHoursMinutesSeconds, currentAudioPlayer, currentMediaPlayer, decodeHTML, downloadRecordingFromURL, fireClickEvent, formatDateFromTimestamp, getCommonDateFormat, getLocalizedString, getThemeMode, getThemeVariable, hasLink, hasValidConversationSearchCriteria, hasValidMessageSearchCriteria, isMessageSentByMe, isMissedCall, isMobileDevice, isMonthDifferent, isSafari, isSentByMe, isURL, processFileForAudio, sanitizeCalendarObject, sanitizeHtml, useCometChatErrorHandler, useDebouncedCallback, useRefSync, useStateRef, verifyCallUser };
|
|
6045
6533
|
export type { IActiveChatChanged, IDialog, IGroupLeft, IGroupMemberAdded, IGroupMemberJoined, IGroupMemberKickedBanned, IGroupMemberScopeChanged, IGroupMemberUnBanned, IMentionsCountWarning, IMessages, IModal, IMouseEvent, IOpenChat, IOwnershipChanged, IPanel, IShowOngoingCall, LocalizationSettings, PollOptions };
|