@cometchat/chat-uikit-react 5.0.12 → 5.0.13

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.
@@ -82,6 +82,9 @@
82
82
 
83
83
  /* Media query for screens with a max width of 600px */
84
84
  @media (max-width: 600px) {
85
+ .cometchat-outgoing-call{
86
+ padding: var(--cometchat-spacing-20) var(--cometchat-spacing-5) var(--cometchat-spacing-15) var(--cometchat-spacing-5);
87
+ }
85
88
 
86
89
  /* Font size for avatar text in smaller screens */
87
90
  .cometchat-outgoing-call__avatar .cometchat-avatar__text {
@@ -103,9 +106,13 @@
103
106
  .cometchat-outgoing-call__subtitle {
104
107
  font: var(--cometchat-font-body-regular);
105
108
  }
109
+ .cometchat-outgoing-call__avatar{
110
+ margin-bottom: auto;
111
+ margin-top: var(--cometchat-margin-10);
112
+ }
106
113
 
107
114
  /* Size and border radius adjustment for the container in smaller screens */
108
- .cometchat-outgoing-call {
115
+ .cometchat-outgoing-call,.cometchat:has(> .cometchat-outgoing-call) {
109
116
  height: 100%;
110
117
  width: 100%;
111
118
  border-radius: 0;
@@ -82,6 +82,9 @@
82
82
 
83
83
  /* Media query for screens with a max width of 600px */
84
84
  @media (max-width: 600px) {
85
+ .cometchat-outgoing-call{
86
+ padding: var(--cometchat-spacing-20) var(--cometchat-spacing-5) var(--cometchat-spacing-15) var(--cometchat-spacing-5);
87
+ }
85
88
 
86
89
  /* Font size for avatar text in smaller screens */
87
90
  .cometchat-outgoing-call__avatar .cometchat-avatar__text {
@@ -103,9 +106,13 @@
103
106
  .cometchat-outgoing-call__subtitle {
104
107
  font: var(--cometchat-font-body-regular);
105
108
  }
109
+ .cometchat-outgoing-call__avatar{
110
+ margin-bottom: auto;
111
+ margin-top: var(--cometchat-margin-10);
112
+ }
106
113
 
107
114
  /* Size and border radius adjustment for the container in smaller screens */
108
- .cometchat-outgoing-call {
115
+ .cometchat-outgoing-call,.cometchat:has(> .cometchat-outgoing-call) {
109
116
  height: 100%;
110
117
  width: 100%;
111
118
  border-radius: 0;
@@ -168,6 +168,7 @@ export type Action = {
168
168
  groupMembersManager?: GroupMembersManager | null;
169
169
  onEmpty?: () => void;
170
170
  disableLoadingState?: boolean;
171
+ hasScrolled?: boolean;
171
172
  } | {
172
173
  type: "setGroupMemberList";
173
174
  groupMemberList: CometChat.GroupMember[];
@@ -9,6 +9,7 @@ type Args = {
9
9
  mySetAddToMsgInputText: (text: string) => void;
10
10
  errorHandler: (error: unknown, source?: string) => void;
11
11
  pasteHtmlAtCaret: (text: string) => void;
12
+ renderSanitizedHtml: (text: string) => void;
12
13
  textFormatters: Array<CometChatTextFormatter>;
13
14
  disableMentions: boolean;
14
15
  textFormatterArray: Array<CometChatTextFormatter>;
@@ -40,7 +40,7 @@ export declare class MessagesDataSource implements DataSource {
40
40
  getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
41
41
  getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
42
42
  getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
43
- getReceiptClass(status?: number): "error" | "wait" | "read" | "delivered" | "sent" | undefined;
43
+ getReceiptClass(status?: number): "error" | "read" | "wait" | "delivered" | "sent" | undefined;
44
44
  /**
45
45
  * Function to get receipt for message bubble
46
46
  * @param {CometChat.BaseMessage} item - The message bubble for which the receipt needs to be fetched
@@ -1,4 +1,5 @@
1
1
  import WaveSurfer from "../components/BaseComponents/CometChatAudioBubble/src/wavesurfer";
2
+ import { CometChatTextFormatter } from "../formatters";
2
3
  interface MediaPlayer {
3
4
  video?: HTMLVideoElement | null;
4
5
  mediaRecorder?: MediaRecorder | null;
@@ -48,4 +49,10 @@ export declare function formatDateFromTimestamp(timestamp: number): string;
48
49
  export declare function isMobileDevice(): boolean;
49
50
  export declare function fireClickEvent(): void;
50
51
  export declare const decodeHTML: (input: string) => string;
52
+ 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;
51
58
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/chat-uikit-react",
3
- "version": "5.0.12",
3
+ "version": "5.0.13",
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.0.13",
11
+ "@cometchat/chat-sdk-javascript": "^4.1.1",
12
12
  "@rollup/plugin-json": "^6.1.0",
13
13
  "rxjs": "^7.8.1"
14
14
  },