@posiwise/messaging-module 0.0.96 → 0.0.98

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.
@@ -23,12 +23,12 @@ import { AppBaseComponent } from '@posiwise/app-base-component';
23
23
  import * as i1 from '@posiwise/common-services';
24
24
  import { PermissionService } from '@posiwise/common-services';
25
25
  import { ATTACHMENT_TYPE, ChatUser, Conversation, SOCKET_TYPE } from '@posiwise/common-utilities';
26
- import * as i2 from '@posiwise/shared-components';
27
26
  import groupBy from 'lodash/groupBy';
28
27
  import sortBy from 'lodash/sortBy';
29
28
  import uniqBy from 'lodash/uniqBy';
30
29
  import moment from 'moment';
31
30
  import { lastValueFrom } from 'rxjs';
31
+ import * as i2 from '@posiwise/shared-components';
32
32
  import * as i6 from 'primeng/api';
33
33
 
34
34
  class ChatBoxComponent extends AppBaseComponent {
@@ -85,7 +85,7 @@ class ChatBoxComponent extends AppBaseComponent {
85
85
  }
86
86
  ngOnInit() {
87
87
  this.waitForJQuery(() => {
88
- this.scriptLoader.loadScript('head', '/assets/js/chat.js', true);
88
+ this.scriptLoader.loadScriptOnce('head', '/assets/js/chat.js');
89
89
  });
90
90
  this.listenToNewMessage();
91
91
  this.subscriptionId = PermissionService.selectedSubscription?.id;
@@ -216,7 +216,7 @@ class ChatBoxComponent extends AppBaseComponent {
216
216
  // now you can simply get your elements with their class name
217
217
  const allAnchors = hElement.getElementsByClassName('list-group-item');
218
218
  // do something with selected elements
219
- [].forEach.call(allAnchors, (item) => {
219
+ Array.from(allAnchors).forEach((item) => {
220
220
  item.setAttribute('class', 'list-group-item no-border');
221
221
  });
222
222
  const index = this.conversations.findIndex(x => x?.to?.id === this.otherUser?.id) || 0;
@@ -279,7 +279,7 @@ class ChatBoxComponent extends AppBaseComponent {
279
279
  if (response) {
280
280
  this.totalMessages = response.object_count;
281
281
  this.currentThreads = response.messages;
282
- const ifExist = this.conversations.find(x => x?.id === response?.id);
282
+ const ifExist = this.conversations.some(x => x?.id === response?.id);
283
283
  if (!ifExist) {
284
284
  this.conversations.find(x => x?.id === null).id = response?.id;
285
285
  }
@@ -534,6 +534,8 @@ class ChatBoxComponent extends AppBaseComponent {
534
534
  // Try fallback
535
535
  const fallbackScript = document.createElement('script');
536
536
  fallbackScript.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js';
537
+ fallbackScript.integrity =
538
+ 'sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK';
537
539
  fallbackScript.crossOrigin = 'anonymous';
538
540
  fallbackScript.async = false;
539
541
  fallbackScript.onload = () => {
@@ -547,12 +549,12 @@ class ChatBoxComponent extends AppBaseComponent {
547
549
  };
548
550
  document.head.appendChild(script);
549
551
  }
550
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ChatBoxComponent, deps: [{ token: i0.ElementRef }, { token: i1.MailBoxService }, { token: i1.ProfileService }, { token: i1.WebsocketService }, { token: i1.ScriptLoaderService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: i2.ConfirmDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
551
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ChatBoxComponent, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "messageInputRef", first: true, predicate: ["messageInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n @if (isChatLoading) {\n <div class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n }\n\n @if (!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 appendTo=\"body\" inputId=\"chatbox-search-member\"\n [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search members...\"\n [ngModelOptions]=\"{ standalone: true }\"\n optionLabel=\"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 @if (conversations?.length) {\n <div class=\"users-list-padding\">\n @for (conversation of conversations; track trackConversationKey(conversation)) {\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n @if (conversation?.to?.avatar) {\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n } @else {\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 }\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 @if (conversation?.unread_count) {\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\">\n {{ conversation.unread_count }}\n </span>\n }\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 }\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (conversations?.length) {\n <!-- Chat Header -->\n @if (otherUser) {\n <div class=\"chat-name p-2 bg-white\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n @if (currentConversation?.to?.avatar) {\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\" />\n } @else {\n @if (currentUser) {\n <div 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 }\n }\n\n @if (currentUser) {\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n @if (!isLoaded) {\n <div class=\"spinner\"></div>\n }\n @if (messagesGroupedByDate) {\n @for (item of ObjectKeys(messagesGroupedByDate); track item) {\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n @for (message of messagesGroupedByDate[item]; track message.id) {\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 @if (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 @if (message.sender_id === currentUser.id) {\n @if (currentUserImg) {\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n }\n }\n\n <!-- Participant -->\n @if (message.sender_id !== currentUser.id) {\n @if (currentUser && otherUser?.avatar) {\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\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 }\n }\n </a>\n </div>\n <div class=\"chat-body\">\n @if (!message?.attachment?.url) {\n <div class=\"chat-content attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.sender_id === currentUser.id && message.is_open) {\n <i\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n }\n <p>{{ message.body }}</p>\n </div>\n } @else {\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.attachment) {\n <div class=\"message-attachment\">\n <i>\n @if (message?.messageType === ATTACHMENT_TYPE.IMG) {\n <img\n [src]=\"message.attachment.url\"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n }\n @if (message?.messageType === ATTACHMENT_TYPE.VIDEO) {\n <video\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n }\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 }\n </div>\n }\n </div>\n }\n </div>\n }\n }\n }\n\n @if (!messagesGroupedByDate && isLoaded) {\n <div class=\"mt-3 text-center\">No message history.</div>\n }\n\n @if (isFileUploading) {\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n }\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n @for (item of attachedFiles; track $index) {\n <div class=\"card px-3 py-2 m-0 mb-1\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <button type=\"button\" class=\"emoji-toggle-btn\" aria-label=\"Insert emoji\" (click)=\"showEmoji = !showEmoji\">\uD83D\uDE42</button>\n </div>\n <label for=\"chatbox-message-input\" class=\"visually-hidden\">Type your message</label>\n <input type=\"text\"\n id=\"chatbox-message-input\"\n name=\"chatbox-message-input\"\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 <span class=\"visually-hidden\">Attach file</span>\n <i class=\"fa fa-paperclip\" aria-hidden=\"true\"></i>\n <input\n id=\"file-input\"\n name=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\" />\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 } @else {\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n }\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}:host ::ng-deep .chat-application{height:calc(100vh - 92px);position:relative}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.emoji-toggle-btn{background:transparent;border:0;color:#676767;cursor:pointer;font-size:20px;line-height:1;padding:4px 6px}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-double-check{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media(min-width:768px){.no-message-center{margin-left:auto;width:calc(100% - 300px)}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i8.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: i9.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: i3.DatePipe, name: "date" }, { kind: "pipe", type: i10.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i10.CommonPipe, name: "common" }] }); }
552
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ChatBoxComponent, deps: [{ token: i0.ElementRef }, { token: i1.MailBoxService }, { token: i1.ProfileService }, { token: i1.WebsocketService }, { token: i1.ScriptLoaderService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: i2.ConfirmDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
553
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: ChatBoxComponent, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "messageInputRef", first: true, predicate: ["messageInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n @if (isChatLoading) {\n <div class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n }\n\n @if (!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 appendTo=\"body\" inputId=\"chatbox-search-member\"\n [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search members...\"\n [ngModelOptions]=\"{ standalone: true }\"\n optionLabel=\"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 @if (conversations?.length) {\n <div class=\"users-list-padding\">\n @for (conversation of conversations; track trackConversationKey(conversation)) {\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n @if (conversation?.to?.avatar) {\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n } @else {\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 }\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 @if (conversation?.unread_count) {\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\">\n {{ conversation.unread_count }}\n </span>\n }\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 }\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (conversations?.length) {\n <!-- Chat Header -->\n @if (otherUser) {\n <div class=\"chat-name p-2 bg-white\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n @if (currentConversation?.to?.avatar) {\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\" />\n } @else {\n @if (currentUser) {\n <div 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 }\n }\n\n @if (currentUser) {\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n @if (!isLoaded) {\n <div class=\"spinner\"></div>\n }\n @if (messagesGroupedByDate) {\n @for (item of ObjectKeys(messagesGroupedByDate); track item) {\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n @for (message of messagesGroupedByDate[item]; track message.id) {\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 @if (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 @if (message.sender_id === currentUser.id) {\n @if (currentUserImg) {\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n }\n }\n\n <!-- Participant -->\n @if (message.sender_id !== currentUser.id) {\n @if (currentUser && otherUser?.avatar) {\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\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 }\n }\n </a>\n </div>\n <div class=\"chat-body\">\n @if (!message?.attachment?.url) {\n <div class=\"chat-content attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.sender_id === currentUser.id && message.is_open) {\n <i\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n }\n <p>{{ message.body }}</p>\n </div>\n } @else {\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.attachment) {\n <div class=\"message-attachment\">\n <i>\n @if (message?.messageType === ATTACHMENT_TYPE.IMG) {\n <img\n [src]=\"message.attachment.url\"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n }\n @if (message?.messageType === ATTACHMENT_TYPE.VIDEO) {\n <video\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n }\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 }\n </div>\n }\n </div>\n }\n </div>\n }\n }\n }\n\n @if (!messagesGroupedByDate && isLoaded) {\n <div class=\"mt-3 text-center\">No message history.</div>\n }\n\n @if (isFileUploading) {\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n }\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n @for (item of attachedFiles; track $index) {\n <div class=\"card px-3 py-2 m-0 mb-1\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <button type=\"button\" class=\"emoji-toggle-btn\" aria-label=\"Insert emoji\" (click)=\"showEmoji = !showEmoji\">\uD83D\uDE42</button>\n </div>\n <label for=\"chatbox-message-input\" class=\"visually-hidden\">Type your message</label>\n <input type=\"text\"\n id=\"chatbox-message-input\"\n name=\"chatbox-message-input\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput\n aria-label=\"Type your message here...\" />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <span class=\"visually-hidden\">Attach file</span>\n <i class=\"fa fa-paperclip\" aria-hidden=\"true\"></i>\n <input\n id=\"file-input\"\n name=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n aria-label=\"File Input\" />\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 } @else {\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n }\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}:host ::ng-deep .chat-application{height:calc(100vh - 92px);position:relative}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.emoji-toggle-btn{background:transparent;border:0;color:#676767;cursor:pointer;font-size:20px;line-height:1;padding:4px 6px}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-double-check{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media(min-width:768px){.no-message-center{margin-left:auto;width:calc(100% - 300px)}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i8.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: i9.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: i3.DatePipe, name: "date" }, { kind: "pipe", type: i10.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i10.CommonPipe, name: "common" }] }); }
552
554
  }
553
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ChatBoxComponent, decorators: [{
555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ChatBoxComponent, decorators: [{
554
556
  type: Component,
555
- args: [{ standalone: false, template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n @if (isChatLoading) {\n <div class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n }\n\n @if (!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 appendTo=\"body\" inputId=\"chatbox-search-member\"\n [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search members...\"\n [ngModelOptions]=\"{ standalone: true }\"\n optionLabel=\"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 @if (conversations?.length) {\n <div class=\"users-list-padding\">\n @for (conversation of conversations; track trackConversationKey(conversation)) {\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n @if (conversation?.to?.avatar) {\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n } @else {\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 }\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 @if (conversation?.unread_count) {\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\">\n {{ conversation.unread_count }}\n </span>\n }\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 }\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (conversations?.length) {\n <!-- Chat Header -->\n @if (otherUser) {\n <div class=\"chat-name p-2 bg-white\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n @if (currentConversation?.to?.avatar) {\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\" />\n } @else {\n @if (currentUser) {\n <div 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 }\n }\n\n @if (currentUser) {\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n @if (!isLoaded) {\n <div class=\"spinner\"></div>\n }\n @if (messagesGroupedByDate) {\n @for (item of ObjectKeys(messagesGroupedByDate); track item) {\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n @for (message of messagesGroupedByDate[item]; track message.id) {\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 @if (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 @if (message.sender_id === currentUser.id) {\n @if (currentUserImg) {\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n }\n }\n\n <!-- Participant -->\n @if (message.sender_id !== currentUser.id) {\n @if (currentUser && otherUser?.avatar) {\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\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 }\n }\n </a>\n </div>\n <div class=\"chat-body\">\n @if (!message?.attachment?.url) {\n <div class=\"chat-content attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.sender_id === currentUser.id && message.is_open) {\n <i\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n }\n <p>{{ message.body }}</p>\n </div>\n } @else {\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.attachment) {\n <div class=\"message-attachment\">\n <i>\n @if (message?.messageType === ATTACHMENT_TYPE.IMG) {\n <img\n [src]=\"message.attachment.url\"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n }\n @if (message?.messageType === ATTACHMENT_TYPE.VIDEO) {\n <video\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n }\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 }\n </div>\n }\n </div>\n }\n </div>\n }\n }\n }\n\n @if (!messagesGroupedByDate && isLoaded) {\n <div class=\"mt-3 text-center\">No message history.</div>\n }\n\n @if (isFileUploading) {\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n }\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n @for (item of attachedFiles; track $index) {\n <div class=\"card px-3 py-2 m-0 mb-1\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <button type=\"button\" class=\"emoji-toggle-btn\" aria-label=\"Insert emoji\" (click)=\"showEmoji = !showEmoji\">\uD83D\uDE42</button>\n </div>\n <label for=\"chatbox-message-input\" class=\"visually-hidden\">Type your message</label>\n <input type=\"text\"\n id=\"chatbox-message-input\"\n name=\"chatbox-message-input\"\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 <span class=\"visually-hidden\">Attach file</span>\n <i class=\"fa fa-paperclip\" aria-hidden=\"true\"></i>\n <input\n id=\"file-input\"\n name=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\" />\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 } @else {\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n }\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}:host ::ng-deep .chat-application{height:calc(100vh - 92px);position:relative}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.emoji-toggle-btn{background:transparent;border:0;color:#676767;cursor:pointer;font-size:20px;line-height:1;padding:4px 6px}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-double-check{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media(min-width:768px){.no-message-center{margin-left:auto;width:calc(100% - 300px)}}\n"] }]
557
+ args: [{ standalone: false, template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n @if (isChatLoading) {\n <div class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n }\n\n @if (!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 appendTo=\"body\" inputId=\"chatbox-search-member\"\n [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search members...\"\n [ngModelOptions]=\"{ standalone: true }\"\n optionLabel=\"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 @if (conversations?.length) {\n <div class=\"users-list-padding\">\n @for (conversation of conversations; track trackConversationKey(conversation)) {\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n @if (conversation?.to?.avatar) {\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n } @else {\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 }\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 @if (conversation?.unread_count) {\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\">\n {{ conversation.unread_count }}\n </span>\n }\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 }\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (conversations?.length) {\n <!-- Chat Header -->\n @if (otherUser) {\n <div class=\"chat-name p-2 bg-white\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n @if (currentConversation?.to?.avatar) {\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\" />\n } @else {\n @if (currentUser) {\n <div 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 }\n }\n\n @if (currentUser) {\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n @if (!isLoaded) {\n <div class=\"spinner\"></div>\n }\n @if (messagesGroupedByDate) {\n @for (item of ObjectKeys(messagesGroupedByDate); track item) {\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n @for (message of messagesGroupedByDate[item]; track message.id) {\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 @if (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 @if (message.sender_id === currentUser.id) {\n @if (currentUserImg) {\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n }\n }\n\n <!-- Participant -->\n @if (message.sender_id !== currentUser.id) {\n @if (currentUser && otherUser?.avatar) {\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\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 }\n }\n </a>\n </div>\n <div class=\"chat-body\">\n @if (!message?.attachment?.url) {\n <div class=\"chat-content attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.sender_id === currentUser.id && message.is_open) {\n <i\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n }\n <p>{{ message.body }}</p>\n </div>\n } @else {\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.attachment) {\n <div class=\"message-attachment\">\n <i>\n @if (message?.messageType === ATTACHMENT_TYPE.IMG) {\n <img\n [src]=\"message.attachment.url\"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n }\n @if (message?.messageType === ATTACHMENT_TYPE.VIDEO) {\n <video\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n }\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 }\n </div>\n }\n </div>\n }\n </div>\n }\n }\n }\n\n @if (!messagesGroupedByDate && isLoaded) {\n <div class=\"mt-3 text-center\">No message history.</div>\n }\n\n @if (isFileUploading) {\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n }\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n @for (item of attachedFiles; track $index) {\n <div class=\"card px-3 py-2 m-0 mb-1\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <button type=\"button\" class=\"emoji-toggle-btn\" aria-label=\"Insert emoji\" (click)=\"showEmoji = !showEmoji\">\uD83D\uDE42</button>\n </div>\n <label for=\"chatbox-message-input\" class=\"visually-hidden\">Type your message</label>\n <input type=\"text\"\n id=\"chatbox-message-input\"\n name=\"chatbox-message-input\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput\n aria-label=\"Type your message here...\" />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <span class=\"visually-hidden\">Attach file</span>\n <i class=\"fa fa-paperclip\" aria-hidden=\"true\"></i>\n <input\n id=\"file-input\"\n name=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n aria-label=\"File Input\" />\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 } @else {\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n }\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}:host ::ng-deep .chat-application{height:calc(100vh - 92px);position:relative}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.emoji-toggle-btn{background:transparent;border:0;color:#676767;cursor:pointer;font-size:20px;line-height:1;padding:4px 6px}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-double-check{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media(min-width:768px){.no-message-center{margin-left:auto;width:calc(100% - 300px)}}\n"] }]
556
558
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.MailBoxService }, { type: i1.ProfileService }, { type: i1.WebsocketService }, { type: i1.ScriptLoaderService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: i2.ConfirmDialogService }], propDecorators: { messageInputRef: [{
557
559
  type: ViewChild,
558
560
  args: ['messageInput', { static: false }]
@@ -575,11 +577,11 @@ const routes = [
575
577
  }
576
578
  ];
577
579
  class MessageRoutingModule {
578
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: MessageRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
579
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: MessageRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
580
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: MessageRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
580
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MessageRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
581
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: MessageRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
582
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MessageRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
581
583
  }
582
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: MessageRoutingModule, decorators: [{
584
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MessageRoutingModule, decorators: [{
583
585
  type: NgModule,
584
586
  args: [{
585
587
  imports: [RouterModule.forChild(routes)],
@@ -588,8 +590,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
588
590
  }] });
589
591
 
590
592
  class MessagingModule {
591
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: MessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
592
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: MessagingModule, declarations: [ChatBoxComponent], imports: [CommonModule,
593
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
594
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: MessagingModule, declarations: [ChatBoxComponent], imports: [CommonModule,
593
595
  PipesModule,
594
596
  FormsModule,
595
597
  MessageRoutingModule,
@@ -600,7 +602,7 @@ class MessagingModule {
600
602
  NgxFileDropModule,
601
603
  InfiniteScrollModule,
602
604
  ScrollingModule], exports: [RouterModule, ChatBoxComponent] }); }
603
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: MessagingModule, imports: [CommonModule,
605
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MessagingModule, imports: [CommonModule,
604
606
  PipesModule,
605
607
  FormsModule,
606
608
  MessageRoutingModule,
@@ -612,7 +614,7 @@ class MessagingModule {
612
614
  InfiniteScrollModule,
613
615
  ScrollingModule, RouterModule] }); }
614
616
  }
615
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: MessagingModule, decorators: [{
617
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MessagingModule, decorators: [{
616
618
  type: NgModule,
617
619
  args: [{
618
620
  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 ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport {\n MailBoxService,\n PermissionService,\n ProfileService,\n ScriptLoaderService,\n WebsocketService\n} from '@posiwise/common-services';\nimport { ATTACHMENT_TYPE, ChatUser, Conversation, SOCKET_TYPE } from '@posiwise/common-utilities';\nimport { ConfirmDialogService } from '@posiwise/shared-components';\n\nimport groupBy from 'lodash/groupBy';\nimport sortBy from 'lodash/sortBy';\nimport uniqBy from 'lodash/uniqBy';\nimport moment from 'moment';\nimport { FileSystemFileEntry } from 'ngx-file-drop';\nimport { lastValueFrom } from 'rxjs';\n\nimport { ExtendedConversation, MessageChatUser } from '../shared/chatbox.interface';\n\n@Component({\n templateUrl: './chatbox.component.html',\n styleUrls: ['./chatbox.component.scss'],\n\n standalone: false\n})\nexport class ChatBoxComponent extends AppBaseComponent implements OnInit, OnDestroy, DoCheck {\n // Message Box Template Ref\n @ViewChild('messageInput', { static: false })\n messageInputRef: ElementRef;\n\n // File Upload Progress spinner\n isFileUploading: boolean;\n\n ObjectKeys = Object.keys;\n\n showEmoji = false;\n\n selectedConversationId: number;\n\n currentConversation: Conversation;\n\n // logged user\n currentUser: MessageChatUser;\n\n currentUserImg: string;\n\n // Conversation list\n private pristineConversation: Conversation[] = [];\n private isDrift = true;\n private readonly units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n private initialLoad = true;\n private selectedIndex = 0;\n private totalMessages = 0;\n private currentThreads = [];\n\n conversations: Conversation[] = [];\n\n // Active Chat User => other participant\n otherUser: ChatUser;\n\n // Boolean to unsubscribe on Destroy\n // List of messages per conversation Id\n messagesGroupedByDate = {};\n\n searchText: string;\n\n recipients = [];\n\n files = [];\n\n attachedFiles: { name: string; size: string }[] = [];\n\n isChatLoading = true;\n\n currentPage = 1;\n\n isLoaded = true;\n\n throttle = 300;\n\n scrollUpDistance = 2;\n\n scrollDistance = 1;\n subscriptionId: number;\n ATTACHMENT_TYPE = ATTACHMENT_TYPE;\n\n constructor(\n private elRef: ElementRef, // NOSONAR\n private readonly mailboxService: MailBoxService,\n private readonly profileService: ProfileService,\n private readonly socketService: WebsocketService,\n private readonly scriptLoader: ScriptLoaderService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n }\n\n onImgError(event: Event, fallbackSrc: string): void {\n const img = event.target as HTMLImageElement | null;\n if (!img) return;\n if (img.src?.endsWith(fallbackSrc)) return;\n img.src = fallbackSrc;\n }\n\n onUp(_ev, conversationId) {\n this.currentPage++;\n const totalPages = Math.ceil(this.totalMessages / 10);\n // Prevent API call if all messages have been fetched\n if (this.currentPage <= totalPages) {\n this.loadMore(conversationId, this.currentPage);\n }\n }\n\n ngOnInit() {\n this.waitForJQuery(() => {\n this.scriptLoader.loadScript('head', '/assets/js/chat.js', true);\n });\n this.listenToNewMessage();\n this.subscriptionId = PermissionService.selectedSubscription?.id;\n this.userStore().subscribe(resp => {\n this.currentUser = resp;\n if (this.currentUser) {\n this.mailboxService\n .getConversations()\n .subscribe((response: ExtendedConversation[]) => {\n if (response?.length) {\n let raw;\n if (this.conversations.length > 0) {\n raw = this.conversations.find(x => x?.id === null);\n }\n response.forEach(x => {\n x.datetime = x.latest_message.created_at;\n });\n const chats = sortBy(response, 'datetime').reverse();\n this.pristineConversation = chats;\n this.conversations = [...chats];\n\n if (raw) {\n this.conversations.unshift(raw);\n }\n\n this.parseConversation();\n setTimeout(() => this.filterConversations());\n }\n\n if (this.initialLoad) {\n this.checkIfNewConversation();\n } else {\n this.activateThread();\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isChatLoading = false;\n this.initialLoad = false;\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n }\n private filterConversations(): void {\n this.conversations = this.conversations.filter(conversation => conversation.to);\n }\n ngDoCheck() {\n // Hiding Drift messenger for Chat-box (Drift service shut down - kept for future chat widget alternative)\n if (window['jQuery'] && this.isDrift) {\n if ($('#drift-widget-container').length > 0 && $('#drift-widget-container:visible')) {\n this.isDrift = false;\n $('#drift-widget-container').hide();\n }\n }\n }\n\n override ngOnDestroy(): void {\n if (window['jQuery']) {\n $('.drift-widget-container').show();\n }\n }\n\n private parseConversation() {\n this.conversations.forEach((element: Conversation, index) => {\n element.to = element.participants.find(x => x?.id !== this.currentUser?.id);\n element.from = element.participants.find(x => x?.id === this.currentUser?.id);\n if (index === 0) {\n this.currentUserImg = element.from?.avatar ?? '/assets/img/icons/male.png';\n }\n });\n }\n\n private activateThread() {\n setTimeout(() => {\n if (window['jQuery']) {\n const selector = `.list-group-item:nth-child(${this.selectedIndex + 1})`;\n $(selector)\n .removeClass('no-border')\n .addClass(\n 'list-group-item bg-blue-grey bg-lighten-5 border-right-primary border-right-2'\n );\n }\n });\n }\n\n private checkIfNewConversation() {\n this.route.fragment.subscribe((fragment: string) => {\n if (fragment) {\n // Check for existing conversation\n const existingConversation = this.conversations.find(x => x.to?.slug === fragment);\n if (existingConversation) {\n this.otherUser = existingConversation.to;\n // sets the active tab when navigate to chat page\n this.setActive(existingConversation);\n } else {\n this.newParticipant(fragment);\n }\n } else if (this.conversations.length > 0) {\n this.router.navigate(['/message'], { fragment: this.conversations[0].to?.slug });\n }\n this.cdr.markForCheck();\n });\n }\n\n onParticipantClick(conversation) {\n this.otherUser = conversation.participants.find(x => x?.id !== this.currentUser?.id);\n const slug = this.otherUser?.slug;\n this.clearUnreadCount();\n this.router.navigate(['/message'], { fragment: slug });\n }\n\n private newParticipant(slug) {\n this.profileService.getUserProfile(slug).subscribe(response => {\n this.otherUser = response;\n\n const to = new ChatUser(\n response?.id,\n response?.first_name,\n response?.slug,\n response?.email,\n response?.avatar ? response?.avatar[0]?.url : '',\n new Date()\n );\n\n const from = new ChatUser(\n this.currentUser?.id,\n this.currentUser?.firstName,\n this.currentUser?.slug,\n this.currentUser?.email,\n this.currentUser?.avatar\n ? this.currentUser?.avatar[0].url\n : '/assets/img/icons/male.png',\n new Date()\n );\n\n const newConversation = new Conversation(\n null,\n 1,\n null,\n 'chat',\n [to, from],\n null,\n 0,\n from,\n to\n );\n\n this.conversations.unshift(newConversation);\n this.setActive(this.conversations[0]);\n this.cdr.markForCheck();\n });\n }\n\n // chat user list click event function\n private setActive(conversation) {\n this.currentPage = 0;\n this.currentThreads = [];\n this.totalMessages = 0;\n this.otherUser = conversation.participants.find(x => x?.id !== this.currentUser?.id);\n\n this.selectedConversationId = conversation?.id;\n this.currentConversation = conversation;\n\n const hElement: HTMLElement = this.elRef.nativeElement;\n // now you can simply get your elements with their class name\n const allAnchors = hElement.getElementsByClassName('list-group-item');\n // do something with selected elements\n [].forEach.call(allAnchors, (item: HTMLElement) => {\n item.setAttribute('class', 'list-group-item no-border');\n });\n\n const index = this.conversations.findIndex(x => x?.to?.id === this.otherUser?.id) || 0;\n setTimeout(() => {\n if (window['jQuery']) {\n $(`.list-group-item:nth-child(${index + 1})`)\n .removeClass('no-border')\n .addClass(\n 'list-group-item bg-blue-grey bg-lighten-5 border-right-primary border-right-2'\n );\n this.selectedIndex = $('.list-group-item.border-right-2').index();\n }\n }, 500);\n\n this.markAsRead(conversation?.id);\n this.getMessage(conversation?.id);\n }\n\n search(searchTxt) {\n if (searchTxt?.value?.length > 2) {\n this.conversations = this.pristineConversation.filter(\n x => x.to.slug.includes(searchTxt.value) ?? x.to?.email.includes(searchTxt.value)\n );\n } else {\n this.conversations = this.pristineConversation;\n }\n }\n\n // Socket For Listening to new Message\n private listenToNewMessage() {\n this.socketService.webSocket$.subscribe(\n (result: {\n event: string;\n new_conversation: string;\n data: {\n formattedDate: string;\n created_at: string;\n conversation_id: number;\n };\n id: number;\n }) => {\n if (result.event === SOCKET_TYPE.MSG) {\n if (result?.new_conversation === 'false') {\n const newMessage = result?.data;\n newMessage.formattedDate = moment(new Date(newMessage.created_at)).format(\n 'YYYYMMDD'\n );\n\n // Append the new message to conversation\n const conversation = this.conversations.find(x => x?.id === result?.id);\n if (conversation) {\n conversation.latest_message = result.data;\n conversation.created_at = newMessage.created_at;\n conversation.unread_count += 1;\n }\n\n if (\n newMessage.conversation_id === this.selectedConversationId &&\n newMessage.formattedDate in this.messagesGroupedByDate\n ) {\n this.messagesGroupedByDate[newMessage.formattedDate].push(newMessage);\n this.animateOnScroll();\n }\n } else if (result && typeof result.new_conversation === 'object') {\n this.conversations.unshift(result.new_conversation);\n this.parseConversation();\n }\n }\n this.cdr.markForCheck();\n }\n );\n }\n\n getMessage(messageId, reload = true) {\n if (reload) {\n this.messagesGroupedByDate = null;\n }\n if (messageId) {\n this.isLoaded = false;\n\n this.mailboxService\n .getMessages(messageId)\n .subscribe(response => {\n if (response) {\n this.totalMessages = response.object_count;\n this.currentThreads = response.messages;\n const ifExist = this.conversations.find(x => x?.id === response?.id);\n if (!ifExist) {\n this.conversations.find(x => x?.id === null).id = response?.id;\n }\n\n const messages = sortBy(response.messages, 'created_at');\n\n messages.forEach(msg => {\n msg.messageType = msg.attachment.url\n ? this.getMessageType(msg.attachment.url)\n : null;\n });\n this.messagesGroupedByDate = groupBy(messages, (o: Conversation) => {\n return moment(o.created_at).format('YYYYMMDD');\n });\n\n // Append the latest message to conversation list\n const current = this.conversations.find(\n x => x?.id === response?.id\n ).latest_message;\n if (current) {\n current.body = response.messages[0].body;\n current.created_at = response.messages[0].created_at;\n }\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isChatLoading = false;\n this.isLoaded = true;\n this.animateOnScroll();\n this.cdr.markForCheck();\n });\n }\n }\n\n private loadMore(conversationId, pageNumber, pageSize = 10) {\n this.mailboxService\n .getMessages(conversationId, pageNumber, pageSize)\n .subscribe(response => {\n if (response) {\n this.currentThreads = uniqBy(\n this.currentThreads.concat(response.messages),\n 'id'\n );\n const messages = sortBy(this.currentThreads, 'created_at');\n this.messagesGroupedByDate = groupBy(messages, (o: Conversation) => {\n return moment(o.created_at).format('YYYYMMDD');\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n private clearUnreadCount() {\n this.mailboxService.decrementUnreadCount(this.currentConversation?.unread_count);\n if (this.currentConversation?.['unread_count']) {\n this.currentConversation['unread_count'] = 0;\n }\n }\n\n onSendMessage() {\n const text = this.messageInputRef.nativeElement.value;\n const formData = new FormData();\n formData.append('to', this.otherUser?.email);\n formData.append('message', text);\n formData.append('type', '1');\n formData.append('subscription_id', `${this.subscriptionId}`);\n\n if (this.files?.length) {\n this.isFileUploading = true;\n formData.append('file', this.files[0], this.files[0].name);\n }\n\n if (text || this.files.length > 0) {\n this.mailboxService\n .postMessage(formData)\n .subscribe(response => {\n this.files = [];\n this.attachedFiles = [];\n this.messageInputRef.nativeElement.value = '';\n this.messageInputRef.nativeElement.focus();\n this.getMessage(response.conversation_id, false);\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isFileUploading = false;\n this.cdr.markForCheck();\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 this.cdr.markForCheck();\n });\n }\n }\n\n private transform(bytes = 0, precision = 2) {\n // eslint-disable-next-line no-restricted-globals\n if (Number.isNaN(Number.parseFloat(String(bytes))) || !Number.isFinite(bytes)) {\n return '?';\n }\n let unit = 0;\n\n while (bytes >= 1024) {\n bytes /= 1024;\n unit++;\n }\n\n return `${bytes.toFixed(+precision)} ${this.units[unit]}`;\n }\n\n dropped(files) {\n // eslint-disable-next-line no-restricted-syntax\n for (const droppedFile of files) {\n // Is it a file?\n if (droppedFile.fileEntry.isFile) {\n const fileEntry = droppedFile.fileEntry as FileSystemFileEntry;\n fileEntry.file((file: File) => {\n this.files.push(file);\n this.attachedFiles.push({\n name: file.name,\n size: this.transform(Number(file.size))\n });\n });\n }\n }\n }\n\n onRemoveAttachment(item) {\n this.files = this.files.filter(x => x.name !== item.name);\n this.attachedFiles = this.attachedFiles.filter(x => x.name !== item.name);\n }\n\n fileOver(_event) {\n console.log();\n }\n\n onEmojiSelect($event) {\n this.messageInputRef.nativeElement.value += $event.emoji.native;\n this.showEmoji = false;\n }\n\n fileChangeListener($event) {\n const file: File = $event.target.files[0];\n this.files.push(file);\n this.attachedFiles.push({\n name: file.name,\n size: this.transform(Number(file.size / 1024))\n });\n }\n\n toggleSidebar() {\n if (window['jQuery']) {\n $('.chat-sidebar').removeClass('d-none d-sm-none').addClass('d-block d-sm-block');\n $('.content-overlay').addClass('show');\n }\n }\n\n trackByMessageId(_index, item) {\n return item?.id;\n }\n\n trackConversationKey(conversation: Conversation): string | number {\n return conversation?.id ?? conversation?.to?.slug ?? conversation?.to?.id ?? '';\n }\n\n private animateOnScroll() {\n setTimeout(() => {\n if (window['jQuery'] && $('#chats-wrapper')?.length) {\n $('#chats-wrapper')\n .stop()\n .animate(\n {\n scrollTop: $('#chats-wrapper')[0].scrollHeight\n },\n 800\n );\n }\n });\n }\n\n private getMessageType(filename): string {\n const ext = this.getExtension(filename);\n switch (ext.toLowerCase()) {\n case 'jpg':\n case 'gif':\n case 'bmp':\n case 'png':\n return ATTACHMENT_TYPE.IMG;\n case 'm4v':\n case 'avi':\n case 'mpg':\n case 'mp4':\n return ATTACHMENT_TYPE.VIDEO;\n default:\n return '';\n }\n }\n\n private getExtension(filename) {\n const parts = filename.split('.');\n\n return parts[parts.length - 1];\n }\n\n recipientSearch() {\n lastValueFrom(\n this.mailboxService.getRecipient({\n page: 1,\n page_size: 20,\n subscription_id: PermissionService.selectedSubscription?.id,\n search: this.searchText\n })\n ).then(response => {\n this.recipients = response.filter(x => x?.id !== this.currentUser?.id);\n this.cdr.markForCheck();\n });\n }\n\n onMemberSelection(member) {\n this.otherUser = member;\n this.router.navigate(['/message'], { fragment: member.slug });\n }\n\n onDeleteMessage(message) {\n this.confirmDialog\n .confirmDelete({\n textKey: 'Common.Confirm.Delete.TextSimple',\n textParams: { entityType: 'message' }\n })\n .then(ok => {\n if (!ok) {\n return;\n }\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 this.cdr.markForCheck();\n });\n });\n }\n\n private waitForJQuery(callback: () => void): void {\n let attempts = 0;\n const maxAttempts = 100; // 10 seconds max wait time\n\n const checkJQuery = () => {\n if (window['jQuery']) {\n console.log('jQuery detected, loading chat.js');\n callback();\n } else if (attempts < maxAttempts) {\n attempts++;\n setTimeout(checkJQuery, 100);\n } else {\n console.log('jQuery not available, loading it now for chatbox');\n // Load jQuery since it's needed\n this.loadJQueryForChatbox(callback);\n }\n };\n checkJQuery();\n }\n\n private loadJQueryForChatbox(callback: () => void): void {\n const jquerySrc = 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n const script = document.createElement('script');\n script.src = jquerySrc;\n script.crossOrigin = 'anonymous';\n script.async = false;\n script.onload = () => {\n console.log('jQuery loaded for chatbox');\n callback();\n };\n script.onerror = () => {\n console.error('Failed to load jQuery for chatbox');\n // Try fallback\n const fallbackScript = document.createElement('script');\n fallbackScript.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n fallbackScript.crossOrigin = 'anonymous';\n fallbackScript.async = false;\n fallbackScript.onload = () => {\n console.log('jQuery loaded from Google CDN for chatbox');\n callback();\n };\n fallbackScript.onerror = () => {\n console.error('All jQuery CDNs failed for chatbox');\n };\n document.head.appendChild(fallbackScript);\n };\n document.head.appendChild(script);\n }\n}\n","<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n @if (isChatLoading) {\n <div class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n }\n\n @if (!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 appendTo=\"body\" inputId=\"chatbox-search-member\"\n [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search members...\"\n [ngModelOptions]=\"{ standalone: true }\"\n optionLabel=\"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 @if (conversations?.length) {\n <div class=\"users-list-padding\">\n @for (conversation of conversations; track trackConversationKey(conversation)) {\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n @if (conversation?.to?.avatar) {\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n } @else {\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 }\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 @if (conversation?.unread_count) {\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\">\n {{ conversation.unread_count }}\n </span>\n }\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 }\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (conversations?.length) {\n <!-- Chat Header -->\n @if (otherUser) {\n <div class=\"chat-name p-2 bg-white\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n @if (currentConversation?.to?.avatar) {\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\" />\n } @else {\n @if (currentUser) {\n <div 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 }\n }\n\n @if (currentUser) {\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n @if (!isLoaded) {\n <div class=\"spinner\"></div>\n }\n @if (messagesGroupedByDate) {\n @for (item of ObjectKeys(messagesGroupedByDate); track item) {\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n @for (message of messagesGroupedByDate[item]; track message.id) {\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 @if (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 @if (message.sender_id === currentUser.id) {\n @if (currentUserImg) {\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n }\n }\n\n <!-- Participant -->\n @if (message.sender_id !== currentUser.id) {\n @if (currentUser && otherUser?.avatar) {\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\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 }\n }\n </a>\n </div>\n <div class=\"chat-body\">\n @if (!message?.attachment?.url) {\n <div class=\"chat-content attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.sender_id === currentUser.id && message.is_open) {\n <i\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n }\n <p>{{ message.body }}</p>\n </div>\n } @else {\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.attachment) {\n <div class=\"message-attachment\">\n <i>\n @if (message?.messageType === ATTACHMENT_TYPE.IMG) {\n <img\n [src]=\"message.attachment.url\"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n }\n @if (message?.messageType === ATTACHMENT_TYPE.VIDEO) {\n <video\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n }\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 }\n </div>\n }\n </div>\n }\n </div>\n }\n }\n }\n\n @if (!messagesGroupedByDate && isLoaded) {\n <div class=\"mt-3 text-center\">No message history.</div>\n }\n\n @if (isFileUploading) {\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n }\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n @for (item of attachedFiles; track $index) {\n <div class=\"card px-3 py-2 m-0 mb-1\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji…\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <button type=\"button\" class=\"emoji-toggle-btn\" aria-label=\"Insert emoji\" (click)=\"showEmoji = !showEmoji\">🙂</button>\n </div>\n <label for=\"chatbox-message-input\" class=\"visually-hidden\">Type your message</label>\n <input type=\"text\"\n id=\"chatbox-message-input\"\n name=\"chatbox-message-input\"\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 <span class=\"visually-hidden\">Attach file</span>\n <i class=\"fa fa-paperclip\" aria-hidden=\"true\"></i>\n <input\n id=\"file-input\"\n name=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\" />\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 } @else {\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { ChatBoxComponent } from './chatbox/chatbox.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: ChatBoxComponent,\n data: {\n title: 'Chat'\n }\n },\n {\n path: ':memberId',\n component: ChatBoxComponent,\n data: {\n title: 'Chat'\n }\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class MessageRoutingModule {}\n","import { ScrollingModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { PipesModule } from '@posiwise/pipes';\n\nimport { NgxFileDropModule } from 'ngx-file-drop';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\n\nimport { PickerModule } from '@ctrl/ngx-emoji-mart';\nimport { EmojiModule } from '@ctrl/ngx-emoji-mart/ngx-emoji';\n\nimport { ChatBoxComponent } from './chatbox/chatbox.component';\nimport { MessageRoutingModule } from './messaging-routing.module';\n\n@NgModule({\n imports: [\n CommonModule,\n PipesModule,\n FormsModule,\n MessageRoutingModule,\n ProgressSpinnerModule,\n AutoCompleteModule,\n PickerModule,\n EmojiModule,\n NgxFileDropModule,\n InfiniteScrollModule,\n ScrollingModule\n ],\n declarations: [ChatBoxComponent],\n exports: [RouterModule, ChatBoxComponent]\n})\nexport class MessagingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCM,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;IA6DlD,WAAA,CACY,KAAiB;IACR,cAA8B,EAC9B,cAA8B,EAC9B,aAA+B,EAC/B,YAAiC,EAClD,QAAkB,EACD,GAAsB,EACtB,aAAmC,EAAA;QAEpD,KAAK,CAAC,QAAQ,CAAC;QATP,IAAA,CAAA,KAAK,GAAL,KAAK;QACI,IAAA,CAAA,cAAc,GAAd,cAAc;QACd,IAAA,CAAA,cAAc,GAAd,cAAc;QACd,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,YAAY,GAAZ,YAAY;QAEZ,IAAA,CAAA,GAAG,GAAH,GAAG;QACH,IAAA,CAAA,aAAa,GAAb,aAAa;AA7DlC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,IAAI;QAExB,IAAA,CAAA,SAAS,GAAG,KAAK;;QAYT,IAAA,CAAA,oBAAoB,GAAmB,EAAE;QACzC,IAAA,CAAA,OAAO,GAAG,IAAI;AACL,QAAA,IAAA,CAAA,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QACpD,IAAA,CAAA,WAAW,GAAG,IAAI;QAClB,IAAA,CAAA,aAAa,GAAG,CAAC;QACjB,IAAA,CAAA,aAAa,GAAG,CAAC;QACjB,IAAA,CAAA,cAAc,GAAG,EAAE;QAE3B,IAAA,CAAA,aAAa,GAAmB,EAAE;;;QAOlC,IAAA,CAAA,qBAAqB,GAAG,EAAE;QAI1B,IAAA,CAAA,UAAU,GAAG,EAAE;QAEf,IAAA,CAAA,KAAK,GAAG,EAAE;QAEV,IAAA,CAAA,a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GAAf,eAAe,EAAA,YAAA,EAAA,CAHT,gBAAgB,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;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;;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;AACH,qBAAA;oBACD,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB;AAC3C,iBAAA;;;ACnCD;;AAEG;;;;"}
1
+ {"version":3,"file":"posiwise-messaging-module.mjs","sources":["../../../../libs/messaging-module/src/lib/chatbox/chatbox.component.ts","../../../../libs/messaging-module/src/lib/chatbox/chatbox.component.html","../../../../libs/messaging-module/src/lib/messaging-routing.module.ts","../../../../libs/messaging-module/src/lib/messaging.module.ts","../../../../libs/messaging-module/src/posiwise-messaging-module.ts"],"sourcesContent":["import {\n ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport {\n MailBoxService,\n PermissionService,\n ProfileService,\n ScriptLoaderService,\n WebsocketService\n} from '@posiwise/common-services';\nimport { ATTACHMENT_TYPE, ChatUser, Conversation, SOCKET_TYPE } from '@posiwise/common-utilities';\nimport { ConfirmDialogService } from '@posiwise/shared-components';\n\nimport groupBy from 'lodash/groupBy';\nimport sortBy from 'lodash/sortBy';\nimport uniqBy from 'lodash/uniqBy';\nimport moment from 'moment';\nimport { FileSystemFileEntry } from 'ngx-file-drop';\nimport { lastValueFrom } from 'rxjs';\n\nimport { ExtendedConversation, MessageChatUser } from '../shared/chatbox.interface';\n\n@Component({\n templateUrl: './chatbox.component.html',\n styleUrls: ['./chatbox.component.scss'],\n\n standalone: false\n})\nexport class ChatBoxComponent extends AppBaseComponent implements OnInit, OnDestroy, DoCheck {\n // Message Box Template Ref\n @ViewChild('messageInput', { static: false })\n messageInputRef: ElementRef;\n\n // File Upload Progress spinner\n isFileUploading: boolean;\n\n ObjectKeys = Object.keys;\n\n showEmoji = false;\n\n selectedConversationId: number;\n\n currentConversation: Conversation;\n\n // logged user\n currentUser: MessageChatUser;\n\n currentUserImg: string;\n\n // Conversation list\n private pristineConversation: Conversation[] = [];\n private isDrift = true;\n private readonly units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n private initialLoad = true;\n private selectedIndex = 0;\n private totalMessages = 0;\n private currentThreads = [];\n\n conversations: Conversation[] = [];\n\n // Active Chat User => other participant\n otherUser: ChatUser;\n\n // Boolean to unsubscribe on Destroy\n // List of messages per conversation Id\n messagesGroupedByDate = {};\n\n searchText: string;\n\n recipients = [];\n\n files = [];\n\n attachedFiles: { name: string; size: string }[] = [];\n\n isChatLoading = true;\n\n currentPage = 1;\n\n isLoaded = true;\n\n throttle = 300;\n\n scrollUpDistance = 2;\n\n scrollDistance = 1;\n subscriptionId: number;\n ATTACHMENT_TYPE = ATTACHMENT_TYPE;\n\n constructor(\n private elRef: ElementRef, // NOSONAR\n private readonly mailboxService: MailBoxService,\n private readonly profileService: ProfileService,\n private readonly socketService: WebsocketService,\n private readonly scriptLoader: ScriptLoaderService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n }\n\n onImgError(event: Event, fallbackSrc: string): void {\n const img = event.target as HTMLImageElement | null;\n if (!img) return;\n if (img.src?.endsWith(fallbackSrc)) return;\n img.src = fallbackSrc;\n }\n\n onUp(_ev, conversationId) {\n this.currentPage++;\n const totalPages = Math.ceil(this.totalMessages / 10);\n // Prevent API call if all messages have been fetched\n if (this.currentPage <= totalPages) {\n this.loadMore(conversationId, this.currentPage);\n }\n }\n\n ngOnInit() {\n this.waitForJQuery(() => {\n this.scriptLoader.loadScriptOnce('head', '/assets/js/chat.js');\n });\n this.listenToNewMessage();\n this.subscriptionId = PermissionService.selectedSubscription?.id;\n this.userStore().subscribe(resp => {\n this.currentUser = resp;\n if (this.currentUser) {\n this.mailboxService\n .getConversations()\n .subscribe((response: ExtendedConversation[]) => {\n if (response?.length) {\n let raw;\n if (this.conversations.length > 0) {\n raw = this.conversations.find(x => x?.id === null);\n }\n response.forEach(x => {\n x.datetime = x.latest_message.created_at;\n });\n const chats = sortBy(response, 'datetime').reverse();\n this.pristineConversation = chats;\n this.conversations = [...chats];\n\n if (raw) {\n this.conversations.unshift(raw);\n }\n\n this.parseConversation();\n setTimeout(() => this.filterConversations());\n }\n\n if (this.initialLoad) {\n this.checkIfNewConversation();\n } else {\n this.activateThread();\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isChatLoading = false;\n this.initialLoad = false;\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n }\n private filterConversations(): void {\n this.conversations = this.conversations.filter(conversation => conversation.to);\n }\n ngDoCheck() {\n // Hiding Drift messenger for Chat-box (Drift service shut down - kept for future chat widget alternative)\n if (window['jQuery'] && this.isDrift) {\n if ($('#drift-widget-container').length > 0 && $('#drift-widget-container:visible')) {\n this.isDrift = false;\n $('#drift-widget-container').hide();\n }\n }\n }\n\n override ngOnDestroy(): void {\n if (window['jQuery']) {\n $('.drift-widget-container').show();\n }\n }\n\n private parseConversation() {\n this.conversations.forEach((element: Conversation, index) => {\n element.to = element.participants.find(x => x?.id !== this.currentUser?.id);\n element.from = element.participants.find(x => x?.id === this.currentUser?.id);\n if (index === 0) {\n this.currentUserImg = element.from?.avatar ?? '/assets/img/icons/male.png';\n }\n });\n }\n\n private activateThread() {\n setTimeout(() => {\n if (window['jQuery']) {\n const selector = `.list-group-item:nth-child(${this.selectedIndex + 1})`;\n $(selector)\n .removeClass('no-border')\n .addClass(\n 'list-group-item bg-blue-grey bg-lighten-5 border-right-primary border-right-2'\n );\n }\n });\n }\n\n private checkIfNewConversation() {\n this.route.fragment.subscribe((fragment: string) => {\n if (fragment) {\n // Check for existing conversation\n const existingConversation = this.conversations.find(x => x.to?.slug === fragment);\n if (existingConversation) {\n this.otherUser = existingConversation.to;\n // sets the active tab when navigate to chat page\n this.setActive(existingConversation);\n } else {\n this.newParticipant(fragment);\n }\n } else if (this.conversations.length > 0) {\n this.router.navigate(['/message'], { fragment: this.conversations[0].to?.slug });\n }\n this.cdr.markForCheck();\n });\n }\n\n onParticipantClick(conversation) {\n this.otherUser = conversation.participants.find(x => x?.id !== this.currentUser?.id);\n const slug = this.otherUser?.slug;\n this.clearUnreadCount();\n this.router.navigate(['/message'], { fragment: slug });\n }\n\n private newParticipant(slug) {\n this.profileService.getUserProfile(slug).subscribe(response => {\n this.otherUser = response;\n\n const to = new ChatUser(\n response?.id,\n response?.first_name,\n response?.slug,\n response?.email,\n response?.avatar ? response?.avatar[0]?.url : '',\n new Date()\n );\n\n const from = new ChatUser(\n this.currentUser?.id,\n this.currentUser?.firstName,\n this.currentUser?.slug,\n this.currentUser?.email,\n this.currentUser?.avatar\n ? this.currentUser?.avatar[0].url\n : '/assets/img/icons/male.png',\n new Date()\n );\n\n const newConversation = new Conversation(\n null,\n 1,\n null,\n 'chat',\n [to, from],\n null,\n 0,\n from,\n to\n );\n\n this.conversations.unshift(newConversation);\n this.setActive(this.conversations[0]);\n this.cdr.markForCheck();\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 Array.from(allAnchors).forEach((item: Element) => {\n item.setAttribute('class', 'list-group-item no-border');\n });\n\n const index = this.conversations.findIndex(x => x?.to?.id === this.otherUser?.id) || 0;\n setTimeout(() => {\n if (window['jQuery']) {\n $(`.list-group-item:nth-child(${index + 1})`)\n .removeClass('no-border')\n .addClass(\n 'list-group-item bg-blue-grey bg-lighten-5 border-right-primary border-right-2'\n );\n this.selectedIndex = $('.list-group-item.border-right-2').index();\n }\n }, 500);\n\n this.markAsRead(conversation?.id);\n this.getMessage(conversation?.id);\n }\n\n search(searchTxt) {\n if (searchTxt?.value?.length > 2) {\n this.conversations = this.pristineConversation.filter(\n x => x.to.slug.includes(searchTxt.value) ?? x.to?.email.includes(searchTxt.value)\n );\n } else {\n this.conversations = this.pristineConversation;\n }\n }\n\n // Socket For Listening to new Message\n private listenToNewMessage() {\n this.socketService.webSocket$.subscribe(\n (result: {\n event: string;\n new_conversation: string;\n data: {\n formattedDate: string;\n created_at: string;\n conversation_id: number;\n };\n id: number;\n }) => {\n if (result.event === SOCKET_TYPE.MSG) {\n if (result?.new_conversation === 'false') {\n const newMessage = result?.data;\n newMessage.formattedDate = moment(new Date(newMessage.created_at)).format(\n 'YYYYMMDD'\n );\n\n // Append the new message to conversation\n const conversation = this.conversations.find(x => x?.id === result?.id);\n if (conversation) {\n conversation.latest_message = result.data;\n conversation.created_at = newMessage.created_at;\n conversation.unread_count += 1;\n }\n\n if (\n newMessage.conversation_id === this.selectedConversationId &&\n newMessage.formattedDate in this.messagesGroupedByDate\n ) {\n this.messagesGroupedByDate[newMessage.formattedDate].push(newMessage);\n this.animateOnScroll();\n }\n } else if (result && typeof result.new_conversation === 'object') {\n this.conversations.unshift(result.new_conversation);\n this.parseConversation();\n }\n }\n this.cdr.markForCheck();\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.some(x => x?.id === response?.id);\n if (!ifExist) {\n this.conversations.find(x => x?.id === null).id = response?.id;\n }\n\n const messages = sortBy(response.messages, 'created_at');\n\n messages.forEach(msg => {\n msg.messageType = msg.attachment.url\n ? this.getMessageType(msg.attachment.url)\n : null;\n });\n this.messagesGroupedByDate = groupBy(messages, (o: Conversation) => {\n return moment(o.created_at).format('YYYYMMDD');\n });\n\n // Append the latest message to conversation list\n const current = this.conversations.find(\n x => x?.id === response?.id\n ).latest_message;\n if (current) {\n current.body = response.messages[0].body;\n current.created_at = response.messages[0].created_at;\n }\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isChatLoading = false;\n this.isLoaded = true;\n this.animateOnScroll();\n this.cdr.markForCheck();\n });\n }\n }\n\n private loadMore(conversationId, pageNumber, pageSize = 10) {\n this.mailboxService\n .getMessages(conversationId, pageNumber, pageSize)\n .subscribe(response => {\n if (response) {\n this.currentThreads = uniqBy(\n this.currentThreads.concat(response.messages),\n 'id'\n );\n const messages = sortBy(this.currentThreads, 'created_at');\n this.messagesGroupedByDate = groupBy(messages, (o: Conversation) => {\n return moment(o.created_at).format('YYYYMMDD');\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n private clearUnreadCount() {\n this.mailboxService.decrementUnreadCount(this.currentConversation?.unread_count);\n if (this.currentConversation?.['unread_count']) {\n this.currentConversation['unread_count'] = 0;\n }\n }\n\n onSendMessage() {\n const text = this.messageInputRef.nativeElement.value;\n const formData = new FormData();\n formData.append('to', this.otherUser?.email);\n formData.append('message', text);\n formData.append('type', '1');\n formData.append('subscription_id', `${this.subscriptionId}`);\n\n if (this.files?.length) {\n this.isFileUploading = true;\n formData.append('file', this.files[0], this.files[0].name);\n }\n\n if (text || this.files.length > 0) {\n this.mailboxService\n .postMessage(formData)\n .subscribe(response => {\n this.files = [];\n this.attachedFiles = [];\n this.messageInputRef.nativeElement.value = '';\n this.messageInputRef.nativeElement.focus();\n this.getMessage(response.conversation_id, false);\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isFileUploading = false;\n this.cdr.markForCheck();\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 this.cdr.markForCheck();\n });\n }\n }\n\n private transform(bytes = 0, precision = 2) {\n // eslint-disable-next-line no-restricted-globals\n if (Number.isNaN(Number.parseFloat(String(bytes))) || !Number.isFinite(bytes)) {\n return '?';\n }\n let unit = 0;\n\n while (bytes >= 1024) {\n bytes /= 1024;\n unit++;\n }\n\n return `${bytes.toFixed(+precision)} ${this.units[unit]}`;\n }\n\n dropped(files) {\n // eslint-disable-next-line no-restricted-syntax\n for (const droppedFile of files) {\n // Is it a file?\n if (droppedFile.fileEntry.isFile) {\n const fileEntry = droppedFile.fileEntry as FileSystemFileEntry;\n fileEntry.file((file: File) => {\n this.files.push(file);\n this.attachedFiles.push({\n name: file.name,\n size: this.transform(Number(file.size))\n });\n });\n }\n }\n }\n\n onRemoveAttachment(item) {\n this.files = this.files.filter(x => x.name !== item.name);\n this.attachedFiles = this.attachedFiles.filter(x => x.name !== item.name);\n }\n\n fileOver(_event) {\n console.log();\n }\n\n onEmojiSelect($event) {\n this.messageInputRef.nativeElement.value += $event.emoji.native;\n this.showEmoji = false;\n }\n\n fileChangeListener($event) {\n const file: File = $event.target.files[0];\n this.files.push(file);\n this.attachedFiles.push({\n name: file.name,\n size: this.transform(Number(file.size / 1024))\n });\n }\n\n toggleSidebar() {\n if (window['jQuery']) {\n $('.chat-sidebar').removeClass('d-none d-sm-none').addClass('d-block d-sm-block');\n $('.content-overlay').addClass('show');\n }\n }\n\n trackByMessageId(_index, item) {\n return item?.id;\n }\n\n trackConversationKey(conversation: Conversation): string | number {\n return conversation?.id ?? conversation?.to?.slug ?? conversation?.to?.id ?? '';\n }\n\n private animateOnScroll() {\n setTimeout(() => {\n if (window['jQuery'] && $('#chats-wrapper')?.length) {\n $('#chats-wrapper')\n .stop()\n .animate(\n {\n scrollTop: $('#chats-wrapper')[0].scrollHeight\n },\n 800\n );\n }\n });\n }\n\n private getMessageType(filename): string {\n const ext = this.getExtension(filename);\n switch (ext.toLowerCase()) {\n case 'jpg':\n case 'gif':\n case 'bmp':\n case 'png':\n return ATTACHMENT_TYPE.IMG;\n case 'm4v':\n case 'avi':\n case 'mpg':\n case 'mp4':\n return ATTACHMENT_TYPE.VIDEO;\n default:\n return '';\n }\n }\n\n private getExtension(filename) {\n const parts = filename.split('.');\n\n return parts[parts.length - 1];\n }\n\n recipientSearch() {\n lastValueFrom(\n this.mailboxService.getRecipient({\n page: 1,\n page_size: 20,\n subscription_id: PermissionService.selectedSubscription?.id,\n search: this.searchText\n })\n ).then(response => {\n this.recipients = response.filter(x => x?.id !== this.currentUser?.id);\n this.cdr.markForCheck();\n });\n }\n\n onMemberSelection(member) {\n this.otherUser = member;\n this.router.navigate(['/message'], { fragment: member.slug });\n }\n\n onDeleteMessage(message) {\n this.confirmDialog\n .confirmDelete({\n textKey: 'Common.Confirm.Delete.TextSimple',\n textParams: { entityType: 'message' }\n })\n .then(ok => {\n if (!ok) {\n return;\n }\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 this.cdr.markForCheck();\n });\n });\n }\n\n private waitForJQuery(callback: () => void): void {\n let attempts = 0;\n const maxAttempts = 100; // 10 seconds max wait time\n\n const checkJQuery = () => {\n if (window['jQuery']) {\n console.log('jQuery detected, loading chat.js');\n callback();\n } else if (attempts < maxAttempts) {\n attempts++;\n setTimeout(checkJQuery, 100);\n } else {\n console.log('jQuery not available, loading it now for chatbox');\n // Load jQuery since it's needed\n this.loadJQueryForChatbox(callback);\n }\n };\n checkJQuery();\n }\n\n private loadJQueryForChatbox(callback: () => void): void {\n const jquerySrc = 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n const script = document.createElement('script');\n script.src = jquerySrc;\n script.crossOrigin = 'anonymous';\n script.async = false;\n script.onload = () => {\n console.log('jQuery loaded for chatbox');\n callback();\n };\n script.onerror = () => {\n console.error('Failed to load jQuery for chatbox');\n // Try fallback\n const fallbackScript = document.createElement('script');\n fallbackScript.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n fallbackScript.integrity =\n 'sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK';\n fallbackScript.crossOrigin = 'anonymous';\n fallbackScript.async = false;\n fallbackScript.onload = () => {\n console.log('jQuery loaded from Google CDN for chatbox');\n callback();\n };\n fallbackScript.onerror = () => {\n console.error('All jQuery CDNs failed for chatbox');\n };\n document.head.appendChild(fallbackScript);\n };\n document.head.appendChild(script);\n }\n}\n","<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n @if (isChatLoading) {\n <div class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n }\n\n @if (!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 appendTo=\"body\" inputId=\"chatbox-search-member\"\n [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Search members...\"\n [ngModelOptions]=\"{ standalone: true }\"\n optionLabel=\"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 @if (conversations?.length) {\n <div class=\"users-list-padding\">\n @for (conversation of conversations; track trackConversationKey(conversation)) {\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n @if (conversation?.to?.avatar) {\n <img [src]=\"conversation.to?.avatar\"\n width=\"40\"\n height=\"40\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n } @else {\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 }\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 @if (conversation?.unread_count) {\n <span class=\"badge bg-primary rounded-pill bg-primary mx-1\">\n {{ conversation.unread_count }}\n </span>\n }\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 }\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (conversations?.length) {\n <!-- Chat Header -->\n @if (otherUser) {\n <div class=\"chat-name p-2 bg-white\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (keydown.enter)=\"toggleSidebar()\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n @if (currentConversation?.to?.avatar) {\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n role=\"presentation\"\n (error)=\"onImgError($event, '/assets/img/icons/male.png')\" />\n } @else {\n @if (currentUser) {\n <div 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 }\n }\n\n @if (currentUser) {\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <div class=\"chats\">\n <!-- Shows Message -->\n @if (!isLoaded) {\n <div class=\"spinner\"></div>\n }\n @if (messagesGroupedByDate) {\n @for (item of ObjectKeys(messagesGroupedByDate); track item) {\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n @for (message of messagesGroupedByDate[item]; track message.id) {\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 @if (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 @if (message.sender_id === currentUser.id) {\n @if (currentUserImg) {\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\n <div class=\"dummy-avatar bg-brown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n }\n }\n\n <!-- Participant -->\n @if (message.sender_id !== currentUser.id) {\n @if (currentUser && otherUser?.avatar) {\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n } @else {\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 }\n }\n </a>\n </div>\n <div class=\"chat-body\">\n @if (!message?.attachment?.url) {\n <div class=\"chat-content attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.sender_id === currentUser.id && message.is_open) {\n <i\n class=\"fa fa-check-double msg-double-check\"\n ></i>\n }\n <p>{{ message.body }}</p>\n </div>\n } @else {\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n @if (message.sender_id === currentUser.id) {\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n (click)=\"onDeleteMessage(message)\"\n (keydown.enter)=\"onDeleteMessage(message)\"\n ></i>\n }\n @if (message.attachment) {\n <div class=\"message-attachment\">\n <i>\n @if (message?.messageType === ATTACHMENT_TYPE.IMG) {\n <img\n [src]=\"message.attachment.url\"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n }\n @if (message?.messageType === ATTACHMENT_TYPE.VIDEO) {\n <video\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n <track kind=\"subtitles\" srclang=\"en\" label=\"English\" />\n Your browser does not support the video\n tag.\n </video>\n }\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 }\n </div>\n }\n </div>\n }\n </div>\n }\n }\n }\n\n @if (!messagesGroupedByDate && isLoaded) {\n <div class=\"mt-3 text-center\">No message history.</div>\n }\n\n @if (isFileUploading) {\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n }\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n @for (item of attachedFiles; track $index) {\n <div class=\"card px-3 py-2 m-0 mb-1\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (keydown.enter)=\"onRemoveAttachment(item)\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji…\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Text box area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <button type=\"button\" class=\"emoji-toggle-btn\" aria-label=\"Insert emoji\" (click)=\"showEmoji = !showEmoji\">🙂</button>\n </div>\n <label for=\"chatbox-message-input\" class=\"visually-hidden\">Type your message</label>\n <input type=\"text\"\n id=\"chatbox-message-input\"\n name=\"chatbox-message-input\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput\n aria-label=\"Type your message here...\" />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <span class=\"visually-hidden\">Attach file</span>\n <i class=\"fa fa-paperclip\" aria-hidden=\"true\"></i>\n <input\n id=\"file-input\"\n name=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n aria-label=\"File Input\" />\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 } @else {\n <div class=\"container-fluid pw-tab overflow-hidden no-message-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing the name of the member you want to send a message to\n in the chat search field and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { ChatBoxComponent } from './chatbox/chatbox.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: ChatBoxComponent,\n data: {\n title: 'Chat'\n }\n },\n {\n path: ':memberId',\n component: ChatBoxComponent,\n data: {\n title: 'Chat'\n }\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class MessageRoutingModule {}\n","import { ScrollingModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { PipesModule } from '@posiwise/pipes';\n\nimport { NgxFileDropModule } from 'ngx-file-drop';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\n\nimport { PickerModule } from '@ctrl/ngx-emoji-mart';\nimport { EmojiModule } from '@ctrl/ngx-emoji-mart/ngx-emoji';\n\nimport { ChatBoxComponent } from './chatbox/chatbox.component';\nimport { MessageRoutingModule } from './messaging-routing.module';\n\n@NgModule({\n imports: [\n CommonModule,\n PipesModule,\n FormsModule,\n MessageRoutingModule,\n ProgressSpinnerModule,\n AutoCompleteModule,\n PickerModule,\n EmojiModule,\n NgxFileDropModule,\n InfiniteScrollModule,\n ScrollingModule\n ],\n declarations: [ChatBoxComponent],\n exports: [RouterModule, ChatBoxComponent]\n})\nexport class MessagingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCM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kB;YAClB,YAAY;YACZ,WAAW;YACX,iBAAiB;YACjB,oBAAoB;YACpB,eAAe,CAAA,EAAA,OAAA,EAAA,CAGT,YAAY,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAE/B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAfpB,YAAY;YACZ,WAAW;YACX,WAAW;YACX,oBAAoB;YACpB,qBAAqB;YACrB,kBAAkB;YAClB,YAAY;YACZ,WAAW;YACX,iBAAiB;YACjB,oBAAoB;AACpB,YAAA,eAAe,EAGT,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAEb,eAAe,EAAA,UAAA,EAAA,CAAA;kBAjB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,WAAW;wBACX,oBAAoB;wBACpB,qBAAqB;wBACrB,kBAAkB;wBAClB,YAAY;wBACZ,WAAW;wBACX,iBAAiB;wBACjB,oBAAoB;wBACpB;AACH,qBAAA;oBACD,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB;AAC3C,iBAAA;;;ACnCD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@posiwise/messaging-module",
3
- "version": "0.0.96",
3
+ "version": "0.0.98",
4
4
  "peerDependencies": {
5
- "@angular/common": "^21.2.6",
6
- "@angular/core": "^21.2.6",
5
+ "@angular/common": "^21.2.19",
6
+ "@angular/core": "^21.2.19",
7
7
  "@ctrl/ngx-emoji-mart": "^9.2.0",
8
8
  "ngx-file-drop": "^16.0.0",
9
9
  "ngx-infinite-scroll": "^19.0.0"