@cometchat/chat-uikit-react 6.3.2 → 6.3.4

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.
Binary file
package/dist/index.d.ts CHANGED
@@ -658,6 +658,11 @@ declare class UIKitSettings {
658
658
  * @type {ExtensionsDataSource}
659
659
  */
660
660
  readonly callingExtension?: CallingExtension;
661
+ /**
662
+ * Storage mode for persisting data.
663
+ * @type {CometChat.StorageMode}
664
+ */
665
+ readonly storageMode: CometChat.StorageMode;
661
666
  /**
662
667
  * Private constructor to initialize the settings using the provided builder.
663
668
  * @param {UIKitSettingsBuilder} builder - The builder instance containing the settings configuration.
@@ -719,6 +724,11 @@ declare class UIKitSettings {
719
724
  * @returns {ExtensionsDataSource[]}
720
725
  */
721
726
  getCallsExtension(): ExtensionsDataSource;
727
+ /**
728
+ * Retrieves the storage mode.
729
+ * @returns {CometChat.StorageMode} The storage mode.
730
+ */
731
+ getStorageMode(): CometChat.StorageMode;
722
732
  }
723
733
  declare class UIKitSettingsBuilder {
724
734
  /**
@@ -787,6 +797,11 @@ declare class UIKitSettingsBuilder {
787
797
  * @type {string}
788
798
  */
789
799
  clientHost?: string;
800
+ /**
801
+ * Storage mode for persisting data.
802
+ * @type {CometChat.StorageMode}
803
+ */
804
+ storageMode?: CometChat.StorageMode;
790
805
  /**
791
806
  * Builds and returns an instance of UIKitSettings.
792
807
  * @returns {UIKitSettings} A new instance of UIKitSettings with the specified configuration.
@@ -863,6 +878,12 @@ declare class UIKitSettingsBuilder {
863
878
  * @returns {UIKitSettingsBuilder} The builder instance.
864
879
  */
865
880
  setCallsExtension(callingExtension: CallingExtension): UIKitSettingsBuilder;
881
+ /**
882
+ * Sets the storage mode.
883
+ * @param {CometChat.StorageMode} storageMode - The storage mode.
884
+ * @returns {UIKitSettingsBuilder} The builder instance.
885
+ */
886
+ setStorageMode(storageMode: CometChat.StorageMode): UIKitSettingsBuilder;
866
887
  }
867
888
 
868
889
  /**
@@ -4208,6 +4229,18 @@ interface MessageComposerProps {
4208
4229
  * @defaultValue ""
4209
4230
  */
4210
4231
  placeholderText?: string;
4232
+ /**
4233
+ * Custom request builder for mentions user list.
4234
+ * @defaultValue `undefined` - Uses default internal request builder.
4235
+ *
4236
+ */
4237
+ mentionsUsersRequestBuilder?: CometChat.UsersRequestBuilder;
4238
+ /**
4239
+ * Custom request builder for mentions group members list.
4240
+ * @defaultValue `undefined` - Uses default internal request builder
4241
+ *
4242
+ */
4243
+ mentionsGroupMembersRequestBuilder?: CometChat.GroupMembersRequestBuilder;
4211
4244
  }
4212
4245
  /**
4213
4246
  * Renders a message composer to send messages to a user or group of a CometChat App
@@ -6147,7 +6180,6 @@ declare const currentAudioPlayer: {
6147
6180
  * Function to stop current media playback.
6148
6181
  */
6149
6182
  declare function closeCurrentMediaPlayer(pauseAudio?: boolean): void;
6150
- declare function sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string;
6151
6183
  declare function isMessageSentByMe(message: CometChat.BaseMessage, loggedInUser: CometChat.User): boolean;
6152
6184
  /**
6153
6185
  * Function to check if the current browser is safari.
@@ -6194,11 +6226,6 @@ declare const useDebouncedCallback: (callback: () => void, delay: number) => {
6194
6226
  declare function createMessageCopy(msg: CometChat.AIAssistantBaseEvent, user: CometChat.User, category?: string, type?: string): CometChat.BaseMessage;
6195
6227
  declare function createMessageCopyFromBaseMessage(msg: CometChat.BaseMessage, user: CometChat.User | undefined): CometChat.BaseMessage;
6196
6228
  declare function isDarkMode(): boolean;
6197
- /**
6198
- * Sanitizes HTML content to only allow span tags while keeping everything else as plain text
6199
- * Also removes any script or executable content
6200
- */
6201
- declare const sanitizeToSpanOnly: (htmlString: string, regexPatterns: RegExp[][]) => string;
6202
6229
  /**
6203
6230
  * @function shouldShowCustomMimeTypes
6204
6231
  * @description Returns true if the device is running either iOS (iPhone, iPad, iPod) or macOS.
@@ -6410,13 +6437,11 @@ declare class CometChatUIKitUtility {
6410
6437
  */
6411
6438
  static checkMessageForExtensionsData: (message: CometChat.BaseMessage | null, extensionKey: string) => (object & MessageExtensionType) | undefined;
6412
6439
  /**
6413
- * Sanitizes an HTML string by escaping tags not matching the whitelist.
6414
- *
6415
- * @param htmlString - The HTML string to sanitize.
6416
- * @param whitelistRegExes - A list of regular expressions to match allowed tags.
6417
- * @returns The sanitized HTML string.
6440
+ * Process and sanitize text to escape dangerous HTML while preserving mention formatting
6441
+ * @param text The text string that may contain HTML and mentions
6442
+ * @returns Sanitized string with dangerous HTML escaped but mentions preserved
6418
6443
  */
6419
- static sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string;
6444
+ static sanitizeText(text: string): string;
6420
6445
  static convertBlobToWav: (audioBlob: {
6421
6446
  arrayBuffer: () => any;
6422
6447
  }) => Promise<{
@@ -6887,5 +6912,5 @@ interface CometChatAIAssistantChatHistoryProps {
6887
6912
  }
6888
6913
  declare const CometChatAIAssistantChatHistory: (props: CometChatAIAssistantChatHistoryProps) => react_jsx_runtime.JSX.Element;
6889
6914
 
6890
- export { AuxiliaryButtonAlignment, ButtonAction, CalendarObject, CallButtonConfiguration, CallWorkflow, CallingConfiguration, CallingDetailsUtils, CallingExtension, CallingExtensionDecorator, ChatConfigurator, ChatSdkEventInitializer, CollaborativeDocumentConfiguration, CollaborativeDocumentExtension, CollaborativeDocumentExtensionDecorator, CollaborativeWhiteBoardExtensionDecorator, CollaborativeWhiteboardConfiguration, CollaborativeWhiteboardExtension, CometChatAIAssistantChat, CometChatAIAssistantChatHistory, CometChatAIAssistantMessageBubble, CometChatAIAssistantTools, CometChatActionBubble, CometChatActionSheet, CometChatActions, CometChatActionsIcon, CometChatActionsView, CometChatAudioBubble, CometChatAvatar, CometChatButton, CometChatCallBubble, CometChatCallButtons, CometChatCallEvents, CometChatCallLogs, CometChatChangeScope, CometChatCheckbox, CometChatConfirmDialog, CometChatContextMenu, CometChatConversationEvents, CometChatConversations, CometChatDate, CometChatDeleteBubble, CometChatDocumentBubble, CometChatDropDown, CometChatEditPreview, CometChatEmojiKeyboard, CometChatErrorView, CometChatFileBubble, CometChatFrameProvider, CometChatFullScreenViewer, CometChatGroupEvents, CometChatGroupMembers, CometChatGroups, CometChatImageBubble, CometChatIncomingCall, CometChatList, CometChatListItem, CometChatLocalize, CometChatMediaRecorder, CometChatMentionsFormatter, CometChatMessageBubble, CometChatMessageComposer, CometChatMessageComposerAction, CometChatMessageEvents, CometChatMessageHeader, CometChatMessageInformation, CometChatMessageList, CometChatMessageOption, CometChatMessagePreview, CometChatMessageTemplate, CometChatOngoingCall, CometChatOption, CometChatOutgoingCall, CometChatPopover, CometChatRadioButton, CometChatReactionInfo, CometChatReactionList, CometChatReactions, CometChatSearch, CometChatSearchBar, CometChatSearchFilter, CometChatSearchScope, CometChatStreamMessageBubble, 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, createMessageCopy, createMessageCopyFromBaseMessage, currentAudioPlayer, currentMediaPlayer, decodeHTML, downloadRecordingFromURL, emitStreamingState, fireClickEvent, formatDateFromTimestamp, getAIAssistantTools, getCommonDateFormat, getLocalizedString, getStreamSpeed, getThemeMode, getThemeVariable, handleWebsocketMessage, hasLink, hasValidConversationSearchCriteria, hasValidMessageSearchCriteria, isDarkMode, isMessageSentByMe, isMissedCall, isMobileDevice, isMonthDifferent, isSafari, isSentByMe, isURL, messageStream, processFileForAudio, sanitizeCalendarObject, sanitizeHtml, sanitizeHtmlStringToFragment, sanitizeToSpanOnly, setAIAssistantTools, setStreamSpeed, shouldShowCustomMimeTypes, startStreamingMessage, stopStreamingMessage, streamingState$, useCometChatErrorHandler, useCometChatFrameContext, useDebouncedCallback, useRefSync, useStateRef, verifyCallUser };
6915
+ export { AuxiliaryButtonAlignment, ButtonAction, CalendarObject, CallButtonConfiguration, CallWorkflow, CallingConfiguration, CallingDetailsUtils, CallingExtension, CallingExtensionDecorator, ChatConfigurator, ChatSdkEventInitializer, CollaborativeDocumentConfiguration, CollaborativeDocumentExtension, CollaborativeDocumentExtensionDecorator, CollaborativeWhiteBoardExtensionDecorator, CollaborativeWhiteboardConfiguration, CollaborativeWhiteboardExtension, CometChatAIAssistantChat, CometChatAIAssistantChatHistory, CometChatAIAssistantMessageBubble, CometChatAIAssistantTools, CometChatActionBubble, CometChatActionSheet, CometChatActions, CometChatActionsIcon, CometChatActionsView, CometChatAudioBubble, CometChatAvatar, CometChatButton, CometChatCallBubble, CometChatCallButtons, CometChatCallEvents, CometChatCallLogs, CometChatChangeScope, CometChatCheckbox, CometChatConfirmDialog, CometChatContextMenu, CometChatConversationEvents, CometChatConversations, CometChatDate, CometChatDeleteBubble, CometChatDocumentBubble, CometChatDropDown, CometChatEditPreview, CometChatEmojiKeyboard, CometChatErrorView, CometChatFileBubble, CometChatFrameProvider, CometChatFullScreenViewer, CometChatGroupEvents, CometChatGroupMembers, CometChatGroups, CometChatImageBubble, CometChatIncomingCall, CometChatList, CometChatListItem, CometChatLocalize, CometChatMediaRecorder, CometChatMentionsFormatter, CometChatMessageBubble, CometChatMessageComposer, CometChatMessageComposerAction, CometChatMessageEvents, CometChatMessageHeader, CometChatMessageInformation, CometChatMessageList, CometChatMessageOption, CometChatMessagePreview, CometChatMessageTemplate, CometChatOngoingCall, CometChatOption, CometChatOutgoingCall, CometChatPopover, CometChatRadioButton, CometChatReactionInfo, CometChatReactionList, CometChatReactions, CometChatSearch, CometChatSearchBar, CometChatSearchFilter, CometChatSearchScope, CometChatStreamMessageBubble, 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, createMessageCopy, createMessageCopyFromBaseMessage, currentAudioPlayer, currentMediaPlayer, decodeHTML, downloadRecordingFromURL, emitStreamingState, fireClickEvent, formatDateFromTimestamp, getAIAssistantTools, getCommonDateFormat, getLocalizedString, getStreamSpeed, getThemeMode, getThemeVariable, handleWebsocketMessage, hasLink, hasValidConversationSearchCriteria, hasValidMessageSearchCriteria, isDarkMode, isMessageSentByMe, isMissedCall, isMobileDevice, isMonthDifferent, isSafari, isSentByMe, isURL, messageStream, processFileForAudio, sanitizeCalendarObject, sanitizeHtmlStringToFragment, setAIAssistantTools, setStreamSpeed, shouldShowCustomMimeTypes, startStreamingMessage, stopStreamingMessage, streamingState$, useCometChatErrorHandler, useCometChatFrameContext, useDebouncedCallback, useRefSync, useStateRef, verifyCallUser };
6891
6916
  export type { IActiveChatChanged, IDialog, IGroupLeft, IGroupMemberAdded, IGroupMemberJoined, IGroupMemberKickedBanned, IGroupMemberScopeChanged, IGroupMemberUnBanned, IMentionsCountWarning, IMessages, IModal, IMouseEvent, IOpenChat, IOwnershipChanged, IPanel, IShowOngoingCall, IStreamData, LocalizationSettings, PollOptions };