@cometchat/chat-uikit-react 5.0.17 → 5.0.18

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
@@ -6129,6 +6129,11 @@ declare class UIKitSettings {
6129
6129
  * @type {ExtensionsDataSource}
6130
6130
  */
6131
6131
  readonly callingExtension?: CallingExtension;
6132
+ /**
6133
+ * Storage mode for persisting data.
6134
+ * @type {CometChat.StorageMode}
6135
+ */
6136
+ readonly storageMode: CometChat.StorageMode;
6132
6137
  /**
6133
6138
  * Private constructor to initialize the settings using the provided builder.
6134
6139
  * @param {UIKitSettingsBuilder} builder - The builder instance containing the settings configuration.
@@ -6190,6 +6195,11 @@ declare class UIKitSettings {
6190
6195
  * @returns {ExtensionsDataSource[]}
6191
6196
  */
6192
6197
  getCallsExtension(): ExtensionsDataSource;
6198
+ /**
6199
+ * Retrieves the storage mode.
6200
+ * @returns {CometChat.StorageMode} The storage mode.
6201
+ */
6202
+ getStorageMode(): CometChat.StorageMode;
6193
6203
  }
6194
6204
  declare class UIKitSettingsBuilder {
6195
6205
  /**
@@ -6258,6 +6268,11 @@ declare class UIKitSettingsBuilder {
6258
6268
  * @type {string}
6259
6269
  */
6260
6270
  clientHost?: string;
6271
+ /**
6272
+ * Storage mode for persisting data.
6273
+ * @type {CometChat.StorageMode}
6274
+ */
6275
+ storageMode?: CometChat.StorageMode;
6261
6276
  /**
6262
6277
  * Builds and returns an instance of UIKitSettings.
6263
6278
  * @returns {UIKitSettings} A new instance of UIKitSettings with the specified configuration.
@@ -6334,6 +6349,12 @@ declare class UIKitSettingsBuilder {
6334
6349
  * @returns {UIKitSettingsBuilder} The builder instance.
6335
6350
  */
6336
6351
  setCallsExtension(callingExtension: CallingExtension): UIKitSettingsBuilder;
6352
+ /**
6353
+ * Sets the storage mode.
6354
+ * @param {CometChat.StorageMode} storageMode - The storage mode.
6355
+ * @returns {UIKitSettingsBuilder} The builder instance.
6356
+ */
6357
+ setStorageMode(storageMode: CometChat.StorageMode): UIKitSettingsBuilder;
6337
6358
  }
6338
6359
 
6339
6360
  /**
@@ -11341,7 +11362,6 @@ declare const currentAudioPlayer: {
11341
11362
  * Function to stop current media playback.
11342
11363
  */
11343
11364
  declare function closeCurrentMediaPlayer(pauseAudio?: boolean): void;
11344
- declare function sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string;
11345
11365
  declare function isMessageSentByMe(message: CometChat.BaseMessage, loggedInUser: CometChat.User): boolean;
11346
11366
  /**
11347
11367
  * Function to check if the current browser is safari.
@@ -11375,11 +11395,6 @@ declare function isMobileDevice(): boolean;
11375
11395
  declare function fireClickEvent(): void;
11376
11396
  declare const decodeHTML: (input: string) => string;
11377
11397
  declare const sanitizeHtmlStringToFragment: (html: string, textFormatterArray?: CometChatTextFormatter[]) => DocumentFragment;
11378
- /**
11379
- * Sanitizes HTML content to only allow span tags while keeping everything else as plain text
11380
- * Also removes any script or executable content
11381
- */
11382
- declare const sanitizeToSpanOnly: (htmlString: string, regexPatterns: RegExp[][]) => string;
11383
11398
  /**
11384
11399
  * @function shouldShowCustomMimeTypes
11385
11400
  * @description Returns true if the device is running either iOS (iPhone, iPad, iPod) or macOS.
@@ -11575,13 +11590,11 @@ declare class CometChatUIKitUtility {
11575
11590
  */
11576
11591
  static checkMessageForExtensionsData: (message: CometChat.BaseMessage | null, extensionKey: string) => (object & MessageExtensionType) | undefined;
11577
11592
  /**
11578
- * Sanitizes an HTML string by escaping tags not matching the whitelist.
11579
- *
11580
- * @param htmlString - The HTML string to sanitize.
11581
- * @param whitelistRegExes - A list of regular expressions to match allowed tags.
11582
- * @returns The sanitized HTML string.
11593
+ * Process and sanitize text to escape dangerous HTML while preserving mention formatting
11594
+ * @param text The text string that may contain HTML and mentions
11595
+ * @returns Sanitized string with dangerous HTML escaped but mentions preserved
11583
11596
  */
11584
- static sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string;
11597
+ static sanitizeText(text: string): string;
11585
11598
  static convertBlobToWav: (audioBlob: {
11586
11599
  arrayBuffer: () => any;
11587
11600
  }) => Promise<{
@@ -11619,5 +11632,5 @@ declare function useRefSync<T>(value: T): React__default.MutableRefObject<T>;
11619
11632
  declare function useStateRef<T>(initialValue: T): [T, (node: T) => void];
11620
11633
  declare function useCometChatErrorHandler(onError?: ((error: CometChat.CometChatException) => void) | null): (error: unknown, source?: string) => void;
11621
11634
 
11622
- export { AuxiliaryButtonAlignment, ButtonAction, 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, CometChatSearchBar, CometChatTextBubble, CometChatTextFormatter, CometChatThreadedMessagePreview, CometChatToast, CometChatUIEvents, CometChatUIKit, CometChatUIKitCalls, CometChatUIKitConstants, CometChatUIKitLoginListener, CometChatUIKitUtility, CometChatUrlsFormatter, CometChatUserEvents, CometChatUserMemberWrapper, CometChatUsers, CometChatUtilityConstants, CometChatVideoBubble, ConversationUtils, DataSource, DataSourceDecorator, DatePatterns, 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, getCallStatusWithType, getThemeMode, getThemeVariable, isMessageSentByMe, isMissedCall, isMobileDevice, isSafari, isSentByMe, isURL, localize, processFileForAudio, sanitizeHtml, sanitizeHtmlStringToFragment, sanitizeToSpanOnly, shouldShowCustomMimeTypes, useCometChatErrorHandler, useRefSync, useStateRef, verifyCallUser };
11635
+ export { AuxiliaryButtonAlignment, ButtonAction, 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, CometChatSearchBar, CometChatTextBubble, CometChatTextFormatter, CometChatThreadedMessagePreview, CometChatToast, CometChatUIEvents, CometChatUIKit, CometChatUIKitCalls, CometChatUIKitConstants, CometChatUIKitLoginListener, CometChatUIKitUtility, CometChatUrlsFormatter, CometChatUserEvents, CometChatUserMemberWrapper, CometChatUsers, CometChatUtilityConstants, CometChatVideoBubble, ConversationUtils, DataSource, DataSourceDecorator, DatePatterns, 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, getCallStatusWithType, getThemeMode, getThemeVariable, isMessageSentByMe, isMissedCall, isMobileDevice, isSafari, isSentByMe, isURL, localize, processFileForAudio, sanitizeHtmlStringToFragment, shouldShowCustomMimeTypes, useCometChatErrorHandler, useRefSync, useStateRef, verifyCallUser };
11623
11636
  export type { IActiveChatChanged, IDialog, IGroupLeft, IGroupMemberAdded, IGroupMemberJoined, IGroupMemberKickedBanned, IGroupMemberScopeChanged, IGroupMemberUnBanned, IMentionsCountWarning, IMessages, IModal, IMouseEvent, IOpenChat, IOwnershipChanged, IPanel, IShowOngoingCall, PollOptions };