@cometchat/chat-uikit-angular 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CometChatConversations/cometchat-conversations/cometchat-conversations.component.d.ts +18 -7
- package/CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component.d.ts +2 -2
- package/CometChatMessageHeader/cometchat-message-header/cometchat-message-header.component.d.ts +7 -6
- package/CometChatMessageInformation/cometchat-message-information/cometchat-message-information.component.d.ts +6 -4
- package/CometChatMessageList/cometchat-message-list/cometchat-message-list.component.d.ts +25 -8
- package/CometChatThreadedMessages/cometchat-threaded-messages/cometchat-threaded-messages.component.d.ts +8 -5
- package/Shared/CometChatUIkit/CometChatUIKit.d.ts +11 -3
- package/Shared/Framework/DataSource.d.ts +2 -0
- package/Shared/Framework/DataSourceDecorator.d.ts +3 -1
- package/Shared/Utils/MessageUtils.d.ts +3 -1
- package/esm2020/CometChatConversations/cometchat-conversations/cometchat-conversations.component.mjs +71 -45
- package/esm2020/CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component.mjs +16 -24
- package/esm2020/CometChatMessageHeader/cometchat-message-header/cometchat-message-header.component.mjs +15 -17
- package/esm2020/CometChatMessageInformation/cometchat-message-information/cometchat-message-information.component.mjs +18 -20
- package/esm2020/CometChatMessageList/cometchat-message-list/cometchat-message-list.component.mjs +287 -52
- package/esm2020/CometChatMessages/cometchat-messages/cometchat-messages.component.mjs +3 -3
- package/esm2020/CometChatThreadedMessages/cometchat-threaded-messages/cometchat-threaded-messages.component.mjs +23 -23
- package/esm2020/Shared/CometChatUIkit/CometChatUIKit.mjs +157 -31
- package/esm2020/Shared/Framework/DataSource.mjs +1 -1
- package/esm2020/Shared/Framework/DataSourceDecorator.mjs +7 -1
- package/esm2020/Shared/Utils/MessageUtils.mjs +36 -7
- package/esm2020/Shared/Views/CometChatCardView/cometchat-card-view/cometchat-card-view.component.mjs +1 -1
- package/esm2020/public-api.mjs +1 -1
- package/fesm2015/cometchat-chat-uikit-angular.mjs +735 -319
- package/fesm2015/cometchat-chat-uikit-angular.mjs.map +1 -1
- package/fesm2020/cometchat-chat-uikit-angular.mjs +724 -314
- package/fesm2020/cometchat-chat-uikit-angular.mjs.map +1 -1
- package/package.json +5 -5
- package/LICENSE.md +0 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ConversationUtils, CallingDetailsUtils, ExtensionsDataSource as ExtensionsDataSource$1, CollaborativeDocumentConstants, ExtensionsId, CollaborativeWhiteboardConstants, PollsConstants, CometChatUIKitUtility, CometChatSoundManager, SmartRepliesConfiguration, StickersConstants, StickersConfiguration,
|
|
1
|
+
import { ConversationUtils, AIExtensionDataSource, CallingDetailsUtils, ExtensionsDataSource as ExtensionsDataSource$1, CollaborativeDocumentConstants, ExtensionsId, CollaborativeWhiteboardConstants, PollsConstants, CometChatUIKitUtility, CometChatSoundManager, SmartRepliesConfiguration, StickersConstants, StickersConfiguration, CometChatUIKitCalls, OutgoingCallStyle, OutgoingCallConfiguration, CallScreenConfiguration, CallButtonsStyle, StorageUtils, IncomingCallStyle, UsersStyle, AddMembersStyle, MessageHeaderStyle, ListStyle, BannedMembersStyle, MessageReceiptUtils, ConversationsStyle, MessageInformationStyle, MessageInformationConfiguration, MessageTranslationConstants, MessageTranslationStyle, InteractiveMessageUtils, ReactionsConstants, FormBubbleStyle, CardBubbleStyle, LinkPreviewConstants, ThumbnailGenerationConstants, MessageListStyle, LinkPreviewStyle, SmartRepliesConstants, MessageComposerStyle, MessageListConfiguration, MessageComposerConfiguration, ThreadedMessagesStyle, GroupMemberUtils, GroupMembersStyle, TransferOwnershipStyle, AddMembersConfiguration, BannedMembersConfiguration, GroupMembersConfiguration, TransferOwnershipConfiguration, DetailsUtils, DetailsStyle, MessageHeaderConfiguration, ThreadedMessagesConfiguration, DetailsConfiguration, MessagesStyle, GroupsStyle, UsersConfiguration, GroupsConfiguration, ContactsStyle, TabItemStyle, MessagesConfiguration, ConversationsConfiguration, ContactsConfiguration, WithMessagesStyle, CreateGroupConfiguration, JoinGroupConfiguration } from '@cometchat/uikit-shared';
|
|
2
2
|
export * from '@cometchat/uikit-shared';
|
|
3
|
-
import { CometChatMessageOption, CometChatUIKitConstants, localize, fontHelper, CometChatMessageTemplate, CometChatMessageComposerAction, CometChatTheme, CometChatMessageEvents, MessageStatus, CometChatUIEvents, CometChatLocalize, CallWorkflow, CometChatCallEvents, IconButtonAlignment, TitleAlignment, States, SelectionMode, CometChatUserEvents, CometChatGroupEvents, DatePatterns, CometChatConversationEvents, MessageBubbleAlignment, Receipts, MessageListAlignment, TimestampAlignment, DocumentIconAlignment, Placement, AuxiliaryButtonAlignment, TabAlignment, TabsVisibility } from '@cometchat/uikit-resources';
|
|
3
|
+
import { CometChatMessageOption, CometChatUIKitConstants, localize, fontHelper, CometChatMessageTemplate, CometChatMessageComposerAction, CometChatTheme, CometChatMessageEvents, MessageStatus, CometChatUIEvents, ChatSdkEventInitializer, CometChatLocalize, CallWorkflow, CometChatCallEvents, IconButtonAlignment, TitleAlignment, States, SelectionMode, CometChatUserEvents, CometChatGroupEvents, DatePatterns, CometChatConversationEvents, MessageBubbleAlignment, Receipts, MessageListAlignment, TimestampAlignment, DocumentIconAlignment, Placement, AuxiliaryButtonAlignment, TabAlignment, TabsVisibility } from '@cometchat/uikit-resources';
|
|
4
4
|
export * from '@cometchat/uikit-resources';
|
|
5
|
-
import { CallscreenStyle, AvatarStyle, ListItemStyle, DateStyle, ReceiptStyle, BadgeStyle, ConfirmDialogStyle, MenuListStyle, MediaRecorderStyle, ChangeScopeStyle, CreateGroupStyle, JoinGroupStyle } from '@cometchat/uikit-elements';
|
|
5
|
+
import { CallscreenStyle, AvatarStyle, ListItemStyle, DateStyle, ReceiptStyle, BadgeStyle, ConfirmDialogStyle, MenuListStyle, InputStyle, LabelStyle, RadioButtonStyle, CheckboxStyle, DropdownStyle, SingleSelectStyle, QuickViewStyle, MediaRecorderStyle, ChangeScopeStyle, CreateGroupStyle, JoinGroupStyle } from '@cometchat/uikit-elements';
|
|
6
6
|
export { ActionSheetStyle, AvatarStyle, BackdropStyle, BadgeStyle, ButtonGroupStyle, CallscreenStyle, CardStyle, ChangeScopeStyle, CheckboxStyle, CometChatActionItem, CometChatActionSheet, CometChatAudioBubble, CometChatAvatar, CometChatBackdrop, CometChatBadge, CometChatButton, CometChatButtonGroup, CometChatCallscreenWrapper, CometChatCard, CometChatChangeScope, CometChatCheckbox, CometChatConfirmDialog, CometChatContextMenu, CometChatCreateGroup, CometChatDate, CometChatDivider, CometChatDocumentBubble, CometChatDraggable, CometChatDropdown, CometChatEmoji, CometChatEmojiKeyboard, CometChatFileBubble, CometChatFullScreenViewer, CometChatIcon, CometChatIconButton, CometChatImageBubble, CometChatInput, CometChatJoinGroup, CometChatLabel, CometChatListItem, CometChatLiveReaction, CometChatLoader, CometChatMediaRecorder, CometChatMenuList, CometChatMessageInput, CometChatModal, CometChatPopover, CometChatPreview, CometChatRadioButton, CometChatReceipt, CometChatSearchInput, CometChatStatusIndicator, CometChatTextBubble, CometChatVideoBubble, ConfirmDialogStyle, ContextMenuStyle, CreateGroupStyle, DateStyle, DocumentBubbleStyle, DropdownStyle, EmojiKeyboardStyle, Emojis, FileBubbleStyle, FullScreenViewerStyle, IconStyle, ImageBubbleStyle, InputStyle, JoinGroupStyle, LabelStyle, ListItemStyle, LoaderStyle, MediaRecorderStyle, MenuListStyle, MessageInputStyle, ModalStyle, PopoverStyle, PreviewStyle, RadioButtonStyle, ReceiptStyle, SearchInputStyle, TextBubbleStyle, auxiliaryButtonAlignmentEnum, layoutType } from '@cometchat/uikit-elements';
|
|
7
7
|
import { __awaiter } from 'tslib';
|
|
8
8
|
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
@@ -166,6 +166,20 @@ class MessageUtils {
|
|
|
166
166
|
options: ChatConfigurator.getDataSource().getMessageOptions,
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
+
getFormMessageTemplate() {
|
|
170
|
+
return new CometChatMessageTemplate({
|
|
171
|
+
type: CometChatUIKitConstants.MessageTypes.form,
|
|
172
|
+
category: CometChatUIKitConstants.MessageCategory.interactive,
|
|
173
|
+
options: ChatConfigurator.getDataSource().getMessageOptions,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
getCardMessageTemplate() {
|
|
177
|
+
return new CometChatMessageTemplate({
|
|
178
|
+
type: CometChatUIKitConstants.MessageTypes.card,
|
|
179
|
+
category: CometChatUIKitConstants.MessageCategory.interactive,
|
|
180
|
+
options: ChatConfigurator.getDataSource().getMessageOptions,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
169
183
|
getAllMessageTemplates() {
|
|
170
184
|
return [
|
|
171
185
|
ChatConfigurator.getDataSource().getTextMessageTemplate(),
|
|
@@ -174,6 +188,8 @@ class MessageUtils {
|
|
|
174
188
|
ChatConfigurator.getDataSource().getAudioMessageTemplate(),
|
|
175
189
|
ChatConfigurator.getDataSource().getFileMessageTemplate(),
|
|
176
190
|
ChatConfigurator.getDataSource().getGroupActionTemplate(),
|
|
191
|
+
ChatConfigurator.getDataSource().getFormMessageTemplate(),
|
|
192
|
+
ChatConfigurator.getDataSource().getCardMessageTemplate()
|
|
177
193
|
];
|
|
178
194
|
}
|
|
179
195
|
getMessageTemplate(messageType, messageCategory) {
|
|
@@ -198,6 +214,12 @@ class MessageUtils {
|
|
|
198
214
|
case CometChatUIKitConstants.MessageTypes.audio:
|
|
199
215
|
_template = ChatConfigurator.getDataSource().getAudioMessageTemplate();
|
|
200
216
|
break;
|
|
217
|
+
case CometChatUIKitConstants.MessageTypes.form:
|
|
218
|
+
_template = ChatConfigurator.getDataSource().getFormMessageTemplate();
|
|
219
|
+
break;
|
|
220
|
+
case CometChatUIKitConstants.MessageTypes.card:
|
|
221
|
+
_template = ChatConfigurator.getDataSource().getCardMessageTemplate();
|
|
222
|
+
break;
|
|
201
223
|
}
|
|
202
224
|
}
|
|
203
225
|
return _template;
|
|
@@ -231,7 +253,8 @@ class MessageUtils {
|
|
|
231
253
|
break;
|
|
232
254
|
}
|
|
233
255
|
}
|
|
234
|
-
else if (messageObject.getCategory() == CometChatUIKitConstants.MessageCategory.custom)
|
|
256
|
+
else if ((messageObject.getCategory() == CometChatUIKitConstants.MessageCategory.custom) ||
|
|
257
|
+
(messageObject.getCategory() == CometChatUIKitConstants.MessageCategory.interactive)) {
|
|
235
258
|
_optionList = ChatConfigurator.getDataSource().getCommonOptions(loggedInUser, messageObject, theme, group);
|
|
236
259
|
}
|
|
237
260
|
return _optionList;
|
|
@@ -262,14 +285,20 @@ class MessageUtils {
|
|
|
262
285
|
CometChatUIKitConstants.MessageTypes.audio,
|
|
263
286
|
CometChatUIKitConstants.MessageTypes.video,
|
|
264
287
|
CometChatUIKitConstants.MessageTypes.file,
|
|
265
|
-
CometChatUIKitConstants.MessageTypes.groupMember
|
|
288
|
+
CometChatUIKitConstants.MessageTypes.groupMember,
|
|
289
|
+
CometChatUIKitConstants.MessageTypes.form,
|
|
290
|
+
CometChatUIKitConstants.MessageTypes.card
|
|
266
291
|
];
|
|
267
292
|
}
|
|
268
293
|
addList() {
|
|
269
294
|
return "<Message Utils>";
|
|
270
295
|
}
|
|
271
296
|
getAllMessageCategories() {
|
|
272
|
-
return [
|
|
297
|
+
return [
|
|
298
|
+
CometChatUIKitConstants.MessageCategory.message,
|
|
299
|
+
CometChatUIKitConstants.MessageCategory.action,
|
|
300
|
+
CometChatUIKitConstants.MessageCategory.interactive
|
|
301
|
+
];
|
|
273
302
|
}
|
|
274
303
|
getAuxiliaryOptions(id, user, group) {
|
|
275
304
|
return null;
|
|
@@ -444,6 +473,14 @@ class DataSourceDecorator {
|
|
|
444
473
|
var _a;
|
|
445
474
|
return ((_a = this.dataSource) !== null && _a !== void 0 ? _a : new MessageUtils()).getFileMessageTemplate();
|
|
446
475
|
}
|
|
476
|
+
getFormMessageTemplate() {
|
|
477
|
+
var _a;
|
|
478
|
+
return ((_a = this.dataSource) !== null && _a !== void 0 ? _a : new MessageUtils()).getFormMessageTemplate();
|
|
479
|
+
}
|
|
480
|
+
getCardMessageTemplate() {
|
|
481
|
+
var _a;
|
|
482
|
+
return ((_a = this.dataSource) !== null && _a !== void 0 ? _a : new MessageUtils()).getCardMessageTemplate();
|
|
483
|
+
}
|
|
447
484
|
getGroupActionTemplate() {
|
|
448
485
|
var _a;
|
|
449
486
|
return ((_a = this.dataSource) !== null && _a !== void 0 ? _a : new MessageUtils()).getGroupActionTemplate();
|
|
@@ -502,6 +539,128 @@ class DataSourceDecorator {
|
|
|
502
539
|
}
|
|
503
540
|
}
|
|
504
541
|
|
|
542
|
+
class AIEnablerDecorator extends DataSourceDecorator {
|
|
543
|
+
constructor(dataSource, features) {
|
|
544
|
+
super(dataSource);
|
|
545
|
+
}
|
|
546
|
+
getId() {
|
|
547
|
+
return "aienabler";
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
class AISmartRepliesExtensionDecorator extends DataSourceDecorator {
|
|
552
|
+
constructor(dataSource) {
|
|
553
|
+
super(dataSource);
|
|
554
|
+
}
|
|
555
|
+
getId() {
|
|
556
|
+
return "aismartreply";
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
class AISmartRepliesExtension extends AIExtensionDataSource {
|
|
561
|
+
constructor() {
|
|
562
|
+
super();
|
|
563
|
+
}
|
|
564
|
+
addExtension() {
|
|
565
|
+
ChatConfigurator.enable((dataSource) => new AISmartRepliesExtensionDecorator(dataSource));
|
|
566
|
+
}
|
|
567
|
+
getExtensionId() {
|
|
568
|
+
return "smart-replies";
|
|
569
|
+
}
|
|
570
|
+
enable() {
|
|
571
|
+
this.addExtension();
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
576
|
+
constructor(dataSource) {
|
|
577
|
+
super(dataSource);
|
|
578
|
+
}
|
|
579
|
+
getId() {
|
|
580
|
+
return "aiconversationstarter";
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
class AIConversationStarterExtension extends AIExtensionDataSource {
|
|
585
|
+
constructor() {
|
|
586
|
+
super();
|
|
587
|
+
}
|
|
588
|
+
addExtension() {
|
|
589
|
+
ChatConfigurator.enable((dataSource) => new AIConversationStarterDecorator(dataSource));
|
|
590
|
+
}
|
|
591
|
+
getExtensionId() {
|
|
592
|
+
return "conversation-starter";
|
|
593
|
+
}
|
|
594
|
+
enable() {
|
|
595
|
+
this.addExtension();
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
class AIEnabler extends AIExtensionDataSource {
|
|
600
|
+
constructor(defaultFeatures) {
|
|
601
|
+
super();
|
|
602
|
+
this.defaultAIFeatures = defaultFeatures;
|
|
603
|
+
}
|
|
604
|
+
addExtension() {
|
|
605
|
+
}
|
|
606
|
+
getExtensionId() {
|
|
607
|
+
return "ai-enabler";
|
|
608
|
+
}
|
|
609
|
+
enable() {
|
|
610
|
+
var _a;
|
|
611
|
+
let features = {};
|
|
612
|
+
const processFeatures = (feature) => {
|
|
613
|
+
return CometChat.isAIFeatureEnabled(feature.getExtensionId())
|
|
614
|
+
.then((response) => {
|
|
615
|
+
if (response) {
|
|
616
|
+
feature === null || feature === void 0 ? void 0 : feature.enable();
|
|
617
|
+
if (feature.getExtensionId() !== "conversation-starter") {
|
|
618
|
+
features[feature.getExtensionId()] = {
|
|
619
|
+
enabled: true,
|
|
620
|
+
configuration: feature.getConfiguration(),
|
|
621
|
+
enabler: feature,
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
})
|
|
626
|
+
.catch((err) => {
|
|
627
|
+
console.error(err);
|
|
628
|
+
});
|
|
629
|
+
};
|
|
630
|
+
if (this.defaultAIFeatures && this.defaultAIFeatures.length >= 1) {
|
|
631
|
+
const promises = this.defaultAIFeatures.map((feature) => processFeatures(feature));
|
|
632
|
+
Promise.all(promises)
|
|
633
|
+
.then(() => {
|
|
634
|
+
if (Object.keys(features).length > 0) {
|
|
635
|
+
ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features));
|
|
636
|
+
}
|
|
637
|
+
})
|
|
638
|
+
.catch((err) => {
|
|
639
|
+
console.error(err);
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
else if (((_a = this.defaultAIFeatures) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
const defaultFeatures = [
|
|
647
|
+
new AISmartRepliesExtension(),
|
|
648
|
+
new AIConversationStarterExtension(),
|
|
649
|
+
];
|
|
650
|
+
const promises = defaultFeatures.map((feature) => processFeatures(feature));
|
|
651
|
+
Promise.all(promises)
|
|
652
|
+
.then(() => {
|
|
653
|
+
if (Object.keys(features).length > 0) {
|
|
654
|
+
ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features));
|
|
655
|
+
}
|
|
656
|
+
})
|
|
657
|
+
.catch((err) => {
|
|
658
|
+
console.error(err);
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
505
664
|
class CallingExtensionDecorator extends DataSourceDecorator {
|
|
506
665
|
constructor(dataSource) {
|
|
507
666
|
super(dataSource);
|
|
@@ -1310,128 +1469,6 @@ class ThumbnailGenerationExtension extends ExtensionsDataSource$1 {
|
|
|
1310
1469
|
}
|
|
1311
1470
|
}
|
|
1312
1471
|
|
|
1313
|
-
class AIEnablerDecorator extends DataSourceDecorator {
|
|
1314
|
-
constructor(dataSource, features) {
|
|
1315
|
-
super(dataSource);
|
|
1316
|
-
}
|
|
1317
|
-
getId() {
|
|
1318
|
-
return "aienabler";
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
class AISmartRepliesExtensionDecorator extends DataSourceDecorator {
|
|
1323
|
-
constructor(dataSource) {
|
|
1324
|
-
super(dataSource);
|
|
1325
|
-
}
|
|
1326
|
-
getId() {
|
|
1327
|
-
return "aismartreply";
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
class AISmartRepliesExtension extends AIExtensionDataSource {
|
|
1332
|
-
constructor() {
|
|
1333
|
-
super();
|
|
1334
|
-
}
|
|
1335
|
-
addExtension() {
|
|
1336
|
-
ChatConfigurator.enable((dataSource) => new AISmartRepliesExtensionDecorator(dataSource));
|
|
1337
|
-
}
|
|
1338
|
-
getExtensionId() {
|
|
1339
|
-
return "smart-replies";
|
|
1340
|
-
}
|
|
1341
|
-
enable() {
|
|
1342
|
-
this.addExtension();
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
1347
|
-
constructor(dataSource) {
|
|
1348
|
-
super(dataSource);
|
|
1349
|
-
}
|
|
1350
|
-
getId() {
|
|
1351
|
-
return "aiconversationstarter";
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
class AIConversationStarterExtension extends AIExtensionDataSource {
|
|
1356
|
-
constructor() {
|
|
1357
|
-
super();
|
|
1358
|
-
}
|
|
1359
|
-
addExtension() {
|
|
1360
|
-
ChatConfigurator.enable((dataSource) => new AIConversationStarterDecorator(dataSource));
|
|
1361
|
-
}
|
|
1362
|
-
getExtensionId() {
|
|
1363
|
-
return "conversation-starter";
|
|
1364
|
-
}
|
|
1365
|
-
enable() {
|
|
1366
|
-
this.addExtension();
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
class AIEnabler extends AIExtensionDataSource {
|
|
1371
|
-
constructor(defaultFeatures) {
|
|
1372
|
-
super();
|
|
1373
|
-
this.defaultAIFeatures = defaultFeatures;
|
|
1374
|
-
}
|
|
1375
|
-
addExtension() {
|
|
1376
|
-
}
|
|
1377
|
-
getExtensionId() {
|
|
1378
|
-
return "ai-enabler";
|
|
1379
|
-
}
|
|
1380
|
-
enable() {
|
|
1381
|
-
var _a;
|
|
1382
|
-
let features = {};
|
|
1383
|
-
const processFeatures = (feature) => {
|
|
1384
|
-
return CometChat.isAIFeatureEnabled(feature.getExtensionId())
|
|
1385
|
-
.then((response) => {
|
|
1386
|
-
if (response) {
|
|
1387
|
-
feature === null || feature === void 0 ? void 0 : feature.enable();
|
|
1388
|
-
if (feature.getExtensionId() !== "conversation-starter") {
|
|
1389
|
-
features[feature.getExtensionId()] = {
|
|
1390
|
-
enabled: true,
|
|
1391
|
-
configuration: feature.getConfiguration(),
|
|
1392
|
-
enabler: feature,
|
|
1393
|
-
};
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
})
|
|
1397
|
-
.catch((err) => {
|
|
1398
|
-
console.error(err);
|
|
1399
|
-
});
|
|
1400
|
-
};
|
|
1401
|
-
if (this.defaultAIFeatures && this.defaultAIFeatures.length >= 1) {
|
|
1402
|
-
const promises = this.defaultAIFeatures.map((feature) => processFeatures(feature));
|
|
1403
|
-
Promise.all(promises)
|
|
1404
|
-
.then(() => {
|
|
1405
|
-
if (Object.keys(features).length > 0) {
|
|
1406
|
-
ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features));
|
|
1407
|
-
}
|
|
1408
|
-
})
|
|
1409
|
-
.catch((err) => {
|
|
1410
|
-
console.error(err);
|
|
1411
|
-
});
|
|
1412
|
-
}
|
|
1413
|
-
else if (((_a = this.defaultAIFeatures) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
1414
|
-
return;
|
|
1415
|
-
}
|
|
1416
|
-
else {
|
|
1417
|
-
const defaultFeatures = [
|
|
1418
|
-
new AISmartRepliesExtension(),
|
|
1419
|
-
new AIConversationStarterExtension(),
|
|
1420
|
-
];
|
|
1421
|
-
const promises = defaultFeatures.map((feature) => processFeatures(feature));
|
|
1422
|
-
Promise.all(promises)
|
|
1423
|
-
.then(() => {
|
|
1424
|
-
if (Object.keys(features).length > 0) {
|
|
1425
|
-
ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features));
|
|
1426
|
-
}
|
|
1427
|
-
})
|
|
1428
|
-
.catch((err) => {
|
|
1429
|
-
console.error(err);
|
|
1430
|
-
});
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
1472
|
class CometChatUIKit {
|
|
1436
1473
|
static getDataSource() {
|
|
1437
1474
|
return ChatConfigurator.getDataSource();
|
|
@@ -1457,7 +1494,8 @@ class CometChatUIKit {
|
|
|
1457
1494
|
appSettingsBuilder.overrideClientHost(uiKitSettings.getClientHost());
|
|
1458
1495
|
const appSettings = appSettingsBuilder.build();
|
|
1459
1496
|
return new Promise((resolve, reject) => {
|
|
1460
|
-
CometChat.init(uiKitSettings === null || uiKitSettings === void 0 ? void 0 : uiKitSettings.appId, appSettings)
|
|
1497
|
+
CometChat.init(uiKitSettings === null || uiKitSettings === void 0 ? void 0 : uiKitSettings.appId, appSettings)
|
|
1498
|
+
.then(() => {
|
|
1461
1499
|
var _a;
|
|
1462
1500
|
CometChat.setSource("uikit-v4", "web", "angular");
|
|
1463
1501
|
(_a = CometChatUIKit.getLoggedinUser()) === null || _a === void 0 ? void 0 : _a.then((user) => {
|
|
@@ -1477,9 +1515,11 @@ class CometChatUIKit {
|
|
|
1477
1515
|
}
|
|
1478
1516
|
static getLoggedinUser() {
|
|
1479
1517
|
return new Promise((resolve, reject) => {
|
|
1480
|
-
CometChat.getLoggedinUser()
|
|
1518
|
+
CometChat.getLoggedinUser()
|
|
1519
|
+
.then((user) => {
|
|
1481
1520
|
return resolve(user);
|
|
1482
|
-
})
|
|
1521
|
+
})
|
|
1522
|
+
.catch((error) => {
|
|
1483
1523
|
return reject(error);
|
|
1484
1524
|
})
|
|
1485
1525
|
.catch((error) => {
|
|
@@ -1495,10 +1535,10 @@ class CometChatUIKit {
|
|
|
1495
1535
|
.setRegion((_b = CometChatUIKit.uiKitSettings) === null || _b === void 0 ? void 0 : _b.region)
|
|
1496
1536
|
.build();
|
|
1497
1537
|
CometChatUIKitCalls.init(callAppSetting).then(() => {
|
|
1498
|
-
console.log(
|
|
1538
|
+
console.log("CometChatCalls initialization success");
|
|
1499
1539
|
new CallingExtension().enable();
|
|
1500
1540
|
}, (error) => {
|
|
1501
|
-
console.log(
|
|
1541
|
+
console.log("CometChatCalls initialization failed with error:", error);
|
|
1502
1542
|
});
|
|
1503
1543
|
}
|
|
1504
1544
|
}
|
|
@@ -1507,6 +1547,7 @@ class CometChatUIKit {
|
|
|
1507
1547
|
if (CometChatUIKit.uiKitSettings != null) {
|
|
1508
1548
|
this.enableCalling();
|
|
1509
1549
|
let extensionList = ((_a = this.uiKitSettings) === null || _a === void 0 ? void 0 : _a.extensions) || this.defaultExtensions;
|
|
1550
|
+
ChatSdkEventInitializer.attachListeners();
|
|
1510
1551
|
if (extensionList.length > 0) {
|
|
1511
1552
|
extensionList.forEach((extension) => {
|
|
1512
1553
|
extension === null || extension === void 0 ? void 0 : extension.enable();
|
|
@@ -1533,12 +1574,16 @@ class CometChatUIKit {
|
|
|
1533
1574
|
this.initiateAfterLogin();
|
|
1534
1575
|
}
|
|
1535
1576
|
else {
|
|
1536
|
-
let args = details.uid
|
|
1537
|
-
|
|
1577
|
+
let args = details.uid
|
|
1578
|
+
? [details.uid, CometChatUIKit.uiKitSettings.authKey]
|
|
1579
|
+
: [details.authToken];
|
|
1580
|
+
CometChat.login(...args)
|
|
1581
|
+
.then((user) => {
|
|
1538
1582
|
resolve(user);
|
|
1539
1583
|
ChatConfigurator.init();
|
|
1540
1584
|
this.initiateAfterLogin();
|
|
1541
|
-
})
|
|
1585
|
+
})
|
|
1586
|
+
.catch((error) => {
|
|
1542
1587
|
reject(error);
|
|
1543
1588
|
});
|
|
1544
1589
|
}
|
|
@@ -1553,9 +1598,11 @@ class CometChatUIKit {
|
|
|
1553
1598
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1554
1599
|
return undefined;
|
|
1555
1600
|
return new Promise((resolve, reject) => {
|
|
1556
|
-
CometChat.createUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1601
|
+
CometChat.createUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1602
|
+
.then((user) => {
|
|
1557
1603
|
resolve(user);
|
|
1558
|
-
})
|
|
1604
|
+
})
|
|
1605
|
+
.catch((error) => {
|
|
1559
1606
|
reject(error);
|
|
1560
1607
|
});
|
|
1561
1608
|
});
|
|
@@ -1566,9 +1613,11 @@ class CometChatUIKit {
|
|
|
1566
1613
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1567
1614
|
return undefined;
|
|
1568
1615
|
return new Promise((resolve, reject) => {
|
|
1569
|
-
CometChat.updateUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1616
|
+
CometChat.updateUser(user, CometChatUIKit.uiKitSettings.authKey)
|
|
1617
|
+
.then((user) => {
|
|
1570
1618
|
resolve(user);
|
|
1571
|
-
})
|
|
1619
|
+
})
|
|
1620
|
+
.catch((error) => {
|
|
1572
1621
|
reject(error);
|
|
1573
1622
|
});
|
|
1574
1623
|
});
|
|
@@ -1579,37 +1628,131 @@ class CometChatUIKit {
|
|
|
1579
1628
|
if (!CometChatUIKit.checkAuthSettings())
|
|
1580
1629
|
return undefined;
|
|
1581
1630
|
return new Promise((resolve, reject) => {
|
|
1582
|
-
CometChat.logout()
|
|
1631
|
+
CometChat.logout()
|
|
1632
|
+
.then((message) => {
|
|
1583
1633
|
resolve(message);
|
|
1584
|
-
})
|
|
1634
|
+
})
|
|
1635
|
+
.catch((error) => {
|
|
1585
1636
|
reject(error);
|
|
1586
1637
|
});
|
|
1587
|
-
});
|
|
1638
|
+
});
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
// Error handling to give better logs
|
|
1642
|
+
static checkAuthSettings() {
|
|
1643
|
+
if (CometChatUIKit.uiKitSettings == null) {
|
|
1644
|
+
return false;
|
|
1645
|
+
}
|
|
1646
|
+
if (CometChatUIKit.uiKitSettings.appId == null) {
|
|
1647
|
+
return false;
|
|
1648
|
+
}
|
|
1649
|
+
return true;
|
|
1650
|
+
}
|
|
1651
|
+
/**
|
|
1652
|
+
* Sends a form message and emits events based on the message status.
|
|
1653
|
+
* @param message - The form message to be sent.
|
|
1654
|
+
* @param disableLocalEvents - A boolean indicating whether to disable local events or not. Default value is false.
|
|
1655
|
+
*/
|
|
1656
|
+
static sendFormMessage(message, disableLocalEvents = false) {
|
|
1657
|
+
if (!disableLocalEvents) {
|
|
1658
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1659
|
+
message: message,
|
|
1660
|
+
status: MessageStatus.inprogress,
|
|
1661
|
+
});
|
|
1662
|
+
}
|
|
1663
|
+
CometChat.sendInteractiveMessage(message)
|
|
1664
|
+
.then((message) => {
|
|
1665
|
+
if (!disableLocalEvents) {
|
|
1666
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1667
|
+
message: message,
|
|
1668
|
+
status: MessageStatus.success,
|
|
1669
|
+
});
|
|
1670
|
+
}
|
|
1671
|
+
})
|
|
1672
|
+
.catch((error) => {
|
|
1673
|
+
message.setMetadata({ error });
|
|
1674
|
+
if (!disableLocalEvents) {
|
|
1675
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1676
|
+
message: message,
|
|
1677
|
+
status: MessageStatus.error,
|
|
1678
|
+
});
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1682
|
+
static sendCardMessage(message, disableLocalEvents = false) {
|
|
1683
|
+
if (!disableLocalEvents) {
|
|
1684
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1685
|
+
message: message,
|
|
1686
|
+
status: MessageStatus.inprogress,
|
|
1687
|
+
});
|
|
1688
|
+
}
|
|
1689
|
+
CometChat.sendInteractiveMessage(message)
|
|
1690
|
+
.then((message) => {
|
|
1691
|
+
if (!disableLocalEvents) {
|
|
1692
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1693
|
+
message: message,
|
|
1694
|
+
status: MessageStatus.success,
|
|
1695
|
+
});
|
|
1696
|
+
}
|
|
1697
|
+
})
|
|
1698
|
+
.catch((error) => {
|
|
1699
|
+
message.setMetadata({ error });
|
|
1700
|
+
if (!disableLocalEvents) {
|
|
1701
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1702
|
+
message: message,
|
|
1703
|
+
status: MessageStatus.error,
|
|
1704
|
+
});
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
}
|
|
1708
|
+
static sendCustomInteractiveMessage(message, disableLocalEvents = false) {
|
|
1709
|
+
if (!disableLocalEvents) {
|
|
1710
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1711
|
+
message: message,
|
|
1712
|
+
status: MessageStatus.inprogress,
|
|
1713
|
+
});
|
|
1714
|
+
}
|
|
1715
|
+
CometChat.sendInteractiveMessage(message)
|
|
1716
|
+
.then((message) => {
|
|
1717
|
+
if (!disableLocalEvents) {
|
|
1718
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1719
|
+
message: message,
|
|
1720
|
+
status: MessageStatus.success,
|
|
1721
|
+
});
|
|
1722
|
+
}
|
|
1723
|
+
})
|
|
1724
|
+
.catch((error) => {
|
|
1725
|
+
message.setMetadata({ error });
|
|
1726
|
+
if (!disableLocalEvents) {
|
|
1727
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1728
|
+
message: message,
|
|
1729
|
+
status: MessageStatus.error,
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1588
1732
|
});
|
|
1589
1733
|
}
|
|
1590
|
-
// Error handling to give better logs
|
|
1591
|
-
static checkAuthSettings() {
|
|
1592
|
-
if (CometChatUIKit.uiKitSettings == null) {
|
|
1593
|
-
return false;
|
|
1594
|
-
}
|
|
1595
|
-
if (CometChatUIKit.uiKitSettings.appId == null) {
|
|
1596
|
-
return false;
|
|
1597
|
-
}
|
|
1598
|
-
return true;
|
|
1599
|
-
}
|
|
1600
1734
|
// Helper methods to send messages
|
|
1601
1735
|
// [sendCustomMessage] used to send a custom message
|
|
1602
1736
|
static sendCustomMessage(message) {
|
|
1603
1737
|
return new Promise((resolve, reject) => {
|
|
1604
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1738
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1739
|
+
message: message,
|
|
1740
|
+
status: MessageStatus.inprogress,
|
|
1741
|
+
});
|
|
1605
1742
|
CometChat.sendCustomMessage(message)
|
|
1606
1743
|
.then((message) => {
|
|
1607
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1744
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1745
|
+
message: message,
|
|
1746
|
+
status: MessageStatus.success,
|
|
1747
|
+
});
|
|
1608
1748
|
resolve(message);
|
|
1609
1749
|
})
|
|
1610
1750
|
.catch((error) => {
|
|
1611
1751
|
message.setMetadata({ error: true });
|
|
1612
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1752
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1753
|
+
message: message,
|
|
1754
|
+
status: MessageStatus.error,
|
|
1755
|
+
});
|
|
1613
1756
|
reject(error);
|
|
1614
1757
|
});
|
|
1615
1758
|
});
|
|
@@ -1618,15 +1761,24 @@ class CometChatUIKit {
|
|
|
1618
1761
|
// [sendTextMessage] used to send a custom message
|
|
1619
1762
|
static sendTextMessage(message) {
|
|
1620
1763
|
return new Promise((resolve, reject) => {
|
|
1621
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1764
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1765
|
+
message: message,
|
|
1766
|
+
status: MessageStatus.inprogress,
|
|
1767
|
+
});
|
|
1622
1768
|
CometChat.sendMessage(message)
|
|
1623
1769
|
.then((message) => {
|
|
1624
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1770
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1771
|
+
message: message,
|
|
1772
|
+
status: MessageStatus.success,
|
|
1773
|
+
});
|
|
1625
1774
|
resolve(message);
|
|
1626
1775
|
})
|
|
1627
1776
|
.catch((error) => {
|
|
1628
1777
|
message.setMetadata({ error: true });
|
|
1629
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1778
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1779
|
+
message: message,
|
|
1780
|
+
status: MessageStatus.error,
|
|
1781
|
+
});
|
|
1630
1782
|
reject(error);
|
|
1631
1783
|
});
|
|
1632
1784
|
});
|
|
@@ -1635,15 +1787,24 @@ class CometChatUIKit {
|
|
|
1635
1787
|
// [sendMediaMessage] used to send a custom message
|
|
1636
1788
|
static sendMediaMessage(message) {
|
|
1637
1789
|
return new Promise((resolve, reject) => {
|
|
1638
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1790
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1791
|
+
message: message,
|
|
1792
|
+
status: MessageStatus.inprogress,
|
|
1793
|
+
});
|
|
1639
1794
|
CometChat.sendMediaMessage(message)
|
|
1640
1795
|
.then((message) => {
|
|
1641
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1796
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1797
|
+
message: message,
|
|
1798
|
+
status: MessageStatus.success,
|
|
1799
|
+
});
|
|
1642
1800
|
resolve(message);
|
|
1643
1801
|
})
|
|
1644
1802
|
.catch((error) => {
|
|
1645
1803
|
message.setMetadata({ error: true });
|
|
1646
|
-
CometChatMessageEvents.ccMessageSent.next({
|
|
1804
|
+
CometChatMessageEvents.ccMessageSent.next({
|
|
1805
|
+
message: message,
|
|
1806
|
+
status: MessageStatus.error,
|
|
1807
|
+
});
|
|
1647
1808
|
reject(error);
|
|
1648
1809
|
});
|
|
1649
1810
|
});
|
|
@@ -3998,7 +4159,6 @@ class CometChatMessageHeaderComponent {
|
|
|
3998
4159
|
console.log(error);
|
|
3999
4160
|
};
|
|
4000
4161
|
this.onBack = () => { };
|
|
4001
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
4002
4162
|
this.groupsListenerId = "groupsList_" + new Date().getTime();
|
|
4003
4163
|
this.userListenerId = "userlist_" + new Date().getTime();
|
|
4004
4164
|
this.subtitleText = "";
|
|
@@ -4260,16 +4420,14 @@ class CometChatMessageHeaderComponent {
|
|
|
4260
4420
|
}));
|
|
4261
4421
|
}
|
|
4262
4422
|
if (!this.disableTyping) {
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
},
|
|
4272
|
-
}));
|
|
4423
|
+
this.onTypingStarted = CometChatMessageEvents.onTypingStarted.subscribe((typingIndicator) => {
|
|
4424
|
+
this.isTyping = true;
|
|
4425
|
+
this.setTypingIndicatorText(typingIndicator);
|
|
4426
|
+
});
|
|
4427
|
+
this.onTypingEnded = CometChatMessageEvents.onTypingEnded.subscribe((typingIndicator) => {
|
|
4428
|
+
this.isTyping = false;
|
|
4429
|
+
this.updateSubtitle();
|
|
4430
|
+
});
|
|
4273
4431
|
}
|
|
4274
4432
|
CometChat.addGroupListener(this.groupsListenerId, new CometChat.GroupListener({
|
|
4275
4433
|
onGroupMemberScopeChanged: (message, changedUser, newScope, oldScope, changedGroup) => {
|
|
@@ -4326,8 +4484,10 @@ class CometChatMessageHeaderComponent {
|
|
|
4326
4484
|
}
|
|
4327
4485
|
}
|
|
4328
4486
|
removeListener() {
|
|
4329
|
-
|
|
4487
|
+
var _a, _b;
|
|
4330
4488
|
CometChat.removeUserListener(this.userListenerId);
|
|
4489
|
+
(_a = this.onTypingStarted) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
4490
|
+
(_b = this.onTypingEnded) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
4331
4491
|
}
|
|
4332
4492
|
ngOnDestroy() {
|
|
4333
4493
|
this.removeListener();
|
|
@@ -5105,7 +5265,6 @@ class CometChatConversationsComponent {
|
|
|
5105
5265
|
this.checkItemChange = false;
|
|
5106
5266
|
this.showConfirmDialog = false;
|
|
5107
5267
|
this.conversationToBeDeleted = null;
|
|
5108
|
-
this.conversationListenerId = "chatlist_" + new Date().getTime();
|
|
5109
5268
|
this.userListenerId = "chatlist_user_" + new Date().getTime();
|
|
5110
5269
|
this.groupListenerId = "chatlist_group_" + new Date().getTime();
|
|
5111
5270
|
this.groupToUpdate = {};
|
|
@@ -5289,6 +5448,7 @@ class CometChatConversationsComponent {
|
|
|
5289
5448
|
case CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED:
|
|
5290
5449
|
case CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED:
|
|
5291
5450
|
case CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED:
|
|
5451
|
+
case CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED:
|
|
5292
5452
|
if (!this.disableReceipt) {
|
|
5293
5453
|
this.markMessageAsDelivered(message);
|
|
5294
5454
|
}
|
|
@@ -5864,43 +6024,6 @@ class CometChatConversationsComponent {
|
|
|
5864
6024
|
this.updateConversation(message);
|
|
5865
6025
|
},
|
|
5866
6026
|
}));
|
|
5867
|
-
CometChat.addMessageListener(this.conversationListenerId, new CometChat.MessageListener({
|
|
5868
|
-
onTextMessageReceived: (textMessage) => {
|
|
5869
|
-
callback(CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED, null, textMessage);
|
|
5870
|
-
},
|
|
5871
|
-
onMediaMessageReceived: (mediaMessage) => {
|
|
5872
|
-
callback(CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED, null, mediaMessage);
|
|
5873
|
-
},
|
|
5874
|
-
onCustomMessageReceived: (customMessage) => {
|
|
5875
|
-
callback(CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED, null, customMessage);
|
|
5876
|
-
},
|
|
5877
|
-
onMessagesRead: (messageReceipt) => {
|
|
5878
|
-
if (!this.disableReceipt) {
|
|
5879
|
-
this.markAsRead(messageReceipt);
|
|
5880
|
-
}
|
|
5881
|
-
},
|
|
5882
|
-
onMessageDeleted: (deletedMessage) => {
|
|
5883
|
-
callback(CometChatUIKitConstants.messages.MESSAGE_DELETED, null, deletedMessage);
|
|
5884
|
-
},
|
|
5885
|
-
onMessageEdited: (editedMessage) => {
|
|
5886
|
-
callback(CometChatUIKitConstants.messages.MESSAGE_EDITED, null, editedMessage);
|
|
5887
|
-
},
|
|
5888
|
-
onMessagesDelivered: (messageReceipt) => {
|
|
5889
|
-
if (!this.disableReceipt) {
|
|
5890
|
-
this.updateDeliveredMessage(messageReceipt);
|
|
5891
|
-
}
|
|
5892
|
-
},
|
|
5893
|
-
onTypingStarted: (typingIndicator) => {
|
|
5894
|
-
if (!this.disableTyping) {
|
|
5895
|
-
this.typingIndicator = typingIndicator;
|
|
5896
|
-
this.ref.detectChanges();
|
|
5897
|
-
}
|
|
5898
|
-
},
|
|
5899
|
-
onTypingEnded: (typingIndicator) => {
|
|
5900
|
-
this.typingIndicator = null;
|
|
5901
|
-
this.ref.detectChanges();
|
|
5902
|
-
}
|
|
5903
|
-
}));
|
|
5904
6027
|
CometChat.addCallListener(this.callListenerId, new CometChat.CallListener({
|
|
5905
6028
|
onIncomingCallReceived: (call) => {
|
|
5906
6029
|
this.updateConversation(call);
|
|
@@ -5918,6 +6041,58 @@ class CometChatConversationsComponent {
|
|
|
5918
6041
|
this.updateConversation(call);
|
|
5919
6042
|
}
|
|
5920
6043
|
}));
|
|
6044
|
+
// SDK listeners
|
|
6045
|
+
this.onTextMessageReceived =
|
|
6046
|
+
CometChatMessageEvents.onTextMessageReceived.subscribe((textMessage) => {
|
|
6047
|
+
callback(CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED, null, textMessage);
|
|
6048
|
+
});
|
|
6049
|
+
this.onMediaMessageReceived =
|
|
6050
|
+
CometChatMessageEvents.onMediaMessageReceived.subscribe((mediaMessage) => {
|
|
6051
|
+
callback(CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED, null, mediaMessage);
|
|
6052
|
+
});
|
|
6053
|
+
this.onCustomMessageReceived =
|
|
6054
|
+
CometChatMessageEvents.onCustomMessageReceived.subscribe((customMessage) => {
|
|
6055
|
+
callback(CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED, null, customMessage);
|
|
6056
|
+
});
|
|
6057
|
+
this.onFormMessageReceived =
|
|
6058
|
+
CometChatMessageEvents.onFormMessageReceived.subscribe((formMessage) => {
|
|
6059
|
+
callback(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, null, formMessage);
|
|
6060
|
+
});
|
|
6061
|
+
this.onCardMessageReceived =
|
|
6062
|
+
CometChatMessageEvents.onCardMessageReceived.subscribe((cardMessage) => {
|
|
6063
|
+
callback(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, null, cardMessage);
|
|
6064
|
+
});
|
|
6065
|
+
this.onCustomInteractiveMessageReceived =
|
|
6066
|
+
CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((customMessage) => {
|
|
6067
|
+
callback(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, null, customMessage);
|
|
6068
|
+
});
|
|
6069
|
+
this.onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt) => {
|
|
6070
|
+
if (!this.disableReceipt) {
|
|
6071
|
+
this.markAsRead(messageReceipt);
|
|
6072
|
+
}
|
|
6073
|
+
});
|
|
6074
|
+
this.onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe((deletedMessage) => {
|
|
6075
|
+
callback(CometChatUIKitConstants.messages.MESSAGE_DELETED, null, deletedMessage);
|
|
6076
|
+
});
|
|
6077
|
+
this.onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe((editedMessage) => {
|
|
6078
|
+
callback(CometChatUIKitConstants.messages.MESSAGE_EDITED, null, editedMessage);
|
|
6079
|
+
});
|
|
6080
|
+
this.onMessagesDelivered =
|
|
6081
|
+
CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt) => {
|
|
6082
|
+
if (!this.disableReceipt) {
|
|
6083
|
+
this.updateDeliveredMessage(messageReceipt);
|
|
6084
|
+
}
|
|
6085
|
+
});
|
|
6086
|
+
this.onTypingStarted = CometChatMessageEvents.onTypingStarted.subscribe((typingIndicator) => {
|
|
6087
|
+
if (!this.disableTyping) {
|
|
6088
|
+
this.typingIndicator = typingIndicator;
|
|
6089
|
+
this.ref.detectChanges();
|
|
6090
|
+
}
|
|
6091
|
+
});
|
|
6092
|
+
this.onTypingEnded = CometChatMessageEvents.onTypingEnded.subscribe((typingIndicator) => {
|
|
6093
|
+
this.typingIndicator = null;
|
|
6094
|
+
this.ref.detectChanges();
|
|
6095
|
+
});
|
|
5921
6096
|
}
|
|
5922
6097
|
catch (error) {
|
|
5923
6098
|
if (this.onError) {
|
|
@@ -5934,11 +6109,23 @@ class CometChatConversationsComponent {
|
|
|
5934
6109
|
* Removes all listeners
|
|
5935
6110
|
*/
|
|
5936
6111
|
removeListeners() {
|
|
6112
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
5937
6113
|
try {
|
|
5938
|
-
CometChat.removeMessageListener(this.conversationListenerId);
|
|
5939
6114
|
CometChat.removeUserListener(this.userListenerId);
|
|
5940
6115
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
5941
6116
|
CometChat.removeConnectionListener(this.connectionListenerId);
|
|
6117
|
+
(_a = this.onTextMessageReceived) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
6118
|
+
(_b = this.onMediaMessageReceived) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
6119
|
+
(_c = this.onCustomMessageReceived) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
6120
|
+
(_d = this.onFormMessageReceived) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
6121
|
+
(_e = this.onCardMessageReceived) === null || _e === void 0 ? void 0 : _e.unsubscribe();
|
|
6122
|
+
(_f = this.onCustomInteractiveMessageReceived) === null || _f === void 0 ? void 0 : _f.unsubscribe();
|
|
6123
|
+
(_g = this.onMessagesRead) === null || _g === void 0 ? void 0 : _g.unsubscribe();
|
|
6124
|
+
(_h = this.onMessageDeleted) === null || _h === void 0 ? void 0 : _h.unsubscribe();
|
|
6125
|
+
(_j = this.onMessageEdited) === null || _j === void 0 ? void 0 : _j.unsubscribe();
|
|
6126
|
+
(_k = this.onMessagesDelivered) === null || _k === void 0 ? void 0 : _k.unsubscribe();
|
|
6127
|
+
(_l = this.onTypingStarted) === null || _l === void 0 ? void 0 : _l.unsubscribe();
|
|
6128
|
+
(_m = this.onTypingEnded) === null || _m === void 0 ? void 0 : _m.unsubscribe();
|
|
5942
6129
|
}
|
|
5943
6130
|
catch (error) {
|
|
5944
6131
|
if (this.onError) {
|
|
@@ -6632,7 +6819,6 @@ class CometChatMessageInformationComponent {
|
|
|
6632
6819
|
});
|
|
6633
6820
|
this.isUserType = false;
|
|
6634
6821
|
this.deliveredReceipt = Receipts.delivered;
|
|
6635
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
6636
6822
|
this.readReceipt = Receipts.read;
|
|
6637
6823
|
this.listStyle = {};
|
|
6638
6824
|
this.messageText = localize("MESSAGE");
|
|
@@ -6749,26 +6935,25 @@ class CometChatMessageInformationComponent {
|
|
|
6749
6935
|
this.messageInformationStyle = Object.assign(Object.assign({}, defaultStyle), this.messageInformationStyle);
|
|
6750
6936
|
}
|
|
6751
6937
|
ngOnDestroy() {
|
|
6752
|
-
|
|
6938
|
+
this.onMessagesDelivered.unsubscribe();
|
|
6939
|
+
this.onMessagesRead.unsubscribe();
|
|
6753
6940
|
}
|
|
6754
6941
|
addMessageEventListeners() {
|
|
6755
6942
|
try {
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
this.ref.detectChanges();
|
|
6762
|
-
}
|
|
6763
|
-
},
|
|
6764
|
-
onMessagesRead: (messageReceipt) => {
|
|
6765
|
-
var _a, _b;
|
|
6766
|
-
if (((_a = this.message) === null || _a === void 0 ? void 0 : _a.getId()) == Number(messageReceipt.getMessageId())) {
|
|
6767
|
-
(_b = this.message) === null || _b === void 0 ? void 0 : _b.setReadAt(messageReceipt.getReadAt());
|
|
6768
|
-
this.ref.detectChanges();
|
|
6769
|
-
}
|
|
6943
|
+
this.onMessagesDelivered = CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt) => {
|
|
6944
|
+
var _a, _b;
|
|
6945
|
+
if (((_a = this.message) === null || _a === void 0 ? void 0 : _a.getId()) == Number(messageReceipt.getMessageId())) {
|
|
6946
|
+
(_b = this.message) === null || _b === void 0 ? void 0 : _b.setDeliveredAt(messageReceipt.getDeliveredAt());
|
|
6947
|
+
this.ref.detectChanges();
|
|
6770
6948
|
}
|
|
6771
|
-
})
|
|
6949
|
+
});
|
|
6950
|
+
this.onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt) => {
|
|
6951
|
+
var _a, _b;
|
|
6952
|
+
if (((_a = this.message) === null || _a === void 0 ? void 0 : _a.getId()) == Number(messageReceipt.getMessageId())) {
|
|
6953
|
+
(_b = this.message) === null || _b === void 0 ? void 0 : _b.setReadAt(messageReceipt.getReadAt());
|
|
6954
|
+
this.ref.detectChanges();
|
|
6955
|
+
}
|
|
6956
|
+
});
|
|
6772
6957
|
}
|
|
6773
6958
|
catch (error) {
|
|
6774
6959
|
if (this.onError) {
|
|
@@ -7029,7 +7214,6 @@ class CometChatMessageListComponent {
|
|
|
7029
7214
|
this.typesMap = {};
|
|
7030
7215
|
this.messageTypesMap = {};
|
|
7031
7216
|
this.theme = new CometChatTheme({});
|
|
7032
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
7033
7217
|
this.groupListenerId = "group_" + new Date().getTime();
|
|
7034
7218
|
this.callListenerId = "call_" + new Date().getTime();
|
|
7035
7219
|
this.states = States;
|
|
@@ -7369,6 +7553,16 @@ class CometChatMessageListComponent {
|
|
|
7369
7553
|
}
|
|
7370
7554
|
this.requestBuilder.fetchPrevious().then((messageList) => {
|
|
7371
7555
|
var _a, _b;
|
|
7556
|
+
if (messageList && messageList.length > 0) {
|
|
7557
|
+
messageList = messageList.map((message, i) => {
|
|
7558
|
+
if (message.getCategory() === CometChatUIKitConstants.MessageCategory.interactive) {
|
|
7559
|
+
return InteractiveMessageUtils.convertInteractiveMessage(message);
|
|
7560
|
+
}
|
|
7561
|
+
else {
|
|
7562
|
+
return message;
|
|
7563
|
+
}
|
|
7564
|
+
});
|
|
7565
|
+
}
|
|
7372
7566
|
this.state = States.loading;
|
|
7373
7567
|
// No Messages Found
|
|
7374
7568
|
if (messageList.length === 0 && this.messagesList.length === 0) {
|
|
@@ -7490,6 +7684,16 @@ class CometChatMessageListComponent {
|
|
|
7490
7684
|
}
|
|
7491
7685
|
this.requestBuilder.fetchNext().then((messageList) => {
|
|
7492
7686
|
var _a, _b, _c;
|
|
7687
|
+
if (messageList && messageList.length > 0) {
|
|
7688
|
+
messageList = messageList.map((message, i) => {
|
|
7689
|
+
if (message.getCategory() === CometChatUIKitConstants.MessageCategory.interactive) {
|
|
7690
|
+
return InteractiveMessageUtils.convertInteractiveMessage(message);
|
|
7691
|
+
}
|
|
7692
|
+
else {
|
|
7693
|
+
return message;
|
|
7694
|
+
}
|
|
7695
|
+
});
|
|
7696
|
+
}
|
|
7493
7697
|
this.state = States.loading;
|
|
7494
7698
|
// No Messages Found
|
|
7495
7699
|
if (messageList.length === 0 && this.messagesList.length === 0) {
|
|
@@ -7673,13 +7877,24 @@ class CometChatMessageListComponent {
|
|
|
7673
7877
|
return callSettings;
|
|
7674
7878
|
};
|
|
7675
7879
|
this.reInitializeMessageBuilder = () => {
|
|
7880
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
7676
7881
|
if (!this.parentMessageId) {
|
|
7677
7882
|
this.messageCount = 0;
|
|
7678
7883
|
}
|
|
7679
7884
|
this.requestBuilder = null;
|
|
7680
|
-
CometChat.removeMessageListener(this.msgListenerId);
|
|
7681
7885
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
7682
7886
|
CometChat.removeCallListener(this.callListenerId);
|
|
7887
|
+
(_a = this.onTextMessageReceived) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
7888
|
+
(_b = this.onMediaMessageReceived) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
7889
|
+
(_c = this.onCustomMessageReceived) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
7890
|
+
(_d = this.onFormMessageReceived) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
7891
|
+
(_e = this.onCardMessageReceived) === null || _e === void 0 ? void 0 : _e.unsubscribe();
|
|
7892
|
+
(_f = this.onCustomInteractiveMessageReceived) === null || _f === void 0 ? void 0 : _f.unsubscribe();
|
|
7893
|
+
(_g = this.onMessagesDelivered) === null || _g === void 0 ? void 0 : _g.unsubscribe();
|
|
7894
|
+
(_h = this.onMessagesRead) === null || _h === void 0 ? void 0 : _h.unsubscribe();
|
|
7895
|
+
(_j = this.onMessageDeleted) === null || _j === void 0 ? void 0 : _j.unsubscribe();
|
|
7896
|
+
(_k = this.onMessageEdited) === null || _k === void 0 ? void 0 : _k.unsubscribe();
|
|
7897
|
+
(_l = this.onTransientMessageReceived) === null || _l === void 0 ? void 0 : _l.unsubscribe();
|
|
7683
7898
|
this.reInitializeMessageList();
|
|
7684
7899
|
};
|
|
7685
7900
|
/**
|
|
@@ -7717,6 +7932,19 @@ class CometChatMessageListComponent {
|
|
|
7717
7932
|
}
|
|
7718
7933
|
}
|
|
7719
7934
|
};
|
|
7935
|
+
this.updateInteractiveMessage = (receipt) => {
|
|
7936
|
+
if ((this.loggedInUser.getUid() === receipt.getSender().getUid())) {
|
|
7937
|
+
const message = this.getMessageById(receipt.getMessageId());
|
|
7938
|
+
if (message) {
|
|
7939
|
+
if (String(message === null || message === void 0 ? void 0 : message.getId()) ==
|
|
7940
|
+
String(receipt.getMessageId())) {
|
|
7941
|
+
const interaction = receipt.getInteractions();
|
|
7942
|
+
message.setInteractions(interaction);
|
|
7943
|
+
this.updateEditedMessage(InteractiveMessageUtils.convertInteractiveMessage(message));
|
|
7944
|
+
}
|
|
7945
|
+
}
|
|
7946
|
+
}
|
|
7947
|
+
};
|
|
7720
7948
|
/**
|
|
7721
7949
|
* Emits an Action Indicating that a message was deleted by the user/person you are chatting with
|
|
7722
7950
|
* @param {CometChat.BaseMessage} message
|
|
@@ -7992,6 +8220,7 @@ class CometChatMessageListComponent {
|
|
|
7992
8220
|
}
|
|
7993
8221
|
}
|
|
7994
8222
|
ngOnChanges(changes) {
|
|
8223
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
7995
8224
|
try {
|
|
7996
8225
|
if (changes[CometChatUIKitConstants.MessageReceiverType.user] || changes[CometChatUIKitConstants.MessageReceiverType.group]) {
|
|
7997
8226
|
this.showConversationStarter = false;
|
|
@@ -8043,10 +8272,19 @@ class CometChatMessageListComponent {
|
|
|
8043
8272
|
}
|
|
8044
8273
|
}
|
|
8045
8274
|
//Removing Previous Conversation Listeners
|
|
8046
|
-
|
|
8275
|
+
(_a = this.onTextMessageReceived) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
8276
|
+
(_b = this.onMediaMessageReceived) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
8277
|
+
(_c = this.onCustomMessageReceived) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
8278
|
+
(_d = this.onFormMessageReceived) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
8279
|
+
(_e = this.onCardMessageReceived) === null || _e === void 0 ? void 0 : _e.unsubscribe();
|
|
8280
|
+
(_f = this.onCustomInteractiveMessageReceived) === null || _f === void 0 ? void 0 : _f.unsubscribe();
|
|
8281
|
+
(_g = this.onMessagesDelivered) === null || _g === void 0 ? void 0 : _g.unsubscribe();
|
|
8282
|
+
(_h = this.onMessagesRead) === null || _h === void 0 ? void 0 : _h.unsubscribe();
|
|
8283
|
+
(_j = this.onMessageDeleted) === null || _j === void 0 ? void 0 : _j.unsubscribe();
|
|
8284
|
+
(_k = this.onMessageEdited) === null || _k === void 0 ? void 0 : _k.unsubscribe();
|
|
8285
|
+
(_l = this.onTransientMessageReceived) === null || _l === void 0 ? void 0 : _l.unsubscribe();
|
|
8047
8286
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
8048
8287
|
CometChat.removeCallListener(this.callListenerId);
|
|
8049
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
8050
8288
|
this.groupListenerId = "group_" + new Date().getTime();
|
|
8051
8289
|
this.callListenerId = "call_" + new Date().getTime();
|
|
8052
8290
|
// Attach MessageListeners for the new conversation
|
|
@@ -8200,13 +8438,24 @@ class CometChatMessageListComponent {
|
|
|
8200
8438
|
}
|
|
8201
8439
|
}
|
|
8202
8440
|
ngOnDestroy() {
|
|
8441
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
8203
8442
|
this.showConversationStarter = false;
|
|
8204
8443
|
this.unsubscribeToEvents();
|
|
8205
8444
|
try {
|
|
8206
8445
|
//Removing Message Listeners
|
|
8207
|
-
CometChat.removeMessageListener(this.msgListenerId);
|
|
8208
8446
|
CometChat.removeGroupListener(this.groupListenerId);
|
|
8209
8447
|
CometChat.removeCallListener(this.callListenerId);
|
|
8448
|
+
(_a = this.onTextMessageReceived) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
8449
|
+
(_b = this.onMediaMessageReceived) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
8450
|
+
(_c = this.onCustomMessageReceived) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
8451
|
+
(_d = this.onFormMessageReceived) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
8452
|
+
(_e = this.onCardMessageReceived) === null || _e === void 0 ? void 0 : _e.unsubscribe();
|
|
8453
|
+
(_f = this.onCustomInteractiveMessageReceived) === null || _f === void 0 ? void 0 : _f.unsubscribe();
|
|
8454
|
+
(_g = this.onMessagesDelivered) === null || _g === void 0 ? void 0 : _g.unsubscribe();
|
|
8455
|
+
(_h = this.onMessagesRead) === null || _h === void 0 ? void 0 : _h.unsubscribe();
|
|
8456
|
+
(_j = this.onMessageDeleted) === null || _j === void 0 ? void 0 : _j.unsubscribe();
|
|
8457
|
+
(_k = this.onMessageEdited) === null || _k === void 0 ? void 0 : _k.unsubscribe();
|
|
8458
|
+
(_l = this.onTransientMessageReceived) === null || _l === void 0 ? void 0 : _l.unsubscribe();
|
|
8210
8459
|
}
|
|
8211
8460
|
catch (error) {
|
|
8212
8461
|
if (this.onError) {
|
|
@@ -8271,7 +8520,7 @@ class CometChatMessageListComponent {
|
|
|
8271
8520
|
CometChatUIEvents.ccOpenChat.next({ user: messageObject.getSender() });
|
|
8272
8521
|
}
|
|
8273
8522
|
getMessageById(id) {
|
|
8274
|
-
let messageKey = this.messagesList.findIndex((m) => m.getId()
|
|
8523
|
+
let messageKey = this.messagesList.findIndex((m) => m.getId() == id);
|
|
8275
8524
|
if (messageKey > -1) {
|
|
8276
8525
|
return this.messagesList[messageKey];
|
|
8277
8526
|
}
|
|
@@ -8407,6 +8656,12 @@ class CometChatMessageListComponent {
|
|
|
8407
8656
|
border: `1px solid ${this.themeService.theme.palette.getAccent100()}`
|
|
8408
8657
|
};
|
|
8409
8658
|
}
|
|
8659
|
+
else if (!(msg === null || msg === void 0 ? void 0 : msg.getDeletedAt()) && (msg === null || msg === void 0 ? void 0 : msg.getCategory()) === CometChatUIKitConstants.MessageCategory.interactive) {
|
|
8660
|
+
return {
|
|
8661
|
+
background: this.themeService.theme.palette.getAccent100(),
|
|
8662
|
+
width: "300px"
|
|
8663
|
+
};
|
|
8664
|
+
}
|
|
8410
8665
|
else {
|
|
8411
8666
|
if ((msg === null || msg === void 0 ? void 0 : msg.getSender()) && (msg === null || msg === void 0 ? void 0 : msg.getSender().getUid()) != this.loggedInUser.getUid()) {
|
|
8412
8667
|
style = {
|
|
@@ -8499,6 +8754,154 @@ class CometChatMessageListComponent {
|
|
|
8499
8754
|
return null;
|
|
8500
8755
|
}
|
|
8501
8756
|
}
|
|
8757
|
+
getFormMessageBubbleStyle() {
|
|
8758
|
+
const textStyle = new InputStyle({
|
|
8759
|
+
width: "100%",
|
|
8760
|
+
height: "30px",
|
|
8761
|
+
border: `1px solid ${this.themeService.theme.palette.getAccent100()}`,
|
|
8762
|
+
borderRadius: "3px",
|
|
8763
|
+
padding: "0px 0px 0px 5px",
|
|
8764
|
+
placeholderTextColor: this.themeService.theme.palette.getAccent400(),
|
|
8765
|
+
placeholderTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8766
|
+
textFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8767
|
+
textColor: this.themeService.theme.palette.getAccent(),
|
|
8768
|
+
background: this.themeService.theme.palette.getBackground()
|
|
8769
|
+
});
|
|
8770
|
+
const labelStyle = new LabelStyle({
|
|
8771
|
+
textFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
8772
|
+
textColor: this.themeService.theme.palette.getAccent(),
|
|
8773
|
+
background: "transparent"
|
|
8774
|
+
});
|
|
8775
|
+
const radioButtonStyle = new RadioButtonStyle({
|
|
8776
|
+
height: "16px",
|
|
8777
|
+
width: "16px",
|
|
8778
|
+
border: "none",
|
|
8779
|
+
labelTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8780
|
+
labelTextColor: this.themeService.theme.palette.getAccent600(),
|
|
8781
|
+
borderRadius: "4px",
|
|
8782
|
+
background: "",
|
|
8783
|
+
});
|
|
8784
|
+
const checkboxStyle = new CheckboxStyle({
|
|
8785
|
+
height: "16px",
|
|
8786
|
+
width: "16px",
|
|
8787
|
+
border: "none",
|
|
8788
|
+
borderRadius: "4px",
|
|
8789
|
+
background: "",
|
|
8790
|
+
labelTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8791
|
+
labelTextColor: this.themeService.theme.palette.getAccent600(),
|
|
8792
|
+
});
|
|
8793
|
+
const dropdownStyle = new DropdownStyle({
|
|
8794
|
+
height: "35px",
|
|
8795
|
+
width: "100%",
|
|
8796
|
+
background: this.themeService.theme.palette.getBackground(),
|
|
8797
|
+
border: `1px solid ${this.themeService.theme.palette.getAccent100()}`,
|
|
8798
|
+
borderRadius: "12px",
|
|
8799
|
+
activeTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8800
|
+
activeTextColor: this.themeService.theme.palette.getAccent(),
|
|
8801
|
+
arrowIconTint: this.themeService.theme.palette.getAccent700(),
|
|
8802
|
+
textFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8803
|
+
textColor: this.themeService.theme.palette.getAccent(),
|
|
8804
|
+
optionBackground: this.themeService.theme.palette.getBackground(),
|
|
8805
|
+
optionBorder: `1px solid ${this.themeService.theme.palette.getAccent100()}`,
|
|
8806
|
+
optionHoverBorder: `1px solid ${this.themeService.theme.palette.getAccent100()}`,
|
|
8807
|
+
hoverTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8808
|
+
hoverTextColor: this.themeService.theme.palette.getAccent(),
|
|
8809
|
+
hoverTextBackground: this.themeService.theme.palette.getAccent100(),
|
|
8810
|
+
});
|
|
8811
|
+
const buttonGroupStyle = {
|
|
8812
|
+
height: "40px",
|
|
8813
|
+
width: "100%",
|
|
8814
|
+
background: this.themeService.theme.palette.getPrimary(),
|
|
8815
|
+
border: `none`,
|
|
8816
|
+
borderRadius: "12px",
|
|
8817
|
+
buttonTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8818
|
+
buttonTextColor: this.themeService.theme.palette.getBackground(),
|
|
8819
|
+
justifyContent: "center",
|
|
8820
|
+
};
|
|
8821
|
+
const singleSelectStyle = new SingleSelectStyle({
|
|
8822
|
+
height: "100%",
|
|
8823
|
+
width: "100%",
|
|
8824
|
+
background: this.themeService.theme.palette.getBackground(),
|
|
8825
|
+
border: "none",
|
|
8826
|
+
borderRadius: "12px",
|
|
8827
|
+
activeTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8828
|
+
activeTextColor: this.themeService.theme.palette.getAccent(),
|
|
8829
|
+
activeTextBackground: this.themeService.theme.palette.getAccent100(),
|
|
8830
|
+
textFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8831
|
+
textColor: this.themeService.theme.palette.getAccent(),
|
|
8832
|
+
optionBackground: this.themeService.theme.palette.getBackground(),
|
|
8833
|
+
optionBorder: `1px solid ${this.themeService.theme.palette.getAccent100()}`,
|
|
8834
|
+
optionBorderRadius: "2px",
|
|
8835
|
+
hoverTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8836
|
+
hoverTextColor: this.themeService.theme.palette.getAccent(),
|
|
8837
|
+
hoverTextBackground: this.themeService.theme.palette.getAccent100(),
|
|
8838
|
+
});
|
|
8839
|
+
const quickViewStyle = new QuickViewStyle({
|
|
8840
|
+
background: "transparent",
|
|
8841
|
+
height: "fit-content",
|
|
8842
|
+
width: "100%",
|
|
8843
|
+
titleFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8844
|
+
titleColor: this.themeService.theme.palette.getPrimary(),
|
|
8845
|
+
subtitleFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8846
|
+
subtitleColor: this.themeService.theme.palette.getAccent600(),
|
|
8847
|
+
leadingBarTint: this.themeService.theme.palette.getPrimary(),
|
|
8848
|
+
leadingBarWidth: "4px",
|
|
8849
|
+
borderRadius: "8px",
|
|
8850
|
+
});
|
|
8851
|
+
return new FormBubbleStyle({
|
|
8852
|
+
width: "300px",
|
|
8853
|
+
height: "fit-content",
|
|
8854
|
+
border: "none",
|
|
8855
|
+
background: "transparent",
|
|
8856
|
+
wrapperBackground: this.themeService.theme.palette.getBackground(),
|
|
8857
|
+
borderRadius: "8px",
|
|
8858
|
+
wrapperBorderRadius: "8px",
|
|
8859
|
+
textInputStyle: textStyle,
|
|
8860
|
+
labelStyle: labelStyle,
|
|
8861
|
+
radioButtonStyle: radioButtonStyle,
|
|
8862
|
+
checkboxStyle: checkboxStyle,
|
|
8863
|
+
dropdownStyle: dropdownStyle,
|
|
8864
|
+
buttonStyle: buttonGroupStyle,
|
|
8865
|
+
singleSelectStyle: singleSelectStyle,
|
|
8866
|
+
quickViewStyle: quickViewStyle,
|
|
8867
|
+
titleColor: this.themeService.theme.palette.getAccent(),
|
|
8868
|
+
titleFont: fontHelper(this.themeService.theme.typography.title1),
|
|
8869
|
+
goalCompletionTextColor: this.themeService.theme.palette.getAccent(),
|
|
8870
|
+
goalCompletionTextFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
8871
|
+
wrapperPadding: "2px",
|
|
8872
|
+
});
|
|
8873
|
+
}
|
|
8874
|
+
;
|
|
8875
|
+
getCardMessageBubbleStyle() {
|
|
8876
|
+
const buttonStyle = {
|
|
8877
|
+
height: "40px",
|
|
8878
|
+
width: "100%",
|
|
8879
|
+
background: "transparent",
|
|
8880
|
+
border: `none`,
|
|
8881
|
+
borderRadius: "0px",
|
|
8882
|
+
buttonTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8883
|
+
buttonTextColor: `${this.themeService.theme.palette.getPrimary()}`,
|
|
8884
|
+
justifyContent: "center",
|
|
8885
|
+
};
|
|
8886
|
+
return new CardBubbleStyle({
|
|
8887
|
+
background: "transparent",
|
|
8888
|
+
borderRadius: "8px",
|
|
8889
|
+
height: "fit-content",
|
|
8890
|
+
width: "300px",
|
|
8891
|
+
imageHeight: "auto",
|
|
8892
|
+
imageWidth: "100%",
|
|
8893
|
+
imageRadius: "8px",
|
|
8894
|
+
imageBackgroundColor: "transparent",
|
|
8895
|
+
descriptionFontColor: this.themeService.theme.palette.getAccent(),
|
|
8896
|
+
descriptionFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
8897
|
+
buttonStyle: buttonStyle,
|
|
8898
|
+
dividerTintColor: this.themeService.theme.palette.getAccent100(),
|
|
8899
|
+
wrapperBackground: this.themeService.theme.palette.getBackground(),
|
|
8900
|
+
wrapperBorderRadius: "8px",
|
|
8901
|
+
wrapperPadding: "2px",
|
|
8902
|
+
disabledButtonColor: this.themeService.theme.palette.getAccent600()
|
|
8903
|
+
});
|
|
8904
|
+
}
|
|
8502
8905
|
getCallBubbleStyle(message) {
|
|
8503
8906
|
var isLeftAligned = this.alignment == MessageListAlignment.left;
|
|
8504
8907
|
var isUserSentMessage = !(message === null || message === void 0 ? void 0 : message.getSender()) || this.loggedInUser.getUid() === (message === null || message === void 0 ? void 0 : message.getSender().getUid());
|
|
@@ -8592,7 +8995,9 @@ class CometChatMessageListComponent {
|
|
|
8592
8995
|
extension_whiteboard: this.whiteboardBubble,
|
|
8593
8996
|
extension_document: this.documentBubble,
|
|
8594
8997
|
extension_poll: this.pollBubble,
|
|
8595
|
-
meeting: this.directCalling
|
|
8998
|
+
meeting: this.directCalling,
|
|
8999
|
+
form: this.formBubble,
|
|
9000
|
+
card: this.cardBubble,
|
|
8596
9001
|
};
|
|
8597
9002
|
this.setBubbleView();
|
|
8598
9003
|
}
|
|
@@ -8999,42 +9404,6 @@ class CometChatMessageListComponent {
|
|
|
8999
9404
|
}
|
|
9000
9405
|
addMessageEventListeners() {
|
|
9001
9406
|
try {
|
|
9002
|
-
CometChat.addMessageListener(this.msgListenerId, new CometChat.MessageListener({
|
|
9003
|
-
onTextMessageReceived: (textMessage) => {
|
|
9004
|
-
this.messageUpdate(CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED, textMessage);
|
|
9005
|
-
},
|
|
9006
|
-
onCustomMessageReceived: (customMessage) => {
|
|
9007
|
-
this.messageUpdate(CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED, customMessage);
|
|
9008
|
-
},
|
|
9009
|
-
onMediaMessageReceived: (mediaMessage) => {
|
|
9010
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED, mediaMessage);
|
|
9011
|
-
},
|
|
9012
|
-
onMessagesDelivered: (messageReceipt) => {
|
|
9013
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_DELIVERED, messageReceipt);
|
|
9014
|
-
},
|
|
9015
|
-
onMessagesRead: (messageReceipt) => {
|
|
9016
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_READ, messageReceipt);
|
|
9017
|
-
},
|
|
9018
|
-
onMessageDeleted: (deletedMessage) => {
|
|
9019
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_DELETED, deletedMessage);
|
|
9020
|
-
},
|
|
9021
|
-
onMessageEdited: (editedMessage) => {
|
|
9022
|
-
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_EDITED, editedMessage);
|
|
9023
|
-
},
|
|
9024
|
-
onTransientMessageReceived: (transientMessage) => {
|
|
9025
|
-
var _a, _b;
|
|
9026
|
-
let liveReaction = transientMessage.getData();
|
|
9027
|
-
console.log(liveReaction);
|
|
9028
|
-
if (transientMessage.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.user && this.user && (transientMessage === null || transientMessage === void 0 ? void 0 : transientMessage.getSender().getUid()) == this.user.getUid() && transientMessage.getReceiverId() == ((_a = this.loggedInUser) === null || _a === void 0 ? void 0 : _a.getUid())) {
|
|
9029
|
-
CometChatMessageEvents.ccLiveReaction.next(liveReaction["reaction"]);
|
|
9030
|
-
return;
|
|
9031
|
-
}
|
|
9032
|
-
else if (transientMessage.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.group && this.group && transientMessage.getReceiverId() == this.group.getGuid() && (transientMessage === null || transientMessage === void 0 ? void 0 : transientMessage.getSender().getUid()) != ((_b = this.loggedInUser) === null || _b === void 0 ? void 0 : _b.getUid())) {
|
|
9033
|
-
CometChatMessageEvents.ccLiveReaction.next(liveReaction["reaction"]);
|
|
9034
|
-
return;
|
|
9035
|
-
}
|
|
9036
|
-
},
|
|
9037
|
-
}));
|
|
9038
9407
|
CometChat.addGroupListener(this.groupListenerId, new CometChat.GroupListener({
|
|
9039
9408
|
onGroupMemberScopeChanged: (message, changedUser, newScope, oldScope, changedGroup) => {
|
|
9040
9409
|
this.messageUpdate(CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE, message, changedGroup, { user: changedUser, scope: newScope });
|
|
@@ -9089,6 +9458,51 @@ class CometChatMessageListComponent {
|
|
|
9089
9458
|
}
|
|
9090
9459
|
}));
|
|
9091
9460
|
}
|
|
9461
|
+
this.onTextMessageReceived = CometChatMessageEvents.onTextMessageReceived.subscribe((message) => {
|
|
9462
|
+
this.messageUpdate(CometChatUIKitConstants.messages.TEXT_MESSAGE_RECEIVED, message);
|
|
9463
|
+
});
|
|
9464
|
+
this.onMediaMessageReceived = CometChatMessageEvents.onMediaMessageReceived.subscribe((message) => {
|
|
9465
|
+
this.messageUpdate(CometChatUIKitConstants.messages.MEDIA_MESSAGE_RECEIVED, message);
|
|
9466
|
+
});
|
|
9467
|
+
this.onCustomMessageReceived = CometChatMessageEvents.onCustomMessageReceived.subscribe((message) => {
|
|
9468
|
+
this.messageUpdate(CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED, message);
|
|
9469
|
+
});
|
|
9470
|
+
this.onFormMessageReceived = CometChatMessageEvents.onFormMessageReceived.subscribe((message) => {
|
|
9471
|
+
this.messageUpdate(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, message);
|
|
9472
|
+
});
|
|
9473
|
+
this.onCardMessageReceived = CometChatMessageEvents.onCardMessageReceived.subscribe((message) => {
|
|
9474
|
+
this.messageUpdate(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, message);
|
|
9475
|
+
});
|
|
9476
|
+
this.onCustomInteractiveMessageReceived = CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((message) => {
|
|
9477
|
+
this.messageUpdate(CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED, message);
|
|
9478
|
+
});
|
|
9479
|
+
this.onMessagesDelivered = CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt) => {
|
|
9480
|
+
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_DELIVERED, messageReceipt);
|
|
9481
|
+
});
|
|
9482
|
+
this.onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt) => {
|
|
9483
|
+
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_READ, messageReceipt);
|
|
9484
|
+
});
|
|
9485
|
+
this.onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe((deletedMessage) => {
|
|
9486
|
+
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_DELETED, deletedMessage);
|
|
9487
|
+
});
|
|
9488
|
+
this.onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe((editedMessage) => {
|
|
9489
|
+
this.messageUpdate(CometChatUIKitConstants.messages.MESSAGE_EDITED, editedMessage);
|
|
9490
|
+
});
|
|
9491
|
+
this.onTransientMessageReceived = CometChatMessageEvents.onTransientMessageReceived.subscribe((transientMessage) => {
|
|
9492
|
+
var _a, _b;
|
|
9493
|
+
let liveReaction = transientMessage.getData();
|
|
9494
|
+
if (transientMessage.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.user && this.user && (transientMessage === null || transientMessage === void 0 ? void 0 : transientMessage.getSender().getUid()) == this.user.getUid() && transientMessage.getReceiverId() == ((_a = this.loggedInUser) === null || _a === void 0 ? void 0 : _a.getUid())) {
|
|
9495
|
+
CometChatMessageEvents.ccLiveReaction.next(liveReaction["reaction"]);
|
|
9496
|
+
return;
|
|
9497
|
+
}
|
|
9498
|
+
else if (transientMessage.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.group && this.group && transientMessage.getReceiverId() == this.group.getGuid() && (transientMessage === null || transientMessage === void 0 ? void 0 : transientMessage.getSender().getUid()) != ((_b = this.loggedInUser) === null || _b === void 0 ? void 0 : _b.getUid())) {
|
|
9499
|
+
CometChatMessageEvents.ccLiveReaction.next(liveReaction["reaction"]);
|
|
9500
|
+
return;
|
|
9501
|
+
}
|
|
9502
|
+
});
|
|
9503
|
+
this.onInteractionGoalCompleted = CometChatMessageEvents.onInteractionGoalCompleted.subscribe((receipt) => {
|
|
9504
|
+
this.messageUpdate(CometChatUIKitConstants.messages.INTERACTION_GOAL_COMPLETED, receipt);
|
|
9505
|
+
});
|
|
9092
9506
|
}
|
|
9093
9507
|
catch (error) {
|
|
9094
9508
|
if (this.onError) {
|
|
@@ -9137,8 +9551,12 @@ class CometChatMessageListComponent {
|
|
|
9137
9551
|
break;
|
|
9138
9552
|
}
|
|
9139
9553
|
case CometChatUIKitConstants.messages.CUSTOM_MESSAGE_RECEIVED:
|
|
9554
|
+
case CometChatUIKitConstants.messages.INTERACTIVE_MESSAGE_RECEIVED:
|
|
9140
9555
|
this.customMessageReceived(message);
|
|
9141
9556
|
break;
|
|
9557
|
+
case CometChatUIKitConstants.messages.INTERACTION_GOAL_COMPLETED:
|
|
9558
|
+
this.updateInteractiveMessage(message);
|
|
9559
|
+
break;
|
|
9142
9560
|
default:
|
|
9143
9561
|
return;
|
|
9144
9562
|
}
|
|
@@ -9222,7 +9640,6 @@ class CometChatMessageListComponent {
|
|
|
9222
9640
|
}
|
|
9223
9641
|
reInitializeMessageList() {
|
|
9224
9642
|
this.reinitialized = true;
|
|
9225
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
9226
9643
|
this.groupListenerId = "group_" + new Date().getTime();
|
|
9227
9644
|
this.callListenerId = "call_" + new Date().getTime();
|
|
9228
9645
|
this.addMessageEventListeners();
|
|
@@ -9658,10 +10075,10 @@ class CometChatMessageListComponent {
|
|
|
9658
10075
|
}
|
|
9659
10076
|
}
|
|
9660
10077
|
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 });
|
|
9661
|
-
CometChatMessageListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatMessageListComponent, selector: "cometchat-message-list", inputs: { hideError: "hideError", errorStateView: "errorStateView", loadingStateView: "loadingStateView", emptyStateView: "emptyStateView", errorStateText: "errorStateText", emptyStateText: "emptyStateText", loadingIconURL: "loadingIconURL", user: "user", group: "group", disableReceipt: "disableReceipt", disableSoundForMessages: "disableSoundForMessages", customSoundForMessages: "customSoundForMessages", readIcon: "readIcon", deliveredIcon: "deliveredIcon", sentIcon: "sentIcon", waitIcon: "waitIcon", errorIcon: "errorIcon", alignment: "alignment", showAvatar: "showAvatar", datePattern: "datePattern", timestampAlignment: "timestampAlignment", DateSeparatorPattern: "DateSeparatorPattern", templates: "templates", messagesRequestBuilder: "messagesRequestBuilder", newMessageIndicatorText: "newMessageIndicatorText", scrollToBottomOnNewMessages: "scrollToBottomOnNewMessages", thresholdValue: "thresholdValue", onThreadRepliesClick: "onThreadRepliesClick", headerView: "headerView", footerView: "footerView", parentMessageId: "parentMessageId", avatarStyle: "avatarStyle", backdropStyle: "backdropStyle", dateSeparatorStyle: "dateSeparatorStyle", messageListStyle: "messageListStyle", onError: "onError", messageInformationConfiguration: "messageInformationConfiguration" }, viewQueries: [{ propertyName: "listScroll", first: true, predicate: ["listScroll"], descendants: true }, { propertyName: "bottom", first: true, predicate: ["bottom"], descendants: true }, { propertyName: "top", first: true, predicate: ["top"], descendants: true }, { propertyName: "textBubble", first: true, predicate: ["textBubble"], descendants: true }, { propertyName: "threadMessageBubble", first: true, predicate: ["threadMessageBubble"], descendants: true }, { propertyName: "fileBubble", first: true, predicate: ["fileBubble"], descendants: true }, { propertyName: "audioBubble", first: true, predicate: ["audioBubble"], descendants: true }, { propertyName: "videoBubble", first: true, predicate: ["videoBubble"], descendants: true }, { propertyName: "imageBubble", first: true, predicate: ["imageBubble"], descendants: true }, { propertyName: "stickerBubble", first: true, predicate: ["stickerBubble"], descendants: true }, { propertyName: "documentBubble", first: true, predicate: ["documentBubble"], descendants: true }, { propertyName: "whiteboardBubble", first: true, predicate: ["whiteboardBubble"], descendants: true }, { propertyName: "popoverRef", first: true, predicate: ["popoverRef"], descendants: true }, { propertyName: "directCalling", first: true, predicate: ["directCalling"], descendants: true }, { propertyName: "pollBubble", first: true, predicate: ["pollBubble"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-message-list__wrapper\" [ngStyle]=\"wrapperStyle()\" *ngIf=\"!openContactsView\">\n <div class=\"cc-message-list__header-view\">\n<div *ngIf=\"headerView\">\n <ng-container *ngTemplateOutlet=\"headerView\">\n </ng-container>\n</div>\n </div>\n <div class=\"cc-message-list\" #listScroll [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '92%' : '100%'}\">\n <div class=\"cc-message-list__top\" #top>\n </div>\n <div class=\"cc-message-list__decorator-message\" *ngIf=\"state == states.loading || state == states.error || state == states.empty \"\n [ngStyle]=\"messageContainerStyle()\">\n <div class=\"cc-message-list__loading-view\" *ngIf=\"state == states.loading \">\n <cometchat-loader [iconURL]=\"loadingIconURL\" [loaderStyle]=\"loadingStyle()\">\n </cometchat-loader>\n <span class=\"cc-message-list__customview--loading\" *ngIf=\"state == states.loading && loadingStateView\">\n <ng-container *ngTemplateOutlet=\"loadingStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__error-view\" *ngIf=\"state == states.error && !hideError \">\n <cometchat-label [labelStyle]=\"errorStyle()\" *ngIf=\"state == states.error && !hideError && !errorStateView\" [text]=\"errorStateText\"\n >\n </cometchat-label>\n <span class=\"cc-message-list__custom-view--error\" *ngIf=\"state == states.error && !hideError && errorStateView\">\n <ng-container *ngTemplateOutlet=\"errorStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__empty-view\" *ngIf=\"state == states.empty\">\n <!-- <cometchat-label [labelStyle]=\"emptyStyle()\" *ngIf=\"state == states.empty && !emptyStateView\" [text]=\"emptyStateText\"\n >\n </cometchat-label> -->\n <span class=\"cc-message-list__custom-view--empty\" *ngIf=\"state == states.empty && emptyStateView\">\n <ng-container *ngTemplateOutlet=\"emptyStateView\">\n </ng-container>\n </span>\n </div>\n </div>\n <div class=\"cc-message-list__bubble\" *ngFor=\"let message of messagesList; let i = index\">\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i === 0) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message!.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i > 0 && isDateDifferent(messagesList[i - 1]?.getSentAt(), messagesList[i]?.getSentAt())) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div *ngIf=\"getBubbleWrapper(message) \">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [leadingView]=\" showAvatar ? leadingView : null\" [bottomView]=\"enableReactions ? reactionView : null\"\n [headerView]=\"getHeaderView(message) || message?.getCategory() != MessageCategory.action && showHeaderTitle(message) ? bubbleHeader : null\" [footerView]=\"footerView\" [contentView]=\"contentView\" [threadView]=\"threadView\"\n [id]=\"message?.getId() || message?.getMuid()\" [options]=\"setMessageOptions(message)\"\n [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"setBubbleAlignment(message)\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && !message.getDeletedAt() && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"deliveredIcon\" [readIcon]=\"readIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n <div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n <cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n </cometchat-avatar>\n </div>\n</ng-template>\n<ng-template #bubbleHeader>\n <div *ngIf=\"getHeaderView(message);else defaultHeader\">\n <ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n<ng-template #defaultHeader>\n <div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n <cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n <cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n </div>\n</ng-template>\n</ng-template>\n<ng-template #threadView>\n <div class=\"cc-message-list__threadreplies\" *ngIf=\"message?.getReplyCount() && !message.getDeletedAt()\" >\n <cometchat-divider [dividerStyle]=\"dividerStyle\"></cometchat-divider>\n <cometchat-button [text]=\"getThreadCount(message)\" [buttonStyle]=\"getThreadViewStyle(message)\" [iconURL]=\"threadOpenIcon\" (cc-button-clicked)=\"openThreadView(message)\">\n </cometchat-button>\n </div>\n</ng-template>\n </cometchat-message-bubble>\n </div>\n </div>\n <div class=\"cc-message-list__bottom\" #bottom>\n </div>\n\n </div>\n <div class=\"cc-message-list__message-indicator\" *ngIf=\"UnreadCount && UnreadCount.length > 0 && !isOnBottom\" [ngStyle]=\"{bottom: showSmartReply || footerView || showConversationStarter ? '20%' : '13%'}\">\n <cometchat-button [text]=\"newMessageCount\" [buttonStyle]=\"unreadMessagesStyle\" (cc-button-clicked)=\"scrollToBottom()\"></cometchat-button>\n </div>\n <div class=\"cc-message-list__footer-view\" [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '8%' : 'auto'}\">\n\n <div *ngIf=\"footerView;else footer\">\n <ng-container *ngTemplateOutlet=\"footerView\">\n </ng-container>\n </div>\n <ng-template #footer>\n <div class=\"cc-message-list__smart-replies\" *ngIf=\"!showConversationStarter && showSmartReply && getReplies()\">\n <smart-replies [smartReplyStyle]=\"smartReplyStyle\" [replies]=\"getReplies()\" (cc-reply-clicked)=\"sendReply($event)\" (cc-close-clicked)=\"closeSmartReply()\">\n </smart-replies>\n </div>\n <div class=\"cc-message-list__conversation-starters\" *ngIf=\"enableConversationStarter && showConversationStarter\">\n <div class=\"cc-message-list__footer__decorator-message\" *ngIf=\"conversationStarterState == states.loading || conversationStarterState == states.error || conversationStarterState == states.empty \"\n >\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.loading\">\n <cometchat-loader iconURL=\"assets/Spinner.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterLoadingStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.error && !hideError \">\n <cometchat-loader iconURL=\"assets/ai-error.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterErrorStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.empty\">\n <cometchat-loader iconURL=\"assets/ai-empty.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterEmptyStateText\"\n >\n </cometchat-label>\n \n </div>\n </div>\n <smart-replies *ngIf=\"conversationStarterState == states.loaded && !parentMessageId\" [smartReplyStyle]=\"conversationStarterStyle\" [replies]=\"conversationStarterReplies\" (cc-reply-clicked)=\"sendConversationStarter($event)\" [closeIconURL]=\"''\">\n </smart-replies>\n </div>\n </ng-template>\n </div>\n\n</div>\n<!-- default bubbles -->\n<ng-template #textBubble let-message>\n <cometchat-text-bubble *ngIf=\"message?.type == MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.message\"></cometchat-text-bubble>\n <cometchat-text-bubble *ngIf=\"message?.getDeletedAt()\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"localize('MESSAGE_IS_DELETED')\"></cometchat-text-bubble>\n<cometchat-text-bubble *ngIf=\"!isTranslated(message) && !getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n<link-preview [linkPreviewStyle]=\"linkPreviewStyle\" (cc-link-clicked)=\"openLinkURL($event)\" *ngIf=\"!message?.getDeletedAt() && getLinkPreview(message) && enableLinkPreview\" [title]=\"getLinkPreviewDetails('title',message)\" [description]=\"getLinkPreviewDetails('description',message)\" [URL]=\"getLinkPreviewDetails('url',message)\" [image]=\"getLinkPreviewDetails('image',message)\" [favIconURL]=\"getLinkPreviewDetails('favicon',message)\">\n <cometchat-text-bubble\n *ngIf=\"!isTranslated(message) && getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\"\n [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n</link-preview>\n<message-translation-bubble [alignment]=\"getBubbleAlignment(message)\" *ngIf=\"isTranslated(message)\" [messageTranslationStyle]=\"setTranslationStyle(message)\" [translatedText]=\"isTranslated(message)\">\n <cometchat-text-bubble *ngIf=\" !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.text\"></cometchat-text-bubble>\n\n</message-translation-bubble>\n</ng-template>\n<ng-template #fileBubble let-message>\n\n <cometchat-file-bubble [fileStyle]=\"setFileBubbleStyle(message)\" [downloadIconURL]=\"downloadIconURL\" [subtitle]=\"localize('SHARED_FILE')\" [title]=\"message?.data?.attachments ? message?.data?.attachments[0]?.name: ''\" [fileURL]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\"></cometchat-file-bubble>\n</ng-template>\n<ng-template #audioBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.audio\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n <cometchat-audio-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" > </cometchat-audio-bubble>\n</ng-template>\n<ng-template #videoBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.video\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n\n <cometchat-video-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [videoStyle]=\"videoBubbleStyle\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" [poster]=\" getImageThumbnail(message)\"></cometchat-video-bubble>\n</ng-template>\n<ng-template #imageBubble let-message>\n <image-moderation (cc-show-dialog)=\"openWarningDialog($event)\" *ngIf=\"!message.getDeletedAt() && enableImageModeration\" [message]=\"message\" [imageModerationStyle]=\"imageModerationStyle\">\n <cometchat-image-bubble (cc-image-clicked)=\"openImageInFullScreen(message)\" [imageStyle]=\"imageBubbleStyle\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n </image-moderation>\n <cometchat-image-bubble [imageStyle]=\"imageBubbleStyle\" (cc-image-clicked)=\"openImageInFullScreen(message)\" *ngIf=\"!message.getDeletedAt() && !enableImageModeration\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n</ng-template>\n<ng-template #customTextBubble>\n</ng-template>\n<ng-template #stickerBubble let-message>\n <cometchat-image-bubble [src]=\"getSticker(message)\" [imageStyle]=\"imageBubbleStyle\" ></cometchat-image-bubble>\n\n</ng-template>\n<ng-template #whiteboardBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"whiteboardIconURL\" [title]=\"whiteboardTitle\" [buttonText]=\"whiteboardButtonText\" [subtitle]=\"whiteboardSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #documentBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"documentIconURL\" [title]=\"documentTitle\" [buttonText]=\"documentButtonText\" [subtitle]=\"documentSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #directCalling let-message>\n <cometchat-document-bubble [hideSeparator]=\"true\" [iconAlignment]=\"callBubbleAlignment\" [documentStyle]=\"getCallBubbleStyle(message)\" [URL]=\"getSessionId(message)\" [ccClicked]=\"startDirectCall\" [iconURL]=\"directCallIconURL\" [title]=\"getCallBubbleTitle(message)\" [buttonText]=\"joinCallButtonText\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #pollBubble let-message>\n <polls-bubble [pollStyle]=\"pollBubbleStyle\" [pollQuestion]=\"getPollBubbleData(message,'question')\" [pollId]=\"getPollBubbleData(message,'id')\"\n [loggedInUser]=\"loggedInUser\" [senderUid]=\"getPollBubbleData(message)\" [metadata]=\"message?.metadata\"></polls-bubble>\n\n</ng-template>\n\n<!-- thread bubble view -->\n<ng-template #threadMessageBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\" [footerView]=\"footerView\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"threadedAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\"\n \n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\" [addReactionIconURL]=\"addReactionIconURL\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"\" [readIcon]=\"deliveredIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n\n\n<!-- -->\n<ng-template #bubbleView></ng-template>\n<cometchat-popover [popoverStyle]=\"popoverStyle\" #popoverRef [placement]=\"keyboardAlignment\">\n<cometchat-emoji-keyboard (cc-emoji-clicked)=\"addReaction($event)\" slot=\"content\"></cometchat-emoji-keyboard>\n</cometchat-popover>\n<cometchat-backdrop *ngIf=\"openConfirmDialog\" [backdropStyle]=\"backdropStyle\">\n <cometchat-confirm-dialog [title]=\"''\" [messageText]=\"warningText\" (cc-confirm-clicked)=\"onConfirmClick()\" [cancelButtonText]=\"cancelText\" [confirmButtonText]=\"confirmText\" (cc-cancel-clicked)=\"onCancelClick()\" [confirmDialogStyle]=\"confirmDialogStyle\">\n\n </cometchat-confirm-dialog>\n</cometchat-backdrop>\n<cometchat-full-screen-viewer (cc-close-clicked)=\"closeImageInFullScreen()\" *ngIf=\"openFullscreenView\" [URL]=\"imageurlToOpen\" [closeIconURL]=\"closeIconURL\" [fullScreenViewerStyle]=\"fullScreenViewerStyle\">\n\n</cometchat-full-screen-viewer>\n\n<!-- ongoing callscreen for direct call -->\n<cometchat-ongoing-call *ngIf=\"showOngoingCall\" [callSettingsBuilder]=\"getCallBuilder()\" [ongoingCallStyle]=\"ongoingCallStyle\" [sessionID]=\"sessionId\"></cometchat-ongoing-call>\n<!-- message information view -->\n<!-- thread bubble view -->\n<ng-template #messageinfoBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions && hasReaction(message) ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"messageInfoAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n<cometchat-backdrop *ngIf=\"openMessageInfoPage\" [backdropStyle]=\"backdropStyle\">\n <cometchat-message-information [closeIconURL]=\"messageInformationConfiguration.closeIconURL\" [loadingStateView]=\"messageInformationConfiguration.loadingStateView\" [errorStateView]=\"messageInformationConfiguration.errorStateView\" [listItemStyle]=\"messageInformationConfiguration.listItemStyle\" [emptyStateView]=\"messageInformationConfiguration.emptyStateView\" [loadingIconURL]=\"messageInformationConfiguration.loadingIconURL\" [readIcon]=\"messageInformationConfiguration.readIcon\" [deliveredIcon]=\"messageInformationConfiguration.deliveredIcon\" [onError]=\"messageInformationConfiguration.onError\" [SubtitleView]=\"messageInformationConfiguration.subtitleView\" [receiptDatePattern]=\"messageInformationConfiguration.receiptDatePattern\" [listItemView]=\"messageInformationConfiguration.listItemView \" [messageInformationStyle]=\"messageInformationConfiguration.messageInformationStyle\" [onClose]=\"messageInformationConfiguration.onClose ?? closeMessageInfoPage\" [bubbleView]=\"messageInformationConfiguration.bubbleView ?? messageinfoBubble\" [message]=\"messageInfoObject\">\n\n </cometchat-message-information>\n</cometchat-backdrop>\n", styles: [".cc-message-list{height:100%;width:100%;overflow-y:auto;overflow-x:hidden;position:relative}.cc-message-list__wrapper{height:100%;width:100%;overflow-y:hidden}.cc-message-list__bubble-footer{display:flex;justify-content:center;align-items:center}.cc-message-list__date-container{text-align:center;margin:5px 0}.cc-message-list__smart-replies,.cc-message-list__conversation-starters{height:-moz-fit-content;height:fit-content;width:100%;position:absolute;bottom:0;z-index:1}.cc-message-list__date{border-radius:10px;display:flex;justify-content:center}.cc-message-list__threadreplies{min-width:130px;width:100%}.cc-message-list__message-indicator{height:25px;display:flex;align-items:center;justify-content:center;width:100%;bottom:10%;position:absolute}.cc-message-list__footer-view{z-index:1;position:relative;width:100%}.cc-message-list__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;height:100%}.cc-message-list__footer__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px 0 16px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:flex-start;height:100%}.cc-message-list::-webkit-scrollbar{background:transparent;width:8px}.cc-message-list::-webkit-scrollbar-thumb{background:#e8e5e5;border-radius:8px}.cc-message-list__footer-view-decorator{display:flex;flex-direction:row;column-gap:8px}\n"], components: [{ type: CometChatMessageBubbleComponent, selector: "cometchat-message-bubble", inputs: ["messageBubbleStyle", "alignment", "options", "id", "leadingView", "headerView", "replyView", "contentView", "threadView", "footerView", "bottomView", "moreIconURL", "topMenuSize"] }, { type: CometChatOngoingCallComponent, selector: "cometchat-ongoing-call", inputs: ["ongoingCallStyle", "resizeIconHoverText", "sessionID", "minimizeIconURL", "maximizeIconURL", "callSettingsBuilder", "callWorkflow", "onError"] }, { type: CometChatMessageInformationComponent, selector: "cometchat-message-information", inputs: ["closeIconURL", "message", "title", "template", "bubbleView", "subtitleView", "listItemView", "receiptDatePattern", "onError", "messageInformationStyle", "readIcon", "deliveredIcon", "onClose", "listItemStyle", "emptyStateText", "errorStateText", "emptyStateView", "loadingIconURL", "loadingStateView", "errorStateView"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10078
|
+
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 });
|
|
9662
10079
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageListComponent, decorators: [{
|
|
9663
10080
|
type: Component,
|
|
9664
|
-
args: [{ selector: "cometchat-message-list", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-message-list__wrapper\" [ngStyle]=\"wrapperStyle()\" *ngIf=\"!openContactsView\">\n <div class=\"cc-message-list__header-view\">\n<div *ngIf=\"headerView\">\n <ng-container *ngTemplateOutlet=\"headerView\">\n </ng-container>\n</div>\n </div>\n <div class=\"cc-message-list\" #listScroll [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '92%' : '100%'}\">\n <div class=\"cc-message-list__top\" #top>\n </div>\n <div class=\"cc-message-list__decorator-message\" *ngIf=\"state == states.loading || state == states.error || state == states.empty \"\n [ngStyle]=\"messageContainerStyle()\">\n <div class=\"cc-message-list__loading-view\" *ngIf=\"state == states.loading \">\n <cometchat-loader [iconURL]=\"loadingIconURL\" [loaderStyle]=\"loadingStyle()\">\n </cometchat-loader>\n <span class=\"cc-message-list__customview--loading\" *ngIf=\"state == states.loading && loadingStateView\">\n <ng-container *ngTemplateOutlet=\"loadingStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__error-view\" *ngIf=\"state == states.error && !hideError \">\n <cometchat-label [labelStyle]=\"errorStyle()\" *ngIf=\"state == states.error && !hideError && !errorStateView\" [text]=\"errorStateText\"\n >\n </cometchat-label>\n <span class=\"cc-message-list__custom-view--error\" *ngIf=\"state == states.error && !hideError && errorStateView\">\n <ng-container *ngTemplateOutlet=\"errorStateView\">\n </ng-container>\n </span>\n </div>\n <div class=\"cc-message-list__empty-view\" *ngIf=\"state == states.empty\">\n <!-- <cometchat-label [labelStyle]=\"emptyStyle()\" *ngIf=\"state == states.empty && !emptyStateView\" [text]=\"emptyStateText\"\n >\n </cometchat-label> -->\n <span class=\"cc-message-list__custom-view--empty\" *ngIf=\"state == states.empty && emptyStateView\">\n <ng-container *ngTemplateOutlet=\"emptyStateView\">\n </ng-container>\n </span>\n </div>\n </div>\n <div class=\"cc-message-list__bubble\" *ngFor=\"let message of messagesList; let i = index\">\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i === 0) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message!.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div class=\"cc-message-list__date-container\" *ngIf=\"(i > 0 && isDateDifferent(messagesList[i - 1]?.getSentAt(), messagesList[i]?.getSentAt())) && message?.getSentAt()\">\n <span class=\"cc-message-list__date\" >\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [pattern]=\"DateSeparatorPattern\" [dateStyle]=\"dateSeparatorStyle\"\n >\n </cometchat-date>\n </span>\n </div>\n <div *ngIf=\"getBubbleWrapper(message) \">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [leadingView]=\" showAvatar ? leadingView : null\" [bottomView]=\"enableReactions ? reactionView : null\"\n [headerView]=\"getHeaderView(message) || message?.getCategory() != MessageCategory.action && showHeaderTitle(message) ? bubbleHeader : null\" [footerView]=\"footerView\" [contentView]=\"contentView\" [threadView]=\"threadView\"\n [id]=\"message?.getId() || message?.getMuid()\" [options]=\"setMessageOptions(message)\"\n [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"setBubbleAlignment(message)\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && !message.getDeletedAt() && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"deliveredIcon\" [readIcon]=\"readIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n <div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n <cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n </cometchat-avatar>\n </div>\n</ng-template>\n<ng-template #bubbleHeader>\n <div *ngIf=\"getHeaderView(message);else defaultHeader\">\n <ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n<ng-template #defaultHeader>\n <div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n <cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n <cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n </div>\n</ng-template>\n</ng-template>\n<ng-template #threadView>\n <div class=\"cc-message-list__threadreplies\" *ngIf=\"message?.getReplyCount() && !message.getDeletedAt()\" >\n <cometchat-divider [dividerStyle]=\"dividerStyle\"></cometchat-divider>\n <cometchat-button [text]=\"getThreadCount(message)\" [buttonStyle]=\"getThreadViewStyle(message)\" [iconURL]=\"threadOpenIcon\" (cc-button-clicked)=\"openThreadView(message)\">\n </cometchat-button>\n </div>\n</ng-template>\n </cometchat-message-bubble>\n </div>\n </div>\n <div class=\"cc-message-list__bottom\" #bottom>\n </div>\n\n </div>\n <div class=\"cc-message-list__message-indicator\" *ngIf=\"UnreadCount && UnreadCount.length > 0 && !isOnBottom\" [ngStyle]=\"{bottom: showSmartReply || footerView || showConversationStarter ? '20%' : '13%'}\">\n <cometchat-button [text]=\"newMessageCount\" [buttonStyle]=\"unreadMessagesStyle\" (cc-button-clicked)=\"scrollToBottom()\"></cometchat-button>\n </div>\n <div class=\"cc-message-list__footer-view\" [ngStyle]=\"{height: showSmartReply || showConversationStarter ? '8%' : 'auto'}\">\n\n <div *ngIf=\"footerView;else footer\">\n <ng-container *ngTemplateOutlet=\"footerView\">\n </ng-container>\n </div>\n <ng-template #footer>\n <div class=\"cc-message-list__smart-replies\" *ngIf=\"!showConversationStarter && showSmartReply && getReplies()\">\n <smart-replies [smartReplyStyle]=\"smartReplyStyle\" [replies]=\"getReplies()\" (cc-reply-clicked)=\"sendReply($event)\" (cc-close-clicked)=\"closeSmartReply()\">\n </smart-replies>\n </div>\n <div class=\"cc-message-list__conversation-starters\" *ngIf=\"enableConversationStarter && showConversationStarter\">\n <div class=\"cc-message-list__footer__decorator-message\" *ngIf=\"conversationStarterState == states.loading || conversationStarterState == states.error || conversationStarterState == states.empty \"\n >\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.loading\">\n <cometchat-loader iconURL=\"assets/Spinner.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterLoadingStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.error && !hideError \">\n <cometchat-loader iconURL=\"assets/ai-error.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterErrorStateText\"\n >\n </cometchat-label>\n \n </div>\n <div class=\"cc-message-list__footer-view-decorator\" *ngIf=\"conversationStarterState == states.empty\">\n <cometchat-loader iconURL=\"assets/ai-empty.svg\" [loaderStyle]=\"conversationStarterLoader()\">\n </cometchat-loader>\n <cometchat-label [labelStyle]=\"conversationStarterStateStyle()\" [text]=\"starterEmptyStateText\"\n >\n </cometchat-label>\n \n </div>\n </div>\n <smart-replies *ngIf=\"conversationStarterState == states.loaded && !parentMessageId\" [smartReplyStyle]=\"conversationStarterStyle\" [replies]=\"conversationStarterReplies\" (cc-reply-clicked)=\"sendConversationStarter($event)\" [closeIconURL]=\"''\">\n </smart-replies>\n </div>\n </ng-template>\n </div>\n\n</div>\n<!-- default bubbles -->\n<ng-template #textBubble let-message>\n <cometchat-text-bubble *ngIf=\"message?.type == MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.message\"></cometchat-text-bubble>\n <cometchat-text-bubble *ngIf=\"message?.getDeletedAt()\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"localize('MESSAGE_IS_DELETED')\"></cometchat-text-bubble>\n<cometchat-text-bubble *ngIf=\"!isTranslated(message) && !getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n<link-preview [linkPreviewStyle]=\"linkPreviewStyle\" (cc-link-clicked)=\"openLinkURL($event)\" *ngIf=\"!message?.getDeletedAt() && getLinkPreview(message) && enableLinkPreview\" [title]=\"getLinkPreviewDetails('title',message)\" [description]=\"getLinkPreviewDetails('description',message)\" [URL]=\"getLinkPreviewDetails('url',message)\" [image]=\"getLinkPreviewDetails('image',message)\" [favIconURL]=\"getLinkPreviewDetails('favicon',message)\">\n <cometchat-text-bubble\n *ngIf=\"!isTranslated(message) && getLinkPreview(message) && !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\"\n [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"getTextMessage(message)\"></cometchat-text-bubble>\n</link-preview>\n<message-translation-bubble [alignment]=\"getBubbleAlignment(message)\" *ngIf=\"isTranslated(message)\" [messageTranslationStyle]=\"setTranslationStyle(message)\" [translatedText]=\"isTranslated(message)\">\n <cometchat-text-bubble *ngIf=\" !message?.deletedAt && message?.type != MessageTypesConstant.groupMember\" [textStyle]=\"setTextBubbleStyle(message)\" [text]=\"message?.text\"></cometchat-text-bubble>\n\n</message-translation-bubble>\n</ng-template>\n<ng-template #fileBubble let-message>\n\n <cometchat-file-bubble [fileStyle]=\"setFileBubbleStyle(message)\" [downloadIconURL]=\"downloadIconURL\" [subtitle]=\"localize('SHARED_FILE')\" [title]=\"message?.data?.attachments ? message?.data?.attachments[0]?.name: ''\" [fileURL]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\"></cometchat-file-bubble>\n</ng-template>\n<ng-template #audioBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.audio\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n <cometchat-audio-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" > </cometchat-audio-bubble>\n</ng-template>\n<ng-template #videoBubble let-message>\n <cometchat-icon-button [disabled]=\"true\" *ngIf=\"message?.category == callConstant && message?.type == MessageTypesConstant.video\" [iconURL]=\"getCallTypeIcon(message)\" [buttonStyle]=\"callStatusStyle(message)\" [text]=\"getCallActionMessage(message)\"></cometchat-icon-button>\n\n <cometchat-video-bubble *ngIf=\"!message.getDeletedAt() && message?.category != callConstant\" [videoStyle]=\"videoBubbleStyle\" [src]=\"message?.data?.attachments ? message?.data?.attachments[0]?.url : ''\" [poster]=\" getImageThumbnail(message)\"></cometchat-video-bubble>\n</ng-template>\n<ng-template #imageBubble let-message>\n <image-moderation (cc-show-dialog)=\"openWarningDialog($event)\" *ngIf=\"!message.getDeletedAt() && enableImageModeration\" [message]=\"message\" [imageModerationStyle]=\"imageModerationStyle\">\n <cometchat-image-bubble (cc-image-clicked)=\"openImageInFullScreen(message)\" [imageStyle]=\"imageBubbleStyle\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n </image-moderation>\n <cometchat-image-bubble [imageStyle]=\"imageBubbleStyle\" (cc-image-clicked)=\"openImageInFullScreen(message)\" *ngIf=\"!message.getDeletedAt() && !enableImageModeration\" [src]=\" getImageThumbnail(message)\" [placeholderImage]=\"placeholderIconURL\"></cometchat-image-bubble>\n</ng-template>\n<ng-template #customTextBubble>\n</ng-template>\n<ng-template #stickerBubble let-message>\n <cometchat-image-bubble [src]=\"getSticker(message)\" [imageStyle]=\"imageBubbleStyle\" ></cometchat-image-bubble>\n\n</ng-template>\n<ng-template #whiteboardBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"whiteboardIconURL\" [title]=\"whiteboardTitle\" [buttonText]=\"whiteboardButtonText\" [subtitle]=\"whiteboardSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #documentBubble let-message>\n <cometchat-document-bubble [hideSeparator]=\"false\" [iconAlignment]=\"documentBubbleAlignment\" [documentStyle]=\"documentBubbleStyle\" [URL]=\"getWhiteboardDocument(message)\" [ccClicked]=\"launchCollaborativeWhiteboardDocument\" [iconURL]=\"documentIconURL\" [title]=\"documentTitle\" [buttonText]=\"documentButtonText\" [subtitle]=\"documentSubitle\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #directCalling let-message>\n <cometchat-document-bubble [hideSeparator]=\"true\" [iconAlignment]=\"callBubbleAlignment\" [documentStyle]=\"getCallBubbleStyle(message)\" [URL]=\"getSessionId(message)\" [ccClicked]=\"startDirectCall\" [iconURL]=\"directCallIconURL\" [title]=\"getCallBubbleTitle(message)\" [buttonText]=\"joinCallButtonText\"></cometchat-document-bubble>\n\n</ng-template>\n<ng-template #pollBubble let-message>\n <polls-bubble [pollStyle]=\"pollBubbleStyle\" [pollQuestion]=\"getPollBubbleData(message,'question')\" [pollId]=\"getPollBubbleData(message,'id')\"\n [loggedInUser]=\"loggedInUser\" [senderUid]=\"getPollBubbleData(message)\" [metadata]=\"message?.metadata\"></polls-bubble>\n\n</ng-template>\n\n<!-- thread bubble view -->\n<ng-template #threadMessageBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\" [footerView]=\"footerView\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"threadedAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\"\n \n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\" [addReactionIconURL]=\"addReactionIconURL\"></reactions-view>\n </ng-template>\n <ng-template #footerView>\n <div class=\"cc-message-list__bubble-footer\">\n <div *ngIf=\"getFooterView(message);else bubbleFooter\">\n <ng-container *ngTemplateOutlet=\"getFooterView(message);context:{ $implicit: message }\" >\n </ng-container>\n </div>\n <ng-template #bubbleFooter>\n <div class=\"cc-message-list__bubble-date\" *ngIf=\"timestampAlignment == timestampEnum.bottom && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call && message?.getSentAt()\">\n <cometchat-date [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" [pattern]=\"datePattern\">\n </cometchat-date>\n </div>\n <div *ngIf=\" !message?.getDeletedAt() && !disableReceipt && (!message?.getSender() ||this.loggedInUser.getUid() == message?.getSender()?.getUid()) && message?.getCategory() != MessageCategory.action && message?.getCategory() != MessageCategory.call\" class=\"cc-message-list__receipt\">\n <cometchat-receipt [receipt]=\"getMessageReceipt(message)\" [receiptStyle]=\"receiptStyle\" [waitIcon]=\"waitIcon\" [sentIcon]=\"sentIcon\" [deliveredIcon]=\"\" [readIcon]=\"deliveredIcon\" [errorIcon]=\"errorIcon\"></cometchat-receipt>\n </div>\n </ng-template>\n </div>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n\n\n<!-- -->\n<ng-template #bubbleView></ng-template>\n<cometchat-popover [popoverStyle]=\"popoverStyle\" #popoverRef [placement]=\"keyboardAlignment\">\n<cometchat-emoji-keyboard (cc-emoji-clicked)=\"addReaction($event)\" slot=\"content\"></cometchat-emoji-keyboard>\n</cometchat-popover>\n<cometchat-backdrop *ngIf=\"openConfirmDialog\" [backdropStyle]=\"backdropStyle\">\n <cometchat-confirm-dialog [title]=\"''\" [messageText]=\"warningText\" (cc-confirm-clicked)=\"onConfirmClick()\" [cancelButtonText]=\"cancelText\" [confirmButtonText]=\"confirmText\" (cc-cancel-clicked)=\"onCancelClick()\" [confirmDialogStyle]=\"confirmDialogStyle\">\n\n </cometchat-confirm-dialog>\n</cometchat-backdrop>\n<cometchat-full-screen-viewer (cc-close-clicked)=\"closeImageInFullScreen()\" *ngIf=\"openFullscreenView\" [URL]=\"imageurlToOpen\" [closeIconURL]=\"closeIconURL\" [fullScreenViewerStyle]=\"fullScreenViewerStyle\">\n\n</cometchat-full-screen-viewer>\n\n<!-- ongoing callscreen for direct call -->\n<cometchat-ongoing-call *ngIf=\"showOngoingCall\" [callSettingsBuilder]=\"getCallBuilder()\" [ongoingCallStyle]=\"ongoingCallStyle\" [sessionID]=\"sessionId\"></cometchat-ongoing-call>\n<!-- message information view -->\n<!-- thread bubble view -->\n<ng-template #messageinfoBubble let-message>\n <div *ngIf=\"getBubbleWrapper(message)\">\n <ng-container *ngTemplateOutlet=\"getBubbleWrapper(message)\">\n </ng-container>\n </div>\n <cometchat-message-bubble *ngIf=\"!getBubbleWrapper(message)\" [bottomView]=\"enableReactions && hasReaction(message) ? reactionView : null\" [leadingView]=\" showAvatar ? leadingView : null\" [headerView]=\"bubbleHeader\"\n [contentView]=\"contentView\" [id]=\"message?.getId() || message?.getMuid()\" [messageBubbleStyle]=\"setMessageBubbleStyle(message)\" [alignment]=\"messageInfoAlignment\">\n <ng-template #contentView>\n <ng-container *ngTemplateOutlet=\"getContentView(message);context:{ $implicit: message }\" >\n </ng-container>\n </ng-template>\n <ng-template #reactionView>\n <reactions-view *ngIf=\"hasReaction(message)\" [messageObject]=\"message\" [alignment]=\"setBubbleAlignment(message)\" [addReactionIconURL]=\"addReactionIconURL\"\n [loggedInUser]=\"loggedInUser\" [reactionsStyle]=\"reactionsStyle(message)\"></reactions-view>\n </ng-template>\n<ng-template #leadingView>\n<div *ngIf=\" message?.getCategory() != MessageCategory.action && showHeaderTitle(message)\" >\n<cometchat-avatar [name]=\"message?.getSender()?.getName()\" [avatarStyle]=\"avatarStyle\" [image]=\"message?.getSender()?.getAvatar()\">\n</cometchat-avatar>\n</div>\n</ng-template>\n<ng-template #bubbleHeader>\n<div *ngIf=\"getHeaderView(message);else defaultHeader\">\n<ng-container *ngTemplateOutlet=\"getHeaderView(message);context:{ $implicit: message }\" >\n</ng-container>\n</div>\n<ng-template #defaultHeader>\n<div class=\"cc-message-list__bubble-header\" *ngIf=\"message?.getCategory() != MessageCategory.action && showHeaderTitle(message) && message?.getCategory() != MessageCategory.call\">\n<cometchat-label [text]=\"message?.getSender()?.getName()\" [labelStyle]=\"labelStyle\"></cometchat-label>\n<cometchat-date [pattern]=\"datePattern\" [timestamp]=\"message?.getSentAt()\" [dateStyle]=\"bubbleDateStyle\" *ngIf=\"timestampAlignment == timestampEnum.top && message?.getSentAt()\"></cometchat-date>\n</div>\n</ng-template>\n</ng-template>\n </cometchat-message-bubble>\n\n</ng-template>\n<cometchat-backdrop *ngIf=\"openMessageInfoPage\" [backdropStyle]=\"backdropStyle\">\n <cometchat-message-information [closeIconURL]=\"messageInformationConfiguration.closeIconURL\" [loadingStateView]=\"messageInformationConfiguration.loadingStateView\" [errorStateView]=\"messageInformationConfiguration.errorStateView\" [listItemStyle]=\"messageInformationConfiguration.listItemStyle\" [emptyStateView]=\"messageInformationConfiguration.emptyStateView\" [loadingIconURL]=\"messageInformationConfiguration.loadingIconURL\" [readIcon]=\"messageInformationConfiguration.readIcon\" [deliveredIcon]=\"messageInformationConfiguration.deliveredIcon\" [onError]=\"messageInformationConfiguration.onError\" [SubtitleView]=\"messageInformationConfiguration.subtitleView\" [receiptDatePattern]=\"messageInformationConfiguration.receiptDatePattern\" [listItemView]=\"messageInformationConfiguration.listItemView \" [messageInformationStyle]=\"messageInformationConfiguration.messageInformationStyle\" [onClose]=\"messageInformationConfiguration.onClose ?? closeMessageInfoPage\" [bubbleView]=\"messageInformationConfiguration.bubbleView ?? messageinfoBubble\" [message]=\"messageInfoObject\">\n\n </cometchat-message-information>\n</cometchat-backdrop>\n", styles: [".cc-message-list{height:100%;width:100%;overflow-y:auto;overflow-x:hidden;position:relative}.cc-message-list__wrapper{height:100%;width:100%;overflow-y:hidden}.cc-message-list__bubble-footer{display:flex;justify-content:center;align-items:center}.cc-message-list__date-container{text-align:center;margin:5px 0}.cc-message-list__smart-replies,.cc-message-list__conversation-starters{height:-moz-fit-content;height:fit-content;width:100%;position:absolute;bottom:0;z-index:1}.cc-message-list__date{border-radius:10px;display:flex;justify-content:center}.cc-message-list__threadreplies{min-width:130px;width:100%}.cc-message-list__message-indicator{height:25px;display:flex;align-items:center;justify-content:center;width:100%;bottom:10%;position:absolute}.cc-message-list__footer-view{z-index:1;position:relative;width:100%}.cc-message-list__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;height:100%}.cc-message-list__footer__decorator-message{margin:0;line-height:30px;word-wrap:break-word;padding:0 8px 0 16px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:flex-start;height:100%}.cc-message-list::-webkit-scrollbar{background:transparent;width:8px}.cc-message-list::-webkit-scrollbar-thumb{background:#e8e5e5;border-radius:8px}.cc-message-list__footer-view-decorator{display:flex;flex-direction:row;column-gap:8px}\n"] }]
|
|
10081
|
+
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"] }]
|
|
9665
10082
|
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { listScroll: [{
|
|
9666
10083
|
type: ViewChild,
|
|
9667
10084
|
args: ["listScroll", { static: false }]
|
|
@@ -9689,6 +10106,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
9689
10106
|
}], imageBubble: [{
|
|
9690
10107
|
type: ViewChild,
|
|
9691
10108
|
args: ["imageBubble", { static: false }]
|
|
10109
|
+
}], formBubble: [{
|
|
10110
|
+
type: ViewChild,
|
|
10111
|
+
args: ["formBubble", { static: false }]
|
|
10112
|
+
}], cardBubble: [{
|
|
10113
|
+
type: ViewChild,
|
|
10114
|
+
args: ["cardBubble", { static: false }]
|
|
9692
10115
|
}], stickerBubble: [{
|
|
9693
10116
|
type: ViewChild,
|
|
9694
10117
|
args: ["stickerBubble", { static: false }]
|
|
@@ -9932,6 +10355,12 @@ class CometChatMessageComposerComponent {
|
|
|
9932
10355
|
background: "rgba(0, 0, 0, 0.5)",
|
|
9933
10356
|
position: "fixed"
|
|
9934
10357
|
};
|
|
10358
|
+
this.actionSheetStyle = {
|
|
10359
|
+
borderRadius: "inherit",
|
|
10360
|
+
border: "none",
|
|
10361
|
+
width: "100%",
|
|
10362
|
+
height: "100%",
|
|
10363
|
+
};
|
|
9935
10364
|
this.hideVoiceRecording = false;
|
|
9936
10365
|
this.mediaRecorderStyle = {};
|
|
9937
10366
|
this.voiceRecordingIconURL = "assets/mic.svg";
|
|
@@ -10058,18 +10487,6 @@ class CometChatMessageComposerComponent {
|
|
|
10058
10487
|
this.sendButtonIconURL = "assets/Send.svg";
|
|
10059
10488
|
this.emojiButtonIconURL = "assets/Stipop.svg";
|
|
10060
10489
|
this.stickerButtonIconURL = "assets/Stickers.svg";
|
|
10061
|
-
this.actionsheetStyle = {
|
|
10062
|
-
layoutModeIconTint: "rgba(20, 20, 20, 0.04)",
|
|
10063
|
-
borderRadius: "inherit",
|
|
10064
|
-
background: "rgb(255,255,255)",
|
|
10065
|
-
border: "none",
|
|
10066
|
-
width: "100%",
|
|
10067
|
-
height: "100%",
|
|
10068
|
-
titleFont: "500 15px Inter, sans-serif",
|
|
10069
|
-
titleColor: "#141414",
|
|
10070
|
-
listItemBackground: "",
|
|
10071
|
-
ActionSheetSeparatorTint: "1px solid RGBA(20, 20, 20, 0.08)"
|
|
10072
|
-
};
|
|
10073
10490
|
this.messageText = "";
|
|
10074
10491
|
this.attachmentButtonStyle = {
|
|
10075
10492
|
height: "24px",
|
|
@@ -10893,16 +11310,16 @@ class CometChatMessageComposerComponent {
|
|
|
10893
11310
|
this.aiPopover.background = this.themeService.theme.palette.getBackground();
|
|
10894
11311
|
this.aiPopover.boxShadow = `0px 0px 32px ${this.themeService.theme.palette.getAccent50()}`;
|
|
10895
11312
|
this.setComposerStyle();
|
|
10896
|
-
this.
|
|
10897
|
-
layoutModeIconTint: this.
|
|
11313
|
+
this.actionSheetStyle = {
|
|
11314
|
+
layoutModeIconTint: this.actionSheetStyle.layoutModeIconTint || this.themeService.theme.palette.getAccent(),
|
|
10898
11315
|
borderRadius: "inherit",
|
|
10899
11316
|
background: this.themeService.theme.palette.getBackground(),
|
|
10900
11317
|
border: "none",
|
|
10901
11318
|
width: "100%",
|
|
10902
11319
|
height: "100%",
|
|
10903
|
-
titleFont: this.
|
|
10904
|
-
titleColor: this.
|
|
10905
|
-
ActionSheetSeparatorTint: this.
|
|
11320
|
+
titleFont: this.actionSheetStyle.titleFont || fontHelper(this.themeService.theme.typography.title2),
|
|
11321
|
+
titleColor: this.actionSheetStyle.titleColor || this.themeService.theme.palette.getAccent(),
|
|
11322
|
+
ActionSheetSeparatorTint: this.actionSheetStyle.ActionSheetSeparatorTint || this.themeService.theme.palette.getAccent400()
|
|
10906
11323
|
};
|
|
10907
11324
|
this.messageInputStyle = {
|
|
10908
11325
|
height: "100%",
|
|
@@ -11041,10 +11458,6 @@ class CometChatMessageComposerComponent {
|
|
|
11041
11458
|
dividerTint: this.themeService.theme.palette.getAccent200(),
|
|
11042
11459
|
textFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
11043
11460
|
textColor: this.themeService.theme.palette.getAccent(),
|
|
11044
|
-
ActionSheetSeparatorTint: this.themeService.theme.palette.getAccent200(),
|
|
11045
|
-
ActionSheetTitleColor: this.themeService.theme.palette.getAccent(),
|
|
11046
|
-
ActionSheetTitleFont: fontHelper(this.themeService.theme.typography.title1),
|
|
11047
|
-
ActionSheetLayoutModeIconTint: this.themeService.theme.palette.getPrimary(),
|
|
11048
11461
|
emojiKeyboardTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
11049
11462
|
emojiKeyboardTextColor: this.themeService.theme.palette.getAccent400(),
|
|
11050
11463
|
previewTitleFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
@@ -11063,10 +11476,10 @@ class CometChatMessageComposerComponent {
|
|
|
11063
11476
|
}
|
|
11064
11477
|
}
|
|
11065
11478
|
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 });
|
|
11066
|
-
CometChatMessageComposerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatMessageComposerComponent, selector: "cometchat-message-composer", inputs: { user: "user", group: "group", disableSoundForMessages: "disableSoundForMessages", customSoundForMessage: "customSoundForMessage", disableTypingEvents: "disableTypingEvents", text: "text", placeholderText: "placeholderText", headerView: "headerView", onTextChange: "onTextChange", attachmentIconURL: "attachmentIconURL", attachmentOptions: "attachmentOptions", secondaryButtonView: "secondaryButtonView", auxilaryButtonView: "auxilaryButtonView", auxiliaryButtonsAlignment: "auxiliaryButtonsAlignment", sendButtonView: "sendButtonView", parentMessageId: "parentMessageId", hideLiveReaction: "hideLiveReaction", LiveReactionIconURL: "LiveReactionIconURL", messageComposerStyle: "messageComposerStyle", onSendButtonClick: "onSendButtonClick", onError: "onError", backdropStyle: "backdropStyle", hideVoiceRecording: "hideVoiceRecording", mediaRecorderStyle: "mediaRecorderStyle", voiceRecordingIconURL: "voiceRecordingIconURL", voiceRecordingCloseIconURL: "voiceRecordingCloseIconURL", voiceRecordingStartIconURL: "voiceRecordingStartIconURL", voiceRecordingStopIconURL: "voiceRecordingStopIconURL", voiceRecordingSubmitIconURL: "voiceRecordingSubmitIconURL" }, viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "emojiButtonRef", first: true, predicate: ["emojiButtonRef"], descendants: true }, { propertyName: "actionSheetRef", first: true, predicate: ["actionSheetRef"], descendants: true }, { propertyName: "stickerButtonRef", first: true, predicate: ["stickerButtonRef"], descendants: true }, { propertyName: "mediaRecordedRef", first: true, predicate: ["mediaRecordedRef"], descendants: true }, { propertyName: "aiButtonRef", first: true, predicate: ["aiButtonRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-message-composer__wrapper\" [ngStyle]=\"composerWrapperStyle()\">\n <div class=\"cc-message-composer__header-view\" *ngIf=\"headerView; else messagePreview\">\n <ng-container *ngTemplateOutlet=\"headerView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <ng-template #messagePreview>\n <div class=\"cc-message-composer__header-view\" *ngIf=\"showPreview\">\n <cometchat-preview [previewStyle]=\"previewStyle\" [previewSubtitle]=\"messageToBeEdited.getText()\" (cc-preview-close-clicked)=\"closePreview()\"> </cometchat-preview>\n </div>\n </ng-template>\n<div class=\"cc-message-composer__input\">\n <cometchat-message-input (cc-message-input-entered)=\"sendMessageOnEnter($event)\" #inputRef [text]=\"text\" (cc-message-input-changed)=\"messageInputChanged($event)\" [messageInputStyle]=\"messageInputStyle\" [placeholderText]=\"placeholderText\" [auxiliaryButtonAlignment]=\"auxiliaryButtonsAlignment\">\n <div slot=\"secondaryView\">\n <div *ngIf=\"secondaryButtonView;else secondaryButton\">\n <ng-container *ngTemplateOutlet=\"secondaryButtonView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <ng-template #secondaryButton>\n <div class=\"cc-message-composer__attachbutton\">\n <cometchat-popover (cc-popover-outside-click)=\"openActionSheet($event)\" [placement]=\"auxilaryPlacement\" [popoverStyle]=\"popoverStyle\" >\n <cometchat-action-sheet slot=\"content\" [actions]=\"composerActions\" [actionSheetStyle]=\"actionsheetStyle\" (cc-actionsheet-clicked)=\"handleActions($event)\">\n </cometchat-action-sheet>\n <cometchat-button #actionSheetRef slot=\"children\" (cc-button-clicked)=\"openActionSheet($event)\" [iconURL]=\"!showActionSheetItem || (showEmojiKeyboard && !showActionSheetItem) ? attachmentIconURL : closeButtonIconURL\" [buttonStyle]=\"attachmentButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n </ng-template>\n </div>\n\n <div class=\"cc-message-composer__auxiliary\" slot=\"auxilaryView\">\n <div class=\"cc-message-composer__custom-auxiliary-view\" *ngIf=\"auxilaryButtonView\">\n <ng-container *ngTemplateOutlet=\"auxilaryButtonView;context:{ $implicit: user ?? group, composerId:composerId }\">\n </ng-container>\n </div>\n <div class=\"cc-message-composer__stickerkeyboard\" *ngIf=\"isAiEnabled\">\n <cometchat-popover (cc-popover-outside-click)=\"openStickerKeyboard($event)\" [popoverStyle]=\"aiPopover\" [placement]=\"auxilaryPlacement\" >\n <cometchat-card-view [closeCallback]=\"handleAiFeaturesClose\" slot=\"content\" [buttons]=\"buttons\">\n </cometchat-card-view>\n <cometchat-button [hoverText]=\"localize('AI')\" slot=\"children\" #aiButtonRef (cc-button-clicked)=\"openAiFeatures($event)\" [iconURL]=\" !showAiFeatures ? 'assets/ai-bot.svg' : closeButtonIconURL\" [buttonStyle]=\"stickerButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n \n <div class=\"cc-message-composer__stickerkeyboard\" *ngIf=\"enableStickerKeyboard\">\n <cometchat-popover (cc-popover-outside-click)=\"openStickerKeyboard($event)\" [popoverStyle]=\"stickerPopover\" [placement]=\"auxilaryPlacement\" >\n <stickers-keyboard slot=\"content\" [stickerStyle]=\"stickerKeyboardStyle\" (cc-sticker-clicked)=\"sendSticker($event)\">\n </stickers-keyboard>\n <cometchat-button [hoverText]=\"localize('STICKER')\" slot=\"children\" #stickerButtonRef (cc-button-clicked)=\"openStickerKeyboard($event)\" [iconURL]=\" !showStickerKeyboard ? stickerButtonIconURL : closeButtonIconURL\" [buttonStyle]=\"stickerButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n <div class=\"cc-message-composer__emojikeyboard\">\n <cometchat-popover (cc-popover-outside-click)=\"openEmojiKeyboard($event)\" [placement]=\"auxilaryPlacement\" [popoverStyle]=\"emojiPopover\" >\n <cometchat-emoji-keyboard slot=\"content\" [emojiKeyboardStyle]=\"emojiKeyboardStyle\" (cc-emoji-clicked)=\"appendEmoji($event)\">\n </cometchat-emoji-keyboard>\n <cometchat-button #emojiButtonRef [hoverText]=\"localize('EMOJI')\" slot=\"children\" (cc-button-clicked)=\"openEmojiKeyboard($event)\" [iconURL]=\" !showEmojiKeyboard || (!showEmojiKeyboard && showActionSheetItem) ? emojiButtonIconURL : closeButtonIconURL\" [buttonStyle]=\"emojiButtonStyle\"></cometchat-button>\n </cometchat-popover>\n </div>\n <div class=\"cc-message-composer__mediarecorder\" *ngIf=\"!hideVoiceRecording\">\n <cometchat-popover [closeOnOutsideClick]=\"false\" [popoverStyle]=\"mediaRecordedPopover\" [placement]=\"auxilaryPlacement\" >\n \n <cometchat-media-recorder *ngIf=\"toggleMediaRecorded\" [autoRecording]=\"true\" startIconText=\"\" stopIconText=\"\" submitButtonIconText=\"\" [submitButtonIconURL]=\"voiceRecordingSubmitIconURL\" [startIconURL]=\"voiceRecordingStartIconURL\" [stopIconURL]=\"voiceRecordingStopIconURL\" [closeIconURL]=\"voiceRecordingCloseIconURL\" (cc-media-recorder-submitted)=\"sendRecordedMedia($event)\" (cc-media-recorder-closed)=\"closeMediaRecorder($event)\" slot=\"content\" [mediaPlayerStyle]=\"mediaRecorderStyle\"></cometchat-media-recorder>\n <cometchat-icon-button [hoverText]=\"localize('VOICE_RECORDING')\" slot=\"children\" #mediaRecordedRef (cc-button-clicked)=\"openMediaRecorded($event)\" [iconURL]=\" !toggleMediaRecorded ? voiceRecordingIconURL : closeButtonIconURL\" [buttonStyle]=\"mediaRecorderButtonStyle\"></cometchat-icon-button>\n </cometchat-popover>\n </div>\n </div>\n <div slot=\"primaryView\">\n <div *ngIf=\"sendButtonView;else sendButton\">\n </div>\n <ng-template #sendButton>\n <div class=\"cc-message-composer__sendbutton\" *ngIf=\"showSendButton || hideLiveReaction\">\n <cometchat-button [iconURL]=\"sendButtonIconURL\" [buttonStyle]=\"sendButtonStyle\" [hoverText]=\"localize('SEND_MESSAGE')\" (cc-button-clicked)=\"customSendMethod(messageText)\"></cometchat-button>\n </div>\n <div class=\"cc-message-composer__livereaction\" *ngIf=\"!hideLiveReaction && !showSendButton\">\n <cometchat-button [iconURL]=\"LiveReactionIconURL\" [hoverText]=\"localize('LIVE_REACTION')\" [buttonStyle]=\"liveReactionStyle\" (cc-button-clicked)=\"sendReaction()\"></cometchat-button>\n </div>\n </ng-template>\n </div>\n </cometchat-message-input>\n</div>\n</div>\n\n<input class=\"cc-message-composer__mediainput\" #inputElement (change)=\"inputChangeHandler($event)\" />\n<cometchat-backdrop *ngIf=\"showCreatePolls\" [backdropStyle]=\"backdropStyle\">\n <create-poll [user]=\"user\" [group]=\"group\" (cc-close-clicked)=\"closeCreatePolls()\" [createPollStyle]=\"createPollStyle\"></create-poll>\n</cometchat-backdrop>", styles: [".cc-message-composer__sendbutton,.cc-message-composer__livereaction{margin:0 5px}.cc-message-composer__wrapper{height:100%;width:100%;position:relative;padding:14px 16px}.cc-message-composer__header-view{height:-moz-fit-content;height:fit-content;width:100%;bottom:120%}.cc-message-composer__mediainput{display:none}.cc-message-composer__auxiliary{display:flex;gap:8px}*{box-sizing:border-box}cometchat-card-view{height:100%;width:100%;overflow:hidden;display:flex;border-radius:8px}\n"], components: [{ type: CometChatCardViewComponent, selector: "cometchat-card-view", inputs: ["buttons", "closeCallback"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11479
|
+
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 });
|
|
11067
11480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessageComposerComponent, decorators: [{
|
|
11068
11481
|
type: Component,
|
|
11069
|
-
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\"
|
|
11482
|
+
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"] }]
|
|
11070
11483
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { inputElementRef: [{
|
|
11071
11484
|
type: ViewChild,
|
|
11072
11485
|
args: ["inputElement", { static: false }]
|
|
@@ -11132,6 +11545,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
11132
11545
|
type: Input
|
|
11133
11546
|
}], backdropStyle: [{
|
|
11134
11547
|
type: Input
|
|
11548
|
+
}], actionSheetStyle: [{
|
|
11549
|
+
type: Input
|
|
11135
11550
|
}], hideVoiceRecording: [{
|
|
11136
11551
|
type: Input
|
|
11137
11552
|
}], mediaRecorderStyle: [{
|
|
@@ -11240,7 +11655,6 @@ class CometChatThreadedMessagesComponent {
|
|
|
11240
11655
|
textColor: "black",
|
|
11241
11656
|
background: "transparent",
|
|
11242
11657
|
};
|
|
11243
|
-
this.msgListenerId = "message_" + new Date().getTime();
|
|
11244
11658
|
}
|
|
11245
11659
|
ngOnInit() {
|
|
11246
11660
|
this.requestBuilder = new CometChat.MessagesRequestBuilder()
|
|
@@ -11281,10 +11695,14 @@ class CometChatThreadedMessagesComponent {
|
|
|
11281
11695
|
ngOnChanges(change) {
|
|
11282
11696
|
}
|
|
11283
11697
|
ngOnDestroy() {
|
|
11698
|
+
var _a, _b, _c, _d;
|
|
11284
11699
|
this.unsubscribeToEvents();
|
|
11285
11700
|
try {
|
|
11286
11701
|
//Removing Message Listeners
|
|
11287
|
-
|
|
11702
|
+
(_a = this.onMessagesDelivered) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
11703
|
+
(_b = this.onMessagesRead) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
11704
|
+
(_c = this.onMessageDeleted) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
11705
|
+
(_d = this.onMessageEdited) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
11288
11706
|
}
|
|
11289
11707
|
catch (error) {
|
|
11290
11708
|
if (this.onError) {
|
|
@@ -11313,20 +11731,18 @@ class CometChatThreadedMessagesComponent {
|
|
|
11313
11731
|
}
|
|
11314
11732
|
addMessageEventListeners() {
|
|
11315
11733
|
try {
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
},
|
|
11329
|
-
}));
|
|
11734
|
+
this.onMessagesDelivered = CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt) => {
|
|
11735
|
+
this.updateReceipt(messageReceipt);
|
|
11736
|
+
});
|
|
11737
|
+
this.onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt) => {
|
|
11738
|
+
this.updateReceipt(messageReceipt);
|
|
11739
|
+
});
|
|
11740
|
+
this.onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe((deletedMessage) => {
|
|
11741
|
+
this.updateMessage(deletedMessage);
|
|
11742
|
+
});
|
|
11743
|
+
this.onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe((editedMessage) => {
|
|
11744
|
+
this.updateMessage(editedMessage);
|
|
11745
|
+
});
|
|
11330
11746
|
}
|
|
11331
11747
|
catch (error) {
|
|
11332
11748
|
if (this.onError) {
|
|
@@ -11415,10 +11831,10 @@ class CometChatThreadedMessagesComponent {
|
|
|
11415
11831
|
}
|
|
11416
11832
|
}
|
|
11417
11833
|
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 });
|
|
11418
|
-
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\"
|
|
11834
|
+
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 });
|
|
11419
11835
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatThreadedMessagesComponent, decorators: [{
|
|
11420
11836
|
type: Component,
|
|
11421
|
-
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\"
|
|
11837
|
+
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"] }]
|
|
11422
11838
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { onClose: [{
|
|
11423
11839
|
type: Input
|
|
11424
11840
|
}], onError: [{
|
|
@@ -13545,10 +13961,10 @@ class CometChatMessagesComponent {
|
|
|
13545
13961
|
}
|
|
13546
13962
|
}
|
|
13547
13963
|
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 });
|
|
13548
|
-
CometChatMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatMessagesComponent, selector: "cometchat-messages", inputs: { user: "user", group: "group", hideMessageComposer: "hideMessageComposer", disableTyping: "disableTyping", messageHeaderConfiguration: "messageHeaderConfiguration", messageListConfiguration: "messageListConfiguration", messageComposerConfiguration: "messageComposerConfiguration", threadedMessageConfiguration: "threadedMessageConfiguration", detailsConfiguration: "detailsConfiguration", customSoundForIncomingMessages: "customSoundForIncomingMessages", customSoundForOutgoingMessages: "customSoundForOutgoingMessages", disableSoundForMessages: "disableSoundForMessages", messagesStyle: "messagesStyle", messageHeaderView: "messageHeaderView", messageComposerView: "messageComposerView", messageListView: "messageListView", hideMessageHeader: "hideMessageHeader", hideDetails: "hideDetails", auxiliaryMenu: "auxiliaryMenu" }, viewQueries: [{ propertyName: "messageComposerRef", first: true, predicate: ["messageComposerRef"], descendants: true }, { propertyName: "messageListRef", first: true, predicate: ["messageListRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-messages__wrapper\">\n<div class=\"cc-messages\" [ngStyle]=\"chatListStyle()\" *ngIf=\"user || group\">\n<div class=\"cc-messages__header\" *ngIf=\"!hideMessageHeader\">\n <div *ngIf=\"messageHeaderView; else customHeaderView\" class=\"cc-messages__header-customview\">\n <ng-container *ngTemplateOutlet=\"messageHeaderView\">\n </ng-container>\n </div>\n <ng-template #customHeaderView>\n <cometchat-message-header [user]=\"user\" [group]=\"group\" [subtitleView]=\"messageHeaderConfiguration.subtitleView\"\n [disableUsersPresence]=\"messageHeaderConfiguration.disableUsersPresence\" [protectedGroupIcon]=\"messageHeaderConfiguration.protectedGroupIcon\" [privateGroupIcon]=\"messageHeaderConfiguration.privateGroupIcon\" [menu]=\"headerMenu\" [messageHeaderStyle]=\"messageHeaderConfiguration.messageHeaderStyle\"\n [backButtonIconURL]=\"messageHeaderConfiguration.backButtonIconURL\" [hideBackButton]=\"messageHeaderConfiguration.hideBackButton\" [onError]=\"messageHeaderConfiguration.onError\" [onBack]=\"messageHeaderConfiguration.onBack\" [listItemStyle]=\"messageHeaderConfiguration.listItemStyle\" [statusIndicatorStyle]=\"messageHeaderConfiguration.statusIndicatorStyle\"\n [avatarStyle]=\"messageHeaderConfiguration.avatarStyle\"\n >\n </cometchat-message-header>\n </ng-template>\n</div>\n<div class=\"cc-messages__list\">\n <cometchat-message-list #messageListRef [messageInformationConfiguration]=\"messageListConfiguration.messageInformationConfiguration\" [disableSoundForMessages]=\"disableSoundForMessages\" [customSoundForMessages]=\"customSoundForIncomingMessages\" [emptyStateView]=\"messageListConfiguration.emptyStateView\" [loadingIconURL]=\"messageListConfiguration?.loadingIconURL!\" [loadingStateView]=\"messageListConfiguration.loadingStateView\" [user]=\"user\" [group]=\"group\"\n [errorStateView]=\"messageListConfiguration.errorStateView\" [disableReceipt]=\"messageListConfiguration.disableReceipt\" [readIcon]=\"messageListConfiguration.readIcon\" [deliveredIcon]=\"messageListConfiguration.deliveredIcon\" [sentIcon]=\"messageListConfiguration.sentIcon\" [waitIcon]=\"messageListConfiguration.waitIcon\"\n [errorIcon]=\"messageListConfiguration.errorIcon\" [alignment]=\"messageListConfiguration.alignment\" [showAvatar]=\"messageListConfiguration.showAvatar\" [datePattern]=\"messageListConfiguration.datePattern\" [timestampAlignment]=\"messageListConfiguration.timestampAlignment\" [DateSeparatorPattern]=\"messageListConfiguration.DateSeparatorPattern\"\n [templates]=\"messageListConfiguration.templates\" [messagesRequestBuilder]=\"messageListConfiguration.messagesRequestBuilder\" [thresholdValue]=\"messageListConfiguration.thresholdValue\" [onThreadRepliesClick]=\"messageListConfiguration.onThreadRepliesClick || openThreadView\" [headerView]=\"messageListConfiguration.headerView\" [footerView]=\"messageListConfiguration.footerView\"\n [avatarStyle]=\"messageListConfiguration.avatarStyle\" [scrollToBottomOnNewMessages]=\"messageListConfiguration.scrollToBottomOnNewMessages\" [backdropStyle]=\"messageListConfiguration.backdropStyle\" [dateSeparatorStyle]=\"messageListConfiguration.dateSeparatorStyle\" [messageListStyle]=\"messageListConfiguration.messageListStyle\" [onError]=\"messageListConfiguration.onError\"\n >\n </cometchat-message-list>\n</div>\n<div class=\"cc-messages__composer\" *ngIf=\"!hideMessageComposer\">\n <div *ngIf=\"messageComposerView; else customComposerView\" class=\"cc-messages__composer--customview\">\n <ng-container *ngTemplateOutlet=\"messageComposerView\">\n </ng-container>\n </div>\n <ng-template #customComposerView>\n <cometchat-message-composer #messageComposerRef [disableSoundForMessages]=\"disableSoundForMessages\"\n [voiceRecordingStopIconURL]=\"messageComposerConfiguration.voiceRecordingStopIconURL\"\n [voiceRecordingStartIconURL]=\"messageComposerConfiguration.voiceRecordingStartIconURL\"\n [voiceRecordingCloseIconURL]=\"messageComposerConfiguration.voiceRecordingCloseIconURL\"\n [voiceRecordingSubmitIconURL]=\"messageComposerConfiguration.voiceRecordingSubmitIconURL\"\n [mediaRecorderStyle]=\"messageComposerConfiguration.mediaRecorderStyle\"\n [customSoundForMessages]=\"customSoundForOutgoingMessages\"\n [user]=\"user\" [group]=\"group\" [text]=\"messageComposerConfiguration.text\" [headerView]=\"messageComposerConfiguration.headerView\" [onTextChange]=\"messageComposerConfiguration.onTextChange\" [attachmentIconURL]=\"messageComposerConfiguration.attachmentIconURL\"\n [attachmentOptions]=\"messageComposerConfiguration.attachmentOptions\" [secondaryButtonView]=\"messageComposerConfiguration.secondaryButtonView\" [auxilaryButtonView]=\"messageComposerConfiguration.auxilaryButtonView\" [auxiliaryButtonsAlignment]=\"messageComposerConfiguration.auxiliaryButtonsAlignment\"\n [sendButtonView]=\"messageComposerConfiguration.sendButtonView\" [hideLiveReaction]=\"messageComposerConfiguration.hideLiveReaction\" [LiveReactionIconURL]=\"messageComposerConfiguration.LiveReactionIconURL\" [messageComposerStyle]=\"messageComposerConfiguration.messageComposerStyle\" [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\" [onError]=\"messageComposerConfiguration.onError\"\n >\n </cometchat-message-composer>\n </ng-template>\n</div>\n </div>\n <div class=\"cc-messages__livereaction\">\n <cometchat-live-reaction *ngIf=\"liveReaction\" [reactionIconURL]=\"reactionName\"></cometchat-live-reaction>\n</div>\n<div *ngIf=\"openThreadedMessages\" class=\"cc-messages__threadedmessages\">\n<cometchat-threaded-messages [onClose]=\"closeThreadView\" [threadedMessagesStyle]=\"threadedMessageConfiguration.threadedMessagesStyle\" [messageActionView]=\"threadedMessageConfiguration.messageActionView\" [closeIconURL]=\"threadedMessageConfiguration.closeIconURL\" [onError]=\"threadedMessageConfiguration.onError\" [bubbleView]=\"threadedMessageConfiguration.bubbleView || parentBubbleView\" [parentMessage]=\"threadMessageObject\" [user]=\"user\" [group]=\"group\"></cometchat-threaded-messages>\n</div>\n<div *ngIf=\"openDetails\" class=\"cc-messages__details\">\n <cometchat-details [backdropStyle]=\"detailsConfiguration.backdropStyle\" [transferOwnershipConfiguration]=\"detailsConfiguration.transferOwnershipConfiguration\" [groupMembersConfiguration]=\"detailsConfiguration.groupMembersConfiguration\" [bannedMembersConfiguration]=\"detailsConfiguration.bannedMembersConfiguration\" [addMembersConfiguration]=\"detailsConfiguration.addMembersConfiguration\" [onClose]=\"detailsConfiguration.onClose || closeDetailsPage\" [listItemStyle]=\"detailsConfiguration.listItemStyle\" [detailsStyle]=\"detailsConfiguration.detailsStyle\" [avatarStyle]=\"detailsConfiguration.avatarStyle\" [statusIndicatorStyle]=\"detailsConfiguration.statusIndicatorStyle\" [leaveDialogStyle]=\"detailsConfiguration.leaveDialogStyle\" [data]=\"detailsConfiguration.data\" [customProfileView]=\"detailsConfiguration.customProfileView\" [subtitleView]=\"detailsConfiguration.subtitleView\" [hideProfile]=\"detailsConfiguration.hideProfile\" [onError]=\"detailsConfiguration.onError\" [closeButtonIconURL]=\"detailsConfiguration.closeButtonIconURL\" [user]=\"user\" [group]=\"group\"></cometchat-details>\n </div>\n</div>\n<ng-template #headerMenu>\n <div class=\"cc-messages__headermenu\">\n<div class=\"cc-messages__auxiliarymenu\" *ngIf=\"getAuxilaryView(); else elseBlock\">\n <ng-container *ngTemplateOutlet=\"getAuxilaryView()\">\n </ng-container>\n</div>\n <ng-template #elseBlock>\n <cometchat-call-buttons *ngIf=\"enableCalling\" voiceCallIconText=\"\" videoCallIconText=\"\" [user]=\"user\" [group]=\"group\" [callButtonsStyle]=\"callButtonsStyle\">\n </cometchat-call-buttons>\n </ng-template>\n <cometchat-button *ngIf=\"!hideDetails\" [iconURL]=\"infoIconStyle\" [buttonStyle]=\"detailsButtonStyle\" (cc-button-clicked)=\"openDetailsPage()\"></cometchat-button>\n </div>\n</ng-template>\n", styles: ["*{box-sizing:border-box;margin:0;padding:0}.cc-messages__wrapper{position:relative;height:100%;width:100%}.cc-messages{display:flex;flex-direction:column;position:relative;height:100%;width:100%;box-sizing:border-box;justify-content:space-between}.cc-messages__headermenu{display:flex;justify-content:center;align-items:center}.cc-messages__threadedmessages,.cc-messages__details{position:absolute;top:0;left:0;height:100%;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;max-width:100%;z-index:1}.cc-messages__header{width:100%}.cc-messages__list{overflow:hidden;width:100%;height:100%}cometchat-threaded-messages{height:100%;display:flex}.cc-messages__composer{width:100%;display:flex;flex-direction:column;justify-content:flex-end}\n"], components: [{ type: CometChatMessageHeaderComponent, selector: "cometchat-message-header", inputs: ["avatarStyle", "statusIndicatorStyle", "messageHeaderStyle", "listItemStyle", "subtitleView", "disableUsersPresence", "disableTyping", "protectedGroupIcon", "privateGroupIcon", "menu", "user", "group", "backButtonIconURL", "hideBackButton", "listItemView", "onError", "onBack"] }, { type: CometChatMessageListComponent, selector: "cometchat-message-list", inputs: ["hideError", "errorStateView", "loadingStateView", "emptyStateView", "errorStateText", "emptyStateText", "loadingIconURL", "user", "group", "disableReceipt", "disableSoundForMessages", "customSoundForMessages", "readIcon", "deliveredIcon", "sentIcon", "waitIcon", "errorIcon", "alignment", "showAvatar", "datePattern", "timestampAlignment", "DateSeparatorPattern", "templates", "messagesRequestBuilder", "newMessageIndicatorText", "scrollToBottomOnNewMessages", "thresholdValue", "onThreadRepliesClick", "headerView", "footerView", "parentMessageId", "avatarStyle", "backdropStyle", "dateSeparatorStyle", "messageListStyle", "onError", "messageInformationConfiguration"] }, { type: CometChatMessageComposerComponent, selector: "cometchat-message-composer", inputs: ["user", "group", "disableSoundForMessages", "customSoundForMessage", "disableTypingEvents", "text", "placeholderText", "headerView", "onTextChange", "attachmentIconURL", "attachmentOptions", "secondaryButtonView", "auxilaryButtonView", "auxiliaryButtonsAlignment", "sendButtonView", "parentMessageId", "hideLiveReaction", "LiveReactionIconURL", "messageComposerStyle", "onSendButtonClick", "onError", "backdropStyle", "hideVoiceRecording", "mediaRecorderStyle", "voiceRecordingIconURL", "voiceRecordingCloseIconURL", "voiceRecordingStartIconURL", "voiceRecordingStopIconURL", "voiceRecordingSubmitIconURL"] }, { type: CometChatThreadedMessagesComponent, selector: "cometchat-threaded-messages", inputs: ["onClose", "onError", "parentMessage", "title", "closeIconURL", "bubbleView", "messageActionView", "messageListConfiguration", "messageComposerConfiguration", "threadedMessagesStyle"] }, { type: CometChatDetailsComponent, selector: "cometchat-details", inputs: ["group", "user", "title", "closeButtonIconURL", "hideProfile", "subtitleView", "customProfileView", "data", "disableUsersPresence", "privateGroupIcon", "protectedGroupIcon", "onError", "onClose", "leaveGroupConfirmButtonText", "leaveGroupCancelButtonText", "leaveGroupDialogMessage", "leaveGroupDialogStyle", "deleteGroupConfirmButtonText", "deleteGroupDialogMessage", "deleteGroupCancelButtonText", "deleteGroupDialogStyle", "transferOwnershipConfirmButtonText", "transferOwnershipDialogMessage", "transferOwnershipCancelButtonText", "transferOwnershipDialogStyle", "addMembersConfiguration", "bannedMembersConfiguration", "groupMembersConfiguration", "transferOwnershipConfiguration", "statusIndicatorStyle", "backdropStyle", "avatarStyle", "detailsStyle", "listItemStyle"] }, { type: CometChatCallButtonsComponent, selector: "cometchat-call-buttons", inputs: ["user", "group", "voiceCallIconURL", "voiceCallIconText", "voiceCallIconHoverText", "videoCallIconURL", "videoCallIconText", "videoCallIconHoverText", "onVoiceCallClick", "onVideoCallClick", "onError", "callButtonsStyle", "outgoingCallConfiguration", "ongoingCallConfiguration"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13964
|
+
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 });
|
|
13549
13965
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatMessagesComponent, decorators: [{
|
|
13550
13966
|
type: Component,
|
|
13551
|
-
args: [{ selector: "cometchat-messages", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-messages__wrapper\">\n<div class=\"cc-messages\" [ngStyle]=\"chatListStyle()\" *ngIf=\"user || group\">\n<div class=\"cc-messages__header\" *ngIf=\"!hideMessageHeader\">\n <div *ngIf=\"messageHeaderView; else customHeaderView\" class=\"cc-messages__header-customview\">\n <ng-container *ngTemplateOutlet=\"messageHeaderView\">\n </ng-container>\n </div>\n <ng-template #customHeaderView>\n <cometchat-message-header [user]=\"user\" [group]=\"group\" [subtitleView]=\"messageHeaderConfiguration.subtitleView\"\n [disableUsersPresence]=\"messageHeaderConfiguration.disableUsersPresence\" [protectedGroupIcon]=\"messageHeaderConfiguration.protectedGroupIcon\" [privateGroupIcon]=\"messageHeaderConfiguration.privateGroupIcon\" [menu]=\"headerMenu\" [messageHeaderStyle]=\"messageHeaderConfiguration.messageHeaderStyle\"\n [backButtonIconURL]=\"messageHeaderConfiguration.backButtonIconURL\" [hideBackButton]=\"messageHeaderConfiguration.hideBackButton\" [onError]=\"messageHeaderConfiguration.onError\" [onBack]=\"messageHeaderConfiguration.onBack\" [listItemStyle]=\"messageHeaderConfiguration.listItemStyle\" [statusIndicatorStyle]=\"messageHeaderConfiguration.statusIndicatorStyle\"\n [avatarStyle]=\"messageHeaderConfiguration.avatarStyle\"\n >\n </cometchat-message-header>\n </ng-template>\n</div>\n<div class=\"cc-messages__list\">\n <cometchat-message-list #messageListRef [messageInformationConfiguration]=\"messageListConfiguration.messageInformationConfiguration\" [disableSoundForMessages]=\"disableSoundForMessages\" [customSoundForMessages]=\"customSoundForIncomingMessages\" [emptyStateView]=\"messageListConfiguration.emptyStateView\" [loadingIconURL]=\"messageListConfiguration?.loadingIconURL!\" [loadingStateView]=\"messageListConfiguration.loadingStateView\" [user]=\"user\" [group]=\"group\"\n [errorStateView]=\"messageListConfiguration.errorStateView\" [disableReceipt]=\"messageListConfiguration.disableReceipt\" [readIcon]=\"messageListConfiguration.readIcon\" [deliveredIcon]=\"messageListConfiguration.deliveredIcon\" [sentIcon]=\"messageListConfiguration.sentIcon\" [waitIcon]=\"messageListConfiguration.waitIcon\"\n [errorIcon]=\"messageListConfiguration.errorIcon\" [alignment]=\"messageListConfiguration.alignment\" [showAvatar]=\"messageListConfiguration.showAvatar\" [datePattern]=\"messageListConfiguration.datePattern\" [timestampAlignment]=\"messageListConfiguration.timestampAlignment\" [DateSeparatorPattern]=\"messageListConfiguration.DateSeparatorPattern\"\n [templates]=\"messageListConfiguration.templates\" [messagesRequestBuilder]=\"messageListConfiguration.messagesRequestBuilder\" [thresholdValue]=\"messageListConfiguration.thresholdValue\" [onThreadRepliesClick]=\"messageListConfiguration.onThreadRepliesClick || openThreadView\" [headerView]=\"messageListConfiguration.headerView\" [footerView]=\"messageListConfiguration.footerView\"\n [avatarStyle]=\"messageListConfiguration.avatarStyle\" [scrollToBottomOnNewMessages]=\"messageListConfiguration.scrollToBottomOnNewMessages\" [backdropStyle]=\"messageListConfiguration.backdropStyle\" [dateSeparatorStyle]=\"messageListConfiguration.dateSeparatorStyle\" [messageListStyle]=\"messageListConfiguration.messageListStyle\" [onError]=\"messageListConfiguration.onError\"\n >\n </cometchat-message-list>\n</div>\n<div class=\"cc-messages__composer\" *ngIf=\"!hideMessageComposer\">\n <div *ngIf=\"messageComposerView; else customComposerView\" class=\"cc-messages__composer--customview\">\n <ng-container *ngTemplateOutlet=\"messageComposerView\">\n </ng-container>\n </div>\n <ng-template #customComposerView>\n <cometchat-message-composer #messageComposerRef [disableSoundForMessages]=\"disableSoundForMessages\"\n [voiceRecordingStopIconURL]=\"messageComposerConfiguration.voiceRecordingStopIconURL\"\n [voiceRecordingStartIconURL]=\"messageComposerConfiguration.voiceRecordingStartIconURL\"\n [voiceRecordingCloseIconURL]=\"messageComposerConfiguration.voiceRecordingCloseIconURL\"\n [voiceRecordingSubmitIconURL]=\"messageComposerConfiguration.voiceRecordingSubmitIconURL\"\n [mediaRecorderStyle]=\"messageComposerConfiguration.mediaRecorderStyle\"\n [customSoundForMessages]=\"customSoundForOutgoingMessages\"\n [user]=\"user\" [group]=\"group\" [text]=\"messageComposerConfiguration.text\" [headerView]=\"messageComposerConfiguration.headerView\" [onTextChange]=\"messageComposerConfiguration.onTextChange\" [attachmentIconURL]=\"messageComposerConfiguration.attachmentIconURL\"\n [attachmentOptions]=\"messageComposerConfiguration.attachmentOptions\" [secondaryButtonView]=\"messageComposerConfiguration.secondaryButtonView\" [auxilaryButtonView]=\"messageComposerConfiguration.auxilaryButtonView\" [auxiliaryButtonsAlignment]=\"messageComposerConfiguration.auxiliaryButtonsAlignment\"\n [sendButtonView]=\"messageComposerConfiguration.sendButtonView\" [hideLiveReaction]=\"messageComposerConfiguration.hideLiveReaction\" [LiveReactionIconURL]=\"messageComposerConfiguration.LiveReactionIconURL\" [messageComposerStyle]=\"messageComposerConfiguration.messageComposerStyle\" [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\"\n [onSendButtonClick]=\"messageComposerConfiguration.onSendButtonClick\" [onError]=\"messageComposerConfiguration.onError\"\n >\n </cometchat-message-composer>\n </ng-template>\n</div>\n </div>\n <div class=\"cc-messages__livereaction\">\n <cometchat-live-reaction *ngIf=\"liveReaction\" [reactionIconURL]=\"reactionName\"></cometchat-live-reaction>\n</div>\n<div *ngIf=\"openThreadedMessages\" class=\"cc-messages__threadedmessages\">\n<cometchat-threaded-messages [onClose]=\"closeThreadView\" [threadedMessagesStyle]=\"threadedMessageConfiguration.threadedMessagesStyle\" [messageActionView]=\"threadedMessageConfiguration.messageActionView\" [closeIconURL]=\"threadedMessageConfiguration.closeIconURL\" [onError]=\"threadedMessageConfiguration.onError\" [bubbleView]=\"threadedMessageConfiguration.bubbleView || parentBubbleView\" [parentMessage]=\"threadMessageObject\" [user]=\"user\" [group]=\"group\"></cometchat-threaded-messages>\n</div>\n<div *ngIf=\"openDetails\" class=\"cc-messages__details\">\n <cometchat-details [backdropStyle]=\"detailsConfiguration.backdropStyle\" [transferOwnershipConfiguration]=\"detailsConfiguration.transferOwnershipConfiguration\" [groupMembersConfiguration]=\"detailsConfiguration.groupMembersConfiguration\" [bannedMembersConfiguration]=\"detailsConfiguration.bannedMembersConfiguration\" [addMembersConfiguration]=\"detailsConfiguration.addMembersConfiguration\" [onClose]=\"detailsConfiguration.onClose || closeDetailsPage\" [listItemStyle]=\"detailsConfiguration.listItemStyle\" [detailsStyle]=\"detailsConfiguration.detailsStyle\" [avatarStyle]=\"detailsConfiguration.avatarStyle\" [statusIndicatorStyle]=\"detailsConfiguration.statusIndicatorStyle\" [leaveDialogStyle]=\"detailsConfiguration.leaveDialogStyle\" [data]=\"detailsConfiguration.data\" [customProfileView]=\"detailsConfiguration.customProfileView\" [subtitleView]=\"detailsConfiguration.subtitleView\" [hideProfile]=\"detailsConfiguration.hideProfile\" [onError]=\"detailsConfiguration.onError\" [closeButtonIconURL]=\"detailsConfiguration.closeButtonIconURL\" [user]=\"user\" [group]=\"group\"></cometchat-details>\n </div>\n</div>\n<ng-template #headerMenu>\n <div class=\"cc-messages__headermenu\">\n<div class=\"cc-messages__auxiliarymenu\" *ngIf=\"getAuxilaryView(); else elseBlock\">\n <ng-container *ngTemplateOutlet=\"getAuxilaryView()\">\n </ng-container>\n</div>\n <ng-template #elseBlock>\n <cometchat-call-buttons *ngIf=\"enableCalling\" voiceCallIconText=\"\" videoCallIconText=\"\" [user]=\"user\" [group]=\"group\" [callButtonsStyle]=\"callButtonsStyle\">\n </cometchat-call-buttons>\n </ng-template>\n <cometchat-button *ngIf=\"!hideDetails\" [iconURL]=\"infoIconStyle\" [buttonStyle]=\"detailsButtonStyle\" (cc-button-clicked)=\"openDetailsPage()\"></cometchat-button>\n </div>\n</ng-template>\n", styles: ["*{box-sizing:border-box;margin:0;padding:0}.cc-messages__wrapper{position:relative;height:100%;width:100%}.cc-messages{display:flex;flex-direction:column;position:relative;height:100%;width:100%;box-sizing:border-box;justify-content:space-between}.cc-messages__headermenu{display:flex;justify-content:center;align-items:center}.cc-messages__threadedmessages,.cc-messages__details{position:absolute;top:0;left:0;height:100%;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;max-width:100%;z-index:1}.cc-messages__header{width:100%}.cc-messages__list{overflow:hidden;width:100%;height:100%}cometchat-threaded-messages{height:100%;display:flex}.cc-messages__composer{width:100%;display:flex;flex-direction:column;justify-content:flex-end}\n"] }]
|
|
13967
|
+
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"] }]
|
|
13552
13968
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }, { type: i0.ElementRef }]; }, propDecorators: { messageComposerRef: [{
|
|
13553
13969
|
type: ViewChild,
|
|
13554
13970
|
args: ["messageComposerRef", { static: false }]
|