@cometchat/chat-uikit-angular 4.0.1 → 4.0.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/CometChatConversations/cometchat-conversations/cometchat-conversations.component.d.ts +18 -7
- package/CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component.d.ts +2 -2
- package/CometChatMessageHeader/cometchat-message-header/cometchat-message-header.component.d.ts +7 -6
- package/CometChatMessageInformation/cometchat-message-information/cometchat-message-information.component.d.ts +6 -4
- package/CometChatMessageList/cometchat-message-list/cometchat-message-list.component.d.ts +25 -8
- package/CometChatThreadedMessages/cometchat-threaded-messages/cometchat-threaded-messages.component.d.ts +8 -5
- package/Shared/CometChatUIkit/CometChatUIKit.d.ts +11 -3
- package/Shared/Framework/DataSource.d.ts +2 -0
- package/Shared/Framework/DataSourceDecorator.d.ts +3 -1
- package/Shared/Utils/MessageUtils.d.ts +3 -1
- package/esm2020/CometChatConversations/cometchat-conversations/cometchat-conversations.component.mjs +71 -45
- package/esm2020/CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component.mjs +16 -24
- package/esm2020/CometChatMessageHeader/cometchat-message-header/cometchat-message-header.component.mjs +15 -17
- package/esm2020/CometChatMessageInformation/cometchat-message-information/cometchat-message-information.component.mjs +18 -20
- package/esm2020/CometChatMessageList/cometchat-message-list/cometchat-message-list.component.mjs +287 -52
- package/esm2020/CometChatMessages/cometchat-messages/cometchat-messages.component.mjs +3 -3
- package/esm2020/CometChatThreadedMessages/cometchat-threaded-messages/cometchat-threaded-messages.component.mjs +23 -23
- package/esm2020/Shared/CometChatUIkit/CometChatUIKit.mjs +157 -31
- package/esm2020/Shared/Framework/DataSource.mjs +1 -1
- package/esm2020/Shared/Framework/DataSourceDecorator.mjs +7 -1
- package/esm2020/Shared/Utils/MessageUtils.mjs +36 -7
- package/esm2020/Shared/Views/CometChatCardView/cometchat-card-view/cometchat-card-view.component.mjs +1 -1
- package/esm2020/public-api.mjs +1 -1
- package/fesm2015/cometchat-chat-uikit-angular.mjs +735 -319
- package/fesm2015/cometchat-chat-uikit-angular.mjs.map +1 -1
- package/fesm2020/cometchat-chat-uikit-angular.mjs +724 -314
- package/fesm2020/cometchat-chat-uikit-angular.mjs.map +1 -1
- package/package.json +5 -5
- package/LICENSE.md +0 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ConversationUtils, CallingDetailsUtils, ExtensionsDataSource as ExtensionsDataSource$1, CollaborativeDocumentConstants, ExtensionsId, CollaborativeWhiteboardConstants, PollsConstants, CometChatUIKitUtility, CometChatSoundManager, SmartRepliesConfiguration, StickersConstants, StickersConfiguration,
|
|
1
|
+
import { ConversationUtils, AIExtensionDataSource, CallingDetailsUtils, ExtensionsDataSource as ExtensionsDataSource$1, CollaborativeDocumentConstants, ExtensionsId, CollaborativeWhiteboardConstants, PollsConstants, CometChatUIKitUtility, CometChatSoundManager, SmartRepliesConfiguration, StickersConstants, StickersConfiguration, CometChatUIKitCalls, OutgoingCallStyle, OutgoingCallConfiguration, CallScreenConfiguration, CallButtonsStyle, StorageUtils, IncomingCallStyle, UsersStyle, AddMembersStyle, MessageHeaderStyle, ListStyle, BannedMembersStyle, MessageReceiptUtils, ConversationsStyle, MessageInformationStyle, MessageInformationConfiguration, MessageTranslationConstants, MessageTranslationStyle, InteractiveMessageUtils, ReactionsConstants, FormBubbleStyle, CardBubbleStyle, LinkPreviewConstants, ThumbnailGenerationConstants, MessageListStyle, LinkPreviewStyle, SmartRepliesConstants, MessageComposerStyle, MessageListConfiguration, MessageComposerConfiguration, ThreadedMessagesStyle, GroupMemberUtils, GroupMembersStyle, TransferOwnershipStyle, AddMembersConfiguration, BannedMembersConfiguration, GroupMembersConfiguration, TransferOwnershipConfiguration, DetailsUtils, DetailsStyle, MessageHeaderConfiguration, ThreadedMessagesConfiguration, DetailsConfiguration, MessagesStyle, GroupsStyle, UsersConfiguration, GroupsConfiguration, ContactsStyle, TabItemStyle, MessagesConfiguration, ConversationsConfiguration, ContactsConfiguration, WithMessagesStyle, CreateGroupConfiguration, JoinGroupConfiguration } from '@cometchat/uikit-shared';
|
|
2
2
|
export * from '@cometchat/uikit-shared';
|
|
3
|
-
import { CometChatMessageOption, CometChatUIKitConstants, localize, fontHelper, CometChatMessageTemplate, CometChatMessageComposerAction, CometChatTheme, CometChatMessageEvents, MessageStatus, CometChatUIEvents, CometChatLocalize, CallWorkflow, CometChatCallEvents, IconButtonAlignment, TitleAlignment, States, SelectionMode, CometChatUserEvents, CometChatGroupEvents, DatePatterns, CometChatConversationEvents, MessageBubbleAlignment, Receipts, MessageListAlignment, TimestampAlignment, DocumentIconAlignment, Placement, AuxiliaryButtonAlignment, TabAlignment, TabsVisibility } from '@cometchat/uikit-resources';
|
|
3
|
+
import { CometChatMessageOption, CometChatUIKitConstants, localize, fontHelper, CometChatMessageTemplate, CometChatMessageComposerAction, CometChatTheme, CometChatMessageEvents, MessageStatus, CometChatUIEvents, ChatSdkEventInitializer, CometChatLocalize, CallWorkflow, CometChatCallEvents, IconButtonAlignment, TitleAlignment, States, SelectionMode, CometChatUserEvents, CometChatGroupEvents, DatePatterns, CometChatConversationEvents, MessageBubbleAlignment, Receipts, MessageListAlignment, TimestampAlignment, DocumentIconAlignment, Placement, AuxiliaryButtonAlignment, TabAlignment, TabsVisibility } from '@cometchat/uikit-resources';
|
|
4
4
|
export * from '@cometchat/uikit-resources';
|
|
5
|
-
import { CallscreenStyle, AvatarStyle, ListItemStyle, DateStyle, ReceiptStyle, BadgeStyle, ConfirmDialogStyle, MenuListStyle, MediaRecorderStyle, ChangeScopeStyle, CreateGroupStyle, JoinGroupStyle } from '@cometchat/uikit-elements';
|
|
5
|
+
import { CallscreenStyle, AvatarStyle, ListItemStyle, DateStyle, ReceiptStyle, BadgeStyle, ConfirmDialogStyle, MenuListStyle, InputStyle, LabelStyle, RadioButtonStyle, CheckboxStyle, DropdownStyle, SingleSelectStyle, QuickViewStyle, MediaRecorderStyle, ChangeScopeStyle, CreateGroupStyle, JoinGroupStyle } from '@cometchat/uikit-elements';
|
|
6
6
|
export { ActionSheetStyle, AvatarStyle, BackdropStyle, BadgeStyle, ButtonGroupStyle, CallscreenStyle, CardStyle, ChangeScopeStyle, CheckboxStyle, CometChatActionItem, CometChatActionSheet, CometChatAudioBubble, CometChatAvatar, CometChatBackdrop, CometChatBadge, CometChatButton, CometChatButtonGroup, CometChatCallscreenWrapper, CometChatCard, CometChatChangeScope, CometChatCheckbox, CometChatConfirmDialog, CometChatContextMenu, CometChatCreateGroup, CometChatDate, CometChatDivider, CometChatDocumentBubble, CometChatDraggable, CometChatDropdown, CometChatEmoji, CometChatEmojiKeyboard, CometChatFileBubble, CometChatFullScreenViewer, CometChatIcon, CometChatIconButton, CometChatImageBubble, CometChatInput, CometChatJoinGroup, CometChatLabel, CometChatListItem, CometChatLiveReaction, CometChatLoader, CometChatMediaRecorder, CometChatMenuList, CometChatMessageInput, CometChatModal, CometChatPopover, CometChatPreview, CometChatRadioButton, CometChatReceipt, CometChatSearchInput, CometChatStatusIndicator, CometChatTextBubble, CometChatVideoBubble, ConfirmDialogStyle, ContextMenuStyle, CreateGroupStyle, DateStyle, DocumentBubbleStyle, DropdownStyle, EmojiKeyboardStyle, Emojis, FileBubbleStyle, FullScreenViewerStyle, IconStyle, ImageBubbleStyle, InputStyle, JoinGroupStyle, LabelStyle, ListItemStyle, LoaderStyle, MediaRecorderStyle, MenuListStyle, MessageInputStyle, ModalStyle, PopoverStyle, PreviewStyle, RadioButtonStyle, ReceiptStyle, SearchInputStyle, TextBubbleStyle, auxiliaryButtonAlignmentEnum, layoutType } from '@cometchat/uikit-elements';
|
|
7
7
|
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
8
8
|
import * as i0 from '@angular/core';
|
|
@@ -165,6 +165,20 @@ class MessageUtils {
|
|
|
165
165
|
options: ChatConfigurator.getDataSource().getMessageOptions,
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
|
+
getFormMessageTemplate() {
|
|
169
|
+
return new CometChatMessageTemplate({
|
|
170
|
+
type: CometChatUIKitConstants.MessageTypes.form,
|
|
171
|
+
category: CometChatUIKitConstants.MessageCategory.interactive,
|
|
172
|
+
options: ChatConfigurator.getDataSource().getMessageOptions,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
getCardMessageTemplate() {
|
|
176
|
+
return new CometChatMessageTemplate({
|
|
177
|
+
type: CometChatUIKitConstants.MessageTypes.card,
|
|
178
|
+
category: CometChatUIKitConstants.MessageCategory.interactive,
|
|
179
|
+
options: ChatConfigurator.getDataSource().getMessageOptions,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
168
182
|
getAllMessageTemplates() {
|
|
169
183
|
return [
|
|
170
184
|
ChatConfigurator.getDataSource().getTextMessageTemplate(),
|
|
@@ -173,6 +187,8 @@ class MessageUtils {
|
|
|
173
187
|
ChatConfigurator.getDataSource().getAudioMessageTemplate(),
|
|
174
188
|
ChatConfigurator.getDataSource().getFileMessageTemplate(),
|
|
175
189
|
ChatConfigurator.getDataSource().getGroupActionTemplate(),
|
|
190
|
+
ChatConfigurator.getDataSource().getFormMessageTemplate(),
|
|
191
|
+
ChatConfigurator.getDataSource().getCardMessageTemplate()
|
|
176
192
|
];
|
|
177
193
|
}
|
|
178
194
|
getMessageTemplate(messageType, messageCategory) {
|
|
@@ -197,6 +213,12 @@ class MessageUtils {
|
|
|
197
213
|
case CometChatUIKitConstants.MessageTypes.audio:
|
|
198
214
|
_template = ChatConfigurator.getDataSource().getAudioMessageTemplate();
|
|
199
215
|
break;
|
|
216
|
+
case CometChatUIKitConstants.MessageTypes.form:
|
|
217
|
+
_template = ChatConfigurator.getDataSource().getFormMessageTemplate();
|
|
218
|
+
break;
|
|
219
|
+
case CometChatUIKitConstants.MessageTypes.card:
|
|
220
|
+
_template = ChatConfigurator.getDataSource().getCardMessageTemplate();
|
|
221
|
+
break;
|
|
200
222
|
}
|
|
201
223
|
}
|
|
202
224
|
return _template;
|
|
@@ -229,7 +251,8 @@ class MessageUtils {
|
|
|
229
251
|
break;
|
|
230
252
|
}
|
|
231
253
|
}
|
|
232
|
-
else if (messageObject.getCategory() == CometChatUIKitConstants.MessageCategory.custom)
|
|
254
|
+
else if ((messageObject.getCategory() == CometChatUIKitConstants.MessageCategory.custom) ||
|
|
255
|
+
(messageObject.getCategory() == CometChatUIKitConstants.MessageCategory.interactive)) {
|
|
233
256
|
_optionList = ChatConfigurator.getDataSource().getCommonOptions(loggedInUser, messageObject, theme, group);
|
|
234
257
|
}
|
|
235
258
|
return _optionList;
|
|
@@ -260,14 +283,20 @@ class MessageUtils {
|
|
|
260
283
|
CometChatUIKitConstants.MessageTypes.audio,
|
|
261
284
|
CometChatUIKitConstants.MessageTypes.video,
|
|
262
285
|
CometChatUIKitConstants.MessageTypes.file,
|
|
263
|
-
CometChatUIKitConstants.MessageTypes.groupMember
|
|
286
|
+
CometChatUIKitConstants.MessageTypes.groupMember,
|
|
287
|
+
CometChatUIKitConstants.MessageTypes.form,
|
|
288
|
+
CometChatUIKitConstants.MessageTypes.card
|
|
264
289
|
];
|
|
265
290
|
}
|
|
266
291
|
addList() {
|
|
267
292
|
return "<Message Utils>";
|
|
268
293
|
}
|
|
269
294
|
getAllMessageCategories() {
|
|
270
|
-
return [
|
|
295
|
+
return [
|
|
296
|
+
CometChatUIKitConstants.MessageCategory.message,
|
|
297
|
+
CometChatUIKitConstants.MessageCategory.action,
|
|
298
|
+
CometChatUIKitConstants.MessageCategory.interactive
|
|
299
|
+
];
|
|
271
300
|
}
|
|
272
301
|
getAuxiliaryOptions(id, user, group) {
|
|
273
302
|
return null;
|
|
@@ -432,6 +461,12 @@ class DataSourceDecorator {
|
|
|
432
461
|
getFileMessageTemplate() {
|
|
433
462
|
return (this.dataSource ?? new MessageUtils()).getFileMessageTemplate();
|
|
434
463
|
}
|
|
464
|
+
getFormMessageTemplate() {
|
|
465
|
+
return (this.dataSource ?? new MessageUtils()).getFormMessageTemplate();
|
|
466
|
+
}
|
|
467
|
+
getCardMessageTemplate() {
|
|
468
|
+
return (this.dataSource ?? new MessageUtils()).getCardMessageTemplate();
|
|
469
|
+
}
|
|
435
470
|
getGroupActionTemplate() {
|
|
436
471
|
return (this.dataSource ?? new MessageUtils()).getGroupActionTemplate();
|
|
437
472
|
}
|
|
@@ -476,6 +511,127 @@ class DataSourceDecorator {
|
|
|
476
511
|
}
|
|
477
512
|
}
|
|
478
513
|
|
|
514
|
+
class AIEnablerDecorator extends DataSourceDecorator {
|
|
515
|
+
constructor(dataSource, features) {
|
|
516
|
+
super(dataSource);
|
|
517
|
+
}
|
|
518
|
+
getId() {
|
|
519
|
+
return "aienabler";
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
class AISmartRepliesExtensionDecorator extends DataSourceDecorator {
|
|
524
|
+
constructor(dataSource) {
|
|
525
|
+
super(dataSource);
|
|
526
|
+
}
|
|
527
|
+
getId() {
|
|
528
|
+
return "aismartreply";
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
class AISmartRepliesExtension extends AIExtensionDataSource {
|
|
533
|
+
constructor() {
|
|
534
|
+
super();
|
|
535
|
+
}
|
|
536
|
+
addExtension() {
|
|
537
|
+
ChatConfigurator.enable((dataSource) => new AISmartRepliesExtensionDecorator(dataSource));
|
|
538
|
+
}
|
|
539
|
+
getExtensionId() {
|
|
540
|
+
return "smart-replies";
|
|
541
|
+
}
|
|
542
|
+
enable() {
|
|
543
|
+
this.addExtension();
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
548
|
+
constructor(dataSource) {
|
|
549
|
+
super(dataSource);
|
|
550
|
+
}
|
|
551
|
+
getId() {
|
|
552
|
+
return "aiconversationstarter";
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
class AIConversationStarterExtension extends AIExtensionDataSource {
|
|
557
|
+
constructor() {
|
|
558
|
+
super();
|
|
559
|
+
}
|
|
560
|
+
addExtension() {
|
|
561
|
+
ChatConfigurator.enable((dataSource) => new AIConversationStarterDecorator(dataSource));
|
|
562
|
+
}
|
|
563
|
+
getExtensionId() {
|
|
564
|
+
return "conversation-starter";
|
|
565
|
+
}
|
|
566
|
+
enable() {
|
|
567
|
+
this.addExtension();
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
class AIEnabler extends AIExtensionDataSource {
|
|
572
|
+
constructor(defaultFeatures) {
|
|
573
|
+
super();
|
|
574
|
+
this.defaultAIFeatures = defaultFeatures;
|
|
575
|
+
}
|
|
576
|
+
addExtension() {
|
|
577
|
+
}
|
|
578
|
+
getExtensionId() {
|
|
579
|
+
return "ai-enabler";
|
|
580
|
+
}
|
|
581
|
+
enable() {
|
|
582
|
+
let features = {};
|
|
583
|
+
const processFeatures = (feature) => {
|
|
584
|
+
return CometChat.isAIFeatureEnabled(feature.getExtensionId())
|
|
585
|
+
.then((response) => {
|
|
586
|
+
if (response) {
|
|
587
|
+
feature?.enable();
|
|
588
|
+
if (feature.getExtensionId() !== "conversation-starter") {
|
|
589
|
+
features[feature.getExtensionId()] = {
|
|
590
|
+
enabled: true,
|
|
591
|
+
configuration: feature.getConfiguration(),
|
|
592
|
+
enabler: feature,
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
})
|
|
597
|
+
.catch((err) => {
|
|
598
|
+
console.error(err);
|
|
599
|
+
});
|
|
600
|
+
};
|
|
601
|
+
if (this.defaultAIFeatures && this.defaultAIFeatures.length >= 1) {
|
|
602
|
+
const promises = this.defaultAIFeatures.map((feature) => processFeatures(feature));
|
|
603
|
+
Promise.all(promises)
|
|
604
|
+
.then(() => {
|
|
605
|
+
if (Object.keys(features).length > 0) {
|
|
606
|
+
ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features));
|
|
607
|
+
}
|
|
608
|
+
})
|
|
609
|
+
.catch((err) => {
|
|
610
|
+
console.error(err);
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
else if (this.defaultAIFeatures?.length === 0) {
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
616
|
+
else {
|
|
617
|
+
const defaultFeatures = [
|
|
618
|
+
new AISmartRepliesExtension(),
|
|
619
|
+
new AIConversationStarterExtension(),
|
|
620
|
+
];
|
|
621
|
+
const promises = defaultFeatures.map((feature) => processFeatures(feature));
|
|
622
|
+
Promise.all(promises)
|
|
623
|
+
.then(() => {
|
|
624
|
+
if (Object.keys(features).length > 0) {
|
|
625
|
+
ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features));
|
|
626
|
+
}
|
|
627
|
+
})
|
|
628
|
+
.catch((err) => {
|
|
629
|
+
console.error(err);
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
479
635
|
class CallingExtensionDecorator extends DataSourceDecorator {
|
|
480
636
|
constructor(dataSource) {
|
|
481
637
|
super(dataSource);
|
|
@@ -1282,127 +1438,6 @@ class ThumbnailGenerationExtension extends ExtensionsDataSource$1 {
|
|
|
1282
1438
|
}
|
|
1283
1439
|
}
|
|
1284
1440
|
|
|
1285
|
-
class AIEnablerDecorator extends DataSourceDecorator {
|
|
1286
|
-
constructor(dataSource, features) {
|
|
1287
|
-
super(dataSource);
|
|
1288
|
-
}
|
|
1289
|
-
getId() {
|
|
1290
|
-
return "aienabler";
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
class AISmartRepliesExtensionDecorator extends DataSourceDecorator {
|
|
1295
|
-
constructor(dataSource) {
|
|
1296
|
-
super(dataSource);
|
|
1297
|
-
}
|
|
1298
|
-
getId() {
|
|
1299
|
-
return "aismartreply";
|
|
1300
|
-
}
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
class AISmartRepliesExtension extends AIExtensionDataSource {
|
|
1304
|
-
constructor() {
|
|
1305
|
-
super();
|
|
1306
|
-
}
|
|
1307
|
-
addExtension() {
|
|
1308
|
-
ChatConfigurator.enable((dataSource) => new AISmartRepliesExtensionDecorator(dataSource));
|
|
1309
|
-
}
|
|
1310
|
-
getExtensionId() {
|
|
1311
|
-
return "smart-replies";
|
|
1312
|
-
}
|
|
1313
|
-
enable() {
|
|
1314
|
-
this.addExtension();
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
1319
|
-
constructor(dataSource) {
|
|
1320
|
-
super(dataSource);
|
|
1321
|
-
}
|
|
1322
|
-
getId() {
|
|
1323
|
-
return "aiconversationstarter";
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
class AIConversationStarterExtension extends AIExtensionDataSource {
|
|
1328
|
-
constructor() {
|
|
1329
|
-
super();
|
|
1330
|
-
}
|
|
1331
|
-
addExtension() {
|
|
1332
|
-
ChatConfigurator.enable((dataSource) => new AIConversationStarterDecorator(dataSource));
|
|
1333
|
-
}
|
|
1334
|
-
getExtensionId() {
|
|
1335
|
-
return "conversation-starter";
|
|
1336
|
-
}
|
|
1337
|
-
enable() {
|
|
1338
|
-
this.addExtension();
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
class AIEnabler extends AIExtensionDataSource {
|
|
1343
|
-
constructor(defaultFeatures) {
|
|
1344
|
-
super();
|
|
1345
|
-
this.defaultAIFeatures = defaultFeatures;
|
|
1346
|
-
}
|
|
1347
|
-
addExtension() {
|
|
1348
|
-
}
|
|
1349
|
-
getExtensionId() {
|
|
1350
|
-
return "ai-enabler";
|
|
1351
|
-
}
|
|
1352
|
-
enable() {
|
|
1353
|
-
let features = {};
|
|
1354
|
-
const processFeatures = (feature) => {
|
|
1355
|
-
return CometChat.isAIFeatureEnabled(feature.getExtensionId())
|
|
1356
|
-
.then((response) => {
|
|
1357
|
-
if (response) {
|
|
1358
|
-
feature?.enable();
|
|
1359
|
-
if (feature.getExtensionId() !== "conversation-starter") {
|
|
1360
|
-
features[feature.getExtensionId()] = {
|
|
1361
|
-
enabled: true,
|
|
1362
|
-
configuration: feature.getConfiguration(),
|
|
1363
|
-
enabler: feature,
|
|
1364
|
-
};
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
})
|
|
1368
|
-
.catch((err) => {
|
|
1369
|
-
console.error(err);
|
|
1370
|
-
});
|
|
1371
|
-
};
|
|
1372
|
-
if (this.defaultAIFeatures && this.defaultAIFeatures.length >= 1) {
|
|
1373
|
-
const promises = this.defaultAIFeatures.map((feature) => processFeatures(feature));
|
|
1374
|
-
Promise.all(promises)
|
|
1375
|
-
.then(() => {
|
|
1376
|
-
if (Object.keys(features).length > 0) {
|
|
1377
|
-
ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features));
|
|
1378
|
-
}
|
|
1379
|
-
})
|
|
1380
|
-
.catch((err) => {
|
|
1381
|
-
console.error(err);
|
|
1382
|
-
});
|
|
1383
|
-
}
|
|
1384
|
-
else if (this.defaultAIFeatures?.length === 0) {
|
|
1385
|
-
return;
|
|
1386
|
-
}
|
|
1387
|
-
else {
|
|
1388
|
-
const defaultFeatures = [
|
|
1389
|
-
new AISmartRepliesExtension(),
|
|
1390
|
-
new AIConversationStarterExtension(),
|
|
1391
|
-
];
|
|
1392
|
-
const promises = defaultFeatures.map((feature) => processFeatures(feature));
|
|
1393
|
-
Promise.all(promises)
|
|
1394
|
-
.then(() => {
|
|
1395
|
-
if (Object.keys(features).length > 0) {
|
|
1396
|
-
ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features));
|
|
1397
|
-
}
|
|
1398
|
-
})
|
|
1399
|
-
.catch((err) => {
|
|
1400
|
-
console.error(err);
|
|
1401
|
-
});
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
1441
|
class CometChatUIKit {
|
|
1407
1442
|
static getDataSource() {
|
|
1408
1443
|
return ChatConfigurator.getDataSource();
|
|
@@ -1428,9 +1463,11 @@ class CometChatUIKit {
|
|
|
1428
1463
|
appSettingsBuilder.overrideClientHost(uiKitSettings.getClientHost());
|
|
1429
1464
|
const appSettings = appSettingsBuilder.build();
|
|
1430
1465
|
return new Promise((resolve, reject) => {
|
|
1431
|
-
CometChat.init(uiKitSettings?.appId, appSettings)
|
|
1466
|
+
CometChat.init(uiKitSettings?.appId, appSettings)
|
|
1467
|
+
.then(() => {
|
|
1432
1468
|
CometChat.setSource("uikit-v4", "web", "angular");
|
|
1433
|
-
CometChatUIKit.getLoggedinUser()
|
|
1469
|
+
CometChatUIKit.getLoggedinUser()
|
|
1470
|
+
?.then((user) => {
|
|
1434
1471
|
if (user) {
|
|
1435
1472
|
ChatConfigurator.init();
|
|
1436
1473
|
this.initiateAfterLogin();
|
|
@@ -1448,9 +1485,11 @@ class CometChatUIKit {
|
|
|
1448
1485
|
}
|
|
1449
1486
|
static getLoggedinUser() {
|
|
1450
1487
|
return new Promise((resolve, reject) => {
|
|
1451
|
-
CometChat.getLoggedinUser()
|
|
1488
|
+
CometChat.getLoggedinUser()
|
|
1489
|
+
.then((user) => {
|
|
1452
1490
|
return resolve(user);
|
|
1453
|
-
})
|
|
1491
|
+
})
|
|
1492
|
+
.catch((error) => {
|
|
1454
1493
|
return reject(error);
|
|
1455
1494
|
})
|
|
1456
1495
|
.catch((error) => {
|
|
@@ -1465,10 +1504,10 @@ class CometChatUIKit {
|
|
|
1465
1504
|
.setRegion(CometChatUIKit.uiKitSettings?.region)
|
|
1466
1505
|
.build();
|
|
1467
1506
|
CometChatUIKitCalls.init(callAppSetting).then(() => {
|
|
1468
|
-
console.log(
|
|
1507
|
+
console.log("CometChatCalls initialization success");
|
|
1469
1508
|
new CallingExtension().enable();
|
|
1470
1509
|
}, (error) => {
|
|
1471
|
-
console.log(
|
|
1510
|
+
console.log("CometChatCalls initialization failed with error:", error);
|
|
1472
1511
|
});
|
|
1473
1512
|
}
|
|
1474
1513
|
}
|
|
@@ -1476,6 +1515,7 @@ class CometChatUIKit {
|
|
|
1476
1515
|
if (CometChatUIKit.uiKitSettings != null) {
|
|
1477
1516
|
this.enableCalling();
|
|
1478
1517
|
let extensionList = this.uiKitSettings?.extensions || this.defaultExtensions;
|
|
1518
|
+
ChatSdkEventInitializer.attachListeners();
|
|
1479
1519
|
if (extensionList.length > 0) {
|
|
1480
1520
|
extensionList.forEach((extension) => {
|
|
1481
1521
|
extension?.enable();
|
|
@@ -1493,19 +1533,24 @@ class CometChatUIKit {
|
|
|
1493
1533
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1494
1534
|
return undefined;
|
|
1495
1535
|
return new Promise((resolve, reject) => {
|
|
1496
|
-
CometChatUIKit.getLoggedinUser()
|
|
1536
|
+
CometChatUIKit.getLoggedinUser()
|
|
1537
|
+
?.then((user) => {
|
|
1497
1538
|
if (user) {
|
|
1498
1539
|
resolve(user);
|
|
1499
1540
|
ChatConfigurator.init();
|
|
1500
1541
|
this.initiateAfterLogin();
|
|
1501
1542
|
}
|
|
1502
1543
|
else {
|
|
1503
|
-
let args = details.uid
|
|
1504
|
-
|
|
1544
|
+
let args = details.uid
|
|
1545
|
+
? [details.uid, CometChatUIKit.uiKitSettings.authKey]
|
|
1546
|
+
: [details.authToken];
|
|
1547
|
+
CometChat.login(...args)
|
|
1548
|
+
.then((user) => {
|
|
1505
1549
|
resolve(user);
|
|
1506
1550
|
ChatConfigurator.init();
|
|
1507
1551
|
this.initiateAfterLogin();
|
|
1508
|
-
})
|
|
1552
|
+
})
|
|
1553
|
+
.catch((error) => {
|
|
1509
1554
|
reject(error);
|
|
1510
1555
|
});
|
|
1511
1556
|
}
|
|
@@ -1519,9 +1564,11 @@ class CometChatUIKit {
|
|
|
1519
1564
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1520
1565
|
return undefined;
|
|
1521
1566
|
return new Promise((resolve, reject) => {
|
|
1522
|
-
CometChat.createUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1567
|
+
CometChat.createUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1568
|
+
.then((user) => {
|
|
1523
1569
|
resolve(user);
|
|
1524
|
-
})
|
|
1570
|
+
})
|
|
1571
|
+
.catch((error) => {
|
|
1525
1572
|
reject(error);
|
|
1526
1573
|
});
|
|
1527
1574
|
});
|
|
@@ -1530,9 +1577,11 @@ class CometChatUIKit {
|
|
|
1530
1577
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1531
1578
|
return undefined;
|
|
1532
1579
|
return new Promise((resolve, reject) => {
|
|
1533
|
-
CometChat.updateUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1580
|
+
CometChat.updateUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1581
|
+
.then((user) => {
|
|
1534
1582
|
resolve(user);
|
|
1535
|
-
})
|
|
1583
|
+
})
|
|
1584
|
+
.catch((error) => {
|
|
1536
1585
|
reject(error);
|
|
1537
1586
|
});
|
|
1538
1587
|
});
|
|
@@ -1541,36 +1590,130 @@ class CometChatUIKit {
|
|
|
1541
1590
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1542
1591
|
return undefined;
|
|
1543
1592
|
return new Promise((resolve, reject) => {
|
|
1544
|
-
CometChat.logout()
|
|
1593
|
+
CometChat.logout()
|
|
1594
|
+
.then((message) => {
|
|
1545
1595
|
resolve(message);
|
|
1546
|
-
})
|
|
1596
|
+
})
|
|
1597
|
+
.catch((error) => {
|
|
1547
1598
|
reject(error);
|
|
1548
1599
|
});
|
|
1549
1600
|
});
|
|
1550
1601
|
}
|
|
1551
|
-
// Error handling to give better logs
|
|
1552
|
-
static checkAuthSettings() {
|
|
1553
|
-
if (CometChatUIKit.uiKitSettings == null) {
|
|
1554
|
-
return false;
|
|
1555
|
-
}
|
|
1556
|
-
if (CometChatUIKit.uiKitSettings.appId == null) {
|
|
1557
|
-
return false;
|
|
1602
|
+
// Error handling to give better logs
|
|
1603
|
+
static checkAuthSettings() {
|
|
1604
|
+
if (CometChatUIKit.uiKitSettings == null) {
|
|
1605
|
+
return false;
|
|
1606
|
+
}
|
|
1607
|
+
if (CometChatUIKit.uiKitSettings.appId == null) {
|
|
1608
|
+
return false;
|
|
1609
|
+
}
|
|
1610
|
+
return true;
|
|
1611
|
+
}
|
|
1612
|
+
/**
|
|
1613
|
+
* Sends a form message and emits events based on the message status.
|
|
1614
|
+
* @param message - The form message to be sent.
|
|
1615
|
+
* @param disableLocalEvents - A boolean indicating whether to disable local events or not. Default value is false.
|
|
1616
|
+
*/
|
|
1617
|
+
static sendFormMessage(message, disableLocalEvents = false) {
|
|
1618
|
+
if (!disableLocalEvents) {
|
|
1619
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1620
|
+
message: message,
|
|
1621
|
+
status: MessageStatus.inprogress,
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
CometChat.sendInteractiveMessage(message)
|
|
1625
|
+
.then((message) => {
|
|
1626
|
+
if (!disableLocalEvents) {
|
|
1627
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1628
|
+
message: message,
|
|
1629
|
+
status: MessageStatus.success,
|
|
1630
|
+
});
|
|
1631
|
+
}
|
|
1632
|
+
})
|
|
1633
|
+
.catch((error) => {
|
|
1634
|
+
message.setMetadata({ error });
|
|
1635
|
+
if (!disableLocalEvents) {
|
|
1636
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1637
|
+
message: message,
|
|
1638
|
+
status: MessageStatus.error,
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
static sendCardMessage(message, disableLocalEvents = false) {
|
|
1644
|
+
if (!disableLocalEvents) {
|
|
1645
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1646
|
+
message: message,
|
|
1647
|
+
status: MessageStatus.inprogress,
|
|
1648
|
+
});
|
|
1649
|
+
}
|
|
1650
|
+
CometChat.sendInteractiveMessage(message)
|
|
1651
|
+
.then((message) => {
|
|
1652
|
+
if (!disableLocalEvents) {
|
|
1653
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1654
|
+
message: message,
|
|
1655
|
+
status: MessageStatus.success,
|
|
1656
|
+
});
|
|
1657
|
+
}
|
|
1658
|
+
})
|
|
1659
|
+
.catch((error) => {
|
|
1660
|
+
message.setMetadata({ error });
|
|
1661
|
+
if (!disableLocalEvents) {
|
|
1662
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1663
|
+
message: message,
|
|
1664
|
+
status: MessageStatus.error,
|
|
1665
|
+
});
|
|
1666
|
+
}
|
|
1667
|
+
});
|
|
1668
|
+
}
|
|
1669
|
+
static sendCustomInteractiveMessage(message, disableLocalEvents = false) {
|
|
1670
|
+
if (!disableLocalEvents) {
|
|
1671
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1672
|
+
message: message,
|
|
1673
|
+
status: MessageStatus.inprogress,
|
|
1674
|
+
});
|
|
1558
1675
|
}
|
|
1559
|
-
|
|
1676
|
+
CometChat.sendInteractiveMessage(message)
|
|
1677
|
+
.then((message) => {
|
|
1678
|
+
if (!disableLocalEvents) {
|
|
1679
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1680
|
+
message: message,
|
|
1681
|
+
status: MessageStatus.success,
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
})
|
|
1685
|
+
.catch((error) => {
|
|
1686
|
+
message.setMetadata({ error });
|
|
1687
|
+
if (!disableLocalEvents) {
|
|
1688
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1689
|
+
message: message,
|
|
1690
|
+
status: MessageStatus.error,
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
});
|
|
1560
1694
|
}
|
|
1561
1695
|
// Helper methods to send messages
|
|
1562
1696
|
// [sendCustomMessage] used to send a custom message
|
|
1563
1697
|
static sendCustomMessage(message) {
|
|
1564
1698
|
return new Promise((resolve, reject) => {
|
|
1565
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1699
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1700
|
+
message: message,
|
|
1701
|
+
status: MessageStatus.inprogress,
|
|
1702
|
+
});
|
|
1566
1703
|
CometChat.sendCustomMessage(message)
|
|
1567
1704
|
.then((message) => {
|
|
1568
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1705
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1706
|
+
message: message,
|
|
1707
|
+
status: MessageStatus.success,
|
|
1708
|
+
});
|
|
1569
1709
|
resolve(message);
|
|
1570
1710
|
})
|
|
1571
1711
|
.catch((error) => {
|
|
1572
1712
|
message.setMetadata({ error: true });
|
|
1573
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1713
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1714
|
+
message: message,
|
|
1715
|
+
status: MessageStatus.error,
|
|
1716
|
+
});
|
|
1574
1717
|
reject(error);
|
|
1575
1718
|
});
|
|
1576
1719
|
});
|
|
@@ -1579,15 +1722,24 @@ class CometChatUIKit {
|
|
|
1579
1722
|
// [sendTextMessage] used to send a custom message
|
|
1580
1723
|
static sendTextMessage(message) {
|
|
1581
1724
|
return new Promise((resolve, reject) => {
|
|
1582
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1725
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1726
|
+
message: message,
|
|
1727
|
+
status: MessageStatus.inprogress,
|
|
1728
|
+
});
|
|
1583
1729
|
CometChat.sendMessage(message)
|
|
1584
1730
|
.then((message) => {
|
|
1585
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1731
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1732
|
+
message: message,
|
|
1733
|
+
status: MessageStatus.success,
|
|
1734
|
+
});
|
|
1586
1735
|
resolve(message);
|
|
1587
1736
|
})
|
|
1588
1737
|
.catch((error) => {
|
|
1589
1738
|
message.setMetadata({ error: true });
|
|
1590
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1739
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1740
|
+
message: message,
|
|
1741
|
+
status: MessageStatus.error,
|
|
1742
|
+
});
|
|
1591
1743
|
reject(error);
|
|
1592
1744
|
});
|
|
1593
1745
|
});
|
|
@@ -1596,15 +1748,24 @@ class CometChatUIKit {
|
|
|
1596
1748
|
// [sendMediaMessage] used to send a custom message
|
|
1597
1749
|
static sendMediaMessage(message) {
|
|
1598
1750
|
return new Promise((resolve, reject) => {
|
|
1599
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1751
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1752
|
+
message: message,
|
|
1753
|
+
status: MessageStatus.inprogress,
|
|
1754
|
+
});
|
|
1600
1755
|
CometChat.sendMediaMessage(message)
|
|
1601
1756
|
.then((message) => {
|
|
1602
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1757
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1758
|
+
message: message,
|
|
1759
|
+
status: MessageStatus.success,
|
|
1760
|
+
});
|
|
1603
1761
|
resolve(message);
|
|
1604
1762
|
})
|
|
1605
1763
|
.catch((error) => {
|
|
1606
1764
|
message.setMetadata({ error: true });
|
|
1607
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1765
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1766
|
+
message: message,
|
|
1767
|
+
status: MessageStatus.error,
|
|
1768
|
+
});
|
|
1608
1769
|
reject(error);
|
|
1609
1770
|
});
|
|
1610
1771
|
});
|
|
@@ -3975,7 +4136,6 @@ class CometChatMessageHeaderComponent {
|
|
|
3975
4136
|
console.log(error);
|
|
3976
4137
|
};
|
|
3977
4138
|
this.onBack = () => { };
|
|
3978
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
3979
4139
|
this.groupsListenerId = "groupsList_" + new Date().getTime();
|
|
3980
4140
|
this.userListenerId = "userlist_" + new Date().getTime();
|
|
3981
4141
|
this.subtitleText = "";
|
|
@@ -4230,16 +4390,14 @@ class CometChatMessageHeaderComponent {
|
|
|
4230
4390
|
}));
|
|
4231
4391
|
}
|
|
4232
4392
|
if (!this.disableTyping) {
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
},
|
|
4242
|
-
}));
|
|
4393
|
+
this.onTypingStarted = CometChatMessageEvents.onTypingStarted.subscribe((typingIndicator) => {
|
|
4394
|
+
this.isTyping = true;
|
|
4395
|
+
this.setTypingIndicatorText(typingIndicator);
|
|
4396
|
+
});
|
|
4397
|
+
this.onTypingEnded = CometChatMessageEvents.onTypingEnded.subscribe((typingIndicator) => {
|
|
4398
|
+
this.isTyping = false;
|
|
4399
|
+
this.updateSubtitle();
|
|
4400
|
+
});
|
|
4243
4401
|
}
|
|
4244
4402
|
CometChat.addGroupListener(this.groupsListenerId, new CometChat.GroupListener({
|
|
4245
4403
|
onGroupMemberScopeChanged: (message, changedUser, newScope, oldScope, changedGroup) => {
|
|
@@ -4291,8 +4449,9 @@ class CometChatMessageHeaderComponent {
|
|
|
4291
4449
|
}
|
|
4292
4450
|
}
|
|
4293
4451
|
removeListener() {
|
|
4294
|
-
CometChat.removeMessageListener(this.msgListenerId);
|
|
4295
4452
|
CometChat.removeUserListener(this.userListenerId);
|
|
4453
|
+
this.onTypingStarted?.unsubscribe();
|
|
4454
|
+
this.onTypingEnded?.unsubscribe();
|
|
4296
4455
|
}
|
|
4297
4456
|
ngOnDestroy() {
|
|
4298
4457
|
this.removeListener();
|
|
@@ -5067,7 +5226,6 @@ class CometChatConversationsComponent {
|
|
|
5067
5226
|
this.checkItemChange = false;
|
|
5068
5227
|
this.showConfirmDialog = false;
|
|
5069
5228
|
this.conversationToBeDeleted = null;
|
|
5070
|
-
this.conversationListenerId = "chatlist_" + new Date().getTime();
|
|
5071
5229
|
this.userListenerId = "chatlist_user_" + new Date().getTime();
|
|
5072
5230
|
this.groupListenerId = "chatlist_group_" + new Date().getTime();
|
|
5073
5231
|
this.groupToUpdate = {};
|
|
@@ -5248,6 +5406,7 @@ class CometChatConversationsComponent {
|
|
|
5248
5406
|
case CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED:
|
|
5249
5407
|
case CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED:
|
|
5250
5408
|
case CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED:
|
|
5409
|
+
case CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED:
|
|
5251
5410
|
if (!this.disableReceipt) {
|
|
5252
5411
|
this.markMessageAsDelivered(message);
|
|
5253
5412
|
}
|
|
@@ -5816,43 +5975,6 @@ class CometChatConversationsComponent {
|
|
|
5816
5975
|
this.updateConversation(message);
|
|
5817
5976
|
},
|
|
5818
5977
|
}));
|
|
5819
|
-
CometChat.addMessageListener(this.conversationListenerId, new CometChat.MessageListener({
|
|
5820
|
-
onTextMessageReceived: (textMessage) => {
|
|
5821
|
-
callback(CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED, null, textMessage);
|
|
5822
|
-
},
|
|
5823
|
-
onMediaMessageReceived: (mediaMessage) => {
|
|
5824
|
-
callback(CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED, null, mediaMessage);
|
|
5825
|
-
},
|
|
5826
|
-
onCustomMessageReceived: (customMessage) => {
|
|
5827
|
-
callback(CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED, null, customMessage);
|
|
5828
|
-
},
|
|
5829
|
-
onMessagesRead: (messageReceipt) => {
|
|
5830
|
-
if (!this.disableReceipt) {
|
|
5831
|
-
this.markAsRead(messageReceipt);
|
|
5832
|
-
}
|
|
5833
|
-
},
|
|
5834
|
-
onMessageDeleted: (deletedMessage) => {
|
|
5835
|
-
callback(CometChatUIKitConstants.messages.MESSAGE_DELETED, null, deletedMessage);
|
|
5836
|
-
},
|
|
5837
|
-
onMessageEdited: (editedMessage) => {
|
|
5838
|
-
callback(CometChatUIKitConstants.messages.MESSAGE_EDITED, null, editedMessage);
|
|
5839
|
-
},
|
|
5840
|
-
onMessagesDelivered: (messageReceipt) => {
|
|
5841
|
-
if (!this.disableReceipt) {
|
|
5842
|
-
this.updateDeliveredMessage(messageReceipt);
|
|
5843
|
-
}
|
|
5844
|
-
},
|
|
5845
|
-
onTypingStarted: (typingIndicator) => {
|
|
5846
|
-
if (!this.disableTyping) {
|
|
5847
|
-
this.typingIndicator = typingIndicator;
|
|
5848
|
-
this.ref.detectChanges();
|
|
5849
|
-
}
|
|
5850
|
-
},
|
|
5851
|
-
onTypingEnded: (typingIndicator) => {
|
|
5852
|
-
this.typingIndicator = null;
|
|
5853
|
-
this.ref.detectChanges();
|
|
5854
|
-
}
|
|
5855
|
-
}));
|
|
5856
5978
|
CometChat.addCallListener(this.callListenerId, new CometChat.CallListener({
|
|
5857
5979
|
onIncomingCallReceived: (call) => {
|
|
5858
5980
|
this.updateConversation(call);
|
|
@@ -5870,6 +5992,58 @@ class CometChatConversationsComponent {
|
|
|
5870
5992
|
this.updateConversation(call);
|
|
5871
5993
|
}
|
|
5872
5994
|
}));
|
|
5995
|
+
// SDK listeners
|
|
5996
|
+
this.onTextMessageReceived =
|
|
5997
|
+
CometChatMessageEvents.onTextMessageReceived.subscribe((textMessage) => {
|
|
5998
|
+
callback(CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED, null, textMessage);
|
|
5999
|
+
});
|
|
6000
|
+
this.onMediaMessageReceived =
|
|
6001
|
+
CometChatMessageEvents.onMediaMessageReceived.subscribe((mediaMessage) => {
|
|
6002
|
+
callback(CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED, null, mediaMessage);
|
|
6003
|
+
});
|
|
6004
|
+
this.onCustomMessageReceived =
|
|
6005
|
+
CometChatMessageEvents.onCustomMessageReceived.subscribe((customMessage) => {
|
|
6006
|
+
callback(CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED, null, customMessage);
|
|
6007
|
+
});
|
|
6008
|
+
this.onFormMessageReceived =
|
|
6009
|
+
CometChatMessageEvents.onFormMessageReceived.subscribe((formMessage) => {
|
|
6010
|
+
callback(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, null, formMessage);
|
|
6011
|
+
});
|
|
6012
|
+
this.onCardMessageReceived =
|
|
6013
|
+
CometChatMessageEvents.onCardMessageReceived.subscribe((cardMessage) => {
|
|
6014
|
+
callback(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, null, cardMessage);
|
|
6015
|
+
});
|
|
6016
|
+
this.onCustomInteractiveMessageReceived =
|
|
6017
|
+
CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((customMessage) => {
|
|
6018
|
+
callback(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, null, customMessage);
|
|
6019
|
+
});
|
|
6020
|
+
this.onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt) => {
|
|
6021
|
+
if (!this.disableReceipt) {
|
|
6022
|
+
this.markAsRead(messageReceipt);
|
|
6023
|
+
}
|
|
6024
|
+
});
|
|
6025
|
+
this.onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe((deletedMessage) => {
|
|
6026
|
+
callback(CometChatUIKitConstants.messages.MESSAGE_DELETED, null, deletedMessage);
|
|
6027
|
+
});
|
|
6028
|
+
this.onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe((editedMessage) => {
|
|
6029
|
+
callback(CometChatUIKitConstants.messages.MESSAGE_EDITED, null, editedMessage);
|
|
6030
|
+
});
|
|
6031
|
+
this.onMessagesDelivered =
|
|
6032
|
+
CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt) => {
|
|
6033
|
+
if (!this.disableReceipt) {
|
|
6034
|
+
this.updateDeliveredMessage(messageReceipt);
|
|
6035
|
+
}
|
|
6036
|
+
});
|
|
6037
|
+
this.onTypingStarted = CometChatMessageEvents.onTypingStarted.subscribe((typingIndicator) => {
|
|
6038
|
+
if (!this.disableTyping) {
|
|
6039
|
+
this.typingIndicator = typingIndicator;
|
|
6040
|
+
this.ref.detectChanges();
|
|
6041
|
+
}
|
|
6042
|
+
});
|
|
6043
|
+
this.onTypingEnded = CometChatMessageEvents.onTypingEnded.subscribe((typingIndicator) => {
|
|
6044
|
+
this.typingIndicator = null;
|
|
6045
|
+
this.ref.detectChanges();
|
|
6046
|
+
});
|
|
5873
6047
|
}
|
|
5874
6048
|
catch (error) {
|
|
5875
6049
|
if (this.onError) {
|
|
@@ -5887,10 +6061,21 @@ class CometChatConversationsComponent {
|
|
|
5887
6061
|
*/
|
|
5888
6062
|
removeListeners() {
|
|
5889
6063
|
try {
|
|
5890
|
-
CometChat.removeMessageListener(this.conversationListenerId);
|
|
5891
6064
|
CometChat.removeUserListener(this.userListenerId);
|
|
5892
6065
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
5893
6066
|
CometChat.removeConnectionListener(this.connectionListenerId);
|
|
6067
|
+
this.onTextMessageReceived?.unsubscribe();
|
|
6068
|
+
this.onMediaMessageReceived?.unsubscribe();
|
|
6069
|
+
this.onCustomMessageReceived?.unsubscribe();
|
|
6070
|
+
this.onFormMessageReceived?.unsubscribe();
|
|
6071
|
+
this.onCardMessageReceived?.unsubscribe();
|
|
6072
|
+
this.onCustomInteractiveMessageReceived?.unsubscribe();
|
|
6073
|
+
this.onMessagesRead?.unsubscribe();
|
|
6074
|
+
this.onMessageDeleted?.unsubscribe();
|
|
6075
|
+
this.onMessageEdited?.unsubscribe();
|
|
6076
|
+
this.onMessagesDelivered?.unsubscribe();
|
|
6077
|
+
this.onTypingStarted?.unsubscribe();
|
|
6078
|
+
this.onTypingEnded?.unsubscribe();
|
|
5894
6079
|
}
|
|
5895
6080
|
catch (error) {
|
|
5896
6081
|
if (this.onError) {
|
|
@@ -6584,7 +6769,6 @@ class CometChatMessageInformationComponent {
|
|
|
6584
6769
|
});
|
|
6585
6770
|
this.isUserType = false;
|
|
6586
6771
|
this.deliveredReceipt = Receipts.delivered;
|
|
6587
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
6588
6772
|
this.readReceipt = Receipts.read;
|
|
6589
6773
|
this.listStyle = {};
|
|
6590
6774
|
this.messageText = localize("MESSAGE");
|
|
@@ -6701,24 +6885,23 @@ class CometChatMessageInformationComponent {
|
|
|
6701
6885
|
this.messageInformationStyle = { ...defaultStyle, ...this.messageInformationStyle };
|
|
6702
6886
|
}
|
|
6703
6887
|
ngOnDestroy() {
|
|
6704
|
-
|
|
6888
|
+
this.onMessagesDelivered.unsubscribe();
|
|
6889
|
+
this.onMessagesRead.unsubscribe();
|
|
6705
6890
|
}
|
|
6706
6891
|
addMessageEventListeners() {
|
|
6707
6892
|
try {
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
this.ref.detectChanges();
|
|
6713
|
-
}
|
|
6714
|
-
},
|
|
6715
|
-
onMessagesRead: (messageReceipt) => {
|
|
6716
|
-
if (this.message?.getId() == Number(messageReceipt.getMessageId())) {
|
|
6717
|
-
this.message?.setReadAt(messageReceipt.getReadAt());
|
|
6718
|
-
this.ref.detectChanges();
|
|
6719
|
-
}
|
|
6893
|
+
this.onMessagesDelivered = CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt) => {
|
|
6894
|
+
if (this.message?.getId() == Number(messageReceipt.getMessageId())) {
|
|
6895
|
+
this.message?.setDeliveredAt(messageReceipt.getDeliveredAt());
|
|
6896
|
+
this.ref.detectChanges();
|
|
6720
6897
|
}
|
|
6721
|
-
})
|
|
6898
|
+
});
|
|
6899
|
+
this.onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt) => {
|
|
6900
|
+
if (this.message?.getId() == Number(messageReceipt.getMessageId())) {
|
|
6901
|
+
this.message?.setReadAt(messageReceipt.getReadAt());
|
|
6902
|
+
this.ref.detectChanges();
|
|
6903
|
+
}
|
|
6904
|
+
});
|
|
6722
6905
|
}
|
|
6723
6906
|
catch (error) {
|
|
6724
6907
|
if (this.onError) {
|
|
@@ -6979,7 +7162,6 @@ class CometChatMessageListComponent {
|
|
|
6979
7162
|
this.typesMap = {};
|
|
6980
7163
|
this.messageTypesMap = {};
|
|
6981
7164
|
this.theme = new CometChatTheme({});
|
|
6982
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
6983
7165
|
this.groupListenerId = "group_" + new Date().getTime();
|
|
6984
7166
|
this.callListenerId = "call_" + new Date().getTime();
|
|
6985
7167
|
this.states = States;
|
|
@@ -7312,6 +7494,16 @@ class CometChatMessageListComponent {
|
|
|
7312
7494
|
}
|
|
7313
7495
|
}
|
|
7314
7496
|
this.requestBuilder.fetchPrevious().then((messageList) => {
|
|
7497
|
+
if (messageList && messageList.length > 0) {
|
|
7498
|
+
messageList = messageList.map((message, i) => {
|
|
7499
|
+
if (message.getCategory() === CometChatUIKitConstants.MessageCategory.interactive) {
|
|
7500
|
+
return InteractiveMessageUtils.convertInteractiveMessage(message);
|
|
7501
|
+
}
|
|
7502
|
+
else {
|
|
7503
|
+
return message;
|
|
7504
|
+
}
|
|
7505
|
+
});
|
|
7506
|
+
}
|
|
7315
7507
|
this.state = States.loading;
|
|
7316
7508
|
// No Messages Found
|
|
7317
7509
|
if (messageList.length === 0 && this.messagesList.length === 0) {
|
|
@@ -7429,6 +7621,16 @@ class CometChatMessageListComponent {
|
|
|
7429
7621
|
}
|
|
7430
7622
|
}
|
|
7431
7623
|
this.requestBuilder.fetchNext().then((messageList) => {
|
|
7624
|
+
if (messageList && messageList.length > 0) {
|
|
7625
|
+
messageList = messageList.map((message, i) => {
|
|
7626
|
+
if (message.getCategory() === CometChatUIKitConstants.MessageCategory.interactive) {
|
|
7627
|
+
return InteractiveMessageUtils.convertInteractiveMessage(message);
|
|
7628
|
+
}
|
|
7629
|
+
else {
|
|
7630
|
+
return message;
|
|
7631
|
+
}
|
|
7632
|
+
});
|
|
7633
|
+
}
|
|
7432
7634
|
this.state = States.loading;
|
|
7433
7635
|
// No Messages Found
|
|
7434
7636
|
if (messageList.length === 0 && this.messagesList.length === 0) {
|
|
@@ -7614,9 +7816,19 @@ class CometChatMessageListComponent {
|
|
|
7614
7816
|
this.messageCount = 0;
|
|
7615
7817
|
}
|
|
7616
7818
|
this.requestBuilder = null;
|
|
7617
|
-
CometChat.removeMessageListener(this.msgListenerId);
|
|
7618
7819
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
7619
7820
|
CometChat.removeCallListener(this.callListenerId);
|
|
7821
|
+
this.onTextMessageReceived?.unsubscribe();
|
|
7822
|
+
this.onMediaMessageReceived?.unsubscribe();
|
|
7823
|
+
this.onCustomMessageReceived?.unsubscribe();
|
|
7824
|
+
this.onFormMessageReceived?.unsubscribe();
|
|
7825
|
+
this.onCardMessageReceived?.unsubscribe();
|
|
7826
|
+
this.onCustomInteractiveMessageReceived?.unsubscribe();
|
|
7827
|
+
this.onMessagesDelivered?.unsubscribe();
|
|
7828
|
+
this.onMessagesRead?.unsubscribe();
|
|
7829
|
+
this.onMessageDeleted?.unsubscribe();
|
|
7830
|
+
this.onMessageEdited?.unsubscribe();
|
|
7831
|
+
this.onTransientMessageReceived?.unsubscribe();
|
|
7620
7832
|
this.reInitializeMessageList();
|
|
7621
7833
|
};
|
|
7622
7834
|
/**
|
|
@@ -7653,6 +7865,19 @@ class CometChatMessageListComponent {
|
|
|
7653
7865
|
}
|
|
7654
7866
|
}
|
|
7655
7867
|
};
|
|
7868
|
+
this.updateInteractiveMessage = (receipt) => {
|
|
7869
|
+
if ((this.loggedInUser.getUid() === receipt.getSender().getUid())) {
|
|
7870
|
+
const message = this.getMessageById(receipt.getMessageId());
|
|
7871
|
+
if (message) {
|
|
7872
|
+
if (String(message?.getId()) ==
|
|
7873
|
+
String(receipt.getMessageId())) {
|
|
7874
|
+
const interaction = receipt.getInteractions();
|
|
7875
|
+
message.setInteractions(interaction);
|
|
7876
|
+
this.updateEditedMessage(InteractiveMessageUtils.convertInteractiveMessage(message));
|
|
7877
|
+
}
|
|
7878
|
+
}
|
|
7879
|
+
}
|
|
7880
|
+
};
|
|
7656
7881
|
/**
|
|
7657
7882
|
* Emits an Action Indicating that a message was deleted by the user/person you are chatting with
|
|
7658
7883
|
* @param {CometChat.BaseMessage} message
|
|
@@ -7974,10 +8199,19 @@ class CometChatMessageListComponent {
|
|
|
7974
8199
|
}
|
|
7975
8200
|
}
|
|
7976
8201
|
//Removing Previous Conversation Listeners
|
|
7977
|
-
|
|
8202
|
+
this.onTextMessageReceived?.unsubscribe();
|
|
8203
|
+
this.onMediaMessageReceived?.unsubscribe();
|
|
8204
|
+
this.onCustomMessageReceived?.unsubscribe();
|
|
8205
|
+
this.onFormMessageReceived?.unsubscribe();
|
|
8206
|
+
this.onCardMessageReceived?.unsubscribe();
|
|
8207
|
+
this.onCustomInteractiveMessageReceived?.unsubscribe();
|
|
8208
|
+
this.onMessagesDelivered?.unsubscribe();
|
|
8209
|
+
this.onMessagesRead?.unsubscribe();
|
|
8210
|
+
this.onMessageDeleted?.unsubscribe();
|
|
8211
|
+
this.onMessageEdited?.unsubscribe();
|
|
8212
|
+
this.onTransientMessageReceived?.unsubscribe();
|
|
7978
8213
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
7979
8214
|
CometChat.removeCallListener(this.callListenerId);
|
|
7980
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
7981
8215
|
this.groupListenerId = "group_" + new Date().getTime();
|
|
7982
8216
|
this.callListenerId = "call_" + new Date().getTime();
|
|
7983
8217
|
// Attach MessageListeners for the new conversation
|
|
@@ -8150,9 +8384,19 @@ class CometChatMessageListComponent {
|
|
|
8150
8384
|
this.unsubscribeToEvents();
|
|
8151
8385
|
try {
|
|
8152
8386
|
//Removing Message Listeners
|
|
8153
|
-
CometChat.removeMessageListener(this.msgListenerId);
|
|
8154
8387
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
8155
8388
|
CometChat.removeCallListener(this.callListenerId);
|
|
8389
|
+
this.onTextMessageReceived?.unsubscribe();
|
|
8390
|
+
this.onMediaMessageReceived?.unsubscribe();
|
|
8391
|
+
this.onCustomMessageReceived?.unsubscribe();
|
|
8392
|
+
this.onFormMessageReceived?.unsubscribe();
|
|
8393
|
+
this.onCardMessageReceived?.unsubscribe();
|
|
8394
|
+
this.onCustomInteractiveMessageReceived?.unsubscribe();
|
|
8395
|
+
this.onMessagesDelivered?.unsubscribe();
|
|
8396
|
+
this.onMessagesRead?.unsubscribe();
|
|
8397
|
+
this.onMessageDeleted?.unsubscribe();
|
|
8398
|
+
this.onMessageEdited?.unsubscribe();
|
|
8399
|
+
this.onTransientMessageReceived?.unsubscribe();
|
|
8156
8400
|
}
|
|
8157
8401
|
catch (error) {
|
|
8158
8402
|
if (this.onError) {
|
|
@@ -8216,7 +8460,7 @@ class CometChatMessageListComponent {
|
|
|
8216
8460
|
CometChatUIEvents.ccOpenChat.next({ user: messageObject.getSender() });
|
|
8217
8461
|
}
|
|
8218
8462
|
getMessageById(id) {
|
|
8219
|
-
let messageKey = this.messagesList.findIndex((m) => m.getId()
|
|
8463
|
+
let messageKey = this.messagesList.findIndex((m) => m.getId() == id);
|
|
8220
8464
|
if (messageKey > -1) {
|
|
8221
8465
|
return this.messagesList[messageKey];
|
|
8222
8466
|
}
|
|
@@ -8351,6 +8595,12 @@ class CometChatMessageListComponent {
|
|
|
8351
8595
|
border: `1px solid ${this.themeService.theme.palette.getAccent100()}`
|
|
8352
8596
|
};
|
|
8353
8597
|
}
|
|
8598
|
+
else if (!msg?.getDeletedAt() && msg?.getCategory() === CometChatUIKitConstants.MessageCategory.interactive) {
|
|
8599
|
+
return {
|
|
8600
|
+
background: this.themeService.theme.palette.getAccent100(),
|
|
8601
|
+
width: "300px"
|
|
8602
|
+
};
|
|
8603
|
+
}
|
|
8354
8604
|
else {
|
|
8355
8605
|
if (msg?.getSender() && msg?.getSender().getUid() != this.loggedInUser.getUid()) {
|
|
8356
8606
|
style = {
|
|
@@ -8439,6 +8689,154 @@ class CometChatMessageListComponent {
|
|
|
8439
8689
|
return null;
|
|
8440
8690
|
}
|
|
8441
8691
|
}
|
|
8692
|
+
getFormMessageBubbleStyle() {
|
|
8693
|
+
const textStyle = new InputStyle({
|
|
8694
|
+
width: "100%",
|
|
8695
|
+
height: "30px",
|
|
8696
|
+
border: `1px solid ${this.themeService.theme.palette.getAccent100()}`,
|
|
8697
|
+
borderRadius: "3px",
|
|
8698
|
+
padding: "0px 0px 0px 5px",
|
|
8699
|
+
placeholderTextColor: this.themeService.theme.palette.getAccent400(),
|
|
8700
|
+
placeholderTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8701
|
+
textFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8702
|
+
textColor: this.themeService.theme.palette.getAccent(),
|
|
8703
|
+
background: this.themeService.theme.palette.getBackground()
|
|
8704
|
+
});
|
|
8705
|
+
const labelStyle = new LabelStyle({
|
|
8706
|
+
textFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
8707
|
+
textColor: this.themeService.theme.palette.getAccent(),
|
|
8708
|
+
background: "transparent"
|
|
8709
|
+
});
|
|
8710
|
+
const radioButtonStyle = new RadioButtonStyle({
|
|
8711
|
+
height: "16px",
|
|
8712
|
+
width: "16px",
|
|
8713
|
+
border: "none",
|
|
8714
|
+
labelTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8715
|
+
labelTextColor: this.themeService.theme.palette.getAccent600(),
|
|
8716
|
+
borderRadius: "4px",
|
|
8717
|
+
background: "",
|
|
8718
|
+
});
|
|
8719
|
+
const checkboxStyle = new CheckboxStyle({
|
|
8720
|
+
height: "16px",
|
|
8721
|
+
width: "16px",
|
|
8722
|
+
border: "none",
|
|
8723
|
+
borderRadius: "4px",
|
|
8724
|
+
background: "",
|
|
8725
|
+
labelTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8726
|
+
labelTextColor: this.themeService.theme.palette.getAccent600(),
|
|
8727
|
+
});
|
|
8728
|
+
const dropdownStyle = new DropdownStyle({
|
|
8729
|
+
height: "35px",
|
|
8730
|
+
width: "100%",
|
|
8731
|
+
background: this.themeService.theme.palette.getBackground(),
|
|
8732
|
+
border: `1px solid ${this.themeService.theme.palette.getAccent100()}`,
|
|
8733
|
+
borderRadius: "12px",
|
|
8734
|
+
activeTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8735
|
+
activeTextColor: this.themeService.theme.palette.getAccent(),
|
|
8736
|
+
arrowIconTint: this.themeService.theme.palette.getAccent700(),
|
|
8737
|
+
textFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8738
|
+
textColor: this.themeService.theme.palette.getAccent(),
|
|
8739
|
+
optionBackground: this.themeService.theme.palette.getBackground(),
|
|
8740
|
+
optionBorder: `1px solid ${this.themeService.theme.palette.getAccent100()}`,
|
|
8741
|
+
optionHoverBorder: `1px solid ${this.themeService.theme.palette.getAccent100()}`,
|
|
8742
|
+
hoverTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8743
|
+
hoverTextColor: this.themeService.theme.palette.getAccent(),
|
|
8744
|
+
hoverTextBackground: this.themeService.theme.palette.getAccent100(),
|
|
8745
|
+
});
|
|
8746
|
+
const buttonGroupStyle = {
|
|
8747
|
+
height: "40px",
|
|
8748
|
+
width: "100%",
|
|
8749
|
+
background: this.themeService.theme.palette.getPrimary(),
|
|
8750
|
+
border: `none`,
|
|
8751
|
+
borderRadius: "12px",
|
|
8752
|
+
buttonTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8753
|
+
buttonTextColor: this.themeService.theme.palette.getBackground(),
|
|
8754
|
+
justifyContent: "center",
|
|
8755
|
+
};
|
|
8756
|
+
const singleSelectStyle = new SingleSelectStyle({
|
|
8757
|
+
height: "100%",
|
|
8758
|
+
width: "100%",
|
|
8759
|
+
background: this.themeService.theme.palette.getBackground(),
|
|
8760
|
+
border: "none",
|
|
8761
|
+
borderRadius: "12px",
|
|
8762
|
+
activeTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8763
|
+
activeTextColor: this.themeService.theme.palette.getAccent(),
|
|
8764
|
+
activeTextBackground: this.themeService.theme.palette.getAccent100(),
|
|
8765
|
+
textFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8766
|
+
textColor: this.themeService.theme.palette.getAccent(),
|
|
8767
|
+
optionBackground: this.themeService.theme.palette.getBackground(),
|
|
8768
|
+
optionBorder: `1px solid ${this.themeService.theme.palette.getAccent100()}`,
|
|
8769
|
+
optionBorderRadius: "2px",
|
|
8770
|
+
hoverTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8771
|
+
hoverTextColor: this.themeService.theme.palette.getAccent(),
|
|
8772
|
+
hoverTextBackground: this.themeService.theme.palette.getAccent100(),
|
|
8773
|
+
});
|
|
8774
|
+
const quickViewStyle = new QuickViewStyle({
|
|
8775
|
+
background: "transparent",
|
|
8776
|
+
height: "fit-content",
|
|
8777
|
+
width: "100%",
|
|
8778
|
+
titleFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8779
|
+
titleColor: this.themeService.theme.palette.getPrimary(),
|
|
8780
|
+
subtitleFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8781
|
+
subtitleColor: this.themeService.theme.palette.getAccent600(),
|
|
8782
|
+
leadingBarTint: this.themeService.theme.palette.getPrimary(),
|
|
8783
|
+
leadingBarWidth: "4px",
|
|
8784
|
+
borderRadius: "8px",
|
|
8785
|
+
});
|
|
8786
|
+
return new FormBubbleStyle({
|
|
8787
|
+
width: "300px",
|
|
8788
|
+
height: "fit-content",
|
|
8789
|
+
border: "none",
|
|
8790
|
+
background: "transparent",
|
|
8791
|
+
wrapperBackground: this.themeService.theme.palette.getBackground(),
|
|
8792
|
+
borderRadius: "8px",
|
|
8793
|
+
wrapperBorderRadius: "8px",
|
|
8794
|
+
textInputStyle: textStyle,
|
|
8795
|
+
labelStyle: labelStyle,
|
|
8796
|
+
radioButtonStyle: radioButtonStyle,
|
|
8797
|
+
checkboxStyle: checkboxStyle,
|
|
8798
|
+
dropdownStyle: dropdownStyle,
|
|
8799
|
+
buttonStyle: buttonGroupStyle,
|
|
8800
|
+
singleSelectStyle: singleSelectStyle,
|
|
8801
|
+
quickViewStyle: quickViewStyle,
|
|
8802
|
+
titleColor: this.themeService.theme.palette.getAccent(),
|
|
8803
|
+
titleFont: fontHelper(this.themeService.theme.typography.title1),
|
|
8804
|
+
goalCompletionTextColor: this.themeService.theme.palette.getAccent(),
|
|
8805
|
+
goalCompletionTextFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
8806
|
+
wrapperPadding: "2px",
|
|
8807
|
+
});
|
|
8808
|
+
}
|
|
8809
|
+
;
|
|
8810
|
+
getCardMessageBubbleStyle() {
|
|
8811
|
+
const buttonStyle = {
|
|
8812
|
+
height: "40px",
|
|
8813
|
+
width: "100%",
|
|
8814
|
+
background: "transparent",
|
|
8815
|
+
border: `none`,
|
|
8816
|
+
borderRadius: "0px",
|
|
8817
|
+
buttonTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8818
|
+
buttonTextColor: `${this.themeService.theme.palette.getPrimary()}`,
|
|
8819
|
+
justifyContent: "center",
|
|
8820
|
+
};
|
|
8821
|
+
return new CardBubbleStyle({
|
|
8822
|
+
background: "transparent",
|
|
8823
|
+
borderRadius: "8px",
|
|
8824
|
+
height: "fit-content",
|
|
8825
|
+
width: "300px",
|
|
8826
|
+
imageHeight: "auto",
|
|
8827
|
+
imageWidth: "100%",
|
|
8828
|
+
imageRadius: "8px",
|
|
8829
|
+
imageBackgroundColor: "transparent",
|
|
8830
|
+
descriptionFontColor: this.themeService.theme.palette.getAccent(),
|
|
8831
|
+
descriptionFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8832
|
+
buttonStyle: buttonStyle,
|
|
8833
|
+
dividerTintColor: this.themeService.theme.palette.getAccent100(),
|
|
8834
|
+
wrapperBackground: this.themeService.theme.palette.getBackground(),
|
|
8835
|
+
wrapperBorderRadius: "8px",
|
|
8836
|
+
wrapperPadding: "2px",
|
|
8837
|
+
disabledButtonColor: this.themeService.theme.palette.getAccent600()
|
|
8838
|
+
});
|
|
8839
|
+
}
|
|
8442
8840
|
getCallBubbleStyle(message) {
|
|
8443
8841
|
var isLeftAligned = this.alignment == MessageListAlignment.left;
|
|
8444
8842
|
var isUserSentMessage = !message?.getSender() || this.loggedInUser.getUid() === message?.getSender().getUid();
|
|
@@ -8532,7 +8930,9 @@ class CometChatMessageListComponent {
|
|
|
8532
8930
|
extension_whiteboard: this.whiteboardBubble,
|
|
8533
8931
|
extension_document: this.documentBubble,
|
|
8534
8932
|
extension_poll: this.pollBubble,
|
|
8535
|
-
meeting: this.directCalling
|
|
8933
|
+
meeting: this.directCalling,
|
|
8934
|
+
form: this.formBubble,
|
|
8935
|
+
card: this.cardBubble,
|
|
8536
8936
|
};
|
|
8537
8937
|
this.setBubbleView();
|
|
8538
8938
|
}
|
|
@@ -8949,41 +9349,6 @@ class CometChatMessageListComponent {
|
|
|
8949
9349
|
}
|
|
8950
9350
|
addMessageEventListeners() {
|
|
8951
9351
|
try {
|
|
8952
|
-
CometChat.addMessageListener(this.msgListenerId, new CometChat.MessageListener({
|
|
8953
|
-
onTextMessageReceived: (textMessage) => {
|
|
8954
|
-
this.messageUpdate(CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED, textMessage);
|
|
8955
|
-
},
|
|
8956
|
-
onCustomMessageReceived: (customMessage) => {
|
|
8957
|
-
this.messageUpdate(CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED, customMessage);
|
|
8958
|
-
},
|
|
8959
|
-
onMediaMessageReceived: (mediaMessage) => {
|
|
8960
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED, mediaMessage);
|
|
8961
|
-
},
|
|
8962
|
-
onMessagesDelivered: (messageReceipt) => {
|
|
8963
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_DELIVERED, messageReceipt);
|
|
8964
|
-
},
|
|
8965
|
-
onMessagesRead: (messageReceipt) => {
|
|
8966
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_READ, messageReceipt);
|
|
8967
|
-
},
|
|
8968
|
-
onMessageDeleted: (deletedMessage) => {
|
|
8969
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_DELETED, deletedMessage);
|
|
8970
|
-
},
|
|
8971
|
-
onMessageEdited: (editedMessage) => {
|
|
8972
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_EDITED, editedMessage);
|
|
8973
|
-
},
|
|
8974
|
-
onTransientMessageReceived: (transientMessage) => {
|
|
8975
|
-
let liveReaction = transientMessage.getData();
|
|
8976
|
-
console.log(liveReaction);
|
|
8977
|
-
if (transientMessage.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.user && this.user && transientMessage?.getSender().getUid() == this.user.getUid() && transientMessage.getReceiverId() == this.loggedInUser?.getUid()) {
|
|
8978
|
-
CometChatMessageEvents.ccLiveReaction.next(liveReaction["reaction"]);
|
|
8979
|
-
return;
|
|
8980
|
-
}
|
|
8981
|
-
else if (transientMessage.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.group && this.group && transientMessage.getReceiverId() == this.group.getGuid() && transientMessage?.getSender().getUid() != this.loggedInUser?.getUid()) {
|
|
8982
|
-
CometChatMessageEvents.ccLiveReaction.next(liveReaction["reaction"]);
|
|
8983
|
-
return;
|
|
8984
|
-
}
|
|
8985
|
-
},
|
|
8986
|
-
}));
|
|
8987
9352
|
CometChat.addGroupListener(this.groupListenerId, new CometChat.GroupListener({
|
|
8988
9353
|
onGroupMemberScopeChanged: (message, changedUser, newScope, oldScope, changedGroup) => {
|
|
8989
9354
|
this.messageUpdate(CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE, message, changedGroup, { user: changedUser, scope: newScope });
|
|
@@ -9038,6 +9403,50 @@ class CometChatMessageListComponent {
|
|
|
9038
9403
|
}
|
|
9039
9404
|
}));
|
|
9040
9405
|
}
|
|
9406
|
+
this.onTextMessageReceived = CometChatMessageEvents.onTextMessageReceived.subscribe((message) => {
|
|
9407
|
+
this.messageUpdate(CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED, message);
|
|
9408
|
+
});
|
|
9409
|
+
this.onMediaMessageReceived = CometChatMessageEvents.onMediaMessageReceived.subscribe((message) => {
|
|
9410
|
+
this.messageUpdate(CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED, message);
|
|
9411
|
+
});
|
|
9412
|
+
this.onCustomMessageReceived = CometChatMessageEvents.onCustomMessageReceived.subscribe((message) => {
|
|
9413
|
+
this.messageUpdate(CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED, message);
|
|
9414
|
+
});
|
|
9415
|
+
this.onFormMessageReceived = CometChatMessageEvents.onFormMessageReceived.subscribe((message) => {
|
|
9416
|
+
this.messageUpdate(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, message);
|
|
9417
|
+
});
|
|
9418
|
+
this.onCardMessageReceived = CometChatMessageEvents.onCardMessageReceived.subscribe((message) => {
|
|
9419
|
+
this.messageUpdate(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, message);
|
|
9420
|
+
});
|
|
9421
|
+
this.onCustomInteractiveMessageReceived = CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((message) => {
|
|
9422
|
+
this.messageUpdate(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, message);
|
|
9423
|
+
});
|
|
9424
|
+
this.onMessagesDelivered = CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt) => {
|
|
9425
|
+
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_DELIVERED, messageReceipt);
|
|
9426
|
+
});
|
|
9427
|
+
this.onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt) => {
|
|
9428
|
+
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_READ, messageReceipt);
|
|
9429
|
+
});
|
|
9430
|
+
this.onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe((deletedMessage) => {
|
|
9431
|
+
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_DELETED, deletedMessage);
|
|
9432
|
+
});
|
|
9433
|
+
this.onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe((editedMessage) => {
|
|
9434
|
+
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_EDITED, editedMessage);
|
|
9435
|
+
});
|
|
9436
|
+
this.onTransientMessageReceived = CometChatMessageEvents.onTransientMessageReceived.subscribe((transientMessage) => {
|
|
9437
|
+
let liveReaction = transientMessage.getData();
|
|
9438
|
+
if (transientMessage.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.user && this.user && transientMessage?.getSender().getUid() == this.user.getUid() && transientMessage.getReceiverId() == this.loggedInUser?.getUid()) {
|
|
9439
|
+
CometChatMessageEvents.ccLiveReaction.next(liveReaction["reaction"]);
|
|
9440
|
+
return;
|
|
9441
|
+
}
|
|
9442
|
+
else if (transientMessage.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.group && this.group && transientMessage.getReceiverId() == this.group.getGuid() && transientMessage?.getSender().getUid() != this.loggedInUser?.getUid()) {
|
|
9443
|
+
CometChatMessageEvents.ccLiveReaction.next(liveReaction["reaction"]);
|
|
9444
|
+
return;
|
|
9445
|
+
}
|
|
9446
|
+
});
|
|
9447
|
+
this.onInteractionGoalCompleted = CometChatMessageEvents.onInteractionGoalCompleted.subscribe((receipt) => {
|
|
9448
|
+
this.messageUpdate(CometChatUIKitConstants.messages.INTERACTION_GOAL_COMPLETED, receipt);
|
|
9449
|
+
});
|
|
9041
9450
|
}
|
|
9042
9451
|
catch (error) {
|
|
9043
9452
|
if (this.onError) {
|
|
@@ -9086,8 +9495,12 @@ class CometChatMessageListComponent {
|
|
|
9086
9495
|
break;
|
|
9087
9496
|
}
|
|
9088
9497
|
case CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED:
|
|
9498
|
+
case CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED:
|
|
9089
9499
|
this.customMessageReceived(message);
|
|
9090
9500
|
break;
|
|
9501
|
+
case CometChatUIKitConstants.messages.INTERACTION_GOAL_COMPLETED:
|
|
9502
|
+
this.updateInteractiveMessage(message);
|
|
9503
|
+
break;
|
|
9091
9504
|
default:
|
|
9092
9505
|
return;
|
|
9093
9506
|
}
|
|
@@ -9170,7 +9583,6 @@ class CometChatMessageListComponent {
|
|
|
9170
9583
|
}
|
|
9171
9584
|
reInitializeMessageList() {
|
|
9172
9585
|
this.reinitialized = true;
|
|
9173
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
9174
9586
|
this.groupListenerId = "group_" + new Date().getTime();
|
|
9175
9587
|
this.callListenerId = "call_" + new Date().getTime();
|
|
9176
9588
|
this.addMessageEventListeners();
|
|
@@ -9596,10 +10008,10 @@ class CometChatMessageListComponent {
|
|
|
9596
10008
|
}
|
|
9597
10009
|
}
|
|
9598
10010
|
CometChatMessageListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageListComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: CometChatThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9599
|
-
CometChatMessageListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatMessageListComponent, selector: "cometchat-message-list", inputs: { hideError: "hideError", errorStateView: "errorStateView", loadingStateView: "loadingStateView", emptyStateView: "emptyStateView", errorStateText: "errorStateText", emptyStateText: "emptyStateText", loadingIconURL: "loadingIconURL", user: "user", group: "group", disableReceipt: "disableReceipt", disableSoundForMessages: "disableSoundForMessages", customSoundForMessages: "customSoundForMessages", readIcon: "readIcon", deliveredIcon: "deliveredIcon", sentIcon: "sentIcon", waitIcon: "waitIcon", errorIcon: "errorIcon", alignment: "alignment", showAvatar: "showAvatar", datePattern: "datePattern", timestampAlignment: "timestampAlignment", DateSeparatorPattern: "DateSeparatorPattern", templates: "templates", messagesRequestBuilder: "messagesRequestBuilder", newMessageIndicatorText: "newMessageIndicatorText", scrollToBottomOnNewMessages: "scrollToBottomOnNewMessages", thresholdValue: "thresholdValue", onThreadRepliesClick: "onThreadRepliesClick", headerView: "headerView", footerView: "footerView", parentMessageId: "parentMessageId", avatarStyle: "avatarStyle", backdropStyle: "backdropStyle", dateSeparatorStyle: "dateSeparatorStyle", messageListStyle: "messageListStyle", onError: "onError", messageInformationConfiguration: "messageInformationConfiguration" }, viewQueries: [{ propertyName: "listScroll", first: true, predicate: ["listScroll"], descendants: true }, { propertyName: "bottom", first: true, predicate: ["bottom"], descendants: true }, { propertyName: "top", first: true, predicate: ["top"], descendants: true }, { propertyName: "textBubble", first: true, predicate: ["textBubble"], descendants: true }, { propertyName: "threadMessageBubble", first: true, predicate: ["threadMessageBubble"], descendants: true }, { propertyName: "fileBubble", first: true, predicate: ["fileBubble"], descendants: true }, { propertyName: "audioBubble", first: true, predicate: ["audioBubble"], descendants: true }, { propertyName: "videoBubble", first: true, predicate: ["videoBubble"], descendants: true }, { propertyName: "imageBubble", first: true, predicate: ["imageBubble"], descendants: true }, { propertyName: "stickerBubble", first: true, predicate: ["stickerBubble"], descendants: true }, { propertyName: "documentBubble", first: true, predicate: ["documentBubble"], descendants: true }, { propertyName: "whiteboardBubble", first: true, predicate: ["whiteboardBubble"], descendants: true }, { propertyName: "popoverRef", first: true, predicate: ["popoverRef"], descendants: true }, { propertyName: "directCalling", first: true, predicate: ["directCalling"], descendants: true }, { propertyName: "pollBubble", first: true, predicate: ["pollBubble"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-message-list__wrapper\" [ngStyle]=\"wrapperStyle()\" *ngIf=\"!openContactsView\">\n <div class=\"cc-message-list__header-view\">\n<div *ngIf=\"headerView\">\n <ng-container *ngTemplateOutlet=\"headerView\">\n </ng-container>\n</div>\n </div>\n <div class=\"cc-message-list\" #listScroll [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '92%' : '100%'}\">\n <div class=\"cc-message-list__top\" #top>\n </div>\n <div class=\"cc-message-list__decorator-message\" *ngIf=\"state == states.loading || state == states.error || state == states.empty \"\n [ngStyle]=\"messageContainerStyle()\">\n <div class=\"cc-message-list__loading-view\" *ngIf=\"state == states.loading \">\n <cometchat-loader [iconURL]=\"loadingIconURL\" [loaderStyle]=\"loadingStyle()\">\n </cometchat-loader>\n <span class=\"cc-message-list__customview--loading\" *ngIf=\"state == states.loading && loadingStateView\">\n <ng-container *ngTemplateOutlet=\"loadingStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__error-view\" *ngIf=\"state == states.error && !hideError \">\n <cometchat-label [labelStyle]=\"errorStyle()\" *ngIf=\"state == states.error && !hideError && !errorStateView\" [text]=\"errorStateText\"\n >\n </cometchat-label>\n <span class=\"cc-message-list__custom-view--error\" *ngIf=\"state == states.error && !hideError && errorStateView\">\n <ng-container *ngTemplateOutlet=\"errorStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__empty-view\" *ngIf=\"state == states.empty\">\n <!-- <cometchat-label [labelStyle]=\"emptyStyle()\" *ngIf=\"state == states.empty && !emptyStateView\" [text]=\"emptyStateText\"\n >\n </cometchat-label> -->\n <span class=\"cc-message-list__custom-view--empty\" *ngIf=\"state == states.empty && emptyStateView\">\n <ng-container *ngTemplateOutlet=\"emptyStateView\">\n </ng-container>\n </span>\n </div>\n </div>\n <div class=\"cc-message-list__bubble\" *ngFor=\"let message of messagesList; let i = index\">\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i === 0) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message!.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i > 0 && isDateDifferent(messagesList[i - 1]?.getSentAt(), messagesList[i]?.getSentAt())) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div *ngIf=\"getBubbleWrapper(message) \">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [leadingView]=\" showAvatar ? leadingView : null\" [bottomView]=\"enableReactions ? reactionView : null\"\n [headerView]=\"getHeaderView(message) || message?.getCategory() != MessageCategory.action && showHeaderTitle(message) ? bubbleHeader : null\" [footerView]=\"footerView\" [contentView]=\"contentView\" [threadView]=\"threadView\"\n [id]=\"message?.getId() || message?.getMuid()\" [options]=\"setMessageOptions(message)\"\n [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"setBubbleAlignment(message)\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && !message.getDeletedAt() && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"deliveredIcon\" [readIcon]=\"readIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n <div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n <cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n </cometchat-avatar>\n </div>\n</ng-template>\n<ng-template #bubbleHeader>\n <div *ngIf=\"getHeaderView(message);else defaultHeader\">\n <ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n<ng-template #defaultHeader>\n <div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n <cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n <cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n </div>\n</ng-template>\n</ng-template>\n<ng-template #threadView>\n <div class=\"cc-message-list__threadreplies\" *ngIf=\"message?.getReplyCount() && !message.getDeletedAt()\" >\n <cometchat-divider [dividerStyle]=\"dividerStyle\"></cometchat-divider>\n <cometchat-button [text]=\"getThreadCount(message)\" [buttonStyle]=\"getThreadViewStyle(message)\" [iconURL]=\"threadOpenIcon\" (cc-button-clicked)=\"openThreadView(message)\">\n </cometchat-button>\n </div>\n</ng-template>\n </cometchat-message-bubble>\n </div>\n </div>\n <div class=\"cc-message-list__bottom\" #bottom>\n </div>\n\n </div>\n <div class=\"cc-message-list__message-indicator\" *ngIf=\"UnreadCount && UnreadCount.length > 0 && !isOnBottom\" [ngStyle]=\"{bottom: showSmartReply || footerView || showConversationStarter ? '20%' : '13%'}\">\n <cometchat-button [text]=\"newMessageCount\" [buttonStyle]=\"unreadMessagesStyle\" (cc-button-clicked)=\"scrollToBottom()\"></cometchat-button>\n </div>\n <div class=\"cc-message-list__footer-view\" [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '8%' : 'auto'}\">\n\n <div *ngIf=\"footerView;else footer\">\n <ng-container *ngTemplateOutlet=\"footerView\">\n </ng-container>\n </div>\n <ng-template #footer>\n <div class=\"cc-message-list__smart-replies\" *ngIf=\"!showConversationStarter && showSmartReply && getReplies()\">\n <smart-replies [smartReplyStyle]=\"smartReplyStyle\" [replies]=\"getReplies()\" (cc-reply-clicked)=\"sendReply($event)\" (cc-close-clicked)=\"closeSmartReply()\">\n </smart-replies>\n </div>\n <div class=\"cc-message-list__conversation-starters\" *ngIf=\"enableConversationStarter && showConversationStarter\">\n <div class=\"cc-message-list__footer__decorator-message\" *ngIf=\"conversationStarterState == states.loading || conversationStarterState == states.error || conversationStarterState == states.empty \"\n >\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.loading\">\n <cometchat-loader iconURL=\"assets/Spinner.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterLoadingStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.error && !hideError \">\n <cometchat-loader iconURL=\"assets/ai-error.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterErrorStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.empty\">\n <cometchat-loader iconURL=\"assets/ai-empty.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterEmptyStateText\"\n >\n </cometchat-label>\n \n </div>\n </div>\n <smart-replies *ngIf=\"conversationStarterState == states.loaded && !parentMessageId\" [smartReplyStyle]=\"conversationStarterStyle\" [replies]=\"conversationStarterReplies\" (cc-reply-clicked)=\"sendConversationStarter($event)\" [closeIconURL]=\"''\">\n </smart-replies>\n </div>\n </ng-template>\n </div>\n\n</div>\n<!-- default bubbles -->\n<ng-template #textBubble let-message>\n <cometchat-text-bubble *ngIf=\"message?.type == MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.message\"></cometchat-text-bubble>\n <cometchat-text-bubble *ngIf=\"message?.getDeletedAt()\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"localize('MESSAGE_IS_DELETED')\"></cometchat-text-bubble>\n<cometchat-text-bubble *ngIf=\"!isTranslated(message) && !getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n<link-preview [linkPreviewStyle]=\"linkPreviewStyle\" (cc-link-clicked)=\"openLinkURL($event)\" *ngIf=\"!message?.getDeletedAt() && getLinkPreview(message) && enableLinkPreview\" [title]=\"getLinkPreviewDetails('title',message)\" [description]=\"getLinkPreviewDetails('description',message)\" [URL]=\"getLinkPreviewDetails('url',message)\" [image]=\"getLinkPreviewDetails('image',message)\" [favIconURL]=\"getLinkPreviewDetails('favicon',message)\">\n <cometchat-text-bubble\n *ngIf=\"!isTranslated(message) && getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\"\n [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n</link-preview>\n<message-translation-bubble [alignment]=\"getBubbleAlignment(message)\" *ngIf=\"isTranslated(message)\" [messageTranslationStyle]=\"setTranslationStyle(message)\" [translatedText]=\"isTranslated(message)\">\n <cometchat-text-bubble *ngIf=\" !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.text\"></cometchat-text-bubble>\n\n</message-translation-bubble>\n</ng-template>\n<ng-template #fileBubble let-message>\n\n <cometchat-file-bubble [fileStyle]=\"setFileBubbleStyle(message)\" [downloadIconURL]=\"downloadIconURL\" [subtitle]=\"localize('SHARED_FILE')\" [title]=\"message?.data?.attachments ? message?.data?.attachments[0]?.name: ''\" [fileURL]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\"></cometchat-file-bubble>\n</ng-template>\n<ng-template #audioBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.audio\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n <cometchat-audio-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" > </cometchat-audio-bubble>\n</ng-template>\n<ng-template #videoBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.video\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n\n <cometchat-video-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [videoStyle]=\"videoBubbleStyle\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" [poster]=\" getImageThumbnail(message)\"></cometchat-video-bubble>\n</ng-template>\n<ng-template #imageBubble let-message>\n <image-moderation (cc-show-dialog)=\"openWarningDialog($event)\" *ngIf=\"!message.getDeletedAt() && enableImageModeration\" [message]=\"message\" [imageModerationStyle]=\"imageModerationStyle\">\n <cometchat-image-bubble (cc-image-clicked)=\"openImageInFullScreen(message)\" [imageStyle]=\"imageBubbleStyle\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n </image-moderation>\n <cometchat-image-bubble [imageStyle]=\"imageBubbleStyle\" (cc-image-clicked)=\"openImageInFullScreen(message)\" *ngIf=\"!message.getDeletedAt() && !enableImageModeration\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n</ng-template>\n<ng-template #customTextBubble>\n</ng-template>\n<ng-template #stickerBubble let-message>\n <cometchat-image-bubble [src]=\"getSticker(message)\" [imageStyle]=\"imageBubbleStyle\" ></cometchat-image-bubble>\n\n</ng-template>\n<ng-template #whiteboardBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"whiteboardIconURL\" [title]=\"whiteboardTitle\" [buttonText]=\"whiteboardButtonText\" [subtitle]=\"whiteboardSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #documentBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"documentIconURL\" [title]=\"documentTitle\" [buttonText]=\"documentButtonText\" [subtitle]=\"documentSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #directCalling let-message>\n <cometchat-document-bubble [hideSeparator]=\"true\" [iconAlignment]=\"callBubbleAlignment\" [documentStyle]=\"getCallBubbleStyle(message)\" [URL]=\"getSessionId(message)\" [ccClicked]=\"startDirectCall\" [iconURL]=\"directCallIconURL\" [title]=\"getCallBubbleTitle(message)\" [buttonText]=\"joinCallButtonText\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #pollBubble let-message>\n <polls-bubble [pollStyle]=\"pollBubbleStyle\" [pollQuestion]=\"getPollBubbleData(message,'question')\" [pollId]=\"getPollBubbleData(message,'id')\"\n [loggedInUser]=\"loggedInUser\" [senderUid]=\"getPollBubbleData(message)\" [metadata]=\"message?.metadata\"></polls-bubble>\n\n</ng-template>\n\n<!-- thread bubble view -->\n<ng-template #threadMessageBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\" [footerView]=\"footerView\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"threadedAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\"\n \n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\" [addReactionIconURL]=\"addReactionIconURL\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"\" [readIcon]=\"deliveredIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n\n\n<!-- -->\n<ng-template #bubbleView></ng-template>\n<cometchat-popover [popoverStyle]=\"popoverStyle\" #popoverRef [placement]=\"keyboardAlignment\">\n<cometchat-emoji-keyboard (cc-emoji-clicked)=\"addReaction($event)\" slot=\"content\"></cometchat-emoji-keyboard>\n</cometchat-popover>\n<cometchat-backdrop *ngIf=\"openConfirmDialog\" [backdropStyle]=\"backdropStyle\">\n <cometchat-confirm-dialog [title]=\"''\" [messageText]=\"warningText\" (cc-confirm-clicked)=\"onConfirmClick()\" [cancelButtonText]=\"cancelText\" [confirmButtonText]=\"confirmText\" (cc-cancel-clicked)=\"onCancelClick()\" [confirmDialogStyle]=\"confirmDialogStyle\">\n\n </cometchat-confirm-dialog>\n</cometchat-backdrop>\n<cometchat-full-screen-viewer (cc-close-clicked)=\"closeImageInFullScreen()\" *ngIf=\"openFullscreenView\" [URL]=\"imageurlToOpen\" [closeIconURL]=\"closeIconURL\" [fullScreenViewerStyle]=\"fullScreenViewerStyle\">\n\n</cometchat-full-screen-viewer>\n\n<!-- ongoing callscreen for direct call -->\n<cometchat-ongoing-call *ngIf=\"showOngoingCall\" [callSettingsBuilder]=\"getCallBuilder()\" [ongoingCallStyle]=\"ongoingCallStyle\" [sessionID]=\"sessionId\"></cometchat-ongoing-call>\n<!-- message information view -->\n<!-- thread bubble view -->\n<ng-template #messageinfoBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions && hasReaction(message) ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"messageInfoAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n<cometchat-backdrop *ngIf=\"openMessageInfoPage\" [backdropStyle]=\"backdropStyle\">\n <cometchat-message-information [closeIconURL]=\"messageInformationConfiguration.closeIconURL\" [loadingStateView]=\"messageInformationConfiguration.loadingStateView\" [errorStateView]=\"messageInformationConfiguration.errorStateView\" [listItemStyle]=\"messageInformationConfiguration.listItemStyle\" [emptyStateView]=\"messageInformationConfiguration.emptyStateView\" [loadingIconURL]=\"messageInformationConfiguration.loadingIconURL\" [readIcon]=\"messageInformationConfiguration.readIcon\" [deliveredIcon]=\"messageInformationConfiguration.deliveredIcon\" [onError]=\"messageInformationConfiguration.onError\" [SubtitleView]=\"messageInformationConfiguration.subtitleView\" [receiptDatePattern]=\"messageInformationConfiguration.receiptDatePattern\" [listItemView]=\"messageInformationConfiguration.listItemView \" [messageInformationStyle]=\"messageInformationConfiguration.messageInformationStyle\" [onClose]=\"messageInformationConfiguration.onClose ?? closeMessageInfoPage\" [bubbleView]=\"messageInformationConfiguration.bubbleView ?? messageinfoBubble\" [message]=\"messageInfoObject\">\n\n </cometchat-message-information>\n</cometchat-backdrop>\n", styles: [".cc-message-list{height:100%;width:100%;overflow-y:auto;overflow-x:hidden;position:relative}.cc-message-list__wrapper{height:100%;width:100%;overflow-y:hidden}.cc-message-list__bubble-footer{display:flex;justify-content:center;align-items:center}.cc-message-list__date-container{text-align:center;margin:5px 0}.cc-message-list__smart-replies,.cc-message-list__conversation-starters{height:-moz-fit-content;height:fit-content;width:100%;position:absolute;bottom:0;z-index:1}.cc-message-list__date{border-radius:10px;display:flex;justify-content:center}.cc-message-list__threadreplies{min-width:130px;width:100%}.cc-message-list__message-indicator{height:25px;display:flex;align-items:center;justify-content:center;width:100%;bottom:10%;position:absolute}.cc-message-list__footer-view{z-index:1;position:relative;width:100%}.cc-message-list__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;height:100%}.cc-message-list__footer__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px 0 16px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:flex-start;height:100%}.cc-message-list::-webkit-scrollbar{background:transparent;width:8px}.cc-message-list::-webkit-scrollbar-thumb{background:#e8e5e5;border-radius:8px}.cc-message-list__footer-view-decorator{display:flex;flex-direction:row;column-gap:8px}\n"], components: [{ type: CometChatMessageBubbleComponent, selector: "cometchat-message-bubble", inputs: ["messageBubbleStyle", "alignment", "options", "id", "leadingView", "headerView", "replyView", "contentView", "threadView", "footerView", "bottomView", "moreIconURL", "topMenuSize"] }, { type: CometChatOngoingCallComponent, selector: "cometchat-ongoing-call", inputs: ["ongoingCallStyle", "resizeIconHoverText", "sessionID", "minimizeIconURL", "maximizeIconURL", "callSettingsBuilder", "callWorkflow", "onError"] }, { type: CometChatMessageInformationComponent, selector: "cometchat-message-information", inputs: ["closeIconURL", "message", "title", "template", "bubbleView", "subtitleView", "listItemView", "receiptDatePattern", "onError", "messageInformationStyle", "readIcon", "deliveredIcon", "onClose", "listItemStyle", "emptyStateText", "errorStateText", "emptyStateView", "loadingIconURL", "loadingStateView", "errorStateView"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10011
|
+
CometChatMessageListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatMessageListComponent, selector: "cometchat-message-list", inputs: { hideError: "hideError", errorStateView: "errorStateView", loadingStateView: "loadingStateView", emptyStateView: "emptyStateView", errorStateText: "errorStateText", emptyStateText: "emptyStateText", loadingIconURL: "loadingIconURL", user: "user", group: "group", disableReceipt: "disableReceipt", disableSoundForMessages: "disableSoundForMessages", customSoundForMessages: "customSoundForMessages", readIcon: "readIcon", deliveredIcon: "deliveredIcon", sentIcon: "sentIcon", waitIcon: "waitIcon", errorIcon: "errorIcon", alignment: "alignment", showAvatar: "showAvatar", datePattern: "datePattern", timestampAlignment: "timestampAlignment", DateSeparatorPattern: "DateSeparatorPattern", templates: "templates", messagesRequestBuilder: "messagesRequestBuilder", newMessageIndicatorText: "newMessageIndicatorText", scrollToBottomOnNewMessages: "scrollToBottomOnNewMessages", thresholdValue: "thresholdValue", onThreadRepliesClick: "onThreadRepliesClick", headerView: "headerView", footerView: "footerView", parentMessageId: "parentMessageId", avatarStyle: "avatarStyle", backdropStyle: "backdropStyle", dateSeparatorStyle: "dateSeparatorStyle", messageListStyle: "messageListStyle", onError: "onError", messageInformationConfiguration: "messageInformationConfiguration" }, viewQueries: [{ propertyName: "listScroll", first: true, predicate: ["listScroll"], descendants: true }, { propertyName: "bottom", first: true, predicate: ["bottom"], descendants: true }, { propertyName: "top", first: true, predicate: ["top"], descendants: true }, { propertyName: "textBubble", first: true, predicate: ["textBubble"], descendants: true }, { propertyName: "threadMessageBubble", first: true, predicate: ["threadMessageBubble"], descendants: true }, { propertyName: "fileBubble", first: true, predicate: ["fileBubble"], descendants: true }, { propertyName: "audioBubble", first: true, predicate: ["audioBubble"], descendants: true }, { propertyName: "videoBubble", first: true, predicate: ["videoBubble"], descendants: true }, { propertyName: "imageBubble", first: true, predicate: ["imageBubble"], descendants: true }, { propertyName: "formBubble", first: true, predicate: ["formBubble"], descendants: true }, { propertyName: "cardBubble", first: true, predicate: ["cardBubble"], descendants: true }, { propertyName: "stickerBubble", first: true, predicate: ["stickerBubble"], descendants: true }, { propertyName: "documentBubble", first: true, predicate: ["documentBubble"], descendants: true }, { propertyName: "whiteboardBubble", first: true, predicate: ["whiteboardBubble"], descendants: true }, { propertyName: "popoverRef", first: true, predicate: ["popoverRef"], descendants: true }, { propertyName: "directCalling", first: true, predicate: ["directCalling"], descendants: true }, { propertyName: "pollBubble", first: true, predicate: ["pollBubble"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-message-list__wrapper\" [ngStyle]=\"wrapperStyle()\" *ngIf=\"!openContactsView\">\n <div class=\"cc-message-list__header-view\">\n<div *ngIf=\"headerView\">\n <ng-container *ngTemplateOutlet=\"headerView\">\n </ng-container>\n</div>\n </div>\n <div class=\"cc-message-list\" #listScroll [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '92%' : '100%'}\">\n <div class=\"cc-message-list__top\" #top>\n </div>\n <div class=\"cc-message-list__decorator-message\" *ngIf=\"state == states.loading || state == states.error || state == states.empty \"\n [ngStyle]=\"messageContainerStyle()\">\n <div class=\"cc-message-list__loading-view\" *ngIf=\"state == states.loading \">\n <cometchat-loader [iconURL]=\"loadingIconURL\" [loaderStyle]=\"loadingStyle()\">\n </cometchat-loader>\n <span class=\"cc-message-list__customview--loading\" *ngIf=\"state == states.loading && loadingStateView\">\n <ng-container *ngTemplateOutlet=\"loadingStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__error-view\" *ngIf=\"state == states.error && !hideError \">\n <cometchat-label [labelStyle]=\"errorStyle()\" *ngIf=\"state == states.error && !hideError && !errorStateView\" [text]=\"errorStateText\"\n >\n </cometchat-label>\n <span class=\"cc-message-list__custom-view--error\" *ngIf=\"state == states.error && !hideError && errorStateView\">\n <ng-container *ngTemplateOutlet=\"errorStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__empty-view\" *ngIf=\"state == states.empty\">\n <!-- <cometchat-label [labelStyle]=\"emptyStyle()\" *ngIf=\"state == states.empty && !emptyStateView\" [text]=\"emptyStateText\"\n >\n </cometchat-label> -->\n <span class=\"cc-message-list__custom-view--empty\" *ngIf=\"state == states.empty && emptyStateView\">\n <ng-container *ngTemplateOutlet=\"emptyStateView\">\n </ng-container>\n </span>\n </div>\n </div>\n <div class=\"cc-message-list__bubble\" *ngFor=\"let message of messagesList; let i = index\">\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i === 0) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message!.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i > 0 && isDateDifferent(messagesList[i - 1]?.getSentAt(), messagesList[i]?.getSentAt())) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div *ngIf=\"getBubbleWrapper(message) \">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [leadingView]=\" showAvatar ? leadingView : null\" [bottomView]=\"enableReactions ? reactionView : null\"\n [headerView]=\"getHeaderView(message) || message?.getCategory() != MessageCategory.action && showHeaderTitle(message) ? bubbleHeader : null\" [footerView]=\"footerView\" [contentView]=\"contentView\" [threadView]=\"threadView\"\n [id]=\"message?.getId() || message?.getMuid()\" [options]=\"setMessageOptions(message)\"\n [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"setBubbleAlignment(message)\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && !message.getDeletedAt() && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"deliveredIcon\" [readIcon]=\"readIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n <div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n <cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n </cometchat-avatar>\n </div>\n</ng-template>\n<ng-template #bubbleHeader>\n <div *ngIf=\"getHeaderView(message);else defaultHeader\">\n <ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n<ng-template #defaultHeader>\n <div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n <cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n <cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n </div>\n</ng-template>\n</ng-template>\n<ng-template #threadView>\n <div class=\"cc-message-list__threadreplies\" *ngIf=\"message?.getReplyCount() && !message.getDeletedAt()\" >\n <cometchat-divider [dividerStyle]=\"dividerStyle\"></cometchat-divider>\n <cometchat-button [text]=\"getThreadCount(message)\" [buttonStyle]=\"getThreadViewStyle(message)\" [iconURL]=\"threadOpenIcon\" (cc-button-clicked)=\"openThreadView(message)\">\n </cometchat-button>\n </div>\n</ng-template>\n </cometchat-message-bubble>\n </div>\n </div>\n <div class=\"cc-message-list__bottom\" #bottom>\n </div>\n\n </div>\n <div class=\"cc-message-list__message-indicator\" *ngIf=\"UnreadCount && UnreadCount.length > 0 && !isOnBottom\" [ngStyle]=\"{bottom: showSmartReply || footerView || showConversationStarter ? '20%' : '13%'}\">\n <cometchat-button [text]=\"newMessageCount\" [buttonStyle]=\"unreadMessagesStyle\" (cc-button-clicked)=\"scrollToBottom()\"></cometchat-button>\n </div>\n <div class=\"cc-message-list__footer-view\" [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '8%' : 'auto'}\">\n\n <div *ngIf=\"footerView;else footer\">\n <ng-container *ngTemplateOutlet=\"footerView\">\n </ng-container>\n </div>\n <ng-template #footer>\n <div class=\"cc-message-list__smart-replies\" *ngIf=\"!showConversationStarter && showSmartReply && getReplies()\">\n <smart-replies [smartReplyStyle]=\"smartReplyStyle\" [replies]=\"getReplies()\" (cc-reply-clicked)=\"sendReply($event)\" (cc-close-clicked)=\"closeSmartReply()\">\n </smart-replies>\n </div>\n <div class=\"cc-message-list__conversation-starters\" *ngIf=\"enableConversationStarter && showConversationStarter\">\n <div class=\"cc-message-list__footer__decorator-message\" *ngIf=\"conversationStarterState == states.loading || conversationStarterState == states.error || conversationStarterState == states.empty \"\n >\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.loading\">\n <cometchat-loader iconURL=\"assets/Spinner.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterLoadingStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.error && !hideError \">\n <cometchat-loader iconURL=\"assets/ai-error.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterErrorStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.empty\">\n <cometchat-loader iconURL=\"assets/ai-empty.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterEmptyStateText\"\n >\n </cometchat-label>\n \n </div>\n </div>\n <smart-replies *ngIf=\"conversationStarterState == states.loaded && !parentMessageId\" [smartReplyStyle]=\"conversationStarterStyle\" [replies]=\"conversationStarterReplies\" (cc-reply-clicked)=\"sendConversationStarter($event)\" [closeIconURL]=\"''\">\n </smart-replies>\n </div>\n </ng-template>\n </div>\n\n</div>\n<!-- default bubbles -->\n<ng-template #textBubble let-message>\n <cometchat-text-bubble *ngIf=\"message?.type == MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.message\"></cometchat-text-bubble>\n <cometchat-text-bubble *ngIf=\"message?.getDeletedAt()\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"localize('MESSAGE_IS_DELETED')\"></cometchat-text-bubble>\n<cometchat-text-bubble *ngIf=\"!isTranslated(message) && !getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n<link-preview [linkPreviewStyle]=\"linkPreviewStyle\" (cc-link-clicked)=\"openLinkURL($event)\" *ngIf=\"!message?.getDeletedAt() && getLinkPreview(message) && enableLinkPreview\" [title]=\"getLinkPreviewDetails('title',message)\" [description]=\"getLinkPreviewDetails('description',message)\" [URL]=\"getLinkPreviewDetails('url',message)\" [image]=\"getLinkPreviewDetails('image',message)\" [favIconURL]=\"getLinkPreviewDetails('favicon',message)\">\n <cometchat-text-bubble\n *ngIf=\"!isTranslated(message) && getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\"\n [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n</link-preview>\n<message-translation-bubble [alignment]=\"getBubbleAlignment(message)\" *ngIf=\"isTranslated(message)\" [messageTranslationStyle]=\"setTranslationStyle(message)\" [translatedText]=\"isTranslated(message)\">\n <cometchat-text-bubble *ngIf=\" !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.text\"></cometchat-text-bubble>\n\n</message-translation-bubble>\n</ng-template>\n<ng-template #fileBubble let-message>\n\n <cometchat-file-bubble [fileStyle]=\"setFileBubbleStyle(message)\" [downloadIconURL]=\"downloadIconURL\" [subtitle]=\"localize('SHARED_FILE')\" [title]=\"message?.data?.attachments ? message?.data?.attachments[0]?.name: ''\" [fileURL]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\"></cometchat-file-bubble>\n</ng-template>\n<ng-template #audioBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.audio\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n <cometchat-audio-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" > </cometchat-audio-bubble>\n</ng-template>\n<ng-template #videoBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.video\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n\n <cometchat-video-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [videoStyle]=\"videoBubbleStyle\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" [poster]=\" getImageThumbnail(message)\"></cometchat-video-bubble>\n</ng-template>\n<ng-template #imageBubble let-message>\n <image-moderation (cc-show-dialog)=\"openWarningDialog($event)\" *ngIf=\"!message.getDeletedAt() && enableImageModeration\" [message]=\"message\" [imageModerationStyle]=\"imageModerationStyle\">\n <cometchat-image-bubble (cc-image-clicked)=\"openImageInFullScreen(message)\" [imageStyle]=\"imageBubbleStyle\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n </image-moderation>\n <cometchat-image-bubble [imageStyle]=\"imageBubbleStyle\" (cc-image-clicked)=\"openImageInFullScreen(message)\" *ngIf=\"!message.getDeletedAt() && !enableImageModeration\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n</ng-template>\n<ng-template #formBubble let-message>\n <cometchat-form-bubble [message]=\"message\" [formBubbleStyle]=\"getFormMessageBubbleStyle()\"></cometchat-form-bubble>\n</ng-template>\n<ng-template #cardBubble let-message>\n <cometchat-card-bubble [message]=\"message\" [cardBubbleStyle]=\"getCardMessageBubbleStyle()\"></cometchat-card-bubble>\n</ng-template>\n<ng-template #customTextBubble>\n</ng-template>\n<ng-template #stickerBubble let-message>\n <cometchat-image-bubble [src]=\"getSticker(message)\" [imageStyle]=\"imageBubbleStyle\" ></cometchat-image-bubble>\n\n</ng-template>\n<ng-template #whiteboardBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"whiteboardIconURL\" [title]=\"whiteboardTitle\" [buttonText]=\"whiteboardButtonText\" [subtitle]=\"whiteboardSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #documentBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"documentIconURL\" [title]=\"documentTitle\" [buttonText]=\"documentButtonText\" [subtitle]=\"documentSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #directCalling let-message>\n <cometchat-document-bubble [hideSeparator]=\"true\" [iconAlignment]=\"callBubbleAlignment\" [documentStyle]=\"getCallBubbleStyle(message)\" [URL]=\"getSessionId(message)\" [ccClicked]=\"startDirectCall\" [iconURL]=\"directCallIconURL\" [title]=\"getCallBubbleTitle(message)\" [buttonText]=\"joinCallButtonText\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #pollBubble let-message>\n <polls-bubble [pollStyle]=\"pollBubbleStyle\" [pollQuestion]=\"getPollBubbleData(message,'question')\" [pollId]=\"getPollBubbleData(message,'id')\"\n [loggedInUser]=\"loggedInUser\" [senderUid]=\"getPollBubbleData(message)\" [metadata]=\"message?.metadata\"></polls-bubble>\n\n</ng-template>\n\n<!-- thread bubble view -->\n<ng-template #threadMessageBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\" [footerView]=\"footerView\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"threadedAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\"\n \n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\" [addReactionIconURL]=\"addReactionIconURL\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"\" [readIcon]=\"deliveredIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n\n\n<!-- -->\n<ng-template #bubbleView></ng-template>\n<cometchat-popover [popoverStyle]=\"popoverStyle\" #popoverRef [placement]=\"keyboardAlignment\">\n<cometchat-emoji-keyboard (cc-emoji-clicked)=\"addReaction($event)\" slot=\"content\"></cometchat-emoji-keyboard>\n</cometchat-popover>\n<cometchat-backdrop *ngIf=\"openConfirmDialog\" [backdropStyle]=\"backdropStyle\">\n <cometchat-confirm-dialog [title]=\"''\" [messageText]=\"warningText\" (cc-confirm-clicked)=\"onConfirmClick()\" [cancelButtonText]=\"cancelText\" [confirmButtonText]=\"confirmText\" (cc-cancel-clicked)=\"onCancelClick()\" [confirmDialogStyle]=\"confirmDialogStyle\">\n\n </cometchat-confirm-dialog>\n</cometchat-backdrop>\n<cometchat-full-screen-viewer (cc-close-clicked)=\"closeImageInFullScreen()\" *ngIf=\"openFullscreenView\" [URL]=\"imageurlToOpen\" [closeIconURL]=\"closeIconURL\" [fullScreenViewerStyle]=\"fullScreenViewerStyle\">\n\n</cometchat-full-screen-viewer>\n\n<!-- ongoing callscreen for direct call -->\n<cometchat-ongoing-call *ngIf=\"showOngoingCall\" [callSettingsBuilder]=\"getCallBuilder()\" [ongoingCallStyle]=\"ongoingCallStyle\" [sessionID]=\"sessionId\"></cometchat-ongoing-call>\n<!-- message information view -->\n<!-- thread bubble view -->\n<ng-template #messageinfoBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions && hasReaction(message) ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"messageInfoAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n<cometchat-backdrop *ngIf=\"openMessageInfoPage\" [backdropStyle]=\"backdropStyle\">\n <cometchat-message-information [closeIconURL]=\"messageInformationConfiguration.closeIconURL\" [loadingStateView]=\"messageInformationConfiguration.loadingStateView\" [errorStateView]=\"messageInformationConfiguration.errorStateView\" [listItemStyle]=\"messageInformationConfiguration.listItemStyle\" [emptyStateView]=\"messageInformationConfiguration.emptyStateView\" [loadingIconURL]=\"messageInformationConfiguration.loadingIconURL\" [readIcon]=\"messageInformationConfiguration.readIcon\" [deliveredIcon]=\"messageInformationConfiguration.deliveredIcon\" [onError]=\"messageInformationConfiguration.onError\" [SubtitleView]=\"messageInformationConfiguration.subtitleView\" [receiptDatePattern]=\"messageInformationConfiguration.receiptDatePattern\" [listItemView]=\"messageInformationConfiguration.listItemView \" [messageInformationStyle]=\"messageInformationConfiguration.messageInformationStyle\" [onClose]=\"messageInformationConfiguration.onClose ?? closeMessageInfoPage\" [bubbleView]=\"messageInformationConfiguration.bubbleView ?? messageinfoBubble\" [message]=\"messageInfoObject\">\n\n </cometchat-message-information>\n</cometchat-backdrop>\n", styles: [".cc-message-list{height:100%;width:100%;overflow-y:auto;overflow-x:hidden;position:relative}.cc-message-list__wrapper{height:100%;width:100%;overflow-y:hidden}.cc-message-list__bubble-footer{display:flex;justify-content:center;align-items:center}.cc-message-list__date-container{text-align:center;margin:5px 0}.cc-message-list__smart-replies,.cc-message-list__conversation-starters{height:-moz-fit-content;height:fit-content;width:100%;position:absolute;bottom:0;z-index:1}.cc-message-list__date{border-radius:10px;display:flex;justify-content:center}.cc-message-list__threadreplies{min-width:130px;width:100%}.cc-message-list__message-indicator{height:25px;display:flex;align-items:center;justify-content:center;width:100%;bottom:10%;position:absolute}.cc-message-list__footer-view{z-index:1;position:relative;width:100%}.cc-message-list__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;height:100%}.cc-message-list__footer__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px 0 16px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:flex-start;height:100%}.cc-message-list::-webkit-scrollbar{background:transparent;width:8px}.cc-message-list::-webkit-scrollbar-thumb{background:#e8e5e5;border-radius:8px}.cc-message-list__footer-view-decorator{display:flex;flex-direction:row;column-gap:8px}\n"], components: [{ type: CometChatMessageBubbleComponent, selector: "cometchat-message-bubble", inputs: ["messageBubbleStyle", "alignment", "options", "id", "leadingView", "headerView", "replyView", "contentView", "threadView", "footerView", "bottomView", "moreIconURL", "topMenuSize"] }, { type: CometChatOngoingCallComponent, selector: "cometchat-ongoing-call", inputs: ["ongoingCallStyle", "resizeIconHoverText", "sessionID", "minimizeIconURL", "maximizeIconURL", "callSettingsBuilder", "callWorkflow", "onError"] }, { type: CometChatMessageInformationComponent, selector: "cometchat-message-information", inputs: ["closeIconURL", "message", "title", "template", "bubbleView", "subtitleView", "listItemView", "receiptDatePattern", "onError", "messageInformationStyle", "readIcon", "deliveredIcon", "onClose", "listItemStyle", "emptyStateText", "errorStateText", "emptyStateView", "loadingIconURL", "loadingStateView", "errorStateView"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9600
10012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageListComponent, decorators: [{
|
|
9601
10013
|
type: Component,
|
|
9602
|
-
args: [{ selector: "cometchat-message-list", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-message-list__wrapper\" [ngStyle]=\"wrapperStyle()\" *ngIf=\"!openContactsView\">\n <div class=\"cc-message-list__header-view\">\n<div *ngIf=\"headerView\">\n <ng-container *ngTemplateOutlet=\"headerView\">\n </ng-container>\n</div>\n </div>\n <div class=\"cc-message-list\" #listScroll [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '92%' : '100%'}\">\n <div class=\"cc-message-list__top\" #top>\n </div>\n <div class=\"cc-message-list__decorator-message\" *ngIf=\"state == states.loading || state == states.error || state == states.empty \"\n [ngStyle]=\"messageContainerStyle()\">\n <div class=\"cc-message-list__loading-view\" *ngIf=\"state == states.loading \">\n <cometchat-loader [iconURL]=\"loadingIconURL\" [loaderStyle]=\"loadingStyle()\">\n </cometchat-loader>\n <span class=\"cc-message-list__customview--loading\" *ngIf=\"state == states.loading && loadingStateView\">\n <ng-container *ngTemplateOutlet=\"loadingStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__error-view\" *ngIf=\"state == states.error && !hideError \">\n <cometchat-label [labelStyle]=\"errorStyle()\" *ngIf=\"state == states.error && !hideError && !errorStateView\" [text]=\"errorStateText\"\n >\n </cometchat-label>\n <span class=\"cc-message-list__custom-view--error\" *ngIf=\"state == states.error && !hideError && errorStateView\">\n <ng-container *ngTemplateOutlet=\"errorStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__empty-view\" *ngIf=\"state == states.empty\">\n <!-- <cometchat-label [labelStyle]=\"emptyStyle()\" *ngIf=\"state == states.empty && !emptyStateView\" [text]=\"emptyStateText\"\n >\n </cometchat-label> -->\n <span class=\"cc-message-list__custom-view--empty\" *ngIf=\"state == states.empty && emptyStateView\">\n <ng-container *ngTemplateOutlet=\"emptyStateView\">\n </ng-container>\n </span>\n </div>\n </div>\n <div class=\"cc-message-list__bubble\" *ngFor=\"let message of messagesList; let i = index\">\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i === 0) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message!.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i > 0 && isDateDifferent(messagesList[i - 1]?.getSentAt(), messagesList[i]?.getSentAt())) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div *ngIf=\"getBubbleWrapper(message) \">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [leadingView]=\" showAvatar ? leadingView : null\" [bottomView]=\"enableReactions ? reactionView : null\"\n [headerView]=\"getHeaderView(message) || message?.getCategory() != MessageCategory.action && showHeaderTitle(message) ? bubbleHeader : null\" [footerView]=\"footerView\" [contentView]=\"contentView\" [threadView]=\"threadView\"\n [id]=\"message?.getId() || message?.getMuid()\" [options]=\"setMessageOptions(message)\"\n [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"setBubbleAlignment(message)\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && !message.getDeletedAt() && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"deliveredIcon\" [readIcon]=\"readIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n <div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n <cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n </cometchat-avatar>\n </div>\n</ng-template>\n<ng-template #bubbleHeader>\n <div *ngIf=\"getHeaderView(message);else defaultHeader\">\n <ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n<ng-template #defaultHeader>\n <div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n <cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n <cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n </div>\n</ng-template>\n</ng-template>\n<ng-template #threadView>\n <div class=\"cc-message-list__threadreplies\" *ngIf=\"message?.getReplyCount() && !message.getDeletedAt()\" >\n <cometchat-divider [dividerStyle]=\"dividerStyle\"></cometchat-divider>\n <cometchat-button [text]=\"getThreadCount(message)\" [buttonStyle]=\"getThreadViewStyle(message)\" [iconURL]=\"threadOpenIcon\" (cc-button-clicked)=\"openThreadView(message)\">\n </cometchat-button>\n </div>\n</ng-template>\n </cometchat-message-bubble>\n </div>\n </div>\n <div class=\"cc-message-list__bottom\" #bottom>\n </div>\n\n </div>\n <div class=\"cc-message-list__message-indicator\" *ngIf=\"UnreadCount && UnreadCount.length > 0 && !isOnBottom\" [ngStyle]=\"{bottom: showSmartReply || footerView || showConversationStarter ? '20%' : '13%'}\">\n <cometchat-button [text]=\"newMessageCount\" [buttonStyle]=\"unreadMessagesStyle\" (cc-button-clicked)=\"scrollToBottom()\"></cometchat-button>\n </div>\n <div class=\"cc-message-list__footer-view\" [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '8%' : 'auto'}\">\n\n <div *ngIf=\"footerView;else footer\">\n <ng-container *ngTemplateOutlet=\"footerView\">\n </ng-container>\n </div>\n <ng-template #footer>\n <div class=\"cc-message-list__smart-replies\" *ngIf=\"!showConversationStarter && showSmartReply && getReplies()\">\n <smart-replies [smartReplyStyle]=\"smartReplyStyle\" [replies]=\"getReplies()\" (cc-reply-clicked)=\"sendReply($event)\" (cc-close-clicked)=\"closeSmartReply()\">\n </smart-replies>\n </div>\n <div class=\"cc-message-list__conversation-starters\" *ngIf=\"enableConversationStarter && showConversationStarter\">\n <div class=\"cc-message-list__footer__decorator-message\" *ngIf=\"conversationStarterState == states.loading || conversationStarterState == states.error || conversationStarterState == states.empty \"\n >\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.loading\">\n <cometchat-loader iconURL=\"assets/Spinner.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterLoadingStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.error && !hideError \">\n <cometchat-loader iconURL=\"assets/ai-error.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterErrorStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.empty\">\n <cometchat-loader iconURL=\"assets/ai-empty.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterEmptyStateText\"\n >\n </cometchat-label>\n \n </div>\n </div>\n <smart-replies *ngIf=\"conversationStarterState == states.loaded && !parentMessageId\" [smartReplyStyle]=\"conversationStarterStyle\" [replies]=\"conversationStarterReplies\" (cc-reply-clicked)=\"sendConversationStarter($event)\" [closeIconURL]=\"''\">\n </smart-replies>\n </div>\n </ng-template>\n </div>\n\n</div>\n<!-- default bubbles -->\n<ng-template #textBubble let-message>\n <cometchat-text-bubble *ngIf=\"message?.type == MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.message\"></cometchat-text-bubble>\n <cometchat-text-bubble *ngIf=\"message?.getDeletedAt()\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"localize('MESSAGE_IS_DELETED')\"></cometchat-text-bubble>\n<cometchat-text-bubble *ngIf=\"!isTranslated(message) && !getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n<link-preview [linkPreviewStyle]=\"linkPreviewStyle\" (cc-link-clicked)=\"openLinkURL($event)\" *ngIf=\"!message?.getDeletedAt() && getLinkPreview(message) && enableLinkPreview\" [title]=\"getLinkPreviewDetails('title',message)\" [description]=\"getLinkPreviewDetails('description',message)\" [URL]=\"getLinkPreviewDetails('url',message)\" [image]=\"getLinkPreviewDetails('image',message)\" [favIconURL]=\"getLinkPreviewDetails('favicon',message)\">\n <cometchat-text-bubble\n *ngIf=\"!isTranslated(message) && getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\"\n [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n</link-preview>\n<message-translation-bubble [alignment]=\"getBubbleAlignment(message)\" *ngIf=\"isTranslated(message)\" [messageTranslationStyle]=\"setTranslationStyle(message)\" [translatedText]=\"isTranslated(message)\">\n <cometchat-text-bubble *ngIf=\" !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.text\"></cometchat-text-bubble>\n\n</message-translation-bubble>\n</ng-template>\n<ng-template #fileBubble let-message>\n\n <cometchat-file-bubble [fileStyle]=\"setFileBubbleStyle(message)\" [downloadIconURL]=\"downloadIconURL\" [subtitle]=\"localize('SHARED_FILE')\" [title]=\"message?.data?.attachments ? message?.data?.attachments[0]?.name: ''\" [fileURL]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\"></cometchat-file-bubble>\n</ng-template>\n<ng-template #audioBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.audio\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n <cometchat-audio-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" > </cometchat-audio-bubble>\n</ng-template>\n<ng-template #videoBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.video\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n\n <cometchat-video-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [videoStyle]=\"videoBubbleStyle\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" [poster]=\" getImageThumbnail(message)\"></cometchat-video-bubble>\n</ng-template>\n<ng-template #imageBubble let-message>\n <image-moderation (cc-show-dialog)=\"openWarningDialog($event)\" *ngIf=\"!message.getDeletedAt() && enableImageModeration\" [message]=\"message\" [imageModerationStyle]=\"imageModerationStyle\">\n <cometchat-image-bubble (cc-image-clicked)=\"openImageInFullScreen(message)\" [imageStyle]=\"imageBubbleStyle\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n </image-moderation>\n <cometchat-image-bubble [imageStyle]=\"imageBubbleStyle\" (cc-image-clicked)=\"openImageInFullScreen(message)\" *ngIf=\"!message.getDeletedAt() && !enableImageModeration\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n</ng-template>\n<ng-template #customTextBubble>\n</ng-template>\n<ng-template #stickerBubble let-message>\n <cometchat-image-bubble [src]=\"getSticker(message)\" [imageStyle]=\"imageBubbleStyle\" ></cometchat-image-bubble>\n\n</ng-template>\n<ng-template #whiteboardBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"whiteboardIconURL\" [title]=\"whiteboardTitle\" [buttonText]=\"whiteboardButtonText\" [subtitle]=\"whiteboardSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #documentBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"documentIconURL\" [title]=\"documentTitle\" [buttonText]=\"documentButtonText\" [subtitle]=\"documentSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #directCalling let-message>\n <cometchat-document-bubble [hideSeparator]=\"true\" [iconAlignment]=\"callBubbleAlignment\" [documentStyle]=\"getCallBubbleStyle(message)\" [URL]=\"getSessionId(message)\" [ccClicked]=\"startDirectCall\" [iconURL]=\"directCallIconURL\" [title]=\"getCallBubbleTitle(message)\" [buttonText]=\"joinCallButtonText\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #pollBubble let-message>\n <polls-bubble [pollStyle]=\"pollBubbleStyle\" [pollQuestion]=\"getPollBubbleData(message,'question')\" [pollId]=\"getPollBubbleData(message,'id')\"\n [loggedInUser]=\"loggedInUser\" [senderUid]=\"getPollBubbleData(message)\" [metadata]=\"message?.metadata\"></polls-bubble>\n\n</ng-template>\n\n<!-- thread bubble view -->\n<ng-template #threadMessageBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\" [footerView]=\"footerView\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"threadedAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\"\n \n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\" [addReactionIconURL]=\"addReactionIconURL\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"\" [readIcon]=\"deliveredIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n\n\n<!-- -->\n<ng-template #bubbleView></ng-template>\n<cometchat-popover [popoverStyle]=\"popoverStyle\" #popoverRef [placement]=\"keyboardAlignment\">\n<cometchat-emoji-keyboard (cc-emoji-clicked)=\"addReaction($event)\" slot=\"content\"></cometchat-emoji-keyboard>\n</cometchat-popover>\n<cometchat-backdrop *ngIf=\"openConfirmDialog\" [backdropStyle]=\"backdropStyle\">\n <cometchat-confirm-dialog [title]=\"''\" [messageText]=\"warningText\" (cc-confirm-clicked)=\"onConfirmClick()\" [cancelButtonText]=\"cancelText\" [confirmButtonText]=\"confirmText\" (cc-cancel-clicked)=\"onCancelClick()\" [confirmDialogStyle]=\"confirmDialogStyle\">\n\n </cometchat-confirm-dialog>\n</cometchat-backdrop>\n<cometchat-full-screen-viewer (cc-close-clicked)=\"closeImageInFullScreen()\" *ngIf=\"openFullscreenView\" [URL]=\"imageurlToOpen\" [closeIconURL]=\"closeIconURL\" [fullScreenViewerStyle]=\"fullScreenViewerStyle\">\n\n</cometchat-full-screen-viewer>\n\n<!-- ongoing callscreen for direct call -->\n<cometchat-ongoing-call *ngIf=\"showOngoingCall\" [callSettingsBuilder]=\"getCallBuilder()\" [ongoingCallStyle]=\"ongoingCallStyle\" [sessionID]=\"sessionId\"></cometchat-ongoing-call>\n<!-- message information view -->\n<!-- thread bubble view -->\n<ng-template #messageinfoBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions && hasReaction(message) ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"messageInfoAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n<cometchat-backdrop *ngIf=\"openMessageInfoPage\" [backdropStyle]=\"backdropStyle\">\n <cometchat-message-information [closeIconURL]=\"messageInformationConfiguration.closeIconURL\" [loadingStateView]=\"messageInformationConfiguration.loadingStateView\" [errorStateView]=\"messageInformationConfiguration.errorStateView\" [listItemStyle]=\"messageInformationConfiguration.listItemStyle\" [emptyStateView]=\"messageInformationConfiguration.emptyStateView\" [loadingIconURL]=\"messageInformationConfiguration.loadingIconURL\" [readIcon]=\"messageInformationConfiguration.readIcon\" [deliveredIcon]=\"messageInformationConfiguration.deliveredIcon\" [onError]=\"messageInformationConfiguration.onError\" [SubtitleView]=\"messageInformationConfiguration.subtitleView\" [receiptDatePattern]=\"messageInformationConfiguration.receiptDatePattern\" [listItemView]=\"messageInformationConfiguration.listItemView \" [messageInformationStyle]=\"messageInformationConfiguration.messageInformationStyle\" [onClose]=\"messageInformationConfiguration.onClose ?? closeMessageInfoPage\" [bubbleView]=\"messageInformationConfiguration.bubbleView ?? messageinfoBubble\" [message]=\"messageInfoObject\">\n\n </cometchat-message-information>\n</cometchat-backdrop>\n", styles: [".cc-message-list{height:100%;width:100%;overflow-y:auto;overflow-x:hidden;position:relative}.cc-message-list__wrapper{height:100%;width:100%;overflow-y:hidden}.cc-message-list__bubble-footer{display:flex;justify-content:center;align-items:center}.cc-message-list__date-container{text-align:center;margin:5px 0}.cc-message-list__smart-replies,.cc-message-list__conversation-starters{height:-moz-fit-content;height:fit-content;width:100%;position:absolute;bottom:0;z-index:1}.cc-message-list__date{border-radius:10px;display:flex;justify-content:center}.cc-message-list__threadreplies{min-width:130px;width:100%}.cc-message-list__message-indicator{height:25px;display:flex;align-items:center;justify-content:center;width:100%;bottom:10%;position:absolute}.cc-message-list__footer-view{z-index:1;position:relative;width:100%}.cc-message-list__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;height:100%}.cc-message-list__footer__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px 0 16px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:flex-start;height:100%}.cc-message-list::-webkit-scrollbar{background:transparent;width:8px}.cc-message-list::-webkit-scrollbar-thumb{background:#e8e5e5;border-radius:8px}.cc-message-list__footer-view-decorator{display:flex;flex-direction:row;column-gap:8px}\n"] }]
|
|
10014
|
+
args: [{ selector: "cometchat-message-list", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-message-list__wrapper\" [ngStyle]=\"wrapperStyle()\" *ngIf=\"!openContactsView\">\n <div class=\"cc-message-list__header-view\">\n<div *ngIf=\"headerView\">\n <ng-container *ngTemplateOutlet=\"headerView\">\n </ng-container>\n</div>\n </div>\n <div class=\"cc-message-list\" #listScroll [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '92%' : '100%'}\">\n <div class=\"cc-message-list__top\" #top>\n </div>\n <div class=\"cc-message-list__decorator-message\" *ngIf=\"state == states.loading || state == states.error || state == states.empty \"\n [ngStyle]=\"messageContainerStyle()\">\n <div class=\"cc-message-list__loading-view\" *ngIf=\"state == states.loading \">\n <cometchat-loader [iconURL]=\"loadingIconURL\" [loaderStyle]=\"loadingStyle()\">\n </cometchat-loader>\n <span class=\"cc-message-list__customview--loading\" *ngIf=\"state == states.loading && loadingStateView\">\n <ng-container *ngTemplateOutlet=\"loadingStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__error-view\" *ngIf=\"state == states.error && !hideError \">\n <cometchat-label [labelStyle]=\"errorStyle()\" *ngIf=\"state == states.error && !hideError && !errorStateView\" [text]=\"errorStateText\"\n >\n </cometchat-label>\n <span class=\"cc-message-list__custom-view--error\" *ngIf=\"state == states.error && !hideError && errorStateView\">\n <ng-container *ngTemplateOutlet=\"errorStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__empty-view\" *ngIf=\"state == states.empty\">\n <!-- <cometchat-label [labelStyle]=\"emptyStyle()\" *ngIf=\"state == states.empty && !emptyStateView\" [text]=\"emptyStateText\"\n >\n </cometchat-label> -->\n <span class=\"cc-message-list__custom-view--empty\" *ngIf=\"state == states.empty && emptyStateView\">\n <ng-container *ngTemplateOutlet=\"emptyStateView\">\n </ng-container>\n </span>\n </div>\n </div>\n <div class=\"cc-message-list__bubble\" *ngFor=\"let message of messagesList; let i = index\">\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i === 0) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message!.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i > 0 && isDateDifferent(messagesList[i - 1]?.getSentAt(), messagesList[i]?.getSentAt())) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div *ngIf=\"getBubbleWrapper(message) \">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [leadingView]=\" showAvatar ? leadingView : null\" [bottomView]=\"enableReactions ? reactionView : null\"\n [headerView]=\"getHeaderView(message) || message?.getCategory() != MessageCategory.action && showHeaderTitle(message) ? bubbleHeader : null\" [footerView]=\"footerView\" [contentView]=\"contentView\" [threadView]=\"threadView\"\n [id]=\"message?.getId() || message?.getMuid()\" [options]=\"setMessageOptions(message)\"\n [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"setBubbleAlignment(message)\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && !message.getDeletedAt() && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"deliveredIcon\" [readIcon]=\"readIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n <div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n <cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n </cometchat-avatar>\n </div>\n</ng-template>\n<ng-template #bubbleHeader>\n <div *ngIf=\"getHeaderView(message);else defaultHeader\">\n <ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n<ng-template #defaultHeader>\n <div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n <cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n <cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n </div>\n</ng-template>\n</ng-template>\n<ng-template #threadView>\n <div class=\"cc-message-list__threadreplies\" *ngIf=\"message?.getReplyCount() && !message.getDeletedAt()\" >\n <cometchat-divider [dividerStyle]=\"dividerStyle\"></cometchat-divider>\n <cometchat-button [text]=\"getThreadCount(message)\" [buttonStyle]=\"getThreadViewStyle(message)\" [iconURL]=\"threadOpenIcon\" (cc-button-clicked)=\"openThreadView(message)\">\n </cometchat-button>\n </div>\n</ng-template>\n </cometchat-message-bubble>\n </div>\n </div>\n <div class=\"cc-message-list__bottom\" #bottom>\n </div>\n\n </div>\n <div class=\"cc-message-list__message-indicator\" *ngIf=\"UnreadCount && UnreadCount.length > 0 && !isOnBottom\" [ngStyle]=\"{bottom: showSmartReply || footerView || showConversationStarter ? '20%' : '13%'}\">\n <cometchat-button [text]=\"newMessageCount\" [buttonStyle]=\"unreadMessagesStyle\" (cc-button-clicked)=\"scrollToBottom()\"></cometchat-button>\n </div>\n <div class=\"cc-message-list__footer-view\" [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '8%' : 'auto'}\">\n\n <div *ngIf=\"footerView;else footer\">\n <ng-container *ngTemplateOutlet=\"footerView\">\n </ng-container>\n </div>\n <ng-template #footer>\n <div class=\"cc-message-list__smart-replies\" *ngIf=\"!showConversationStarter && showSmartReply && getReplies()\">\n <smart-replies [smartReplyStyle]=\"smartReplyStyle\" [replies]=\"getReplies()\" (cc-reply-clicked)=\"sendReply($event)\" (cc-close-clicked)=\"closeSmartReply()\">\n </smart-replies>\n </div>\n <div class=\"cc-message-list__conversation-starters\" *ngIf=\"enableConversationStarter && showConversationStarter\">\n <div class=\"cc-message-list__footer__decorator-message\" *ngIf=\"conversationStarterState == states.loading || conversationStarterState == states.error || conversationStarterState == states.empty \"\n >\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.loading\">\n <cometchat-loader iconURL=\"assets/Spinner.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterLoadingStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.error && !hideError \">\n <cometchat-loader iconURL=\"assets/ai-error.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterErrorStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.empty\">\n <cometchat-loader iconURL=\"assets/ai-empty.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterEmptyStateText\"\n >\n </cometchat-label>\n \n </div>\n </div>\n <smart-replies *ngIf=\"conversationStarterState == states.loaded && !parentMessageId\" [smartReplyStyle]=\"conversationStarterStyle\" [replies]=\"conversationStarterReplies\" (cc-reply-clicked)=\"sendConversationStarter($event)\" [closeIconURL]=\"''\">\n </smart-replies>\n </div>\n </ng-template>\n </div>\n\n</div>\n<!-- default bubbles -->\n<ng-template #textBubble let-message>\n <cometchat-text-bubble *ngIf=\"message?.type == MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.message\"></cometchat-text-bubble>\n <cometchat-text-bubble *ngIf=\"message?.getDeletedAt()\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"localize('MESSAGE_IS_DELETED')\"></cometchat-text-bubble>\n<cometchat-text-bubble *ngIf=\"!isTranslated(message) && !getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n<link-preview [linkPreviewStyle]=\"linkPreviewStyle\" (cc-link-clicked)=\"openLinkURL($event)\" *ngIf=\"!message?.getDeletedAt() && getLinkPreview(message) && enableLinkPreview\" [title]=\"getLinkPreviewDetails('title',message)\" [description]=\"getLinkPreviewDetails('description',message)\" [URL]=\"getLinkPreviewDetails('url',message)\" [image]=\"getLinkPreviewDetails('image',message)\" [favIconURL]=\"getLinkPreviewDetails('favicon',message)\">\n <cometchat-text-bubble\n *ngIf=\"!isTranslated(message) && getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\"\n [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n</link-preview>\n<message-translation-bubble [alignment]=\"getBubbleAlignment(message)\" *ngIf=\"isTranslated(message)\" [messageTranslationStyle]=\"setTranslationStyle(message)\" [translatedText]=\"isTranslated(message)\">\n <cometchat-text-bubble *ngIf=\" !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.text\"></cometchat-text-bubble>\n\n</message-translation-bubble>\n</ng-template>\n<ng-template #fileBubble let-message>\n\n <cometchat-file-bubble [fileStyle]=\"setFileBubbleStyle(message)\" [downloadIconURL]=\"downloadIconURL\" [subtitle]=\"localize('SHARED_FILE')\" [title]=\"message?.data?.attachments ? message?.data?.attachments[0]?.name: ''\" [fileURL]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\"></cometchat-file-bubble>\n</ng-template>\n<ng-template #audioBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.audio\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n <cometchat-audio-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" > </cometchat-audio-bubble>\n</ng-template>\n<ng-template #videoBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.video\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n\n <cometchat-video-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [videoStyle]=\"videoBubbleStyle\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" [poster]=\" getImageThumbnail(message)\"></cometchat-video-bubble>\n</ng-template>\n<ng-template #imageBubble let-message>\n <image-moderation (cc-show-dialog)=\"openWarningDialog($event)\" *ngIf=\"!message.getDeletedAt() && enableImageModeration\" [message]=\"message\" [imageModerationStyle]=\"imageModerationStyle\">\n <cometchat-image-bubble (cc-image-clicked)=\"openImageInFullScreen(message)\" [imageStyle]=\"imageBubbleStyle\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n </image-moderation>\n <cometchat-image-bubble [imageStyle]=\"imageBubbleStyle\" (cc-image-clicked)=\"openImageInFullScreen(message)\" *ngIf=\"!message.getDeletedAt() && !enableImageModeration\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n</ng-template>\n<ng-template #formBubble let-message>\n <cometchat-form-bubble [message]=\"message\" [formBubbleStyle]=\"getFormMessageBubbleStyle()\"></cometchat-form-bubble>\n</ng-template>\n<ng-template #cardBubble let-message>\n <cometchat-card-bubble [message]=\"message\" [cardBubbleStyle]=\"getCardMessageBubbleStyle()\"></cometchat-card-bubble>\n</ng-template>\n<ng-template #customTextBubble>\n</ng-template>\n<ng-template #stickerBubble let-message>\n <cometchat-image-bubble [src]=\"getSticker(message)\" [imageStyle]=\"imageBubbleStyle\" ></cometchat-image-bubble>\n\n</ng-template>\n<ng-template #whiteboardBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"whiteboardIconURL\" [title]=\"whiteboardTitle\" [buttonText]=\"whiteboardButtonText\" [subtitle]=\"whiteboardSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #documentBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"documentIconURL\" [title]=\"documentTitle\" [buttonText]=\"documentButtonText\" [subtitle]=\"documentSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #directCalling let-message>\n <cometchat-document-bubble [hideSeparator]=\"true\" [iconAlignment]=\"callBubbleAlignment\" [documentStyle]=\"getCallBubbleStyle(message)\" [URL]=\"getSessionId(message)\" [ccClicked]=\"startDirectCall\" [iconURL]=\"directCallIconURL\" [title]=\"getCallBubbleTitle(message)\" [buttonText]=\"joinCallButtonText\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #pollBubble let-message>\n <polls-bubble [pollStyle]=\"pollBubbleStyle\" [pollQuestion]=\"getPollBubbleData(message,'question')\" [pollId]=\"getPollBubbleData(message,'id')\"\n [loggedInUser]=\"loggedInUser\" [senderUid]=\"getPollBubbleData(message)\" [metadata]=\"message?.metadata\"></polls-bubble>\n\n</ng-template>\n\n<!-- thread bubble view -->\n<ng-template #threadMessageBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\" [footerView]=\"footerView\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"threadedAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\"\n \n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\" [addReactionIconURL]=\"addReactionIconURL\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"\" [readIcon]=\"deliveredIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n\n\n<!-- -->\n<ng-template #bubbleView></ng-template>\n<cometchat-popover [popoverStyle]=\"popoverStyle\" #popoverRef [placement]=\"keyboardAlignment\">\n<cometchat-emoji-keyboard (cc-emoji-clicked)=\"addReaction($event)\" slot=\"content\"></cometchat-emoji-keyboard>\n</cometchat-popover>\n<cometchat-backdrop *ngIf=\"openConfirmDialog\" [backdropStyle]=\"backdropStyle\">\n <cometchat-confirm-dialog [title]=\"''\" [messageText]=\"warningText\" (cc-confirm-clicked)=\"onConfirmClick()\" [cancelButtonText]=\"cancelText\" [confirmButtonText]=\"confirmText\" (cc-cancel-clicked)=\"onCancelClick()\" [confirmDialogStyle]=\"confirmDialogStyle\">\n\n </cometchat-confirm-dialog>\n</cometchat-backdrop>\n<cometchat-full-screen-viewer (cc-close-clicked)=\"closeImageInFullScreen()\" *ngIf=\"openFullscreenView\" [URL]=\"imageurlToOpen\" [closeIconURL]=\"closeIconURL\" [fullScreenViewerStyle]=\"fullScreenViewerStyle\">\n\n</cometchat-full-screen-viewer>\n\n<!-- ongoing callscreen for direct call -->\n<cometchat-ongoing-call *ngIf=\"showOngoingCall\" [callSettingsBuilder]=\"getCallBuilder()\" [ongoingCallStyle]=\"ongoingCallStyle\" [sessionID]=\"sessionId\"></cometchat-ongoing-call>\n<!-- message information view -->\n<!-- thread bubble view -->\n<ng-template #messageinfoBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions && hasReaction(message) ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"messageInfoAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n<cometchat-backdrop *ngIf=\"openMessageInfoPage\" [backdropStyle]=\"backdropStyle\">\n <cometchat-message-information [closeIconURL]=\"messageInformationConfiguration.closeIconURL\" [loadingStateView]=\"messageInformationConfiguration.loadingStateView\" [errorStateView]=\"messageInformationConfiguration.errorStateView\" [listItemStyle]=\"messageInformationConfiguration.listItemStyle\" [emptyStateView]=\"messageInformationConfiguration.emptyStateView\" [loadingIconURL]=\"messageInformationConfiguration.loadingIconURL\" [readIcon]=\"messageInformationConfiguration.readIcon\" [deliveredIcon]=\"messageInformationConfiguration.deliveredIcon\" [onError]=\"messageInformationConfiguration.onError\" [SubtitleView]=\"messageInformationConfiguration.subtitleView\" [receiptDatePattern]=\"messageInformationConfiguration.receiptDatePattern\" [listItemView]=\"messageInformationConfiguration.listItemView \" [messageInformationStyle]=\"messageInformationConfiguration.messageInformationStyle\" [onClose]=\"messageInformationConfiguration.onClose ?? closeMessageInfoPage\" [bubbleView]=\"messageInformationConfiguration.bubbleView ?? messageinfoBubble\" [message]=\"messageInfoObject\">\n\n </cometchat-message-information>\n</cometchat-backdrop>\n", styles: [".cc-message-list{height:100%;width:100%;overflow-y:auto;overflow-x:hidden;position:relative}.cc-message-list__wrapper{height:100%;width:100%;overflow-y:hidden}.cc-message-list__bubble-footer{display:flex;justify-content:center;align-items:center}.cc-message-list__date-container{text-align:center;margin:5px 0}.cc-message-list__smart-replies,.cc-message-list__conversation-starters{height:-moz-fit-content;height:fit-content;width:100%;position:absolute;bottom:0;z-index:1}.cc-message-list__date{border-radius:10px;display:flex;justify-content:center}.cc-message-list__threadreplies{min-width:130px;width:100%}.cc-message-list__message-indicator{height:25px;display:flex;align-items:center;justify-content:center;width:100%;bottom:10%;position:absolute}.cc-message-list__footer-view{z-index:1;position:relative;width:100%}.cc-message-list__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;height:100%}.cc-message-list__footer__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px 0 16px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:flex-start;height:100%}.cc-message-list::-webkit-scrollbar{background:transparent;width:8px}.cc-message-list::-webkit-scrollbar-thumb{background:#e8e5e5;border-radius:8px}.cc-message-list__footer-view-decorator{display:flex;flex-direction:row;column-gap:8px}\n"] }]
|
|
9603
10015
|
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { listScroll: [{
|
|
9604
10016
|
type: ViewChild,
|
|
9605
10017
|
args: ["listScroll", { static: false }]
|
|
@@ -9627,6 +10039,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
9627
10039
|
}], imageBubble: [{
|
|
9628
10040
|
type: ViewChild,
|
|
9629
10041
|
args: ["imageBubble", { static: false }]
|
|
10042
|
+
}], formBubble: [{
|
|
10043
|
+
type: ViewChild,
|
|
10044
|
+
args: ["formBubble", { static: false }]
|
|
10045
|
+
}], cardBubble: [{
|
|
10046
|
+
type: ViewChild,
|
|
10047
|
+
args: ["cardBubble", { static: false }]
|
|
9630
10048
|
}], stickerBubble: [{
|
|
9631
10049
|
type: ViewChild,
|
|
9632
10050
|
args: ["stickerBubble", { static: false }]
|
|
@@ -9870,6 +10288,12 @@ class CometChatMessageComposerComponent {
|
|
|
9870
10288
|
background: "rgba(0, 0, 0, 0.5)",
|
|
9871
10289
|
position: "fixed"
|
|
9872
10290
|
};
|
|
10291
|
+
this.actionSheetStyle = {
|
|
10292
|
+
borderRadius: "inherit",
|
|
10293
|
+
border: "none",
|
|
10294
|
+
width: "100%",
|
|
10295
|
+
height: "100%",
|
|
10296
|
+
};
|
|
9873
10297
|
this.hideVoiceRecording = false;
|
|
9874
10298
|
this.mediaRecorderStyle = {};
|
|
9875
10299
|
this.voiceRecordingIconURL = "assets/mic.svg";
|
|
@@ -9996,18 +10420,6 @@ class CometChatMessageComposerComponent {
|
|
|
9996
10420
|
this.sendButtonIconURL = "assets/Send.svg";
|
|
9997
10421
|
this.emojiButtonIconURL = "assets/Stipop.svg";
|
|
9998
10422
|
this.stickerButtonIconURL = "assets/Stickers.svg";
|
|
9999
|
-
this.actionsheetStyle = {
|
|
10000
|
-
layoutModeIconTint: "rgba(20, 20, 20, 0.04)",
|
|
10001
|
-
borderRadius: "inherit",
|
|
10002
|
-
background: "rgb(255,255,255)",
|
|
10003
|
-
border: "none",
|
|
10004
|
-
width: "100%",
|
|
10005
|
-
height: "100%",
|
|
10006
|
-
titleFont: "500 15px Inter, sans-serif",
|
|
10007
|
-
titleColor: "#141414",
|
|
10008
|
-
listItemBackground: "",
|
|
10009
|
-
ActionSheetSeparatorTint: "1px solid RGBA(20, 20, 20, 0.08)"
|
|
10010
|
-
};
|
|
10011
10423
|
this.messageText = "";
|
|
10012
10424
|
this.attachmentButtonStyle = {
|
|
10013
10425
|
height: "24px",
|
|
@@ -10812,16 +11224,16 @@ class CometChatMessageComposerComponent {
|
|
|
10812
11224
|
this.aiPopover.background = this.themeService.theme.palette.getBackground();
|
|
10813
11225
|
this.aiPopover.boxShadow = `0px 0px 32px ${this.themeService.theme.palette.getAccent50()}`;
|
|
10814
11226
|
this.setComposerStyle();
|
|
10815
|
-
this.
|
|
10816
|
-
layoutModeIconTint: this.
|
|
11227
|
+
this.actionSheetStyle = {
|
|
11228
|
+
layoutModeIconTint: this.actionSheetStyle.layoutModeIconTint || this.themeService.theme.palette.getAccent(),
|
|
10817
11229
|
borderRadius: "inherit",
|
|
10818
11230
|
background: this.themeService.theme.palette.getBackground(),
|
|
10819
11231
|
border: "none",
|
|
10820
11232
|
width: "100%",
|
|
10821
11233
|
height: "100%",
|
|
10822
|
-
titleFont: this.
|
|
10823
|
-
titleColor: this.
|
|
10824
|
-
ActionSheetSeparatorTint: this.
|
|
11234
|
+
titleFont: this.actionSheetStyle.titleFont || fontHelper(this.themeService.theme.typography.title2),
|
|
11235
|
+
titleColor: this.actionSheetStyle.titleColor || this.themeService.theme.palette.getAccent(),
|
|
11236
|
+
ActionSheetSeparatorTint: this.actionSheetStyle.ActionSheetSeparatorTint || this.themeService.theme.palette.getAccent400()
|
|
10825
11237
|
};
|
|
10826
11238
|
this.messageInputStyle = {
|
|
10827
11239
|
height: "100%",
|
|
@@ -10969,10 +11381,6 @@ class CometChatMessageComposerComponent {
|
|
|
10969
11381
|
dividerTint: this.themeService.theme.palette.getAccent200(),
|
|
10970
11382
|
textFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
10971
11383
|
textColor: this.themeService.theme.palette.getAccent(),
|
|
10972
|
-
ActionSheetSeparatorTint: this.themeService.theme.palette.getAccent200(),
|
|
10973
|
-
ActionSheetTitleColor: this.themeService.theme.palette.getAccent(),
|
|
10974
|
-
ActionSheetTitleFont: fontHelper(this.themeService.theme.typography.title1),
|
|
10975
|
-
ActionSheetLayoutModeIconTint: this.themeService.theme.palette.getPrimary(),
|
|
10976
11384
|
emojiKeyboardTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
10977
11385
|
emojiKeyboardTextColor: this.themeService.theme.palette.getAccent400(),
|
|
10978
11386
|
previewTitleFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
@@ -10990,10 +11398,10 @@ class CometChatMessageComposerComponent {
|
|
|
10990
11398
|
}
|
|
10991
11399
|
}
|
|
10992
11400
|
CometChatMessageComposerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageComposerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CometChatThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
10993
|
-
CometChatMessageComposerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatMessageComposerComponent, selector: "cometchat-message-composer", inputs: { user: "user", group: "group", disableSoundForMessages: "disableSoundForMessages", customSoundForMessage: "customSoundForMessage", disableTypingEvents: "disableTypingEvents", text: "text", placeholderText: "placeholderText", headerView: "headerView", onTextChange: "onTextChange", attachmentIconURL: "attachmentIconURL", attachmentOptions: "attachmentOptions", secondaryButtonView: "secondaryButtonView", auxilaryButtonView: "auxilaryButtonView", auxiliaryButtonsAlignment: "auxiliaryButtonsAlignment", sendButtonView: "sendButtonView", parentMessageId: "parentMessageId", hideLiveReaction: "hideLiveReaction", LiveReactionIconURL: "LiveReactionIconURL", messageComposerStyle: "messageComposerStyle", onSendButtonClick: "onSendButtonClick", onError: "onError", backdropStyle: "backdropStyle", hideVoiceRecording: "hideVoiceRecording", mediaRecorderStyle: "mediaRecorderStyle", voiceRecordingIconURL: "voiceRecordingIconURL", voiceRecordingCloseIconURL: "voiceRecordingCloseIconURL", voiceRecordingStartIconURL: "voiceRecordingStartIconURL", voiceRecordingStopIconURL: "voiceRecordingStopIconURL", voiceRecordingSubmitIconURL: "voiceRecordingSubmitIconURL" }, viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "emojiButtonRef", first: true, predicate: ["emojiButtonRef"], descendants: true }, { propertyName: "actionSheetRef", first: true, predicate: ["actionSheetRef"], descendants: true }, { propertyName: "stickerButtonRef", first: true, predicate: ["stickerButtonRef"], descendants: true }, { propertyName: "mediaRecordedRef", first: true, predicate: ["mediaRecordedRef"], descendants: true }, { propertyName: "aiButtonRef", first: true, predicate: ["aiButtonRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-message-composer__wrapper\" [ngStyle]=\"composerWrapperStyle()\">\n <div class=\"cc-message-composer__header-view\" *ngIf=\"headerView; else messagePreview\">\n <ng-container *ngTemplateOutlet=\"headerView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <ng-template #messagePreview>\n <div class=\"cc-message-composer__header-view\" *ngIf=\"showPreview\">\n <cometchat-preview [previewStyle]=\"previewStyle\" [previewSubtitle]=\"messageToBeEdited.getText()\" (cc-preview-close-clicked)=\"closePreview()\"> </cometchat-preview>\n </div>\n </ng-template>\n<div class=\"cc-message-composer__input\">\n <cometchat-message-input (cc-message-input-entered)=\"sendMessageOnEnter($event)\" #inputRef [text]=\"text\" (cc-message-input-changed)=\"messageInputChanged($event)\" [messageInputStyle]=\"messageInputStyle\" [placeholderText]=\"placeholderText\" [auxiliaryButtonAlignment]=\"auxiliaryButtonsAlignment\">\n <div slot=\"secondaryView\">\n <div *ngIf=\"secondaryButtonView;else secondaryButton\">\n <ng-container *ngTemplateOutlet=\"secondaryButtonView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <ng-template #secondaryButton>\n <div class=\"cc-message-composer__attachbutton\">\n <cometchat-popover (cc-popover-outside-click)=\"openActionSheet($event)\" [placement]=\"auxilaryPlacement\" [popoverStyle]=\"popoverStyle\" >\n <cometchat-action-sheet slot=\"content\" [actions]=\"composerActions\" [actionSheetStyle]=\"actionsheetStyle\" (cc-actionsheet-clicked)=\"handleActions($event)\">\n </cometchat-action-sheet>\n <cometchat-button #actionSheetRef slot=\"children\" (cc-button-clicked)=\"openActionSheet($event)\" [iconURL]=\"!showActionSheetItem || (showEmojiKeyboard && !showActionSheetItem) ? attachmentIconURL : closeButtonIconURL\" [buttonStyle]=\"attachmentButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n </ng-template>\n </div>\n\n <div class=\"cc-message-composer__auxiliary\" slot=\"auxilaryView\">\n <div class=\"cc-message-composer__custom-auxiliary-view\" *ngIf=\"auxilaryButtonView\">\n <ng-container *ngTemplateOutlet=\"auxilaryButtonView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <div class=\"cc-message-composer__stickerkeyboard\" *ngIf=\"isAiEnabled\">\n <cometchat-popover (cc-popover-outside-click)=\"openStickerKeyboard($event)\" [popoverStyle]=\"aiPopover\" [placement]=\"auxilaryPlacement\" >\n <cometchat-card-view [closeCallback]=\"handleAiFeaturesClose\" slot=\"content\" [buttons]=\"buttons\">\n </cometchat-card-view>\n <cometchat-button [hoverText]=\"localize('AI')\" slot=\"children\" #aiButtonRef (cc-button-clicked)=\"openAiFeatures($event)\" [iconURL]=\" !showAiFeatures ? 'assets/ai-bot.svg' : closeButtonIconURL\" [buttonStyle]=\"stickerButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n \n <div class=\"cc-message-composer__stickerkeyboard\" *ngIf=\"enableStickerKeyboard\">\n <cometchat-popover (cc-popover-outside-click)=\"openStickerKeyboard($event)\" [popoverStyle]=\"stickerPopover\" [placement]=\"auxilaryPlacement\" >\n <stickers-keyboard slot=\"content\" [stickerStyle]=\"stickerKeyboardStyle\" (cc-sticker-clicked)=\"sendSticker($event)\">\n </stickers-keyboard>\n <cometchat-button [hoverText]=\"localize('STICKER')\" slot=\"children\" #stickerButtonRef (cc-button-clicked)=\"openStickerKeyboard($event)\" [iconURL]=\" !showStickerKeyboard ? stickerButtonIconURL : closeButtonIconURL\" [buttonStyle]=\"stickerButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n <div class=\"cc-message-composer__emojikeyboard\">\n <cometchat-popover (cc-popover-outside-click)=\"openEmojiKeyboard($event)\" [placement]=\"auxilaryPlacement\" [popoverStyle]=\"emojiPopover\" >\n <cometchat-emoji-keyboard slot=\"content\" [emojiKeyboardStyle]=\"emojiKeyboardStyle\" (cc-emoji-clicked)=\"appendEmoji($event)\">\n </cometchat-emoji-keyboard>\n <cometchat-button #emojiButtonRef [hoverText]=\"localize('EMOJI')\" slot=\"children\" (cc-button-clicked)=\"openEmojiKeyboard($event)\" [iconURL]=\" !showEmojiKeyboard || (!showEmojiKeyboard && showActionSheetItem) ? emojiButtonIconURL : closeButtonIconURL\" [buttonStyle]=\"emojiButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n <div class=\"cc-message-composer__mediarecorder\" *ngIf=\"!hideVoiceRecording\">\n <cometchat-popover [closeOnOutsideClick]=\"false\" [popoverStyle]=\"mediaRecordedPopover\" [placement]=\"auxilaryPlacement\" >\n \n <cometchat-media-recorder *ngIf=\"toggleMediaRecorded\" [autoRecording]=\"true\" startIconText=\"\" stopIconText=\"\" submitButtonIconText=\"\" [submitButtonIconURL]=\"voiceRecordingSubmitIconURL\" [startIconURL]=\"voiceRecordingStartIconURL\" [stopIconURL]=\"voiceRecordingStopIconURL\" [closeIconURL]=\"voiceRecordingCloseIconURL\" (cc-media-recorder-submitted)=\"sendRecordedMedia($event)\" (cc-media-recorder-closed)=\"closeMediaRecorder($event)\" slot=\"content\" [mediaPlayerStyle]=\"mediaRecorderStyle\"></cometchat-media-recorder>\n <cometchat-icon-button [hoverText]=\"localize('VOICE_RECORDING')\" slot=\"children\" #mediaRecordedRef (cc-button-clicked)=\"openMediaRecorded($event)\" [iconURL]=\" !toggleMediaRecorded ? voiceRecordingIconURL : closeButtonIconURL\" [buttonStyle]=\"mediaRecorderButtonStyle\"></cometchat-icon-button>\n </cometchat-popover>\n </div>\n </div>\n <div slot=\"primaryView\">\n <div *ngIf=\"sendButtonView;else sendButton\">\n </div>\n <ng-template #sendButton>\n <div class=\"cc-message-composer__sendbutton\" *ngIf=\"showSendButton || hideLiveReaction\">\n <cometchat-button [iconURL]=\"sendButtonIconURL\" [buttonStyle]=\"sendButtonStyle\" [hoverText]=\"localize('SEND_MESSAGE')\" (cc-button-clicked)=\"customSendMethod(messageText)\"></cometchat-button>\n </div>\n <div class=\"cc-message-composer__livereaction\" *ngIf=\"!hideLiveReaction && !showSendButton\">\n <cometchat-button [iconURL]=\"LiveReactionIconURL\" [hoverText]=\"localize('LIVE_REACTION')\" [buttonStyle]=\"liveReactionStyle\" (cc-button-clicked)=\"sendReaction()\"></cometchat-button>\n </div>\n </ng-template>\n </div>\n </cometchat-message-input>\n</div>\n</div>\n\n<input class=\"cc-message-composer__mediainput\" #inputElement (change)=\"inputChangeHandler($event)\" />\n<cometchat-backdrop *ngIf=\"showCreatePolls\" [backdropStyle]=\"backdropStyle\">\n <create-poll [user]=\"user\" [group]=\"group\" (cc-close-clicked)=\"closeCreatePolls()\" [createPollStyle]=\"createPollStyle\"></create-poll>\n</cometchat-backdrop>", styles: [".cc-message-composer__sendbutton,.cc-message-composer__livereaction{margin:0 5px}.cc-message-composer__wrapper{height:100%;width:100%;position:relative;padding:14px 16px}.cc-message-composer__header-view{height:-moz-fit-content;height:fit-content;width:100%;bottom:120%}.cc-message-composer__mediainput{display:none}.cc-message-composer__auxiliary{display:flex;gap:8px}*{box-sizing:border-box}cometchat-card-view{height:100%;width:100%;overflow:hidden;display:flex;border-radius:8px}\n"], components: [{ type: CometChatCardViewComponent, selector: "cometchat-card-view", inputs: ["buttons", "closeCallback"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11401
|
+
CometChatMessageComposerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatMessageComposerComponent, selector: "cometchat-message-composer", inputs: { user: "user", group: "group", disableSoundForMessages: "disableSoundForMessages", customSoundForMessage: "customSoundForMessage", disableTypingEvents: "disableTypingEvents", text: "text", placeholderText: "placeholderText", headerView: "headerView", onTextChange: "onTextChange", attachmentIconURL: "attachmentIconURL", attachmentOptions: "attachmentOptions", secondaryButtonView: "secondaryButtonView", auxilaryButtonView: "auxilaryButtonView", auxiliaryButtonsAlignment: "auxiliaryButtonsAlignment", sendButtonView: "sendButtonView", parentMessageId: "parentMessageId", hideLiveReaction: "hideLiveReaction", LiveReactionIconURL: "LiveReactionIconURL", messageComposerStyle: "messageComposerStyle", onSendButtonClick: "onSendButtonClick", onError: "onError", backdropStyle: "backdropStyle", actionSheetStyle: "actionSheetStyle", hideVoiceRecording: "hideVoiceRecording", mediaRecorderStyle: "mediaRecorderStyle", voiceRecordingIconURL: "voiceRecordingIconURL", voiceRecordingCloseIconURL: "voiceRecordingCloseIconURL", voiceRecordingStartIconURL: "voiceRecordingStartIconURL", voiceRecordingStopIconURL: "voiceRecordingStopIconURL", voiceRecordingSubmitIconURL: "voiceRecordingSubmitIconURL" }, viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "emojiButtonRef", first: true, predicate: ["emojiButtonRef"], descendants: true }, { propertyName: "actionSheetRef", first: true, predicate: ["actionSheetRef"], descendants: true }, { propertyName: "stickerButtonRef", first: true, predicate: ["stickerButtonRef"], descendants: true }, { propertyName: "mediaRecordedRef", first: true, predicate: ["mediaRecordedRef"], descendants: true }, { propertyName: "aiButtonRef", first: true, predicate: ["aiButtonRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-message-composer__wrapper\" [ngStyle]=\"composerWrapperStyle()\">\n <div class=\"cc-message-composer__header-view\"\n *ngIf=\"headerView; else messagePreview\">\n <ng-container\n *ngTemplateOutlet=\"headerView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <ng-template #messagePreview>\n <div class=\"cc-message-composer__header-view\" *ngIf=\"showPreview\">\n <cometchat-preview [previewStyle]=\"previewStyle\"\n [previewSubtitle]=\"messageToBeEdited.getText()\"\n (cc-preview-close-clicked)=\"closePreview()\"> </cometchat-preview>\n </div>\n </ng-template>\n <div class=\"cc-message-composer__input\">\n <cometchat-message-input\n (cc-message-input-entered)=\"sendMessageOnEnter($event)\" #inputRef\n [text]=\"text\" (cc-message-input-changed)=\"messageInputChanged($event)\"\n [messageInputStyle]=\"messageInputStyle\"\n [placeholderText]=\"placeholderText\"\n [auxiliaryButtonAlignment]=\"auxiliaryButtonsAlignment\">\n <div slot=\"secondaryView\">\n <div *ngIf=\"secondaryButtonView;else secondaryButton\">\n <ng-container\n *ngTemplateOutlet=\"secondaryButtonView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <ng-template #secondaryButton>\n <div class=\"cc-message-composer__attachbutton\">\n <cometchat-popover\n (cc-popover-outside-click)=\"openActionSheet($event)\"\n [placement]=\"auxilaryPlacement\" [popoverStyle]=\"popoverStyle\">\n <cometchat-action-sheet slot=\"content\" [actions]=\"composerActions\"\n [actionSheetStyle]=\"actionSheetStyle\"\n (cc-actionsheet-clicked)=\"handleActions($event)\">\n </cometchat-action-sheet>\n <cometchat-button #actionSheetRef slot=\"children\"\n (cc-button-clicked)=\"openActionSheet($event)\"\n [iconURL]=\"!showActionSheetItem || (showEmojiKeyboard && !showActionSheetItem) ? attachmentIconURL : closeButtonIconURL\"\n [buttonStyle]=\"attachmentButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n </ng-template>\n </div>\n\n <div class=\"cc-message-composer__auxiliary\" slot=\"auxilaryView\">\n <div class=\"cc-message-composer__custom-auxiliary-view\"\n *ngIf=\"auxilaryButtonView\">\n <ng-container\n *ngTemplateOutlet=\"auxilaryButtonView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <div class=\"cc-message-composer__stickerkeyboard\" *ngIf=\"isAiEnabled\">\n <cometchat-popover\n (cc-popover-outside-click)=\"openStickerKeyboard($event)\"\n [popoverStyle]=\"aiPopover\" [placement]=\"auxilaryPlacement\">\n <cometchat-card-view [closeCallback]=\"handleAiFeaturesClose\"\n slot=\"content\" [buttons]=\"buttons\">\n </cometchat-card-view>\n <cometchat-button [hoverText]=\"localize('AI')\" slot=\"children\"\n #aiButtonRef (cc-button-clicked)=\"openAiFeatures($event)\"\n [iconURL]=\" !showAiFeatures ? 'assets/ai-bot.svg' : closeButtonIconURL\"\n [buttonStyle]=\"stickerButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n\n <div class=\"cc-message-composer__stickerkeyboard\"\n *ngIf=\"enableStickerKeyboard\">\n <cometchat-popover\n (cc-popover-outside-click)=\"openStickerKeyboard($event)\"\n [popoverStyle]=\"stickerPopover\" [placement]=\"auxilaryPlacement\">\n <stickers-keyboard slot=\"content\"\n [stickerStyle]=\"stickerKeyboardStyle\"\n (cc-sticker-clicked)=\"sendSticker($event)\">\n </stickers-keyboard>\n <cometchat-button [hoverText]=\"localize('STICKER')\" slot=\"children\"\n #stickerButtonRef\n (cc-button-clicked)=\"openStickerKeyboard($event)\"\n [iconURL]=\" !showStickerKeyboard ? stickerButtonIconURL : closeButtonIconURL\"\n [buttonStyle]=\"stickerButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n <div class=\"cc-message-composer__emojikeyboard\">\n <cometchat-popover\n (cc-popover-outside-click)=\"openEmojiKeyboard($event)\"\n [placement]=\"auxilaryPlacement\" [popoverStyle]=\"emojiPopover\">\n <cometchat-emoji-keyboard slot=\"content\"\n [emojiKeyboardStyle]=\"emojiKeyboardStyle\"\n (cc-emoji-clicked)=\"appendEmoji($event)\">\n </cometchat-emoji-keyboard>\n <cometchat-button #emojiButtonRef [hoverText]=\"localize('EMOJI')\"\n slot=\"children\" (cc-button-clicked)=\"openEmojiKeyboard($event)\"\n [iconURL]=\" !showEmojiKeyboard || (!showEmojiKeyboard && showActionSheetItem) ? emojiButtonIconURL : closeButtonIconURL\"\n [buttonStyle]=\"emojiButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n <div class=\"cc-message-composer__mediarecorder\"\n *ngIf=\"!hideVoiceRecording\">\n <cometchat-popover [closeOnOutsideClick]=\"false\"\n [popoverStyle]=\"mediaRecordedPopover\"\n [placement]=\"auxilaryPlacement\">\n\n <cometchat-media-recorder *ngIf=\"toggleMediaRecorded\"\n [autoRecording]=\"true\" startIconText=\"\" stopIconText=\"\"\n submitButtonIconText=\"\"\n [submitButtonIconURL]=\"voiceRecordingSubmitIconURL\"\n [startIconURL]=\"voiceRecordingStartIconURL\"\n [stopIconURL]=\"voiceRecordingStopIconURL\"\n [closeIconURL]=\"voiceRecordingCloseIconURL\"\n (cc-media-recorder-submitted)=\"sendRecordedMedia($event)\"\n (cc-media-recorder-closed)=\"closeMediaRecorder($event)\"\n slot=\"content\"\n [mediaPlayerStyle]=\"mediaRecorderStyle\"></cometchat-media-recorder>\n <cometchat-icon-button [hoverText]=\"localize('VOICE_RECORDING')\"\n slot=\"children\" #mediaRecordedRef\n (cc-button-clicked)=\"openMediaRecorded($event)\"\n [iconURL]=\" !toggleMediaRecorded ? voiceRecordingIconURL : closeButtonIconURL\"\n [buttonStyle]=\"mediaRecorderButtonStyle\"></cometchat-icon-button>\n </cometchat-popover>\n </div>\n </div>\n <div slot=\"primaryView\">\n <div *ngIf=\"sendButtonView;else sendButton\">\n </div>\n <ng-template #sendButton>\n <div class=\"cc-message-composer__sendbutton\"\n *ngIf=\"showSendButton || hideLiveReaction\">\n <cometchat-button [iconURL]=\"sendButtonIconURL\"\n [buttonStyle]=\"sendButtonStyle\"\n [hoverText]=\"localize('SEND_MESSAGE')\"\n (cc-button-clicked)=\"customSendMethod(messageText)\"></cometchat-button>\n </div>\n <div class=\"cc-message-composer__livereaction\"\n *ngIf=\"!hideLiveReaction && !showSendButton\">\n <cometchat-button [iconURL]=\"LiveReactionIconURL\"\n [hoverText]=\"localize('LIVE_REACTION')\"\n [buttonStyle]=\"liveReactionStyle\"\n (cc-button-clicked)=\"sendReaction()\"></cometchat-button>\n </div>\n </ng-template>\n </div>\n </cometchat-message-input>\n </div>\n</div>\n\n<input class=\"cc-message-composer__mediainput\" #inputElement\n (change)=\"inputChangeHandler($event)\" />\n<cometchat-backdrop *ngIf=\"showCreatePolls\" [backdropStyle]=\"backdropStyle\">\n <create-poll [user]=\"user\" [group]=\"group\"\n (cc-close-clicked)=\"closeCreatePolls()\"\n [createPollStyle]=\"createPollStyle\"></create-poll>\n</cometchat-backdrop>\n", styles: [".cc-message-composer__sendbutton,.cc-message-composer__livereaction{margin:0 5px}.cc-message-composer__wrapper{height:100%;width:100%;position:relative;padding:14px 16px}.cc-message-composer__header-view{height:-moz-fit-content;height:fit-content;width:100%;bottom:120%}.cc-message-composer__mediainput{display:none}.cc-message-composer__auxiliary{display:flex;gap:8px}*{box-sizing:border-box}cometchat-card-view{height:100%;width:100%;overflow:hidden;display:flex;border-radius:8px}\n"], components: [{ type: CometChatCardViewComponent, selector: "cometchat-card-view", inputs: ["buttons", "closeCallback"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10994
11402
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageComposerComponent, decorators: [{
|
|
10995
11403
|
type: Component,
|
|
10996
|
-
args: [{ selector: 'cometchat-message-composer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-message-composer__wrapper\" [ngStyle]=\"composerWrapperStyle()\">\n <div class=\"cc-message-composer__header-view\"
|
|
11404
|
+
args: [{ selector: 'cometchat-message-composer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-message-composer__wrapper\" [ngStyle]=\"composerWrapperStyle()\">\n <div class=\"cc-message-composer__header-view\"\n *ngIf=\"headerView; else messagePreview\">\n <ng-container\n *ngTemplateOutlet=\"headerView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <ng-template #messagePreview>\n <div class=\"cc-message-composer__header-view\" *ngIf=\"showPreview\">\n <cometchat-preview [previewStyle]=\"previewStyle\"\n [previewSubtitle]=\"messageToBeEdited.getText()\"\n (cc-preview-close-clicked)=\"closePreview()\"> </cometchat-preview>\n </div>\n </ng-template>\n <div class=\"cc-message-composer__input\">\n <cometchat-message-input\n (cc-message-input-entered)=\"sendMessageOnEnter($event)\" #inputRef\n [text]=\"text\" (cc-message-input-changed)=\"messageInputChanged($event)\"\n [messageInputStyle]=\"messageInputStyle\"\n [placeholderText]=\"placeholderText\"\n [auxiliaryButtonAlignment]=\"auxiliaryButtonsAlignment\">\n <div slot=\"secondaryView\">\n <div *ngIf=\"secondaryButtonView;else secondaryButton\">\n <ng-container\n *ngTemplateOutlet=\"secondaryButtonView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <ng-template #secondaryButton>\n <div class=\"cc-message-composer__attachbutton\">\n <cometchat-popover\n (cc-popover-outside-click)=\"openActionSheet($event)\"\n [placement]=\"auxilaryPlacement\" [popoverStyle]=\"popoverStyle\">\n <cometchat-action-sheet slot=\"content\" [actions]=\"composerActions\"\n [actionSheetStyle]=\"actionSheetStyle\"\n (cc-actionsheet-clicked)=\"handleActions($event)\">\n </cometchat-action-sheet>\n <cometchat-button #actionSheetRef slot=\"children\"\n (cc-button-clicked)=\"openActionSheet($event)\"\n [iconURL]=\"!showActionSheetItem || (showEmojiKeyboard && !showActionSheetItem) ? attachmentIconURL : closeButtonIconURL\"\n [buttonStyle]=\"attachmentButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n </ng-template>\n </div>\n\n <div class=\"cc-message-composer__auxiliary\" slot=\"auxilaryView\">\n <div class=\"cc-message-composer__custom-auxiliary-view\"\n *ngIf=\"auxilaryButtonView\">\n <ng-container\n *ngTemplateOutlet=\"auxilaryButtonView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <div class=\"cc-message-composer__stickerkeyboard\" *ngIf=\"isAiEnabled\">\n <cometchat-popover\n (cc-popover-outside-click)=\"openStickerKeyboard($event)\"\n [popoverStyle]=\"aiPopover\" [placement]=\"auxilaryPlacement\">\n <cometchat-card-view [closeCallback]=\"handleAiFeaturesClose\"\n slot=\"content\" [buttons]=\"buttons\">\n </cometchat-card-view>\n <cometchat-button [hoverText]=\"localize('AI')\" slot=\"children\"\n #aiButtonRef (cc-button-clicked)=\"openAiFeatures($event)\"\n [iconURL]=\" !showAiFeatures ? 'assets/ai-bot.svg' : closeButtonIconURL\"\n [buttonStyle]=\"stickerButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n\n <div class=\"cc-message-composer__stickerkeyboard\"\n *ngIf=\"enableStickerKeyboard\">\n <cometchat-popover\n (cc-popover-outside-click)=\"openStickerKeyboard($event)\"\n [popoverStyle]=\"stickerPopover\" [placement]=\"auxilaryPlacement\">\n <stickers-keyboard slot=\"content\"\n [stickerStyle]=\"stickerKeyboardStyle\"\n (cc-sticker-clicked)=\"sendSticker($event)\">\n </stickers-keyboard>\n <cometchat-button [hoverText]=\"localize('STICKER')\" slot=\"children\"\n #stickerButtonRef\n (cc-button-clicked)=\"openStickerKeyboard($event)\"\n [iconURL]=\" !showStickerKeyboard ? stickerButtonIconURL : closeButtonIconURL\"\n [buttonStyle]=\"stickerButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n <div class=\"cc-message-composer__emojikeyboard\">\n <cometchat-popover\n (cc-popover-outside-click)=\"openEmojiKeyboard($event)\"\n [placement]=\"auxilaryPlacement\" [popoverStyle]=\"emojiPopover\">\n <cometchat-emoji-keyboard slot=\"content\"\n [emojiKeyboardStyle]=\"emojiKeyboardStyle\"\n (cc-emoji-clicked)=\"appendEmoji($event)\">\n </cometchat-emoji-keyboard>\n <cometchat-button #emojiButtonRef [hoverText]=\"localize('EMOJI')\"\n slot=\"children\" (cc-button-clicked)=\"openEmojiKeyboard($event)\"\n [iconURL]=\" !showEmojiKeyboard || (!showEmojiKeyboard && showActionSheetItem) ? emojiButtonIconURL : closeButtonIconURL\"\n [buttonStyle]=\"emojiButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n <div class=\"cc-message-composer__mediarecorder\"\n *ngIf=\"!hideVoiceRecording\">\n <cometchat-popover [closeOnOutsideClick]=\"false\"\n [popoverStyle]=\"mediaRecordedPopover\"\n [placement]=\"auxilaryPlacement\">\n\n <cometchat-media-recorder *ngIf=\"toggleMediaRecorded\"\n [autoRecording]=\"true\" startIconText=\"\" stopIconText=\"\"\n submitButtonIconText=\"\"\n [submitButtonIconURL]=\"voiceRecordingSubmitIconURL\"\n [startIconURL]=\"voiceRecordingStartIconURL\"\n [stopIconURL]=\"voiceRecordingStopIconURL\"\n [closeIconURL]=\"voiceRecordingCloseIconURL\"\n (cc-media-recorder-submitted)=\"sendRecordedMedia($event)\"\n (cc-media-recorder-closed)=\"closeMediaRecorder($event)\"\n slot=\"content\"\n [mediaPlayerStyle]=\"mediaRecorderStyle\"></cometchat-media-recorder>\n <cometchat-icon-button [hoverText]=\"localize('VOICE_RECORDING')\"\n slot=\"children\" #mediaRecordedRef\n (cc-button-clicked)=\"openMediaRecorded($event)\"\n [iconURL]=\" !toggleMediaRecorded ? voiceRecordingIconURL : closeButtonIconURL\"\n [buttonStyle]=\"mediaRecorderButtonStyle\"></cometchat-icon-button>\n </cometchat-popover>\n </div>\n </div>\n <div slot=\"primaryView\">\n <div *ngIf=\"sendButtonView;else sendButton\">\n </div>\n <ng-template #sendButton>\n <div class=\"cc-message-composer__sendbutton\"\n *ngIf=\"showSendButton || hideLiveReaction\">\n <cometchat-button [iconURL]=\"sendButtonIconURL\"\n [buttonStyle]=\"sendButtonStyle\"\n [hoverText]=\"localize('SEND_MESSAGE')\"\n (cc-button-clicked)=\"customSendMethod(messageText)\"></cometchat-button>\n </div>\n <div class=\"cc-message-composer__livereaction\"\n *ngIf=\"!hideLiveReaction && !showSendButton\">\n <cometchat-button [iconURL]=\"LiveReactionIconURL\"\n [hoverText]=\"localize('LIVE_REACTION')\"\n [buttonStyle]=\"liveReactionStyle\"\n (cc-button-clicked)=\"sendReaction()\"></cometchat-button>\n </div>\n </ng-template>\n </div>\n </cometchat-message-input>\n </div>\n</div>\n\n<input class=\"cc-message-composer__mediainput\" #inputElement\n (change)=\"inputChangeHandler($event)\" />\n<cometchat-backdrop *ngIf=\"showCreatePolls\" [backdropStyle]=\"backdropStyle\">\n <create-poll [user]=\"user\" [group]=\"group\"\n (cc-close-clicked)=\"closeCreatePolls()\"\n [createPollStyle]=\"createPollStyle\"></create-poll>\n</cometchat-backdrop>\n", styles: [".cc-message-composer__sendbutton,.cc-message-composer__livereaction{margin:0 5px}.cc-message-composer__wrapper{height:100%;width:100%;position:relative;padding:14px 16px}.cc-message-composer__header-view{height:-moz-fit-content;height:fit-content;width:100%;bottom:120%}.cc-message-composer__mediainput{display:none}.cc-message-composer__auxiliary{display:flex;gap:8px}*{box-sizing:border-box}cometchat-card-view{height:100%;width:100%;overflow:hidden;display:flex;border-radius:8px}\n"] }]
|
|
10997
11405
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { inputElementRef: [{
|
|
10998
11406
|
type: ViewChild,
|
|
10999
11407
|
args: ["inputElement", { static: false }]
|
|
@@ -11059,6 +11467,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
11059
11467
|
type: Input
|
|
11060
11468
|
}], backdropStyle: [{
|
|
11061
11469
|
type: Input
|
|
11470
|
+
}], actionSheetStyle: [{
|
|
11471
|
+
type: Input
|
|
11062
11472
|
}], hideVoiceRecording: [{
|
|
11063
11473
|
type: Input
|
|
11064
11474
|
}], mediaRecorderStyle: [{
|
|
@@ -11167,7 +11577,6 @@ class CometChatThreadedMessagesComponent {
|
|
|
11167
11577
|
textColor: "black",
|
|
11168
11578
|
background: "transparent",
|
|
11169
11579
|
};
|
|
11170
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
11171
11580
|
}
|
|
11172
11581
|
ngOnInit() {
|
|
11173
11582
|
this.requestBuilder = new CometChat.MessagesRequestBuilder()
|
|
@@ -11210,7 +11619,10 @@ class CometChatThreadedMessagesComponent {
|
|
|
11210
11619
|
this.unsubscribeToEvents();
|
|
11211
11620
|
try {
|
|
11212
11621
|
//Removing Message Listeners
|
|
11213
|
-
|
|
11622
|
+
this.onMessagesDelivered?.unsubscribe();
|
|
11623
|
+
this.onMessagesRead?.unsubscribe();
|
|
11624
|
+
this.onMessageDeleted?.unsubscribe();
|
|
11625
|
+
this.onMessageEdited?.unsubscribe();
|
|
11214
11626
|
}
|
|
11215
11627
|
catch (error) {
|
|
11216
11628
|
if (this.onError) {
|
|
@@ -11237,20 +11649,18 @@ class CometChatThreadedMessagesComponent {
|
|
|
11237
11649
|
}
|
|
11238
11650
|
addMessageEventListeners() {
|
|
11239
11651
|
try {
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
},
|
|
11253
|
-
}));
|
|
11652
|
+
this.onMessagesDelivered = CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt) => {
|
|
11653
|
+
this.updateReceipt(messageReceipt);
|
|
11654
|
+
});
|
|
11655
|
+
this.onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt) => {
|
|
11656
|
+
this.updateReceipt(messageReceipt);
|
|
11657
|
+
});
|
|
11658
|
+
this.onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe((deletedMessage) => {
|
|
11659
|
+
this.updateMessage(deletedMessage);
|
|
11660
|
+
});
|
|
11661
|
+
this.onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe((editedMessage) => {
|
|
11662
|
+
this.updateMessage(editedMessage);
|
|
11663
|
+
});
|
|
11254
11664
|
}
|
|
11255
11665
|
catch (error) {
|
|
11256
11666
|
if (this.onError) {
|
|
@@ -11336,10 +11746,10 @@ class CometChatThreadedMessagesComponent {
|
|
|
11336
11746
|
}
|
|
11337
11747
|
}
|
|
11338
11748
|
CometChatThreadedMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatThreadedMessagesComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CometChatThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11339
|
-
CometChatThreadedMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatThreadedMessagesComponent, selector: "cometchat-threaded-messages", inputs: { onClose: "onClose", onError: "onError", parentMessage: "parentMessage", title: "title", closeIconURL: "closeIconURL", bubbleView: "bubbleView", messageActionView: "messageActionView", messageListConfiguration: "messageListConfiguration", messageComposerConfiguration: "messageComposerConfiguration", threadedMessagesStyle: "threadedMessagesStyle" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-threaded-messages__wrapper\" [ngStyle]=\"wrapperStyle()\">\n<div class=\"cc-threaded-messages__header\">\n<div class=\"cc-threaded-messages__title\">\n<cometchat-label [text]=\"title\"
|
|
11749
|
+
CometChatThreadedMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatThreadedMessagesComponent, selector: "cometchat-threaded-messages", inputs: { onClose: "onClose", onError: "onError", parentMessage: "parentMessage", title: "title", closeIconURL: "closeIconURL", bubbleView: "bubbleView", messageActionView: "messageActionView", messageListConfiguration: "messageListConfiguration", messageComposerConfiguration: "messageComposerConfiguration", threadedMessagesStyle: "threadedMessagesStyle" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-threaded-messages__wrapper\" [ngStyle]=\"wrapperStyle()\">\n <div class=\"cc-threaded-messages__header\">\n <div class=\"cc-threaded-messages__title\">\n <cometchat-label [text]=\"title\"\n [labelStyle]=\"titleStyle\"></cometchat-label>\n </div>\n <div class=\"cc-threaded-messages__close\">\n <cometchat-button [iconURL]=\"closeIconURL\" [buttonStyle]=\"buttonStyle\"\n (cc-button-clicked)=\"closeView()\"></cometchat-button>\n </div>\n </div>\n <div class=\"cc-threaded-messages__bubble-view\">\n <ng-container\n *ngTemplateOutlet=\"bubbleView; context:{ $implicit: parentMessage }\">\n </ng-container>\n </div>\n <div class=\"cc-threaded-messages__action-view\">\n <ng-container\n *ngTemplateOutlet=\"messageActionView; context:{ $implicit: parentMessage }\">\n </ng-container>\n <cometchat-button *ngIf=\"!messageActionView\" [text]=\"getThreadCount()\"\n [buttonStyle]=\"actionButtonStyle\"></cometchat-button>\n </div>\n <div class=\"cc-threaded-messages__list\">\n <cometchat-message-list #messageListRef\n [parentMessageId]=\"parentMessage!.getId()\"\n [emptyStateView]=\"messageListConfiguration.emptyStateView\"\n [loadingStateView]=\"messageListConfiguration.loadingStateView\"\n [user]=\"user\" [group]=\"group\"\n [errorStateView]=\"messageListConfiguration.errorStateView\"\n [disableReceipt]=\"messageListConfiguration.disableReceipt\"\n [readIcon]=\"messageListConfiguration.readIcon\"\n [deliveredIcon]=\"messageListConfiguration.deliveredIcon\"\n [sentIcon]=\"messageListConfiguration.sentIcon\"\n [waitIcon]=\"messageListConfiguration.waitIcon\"\n [errorIcon]=\"messageListConfiguration.errorIcon\"\n [alignment]=\"messageListConfiguration.alignment\"\n [showAvatar]=\"messageListConfiguration.showAvatar\"\n [datePattern]=\"messageListConfiguration.datePattern\"\n [timestampAlignment]=\"messageListConfiguration.timestampAlignment\"\n [DateSeparatorPattern]=\"messageListConfiguration.DateSeparatorPattern\"\n [messageTypes]=\"messageListConfiguration.templates\"\n [messagesRequestBuilder]=\"messageListConfiguration.messagesRequestBuilder || requestBuilder\"\n [thresholdValue]=\"messageListConfiguration.thresholdValue\"\n [onThreadRepliesClick]=\"messageListConfiguration.onThreadRepliesClick\"\n [headerView]=\"messageListConfiguration.headerView\"\n [footerView]=\"messageListConfiguration.footerView\"\n [avatarStyle]=\"messageListConfiguration.avatarStyle\"\n [dateSeparatorStyle]=\"messageListConfiguration.dateSeparatorStyle\"\n [messageListStyle]=\"messageListConfiguration.messageListStyle\"\n [onError]=\"messageListConfiguration.onError\">\n </cometchat-message-list>\n </div>\n <div class=\"cc-threaded-messages__composer\">\n <cometchat-message-composer #messageComposerRef\n [parentMessageId]=\"parentMessage!.getId()\" [user]=\"user\" [group]=\"group\"\n [text]=\"messageComposerConfiguration.text\"\n [headerView]=\"messageComposerConfiguration.headerView\"\n [onTextChange]=\"messageComposerConfiguration.onTextChange\"\n [attachmentIconURL]=\"messageComposerConfiguration.attachmentIconURL\"\n [attachmentOptions]=\"messageComposerConfiguration.attachmentOptions\"\n [secondaryButtonView]=\"messageComposerConfiguration.secondaryButtonView\"\n [auxilaryButtonView]=\"messageComposerConfiguration.auxilaryButtonView\"\n [auxiliaryButtonsAlignment]=\"messageComposerConfiguration.auxiliaryButtonsAlignment\"\n [sendButtonView]=\"messageComposerConfiguration.sendButtonView\"\n [hideLiveReaction]=\"messageComposerConfiguration.hideLiveReaction\"\n [LiveReactionIconURL]=\"messageComposerConfiguration.LiveReactionIconURL\"\n [messageComposerStyle]=\"messageComposerConfiguration.messageComposerStyle\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onError]=\"messageComposerConfiguration.onError\"\n [actionSheetStyle]=\"messageComposerConfiguration.actionSheetStyle\">\n </cometchat-message-composer>\n </div>\n</div>\n", styles: ["*{box-sizing:border-box;margin:0;padding:0}.cc-threaded-messages__wrapper{display:flex;flex-direction:column;height:100%;overflow-y:auto}.cc-threaded-messages__header{height:8%;width:100%;display:flex;padding:16px;align-items:flex-start}.cc-threaded-messages__close{display:flex;align-items:center}.cc-threaded-messages__title{display:flex;align-items:center;justify-content:center;width:100%}.cc-threaded-messages__bubble-view{width:-moz-fit-content;width:fit-content}.cc-threaded-messages__header{flex:0 0 auto}.cc-threaded-messages__list{flex:1 1 auto;min-height:65%}.cc-threaded-messages__composer{flex:0 0 auto;min-height:80px}\n"], components: [{ type: CometChatMessageListComponent, selector: "cometchat-message-list", inputs: ["hideError", "errorStateView", "loadingStateView", "emptyStateView", "errorStateText", "emptyStateText", "loadingIconURL", "user", "group", "disableReceipt", "disableSoundForMessages", "customSoundForMessages", "readIcon", "deliveredIcon", "sentIcon", "waitIcon", "errorIcon", "alignment", "showAvatar", "datePattern", "timestampAlignment", "DateSeparatorPattern", "templates", "messagesRequestBuilder", "newMessageIndicatorText", "scrollToBottomOnNewMessages", "thresholdValue", "onThreadRepliesClick", "headerView", "footerView", "parentMessageId", "avatarStyle", "backdropStyle", "dateSeparatorStyle", "messageListStyle", "onError", "messageInformationConfiguration"] }, { type: CometChatMessageComposerComponent, selector: "cometchat-message-composer", inputs: ["user", "group", "disableSoundForMessages", "customSoundForMessage", "disableTypingEvents", "text", "placeholderText", "headerView", "onTextChange", "attachmentIconURL", "attachmentOptions", "secondaryButtonView", "auxilaryButtonView", "auxiliaryButtonsAlignment", "sendButtonView", "parentMessageId", "hideLiveReaction", "LiveReactionIconURL", "messageComposerStyle", "onSendButtonClick", "onError", "backdropStyle", "actionSheetStyle", "hideVoiceRecording", "mediaRecorderStyle", "voiceRecordingIconURL", "voiceRecordingCloseIconURL", "voiceRecordingStartIconURL", "voiceRecordingStopIconURL", "voiceRecordingSubmitIconURL"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11340
11750
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatThreadedMessagesComponent, decorators: [{
|
|
11341
11751
|
type: Component,
|
|
11342
|
-
args: [{ selector: "cometchat-threaded-messages", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-threaded-messages__wrapper\" [ngStyle]=\"wrapperStyle()\">\n<div class=\"cc-threaded-messages__header\">\n<div class=\"cc-threaded-messages__title\">\n<cometchat-label [text]=\"title\"
|
|
11752
|
+
args: [{ selector: "cometchat-threaded-messages", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-threaded-messages__wrapper\" [ngStyle]=\"wrapperStyle()\">\n <div class=\"cc-threaded-messages__header\">\n <div class=\"cc-threaded-messages__title\">\n <cometchat-label [text]=\"title\"\n [labelStyle]=\"titleStyle\"></cometchat-label>\n </div>\n <div class=\"cc-threaded-messages__close\">\n <cometchat-button [iconURL]=\"closeIconURL\" [buttonStyle]=\"buttonStyle\"\n (cc-button-clicked)=\"closeView()\"></cometchat-button>\n </div>\n </div>\n <div class=\"cc-threaded-messages__bubble-view\">\n <ng-container\n *ngTemplateOutlet=\"bubbleView; context:{ $implicit: parentMessage }\">\n </ng-container>\n </div>\n <div class=\"cc-threaded-messages__action-view\">\n <ng-container\n *ngTemplateOutlet=\"messageActionView; context:{ $implicit: parentMessage }\">\n </ng-container>\n <cometchat-button *ngIf=\"!messageActionView\" [text]=\"getThreadCount()\"\n [buttonStyle]=\"actionButtonStyle\"></cometchat-button>\n </div>\n <div class=\"cc-threaded-messages__list\">\n <cometchat-message-list #messageListRef\n [parentMessageId]=\"parentMessage!.getId()\"\n [emptyStateView]=\"messageListConfiguration.emptyStateView\"\n [loadingStateView]=\"messageListConfiguration.loadingStateView\"\n [user]=\"user\" [group]=\"group\"\n [errorStateView]=\"messageListConfiguration.errorStateView\"\n [disableReceipt]=\"messageListConfiguration.disableReceipt\"\n [readIcon]=\"messageListConfiguration.readIcon\"\n [deliveredIcon]=\"messageListConfiguration.deliveredIcon\"\n [sentIcon]=\"messageListConfiguration.sentIcon\"\n [waitIcon]=\"messageListConfiguration.waitIcon\"\n [errorIcon]=\"messageListConfiguration.errorIcon\"\n [alignment]=\"messageListConfiguration.alignment\"\n [showAvatar]=\"messageListConfiguration.showAvatar\"\n [datePattern]=\"messageListConfiguration.datePattern\"\n [timestampAlignment]=\"messageListConfiguration.timestampAlignment\"\n [DateSeparatorPattern]=\"messageListConfiguration.DateSeparatorPattern\"\n [messageTypes]=\"messageListConfiguration.templates\"\n [messagesRequestBuilder]=\"messageListConfiguration.messagesRequestBuilder || requestBuilder\"\n [thresholdValue]=\"messageListConfiguration.thresholdValue\"\n [onThreadRepliesClick]=\"messageListConfiguration.onThreadRepliesClick\"\n [headerView]=\"messageListConfiguration.headerView\"\n [footerView]=\"messageListConfiguration.footerView\"\n [avatarStyle]=\"messageListConfiguration.avatarStyle\"\n [dateSeparatorStyle]=\"messageListConfiguration.dateSeparatorStyle\"\n [messageListStyle]=\"messageListConfiguration.messageListStyle\"\n [onError]=\"messageListConfiguration.onError\">\n </cometchat-message-list>\n </div>\n <div class=\"cc-threaded-messages__composer\">\n <cometchat-message-composer #messageComposerRef\n [parentMessageId]=\"parentMessage!.getId()\" [user]=\"user\" [group]=\"group\"\n [text]=\"messageComposerConfiguration.text\"\n [headerView]=\"messageComposerConfiguration.headerView\"\n [onTextChange]=\"messageComposerConfiguration.onTextChange\"\n [attachmentIconURL]=\"messageComposerConfiguration.attachmentIconURL\"\n [attachmentOptions]=\"messageComposerConfiguration.attachmentOptions\"\n [secondaryButtonView]=\"messageComposerConfiguration.secondaryButtonView\"\n [auxilaryButtonView]=\"messageComposerConfiguration.auxilaryButtonView\"\n [auxiliaryButtonsAlignment]=\"messageComposerConfiguration.auxiliaryButtonsAlignment\"\n [sendButtonView]=\"messageComposerConfiguration.sendButtonView\"\n [hideLiveReaction]=\"messageComposerConfiguration.hideLiveReaction\"\n [LiveReactionIconURL]=\"messageComposerConfiguration.LiveReactionIconURL\"\n [messageComposerStyle]=\"messageComposerConfiguration.messageComposerStyle\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onError]=\"messageComposerConfiguration.onError\"\n [actionSheetStyle]=\"messageComposerConfiguration.actionSheetStyle\">\n </cometchat-message-composer>\n </div>\n</div>\n", styles: ["*{box-sizing:border-box;margin:0;padding:0}.cc-threaded-messages__wrapper{display:flex;flex-direction:column;height:100%;overflow-y:auto}.cc-threaded-messages__header{height:8%;width:100%;display:flex;padding:16px;align-items:flex-start}.cc-threaded-messages__close{display:flex;align-items:center}.cc-threaded-messages__title{display:flex;align-items:center;justify-content:center;width:100%}.cc-threaded-messages__bubble-view{width:-moz-fit-content;width:fit-content}.cc-threaded-messages__header{flex:0 0 auto}.cc-threaded-messages__list{flex:1 1 auto;min-height:65%}.cc-threaded-messages__composer{flex:0 0 auto;min-height:80px}\n"] }]
|
|
11343
11753
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { onClose: [{
|
|
11344
11754
|
type: Input
|
|
11345
11755
|
}], onError: [{
|
|
@@ -13441,10 +13851,10 @@ class CometChatMessagesComponent {
|
|
|
13441
13851
|
}
|
|
13442
13852
|
}
|
|
13443
13853
|
CometChatMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessagesComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CometChatThemeService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
13444
|
-
CometChatMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatMessagesComponent, selector: "cometchat-messages", inputs: { user: "user", group: "group", hideMessageComposer: "hideMessageComposer", disableTyping: "disableTyping", messageHeaderConfiguration: "messageHeaderConfiguration", messageListConfiguration: "messageListConfiguration", messageComposerConfiguration: "messageComposerConfiguration", threadedMessageConfiguration: "threadedMessageConfiguration", detailsConfiguration: "detailsConfiguration", customSoundForIncomingMessages: "customSoundForIncomingMessages", customSoundForOutgoingMessages: "customSoundForOutgoingMessages", disableSoundForMessages: "disableSoundForMessages", messagesStyle: "messagesStyle", messageHeaderView: "messageHeaderView", messageComposerView: "messageComposerView", messageListView: "messageListView", hideMessageHeader: "hideMessageHeader", hideDetails: "hideDetails", auxiliaryMenu: "auxiliaryMenu" }, viewQueries: [{ propertyName: "messageComposerRef", first: true, predicate: ["messageComposerRef"], descendants: true }, { propertyName: "messageListRef", first: true, predicate: ["messageListRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-messages__wrapper\">\n<div class=\"cc-messages\" [ngStyle]=\"chatListStyle()\" *ngIf=\"user || group\">\n<div class=\"cc-messages__header\" *ngIf=\"!hideMessageHeader\">\n <div *ngIf=\"messageHeaderView; else customHeaderView\" class=\"cc-messages__header-customview\">\n <ng-container *ngTemplateOutlet=\"messageHeaderView\">\n </ng-container>\n </div>\n <ng-template #customHeaderView>\n <cometchat-message-header [user]=\"user\" [group]=\"group\" [subtitleView]=\"messageHeaderConfiguration.subtitleView\"\n [disableUsersPresence]=\"messageHeaderConfiguration.disableUsersPresence\" [protectedGroupIcon]=\"messageHeaderConfiguration.protectedGroupIcon\" [privateGroupIcon]=\"messageHeaderConfiguration.privateGroupIcon\" [menu]=\"headerMenu\" [messageHeaderStyle]=\"messageHeaderConfiguration.messageHeaderStyle\"\n [backButtonIconURL]=\"messageHeaderConfiguration.backButtonIconURL\" [hideBackButton]=\"messageHeaderConfiguration.hideBackButton\" [onError]=\"messageHeaderConfiguration.onError\" [onBack]=\"messageHeaderConfiguration.onBack\" [listItemStyle]=\"messageHeaderConfiguration.listItemStyle\" [statusIndicatorStyle]=\"messageHeaderConfiguration.statusIndicatorStyle\"\n [avatarStyle]=\"messageHeaderConfiguration.avatarStyle\"\n >\n </cometchat-message-header>\n </ng-template>\n</div>\n<div class=\"cc-messages__list\">\n <cometchat-message-list #messageListRef [messageInformationConfiguration]=\"messageListConfiguration.messageInformationConfiguration\" [disableSoundForMessages]=\"disableSoundForMessages\" [customSoundForMessages]=\"customSoundForIncomingMessages\" [emptyStateView]=\"messageListConfiguration.emptyStateView\" [loadingIconURL]=\"messageListConfiguration?.loadingIconURL!\" [loadingStateView]=\"messageListConfiguration.loadingStateView\" [user]=\"user\" [group]=\"group\"\n [errorStateView]=\"messageListConfiguration.errorStateView\" [disableReceipt]=\"messageListConfiguration.disableReceipt\" [readIcon]=\"messageListConfiguration.readIcon\" [deliveredIcon]=\"messageListConfiguration.deliveredIcon\" [sentIcon]=\"messageListConfiguration.sentIcon\" [waitIcon]=\"messageListConfiguration.waitIcon\"\n [errorIcon]=\"messageListConfiguration.errorIcon\" [alignment]=\"messageListConfiguration.alignment\" [showAvatar]=\"messageListConfiguration.showAvatar\" [datePattern]=\"messageListConfiguration.datePattern\" [timestampAlignment]=\"messageListConfiguration.timestampAlignment\" [DateSeparatorPattern]=\"messageListConfiguration.DateSeparatorPattern\"\n [templates]=\"messageListConfiguration.templates\" [messagesRequestBuilder]=\"messageListConfiguration.messagesRequestBuilder\" [thresholdValue]=\"messageListConfiguration.thresholdValue\" [onThreadRepliesClick]=\"messageListConfiguration.onThreadRepliesClick || openThreadView\" [headerView]=\"messageListConfiguration.headerView\" [footerView]=\"messageListConfiguration.footerView\"\n [avatarStyle]=\"messageListConfiguration.avatarStyle\" [scrollToBottomOnNewMessages]=\"messageListConfiguration.scrollToBottomOnNewMessages\" [backdropStyle]=\"messageListConfiguration.backdropStyle\" [dateSeparatorStyle]=\"messageListConfiguration.dateSeparatorStyle\" [messageListStyle]=\"messageListConfiguration.messageListStyle\" [onError]=\"messageListConfiguration.onError\"\n >\n </cometchat-message-list>\n</div>\n<div class=\"cc-messages__composer\" *ngIf=\"!hideMessageComposer\">\n <div *ngIf=\"messageComposerView; else customComposerView\" class=\"cc-messages__composer--customview\">\n <ng-container *ngTemplateOutlet=\"messageComposerView\">\n </ng-container>\n </div>\n <ng-template #customComposerView>\n <cometchat-message-composer #messageComposerRef [disableSoundForMessages]=\"disableSoundForMessages\"\n [voiceRecordingStopIconURL]=\"messageComposerConfiguration.voiceRecordingStopIconURL\"\n [voiceRecordingStartIconURL]=\"messageComposerConfiguration.voiceRecordingStartIconURL\"\n [voiceRecordingCloseIconURL]=\"messageComposerConfiguration.voiceRecordingCloseIconURL\"\n [voiceRecordingSubmitIconURL]=\"messageComposerConfiguration.voiceRecordingSubmitIconURL\"\n [mediaRecorderStyle]=\"messageComposerConfiguration.mediaRecorderStyle\"\n [customSoundForMessages]=\"customSoundForOutgoingMessages\"\n [user]=\"user\" [group]=\"group\" [text]=\"messageComposerConfiguration.text\" [headerView]=\"messageComposerConfiguration.headerView\" [onTextChange]=\"messageComposerConfiguration.onTextChange\" [attachmentIconURL]=\"messageComposerConfiguration.attachmentIconURL\"\n [attachmentOptions]=\"messageComposerConfiguration.attachmentOptions\" [secondaryButtonView]=\"messageComposerConfiguration.secondaryButtonView\" [auxilaryButtonView]=\"messageComposerConfiguration.auxilaryButtonView\" [auxiliaryButtonsAlignment]=\"messageComposerConfiguration.auxiliaryButtonsAlignment\"\n [sendButtonView]=\"messageComposerConfiguration.sendButtonView\" [hideLiveReaction]=\"messageComposerConfiguration.hideLiveReaction\" [LiveReactionIconURL]=\"messageComposerConfiguration.LiveReactionIconURL\" [messageComposerStyle]=\"messageComposerConfiguration.messageComposerStyle\" [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\" [onError]=\"messageComposerConfiguration.onError\"\n >\n </cometchat-message-composer>\n </ng-template>\n</div>\n </div>\n <div class=\"cc-messages__livereaction\">\n <cometchat-live-reaction *ngIf=\"liveReaction\" [reactionIconURL]=\"reactionName\"></cometchat-live-reaction>\n</div>\n<div *ngIf=\"openThreadedMessages\" class=\"cc-messages__threadedmessages\">\n<cometchat-threaded-messages [onClose]=\"closeThreadView\" [threadedMessagesStyle]=\"threadedMessageConfiguration.threadedMessagesStyle\" [messageActionView]=\"threadedMessageConfiguration.messageActionView\" [closeIconURL]=\"threadedMessageConfiguration.closeIconURL\" [onError]=\"threadedMessageConfiguration.onError\" [bubbleView]=\"threadedMessageConfiguration.bubbleView || parentBubbleView\" [parentMessage]=\"threadMessageObject\" [user]=\"user\" [group]=\"group\"></cometchat-threaded-messages>\n</div>\n<div *ngIf=\"openDetails\" class=\"cc-messages__details\">\n <cometchat-details [backdropStyle]=\"detailsConfiguration.backdropStyle\" [transferOwnershipConfiguration]=\"detailsConfiguration.transferOwnershipConfiguration\" [groupMembersConfiguration]=\"detailsConfiguration.groupMembersConfiguration\" [bannedMembersConfiguration]=\"detailsConfiguration.bannedMembersConfiguration\" [addMembersConfiguration]=\"detailsConfiguration.addMembersConfiguration\" [onClose]=\"detailsConfiguration.onClose || closeDetailsPage\" [listItemStyle]=\"detailsConfiguration.listItemStyle\" [detailsStyle]=\"detailsConfiguration.detailsStyle\" [avatarStyle]=\"detailsConfiguration.avatarStyle\" [statusIndicatorStyle]=\"detailsConfiguration.statusIndicatorStyle\" [leaveDialogStyle]=\"detailsConfiguration.leaveDialogStyle\" [data]=\"detailsConfiguration.data\" [customProfileView]=\"detailsConfiguration.customProfileView\" [subtitleView]=\"detailsConfiguration.subtitleView\" [hideProfile]=\"detailsConfiguration.hideProfile\" [onError]=\"detailsConfiguration.onError\" [closeButtonIconURL]=\"detailsConfiguration.closeButtonIconURL\" [user]=\"user\" [group]=\"group\"></cometchat-details>\n </div>\n</div>\n<ng-template #headerMenu>\n <div class=\"cc-messages__headermenu\">\n<div class=\"cc-messages__auxiliarymenu\" *ngIf=\"getAuxilaryView(); else elseBlock\">\n <ng-container *ngTemplateOutlet=\"getAuxilaryView()\">\n </ng-container>\n</div>\n <ng-template #elseBlock>\n <cometchat-call-buttons *ngIf=\"enableCalling\" voiceCallIconText=\"\" videoCallIconText=\"\" [user]=\"user\" [group]=\"group\" [callButtonsStyle]=\"callButtonsStyle\">\n </cometchat-call-buttons>\n </ng-template>\n <cometchat-button *ngIf=\"!hideDetails\" [iconURL]=\"infoIconStyle\" [buttonStyle]=\"detailsButtonStyle\" (cc-button-clicked)=\"openDetailsPage()\"></cometchat-button>\n </div>\n</ng-template>\n", styles: ["*{box-sizing:border-box;margin:0;padding:0}.cc-messages__wrapper{position:relative;height:100%;width:100%}.cc-messages{display:flex;flex-direction:column;position:relative;height:100%;width:100%;box-sizing:border-box;justify-content:space-between}.cc-messages__headermenu{display:flex;justify-content:center;align-items:center}.cc-messages__threadedmessages,.cc-messages__details{position:absolute;top:0;left:0;height:100%;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;max-width:100%;z-index:1}.cc-messages__header{width:100%}.cc-messages__list{overflow:hidden;width:100%;height:100%}cometchat-threaded-messages{height:100%;display:flex}.cc-messages__composer{width:100%;display:flex;flex-direction:column;justify-content:flex-end}\n"], components: [{ type: CometChatMessageHeaderComponent, selector: "cometchat-message-header", inputs: ["avatarStyle", "statusIndicatorStyle", "messageHeaderStyle", "listItemStyle", "subtitleView", "disableUsersPresence", "disableTyping", "protectedGroupIcon", "privateGroupIcon", "menu", "user", "group", "backButtonIconURL", "hideBackButton", "listItemView", "onError", "onBack"] }, { type: CometChatMessageListComponent, selector: "cometchat-message-list", inputs: ["hideError", "errorStateView", "loadingStateView", "emptyStateView", "errorStateText", "emptyStateText", "loadingIconURL", "user", "group", "disableReceipt", "disableSoundForMessages", "customSoundForMessages", "readIcon", "deliveredIcon", "sentIcon", "waitIcon", "errorIcon", "alignment", "showAvatar", "datePattern", "timestampAlignment", "DateSeparatorPattern", "templates", "messagesRequestBuilder", "newMessageIndicatorText", "scrollToBottomOnNewMessages", "thresholdValue", "onThreadRepliesClick", "headerView", "footerView", "parentMessageId", "avatarStyle", "backdropStyle", "dateSeparatorStyle", "messageListStyle", "onError", "messageInformationConfiguration"] }, { type: CometChatMessageComposerComponent, selector: "cometchat-message-composer", inputs: ["user", "group", "disableSoundForMessages", "customSoundForMessage", "disableTypingEvents", "text", "placeholderText", "headerView", "onTextChange", "attachmentIconURL", "attachmentOptions", "secondaryButtonView", "auxilaryButtonView", "auxiliaryButtonsAlignment", "sendButtonView", "parentMessageId", "hideLiveReaction", "LiveReactionIconURL", "messageComposerStyle", "onSendButtonClick", "onError", "backdropStyle", "hideVoiceRecording", "mediaRecorderStyle", "voiceRecordingIconURL", "voiceRecordingCloseIconURL", "voiceRecordingStartIconURL", "voiceRecordingStopIconURL", "voiceRecordingSubmitIconURL"] }, { type: CometChatThreadedMessagesComponent, selector: "cometchat-threaded-messages", inputs: ["onClose", "onError", "parentMessage", "title", "closeIconURL", "bubbleView", "messageActionView", "messageListConfiguration", "messageComposerConfiguration", "threadedMessagesStyle"] }, { type: CometChatDetailsComponent, selector: "cometchat-details", inputs: ["group", "user", "title", "closeButtonIconURL", "hideProfile", "subtitleView", "customProfileView", "data", "disableUsersPresence", "privateGroupIcon", "protectedGroupIcon", "onError", "onClose", "leaveGroupConfirmButtonText", "leaveGroupCancelButtonText", "leaveGroupDialogMessage", "leaveGroupDialogStyle", "deleteGroupConfirmButtonText", "deleteGroupDialogMessage", "deleteGroupCancelButtonText", "deleteGroupDialogStyle", "transferOwnershipConfirmButtonText", "transferOwnershipDialogMessage", "transferOwnershipCancelButtonText", "transferOwnershipDialogStyle", "addMembersConfiguration", "bannedMembersConfiguration", "groupMembersConfiguration", "transferOwnershipConfiguration", "statusIndicatorStyle", "backdropStyle", "avatarStyle", "detailsStyle", "listItemStyle"] }, { type: CometChatCallButtonsComponent, selector: "cometchat-call-buttons", inputs: ["user", "group", "voiceCallIconURL", "voiceCallIconText", "voiceCallIconHoverText", "videoCallIconURL", "videoCallIconText", "videoCallIconHoverText", "onVoiceCallClick", "onVideoCallClick", "onError", "callButtonsStyle", "outgoingCallConfiguration", "ongoingCallConfiguration"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13854
|
+
CometChatMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatMessagesComponent, selector: "cometchat-messages", inputs: { user: "user", group: "group", hideMessageComposer: "hideMessageComposer", disableTyping: "disableTyping", messageHeaderConfiguration: "messageHeaderConfiguration", messageListConfiguration: "messageListConfiguration", messageComposerConfiguration: "messageComposerConfiguration", threadedMessageConfiguration: "threadedMessageConfiguration", detailsConfiguration: "detailsConfiguration", customSoundForIncomingMessages: "customSoundForIncomingMessages", customSoundForOutgoingMessages: "customSoundForOutgoingMessages", disableSoundForMessages: "disableSoundForMessages", messagesStyle: "messagesStyle", messageHeaderView: "messageHeaderView", messageComposerView: "messageComposerView", messageListView: "messageListView", hideMessageHeader: "hideMessageHeader", hideDetails: "hideDetails", auxiliaryMenu: "auxiliaryMenu" }, viewQueries: [{ propertyName: "messageComposerRef", first: true, predicate: ["messageComposerRef"], descendants: true }, { propertyName: "messageListRef", first: true, predicate: ["messageListRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-messages__wrapper\">\n <div class=\"cc-messages\" [ngStyle]=\"chatListStyle()\" *ngIf=\"user || group\">\n <div class=\"cc-messages__header\" *ngIf=\"!hideMessageHeader\">\n <div *ngIf=\"messageHeaderView; else customHeaderView\"\n class=\"cc-messages__header-customview\">\n <ng-container *ngTemplateOutlet=\"messageHeaderView\">\n </ng-container>\n </div>\n <ng-template #customHeaderView>\n <cometchat-message-header [user]=\"user\" [group]=\"group\"\n [subtitleView]=\"messageHeaderConfiguration.subtitleView\"\n [disableUsersPresence]=\"messageHeaderConfiguration.disableUsersPresence\"\n [protectedGroupIcon]=\"messageHeaderConfiguration.protectedGroupIcon\"\n [privateGroupIcon]=\"messageHeaderConfiguration.privateGroupIcon\"\n [menu]=\"headerMenu\"\n [messageHeaderStyle]=\"messageHeaderConfiguration.messageHeaderStyle\"\n [backButtonIconURL]=\"messageHeaderConfiguration.backButtonIconURL\"\n [hideBackButton]=\"messageHeaderConfiguration.hideBackButton\"\n [onError]=\"messageHeaderConfiguration.onError\"\n [onBack]=\"messageHeaderConfiguration.onBack\"\n [listItemStyle]=\"messageHeaderConfiguration.listItemStyle\"\n [statusIndicatorStyle]=\"messageHeaderConfiguration.statusIndicatorStyle\"\n [avatarStyle]=\"messageHeaderConfiguration.avatarStyle\">\n </cometchat-message-header>\n </ng-template>\n </div>\n <div class=\"cc-messages__list\">\n <cometchat-message-list #messageListRef\n [messageInformationConfiguration]=\"messageListConfiguration.messageInformationConfiguration\"\n [disableSoundForMessages]=\"disableSoundForMessages\"\n [customSoundForMessages]=\"customSoundForIncomingMessages\"\n [emptyStateView]=\"messageListConfiguration.emptyStateView\"\n [loadingIconURL]=\"messageListConfiguration?.loadingIconURL!\"\n [loadingStateView]=\"messageListConfiguration.loadingStateView\"\n [user]=\"user\" [group]=\"group\"\n [errorStateView]=\"messageListConfiguration.errorStateView\"\n [disableReceipt]=\"messageListConfiguration.disableReceipt\"\n [readIcon]=\"messageListConfiguration.readIcon\"\n [deliveredIcon]=\"messageListConfiguration.deliveredIcon\"\n [sentIcon]=\"messageListConfiguration.sentIcon\"\n [waitIcon]=\"messageListConfiguration.waitIcon\"\n [errorIcon]=\"messageListConfiguration.errorIcon\"\n [alignment]=\"messageListConfiguration.alignment\"\n [showAvatar]=\"messageListConfiguration.showAvatar\"\n [datePattern]=\"messageListConfiguration.datePattern\"\n [timestampAlignment]=\"messageListConfiguration.timestampAlignment\"\n [DateSeparatorPattern]=\"messageListConfiguration.DateSeparatorPattern\"\n [templates]=\"messageListConfiguration.templates\"\n [messagesRequestBuilder]=\"messageListConfiguration.messagesRequestBuilder\"\n [thresholdValue]=\"messageListConfiguration.thresholdValue\"\n [onThreadRepliesClick]=\"messageListConfiguration.onThreadRepliesClick || openThreadView\"\n [headerView]=\"messageListConfiguration.headerView\"\n [footerView]=\"messageListConfiguration.footerView\"\n [avatarStyle]=\"messageListConfiguration.avatarStyle\"\n [scrollToBottomOnNewMessages]=\"messageListConfiguration.scrollToBottomOnNewMessages\"\n [backdropStyle]=\"messageListConfiguration.backdropStyle\"\n [dateSeparatorStyle]=\"messageListConfiguration.dateSeparatorStyle\"\n [messageListStyle]=\"messageListConfiguration.messageListStyle\"\n [onError]=\"messageListConfiguration.onError\">\n </cometchat-message-list>\n </div>\n <div class=\"cc-messages__composer\" *ngIf=\"!hideMessageComposer\">\n <div *ngIf=\"messageComposerView; else customComposerView\"\n class=\"cc-messages__composer--customview\">\n <ng-container *ngTemplateOutlet=\"messageComposerView\">\n </ng-container>\n </div>\n <ng-template #customComposerView>\n <cometchat-message-composer #messageComposerRef\n [disableSoundForMessages]=\"disableSoundForMessages\"\n [voiceRecordingStopIconURL]=\"messageComposerConfiguration.voiceRecordingStopIconURL\"\n [voiceRecordingStartIconURL]=\"messageComposerConfiguration.voiceRecordingStartIconURL\"\n [voiceRecordingCloseIconURL]=\"messageComposerConfiguration.voiceRecordingCloseIconURL\"\n [voiceRecordingSubmitIconURL]=\"messageComposerConfiguration.voiceRecordingSubmitIconURL\"\n [mediaRecorderStyle]=\"messageComposerConfiguration.mediaRecorderStyle\"\n [customSoundForMessages]=\"customSoundForOutgoingMessages\"\n [user]=\"user\" [group]=\"group\"\n [text]=\"messageComposerConfiguration.text\"\n [headerView]=\"messageComposerConfiguration.headerView\"\n [onTextChange]=\"messageComposerConfiguration.onTextChange\"\n [attachmentIconURL]=\"messageComposerConfiguration.attachmentIconURL\"\n [attachmentOptions]=\"messageComposerConfiguration.attachmentOptions\"\n [secondaryButtonView]=\"messageComposerConfiguration.secondaryButtonView\"\n [auxilaryButtonView]=\"messageComposerConfiguration.auxilaryButtonView\"\n [auxiliaryButtonsAlignment]=\"messageComposerConfiguration.auxiliaryButtonsAlignment\"\n [sendButtonView]=\"messageComposerConfiguration.sendButtonView\"\n [hideLiveReaction]=\"messageComposerConfiguration.hideLiveReaction\"\n [LiveReactionIconURL]=\"messageComposerConfiguration.LiveReactionIconURL\"\n [messageComposerStyle]=\"messageComposerConfiguration.messageComposerStyle\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onError]=\"messageComposerConfiguration.onError\"\n [actionSheetStyle]=\"messageComposerConfiguration.actionSheetStyle\">\n </cometchat-message-composer>\n </ng-template>\n </div>\n </div>\n <div class=\"cc-messages__livereaction\">\n <cometchat-live-reaction *ngIf=\"liveReaction\"\n [reactionIconURL]=\"reactionName\"></cometchat-live-reaction>\n </div>\n <div *ngIf=\"openThreadedMessages\" class=\"cc-messages__threadedmessages\">\n <cometchat-threaded-messages [onClose]=\"closeThreadView\"\n [threadedMessagesStyle]=\"threadedMessageConfiguration.threadedMessagesStyle\"\n [messageActionView]=\"threadedMessageConfiguration.messageActionView\"\n [closeIconURL]=\"threadedMessageConfiguration.closeIconURL\"\n [onError]=\"threadedMessageConfiguration.onError\"\n [bubbleView]=\"threadedMessageConfiguration.bubbleView || parentBubbleView\"\n [parentMessage]=\"threadMessageObject\" [user]=\"user\"\n [group]=\"group\"></cometchat-threaded-messages>\n </div>\n <div *ngIf=\"openDetails\" class=\"cc-messages__details\">\n <cometchat-details [backdropStyle]=\"detailsConfiguration.backdropStyle\"\n [transferOwnershipConfiguration]=\"detailsConfiguration.transferOwnershipConfiguration\"\n [groupMembersConfiguration]=\"detailsConfiguration.groupMembersConfiguration\"\n [bannedMembersConfiguration]=\"detailsConfiguration.bannedMembersConfiguration\"\n [addMembersConfiguration]=\"detailsConfiguration.addMembersConfiguration\"\n [onClose]=\"detailsConfiguration.onClose || closeDetailsPage\"\n [listItemStyle]=\"detailsConfiguration.listItemStyle\"\n [detailsStyle]=\"detailsConfiguration.detailsStyle\"\n [avatarStyle]=\"detailsConfiguration.avatarStyle\"\n [statusIndicatorStyle]=\"detailsConfiguration.statusIndicatorStyle\"\n [leaveDialogStyle]=\"detailsConfiguration.leaveDialogStyle\"\n [data]=\"detailsConfiguration.data\"\n [customProfileView]=\"detailsConfiguration.customProfileView\"\n [subtitleView]=\"detailsConfiguration.subtitleView\"\n [hideProfile]=\"detailsConfiguration.hideProfile\"\n [onError]=\"detailsConfiguration.onError\"\n [closeButtonIconURL]=\"detailsConfiguration.closeButtonIconURL\"\n [user]=\"user\" [group]=\"group\"></cometchat-details>\n </div>\n</div>\n<ng-template #headerMenu>\n <div class=\"cc-messages__headermenu\">\n <div class=\"cc-messages__auxiliarymenu\"\n *ngIf=\"getAuxilaryView(); else elseBlock\">\n <ng-container *ngTemplateOutlet=\"getAuxilaryView()\">\n </ng-container>\n </div>\n <ng-template #elseBlock>\n <cometchat-call-buttons *ngIf=\"enableCalling\" voiceCallIconText=\"\"\n videoCallIconText=\"\" [user]=\"user\" [group]=\"group\"\n [callButtonsStyle]=\"callButtonsStyle\">\n </cometchat-call-buttons>\n </ng-template>\n <cometchat-button *ngIf=\"!hideDetails\" [iconURL]=\"infoIconStyle\"\n [buttonStyle]=\"detailsButtonStyle\"\n (cc-button-clicked)=\"openDetailsPage()\"></cometchat-button>\n </div>\n</ng-template>\n", styles: ["*{box-sizing:border-box;margin:0;padding:0}.cc-messages__wrapper{position:relative;height:100%;width:100%}.cc-messages{display:flex;flex-direction:column;position:relative;height:100%;width:100%;box-sizing:border-box;justify-content:space-between}.cc-messages__headermenu{display:flex;justify-content:center;align-items:center}.cc-messages__threadedmessages,.cc-messages__details{position:absolute;top:0;left:0;height:100%;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;max-width:100%;z-index:1}.cc-messages__header{width:100%}.cc-messages__list{overflow:hidden;width:100%;height:100%}cometchat-threaded-messages{height:100%;display:flex}.cc-messages__composer{width:100%;display:flex;flex-direction:column;justify-content:flex-end}\n"], components: [{ type: CometChatMessageHeaderComponent, selector: "cometchat-message-header", inputs: ["avatarStyle", "statusIndicatorStyle", "messageHeaderStyle", "listItemStyle", "subtitleView", "disableUsersPresence", "disableTyping", "protectedGroupIcon", "privateGroupIcon", "menu", "user", "group", "backButtonIconURL", "hideBackButton", "listItemView", "onError", "onBack"] }, { type: CometChatMessageListComponent, selector: "cometchat-message-list", inputs: ["hideError", "errorStateView", "loadingStateView", "emptyStateView", "errorStateText", "emptyStateText", "loadingIconURL", "user", "group", "disableReceipt", "disableSoundForMessages", "customSoundForMessages", "readIcon", "deliveredIcon", "sentIcon", "waitIcon", "errorIcon", "alignment", "showAvatar", "datePattern", "timestampAlignment", "DateSeparatorPattern", "templates", "messagesRequestBuilder", "newMessageIndicatorText", "scrollToBottomOnNewMessages", "thresholdValue", "onThreadRepliesClick", "headerView", "footerView", "parentMessageId", "avatarStyle", "backdropStyle", "dateSeparatorStyle", "messageListStyle", "onError", "messageInformationConfiguration"] }, { type: CometChatMessageComposerComponent, selector: "cometchat-message-composer", inputs: ["user", "group", "disableSoundForMessages", "customSoundForMessage", "disableTypingEvents", "text", "placeholderText", "headerView", "onTextChange", "attachmentIconURL", "attachmentOptions", "secondaryButtonView", "auxilaryButtonView", "auxiliaryButtonsAlignment", "sendButtonView", "parentMessageId", "hideLiveReaction", "LiveReactionIconURL", "messageComposerStyle", "onSendButtonClick", "onError", "backdropStyle", "actionSheetStyle", "hideVoiceRecording", "mediaRecorderStyle", "voiceRecordingIconURL", "voiceRecordingCloseIconURL", "voiceRecordingStartIconURL", "voiceRecordingStopIconURL", "voiceRecordingSubmitIconURL"] }, { type: CometChatThreadedMessagesComponent, selector: "cometchat-threaded-messages", inputs: ["onClose", "onError", "parentMessage", "title", "closeIconURL", "bubbleView", "messageActionView", "messageListConfiguration", "messageComposerConfiguration", "threadedMessagesStyle"] }, { type: CometChatDetailsComponent, selector: "cometchat-details", inputs: ["group", "user", "title", "closeButtonIconURL", "hideProfile", "subtitleView", "customProfileView", "data", "disableUsersPresence", "privateGroupIcon", "protectedGroupIcon", "onError", "onClose", "leaveGroupConfirmButtonText", "leaveGroupCancelButtonText", "leaveGroupDialogMessage", "leaveGroupDialogStyle", "deleteGroupConfirmButtonText", "deleteGroupDialogMessage", "deleteGroupCancelButtonText", "deleteGroupDialogStyle", "transferOwnershipConfirmButtonText", "transferOwnershipDialogMessage", "transferOwnershipCancelButtonText", "transferOwnershipDialogStyle", "addMembersConfiguration", "bannedMembersConfiguration", "groupMembersConfiguration", "transferOwnershipConfiguration", "statusIndicatorStyle", "backdropStyle", "avatarStyle", "detailsStyle", "listItemStyle"] }, { type: CometChatCallButtonsComponent, selector: "cometchat-call-buttons", inputs: ["user", "group", "voiceCallIconURL", "voiceCallIconText", "voiceCallIconHoverText", "videoCallIconURL", "videoCallIconText", "videoCallIconHoverText", "onVoiceCallClick", "onVideoCallClick", "onError", "callButtonsStyle", "outgoingCallConfiguration", "ongoingCallConfiguration"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13445
13855
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessagesComponent, decorators: [{
|
|
13446
13856
|
type: Component,
|
|
13447
|
-
args: [{ selector: "cometchat-messages", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-messages__wrapper\">\n<div class=\"cc-messages\" [ngStyle]=\"chatListStyle()\" *ngIf=\"user || group\">\n<div class=\"cc-messages__header\" *ngIf=\"!hideMessageHeader\">\n <div *ngIf=\"messageHeaderView; else customHeaderView\" class=\"cc-messages__header-customview\">\n <ng-container *ngTemplateOutlet=\"messageHeaderView\">\n </ng-container>\n </div>\n <ng-template #customHeaderView>\n <cometchat-message-header [user]=\"user\" [group]=\"group\" [subtitleView]=\"messageHeaderConfiguration.subtitleView\"\n [disableUsersPresence]=\"messageHeaderConfiguration.disableUsersPresence\" [protectedGroupIcon]=\"messageHeaderConfiguration.protectedGroupIcon\" [privateGroupIcon]=\"messageHeaderConfiguration.privateGroupIcon\" [menu]=\"headerMenu\" [messageHeaderStyle]=\"messageHeaderConfiguration.messageHeaderStyle\"\n [backButtonIconURL]=\"messageHeaderConfiguration.backButtonIconURL\" [hideBackButton]=\"messageHeaderConfiguration.hideBackButton\" [onError]=\"messageHeaderConfiguration.onError\" [onBack]=\"messageHeaderConfiguration.onBack\" [listItemStyle]=\"messageHeaderConfiguration.listItemStyle\" [statusIndicatorStyle]=\"messageHeaderConfiguration.statusIndicatorStyle\"\n [avatarStyle]=\"messageHeaderConfiguration.avatarStyle\"\n >\n </cometchat-message-header>\n </ng-template>\n</div>\n<div class=\"cc-messages__list\">\n <cometchat-message-list #messageListRef [messageInformationConfiguration]=\"messageListConfiguration.messageInformationConfiguration\" [disableSoundForMessages]=\"disableSoundForMessages\" [customSoundForMessages]=\"customSoundForIncomingMessages\" [emptyStateView]=\"messageListConfiguration.emptyStateView\" [loadingIconURL]=\"messageListConfiguration?.loadingIconURL!\" [loadingStateView]=\"messageListConfiguration.loadingStateView\" [user]=\"user\" [group]=\"group\"\n [errorStateView]=\"messageListConfiguration.errorStateView\" [disableReceipt]=\"messageListConfiguration.disableReceipt\" [readIcon]=\"messageListConfiguration.readIcon\" [deliveredIcon]=\"messageListConfiguration.deliveredIcon\" [sentIcon]=\"messageListConfiguration.sentIcon\" [waitIcon]=\"messageListConfiguration.waitIcon\"\n [errorIcon]=\"messageListConfiguration.errorIcon\" [alignment]=\"messageListConfiguration.alignment\" [showAvatar]=\"messageListConfiguration.showAvatar\" [datePattern]=\"messageListConfiguration.datePattern\" [timestampAlignment]=\"messageListConfiguration.timestampAlignment\" [DateSeparatorPattern]=\"messageListConfiguration.DateSeparatorPattern\"\n [templates]=\"messageListConfiguration.templates\" [messagesRequestBuilder]=\"messageListConfiguration.messagesRequestBuilder\" [thresholdValue]=\"messageListConfiguration.thresholdValue\" [onThreadRepliesClick]=\"messageListConfiguration.onThreadRepliesClick || openThreadView\" [headerView]=\"messageListConfiguration.headerView\" [footerView]=\"messageListConfiguration.footerView\"\n [avatarStyle]=\"messageListConfiguration.avatarStyle\" [scrollToBottomOnNewMessages]=\"messageListConfiguration.scrollToBottomOnNewMessages\" [backdropStyle]=\"messageListConfiguration.backdropStyle\" [dateSeparatorStyle]=\"messageListConfiguration.dateSeparatorStyle\" [messageListStyle]=\"messageListConfiguration.messageListStyle\" [onError]=\"messageListConfiguration.onError\"\n >\n </cometchat-message-list>\n</div>\n<div class=\"cc-messages__composer\" *ngIf=\"!hideMessageComposer\">\n <div *ngIf=\"messageComposerView; else customComposerView\" class=\"cc-messages__composer--customview\">\n <ng-container *ngTemplateOutlet=\"messageComposerView\">\n </ng-container>\n </div>\n <ng-template #customComposerView>\n <cometchat-message-composer #messageComposerRef [disableSoundForMessages]=\"disableSoundForMessages\"\n [voiceRecordingStopIconURL]=\"messageComposerConfiguration.voiceRecordingStopIconURL\"\n [voiceRecordingStartIconURL]=\"messageComposerConfiguration.voiceRecordingStartIconURL\"\n [voiceRecordingCloseIconURL]=\"messageComposerConfiguration.voiceRecordingCloseIconURL\"\n [voiceRecordingSubmitIconURL]=\"messageComposerConfiguration.voiceRecordingSubmitIconURL\"\n [mediaRecorderStyle]=\"messageComposerConfiguration.mediaRecorderStyle\"\n [customSoundForMessages]=\"customSoundForOutgoingMessages\"\n [user]=\"user\" [group]=\"group\" [text]=\"messageComposerConfiguration.text\" [headerView]=\"messageComposerConfiguration.headerView\" [onTextChange]=\"messageComposerConfiguration.onTextChange\" [attachmentIconURL]=\"messageComposerConfiguration.attachmentIconURL\"\n [attachmentOptions]=\"messageComposerConfiguration.attachmentOptions\" [secondaryButtonView]=\"messageComposerConfiguration.secondaryButtonView\" [auxilaryButtonView]=\"messageComposerConfiguration.auxilaryButtonView\" [auxiliaryButtonsAlignment]=\"messageComposerConfiguration.auxiliaryButtonsAlignment\"\n [sendButtonView]=\"messageComposerConfiguration.sendButtonView\" [hideLiveReaction]=\"messageComposerConfiguration.hideLiveReaction\" [LiveReactionIconURL]=\"messageComposerConfiguration.LiveReactionIconURL\" [messageComposerStyle]=\"messageComposerConfiguration.messageComposerStyle\" [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\" [onError]=\"messageComposerConfiguration.onError\"\n >\n </cometchat-message-composer>\n </ng-template>\n</div>\n </div>\n <div class=\"cc-messages__livereaction\">\n <cometchat-live-reaction *ngIf=\"liveReaction\" [reactionIconURL]=\"reactionName\"></cometchat-live-reaction>\n</div>\n<div *ngIf=\"openThreadedMessages\" class=\"cc-messages__threadedmessages\">\n<cometchat-threaded-messages [onClose]=\"closeThreadView\" [threadedMessagesStyle]=\"threadedMessageConfiguration.threadedMessagesStyle\" [messageActionView]=\"threadedMessageConfiguration.messageActionView\" [closeIconURL]=\"threadedMessageConfiguration.closeIconURL\" [onError]=\"threadedMessageConfiguration.onError\" [bubbleView]=\"threadedMessageConfiguration.bubbleView || parentBubbleView\" [parentMessage]=\"threadMessageObject\" [user]=\"user\" [group]=\"group\"></cometchat-threaded-messages>\n</div>\n<div *ngIf=\"openDetails\" class=\"cc-messages__details\">\n <cometchat-details [backdropStyle]=\"detailsConfiguration.backdropStyle\" [transferOwnershipConfiguration]=\"detailsConfiguration.transferOwnershipConfiguration\" [groupMembersConfiguration]=\"detailsConfiguration.groupMembersConfiguration\" [bannedMembersConfiguration]=\"detailsConfiguration.bannedMembersConfiguration\" [addMembersConfiguration]=\"detailsConfiguration.addMembersConfiguration\" [onClose]=\"detailsConfiguration.onClose || closeDetailsPage\" [listItemStyle]=\"detailsConfiguration.listItemStyle\" [detailsStyle]=\"detailsConfiguration.detailsStyle\" [avatarStyle]=\"detailsConfiguration.avatarStyle\" [statusIndicatorStyle]=\"detailsConfiguration.statusIndicatorStyle\" [leaveDialogStyle]=\"detailsConfiguration.leaveDialogStyle\" [data]=\"detailsConfiguration.data\" [customProfileView]=\"detailsConfiguration.customProfileView\" [subtitleView]=\"detailsConfiguration.subtitleView\" [hideProfile]=\"detailsConfiguration.hideProfile\" [onError]=\"detailsConfiguration.onError\" [closeButtonIconURL]=\"detailsConfiguration.closeButtonIconURL\" [user]=\"user\" [group]=\"group\"></cometchat-details>\n </div>\n</div>\n<ng-template #headerMenu>\n <div class=\"cc-messages__headermenu\">\n<div class=\"cc-messages__auxiliarymenu\" *ngIf=\"getAuxilaryView(); else elseBlock\">\n <ng-container *ngTemplateOutlet=\"getAuxilaryView()\">\n </ng-container>\n</div>\n <ng-template #elseBlock>\n <cometchat-call-buttons *ngIf=\"enableCalling\" voiceCallIconText=\"\" videoCallIconText=\"\" [user]=\"user\" [group]=\"group\" [callButtonsStyle]=\"callButtonsStyle\">\n </cometchat-call-buttons>\n </ng-template>\n <cometchat-button *ngIf=\"!hideDetails\" [iconURL]=\"infoIconStyle\" [buttonStyle]=\"detailsButtonStyle\" (cc-button-clicked)=\"openDetailsPage()\"></cometchat-button>\n </div>\n</ng-template>\n", styles: ["*{box-sizing:border-box;margin:0;padding:0}.cc-messages__wrapper{position:relative;height:100%;width:100%}.cc-messages{display:flex;flex-direction:column;position:relative;height:100%;width:100%;box-sizing:border-box;justify-content:space-between}.cc-messages__headermenu{display:flex;justify-content:center;align-items:center}.cc-messages__threadedmessages,.cc-messages__details{position:absolute;top:0;left:0;height:100%;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;max-width:100%;z-index:1}.cc-messages__header{width:100%}.cc-messages__list{overflow:hidden;width:100%;height:100%}cometchat-threaded-messages{height:100%;display:flex}.cc-messages__composer{width:100%;display:flex;flex-direction:column;justify-content:flex-end}\n"] }]
|
|
13857
|
+
args: [{ selector: "cometchat-messages", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-messages__wrapper\">\n <div class=\"cc-messages\" [ngStyle]=\"chatListStyle()\" *ngIf=\"user || group\">\n <div class=\"cc-messages__header\" *ngIf=\"!hideMessageHeader\">\n <div *ngIf=\"messageHeaderView; else customHeaderView\"\n class=\"cc-messages__header-customview\">\n <ng-container *ngTemplateOutlet=\"messageHeaderView\">\n </ng-container>\n </div>\n <ng-template #customHeaderView>\n <cometchat-message-header [user]=\"user\" [group]=\"group\"\n [subtitleView]=\"messageHeaderConfiguration.subtitleView\"\n [disableUsersPresence]=\"messageHeaderConfiguration.disableUsersPresence\"\n [protectedGroupIcon]=\"messageHeaderConfiguration.protectedGroupIcon\"\n [privateGroupIcon]=\"messageHeaderConfiguration.privateGroupIcon\"\n [menu]=\"headerMenu\"\n [messageHeaderStyle]=\"messageHeaderConfiguration.messageHeaderStyle\"\n [backButtonIconURL]=\"messageHeaderConfiguration.backButtonIconURL\"\n [hideBackButton]=\"messageHeaderConfiguration.hideBackButton\"\n [onError]=\"messageHeaderConfiguration.onError\"\n [onBack]=\"messageHeaderConfiguration.onBack\"\n [listItemStyle]=\"messageHeaderConfiguration.listItemStyle\"\n [statusIndicatorStyle]=\"messageHeaderConfiguration.statusIndicatorStyle\"\n [avatarStyle]=\"messageHeaderConfiguration.avatarStyle\">\n </cometchat-message-header>\n </ng-template>\n </div>\n <div class=\"cc-messages__list\">\n <cometchat-message-list #messageListRef\n [messageInformationConfiguration]=\"messageListConfiguration.messageInformationConfiguration\"\n [disableSoundForMessages]=\"disableSoundForMessages\"\n [customSoundForMessages]=\"customSoundForIncomingMessages\"\n [emptyStateView]=\"messageListConfiguration.emptyStateView\"\n [loadingIconURL]=\"messageListConfiguration?.loadingIconURL!\"\n [loadingStateView]=\"messageListConfiguration.loadingStateView\"\n [user]=\"user\" [group]=\"group\"\n [errorStateView]=\"messageListConfiguration.errorStateView\"\n [disableReceipt]=\"messageListConfiguration.disableReceipt\"\n [readIcon]=\"messageListConfiguration.readIcon\"\n [deliveredIcon]=\"messageListConfiguration.deliveredIcon\"\n [sentIcon]=\"messageListConfiguration.sentIcon\"\n [waitIcon]=\"messageListConfiguration.waitIcon\"\n [errorIcon]=\"messageListConfiguration.errorIcon\"\n [alignment]=\"messageListConfiguration.alignment\"\n [showAvatar]=\"messageListConfiguration.showAvatar\"\n [datePattern]=\"messageListConfiguration.datePattern\"\n [timestampAlignment]=\"messageListConfiguration.timestampAlignment\"\n [DateSeparatorPattern]=\"messageListConfiguration.DateSeparatorPattern\"\n [templates]=\"messageListConfiguration.templates\"\n [messagesRequestBuilder]=\"messageListConfiguration.messagesRequestBuilder\"\n [thresholdValue]=\"messageListConfiguration.thresholdValue\"\n [onThreadRepliesClick]=\"messageListConfiguration.onThreadRepliesClick || openThreadView\"\n [headerView]=\"messageListConfiguration.headerView\"\n [footerView]=\"messageListConfiguration.footerView\"\n [avatarStyle]=\"messageListConfiguration.avatarStyle\"\n [scrollToBottomOnNewMessages]=\"messageListConfiguration.scrollToBottomOnNewMessages\"\n [backdropStyle]=\"messageListConfiguration.backdropStyle\"\n [dateSeparatorStyle]=\"messageListConfiguration.dateSeparatorStyle\"\n [messageListStyle]=\"messageListConfiguration.messageListStyle\"\n [onError]=\"messageListConfiguration.onError\">\n </cometchat-message-list>\n </div>\n <div class=\"cc-messages__composer\" *ngIf=\"!hideMessageComposer\">\n <div *ngIf=\"messageComposerView; else customComposerView\"\n class=\"cc-messages__composer--customview\">\n <ng-container *ngTemplateOutlet=\"messageComposerView\">\n </ng-container>\n </div>\n <ng-template #customComposerView>\n <cometchat-message-composer #messageComposerRef\n [disableSoundForMessages]=\"disableSoundForMessages\"\n [voiceRecordingStopIconURL]=\"messageComposerConfiguration.voiceRecordingStopIconURL\"\n [voiceRecordingStartIconURL]=\"messageComposerConfiguration.voiceRecordingStartIconURL\"\n [voiceRecordingCloseIconURL]=\"messageComposerConfiguration.voiceRecordingCloseIconURL\"\n [voiceRecordingSubmitIconURL]=\"messageComposerConfiguration.voiceRecordingSubmitIconURL\"\n [mediaRecorderStyle]=\"messageComposerConfiguration.mediaRecorderStyle\"\n [customSoundForMessages]=\"customSoundForOutgoingMessages\"\n [user]=\"user\" [group]=\"group\"\n [text]=\"messageComposerConfiguration.text\"\n [headerView]=\"messageComposerConfiguration.headerView\"\n [onTextChange]=\"messageComposerConfiguration.onTextChange\"\n [attachmentIconURL]=\"messageComposerConfiguration.attachmentIconURL\"\n [attachmentOptions]=\"messageComposerConfiguration.attachmentOptions\"\n [secondaryButtonView]=\"messageComposerConfiguration.secondaryButtonView\"\n [auxilaryButtonView]=\"messageComposerConfiguration.auxilaryButtonView\"\n [auxiliaryButtonsAlignment]=\"messageComposerConfiguration.auxiliaryButtonsAlignment\"\n [sendButtonView]=\"messageComposerConfiguration.sendButtonView\"\n [hideLiveReaction]=\"messageComposerConfiguration.hideLiveReaction\"\n [LiveReactionIconURL]=\"messageComposerConfiguration.LiveReactionIconURL\"\n [messageComposerStyle]=\"messageComposerConfiguration.messageComposerStyle\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onError]=\"messageComposerConfiguration.onError\"\n [actionSheetStyle]=\"messageComposerConfiguration.actionSheetStyle\">\n </cometchat-message-composer>\n </ng-template>\n </div>\n </div>\n <div class=\"cc-messages__livereaction\">\n <cometchat-live-reaction *ngIf=\"liveReaction\"\n [reactionIconURL]=\"reactionName\"></cometchat-live-reaction>\n </div>\n <div *ngIf=\"openThreadedMessages\" class=\"cc-messages__threadedmessages\">\n <cometchat-threaded-messages [onClose]=\"closeThreadView\"\n [threadedMessagesStyle]=\"threadedMessageConfiguration.threadedMessagesStyle\"\n [messageActionView]=\"threadedMessageConfiguration.messageActionView\"\n [closeIconURL]=\"threadedMessageConfiguration.closeIconURL\"\n [onError]=\"threadedMessageConfiguration.onError\"\n [bubbleView]=\"threadedMessageConfiguration.bubbleView || parentBubbleView\"\n [parentMessage]=\"threadMessageObject\" [user]=\"user\"\n [group]=\"group\"></cometchat-threaded-messages>\n </div>\n <div *ngIf=\"openDetails\" class=\"cc-messages__details\">\n <cometchat-details [backdropStyle]=\"detailsConfiguration.backdropStyle\"\n [transferOwnershipConfiguration]=\"detailsConfiguration.transferOwnershipConfiguration\"\n [groupMembersConfiguration]=\"detailsConfiguration.groupMembersConfiguration\"\n [bannedMembersConfiguration]=\"detailsConfiguration.bannedMembersConfiguration\"\n [addMembersConfiguration]=\"detailsConfiguration.addMembersConfiguration\"\n [onClose]=\"detailsConfiguration.onClose || closeDetailsPage\"\n [listItemStyle]=\"detailsConfiguration.listItemStyle\"\n [detailsStyle]=\"detailsConfiguration.detailsStyle\"\n [avatarStyle]=\"detailsConfiguration.avatarStyle\"\n [statusIndicatorStyle]=\"detailsConfiguration.statusIndicatorStyle\"\n [leaveDialogStyle]=\"detailsConfiguration.leaveDialogStyle\"\n [data]=\"detailsConfiguration.data\"\n [customProfileView]=\"detailsConfiguration.customProfileView\"\n [subtitleView]=\"detailsConfiguration.subtitleView\"\n [hideProfile]=\"detailsConfiguration.hideProfile\"\n [onError]=\"detailsConfiguration.onError\"\n [closeButtonIconURL]=\"detailsConfiguration.closeButtonIconURL\"\n [user]=\"user\" [group]=\"group\"></cometchat-details>\n </div>\n</div>\n<ng-template #headerMenu>\n <div class=\"cc-messages__headermenu\">\n <div class=\"cc-messages__auxiliarymenu\"\n *ngIf=\"getAuxilaryView(); else elseBlock\">\n <ng-container *ngTemplateOutlet=\"getAuxilaryView()\">\n </ng-container>\n </div>\n <ng-template #elseBlock>\n <cometchat-call-buttons *ngIf=\"enableCalling\" voiceCallIconText=\"\"\n videoCallIconText=\"\" [user]=\"user\" [group]=\"group\"\n [callButtonsStyle]=\"callButtonsStyle\">\n </cometchat-call-buttons>\n </ng-template>\n <cometchat-button *ngIf=\"!hideDetails\" [iconURL]=\"infoIconStyle\"\n [buttonStyle]=\"detailsButtonStyle\"\n (cc-button-clicked)=\"openDetailsPage()\"></cometchat-button>\n </div>\n</ng-template>\n", styles: ["*{box-sizing:border-box;margin:0;padding:0}.cc-messages__wrapper{position:relative;height:100%;width:100%}.cc-messages{display:flex;flex-direction:column;position:relative;height:100%;width:100%;box-sizing:border-box;justify-content:space-between}.cc-messages__headermenu{display:flex;justify-content:center;align-items:center}.cc-messages__threadedmessages,.cc-messages__details{position:absolute;top:0;left:0;height:100%;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;max-width:100%;z-index:1}.cc-messages__header{width:100%}.cc-messages__list{overflow:hidden;width:100%;height:100%}cometchat-threaded-messages{height:100%;display:flex}.cc-messages__composer{width:100%;display:flex;flex-direction:column;justify-content:flex-end}\n"] }]
|
|
13448
13858
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }, { type: i0.ElementRef }]; }, propDecorators: { messageComposerRef: [{
|
|
13449
13859
|
type: ViewChild,
|
|
13450
13860
|
args: ["messageComposerRef", { static: false }]
|