@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.
@@ -740,7 +740,10 @@
740
740
 
741
741
  }
742
742
 
743
-
743
+ .cometchat-search__messages-leading-view-link > img {
744
+ height: 32px;
745
+ width: 32px;
746
+ }
744
747
 
745
748
  .cometchat-search__messages-leading-view-audio.cometchat-search__messages-leading-view {
746
749
  background-color: var(--cometchat-primary-color, #6852D6);
@@ -740,7 +740,10 @@
740
740
 
741
741
  }
742
742
 
743
-
743
+ .cometchat-search__messages-leading-view-link > img {
744
+ height: 32px;
745
+ width: 32px;
746
+ }
744
747
 
745
748
  .cometchat-search__messages-leading-view-audio.cometchat-search__messages-leading-view {
746
749
  background-color: var(--cometchat-primary-color, #6852D6);
@@ -61,13 +61,11 @@ export declare class CometChatUIKitUtility {
61
61
  */
62
62
  static checkMessageForExtensionsData: (message: CometChat.BaseMessage | null, extensionKey: string) => (object & MessageExtensionType) | undefined;
63
63
  /**
64
- * Sanitizes an HTML string by escaping tags not matching the whitelist.
65
- *
66
- * @param htmlString - The HTML string to sanitize.
67
- * @param whitelistRegExes - A list of regular expressions to match allowed tags.
68
- * @returns The sanitized HTML string.
64
+ * Process and sanitize text to escape dangerous HTML while preserving mention formatting
65
+ * @param text The text string that may contain HTML and mentions
66
+ * @returns Sanitized string with dangerous HTML escaped but mentions preserved
69
67
  */
70
- static sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string;
68
+ static sanitizeText(text: string): string;
71
69
  static convertBlobToWav: (audioBlob: {
72
70
  arrayBuffer: () => any;
73
71
  }) => Promise<{
@@ -74,6 +74,11 @@ export declare class UIKitSettings {
74
74
  * @type {ExtensionsDataSource}
75
75
  */
76
76
  readonly callingExtension?: CallingExtension;
77
+ /**
78
+ * Storage mode for persisting data.
79
+ * @type {CometChat.StorageMode}
80
+ */
81
+ readonly storageMode: CometChat.StorageMode;
77
82
  /**
78
83
  * Private constructor to initialize the settings using the provided builder.
79
84
  * @param {UIKitSettingsBuilder} builder - The builder instance containing the settings configuration.
@@ -135,6 +140,11 @@ export declare class UIKitSettings {
135
140
  * @returns {ExtensionsDataSource[]}
136
141
  */
137
142
  getCallsExtension(): ExtensionsDataSource;
143
+ /**
144
+ * Retrieves the storage mode.
145
+ * @returns {CometChat.StorageMode} The storage mode.
146
+ */
147
+ getStorageMode(): CometChat.StorageMode;
138
148
  }
139
149
  export declare class UIKitSettingsBuilder {
140
150
  /**
@@ -203,6 +213,11 @@ export declare class UIKitSettingsBuilder {
203
213
  * @type {string}
204
214
  */
205
215
  clientHost?: string;
216
+ /**
217
+ * Storage mode for persisting data.
218
+ * @type {CometChat.StorageMode}
219
+ */
220
+ storageMode?: CometChat.StorageMode;
206
221
  /**
207
222
  * Builds and returns an instance of UIKitSettings.
208
223
  * @returns {UIKitSettings} A new instance of UIKitSettings with the specified configuration.
@@ -279,4 +294,10 @@ export declare class UIKitSettingsBuilder {
279
294
  * @returns {UIKitSettingsBuilder} The builder instance.
280
295
  */
281
296
  setCallsExtension(callingExtension: CallingExtension): UIKitSettingsBuilder;
297
+ /**
298
+ * Sets the storage mode.
299
+ * @param {CometChat.StorageMode} storageMode - The storage mode.
300
+ * @returns {UIKitSettingsBuilder} The builder instance.
301
+ */
302
+ setStorageMode(storageMode: CometChat.StorageMode): UIKitSettingsBuilder;
282
303
  }
@@ -2,5 +2,5 @@ import { CometChatTextFormatter } from "../../../formatters/CometChatFormatters/
2
2
  export declare const useCometChatTextBubble: (props: {
3
3
  textFormatters: Array<CometChatTextFormatter>;
4
4
  }) => {
5
- pasteHtml: (textElement: HTMLElement, text: string) => void;
5
+ appendTextInHtml: (textElement: HTMLElement, text: string) => void;
6
6
  };
@@ -17,7 +17,6 @@ export declare const currentAudioPlayer: {
17
17
  * Function to stop current media playback.
18
18
  */
19
19
  export declare function closeCurrentMediaPlayer(pauseAudio?: boolean): void;
20
- export declare function sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string;
21
20
  export declare function isMessageSentByMe(message: CometChat.BaseMessage, loggedInUser: CometChat.User): boolean;
22
21
  /**
23
22
  * Function to check if the current browser is safari.
@@ -64,11 +63,6 @@ export declare const useDebouncedCallback: (callback: () => void, delay: number)
64
63
  export declare function createMessageCopy(msg: CometChat.AIAssistantBaseEvent, user: CometChat.User, category?: string, type?: string): CometChat.BaseMessage;
65
64
  export declare function createMessageCopyFromBaseMessage(msg: CometChat.BaseMessage, user: CometChat.User | undefined): CometChat.BaseMessage;
66
65
  export declare function isDarkMode(): boolean;
67
- /**
68
- * Sanitizes HTML content to only allow span tags while keeping everything else as plain text
69
- * Also removes any script or executable content
70
- */
71
- export declare const sanitizeToSpanOnly: (htmlString: string, regexPatterns: RegExp[][]) => string;
72
66
  /**
73
67
  * @function shouldShowCustomMimeTypes
74
68
  * @description Returns true if the device is running either iOS (iPhone, iPad, iPod) or macOS.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/chat-uikit-react",
3
- "version": "6.3.2",
3
+ "version": "6.3.3",
4
4
  "description": "Ready-to-use Chat UI Components for React(Javascript/Web)",
5
5
  "author": "CometChat",
6
6
  "exports": {
@@ -8,7 +8,7 @@
8
8
  "./css-variables.css": "./dist/styles/css-variables.css"
9
9
  },
10
10
  "dependencies": {
11
- "@cometchat/chat-sdk-javascript": "^4.1.2",
11
+ "@cometchat/chat-sdk-javascript": "^4.1.3",
12
12
  "@rollup/plugin-json": "^6.1.0",
13
13
  "rxjs": "^7.8.1",
14
14
  "react-markdown": "^10.1.0",