@cometchat/chat-uikit-react 6.3.2 → 6.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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
  /**
@@ -6147,7 +6168,6 @@ declare const currentAudioPlayer: {
6147
6168
  * Function to stop current media playback.
6148
6169
  */
6149
6170
  declare function closeCurrentMediaPlayer(pauseAudio?: boolean): void;
6150
- declare function sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string;
6151
6171
  declare function isMessageSentByMe(message: CometChat.BaseMessage, loggedInUser: CometChat.User): boolean;
6152
6172
  /**
6153
6173
  * Function to check if the current browser is safari.
@@ -6194,11 +6214,6 @@ declare const useDebouncedCallback: (callback: () => void, delay: number) => {
6194
6214
  declare function createMessageCopy(msg: CometChat.AIAssistantBaseEvent, user: CometChat.User, category?: string, type?: string): CometChat.BaseMessage;
6195
6215
  declare function createMessageCopyFromBaseMessage(msg: CometChat.BaseMessage, user: CometChat.User | undefined): CometChat.BaseMessage;
6196
6216
  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
6217
  /**
6203
6218
  * @function shouldShowCustomMimeTypes
6204
6219
  * @description Returns true if the device is running either iOS (iPhone, iPad, iPod) or macOS.
@@ -6410,13 +6425,11 @@ declare class CometChatUIKitUtility {
6410
6425
  */
6411
6426
  static checkMessageForExtensionsData: (message: CometChat.BaseMessage | null, extensionKey: string) => (object & MessageExtensionType) | undefined;
6412
6427
  /**
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.
6428
+ * Process and sanitize text to escape dangerous HTML while preserving mention formatting
6429
+ * @param text The text string that may contain HTML and mentions
6430
+ * @returns Sanitized string with dangerous HTML escaped but mentions preserved
6418
6431
  */
6419
- static sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string;
6432
+ static sanitizeText(text: string): string;
6420
6433
  static convertBlobToWav: (audioBlob: {
6421
6434
  arrayBuffer: () => any;
6422
6435
  }) => Promise<{
@@ -6887,5 +6900,5 @@ interface CometChatAIAssistantChatHistoryProps {
6887
6900
  }
6888
6901
  declare const CometChatAIAssistantChatHistory: (props: CometChatAIAssistantChatHistoryProps) => react_jsx_runtime.JSX.Element;
6889
6902
 
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 };
6903
+ 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
6904
  export type { IActiveChatChanged, IDialog, IGroupLeft, IGroupMemberAdded, IGroupMemberJoined, IGroupMemberKickedBanned, IGroupMemberScopeChanged, IGroupMemberUnBanned, IMentionsCountWarning, IMessages, IModal, IMouseEvent, IOpenChat, IOwnershipChanged, IPanel, IShowOngoingCall, IStreamData, LocalizationSettings, PollOptions };