@posiwise/messaging-module 0.0.87 → 0.0.89
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.
|
@@ -65,6 +65,14 @@ class ChatBoxComponent extends AppBaseComponent {
|
|
|
65
65
|
this.scrollDistance = 1;
|
|
66
66
|
this.ATTACHMENT_TYPE = ATTACHMENT_TYPE;
|
|
67
67
|
}
|
|
68
|
+
onImgError(event, fallbackSrc) {
|
|
69
|
+
const img = event.target;
|
|
70
|
+
if (!img)
|
|
71
|
+
return;
|
|
72
|
+
if (img.src?.endsWith(fallbackSrc))
|
|
73
|
+
return;
|
|
74
|
+
img.src = fallbackSrc;
|
|
75
|
+
}
|
|
68
76
|
onUp(_ev, conversationId) {
|
|
69
77
|
this.currentPage++;
|
|
70
78
|
const totalPages = Math.ceil(this.totalMessages / 10);
|
|
@@ -514,12 +522,12 @@ class ChatBoxComponent extends AppBaseComponent {
|
|
|
514
522
|
};
|
|
515
523
|
document.head.appendChild(script);
|
|
516
524
|
}
|
|
517
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
518
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: ChatBoxComponent, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "messageInputRef", first: true, predicate: ["messageInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n <div *ngIf=\"isChatLoading\"\n class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading\">\n <div class=\"chat-sidebar float-start d-none d-sm-none d-md-block d-lg-block\">\n <div class=\"chat-sidebar-content\">\n <div class=\"chat-fixed-search p-2\">\n <div class=\"d-flex\">\n <p-autoComplete [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search a member\"\n [ngModelOptions]=\"{ standalone: true }\"\n field=\"first_name\"\n (onSelect)=\"onMemberSelection(searchText)\"\n [suggestions]=\"recipients\"\n (completeMethod)=\"recipientSearch()\">\n <ng-template let-item\n pTemplate=\"item\">\n <div>\n {{ item.first_name + ' ' }}\n {{ item.last_name ? item.last_name : '' }}\n </div>\n </ng-template>\n </p-autoComplete>\n </div>\n </div>\n\n <!-- Thread/conversation List -->\n <div id=\"users-list\"\n class=\"list-group position-relative\">\n <div class=\"users-list-padding\"\n *ngIf=\"conversations?.length\">\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\"\n *ngFor=\"let conversation of conversations\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n <ng-template [ngIf]=\"conversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar me-2\">\n <strong>{{\n conversation?.participants\n ? conversation.to?.slug.charAt(0).toUpperCase()\n : conversation.to?.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </span>\n <div class=\"clearfix\">\n <h6 class=\"list-group-item-heading mb-1\">\n {{\n conversation.to?.name\n ? conversation.to?.name\n : conversation.to?.slug\n }}\n <span class=\"font-small-3 float-end ms-5 ps-5\">\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\"\n *ngIf=\"conversation?.unread_count\">\n {{ conversation.unread_count }}\n </span>\n {{ conversation.created_at | date: 'shortTime' }}\n </span>\n </h6>\n <p class=\"list-group-item-text text-muted\">\n {{ conversation?.latest_message?.body | textTruncate: 25 }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading && conversations?.length\"\n [ngIfElse]=\"noMessage\">\n <!-- Chat Header -->\n <div class=\"chat-name p-2 bg-white\"\n *ngIf=\"otherUser\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n <ng-template [ngIf]=\"currentConversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div *ngIf=\"currentUser\"\n class=\"dummy-avatar me-2\">\n <strong>{{\n otherUser?.name\n ? otherUser.name.charAt(0).toUpperCase()\n : otherUser.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"currentUser\">\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n </ng-template>\n </div>\n </div>\n </div>\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n <div *ngIf=\"!isLoaded\"\n class=\"spinner\"></div>\n <ng-container *ngIf=\"messagesGroupedByDate\">\n <ng-container *ngFor=\"let item of ObjectKeys(messagesGroupedByDate)\">\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n <div class=\"chat\"\n [ngClass]=\"{\n 'chat-left ms-2': message.sender_id !== currentUser.id,\n 'me-2': message.sender_id === currentUser.id\n }\"\n *ngFor=\"\n let message of messagesGroupedByDate[item];\n trackBy: trackByMessageId;\n let i = index\n \">\n <ng-container *ngIf=\"message.body || message.attachment.url\">\n <div class=\"chat-avatar\">\n <a class=\"avatar\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n data-original-title=\"\">\n <!-- Setting up Avatar Image for Logged In User -->\n <ng-container *ngIf=\"message.sender_id === currentUser.id\">\n <ng-template [ngIf]=\"currentUserImg\"\n [ngIfElse]=\"curDummy\">\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n <ng-template #curDummy>\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Participant -->\n <ng-container *ngIf=\"message.sender_id !== currentUser.id\">\n <ng-template [ngIf]=\"currentUser && otherUser?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar\">\n <strong>{{\n otherUser?.name\n ? otherUser.name\n .charAt(0)\n .toUpperCase()\n : otherUser.slug\n .charAt(0)\n .toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </ng-container>\n </a>\n </div>\n <div class=\"chat-body\">\n <div class=\"chat-content attachment\"\n *ngIf=\"\n !message?.attachment?.url;\n else withAttachmentRef\n \">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n <p>{{ message.body }}</p>\n </div>\n\n <ng-template #withAttachmentRef>\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <div *ngIf=\"message.attachment\"\n class=\"message-attachment\">\n <i *ngIf=\"message.attachment.url\">\n <img\n [src]=\"message.attachment.url\"\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.IMG\n \"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n <video\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.VIDEO\n \"\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n <a\n [attr.href]=\"message.attachment.url\"\n target=\"_blank\"\n >\n <i\n class=\"fa fa-file-download me-2\"\n aria-hidden=\"true\"\n ></i>\n {{\n message.attachment.url\n | common: 'filename'\n }}</a>\n </i>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!messagesGroupedByDate && isLoaded\">\n <div class=\"mt-3 text-center\">No message history.</div>\n </ng-container>\n\n <ng-container *ngIf=\"isFileUploading\">\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n </ng-container>\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n <div class=\"card px-3 py-2 m-0 mb-1\"\n *ngFor=\"let item of attachedFiles; let i = index\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <i class=\"icon-emoticon-smile\" (click)=\"showEmoji = !showEmoji\" (keydown)=\"showEmoji = !showEmoji\"></i>\n </div>\n <input type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <i class=\"fa fa-paperclip\">\n <input\n id=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n />\n </i>\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"mb-3 position-relative has-icon-left col-2 m-0 mb-1\">\n <button type=\"button\"\n class=\"btn btn-primary d-lg-flex align-items-center btn-send\"\n (click)=\"onSendMessage()\">\n <i class=\"fa fa-paper-plane\"></i><span class=\"d-none d-lg-block ms-1\">Send</span>\n </button>\n </fieldset>\n </form>\n </div>\n </ng-template>\n\n <ng-template #noMessage>\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-double-check{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media (min-width: 768px){.no-message-center{margin-left:auto;width:calc(100% - 300px)}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i5.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i6.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "variant", "fluid"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i7.PickerComponent, selector: "emoji-mart", inputs: ["perLine", "totalFrequentLines", "i18n", "style", "title", "emoji", "darkMode", "color", "hideObsolete", "categories", "activeCategories", "set", "skin", "isNative", "emojiSize", "sheetSize", "emojisToShowFilter", "showPreview", "emojiTooltip", "autoFocus", "custom", "hideRecent", "imageUrlFn", "include", "exclude", "notFoundEmoji", "categoriesIcons", "searchIcons", "useButton", "enableFrequentEmojiSort", "enableSearch", "showSingleCategory", "virtualize", "virtualizeOffset", "recent", "backgroundImageFn"], outputs: ["emojiClick", "emojiSelect", "skinChange"] }, { kind: "directive", type: i8.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i9.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i9.CommonPipe, name: "common" }] }); }
|
|
525
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ChatBoxComponent, deps: [{ token: i0.ElementRef }, { token: i1.MailBoxService }, { token: i1.ProfileService }, { token: i1.WebsocketService }, { token: i1.ScriptLoaderService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
526
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.19", type: ChatBoxComponent, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "messageInputRef", first: true, predicate: ["messageInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n <div *ngIf=\"isChatLoading\"\n class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading\">\n <div class=\"chat-sidebar float-start d-none d-sm-none d-md-block d-lg-block\">\n <div class=\"chat-sidebar-content\">\n <div class=\"chat-fixed-search p-2\">\n <div class=\"d-flex\">\n <p-autoComplete [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search a member\"\n [ngModelOptions]=\"{ standalone: true }\"\n field=\"first_name\"\n (onSelect)=\"onMemberSelection(searchText)\"\n [suggestions]=\"recipients\"\n (completeMethod)=\"recipientSearch()\">\n <ng-template let-item\n pTemplate=\"item\">\n <div>\n {{ item.first_name + ' ' }}\n {{ item.last_name ? item.last_name : '' }}\n </div>\n </ng-template>\n </p-autoComplete>\n </div>\n </div>\n\n <!-- Thread/conversation List -->\n <div id=\"users-list\"\n class=\"list-group position-relative\">\n <div class=\"users-list-padding\"\n *ngIf=\"conversations?.length\">\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\"\n *ngFor=\"let conversation of conversations\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n <ng-template [ngIf]=\"conversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar me-2\">\n <strong>{{\n conversation?.participants\n ? conversation.to?.slug.charAt(0).toUpperCase()\n : conversation.to?.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </span>\n <div class=\"clearfix\">\n <h6 class=\"list-group-item-heading mb-1\">\n {{\n conversation.to?.name\n ? conversation.to?.name\n : conversation.to?.slug\n }}\n <span class=\"font-small-3 float-end ms-5 ps-5\">\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\"\n *ngIf=\"conversation?.unread_count\">\n {{ conversation.unread_count }}\n </span>\n {{ conversation.created_at | date: 'shortTime' }}\n </span>\n </h6>\n <p class=\"list-group-item-text text-muted\">\n {{ conversation?.latest_message?.body | textTruncate: 25 }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading && conversations?.length\"\n [ngIfElse]=\"noMessage\">\n <!-- Chat Header -->\n <div class=\"chat-name p-2 bg-white\"\n *ngIf=\"otherUser\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n <ng-template [ngIf]=\"currentConversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div *ngIf=\"currentUser\"\n class=\"dummy-avatar me-2\">\n <strong>{{\n otherUser?.name\n ? otherUser.name.charAt(0).toUpperCase()\n : otherUser.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"currentUser\">\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n </ng-template>\n </div>\n </div>\n </div>\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n <div *ngIf=\"!isLoaded\"\n class=\"spinner\"></div>\n <ng-container *ngIf=\"messagesGroupedByDate\">\n <ng-container *ngFor=\"let item of ObjectKeys(messagesGroupedByDate)\">\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n <div class=\"chat\"\n [ngClass]=\"{\n 'chat-left ms-2': message.sender_id !== currentUser.id,\n 'me-2': message.sender_id === currentUser.id\n }\"\n *ngFor=\"\n let message of messagesGroupedByDate[item];\n trackBy: trackByMessageId;\n let i = index\n \">\n <ng-container *ngIf=\"message.body || message.attachment.url\">\n <div class=\"chat-avatar\">\n <a class=\"avatar\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n data-original-title=\"\">\n <!-- Setting up Avatar Image for Logged In User -->\n <ng-container *ngIf=\"message.sender_id === currentUser.id\">\n <ng-template [ngIf]=\"currentUserImg\"\n [ngIfElse]=\"curDummy\">\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n <ng-template #curDummy>\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Participant -->\n <ng-container *ngIf=\"message.sender_id !== currentUser.id\">\n <ng-template [ngIf]=\"currentUser && otherUser?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar\">\n <strong>{{\n otherUser?.name\n ? otherUser.name\n .charAt(0)\n .toUpperCase()\n : otherUser.slug\n .charAt(0)\n .toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </ng-container>\n </a>\n </div>\n <div class=\"chat-body\">\n <div class=\"chat-content attachment\"\n *ngIf=\"\n !message?.attachment?.url;\n else withAttachmentRef\n \">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n <p>{{ message.body }}</p>\n </div>\n\n <ng-template #withAttachmentRef>\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <div *ngIf=\"message.attachment\"\n class=\"message-attachment\">\n <i *ngIf=\"message.attachment.url\">\n <img\n [src]=\"message.attachment.url\"\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.IMG\n \"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n <video\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.VIDEO\n \"\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n <a\n [attr.href]=\"message.attachment.url\"\n target=\"_blank\"\n >\n <i\n class=\"fa fa-file-download me-2\"\n aria-hidden=\"true\"\n ></i>\n {{\n message.attachment.url\n | common: 'filename'\n }}</a>\n </i>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!messagesGroupedByDate && isLoaded\">\n <div class=\"mt-3 text-center\">No message history.</div>\n </ng-container>\n\n <ng-container *ngIf=\"isFileUploading\">\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n </ng-container>\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n <div class=\"card px-3 py-2 m-0 mb-1\"\n *ngFor=\"let item of attachedFiles; let i = index\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <i class=\"icon-emoticon-smile\" (click)=\"showEmoji = !showEmoji\" (keydown)=\"showEmoji = !showEmoji\"></i>\n </div>\n <input type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <i class=\"fa fa-paperclip\">\n <input\n id=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n />\n </i>\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"mb-3 position-relative has-icon-left col-2 m-0 mb-1\">\n <button type=\"button\"\n class=\"btn btn-primary d-lg-flex align-items-center btn-send\"\n (click)=\"onSendMessage()\">\n <i class=\"fa fa-paper-plane\"></i><span class=\"d-none d-lg-block ms-1\">Send</span>\n </button>\n </fieldset>\n </form>\n </div>\n </ng-template>\n\n <ng-template #noMessage>\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-double-check{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media (min-width: 768px){.no-message-center{margin-left:auto;width:calc(100% - 300px)}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i5.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i6.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "variant", "fluid"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i7.PickerComponent, selector: "emoji-mart", inputs: ["perLine", "totalFrequentLines", "i18n", "style", "title", "emoji", "darkMode", "color", "hideObsolete", "categories", "activeCategories", "set", "skin", "isNative", "emojiSize", "sheetSize", "emojisToShowFilter", "showPreview", "emojiTooltip", "autoFocus", "custom", "hideRecent", "imageUrlFn", "include", "exclude", "notFoundEmoji", "categoriesIcons", "searchIcons", "useButton", "enableFrequentEmojiSort", "enableSearch", "showSingleCategory", "virtualize", "virtualizeOffset", "recent", "backgroundImageFn"], outputs: ["emojiClick", "emojiSelect", "skinChange"] }, { kind: "directive", type: i8.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i9.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i9.CommonPipe, name: "common" }] }); }
|
|
519
527
|
}
|
|
520
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ChatBoxComponent, decorators: [{
|
|
521
529
|
type: Component,
|
|
522
|
-
args: [{ standalone: false, template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n <div *ngIf=\"isChatLoading\"\n class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading\">\n <div class=\"chat-sidebar float-start d-none d-sm-none d-md-block d-lg-block\">\n <div class=\"chat-sidebar-content\">\n <div class=\"chat-fixed-search p-2\">\n <div class=\"d-flex\">\n <p-autoComplete [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search a member\"\n [ngModelOptions]=\"{ standalone: true }\"\n field=\"first_name\"\n (onSelect)=\"onMemberSelection(searchText)\"\n [suggestions]=\"recipients\"\n (completeMethod)=\"recipientSearch()\">\n <ng-template let-item\n pTemplate=\"item\">\n <div>\n {{ item.first_name + ' ' }}\n {{ item.last_name ? item.last_name : '' }}\n </div>\n </ng-template>\n </p-autoComplete>\n </div>\n </div>\n\n <!-- Thread/conversation List -->\n <div id=\"users-list\"\n class=\"list-group position-relative\">\n <div class=\"users-list-padding\"\n *ngIf=\"conversations?.length\">\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\"\n *ngFor=\"let conversation of conversations\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n <ng-template [ngIf]=\"conversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar me-2\">\n <strong>{{\n conversation?.participants\n ? conversation.to?.slug.charAt(0).toUpperCase()\n : conversation.to?.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </span>\n <div class=\"clearfix\">\n <h6 class=\"list-group-item-heading mb-1\">\n {{\n conversation.to?.name\n ? conversation.to?.name\n : conversation.to?.slug\n }}\n <span class=\"font-small-3 float-end ms-5 ps-5\">\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\"\n *ngIf=\"conversation?.unread_count\">\n {{ conversation.unread_count }}\n </span>\n {{ conversation.created_at | date: 'shortTime' }}\n </span>\n </h6>\n <p class=\"list-group-item-text text-muted\">\n {{ conversation?.latest_message?.body | textTruncate: 25 }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading && conversations?.length\"\n [ngIfElse]=\"noMessage\">\n <!-- Chat Header -->\n <div class=\"chat-name p-2 bg-white\"\n *ngIf=\"otherUser\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n <ng-template [ngIf]=\"currentConversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div *ngIf=\"currentUser\"\n class=\"dummy-avatar me-2\">\n <strong>{{\n otherUser?.name\n ? otherUser.name.charAt(0).toUpperCase()\n : otherUser.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"currentUser\">\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n </ng-template>\n </div>\n </div>\n </div>\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n <div *ngIf=\"!isLoaded\"\n class=\"spinner\"></div>\n <ng-container *ngIf=\"messagesGroupedByDate\">\n <ng-container *ngFor=\"let item of ObjectKeys(messagesGroupedByDate)\">\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n <div class=\"chat\"\n [ngClass]=\"{\n 'chat-left ms-2': message.sender_id !== currentUser.id,\n 'me-2': message.sender_id === currentUser.id\n }\"\n *ngFor=\"\n let message of messagesGroupedByDate[item];\n trackBy: trackByMessageId;\n let i = index\n \">\n <ng-container *ngIf=\"message.body || message.attachment.url\">\n <div class=\"chat-avatar\">\n <a class=\"avatar\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n data-original-title=\"\">\n <!-- Setting up Avatar Image for Logged In User -->\n <ng-container *ngIf=\"message.sender_id === currentUser.id\">\n <ng-template [ngIf]=\"currentUserImg\"\n [ngIfElse]=\"curDummy\">\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n <ng-template #curDummy>\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Participant -->\n <ng-container *ngIf=\"message.sender_id !== currentUser.id\">\n <ng-template [ngIf]=\"currentUser && otherUser?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar\">\n <strong>{{\n otherUser?.name\n ? otherUser.name\n .charAt(0)\n .toUpperCase()\n : otherUser.slug\n .charAt(0)\n .toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </ng-container>\n </a>\n </div>\n <div class=\"chat-body\">\n <div class=\"chat-content attachment\"\n *ngIf=\"\n !message?.attachment?.url;\n else withAttachmentRef\n \">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n <p>{{ message.body }}</p>\n </div>\n\n <ng-template #withAttachmentRef>\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <div *ngIf=\"message.attachment\"\n class=\"message-attachment\">\n <i *ngIf=\"message.attachment.url\">\n <img\n [src]=\"message.attachment.url\"\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.IMG\n \"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n <video\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.VIDEO\n \"\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n <a\n [attr.href]=\"message.attachment.url\"\n target=\"_blank\"\n >\n <i\n class=\"fa fa-file-download me-2\"\n aria-hidden=\"true\"\n ></i>\n {{\n message.attachment.url\n | common: 'filename'\n }}</a>\n </i>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!messagesGroupedByDate && isLoaded\">\n <div class=\"mt-3 text-center\">No message history.</div>\n </ng-container>\n\n <ng-container *ngIf=\"isFileUploading\">\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n </ng-container>\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n <div class=\"card px-3 py-2 m-0 mb-1\"\n *ngFor=\"let item of attachedFiles; let i = index\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <i class=\"icon-emoticon-smile\" (click)=\"showEmoji = !showEmoji\" (keydown)=\"showEmoji = !showEmoji\"></i>\n </div>\n <input type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <i class=\"fa fa-paperclip\">\n <input\n id=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n />\n </i>\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"mb-3 position-relative has-icon-left col-2 m-0 mb-1\">\n <button type=\"button\"\n class=\"btn btn-primary d-lg-flex align-items-center btn-send\"\n (click)=\"onSendMessage()\">\n <i class=\"fa fa-paper-plane\"></i><span class=\"d-none d-lg-block ms-1\">Send</span>\n </button>\n </fieldset>\n </form>\n </div>\n </ng-template>\n\n <ng-template #noMessage>\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-double-check{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media (min-width: 768px){.no-message-center{margin-left:auto;width:calc(100% - 300px)}}\n"] }]
|
|
530
|
+
args: [{ standalone: false, template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n <div *ngIf=\"isChatLoading\"\n class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading\">\n <div class=\"chat-sidebar float-start d-none d-sm-none d-md-block d-lg-block\">\n <div class=\"chat-sidebar-content\">\n <div class=\"chat-fixed-search p-2\">\n <div class=\"d-flex\">\n <p-autoComplete [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search a member\"\n [ngModelOptions]=\"{ standalone: true }\"\n field=\"first_name\"\n (onSelect)=\"onMemberSelection(searchText)\"\n [suggestions]=\"recipients\"\n (completeMethod)=\"recipientSearch()\">\n <ng-template let-item\n pTemplate=\"item\">\n <div>\n {{ item.first_name + ' ' }}\n {{ item.last_name ? item.last_name : '' }}\n </div>\n </ng-template>\n </p-autoComplete>\n </div>\n </div>\n\n <!-- Thread/conversation List -->\n <div id=\"users-list\"\n class=\"list-group position-relative\">\n <div class=\"users-list-padding\"\n *ngIf=\"conversations?.length\">\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\"\n *ngFor=\"let conversation of conversations\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n <ng-template [ngIf]=\"conversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar me-2\">\n <strong>{{\n conversation?.participants\n ? conversation.to?.slug.charAt(0).toUpperCase()\n : conversation.to?.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </span>\n <div class=\"clearfix\">\n <h6 class=\"list-group-item-heading mb-1\">\n {{\n conversation.to?.name\n ? conversation.to?.name\n : conversation.to?.slug\n }}\n <span class=\"font-small-3 float-end ms-5 ps-5\">\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\"\n *ngIf=\"conversation?.unread_count\">\n {{ conversation.unread_count }}\n </span>\n {{ conversation.created_at | date: 'shortTime' }}\n </span>\n </h6>\n <p class=\"list-group-item-text text-muted\">\n {{ conversation?.latest_message?.body | textTruncate: 25 }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading && conversations?.length\"\n [ngIfElse]=\"noMessage\">\n <!-- Chat Header -->\n <div class=\"chat-name p-2 bg-white\"\n *ngIf=\"otherUser\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n <ng-template [ngIf]=\"currentConversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div *ngIf=\"currentUser\"\n class=\"dummy-avatar me-2\">\n <strong>{{\n otherUser?.name\n ? otherUser.name.charAt(0).toUpperCase()\n : otherUser.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"currentUser\">\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n </ng-template>\n </div>\n </div>\n </div>\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n <div *ngIf=\"!isLoaded\"\n class=\"spinner\"></div>\n <ng-container *ngIf=\"messagesGroupedByDate\">\n <ng-container *ngFor=\"let item of ObjectKeys(messagesGroupedByDate)\">\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n <div class=\"chat\"\n [ngClass]=\"{\n 'chat-left ms-2': message.sender_id !== currentUser.id,\n 'me-2': message.sender_id === currentUser.id\n }\"\n *ngFor=\"\n let message of messagesGroupedByDate[item];\n trackBy: trackByMessageId;\n let i = index\n \">\n <ng-container *ngIf=\"message.body || message.attachment.url\">\n <div class=\"chat-avatar\">\n <a class=\"avatar\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n data-original-title=\"\">\n <!-- Setting up Avatar Image for Logged In User -->\n <ng-container *ngIf=\"message.sender_id === currentUser.id\">\n <ng-template [ngIf]=\"currentUserImg\"\n [ngIfElse]=\"curDummy\">\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n <ng-template #curDummy>\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Participant -->\n <ng-container *ngIf=\"message.sender_id !== currentUser.id\">\n <ng-template [ngIf]=\"currentUser && otherUser?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar\">\n <strong>{{\n otherUser?.name\n ? otherUser.name\n .charAt(0)\n .toUpperCase()\n : otherUser.slug\n .charAt(0)\n .toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </ng-container>\n </a>\n </div>\n <div class=\"chat-body\">\n <div class=\"chat-content attachment\"\n *ngIf=\"\n !message?.attachment?.url;\n else withAttachmentRef\n \">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n <p>{{ message.body }}</p>\n </div>\n\n <ng-template #withAttachmentRef>\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <div *ngIf=\"message.attachment\"\n class=\"message-attachment\">\n <i *ngIf=\"message.attachment.url\">\n <img\n [src]=\"message.attachment.url\"\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.IMG\n \"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n <video\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.VIDEO\n \"\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n <a\n [attr.href]=\"message.attachment.url\"\n target=\"_blank\"\n >\n <i\n class=\"fa fa-file-download me-2\"\n aria-hidden=\"true\"\n ></i>\n {{\n message.attachment.url\n | common: 'filename'\n }}</a>\n </i>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!messagesGroupedByDate && isLoaded\">\n <div class=\"mt-3 text-center\">No message history.</div>\n </ng-container>\n\n <ng-container *ngIf=\"isFileUploading\">\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n </ng-container>\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n <div class=\"card px-3 py-2 m-0 mb-1\"\n *ngFor=\"let item of attachedFiles; let i = index\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <i class=\"icon-emoticon-smile\" (click)=\"showEmoji = !showEmoji\" (keydown)=\"showEmoji = !showEmoji\"></i>\n </div>\n <input type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <i class=\"fa fa-paperclip\">\n <input\n id=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n />\n </i>\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"mb-3 position-relative has-icon-left col-2 m-0 mb-1\">\n <button type=\"button\"\n class=\"btn btn-primary d-lg-flex align-items-center btn-send\"\n (click)=\"onSendMessage()\">\n <i class=\"fa fa-paper-plane\"></i><span class=\"d-none d-lg-block ms-1\">Send</span>\n </button>\n </fieldset>\n </form>\n </div>\n </ng-template>\n\n <ng-template #noMessage>\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-double-check{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media (min-width: 768px){.no-message-center{margin-left:auto;width:calc(100% - 300px)}}\n"] }]
|
|
523
531
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.MailBoxService }, { type: i1.ProfileService }, { type: i1.WebsocketService }, { type: i1.ScriptLoaderService }, { type: i0.Injector }], propDecorators: { messageInputRef: [{
|
|
524
532
|
type: ViewChild,
|
|
525
533
|
args: ['messageInput', { static: false }]
|
|
@@ -542,11 +550,11 @@ const routes = [
|
|
|
542
550
|
}
|
|
543
551
|
];
|
|
544
552
|
class MessageRoutingModule {
|
|
545
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
546
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
547
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
553
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: MessageRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
554
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: MessageRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
|
|
555
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: MessageRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
548
556
|
}
|
|
549
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: MessageRoutingModule, decorators: [{
|
|
550
558
|
type: NgModule,
|
|
551
559
|
args: [{
|
|
552
560
|
imports: [RouterModule.forChild(routes)],
|
|
@@ -555,8 +563,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
555
563
|
}] });
|
|
556
564
|
|
|
557
565
|
class MessagingModule {
|
|
558
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
559
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
566
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: MessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
567
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: MessagingModule, declarations: [ChatBoxComponent], imports: [CommonModule,
|
|
560
568
|
PipesModule,
|
|
561
569
|
FormsModule,
|
|
562
570
|
MessageRoutingModule,
|
|
@@ -567,7 +575,7 @@ class MessagingModule {
|
|
|
567
575
|
NgxFileDropModule,
|
|
568
576
|
InfiniteScrollModule,
|
|
569
577
|
ScrollingModule], exports: [RouterModule, ChatBoxComponent] }); }
|
|
570
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
578
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: MessagingModule, imports: [CommonModule,
|
|
571
579
|
PipesModule,
|
|
572
580
|
FormsModule,
|
|
573
581
|
MessageRoutingModule,
|
|
@@ -579,7 +587,7 @@ class MessagingModule {
|
|
|
579
587
|
InfiniteScrollModule,
|
|
580
588
|
ScrollingModule, RouterModule] }); }
|
|
581
589
|
}
|
|
582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: MessagingModule, decorators: [{
|
|
583
591
|
type: NgModule,
|
|
584
592
|
args: [{
|
|
585
593
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posiwise-messaging-module.mjs","sources":["../../../../libs/messaging-module/src/lib/chatbox/chatbox.component.ts","../../../../libs/messaging-module/src/lib/chatbox/chatbox.component.html","../../../../libs/messaging-module/src/lib/messaging-routing.module.ts","../../../../libs/messaging-module/src/lib/messaging.module.ts","../../../../libs/messaging-module/src/posiwise-messaging-module.ts"],"sourcesContent":["import {\n Component,\n DoCheck,\n ElementRef,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport {\n MailBoxService,\n PermissionService,\n ProfileService,\n WebsocketService\n} from '@posiwise/common-services';\nimport { ScriptLoaderService } from '@posiwise/common-services';\nimport { ATTACHMENT_TYPE, ChatUser, Conversation, SOCKET_TYPE } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport groupBy from 'lodash/groupBy';\nimport sortBy from 'lodash/sortBy';\nimport uniqBy from 'lodash/uniqBy';\nimport moment from 'moment';\nimport { FileSystemFileEntry } from 'ngx-file-drop';\nimport { lastValueFrom } from 'rxjs';\n\nimport { ExtendedConversation, MessageChatUser } from '../shared/chatbox.interface';\n\n@Component({\n templateUrl: './chatbox.component.html',\n styleUrls: ['./chatbox.component.scss'],\n\n standalone: false\n})\nexport class ChatBoxComponent extends AppBaseComponent implements OnInit, OnDestroy, DoCheck {\n // Message Box Template Ref\n @ViewChild('messageInput', { static: false })\n messageInputRef: ElementRef;\n\n // File Upload Progress spinner\n isFileUploading: boolean;\n\n ObjectKeys = Object.keys;\n\n showEmoji = false;\n\n selectedConversationId: number;\n\n currentConversation: Conversation;\n\n // logged user\n currentUser: MessageChatUser;\n\n currentUserImg: string;\n\n // Conversation list\n private pristineConversation: Conversation[] = [];\n private isDrift = true;\n private readonly units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n private initialLoad = true;\n private selectedIndex = 0;\n private totalMessages = 0;\n private currentThreads = [];\n\n conversations: Conversation[] = [];\n\n // Active Chat User => other participant\n otherUser: ChatUser;\n\n // Boolean to unsubscribe on Destroy\n // List of messages per conversation Id\n messagesGroupedByDate = {};\n\n searchText: string;\n\n recipients = [];\n\n files = [];\n\n attachedFiles: { name: string; size: string }[] = [];\n\n isChatLoading = true;\n\n currentPage = 1;\n\n isLoaded = true;\n\n throttle = 300;\n\n scrollUpDistance = 2;\n\n scrollDistance = 1;\n subscriptionId: number;\n ATTACHMENT_TYPE = ATTACHMENT_TYPE;\n\n constructor(\n private elRef: ElementRef, // NOSONAR\n private readonly mailboxService: MailBoxService,\n private readonly profileService: ProfileService,\n private readonly socketService: WebsocketService,\n private readonly scriptLoader: ScriptLoaderService,\n injector: Injector\n ) {\n super(injector);\n }\n\n onUp(_ev, conversationId) {\n this.currentPage++;\n const totalPages = Math.ceil(this.totalMessages / 10);\n // Prevent API call if all messages have been fetched\n if (this.currentPage <= totalPages) {\n this.loadMore(conversationId, this.currentPage);\n }\n }\n\n ngOnInit() {\n this.waitForJQuery(() => {\n this.scriptLoader.loadScript('head', '/assets/js/chat.js', true);\n });\n this.listenToNewMessage();\n this.subscriptionId = PermissionService.selectedSubscription?.id;\n this.userStore().subscribe(resp => {\n this.currentUser = resp;\n if (this.currentUser) {\n this.mailboxService\n .getConversations()\n .subscribe((response: ExtendedConversation[]) => {\n if (response?.length) {\n let raw;\n if (this.conversations.length > 0) {\n raw = this.conversations.find(x => x?.id === null);\n }\n response.forEach(x => {\n x.datetime = x.latest_message.created_at;\n });\n const chats = sortBy(response, 'datetime').reverse();\n this.pristineConversation = chats;\n this.conversations = [...chats];\n\n if (raw) {\n this.conversations.unshift(raw);\n }\n\n this.parseConversation();\n setTimeout(() => this.filterConversations());\n }\n\n if (this.initialLoad) {\n this.checkIfNewConversation();\n } else {\n this.activateThread();\n }\n })\n .add(() => {\n this.isChatLoading = false;\n this.initialLoad = false;\n });\n }\n });\n }\n private filterConversations(): void {\n this.conversations = this.conversations.filter(conversation => conversation.to);\n }\n ngDoCheck() {\n // Hiding Drift messenger for Chat-box (Drift service shut down - kept for future chat widget alternative)\n if (window['jQuery'] && this.isDrift) {\n if ($('#drift-widget-container').length > 0 && $('#drift-widget-container:visible')) {\n this.isDrift = false;\n $('#drift-widget-container').hide();\n }\n }\n }\n\n override ngOnDestroy(): void {\n if (window['jQuery']) {\n $('.drift-widget-container').show();\n }\n }\n\n private parseConversation() {\n this.conversations.forEach((element: Conversation, index) => {\n element.to = element.participants.find(x => x?.id !== this.currentUser?.id);\n element.from = element.participants.find(x => x?.id === this.currentUser?.id);\n if (index === 0) {\n this.currentUserImg = element.from?.avatar ?? '/assets/img/icons/male.png';\n }\n });\n }\n\n private activateThread() {\n setTimeout(() => {\n if (window['jQuery']) {\n const selector = `.list-group-item:nth-child(${this.selectedIndex + 1})`;\n $(selector)\n .removeClass('no-border')\n .addClass(\n 'list-group-item bg-blue-grey bg-lighten-5 border-right-primary border-right-2'\n );\n }\n });\n }\n\n private checkIfNewConversation() {\n this.route.fragment.subscribe((fragment: string) => {\n if (fragment) {\n // Check for existing conversation\n const existingConversation = this.conversations.find(x => x.to?.slug === fragment);\n if (existingConversation) {\n this.otherUser = existingConversation.to;\n // sets the active tab when navigate to chat page\n this.setActive(existingConversation);\n } else {\n this.newParticipant(fragment);\n }\n } else if (this.conversations.length > 0) {\n this.router.navigate(['/message'], { fragment: this.conversations[0].to?.slug });\n }\n });\n }\n\n onParticipantClick(conversation) {\n this.otherUser = conversation.participants.find(x => x?.id !== this.currentUser?.id);\n const slug = this.otherUser?.slug;\n this.clearUnreadCount();\n this.router.navigate(['/message'], { fragment: slug });\n }\n\n private newParticipant(slug) {\n this.profileService.getUserProfile(slug).subscribe(response => {\n this.otherUser = response;\n\n const to = new ChatUser(\n response?.id,\n response?.first_name,\n response?.slug,\n response?.email,\n response?.avatar ? response?.avatar[0]?.url : '',\n new Date()\n );\n\n const from = new ChatUser(\n this.currentUser?.id,\n this.currentUser?.firstName,\n this.currentUser?.slug,\n this.currentUser?.email,\n this.currentUser?.avatar\n ? this.currentUser?.avatar[0].url\n : '/assets/img/icons/male.png',\n new Date()\n );\n\n const newConversation = new Conversation(\n null,\n 1,\n null,\n 'chat',\n [to, from],\n null,\n 0,\n from,\n to\n );\n\n this.conversations.unshift(newConversation);\n this.setActive(this.conversations[0]);\n });\n }\n\n // chat user list click event function\n private setActive(conversation) {\n this.currentPage = 0;\n this.currentThreads = [];\n this.totalMessages = 0;\n this.otherUser = conversation.participants.find(x => x?.id !== this.currentUser?.id);\n\n this.selectedConversationId = conversation?.id;\n this.currentConversation = conversation;\n\n const hElement: HTMLElement = this.elRef.nativeElement;\n // now you can simply get your elements with their class name\n const allAnchors = hElement.getElementsByClassName('list-group-item');\n // do something with selected elements\n [].forEach.call(allAnchors, (item: HTMLElement) => {\n item.setAttribute('class', 'list-group-item no-border');\n });\n\n const index = this.conversations.findIndex(x => x?.to?.id === this.otherUser?.id) || 0;\n setTimeout(() => {\n if (window['jQuery']) {\n $(`.list-group-item:nth-child(${index + 1})`)\n .removeClass('no-border')\n .addClass(\n 'list-group-item bg-blue-grey bg-lighten-5 border-right-primary border-right-2'\n );\n this.selectedIndex = $('.list-group-item.border-right-2').index();\n }\n }, 500);\n\n this.markAsRead(conversation?.id);\n this.getMessage(conversation?.id);\n }\n\n search(searchTxt) {\n if (searchTxt?.value?.length > 2) {\n this.conversations = this.pristineConversation.filter(\n x => x.to.slug.includes(searchTxt.value) ?? x.to?.email.includes(searchTxt.value)\n );\n } else {\n this.conversations = this.pristineConversation;\n }\n }\n\n // Socket For Listening to new Message\n private listenToNewMessage() {\n this.socketService.webSocket$.subscribe(\n (result: {\n event: string;\n new_conversation: string;\n data: {\n formattedDate: string;\n created_at: string;\n conversation_id: number;\n };\n id: number;\n }) => {\n if (result.event === SOCKET_TYPE.MSG) {\n if (result?.new_conversation === 'false') {\n const newMessage = result?.data;\n newMessage.formattedDate = moment(new Date(newMessage.created_at)).format(\n 'YYYYMMDD'\n );\n\n // Append the new message to conversation\n const conversation = this.conversations.find(x => x?.id === result?.id);\n if (conversation) {\n conversation.latest_message = result.data;\n conversation.created_at = newMessage.created_at;\n conversation.unread_count += 1;\n }\n\n if (\n newMessage.conversation_id === this.selectedConversationId &&\n newMessage.formattedDate in this.messagesGroupedByDate\n ) {\n this.messagesGroupedByDate[newMessage.formattedDate].push(newMessage);\n this.animateOnScroll();\n }\n } else if (result && typeof result.new_conversation === 'object') {\n this.conversations.unshift(result.new_conversation);\n this.parseConversation();\n }\n }\n }\n );\n }\n\n getMessage(messageId, reload = true) {\n if (reload) {\n this.messagesGroupedByDate = null;\n }\n if (messageId) {\n this.isLoaded = false;\n\n this.mailboxService\n .getMessages(messageId)\n .subscribe(response => {\n if (response) {\n this.totalMessages = response.object_count;\n this.currentThreads = response.messages;\n const ifExist = this.conversations.find(x => x?.id === response?.id);\n if (!ifExist) {\n this.conversations.find(x => x?.id === null).id = response?.id;\n }\n\n const messages = sortBy(response.messages, 'created_at');\n\n messages.forEach(msg => {\n msg.messageType = msg.attachment.url\n ? this.getMessageType(msg.attachment.url)\n : null;\n });\n this.messagesGroupedByDate = groupBy(messages, (o: Conversation) => {\n return moment(o.created_at).format('YYYYMMDD');\n });\n\n // Append the latest message to conversation list\n const current = this.conversations.find(\n x => x?.id === response?.id\n ).latest_message;\n if (current) {\n current.body = response.messages[0].body;\n current.created_at = response.messages[0].created_at;\n }\n }\n })\n .add(() => {\n this.isChatLoading = false;\n this.isLoaded = true;\n this.animateOnScroll();\n });\n }\n }\n\n private loadMore(conversationId, pageNumber, pageSize = 10) {\n this.mailboxService\n .getMessages(conversationId, pageNumber, pageSize)\n .subscribe(response => {\n if (response) {\n this.currentThreads = uniqBy(\n this.currentThreads.concat(response.messages),\n 'id'\n );\n const messages = sortBy(this.currentThreads, 'created_at');\n this.messagesGroupedByDate = groupBy(messages, (o: Conversation) => {\n return moment(o.created_at).format('YYYYMMDD');\n });\n }\n });\n }\n\n private clearUnreadCount() {\n this.mailboxService.decrementUnreadCount(this.currentConversation?.unread_count);\n if (this.currentConversation?.['unread_count']) {\n this.currentConversation['unread_count'] = 0;\n }\n }\n\n onSendMessage() {\n const text = this.messageInputRef.nativeElement.value;\n const formData = new FormData();\n formData.append('to', this.otherUser?.email);\n formData.append('message', text);\n formData.append('type', '1');\n formData.append('subscription_id', `${this.subscriptionId}`);\n\n if (this.files?.length) {\n this.isFileUploading = true;\n formData.append('file', this.files[0], this.files[0].name);\n }\n\n if (text || this.files.length > 0) {\n this.mailboxService\n .postMessage(formData)\n .subscribe(response => {\n this.files = [];\n this.attachedFiles = [];\n this.messageInputRef.nativeElement.value = '';\n this.messageInputRef.nativeElement.focus();\n this.getMessage(response.conversation_id, false);\n })\n .add(() => {\n this.isFileUploading = false;\n });\n }\n }\n\n private markAsRead(conversationId) {\n if (conversationId) {\n this.clearUnreadCount();\n this.mailboxService.markAsRead(conversationId).subscribe(() => {\n this.conversations.find(x => x?.id === conversationId).unread_count = 0;\n });\n }\n }\n\n private transform(bytes = 0, precision = 2) {\n // eslint-disable-next-line no-restricted-globals\n if (Number.isNaN(Number.parseFloat(String(bytes))) || !Number.isFinite(bytes)) {\n return '?';\n }\n let unit = 0;\n\n while (bytes >= 1024) {\n bytes /= 1024;\n unit++;\n }\n\n return `${bytes.toFixed(+precision)} ${this.units[unit]}`;\n }\n\n dropped(files) {\n // eslint-disable-next-line no-restricted-syntax\n for (const droppedFile of files) {\n // Is it a file?\n if (droppedFile.fileEntry.isFile) {\n const fileEntry = droppedFile.fileEntry as FileSystemFileEntry;\n fileEntry.file((file: File) => {\n this.files.push(file);\n this.attachedFiles.push({\n name: file.name,\n size: this.transform(Number(file.size))\n });\n });\n }\n }\n }\n\n onRemoveAttachment(item) {\n this.files = this.files.filter(x => x.name !== item.name);\n this.attachedFiles = this.attachedFiles.filter(x => x.name !== item.name);\n }\n\n fileOver(_event) {\n console.log();\n }\n\n onEmojiSelect($event) {\n this.messageInputRef.nativeElement.value += $event.emoji.native;\n this.showEmoji = false;\n }\n\n fileChangeListener($event) {\n const file: File = $event.target.files[0];\n this.files.push(file);\n this.attachedFiles.push({\n name: file.name,\n size: this.transform(Number(file.size / 1024))\n });\n }\n\n toggleSidebar() {\n if (window['jQuery']) {\n $('.chat-sidebar').removeClass('d-none d-sm-none').addClass('d-block d-sm-block');\n $('.content-overlay').addClass('show');\n }\n }\n\n trackByMessageId(_index, item) {\n return item?.id;\n }\n\n private animateOnScroll() {\n setTimeout(() => {\n if (window['jQuery'] && $('#chats-wrapper')?.length) {\n $('#chats-wrapper')\n .stop()\n .animate(\n {\n scrollTop: $('#chats-wrapper')[0].scrollHeight\n },\n 800\n );\n }\n });\n }\n\n private getMessageType(filename): string {\n const ext = this.getExtension(filename);\n switch (ext.toLowerCase()) {\n case 'jpg':\n case 'gif':\n case 'bmp':\n case 'png':\n return ATTACHMENT_TYPE.IMG;\n case 'm4v':\n case 'avi':\n case 'mpg':\n case 'mp4':\n return ATTACHMENT_TYPE.VIDEO;\n default:\n return '';\n }\n }\n\n private getExtension(filename) {\n const parts = filename.split('.');\n\n return parts[parts.length - 1];\n }\n\n recipientSearch() {\n lastValueFrom(\n this.mailboxService.getRecipient({\n page: 1,\n page_size: 20,\n subscription_id: PermissionService.selectedSubscription?.id,\n search: this.searchText\n })\n ).then(response => {\n this.recipients = response.filter(x => x?.id !== this.currentUser?.id);\n });\n }\n\n onMemberSelection(member) {\n this.otherUser = member;\n this.router.navigate(['/message'], { fragment: member.slug });\n }\n\n onDeleteMessage(message) {\n HelperService.raiseDeletePopup().then(rep => {\n if (rep.value) {\n this.mailboxService\n .deleteMessage(this.selectedConversationId, message?.id)\n .subscribe(response => {\n if (response?.status_code === 200) {\n const createdAt = moment(message.created_at).format('YYYYMMDD');\n // eslint-disable-next-line no-restricted-syntax\n for (const property in this.messagesGroupedByDate) {\n if (property === createdAt) {\n this.messagesGroupedByDate[property] =\n this.messagesGroupedByDate[property].filter(\n x => x?.id !== message?.id\n );\n }\n }\n }\n });\n }\n });\n }\n\n private waitForJQuery(callback: () => void): void {\n let attempts = 0;\n const maxAttempts = 100; // 10 seconds max wait time\n\n const checkJQuery = () => {\n if (window['jQuery']) {\n console.log('jQuery detected, loading chat.js');\n callback();\n } else if (attempts < maxAttempts) {\n attempts++;\n setTimeout(checkJQuery, 100);\n } else {\n console.log('jQuery not available, loading it now for chatbox');\n // Load jQuery since it's needed\n this.loadJQueryForChatbox(callback);\n }\n };\n checkJQuery();\n }\n\n private loadJQueryForChatbox(callback: () => void): void {\n const jquerySrc = 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n const script = document.createElement('script');\n script.src = jquerySrc;\n script.crossOrigin = 'anonymous';\n script.async = false;\n script.onload = () => {\n console.log('jQuery loaded for chatbox');\n callback();\n };\n script.onerror = () => {\n console.error('Failed to load jQuery for chatbox');\n // Try fallback\n const fallbackScript = document.createElement('script');\n fallbackScript.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n fallbackScript.crossOrigin = 'anonymous';\n fallbackScript.async = false;\n fallbackScript.onload = () => {\n console.log('jQuery loaded from Google CDN for chatbox');\n callback();\n };\n fallbackScript.onerror = () => {\n console.error('All jQuery CDNs failed for chatbox');\n };\n document.head.appendChild(fallbackScript);\n };\n document.head.appendChild(script);\n }\n}\n","<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n <div *ngIf=\"isChatLoading\"\n class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading\">\n <div class=\"chat-sidebar float-start d-none d-sm-none d-md-block d-lg-block\">\n <div class=\"chat-sidebar-content\">\n <div class=\"chat-fixed-search p-2\">\n <div class=\"d-flex\">\n <p-autoComplete [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search a member\"\n [ngModelOptions]=\"{ standalone: true }\"\n field=\"first_name\"\n (onSelect)=\"onMemberSelection(searchText)\"\n [suggestions]=\"recipients\"\n (completeMethod)=\"recipientSearch()\">\n <ng-template let-item\n pTemplate=\"item\">\n <div>\n {{ item.first_name + ' ' }}\n {{ item.last_name ? item.last_name : '' }}\n </div>\n </ng-template>\n </p-autoComplete>\n </div>\n </div>\n\n <!-- Thread/conversation List -->\n <div id=\"users-list\"\n class=\"list-group position-relative\">\n <div class=\"users-list-padding\"\n *ngIf=\"conversations?.length\">\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\"\n *ngFor=\"let conversation of conversations\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n <ng-template [ngIf]=\"conversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar me-2\">\n <strong>{{\n conversation?.participants\n ? conversation.to?.slug.charAt(0).toUpperCase()\n : conversation.to?.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </span>\n <div class=\"clearfix\">\n <h6 class=\"list-group-item-heading mb-1\">\n {{\n conversation.to?.name\n ? conversation.to?.name\n : conversation.to?.slug\n }}\n <span class=\"font-small-3 float-end ms-5 ps-5\">\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\"\n *ngIf=\"conversation?.unread_count\">\n {{ conversation.unread_count }}\n </span>\n {{ conversation.created_at | date: 'shortTime' }}\n </span>\n </h6>\n <p class=\"list-group-item-text text-muted\">\n {{ conversation?.latest_message?.body | textTruncate: 25 }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading && conversations?.length\"\n [ngIfElse]=\"noMessage\">\n <!-- Chat Header -->\n <div class=\"chat-name p-2 bg-white\"\n *ngIf=\"otherUser\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n <ng-template [ngIf]=\"currentConversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div *ngIf=\"currentUser\"\n class=\"dummy-avatar me-2\">\n <strong>{{\n otherUser?.name\n ? otherUser.name.charAt(0).toUpperCase()\n : otherUser.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"currentUser\">\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n </ng-template>\n </div>\n </div>\n </div>\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n <div *ngIf=\"!isLoaded\"\n class=\"spinner\"></div>\n <ng-container *ngIf=\"messagesGroupedByDate\">\n <ng-container *ngFor=\"let item of ObjectKeys(messagesGroupedByDate)\">\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n <div class=\"chat\"\n [ngClass]=\"{\n 'chat-left ms-2': message.sender_id !== currentUser.id,\n 'me-2': message.sender_id === currentUser.id\n }\"\n *ngFor=\"\n let message of messagesGroupedByDate[item];\n trackBy: trackByMessageId;\n let i = index\n \">\n <ng-container *ngIf=\"message.body || message.attachment.url\">\n <div class=\"chat-avatar\">\n <a class=\"avatar\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n data-original-title=\"\">\n <!-- Setting up Avatar Image for Logged In User -->\n <ng-container *ngIf=\"message.sender_id === currentUser.id\">\n <ng-template [ngIf]=\"currentUserImg\"\n [ngIfElse]=\"curDummy\">\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n <ng-template #curDummy>\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Participant -->\n <ng-container *ngIf=\"message.sender_id !== currentUser.id\">\n <ng-template [ngIf]=\"currentUser && otherUser?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar\">\n <strong>{{\n otherUser?.name\n ? otherUser.name\n .charAt(0)\n .toUpperCase()\n : otherUser.slug\n .charAt(0)\n .toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </ng-container>\n </a>\n </div>\n <div class=\"chat-body\">\n <div class=\"chat-content attachment\"\n *ngIf=\"\n !message?.attachment?.url;\n else withAttachmentRef\n \">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n <p>{{ message.body }}</p>\n </div>\n\n <ng-template #withAttachmentRef>\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <div *ngIf=\"message.attachment\"\n class=\"message-attachment\">\n <i *ngIf=\"message.attachment.url\">\n <img\n [src]=\"message.attachment.url\"\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.IMG\n \"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n <video\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.VIDEO\n \"\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n <a\n [attr.href]=\"message.attachment.url\"\n target=\"_blank\"\n >\n <i\n class=\"fa fa-file-download me-2\"\n aria-hidden=\"true\"\n ></i>\n {{\n message.attachment.url\n | common: 'filename'\n }}</a>\n </i>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!messagesGroupedByDate && isLoaded\">\n <div class=\"mt-3 text-center\">No message history.</div>\n </ng-container>\n\n <ng-container *ngIf=\"isFileUploading\">\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n </ng-container>\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n <div class=\"card px-3 py-2 m-0 mb-1\"\n *ngFor=\"let item of attachedFiles; let i = index\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji…\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <i class=\"icon-emoticon-smile\" (click)=\"showEmoji = !showEmoji\" (keydown)=\"showEmoji = !showEmoji\"></i>\n </div>\n <input type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <i class=\"fa fa-paperclip\">\n <input\n id=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n />\n </i>\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"mb-3 position-relative has-icon-left col-2 m-0 mb-1\">\n <button type=\"button\"\n class=\"btn btn-primary d-lg-flex align-items-center btn-send\"\n (click)=\"onSendMessage()\">\n <i class=\"fa fa-paper-plane\"></i><span class=\"d-none d-lg-block ms-1\">Send</span>\n </button>\n </fieldset>\n </form>\n </div>\n </ng-template>\n\n <ng-template #noMessage>\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { ChatBoxComponent } from './chatbox/chatbox.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: ChatBoxComponent,\n data: {\n title: 'Chat'\n }\n },\n {\n path: ':memberId',\n component: ChatBoxComponent,\n data: {\n title: 'Chat'\n }\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class MessageRoutingModule {}\n","import { ScrollingModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { PipesModule } from '@posiwise/pipes';\n\nimport { NgxFileDropModule } from 'ngx-file-drop';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\n\nimport { PickerModule } from '@ctrl/ngx-emoji-mart';\nimport { EmojiModule } from '@ctrl/ngx-emoji-mart/ngx-emoji';\n\nimport { ChatBoxComponent } from './chatbox/chatbox.component';\nimport { MessageRoutingModule } from './messaging-routing.module';\n\n@NgModule({\n imports: [\n CommonModule,\n PipesModule,\n FormsModule,\n MessageRoutingModule,\n ProgressSpinnerModule,\n AutoCompleteModule,\n PickerModule,\n EmojiModule,\n NgxFileDropModule,\n InfiniteScrollModule,\n ScrollingModule\n ],\n declarations: [ChatBoxComponent],\n exports: [RouterModule, ChatBo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,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAfpB,YAAY;YACZ,WAAW;YACX,WAAW;YACX,oBAAoB;YACpB,qBAAqB;YACrB,kBAAkB;YAClB,YAAY;YACZ,WAAW;YACX,iBAAiB;YACjB,oBAAoB;AACpB,YAAA,eAAe,EAGT,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAEb,eAAe,EAAA,UAAA,EAAA,CAAA;kBAjB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,WAAW;wBACX,oBAAoB;wBACpB,qBAAqB;wBACrB,kBAAkB;wBAClB,YAAY;wBACZ,WAAW;wBACX,iBAAiB;wBACjB,oBAAoB;wBACpB;AACH,qBAAA;oBACD,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB;AAC3C,iBAAA;;;ACnCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"posiwise-messaging-module.mjs","sources":["../../../../libs/messaging-module/src/lib/chatbox/chatbox.component.ts","../../../../libs/messaging-module/src/lib/chatbox/chatbox.component.html","../../../../libs/messaging-module/src/lib/messaging-routing.module.ts","../../../../libs/messaging-module/src/lib/messaging.module.ts","../../../../libs/messaging-module/src/posiwise-messaging-module.ts"],"sourcesContent":["import {\n Component,\n DoCheck,\n ElementRef,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport {\n MailBoxService,\n PermissionService,\n ProfileService,\n ScriptLoaderService,\n WebsocketService\n} from '@posiwise/common-services';\nimport { ATTACHMENT_TYPE, ChatUser, Conversation, SOCKET_TYPE } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport groupBy from 'lodash/groupBy';\nimport sortBy from 'lodash/sortBy';\nimport uniqBy from 'lodash/uniqBy';\nimport moment from 'moment';\nimport { FileSystemFileEntry } from 'ngx-file-drop';\nimport { lastValueFrom } from 'rxjs';\n\nimport { ExtendedConversation, MessageChatUser } from '../shared/chatbox.interface';\n\n@Component({\n templateUrl: './chatbox.component.html',\n styleUrls: ['./chatbox.component.scss'],\n\n standalone: false\n})\nexport class ChatBoxComponent extends AppBaseComponent implements OnInit, OnDestroy, DoCheck {\n // Message Box Template Ref\n @ViewChild('messageInput', { static: false })\n messageInputRef: ElementRef;\n\n // File Upload Progress spinner\n isFileUploading: boolean;\n\n ObjectKeys = Object.keys;\n\n showEmoji = false;\n\n selectedConversationId: number;\n\n currentConversation: Conversation;\n\n // logged user\n currentUser: MessageChatUser;\n\n currentUserImg: string;\n\n // Conversation list\n private pristineConversation: Conversation[] = [];\n private isDrift = true;\n private readonly units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n private initialLoad = true;\n private selectedIndex = 0;\n private totalMessages = 0;\n private currentThreads = [];\n\n conversations: Conversation[] = [];\n\n // Active Chat User => other participant\n otherUser: ChatUser;\n\n // Boolean to unsubscribe on Destroy\n // List of messages per conversation Id\n messagesGroupedByDate = {};\n\n searchText: string;\n\n recipients = [];\n\n files = [];\n\n attachedFiles: { name: string; size: string }[] = [];\n\n isChatLoading = true;\n\n currentPage = 1;\n\n isLoaded = true;\n\n throttle = 300;\n\n scrollUpDistance = 2;\n\n scrollDistance = 1;\n subscriptionId: number;\n ATTACHMENT_TYPE = ATTACHMENT_TYPE;\n\n constructor(\n private elRef: ElementRef, // NOSONAR\n private readonly mailboxService: MailBoxService,\n private readonly profileService: ProfileService,\n private readonly socketService: WebsocketService,\n private readonly scriptLoader: ScriptLoaderService,\n injector: Injector\n ) {\n super(injector);\n }\n\n onImgError(event: Event, fallbackSrc: string): void {\n const img = event.target as HTMLImageElement | null;\n if (!img) return;\n if (img.src?.endsWith(fallbackSrc)) return;\n img.src = fallbackSrc;\n }\n\n onUp(_ev, conversationId) {\n this.currentPage++;\n const totalPages = Math.ceil(this.totalMessages / 10);\n // Prevent API call if all messages have been fetched\n if (this.currentPage <= totalPages) {\n this.loadMore(conversationId, this.currentPage);\n }\n }\n\n ngOnInit() {\n this.waitForJQuery(() => {\n this.scriptLoader.loadScript('head', '/assets/js/chat.js', true);\n });\n this.listenToNewMessage();\n this.subscriptionId = PermissionService.selectedSubscription?.id;\n this.userStore().subscribe(resp => {\n this.currentUser = resp;\n if (this.currentUser) {\n this.mailboxService\n .getConversations()\n .subscribe((response: ExtendedConversation[]) => {\n if (response?.length) {\n let raw;\n if (this.conversations.length > 0) {\n raw = this.conversations.find(x => x?.id === null);\n }\n response.forEach(x => {\n x.datetime = x.latest_message.created_at;\n });\n const chats = sortBy(response, 'datetime').reverse();\n this.pristineConversation = chats;\n this.conversations = [...chats];\n\n if (raw) {\n this.conversations.unshift(raw);\n }\n\n this.parseConversation();\n setTimeout(() => this.filterConversations());\n }\n\n if (this.initialLoad) {\n this.checkIfNewConversation();\n } else {\n this.activateThread();\n }\n })\n .add(() => {\n this.isChatLoading = false;\n this.initialLoad = false;\n });\n }\n });\n }\n private filterConversations(): void {\n this.conversations = this.conversations.filter(conversation => conversation.to);\n }\n ngDoCheck() {\n // Hiding Drift messenger for Chat-box (Drift service shut down - kept for future chat widget alternative)\n if (window['jQuery'] && this.isDrift) {\n if ($('#drift-widget-container').length > 0 && $('#drift-widget-container:visible')) {\n this.isDrift = false;\n $('#drift-widget-container').hide();\n }\n }\n }\n\n override ngOnDestroy(): void {\n if (window['jQuery']) {\n $('.drift-widget-container').show();\n }\n }\n\n private parseConversation() {\n this.conversations.forEach((element: Conversation, index) => {\n element.to = element.participants.find(x => x?.id !== this.currentUser?.id);\n element.from = element.participants.find(x => x?.id === this.currentUser?.id);\n if (index === 0) {\n this.currentUserImg = element.from?.avatar ?? '/assets/img/icons/male.png';\n }\n });\n }\n\n private activateThread() {\n setTimeout(() => {\n if (window['jQuery']) {\n const selector = `.list-group-item:nth-child(${this.selectedIndex + 1})`;\n $(selector)\n .removeClass('no-border')\n .addClass(\n 'list-group-item bg-blue-grey bg-lighten-5 border-right-primary border-right-2'\n );\n }\n });\n }\n\n private checkIfNewConversation() {\n this.route.fragment.subscribe((fragment: string) => {\n if (fragment) {\n // Check for existing conversation\n const existingConversation = this.conversations.find(x => x.to?.slug === fragment);\n if (existingConversation) {\n this.otherUser = existingConversation.to;\n // sets the active tab when navigate to chat page\n this.setActive(existingConversation);\n } else {\n this.newParticipant(fragment);\n }\n } else if (this.conversations.length > 0) {\n this.router.navigate(['/message'], { fragment: this.conversations[0].to?.slug });\n }\n });\n }\n\n onParticipantClick(conversation) {\n this.otherUser = conversation.participants.find(x => x?.id !== this.currentUser?.id);\n const slug = this.otherUser?.slug;\n this.clearUnreadCount();\n this.router.navigate(['/message'], { fragment: slug });\n }\n\n private newParticipant(slug) {\n this.profileService.getUserProfile(slug).subscribe(response => {\n this.otherUser = response;\n\n const to = new ChatUser(\n response?.id,\n response?.first_name,\n response?.slug,\n response?.email,\n response?.avatar ? response?.avatar[0]?.url : '',\n new Date()\n );\n\n const from = new ChatUser(\n this.currentUser?.id,\n this.currentUser?.firstName,\n this.currentUser?.slug,\n this.currentUser?.email,\n this.currentUser?.avatar\n ? this.currentUser?.avatar[0].url\n : '/assets/img/icons/male.png',\n new Date()\n );\n\n const newConversation = new Conversation(\n null,\n 1,\n null,\n 'chat',\n [to, from],\n null,\n 0,\n from,\n to\n );\n\n this.conversations.unshift(newConversation);\n this.setActive(this.conversations[0]);\n });\n }\n\n // chat user list click event function\n private setActive(conversation) {\n this.currentPage = 0;\n this.currentThreads = [];\n this.totalMessages = 0;\n this.otherUser = conversation.participants.find(x => x?.id !== this.currentUser?.id);\n\n this.selectedConversationId = conversation?.id;\n this.currentConversation = conversation;\n\n const hElement: HTMLElement = this.elRef.nativeElement;\n // now you can simply get your elements with their class name\n const allAnchors = hElement.getElementsByClassName('list-group-item');\n // do something with selected elements\n [].forEach.call(allAnchors, (item: HTMLElement) => {\n item.setAttribute('class', 'list-group-item no-border');\n });\n\n const index = this.conversations.findIndex(x => x?.to?.id === this.otherUser?.id) || 0;\n setTimeout(() => {\n if (window['jQuery']) {\n $(`.list-group-item:nth-child(${index + 1})`)\n .removeClass('no-border')\n .addClass(\n 'list-group-item bg-blue-grey bg-lighten-5 border-right-primary border-right-2'\n );\n this.selectedIndex = $('.list-group-item.border-right-2').index();\n }\n }, 500);\n\n this.markAsRead(conversation?.id);\n this.getMessage(conversation?.id);\n }\n\n search(searchTxt) {\n if (searchTxt?.value?.length > 2) {\n this.conversations = this.pristineConversation.filter(\n x => x.to.slug.includes(searchTxt.value) ?? x.to?.email.includes(searchTxt.value)\n );\n } else {\n this.conversations = this.pristineConversation;\n }\n }\n\n // Socket For Listening to new Message\n private listenToNewMessage() {\n this.socketService.webSocket$.subscribe(\n (result: {\n event: string;\n new_conversation: string;\n data: {\n formattedDate: string;\n created_at: string;\n conversation_id: number;\n };\n id: number;\n }) => {\n if (result.event === SOCKET_TYPE.MSG) {\n if (result?.new_conversation === 'false') {\n const newMessage = result?.data;\n newMessage.formattedDate = moment(new Date(newMessage.created_at)).format(\n 'YYYYMMDD'\n );\n\n // Append the new message to conversation\n const conversation = this.conversations.find(x => x?.id === result?.id);\n if (conversation) {\n conversation.latest_message = result.data;\n conversation.created_at = newMessage.created_at;\n conversation.unread_count += 1;\n }\n\n if (\n newMessage.conversation_id === this.selectedConversationId &&\n newMessage.formattedDate in this.messagesGroupedByDate\n ) {\n this.messagesGroupedByDate[newMessage.formattedDate].push(newMessage);\n this.animateOnScroll();\n }\n } else if (result && typeof result.new_conversation === 'object') {\n this.conversations.unshift(result.new_conversation);\n this.parseConversation();\n }\n }\n }\n );\n }\n\n getMessage(messageId, reload = true) {\n if (reload) {\n this.messagesGroupedByDate = null;\n }\n if (messageId) {\n this.isLoaded = false;\n\n this.mailboxService\n .getMessages(messageId)\n .subscribe(response => {\n if (response) {\n this.totalMessages = response.object_count;\n this.currentThreads = response.messages;\n const ifExist = this.conversations.find(x => x?.id === response?.id);\n if (!ifExist) {\n this.conversations.find(x => x?.id === null).id = response?.id;\n }\n\n const messages = sortBy(response.messages, 'created_at');\n\n messages.forEach(msg => {\n msg.messageType = msg.attachment.url\n ? this.getMessageType(msg.attachment.url)\n : null;\n });\n this.messagesGroupedByDate = groupBy(messages, (o: Conversation) => {\n return moment(o.created_at).format('YYYYMMDD');\n });\n\n // Append the latest message to conversation list\n const current = this.conversations.find(\n x => x?.id === response?.id\n ).latest_message;\n if (current) {\n current.body = response.messages[0].body;\n current.created_at = response.messages[0].created_at;\n }\n }\n })\n .add(() => {\n this.isChatLoading = false;\n this.isLoaded = true;\n this.animateOnScroll();\n });\n }\n }\n\n private loadMore(conversationId, pageNumber, pageSize = 10) {\n this.mailboxService\n .getMessages(conversationId, pageNumber, pageSize)\n .subscribe(response => {\n if (response) {\n this.currentThreads = uniqBy(\n this.currentThreads.concat(response.messages),\n 'id'\n );\n const messages = sortBy(this.currentThreads, 'created_at');\n this.messagesGroupedByDate = groupBy(messages, (o: Conversation) => {\n return moment(o.created_at).format('YYYYMMDD');\n });\n }\n });\n }\n\n private clearUnreadCount() {\n this.mailboxService.decrementUnreadCount(this.currentConversation?.unread_count);\n if (this.currentConversation?.['unread_count']) {\n this.currentConversation['unread_count'] = 0;\n }\n }\n\n onSendMessage() {\n const text = this.messageInputRef.nativeElement.value;\n const formData = new FormData();\n formData.append('to', this.otherUser?.email);\n formData.append('message', text);\n formData.append('type', '1');\n formData.append('subscription_id', `${this.subscriptionId}`);\n\n if (this.files?.length) {\n this.isFileUploading = true;\n formData.append('file', this.files[0], this.files[0].name);\n }\n\n if (text || this.files.length > 0) {\n this.mailboxService\n .postMessage(formData)\n .subscribe(response => {\n this.files = [];\n this.attachedFiles = [];\n this.messageInputRef.nativeElement.value = '';\n this.messageInputRef.nativeElement.focus();\n this.getMessage(response.conversation_id, false);\n })\n .add(() => {\n this.isFileUploading = false;\n });\n }\n }\n\n private markAsRead(conversationId) {\n if (conversationId) {\n this.clearUnreadCount();\n this.mailboxService.markAsRead(conversationId).subscribe(() => {\n this.conversations.find(x => x?.id === conversationId).unread_count = 0;\n });\n }\n }\n\n private transform(bytes = 0, precision = 2) {\n // eslint-disable-next-line no-restricted-globals\n if (Number.isNaN(Number.parseFloat(String(bytes))) || !Number.isFinite(bytes)) {\n return '?';\n }\n let unit = 0;\n\n while (bytes >= 1024) {\n bytes /= 1024;\n unit++;\n }\n\n return `${bytes.toFixed(+precision)} ${this.units[unit]}`;\n }\n\n dropped(files) {\n // eslint-disable-next-line no-restricted-syntax\n for (const droppedFile of files) {\n // Is it a file?\n if (droppedFile.fileEntry.isFile) {\n const fileEntry = droppedFile.fileEntry as FileSystemFileEntry;\n fileEntry.file((file: File) => {\n this.files.push(file);\n this.attachedFiles.push({\n name: file.name,\n size: this.transform(Number(file.size))\n });\n });\n }\n }\n }\n\n onRemoveAttachment(item) {\n this.files = this.files.filter(x => x.name !== item.name);\n this.attachedFiles = this.attachedFiles.filter(x => x.name !== item.name);\n }\n\n fileOver(_event) {\n console.log();\n }\n\n onEmojiSelect($event) {\n this.messageInputRef.nativeElement.value += $event.emoji.native;\n this.showEmoji = false;\n }\n\n fileChangeListener($event) {\n const file: File = $event.target.files[0];\n this.files.push(file);\n this.attachedFiles.push({\n name: file.name,\n size: this.transform(Number(file.size / 1024))\n });\n }\n\n toggleSidebar() {\n if (window['jQuery']) {\n $('.chat-sidebar').removeClass('d-none d-sm-none').addClass('d-block d-sm-block');\n $('.content-overlay').addClass('show');\n }\n }\n\n trackByMessageId(_index, item) {\n return item?.id;\n }\n\n private animateOnScroll() {\n setTimeout(() => {\n if (window['jQuery'] && $('#chats-wrapper')?.length) {\n $('#chats-wrapper')\n .stop()\n .animate(\n {\n scrollTop: $('#chats-wrapper')[0].scrollHeight\n },\n 800\n );\n }\n });\n }\n\n private getMessageType(filename): string {\n const ext = this.getExtension(filename);\n switch (ext.toLowerCase()) {\n case 'jpg':\n case 'gif':\n case 'bmp':\n case 'png':\n return ATTACHMENT_TYPE.IMG;\n case 'm4v':\n case 'avi':\n case 'mpg':\n case 'mp4':\n return ATTACHMENT_TYPE.VIDEO;\n default:\n return '';\n }\n }\n\n private getExtension(filename) {\n const parts = filename.split('.');\n\n return parts[parts.length - 1];\n }\n\n recipientSearch() {\n lastValueFrom(\n this.mailboxService.getRecipient({\n page: 1,\n page_size: 20,\n subscription_id: PermissionService.selectedSubscription?.id,\n search: this.searchText\n })\n ).then(response => {\n this.recipients = response.filter(x => x?.id !== this.currentUser?.id);\n });\n }\n\n onMemberSelection(member) {\n this.otherUser = member;\n this.router.navigate(['/message'], { fragment: member.slug });\n }\n\n onDeleteMessage(message) {\n HelperService.raiseDeletePopup().then(rep => {\n if (rep.value) {\n this.mailboxService\n .deleteMessage(this.selectedConversationId, message?.id)\n .subscribe(response => {\n if (response?.status_code === 200) {\n const createdAt = moment(message.created_at).format('YYYYMMDD');\n // eslint-disable-next-line no-restricted-syntax\n for (const property in this.messagesGroupedByDate) {\n if (property === createdAt) {\n this.messagesGroupedByDate[property] =\n this.messagesGroupedByDate[property].filter(\n x => x?.id !== message?.id\n );\n }\n }\n }\n });\n }\n });\n }\n\n private waitForJQuery(callback: () => void): void {\n let attempts = 0;\n const maxAttempts = 100; // 10 seconds max wait time\n\n const checkJQuery = () => {\n if (window['jQuery']) {\n console.log('jQuery detected, loading chat.js');\n callback();\n } else if (attempts < maxAttempts) {\n attempts++;\n setTimeout(checkJQuery, 100);\n } else {\n console.log('jQuery not available, loading it now for chatbox');\n // Load jQuery since it's needed\n this.loadJQueryForChatbox(callback);\n }\n };\n checkJQuery();\n }\n\n private loadJQueryForChatbox(callback: () => void): void {\n const jquerySrc = 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n const script = document.createElement('script');\n script.src = jquerySrc;\n script.crossOrigin = 'anonymous';\n script.async = false;\n script.onload = () => {\n console.log('jQuery loaded for chatbox');\n callback();\n };\n script.onerror = () => {\n console.error('Failed to load jQuery for chatbox');\n // Try fallback\n const fallbackScript = document.createElement('script');\n fallbackScript.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n fallbackScript.crossOrigin = 'anonymous';\n fallbackScript.async = false;\n fallbackScript.onload = () => {\n console.log('jQuery loaded from Google CDN for chatbox');\n callback();\n };\n fallbackScript.onerror = () => {\n console.error('All jQuery CDNs failed for chatbox');\n };\n document.head.appendChild(fallbackScript);\n };\n document.head.appendChild(script);\n }\n}\n","<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n <div *ngIf=\"isChatLoading\"\n class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading\">\n <div class=\"chat-sidebar float-start d-none d-sm-none d-md-block d-lg-block\">\n <div class=\"chat-sidebar-content\">\n <div class=\"chat-fixed-search p-2\">\n <div class=\"d-flex\">\n <p-autoComplete [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search a member\"\n [ngModelOptions]=\"{ standalone: true }\"\n field=\"first_name\"\n (onSelect)=\"onMemberSelection(searchText)\"\n [suggestions]=\"recipients\"\n (completeMethod)=\"recipientSearch()\">\n <ng-template let-item\n pTemplate=\"item\">\n <div>\n {{ item.first_name + ' ' }}\n {{ item.last_name ? item.last_name : '' }}\n </div>\n </ng-template>\n </p-autoComplete>\n </div>\n </div>\n\n <!-- Thread/conversation List -->\n <div id=\"users-list\"\n class=\"list-group position-relative\">\n <div class=\"users-list-padding\"\n *ngIf=\"conversations?.length\">\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\"\n *ngFor=\"let conversation of conversations\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n <ng-template [ngIf]=\"conversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar me-2\">\n <strong>{{\n conversation?.participants\n ? conversation.to?.slug.charAt(0).toUpperCase()\n : conversation.to?.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </span>\n <div class=\"clearfix\">\n <h6 class=\"list-group-item-heading mb-1\">\n {{\n conversation.to?.name\n ? conversation.to?.name\n : conversation.to?.slug\n }}\n <span class=\"font-small-3 float-end ms-5 ps-5\">\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\"\n *ngIf=\"conversation?.unread_count\">\n {{ conversation.unread_count }}\n </span>\n {{ conversation.created_at | date: 'shortTime' }}\n </span>\n </h6>\n <p class=\"list-group-item-text text-muted\">\n {{ conversation?.latest_message?.body | textTruncate: 25 }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading && conversations?.length\"\n [ngIfElse]=\"noMessage\">\n <!-- Chat Header -->\n <div class=\"chat-name p-2 bg-white\"\n *ngIf=\"otherUser\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n <ng-template [ngIf]=\"currentConversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div *ngIf=\"currentUser\"\n class=\"dummy-avatar me-2\">\n <strong>{{\n otherUser?.name\n ? otherUser.name.charAt(0).toUpperCase()\n : otherUser.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"currentUser\">\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n </ng-template>\n </div>\n </div>\n </div>\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n <div *ngIf=\"!isLoaded\"\n class=\"spinner\"></div>\n <ng-container *ngIf=\"messagesGroupedByDate\">\n <ng-container *ngFor=\"let item of ObjectKeys(messagesGroupedByDate)\">\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n <div class=\"chat\"\n [ngClass]=\"{\n 'chat-left ms-2': message.sender_id !== currentUser.id,\n 'me-2': message.sender_id === currentUser.id\n }\"\n *ngFor=\"\n let message of messagesGroupedByDate[item];\n trackBy: trackByMessageId;\n let i = index\n \">\n <ng-container *ngIf=\"message.body || message.attachment.url\">\n <div class=\"chat-avatar\">\n <a class=\"avatar\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n data-original-title=\"\">\n <!-- Setting up Avatar Image for Logged In User -->\n <ng-container *ngIf=\"message.sender_id === currentUser.id\">\n <ng-template [ngIf]=\"currentUserImg\"\n [ngIfElse]=\"curDummy\">\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n <ng-template #curDummy>\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Participant -->\n <ng-container *ngIf=\"message.sender_id !== currentUser.id\">\n <ng-template [ngIf]=\"currentUser && otherUser?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar\">\n <strong>{{\n otherUser?.name\n ? otherUser.name\n .charAt(0)\n .toUpperCase()\n : otherUser.slug\n .charAt(0)\n .toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </ng-container>\n </a>\n </div>\n <div class=\"chat-body\">\n <div class=\"chat-content attachment\"\n *ngIf=\"\n !message?.attachment?.url;\n else withAttachmentRef\n \">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n <p>{{ message.body }}</p>\n </div>\n\n <ng-template #withAttachmentRef>\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.error)=\"onDeleteMessage(message)\"\n ></i>\n <div *ngIf=\"message.attachment\"\n class=\"message-attachment\">\n <i *ngIf=\"message.attachment.url\">\n <img\n [src]=\"message.attachment.url\"\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.IMG\n \"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n <video\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.VIDEO\n \"\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n <a\n [attr.href]=\"message.attachment.url\"\n target=\"_blank\"\n >\n <i\n class=\"fa fa-file-download me-2\"\n aria-hidden=\"true\"\n ></i>\n {{\n message.attachment.url\n | common: 'filename'\n }}</a>\n </i>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!messagesGroupedByDate && isLoaded\">\n <div class=\"mt-3 text-center\">No message history.</div>\n </ng-container>\n\n <ng-container *ngIf=\"isFileUploading\">\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n </ng-container>\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n <div class=\"card px-3 py-2 m-0 mb-1\"\n *ngFor=\"let item of attachedFiles; let i = index\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji…\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <i class=\"icon-emoticon-smile\" (click)=\"showEmoji = !showEmoji\" (keydown)=\"showEmoji = !showEmoji\"></i>\n </div>\n <input type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <i class=\"fa fa-paperclip\">\n <input\n id=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n />\n </i>\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"mb-3 position-relative has-icon-left col-2 m-0 mb-1\">\n <button type=\"button\"\n class=\"btn btn-primary d-lg-flex align-items-center btn-send\"\n (click)=\"onSendMessage()\">\n <i class=\"fa fa-paper-plane\"></i><span class=\"d-none d-lg-block ms-1\">Send</span>\n </button>\n </fieldset>\n </form>\n </div>\n </ng-template>\n\n <ng-template #noMessage>\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { ChatBoxComponent } from './chatbox/chatbox.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: ChatBoxComponent,\n data: {\n title: 'Chat'\n }\n },\n {\n path: ':memberId',\n component: ChatBoxComponent,\n data: {\n title: 'Chat'\n }\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class MessageRoutingModule {}\n","import { ScrollingModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { PipesModule } from '@posiwise/pipes';\n\nimport { NgxFileDropModule } from 'ngx-file-drop';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\n\nimport { PickerModule } from '@ctrl/ngx-emoji-mart';\nimport { EmojiModule } from '@ctrl/ngx-emoji-mart/ngx-emoji';\n\nimport { ChatBoxComponent } from './chatbox/chatbox.component';\nimport { MessageRoutingModule } from './messaging-routing.module';\n\n@NgModule({\n imports: [\n CommonModule,\n PipesModule,\n FormsModule,\n MessageRoutingModule,\n ProgressSpinnerModule,\n AutoCompleteModule,\n PickerModule,\n EmojiModule,\n NgxFileDropModule,\n InfiniteScrollModule,\n ScrollingModule\n ],\n declarations: [ChatBoxComponent],\n exports: [RouterModule, ChatBoxComponent]\n})\nexport class MessagingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCM,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;IA6DlD,WACY,CAAA,KAAiB;AACR,IAAA,cAA8B,EAC9B,cAA8B,EAC9B,aAA+B,EAC/B,YAAiC,EAClD,QAAkB,EAAA;QAElB,KAAK,CAAC,QAAQ,CAAC;QAPP,IAAK,CAAA,KAAA,GAAL,KAAK;QACI,IAAc,CAAA,cAAA,GAAd,cAAc;QACd,IAAc,CAAA,cAAA,GAAd,cAAc;QACd,IAAa,CAAA,aAAA,GAAb,aAAa;QACb,IAAY,CAAA,YAAA,GAAZ,YAAY;AA1DjC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,IAAI;QAExB,IAAS,CAAA,SAAA,GAAG,KAAK;;QAYT,IAAoB,CAAA,oBAAA,GAAmB,EAAE;QACzC,IAAO,CAAA,OAAA,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X,oBAAoB;wBACpB,qBAAqB;wBACrB,kBAAkB;wBAClB,YAAY;wBACZ,WAAW;wBACX,iBAAiB;wBACjB,oBAAoB;wBACpB;AACH,qBAAA;oBACD,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB;AAC3C,iBAAA;;;ACnCD;;AAEG;;;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DoCheck, ElementRef, Injector, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
3
|
-
import { MailBoxService, ProfileService, WebsocketService } from '@posiwise/common-services';
|
|
4
|
-
import { ScriptLoaderService } from '@posiwise/common-services';
|
|
3
|
+
import { MailBoxService, ProfileService, ScriptLoaderService, WebsocketService } from '@posiwise/common-services';
|
|
5
4
|
import { ATTACHMENT_TYPE, ChatUser, Conversation } from '@posiwise/common-utilities';
|
|
6
5
|
import { MessageChatUser } from '../shared/chatbox.interface';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
@@ -49,6 +48,7 @@ export declare class ChatBoxComponent extends AppBaseComponent implements OnInit
|
|
|
49
48
|
ATTACHMENT_TYPE: typeof ATTACHMENT_TYPE;
|
|
50
49
|
constructor(elRef: ElementRef, // NOSONAR
|
|
51
50
|
mailboxService: MailBoxService, profileService: ProfileService, socketService: WebsocketService, scriptLoader: ScriptLoaderService, injector: Injector);
|
|
51
|
+
onImgError(event: Event, fallbackSrc: string): void;
|
|
52
52
|
onUp(_ev: any, conversationId: any): void;
|
|
53
53
|
ngOnInit(): void;
|
|
54
54
|
private filterConversations;
|