@cometchat/chat-uikit-react 6.2.0 → 6.2.2
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/message_blocked.svg +8 -0
- package/dist/index.d.ts +235 -206
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/styles/CometChatAIAssistantChat.css +13 -4
- package/dist/styles/CometChatAIAssistantChatHistory.css +100 -1
- package/dist/styles/CometChatAIAssistantMessageBubble.css +49 -17
- package/dist/styles/CometChatConversations.css +20 -1
- package/dist/styles/CometChatMessageList.css +30 -15
- package/dist/styles/CometChatModerationView.css +25 -0
- package/dist/styles/CometChatSearch.css +13 -0
- package/dist/styles/CometChatStreamMessageBubble.css +48 -19
- package/dist/styles/components/CometChatAIAssistantChat.css +13 -4
- package/dist/styles/components/CometChatAIAssistantChatHistory.css +100 -1
- package/dist/styles/components/CometChatAIAssistantMessageBubble.css +49 -17
- package/dist/styles/components/CometChatConversations.css +20 -1
- package/dist/styles/components/CometChatMessageList.css +30 -15
- package/dist/styles/components/CometChatModerationView.css +25 -0
- package/dist/styles/components/CometChatSearch.css +13 -0
- package/dist/styles/components/CometChatStreamMessageBubble.css +48 -19
- package/dist/styles/components/index.css +1 -0
- package/dist/styles/index.css +1 -0
- package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts +1 -0
- package/dist/types/components/BaseComponents/CometChatModerationView/CometChatModerationView.d.ts +2 -0
- package/dist/types/components/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.d.ts +4 -0
- package/dist/types/components/CometChatMessageComposer/useCometChatMessageComposer.d.ts +1 -0
- package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +20 -15
- package/dist/types/constants/CometChatUIKitConstants.d.ts +6 -0
- package/dist/types/events/CometChatMessageEvents.d.ts +1 -0
- package/dist/types/utils/MessageReceiptUtils.d.ts +1 -1
- package/dist/types/utils/MessageUtils.d.ts +6 -0
- package/dist/types/utils/util.d.ts +7 -0
- package/package.json +4 -3
|
@@ -54,27 +54,12 @@
|
|
|
54
54
|
|
|
55
55
|
.cometchat-ai-assistant-message-bubble__code-block {
|
|
56
56
|
max-height: 300px;
|
|
57
|
-
overflow:
|
|
57
|
+
overflow: auto;
|
|
58
58
|
border: 1px solid var(--cometchat-border-color-default);
|
|
59
|
+
width: 100%;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
@media (min-width: 620px) and (max-width: 780px) {
|
|
62
|
-
.cometchat-ai-assistant-message-bubble__code-block {
|
|
63
|
-
max-width: 600px;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@media (min-width: 480px) and (max-width: 619px) {
|
|
68
|
-
.cometchat-ai-assistant-message-bubble__code-block {
|
|
69
|
-
max-width: 400px;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
62
|
|
|
73
|
-
@media (min-width: 320px) and (max-width: 479px) {
|
|
74
|
-
.cometchat-ai-assistant-message-bubble__code-block {
|
|
75
|
-
max-width: 320px;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
63
|
|
|
79
64
|
.cometchat-ai-assistant-message-bubble *:not(pre *) {
|
|
80
65
|
color: var(--cometchat-text-color-primary);
|
|
@@ -83,4 +68,51 @@
|
|
|
83
68
|
}
|
|
84
69
|
.cometchat-ai-assistant-message-bubble .cometchat-ai-assistant-message-bubble__code-block,.cometchat-ai-assistant-message-bubble .cometchat-ai-assistant-message-bubble__code-block *{
|
|
85
70
|
font-size: 14px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.cometchat-ai-assistant-message-bubble__code-block::-webkit-scrollbar {
|
|
74
|
+
width: 0px;
|
|
75
|
+
height: 8px;
|
|
76
|
+
background: transparent;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.cometchat-ai-assistant-message-bubble__code-block::-webkit-scrollbar-track {
|
|
80
|
+
background: transparent;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.cometchat-ai-assistant-message-bubble__code-block::-webkit-scrollbar-thumb {
|
|
84
|
+
background: var(--cometchat-icon-color-secondary);
|
|
85
|
+
border-radius: var(--cometchat-radius-2);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.cometchat-ai-assistant-message-bubble table {
|
|
89
|
+
width: 100%;
|
|
90
|
+
border-collapse: collapse;
|
|
91
|
+
table-layout: auto;
|
|
92
|
+
display: block;
|
|
93
|
+
overflow-x: auto;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.cometchat-ai-assistant-message-bubble th,
|
|
97
|
+
.cometchat-ai-assistant-message-bubble td {
|
|
98
|
+
padding: var(--cometchat-padding-2);
|
|
99
|
+
border: 1px solid var(--cometchat-border-color-light);
|
|
100
|
+
text-align: left;
|
|
101
|
+
word-break: break-word; /* prevents text overflow in cells */
|
|
102
|
+
min-width: 100px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.cometchat-ai-assistant-message-bubble table::-webkit-scrollbar {
|
|
106
|
+
width: 0px;
|
|
107
|
+
height: 8px;
|
|
108
|
+
background: transparent;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.cometchat-ai-assistant-message-bubble table::-webkit-scrollbar-track {
|
|
112
|
+
background: transparent;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.cometchat-ai-assistant-message-bubble table::-webkit-scrollbar-thumb {
|
|
116
|
+
background: var(--cometchat-icon-color-secondary);
|
|
117
|
+
border-radius: var(--cometchat-radius-2);
|
|
86
118
|
}
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
background: var(--cometchat-background-color-01, #FFF);
|
|
11
11
|
position: relative;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
.cometchat-conversations .cometchat-conversations-header{
|
|
14
|
+
min-height: 64px;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
14
17
|
.cometchat-conversations .cometchat-list__body>div:not([class]):first-child {
|
|
15
18
|
display: none;
|
|
16
19
|
}
|
|
@@ -56,6 +59,22 @@
|
|
|
56
59
|
mask-size: contain;
|
|
57
60
|
}
|
|
58
61
|
|
|
62
|
+
|
|
63
|
+
.cometchat-conversations__subtitle-receipts-wait{
|
|
64
|
+
-webkit-mask: url("../../assets/status_sending.svg") center center no-repeat;
|
|
65
|
+
mask: url("../../assets/status_sending.svg") center center no-repeat;
|
|
66
|
+
-webkit-mask-size: contain;
|
|
67
|
+
mask-size: contain;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.cometchat-conversations__subtitle-receipts-error{
|
|
71
|
+
-webkit-mask: url("../../assets/error_icon.svg") center center no-repeat;
|
|
72
|
+
mask: url("../../assets/error_icon.svg") center center no-repeat;
|
|
73
|
+
-webkit-mask-size: contain;
|
|
74
|
+
mask-size: contain;
|
|
75
|
+
background-color: var(--cometchat-error-color);
|
|
76
|
+
}
|
|
77
|
+
|
|
59
78
|
.cometchat-conversations__subtitle-receipts-delivered{
|
|
60
79
|
-webkit-mask: url("../../assets/conversations_delivered.svg") center center no-repeat;
|
|
61
80
|
mask: url("../../assets/conversations_delivered.svg") center center no-repeat;
|
|
@@ -144,31 +144,32 @@
|
|
|
144
144
|
padding: var(--cometchat-padding-2, 8px) var(--cometchat-padding-2, 8px) var(--cometchat-padding-3, 12px) var(--cometchat-padding-2, 8px);
|
|
145
145
|
;
|
|
146
146
|
}
|
|
147
|
-
.cometchat-fullscreen-viewer .cometchat-fullscreen-viewer__body-image{
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
.cometchat-fullscreen-viewer .cometchat-fullscreen-viewer__body-image {
|
|
148
|
+
max-width: 100%;
|
|
149
|
+
max-height: 84vh;
|
|
150
|
+
object-fit: contain;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.cometchat-message-bubble__audio-call .cometchat-call-bubble .cometchat-call-bubble__body {
|
|
154
154
|
padding: 0;
|
|
155
155
|
}
|
|
156
|
-
.cometchat-message-bubble__thread-view-replies .cometchat-button{
|
|
156
|
+
.cometchat-message-bubble__thread-view-replies .cometchat-button {
|
|
157
157
|
align-items: flex-end;
|
|
158
|
-
|
|
158
|
+
|
|
159
159
|
}
|
|
160
|
-
.cometchat-reactions-info-wrapper
|
|
161
|
-
width:fit-content;
|
|
160
|
+
.cometchat-reactions-info-wrapper>.cometchat {
|
|
161
|
+
width: fit-content;
|
|
162
162
|
}
|
|
163
|
-
.cometchat-message-bubble__thread-view-replies .cometchat-button .cometchat-button__text{
|
|
163
|
+
.cometchat-message-bubble__thread-view-replies .cometchat-button .cometchat-button__text {
|
|
164
164
|
margin-bottom: -2px;
|
|
165
165
|
}
|
|
166
|
-
.cometchat-message-bubble__body-footer-view .cometchat-reactions
|
|
166
|
+
.cometchat-message-bubble__body-footer-view .cometchat-reactions .cometchat {
|
|
167
167
|
width: fit-content;
|
|
168
168
|
}
|
|
169
|
-
.cometchat-reactions
|
|
170
|
-
width: fit-content;
|
|
169
|
+
.cometchat-reactions .cometchat-popover, .cometchat-reactions .cometchat-popover__button{
|
|
170
|
+
width: fit-content;
|
|
171
171
|
}
|
|
172
|
+
|
|
172
173
|
/* Date header inside message list */
|
|
173
174
|
.cometchat-message-list__date-header {
|
|
174
175
|
position: absolute;
|
|
@@ -416,6 +417,20 @@ width: fit-content;
|
|
|
416
417
|
|
|
417
418
|
}
|
|
418
419
|
|
|
420
|
+
.cometchat-message-list__bubble-moderation-disapproved .cometchat-message-bubble__body {
|
|
421
|
+
border-bottom-left-radius: 0;
|
|
422
|
+
border-bottom-right-radius: 0;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
.cometchat-message-list__bubble-moderation-disapproved .cometchat-message-bubble__body-content-view .cometchat-video-bubble{
|
|
427
|
+
min-width: 240px;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.cometchat-message-list__bubble-moderation-disapproved .cometchat-message-bubble__body-content-view .cometchat-image-bubble{
|
|
431
|
+
min-width: 240px;
|
|
432
|
+
}
|
|
433
|
+
|
|
419
434
|
/* Status view for "delivered" receipt inside message bubble */
|
|
420
435
|
.cometchat-message-bubble__status-info-view-receipts-delivered .cometchat-message-list__receipt {
|
|
421
436
|
-webkit-mask: url("../../assets/status_delivered.svg") center center no-repeat;
|
|
@@ -429,7 +444,7 @@ width: fit-content;
|
|
|
429
444
|
-webkit-mask: url("../../assets/status_read.svg") center center no-repeat;
|
|
430
445
|
-webkit-mask-size: contain;
|
|
431
446
|
background: var(--cometchat-message-seen-color,#56E8A7);
|
|
432
|
-
|
|
447
|
+
|
|
433
448
|
|
|
434
449
|
}
|
|
435
450
|
|
|
@@ -665,7 +680,7 @@ width: fit-content;
|
|
|
665
680
|
|
|
666
681
|
}
|
|
667
682
|
|
|
668
|
-
|
|
683
|
+
/**
|
|
669
684
|
* Setting transparent background and gap for sticker message bubble
|
|
670
685
|
*/
|
|
671
686
|
.cometchat-message-bubble__body-wrapper .cometchat-message-bubble__sticker-message {
|
|
@@ -709,7 +724,7 @@ width: fit-content;
|
|
|
709
724
|
.cometchat-message-information__popup-wrapper {
|
|
710
725
|
display: flex;
|
|
711
726
|
position: fixed;
|
|
712
|
-
z-index:
|
|
727
|
+
z-index: 3;
|
|
713
728
|
left: 0;
|
|
714
729
|
top: 0;
|
|
715
730
|
width: 100%;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* Bottom view for "blocked" messages inside message bubble */
|
|
2
|
+
.cometchat-moderation-status__icon{
|
|
3
|
+
min-width: 16px;
|
|
4
|
+
min-height: 16px;
|
|
5
|
+
-webkit-mask: url("../../assets/message_blocked.svg") center center no-repeat;
|
|
6
|
+
-webkit-mask-size: contain;
|
|
7
|
+
background-color: var(--cometchat-error-color);
|
|
8
|
+
display: inline-block;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.cometchat-moderation-status {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
align-items: flex-start;
|
|
15
|
+
background-color: var(--cometchat-error-color-100);
|
|
16
|
+
padding: var(--cometchat-padding-1) var(--cometchat-padding-2);
|
|
17
|
+
gap: var(--cometchat-spacing-1, 4px);
|
|
18
|
+
border-radius: 0 0 var(--cometchat-radius-3, 12px) var(--cometchat-radius-3, 12px);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.cometchat-moderation-status .cometchat-moderation-status__message {
|
|
22
|
+
color: var(--cometchat-error-color, #F44649);
|
|
23
|
+
text-align: left;
|
|
24
|
+
font: var(--cometchat-font-body-regular);
|
|
25
|
+
}
|
|
@@ -231,6 +231,12 @@
|
|
|
231
231
|
-webkit-mask-size: contain;
|
|
232
232
|
mask-size: contain;
|
|
233
233
|
}
|
|
234
|
+
.cometchat-search__conversations-subtitle-receipts-wait{
|
|
235
|
+
-webkit-mask: url("../../assets/status_sending.svg") center center no-repeat;
|
|
236
|
+
mask: url("../../assets/status_sending.svg") center center no-repeat;
|
|
237
|
+
-webkit-mask-size: contain;
|
|
238
|
+
mask-size: contain;
|
|
239
|
+
}
|
|
234
240
|
|
|
235
241
|
.cometchat-search__conversations-subtitle-receipts-delivered {
|
|
236
242
|
-webkit-mask: url("../../assets/conversations_delivered.svg") center center no-repeat;
|
|
@@ -239,6 +245,13 @@
|
|
|
239
245
|
mask-size: contain;
|
|
240
246
|
}
|
|
241
247
|
|
|
248
|
+
.cometchat-search__conversations-subtitle-receipts-error{
|
|
249
|
+
-webkit-mask: url("../../assets/error_icon.svg") center center no-repeat;
|
|
250
|
+
mask: url("../../assets/error_icon.svg") center center no-repeat;
|
|
251
|
+
-webkit-mask-size: contain;
|
|
252
|
+
mask-size: contain;
|
|
253
|
+
background-color: var(--cometchat-error-color);
|
|
254
|
+
}
|
|
242
255
|
|
|
243
256
|
.cometchat-search__conversations-subtitle-receipts-read {
|
|
244
257
|
-webkit-mask: url("../../assets/conversations_read.svg") center center no-repeat;
|
|
@@ -64,28 +64,12 @@
|
|
|
64
64
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
.cometchat-stream-message-
|
|
67
|
+
.cometchat-stream-message-bubble__code-block {
|
|
68
68
|
max-height: 300px;
|
|
69
|
-
overflow:
|
|
69
|
+
overflow: auto;
|
|
70
70
|
border: 1px solid var(--cometchat-border-color-default);
|
|
71
|
-
|
|
71
|
+
width: 100%;
|
|
72
72
|
|
|
73
|
-
@media (min-width: 620px) and (max-width: 780px) {
|
|
74
|
-
.cometchat-stream-message-bubble pre>div {
|
|
75
|
-
/* max-width: 600px; */
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@media (min-width: 480px) and (max-width: 619px) {
|
|
80
|
-
.cometchat-stream-message-bubble pre>div {
|
|
81
|
-
/* max-width: 400px; */
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@media (min-width: 320px) and (max-width: 479px) {
|
|
86
|
-
.cometchat-stream-message-bubble pre>div {
|
|
87
|
-
/* max-width: 300px; */
|
|
88
|
-
}
|
|
89
73
|
}
|
|
90
74
|
|
|
91
75
|
.cometchat-stream-message-bubble *:not(pre *) {
|
|
@@ -142,7 +126,52 @@
|
|
|
142
126
|
border-radius: 0px;
|
|
143
127
|
color: var(--cometchat-text-color-secondary);
|
|
144
128
|
}
|
|
129
|
+
.cometchat-stream-message-bubble__code-block::-webkit-scrollbar {
|
|
130
|
+
width: 0px;
|
|
131
|
+
height: 8px;
|
|
132
|
+
background: transparent;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.cometchat-stream-message-bubble__code-block::-webkit-scrollbar-track {
|
|
136
|
+
background: transparent;
|
|
137
|
+
}
|
|
145
138
|
|
|
139
|
+
.cometchat-stream-message-bubble__code-block::-webkit-scrollbar-thumb {
|
|
140
|
+
background: var(--cometchat-icon-color-secondary);
|
|
141
|
+
border-radius: 4px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.cometchat-stream-message-bubble table {
|
|
145
|
+
width: 100%;
|
|
146
|
+
border-collapse: collapse;
|
|
147
|
+
table-layout: auto;
|
|
148
|
+
display: block;
|
|
149
|
+
overflow-x: auto;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.cometchat-stream-message-bubble th,
|
|
153
|
+
.cometchat-stream-message-bubble td {
|
|
154
|
+
padding: var(--cometchat-padding-2);
|
|
155
|
+
border: 1px solid var(--cometchat-border-color-light);
|
|
156
|
+
text-align: left;
|
|
157
|
+
word-break: break-word; /* prevents text overflow in cells */
|
|
158
|
+
min-width: 100px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.cometchat-stream-message-bubble table::-webkit-scrollbar {
|
|
162
|
+
width: 0px;
|
|
163
|
+
height: 8px;
|
|
164
|
+
background: transparent;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.cometchat-stream-message-bubble table::-webkit-scrollbar-track {
|
|
168
|
+
background: transparent;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.cometchat-stream-message-bubble table::-webkit-scrollbar-thumb {
|
|
172
|
+
background: var(--cometchat-icon-color-secondary);
|
|
173
|
+
border-radius: var(--cometchat-radius-2);
|
|
174
|
+
}
|
|
146
175
|
@keyframes shimmer {
|
|
147
176
|
0% {
|
|
148
177
|
left: -60%;
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
@import url('./CometChatThreadHeader.css');
|
|
56
56
|
@import url('./CometChatToast.css');
|
|
57
57
|
@import url('./CometChatSearch.css');
|
|
58
|
+
@import url('./CometChatModerationView.css');
|
|
58
59
|
@import url('./CometChatAIAssistantChat.css');
|
|
59
60
|
@import url('./CometChatAIAssistantMessageBubble.css');
|
|
60
61
|
@import url('./CometChatStreamMessageBubble.css');
|
package/dist/styles/index.css
CHANGED
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
@import url('./CometChatThreadHeader.css');
|
|
56
56
|
@import url('./CometChatToast.css');
|
|
57
57
|
@import url('./CometChatSearch.css');
|
|
58
|
+
@import url('./CometChatModerationView.css');
|
|
58
59
|
@import url('./CometChatAIAssistantChat.css');
|
|
59
60
|
@import url('./CometChatAIAssistantMessageBubble.css');
|
|
60
61
|
@import url('./CometChatStreamMessageBubble.css');
|
package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ interface MessageBubbleProps {
|
|
|
13
13
|
threadView?: JSX.Element | null;
|
|
14
14
|
footerView?: JSX.Element | null;
|
|
15
15
|
statusInfoView?: JSX.Element | null;
|
|
16
|
+
includeBottomViewHeight?: boolean;
|
|
16
17
|
options: (CometChatActionsIcon | CometChatActionsView)[];
|
|
17
18
|
alignment: MessageBubbleAlignment;
|
|
18
19
|
topMenuSize?: number;
|
package/dist/types/components/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.d.ts
CHANGED
|
@@ -19,6 +19,10 @@ interface CometChatAIAssistantChatHistoryProps {
|
|
|
19
19
|
* Callback function triggered when clicked on a message
|
|
20
20
|
*/
|
|
21
21
|
onMessageClicked?: ((message: CometChat.BaseMessage) => void) | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Callback function triggered when clicked on new chat button
|
|
24
|
+
*/
|
|
25
|
+
onNewChatClicked?: ((id?: number) => void) | undefined;
|
|
22
26
|
}
|
|
23
27
|
declare const CometChatAIAssistantChatHistory: (props: CometChatAIAssistantChatHistoryProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
28
|
export { CometChatAIAssistantChatHistory };
|
|
@@ -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>;
|
|
@@ -27,6 +27,11 @@ interface MessageListProps {
|
|
|
27
27
|
* @default false
|
|
28
28
|
*/
|
|
29
29
|
hideStickyDate?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Hides the visibility of moderation status in the message list.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
hideModerationView?: boolean;
|
|
30
35
|
/**
|
|
31
36
|
* Hides the visibility of receipts in the message list.
|
|
32
37
|
* @default false
|
|
@@ -140,10 +145,10 @@ interface MessageListProps {
|
|
|
140
145
|
*/
|
|
141
146
|
customSoundForMessages?: string;
|
|
142
147
|
/**
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
148
|
+
* Specifies the keywords in incoming messages that will trigger Smart Replies.
|
|
149
|
+
* If set to an empty array [], Smart Replies will be generated for all messages.
|
|
150
|
+
* @default ['what', 'when', 'why', 'who', 'where', 'how', '?']
|
|
151
|
+
*/
|
|
147
152
|
smartRepliesKeywords?: string[];
|
|
148
153
|
/**
|
|
149
154
|
* Specifies the delay in milliseconds before Smart Replies are displayed.
|
|
@@ -199,20 +204,20 @@ interface MessageListProps {
|
|
|
199
204
|
*/
|
|
200
205
|
footerView?: JSX.Element;
|
|
201
206
|
/**
|
|
202
|
-
|
|
203
|
-
|
|
207
|
+
* Format for the date separators in the message list.
|
|
208
|
+
*/
|
|
204
209
|
separatorDateTimeFormat?: CalendarObject;
|
|
205
210
|
/**
|
|
206
|
-
|
|
207
|
-
|
|
211
|
+
* Format for sticky date headers displayed in the message list.
|
|
212
|
+
*/
|
|
208
213
|
stickyDateTimeFormat?: CalendarObject;
|
|
209
214
|
/**
|
|
210
|
-
|
|
211
|
-
|
|
215
|
+
* Format for the timestamp displayed next to messages.
|
|
216
|
+
*/
|
|
212
217
|
messageSentAtDateTimeFormat?: CalendarObject;
|
|
213
218
|
/**
|
|
214
|
-
|
|
215
|
-
|
|
219
|
+
* Format for timestamps displayed in message details (e.g., delivery or read time).
|
|
220
|
+
*/
|
|
216
221
|
messageInfoDateTimeFormat?: CalendarObject;
|
|
217
222
|
/**
|
|
218
223
|
* ID of the message to automatically scroll to when the message list loads.
|
|
@@ -221,9 +226,9 @@ interface MessageListProps {
|
|
|
221
226
|
*/
|
|
222
227
|
goToMessageId?: string;
|
|
223
228
|
/**
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
229
|
+
* Controls the visibility of the scrollbar in the list.
|
|
230
|
+
* @defaultValue `false`
|
|
231
|
+
*/
|
|
227
232
|
showScrollbar?: boolean;
|
|
228
233
|
/**
|
|
229
234
|
* Toggles AI Agent functionality.
|
|
@@ -7,6 +7,12 @@ export declare class CometChatUIKitConstants {
|
|
|
7
7
|
interactive: string;
|
|
8
8
|
agentic: import("@cometchat/chat-sdk-javascript").MessageCategory.AGENTIC;
|
|
9
9
|
}>;
|
|
10
|
+
static moderationStatus: Readonly<{
|
|
11
|
+
pending: import("@cometchat/chat-sdk-javascript").ModerationStatus.PENDING;
|
|
12
|
+
approved: import("@cometchat/chat-sdk-javascript").ModerationStatus.APPROVED;
|
|
13
|
+
disapproved: import("@cometchat/chat-sdk-javascript").ModerationStatus.DISAPPROVED;
|
|
14
|
+
unmoderated: import("@cometchat/chat-sdk-javascript").ModerationStatus.UNMODERATED;
|
|
15
|
+
}>;
|
|
10
16
|
static MessageTypes: Readonly<{
|
|
11
17
|
text: string;
|
|
12
18
|
file: string;
|
|
@@ -19,6 +19,7 @@ export declare class CometChatMessageEvents {
|
|
|
19
19
|
* message events wrapper of SDK listeners (e.g., media message, typing indicator, read receipts, etc.)
|
|
20
20
|
*/
|
|
21
21
|
static onTextMessageReceived: Subject<CometChat.TextMessage>;
|
|
22
|
+
static onMessageModerated: Subject<CometChat.BaseMessage>;
|
|
22
23
|
static onMediaMessageReceived: Subject<CometChat.MediaMessage>;
|
|
23
24
|
static onCustomMessageReceived: Subject<CometChat.CustomMessage>;
|
|
24
25
|
static onTypingStarted: Subject<CometChat.TypingIndicator>;
|
|
@@ -13,5 +13,5 @@ export declare class MessageReceiptUtils {
|
|
|
13
13
|
* @param {CometChat.BaseMessage} messageObject - The message object for which to get the receipt status.
|
|
14
14
|
* @returns {Receipts} - The receipt status icon.
|
|
15
15
|
*/
|
|
16
|
-
static getReceiptStatus: (
|
|
16
|
+
static getReceiptStatus: (message: CometChat.BaseMessage) => Receipts;
|
|
17
17
|
}
|
|
@@ -23,6 +23,12 @@ export declare class MessageUtils {
|
|
|
23
23
|
* @returns {object | null} - The content view for the message, or null if not found.
|
|
24
24
|
*/
|
|
25
25
|
getStatusInfoView(message: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment?: MessageBubbleAlignment, messageSentAtDateTimeFormat?: CalendarObject, hideReceipts?: boolean): any;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves the bottom view for moderated messages
|
|
28
|
+
*
|
|
29
|
+
* @returns {JSX.Element} The default view for moderated messages.
|
|
30
|
+
*/
|
|
31
|
+
getModeratedMessageBottomView(): JSX.Element;
|
|
26
32
|
/**
|
|
27
33
|
* Retrieves the bubble wrapper for a message based on the provided template.
|
|
28
34
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import WaveSurfer from "../components/BaseComponents/CometChatAudioBubble/src/wavesurfer";
|
|
2
2
|
import { CalendarObject } from "./CalendarObject";
|
|
3
|
+
import { CometChatTextFormatter } from "../formatters";
|
|
3
4
|
interface MediaPlayer {
|
|
4
5
|
video?: HTMLVideoElement | null;
|
|
5
6
|
mediaRecorder?: MediaRecorder | null;
|
|
@@ -52,6 +53,7 @@ export declare function sanitizeCalendarObject(calendarObject?: CalendarObject):
|
|
|
52
53
|
};
|
|
53
54
|
export declare function fireClickEvent(): void;
|
|
54
55
|
export declare const decodeHTML: (input: string) => string;
|
|
56
|
+
export declare const sanitizeHtmlStringToFragment: (html: string, textFormatterArray?: CometChatTextFormatter[]) => DocumentFragment;
|
|
55
57
|
/**
|
|
56
58
|
* Custom React hook for creating debounced callbacks with automatic cleanup.
|
|
57
59
|
*/
|
|
@@ -61,4 +63,9 @@ export declare const useDebouncedCallback: (callback: () => void, delay: number)
|
|
|
61
63
|
};
|
|
62
64
|
export declare function createMessageCopy(msg: CometChat.AIAssistantBaseEvent, user: CometChat.User, category?: string, type?: string): CometChat.BaseMessage;
|
|
63
65
|
export declare function isDarkMode(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Sanitizes HTML content to only allow span tags while keeping everything else as plain text
|
|
68
|
+
* Also removes any script or executable content
|
|
69
|
+
*/
|
|
70
|
+
export declare const sanitizeToSpanOnly: (htmlString: string, regexPatterns: RegExp[][]) => string;
|
|
64
71
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cometchat/chat-uikit-react",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.2",
|
|
4
4
|
"description": "Ready-to-use Chat UI Components for React(Javascript/Web)",
|
|
5
5
|
"author": "CometChat",
|
|
6
6
|
"exports": {
|
|
@@ -8,12 +8,13 @@
|
|
|
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.1",
|
|
12
12
|
"@rollup/plugin-json": "^6.1.0",
|
|
13
13
|
"rxjs": "^7.8.1",
|
|
14
14
|
"react-markdown": "^10.1.0",
|
|
15
15
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
16
|
-
"react-syntax-highlighter": "^15.6.1"
|
|
16
|
+
"react-syntax-highlighter": "^15.6.1",
|
|
17
|
+
"remark-gfm": "^4.0.1"
|
|
17
18
|
},
|
|
18
19
|
"scripts": {
|
|
19
20
|
"test": "echo \"Error: no test specified\" && exit 1",
|