@cometchat/chat-uikit-angular 4.0.0-beta.1.2 → 4.0.0-beta.1.3
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/Calls/CometChatCallDetails/cometchat-call-details/cometchat-call-details.component.d.ts +139 -0
- package/Calls/CometChatCallDetails/cometchat-call-details.module.d.ts +10 -0
- package/Calls/CometChatCallHistory/cometchat-call-history/cometchat-call-history.component.d.ts +125 -0
- package/Calls/CometChatCallHistory/cometchat-call-history.module.d.ts +10 -0
- package/Calls/CometChatCallHistoryWithDetails/cometchat-call-history-with-details/cometchat-call-history-with-details.component.d.ts +59 -0
- package/Calls/CometChatCallHistoryWithDetails/cometchat-call-history-with-details.module.d.ts +12 -0
- package/Shared/Views/CometChatTabs/cometchat-tabs/cometchat-tabs.component.d.ts +53 -0
- package/Shared/Views/CometChatTabs/cometchat-tabs.module.d.ts +12 -0
- package/esm2020/Calls/CometChatCallDetails/cometchat-call-details/cometchat-call-details.component.mjs +452 -0
- package/esm2020/Calls/CometChatCallDetails/cometchat-call-details.module.mjs +31 -0
- package/esm2020/Calls/CometChatCallHistory/cometchat-call-history/cometchat-call-history.component.mjs +397 -0
- package/esm2020/Calls/CometChatCallHistory/cometchat-call-history.module.mjs +28 -0
- package/esm2020/Calls/CometChatCallHistoryWithDetails/cometchat-call-history-with-details/cometchat-call-history-with-details.component.mjs +143 -0
- package/esm2020/Calls/CometChatCallHistoryWithDetails/cometchat-call-history-with-details.module.mjs +39 -0
- package/esm2020/Shared/Views/CometChatTabs/cometchat-tabs/cometchat-tabs.component.mjs +88 -0
- package/esm2020/Shared/Views/CometChatTabs/cometchat-tabs.module.mjs +39 -0
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/cometchat-chat-uikit-angular.mjs +1161 -3
- package/fesm2015/cometchat-chat-uikit-angular.mjs.map +1 -1
- package/fesm2020/cometchat-chat-uikit-angular.mjs +1155 -3
- package/fesm2020/cometchat-chat-uikit-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CometChatMessageOption, CometChatUIKitConstants, localize, fontHelper, CometChatMessageTemplate, CometChatMessageComposerAction, CometChatTheme, CometChatMessageEvents, MessageStatus, CometChatUIEvents, IconButtonAlignment, CometChatCallEvents, CometChatLocalize, SelectionMode, TitleAlignment as TitleAlignment$1, States as States$1, CometChatUserEvents, CometChatGroupEvents, DatePatterns, CometChatConversationEvents, MessageListAlignment, TimestampAlignment, DocumentIconAlignment, MessageBubbleAlignment as MessageBubbleAlignment$1, Placement, AuxiliaryButtonAlignment } from '@cometchat/uikit-resources';
|
|
1
|
+
import { CometChatMessageOption, CometChatUIKitConstants, localize, fontHelper, CometChatMessageTemplate, CometChatMessageComposerAction, CometChatTheme, CometChatMessageEvents, MessageStatus, CometChatUIEvents, IconButtonAlignment, CometChatCallEvents, CometChatLocalize, SelectionMode, TitleAlignment as TitleAlignment$1, States as States$1, CometChatUserEvents, CometChatGroupEvents, DatePatterns, CometChatConversationEvents, MessageListAlignment, TimestampAlignment, DocumentIconAlignment, MessageBubbleAlignment as MessageBubbleAlignment$1, Placement, AuxiliaryButtonAlignment, TabAlignment } from '@cometchat/uikit-resources';
|
|
2
2
|
export { AuxiliaryButtonAlignment, CometChatDetailsOption, CometChatDetailsTemplate, CometChatLocalize, CometChatMessageComposerAction, CometChatMessageOption, CometChatMessageTemplate, CometChatOption, CometChatPalette, CometChatTabItem, CometChatTheme, CometChatTypography, CometChatUIKitConstants, DatePatterns, DocumentIconAlignment, IconButtonAlignment, MessageBubbleAlignment, MessageListAlignment, MessageStatus, Placement, Receipts, SelectionMode, States, TabAlignment, TimestampAlignment, TitleAlignment, fontHelper, localize } from '@cometchat/uikit-resources';
|
|
3
|
-
import { ConversationUtils, CallingDetailsUtils, CollaborativeDocumentConstants, CollaborativeWhiteboardConstants, MessageTranslationConfiguration, PollsConstants, CometChatUIKitUtility, CometChatSoundManager, SmartRepliesConfiguration, StickersConstants, StickersConfiguration, CometChatUIKitCalls, CallscreenStyle, OutgoingCallStyle, OutgoingCallConfiguration, CallScreenConfiguration, CallButtonsStyle, TitleAlignment, States, StorageUtils, IncomingCallStyle, UsersStyle, SelectionMode as SelectionMode$1, AddMembersStyle, MessageHeaderStyle, ListStyle, BannedMembersStyle, MessageReceiptUtils, MessageStatus as MessageStatus$1, ConversationsStyle, MessageBubbleAlignment, MessageTranslationConstants, MessageTranslationStyle, ReactionsConstants, LinkPreviewConstants, ThumbnailGenerationConstants, MessageListStyle, LinkPreviewStyle, SmartRepliesConstants, MessageComposerStyle, MessageListConfiguration, MessageComposerConfiguration, ThreadedMessagesStyle, GroupMemberUtils, GroupMembersStyle, TransferOwnershipStyle, AddMembersConfiguration, BannedMembersConfiguration, GroupMembersConfiguration, TransferOwnershipConfiguration, DetailsUtils, DetailsStyle, MessageHeaderConfiguration, ThreadedMessagesConfiguration, DetailsConfiguration, MessagesStyle, MessagesConfiguration, ConversationsConfiguration, WithMessagesStyle, GroupsStyle, CreateGroupConfiguration, JoinGroupConfiguration, GroupsConfiguration, UsersConfiguration } from '@cometchat/uikit-shared';
|
|
3
|
+
import { ConversationUtils, CallingDetailsUtils, CollaborativeDocumentConstants, CollaborativeWhiteboardConstants, MessageTranslationConfiguration, PollsConstants, CometChatUIKitUtility, CometChatSoundManager, SmartRepliesConfiguration, StickersConstants, StickersConfiguration, CometChatUIKitCalls, CallscreenStyle, OutgoingCallStyle, OutgoingCallConfiguration, CallScreenConfiguration, CallButtonsStyle, TitleAlignment, States, StorageUtils, IncomingCallStyle, UsersStyle, SelectionMode as SelectionMode$1, AddMembersStyle, MessageHeaderStyle, ListStyle, BannedMembersStyle, MessageReceiptUtils, MessageStatus as MessageStatus$1, ConversationsStyle, MessageBubbleAlignment, MessageTranslationConstants, MessageTranslationStyle, ReactionsConstants, LinkPreviewConstants, ThumbnailGenerationConstants, MessageListStyle, LinkPreviewStyle, SmartRepliesConstants, MessageComposerStyle, MessageListConfiguration, MessageComposerConfiguration, ThreadedMessagesStyle, GroupMemberUtils, GroupMembersStyle, TransferOwnershipStyle, AddMembersConfiguration, BannedMembersConfiguration, GroupMembersConfiguration, TransferOwnershipConfiguration, DetailsUtils, DetailsStyle, MessageHeaderConfiguration, ThreadedMessagesConfiguration, DetailsConfiguration, MessagesStyle, MessagesConfiguration, ConversationsConfiguration, WithMessagesStyle, GroupsStyle, CreateGroupConfiguration, JoinGroupConfiguration, GroupsConfiguration, UsersConfiguration, CallHistoryStyle, CallButtonsConfiguration, CallDetailsConfiguration, CallHistoryConfiguration, WithDetailsStyle } from '@cometchat/uikit-shared';
|
|
4
4
|
export { AddMembersConfiguration, BannedMembersConfiguration, CallButtonsConfiguration, CallDetailsConfiguration, CallHistoryConfiguration, CallScreenConfiguration, CallingDetailsUtils, CollaborativeDocumentConfiguration, CollaborativeDocumentConstants, CollaborativeWhiteboardConfiguration, CollaborativeWhiteboardConstants, ConversationUtils, ConversationsConfiguration, CreateGroupConfiguration, DetailsConfiguration, DetailsUtils, GroupMemberUtils, GroupMembersConfiguration, GroupsConfiguration, ImageModerationConfiguration, ImageModerationConstants, JoinGroupConfiguration, LinkPreviewConstants, MessageBubbleConfiguration, MessageComposerConfiguration, MessageHeaderConfiguration, MessageListConfiguration, MessageReceiptUtils, MessageTranslationConfiguration, MessageTranslationConstants, MessagesConfiguration, OutgoingCallConfiguration, PollsConstants, ReactionsConstants, SmartRepliesConfiguration, SmartRepliesConstants, StickersConfiguration, StickersConstants, ThreadedMessagesConfiguration, ThumbnailGenerationConstants, TransferOwnershipConfiguration, UsersConfiguration } from '@cometchat/uikit-shared';
|
|
5
5
|
import { CometChat } from '@cometchat-pro/chat';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
@@ -13737,6 +13737,1158 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
13737
13737
|
}]
|
|
13738
13738
|
}] });
|
|
13739
13739
|
|
|
13740
|
+
class CometChatTabsComponent {
|
|
13741
|
+
constructor(ref) {
|
|
13742
|
+
this.ref = ref;
|
|
13743
|
+
this.tabAlignment = TabAlignment.bottom;
|
|
13744
|
+
this.tabsStyle = {};
|
|
13745
|
+
this.tabs = [];
|
|
13746
|
+
this.openViewOnCLick = (tabItem) => {
|
|
13747
|
+
this.childView = null;
|
|
13748
|
+
let index = this.tabs.findIndex((item) => item.id === tabItem.id);
|
|
13749
|
+
if (index > -1) {
|
|
13750
|
+
this.activeTab = tabItem;
|
|
13751
|
+
this.childView = this.tabs[index].childView;
|
|
13752
|
+
this.ref.detectChanges();
|
|
13753
|
+
}
|
|
13754
|
+
};
|
|
13755
|
+
}
|
|
13756
|
+
ngOnInit() {
|
|
13757
|
+
}
|
|
13758
|
+
getButtonStyle(tab) {
|
|
13759
|
+
const { style = {} } = tab || {};
|
|
13760
|
+
const { id } = this.activeTab || {};
|
|
13761
|
+
const active = id === tab?.id;
|
|
13762
|
+
return {
|
|
13763
|
+
background: active ? style.activeBackground ?? style.background : style.background,
|
|
13764
|
+
buttonTextFont: active ? style.activeTitleTextFont ?? style.titleTextFont : style.titleTextFont,
|
|
13765
|
+
buttonTextColor: active ? style.activeTitleTextColor ?? style.titleTextColor : style.titleTextColor,
|
|
13766
|
+
buttonIconTint: active ? style.activeIconTint ?? style.iconTint : style.iconTint,
|
|
13767
|
+
height: style.height,
|
|
13768
|
+
width: style.width,
|
|
13769
|
+
border: style.border,
|
|
13770
|
+
borderRadius: style.borderRadius,
|
|
13771
|
+
gap: "0",
|
|
13772
|
+
padding: "0",
|
|
13773
|
+
};
|
|
13774
|
+
}
|
|
13775
|
+
getTabsStyle() {
|
|
13776
|
+
const position = (() => {
|
|
13777
|
+
switch (this.tabAlignment) {
|
|
13778
|
+
case TabAlignment.top:
|
|
13779
|
+
case TabAlignment.left:
|
|
13780
|
+
return {
|
|
13781
|
+
top: "0",
|
|
13782
|
+
left: "0",
|
|
13783
|
+
};
|
|
13784
|
+
case TabAlignment.bottom:
|
|
13785
|
+
return {
|
|
13786
|
+
bottom: "0",
|
|
13787
|
+
left: "0",
|
|
13788
|
+
};
|
|
13789
|
+
default:
|
|
13790
|
+
return {
|
|
13791
|
+
top: "0",
|
|
13792
|
+
right: "0",
|
|
13793
|
+
};
|
|
13794
|
+
}
|
|
13795
|
+
})();
|
|
13796
|
+
const { background } = this.tabsStyle ?? {};
|
|
13797
|
+
return {
|
|
13798
|
+
background,
|
|
13799
|
+
...position,
|
|
13800
|
+
};
|
|
13801
|
+
}
|
|
13802
|
+
getTabsPlacement() {
|
|
13803
|
+
let alignment = this.tabAlignment == TabAlignment.top || this.tabAlignment == TabAlignment.bottom ? "row" : "column";
|
|
13804
|
+
return {
|
|
13805
|
+
display: "flex",
|
|
13806
|
+
flexDirection: alignment
|
|
13807
|
+
};
|
|
13808
|
+
}
|
|
13809
|
+
}
|
|
13810
|
+
CometChatTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatTabsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
13811
|
+
CometChatTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatTabsComponent, selector: "cometchat-tabs", inputs: { tabAlignment: "tabAlignment", tabsStyle: "tabsStyle", tabs: "tabs" }, ngImport: i0, template: "<div class=\"cc-tabs-wrapper\">\n <div class=\"cc-child-view\" *ngIf=\"childView\">\n <ng-container [ngTemplateOutlet]=\"childView\" >\n\n </ng-container>\n </div>\n <div class=\"cc-tabs\" [ngStyle]=\"getTabsStyle()\">\n <cometchat-draggable [draggableStyle]=\"tabsStyle\">\n <div class=\"cc__tab-item\" [ngStyle]=\"getTabsPlacement()\">\n <cometchat-icon-button [alignment]=\"'column'\" *ngFor=\"let tab of tabs\" [iconURL]=\"tab.iconURL\" [text]=\"tab.title\" [buttonStyle]=\"getButtonStyle(tab)\" (cc-button-clicked)=\"openViewOnCLick(tab)\"></cometchat-icon-button>\n </div>\n </cometchat-draggable>\n </div>\n</div>\n", styles: [".cc-tabs-wrapper{height:100%;width:100%;display:flex;flex-direction:column;justify-content:flex-end}.cc-child-view{height:100%;width:100%}.cc-tabs{height:-moz-fit-content;height:fit-content;width:-moz-fit-content;width:fit-content;position:absolute}.cc__tab-item{display:flex}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatTabsComponent, decorators: [{
|
|
13813
|
+
type: Component,
|
|
13814
|
+
args: [{ selector: 'cometchat-tabs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-tabs-wrapper\">\n <div class=\"cc-child-view\" *ngIf=\"childView\">\n <ng-container [ngTemplateOutlet]=\"childView\" >\n\n </ng-container>\n </div>\n <div class=\"cc-tabs\" [ngStyle]=\"getTabsStyle()\">\n <cometchat-draggable [draggableStyle]=\"tabsStyle\">\n <div class=\"cc__tab-item\" [ngStyle]=\"getTabsPlacement()\">\n <cometchat-icon-button [alignment]=\"'column'\" *ngFor=\"let tab of tabs\" [iconURL]=\"tab.iconURL\" [text]=\"tab.title\" [buttonStyle]=\"getButtonStyle(tab)\" (cc-button-clicked)=\"openViewOnCLick(tab)\"></cometchat-icon-button>\n </div>\n </cometchat-draggable>\n </div>\n</div>\n", styles: [".cc-tabs-wrapper{height:100%;width:100%;display:flex;flex-direction:column;justify-content:flex-end}.cc-child-view{height:100%;width:100%}.cc-tabs{height:-moz-fit-content;height:fit-content;width:-moz-fit-content;width:fit-content;position:absolute}.cc__tab-item{display:flex}\n"] }]
|
|
13815
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { tabAlignment: [{
|
|
13816
|
+
type: Input
|
|
13817
|
+
}], tabsStyle: [{
|
|
13818
|
+
type: Input
|
|
13819
|
+
}], tabs: [{
|
|
13820
|
+
type: Input
|
|
13821
|
+
}] } });
|
|
13822
|
+
|
|
13823
|
+
/**
|
|
13824
|
+
*
|
|
13825
|
+
* CometChatCallHistory is a wrapper component which renders callhistory of the loggedinuser using CometChatListItem && CometChatList.
|
|
13826
|
+
*
|
|
13827
|
+
* @version 1.0.0
|
|
13828
|
+
* @author CometChatTeam
|
|
13829
|
+
* @copyright © 2022 CometChat Inc.
|
|
13830
|
+
*
|
|
13831
|
+
*/
|
|
13832
|
+
class CometChatCallHistoryComponent {
|
|
13833
|
+
constructor(ref, themeService) {
|
|
13834
|
+
this.ref = ref;
|
|
13835
|
+
this.themeService = themeService;
|
|
13836
|
+
this.hideSeparator = false;
|
|
13837
|
+
this.selectionMode = SelectionMode$1.none;
|
|
13838
|
+
this.hideError = false;
|
|
13839
|
+
this.title = localize("CALLS");
|
|
13840
|
+
this.onError = (error) => {
|
|
13841
|
+
console.log(error);
|
|
13842
|
+
};
|
|
13843
|
+
this.loadingIconURL = "assets/Spinner.svg";
|
|
13844
|
+
this.datePattern = DatePatterns.DayDateTime;
|
|
13845
|
+
this.emptyStateText = localize("NO_callS_FOUND");
|
|
13846
|
+
this.errorStateText = localize("SOMETHING_WRONG");
|
|
13847
|
+
this.titleAlignment = TitleAlignment.left;
|
|
13848
|
+
this.avatarStyle = {
|
|
13849
|
+
borderRadius: "16px",
|
|
13850
|
+
width: "32px",
|
|
13851
|
+
height: "32px",
|
|
13852
|
+
};
|
|
13853
|
+
this.dateStyle = {};
|
|
13854
|
+
this.callHistoryStyle = {
|
|
13855
|
+
width: "100%",
|
|
13856
|
+
height: "100%",
|
|
13857
|
+
background: "",
|
|
13858
|
+
border: "",
|
|
13859
|
+
borderRadius: "",
|
|
13860
|
+
titleTextFont: "",
|
|
13861
|
+
titleTextColor: "",
|
|
13862
|
+
subtitleTextFont: "",
|
|
13863
|
+
subtitleTextColor: "",
|
|
13864
|
+
emptyStateTextFont: "",
|
|
13865
|
+
emptyStateTextColor: "",
|
|
13866
|
+
errorStateTextFont: "",
|
|
13867
|
+
errorStateTextColor: "",
|
|
13868
|
+
loadingIconTint: "",
|
|
13869
|
+
separatorColor: "rgb(222 222 222 / 46%)",
|
|
13870
|
+
};
|
|
13871
|
+
this.listItemStyle = {};
|
|
13872
|
+
this.selectionmodeEnum = SelectionMode$1;
|
|
13873
|
+
this.state = States.loading;
|
|
13874
|
+
this.listStyle = {};
|
|
13875
|
+
this.limit = 30;
|
|
13876
|
+
this.callsList = [];
|
|
13877
|
+
this.callsListenerId = "callsList_" + new Date().getTime();
|
|
13878
|
+
this.loggedInUser = null;
|
|
13879
|
+
this.onScrolledToBottom = null;
|
|
13880
|
+
this.iconStyle = {
|
|
13881
|
+
height: "16px",
|
|
13882
|
+
width: "16px",
|
|
13883
|
+
iconTint: "RGBA(20, 20, 20, 0.68)"
|
|
13884
|
+
};
|
|
13885
|
+
this.fetchNextcallList = () => {
|
|
13886
|
+
this.onScrolledToBottom = null;
|
|
13887
|
+
this.state = States.loading;
|
|
13888
|
+
this.ref.detectChanges();
|
|
13889
|
+
try {
|
|
13890
|
+
this.callsRequest.fetchPrevious().then((callList) => {
|
|
13891
|
+
if (callList?.length > 0) {
|
|
13892
|
+
this.onScrolledToBottom = this.fetchNextcallList;
|
|
13893
|
+
this.ref.detectChanges();
|
|
13894
|
+
}
|
|
13895
|
+
if ((callList.length <= 0 && this.callsList?.length <= 0) || (callList.length === 0 && this.callsList?.length <= 0)) {
|
|
13896
|
+
this.state = States.empty;
|
|
13897
|
+
this.ref.detectChanges();
|
|
13898
|
+
}
|
|
13899
|
+
else {
|
|
13900
|
+
this.state = States.loaded;
|
|
13901
|
+
this.callsList = [...this.callsList, ...callList.reverse()];
|
|
13902
|
+
this.ref.detectChanges();
|
|
13903
|
+
}
|
|
13904
|
+
}, (error) => {
|
|
13905
|
+
if (this.onError) {
|
|
13906
|
+
this.onError(CometChatException(error));
|
|
13907
|
+
}
|
|
13908
|
+
this.state = States.error;
|
|
13909
|
+
this.ref.detectChanges();
|
|
13910
|
+
}).catch((error) => {
|
|
13911
|
+
if (this.onError) {
|
|
13912
|
+
this.onError(error);
|
|
13913
|
+
}
|
|
13914
|
+
});
|
|
13915
|
+
}
|
|
13916
|
+
catch (error) {
|
|
13917
|
+
this.state = States.error;
|
|
13918
|
+
this.ref.detectChanges();
|
|
13919
|
+
if (this.onError) {
|
|
13920
|
+
this.onError(CometChatException(error));
|
|
13921
|
+
}
|
|
13922
|
+
}
|
|
13923
|
+
};
|
|
13924
|
+
/**
|
|
13925
|
+
* @param {CometChat.Call} call
|
|
13926
|
+
*/
|
|
13927
|
+
this.onClick = (call) => {
|
|
13928
|
+
if (this.onItemClick) {
|
|
13929
|
+
this.onItemClick(call);
|
|
13930
|
+
}
|
|
13931
|
+
};
|
|
13932
|
+
/**
|
|
13933
|
+
* @param {CometChat.Call} call
|
|
13934
|
+
*/
|
|
13935
|
+
/**
|
|
13936
|
+
* @param {CometChat.Call} call
|
|
13937
|
+
*/
|
|
13938
|
+
this.getActiveCall = (call) => {
|
|
13939
|
+
if (this.selectionMode == SelectionMode$1.none || !this.selectionMode) {
|
|
13940
|
+
if (call.getId() == this.activeCall?.getId()) {
|
|
13941
|
+
return true;
|
|
13942
|
+
}
|
|
13943
|
+
else {
|
|
13944
|
+
return false;
|
|
13945
|
+
}
|
|
13946
|
+
}
|
|
13947
|
+
else {
|
|
13948
|
+
return false;
|
|
13949
|
+
}
|
|
13950
|
+
};
|
|
13951
|
+
this.callStyle = () => {
|
|
13952
|
+
return {
|
|
13953
|
+
height: this.callHistoryStyle.height,
|
|
13954
|
+
width: this.callHistoryStyle.width,
|
|
13955
|
+
background: this.callHistoryStyle.background,
|
|
13956
|
+
border: this.callHistoryStyle.border,
|
|
13957
|
+
borderRadius: this.callHistoryStyle.borderRadius
|
|
13958
|
+
};
|
|
13959
|
+
};
|
|
13960
|
+
this.subtitleStyle = () => {
|
|
13961
|
+
return {
|
|
13962
|
+
font: this.callHistoryStyle.subtitleTextFont,
|
|
13963
|
+
color: this.callHistoryStyle.subtitleTextColor
|
|
13964
|
+
};
|
|
13965
|
+
};
|
|
13966
|
+
this.state = States.loading;
|
|
13967
|
+
}
|
|
13968
|
+
ngOnInit() {
|
|
13969
|
+
this.setThemeStyle();
|
|
13970
|
+
CometChat.getLoggedinUser().then((user) => {
|
|
13971
|
+
this.loggedInUser = user;
|
|
13972
|
+
this.callsRequest = this.getRequestBuilder();
|
|
13973
|
+
this.fetchNextcallList();
|
|
13974
|
+
this.attachListeners();
|
|
13975
|
+
this.subscribeToEvents();
|
|
13976
|
+
}).catch((error) => {
|
|
13977
|
+
if (this.onError) {
|
|
13978
|
+
this.onError(error);
|
|
13979
|
+
}
|
|
13980
|
+
});
|
|
13981
|
+
this.state = States.loading;
|
|
13982
|
+
}
|
|
13983
|
+
callMenuOption(event, call) {
|
|
13984
|
+
let onClick = event?.detail?.data?.onClick;
|
|
13985
|
+
if (onClick) {
|
|
13986
|
+
onClick(call);
|
|
13987
|
+
}
|
|
13988
|
+
}
|
|
13989
|
+
subscribeToEvents() {
|
|
13990
|
+
this.ccCallAccepted = CometChatCallEvents.ccCallAccepted.subscribe((call) => {
|
|
13991
|
+
this.addCall(call);
|
|
13992
|
+
});
|
|
13993
|
+
this.ccCallRejected = CometChatCallEvents.ccCallRejected.subscribe((call) => {
|
|
13994
|
+
this.addCall(call);
|
|
13995
|
+
});
|
|
13996
|
+
this.ccOutgoingCall = CometChatCallEvents.ccOutgoingCall.subscribe((call) => {
|
|
13997
|
+
this.addCall(call);
|
|
13998
|
+
});
|
|
13999
|
+
this.ccCallEnded = CometChatCallEvents.ccCallEnded.subscribe((call) => {
|
|
14000
|
+
if (call) {
|
|
14001
|
+
this.addCall(call);
|
|
14002
|
+
}
|
|
14003
|
+
});
|
|
14004
|
+
}
|
|
14005
|
+
unsubscribeToEvents() {
|
|
14006
|
+
this.ccCallAccepted?.unsubscribe();
|
|
14007
|
+
this.ccCallRejected?.unsubscribe();
|
|
14008
|
+
this.ccOutgoingCall?.unsubscribe();
|
|
14009
|
+
this.ccCallEnded?.unsubscribe();
|
|
14010
|
+
}
|
|
14011
|
+
ngOnDestroy() {
|
|
14012
|
+
this.callsRequest = null;
|
|
14013
|
+
this.ref.detach();
|
|
14014
|
+
this.removeListener();
|
|
14015
|
+
this.unsubscribeToEvents();
|
|
14016
|
+
}
|
|
14017
|
+
/**
|
|
14018
|
+
* @param {CometChat.Call} call
|
|
14019
|
+
*/
|
|
14020
|
+
/**
|
|
14021
|
+
* @param {CometChat.Call} call
|
|
14022
|
+
*/
|
|
14023
|
+
attachListeners() {
|
|
14024
|
+
CometChat.addCallListener(this.callsListenerId, new CometChat.CallListener({
|
|
14025
|
+
onIncomingCallReceived: (call) => {
|
|
14026
|
+
this.addCall(call);
|
|
14027
|
+
},
|
|
14028
|
+
onIncomingCallCancelled: (call) => {
|
|
14029
|
+
this.addCall(call);
|
|
14030
|
+
},
|
|
14031
|
+
onOutgoingCallAccepted: (call) => {
|
|
14032
|
+
this.addCall(call);
|
|
14033
|
+
},
|
|
14034
|
+
onOutgoingCallRejected: (call) => {
|
|
14035
|
+
this.addCall(call);
|
|
14036
|
+
},
|
|
14037
|
+
}));
|
|
14038
|
+
}
|
|
14039
|
+
removeListener() {
|
|
14040
|
+
CometChat.removeCallListener(this.callsListenerId);
|
|
14041
|
+
}
|
|
14042
|
+
getSubtitle(call) {
|
|
14043
|
+
return CallingDetailsUtils.getCallStatus(call, this.loggedInUser);
|
|
14044
|
+
}
|
|
14045
|
+
getCallTypeIcon(call) {
|
|
14046
|
+
if (call.getType() == CometChatUIKitConstants.MessageTypes.audio) {
|
|
14047
|
+
return "assets/Audio-Call.svg";
|
|
14048
|
+
}
|
|
14049
|
+
else {
|
|
14050
|
+
return "VideoCallIcon";
|
|
14051
|
+
}
|
|
14052
|
+
}
|
|
14053
|
+
getCallerName(call) {
|
|
14054
|
+
if (CallingDetailsUtils.isSentByMe(call, this.loggedInUser)) {
|
|
14055
|
+
return call.getReceiver().getName();
|
|
14056
|
+
}
|
|
14057
|
+
return call.getSender().getName();
|
|
14058
|
+
}
|
|
14059
|
+
getRequestBuilder() {
|
|
14060
|
+
if (this.messageRequestBuilder) {
|
|
14061
|
+
return this.messageRequestBuilder
|
|
14062
|
+
.build();
|
|
14063
|
+
}
|
|
14064
|
+
else {
|
|
14065
|
+
return new CometChat.MessagesRequestBuilder()
|
|
14066
|
+
.setLimit(this.limit)
|
|
14067
|
+
.setTypes([CometChatUIKitConstants.MessageTypes.audio, CometChatUIKitConstants.MessageTypes.video])
|
|
14068
|
+
.setCategories([CometChatUIKitConstants.MessageCategory.call])
|
|
14069
|
+
.build();
|
|
14070
|
+
}
|
|
14071
|
+
}
|
|
14072
|
+
/**
|
|
14073
|
+
* addcall
|
|
14074
|
+
* @param call
|
|
14075
|
+
*/
|
|
14076
|
+
addCall(call) {
|
|
14077
|
+
this.callsList.unshift(call);
|
|
14078
|
+
this.ref.detectChanges();
|
|
14079
|
+
}
|
|
14080
|
+
setThemeStyle() {
|
|
14081
|
+
this.iconStyle.iconTint = this.themeService.theme.palette.getAccent600();
|
|
14082
|
+
this.setAvatarStyle();
|
|
14083
|
+
this.setDateStyle();
|
|
14084
|
+
this.setCallsStyle();
|
|
14085
|
+
this.listStyle = {
|
|
14086
|
+
titleTextFont: this.callHistoryStyle.titleTextFont,
|
|
14087
|
+
titleTextColor: this.callHistoryStyle.titleTextColor,
|
|
14088
|
+
emptyStateTextFont: this.callHistoryStyle.emptyStateTextFont,
|
|
14089
|
+
emptyStateTextColor: this.callHistoryStyle.emptyStateTextColor,
|
|
14090
|
+
errorStateTextFont: this.callHistoryStyle.errorStateTextFont,
|
|
14091
|
+
errorStateTextColor: this.callHistoryStyle.errorStateTextColor,
|
|
14092
|
+
loadingIconTint: this.callHistoryStyle.loadingIconTint,
|
|
14093
|
+
separatorColor: this.callHistoryStyle.separatorColor,
|
|
14094
|
+
};
|
|
14095
|
+
}
|
|
14096
|
+
setAvatarStyle() {
|
|
14097
|
+
let defaultStyle = new AvatarStyle({
|
|
14098
|
+
borderRadius: "24px",
|
|
14099
|
+
width: "36px",
|
|
14100
|
+
height: "36px",
|
|
14101
|
+
border: "none",
|
|
14102
|
+
backgroundColor: this.themeService.theme.palette.getAccent700(),
|
|
14103
|
+
nameTextColor: this.themeService.theme.palette.getAccent900(),
|
|
14104
|
+
backgroundSize: "cover",
|
|
14105
|
+
nameTextFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
14106
|
+
outerViewBorder: "",
|
|
14107
|
+
outerViewBorderSpacing: "",
|
|
14108
|
+
});
|
|
14109
|
+
this.avatarStyle = { ...defaultStyle, ...this.avatarStyle };
|
|
14110
|
+
}
|
|
14111
|
+
setDateStyle() {
|
|
14112
|
+
let defaultStyle = new DateStyle({
|
|
14113
|
+
textFont: fontHelper(this.themeService.theme.typography.caption2),
|
|
14114
|
+
textColor: this.themeService.theme.palette.getAccent600(),
|
|
14115
|
+
background: "transparent"
|
|
14116
|
+
});
|
|
14117
|
+
this.dateStyle = { ...defaultStyle, ...this.dateStyle };
|
|
14118
|
+
}
|
|
14119
|
+
getListItemStyle(call) {
|
|
14120
|
+
let defaultStyle = new ListItemStyle({
|
|
14121
|
+
height: "45px",
|
|
14122
|
+
width: "100%",
|
|
14123
|
+
background: this.themeService.theme.palette.getBackground(),
|
|
14124
|
+
activeBackground: this.themeService.theme.palette.getAccent100(),
|
|
14125
|
+
borderRadius: "0",
|
|
14126
|
+
titleFont: fontHelper(this.themeService.theme.typography.title2),
|
|
14127
|
+
titleColor: CallingDetailsUtils.isMissedCall(call, this.loggedInUser) ? this.themeService.theme.palette.getError() : this.themeService.theme.palette.getAccent(),
|
|
14128
|
+
border: "none",
|
|
14129
|
+
separatorColor: this.themeService.theme.palette.getAccent200(),
|
|
14130
|
+
hoverBackground: this.themeService.theme.palette.getAccent50()
|
|
14131
|
+
});
|
|
14132
|
+
return { ...defaultStyle, ...this.listItemStyle };
|
|
14133
|
+
}
|
|
14134
|
+
setCallsStyle() {
|
|
14135
|
+
let defaultStyle = new CallHistoryStyle({
|
|
14136
|
+
subtitleTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
14137
|
+
subtitleTextColor: this.themeService.theme.palette.getAccent600(),
|
|
14138
|
+
background: this.themeService.theme.palette.getBackground(),
|
|
14139
|
+
border: `1px solid ${this.themeService.theme.palette.getAccent50()}`,
|
|
14140
|
+
titleTextFont: fontHelper(this.themeService.theme.typography.title1),
|
|
14141
|
+
titleTextColor: this.themeService.theme.palette.getAccent(),
|
|
14142
|
+
emptyStateTextFont: fontHelper(this.themeService.theme.typography.title1),
|
|
14143
|
+
emptyStateTextColor: this.themeService.theme.palette.getAccent600(),
|
|
14144
|
+
errorStateTextFont: fontHelper(this.themeService.theme.typography.title1),
|
|
14145
|
+
errorStateTextColor: this.themeService.theme.palette.getAccent600(),
|
|
14146
|
+
loadingIconTint: this.themeService.theme.palette.getAccent600(),
|
|
14147
|
+
separatorColor: this.themeService.theme.palette.getAccent400(),
|
|
14148
|
+
});
|
|
14149
|
+
this.callHistoryStyle = { ...this.callHistoryStyle, ...defaultStyle };
|
|
14150
|
+
}
|
|
14151
|
+
}
|
|
14152
|
+
CometChatCallHistoryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistoryComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CometChatThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
14153
|
+
CometChatCallHistoryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatCallHistoryComponent, selector: "cometchat-call-history", inputs: { messageRequestBuilder: "messageRequestBuilder", subtitleView: "subtitleView", listItemView: "listItemView", menu: "menu", options: "options", activeCall: "activeCall", hideSeparator: "hideSeparator", selectionMode: "selectionMode", hideError: "hideError", title: "title", onError: "onError", onSelect: "onSelect", emptyStateView: "emptyStateView", errorStateView: "errorStateView", loadingIconURL: "loadingIconURL", datePattern: "datePattern", loadingStateView: "loadingStateView", emptyStateText: "emptyStateText", errorStateText: "errorStateText", titleAlignment: "titleAlignment", avatarStyle: "avatarStyle", dateStyle: "dateStyle", callHistoryStyle: "callHistoryStyle", listItemStyle: "listItemStyle", onItemClick: "onItemClick" }, ngImport: i0, template: "<div class=\"cc-call-history\" [ngStyle]=\"callStyle()\">\n <div class=\"cc-menus\" *ngIf=\"menu\">\n <ng-container *ngTemplateOutlet=\"menu\">\n </ng-container>\n</div>\n <cometchat-list [hideSearch]=\"true\" [listItemView]=\"listItemView ? listItemView : listItem\" [onScrolledToBottom]=\"onScrolledToBottom\"\n [list]=\"callsList\" [hideError]=\"hideError\" [title]=\"title\"\n [emptyStateText]=\"emptyStateText\" [loadingIconURL]=\"loadingIconURL\"\n [titleAlignment]=\"titleAlignment\" [loadingStateView]=\"loadingStateView\" [emptyStateView]=\"emptyStateView\"\n [errorStateText]=\"errorStateText\" [errorStateView]=\"errorStateView\" [listStyle]=\"listStyle\" [state]=\"state\">\n </cometchat-list>\n <ng-template #listItem let-call>\n <cometchat-list-item [title]=\"getCallerName(call)\" [avatarURL]=\"call?.avatar\" [avatarName]=\"getCallerName(call)\"\n [listItemStyle]=\"getListItemStyle(call)\" [avatarStyle]=\"avatarStyle\"\n [hideSeparator]=\"hideSeparator\" (cc-listitem-clicked)=\"onClick(call)\" [isActive]=\"getActiveCall(call)\">\n <div slot=\"subtitleView\" class=\"cc-call-history__subtitle-view\" *ngIf=\"subtitleView;else groupSubtitle\">\n <ng-container *ngTemplateOutlet=\"subtitleView\">\n </ng-container>\n </div>\n <ng-template #groupSubtitle>\n <div slot=\"subtitleView\" [ngStyle]=\"subtitleStyle()\" class=\"cc-call-history__subtitle-view\">\n <div class=\"cc-call__icon\">\n <cometchat-icon [iconStyle]=\"iconStyle\" [URL]=\"getCallTypeIcon(call)\"></cometchat-icon>\n </div>\n <div class=\"cc-call__type\">\n {{getSubtitle(call)}}\n </div>\n </div>\n </ng-template>\n <div slot=\"menuView\" class=\"cc-call-history__options\" *ngIf=\"options\">\n <cometchat-menu-list (cc-menu-clicked)=\"callMenuOption($event,call)\" [data]=\"options(call)\">\n </cometchat-menu-list>\n </div>\n <div slot=\"tailView\" class=\"cc-call-history__tail-view\">\n <div class=\"tail__view\" *ngIf=\"selectionMode == selectionmodeEnum.none\">\n <div class=\"cc-call-history__date\">\n <cometchat-date [dateStyle]=\"dateStyle\" [timestamp]=\"call?.sentAt\" [pattern]=\"datePattern\"></cometchat-date>\n </div>\n </div>\n <div class=\"cc-call-history__selection-view\" *ngIf=\"selectionMode != selectionmodeEnum.none\">\n <ng-container *ngTemplateOutlet=\"tailView\">\n </ng-container>\n </div>\n </div>\n </cometchat-list-item>\n <ng-template #tailView>\n <div *ngIf=\"selectionMode == selectionmodeEnum.single\">\n <cometchat-radio-button (cc-radio-button-changed)=\"onSelect ? onSelect(call) : null\"></cometchat-radio-button>\n </div>\n <div *ngIf=\"selectionMode == selectionmodeEnum.multiple\">\n <cometchat-checkbox (cc-checkbox-changed)=\"onSelect ? onSelect(call) : null\"></cometchat-checkbox>\n </div>\n </ng-template>\n </ng-template>\n</div>", styles: [".cc-call-history{height:100%;width:100%;box-sizing:border-box;padding-bottom:24px}.cc-call-history__tail-view{position:relative}.cc-menus{position:absolute;right:12px;top:6px}.cc-call-history__subtitle-view{display:flex;align-items:center;justify-content:flex-start;gap:6px}\n"], components: [{ type: CometchatListComponent, selector: "cometchat-list", inputs: ["listItemView", "onScrolledToBottom", "onScrolledToTop", "list", "onSearch", "searchText", "searchIconURL", "listStyle", "searchPlaceholderText", "hideSearch", "hideError", "title", "titleAlignment", "errorStateView", "loadingStateView", "emptyStateView", "state", "errorStateText", "emptyStateText", "loadingIconURL", "showSectionHeader", "sectionHeaderField"] }], 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 });
|
|
14154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistoryComponent, decorators: [{
|
|
14155
|
+
type: Component,
|
|
14156
|
+
args: [{ selector: "cometchat-call-history", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-call-history\" [ngStyle]=\"callStyle()\">\n <div class=\"cc-menus\" *ngIf=\"menu\">\n <ng-container *ngTemplateOutlet=\"menu\">\n </ng-container>\n</div>\n <cometchat-list [hideSearch]=\"true\" [listItemView]=\"listItemView ? listItemView : listItem\" [onScrolledToBottom]=\"onScrolledToBottom\"\n [list]=\"callsList\" [hideError]=\"hideError\" [title]=\"title\"\n [emptyStateText]=\"emptyStateText\" [loadingIconURL]=\"loadingIconURL\"\n [titleAlignment]=\"titleAlignment\" [loadingStateView]=\"loadingStateView\" [emptyStateView]=\"emptyStateView\"\n [errorStateText]=\"errorStateText\" [errorStateView]=\"errorStateView\" [listStyle]=\"listStyle\" [state]=\"state\">\n </cometchat-list>\n <ng-template #listItem let-call>\n <cometchat-list-item [title]=\"getCallerName(call)\" [avatarURL]=\"call?.avatar\" [avatarName]=\"getCallerName(call)\"\n [listItemStyle]=\"getListItemStyle(call)\" [avatarStyle]=\"avatarStyle\"\n [hideSeparator]=\"hideSeparator\" (cc-listitem-clicked)=\"onClick(call)\" [isActive]=\"getActiveCall(call)\">\n <div slot=\"subtitleView\" class=\"cc-call-history__subtitle-view\" *ngIf=\"subtitleView;else groupSubtitle\">\n <ng-container *ngTemplateOutlet=\"subtitleView\">\n </ng-container>\n </div>\n <ng-template #groupSubtitle>\n <div slot=\"subtitleView\" [ngStyle]=\"subtitleStyle()\" class=\"cc-call-history__subtitle-view\">\n <div class=\"cc-call__icon\">\n <cometchat-icon [iconStyle]=\"iconStyle\" [URL]=\"getCallTypeIcon(call)\"></cometchat-icon>\n </div>\n <div class=\"cc-call__type\">\n {{getSubtitle(call)}}\n </div>\n </div>\n </ng-template>\n <div slot=\"menuView\" class=\"cc-call-history__options\" *ngIf=\"options\">\n <cometchat-menu-list (cc-menu-clicked)=\"callMenuOption($event,call)\" [data]=\"options(call)\">\n </cometchat-menu-list>\n </div>\n <div slot=\"tailView\" class=\"cc-call-history__tail-view\">\n <div class=\"tail__view\" *ngIf=\"selectionMode == selectionmodeEnum.none\">\n <div class=\"cc-call-history__date\">\n <cometchat-date [dateStyle]=\"dateStyle\" [timestamp]=\"call?.sentAt\" [pattern]=\"datePattern\"></cometchat-date>\n </div>\n </div>\n <div class=\"cc-call-history__selection-view\" *ngIf=\"selectionMode != selectionmodeEnum.none\">\n <ng-container *ngTemplateOutlet=\"tailView\">\n </ng-container>\n </div>\n </div>\n </cometchat-list-item>\n <ng-template #tailView>\n <div *ngIf=\"selectionMode == selectionmodeEnum.single\">\n <cometchat-radio-button (cc-radio-button-changed)=\"onSelect ? onSelect(call) : null\"></cometchat-radio-button>\n </div>\n <div *ngIf=\"selectionMode == selectionmodeEnum.multiple\">\n <cometchat-checkbox (cc-checkbox-changed)=\"onSelect ? onSelect(call) : null\"></cometchat-checkbox>\n </div>\n </ng-template>\n </ng-template>\n</div>", styles: [".cc-call-history{height:100%;width:100%;box-sizing:border-box;padding-bottom:24px}.cc-call-history__tail-view{position:relative}.cc-menus{position:absolute;right:12px;top:6px}.cc-call-history__subtitle-view{display:flex;align-items:center;justify-content:flex-start;gap:6px}\n"] }]
|
|
14157
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { messageRequestBuilder: [{
|
|
14158
|
+
type: Input
|
|
14159
|
+
}], subtitleView: [{
|
|
14160
|
+
type: Input
|
|
14161
|
+
}], listItemView: [{
|
|
14162
|
+
type: Input
|
|
14163
|
+
}], menu: [{
|
|
14164
|
+
type: Input
|
|
14165
|
+
}], options: [{
|
|
14166
|
+
type: Input
|
|
14167
|
+
}], activeCall: [{
|
|
14168
|
+
type: Input
|
|
14169
|
+
}], hideSeparator: [{
|
|
14170
|
+
type: Input
|
|
14171
|
+
}], selectionMode: [{
|
|
14172
|
+
type: Input
|
|
14173
|
+
}], hideError: [{
|
|
14174
|
+
type: Input
|
|
14175
|
+
}], title: [{
|
|
14176
|
+
type: Input
|
|
14177
|
+
}], onError: [{
|
|
14178
|
+
type: Input
|
|
14179
|
+
}], onSelect: [{
|
|
14180
|
+
type: Input
|
|
14181
|
+
}], emptyStateView: [{
|
|
14182
|
+
type: Input
|
|
14183
|
+
}], errorStateView: [{
|
|
14184
|
+
type: Input
|
|
14185
|
+
}], loadingIconURL: [{
|
|
14186
|
+
type: Input
|
|
14187
|
+
}], datePattern: [{
|
|
14188
|
+
type: Input
|
|
14189
|
+
}], loadingStateView: [{
|
|
14190
|
+
type: Input
|
|
14191
|
+
}], emptyStateText: [{
|
|
14192
|
+
type: Input
|
|
14193
|
+
}], errorStateText: [{
|
|
14194
|
+
type: Input
|
|
14195
|
+
}], titleAlignment: [{
|
|
14196
|
+
type: Input
|
|
14197
|
+
}], avatarStyle: [{
|
|
14198
|
+
type: Input
|
|
14199
|
+
}], dateStyle: [{
|
|
14200
|
+
type: Input
|
|
14201
|
+
}], callHistoryStyle: [{
|
|
14202
|
+
type: Input
|
|
14203
|
+
}], listItemStyle: [{
|
|
14204
|
+
type: Input
|
|
14205
|
+
}], onItemClick: [{
|
|
14206
|
+
type: Input
|
|
14207
|
+
}] } });
|
|
14208
|
+
|
|
14209
|
+
/**
|
|
14210
|
+
*
|
|
14211
|
+
* CometChatCallDetailsComponent renders details of user or group.
|
|
14212
|
+
*
|
|
14213
|
+
* @version 1.0.0
|
|
14214
|
+
* @author CometChatTeam
|
|
14215
|
+
* @copyright © 2022 CometChat Inc.
|
|
14216
|
+
*
|
|
14217
|
+
*/
|
|
14218
|
+
class CometChatCallDetailsComponent {
|
|
14219
|
+
constructor(ref, themeService) {
|
|
14220
|
+
this.ref = ref;
|
|
14221
|
+
this.themeService = themeService;
|
|
14222
|
+
this.title = localize("CALL_DETAILS");
|
|
14223
|
+
this.closeButtonIconURL = "assets/close2x.svg";
|
|
14224
|
+
this.hideProfile = false;
|
|
14225
|
+
this.disableUsersPresence = false;
|
|
14226
|
+
this.privateGroupIcon = "assets/Private.svg";
|
|
14227
|
+
this.protectedGroupIcon = "assets/Locked.svg";
|
|
14228
|
+
this.onError = (error) => {
|
|
14229
|
+
console.log(error);
|
|
14230
|
+
};
|
|
14231
|
+
this.data = [];
|
|
14232
|
+
this.statusIndicatorStyle = {
|
|
14233
|
+
height: "10px",
|
|
14234
|
+
width: "10px",
|
|
14235
|
+
borderRadius: "16px",
|
|
14236
|
+
border: ""
|
|
14237
|
+
};
|
|
14238
|
+
this.avatarStyle = {
|
|
14239
|
+
borderRadius: "16px",
|
|
14240
|
+
width: "28px",
|
|
14241
|
+
height: "28px",
|
|
14242
|
+
border: "none",
|
|
14243
|
+
};
|
|
14244
|
+
this.callDetailsStyle = {
|
|
14245
|
+
width: "100%",
|
|
14246
|
+
height: "100%",
|
|
14247
|
+
padding: "0 100px"
|
|
14248
|
+
};
|
|
14249
|
+
this.callButtonsConfiguration = new CallButtonsConfiguration({});
|
|
14250
|
+
this.listItemStyle = {
|
|
14251
|
+
height: "100%",
|
|
14252
|
+
width: "100%",
|
|
14253
|
+
background: "",
|
|
14254
|
+
activeBackground: "transparent",
|
|
14255
|
+
borderRadius: "grey",
|
|
14256
|
+
titleFont: "600 15px Inter",
|
|
14257
|
+
titleColor: "black",
|
|
14258
|
+
border: "",
|
|
14259
|
+
hoverBackground: "transparent",
|
|
14260
|
+
separatorColor: "rgb(222 222 222 / 46%)"
|
|
14261
|
+
};
|
|
14262
|
+
this.messagesList = [];
|
|
14263
|
+
this.loggedInUser = null;
|
|
14264
|
+
this.statusColor = {
|
|
14265
|
+
private: "",
|
|
14266
|
+
password: "#F7A500",
|
|
14267
|
+
public: ""
|
|
14268
|
+
};
|
|
14269
|
+
this.closeButtonStyle = {
|
|
14270
|
+
height: "24px",
|
|
14271
|
+
width: "24px",
|
|
14272
|
+
border: "none",
|
|
14273
|
+
borderRadius: "0",
|
|
14274
|
+
background: "transparent",
|
|
14275
|
+
buttonIconTint: this.callDetailsStyle.closeButtonIconTint || this.themeService.theme.palette.getPrimary()
|
|
14276
|
+
};
|
|
14277
|
+
this.buttonStyle = {
|
|
14278
|
+
height: "100%",
|
|
14279
|
+
width: "100%",
|
|
14280
|
+
border: "none",
|
|
14281
|
+
borderRadius: "0",
|
|
14282
|
+
background: "transparent",
|
|
14283
|
+
buttonTextColor: this.themeService.theme.palette.getPrimary() || "rgba(51, 153, 255)",
|
|
14284
|
+
buttonTextFont: "500 16px Inter"
|
|
14285
|
+
};
|
|
14286
|
+
this.dividerStyle = {
|
|
14287
|
+
background: "rgb(222 222 222 / 46%)",
|
|
14288
|
+
height: "1px",
|
|
14289
|
+
width: "100%"
|
|
14290
|
+
};
|
|
14291
|
+
this.subtitleText = "";
|
|
14292
|
+
this.userListenerId = "userlist_" + new Date().getTime();
|
|
14293
|
+
this.limit = 5;
|
|
14294
|
+
this.types = [];
|
|
14295
|
+
this.categories = [];
|
|
14296
|
+
this.checkStatusType = () => {
|
|
14297
|
+
return this.user && !this.disableUsersPresence ? this.statusColor[this.user?.getStatus()] : this.statusColor[this.group?.getType()];
|
|
14298
|
+
};
|
|
14299
|
+
this.onCloseClick = () => {
|
|
14300
|
+
if (this.onClose) {
|
|
14301
|
+
this.onClose();
|
|
14302
|
+
}
|
|
14303
|
+
};
|
|
14304
|
+
this.subtitleStyle = () => {
|
|
14305
|
+
if (this.user && this.user.getStatus() == CometChatUIKitConstants.userStatusType.online) {
|
|
14306
|
+
return {
|
|
14307
|
+
textFont: this.callDetailsStyle.subtitleTextFont,
|
|
14308
|
+
textColor: this.themeService.theme.palette.getPrimary()
|
|
14309
|
+
};
|
|
14310
|
+
}
|
|
14311
|
+
else {
|
|
14312
|
+
return {
|
|
14313
|
+
textFont: this.callDetailsStyle.subtitleTextFont,
|
|
14314
|
+
textColor: this.callDetailsStyle.subtitleTextColor
|
|
14315
|
+
};
|
|
14316
|
+
}
|
|
14317
|
+
};
|
|
14318
|
+
/**
|
|
14319
|
+
* @param {CometChat.Group} group
|
|
14320
|
+
*/
|
|
14321
|
+
this.getGroupIcon = (group) => {
|
|
14322
|
+
let status;
|
|
14323
|
+
if (group) {
|
|
14324
|
+
switch (group.getType()) {
|
|
14325
|
+
case CometChatUIKitConstants.GroupTypes.password:
|
|
14326
|
+
status = this.protectedGroupIcon;
|
|
14327
|
+
break;
|
|
14328
|
+
case CometChatUIKitConstants.GroupTypes.private:
|
|
14329
|
+
status = this.privateGroupIcon;
|
|
14330
|
+
break;
|
|
14331
|
+
default:
|
|
14332
|
+
status = null;
|
|
14333
|
+
break;
|
|
14334
|
+
}
|
|
14335
|
+
}
|
|
14336
|
+
return status;
|
|
14337
|
+
};
|
|
14338
|
+
this.getTemplateOptions = (template) => {
|
|
14339
|
+
if (template.options) {
|
|
14340
|
+
return template.options(this.user, this.group, template.id);
|
|
14341
|
+
}
|
|
14342
|
+
else
|
|
14343
|
+
return [];
|
|
14344
|
+
};
|
|
14345
|
+
this.wrapperStyle = () => {
|
|
14346
|
+
return {
|
|
14347
|
+
width: this.callDetailsStyle.width,
|
|
14348
|
+
height: this.callDetailsStyle.height,
|
|
14349
|
+
border: this.callDetailsStyle.border,
|
|
14350
|
+
borderRadius: this.callDetailsStyle.borderRadius,
|
|
14351
|
+
background: this.callDetailsStyle.background,
|
|
14352
|
+
};
|
|
14353
|
+
};
|
|
14354
|
+
this.marginStyle = () => {
|
|
14355
|
+
return {
|
|
14356
|
+
padding: this.callDetailsStyle?.padding
|
|
14357
|
+
};
|
|
14358
|
+
};
|
|
14359
|
+
}
|
|
14360
|
+
//
|
|
14361
|
+
getTitleStyle() {
|
|
14362
|
+
return {
|
|
14363
|
+
textFont: this.callDetailsStyle.titleTextFont || fontHelper(this.themeService.theme.typography.title1),
|
|
14364
|
+
textColor: this.callDetailsStyle.titleTextColor || this.themeService.theme.palette.getAccent()
|
|
14365
|
+
};
|
|
14366
|
+
}
|
|
14367
|
+
ngOnChanges(changes) {
|
|
14368
|
+
if (changes["user"] || changes["group"]) {
|
|
14369
|
+
this.updateSubtitle();
|
|
14370
|
+
}
|
|
14371
|
+
}
|
|
14372
|
+
removeListener() {
|
|
14373
|
+
CometChat.removeUserListener(this.userListenerId);
|
|
14374
|
+
}
|
|
14375
|
+
ngOnDestroy() {
|
|
14376
|
+
this.removeListener();
|
|
14377
|
+
if (this.onClose) {
|
|
14378
|
+
this.onClose();
|
|
14379
|
+
}
|
|
14380
|
+
this.unsubscribeToEvents();
|
|
14381
|
+
}
|
|
14382
|
+
ngOnInit() {
|
|
14383
|
+
this.setThemeStyle();
|
|
14384
|
+
this.subscribeToEvents();
|
|
14385
|
+
this.statusColor.online = this.callDetailsStyle.onlineStatusColor || this.themeService.theme.palette.getSuccess();
|
|
14386
|
+
this.attachListeners();
|
|
14387
|
+
this.updateSubtitle();
|
|
14388
|
+
}
|
|
14389
|
+
/**
|
|
14390
|
+
* Compares two dates and sets Date on a a new day
|
|
14391
|
+
*/
|
|
14392
|
+
/**
|
|
14393
|
+
* @param {number} firstDate
|
|
14394
|
+
* @param {number} secondDate
|
|
14395
|
+
*/
|
|
14396
|
+
isDateDifferent(firstDate, secondDate) {
|
|
14397
|
+
let firstDateObj, secondDateObj;
|
|
14398
|
+
firstDateObj = new Date(firstDate * 1000);
|
|
14399
|
+
secondDateObj = new Date(secondDate * 1000);
|
|
14400
|
+
return firstDateObj.getDate() !== secondDateObj.getDate() ||
|
|
14401
|
+
firstDateObj.getMonth() !== secondDateObj.getMonth() ||
|
|
14402
|
+
firstDateObj.getFullYear() !== secondDateObj.getFullYear();
|
|
14403
|
+
}
|
|
14404
|
+
subscribeToEvents() {
|
|
14405
|
+
this.ccGroupMemberAdded = CometChatGroupEvents.ccGroupMemberAdded.subscribe((item) => {
|
|
14406
|
+
this.group = item?.userAddedIn;
|
|
14407
|
+
this.group = item?.userAddedIn;
|
|
14408
|
+
this.updateSubtitle();
|
|
14409
|
+
this.ref.detectChanges();
|
|
14410
|
+
});
|
|
14411
|
+
this.ccGroupMemberJoined = CometChatGroupEvents.ccGroupMemberJoined.subscribe((item) => {
|
|
14412
|
+
this.group = item?.joinedGroup;
|
|
14413
|
+
this.updateSubtitle();
|
|
14414
|
+
this.ref.detectChanges();
|
|
14415
|
+
});
|
|
14416
|
+
this.ccGroupMemberKicked = CometChatGroupEvents.ccGroupMemberKicked.subscribe((item) => {
|
|
14417
|
+
this.group = item?.kickedFrom;
|
|
14418
|
+
this.updateSubtitle();
|
|
14419
|
+
this.ref.detectChanges();
|
|
14420
|
+
});
|
|
14421
|
+
this.ccGroupMemberBanned = CometChatGroupEvents.ccGroupMemberBanned.subscribe((item) => {
|
|
14422
|
+
this.group = item?.kickedFrom;
|
|
14423
|
+
this.updateSubtitle();
|
|
14424
|
+
this.ref.detectChanges();
|
|
14425
|
+
});
|
|
14426
|
+
this.ccOwnershipChanged = CometChatGroupEvents.ccOwnershipChanged.subscribe((item) => {
|
|
14427
|
+
this.group = item?.group;
|
|
14428
|
+
this.updateSubtitle();
|
|
14429
|
+
this.ref.detectChanges();
|
|
14430
|
+
});
|
|
14431
|
+
}
|
|
14432
|
+
unsubscribeToEvents() {
|
|
14433
|
+
this.ccGroupMemberAdded?.unsubscribe();
|
|
14434
|
+
this.ccGroupMemberJoined?.unsubscribe();
|
|
14435
|
+
this.ccGroupMemberKicked?.unsubscribe();
|
|
14436
|
+
this.ccGroupMemberBanned?.unsubscribe();
|
|
14437
|
+
this.ccOwnershipChanged?.unsubscribe();
|
|
14438
|
+
}
|
|
14439
|
+
updateSubtitle() {
|
|
14440
|
+
const count = this.group?.getMembersCount();
|
|
14441
|
+
const membersText = localize(count > 1 ? "MEMBERS" : "MEMBER");
|
|
14442
|
+
this.subtitleText = this.user ? this.user.getStatus() : `${count} ${membersText}`;
|
|
14443
|
+
this.ref.detectChanges();
|
|
14444
|
+
}
|
|
14445
|
+
getButtonStyle(option) {
|
|
14446
|
+
return {
|
|
14447
|
+
height: "100%",
|
|
14448
|
+
width: "100%",
|
|
14449
|
+
border: "none",
|
|
14450
|
+
borderRadius: "0",
|
|
14451
|
+
buttonTextFont: option?.titleFont,
|
|
14452
|
+
buttonTextColor: option?.titleColor,
|
|
14453
|
+
background: option?.backgroundColor || "transparent"
|
|
14454
|
+
};
|
|
14455
|
+
}
|
|
14456
|
+
checkGroupType() {
|
|
14457
|
+
let image = "";
|
|
14458
|
+
if (this.group) {
|
|
14459
|
+
switch (this.group?.getType()) {
|
|
14460
|
+
case CometChatUIKitConstants.GroupTypes.password:
|
|
14461
|
+
image = this.protectedGroupIcon;
|
|
14462
|
+
break;
|
|
14463
|
+
case CometChatUIKitConstants.GroupTypes.private:
|
|
14464
|
+
image = this.privateGroupIcon;
|
|
14465
|
+
break;
|
|
14466
|
+
default:
|
|
14467
|
+
image = "";
|
|
14468
|
+
break;
|
|
14469
|
+
}
|
|
14470
|
+
}
|
|
14471
|
+
return image;
|
|
14472
|
+
}
|
|
14473
|
+
updateUserStatus(user) {
|
|
14474
|
+
if (this.user && this.user.getUid() && this.user.getUid() === user.getUid()) {
|
|
14475
|
+
this.user.setStatus(user.getStatus());
|
|
14476
|
+
this.updateSubtitle();
|
|
14477
|
+
}
|
|
14478
|
+
// this.ref.detectChanges();
|
|
14479
|
+
}
|
|
14480
|
+
attachListeners() {
|
|
14481
|
+
try {
|
|
14482
|
+
if (!this.disableUsersPresence) {
|
|
14483
|
+
CometChat.addUserListener(this.userListenerId, new CometChat.UserListener({
|
|
14484
|
+
onUserOnline: (onlineUser) => {
|
|
14485
|
+
/* when someuser/friend comes online, user will be received here */
|
|
14486
|
+
this.updateUserStatus(onlineUser);
|
|
14487
|
+
},
|
|
14488
|
+
onUserOffline: (offlineUser) => {
|
|
14489
|
+
/* when someuser/friend went offline, user will be received here */
|
|
14490
|
+
this.updateUserStatus(offlineUser);
|
|
14491
|
+
},
|
|
14492
|
+
}));
|
|
14493
|
+
}
|
|
14494
|
+
}
|
|
14495
|
+
catch (error) {
|
|
14496
|
+
if (this.onError) {
|
|
14497
|
+
this.onError(CometChatException(error));
|
|
14498
|
+
}
|
|
14499
|
+
}
|
|
14500
|
+
}
|
|
14501
|
+
getSectionHeaderStyle() {
|
|
14502
|
+
return {
|
|
14503
|
+
textFont: "500 15px Inter",
|
|
14504
|
+
textColor: "lightgrey"
|
|
14505
|
+
};
|
|
14506
|
+
}
|
|
14507
|
+
getCallStatusStyleStyle() {
|
|
14508
|
+
return {
|
|
14509
|
+
textFont: "400 15px Inter",
|
|
14510
|
+
textColor: "black"
|
|
14511
|
+
};
|
|
14512
|
+
}
|
|
14513
|
+
getDateStyle() {
|
|
14514
|
+
return {
|
|
14515
|
+
textFont: "400 15px Inter",
|
|
14516
|
+
textColor: "lightgrey"
|
|
14517
|
+
};
|
|
14518
|
+
}
|
|
14519
|
+
onCloseDetails() {
|
|
14520
|
+
if (this.onClose) {
|
|
14521
|
+
this.onClose();
|
|
14522
|
+
}
|
|
14523
|
+
}
|
|
14524
|
+
/**
|
|
14525
|
+
* @param {CometChat.Group} group
|
|
14526
|
+
*/
|
|
14527
|
+
getStatusIndicatorColor(group) {
|
|
14528
|
+
return this.statusColor[group?.getType()];
|
|
14529
|
+
}
|
|
14530
|
+
getCustomOptionView(option) {
|
|
14531
|
+
return option?.customView;
|
|
14532
|
+
}
|
|
14533
|
+
showDataSectionStyle(template) {
|
|
14534
|
+
return {
|
|
14535
|
+
textFont: template.titleFont,
|
|
14536
|
+
textColor: template.titleColor
|
|
14537
|
+
};
|
|
14538
|
+
}
|
|
14539
|
+
setThemeStyle() {
|
|
14540
|
+
this.setDetailsStyle();
|
|
14541
|
+
this.setAvatarStyle();
|
|
14542
|
+
this.setStatusStyle();
|
|
14543
|
+
this.setListItemStyle();
|
|
14544
|
+
this.statusColor.private = this.callDetailsStyle.privateGroupIconBackground;
|
|
14545
|
+
this.statusColor.online = this.callDetailsStyle.onlineStatusColor;
|
|
14546
|
+
this.statusColor.password = this.callDetailsStyle.passwordGroupIconBackground;
|
|
14547
|
+
}
|
|
14548
|
+
setListItemStyle() {
|
|
14549
|
+
let defaultStyle = new ListItemStyle({
|
|
14550
|
+
height: "45px",
|
|
14551
|
+
width: "100%",
|
|
14552
|
+
background: this.themeService.theme.palette.getBackground(),
|
|
14553
|
+
activeBackground: "transparent",
|
|
14554
|
+
borderRadius: "0",
|
|
14555
|
+
titleFont: fontHelper(this.themeService.theme.typography.title2),
|
|
14556
|
+
titleColor: this.themeService.theme.palette.getAccent(),
|
|
14557
|
+
border: "none",
|
|
14558
|
+
separatorColor: this.themeService.theme.palette.getAccent200(),
|
|
14559
|
+
hoverBackground: "transparent"
|
|
14560
|
+
});
|
|
14561
|
+
this.listItemStyle = { ...defaultStyle, ...this.listItemStyle };
|
|
14562
|
+
}
|
|
14563
|
+
setAvatarStyle() {
|
|
14564
|
+
let defaultStyle = new AvatarStyle({
|
|
14565
|
+
borderRadius: "24px",
|
|
14566
|
+
width: "36px",
|
|
14567
|
+
height: "36px",
|
|
14568
|
+
border: "none",
|
|
14569
|
+
backgroundColor: this.themeService.theme.palette.getAccent700(),
|
|
14570
|
+
nameTextColor: this.themeService.theme.palette.getAccent900(),
|
|
14571
|
+
backgroundSize: "cover",
|
|
14572
|
+
nameTextFont: fontHelper(this.themeService.theme.typography.subtitle1),
|
|
14573
|
+
outerViewBorder: "",
|
|
14574
|
+
outerViewBorderSpacing: "",
|
|
14575
|
+
});
|
|
14576
|
+
this.avatarStyle = { ...defaultStyle, ...this.avatarStyle };
|
|
14577
|
+
}
|
|
14578
|
+
setStatusStyle() {
|
|
14579
|
+
let defaultStyle = {
|
|
14580
|
+
height: "12px",
|
|
14581
|
+
width: "12px",
|
|
14582
|
+
border: "none",
|
|
14583
|
+
borderRadius: "24px",
|
|
14584
|
+
};
|
|
14585
|
+
this.statusIndicatorStyle = { ...defaultStyle, ...this.statusIndicatorStyle };
|
|
14586
|
+
}
|
|
14587
|
+
setDetailsStyle() {
|
|
14588
|
+
let defaultStyle = new DetailsStyle({
|
|
14589
|
+
background: this.themeService.theme.palette.getBackground(),
|
|
14590
|
+
border: `1px solid ${this.themeService.theme.palette.getAccent50()}`,
|
|
14591
|
+
titleTextFont: fontHelper(this.themeService.theme.typography.title1),
|
|
14592
|
+
titleTextColor: this.themeService.theme.palette.getAccent(),
|
|
14593
|
+
onlineStatusColor: this.themeService.theme.palette.getSuccess(),
|
|
14594
|
+
privateGroupIconBackground: this.themeService.theme.palette.getSuccess(),
|
|
14595
|
+
passwordGroupIconBackground: "RGB(247, 165, 0)",
|
|
14596
|
+
closeButtonIconTint: this.themeService.theme.palette.getPrimary(),
|
|
14597
|
+
width: "100%",
|
|
14598
|
+
height: "100%",
|
|
14599
|
+
borderRadius: "",
|
|
14600
|
+
subtitleTextFont: fontHelper(this.themeService.theme.typography.subtitle2),
|
|
14601
|
+
subtitleTextColor: this.themeService.theme.palette.getAccent600(),
|
|
14602
|
+
padding: "0 100px"
|
|
14603
|
+
});
|
|
14604
|
+
this.callDetailsStyle = { ...defaultStyle, ...this.callDetailsStyle };
|
|
14605
|
+
}
|
|
14606
|
+
}
|
|
14607
|
+
CometChatCallDetailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallDetailsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CometChatThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
14608
|
+
CometChatCallDetailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatCallDetailsComponent, selector: "cometchat-call-details", inputs: { group: "group", user: "user", title: "title", closeButtonIconURL: "closeButtonIconURL", hideProfile: "hideProfile", subtitleView: "subtitleView", customProfileView: "customProfileView", disableUsersPresence: "disableUsersPresence", privateGroupIcon: "privateGroupIcon", protectedGroupIcon: "protectedGroupIcon", onError: "onError", data: "data", onClose: "onClose", statusIndicatorStyle: "statusIndicatorStyle", avatarStyle: "avatarStyle", callDetailsStyle: "callDetailsStyle", callButtonsConfiguration: "callButtonsConfiguration", listItemStyle: "listItemStyle" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-details__wrapper\" *ngIf=\"user || group\" [ngStyle]=\"wrapperStyle()\">\n <div class=\"cc-details__header\">\n <cometchat-label [text]=\"title\" [labelStyle]=\"getTitleStyle()\"></cometchat-label>\n <cometchat-button [iconURL]=\"closeButtonIconURL\" class=\"cc-details__close-button\" [buttonStyle]=\"closeButtonStyle\" (cc-button-clicked)=\"onCloseDetails()\"></cometchat-button>\n </div>\n<div class=\"cc-details\" [ngStyle]=\"marginStyle()\">\n <div class=\"cc-details__profile\" *ngIf=\"!hideProfile\">\n <cometchat-list-item *ngIf=\"!customProfileView;else listitem\" [avatarName]=\"user?.getName() ?? this.group?.getName()\" [avatarURL]=\"this.user?.getAvatar() ?? this.group?.getIcon()\" [listItemStyle]=\"listItemStyle\"\n [statusIndicatorColor]=\"checkStatusType()\" [statusIndicatorIcon]=\"checkGroupType()\" [title]=\"this.user?.getName() ?? this.group?.getName()\" [hideSeparator]=\"false\"\n [statusIndicatorStyle]=\"statusIndicatorStyle\" [avatarStyle]=\"avatarStyle\">\n <div slot=\"subtitleView\">\n <div *ngIf=\"!subtitleView; else subtitle\">\n <cometchat-label [text]=\"subtitleText\" [labelStyle]=\"subtitleStyle()\">\n </cometchat-label>\n </div>\n <ng-template #subtitle>\n <ng-container *ngTemplateOutlet=\"subtitleView;context:{ $implicit: user ?? group }\">\n </ng-container>\n </ng-template>\n </div>\n </cometchat-list-item>\n </div>\n<div class=\"cc-calldetails_primary-section\" *ngIf=\"!data || data.length == 0\">\n <cometchat-call-buttons [user]=\"user\" [group]=\"group\" [callButtonsStyle]=\"callButtonsConfiguration.callButtonsStyle\" [onVideoCallClick]=\"callButtonsConfiguration.onVideoCallClick\" [onVoiceCallClick]=\"callButtonsConfiguration.onVoiceCallClick\" [videoCallIconURL]=\"callButtonsConfiguration.videoCallIconURL\" [voiceCallIconURL]=\"callButtonsConfiguration.voiceCallIconURL\" ></cometchat-call-buttons>\n\n</div>\n<div class=\"cc-details__section-list\" *ngIf=\"data && data.length > 0\">\n <div class=\"cc-details__section\" *ngFor=\"let item of data\" >\n <div class=\"cc-details__section-separator\" *ngIf=\"item.title\">\n <cometchat-label [text]=\"item.title\" [labelStyle]=\"showDataSectionStyle(item)\"></cometchat-label>\n </div>\n <div class=\"cc-details__options-wrapper\" *ngIf=\"getTemplateOptions(item)\">\n<div class=\"cc-details__options\"*ngFor=\"let option of getTemplateOptions(item)\" >\n<div class=\"cc-details__option\" *ngIf=\"!getCustomOptionView(option);else customView\">\n <div class=\"cc-details__option-title\" >\n <cometchat-button [text]=\"option.title\" [buttonStyle]=\"getButtonStyle(option)\"></cometchat-button>\n <div class=\"cc-details__option-tail\" *ngIf=\"option?.tail\">\n <ng-container *ngTemplateOutlet=\"option?.tail\"></ng-container>\n </div>\n </div>\n <cometchat-divider [dividerStyle]=\"dividerStyle\"></cometchat-divider>\n</div>\n<ng-template #customView>\n <ng-container *ngTemplateOutlet=\"getCustomOptionView(option)\" >\n </ng-container>\n</ng-template>\n</div>\n </div>\n </div>\n</div>\n</div>\n</div>\n<ng-template #listitem>\n <ng-container *ngTemplateOutlet=\"customProfileView\">\n </ng-container>\n</ng-template>", styles: ["*{box-sizing:border-box;margin:0;padding:0}.cc-details__wrapper{padding:8px;border-radius:5px;height:100%;min-height:220px}.cc-details__profile{margin-bottom:16px;height:8%}.cc-calldetails_primary-section{height:84%;width:100%;overflow-y:auto;overflow-x:hidden;margin-left:24px;margin-bottom:24px}.cc-details__header{display:flex;justify-content:center;align-items:center;margin-bottom:30px}.cc-details__close-button{position:absolute;right:20px}.cc-details__section{margin-bottom:32px}.cc-details__section-separator{margin-bottom:16px;height:5%}.cc-details__options{margin:8px 0;display:flex;flex-direction:row;gap:10px;align-items:center}.cc-calldetails__date-container{margin:8px 0}.cc-details__option{display:flex;flex-direction:row;justify-content:flex-start;gap:16px;align-items:center}.cc-details__option-title{padding-bottom:12px;display:flex;align-items:center;justify-content:space-between}.cc-details__view{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-details__leavedialog,.cc-details__transferownership{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:-moz-fit-content;height:fit-content;width:100%;z-index:2}\n"], components: [{ 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"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14609
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallDetailsComponent, decorators: [{
|
|
14610
|
+
type: Component,
|
|
14611
|
+
args: [{ selector: "cometchat-call-details", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-details__wrapper\" *ngIf=\"user || group\" [ngStyle]=\"wrapperStyle()\">\n <div class=\"cc-details__header\">\n <cometchat-label [text]=\"title\" [labelStyle]=\"getTitleStyle()\"></cometchat-label>\n <cometchat-button [iconURL]=\"closeButtonIconURL\" class=\"cc-details__close-button\" [buttonStyle]=\"closeButtonStyle\" (cc-button-clicked)=\"onCloseDetails()\"></cometchat-button>\n </div>\n<div class=\"cc-details\" [ngStyle]=\"marginStyle()\">\n <div class=\"cc-details__profile\" *ngIf=\"!hideProfile\">\n <cometchat-list-item *ngIf=\"!customProfileView;else listitem\" [avatarName]=\"user?.getName() ?? this.group?.getName()\" [avatarURL]=\"this.user?.getAvatar() ?? this.group?.getIcon()\" [listItemStyle]=\"listItemStyle\"\n [statusIndicatorColor]=\"checkStatusType()\" [statusIndicatorIcon]=\"checkGroupType()\" [title]=\"this.user?.getName() ?? this.group?.getName()\" [hideSeparator]=\"false\"\n [statusIndicatorStyle]=\"statusIndicatorStyle\" [avatarStyle]=\"avatarStyle\">\n <div slot=\"subtitleView\">\n <div *ngIf=\"!subtitleView; else subtitle\">\n <cometchat-label [text]=\"subtitleText\" [labelStyle]=\"subtitleStyle()\">\n </cometchat-label>\n </div>\n <ng-template #subtitle>\n <ng-container *ngTemplateOutlet=\"subtitleView;context:{ $implicit: user ?? group }\">\n </ng-container>\n </ng-template>\n </div>\n </cometchat-list-item>\n </div>\n<div class=\"cc-calldetails_primary-section\" *ngIf=\"!data || data.length == 0\">\n <cometchat-call-buttons [user]=\"user\" [group]=\"group\" [callButtonsStyle]=\"callButtonsConfiguration.callButtonsStyle\" [onVideoCallClick]=\"callButtonsConfiguration.onVideoCallClick\" [onVoiceCallClick]=\"callButtonsConfiguration.onVoiceCallClick\" [videoCallIconURL]=\"callButtonsConfiguration.videoCallIconURL\" [voiceCallIconURL]=\"callButtonsConfiguration.voiceCallIconURL\" ></cometchat-call-buttons>\n\n</div>\n<div class=\"cc-details__section-list\" *ngIf=\"data && data.length > 0\">\n <div class=\"cc-details__section\" *ngFor=\"let item of data\" >\n <div class=\"cc-details__section-separator\" *ngIf=\"item.title\">\n <cometchat-label [text]=\"item.title\" [labelStyle]=\"showDataSectionStyle(item)\"></cometchat-label>\n </div>\n <div class=\"cc-details__options-wrapper\" *ngIf=\"getTemplateOptions(item)\">\n<div class=\"cc-details__options\"*ngFor=\"let option of getTemplateOptions(item)\" >\n<div class=\"cc-details__option\" *ngIf=\"!getCustomOptionView(option);else customView\">\n <div class=\"cc-details__option-title\" >\n <cometchat-button [text]=\"option.title\" [buttonStyle]=\"getButtonStyle(option)\"></cometchat-button>\n <div class=\"cc-details__option-tail\" *ngIf=\"option?.tail\">\n <ng-container *ngTemplateOutlet=\"option?.tail\"></ng-container>\n </div>\n </div>\n <cometchat-divider [dividerStyle]=\"dividerStyle\"></cometchat-divider>\n</div>\n<ng-template #customView>\n <ng-container *ngTemplateOutlet=\"getCustomOptionView(option)\" >\n </ng-container>\n</ng-template>\n</div>\n </div>\n </div>\n</div>\n</div>\n</div>\n<ng-template #listitem>\n <ng-container *ngTemplateOutlet=\"customProfileView\">\n </ng-container>\n</ng-template>", styles: ["*{box-sizing:border-box;margin:0;padding:0}.cc-details__wrapper{padding:8px;border-radius:5px;height:100%;min-height:220px}.cc-details__profile{margin-bottom:16px;height:8%}.cc-calldetails_primary-section{height:84%;width:100%;overflow-y:auto;overflow-x:hidden;margin-left:24px;margin-bottom:24px}.cc-details__header{display:flex;justify-content:center;align-items:center;margin-bottom:30px}.cc-details__close-button{position:absolute;right:20px}.cc-details__section{margin-bottom:32px}.cc-details__section-separator{margin-bottom:16px;height:5%}.cc-details__options{margin:8px 0;display:flex;flex-direction:row;gap:10px;align-items:center}.cc-calldetails__date-container{margin:8px 0}.cc-details__option{display:flex;flex-direction:row;justify-content:flex-start;gap:16px;align-items:center}.cc-details__option-title{padding-bottom:12px;display:flex;align-items:center;justify-content:space-between}.cc-details__view{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-details__leavedialog,.cc-details__transferownership{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:-moz-fit-content;height:fit-content;width:100%;z-index:2}\n"] }]
|
|
14612
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { group: [{
|
|
14613
|
+
type: Input
|
|
14614
|
+
}], user: [{
|
|
14615
|
+
type: Input
|
|
14616
|
+
}], title: [{
|
|
14617
|
+
type: Input
|
|
14618
|
+
}], closeButtonIconURL: [{
|
|
14619
|
+
type: Input
|
|
14620
|
+
}], hideProfile: [{
|
|
14621
|
+
type: Input
|
|
14622
|
+
}], subtitleView: [{
|
|
14623
|
+
type: Input
|
|
14624
|
+
}], customProfileView: [{
|
|
14625
|
+
type: Input
|
|
14626
|
+
}], disableUsersPresence: [{
|
|
14627
|
+
type: Input
|
|
14628
|
+
}], privateGroupIcon: [{
|
|
14629
|
+
type: Input
|
|
14630
|
+
}], protectedGroupIcon: [{
|
|
14631
|
+
type: Input
|
|
14632
|
+
}], onError: [{
|
|
14633
|
+
type: Input
|
|
14634
|
+
}], data: [{
|
|
14635
|
+
type: Input
|
|
14636
|
+
}], onClose: [{
|
|
14637
|
+
type: Input
|
|
14638
|
+
}], statusIndicatorStyle: [{
|
|
14639
|
+
type: Input
|
|
14640
|
+
}], avatarStyle: [{
|
|
14641
|
+
type: Input
|
|
14642
|
+
}], callDetailsStyle: [{
|
|
14643
|
+
type: Input
|
|
14644
|
+
}], callButtonsConfiguration: [{
|
|
14645
|
+
type: Input
|
|
14646
|
+
}], listItemStyle: [{
|
|
14647
|
+
type: Input
|
|
14648
|
+
}] } });
|
|
14649
|
+
|
|
14650
|
+
/**
|
|
14651
|
+
*
|
|
14652
|
+
* CometChatCallHistoryWithDetailsComponent is a wrapper component for CometChatCallDetailsComponent and CometChatCallHistorycomponent to show history and details of calls in one screen
|
|
14653
|
+
*
|
|
14654
|
+
* @version 1.0.0
|
|
14655
|
+
* @author CometChatTeam
|
|
14656
|
+
* @copyright © 2022 CometChat Inc.
|
|
14657
|
+
*
|
|
14658
|
+
*/
|
|
14659
|
+
class CometChatCallHistoryWithDetailsComponent {
|
|
14660
|
+
constructor(elementRef, ref, themeService) {
|
|
14661
|
+
this.elementRef = elementRef;
|
|
14662
|
+
this.ref = ref;
|
|
14663
|
+
this.themeService = themeService;
|
|
14664
|
+
this.isMobileView = false;
|
|
14665
|
+
this.messageText = localize("NO_CALLS_SELECTED");
|
|
14666
|
+
this.callHistoryWithDetailsStyle = {};
|
|
14667
|
+
this.callDetailsConfiguration = new CallDetailsConfiguration({});
|
|
14668
|
+
this.callHistoryConfiguration = new CallHistoryConfiguration({});
|
|
14669
|
+
this.onError = (error) => {
|
|
14670
|
+
console.log(error);
|
|
14671
|
+
};
|
|
14672
|
+
this.labelStyle = {
|
|
14673
|
+
background: "transparent",
|
|
14674
|
+
textFont: "700 22px Inter",
|
|
14675
|
+
textColor: "rgba(20, 20, 20, 0.33)"
|
|
14676
|
+
};
|
|
14677
|
+
this.closeDetailsPage = () => {
|
|
14678
|
+
this.activeCall = null;
|
|
14679
|
+
this.user = null;
|
|
14680
|
+
this.group = null;
|
|
14681
|
+
this.ref.detectChanges();
|
|
14682
|
+
};
|
|
14683
|
+
this.onBack = () => {
|
|
14684
|
+
this.user = null;
|
|
14685
|
+
this.group = null;
|
|
14686
|
+
this.activeCall = null;
|
|
14687
|
+
};
|
|
14688
|
+
this.onItemClick = (call) => {
|
|
14689
|
+
this.call = call;
|
|
14690
|
+
this.setActiveChat();
|
|
14691
|
+
};
|
|
14692
|
+
this.emptyMessageStyle = () => {
|
|
14693
|
+
return {
|
|
14694
|
+
background: this.callHistoryWithDetailsStyle.background || this.themeService.theme.palette.getBackground(),
|
|
14695
|
+
height: this.callHistoryWithDetailsStyle.height,
|
|
14696
|
+
width: `calc(${this.callHistoryWithDetailsStyle.width} - 280px)`,
|
|
14697
|
+
border: this.callHistoryWithDetailsStyle.border,
|
|
14698
|
+
borderRadius: this.callHistoryWithDetailsStyle.borderRadius,
|
|
14699
|
+
};
|
|
14700
|
+
};
|
|
14701
|
+
this.chatsWrapperStyles = () => {
|
|
14702
|
+
return {
|
|
14703
|
+
height: this.callHistoryWithDetailsStyle.height,
|
|
14704
|
+
width: this.callHistoryWithDetailsStyle.width,
|
|
14705
|
+
border: this.callHistoryWithDetailsStyle.border,
|
|
14706
|
+
borderRadius: this.callHistoryWithDetailsStyle.borderRadius,
|
|
14707
|
+
background: this.callHistoryWithDetailsStyle.background || this.themeService.theme.palette.getBackground(),
|
|
14708
|
+
};
|
|
14709
|
+
};
|
|
14710
|
+
}
|
|
14711
|
+
ngOnChanges(changes) {
|
|
14712
|
+
if (changes["user"] || changes["group"]) {
|
|
14713
|
+
this.setActiveChat();
|
|
14714
|
+
}
|
|
14715
|
+
}
|
|
14716
|
+
setWithDetailsStyle() {
|
|
14717
|
+
let defaultStyle = new WithDetailsStyle({
|
|
14718
|
+
width: "100%",
|
|
14719
|
+
height: "100%",
|
|
14720
|
+
background: this.themeService.theme.palette.getBackground(),
|
|
14721
|
+
borderRadius: "none",
|
|
14722
|
+
border: "none",
|
|
14723
|
+
messageTextColor: this.themeService.theme.palette.getAccent600(),
|
|
14724
|
+
messageTextFont: fontHelper(this.themeService.theme.typography.title1),
|
|
14725
|
+
});
|
|
14726
|
+
this.callHistoryWithDetailsStyle = {
|
|
14727
|
+
...defaultStyle,
|
|
14728
|
+
...this.callHistoryWithDetailsStyle
|
|
14729
|
+
};
|
|
14730
|
+
this.labelStyle.textFont = this.callHistoryWithDetailsStyle.messageTextFont;
|
|
14731
|
+
this.labelStyle.textColor = this.callHistoryWithDetailsStyle.messageTextColor;
|
|
14732
|
+
}
|
|
14733
|
+
setActiveChat() {
|
|
14734
|
+
this.activeCall = this.call;
|
|
14735
|
+
if (this.call.getSender().getUid() == this.loggedInUser?.getUid()) {
|
|
14736
|
+
if (this.call.getReceiverType() == CometChatUIKitConstants.MessageReceiverType.user) {
|
|
14737
|
+
this.user = this.call.getReceiver();
|
|
14738
|
+
this.group = null;
|
|
14739
|
+
}
|
|
14740
|
+
else {
|
|
14741
|
+
this.user = null;
|
|
14742
|
+
this.group = this.call.getReceiver();
|
|
14743
|
+
}
|
|
14744
|
+
}
|
|
14745
|
+
else {
|
|
14746
|
+
this.user = this.call.getSender();
|
|
14747
|
+
}
|
|
14748
|
+
}
|
|
14749
|
+
ngOnInit() {
|
|
14750
|
+
this.setWithDetailsStyle();
|
|
14751
|
+
CometChat.getLoggedinUser()
|
|
14752
|
+
.then((user) => {
|
|
14753
|
+
this.loggedInUser = user;
|
|
14754
|
+
})
|
|
14755
|
+
.catch((error) => {
|
|
14756
|
+
if (this.onError) {
|
|
14757
|
+
this.onError(error);
|
|
14758
|
+
}
|
|
14759
|
+
});
|
|
14760
|
+
}
|
|
14761
|
+
}
|
|
14762
|
+
CometChatCallHistoryWithDetailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistoryWithDetailsComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: CometChatThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
14763
|
+
CometChatCallHistoryWithDetailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CometChatCallHistoryWithDetailsComponent, selector: "cometchat-call-history-with-details", inputs: { call: "call", isMobileView: "isMobileView", messageText: "messageText", callHistoryWithDetailsStyle: "callHistoryWithDetailsStyle", callDetailsConfiguration: "callDetailsConfiguration", callHistoryConfiguration: "callHistoryConfiguration", onError: "onError" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"cc-with-details__wrapper\" [ngStyle]=\"chatsWrapperStyles()\" >\n <div class=\"cc-with-details__sidebar\" [ngClass]=\"{mobile : isMobileView}\">\n <cometchat-call-history\n #conversationRef\n [activeCall]=\"activeCall\"\n [onItemClick]=\"callHistoryConfiguration.onItemClick || onItemClick\"\n [conversationsStyle]=\"callHistoryConfiguration.callHistoryStyle\"\n [subtitleView]=\"callHistoryConfiguration.subtitleView\"\n [options]=\"callHistoryConfiguration.options\"\n [conversationsRequestBuilder]=\"callHistoryConfiguration.messageRequestBuilder\"\n [emptyStateView]=\"callHistoryConfiguration.emptyStateView\"\n [onSelect]=\"callHistoryConfiguration.onSelect\"\n [loadingIconURL]=\"callHistoryConfiguration.loadingIconURL\"\n [errorStateView]=\"callHistoryConfiguration.errorStateView\"\n [loadingStateView]=\"callHistoryConfiguration.loadingStateView\"\n [titleAlignment]=\"callHistoryConfiguration.titleAlignment\"\n [listItemView]=\"callHistoryConfiguration.listItemView\"\n [menu]=\"callHistoryConfiguration.menu\"\n [hideSeparator]=\"callHistoryConfiguration.hideSeparator\"\n [hideError]=\"callHistoryConfiguration.hideError\"\n [selectionMode]=\"callHistoryConfiguration.selectionMode\"\n [listItemStyle]=\"callHistoryConfiguration.listItemStyle\"\n [avatarStyle]=\"callHistoryConfiguration.avatarStyle\"\n ></cometchat-call-history>\n </div>\n <div class=\"cc-with-details__main\" [ngClass]=\"{mobile : isMobileView}\" *ngIf=\"user || group\">\n <!--call details Screen-->\n <cometchat-call-details\n #messagesRef\n [user]=\"user!\"\n [group]=\"group!\"\n [callDetailsStyle]=\"callDetailsConfiguration.callDetailsStyle\"\n [callButtonsConfiguration]=\"callDetailsConfiguration.callButtonsConfiguration\"\n [onClose]=\"callDetailsConfiguration.onClose || closeDetailsPage\" [listItemStyle]=\"callDetailsConfiguration.listItemStyle\" [avatarStyle]=\"callDetailsConfiguration.avatarStyle\" [statusIndicatorStyle]=\"callDetailsConfiguration.statusIndicatorStyle\" [customProfileView]=\"callDetailsConfiguration.customProfileView\" [subtitleView]=\"callDetailsConfiguration.subtitleView\" [hideProfile]=\"callDetailsConfiguration.hideProfile\" [onError]=\"callDetailsConfiguration.onError\" [closeButtonIconURL]=\"callDetailsConfiguration.closeButtonIconURL\"\n >\n </cometchat-call-details>\n <!--call details Screen ENDS-->\n </div>\n <div class=\"cc-decorator__message--empty\" *ngIf=\"!user && !group\" [ngStyle]=\"emptyMessageStyle()\">\n <cometchat-label [text]=\"messageText\" [labelStyle]=\"labelStyle\"></cometchat-label>\n </div>\n", styles: [".cc-with-details__wrapper{display:flex;height:100%;width:100%;box-sizing:border-box}.cc-with-details__sidebar{width:280px;height:100%;position:relative}.cc-with-details__main{width:calc(100% - 280px);height:100%}.mobile{width:100%!important;height:100%;position:absolute}.cc-decorator__message--empty{display:flex;justify-content:center;align-items:center}\n"], components: [{ type: CometChatCallHistoryComponent, selector: "cometchat-call-history", inputs: ["messageRequestBuilder", "subtitleView", "listItemView", "menu", "options", "activeCall", "hideSeparator", "selectionMode", "hideError", "title", "onError", "onSelect", "emptyStateView", "errorStateView", "loadingIconURL", "datePattern", "loadingStateView", "emptyStateText", "errorStateText", "titleAlignment", "avatarStyle", "dateStyle", "callHistoryStyle", "listItemStyle", "onItemClick"] }, { type: CometChatCallDetailsComponent, selector: "cometchat-call-details", inputs: ["group", "user", "title", "closeButtonIconURL", "hideProfile", "subtitleView", "customProfileView", "disableUsersPresence", "privateGroupIcon", "protectedGroupIcon", "onError", "data", "onClose", "statusIndicatorStyle", "avatarStyle", "callDetailsStyle", "callButtonsConfiguration", "listItemStyle"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14764
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistoryWithDetailsComponent, decorators: [{
|
|
14765
|
+
type: Component,
|
|
14766
|
+
args: [{ selector: "cometchat-call-history-with-details", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cc-with-details__wrapper\" [ngStyle]=\"chatsWrapperStyles()\" >\n <div class=\"cc-with-details__sidebar\" [ngClass]=\"{mobile : isMobileView}\">\n <cometchat-call-history\n #conversationRef\n [activeCall]=\"activeCall\"\n [onItemClick]=\"callHistoryConfiguration.onItemClick || onItemClick\"\n [conversationsStyle]=\"callHistoryConfiguration.callHistoryStyle\"\n [subtitleView]=\"callHistoryConfiguration.subtitleView\"\n [options]=\"callHistoryConfiguration.options\"\n [conversationsRequestBuilder]=\"callHistoryConfiguration.messageRequestBuilder\"\n [emptyStateView]=\"callHistoryConfiguration.emptyStateView\"\n [onSelect]=\"callHistoryConfiguration.onSelect\"\n [loadingIconURL]=\"callHistoryConfiguration.loadingIconURL\"\n [errorStateView]=\"callHistoryConfiguration.errorStateView\"\n [loadingStateView]=\"callHistoryConfiguration.loadingStateView\"\n [titleAlignment]=\"callHistoryConfiguration.titleAlignment\"\n [listItemView]=\"callHistoryConfiguration.listItemView\"\n [menu]=\"callHistoryConfiguration.menu\"\n [hideSeparator]=\"callHistoryConfiguration.hideSeparator\"\n [hideError]=\"callHistoryConfiguration.hideError\"\n [selectionMode]=\"callHistoryConfiguration.selectionMode\"\n [listItemStyle]=\"callHistoryConfiguration.listItemStyle\"\n [avatarStyle]=\"callHistoryConfiguration.avatarStyle\"\n ></cometchat-call-history>\n </div>\n <div class=\"cc-with-details__main\" [ngClass]=\"{mobile : isMobileView}\" *ngIf=\"user || group\">\n <!--call details Screen-->\n <cometchat-call-details\n #messagesRef\n [user]=\"user!\"\n [group]=\"group!\"\n [callDetailsStyle]=\"callDetailsConfiguration.callDetailsStyle\"\n [callButtonsConfiguration]=\"callDetailsConfiguration.callButtonsConfiguration\"\n [onClose]=\"callDetailsConfiguration.onClose || closeDetailsPage\" [listItemStyle]=\"callDetailsConfiguration.listItemStyle\" [avatarStyle]=\"callDetailsConfiguration.avatarStyle\" [statusIndicatorStyle]=\"callDetailsConfiguration.statusIndicatorStyle\" [customProfileView]=\"callDetailsConfiguration.customProfileView\" [subtitleView]=\"callDetailsConfiguration.subtitleView\" [hideProfile]=\"callDetailsConfiguration.hideProfile\" [onError]=\"callDetailsConfiguration.onError\" [closeButtonIconURL]=\"callDetailsConfiguration.closeButtonIconURL\"\n >\n </cometchat-call-details>\n <!--call details Screen ENDS-->\n </div>\n <div class=\"cc-decorator__message--empty\" *ngIf=\"!user && !group\" [ngStyle]=\"emptyMessageStyle()\">\n <cometchat-label [text]=\"messageText\" [labelStyle]=\"labelStyle\"></cometchat-label>\n </div>\n", styles: [".cc-with-details__wrapper{display:flex;height:100%;width:100%;box-sizing:border-box}.cc-with-details__sidebar{width:280px;height:100%;position:relative}.cc-with-details__main{width:calc(100% - 280px);height:100%}.mobile{width:100%!important;height:100%;position:absolute}.cc-decorator__message--empty{display:flex;justify-content:center;align-items:center}\n"] }]
|
|
14767
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: CometChatThemeService }]; }, propDecorators: { call: [{
|
|
14768
|
+
type: Input
|
|
14769
|
+
}], isMobileView: [{
|
|
14770
|
+
type: Input
|
|
14771
|
+
}], messageText: [{
|
|
14772
|
+
type: Input
|
|
14773
|
+
}], callHistoryWithDetailsStyle: [{
|
|
14774
|
+
type: Input
|
|
14775
|
+
}], callDetailsConfiguration: [{
|
|
14776
|
+
type: Input
|
|
14777
|
+
}], callHistoryConfiguration: [{
|
|
14778
|
+
type: Input
|
|
14779
|
+
}], onError: [{
|
|
14780
|
+
type: Input
|
|
14781
|
+
}] } });
|
|
14782
|
+
|
|
14783
|
+
class CometChatCallHistory {
|
|
14784
|
+
}
|
|
14785
|
+
CometChatCallHistory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistory, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
14786
|
+
CometChatCallHistory.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistory, declarations: [CometChatCallHistoryComponent], imports: [CommonModule,
|
|
14787
|
+
CometChatList], exports: [CometChatCallHistoryComponent] });
|
|
14788
|
+
CometChatCallHistory.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistory, imports: [[
|
|
14789
|
+
CommonModule,
|
|
14790
|
+
CometChatList,
|
|
14791
|
+
]] });
|
|
14792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistory, decorators: [{
|
|
14793
|
+
type: NgModule,
|
|
14794
|
+
args: [{
|
|
14795
|
+
declarations: [CometChatCallHistoryComponent],
|
|
14796
|
+
imports: [
|
|
14797
|
+
CommonModule,
|
|
14798
|
+
CometChatList,
|
|
14799
|
+
],
|
|
14800
|
+
exports: [CometChatCallHistoryComponent],
|
|
14801
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
14802
|
+
}]
|
|
14803
|
+
}] });
|
|
14804
|
+
|
|
14805
|
+
class CometChatCallDetails {
|
|
14806
|
+
}
|
|
14807
|
+
CometChatCallDetails.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallDetails, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
14808
|
+
CometChatCallDetails.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallDetails, declarations: [CometChatCallDetailsComponent], imports: [CommonModule,
|
|
14809
|
+
CometChatCallButtons,
|
|
14810
|
+
CometChatList], exports: [CometChatCallDetailsComponent] });
|
|
14811
|
+
CometChatCallDetails.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallDetails, imports: [[
|
|
14812
|
+
CommonModule,
|
|
14813
|
+
CometChatCallButtons,
|
|
14814
|
+
CometChatList
|
|
14815
|
+
]] });
|
|
14816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallDetails, decorators: [{
|
|
14817
|
+
type: NgModule,
|
|
14818
|
+
args: [{
|
|
14819
|
+
declarations: [CometChatCallDetailsComponent],
|
|
14820
|
+
imports: [
|
|
14821
|
+
CommonModule,
|
|
14822
|
+
CometChatCallButtons,
|
|
14823
|
+
CometChatList
|
|
14824
|
+
],
|
|
14825
|
+
exports: [CometChatCallDetailsComponent],
|
|
14826
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
14827
|
+
}]
|
|
14828
|
+
}] });
|
|
14829
|
+
|
|
14830
|
+
class CometChatCallHistoryWithDetails {
|
|
14831
|
+
}
|
|
14832
|
+
CometChatCallHistoryWithDetails.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistoryWithDetails, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
14833
|
+
CometChatCallHistoryWithDetails.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistoryWithDetails, declarations: [CometChatCallHistoryWithDetailsComponent], imports: [CommonModule,
|
|
14834
|
+
CometChatCallHistory,
|
|
14835
|
+
CometChatCallDetails,
|
|
14836
|
+
BrowserModule,
|
|
14837
|
+
BrowserAnimationsModule], exports: [CometChatCallHistoryWithDetailsComponent] });
|
|
14838
|
+
CometChatCallHistoryWithDetails.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistoryWithDetails, imports: [[
|
|
14839
|
+
CommonModule,
|
|
14840
|
+
CometChatCallHistory,
|
|
14841
|
+
CometChatCallDetails,
|
|
14842
|
+
BrowserModule,
|
|
14843
|
+
BrowserAnimationsModule,
|
|
14844
|
+
]] });
|
|
14845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatCallHistoryWithDetails, decorators: [{
|
|
14846
|
+
type: NgModule,
|
|
14847
|
+
args: [{
|
|
14848
|
+
declarations: [CometChatCallHistoryWithDetailsComponent],
|
|
14849
|
+
imports: [
|
|
14850
|
+
CommonModule,
|
|
14851
|
+
CometChatCallHistory,
|
|
14852
|
+
CometChatCallDetails,
|
|
14853
|
+
BrowserModule,
|
|
14854
|
+
BrowserAnimationsModule,
|
|
14855
|
+
],
|
|
14856
|
+
exports: [CometChatCallHistoryWithDetailsComponent],
|
|
14857
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
14858
|
+
}]
|
|
14859
|
+
}] });
|
|
14860
|
+
|
|
14861
|
+
class CometChatTabs {
|
|
14862
|
+
}
|
|
14863
|
+
CometChatTabs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatTabs, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
14864
|
+
CometChatTabs.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatTabs, declarations: [CometChatTabsComponent], imports: [CommonModule,
|
|
14865
|
+
CometChatConversationsWithMessages,
|
|
14866
|
+
CometChatUsersWithMessages,
|
|
14867
|
+
CometChatGroupsWithMessages,
|
|
14868
|
+
CometChatCallHistoryWithDetails], exports: [CometChatTabsComponent] });
|
|
14869
|
+
CometChatTabs.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatTabs, imports: [[
|
|
14870
|
+
CommonModule,
|
|
14871
|
+
CometChatConversationsWithMessages,
|
|
14872
|
+
CometChatUsersWithMessages,
|
|
14873
|
+
CometChatGroupsWithMessages,
|
|
14874
|
+
CometChatCallHistoryWithDetails
|
|
14875
|
+
]] });
|
|
14876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CometChatTabs, decorators: [{
|
|
14877
|
+
type: NgModule,
|
|
14878
|
+
args: [{
|
|
14879
|
+
declarations: [CometChatTabsComponent],
|
|
14880
|
+
imports: [
|
|
14881
|
+
CommonModule,
|
|
14882
|
+
CometChatConversationsWithMessages,
|
|
14883
|
+
CometChatUsersWithMessages,
|
|
14884
|
+
CometChatGroupsWithMessages,
|
|
14885
|
+
CometChatCallHistoryWithDetails
|
|
14886
|
+
],
|
|
14887
|
+
exports: [CometChatTabsComponent],
|
|
14888
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
14889
|
+
}]
|
|
14890
|
+
}] });
|
|
14891
|
+
|
|
13740
14892
|
/*
|
|
13741
14893
|
* Public API Surface of angular-chat-ui-kit
|
|
13742
14894
|
*/
|
|
@@ -13745,5 +14897,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
13745
14897
|
* Generated bundle index. Do not edit.
|
|
13746
14898
|
*/
|
|
13747
14899
|
|
|
13748
|
-
export { CallingExtension, CallingExtensionDecorator, ChatConfigurator, CollaborativeDocumentExtension, CollaborativeDocumentExtensionDecorator, CollaborativeWhiteBoardExtension, CollaborativeWhiteBoardExtensionDecorator, CometChatAddMembers, CometChatAddMembersComponent, CometChatBannedMembers, CometChatBannedMembersComponent, CometChatCallButtons, CometChatCallButtonsComponent, CometChatConversations, CometChatConversationsComponent, CometChatConversationsWithMessages, CometChatConversationsWithMessagesComponent, CometChatDetails, CometChatDetailsComponent, CometChatGroupMembers, CometChatGroupMembersComponent, CometChatGroups, CometChatGroupsComponent, CometChatGroupsWithMessages, CometChatGroupsWithMessagesComponent, CometChatIncomingCall, CometChatIncomingCallComponent, CometChatList, CometChatMessageBubble, CometChatMessageBubbleComponent, CometChatMessageComposer, CometChatMessageComposerComponent, CometChatMessageHeader, CometChatMessageHeaderComponent, CometChatMessageList, CometChatMessageListComponent, CometChatMessages, CometChatMessagesComponent, CometChatOngoingCall, CometChatOngoingCallComponent, CometChatOutgoingCall, CometChatOutgoingCallComponent, CometChatThemeService, CometChatThreadedMessages, CometChatThreadedMessagesComponent, CometChatTransferOwnership, CometChatTransferOwnershipComponent, CometChatUIKit, CometChatUsers, CometChatUsersComponent, CometChatUsersWithMessages, CometChatUsersWithMessagesComponent, CometchatListComponent, DataSource, DataSourceDecorator, ExtensionsDataSource, ImageModerationExtension, ImageModerationExtensionDecorator, LinkPreviewExtension, LinkPreviewExtensionDecorator, MessageTranslationExtension, MessageTranslationExtensionDecorator, MessageUtils, PollsExtension, PollsExtensionDecorator, ReactionExtension, ReactionExtensionDecorator, SmartReplyExtension, SmartReplyExtensionDecorator, StickersExtension, StickersExtensionDecorator, TextModeratorExtension, TextModeratorExtensionDecorator, ThumbnailGenerationExtension, ThumbnailGenerationExtensionDecorator };
|
|
14900
|
+
export { CallingExtension, CallingExtensionDecorator, ChatConfigurator, CollaborativeDocumentExtension, CollaborativeDocumentExtensionDecorator, CollaborativeWhiteBoardExtension, CollaborativeWhiteBoardExtensionDecorator, CometChatAddMembers, CometChatAddMembersComponent, CometChatBannedMembers, CometChatBannedMembersComponent, CometChatCallButtons, CometChatCallButtonsComponent, CometChatConversations, CometChatConversationsComponent, CometChatConversationsWithMessages, CometChatConversationsWithMessagesComponent, CometChatDetails, CometChatDetailsComponent, CometChatGroupMembers, CometChatGroupMembersComponent, CometChatGroups, CometChatGroupsComponent, CometChatGroupsWithMessages, CometChatGroupsWithMessagesComponent, CometChatIncomingCall, CometChatIncomingCallComponent, CometChatList, CometChatMessageBubble, CometChatMessageBubbleComponent, CometChatMessageComposer, CometChatMessageComposerComponent, CometChatMessageHeader, CometChatMessageHeaderComponent, CometChatMessageList, CometChatMessageListComponent, CometChatMessages, CometChatMessagesComponent, CometChatOngoingCall, CometChatOngoingCallComponent, CometChatOutgoingCall, CometChatOutgoingCallComponent, CometChatTabs, CometChatTabsComponent, CometChatThemeService, CometChatThreadedMessages, CometChatThreadedMessagesComponent, CometChatTransferOwnership, CometChatTransferOwnershipComponent, CometChatUIKit, CometChatUsers, CometChatUsersComponent, CometChatUsersWithMessages, CometChatUsersWithMessagesComponent, CometchatListComponent, DataSource, DataSourceDecorator, ExtensionsDataSource, ImageModerationExtension, ImageModerationExtensionDecorator, LinkPreviewExtension, LinkPreviewExtensionDecorator, MessageTranslationExtension, MessageTranslationExtensionDecorator, MessageUtils, PollsExtension, PollsExtensionDecorator, ReactionExtension, ReactionExtensionDecorator, SmartReplyExtension, SmartReplyExtensionDecorator, StickersExtension, StickersExtensionDecorator, TextModeratorExtension, TextModeratorExtensionDecorator, ThumbnailGenerationExtension, ThumbnailGenerationExtensionDecorator };
|
|
13749
14901
|
//# sourceMappingURL=cometchat-chat-uikit-angular.mjs.map
|