@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 +26 -13
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/CometChatUIKit/CometChatUIKitUtility.d.ts +4 -6
- package/dist/types/CometChatUIKit/UIKitSettings.d.ts +21 -0
- package/dist/types/components/BaseComponents/CometChatTextBubble/useCometChatTextBubble.d.ts +1 -1
- package/dist/types/utils/util.d.ts +0 -6
- package/package.json +2 -2
|
@@ -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
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* @
|
|
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
|
|
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
|
}
|
package/dist/types/components/BaseComponents/CometChatTextBubble/useCometChatTextBubble.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { CometChatTextFormatter } from "../../../formatters/CometChatFormatters/
|
|
|
2
2
|
export declare const useCometChatTextBubble: (props: {
|
|
3
3
|
textFormatters: Array<CometChatTextFormatter>;
|
|
4
4
|
}) => {
|
|
5
|
-
|
|
5
|
+
appendTextInHtml: (textElement: HTMLElement, text: string) => void;
|
|
6
6
|
};
|
|
@@ -16,7 +16,6 @@ export declare const currentAudioPlayer: {
|
|
|
16
16
|
* Function to stop current media playback.
|
|
17
17
|
*/
|
|
18
18
|
export declare function closeCurrentMediaPlayer(pauseAudio?: boolean): void;
|
|
19
|
-
export declare function sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string;
|
|
20
19
|
export declare function isMessageSentByMe(message: CometChat.BaseMessage, loggedInUser: CometChat.User): boolean;
|
|
21
20
|
/**
|
|
22
21
|
* Function to check if the current browser is safari.
|
|
@@ -50,11 +49,6 @@ export declare function isMobileDevice(): boolean;
|
|
|
50
49
|
export declare function fireClickEvent(): void;
|
|
51
50
|
export declare const decodeHTML: (input: string) => string;
|
|
52
51
|
export declare const sanitizeHtmlStringToFragment: (html: string, textFormatterArray?: CometChatTextFormatter[]) => DocumentFragment;
|
|
53
|
-
/**
|
|
54
|
-
* Sanitizes HTML content to only allow span tags while keeping everything else as plain text
|
|
55
|
-
* Also removes any script or executable content
|
|
56
|
-
*/
|
|
57
|
-
export declare const sanitizeToSpanOnly: (htmlString: string, regexPatterns: RegExp[][]) => string;
|
|
58
52
|
/**
|
|
59
53
|
* @function shouldShowCustomMimeTypes
|
|
60
54
|
* @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": "5.0.
|
|
3
|
+
"version": "5.0.18",
|
|
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.
|
|
11
|
+
"@cometchat/chat-sdk-javascript": "^4.1.3",
|
|
12
12
|
"@rollup/plugin-json": "^6.1.0",
|
|
13
13
|
"rxjs": "^7.8.1"
|
|
14
14
|
},
|