@posiwise/messaging-module 0.0.2 → 0.0.5

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.
@@ -1,5 +1,5 @@
1
1
  import { ScrollingModule } from '@angular/cdk/scrolling';
2
- import { CommonModule } from '@angular/common';
2
+ import { CommonModule, DatePipe, NgForOf, NgIf } from '@angular/common';
3
3
  import { NgModule } from '@angular/core';
4
4
  import { RouterModule } from '@angular/router';
5
5
  import { PickerModule } from '@ctrl/ngx-emoji-mart';
@@ -26,7 +26,13 @@ MessagingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
26
26
  EmojiModule,
27
27
  NgxFileDropModule,
28
28
  InfiniteScrollModule,
29
- ScrollingModule], exports: [RouterModule, ChatBoxComponent] });
29
+ ScrollingModule,
30
+ DatePipe,
31
+ FormsModule,
32
+ InfiniteScrollModule,
33
+ NgForOf,
34
+ NgIf,
35
+ PickerModule], exports: [RouterModule, ChatBoxComponent] });
30
36
  MessagingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MessagingModule, imports: [CommonModule,
31
37
  PipesModule,
32
38
  FormsModule,
@@ -37,7 +43,10 @@ MessagingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
37
43
  EmojiModule,
38
44
  NgxFileDropModule,
39
45
  InfiniteScrollModule,
40
- ScrollingModule, RouterModule] });
46
+ ScrollingModule,
47
+ FormsModule,
48
+ InfiniteScrollModule,
49
+ PickerModule, RouterModule] });
41
50
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MessagingModule, decorators: [{
42
51
  type: NgModule,
43
52
  args: [{
@@ -52,10 +61,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
52
61
  EmojiModule,
53
62
  NgxFileDropModule,
54
63
  InfiniteScrollModule,
55
- ScrollingModule
64
+ ScrollingModule,
65
+ DatePipe,
66
+ FormsModule,
67
+ InfiniteScrollModule,
68
+ NgForOf,
69
+ NgIf,
70
+ PickerModule
56
71
  ],
57
72
  declarations: [ChatBoxComponent],
58
73
  exports: [RouterModule, ChatBoxComponent]
59
74
  }]
60
75
  }] });
61
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnaW5nLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvbWVzc2FnaW5nLW1vZHVsZS9zcmMvbGliL21lc3NhZ2luZy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3pELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDcEQsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQzdELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNsRCxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUMzRCxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUNoRSxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUMxRCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUF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pbml0ZVNjcm9sbE1vZHVsZSxcbiAgICAgICAgU2Nyb2xsaW5nTW9kdWxlLFxuICAgICAgICBEYXRlUGlwZSxcbiAgICAgICAgRm9ybXNNb2R1bGUsXG4gICAgICAgIEluZmluaXRlU2Nyb2xsTW9kdWxlLFxuICAgICAgICBOZ0Zvck9mLFxuICAgICAgICBOZ0lmLFxuICAgICAgICBQaWNrZXJNb2R1bGVcbiAgICBdLFxuICAgIGRlY2xhcmF0aW9uczogW0NoYXRCb3hDb21wb25lbnRdLFxuICAgIGV4cG9ydHM6IFtSb3V0ZXJNb2R1bGUsIENoYXRCb3hDb21wb25lbnRdXG59KVxuZXhwb3J0IGNsYXNzIE1lc3NhZ2luZ01vZHVsZSB7fVxuIl19
@@ -1,6 +1,6 @@
1
1
  import { ScrollingModule } from '@angular/cdk/scrolling';
2
2
  import * as i2 from '@angular/common';
3
- import { CommonModule } from '@angular/common';
3
+ import { CommonModule, DatePipe, NgForOf, NgIf } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
5
  import { Component, ViewChild, NgModule } from '@angular/core';
6
6
  import * as i1$1 from '@angular/router';
@@ -454,10 +454,10 @@ class ChatBoxComponent extends AppBaseComponent {
454
454
  }
455
455
  }
456
456
  ChatBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: ChatBoxComponent, deps: [{ token: i0.ElementRef }, { token: i1.MailBoxService }, { token: i1.ProfileService }, { token: i1.WebsocketService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
457
- ChatBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: ChatBoxComponent, selector: "ng-component", viewQueries: [{ propertyName: "messageInputRef", first: true, predicate: ["messageInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n <div *ngIf=\"isChatLoading\"\n class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading\">\n <div class=\"chat-sidebar float-start d-none d-sm-none d-md-block d-lg-block\">\n <div class=\"chat-sidebar-content\">\n <div class=\"chat-fixed-search p-2\">\n <div class=\"d-flex\">\n <p-autoComplete [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Type here to search member\"\n [ngModelOptions]=\"{ standalone: true }\"\n field=\"first_name\"\n (onSelect)=\"onMemberSelection(searchText)\"\n [suggestions]=\"recipients\"\n (completeMethod)=\"recipientSearch()\">\n <ng-template let-item\n pTemplate=\"item\">\n <div>\n {{ item.first_name + ' ' }}\n {{ item.last_name ? item.last_name : '' }}\n </div>\n </ng-template>\n </p-autoComplete>\n </div>\n </div>\n\n <!-- Thread/conversation List -->\n <div id=\"users-list\"\n class=\"list-group position-relative\">\n <div class=\"users-list-padding\"\n *ngIf=\"conversations?.length\">\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\"\n *ngFor=\"let conversation of conversations\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n <ng-template [ngIf]=\"conversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"conversation.to.avatar\"\n width=\"40\"\n height=\"40\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar me-2\">\n <strong>{{\n conversation.participants\n ? conversation.to.slug.charAt(0).toUpperCase()\n : conversation.to.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </span>\n <div class=\"clearfix\">\n <h6 class=\"list-group-item-heading mb-1\">\n {{\n conversation.to?.name\n ? conversation.to.name\n : conversation.to.slug\n }}\n <span class=\"font-small-3 float-end ms-5 ps-5\">\n <span class=\"badge badge-pill bg-primary mx-1\"\n *ngIf=\"conversation.unread_count\">\n {{ conversation.unread_count }}\n </span>\n {{ conversation.created_at | date: 'shortTime' }}\n </span>\n </h6>\n <p class=\"list-group-item-text text-muted\">\n {{ conversation.latest_message?.body | textTruncate: 25 }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading && conversations?.length\"\n [ngIfElse]=\"nomessage\">\n <!-- Chat Header -->\n <div class=\"chat-name p-2 bg-white\"\n *ngIf=\"otherUser\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n <ng-template [ngIf]=\"currentConversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div *ngIf=\"currentUser\"\n class=\"dummy-avatar me-2\">\n <strong>{{\n otherUser?.name\n ? otherUser.name.charAt(0).toUpperCase()\n : otherUser.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"currentUser\">\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n </ng-template>\n </div>\n </div>\n </div>\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\n <div class=\"chats\">\n <!-- Shows Message -->\n <div *ngIf=\"!isLoaded\"\n class=\"spinner\"></div>\n <ng-container *ngIf=\"messagesGroupedByDate\">\n <ng-container *ngFor=\"let item of ObjectKeys(messagesGroupedByDate)\">\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n <div class=\"chat\"\n [ngClass]=\"{\n 'chat-left ms-2': message.sender_id !== currentUser.id,\n 'me-2': message.sender_id === currentUser.id\n }\"\n *ngFor=\"\n let message of messagesGroupedByDate[item];\n trackBy: trackByMessageId;\n let i = index\n \">\n <ng-container *ngIf=\"message.body || message.attachment.url\">\n <div class=\"chat-avatar\">\n <a class=\"avatar\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n data-original-title=\"\">\n <!-- Setting up Avatar Image for Logged In User -->\n <ng-container *ngIf=\"message.sender_id === currentUser.id\">\n <ng-template [ngIf]=\"currentUserImg\"\n [ngIfElse]=\"curDummy\">\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n <ng-template #curDummy>\n <div class=\"dummy-avatar bg-bown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Participant -->\n <ng-container *ngIf=\"message.sender_id !== currentUser.id\">\n <ng-template [ngIf]=\"currentUser && otherUser?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar\">\n <strong>{{\n otherUser?.name\n ? otherUser.name\n .charAt(0)\n .toUpperCase()\n : otherUser.slug\n .charAt(0)\n .toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </ng-container>\n </a>\n </div>\n <div class=\"chat-body\">\n <div class=\"chat-content attachment\"\n *ngIf=\"\n !message?.attachment?.url;\n else withAttachmentRef\n \">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\n ></i>\n <p>{{ message.body }}</p>\n </div>\n\n <ng-template #withAttachmentRef>\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n ></i>\n <div *ngIf=\"message.attachment\"\n class=\"message-attachment\">\n <i *ngIf=\"message.attachment.url\">\n <img\n [src]=\"message.attachment.url\"\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.IMG\n \"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n <video\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.VIDEO\n \"\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n Your browser does not support the video\n tag.\n </video>\n <a\n [attr.href]=\"message.attachment.url\"\n target=\"_blank\"\n >\n <i\n class=\"fa fa-file-download me-2\"\n aria-hidden=\"true\"\n ></i>\n {{\n message.attachment.url\n | common: 'filename'\n }}</a>\n </i>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!messagesGroupedByDate && isLoaded\">\n <div class=\"mt-3 text-center\">No message history.</div>\n </ng-container>\n\n <ng-container *ngIf=\"isFileUploading\">\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n </ng-container>\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n <div class=\"card px-3 py-2 m-0 mb-1\"\n *ngFor=\"let item of attachedFiles; let i = index\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Textbox area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <legend>Textbox area</legend>\n <div class=\"form-control-position emoji-container\">\n <i class=\"icon-emoticon-smile\" (click)=\"showEmoji = !showEmoji\"></i>\n </div>\n <input type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <i class=\"fa fa-paperclip\">\n <input\n id=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n />\n </i>\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"mb-3 position-relative has-icon-left col-2 m-0 mb-1\">\n <legend></legend>\n <button type=\"button\"\n class=\"btn btn-primary d-lg-flex align-items-center btn-send\"\n (click)=\"onSendMessage()\">\n <i class=\"fa fa-paper-plane\"></i><span class=\"d-none d-lg-block ms-1\">Send</span>\n </button>\n </fieldset>\n </form>\n </div>\n </ng-template>\n\n <ng-template #nomessage>\n <div class=\"container-fluid pw-tab overflow-hidden nomessage-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing in the chat search field the name of the member you\n want to send a message and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-dblcheck{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media (min-width: 768px){.nomessage-center{margin-left:auto;width:calc(100% - 300px)}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { kind: "component", type: i5.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "itemSize", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.PickerComponent, selector: "emoji-mart", inputs: ["perLine", "totalFrequentLines", "i18n", "style", "title", "emoji", "darkMode", "color", "hideObsolete", "categories", "activeCategories", "set", "skin", "isNative", "emojiSize", "sheetSize", "emojisToShowFilter", "showPreview", "emojiTooltip", "autoFocus", "custom", "hideRecent", "imageUrlFn", "include", "exclude", "notFoundEmoji", "categoriesIcons", "searchIcons", "useButton", "enableFrequentEmojiSort", "enableSearch", "showSingleCategory", "virtualize", "virtualizeOffset", "recent", "backgroundImageFn"], outputs: ["emojiClick", "emojiSelect", "skinChange"] }, { kind: "directive", type: i8.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i9.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i9.CommonPipe, name: "common" }] });
457
+ ChatBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: ChatBoxComponent, selector: "ng-component", viewQueries: [{ propertyName: "messageInputRef", first: true, predicate: ["messageInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n <div *ngIf=\"isChatLoading\"\n class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading\">\n <div class=\"chat-sidebar float-start d-none d-sm-none d-md-block d-lg-block\">\n <div class=\"chat-sidebar-content\">\n <div class=\"chat-fixed-search p-2\">\n <div class=\"d-flex\">\n <p-autoComplete [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Type here to search member\"\n [ngModelOptions]=\"{ standalone: true }\"\n field=\"first_name\"\n (onSelect)=\"onMemberSelection(searchText)\"\n [suggestions]=\"recipients\"\n (completeMethod)=\"recipientSearch()\">\n <ng-template let-item\n pTemplate=\"item\">\n <div>\n {{ item.first_name + ' ' }}\n {{ item.last_name ? item.last_name : '' }}\n </div>\n </ng-template>\n </p-autoComplete>\n </div>\n </div>\n\n <!-- Thread/conversation List -->\n <div id=\"users-list\"\n class=\"list-group position-relative\">\n <div class=\"users-list-padding\"\n *ngIf=\"conversations?.length\">\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\"\n *ngFor=\"let conversation of conversations\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n <ng-template [ngIf]=\"conversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"conversation.to.avatar\"\n width=\"40\"\n height=\"40\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar me-2\">\n <strong>{{\n conversation.participants\n ? conversation.to.slug.charAt(0).toUpperCase()\n : conversation.to.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </span>\n <div class=\"clearfix\">\n <h6 class=\"list-group-item-heading mb-1\">\n {{\n conversation.to?.name\n ? conversation.to.name\n : conversation.to.slug\n }}\n <span class=\"font-small-3 float-end ms-5 ps-5\">\n <span class=\"badge badge-pill bg-primary mx-1\"\n *ngIf=\"conversation.unread_count\">\n {{ conversation.unread_count }}\n </span>\n {{ conversation.created_at | date: 'shortTime' }}\n </span>\n </h6>\n <p class=\"list-group-item-text text-muted\">\n {{ conversation.latest_message?.body | textTruncate: 25 }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading && conversations?.length\"\n [ngIfElse]=\"nomessage\">\n <!-- Chat Header -->\n <div class=\"chat-name p-2 bg-white\"\n *ngIf=\"otherUser\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n <ng-template [ngIf]=\"currentConversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div *ngIf=\"currentUser\"\n class=\"dummy-avatar me-2\">\n <strong>{{\n otherUser?.name\n ? otherUser.name.charAt(0).toUpperCase()\n : otherUser.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"currentUser\">\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n </ng-template>\n </div>\n </div>\n </div>\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\n <div class=\"chats\">\n <!-- Shows Message -->\n <div *ngIf=\"!isLoaded\"\n class=\"spinner\"></div>\n <ng-container *ngIf=\"messagesGroupedByDate\">\n <ng-container *ngFor=\"let item of ObjectKeys(messagesGroupedByDate)\">\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n <div class=\"chat\"\n [ngClass]=\"{\n 'chat-left ms-2': message.sender_id !== currentUser.id,\n 'me-2': message.sender_id === currentUser.id\n }\"\n *ngFor=\"\n let message of messagesGroupedByDate[item];\n trackBy: trackByMessageId;\n let i = index\n \">\n <ng-container *ngIf=\"message.body || message.attachment.url\">\n <div class=\"chat-avatar\">\n <a class=\"avatar\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n data-original-title=\"\">\n <!-- Setting up Avatar Image for Logged In User -->\n <ng-container *ngIf=\"message.sender_id === currentUser.id\">\n <ng-template [ngIf]=\"currentUserImg\"\n [ngIfElse]=\"curDummy\">\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n <ng-template #curDummy>\n <div class=\"dummy-avatar bg-bown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Participant -->\n <ng-container *ngIf=\"message.sender_id !== currentUser.id\">\n <ng-template [ngIf]=\"currentUser && otherUser?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar\">\n <strong>{{\n otherUser?.name\n ? otherUser.name\n .charAt(0)\n .toUpperCase()\n : otherUser.slug\n .charAt(0)\n .toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </ng-container>\n </a>\n </div>\n <div class=\"chat-body\">\n <div class=\"chat-content attachment\"\n *ngIf=\"\n !message?.attachment?.url;\n else withAttachmentRef\n \">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\n ></i>\n <p>{{ message.body }}</p>\n </div>\n\n <ng-template #withAttachmentRef>\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n ></i>\n <div *ngIf=\"message.attachment\"\n class=\"message-attachment\">\n <i *ngIf=\"message.attachment.url\">\n <img\n [src]=\"message.attachment.url\"\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.IMG\n \"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n <video\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.VIDEO\n \"\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n Your browser does not support the video\n tag.\n </video>\n <a\n [attr.href]=\"message.attachment.url\"\n target=\"_blank\"\n >\n <i\n class=\"fa fa-file-download me-2\"\n aria-hidden=\"true\"\n ></i>\n {{\n message.attachment.url\n | common: 'filename'\n }}</a>\n </i>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!messagesGroupedByDate && isLoaded\">\n <div class=\"mt-3 text-center\">No message history.</div>\n </ng-container>\n\n <ng-container *ngIf=\"isFileUploading\">\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n </ng-container>\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n <div class=\"card px-3 py-2 m-0 mb-1\"\n *ngFor=\"let item of attachedFiles; let i = index\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Textbox area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <i class=\"icon-emoticon-smile\" (click)=\"showEmoji = !showEmoji\"></i>\n </div>\n <input type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <i class=\"fa fa-paperclip\">\n <input\n id=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n />\n </i>\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"mb-3 position-relative has-icon-left col-2 m-0 mb-1\">\n <button type=\"button\"\n class=\"btn btn-primary d-lg-flex align-items-center btn-send\"\n (click)=\"onSendMessage()\">\n <i class=\"fa fa-paper-plane\"></i><span class=\"d-none d-lg-block ms-1\">Send</span>\n </button>\n </fieldset>\n </form>\n </div>\n </ng-template>\n\n <ng-template #nomessage>\n <div class=\"container-fluid pw-tab overflow-hidden nomessage-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing in the chat search field the name of the member you\n want to send a message and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-dblcheck{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media (min-width: 768px){.nomessage-center{margin-left:auto;width:calc(100% - 300px)}}.bg-blue-grey{color:#373b3e!important}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { kind: "component", type: i5.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "itemSize", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.PickerComponent, selector: "emoji-mart", inputs: ["perLine", "totalFrequentLines", "i18n", "style", "title", "emoji", "darkMode", "color", "hideObsolete", "categories", "activeCategories", "set", "skin", "isNative", "emojiSize", "sheetSize", "emojisToShowFilter", "showPreview", "emojiTooltip", "autoFocus", "custom", "hideRecent", "imageUrlFn", "include", "exclude", "notFoundEmoji", "categoriesIcons", "searchIcons", "useButton", "enableFrequentEmojiSort", "enableSearch", "showSingleCategory", "virtualize", "virtualizeOffset", "recent", "backgroundImageFn"], outputs: ["emojiClick", "emojiSelect", "skinChange"] }, { kind: "directive", type: i8.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i9.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i9.CommonPipe, name: "common" }] });
458
458
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: ChatBoxComponent, decorators: [{
459
459
  type: Component,
460
- args: [{ template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n <div *ngIf=\"isChatLoading\"\n class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading\">\n <div class=\"chat-sidebar float-start d-none d-sm-none d-md-block d-lg-block\">\n <div class=\"chat-sidebar-content\">\n <div class=\"chat-fixed-search p-2\">\n <div class=\"d-flex\">\n <p-autoComplete [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Type here to search member\"\n [ngModelOptions]=\"{ standalone: true }\"\n field=\"first_name\"\n (onSelect)=\"onMemberSelection(searchText)\"\n [suggestions]=\"recipients\"\n (completeMethod)=\"recipientSearch()\">\n <ng-template let-item\n pTemplate=\"item\">\n <div>\n {{ item.first_name + ' ' }}\n {{ item.last_name ? item.last_name : '' }}\n </div>\n </ng-template>\n </p-autoComplete>\n </div>\n </div>\n\n <!-- Thread/conversation List -->\n <div id=\"users-list\"\n class=\"list-group position-relative\">\n <div class=\"users-list-padding\"\n *ngIf=\"conversations?.length\">\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\"\n *ngFor=\"let conversation of conversations\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n <ng-template [ngIf]=\"conversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"conversation.to.avatar\"\n width=\"40\"\n height=\"40\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar me-2\">\n <strong>{{\n conversation.participants\n ? conversation.to.slug.charAt(0).toUpperCase()\n : conversation.to.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </span>\n <div class=\"clearfix\">\n <h6 class=\"list-group-item-heading mb-1\">\n {{\n conversation.to?.name\n ? conversation.to.name\n : conversation.to.slug\n }}\n <span class=\"font-small-3 float-end ms-5 ps-5\">\n <span class=\"badge badge-pill bg-primary mx-1\"\n *ngIf=\"conversation.unread_count\">\n {{ conversation.unread_count }}\n </span>\n {{ conversation.created_at | date: 'shortTime' }}\n </span>\n </h6>\n <p class=\"list-group-item-text text-muted\">\n {{ conversation.latest_message?.body | textTruncate: 25 }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading && conversations?.length\"\n [ngIfElse]=\"nomessage\">\n <!-- Chat Header -->\n <div class=\"chat-name p-2 bg-white\"\n *ngIf=\"otherUser\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n <ng-template [ngIf]=\"currentConversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div *ngIf=\"currentUser\"\n class=\"dummy-avatar me-2\">\n <strong>{{\n otherUser?.name\n ? otherUser.name.charAt(0).toUpperCase()\n : otherUser.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"currentUser\">\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n </ng-template>\n </div>\n </div>\n </div>\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\n <div class=\"chats\">\n <!-- Shows Message -->\n <div *ngIf=\"!isLoaded\"\n class=\"spinner\"></div>\n <ng-container *ngIf=\"messagesGroupedByDate\">\n <ng-container *ngFor=\"let item of ObjectKeys(messagesGroupedByDate)\">\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n <div class=\"chat\"\n [ngClass]=\"{\n 'chat-left ms-2': message.sender_id !== currentUser.id,\n 'me-2': message.sender_id === currentUser.id\n }\"\n *ngFor=\"\n let message of messagesGroupedByDate[item];\n trackBy: trackByMessageId;\n let i = index\n \">\n <ng-container *ngIf=\"message.body || message.attachment.url\">\n <div class=\"chat-avatar\">\n <a class=\"avatar\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n data-original-title=\"\">\n <!-- Setting up Avatar Image for Logged In User -->\n <ng-container *ngIf=\"message.sender_id === currentUser.id\">\n <ng-template [ngIf]=\"currentUserImg\"\n [ngIfElse]=\"curDummy\">\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n <ng-template #curDummy>\n <div class=\"dummy-avatar bg-bown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Participant -->\n <ng-container *ngIf=\"message.sender_id !== currentUser.id\">\n <ng-template [ngIf]=\"currentUser && otherUser?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar\">\n <strong>{{\n otherUser?.name\n ? otherUser.name\n .charAt(0)\n .toUpperCase()\n : otherUser.slug\n .charAt(0)\n .toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </ng-container>\n </a>\n </div>\n <div class=\"chat-body\">\n <div class=\"chat-content attachment\"\n *ngIf=\"\n !message?.attachment?.url;\n else withAttachmentRef\n \">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\n ></i>\n <p>{{ message.body }}</p>\n </div>\n\n <ng-template #withAttachmentRef>\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n ></i>\n <div *ngIf=\"message.attachment\"\n class=\"message-attachment\">\n <i *ngIf=\"message.attachment.url\">\n <img\n [src]=\"message.attachment.url\"\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.IMG\n \"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n <video\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.VIDEO\n \"\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n Your browser does not support the video\n tag.\n </video>\n <a\n [attr.href]=\"message.attachment.url\"\n target=\"_blank\"\n >\n <i\n class=\"fa fa-file-download me-2\"\n aria-hidden=\"true\"\n ></i>\n {{\n message.attachment.url\n | common: 'filename'\n }}</a>\n </i>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!messagesGroupedByDate && isLoaded\">\n <div class=\"mt-3 text-center\">No message history.</div>\n </ng-container>\n\n <ng-container *ngIf=\"isFileUploading\">\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n </ng-container>\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n <div class=\"card px-3 py-2 m-0 mb-1\"\n *ngFor=\"let item of attachedFiles; let i = index\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Textbox area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <legend>Textbox area</legend>\n <div class=\"form-control-position emoji-container\">\n <i class=\"icon-emoticon-smile\" (click)=\"showEmoji = !showEmoji\"></i>\n </div>\n <input type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <i class=\"fa fa-paperclip\">\n <input\n id=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n />\n </i>\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"mb-3 position-relative has-icon-left col-2 m-0 mb-1\">\n <legend></legend>\n <button type=\"button\"\n class=\"btn btn-primary d-lg-flex align-items-center btn-send\"\n (click)=\"onSendMessage()\">\n <i class=\"fa fa-paper-plane\"></i><span class=\"d-none d-lg-block ms-1\">Send</span>\n </button>\n </fieldset>\n </form>\n </div>\n </ng-template>\n\n <ng-template #nomessage>\n <div class=\"container-fluid pw-tab overflow-hidden nomessage-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing in the chat search field the name of the member you\n want to send a message and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-dblcheck{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media (min-width: 768px){.nomessage-center{margin-left:auto;width:calc(100% - 300px)}}\n"] }]
460
+ args: [{ template: "<div class=\"chat-application mt-5\">\n <div class=\"content-overlay\"></div>\n\n <div *ngIf=\"isChatLoading\"\n class=\"text-center\">\n <p-progressSpinner> </p-progressSpinner>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading\">\n <div class=\"chat-sidebar float-start d-none d-sm-none d-md-block d-lg-block\">\n <div class=\"chat-sidebar-content\">\n <div class=\"chat-fixed-search p-2\">\n <div class=\"d-flex\">\n <p-autoComplete [(ngModel)]=\"searchText\"\n #searchTxt\n placeholder=\"Type here to search member\"\n [ngModelOptions]=\"{ standalone: true }\"\n field=\"first_name\"\n (onSelect)=\"onMemberSelection(searchText)\"\n [suggestions]=\"recipients\"\n (completeMethod)=\"recipientSearch()\">\n <ng-template let-item\n pTemplate=\"item\">\n <div>\n {{ item.first_name + ' ' }}\n {{ item.last_name ? item.last_name : '' }}\n </div>\n </ng-template>\n </p-autoComplete>\n </div>\n </div>\n\n <!-- Thread/conversation List -->\n <div id=\"users-list\"\n class=\"list-group position-relative\">\n <div class=\"users-list-padding\"\n *ngIf=\"conversations?.length\">\n <a class=\"list-group-item no-border\"\n (click)=\"onParticipantClick(conversation)\"\n *ngFor=\"let conversation of conversations\">\n <div class=\"d-flex\">\n <span class=\"avatar avatar-md avatar-away\">\n <ng-template [ngIf]=\"conversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"conversation.to.avatar\"\n width=\"40\"\n height=\"40\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar me-2\">\n <strong>{{\n conversation.participants\n ? conversation.to.slug.charAt(0).toUpperCase()\n : conversation.to.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </span>\n <div class=\"clearfix\">\n <h6 class=\"list-group-item-heading mb-1\">\n {{\n conversation.to?.name\n ? conversation.to.name\n : conversation.to.slug\n }}\n <span class=\"font-small-3 float-end ms-5 ps-5\">\n <span class=\"badge badge-pill bg-primary mx-1\"\n *ngIf=\"conversation.unread_count\">\n {{ conversation.unread_count }}\n </span>\n {{ conversation.created_at | date: 'shortTime' }}\n </span>\n </h6>\n <p class=\"list-group-item-text text-muted\">\n {{ conversation.latest_message?.body | textTruncate: 25 }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template [ngIf]=\"!isChatLoading && conversations?.length\"\n [ngIfElse]=\"nomessage\">\n <!-- Chat Header -->\n <div class=\"chat-name p-2 bg-white\"\n *ngIf=\"otherUser\">\n <div class=\"d-flex\">\n <span class=\"chat-app-sidebar-toggle ft-align-justify font-large-1 me-2 d-none d-block d-sm-block d-md-none\"\n (click)=\"toggleSidebar()\"></span>\n <div class=\"clearfix\">\n <ng-template [ngIf]=\"currentConversation?.to?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"currentConversation?.to?.avatar\"\n width=\"40\"\n height=\"40\"\n class=\"rounded-circle me-1\"\n alt=\"avatar\"\n onerror=\"this.onerror=null;this.src='assets/img/icons/male.png';\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div *ngIf=\"currentUser\"\n class=\"dummy-avatar me-2\">\n <strong>{{\n otherUser?.name\n ? otherUser.name.charAt(0).toUpperCase()\n : otherUser.slug.charAt(0).toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"currentUser\">\n <strong class=\"mt-2\">{{\n otherUser.name ? otherUser.name : otherUser.slug\n }}</strong>\n </ng-template>\n </div>\n </div>\n </div>\n\n <!-- Chat Window -->\n <div class=\"chat-app-window\"\n id=\"chats-wrapper\"\n #scrollMe\n infinite-scroll\n [infiniteScrollDistance]=\"scrollDistance\"\n [scrollWindow]=\"false\"\n [infiniteScrollUpDistance]=\"scrollUpDistance\"\n [infiniteScrollThrottle]=\"throttle\"\n [alwaysCallback]=\"true\"\n (scrolledUp)=\"onUp($event, selectedConversationId)\">\n <!-- [scrollTop]=\"scrollMe.scrollHeight\" -->\n <!-- <ngx-file-drop (onFileDrop)=\"dropped($event)\" (onFileOver)=\"fileOver($event)\"> -->\n <div class=\"chats\">\n <!-- Shows Message -->\n <div *ngIf=\"!isLoaded\"\n class=\"spinner\"></div>\n <ng-container *ngIf=\"messagesGroupedByDate\">\n <ng-container *ngFor=\"let item of ObjectKeys(messagesGroupedByDate)\">\n <strong class=\"badge bg-secondary mb-1\">{{\n messagesGroupedByDate[item][0]?.created_at | date\n }}</strong>\n <!-- Every Message -->\n <div class=\"chat\"\n [ngClass]=\"{\n 'chat-left ms-2': message.sender_id !== currentUser.id,\n 'me-2': message.sender_id === currentUser.id\n }\"\n *ngFor=\"\n let message of messagesGroupedByDate[item];\n trackBy: trackByMessageId;\n let i = index\n \">\n <ng-container *ngIf=\"message.body || message.attachment.url\">\n <div class=\"chat-avatar\">\n <a class=\"avatar\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n data-original-title=\"\">\n <!-- Setting up Avatar Image for Logged In User -->\n <ng-container *ngIf=\"message.sender_id === currentUser.id\">\n <ng-template [ngIf]=\"currentUserImg\"\n [ngIfElse]=\"curDummy\">\n <img [src]=\"currentUserImg\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n <ng-template #curDummy>\n <div class=\"dummy-avatar bg-bown\">\n <strong>{{\n currentUser?.name\n ? currentUser.name\n .charAt(0)\n .toUpperCase()\n : currentUser.slug\n .charAt(0)\n .toUpperCase()\n }}\n </strong>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Participant -->\n <ng-container *ngIf=\"message.sender_id !== currentUser.id\">\n <ng-template [ngIf]=\"currentUser && otherUser?.avatar\"\n [ngIfElse]=\"dummyAvatar\">\n <img [src]=\"otherUser?.avatar\"\n class=\"d-flex height-50 rounded-circle\"\n alt=\"avatar\" />\n </ng-template>\n\n <ng-template #dummyAvatar>\n <div class=\"dummy-avatar\">\n <strong>{{\n otherUser?.name\n ? otherUser.name\n .charAt(0)\n .toUpperCase()\n : otherUser.slug\n .charAt(0)\n .toUpperCase()\n }}</strong>\n </div>\n </ng-template>\n </ng-container>\n </a>\n </div>\n <div class=\"chat-body\">\n <div class=\"chat-content attachment\"\n *ngIf=\"\n !message?.attachment?.url;\n else withAttachmentRef\n \">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n ></i>\n <i\n *ngIf=\"\n message.sender_id === currentUser.id &&\n message.is_open\n \"\n class=\"fa fa-check-double msg-dblcheck\"\n ></i>\n <p>{{ message.body }}</p>\n </div>\n\n <ng-template #withAttachmentRef>\n <div class=\"chat-content with-attachment\">\n <small class=\"message-time\">{{\n message.created_at | date: 'shortTime'\n }}</small>\n <i\n class=\"far fa-trash-alt btn-delete danger\"\n aria-hidden=\"true\"\n *ngIf=\"message.sender_id === currentUser.id\"\n (click)=\"onDeleteMessage(message)\"\n ></i>\n <div *ngIf=\"message.attachment\"\n class=\"message-attachment\">\n <i *ngIf=\"message.attachment.url\">\n <img\n [src]=\"message.attachment.url\"\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.IMG\n \"\n class=\"img-thumbnail\"\n alt=\"message attachment\"\n />\n <video\n *ngIf=\"\n message?.messageType ===\n ATTACHMENT_TYPE.VIDEO\n \"\n width=\"320\"\n height=\"240\"\n controls\n class=\"img-thumbnail\"\n >\n <source\n [src]=\"message.attachment.url\"\n type=\"video/mp4\"\n />\n Your browser does not support the video\n tag.\n </video>\n <a\n [attr.href]=\"message.attachment.url\"\n target=\"_blank\"\n >\n <i\n class=\"fa fa-file-download me-2\"\n aria-hidden=\"true\"\n ></i>\n {{\n message.attachment.url\n | common: 'filename'\n }}</a>\n </i>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!messagesGroupedByDate && isLoaded\">\n <div class=\"mt-3 text-center\">No message history.</div>\n </ng-container>\n\n <ng-container *ngIf=\"isFileUploading\">\n <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n </ng-container>\n\n <!-- Shows Metadata of the file being uploaded -->\n <div class=\"compose-message-attachment\">\n <div class=\"m-0\">\n <div class=\"card px-3 py-2 m-0 mb-1\"\n *ngFor=\"let item of attachedFiles; let i = index\">\n <div class=\"card-body\">\n <div class=\"d-inline-block file-name\">{{ item.name }}</div>\n <div class=\"d-inline-block file-size\">{{ item.size }}</div>\n <div class=\"d-inline-block float-end file-remove\"\n (click)=\"onRemoveAttachment(item)\">\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- </ngx-file-drop> -->\n </div>\n\n <div [hidden]=\"!showEmoji\">\n <emoji-mart title=\"Pick your emoji\u2026\"\n set=\"facebook\"\n [showPreview]=\"false\"\n (emojiSelect)=\"onEmojiSelect($event)\"\n [emojiSize]=\"30\">\n </emoji-mart>\n </div>\n\n <!-- Compose Textbox area -->\n <div class=\"chat-app-form bg-blue-grey bg-lighten-5\">\n <form class=\"chat-app-input row\">\n <fieldset class=\"mb-3 position-relative has-icon-left col-10 m-0 mb-1\">\n <div class=\"form-control-position emoji-container\">\n <i class=\"icon-emoticon-smile\" (click)=\"showEmoji = !showEmoji\"></i>\n </div>\n <input type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n placeholder=\"Type your message here...\"\n (keydown.enter)=\"onSendMessage(); $event.preventDefault()\"\n #messageInput />\n <div class=\"form-control-position control-position-right\">\n <div class=\"image-upload\">\n <label for=\"file-input\">\n <i class=\"fa fa-paperclip\">\n <input\n id=\"file-input\"\n type=\"file\"\n (change)=\"fileChangeListener($event)\"\n size=\"60\"\n />\n </i>\n </label>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"mb-3 position-relative has-icon-left col-2 m-0 mb-1\">\n <button type=\"button\"\n class=\"btn btn-primary d-lg-flex align-items-center btn-send\"\n (click)=\"onSendMessage()\">\n <i class=\"fa fa-paper-plane\"></i><span class=\"d-none d-lg-block ms-1\">Send</span>\n </button>\n </fieldset>\n </form>\n </div>\n </ng-template>\n\n <ng-template #nomessage>\n <div class=\"container-fluid pw-tab overflow-hidden nomessage-center\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body text-center mt-5\">\n <div>\n <img src=\"/assets/img/icons/empty-chat-icon.png\"\n alt=\"No Chat\" />\n </div>\n <div class=\"h4 mt-4\">No messages yet!</div>\n <div class=\"mt-3\">\n <p>It looks like you haven't shared or received any messages yet.</p>\n <p>\n Start typing in the chat search field the name of the member you\n want to send a message and send them a message.\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}#drift-widget-container{display:none!important}#file-input{height:0;visibility:hidden;width:0}.message-attachment{color:#fff}.compose-message-attachment{bottom:0;color:#676767;left:0;position:absolute;width:55%}.compose-message-attachment .file-name{font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:400px}.compose-message-attachment .file-size{width:100px}.compose-message-attachment .file-remove{width:45px}.compose-message-attachment .file-remove i{margin-left:37px;margin-top:7px}.fa-spinner{font-size:24px}.fa-paperclip{font-size:19px;margin-top:7px;width:13px}.dummy-avatar{background-color:#ff586b;border-radius:50%;color:#fff;font-size:18px;height:40px;line-height:40px;text-align:center;width:40px;display:inline-block}.card{border:1px solid rgb(204,204,204)}.msg-dblcheck{color:#4fc3f7;font-size:10px;left:-13px;position:absolute;top:11px}.btn-delete{display:none;left:-85px;position:absolute;top:11px}.chat-body:hover .btn-delete{display:block!important}.bg-brown{background-color:#cc6000}.btn-send{border-radius:5px;padding:7px 13px}@keyframes spinner{to{transform:rotate(360deg)}}.spinner{animation:spinner .6s linear infinite!important;border:3px solid rgb(204,204,204);border-radius:50%;border-top-color:#000;box-sizing:border-box;content:\"\";height:50px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:10%;width:50px}@media (min-width: 768px){.nomessage-center{margin-left:auto;width:calc(100% - 300px)}}.bg-blue-grey{color:#373b3e!important}\n"] }]
461
461
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.MailBoxService }, { type: i1.ProfileService }, { type: i1.WebsocketService }, { type: i0.Injector }]; }, propDecorators: { messageInputRef: [{
462
462
  type: ViewChild,
463
463
  args: ['messageInput', { static: false }]
@@ -505,7 +505,13 @@ MessagingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
505
505
  EmojiModule,
506
506
  NgxFileDropModule,
507
507
  InfiniteScrollModule,
508
- ScrollingModule], exports: [RouterModule, ChatBoxComponent] });
508
+ ScrollingModule,
509
+ DatePipe,
510
+ FormsModule,
511
+ InfiniteScrollModule,
512
+ NgForOf,
513
+ NgIf,
514
+ PickerModule], exports: [RouterModule, ChatBoxComponent] });
509
515
  MessagingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MessagingModule, imports: [CommonModule,
510
516
  PipesModule,
511
517
  FormsModule,
@@ -516,7 +522,10 @@ MessagingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
516
522
  EmojiModule,
517
523
  NgxFileDropModule,
518
524
  InfiniteScrollModule,
519
- ScrollingModule, RouterModule] });
525
+ ScrollingModule,
526
+ FormsModule,
527
+ InfiniteScrollModule,
528
+ PickerModule, RouterModule] });
520
529
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: MessagingModule, decorators: [{
521
530
  type: NgModule,
522
531
  args: [{
@@ -531,7 +540,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
531
540
  EmojiModule,
532
541
  NgxFileDropModule,
533
542
  InfiniteScrollModule,
534
- ScrollingModule
543
+ ScrollingModule,
544
+ DatePipe,
545
+ FormsModule,
546
+ InfiniteScrollModule,
547
+ NgForOf,
548
+ NgIf,
549
+ PickerModule
535
550
  ],
536
551
  declarations: [ChatBoxComponent],
537
552
  exports: [RouterModule, ChatBoxComponent]