@cometchat/chat-uikit-angular 4.0.1-beta1 → 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/AI/AIConversationStarter/AIConversationStarter.d.ts +7 -0
- package/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +6 -0
- package/AI/AIEnabler.d.ts +8 -0
- package/AI/AIEnablerDecorator.d.ts +7 -0
- package/AI/AISmartReplies/AISmartReplies.d.ts +7 -0
- package/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +6 -0
- package/CometChatConversations/cometchat-conversations/cometchat-conversations.component.d.ts +18 -7
- package/CometChatConversationsWithMessages/cometchat-conversations-with-messages/cometchat-conversations-with-messages.component.d.ts +0 -4
- package/CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component.d.ts +16 -2
- package/CometChatMessageComposer/cometchat-message-composer.module.d.ts +2 -1
- 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 +42 -8
- package/CometChatThreadedMessages/cometchat-threaded-messages/cometchat-threaded-messages.component.d.ts +8 -9
- 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/Shared/Views/CometChatCardView/cometchat-card-view/cometchat-card-view.component.d.ts +71 -0
- package/Shared/Views/CometChatCardView/cometchat-card-view.module.d.ts +8 -0
- package/assets/Reply@2x.svg +0 -0
- package/assets/ai-bot.svg +24 -0
- package/assets/ai-empty.svg +22 -0
- package/assets/ai-error.svg +21 -0
- package/assets/message-privately.svg +0 -0
- package/assets/mic.svg +0 -0
- package/assets/new-chat.svg +0 -0
- package/assets/pause-icon.svg +0 -0
- package/assets/play-icon.svg +0 -0
- package/assets/record-icon.svg +0 -0
- package/assets/start-conversation.svg +0 -0
- package/assets/stop.svg +0 -0
- package/esm2020/AI/AIConversationStarter/AIConversationStarter.mjs +18 -0
- package/esm2020/AI/AIConversationStarter/AIConversationStarterDecorator.mjs +10 -0
- package/esm2020/AI/AIEnabler.mjs +70 -0
- package/esm2020/AI/AIEnablerDecorator.mjs +10 -0
- package/esm2020/AI/AISmartReplies/AISmartReplies.mjs +18 -0
- package/esm2020/AI/AISmartReplies/AISmartRepliesDecorator.mjs +10 -0
- package/esm2020/CometChatConversations/cometchat-conversations/cometchat-conversations.component.mjs +71 -45
- package/esm2020/CometChatConversationsWithMessages/cometchat-conversations-with-messages/cometchat-conversations-with-messages.component.mjs +4 -10
- package/esm2020/CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component.mjs +147 -26
- package/esm2020/CometChatMessageComposer/cometchat-message-composer.module.mjs +6 -2
- 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 +374 -52
- package/esm2020/CometChatMessages/cometchat-messages/cometchat-messages.component.mjs +3 -3
- package/esm2020/CometChatThreadedMessages/cometchat-threaded-messages/cometchat-threaded-messages.component.mjs +24 -30
- package/esm2020/Shared/CometChatUIkit/CometChatUIKit.mjs +169 -33
- 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 +117 -0
- package/esm2020/Shared/Views/CometChatCardView/cometchat-card-view.module.mjs +23 -0
- package/esm2020/public-api.mjs +8 -1
- package/fesm2015/cometchat-chat-uikit-angular.mjs +1093 -212
- package/fesm2015/cometchat-chat-uikit-angular.mjs.map +1 -1
- package/fesm2020/cometchat-chat-uikit-angular.mjs +1081 -205
- package/fesm2020/cometchat-chat-uikit-angular.mjs.map +1 -1
- package/package.json +6 -5
- package/public-api.d.ts +6 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ConversationUtils, 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, ReactionsConstants, 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';
|
|
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);
|
|
@@ -1307,9 +1463,11 @@ class CometChatUIKit {
|
|
|
1307
1463
|
appSettingsBuilder.overrideClientHost(uiKitSettings.getClientHost());
|
|
1308
1464
|
const appSettings = appSettingsBuilder.build();
|
|
1309
1465
|
return new Promise((resolve, reject) => {
|
|
1310
|
-
CometChat.init(uiKitSettings?.appId, appSettings)
|
|
1466
|
+
CometChat.init(uiKitSettings?.appId, appSettings)
|
|
1467
|
+
.then(() => {
|
|
1311
1468
|
CometChat.setSource("uikit-v4", "web", "angular");
|
|
1312
|
-
CometChatUIKit.getLoggedinUser()
|
|
1469
|
+
CometChatUIKit.getLoggedinUser()
|
|
1470
|
+
?.then((user) => {
|
|
1313
1471
|
if (user) {
|
|
1314
1472
|
ChatConfigurator.init();
|
|
1315
1473
|
this.initiateAfterLogin();
|
|
@@ -1327,9 +1485,11 @@ class CometChatUIKit {
|
|
|
1327
1485
|
}
|
|
1328
1486
|
static getLoggedinUser() {
|
|
1329
1487
|
return new Promise((resolve, reject) => {
|
|
1330
|
-
CometChat.getLoggedinUser()
|
|
1488
|
+
CometChat.getLoggedinUser()
|
|
1489
|
+
.then((user) => {
|
|
1331
1490
|
return resolve(user);
|
|
1332
|
-
})
|
|
1491
|
+
})
|
|
1492
|
+
.catch((error) => {
|
|
1333
1493
|
return reject(error);
|
|
1334
1494
|
})
|
|
1335
1495
|
.catch((error) => {
|
|
@@ -1344,38 +1504,53 @@ class CometChatUIKit {
|
|
|
1344
1504
|
.setRegion(CometChatUIKit.uiKitSettings?.region)
|
|
1345
1505
|
.build();
|
|
1346
1506
|
CometChatUIKitCalls.init(callAppSetting).then(() => {
|
|
1347
|
-
console.log(
|
|
1507
|
+
console.log("CometChatCalls initialization success");
|
|
1348
1508
|
new CallingExtension().enable();
|
|
1349
1509
|
}, (error) => {
|
|
1350
|
-
console.log(
|
|
1510
|
+
console.log("CometChatCalls initialization failed with error:", error);
|
|
1351
1511
|
});
|
|
1352
1512
|
}
|
|
1353
1513
|
}
|
|
1354
1514
|
static initiateAfterLogin() {
|
|
1355
1515
|
if (CometChatUIKit.uiKitSettings != null) {
|
|
1356
1516
|
this.enableCalling();
|
|
1357
|
-
this.
|
|
1358
|
-
|
|
1359
|
-
|
|
1517
|
+
let extensionList = this.uiKitSettings?.extensions || this.defaultExtensions;
|
|
1518
|
+
ChatSdkEventInitializer.attachListeners();
|
|
1519
|
+
if (extensionList.length > 0) {
|
|
1520
|
+
extensionList.forEach((extension) => {
|
|
1521
|
+
extension?.enable();
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
if (this.uiKitSettings.aiFeatures) {
|
|
1525
|
+
this.uiKitSettings.aiFeatures?.enable();
|
|
1526
|
+
}
|
|
1527
|
+
else {
|
|
1528
|
+
new AIEnabler().enable();
|
|
1529
|
+
}
|
|
1360
1530
|
}
|
|
1361
1531
|
}
|
|
1362
1532
|
static async login(details) {
|
|
1363
1533
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1364
1534
|
return undefined;
|
|
1365
1535
|
return new Promise((resolve, reject) => {
|
|
1366
|
-
CometChatUIKit.getLoggedinUser()
|
|
1536
|
+
CometChatUIKit.getLoggedinUser()
|
|
1537
|
+
?.then((user) => {
|
|
1367
1538
|
if (user) {
|
|
1368
1539
|
resolve(user);
|
|
1369
1540
|
ChatConfigurator.init();
|
|
1370
1541
|
this.initiateAfterLogin();
|
|
1371
1542
|
}
|
|
1372
1543
|
else {
|
|
1373
|
-
let args = details.uid
|
|
1374
|
-
|
|
1544
|
+
let args = details.uid
|
|
1545
|
+
? [details.uid, CometChatUIKit.uiKitSettings.authKey]
|
|
1546
|
+
: [details.authToken];
|
|
1547
|
+
CometChat.login(...args)
|
|
1548
|
+
.then((user) => {
|
|
1375
1549
|
resolve(user);
|
|
1376
1550
|
ChatConfigurator.init();
|
|
1377
1551
|
this.initiateAfterLogin();
|
|
1378
|
-
})
|
|
1552
|
+
})
|
|
1553
|
+
.catch((error) => {
|
|
1379
1554
|
reject(error);
|
|
1380
1555
|
});
|
|
1381
1556
|
}
|
|
@@ -1389,9 +1564,11 @@ class CometChatUIKit {
|
|
|
1389
1564
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1390
1565
|
return undefined;
|
|
1391
1566
|
return new Promise((resolve, reject) => {
|
|
1392
|
-
CometChat.createUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1567
|
+
CometChat.createUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1568
|
+
.then((user) => {
|
|
1393
1569
|
resolve(user);
|
|
1394
|
-
})
|
|
1570
|
+
})
|
|
1571
|
+
.catch((error) => {
|
|
1395
1572
|
reject(error);
|
|
1396
1573
|
});
|
|
1397
1574
|
});
|
|
@@ -1400,9 +1577,11 @@ class CometChatUIKit {
|
|
|
1400
1577
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1401
1578
|
return undefined;
|
|
1402
1579
|
return new Promise((resolve, reject) => {
|
|
1403
|
-
CometChat.updateUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1580
|
+
CometChat.updateUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1581
|
+
.then((user) => {
|
|
1404
1582
|
resolve(user);
|
|
1405
|
-
})
|
|
1583
|
+
})
|
|
1584
|
+
.catch((error) => {
|
|
1406
1585
|
reject(error);
|
|
1407
1586
|
});
|
|
1408
1587
|
});
|
|
@@ -1411,9 +1590,11 @@ class CometChatUIKit {
|
|
|
1411
1590
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1412
1591
|
return undefined;
|
|
1413
1592
|
return new Promise((resolve, reject) => {
|
|
1414
|
-
CometChat.logout()
|
|
1593
|
+
CometChat.logout()
|
|
1594
|
+
.then((message) => {
|
|
1415
1595
|
resolve(message);
|
|
1416
|
-
})
|
|
1596
|
+
})
|
|
1597
|
+
.catch((error) => {
|
|
1417
1598
|
reject(error);
|
|
1418
1599
|
});
|
|
1419
1600
|
});
|
|
@@ -1428,19 +1609,111 @@ class CometChatUIKit {
|
|
|
1428
1609
|
}
|
|
1429
1610
|
return true;
|
|
1430
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
|
+
});
|
|
1675
|
+
}
|
|
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
|
+
});
|
|
1694
|
+
}
|
|
1431
1695
|
// Helper methods to send messages
|
|
1432
1696
|
// [sendCustomMessage] used to send a custom message
|
|
1433
1697
|
static sendCustomMessage(message) {
|
|
1434
1698
|
return new Promise((resolve, reject) => {
|
|
1435
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1699
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1700
|
+
message: message,
|
|
1701
|
+
status: MessageStatus.inprogress,
|
|
1702
|
+
});
|
|
1436
1703
|
CometChat.sendCustomMessage(message)
|
|
1437
1704
|
.then((message) => {
|
|
1438
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1705
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1706
|
+
message: message,
|
|
1707
|
+
status: MessageStatus.success,
|
|
1708
|
+
});
|
|
1439
1709
|
resolve(message);
|
|
1440
1710
|
})
|
|
1441
1711
|
.catch((error) => {
|
|
1442
1712
|
message.setMetadata({ error: true });
|
|
1443
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1713
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1714
|
+
message: message,
|
|
1715
|
+
status: MessageStatus.error,
|
|
1716
|
+
});
|
|
1444
1717
|
reject(error);
|
|
1445
1718
|
});
|
|
1446
1719
|
});
|
|
@@ -1449,15 +1722,24 @@ class CometChatUIKit {
|
|
|
1449
1722
|
// [sendTextMessage] used to send a custom message
|
|
1450
1723
|
static sendTextMessage(message) {
|
|
1451
1724
|
return new Promise((resolve, reject) => {
|
|
1452
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1725
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1726
|
+
message: message,
|
|
1727
|
+
status: MessageStatus.inprogress,
|
|
1728
|
+
});
|
|
1453
1729
|
CometChat.sendMessage(message)
|
|
1454
1730
|
.then((message) => {
|
|
1455
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1731
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1732
|
+
message: message,
|
|
1733
|
+
status: MessageStatus.success,
|
|
1734
|
+
});
|
|
1456
1735
|
resolve(message);
|
|
1457
1736
|
})
|
|
1458
1737
|
.catch((error) => {
|
|
1459
1738
|
message.setMetadata({ error: true });
|
|
1460
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1739
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1740
|
+
message: message,
|
|
1741
|
+
status: MessageStatus.error,
|
|
1742
|
+
});
|
|
1461
1743
|
reject(error);
|
|
1462
1744
|
});
|
|
1463
1745
|
});
|
|
@@ -1466,15 +1748,24 @@ class CometChatUIKit {
|
|
|
1466
1748
|
// [sendMediaMessage] used to send a custom message
|
|
1467
1749
|
static sendMediaMessage(message) {
|
|
1468
1750
|
return new Promise((resolve, reject) => {
|
|
1469
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1751
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1752
|
+
message: message,
|
|
1753
|
+
status: MessageStatus.inprogress,
|
|
1754
|
+
});
|
|
1470
1755
|
CometChat.sendMediaMessage(message)
|
|
1471
1756
|
.then((message) => {
|
|
1472
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1757
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1758
|
+
message: message,
|
|
1759
|
+
status: MessageStatus.success,
|
|
1760
|
+
});
|
|
1473
1761
|
resolve(message);
|
|
1474
1762
|
})
|
|
1475
1763
|
.catch((error) => {
|
|
1476
1764
|
message.setMetadata({ error: true });
|
|
1477
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1765
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1766
|
+
message: message,
|
|
1767
|
+
status: MessageStatus.error,
|
|
1768
|
+
});
|
|
1478
1769
|
reject(error);
|
|
1479
1770
|
});
|
|
1480
1771
|
});
|
|
@@ -3845,7 +4136,6 @@ class CometChatMessageHeaderComponent {
|
|
|
3845
4136
|
console.log(error);
|
|
3846
4137
|
};
|
|
3847
4138
|
this.onBack = () => { };
|
|
3848
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
3849
4139
|
this.groupsListenerId = "groupsList_" + new Date().getTime();
|
|
3850
4140
|
this.userListenerId = "userlist_" + new Date().getTime();
|
|
3851
4141
|
this.subtitleText = "";
|
|
@@ -4100,16 +4390,14 @@ class CometChatMessageHeaderComponent {
|
|
|
4100
4390
|
}));
|
|
4101
4391
|
}
|
|
4102
4392
|
if (!this.disableTyping) {
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
},
|
|
4112
|
-
}));
|
|
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
|
+
});
|
|
4113
4401
|
}
|
|
4114
4402
|
CometChat.addGroupListener(this.groupsListenerId, new CometChat.GroupListener({
|
|
4115
4403
|
onGroupMemberScopeChanged: (message, changedUser, newScope, oldScope, changedGroup) => {
|
|
@@ -4161,8 +4449,9 @@ class CometChatMessageHeaderComponent {
|
|
|
4161
4449
|
}
|
|
4162
4450
|
}
|
|
4163
4451
|
removeListener() {
|
|
4164
|
-
CometChat.removeMessageListener(this.msgListenerId);
|
|
4165
4452
|
CometChat.removeUserListener(this.userListenerId);
|
|
4453
|
+
this.onTypingStarted?.unsubscribe();
|
|
4454
|
+
this.onTypingEnded?.unsubscribe();
|
|
4166
4455
|
}
|
|
4167
4456
|
ngOnDestroy() {
|
|
4168
4457
|
this.removeListener();
|
|
@@ -4937,7 +5226,6 @@ class CometChatConversationsComponent {
|
|
|
4937
5226
|
this.checkItemChange = false;
|
|
4938
5227
|
this.showConfirmDialog = false;
|
|
4939
5228
|
this.conversationToBeDeleted = null;
|
|
4940
|
-
this.conversationListenerId = "chatlist_" + new Date().getTime();
|
|
4941
5229
|
this.userListenerId = "chatlist_user_" + new Date().getTime();
|
|
4942
5230
|
this.groupListenerId = "chatlist_group_" + new Date().getTime();
|
|
4943
5231
|
this.groupToUpdate = {};
|
|
@@ -5118,6 +5406,7 @@ class CometChatConversationsComponent {
|
|
|
5118
5406
|
case CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED:
|
|
5119
5407
|
case CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED:
|
|
5120
5408
|
case CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED:
|
|
5409
|
+
case CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED:
|
|
5121
5410
|
if (!this.disableReceipt) {
|
|
5122
5411
|
this.markMessageAsDelivered(message);
|
|
5123
5412
|
}
|
|
@@ -5686,43 +5975,6 @@ class CometChatConversationsComponent {
|
|
|
5686
5975
|
this.updateConversation(message);
|
|
5687
5976
|
},
|
|
5688
5977
|
}));
|
|
5689
|
-
CometChat.addMessageListener(this.conversationListenerId, new CometChat.MessageListener({
|
|
5690
|
-
onTextMessageReceived: (textMessage) => {
|
|
5691
|
-
callback(CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED, null, textMessage);
|
|
5692
|
-
},
|
|
5693
|
-
onMediaMessageReceived: (mediaMessage) => {
|
|
5694
|
-
callback(CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED, null, mediaMessage);
|
|
5695
|
-
},
|
|
5696
|
-
onCustomMessageReceived: (customMessage) => {
|
|
5697
|
-
callback(CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED, null, customMessage);
|
|
5698
|
-
},
|
|
5699
|
-
onMessagesRead: (messageReceipt) => {
|
|
5700
|
-
if (!this.disableReceipt) {
|
|
5701
|
-
this.markAsRead(messageReceipt);
|
|
5702
|
-
}
|
|
5703
|
-
},
|
|
5704
|
-
onMessageDeleted: (deletedMessage) => {
|
|
5705
|
-
callback(CometChatUIKitConstants.messages.MESSAGE_DELETED, null, deletedMessage);
|
|
5706
|
-
},
|
|
5707
|
-
onMessageEdited: (editedMessage) => {
|
|
5708
|
-
callback(CometChatUIKitConstants.messages.MESSAGE_EDITED, null, editedMessage);
|
|
5709
|
-
},
|
|
5710
|
-
onMessagesDelivered: (messageReceipt) => {
|
|
5711
|
-
if (!this.disableReceipt) {
|
|
5712
|
-
this.updateDeliveredMessage(messageReceipt);
|
|
5713
|
-
}
|
|
5714
|
-
},
|
|
5715
|
-
onTypingStarted: (typingIndicator) => {
|
|
5716
|
-
if (!this.disableTyping) {
|
|
5717
|
-
this.typingIndicator = typingIndicator;
|
|
5718
|
-
this.ref.detectChanges();
|
|
5719
|
-
}
|
|
5720
|
-
},
|
|
5721
|
-
onTypingEnded: (typingIndicator) => {
|
|
5722
|
-
this.typingIndicator = null;
|
|
5723
|
-
this.ref.detectChanges();
|
|
5724
|
-
}
|
|
5725
|
-
}));
|
|
5726
5978
|
CometChat.addCallListener(this.callListenerId, new CometChat.CallListener({
|
|
5727
5979
|
onIncomingCallReceived: (call) => {
|
|
5728
5980
|
this.updateConversation(call);
|
|
@@ -5740,6 +5992,58 @@ class CometChatConversationsComponent {
|
|
|
5740
5992
|
this.updateConversation(call);
|
|
5741
5993
|
}
|
|
5742
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
|
+
});
|
|
5743
6047
|
}
|
|
5744
6048
|
catch (error) {
|
|
5745
6049
|
if (this.onError) {
|
|
@@ -5757,10 +6061,21 @@ class CometChatConversationsComponent {
|
|
|
5757
6061
|
*/
|
|
5758
6062
|
removeListeners() {
|
|
5759
6063
|
try {
|
|
5760
|
-
CometChat.removeMessageListener(this.conversationListenerId);
|
|
5761
6064
|
CometChat.removeUserListener(this.userListenerId);
|
|
5762
6065
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
5763
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();
|
|
5764
6079
|
}
|
|
5765
6080
|
catch (error) {
|
|
5766
6081
|
if (this.onError) {
|
|
@@ -6454,7 +6769,6 @@ class CometChatMessageInformationComponent {
|
|
|
6454
6769
|
});
|
|
6455
6770
|
this.isUserType = false;
|
|
6456
6771
|
this.deliveredReceipt = Receipts.delivered;
|
|
6457
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
6458
6772
|
this.readReceipt = Receipts.read;
|
|
6459
6773
|
this.listStyle = {};
|
|
6460
6774
|
this.messageText = localize("MESSAGE");
|
|
@@ -6571,24 +6885,23 @@ class CometChatMessageInformationComponent {
|
|
|
6571
6885
|
this.messageInformationStyle = { ...defaultStyle, ...this.messageInformationStyle };
|
|
6572
6886
|
}
|
|
6573
6887
|
ngOnDestroy() {
|
|
6574
|
-
|
|
6888
|
+
this.onMessagesDelivered.unsubscribe();
|
|
6889
|
+
this.onMessagesRead.unsubscribe();
|
|
6575
6890
|
}
|
|
6576
6891
|
addMessageEventListeners() {
|
|
6577
6892
|
try {
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
this.ref.detectChanges();
|
|
6583
|
-
}
|
|
6584
|
-
},
|
|
6585
|
-
onMessagesRead: (messageReceipt) => {
|
|
6586
|
-
if (this.message?.getId() == Number(messageReceipt.getMessageId())) {
|
|
6587
|
-
this.message?.setReadAt(messageReceipt.getReadAt());
|
|
6588
|
-
this.ref.detectChanges();
|
|
6589
|
-
}
|
|
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();
|
|
6590
6897
|
}
|
|
6591
|
-
})
|
|
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
|
+
});
|
|
6592
6905
|
}
|
|
6593
6906
|
catch (error) {
|
|
6594
6907
|
if (this.onError) {
|
|
@@ -6781,6 +7094,9 @@ class CometChatMessageListComponent {
|
|
|
6781
7094
|
this.imageModerationStyle = {};
|
|
6782
7095
|
this.timestampEnum = TimestampAlignment;
|
|
6783
7096
|
this.chatChanged = true;
|
|
7097
|
+
this.starterErrorStateText = localize("SOMETHING_WRONG");
|
|
7098
|
+
this.starterEmptyStateText = localize("NO_MESSAGES_FOUND");
|
|
7099
|
+
this.starterLoadingStateText = localize("GENERATING_ICEBREAKERS");
|
|
6784
7100
|
this.timeStampColor = "";
|
|
6785
7101
|
this.timeStampFont = "";
|
|
6786
7102
|
this.smartReplyStyle = {
|
|
@@ -6788,7 +7104,12 @@ class CometChatMessageListComponent {
|
|
|
6788
7104
|
height: "100%",
|
|
6789
7105
|
border: "none",
|
|
6790
7106
|
};
|
|
7107
|
+
this.conversationStarterStyle = {};
|
|
6791
7108
|
this.showSmartReply = false;
|
|
7109
|
+
this.enableConversationStarter = false;
|
|
7110
|
+
this.showConversationStarter = false;
|
|
7111
|
+
this.conversationStarterState = States.loading;
|
|
7112
|
+
this.conversationStarterReplies = [];
|
|
6792
7113
|
this.smartReplyMessage = null;
|
|
6793
7114
|
this.enableSmartReply = false;
|
|
6794
7115
|
this.timeStampBackground = "";
|
|
@@ -6841,7 +7162,6 @@ class CometChatMessageListComponent {
|
|
|
6841
7162
|
this.typesMap = {};
|
|
6842
7163
|
this.messageTypesMap = {};
|
|
6843
7164
|
this.theme = new CometChatTheme({});
|
|
6844
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
6845
7165
|
this.groupListenerId = "group_" + new Date().getTime();
|
|
6846
7166
|
this.callListenerId = "call_" + new Date().getTime();
|
|
6847
7167
|
this.states = States;
|
|
@@ -7174,14 +7494,29 @@ class CometChatMessageListComponent {
|
|
|
7174
7494
|
}
|
|
7175
7495
|
}
|
|
7176
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
|
+
}
|
|
7177
7507
|
this.state = States.loading;
|
|
7178
7508
|
// No Messages Found
|
|
7179
7509
|
if (messageList.length === 0 && this.messagesList.length === 0) {
|
|
7180
7510
|
this.state = States.empty;
|
|
7511
|
+
if (!this.parentMessageId && this.enableConversationStarter) {
|
|
7512
|
+
this.fetchConversationStarter();
|
|
7513
|
+
}
|
|
7181
7514
|
this.ref.detectChanges();
|
|
7182
7515
|
return;
|
|
7183
7516
|
}
|
|
7184
7517
|
if (messageList && messageList.length > 0) {
|
|
7518
|
+
this.showConversationStarter = false;
|
|
7519
|
+
this.conversationStarterReplies = [];
|
|
7185
7520
|
if (this.firstReload) {
|
|
7186
7521
|
this.lastMessageId = Number(messageList[messageList.length - 1].getId());
|
|
7187
7522
|
}
|
|
@@ -7286,6 +7621,16 @@ class CometChatMessageListComponent {
|
|
|
7286
7621
|
}
|
|
7287
7622
|
}
|
|
7288
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
|
+
}
|
|
7289
7634
|
this.state = States.loading;
|
|
7290
7635
|
// No Messages Found
|
|
7291
7636
|
if (messageList.length === 0 && this.messagesList.length === 0) {
|
|
@@ -7471,9 +7816,19 @@ class CometChatMessageListComponent {
|
|
|
7471
7816
|
this.messageCount = 0;
|
|
7472
7817
|
}
|
|
7473
7818
|
this.requestBuilder = null;
|
|
7474
|
-
CometChat.removeMessageListener(this.msgListenerId);
|
|
7475
7819
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
7476
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();
|
|
7477
7832
|
this.reInitializeMessageList();
|
|
7478
7833
|
};
|
|
7479
7834
|
/**
|
|
@@ -7510,6 +7865,19 @@ class CometChatMessageListComponent {
|
|
|
7510
7865
|
}
|
|
7511
7866
|
}
|
|
7512
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
|
+
};
|
|
7513
7881
|
/**
|
|
7514
7882
|
* Emits an Action Indicating that a message was deleted by the user/person you are chatting with
|
|
7515
7883
|
* @param {CometChat.BaseMessage} message
|
|
@@ -7681,6 +8049,13 @@ class CometChatMessageListComponent {
|
|
|
7681
8049
|
this.closeSmartReply();
|
|
7682
8050
|
}
|
|
7683
8051
|
};
|
|
8052
|
+
this.sendConversationStarter = (event) => {
|
|
8053
|
+
let reply = event?.detail?.reply;
|
|
8054
|
+
CometChatUIEvents.ccComposeMessage.next(reply);
|
|
8055
|
+
this.showConversationStarter = false;
|
|
8056
|
+
this.conversationStarterReplies = [];
|
|
8057
|
+
this.ref.detectChanges();
|
|
8058
|
+
};
|
|
7684
8059
|
/**
|
|
7685
8060
|
* styling part
|
|
7686
8061
|
*/
|
|
@@ -7701,6 +8076,12 @@ class CometChatMessageListComponent {
|
|
|
7701
8076
|
textColor: this.messageListStyle.errorStateTextColor,
|
|
7702
8077
|
};
|
|
7703
8078
|
};
|
|
8079
|
+
this.conversationStarterStateStyle = () => {
|
|
8080
|
+
return {
|
|
8081
|
+
textFont: fontHelper(this.theme.typography.title2),
|
|
8082
|
+
textColor: this.theme.palette.getAccent600(),
|
|
8083
|
+
};
|
|
8084
|
+
};
|
|
7704
8085
|
this.emptyStyle = () => {
|
|
7705
8086
|
return {
|
|
7706
8087
|
textFont: this.messageListStyle.emptyStateTextFont,
|
|
@@ -7712,6 +8093,11 @@ class CometChatMessageListComponent {
|
|
|
7712
8093
|
iconTint: this.messageListStyle.loadingIconTint,
|
|
7713
8094
|
};
|
|
7714
8095
|
};
|
|
8096
|
+
this.conversationStarterLoader = () => {
|
|
8097
|
+
return {
|
|
8098
|
+
iconTint: this.theme.palette.getAccent600(),
|
|
8099
|
+
};
|
|
8100
|
+
};
|
|
7715
8101
|
this.wrapperStyle = () => {
|
|
7716
8102
|
return {
|
|
7717
8103
|
height: this.messageListStyle.height,
|
|
@@ -7764,6 +8150,8 @@ class CometChatMessageListComponent {
|
|
|
7764
8150
|
ngOnChanges(changes) {
|
|
7765
8151
|
try {
|
|
7766
8152
|
if (changes[CometChatUIKitConstants.MessageReceiverType.user] || changes[CometChatUIKitConstants.MessageReceiverType.group]) {
|
|
8153
|
+
this.showConversationStarter = false;
|
|
8154
|
+
this.conversationStarterReplies = [];
|
|
7767
8155
|
this.state = States.loading;
|
|
7768
8156
|
this.messagesList = [];
|
|
7769
8157
|
this.ref.detectChanges();
|
|
@@ -7811,10 +8199,19 @@ class CometChatMessageListComponent {
|
|
|
7811
8199
|
}
|
|
7812
8200
|
}
|
|
7813
8201
|
//Removing Previous Conversation Listeners
|
|
7814
|
-
|
|
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();
|
|
7815
8213
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
7816
8214
|
CometChat.removeCallListener(this.callListenerId);
|
|
7817
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
7818
8215
|
this.groupListenerId = "group_" + new Date().getTime();
|
|
7819
8216
|
this.callListenerId = "call_" + new Date().getTime();
|
|
7820
8217
|
// Attach MessageListeners for the new conversation
|
|
@@ -7983,18 +8380,30 @@ class CometChatMessageListComponent {
|
|
|
7983
8380
|
}
|
|
7984
8381
|
}
|
|
7985
8382
|
ngOnDestroy() {
|
|
8383
|
+
this.showConversationStarter = false;
|
|
7986
8384
|
this.unsubscribeToEvents();
|
|
7987
8385
|
try {
|
|
7988
8386
|
//Removing Message Listeners
|
|
7989
|
-
CometChat.removeMessageListener(this.msgListenerId);
|
|
7990
8387
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
7991
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();
|
|
7992
8400
|
}
|
|
7993
8401
|
catch (error) {
|
|
7994
8402
|
if (this.onError) {
|
|
7995
8403
|
this.onError(CometChatException(error));
|
|
7996
8404
|
}
|
|
7997
8405
|
}
|
|
8406
|
+
this.ref.detectChanges();
|
|
7998
8407
|
}
|
|
7999
8408
|
reactionsStyle(message) {
|
|
8000
8409
|
let sentByMe = !message?.getSender() || message.getSender().getUid() == this.loggedInUser?.getUid();
|
|
@@ -8051,7 +8460,7 @@ class CometChatMessageListComponent {
|
|
|
8051
8460
|
CometChatUIEvents.ccOpenChat.next({ user: messageObject.getSender() });
|
|
8052
8461
|
}
|
|
8053
8462
|
getMessageById(id) {
|
|
8054
|
-
let messageKey = this.messagesList.findIndex((m) => m.getId()
|
|
8463
|
+
let messageKey = this.messagesList.findIndex((m) => m.getId() == id);
|
|
8055
8464
|
if (messageKey > -1) {
|
|
8056
8465
|
return this.messagesList[messageKey];
|
|
8057
8466
|
}
|
|
@@ -8186,6 +8595,12 @@ class CometChatMessageListComponent {
|
|
|
8186
8595
|
border: `1px solid ${this.themeService.theme.palette.getAccent100()}`
|
|
8187
8596
|
};
|
|
8188
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
|
+
}
|
|
8189
8604
|
else {
|
|
8190
8605
|
if (msg?.getSender() && msg?.getSender().getUid() != this.loggedInUser.getUid()) {
|
|
8191
8606
|
style = {
|
|
@@ -8274,6 +8689,154 @@ class CometChatMessageListComponent {
|
|
|
8274
8689
|
return null;
|
|
8275
8690
|
}
|
|
8276
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
|
+
}
|
|
8277
8840
|
getCallBubbleStyle(message) {
|
|
8278
8841
|
var isLeftAligned = this.alignment == MessageListAlignment.left;
|
|
8279
8842
|
var isUserSentMessage = !message?.getSender() || this.loggedInUser.getUid() === message?.getSender().getUid();
|
|
@@ -8367,7 +8930,9 @@ class CometChatMessageListComponent {
|
|
|
8367
8930
|
extension_whiteboard: this.whiteboardBubble,
|
|
8368
8931
|
extension_document: this.documentBubble,
|
|
8369
8932
|
extension_poll: this.pollBubble,
|
|
8370
|
-
meeting: this.directCalling
|
|
8933
|
+
meeting: this.directCalling,
|
|
8934
|
+
form: this.formBubble,
|
|
8935
|
+
card: this.cardBubble,
|
|
8371
8936
|
};
|
|
8372
8937
|
this.setBubbleView();
|
|
8373
8938
|
}
|
|
@@ -8416,6 +8981,9 @@ class CometChatMessageListComponent {
|
|
|
8416
8981
|
if (ChatConfigurator.names.includes('calling')) {
|
|
8417
8982
|
this.enableCalling = true;
|
|
8418
8983
|
}
|
|
8984
|
+
if (ChatConfigurator.names.includes('aiconversationstarter')) {
|
|
8985
|
+
this.enableConversationStarter = true;
|
|
8986
|
+
}
|
|
8419
8987
|
}
|
|
8420
8988
|
openImageInFullScreen(message) {
|
|
8421
8989
|
this.imageurlToOpen = message?.data?.attachments[0]?.url;
|
|
@@ -8580,6 +9148,15 @@ class CometChatMessageListComponent {
|
|
|
8580
9148
|
background: this.themeService.theme.palette.getBackground(),
|
|
8581
9149
|
...this.smartReplyStyle
|
|
8582
9150
|
};
|
|
9151
|
+
this.conversationStarterStyle = {
|
|
9152
|
+
replyTextFont: fontHelper(this.themeService.theme.typography.caption1),
|
|
9153
|
+
replyTextColor: this.themeService.theme.palette.getAccent(),
|
|
9154
|
+
replyBackground: this.themeService.theme.palette.getBackground(),
|
|
9155
|
+
boxShadow: `0px 0px 1px ${this.themeService.theme.palette.getAccent600()}`,
|
|
9156
|
+
closeIconTint: this.themeService.theme.palette.getAccent600(),
|
|
9157
|
+
background: this.themeService.theme.palette.getBackground(),
|
|
9158
|
+
...this.conversationStarterStyle
|
|
9159
|
+
};
|
|
8583
9160
|
this.fullScreenViewerStyle.closeIconTint = this.themeService.theme.palette.getPrimary();
|
|
8584
9161
|
let defaultStyle = new MessageListStyle({
|
|
8585
9162
|
background: this.themeService.theme.palette.getBackground(),
|
|
@@ -8772,41 +9349,6 @@ class CometChatMessageListComponent {
|
|
|
8772
9349
|
}
|
|
8773
9350
|
addMessageEventListeners() {
|
|
8774
9351
|
try {
|
|
8775
|
-
CometChat.addMessageListener(this.msgListenerId, new CometChat.MessageListener({
|
|
8776
|
-
onTextMessageReceived: (textMessage) => {
|
|
8777
|
-
this.messageUpdate(CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED, textMessage);
|
|
8778
|
-
},
|
|
8779
|
-
onCustomMessageReceived: (customMessage) => {
|
|
8780
|
-
this.messageUpdate(CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED, customMessage);
|
|
8781
|
-
},
|
|
8782
|
-
onMediaMessageReceived: (mediaMessage) => {
|
|
8783
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED, mediaMessage);
|
|
8784
|
-
},
|
|
8785
|
-
onMessagesDelivered: (messageReceipt) => {
|
|
8786
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_DELIVERED, messageReceipt);
|
|
8787
|
-
},
|
|
8788
|
-
onMessagesRead: (messageReceipt) => {
|
|
8789
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_READ, messageReceipt);
|
|
8790
|
-
},
|
|
8791
|
-
onMessageDeleted: (deletedMessage) => {
|
|
8792
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_DELETED, deletedMessage);
|
|
8793
|
-
},
|
|
8794
|
-
onMessageEdited: (editedMessage) => {
|
|
8795
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_EDITED, editedMessage);
|
|
8796
|
-
},
|
|
8797
|
-
onTransientMessageReceived: (transientMessage) => {
|
|
8798
|
-
let liveReaction = transientMessage.getData();
|
|
8799
|
-
console.log(liveReaction);
|
|
8800
|
-
if (transientMessage.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.user && this.user && transientMessage?.getSender().getUid() == this.user.getUid() && transientMessage.getReceiverId() == this.loggedInUser?.getUid()) {
|
|
8801
|
-
CometChatMessageEvents.ccLiveReaction.next(liveReaction["reaction"]);
|
|
8802
|
-
return;
|
|
8803
|
-
}
|
|
8804
|
-
else if (transientMessage.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.group && this.group && transientMessage.getReceiverId() == this.group.getGuid() && transientMessage?.getSender().getUid() != this.loggedInUser?.getUid()) {
|
|
8805
|
-
CometChatMessageEvents.ccLiveReaction.next(liveReaction["reaction"]);
|
|
8806
|
-
return;
|
|
8807
|
-
}
|
|
8808
|
-
},
|
|
8809
|
-
}));
|
|
8810
9352
|
CometChat.addGroupListener(this.groupListenerId, new CometChat.GroupListener({
|
|
8811
9353
|
onGroupMemberScopeChanged: (message, changedUser, newScope, oldScope, changedGroup) => {
|
|
8812
9354
|
this.messageUpdate(CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE, message, changedGroup, { user: changedUser, scope: newScope });
|
|
@@ -8861,6 +9403,50 @@ class CometChatMessageListComponent {
|
|
|
8861
9403
|
}
|
|
8862
9404
|
}));
|
|
8863
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
|
+
});
|
|
8864
9450
|
}
|
|
8865
9451
|
catch (error) {
|
|
8866
9452
|
if (this.onError) {
|
|
@@ -8881,6 +9467,9 @@ class CometChatMessageListComponent {
|
|
|
8881
9467
|
*/
|
|
8882
9468
|
messageUpdate(key = null, message = null, group = null, options = null) {
|
|
8883
9469
|
try {
|
|
9470
|
+
this.showConversationStarter = false;
|
|
9471
|
+
this.conversationStarterReplies = [];
|
|
9472
|
+
this.ref.detectChanges();
|
|
8884
9473
|
switch (key) {
|
|
8885
9474
|
case CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED:
|
|
8886
9475
|
case CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED:
|
|
@@ -8906,8 +9495,12 @@ class CometChatMessageListComponent {
|
|
|
8906
9495
|
break;
|
|
8907
9496
|
}
|
|
8908
9497
|
case CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED:
|
|
9498
|
+
case CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED:
|
|
8909
9499
|
this.customMessageReceived(message);
|
|
8910
9500
|
break;
|
|
9501
|
+
case CometChatUIKitConstants.messages.INTERACTION_GOAL_COMPLETED:
|
|
9502
|
+
this.updateInteractiveMessage(message);
|
|
9503
|
+
break;
|
|
8911
9504
|
default:
|
|
8912
9505
|
return;
|
|
8913
9506
|
}
|
|
@@ -8990,7 +9583,6 @@ class CometChatMessageListComponent {
|
|
|
8990
9583
|
}
|
|
8991
9584
|
reInitializeMessageList() {
|
|
8992
9585
|
this.reinitialized = true;
|
|
8993
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
8994
9586
|
this.groupListenerId = "group_" + new Date().getTime();
|
|
8995
9587
|
this.callListenerId = "call_" + new Date().getTime();
|
|
8996
9588
|
this.addMessageEventListeners();
|
|
@@ -9321,6 +9913,9 @@ class CometChatMessageListComponent {
|
|
|
9321
9913
|
break;
|
|
9322
9914
|
}
|
|
9323
9915
|
case MessageStatus.success: {
|
|
9916
|
+
this.showConversationStarter = false;
|
|
9917
|
+
this.conversationStarterReplies = [];
|
|
9918
|
+
this.ref.detectChanges();
|
|
9324
9919
|
if (message.getParentMessageId() || this.parentMessageId) {
|
|
9325
9920
|
this.updateReplyCount(message);
|
|
9326
9921
|
}
|
|
@@ -9355,6 +9950,40 @@ class CometChatMessageListComponent {
|
|
|
9355
9950
|
this.addMessage(call);
|
|
9356
9951
|
});
|
|
9357
9952
|
}
|
|
9953
|
+
fetchConversationStarter() {
|
|
9954
|
+
this.showConversationStarter = true;
|
|
9955
|
+
this.conversationStarterState = States.loading;
|
|
9956
|
+
let receiverType = this.user ? CometChatUIKitConstants.MessageReceiverType.user : CometChatUIKitConstants.MessageReceiverType.group;
|
|
9957
|
+
let receiverId = this.user ? this.user.getUid() : this.group.getGuid();
|
|
9958
|
+
CometChat.getConversationStarter(receiverId, receiverType).then((response) => {
|
|
9959
|
+
if (response) {
|
|
9960
|
+
Object.keys(response).forEach((reply) => {
|
|
9961
|
+
if (response[reply] && response[reply] != "") {
|
|
9962
|
+
this.conversationStarterReplies.push(response[reply]);
|
|
9963
|
+
}
|
|
9964
|
+
});
|
|
9965
|
+
if (this.conversationStarterReplies && this.conversationStarterReplies.length > 0 && this.messagesList?.length <= 0) {
|
|
9966
|
+
this.conversationStarterState = States.loaded;
|
|
9967
|
+
this.ref.detectChanges();
|
|
9968
|
+
}
|
|
9969
|
+
else {
|
|
9970
|
+
this.conversationStarterState = States.empty;
|
|
9971
|
+
this.ref.detectChanges();
|
|
9972
|
+
}
|
|
9973
|
+
}
|
|
9974
|
+
else {
|
|
9975
|
+
this.conversationStarterState = States.empty;
|
|
9976
|
+
this.ref.detectChanges();
|
|
9977
|
+
}
|
|
9978
|
+
})
|
|
9979
|
+
.catch((err) => {
|
|
9980
|
+
if (this.onError) {
|
|
9981
|
+
this.onError(err);
|
|
9982
|
+
}
|
|
9983
|
+
this.conversationStarterState = States.error;
|
|
9984
|
+
this.ref.detectChanges();
|
|
9985
|
+
});
|
|
9986
|
+
}
|
|
9358
9987
|
getReplies() {
|
|
9359
9988
|
let smartReply = this.smartReplyMessage;
|
|
9360
9989
|
var smartReplyObject = smartReply?.metadata?.[SmartRepliesConstants.injected]?.extensions?.[SmartRepliesConstants.smart_reply];
|
|
@@ -9379,10 +10008,10 @@ class CometChatMessageListComponent {
|
|
|
9379
10008
|
}
|
|
9380
10009
|
}
|
|
9381
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 });
|
|
9382
|
-
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 ? '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 ? '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 ? '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=\"showSmartReply && getReplies()\">\n <smart-replies [smartReplyStyle]=\"smartReplyStyle\" [replies]=\"getReplies()\" (cc-reply-clicked)=\"sendReply($event)\" (cc-close-clicked)=\"closeSmartReply()\">\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{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::-webkit-scrollbar{background:transparent;width:8px}.cc-message-list::-webkit-scrollbar-thumb{background:#e8e5e5;border-radius: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 });
|
|
9383
10012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageListComponent, decorators: [{
|
|
9384
10013
|
type: Component,
|
|
9385
|
-
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 ? '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 ? '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 ? '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=\"showSmartReply && getReplies()\">\n <smart-replies [smartReplyStyle]=\"smartReplyStyle\" [replies]=\"getReplies()\" (cc-reply-clicked)=\"sendReply($event)\" (cc-close-clicked)=\"closeSmartReply()\">\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{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::-webkit-scrollbar{background:transparent;width:8px}.cc-message-list::-webkit-scrollbar-thumb{background:#e8e5e5;border-radius: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"] }]
|
|
9386
10015
|
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { listScroll: [{
|
|
9387
10016
|
type: ViewChild,
|
|
9388
10017
|
args: ["listScroll", { static: false }]
|
|
@@ -9410,6 +10039,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
9410
10039
|
}], imageBubble: [{
|
|
9411
10040
|
type: ViewChild,
|
|
9412
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 }]
|
|
9413
10048
|
}], stickerBubble: [{
|
|
9414
10049
|
type: ViewChild,
|
|
9415
10050
|
args: ["stickerBubble", { static: false }]
|
|
@@ -9504,6 +10139,117 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
9504
10139
|
type: Input
|
|
9505
10140
|
}] } });
|
|
9506
10141
|
|
|
10142
|
+
class CometChatCardViewComponent {
|
|
10143
|
+
constructor(themeService, ref) {
|
|
10144
|
+
this.themeService = themeService;
|
|
10145
|
+
this.ref = ref;
|
|
10146
|
+
this.buttons = [];
|
|
10147
|
+
this.closeCallback = null;
|
|
10148
|
+
this.replies = [];
|
|
10149
|
+
this.state = States.loading;
|
|
10150
|
+
this.states = States;
|
|
10151
|
+
this.errorStateText = localize("SOMETHING_WRONG");
|
|
10152
|
+
this.emptyStateText = localize("NO_MESSAGES_FOUND");
|
|
10153
|
+
this.loadingStateText = localize("GENERATING_REPLIES");
|
|
10154
|
+
this.theme = new CometChatTheme({});
|
|
10155
|
+
this.localize = localize;
|
|
10156
|
+
this.handleGoBack = () => {
|
|
10157
|
+
this.currentSection = undefined;
|
|
10158
|
+
this.activeButtonText = "";
|
|
10159
|
+
this.state = States.loading;
|
|
10160
|
+
this.replies = [];
|
|
10161
|
+
this.ref.detectChanges();
|
|
10162
|
+
};
|
|
10163
|
+
this.stateLoader = () => {
|
|
10164
|
+
return {
|
|
10165
|
+
iconTint: this.theme.palette.getAccent600(),
|
|
10166
|
+
};
|
|
10167
|
+
};
|
|
10168
|
+
this.repliesStateStyle = () => {
|
|
10169
|
+
return {
|
|
10170
|
+
textFont: fontHelper(this.theme.typography.title2),
|
|
10171
|
+
textColor: this.theme.palette.getAccent600(),
|
|
10172
|
+
};
|
|
10173
|
+
};
|
|
10174
|
+
this.theme = themeService.theme;
|
|
10175
|
+
}
|
|
10176
|
+
fetchButtonContent(button) {
|
|
10177
|
+
this.activeButtonText = button.title;
|
|
10178
|
+
this.currentSection = button;
|
|
10179
|
+
this.state = States.loading;
|
|
10180
|
+
this.ref.detectChanges();
|
|
10181
|
+
button.onClick().then((response) => {
|
|
10182
|
+
if (response && response?.length > 0) {
|
|
10183
|
+
this.replies = response;
|
|
10184
|
+
this.state = States.loaded;
|
|
10185
|
+
this.ref.detectChanges();
|
|
10186
|
+
}
|
|
10187
|
+
else {
|
|
10188
|
+
this.state = States.empty;
|
|
10189
|
+
this.ref.detectChanges();
|
|
10190
|
+
}
|
|
10191
|
+
})
|
|
10192
|
+
.catch((err) => {
|
|
10193
|
+
console.log(err);
|
|
10194
|
+
this.state = States.error;
|
|
10195
|
+
this.ref.detectChanges();
|
|
10196
|
+
});
|
|
10197
|
+
}
|
|
10198
|
+
ngOnInit() {
|
|
10199
|
+
if (this.closeCallback) {
|
|
10200
|
+
this.closeCallback(this.handleGoBack);
|
|
10201
|
+
}
|
|
10202
|
+
}
|
|
10203
|
+
buttonStyles() {
|
|
10204
|
+
return {
|
|
10205
|
+
height: "35px",
|
|
10206
|
+
width: "100%",
|
|
10207
|
+
padding: "0 8px",
|
|
10208
|
+
background: this.theme.palette.getAccent100(),
|
|
10209
|
+
border: "none",
|
|
10210
|
+
borderRadius: "8px",
|
|
10211
|
+
buttonTextColor: this.theme.palette.getAccent600(),
|
|
10212
|
+
buttonTextFont: fontHelper(this.theme.typography.text2),
|
|
10213
|
+
margin: "8px 0"
|
|
10214
|
+
};
|
|
10215
|
+
}
|
|
10216
|
+
repliesViewStyle() {
|
|
10217
|
+
return {
|
|
10218
|
+
width: "100%",
|
|
10219
|
+
padding: "8px",
|
|
10220
|
+
background: this.theme.palette.getAccent100(),
|
|
10221
|
+
border: "none",
|
|
10222
|
+
borderRadius: "8px",
|
|
10223
|
+
buttonTextColor: this.theme.palette.getAccent600(),
|
|
10224
|
+
buttonTextFont: fontHelper(this.theme.typography.text3),
|
|
10225
|
+
margin: "8px 0",
|
|
10226
|
+
};
|
|
10227
|
+
}
|
|
10228
|
+
backButtonStyle() {
|
|
10229
|
+
return {
|
|
10230
|
+
height: "24px",
|
|
10231
|
+
width: "24px",
|
|
10232
|
+
background: "transparent",
|
|
10233
|
+
border: "none",
|
|
10234
|
+
buttonIconTint: this.theme.palette.getPrimary(),
|
|
10235
|
+
position: "absolute",
|
|
10236
|
+
top: "8px",
|
|
10237
|
+
left: "8px",
|
|
10238
|
+
zIndex: 2
|
|
10239
|
+
};
|
|
10240
|
+
}
|
|
10241
|
+
}
|
|
10242
|
+
CometChatCardViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCardViewComponent, deps: [{ token: CometChatThemeService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10243
|
+
CometChatCardViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatCardViewComponent, selector: "cometchat-card-view", inputs: { buttons: "buttons", closeCallback: "closeCallback" }, ngImport: i0, template: "<div class=\"buttons-container cc__scroll-view\" *ngIf=\"buttons && buttons.length > 0\">\n <cometchat-label\n [text]=\"activeButtonText ? activeButtonText : localize('AI')\"\n ></cometchat-label>\n \n <div class=\"cc__content-view-container\">\n <div *ngIf=\"!currentSection\" class=\"cc__content-view\">\n <cometchat-button *ngFor=\"let button of buttons\" (click)=\"fetchButtonContent(button)\" [text]=\"button.title\" [buttonStyle]=\"buttonStyles()\">\n </cometchat-button>\n </div>\n \n <div *ngIf=\"currentSection\">\n <div style=\"height: 100%; margin-top: 12px; overflow: hidden auto;\">\n <cometchat-button (click)=\"handleGoBack()\" iconURL=\"assets/backbutton.svg\" [buttonStyle]=\"backButtonStyle()\">\n \n </cometchat-button>\n \n <div *ngIf=\"state == states.loaded; else stateView\">\n <cometchat-button *ngFor=\"let reply of replies\" [text]=\"reply\" [buttonStyle]=\"repliesViewStyle()\">\n </cometchat-button>\n </div>\n \n <ng-template #stateView>\n <div class=\"cc-cardview___decorator-message\" *ngIf=\"state == states.loading || state == states.error || state == states.empty\">\n <div class=\"cc-cardview__view-decorator\" *ngIf=\"state == states.loading\">\n <cometchat-loader iconURL=\"assets/Spinner.svg\" [loaderStyle]=\"stateLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"repliesStateStyle()\" [text]=\"loadingStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-cardview__view-decorator\" *ngIf=\"state == states.error \">\n <cometchat-loader iconURL=\"assets/ai-error.svg\" [loaderStyle]=\"stateLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"repliesStateStyle()\" [text]=\"errorStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-cardview__view-decorator\" *ngIf=\"state == states.empty\">\n <cometchat-loader iconURL=\"assets/ai-empty.svg\" [loaderStyle]=\"stateLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"repliesStateStyle()\" [text]=\"emptyStateText\"\n >\n </cometchat-label>\n \n </div>\n </div>\n </ng-template>\n </div>\n </div>\n </div>\n \n </div>", styles: [".buttons-container{background-color:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;width:100%;overflow:hidden;padding:8px}.cc__content-view{height:100%;width:100%;overflow:hidden auto}.cc__content-view-container{height:100%;width:100%;margin-top:8px;overflow:hidden}.cc__content-view::-webkit-scrollbar{background:transparent;width:8px}.cc__content-view::-webkit-scrollbar-thumb{background:#e8e5e5;border-radius:8px}.cc-cardview___decorator-message{margin:0;line-height:30px;word-wrap:break-word;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;height:100%;position:absolute;bottom:0}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCardViewComponent, decorators: [{
|
|
10245
|
+
type: Component,
|
|
10246
|
+
args: [{ selector: 'cometchat-card-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"buttons-container cc__scroll-view\" *ngIf=\"buttons && buttons.length > 0\">\n <cometchat-label\n [text]=\"activeButtonText ? activeButtonText : localize('AI')\"\n ></cometchat-label>\n \n <div class=\"cc__content-view-container\">\n <div *ngIf=\"!currentSection\" class=\"cc__content-view\">\n <cometchat-button *ngFor=\"let button of buttons\" (click)=\"fetchButtonContent(button)\" [text]=\"button.title\" [buttonStyle]=\"buttonStyles()\">\n </cometchat-button>\n </div>\n \n <div *ngIf=\"currentSection\">\n <div style=\"height: 100%; margin-top: 12px; overflow: hidden auto;\">\n <cometchat-button (click)=\"handleGoBack()\" iconURL=\"assets/backbutton.svg\" [buttonStyle]=\"backButtonStyle()\">\n \n </cometchat-button>\n \n <div *ngIf=\"state == states.loaded; else stateView\">\n <cometchat-button *ngFor=\"let reply of replies\" [text]=\"reply\" [buttonStyle]=\"repliesViewStyle()\">\n </cometchat-button>\n </div>\n \n <ng-template #stateView>\n <div class=\"cc-cardview___decorator-message\" *ngIf=\"state == states.loading || state == states.error || state == states.empty\">\n <div class=\"cc-cardview__view-decorator\" *ngIf=\"state == states.loading\">\n <cometchat-loader iconURL=\"assets/Spinner.svg\" [loaderStyle]=\"stateLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"repliesStateStyle()\" [text]=\"loadingStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-cardview__view-decorator\" *ngIf=\"state == states.error \">\n <cometchat-loader iconURL=\"assets/ai-error.svg\" [loaderStyle]=\"stateLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"repliesStateStyle()\" [text]=\"errorStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-cardview__view-decorator\" *ngIf=\"state == states.empty\">\n <cometchat-loader iconURL=\"assets/ai-empty.svg\" [loaderStyle]=\"stateLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"repliesStateStyle()\" [text]=\"emptyStateText\"\n >\n </cometchat-label>\n \n </div>\n </div>\n </ng-template>\n </div>\n </div>\n </div>\n \n </div>", styles: [".buttons-container{background-color:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;width:100%;overflow:hidden;padding:8px}.cc__content-view{height:100%;width:100%;overflow:hidden auto}.cc__content-view-container{height:100%;width:100%;margin-top:8px;overflow:hidden}.cc__content-view::-webkit-scrollbar{background:transparent;width:8px}.cc__content-view::-webkit-scrollbar-thumb{background:#e8e5e5;border-radius:8px}.cc-cardview___decorator-message{margin:0;line-height:30px;word-wrap:break-word;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;height:100%;position:absolute;bottom:0}\n"] }]
|
|
10247
|
+
}], ctorParameters: function () { return [{ type: CometChatThemeService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { buttons: [{
|
|
10248
|
+
type: Input
|
|
10249
|
+
}], closeCallback: [{
|
|
10250
|
+
type: Input
|
|
10251
|
+
}] } });
|
|
10252
|
+
|
|
9507
10253
|
/**
|
|
9508
10254
|
*
|
|
9509
10255
|
* CometChatMessageComposer is used to send message to user or group.
|
|
@@ -9542,6 +10288,12 @@ class CometChatMessageComposerComponent {
|
|
|
9542
10288
|
background: "rgba(0, 0, 0, 0.5)",
|
|
9543
10289
|
position: "fixed"
|
|
9544
10290
|
};
|
|
10291
|
+
this.actionSheetStyle = {
|
|
10292
|
+
borderRadius: "inherit",
|
|
10293
|
+
border: "none",
|
|
10294
|
+
width: "100%",
|
|
10295
|
+
height: "100%",
|
|
10296
|
+
};
|
|
9545
10297
|
this.hideVoiceRecording = false;
|
|
9546
10298
|
this.mediaRecorderStyle = {};
|
|
9547
10299
|
this.voiceRecordingIconURL = "assets/mic.svg";
|
|
@@ -9553,7 +10305,9 @@ class CometChatMessageComposerComponent {
|
|
|
9553
10305
|
this.showCreatePolls = false;
|
|
9554
10306
|
this.showStickerKeyboard = false;
|
|
9555
10307
|
this.showActionSheetItem = false;
|
|
10308
|
+
this.showAiFeatures = false;
|
|
9556
10309
|
this.showPreview = false;
|
|
10310
|
+
this.aiFeaturesCloseCallback = null;
|
|
9557
10311
|
this.acceptHandlers = {
|
|
9558
10312
|
"image/*": this.onImageChange.bind(this),
|
|
9559
10313
|
"video/*": this.onVideoChange.bind(this),
|
|
@@ -9564,6 +10318,7 @@ class CometChatMessageComposerComponent {
|
|
|
9564
10318
|
this.toggleMediaRecorded = false;
|
|
9565
10319
|
this.stickerConfiguration = {};
|
|
9566
10320
|
this.closeButtonIconURL = "assets/plus-rotated.svg";
|
|
10321
|
+
this.buttons = [];
|
|
9567
10322
|
this.sendButtonStyle = {
|
|
9568
10323
|
height: "24px",
|
|
9569
10324
|
width: "24px",
|
|
@@ -9640,6 +10395,14 @@ class CometChatMessageComposerComponent {
|
|
|
9640
10395
|
borderRadius: "8px",
|
|
9641
10396
|
boxShadow: "0px 0px 8px rgba(20, 20, 20, 0.2)",
|
|
9642
10397
|
};
|
|
10398
|
+
this.aiPopover = {
|
|
10399
|
+
width: "280px",
|
|
10400
|
+
height: "220px",
|
|
10401
|
+
border: "none",
|
|
10402
|
+
background: "transparent",
|
|
10403
|
+
borderRadius: "8px",
|
|
10404
|
+
boxShadow: "0px 0px 8px rgba(20, 20, 20, 0.2)",
|
|
10405
|
+
};
|
|
9643
10406
|
this.mediaRecordedPopover = {
|
|
9644
10407
|
width: "250px",
|
|
9645
10408
|
height: "100px",
|
|
@@ -9657,18 +10420,6 @@ class CometChatMessageComposerComponent {
|
|
|
9657
10420
|
this.sendButtonIconURL = "assets/Send.svg";
|
|
9658
10421
|
this.emojiButtonIconURL = "assets/Stipop.svg";
|
|
9659
10422
|
this.stickerButtonIconURL = "assets/Stickers.svg";
|
|
9660
|
-
this.actionsheetStyle = {
|
|
9661
|
-
layoutModeIconTint: "rgba(20, 20, 20, 0.04)",
|
|
9662
|
-
borderRadius: "inherit",
|
|
9663
|
-
background: "rgb(255,255,255)",
|
|
9664
|
-
border: "none",
|
|
9665
|
-
width: "100%",
|
|
9666
|
-
height: "100%",
|
|
9667
|
-
titleFont: "500 15px Inter, sans-serif",
|
|
9668
|
-
titleColor: "#141414",
|
|
9669
|
-
listItemBackground: "",
|
|
9670
|
-
ActionSheetSeparatorTint: "1px solid RGBA(20, 20, 20, 0.08)"
|
|
9671
|
-
};
|
|
9672
10423
|
this.messageText = "";
|
|
9673
10424
|
this.attachmentButtonStyle = {
|
|
9674
10425
|
height: "24px",
|
|
@@ -9682,6 +10433,8 @@ class CometChatMessageComposerComponent {
|
|
|
9682
10433
|
this.messageSending = false;
|
|
9683
10434
|
this.showSendButton = false;
|
|
9684
10435
|
this.showEmojiKeyboard = false;
|
|
10436
|
+
this.isAiEnabled = false;
|
|
10437
|
+
this.smartReplies = [];
|
|
9685
10438
|
this.sendMessageOnEnter = (event) => {
|
|
9686
10439
|
this.showSendButton = false;
|
|
9687
10440
|
this.sendTextMessage(event.detail.value);
|
|
@@ -9817,6 +10570,43 @@ class CometChatMessageComposerComponent {
|
|
|
9817
10570
|
this.showStickerKeyboard = !this.showStickerKeyboard;
|
|
9818
10571
|
this.ref.detectChanges();
|
|
9819
10572
|
}
|
|
10573
|
+
if (this.showAiFeatures) {
|
|
10574
|
+
this.aiButtonRef.nativeElement.click();
|
|
10575
|
+
this.showAiFeatures = !this.showAiFeatures;
|
|
10576
|
+
this.ref.detectChanges();
|
|
10577
|
+
}
|
|
10578
|
+
else {
|
|
10579
|
+
return;
|
|
10580
|
+
}
|
|
10581
|
+
};
|
|
10582
|
+
this.handleAiFeaturesClose = (callback) => {
|
|
10583
|
+
this.aiFeaturesCloseCallback = callback;
|
|
10584
|
+
};
|
|
10585
|
+
this.openAiFeatures = (event) => {
|
|
10586
|
+
if (this.aiFeaturesCloseCallback) {
|
|
10587
|
+
this.aiFeaturesCloseCallback();
|
|
10588
|
+
}
|
|
10589
|
+
if (event?.detail?.hasOwnProperty("isOpen")) {
|
|
10590
|
+
this.showAiFeatures = false;
|
|
10591
|
+
this.ref.detectChanges();
|
|
10592
|
+
return;
|
|
10593
|
+
}
|
|
10594
|
+
this.showAiFeatures = !this.showAiFeatures;
|
|
10595
|
+
this.closeMediaRecorder();
|
|
10596
|
+
if (this.showEmojiKeyboard) {
|
|
10597
|
+
this.emojiButtonRef.nativeElement.click();
|
|
10598
|
+
this.showEmojiKeyboard = !this.showEmojiKeyboard;
|
|
10599
|
+
}
|
|
10600
|
+
if (this.showStickerKeyboard) {
|
|
10601
|
+
this.stickerButtonRef.nativeElement.click();
|
|
10602
|
+
this.showStickerKeyboard = !this.showStickerKeyboard;
|
|
10603
|
+
this.ref.detectChanges();
|
|
10604
|
+
}
|
|
10605
|
+
if (this.showActionSheetItem) {
|
|
10606
|
+
this.actionSheetRef.nativeElement.click();
|
|
10607
|
+
this.showActionSheetItem = !this.showActionSheetItem;
|
|
10608
|
+
this.ref.detectChanges();
|
|
10609
|
+
}
|
|
9820
10610
|
else {
|
|
9821
10611
|
return;
|
|
9822
10612
|
}
|
|
@@ -9839,6 +10629,11 @@ class CometChatMessageComposerComponent {
|
|
|
9839
10629
|
this.showStickerKeyboard = !this.showStickerKeyboard;
|
|
9840
10630
|
this.ref.detectChanges();
|
|
9841
10631
|
}
|
|
10632
|
+
if (this.showAiFeatures) {
|
|
10633
|
+
this.aiButtonRef.nativeElement.click();
|
|
10634
|
+
this.showAiFeatures = !this.showAiFeatures;
|
|
10635
|
+
this.ref.detectChanges();
|
|
10636
|
+
}
|
|
9842
10637
|
else {
|
|
9843
10638
|
return;
|
|
9844
10639
|
}
|
|
@@ -9866,6 +10661,11 @@ class CometChatMessageComposerComponent {
|
|
|
9866
10661
|
this.showStickerKeyboard = !this.showStickerKeyboard;
|
|
9867
10662
|
this.ref.detectChanges();
|
|
9868
10663
|
}
|
|
10664
|
+
if (this.showAiFeatures) {
|
|
10665
|
+
this.aiButtonRef.nativeElement.click();
|
|
10666
|
+
this.showAiFeatures = !this.showAiFeatures;
|
|
10667
|
+
this.ref.detectChanges();
|
|
10668
|
+
}
|
|
9869
10669
|
else {
|
|
9870
10670
|
return;
|
|
9871
10671
|
}
|
|
@@ -9893,6 +10693,24 @@ class CometChatMessageComposerComponent {
|
|
|
9893
10693
|
return;
|
|
9894
10694
|
}
|
|
9895
10695
|
};
|
|
10696
|
+
this.getSmartReplies = () => {
|
|
10697
|
+
return new Promise((resolve, reject) => {
|
|
10698
|
+
let receiverId = this.user ? this.user?.getUid() : this.group?.getGuid();
|
|
10699
|
+
let receiverType = this.user ? CometChatUIKitConstants.MessageReceiverType.user : CometChatUIKitConstants.MessageReceiverType.group;
|
|
10700
|
+
CometChat.getSmartReplies(receiverId, receiverType).then((response) => {
|
|
10701
|
+
let repliesArray = [];
|
|
10702
|
+
Object.keys(response).forEach((reply) => {
|
|
10703
|
+
if (response[reply] && response[reply] != "") {
|
|
10704
|
+
repliesArray.push(response[reply]);
|
|
10705
|
+
}
|
|
10706
|
+
});
|
|
10707
|
+
resolve(repliesArray);
|
|
10708
|
+
})
|
|
10709
|
+
.catch((err) => {
|
|
10710
|
+
return reject(err);
|
|
10711
|
+
});
|
|
10712
|
+
});
|
|
10713
|
+
};
|
|
9896
10714
|
}
|
|
9897
10715
|
sendReaction() {
|
|
9898
10716
|
let receiverId = this.user ? this.user?.getUid() : this.group?.getGuid();
|
|
@@ -9951,6 +10769,10 @@ class CometChatMessageComposerComponent {
|
|
|
9951
10769
|
this.openEditPreview();
|
|
9952
10770
|
}
|
|
9953
10771
|
});
|
|
10772
|
+
this.ccComposeMessage = CometChatUIEvents.ccComposeMessage.subscribe((text) => {
|
|
10773
|
+
this.text = text;
|
|
10774
|
+
this.ref.detectChanges();
|
|
10775
|
+
});
|
|
9954
10776
|
}
|
|
9955
10777
|
openEditPreview() {
|
|
9956
10778
|
this.showPreview = true;
|
|
@@ -9960,8 +10782,35 @@ class CometChatMessageComposerComponent {
|
|
|
9960
10782
|
unsubscribeToEvents() {
|
|
9961
10783
|
this.ccMessageEdit?.unsubscribe();
|
|
9962
10784
|
}
|
|
10785
|
+
closeModals() {
|
|
10786
|
+
if (this.showActionSheetItem) {
|
|
10787
|
+
this.actionSheetRef?.nativeElement?.click();
|
|
10788
|
+
this.showActionSheetItem = false;
|
|
10789
|
+
}
|
|
10790
|
+
if (this.showEmojiKeyboard) {
|
|
10791
|
+
this.emojiButtonRef?.nativeElement?.click();
|
|
10792
|
+
this.showEmojiKeyboard = false;
|
|
10793
|
+
}
|
|
10794
|
+
if (this.showStickerKeyboard) {
|
|
10795
|
+
this.stickerButtonRef?.nativeElement?.click();
|
|
10796
|
+
this.showStickerKeyboard = false;
|
|
10797
|
+
}
|
|
10798
|
+
if (this.toggleMediaRecorded) {
|
|
10799
|
+
this.mediaRecordedRef?.nativeElement?.click();
|
|
10800
|
+
this.toggleMediaRecorded = false;
|
|
10801
|
+
}
|
|
10802
|
+
if (this.showAiFeatures) {
|
|
10803
|
+
this.aiButtonRef?.nativeElement?.click();
|
|
10804
|
+
this.showAiFeatures = false;
|
|
10805
|
+
}
|
|
10806
|
+
}
|
|
9963
10807
|
ngOnChanges(changes) {
|
|
9964
10808
|
if (changes["user"] || changes["group"]) {
|
|
10809
|
+
this.closeModals();
|
|
10810
|
+
this.messageText = "";
|
|
10811
|
+
this.inputRef?.nativeElement?.emptyInputField();
|
|
10812
|
+
this.showSendButton = false;
|
|
10813
|
+
this.text = "";
|
|
9965
10814
|
this.composerId = this.getComposerId();
|
|
9966
10815
|
if (this.attachmentOptions) {
|
|
9967
10816
|
this.composerActions = this.attachmentOptions(this.user || this.group, this.composerId);
|
|
@@ -10348,6 +11197,20 @@ class CometChatMessageComposerComponent {
|
|
|
10348
11197
|
else {
|
|
10349
11198
|
this.enableStickerKeyboard = false;
|
|
10350
11199
|
}
|
|
11200
|
+
this.enableAiFeatures();
|
|
11201
|
+
}
|
|
11202
|
+
enableAiFeatures() {
|
|
11203
|
+
if (ChatConfigurator.names.includes('aienabler') && !this.parentMessageId) {
|
|
11204
|
+
this.isAiEnabled = true;
|
|
11205
|
+
if (ChatConfigurator.names.includes('aismartreply')) {
|
|
11206
|
+
this.buttons.push({
|
|
11207
|
+
title: localize("SUGGEST_A_REPLY"),
|
|
11208
|
+
id: "aismartreply",
|
|
11209
|
+
onClick: this.getSmartReplies
|
|
11210
|
+
});
|
|
11211
|
+
this.ref.detectChanges();
|
|
11212
|
+
}
|
|
11213
|
+
}
|
|
10351
11214
|
}
|
|
10352
11215
|
composerWrapperStyle() {
|
|
10353
11216
|
return {
|
|
@@ -10358,17 +11221,19 @@ class CometChatMessageComposerComponent {
|
|
|
10358
11221
|
this.emojiPopover.boxShadow = `0px 0px 32px ${this.themeService.theme.palette.getAccent50()}`;
|
|
10359
11222
|
this.stickerPopover.boxShadow = `0px 0px 32px ${this.themeService.theme.palette.getAccent50()}`;
|
|
10360
11223
|
this.mediaRecordedPopover.boxShadow = `0px 0px 32px ${this.themeService.theme.palette.getAccent50()}`;
|
|
11224
|
+
this.aiPopover.background = this.themeService.theme.palette.getBackground();
|
|
11225
|
+
this.aiPopover.boxShadow = `0px 0px 32px ${this.themeService.theme.palette.getAccent50()}`;
|
|
10361
11226
|
this.setComposerStyle();
|
|
10362
|
-
this.
|
|
10363
|
-
layoutModeIconTint: this.
|
|
11227
|
+
this.actionSheetStyle = {
|
|
11228
|
+
layoutModeIconTint: this.actionSheetStyle.layoutModeIconTint || this.themeService.theme.palette.getAccent(),
|
|
10364
11229
|
borderRadius: "inherit",
|
|
10365
11230
|
background: this.themeService.theme.palette.getBackground(),
|
|
10366
11231
|
border: "none",
|
|
10367
11232
|
width: "100%",
|
|
10368
11233
|
height: "100%",
|
|
10369
|
-
titleFont: this.
|
|
10370
|
-
titleColor: this.
|
|
10371
|
-
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()
|
|
10372
11237
|
};
|
|
10373
11238
|
this.messageInputStyle = {
|
|
10374
11239
|
height: "100%",
|
|
@@ -10516,10 +11381,6 @@ class CometChatMessageComposerComponent {
|
|
|
10516
11381
|
dividerTint: this.themeService.theme.palette.getAccent200(),
|
|
10517
11382
|
textFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
10518
11383
|
textColor: this.themeService.theme.palette.getAccent(),
|
|
10519
|
-
ActionSheetSeparatorTint: this.themeService.theme.palette.getAccent200(),
|
|
10520
|
-
ActionSheetTitleColor: this.themeService.theme.palette.getAccent(),
|
|
10521
|
-
ActionSheetTitleFont: fontHelper(this.themeService.theme.typography.title1),
|
|
10522
|
-
ActionSheetLayoutModeIconTint: this.themeService.theme.palette.getPrimary(),
|
|
10523
11384
|
emojiKeyboardTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
10524
11385
|
emojiKeyboardTextColor: this.themeService.theme.palette.getAccent400(),
|
|
10525
11386
|
previewTitleFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
@@ -10537,10 +11398,10 @@ class CometChatMessageComposerComponent {
|
|
|
10537
11398
|
}
|
|
10538
11399
|
}
|
|
10539
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 });
|
|
10540
|
-
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 }], 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 \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}\n"], 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 });
|
|
10541
11402
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageComposerComponent, decorators: [{
|
|
10542
11403
|
type: Component,
|
|
10543
|
-
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"] }]
|
|
10544
11405
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { inputElementRef: [{
|
|
10545
11406
|
type: ViewChild,
|
|
10546
11407
|
args: ["inputElement", { static: false }]
|
|
@@ -10559,6 +11420,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
10559
11420
|
}], mediaRecordedRef: [{
|
|
10560
11421
|
type: ViewChild,
|
|
10561
11422
|
args: ["mediaRecordedRef", { static: false }]
|
|
11423
|
+
}], aiButtonRef: [{
|
|
11424
|
+
type: ViewChild,
|
|
11425
|
+
args: ["aiButtonRef", { static: false }]
|
|
10562
11426
|
}], user: [{
|
|
10563
11427
|
type: Input
|
|
10564
11428
|
}], group: [{
|
|
@@ -10603,6 +11467,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
10603
11467
|
type: Input
|
|
10604
11468
|
}], backdropStyle: [{
|
|
10605
11469
|
type: Input
|
|
11470
|
+
}], actionSheetStyle: [{
|
|
11471
|
+
type: Input
|
|
10606
11472
|
}], hideVoiceRecording: [{
|
|
10607
11473
|
type: Input
|
|
10608
11474
|
}], mediaRecorderStyle: [{
|
|
@@ -10711,7 +11577,6 @@ class CometChatThreadedMessagesComponent {
|
|
|
10711
11577
|
textColor: "black",
|
|
10712
11578
|
background: "transparent",
|
|
10713
11579
|
};
|
|
10714
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
10715
11580
|
}
|
|
10716
11581
|
ngOnInit() {
|
|
10717
11582
|
this.requestBuilder = new CometChat.MessagesRequestBuilder()
|
|
@@ -10754,7 +11619,10 @@ class CometChatThreadedMessagesComponent {
|
|
|
10754
11619
|
this.unsubscribeToEvents();
|
|
10755
11620
|
try {
|
|
10756
11621
|
//Removing Message Listeners
|
|
10757
|
-
|
|
11622
|
+
this.onMessagesDelivered?.unsubscribe();
|
|
11623
|
+
this.onMessagesRead?.unsubscribe();
|
|
11624
|
+
this.onMessageDeleted?.unsubscribe();
|
|
11625
|
+
this.onMessageEdited?.unsubscribe();
|
|
10758
11626
|
}
|
|
10759
11627
|
catch (error) {
|
|
10760
11628
|
if (this.onError) {
|
|
@@ -10781,20 +11649,18 @@ class CometChatThreadedMessagesComponent {
|
|
|
10781
11649
|
}
|
|
10782
11650
|
addMessageEventListeners() {
|
|
10783
11651
|
try {
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
},
|
|
10797
|
-
}));
|
|
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
|
+
});
|
|
10798
11664
|
}
|
|
10799
11665
|
catch (error) {
|
|
10800
11666
|
if (this.onError) {
|
|
@@ -10880,17 +11746,11 @@ class CometChatThreadedMessagesComponent {
|
|
|
10880
11746
|
}
|
|
10881
11747
|
}
|
|
10882
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 });
|
|
10883
|
-
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" },
|
|
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 });
|
|
10884
11750
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatThreadedMessagesComponent, decorators: [{
|
|
10885
11751
|
type: Component,
|
|
10886
|
-
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\"
|
|
10887
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: {
|
|
10888
|
-
type: ViewChild,
|
|
10889
|
-
args: ["messageComposerRef", { static: false }]
|
|
10890
|
-
}], messageListRef: [{
|
|
10891
|
-
type: ViewChild,
|
|
10892
|
-
args: ["messageListRef", { static: false }]
|
|
10893
|
-
}], onClose: [{
|
|
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"] }]
|
|
11753
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { onClose: [{
|
|
10894
11754
|
type: Input
|
|
10895
11755
|
}], onError: [{
|
|
10896
11756
|
type: Input
|
|
@@ -12991,10 +13851,10 @@ class CometChatMessagesComponent {
|
|
|
12991
13851
|
}
|
|
12992
13852
|
}
|
|
12993
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 });
|
|
12994
|
-
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\" [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 });
|
|
12995
13855
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessagesComponent, decorators: [{
|
|
12996
13856
|
type: Component,
|
|
12997
|
-
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\" [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"] }]
|
|
12998
13858
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }, { type: i0.ElementRef }]; }, propDecorators: { messageComposerRef: [{
|
|
12999
13859
|
type: ViewChild,
|
|
13000
13860
|
args: ["messageComposerRef", { static: false }]
|
|
@@ -14319,17 +15179,11 @@ class CometChatConversationsWithMessagesComponent {
|
|
|
14319
15179
|
}
|
|
14320
15180
|
}
|
|
14321
15181
|
CometChatConversationsWithMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatConversationsWithMessagesComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: CometChatThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
14322
|
-
CometChatConversationsWithMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatConversationsWithMessagesComponent, selector: "cometchat-conversations-with-messages", inputs: { user: "user", group: "group", isMobileView: "isMobileView", messageText: "messageText", conversationsWithMessagesStyle: "conversationsWithMessagesStyle", messagesConfiguration: "messagesConfiguration", conversationConfiguration: "conversationConfiguration", onError: "onError", startNewConversationIconURL: "startNewConversationIconURL", hideStartNewConversation: "hideStartNewConversation", StartConversationConfiguration: "StartConversationConfiguration" },
|
|
15182
|
+
CometChatConversationsWithMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatConversationsWithMessagesComponent, selector: "cometchat-conversations-with-messages", inputs: { user: "user", group: "group", isMobileView: "isMobileView", messageText: "messageText", conversationsWithMessagesStyle: "conversationsWithMessagesStyle", messagesConfiguration: "messagesConfiguration", conversationConfiguration: "conversationConfiguration", onError: "onError", startNewConversationIconURL: "startNewConversationIconURL", hideStartNewConversation: "hideStartNewConversation", StartConversationConfiguration: "StartConversationConfiguration" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-with-messages__wrapper\" [ngStyle]=\"chatsWrapperStyles()\" >\n <div class=\"cc-with-messages__sidebar\" [ngClass]=\"{mobile : isMobileView}\" [ngStyle]=\"sideBarStyle\">\n <cometchat-conversations\n #conversationRef\n [activeConversation]=\"activeConversation\"\n [onItemClick]=\"conversationConfiguration.onItemClick || onItemClick\"\n [conversationsStyle]=\"conversationConfiguration.conversationsStyle\"\n [subtitleView]=\"conversationConfiguration.subtitleView\"\n [options]=\"conversationConfiguration.options\"\n [disableUsersPresence]=\"conversationConfiguration.disableUsersPresence\"\n [disableReceipt]=\"conversationConfiguration.disableReceipt\"\n [disableTyping]=\"conversationConfiguration.disableTyping\"\n [deliveredIcon]=\"conversationConfiguration.deliveredIcon\"\n [readIcon]=\"conversationConfiguration.readIcon\"\n [waitIcon]=\"conversationConfiguration.waitIcon\"\n [errorIcon]=\"conversationConfiguration.errorIcon\"\n [datePattern]=\"conversationConfiguration.datePattern\"\n [receiptStyle]=\"conversationConfiguration.receiptStyle\"\n [sentIcon]=\"conversationConfiguration.sentIcon\"\n [privateGroupIcon]=\"conversationConfiguration.privateGroupIcon\"\n [protectedGroupIcon]=\"conversationConfiguration.protectedGroupIcon\"\n [customSoundForMessages]=\"conversationConfiguration.customSoundForMessages\"\n [conversationsRequestBuilder]=\"conversationConfiguration.conversationsRequestBuilder\"\n [emptyStateView]=\"conversationConfiguration.emptyStateView\"\n [onSelect]=\"conversationConfiguration.onSelect\"\n [loadingIconURL]=\"conversationConfiguration.loadingIconURL\"\n [errorStateView]=\"conversationConfiguration.errorStateView\"\n [loadingStateView]=\"conversationConfiguration.loadingStateView\"\n [titleAlignment]=\"conversationConfiguration.titleAlignment\"\n [listItemView]=\"conversationConfiguration.listItemView\"\n [menu]=\"conversationConfiguration.menu || startConversationButton\"\n [hideSeparator]=\"conversationConfiguration.hideSeparator\"\n [hideError]=\"conversationConfiguration.hideError\"\n [selectionMode]=\"conversationConfiguration.selectionMode\"\n [disableSoundForMessages]=\"conversationConfiguration.disableSoundForMessages\"\n [deleteConversationDialogStyle]=\"conversationConfiguration.deleteConversationDialogStyle\"\n [badgeStyle]=\"conversationConfiguration.badgeStyle\"\n [dateStyle]=\"conversationConfiguration.dateStyle\"\n [listItemStyle]=\"conversationConfiguration.listItemStyle\"\n [backdropStyle]=\"conversationConfiguration.backdropStyle\"\n\n ></cometchat-conversations>\n </div>\n <div class=\"cc-with-messages__main\" [ngClass]=\"{mobile : isMobileView}\" *ngIf=\"!showStartConversation && (user || group)\">\n <!--Message List Screen-->\n <cometchat-messages\n #messagesRef\n [user]=\"user!\"\n [group]=\"group!\"\n [messageHeaderConfiguration]=\"messagesConfiguration.messageHeaderConfiguration\"\n [messageListConfiguration]=\"messagesConfiguration.messageListConfiguration\"\n [messageComposerConfiguration]=\"messagesConfiguration.messageComposerConfiguration\"\n [messagesStyle]=\"messagesConfiguration.messagesStyle\"\n [customSoundForIncomingMessages]=\"messagesConfiguration.customSoundForIncomingMessages\"\n [customSoundForOutgoingMessages]=\"messagesConfiguration.customSoundForOutgoingMessages\"\n [detailsConfiguration]=\"messagesConfiguration.detailsConfiguration\"\n [disableSoundForMessages]=\"messagesConfiguration.disableSoundForMessages\"\n [disableTyping]=\"messagesConfiguration.disableTyping\"\n [hideMessageComposer]=\"messagesConfiguration.hideMessageComposer\"\n [hideMessageHeader]=\"messagesConfiguration.hideMessageHeader\"\n [messageComposerView]=\"messagesConfiguration.messageComposerView\"\n [messageHeaderView]=\"messagesConfiguration.messageHeaderView\"\n [messageListView]=\"messagesConfiguration.messageListView\"\n >\n </cometchat-messages>\n <!--Message List Screen ENDS-->\n </div>\n <div class=\"cc-with-messages__start-conversation\" [ngClass]=\"{mobile : isMobileView}\" *ngIf=\"showStartConversation\">\n\n <cometchat-contacts [usersConfiguration]=\"StartConversationConfiguration.usersConfiguration\"\n [groupsConfiguration]=\"StartConversationConfiguration.groupsConfiguration\"\n [closeIconURL]=\"StartConversationConfiguration.closeIconURL\"\n [contactsStyle]=\"StartConversationConfiguration.contactsStyle\"\n [selectionMode]=\"StartConversationConfiguration.selectionMode\"\n [onClose]=\"StartConversationConfiguration.onClose\"\n [tabVisibility]=\"StartConversationConfiguration.tabVisibility\"\n [selectionLimit]=\"StartConversationConfiguration.selectionLimit\"\n [tabs]=\"StartConversationConfiguration.tabs\"\n [hideSubmitButton]=\"StartConversationConfiguration.hideSubmitButton\"\n [onSubmitButtonClick]=\"onContactSelected\"></cometchat-contacts>\n </div>\n <div class=\"cc-decorator__message--empty\" *ngIf=\"!user && !group && !showStartConversation\" [ngStyle]=\"emptyMessageStyle()\">\n <cometchat-label [text]=\"messageText\" [labelStyle]=\"labelStyle\"></cometchat-label>\n </div>\n <ng-template #startConversationButton>\n <cometchat-button *ngIf=\"!hideStartNewConversation\" [iconURL]=\"startNewConversationIconURL\" [buttonStyle]=\"startConversationButtonStyle\" (cc-button-clicked)=\"triggerStartConversation()\"></cometchat-button>\n\n </ng-template>", styles: [".cc-with-messages__wrapper{display:flex;height:100%;width:100%;box-sizing:border-box;overflow:hidden}.cc-with-messages__sidebar{width:280px;height:100%;position:relative}.cc-with-messages__main,.cc-with-messages__start-conversation{width:calc(100% - 280px);height:100%}.mobile{width:100%!important;height:100%;position:absolute}.cc-decorator__message--empty{display:flex;justify-content:center;align-items:center}\n"], components: [{ type: CometChatConversationsComponent, selector: "cometchat-conversations", inputs: ["subtitleView", "title", "options", "searchPlaceHolder", "disableUsersPresence", "disableReceipt", "disableTyping", "deliveredIcon", "readIcon", "errorIcon", "datePattern", "onError", "sentIcon", "privateGroupIcon", "protectedGroupIcon", "customSoundForMessages", "activeConversation", "searchIconURL", "hideSearch", "conversationsRequestBuilder", "emptyStateView", "onSelect", "loadingIconURL", "errorStateView", "loadingStateView", "emptyStateText", "errorStateText", "titleAlignment", "listItemView", "menu", "hideSeparator", "searchPlaceholder", "hideError", "selectionMode", "disableSoundForMessages", "confirmDialogTitle", "confirmButtonText", "cancelButtonText", "confirmDialogMessage", "onItemClick", "deleteConversationDialogStyle", "backdropStyle", "badgeStyle", "dateStyle", "conversationsStyle", "listItemStyle", "statusIndicatorStyle", "typingIndicatorText", "threadIndicatorText", "avatarStyle", "receiptStyle", "loggedInUser"] }, { type: CometChatMessagesComponent, selector: "cometchat-messages", inputs: ["user", "group", "hideMessageComposer", "disableTyping", "messageHeaderConfiguration", "messageListConfiguration", "messageComposerConfiguration", "threadedMessageConfiguration", "detailsConfiguration", "customSoundForIncomingMessages", "customSoundForOutgoingMessages", "disableSoundForMessages", "messagesStyle", "messageHeaderView", "messageComposerView", "messageListView", "hideMessageHeader", "hideDetails", "auxiliaryMenu"] }, { type: CometChatContactsComponent, selector: "cometchat-contacts", inputs: ["title", "usersTabTitle", "groupsTabTitle", "usersConfiguration", "groupsConfiguration", "onSubmitButtonClick", "closeIconURL", "contactsStyle", "selectionMode", "onClose", "onItemClick", "tabVisibility", "selectionLimit", "tabs", "hideSubmitButton", "submitButtonText"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14323
15183
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatConversationsWithMessagesComponent, decorators: [{
|
|
14324
15184
|
type: Component,
|
|
14325
15185
|
args: [{ selector: "cometchat-conversations-with-messages", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-with-messages__wrapper\" [ngStyle]=\"chatsWrapperStyles()\" >\n <div class=\"cc-with-messages__sidebar\" [ngClass]=\"{mobile : isMobileView}\" [ngStyle]=\"sideBarStyle\">\n <cometchat-conversations\n #conversationRef\n [activeConversation]=\"activeConversation\"\n [onItemClick]=\"conversationConfiguration.onItemClick || onItemClick\"\n [conversationsStyle]=\"conversationConfiguration.conversationsStyle\"\n [subtitleView]=\"conversationConfiguration.subtitleView\"\n [options]=\"conversationConfiguration.options\"\n [disableUsersPresence]=\"conversationConfiguration.disableUsersPresence\"\n [disableReceipt]=\"conversationConfiguration.disableReceipt\"\n [disableTyping]=\"conversationConfiguration.disableTyping\"\n [deliveredIcon]=\"conversationConfiguration.deliveredIcon\"\n [readIcon]=\"conversationConfiguration.readIcon\"\n [waitIcon]=\"conversationConfiguration.waitIcon\"\n [errorIcon]=\"conversationConfiguration.errorIcon\"\n [datePattern]=\"conversationConfiguration.datePattern\"\n [receiptStyle]=\"conversationConfiguration.receiptStyle\"\n [sentIcon]=\"conversationConfiguration.sentIcon\"\n [privateGroupIcon]=\"conversationConfiguration.privateGroupIcon\"\n [protectedGroupIcon]=\"conversationConfiguration.protectedGroupIcon\"\n [customSoundForMessages]=\"conversationConfiguration.customSoundForMessages\"\n [conversationsRequestBuilder]=\"conversationConfiguration.conversationsRequestBuilder\"\n [emptyStateView]=\"conversationConfiguration.emptyStateView\"\n [onSelect]=\"conversationConfiguration.onSelect\"\n [loadingIconURL]=\"conversationConfiguration.loadingIconURL\"\n [errorStateView]=\"conversationConfiguration.errorStateView\"\n [loadingStateView]=\"conversationConfiguration.loadingStateView\"\n [titleAlignment]=\"conversationConfiguration.titleAlignment\"\n [listItemView]=\"conversationConfiguration.listItemView\"\n [menu]=\"conversationConfiguration.menu || startConversationButton\"\n [hideSeparator]=\"conversationConfiguration.hideSeparator\"\n [hideError]=\"conversationConfiguration.hideError\"\n [selectionMode]=\"conversationConfiguration.selectionMode\"\n [disableSoundForMessages]=\"conversationConfiguration.disableSoundForMessages\"\n [deleteConversationDialogStyle]=\"conversationConfiguration.deleteConversationDialogStyle\"\n [badgeStyle]=\"conversationConfiguration.badgeStyle\"\n [dateStyle]=\"conversationConfiguration.dateStyle\"\n [listItemStyle]=\"conversationConfiguration.listItemStyle\"\n [backdropStyle]=\"conversationConfiguration.backdropStyle\"\n\n ></cometchat-conversations>\n </div>\n <div class=\"cc-with-messages__main\" [ngClass]=\"{mobile : isMobileView}\" *ngIf=\"!showStartConversation && (user || group)\">\n <!--Message List Screen-->\n <cometchat-messages\n #messagesRef\n [user]=\"user!\"\n [group]=\"group!\"\n [messageHeaderConfiguration]=\"messagesConfiguration.messageHeaderConfiguration\"\n [messageListConfiguration]=\"messagesConfiguration.messageListConfiguration\"\n [messageComposerConfiguration]=\"messagesConfiguration.messageComposerConfiguration\"\n [messagesStyle]=\"messagesConfiguration.messagesStyle\"\n [customSoundForIncomingMessages]=\"messagesConfiguration.customSoundForIncomingMessages\"\n [customSoundForOutgoingMessages]=\"messagesConfiguration.customSoundForOutgoingMessages\"\n [detailsConfiguration]=\"messagesConfiguration.detailsConfiguration\"\n [disableSoundForMessages]=\"messagesConfiguration.disableSoundForMessages\"\n [disableTyping]=\"messagesConfiguration.disableTyping\"\n [hideMessageComposer]=\"messagesConfiguration.hideMessageComposer\"\n [hideMessageHeader]=\"messagesConfiguration.hideMessageHeader\"\n [messageComposerView]=\"messagesConfiguration.messageComposerView\"\n [messageHeaderView]=\"messagesConfiguration.messageHeaderView\"\n [messageListView]=\"messagesConfiguration.messageListView\"\n >\n </cometchat-messages>\n <!--Message List Screen ENDS-->\n </div>\n <div class=\"cc-with-messages__start-conversation\" [ngClass]=\"{mobile : isMobileView}\" *ngIf=\"showStartConversation\">\n\n <cometchat-contacts [usersConfiguration]=\"StartConversationConfiguration.usersConfiguration\"\n [groupsConfiguration]=\"StartConversationConfiguration.groupsConfiguration\"\n [closeIconURL]=\"StartConversationConfiguration.closeIconURL\"\n [contactsStyle]=\"StartConversationConfiguration.contactsStyle\"\n [selectionMode]=\"StartConversationConfiguration.selectionMode\"\n [onClose]=\"StartConversationConfiguration.onClose\"\n [tabVisibility]=\"StartConversationConfiguration.tabVisibility\"\n [selectionLimit]=\"StartConversationConfiguration.selectionLimit\"\n [tabs]=\"StartConversationConfiguration.tabs\"\n [hideSubmitButton]=\"StartConversationConfiguration.hideSubmitButton\"\n [onSubmitButtonClick]=\"onContactSelected\"></cometchat-contacts>\n </div>\n <div class=\"cc-decorator__message--empty\" *ngIf=\"!user && !group && !showStartConversation\" [ngStyle]=\"emptyMessageStyle()\">\n <cometchat-label [text]=\"messageText\" [labelStyle]=\"labelStyle\"></cometchat-label>\n </div>\n <ng-template #startConversationButton>\n <cometchat-button *ngIf=\"!hideStartNewConversation\" [iconURL]=\"startNewConversationIconURL\" [buttonStyle]=\"startConversationButtonStyle\" (cc-button-clicked)=\"triggerStartConversation()\"></cometchat-button>\n\n </ng-template>", styles: [".cc-with-messages__wrapper{display:flex;height:100%;width:100%;box-sizing:border-box;overflow:hidden}.cc-with-messages__sidebar{width:280px;height:100%;position:relative}.cc-with-messages__main,.cc-with-messages__start-conversation{width:calc(100% - 280px);height:100%}.mobile{width:100%!important;height:100%;position:absolute}.cc-decorator__message--empty{display:flex;justify-content:center;align-items:center}\n"] }]
|
|
14326
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: {
|
|
14327
|
-
type: ViewChild,
|
|
14328
|
-
args: ["conversationRef", { static: false }]
|
|
14329
|
-
}], messageListRef: [{
|
|
14330
|
-
type: ViewChild,
|
|
14331
|
-
args: ["messagesRef", { static: false }]
|
|
14332
|
-
}], user: [{
|
|
15186
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { user: [{
|
|
14333
15187
|
type: Input
|
|
14334
15188
|
}], group: [{
|
|
14335
15189
|
type: Input
|
|
@@ -14482,12 +15336,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
14482
15336
|
}]
|
|
14483
15337
|
}] });
|
|
14484
15338
|
|
|
15339
|
+
class CometChatCardView {
|
|
15340
|
+
}
|
|
15341
|
+
CometChatCardView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCardView, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
15342
|
+
CometChatCardView.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCardView, declarations: [CometChatCardViewComponent], imports: [CommonModule], exports: [CometChatCardViewComponent] });
|
|
15343
|
+
CometChatCardView.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCardView, imports: [[
|
|
15344
|
+
CommonModule,
|
|
15345
|
+
]] });
|
|
15346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCardView, decorators: [{
|
|
15347
|
+
type: NgModule,
|
|
15348
|
+
args: [{
|
|
15349
|
+
declarations: [CometChatCardViewComponent],
|
|
15350
|
+
imports: [
|
|
15351
|
+
CommonModule,
|
|
15352
|
+
],
|
|
15353
|
+
exports: [CometChatCardViewComponent],
|
|
15354
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
15355
|
+
}]
|
|
15356
|
+
}] });
|
|
15357
|
+
|
|
14485
15358
|
class CometChatMessageComposer {
|
|
14486
15359
|
}
|
|
14487
15360
|
CometChatMessageComposer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageComposer, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
14488
|
-
CometChatMessageComposer.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageComposer, declarations: [CometChatMessageComposerComponent], imports: [CommonModule
|
|
15361
|
+
CometChatMessageComposer.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageComposer, declarations: [CometChatMessageComposerComponent], imports: [CommonModule,
|
|
15362
|
+
CometChatCardView], exports: [CometChatMessageComposerComponent] });
|
|
14489
15363
|
CometChatMessageComposer.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageComposer, imports: [[
|
|
14490
15364
|
CommonModule,
|
|
15365
|
+
CometChatCardView
|
|
14491
15366
|
]] });
|
|
14492
15367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageComposer, decorators: [{
|
|
14493
15368
|
type: NgModule,
|
|
@@ -14495,6 +15370,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
14495
15370
|
declarations: [CometChatMessageComposerComponent],
|
|
14496
15371
|
imports: [
|
|
14497
15372
|
CommonModule,
|
|
15373
|
+
CometChatCardView
|
|
14498
15374
|
],
|
|
14499
15375
|
exports: [CometChatMessageComposerComponent],
|
|
14500
15376
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
@@ -15352,5 +16228,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
15352
16228
|
* Generated bundle index. Do not edit.
|
|
15353
16229
|
*/
|
|
15354
16230
|
|
|
15355
|
-
export { CallingExtension, CallingExtensionDecorator, ChatConfigurator, CollaborativeDocumentExtension, CollaborativeDocumentExtensionDecorator, CollaborativeWhiteBoardExtension, CollaborativeWhiteBoardExtensionDecorator, CometChatAddMembers, CometChatAddMembersComponent, CometChatBannedMembers, CometChatBannedMembersComponent, CometChatCallButtons, CometChatCallButtonsComponent, CometChatContacts, CometChatContactsComponent, CometChatConversations, CometChatConversationsComponent, CometChatConversationsWithMessages, CometChatConversationsWithMessagesComponent, CometChatDetails, CometChatDetailsComponent, CometChatGroupMembers, CometChatGroupMembersComponent, CometChatGroups, CometChatGroupsComponent, CometChatGroupsWithMessages, CometChatGroupsWithMessagesComponent, CometChatIncomingCall, CometChatIncomingCallComponent, CometChatList, CometChatMessageBubble, CometChatMessageBubbleComponent, CometChatMessageComposer, CometChatMessageComposerComponent, CometChatMessageHeader, CometChatMessageHeaderComponent, CometChatMessageInformation, CometChatMessageInformationComponent, CometChatMessageList, CometChatMessageListComponent, CometChatMessages, CometChatMessagesComponent, CometChatOngoingCall, CometChatOngoingCallComponent, CometChatOutgoingCall, CometChatOutgoingCallComponent, CometChatTabs, CometChatTabsComponent, CometChatThemeService, CometChatThreadedMessages, CometChatThreadedMessagesComponent, CometChatTransferOwnership, CometChatTransferOwnershipComponent, CometChatUIKit, CometChatUsers, CometChatUsersComponent, CometChatUsersWithMessages, CometChatUsersWithMessagesComponent, CometchatListComponent, DataSource, DataSourceDecorator, ExtensionsDataSource, ImageModerationExtension, ImageModerationExtensionDecorator, LinkPreviewExtension, LinkPreviewExtensionDecorator, MessageTranslationExtension, MessageTranslationExtensionDecorator, MessageUtils, PollsExtension, PollsExtensionDecorator, ReactionExtension, ReactionExtensionDecorator, SmartReplyExtension, SmartReplyExtensionDecorator, StickersExtension, StickersExtensionDecorator, TextModeratorExtension, TextModeratorExtensionDecorator, ThumbnailGenerationExtension, ThumbnailGenerationExtensionDecorator };
|
|
16231
|
+
export { AIConversationStarterDecorator, AIConversationStarterExtension, AIEnabler, AIEnablerDecorator, AISmartRepliesExtension, AISmartRepliesExtensionDecorator, CallingExtension, CallingExtensionDecorator, ChatConfigurator, CollaborativeDocumentExtension, CollaborativeDocumentExtensionDecorator, CollaborativeWhiteBoardExtension, CollaborativeWhiteBoardExtensionDecorator, CometChatAddMembers, CometChatAddMembersComponent, CometChatBannedMembers, CometChatBannedMembersComponent, CometChatCallButtons, CometChatCallButtonsComponent, CometChatContacts, CometChatContactsComponent, CometChatConversations, CometChatConversationsComponent, CometChatConversationsWithMessages, CometChatConversationsWithMessagesComponent, CometChatDetails, CometChatDetailsComponent, CometChatGroupMembers, CometChatGroupMembersComponent, CometChatGroups, CometChatGroupsComponent, CometChatGroupsWithMessages, CometChatGroupsWithMessagesComponent, CometChatIncomingCall, CometChatIncomingCallComponent, CometChatList, CometChatMessageBubble, CometChatMessageBubbleComponent, CometChatMessageComposer, CometChatMessageComposerComponent, CometChatMessageHeader, CometChatMessageHeaderComponent, CometChatMessageInformation, CometChatMessageInformationComponent, CometChatMessageList, CometChatMessageListComponent, CometChatMessages, CometChatMessagesComponent, CometChatOngoingCall, CometChatOngoingCallComponent, CometChatOutgoingCall, CometChatOutgoingCallComponent, CometChatTabs, CometChatTabsComponent, CometChatThemeService, CometChatThreadedMessages, CometChatThreadedMessagesComponent, CometChatTransferOwnership, CometChatTransferOwnershipComponent, CometChatUIKit, CometChatUsers, CometChatUsersComponent, CometChatUsersWithMessages, CometChatUsersWithMessagesComponent, CometchatListComponent, DataSource, DataSourceDecorator, ExtensionsDataSource, ImageModerationExtension, ImageModerationExtensionDecorator, LinkPreviewExtension, LinkPreviewExtensionDecorator, MessageTranslationExtension, MessageTranslationExtensionDecorator, MessageUtils, PollsExtension, PollsExtensionDecorator, ReactionExtension, ReactionExtensionDecorator, SmartReplyExtension, SmartReplyExtensionDecorator, StickersExtension, StickersExtensionDecorator, TextModeratorExtension, TextModeratorExtensionDecorator, ThumbnailGenerationExtension, ThumbnailGenerationExtensionDecorator };
|
|
15356
16232
|
//# sourceMappingURL=cometchat-chat-uikit-angular.mjs.map
|