@cometchat/chat-uikit-react 6.3.5 → 6.3.7
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/assets/file_unsupported.svg +3 -0
- package/dist/assets/mark_unread.svg +3 -0
- package/dist/index.d.ts +47 -32
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/styles/CometChatConversations.css +7 -0
- package/dist/styles/CometChatMessageBubble.css +12 -0
- package/dist/styles/CometChatMessageList.css +21 -0
- package/dist/styles/CometChatMessagePreview.css +7 -0
- package/dist/styles/CometChatModerationView.css +1 -0
- package/dist/styles/components/CometChatConversations.css +7 -0
- package/dist/styles/components/CometChatMessageBubble.css +12 -0
- package/dist/styles/components/CometChatMessageList.css +21 -0
- package/dist/styles/components/CometChatMessagePreview.css +7 -0
- package/dist/styles/components/CometChatModerationView.css +1 -0
- package/dist/types/components/CometChatConversations/CometChatConversations.d.ts +6 -0
- package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +11 -1
- package/dist/types/components/CometChatMessageList/CometChatMessageListController.d.ts +6 -0
- package/dist/types/components/CometChatSearch/useCometChatSearchConversationsList.d.ts +6 -0
- package/dist/types/constants/CometChatUIKitConstants.d.ts +1 -0
- package/dist/types/events/CometChatConversationEvents.d.ts +2 -0
- package/dist/types/utils/MessagesDataSource.d.ts +2 -0
- package/package.json +2 -2
|
@@ -238,6 +238,13 @@ box-sizing: border-box;
|
|
|
238
238
|
mask-size: contain;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
+
.cometchat-conversations__subtitle-icon-unsupported {
|
|
242
|
+
-webkit-mask: url("../../assets/file_unsupported.svg") center center no-repeat;
|
|
243
|
+
mask: url("../../assets/file_unsupported.svg") center center no-repeat;
|
|
244
|
+
-webkit-mask-size: contain;
|
|
245
|
+
mask-size: contain;
|
|
246
|
+
}
|
|
247
|
+
|
|
241
248
|
.cometchat-conversations__subtitle-icon-thread {
|
|
242
249
|
-webkit-mask: url("../../assets/conversations_thread.svg") center center no-repeat;
|
|
243
250
|
mask: url("../../assets/conversations_thread.svg") center center no-repeat;
|
|
@@ -16,6 +16,18 @@
|
|
|
16
16
|
width: 100%;
|
|
17
17
|
margin-bottom: 5px;
|
|
18
18
|
}
|
|
19
|
+
|
|
20
|
+
.cometchat-message-bubble .cometchat-menu-list__sub-menu-list{
|
|
21
|
+
height: auto;
|
|
22
|
+
max-height: 216px;
|
|
23
|
+
overflow: auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.cometchat-message-bubble .cometchat-menu-list__sub-menu-list::-webkit-scrollbar,
|
|
27
|
+
.cometchat-message-bubble .cometchat-menu-list__sub-menu-list::-webkit-scrollbar-thumb {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
19
31
|
.cometchat-message-bubble .cometchat-reactions{
|
|
20
32
|
width: 100%;
|
|
21
33
|
margin-top: -4px;
|
|
@@ -753,6 +753,27 @@
|
|
|
753
753
|
max-height: 100%;
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
+
.cometchat-message-list__new-message-divider {
|
|
757
|
+
display: flex;
|
|
758
|
+
align-items: center;
|
|
759
|
+
justify-content: center;
|
|
760
|
+
gap: var(--cometchat-spacing-4);
|
|
761
|
+
width: 100%;
|
|
762
|
+
padding: var(--cometchat-margin-4) var(--cometchat-spacing-7);
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.cometchat-message-list__new-message-divider span{
|
|
766
|
+
text-wrap: nowrap;
|
|
767
|
+
font: var(--cometchat-font-body-medium);
|
|
768
|
+
color: var(--cometchat-error-color);
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.cometchat-message-list__new-message-divider div {
|
|
772
|
+
width: 100%;
|
|
773
|
+
height: 1px;
|
|
774
|
+
background-color: var(--cometchat-error-color);
|
|
775
|
+
}
|
|
776
|
+
|
|
756
777
|
@keyframes backgroundFade {
|
|
757
778
|
0% { background-color: var(--cometchat-extended-primary-color-200); }
|
|
758
779
|
50% { background-color: var(--cometchat-extended-primary-color-100); }
|
|
@@ -270,6 +270,13 @@
|
|
|
270
270
|
mask-size: contain;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
+
.cometchat-message-preview__subtitle-icon-unsupported {
|
|
274
|
+
-webkit-mask: url("../../assets/file_unsupported.svg") center center no-repeat;
|
|
275
|
+
mask: url("../../assets/file_unsupported.svg") center center no-repeat;
|
|
276
|
+
-webkit-mask-size: contain;
|
|
277
|
+
mask-size: contain;
|
|
278
|
+
}
|
|
279
|
+
|
|
273
280
|
.cometchat-message-preview__subtitle-icon-none {
|
|
274
281
|
display: none;
|
|
275
282
|
}
|
|
@@ -238,6 +238,13 @@ box-sizing: border-box;
|
|
|
238
238
|
mask-size: contain;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
+
.cometchat-conversations__subtitle-icon-unsupported {
|
|
242
|
+
-webkit-mask: url("../../assets/file_unsupported.svg") center center no-repeat;
|
|
243
|
+
mask: url("../../assets/file_unsupported.svg") center center no-repeat;
|
|
244
|
+
-webkit-mask-size: contain;
|
|
245
|
+
mask-size: contain;
|
|
246
|
+
}
|
|
247
|
+
|
|
241
248
|
.cometchat-conversations__subtitle-icon-thread {
|
|
242
249
|
-webkit-mask: url("../../assets/conversations_thread.svg") center center no-repeat;
|
|
243
250
|
mask: url("../../assets/conversations_thread.svg") center center no-repeat;
|
|
@@ -16,6 +16,18 @@
|
|
|
16
16
|
width: 100%;
|
|
17
17
|
margin-bottom: 5px;
|
|
18
18
|
}
|
|
19
|
+
|
|
20
|
+
.cometchat-message-bubble .cometchat-menu-list__sub-menu-list{
|
|
21
|
+
height: auto;
|
|
22
|
+
max-height: 216px;
|
|
23
|
+
overflow: auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.cometchat-message-bubble .cometchat-menu-list__sub-menu-list::-webkit-scrollbar,
|
|
27
|
+
.cometchat-message-bubble .cometchat-menu-list__sub-menu-list::-webkit-scrollbar-thumb {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
19
31
|
.cometchat-message-bubble .cometchat-reactions{
|
|
20
32
|
width: 100%;
|
|
21
33
|
margin-top: -4px;
|
|
@@ -753,6 +753,27 @@
|
|
|
753
753
|
max-height: 100%;
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
+
.cometchat-message-list__new-message-divider {
|
|
757
|
+
display: flex;
|
|
758
|
+
align-items: center;
|
|
759
|
+
justify-content: center;
|
|
760
|
+
gap: var(--cometchat-spacing-4);
|
|
761
|
+
width: 100%;
|
|
762
|
+
padding: var(--cometchat-margin-4) var(--cometchat-spacing-7);
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.cometchat-message-list__new-message-divider span{
|
|
766
|
+
text-wrap: nowrap;
|
|
767
|
+
font: var(--cometchat-font-body-medium);
|
|
768
|
+
color: var(--cometchat-error-color);
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.cometchat-message-list__new-message-divider div {
|
|
772
|
+
width: 100%;
|
|
773
|
+
height: 1px;
|
|
774
|
+
background-color: var(--cometchat-error-color);
|
|
775
|
+
}
|
|
776
|
+
|
|
756
777
|
@keyframes backgroundFade {
|
|
757
778
|
0% { background-color: var(--cometchat-extended-primary-color-200); }
|
|
758
779
|
50% { background-color: var(--cometchat-extended-primary-color-100); }
|
|
@@ -270,6 +270,13 @@
|
|
|
270
270
|
mask-size: contain;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
+
.cometchat-message-preview__subtitle-icon-unsupported {
|
|
274
|
+
-webkit-mask: url("../../assets/file_unsupported.svg") center center no-repeat;
|
|
275
|
+
mask: url("../../assets/file_unsupported.svg") center center no-repeat;
|
|
276
|
+
-webkit-mask-size: contain;
|
|
277
|
+
mask-size: contain;
|
|
278
|
+
}
|
|
279
|
+
|
|
273
280
|
.cometchat-message-preview__subtitle-icon-none {
|
|
274
281
|
display: none;
|
|
275
282
|
}
|
|
@@ -224,6 +224,9 @@ export type Action = {
|
|
|
224
224
|
} | {
|
|
225
225
|
type: "resetUnreadCountAndSetReadAtIfLastMessage";
|
|
226
226
|
message: CometChat.BaseMessage;
|
|
227
|
+
} | {
|
|
228
|
+
type: "resetUnreadCount";
|
|
229
|
+
conversation: CometChat.Conversation;
|
|
227
230
|
} | {
|
|
228
231
|
type: "setLastMessageReadOrDeliveredAt";
|
|
229
232
|
updateReadAt: boolean;
|
|
@@ -234,6 +237,9 @@ export type Action = {
|
|
|
234
237
|
} | {
|
|
235
238
|
type: "setIsFirstReload";
|
|
236
239
|
isFirstReload: boolean;
|
|
240
|
+
} | {
|
|
241
|
+
type: "updateConversation";
|
|
242
|
+
conversation: CometChat.Conversation;
|
|
237
243
|
};
|
|
238
244
|
/**
|
|
239
245
|
* Renders a scrollable list of conversations that has been created in a CometChat app
|
|
@@ -87,6 +87,11 @@ interface MessageListProps {
|
|
|
87
87
|
* @default false
|
|
88
88
|
*/
|
|
89
89
|
hideMessageInfoOption?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Shows the option to mark messages as unread.
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
showMarkAsUnreadOption?: boolean;
|
|
90
95
|
/**
|
|
91
96
|
* Hides avatars for messages.
|
|
92
97
|
* @default false
|
|
@@ -97,6 +102,11 @@ interface MessageListProps {
|
|
|
97
102
|
* @default false
|
|
98
103
|
*/
|
|
99
104
|
hideGroupActionMessages?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* If set to true, the message list will start from unread messages.
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
109
|
+
startFromUnreadMessages?: boolean;
|
|
100
110
|
/**
|
|
101
111
|
* Unique identifier of the parent message for displaying threaded conversations.
|
|
102
112
|
*/
|
|
@@ -137,7 +147,7 @@ interface MessageListProps {
|
|
|
137
147
|
scrollToBottomOnNewMessages?: boolean;
|
|
138
148
|
/**
|
|
139
149
|
* Specifies how many message options are visible in the main menu by default.
|
|
140
|
-
* @default
|
|
150
|
+
* @default 3
|
|
141
151
|
*/
|
|
142
152
|
quickOptionsCount?: number;
|
|
143
153
|
/**
|
|
@@ -32,6 +32,12 @@ export declare class MessageListManager {
|
|
|
32
32
|
* @returns {Promise}
|
|
33
33
|
*/
|
|
34
34
|
fetchPreviousMessages: () => Promise<CometChat.BaseMessage[] | []> | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Function to get the limit set in the messagesRequestBuilder.
|
|
37
|
+
*
|
|
38
|
+
* @returns {number | undefined}
|
|
39
|
+
*/
|
|
40
|
+
getLimit: () => number | undefined;
|
|
35
41
|
/**
|
|
36
42
|
* Function to attach the group and call listeners for a particular user/group. This listener is attached when the chat is opened and is removed once the chat is closed or when switching to a new chat, where it creates a new listener for the particular chat.
|
|
37
43
|
*
|
|
@@ -184,6 +184,9 @@ export type Action = {
|
|
|
184
184
|
} | {
|
|
185
185
|
type: "resetUnreadCountAndSetReadAtIfLastMessage";
|
|
186
186
|
message: CometChat.BaseMessage;
|
|
187
|
+
} | {
|
|
188
|
+
type: "resetUnreadCount";
|
|
189
|
+
conversation: CometChat.Conversation;
|
|
187
190
|
} | {
|
|
188
191
|
type: "setLastMessageReadOrDeliveredAt";
|
|
189
192
|
updateReadAt: boolean;
|
|
@@ -191,6 +194,9 @@ export type Action = {
|
|
|
191
194
|
} | {
|
|
192
195
|
type: "setHasMoreResults";
|
|
193
196
|
hasMoreResults: boolean;
|
|
197
|
+
} | {
|
|
198
|
+
type: "updateConversation";
|
|
199
|
+
conversation: CometChat.Conversation;
|
|
194
200
|
};
|
|
195
201
|
/**
|
|
196
202
|
* Hook for managing and rendering a list of conversations in the search component
|
|
@@ -59,6 +59,7 @@ export declare class CometChatUIKitConstants {
|
|
|
59
59
|
translateMessage: "translate";
|
|
60
60
|
reactToMessage: "react";
|
|
61
61
|
messageInformation: "messageInformation";
|
|
62
|
+
markAsUnread: "markAsUnread";
|
|
62
63
|
flagMessage: "flagMessage";
|
|
63
64
|
copyMessage: "copy";
|
|
64
65
|
shareMessage: "share";
|
|
@@ -4,6 +4,8 @@ import { Subject } from 'rxjs';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare class CometChatConversationEvents {
|
|
6
6
|
static ccConversationDeleted: Subject<CometChat.Conversation>;
|
|
7
|
+
static ccUpdateConversation: Subject<CometChat.Conversation>;
|
|
8
|
+
static ccMarkConversationAsRead: Subject<CometChat.Conversation>;
|
|
7
9
|
/**
|
|
8
10
|
* Publishes a conversation event.
|
|
9
11
|
* @param {Subject<CometChat.Conversation>} event - The event to publish.
|
|
@@ -25,6 +25,7 @@ export interface additionalParamsOptions {
|
|
|
25
25
|
hideDeleteMessageOption?: boolean;
|
|
26
26
|
hideMessagePrivatelyOption?: boolean;
|
|
27
27
|
hideCopyMessageOption?: boolean;
|
|
28
|
+
hideMarkAsUnreadOption?: boolean;
|
|
28
29
|
hideMessageInfoOption?: boolean;
|
|
29
30
|
hideFlagMessageOption?: boolean;
|
|
30
31
|
}
|
|
@@ -37,6 +38,7 @@ export declare class MessagesDataSource implements DataSource {
|
|
|
37
38
|
getSendMessagePrivatelyOption(): CometChatActionsIcon;
|
|
38
39
|
getCopyOption(): CometChatActionsIcon;
|
|
39
40
|
getMessageInfoOption(): CometChatActionsIcon;
|
|
41
|
+
getMarkAsUnreadOption(): CometChatActionsIcon;
|
|
40
42
|
getReportOption(): CometChatActionsIcon;
|
|
41
43
|
isSentByMe(loggedInUser: CometChat.User, message: CometChat.BaseMessage): boolean;
|
|
42
44
|
getTextMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: additionalParamsOptions): Array<CometChatActionsIcon | CometChatActionsView>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cometchat/chat-uikit-react",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.7",
|
|
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.6",
|
|
12
12
|
"@rollup/plugin-json": "^6.1.0",
|
|
13
13
|
"rxjs": "^7.8.1",
|
|
14
14
|
"react-markdown": "^10.1.0",
|