@posiwise/messaging-module 0.0.48 → 0.0.49

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.
@@ -436,10 +436,10 @@ export class ChatBoxComponent extends AppBaseComponent {
436
436
  }
437
437
  });
438
438
  }
439
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ChatBoxComponent, deps: [{ token: i0.ElementRef }, { token: i1.MailBoxService }, { token: i1.ProfileService }, { token: i1.WebsocketService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
440
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: ChatBoxComponent, 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=\"Type here to search 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 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 (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 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 <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\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-bown\">\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 ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\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 ></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 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 (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\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 Textbox 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\"></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 nomessage-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 in the chat search field the name of the member you\n want to send a message 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_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-dblcheck{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){.nomessage-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", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i5.AutoComplete, selector: "p-autoComplete", 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", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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" }] }); }
439
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: ChatBoxComponent, deps: [{ token: i0.ElementRef }, { token: i1.MailBoxService }, { token: i1.ProfileService }, { token: i1.WebsocketService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
440
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: ChatBoxComponent, 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=\"Type here to search 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 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 (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 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 <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\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-bown\">\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 ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\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 ></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 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 (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\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 Textbox 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\"></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 nomessage-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 in the chat search field the name of the member you\n want to send a message 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_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-dblcheck{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){.nomessage-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", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration"] }, { kind: "component", type: i5.AutoComplete, selector: "p-autoComplete", 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", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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" }] }); }
441
441
  }
442
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ChatBoxComponent, decorators: [{
442
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: ChatBoxComponent, decorators: [{
443
443
  type: Component,
444
444
  args: [{ 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=\"Type here to search 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 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 (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 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 <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\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-bown\">\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 ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\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 ></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 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 (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\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 Textbox 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\"></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 nomessage-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 in the chat search field the name of the member you\n want to send a message 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_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-dblcheck{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){.nomessage-center{margin-left:auto;width:calc(100% - 300px)}}\n"] }]
445
445
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.MailBoxService }, { type: i1.ProfileService }, { type: i1.WebsocketService }, { type: i0.Injector }], propDecorators: { messageInputRef: [{
@@ -20,11 +20,11 @@ const routes = [
20
20
  }
21
21
  ];
22
22
  export class MessageRoutingModule {
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessageRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
24
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: MessageRoutingModule, imports: [i1.RouterModule], exports: [RouterModule] }); }
25
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessageRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessageRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
24
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: MessageRoutingModule, imports: [i1.RouterModule], exports: [RouterModule] }); }
25
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessageRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
26
26
  }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessageRoutingModule, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessageRoutingModule, decorators: [{
28
28
  type: NgModule,
29
29
  args: [{
30
30
  imports: [RouterModule.forChild(routes)],
@@ -14,8 +14,8 @@ import { MessageRoutingModule } from './messaging-routing.module';
14
14
  import { PipesModule } from '@posiwise/pipes';
15
15
  import * as i0 from "@angular/core";
16
16
  export class MessagingModule {
17
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
18
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: MessagingModule, declarations: [ChatBoxComponent], imports: [CommonModule,
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
18
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: MessagingModule, declarations: [ChatBoxComponent], imports: [CommonModule,
19
19
  PipesModule,
20
20
  FormsModule,
21
21
  MessageRoutingModule,
@@ -26,7 +26,7 @@ export class MessagingModule {
26
26
  NgxFileDropModule,
27
27
  InfiniteScrollModule,
28
28
  ScrollingModule], exports: [RouterModule, ChatBoxComponent] }); }
29
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessagingModule, imports: [CommonModule,
29
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessagingModule, imports: [CommonModule,
30
30
  PipesModule,
31
31
  FormsModule,
32
32
  MessageRoutingModule,
@@ -38,7 +38,7 @@ export class MessagingModule {
38
38
  InfiniteScrollModule,
39
39
  ScrollingModule, RouterModule] }); }
40
40
  }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessagingModule, decorators: [{
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessagingModule, decorators: [{
42
42
  type: NgModule,
43
43
  args: [{
44
44
  imports: [
@@ -448,10 +448,10 @@ class ChatBoxComponent extends AppBaseComponent {
448
448
  }
449
449
  });
450
450
  }
451
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ChatBoxComponent, deps: [{ token: i0.ElementRef }, { token: i1.MailBoxService }, { token: i1.ProfileService }, { token: i1.WebsocketService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
452
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: ChatBoxComponent, 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=\"Type here to search 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 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 (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 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 <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\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-bown\">\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 ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\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 ></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 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 (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\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 Textbox 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\"></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 nomessage-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 in the chat search field the name of the member you\n want to send a message 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_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-dblcheck{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){.nomessage-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", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i5.AutoComplete, selector: "p-autoComplete", 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", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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" }] }); }
451
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: ChatBoxComponent, deps: [{ token: i0.ElementRef }, { token: i1.MailBoxService }, { token: i1.ProfileService }, { token: i1.WebsocketService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
452
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: ChatBoxComponent, 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=\"Type here to search 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 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 (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 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 <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\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-bown\">\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 ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\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 ></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 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 (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\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 Textbox 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\"></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 nomessage-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 in the chat search field the name of the member you\n want to send a message 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_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-dblcheck{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){.nomessage-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", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration"] }, { kind: "component", type: i5.AutoComplete, selector: "p-autoComplete", 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", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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" }] }); }
453
453
  }
454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ChatBoxComponent, decorators: [{
454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: ChatBoxComponent, decorators: [{
455
455
  type: Component,
456
456
  args: [{ 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=\"Type here to search 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 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 (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 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 <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\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-bown\">\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 ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\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 ></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 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 (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\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 Textbox 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\"></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 nomessage-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 in the chat search field the name of the member you\n want to send a message 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_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-dblcheck{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){.nomessage-center{margin-left:auto;width:calc(100% - 300px)}}\n"] }]
457
457
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.MailBoxService }, { type: i1.ProfileService }, { type: i1.WebsocketService }, { type: i0.Injector }], propDecorators: { messageInputRef: [{
@@ -476,11 +476,11 @@ const routes = [
476
476
  }
477
477
  ];
478
478
  class MessageRoutingModule {
479
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessageRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
480
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: MessageRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
481
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessageRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
479
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessageRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
480
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: MessageRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
481
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessageRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
482
482
  }
483
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessageRoutingModule, decorators: [{
483
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessageRoutingModule, decorators: [{
484
484
  type: NgModule,
485
485
  args: [{
486
486
  imports: [RouterModule.forChild(routes)],
@@ -489,8 +489,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImpor
489
489
  }] });
490
490
 
491
491
  class MessagingModule {
492
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
493
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: MessagingModule, declarations: [ChatBoxComponent], imports: [CommonModule,
492
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
493
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: MessagingModule, declarations: [ChatBoxComponent], imports: [CommonModule,
494
494
  PipesModule,
495
495
  FormsModule,
496
496
  MessageRoutingModule,
@@ -501,7 +501,7 @@ class MessagingModule {
501
501
  NgxFileDropModule,
502
502
  InfiniteScrollModule,
503
503
  ScrollingModule], exports: [RouterModule, ChatBoxComponent] }); }
504
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessagingModule, imports: [CommonModule,
504
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessagingModule, imports: [CommonModule,
505
505
  PipesModule,
506
506
  FormsModule,
507
507
  MessageRoutingModule,
@@ -513,7 +513,7 @@ class MessagingModule {
513
513
  InfiniteScrollModule,
514
514
  ScrollingModule, RouterModule] }); }
515
515
  }
516
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: MessagingModule, decorators: [{
516
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MessagingModule, decorators: [{
517
517
  type: NgModule,
518
518
  args: [{
519
519
  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';\nimport groupBy from 'lodash/groupBy';\nimport sortBy from 'lodash/sortBy';\nimport uniqBy from 'lodash/uniqBy';\nimport { FileSystemFileEntry } from 'ngx-file-drop';\nimport { lastValueFrom } from 'rxjs';\n\nimport { ATTACHMENT_TYPE, SOCKET_TYPE } from '@posiwise/common-utilities';\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ChatUser, Conversation } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\nimport {\n WebsocketService,\n ProfileService,\n PermissionService,\n MailBoxService\n} from '@posiwise/common-services';\nimport moment from 'moment';\n\n@Component({\n templateUrl: './chatbox.component.html',\n styleUrls: ['./chatbox.component.scss']\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: any;\n\n // logged user\n currentUser: any;\n\n currentUserImg: string;\n\n // Conversation list\n private pristineConversation: Conversation[] = [];\n\n conversations: Conversation[] = [];\n\n // Active Chat User => other participant\n otherUser: any;\n\n // Boolean to unsubscribe on Destroy\n // List of messages per conversation Id\n messagesGroupedByDate = {};\n\n private isDrift = true;\n\n searchText: string;\n\n recipients = [];\n\n files = [];\n\n private units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n\n attachedFiles: any[] = [];\n\n private initialLoad = true;\n\n private selectedIndex = 0;\n\n isChatLoading = true;\n\n private totalMessages = 0;\n\n currentPage = 1;\n\n isLoaded = true;\n\n throttle = 300;\n\n scrollUpDistance = 2;\n\n private currentThreads = [];\n\n scrollDistance = 1;\n\n ATTACHMENT_TYPE = ATTACHMENT_TYPE;\n\n constructor(\n private elRef: ElementRef,\n private mailboxService: MailBoxService,\n private profileService: ProfileService,\n private socketService: WebsocketService,\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 $.getScript('/assets/js/chat.js');\n this.listenToNewMessage();\n this.userStore().subscribe(resp => {\n this.currentUser = resp;\n if (this.currentUser) {\n this.mailboxService\n .getConversations()\n .subscribe((response: any) => {\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 }\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\n ngDoCheck() {\n // Hiding Drift messenger for Chat-box\n if (\n this.isDrift &&\n $('#drift-widget-container').length > 0 &&\n $('#drift-widget-container:visible')\n ) {\n this.isDrift = false;\n $('#drift-widget-container').hide();\n }\n }\n\n override ngOnDestroy(): void {\n $('.drift-widget-container').show();\n }\n\n private parseConversation() {\n this.conversations.forEach((element: any, 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\n ? element.from.avatar\n : '/assets/img/icons/male.png';\n }\n });\n }\n\n private activateThread() {\n setTimeout(() => {\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 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.first_name,\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 $(`.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 }, 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((result: any) => {\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 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: any) => {\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: any) => {\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 this.currentConversation['unread_count'] = 0;\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\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 $('.chat-sidebar').removeClass('d-none d-sm-none').addClass('d-block d-sm-block');\n $('.content-overlay').addClass('show');\n }\n\n trackByMessageId(_index, item) {\n return item.id;\n }\n\n private animateOnScroll() {\n setTimeout(() => {\n if ($('#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","<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=\"Type here to search 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 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 (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 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 <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\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-bown\">\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 ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\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 ></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 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 (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\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 Textbox 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\"></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 nomessage-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 in the chat search field the name of the member you\n want to send a message 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 { RouterModule } from '@angular/router';\nimport { PickerModule } from '@ctrl/ngx-emoji-mart';\nimport { EmojiModule } from '@ctrl/ngx-emoji-mart/ngx-emoji';\nimport { NgxFileDropModule } from 'ngx-file-drop';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { FormsModule } from '@angular/forms';\n\nimport { ChatBoxComponent } from './chatbox/chatbox.component';\nimport { MessageRoutingModule } from './messaging-routing.module';\nimport { PipesModule } from '@posiwise/pipes';\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BM,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;IAmElD,WACY,CAAA,KAAiB,EACjB,cAA8B,EAC9B,cAA8B,EAC9B,aAA+B,EACvC,QAAkB,EAAA;QAElB,KAAK,CAAC,QAAQ,CAAC,CAAC;QAN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,CAAA,EAAA,OAAA,EAAA,CAZ3B,YAAY;YACZ,WAAW;YACX,WAAW;YACX,oBAAoB;YACpB,qBAAqB;YACrB,kBAAkB;YAClB,YAAY;YACZ,WAAW;YACX,iBAAiB;YACjB,oBAAoB;YACpB,eAAe,CAAA,EAAA,OAAA,EAAA,CAGT,YAAY,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;AAE/B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,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,EAAA;;2FAEb,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,eAAe;AAClB,qBAAA;oBACD,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;AAC5C,iBAAA,CAAA;;;AChCD;;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';\nimport groupBy from 'lodash/groupBy';\nimport sortBy from 'lodash/sortBy';\nimport uniqBy from 'lodash/uniqBy';\nimport { FileSystemFileEntry } from 'ngx-file-drop';\nimport { lastValueFrom } from 'rxjs';\n\nimport { ATTACHMENT_TYPE, SOCKET_TYPE } from '@posiwise/common-utilities';\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ChatUser, Conversation } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\nimport {\n WebsocketService,\n ProfileService,\n PermissionService,\n MailBoxService\n} from '@posiwise/common-services';\nimport moment from 'moment';\n\n@Component({\n templateUrl: './chatbox.component.html',\n styleUrls: ['./chatbox.component.scss']\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: any;\n\n // logged user\n currentUser: any;\n\n currentUserImg: string;\n\n // Conversation list\n private pristineConversation: Conversation[] = [];\n\n conversations: Conversation[] = [];\n\n // Active Chat User => other participant\n otherUser: any;\n\n // Boolean to unsubscribe on Destroy\n // List of messages per conversation Id\n messagesGroupedByDate = {};\n\n private isDrift = true;\n\n searchText: string;\n\n recipients = [];\n\n files = [];\n\n private units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n\n attachedFiles: any[] = [];\n\n private initialLoad = true;\n\n private selectedIndex = 0;\n\n isChatLoading = true;\n\n private totalMessages = 0;\n\n currentPage = 1;\n\n isLoaded = true;\n\n throttle = 300;\n\n scrollUpDistance = 2;\n\n private currentThreads = [];\n\n scrollDistance = 1;\n\n ATTACHMENT_TYPE = ATTACHMENT_TYPE;\n\n constructor(\n private elRef: ElementRef,\n private mailboxService: MailBoxService,\n private profileService: ProfileService,\n private socketService: WebsocketService,\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 $.getScript('/assets/js/chat.js');\n this.listenToNewMessage();\n this.userStore().subscribe(resp => {\n this.currentUser = resp;\n if (this.currentUser) {\n this.mailboxService\n .getConversations()\n .subscribe((response: any) => {\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 }\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\n ngDoCheck() {\n // Hiding Drift messenger for Chat-box\n if (\n this.isDrift &&\n $('#drift-widget-container').length > 0 &&\n $('#drift-widget-container:visible')\n ) {\n this.isDrift = false;\n $('#drift-widget-container').hide();\n }\n }\n\n override ngOnDestroy(): void {\n $('.drift-widget-container').show();\n }\n\n private parseConversation() {\n this.conversations.forEach((element: any, 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\n ? element.from.avatar\n : '/assets/img/icons/male.png';\n }\n });\n }\n\n private activateThread() {\n setTimeout(() => {\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 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.first_name,\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 $(`.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 }, 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((result: any) => {\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 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: any) => {\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: any) => {\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 this.currentConversation['unread_count'] = 0;\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\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 $('.chat-sidebar').removeClass('d-none d-sm-none').addClass('d-block d-sm-block');\n $('.content-overlay').addClass('show');\n }\n\n trackByMessageId(_index, item) {\n return item.id;\n }\n\n private animateOnScroll() {\n setTimeout(() => {\n if ($('#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","<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=\"Type here to search 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 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 (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 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 <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\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-bown\">\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 ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\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 ></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 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 (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\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 Textbox 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\"></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 nomessage-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 in the chat search field the name of the member you\n want to send a message 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 { RouterModule } from '@angular/router';\nimport { PickerModule } from '@ctrl/ngx-emoji-mart';\nimport { EmojiModule } from '@ctrl/ngx-emoji-mart/ngx-emoji';\nimport { NgxFileDropModule } from 'ngx-file-drop';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { FormsModule } from '@angular/forms';\n\nimport { ChatBoxComponent } from './chatbox/chatbox.component';\nimport { MessageRoutingModule } from './messaging-routing.module';\nimport { PipesModule } from '@posiwise/pipes';\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BM,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;IAmElD,WACY,CAAA,KAAiB,EACjB,cAA8B,EAC9B,cAA8B,EAC9B,aAA+B,EACvC,QAAkB,EAAA;QAElB,KAAK,CAAC,QAAQ,CAAC,CAAC;QANR,IAAK,CAAA,KAAA,GAAL,KAAK,CAAY;QACjB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;QAC9B,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;QAC9B,IAAa,CAAA,aAAA,GAAb,aAAa,CAAkB;AA/D3C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;QAEzB,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;;QAYV,IAAoB,CAAA,oBAAA,GAAmB,EAAE,CAAC;QAElD,IAAa,CAAA,aAA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A,QAAA,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,EAAA;;2FAEb,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,eAAe;AAClB,qBAAA;oBACD,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;AAC5C,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posiwise/messaging-module",
3
- "version": "0.0.48",
3
+ "version": "0.0.49",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "17.2.2",
6
6
  "@angular/core": "17.2.2",