@muraai/mnl-chat 0.0.1 → 0.2.0-alpha-db495b1

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.
Files changed (87) hide show
  1. package/esm2022/lib/chat.module.mjs +87 -0
  2. package/esm2022/lib/components/ng-chat/ng-chat.component.mjs +594 -0
  3. package/esm2022/lib/components/ng-chat-friends-list/ng-chat-friends-list.component.mjs +166 -0
  4. package/esm2022/lib/components/ng-chat-options/ng-chat-options.component.mjs +29 -0
  5. package/esm2022/lib/components/ng-chat-window/ng-chat-window.component.mjs +272 -0
  6. package/esm2022/lib/core/chat-adapter.mjs +18 -0
  7. package/esm2022/lib/core/chat-controller.mjs +2 -0
  8. package/esm2022/lib/core/chat-group-adapter.mjs +2 -0
  9. package/esm2022/lib/core/chat-option.mjs +2 -0
  10. package/esm2022/lib/core/chat-participant-status-descriptor.mjs +6 -0
  11. package/{esm2020 → esm2022}/lib/core/chat-participant-status.enum.mjs +1 -1
  12. package/esm2022/lib/core/chat-participant-type.enum.mjs +6 -0
  13. package/esm2022/lib/core/chat-participant.mjs +2 -0
  14. package/esm2022/lib/core/default-file-upload-adapter.mjs +43 -0
  15. package/esm2022/lib/core/file-upload-adapter.mjs +2 -0
  16. package/esm2022/lib/core/group.mjs +14 -0
  17. package/esm2022/lib/core/guid.mjs +11 -0
  18. package/esm2022/lib/core/localization.mjs +2 -0
  19. package/esm2022/lib/core/message-counter.mjs +25 -0
  20. package/esm2022/lib/core/message-type.enum.mjs +7 -0
  21. package/esm2022/lib/core/message.mjs +7 -0
  22. package/esm2022/lib/core/paged-history-chat-adapter.mjs +9 -0
  23. package/esm2022/lib/core/participant-metadata.mjs +6 -0
  24. package/esm2022/lib/core/participant-response.mjs +3 -0
  25. package/esm2022/lib/core/scroll-direction.enum.mjs +6 -0
  26. package/esm2022/lib/core/theme.enum.mjs +7 -0
  27. package/esm2022/lib/core/user.mjs +7 -0
  28. package/esm2022/lib/core/window.mjs +20 -0
  29. package/esm2022/lib/firstLetter.pipe.mjs +20 -0
  30. package/esm2022/lib/material.module.mjs +65 -0
  31. package/esm2022/lib/pipes/emojify.pipe.mjs +41 -0
  32. package/esm2022/lib/pipes/group-message-display-name.pipe.mjs +24 -0
  33. package/esm2022/lib/pipes/linkfy.pipe.mjs +34 -0
  34. package/esm2022/lib/pipes/sanitize.pipe.mjs +21 -0
  35. package/esm2022/lib/services/chat.service.mjs +14 -0
  36. package/esm2022/muraai-mnl-chat.mjs +5 -0
  37. package/esm2022/public-api.mjs +25 -0
  38. package/fesm2022/muraai-mnl-chat.mjs +1507 -0
  39. package/fesm2022/muraai-mnl-chat.mjs.map +1 -0
  40. package/lib/components/ng-chat/ng-chat.component.d.ts +3 -1
  41. package/lib/components/ng-chat-friends-list/ng-chat-friends-list.component.d.ts +11 -3
  42. package/lib/components/ng-chat-options/ng-chat-options.component.d.ts +1 -1
  43. package/lib/components/ng-chat-window/ng-chat-window.component.d.ts +3 -1
  44. package/lib/core/chat-participant.d.ts +12 -0
  45. package/lib/material.module.d.ts +6 -3
  46. package/package.json +7 -13
  47. package/src/assets/themes/ng-chat.theme.dark.scss +1 -1
  48. package/esm2020/lib/chat.module.mjs +0 -87
  49. package/esm2020/lib/components/ng-chat/ng-chat.component.mjs +0 -588
  50. package/esm2020/lib/components/ng-chat-friends-list/ng-chat-friends-list.component.mjs +0 -128
  51. package/esm2020/lib/components/ng-chat-options/ng-chat-options.component.mjs +0 -29
  52. package/esm2020/lib/components/ng-chat-window/ng-chat-window.component.mjs +0 -247
  53. package/esm2020/lib/core/chat-adapter.mjs +0 -18
  54. package/esm2020/lib/core/chat-controller.mjs +0 -2
  55. package/esm2020/lib/core/chat-group-adapter.mjs +0 -2
  56. package/esm2020/lib/core/chat-option.mjs +0 -2
  57. package/esm2020/lib/core/chat-participant-status-descriptor.mjs +0 -6
  58. package/esm2020/lib/core/chat-participant-type.enum.mjs +0 -6
  59. package/esm2020/lib/core/chat-participant.mjs +0 -2
  60. package/esm2020/lib/core/default-file-upload-adapter.mjs +0 -43
  61. package/esm2020/lib/core/file-upload-adapter.mjs +0 -2
  62. package/esm2020/lib/core/group.mjs +0 -14
  63. package/esm2020/lib/core/guid.mjs +0 -11
  64. package/esm2020/lib/core/localization.mjs +0 -2
  65. package/esm2020/lib/core/message-counter.mjs +0 -25
  66. package/esm2020/lib/core/message-type.enum.mjs +0 -7
  67. package/esm2020/lib/core/message.mjs +0 -7
  68. package/esm2020/lib/core/paged-history-chat-adapter.mjs +0 -9
  69. package/esm2020/lib/core/participant-metadata.mjs +0 -6
  70. package/esm2020/lib/core/participant-response.mjs +0 -3
  71. package/esm2020/lib/core/scroll-direction.enum.mjs +0 -6
  72. package/esm2020/lib/core/theme.enum.mjs +0 -7
  73. package/esm2020/lib/core/user.mjs +0 -7
  74. package/esm2020/lib/core/window.mjs +0 -20
  75. package/esm2020/lib/firstLetter.pipe.mjs +0 -20
  76. package/esm2020/lib/material.module.mjs +0 -50
  77. package/esm2020/lib/pipes/emojify.pipe.mjs +0 -41
  78. package/esm2020/lib/pipes/group-message-display-name.pipe.mjs +0 -24
  79. package/esm2020/lib/pipes/linkfy.pipe.mjs +0 -34
  80. package/esm2020/lib/pipes/sanitize.pipe.mjs +0 -21
  81. package/esm2020/lib/services/chat.service.mjs +0 -14
  82. package/esm2020/muraai-mnl-chat.mjs +0 -5
  83. package/esm2020/public-api.mjs +0 -25
  84. package/fesm2015/muraai-mnl-chat.mjs +0 -1426
  85. package/fesm2015/muraai-mnl-chat.mjs.map +0 -1
  86. package/fesm2020/muraai-mnl-chat.mjs +0 -1424
  87. package/fesm2020/muraai-mnl-chat.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"muraai-mnl-chat.mjs","sources":["../../../../libs/chat/src/lib/material.module.ts","../../../../libs/chat/src/lib/services/chat.service.ts","../../../../libs/chat/src/lib/core/message-type.enum.ts","../../../../libs/chat/src/lib/core/window.ts","../../../../libs/chat/src/lib/core/chat-participant-status.enum.ts","../../../../libs/chat/src/lib/core/scroll-direction.enum.ts","../../../../libs/chat/src/lib/core/chat-adapter.ts","../../../../libs/chat/src/lib/core/paged-history-chat-adapter.ts","../../../../libs/chat/src/lib/core/default-file-upload-adapter.ts","../../../../libs/chat/src/lib/core/theme.enum.ts","../../../../libs/chat/src/lib/core/guid.ts","../../../../libs/chat/src/lib/core/chat-participant-type.enum.ts","../../../../libs/chat/src/lib/core/group.ts","../../../../libs/chat/src/lib/core/message-counter.ts","../../../../libs/chat/src/lib/core/chat-participant-status-descriptor.ts","../../../../libs/chat/src/lib/pipes/sanitize.pipe.ts","../../../../libs/chat/src/lib/firstLetter.pipe.ts","../../../../libs/chat/src/lib/components/ng-chat-friends-list/ng-chat-friends-list.component.ts","../../../../libs/chat/src/lib/components/ng-chat-friends-list/ng-chat-friends-list.component.html","../../../../libs/chat/src/lib/core/message.ts","../../../../libs/chat/src/lib/pipes/emojify.pipe.ts","../../../../libs/chat/src/lib/pipes/linkfy.pipe.ts","../../../../libs/chat/src/lib/pipes/group-message-display-name.pipe.ts","../../../../libs/chat/src/lib/components/ng-chat-window/ng-chat-window.component.ts","../../../../libs/chat/src/lib/components/ng-chat-window/ng-chat-window.component.html","../../../../libs/chat/src/lib/components/ng-chat/ng-chat.component.ts","../../../../libs/chat/src/lib/components/ng-chat/ng-chat.component.html","../../../../libs/chat/src/lib/components/ng-chat-options/ng-chat-options.component.ts","../../../../libs/chat/src/lib/components/ng-chat-options/ng-chat-options.component.html","../../../../libs/chat/src/lib/chat.module.ts","../../../../libs/chat/src/lib/core/user.ts","../../../../libs/chat/src/lib/core/participant-response.ts","../../../../libs/chat/src/lib/core/participant-metadata.ts","../../../../libs/chat/src/public-api.ts","../../../../libs/chat/src/muraai-mnl-chat.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatListModule} from '@angular/material/list';\nimport {MatIconModule} from '@angular/material/icon';\nimport {MatInputModule} from '@angular/material/input';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatCardModule} from '@angular/material/card';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport {MatMenuModule} from '@angular/material/menu';\nimport {MatTooltipModule} from '@angular/material/tooltip';\nexport function modules() {\n return [\n MatButtonModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n FormsModule,\n ReactiveFormsModule,\n MatMenuModule,\n MatListModule,\n MatCardModule,\n MatTooltipModule\n ];\n}\n@NgModule({\n imports: modules(),\n exports: modules()\n})\nexport class ChatMaterialModule {}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ChatService {\n constructor() {}\n}\n","export enum MessageType\n{\n Text = 1,\n File = 2,\n Image = 3\n}\n","import { Message } from \"./message\";\n// import { User } from \"./user\";\n// import { ChatParticipantType } from \"./chat-participant-type.enum\";\n// import { ChatParticipantStatus } from \"./chat-participant-status.enum\";\n// import { Group } from \"./group\";\nimport { IChatParticipant } from \"./chat-participant\";\n\nexport class Window\n{\n constructor(participant: IChatParticipant, isLoadingHistory: boolean, isCollapsed: boolean)\n {\n this.participant = participant;\n this.messages = [];\n this.isLoadingHistory = isLoadingHistory;\n this.hasFocus = false; // This will be triggered when the 'newMessage' input gets the current focus\n this.isCollapsed = isCollapsed;\n this.hasMoreMessages = false;\n this.historyPage = 0;\n }\n\n public participant: IChatParticipant;\n public messages: Message[] = [];\n public newMessage?: string = \"\";\n\n // UI Behavior properties\n public isCollapsed?: boolean = false;\n public isLoadingHistory: boolean = false;\n public hasFocus: boolean = false;\n public hasMoreMessages: boolean = true;\n public historyPage: number = 0;\n}\n","export enum ChatParticipantStatus\n{\n Online,\n Busy,\n Away,\n Offline\n}\n","export enum ScrollDirection {\n Top,\n Bottom\n}","import { Observable } from 'rxjs';\nimport { Message } from \"./message\";\n// import { User } from \"./user\";\nimport { ParticipantResponse } from \"./participant-response\";\nimport { IChatParticipant } from './chat-participant';\n\nexport abstract class ChatAdapter\n{\n // ### Abstract adapter methods ###\n\n public abstract listFriends(): Observable<ParticipantResponse[]>;\n \n public abstract getMessageHistory(destinataryId: any): Observable<Message[]>;\n\n public abstract sendMessage(message: Message): void;\n\n // ### Adapter/Chat income/ingress events ###\n\n public onFriendsListChanged(participantsResponse: ParticipantResponse[]): void\n {\n this.friendsListChangedHandler(participantsResponse);\n }\n\n public onMessageReceived(participant: IChatParticipant, message: Message): void\n {\n this.messageReceivedHandler(participant, message);\n }\n \n // Event handlers\n /** @internal */\n friendsListChangedHandler: (participantsResponse: ParticipantResponse[]) => void = (participantsResponse: ParticipantResponse[]) => {};\n /** @internal */\n messageReceivedHandler: (participant: IChatParticipant, message: Message) => void = (participant: IChatParticipant, message: Message) => {};\n}\n","import { Observable } from 'rxjs';\nimport { Message } from \"./message\";\n// import { User } from \"./user\";\nimport { ChatAdapter } from \"./chat-adapter\";\n\n/**\n * @description Chat Adapter decorator class that adds pagination to load the history of messagesr.\n * You will need an existing @see ChatAdapter implementation\n */\nexport abstract class PagedHistoryChatAdapter extends ChatAdapter\n{\n abstract getMessageHistoryByPage(destinataryId: any, size: number, page: number) : Observable<Message[]>;\n}\n","import { IFileUploadAdapter } from './file-upload-adapter';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { Message } from './message';\n\n/*import { IFileUploadAdapter } from './file-upload-adapter';\nimport { HttpClient, HttpRequest, HttpEventType, HttpResponse, HttpHeaders } from '@angular/common/http';\nimport { Observable, Subject } from 'rxjs';\nimport { User } from './user';\nimport { Message } from './message';*/\n\nexport class DefaultFileUploadAdapter implements IFileUploadAdapter\n{\n /**\n * @summary Basic file upload adapter implementation for HTTP request form file consumption\n * @param _serverEndpointUrl The API endpoint full qualified address that will receive a form file to process and return the metadata.\n */\n constructor(private _serverEndpointUrl: string, private _http: HttpClient) {\n }\n\n uploadFile(file: File, participantId: any): Observable<Message> {\n const formData: FormData = new FormData();\n\n //formData.append('ng-chat-sender-userid', currentUserId);\n formData.append('ng-chat-participant-id', participantId);\n formData.append('file', file, file.name);\n\n return this._http.post<Message>(this._serverEndpointUrl, formData);\n\n // TODO: Leaving this if we want to track upload progress in detail in the future. Might need a different Subject generic type wrapper\n // const fileRequest = new HttpRequest('POST', this._serverEndpointUrl, formData, {\n // reportProgress: true\n // });\n\n // const uploadProgress = new Subject<number>();\n // const uploadStatus = uploadProgress.asObservable();\n\n //const responsePromise = new Subject<Message>();\n\n // this._http\n // .request(fileRequest)\n // .subscribe(event => {\n // // if (event.type == HttpEventType.UploadProgress)\n // // {\n // // const percentDone = Math.round(100 * event.loaded / event.total);\n\n // // uploadProgress.next(percentDone);\n // // }\n // // else if (event instanceof HttpResponse)\n // // {\n \n // // uploadProgress.complete();\n // // }\n // });\n }\n}\n","export enum Theme\n{\n Custom = 'custom-theme',\n Light = 'light-theme',\n Dark = 'dark-theme'\n}\n","// Poached from: https://github.com/Steve-Fenton/TypeScriptUtilities\n// @dynamic\nexport class Guid {\n static newGuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);\n return v.toString(16);\n });\n }\n}\n","export enum ChatParticipantType\n{\n User,\n Group\n}\n","import { Guid } from \"./guid\";\nimport { User } from \"./user\";\nimport { ChatParticipantStatus } from \"./chat-participant-status.enum\";\nimport { IChatParticipant } from \"./chat-participant\";\nimport { ChatParticipantType } from \"./chat-participant-type.enum\";\n\nexport class Group implements IChatParticipant\n{\n constructor(participants: User[])\n {\n this.chattingTo = participants;\n this.status = ChatParticipantStatus.Online;\n\n // TODO: Add some customization for this in future releases\n this.displayName = participants.map((p) => p.displayName).sort((first, second) => second > first ? -1 : 1).join(\", \");\n }\n\n public id: string = Guid.newGuid();\n public chattingTo: User[];\n\n public readonly participantType: ChatParticipantType = ChatParticipantType.Group;\n\n public status: ChatParticipantStatus;\n public avatar: string | null;\n public displayName: string;\n}\n","import { Window } from './window';\n\nexport class MessageCounter\n{\n public static formatUnreadMessagesTotal(totalUnreadMessages: number): string\n {\n if (totalUnreadMessages > 0){\n\n if (totalUnreadMessages > 99)\n return \"99+\";\n else\n return String(totalUnreadMessages);\n }\n\n // Empty fallback.\n return \"\";\n }\n\n /**\n * Returns a formatted string containing the total unread messages of a chat window.\n * @param window The window instance to count the unread total messages.\n * @param currentUserId The current chat instance user id. In this context it would be the sender.\n */\n public static unreadMessagesTotal(window: Window, currentUserId: any): string\n {\n let totalUnreadMessages = 0;\n\n if (window){\n totalUnreadMessages = window.messages.filter(x => x.fromId != currentUserId && !x.dateSeen).length;\n }\n \n return MessageCounter.formatUnreadMessagesTotal(totalUnreadMessages);\n }\n}\n","import { ChatParticipantStatus } from './chat-participant-status.enum';\nimport { Localization } from './localization'\n \nexport function chatParticipantStatusDescriptor(status: ChatParticipantStatus, localization: Localization) {\n const currentStatus = ChatParticipantStatus[status].toString().toLowerCase();\n \n return localization.statusDescription[currentStatus];\n}","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\n\n/*\n * Sanitizes an URL resource\n*/\n@Pipe({name: 'sanitize'})\nexport class SanitizePipe implements PipeTransform {\n constructor(protected sanitizer: DomSanitizer) {}\n\n transform(url: string): SafeResourceUrl {\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'firstLetterPipe' })\n\nexport class FirstLetterPipe implements PipeTransform {\n transform(value: string): string {\n // const parts = value.split(\" \");\n // const firstLetter = parts[0][0];\n // const secondLetters = parts.length > 1 ? parts[1].slice(0, 2) : '';\n let parts = value?.split(\" \");\n\n let firstLetter = parts[0].slice(0, 1);\n\n let secondLetters = parts.length > 1 ? parts[1].slice(0, 1) : '';\n return (firstLetter.toUpperCase() + secondLetters.toUpperCase())\n }\n}","/* eslint-disable */\nimport { Component, Input, Output, EventEmitter, ViewEncapsulation, OnChanges, SimpleChanges, OnInit, OnDestroy } from '@angular/core';\nimport { Localization } from '../../core/localization';\nimport { IChatOption } from '../../core/chat-option';\nimport { ChatParticipantStatus } from \"../../core/chat-participant-status.enum\";\nimport { IChatParticipant } from \"../../core/chat-participant\";\nimport { User } from \"../../core/user\";\nimport { Window } from \"../../core/window\";\nimport { ParticipantResponse } from \"../../core/participant-response\";\nimport { MessageCounter } from \"../../core/message-counter\";\nimport { chatParticipantStatusDescriptor } from '../../core/chat-participant-status-descriptor';\nimport { debounceTime, Subject, takeUntil } from 'rxjs';\n\n@Component({\n selector: 'ng-chat-friends-list',\n templateUrl: './ng-chat-friends-list.component.html',\n styleUrls: ['./ng-chat-friends-list.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class NgChatFriendsListComponent implements OnChanges, OnInit, OnDestroy {\n constructor() {\n \n }\n\n @Input()\n public participants: IChatParticipant[];\n\n @Input()\n public participantsResponse: ParticipantResponse[];\n\n @Input()\n public participantsInteractedWith: IChatParticipant[] = [];\n\n @Input()\n public windows: Window[];\n\n @Input()\n public userId: any;\n\n @Input()\n public localization: Localization;\n\n @Input()\n public shouldDisplay: boolean;\n\n @Input()\n public isCollapsed: boolean;\n\n @Input()\n public searchEnabled: boolean;\n\n @Input()\n public currentActiveOption: IChatOption | null;\n\n @Output()\n public onParticipantClicked: EventEmitter<IChatParticipant> = new EventEmitter();\n\n @Output()\n public onOptionPromptCanceled: EventEmitter<any> = new EventEmitter();\n\n @Output()\n public onOptionPromptConfirmed: EventEmitter<any> = new EventEmitter();\n @Input()\n public hideFriendsList: boolean =false ;\n\n @Output()\n public onCloseWindowClick:EventEmitter<boolean> = new EventEmitter<boolean>()\n \n @Output()\n public searchInputChanged = new EventEmitter();\n\n private searchInputSubject = new Subject<string>();\n\n \n\n public selectedUsersFromFriendsList: User[] = [];\n\n public searchInput: string = '';\n private destroy$ = new Subject<void>();\n\n // Exposes enums and functions for the ng-template\n public ChatParticipantStatus = ChatParticipantStatus;\n public chatParticipantStatusDescriptor = chatParticipantStatusDescriptor;\n\n ngOnInit() {\n this.initializeSearchInputListener();\n }\n ngOnChanges(changes: SimpleChanges) {\n if (this.currentActiveOption) {\n const currentOptionTriggeredBy = this.currentActiveOption && this.currentActiveOption.chattingTo.participant.id;\n const isActivatedUserInSelectedList = (this.selectedUsersFromFriendsList.filter(item => item.id == currentOptionTriggeredBy)).length > 0;\n\n if (!isActivatedUserInSelectedList) {\n this.selectedUsersFromFriendsList = this.selectedUsersFromFriendsList.concat(this.currentActiveOption.chattingTo.participant as User);\n }\n }\n }\n\n get filteredParticipants(): IChatParticipant[] {\n const query = (this.searchInput || '').trim().toLowerCase();\n if (!query) return this.participants;\n\n return this.participants.filter(participant => {\n const name = participant.displayName?.toLowerCase() || '';\n if (name.includes(query)) return true;\n\n const metadata = participant.metadata;\n if (!metadata) return false;\n\n const fieldsToSearch = [\n metadata.primary,\n metadata.secondary,\n metadata.tertiary\n ];\n\n return fieldsToSearch.some(field =>\n typeof field === 'string' && field.toLowerCase().includes(query)\n );\n });\n }\n\n isUserSelectedFromFriendsList(user: User) : boolean\n {\n return (this.selectedUsersFromFriendsList.filter(item => item.id == user.id)).length > 0\n }\n\n unreadMessagesTotalByParticipant(participant: IChatParticipant): string\n {\n let openedWindow = this.windows.find(x => x.participant.id == participant.id);\n\n if (openedWindow){\n return MessageCounter.unreadMessagesTotal(openedWindow, this.userId);\n }\n else\n {\n let totalUnreadMessages = this.participantsResponse\n .filter(x => x.participant.id == participant.id && !this.participantsInteractedWith.find(u => u.id == participant.id) && x.metadata && x.metadata.totalUnreadMessages > 0)\n .map((participantResponse) => {\n return participantResponse.metadata.totalUnreadMessages\n })[0];\n\n return MessageCounter.formatUnreadMessagesTotal(totalUnreadMessages);\n }\n }\n\n cleanUpUserSelection = () => this.selectedUsersFromFriendsList = [];\n\n // Toggle friends list visibility\n onChatTitleClicked(): void\n {\n this.isCollapsed = !this.isCollapsed;\n }\n\n onFriendsListCheckboxChange(selectedUser: User, isChecked: boolean): void\n {\n if(isChecked) {\n this.selectedUsersFromFriendsList.push(selectedUser);\n }\n else\n {\n this.selectedUsersFromFriendsList.splice(this.selectedUsersFromFriendsList.indexOf(selectedUser), 1);\n }\n }\n\n onUserClick(clickedUser: User): void\n {\n this.onParticipantClicked.emit(clickedUser);\n }\n\n onFriendsListActionCancelClicked(): void\n {\n this.onOptionPromptCanceled.emit();\n this.cleanUpUserSelection();\n }\n\n onFriendsListActionConfirmClicked() : void\n {\n this.onOptionPromptConfirmed.emit(this.selectedUsersFromFriendsList);\n this.cleanUpUserSelection();\n }\n onCloseWindow(){\n this.searchInput = '';\n this.onCloseWindowClick.emit(true)\n\n \n }\n\n onSearchInputChange(value: string) {\n this.searchInput = value;\n this.searchInputSubject.next(value);\n }\n\n initializeSearchInputListener() {\n this.searchInputSubject.pipe(\n debounceTime(300),\n takeUntil(this.destroy$)\n ).subscribe(value => {\n this.searchInputChanged.emit(value);\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n getParticipantTooltip(participant: IChatParticipant): string {\n const { metadata, displayName } = participant;\n if (!metadata) return displayName;\n\n const { primary, secondary, tertiary } = metadata;\n const parts = [primary, secondary, tertiary].filter(Boolean);\n\n return parts.length > 0 ? parts.join(' | ') : displayName;\n }\n}\n/* eslint-enable */","<div *ngIf=\"shouldDisplay\" id=\"ng-chat-people\" [ngClass]=\"{'primary-outline-color': true, 'primary-background': true, 'ng-chat-people-collapsed': isCollapsed}\">\n\t<a href=\"javascript:void(0);\" class=\"ng-chat-title secondary-background shadowed\" (click)=\"onChatTitleClicked()\">\n\t\t<span>\n\t\t\t{{localization.title}}\n\t\t</span>\n\t<a href=\"javascript:void(0);\" class=\" ng-chat-close \" (click)=\"onCloseWindow()\" >&#x2715;</a>\n\t</a>\n\t<div *ngIf=\"currentActiveOption\" class=\"ng-chat-people-actions\" (click)=\"onFriendsListActionCancelClicked()\">\n\t\t<a href=\"javascript:void(0);\" class=\"ng-chat-people-action\">\n\t\t\t<i class=\"remove-icon\"></i>\n\t\t</a>\n\t\t<a href=\"javascript:void(0);\" class=\"ng-chat-people-action\" (click)=\"onFriendsListActionConfirmClicked()\">\n\t\t\t<i class=\"check-icon\"></i>\n\t\t</a>\n\t</div>\n\t<input *ngIf=\"searchEnabled\" id=\"ng-chat-search_friend\" class=\"friends-search-bar\" type=\"search\" [placeholder]=\"localization.searchPlaceholder\" [(ngModel)]=\"searchInput\" \n\t(ngModelChange)=\"onSearchInputChange($event)\"/>\n\t<ul id=\"ng-chat-users\" *ngIf=\"!isCollapsed\" [ngClass]=\"{'offset-search': searchEnabled}\">\n\t\t<li *ngFor=\"let user of filteredParticipants\">\n\t\t\t<input \n\t\t\t\t*ngIf=\"currentActiveOption && currentActiveOption.validateContext(user)\" \n\t\t\t\ttype=\"checkbox\" \n\t\t\t\tclass=\"ng-chat-users-checkbox\" \n\t\t\t\t(change)=\"onFriendsListCheckboxChange(user, $event.target.checked)\" \n\t\t\t\t[checked]=\"isUserSelectedFromFriendsList(user)\"/>\n\t\t\t<div [ngClass]=\"{'ng-chat-friends-list-selectable-offset': currentActiveOption, 'ng-chat-friends-list-container': true}\" (click)=\"onUserClick(user)\">\n\t\t\t\t<!-- <div *ngIf=\"!user.avatar\" class=\"icon-wrapper\">\n\t\t\t\t\t<i class=\"user-icon\"></i>\n\t\t\t\t</div> -->\n\t\t\t\t<div class=\"user\" *ngIf=\"!user.avatar\">\n\t\t\t\t\t{{user.displayName|firstLetterPipe}}\n\n\t\t\t\t</div>\n\n\t\t\t\t<img *ngIf=\"user.avatar\" alt=\"\" class=\"avatar\" height=\"30\" width=\"30\" [src]=\"user.avatar | sanitize\"/>\n\t\t\t\t<div class=\"\"></div>\n\t\t\t\t<strong [matTooltip]=\"getParticipantTooltip(user)\">{{user.displayName}}</strong>\n\t\t\t\t<span [ngClass]=\"{'ng-chat-participant-status': true, 'online': user.status === ChatParticipantStatus.Online, 'busy': user.status === ChatParticipantStatus.Busy, 'away': user.status === ChatParticipantStatus.Away, 'offline': user.status === ChatParticipantStatus.Offline}\" [matTooltip]=\"chatParticipantStatusDescriptor(user.status, localization)\"></span>\n\t\t\t\t<span *ngIf=\"unreadMessagesTotalByParticipant(user).length > 0\" class=\"ng-chat-unread-messages-count unread-messages-counter-container primary-text\">{{unreadMessagesTotalByParticipant(user)}}</span>\n\t\t\t</div>\n\t\t</li>\n\t</ul>\n</div>","import { MessageType } from './message-type.enum';\n\nexport class Message\n{\n public type?: MessageType = MessageType.Text;\n public fromId: any;\n public toId: any;\n public message: string;\n public dateSent?: Date;\n public dateSeen?: Date;\n public additionalParameter?: Object;\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nlet emojiDictionary = [\n { patterns: [':)', ':-)', '=)'], unicode: '😃' },\n { patterns: [':D', ':-D', '=D'], unicode: '😀' },\n { patterns: [':(', ':-(', '=('], unicode: '🙁' },\n { patterns: [':|', ':-|', '=|'], unicode: '😐' },\n { patterns: [':*', ':-*', '=*'], unicode: '😙' },\n { patterns: ['T_T', 'T.T'], unicode: '😭' },\n { patterns: [':O', ':-O', '=O', ':o', ':-o', '=o'], unicode: '😮' },\n { patterns: [':P', ':-P', '=P', ':p', ':-p', '=p'], unicode: '😋' },\n { patterns: ['>.<'], unicode: '😣' },\n { patterns: ['@.@'], unicode: '😵' },\n { patterns: ['*.*'], unicode: '😍' },\n { patterns: ['<3'], unicode: '❤️' },\n { patterns: ['^.^'], unicode: '😊' },\n { patterns: [':+1'], unicode: '👍' },\n { patterns: [':-1'], unicode: '👎' }\n];\n\n/*\n * Transforms common emoji text to UTF encoded emojis\n*/\n@Pipe({name: 'emojify'})\nexport class EmojifyPipe implements PipeTransform {\n transform(message: string, pipeEnabled: boolean): string {\n if (pipeEnabled && message && message.length > 1) {\n emojiDictionary.forEach(emoji => {\n emoji.patterns.forEach(pattern => {\n message = message.replace(pattern, emoji.unicode);\n })\n });\n }\n\n return message;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/*\n * Transforms text containing URLs or E-mails to valid links/mailtos\n*/\n@Pipe({name: 'linkfy'})\nexport class LinkfyPipe implements PipeTransform {\n transform(message: string, pipeEnabled: boolean): string {\n if (pipeEnabled && message && message.length > 1)\n {\n let replacedText;\n let replacePatternProtocol;\n let replacePatternWWW;\n let replacePatternMailTo;\n\n // URLs starting with http://, https://, or ftp://\n replacePatternProtocol = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\n replacedText = message.replace(replacePatternProtocol, '<a href=\"$1\" target=\"_blank\">$1</a>');\n\n // URLs starting with \"www.\" (ignoring // before it).\n replacePatternWWW = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\n replacedText = replacedText.replace(replacePatternWWW, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\n\n // Change email addresses to mailto:: links.\n replacePatternMailTo = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\n replacedText = replacedText.replace(replacePatternMailTo, '<a href=\"mailto:$1\">$1</a>');\n\n return replacedText;\n }\n else\n return message;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { Group } from \"../core/group\";\nimport { ChatParticipantType } from \"../core/chat-participant-type.enum\";\nimport { IChatParticipant } from \"../core/chat-participant\";\nimport { Message } from \"../core/message\";\n\n/*\n * Renders the display name of a participant in a group based on who's sent the message\n*/\n@Pipe({name: 'groupMessageDisplayName'})\nexport class GroupMessageDisplayNamePipe implements PipeTransform {\n transform(participant: IChatParticipant, message: Message): string {\n if (participant && participant.participantType == ChatParticipantType.Group)\n {\n let group = participant as Group;\n let userIndex = group.chattingTo.findIndex(x => x.id == message.fromId);\n\n return group.chattingTo[userIndex >= 0 ? userIndex : 0].displayName;\n }\n else\n return \"\";\n }\n}\n","/* eslint-disable */\nimport { Component, Input, Output, EventEmitter, ViewEncapsulation, ViewChild, ElementRef } from '@angular/core';\nimport { Message } from \"../../core/message\";\nimport { MessageType } from \"../../core/message-type.enum\";\nimport { Window } from \"../../core/window\";\nimport { ChatParticipantStatus } from \"../../core/chat-participant-status.enum\";\nimport { ScrollDirection } from \"../../core/scroll-direction.enum\";\nimport { Localization } from '../../core/localization';\nimport { IFileUploadAdapter } from '../../core/file-upload-adapter';\nimport { IChatOption } from '../../core/chat-option';\nimport { Group } from \"../../core/group\";\nimport { ChatParticipantType } from \"../../core/chat-participant-type.enum\";\nimport { IChatParticipant } from \"../../core/chat-participant\";\nimport { MessageCounter } from \"../../core/message-counter\";\nimport { chatParticipantStatusDescriptor } from '../../core/chat-participant-status-descriptor';\n\n@Component({\n selector: 'ng-chat-window',\n templateUrl: './ng-chat-window.component.html',\n styleUrls: ['./ng-chat-window.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class NgChatWindowComponent {\n constructor() { }\n\n @Input()\n public fileUploadAdapter: IFileUploadAdapter;\n\n @Input()\n public window: Window;\n\n @Input()\n public userId: any;\n\n @Input()\n public localization: Localization;\n\n @Input()\n public showOptions: boolean;\n\n @Input()\n public emojisEnabled: boolean = true;\n\n @Input()\n public linkfyEnabled: boolean = true;\n\n @Input()\n public showMessageDate: boolean = true;\n\n @Input()\n public messageDatePipeFormat: string = \"short\";\n\n @Input()\n public hasPagedHistory: boolean = true;\n\n @Output()\n public onChatWindowClosed: EventEmitter<{ closedWindow: Window, closedViaEscapeKey: boolean}> = new EventEmitter();\n\n @Output()\n public onMessagesSeen: EventEmitter<Message[]> = new EventEmitter();\n\n @Output()\n public onMessageSent: EventEmitter<Message> = new EventEmitter();\n\n @Output()\n public onTabTriggered: EventEmitter<{ triggeringWindow: Window, shiftKeyPressed: boolean }> = new EventEmitter();\n\n @Output()\n public onOptionTriggered: EventEmitter<IChatOption> = new EventEmitter();\n\n @Output()\n public onLoadHistoryTriggered: EventEmitter<Window> = new EventEmitter();\n\n @ViewChild('chatMessages') chatMessages: any;\n @ViewChild('nativeFileInput') nativeFileInput: ElementRef;\n @ViewChild('chatWindowInput') chatWindowInput: any;\n\n // File upload state\n public fileUploadersInUse: string[] = []; // Id bucket of uploaders in use\n\n // Exposes enums and functions for the ng-template\n public ChatParticipantType = ChatParticipantType;\n public ChatParticipantStatus = ChatParticipantStatus;\n public MessageType = MessageType;\n public chatParticipantStatusDescriptor = chatParticipantStatusDescriptor;\n\n defaultWindowOptions(currentWindow: Window): IChatOption[]\n {\n if (this.showOptions && currentWindow.participant.participantType == ChatParticipantType.User)\n {\n return [{\n isActive: false,\n chattingTo: currentWindow,\n validateContext: (participant: IChatParticipant) => {\n return participant.participantType == ChatParticipantType.User;\n },\n displayLabel: 'Add People' // TODO: Localize this\n }];\n }\n\n return [];\n }\n\n // Asserts if a user avatar is visible in a chat cluster\n isAvatarVisible(window: Window, message: Message, index: number): boolean\n {\n if (message.fromId != this.userId){\n if (index == 0){\n return true; // First message, good to show the thumbnail\n }\n else{\n // Check if the previous message belongs to the same user, if it belongs there is no need to show the avatar again to form the message cluster\n if (window.messages[index - 1].fromId != message.fromId){\n return true;\n }\n }\n }\n\n return false;\n }\n\n getChatWindowAvatar(participant: IChatParticipant, message: Message): string | null\n {\n if (participant.participantType == ChatParticipantType.User)\n {\n return participant.avatar;\n }\n else if (participant.participantType == ChatParticipantType.Group)\n {\n let group = participant as Group;\n let userIndex = group.chattingTo.findIndex(x => x.id == message.fromId);\n\n return group.chattingTo[userIndex >= 0 ? userIndex : 0].avatar;\n }\n\n return null;\n }\n\n isUploadingFile(window: Window): boolean\n {\n const fileUploadInstanceId = this.getUniqueFileUploadInstanceId(window);\n\n return this.fileUploadersInUse.indexOf(fileUploadInstanceId) > -1;\n }\n\n // Generates a unique file uploader id for each participant\n getUniqueFileUploadInstanceId(window: Window): string\n {\n if (window && window.participant)\n {\n return `ng-chat-file-upload-${window.participant.id}`;\n }\n \n return 'ng-chat-file-upload';\n }\n\n unreadMessagesTotal(window: Window): string\n {\n return MessageCounter.unreadMessagesTotal(window, this.userId);\n }\n\n // Scrolls a chat window message flow to the bottom\n scrollChatWindow(window: Window, direction: ScrollDirection): void\n {\n if (!window.isCollapsed){\n setTimeout(() => {\n if (this.chatMessages){\n let element = this.chatMessages.nativeElement;\n let position = ( direction === ScrollDirection.Top ) ? 0 : element.scrollHeight;\n element.scrollTop = position;\n }\n });\n }\n }\n\n activeOptionTrackerChange(option: IChatOption): void {\n this.onOptionTriggered.emit(option);\n }\n\n // Triggers native file upload for file selection from the user\n triggerNativeFileUpload(window: Window): void\n {\n if (window)\n {\n if (this.nativeFileInput) this.nativeFileInput.nativeElement.click();\n }\n }\n\n // Toggles a window focus on the focus/blur of a 'newMessage' input\n toggleWindowFocus(window: Window): void\n {\n window.hasFocus = !window.hasFocus;\n if(window.hasFocus) {\n const unreadMessages = window.messages\n .filter(message => message.dateSeen == null\n && (message.toId == this.userId || window.participant.participantType === ChatParticipantType.Group));\n \n if (unreadMessages && unreadMessages.length > 0)\n {\n this.onMessagesSeen.emit(unreadMessages);\n }\n }\n }\n\n markMessagesAsRead(messages: Message[]): void\n {\n this.onMessagesSeen.emit(messages);\n }\n\n fetchMessageHistory(window: Window): void {\n this.onLoadHistoryTriggered.emit(window);\n }\n\n // Closes a chat window via the close 'X' button\n onCloseChatWindow(): void\n {\n this.onChatWindowClosed.emit({ closedWindow: this.window, closedViaEscapeKey: false });\n }\n\n /* Monitors pressed keys on a chat window\n - Dispatches a message when the ENTER key is pressed\n - Tabs between windows on TAB or SHIFT + TAB\n - Closes the current focused window on ESC\n */\n onChatInputTyped(event: any, window: Window): void\n {\n switch (event.keyCode)\n {\n case 13:\n if (window.newMessage && window.newMessage.trim() != \"\")\n {\n let message = new Message();\n \n message.fromId = this.userId;\n message.toId = window.participant.id;\n message.message = window.newMessage;\n message.dateSent = new Date();\n \n window.messages.push(message);\n \n this.onMessageSent.emit(message);\n \n window.newMessage = \"\"; // Resets the new message input\n \n this.scrollChatWindow(window, ScrollDirection.Bottom);\n }\n break;\n case 9:\n event.preventDefault();\n\n this.onTabTriggered.emit({ triggeringWindow: window, shiftKeyPressed: event.shiftKey });\n\n break;\n case 27:\n this.onChatWindowClosed.emit({ closedWindow: window, closedViaEscapeKey: true });\n\n break;\n }\n }\n\n // Toggles a chat window visibility between maximized/minimized\n onChatWindowClicked(window: Window): void\n {\n window.isCollapsed = !window.isCollapsed;\n this.scrollChatWindow(window, ScrollDirection.Bottom);\n }\n\n private clearInUseFileUploader(fileUploadInstanceId: string): void\n {\n const uploaderInstanceIdIndex = this.fileUploadersInUse.indexOf(fileUploadInstanceId);\n\n if (uploaderInstanceIdIndex > -1) {\n this.fileUploadersInUse.splice(uploaderInstanceIdIndex, 1);\n }\n }\n\n // Handles file selection and uploads the selected file using the file upload adapter\n onFileChosen(window: Window): void {\n const fileUploadInstanceId = this.getUniqueFileUploadInstanceId(window);\n const uploadElementRef = this.nativeFileInput;\n\n if (uploadElementRef)\n {\n const file: File = uploadElementRef.nativeElement.files[0];\n\n this.fileUploadersInUse.push(fileUploadInstanceId);\n\n this.fileUploadAdapter.uploadFile(file, window.participant.id)\n .subscribe(fileMessage => {\n this.clearInUseFileUploader(fileUploadInstanceId);\n\n fileMessage.fromId = this.userId;\n\n // Push file message to current user window\n window.messages.push(fileMessage);\n \n this.onMessageSent.emit(fileMessage);\n \n this.scrollChatWindow(window, ScrollDirection.Bottom);\n\n // Resets the file upload element\n uploadElementRef.nativeElement.value = '';\n }, (error) => {\n this.clearInUseFileUploader(fileUploadInstanceId);\n\n // Resets the file upload element\n uploadElementRef.nativeElement.value = '';\n\n // TODO: Invoke a file upload adapter error here\n });\n }\n }\n getParticipantTooltip(participant: IChatParticipant): string {\n const { metadata, displayName } = participant;\n if (!metadata) return displayName;\n\n const { primary, secondary, tertiary } = metadata;\n const parts = [primary, secondary, tertiary].filter(Boolean);\n\n return parts.length > 0 ? parts.join(' | ') : displayName;\n }\n \n getMetadataDisplay(participant: IChatParticipant): string {\n if (!participant.metadata || !participant.showMetadataInTitle) {\n return '';\n }\n\n const parts = [];\n if (participant.showMetadataInTitle.primary && participant.metadata.primary) {\n parts.push(participant.metadata.primary);\n }\n if (participant.showMetadataInTitle.secondary && participant.metadata.secondary) {\n parts.push(participant.metadata.secondary);\n }\n if (participant.showMetadataInTitle.tertiary && participant.metadata.tertiary) {\n parts.push(participant.metadata.tertiary);\n }\n return parts.join(' | ');\n }\n}\n\n/* eslint-enable */","<ng-container *ngIf=\"window && window.isCollapsed\">\n\t<div class=\"ng-chat-title secondary-background\">\n\t\t<div class=\"ng-chat-title-visibility-toggle-area\" (click)=\"onChatWindowClicked(window)\">\n\t\t\t<strong [matTooltip]=\"getParticipantTooltip(window.participant)\">\n\t\t\t\t{{window.participant.displayName}} <span *ngIf=\"getMetadataDisplay(window.participant)\">({{ getMetadataDisplay(window.participant) }})</span>\n\t\t\t</strong>\n\t\t\t<span [ngClass]=\"{'ng-chat-participant-status': true, 'online': window.participant.status === ChatParticipantStatus.Online, 'busy': window.participant.status === ChatParticipantStatus.Busy, 'away': window.participant.status === ChatParticipantStatus.Away, 'offline': window.participant.status === ChatParticipantStatus.Offline}\" [matTooltip]=\"chatParticipantStatusDescriptor(window.participant.status, localization)\"></span>\n\t\t\t<span *ngIf=\"unreadMessagesTotal(window).length > 0\" class=\"ng-chat-unread-messages-count unread-messages-counter-container primary-text\">{{unreadMessagesTotal(window)}}</span>\n\t\t</div>\n\t\t<a href=\"javascript:void(0);\" class=\"ng-chat-close primary-text\" (click)=\"onCloseChatWindow()\">&#x2715;</a>\n\t</div>\n</ng-container>\n<ng-container *ngIf=\"window && !window.isCollapsed\"> \n\t<div class=\"ng-chat-title secondary-background\">\n\t\t<div class=\"ng-chat-title-visibility-toggle-area\" (click)=\"onChatWindowClicked(window)\">\n\t\t\t<strong [matTooltip]=\"getParticipantTooltip(window.participant)\">\n\t\t\t\t{{window.participant.displayName}} <span *ngIf=\"getMetadataDisplay(window.participant)\">({{ getMetadataDisplay(window.participant) }})</span>\n\t\t\t</strong>\n\t\t\t<span [ngClass]=\"{'ng-chat-participant-status': true, 'online': window.participant.status === ChatParticipantStatus.Online, 'busy': window.participant.status === ChatParticipantStatus.Busy, 'away': window.participant.status === ChatParticipantStatus.Away, 'offline': window.participant.status === ChatParticipantStatus.Offline}\" [matTooltip]=\"chatParticipantStatusDescriptor(window.participant.status, localization)\"></span>\n\t\t\t<span *ngIf=\"unreadMessagesTotal(window).length > 0\" class=\"ng-chat-unread-messages-count unread-messages-counter-container primary-text\">{{unreadMessagesTotal(window)}}</span>\n\t\t</div>\n\t\t<a href=\"javascript:void(0);\" class=\"ng-chat-close primary-text\" (click)=\"onCloseChatWindow()\">&#x2715;</a>\n\t\t<!-- <ng-chat-options [ngClass]=\"'ng-chat-options-container'\" [options]=\"defaultWindowOptions(window)\" (activeOptionTrackerChange)=\"activeOptionTrackerChange($event)\"></ng-chat-options> -->\n\t</div>\n\t\t<div #chatMessages class=\"ng-chat-messages primary-background\">\n\t\t\t<div *ngIf=\"window.isLoadingHistory\" class=\"ng-chat-loading-wrapper\">\n\t\t\t\t<div class=\"loader\">Loading history...</div>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"hasPagedHistory && window.hasMoreMessages && !window.isLoadingHistory\" class=\"ng-chat-load-history\">\n\t\t\t\t<a class=\"load-history-action\" (click)=\"fetchMessageHistory(window)\">{{localization.loadMessageHistoryPlaceholder}}</a>\n\t\t\t</div>\n\n\t\t\t<div *ngFor=\"let message of window.messages; let i = index\" [ngClass]=\"{'ng-chat-message': true, 'ng-chat-message-received': message.fromId !== userId}\">\n\t\t\t\t<ng-container *ngIf=\"isAvatarVisible(window, message, i)\">\n\t\t\t\t\t<div *ngIf=\"!getChatWindowAvatar(window.participant, message)\" class=\"icon-wrapper\">\n\t\t\t\t\t\t<i class=\"user-icon\"></i>\n\t\t\t\t\t</div>\n\t\t\t\t\t<!-- <img *ngIf=\"getChatWindowAvatar(window.participant, message)\" alt=\"\" class=\"avatar\" height=\"30\" width=\"30\" [src]=\"getChatWindowAvatar(window.participant, message) | sanitize\" /> -->\n\t\t\t\t\t<span *ngIf=\"window.participant.participantType === ChatParticipantType.Group\" class=\"ng-chat-participant-name\">{{window.participant | groupMessageDisplayName:message}}</span>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-container [ngSwitch]=\"message.type\">\n\t\t\t\t\t<div *ngSwitchCase=\"MessageType.Text\" [ngClass]=\"{'sent-chat-message-container': message.fromId === userId, 'received-chat-message-container': message.fromId !== userId}\">\n\t\t\t \t\t\t<span [innerHtml]=\"message.message | emojify:emojisEnabled | linkfy:linkfyEnabled\"></span>\n\t\t\t\t\t\t<span *ngIf=\"showMessageDate && message.dateSent\" class=\"message-sent-date\">{{message.dateSent | date:'dd'}}/{{message.dateSent | date:'MM'}}/{{message.dateSent | date:'y'}} {{message.dateSent | date:'h:mm a '}}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div *ngSwitchCase=\"MessageType.Image\" [ngClass]=\"{'sent-chat-message-container': message.fromId === userId, 'received-chat-message-container': message.fromId !== userId}\">\n\t\n\t\t\t \t\t\t<img src=\"{{message.message}}\" class=\"image-message\" />\n\t\n\t\t\t\t\t\t<span *ngIf=\"showMessageDate && message.dateSent\" class=\"message-sent-date\">{{message.dateSent | date:'dd'}}/{{message.dateSent | date:'MM'}}/{{message.dateSent | date:'y'}} {{message.dateSent | date:'h:mm a '}}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div *ngSwitchCase=\"MessageType.File\" [ngClass]=\"{'file-message-container': true, 'received': message.fromId !== userId}\">\n\t\t\t\t\t\t<div class=\"file-message-icon-container\">\n\t\t\t\t\t\t\t<i class=\"paperclip-icon\"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- <a class=\"file-details\" [attr.href]=\"message.downloadUrl\" target=\"_blank\" rel=\"noopener noreferrer\" (click)=\"this.markMessagesAsRead([message])\" download>\n\t\t\t\t\t\t\t<span class=\"file-message-title\" [attr.title]=\"message.message\">{{message.message}}</span>\n\t\t\t\t\t\t\t<span *ngIf=\"message.fileSizeInBytes\" class=\"file-message-size\">{{message.fileSizeInBytes}} Bytes</span>\n\t\t\t\t\t\t</a> -->\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t</div>\n\t</div>\n\n\t<div class=\"ng-chat-footer primary-outline-color primary-background\">\n\t\t<input #chatWindowInput\n\t\t\ttype=\"text\"\n\t\t\t[ngModel]=\"window.newMessage | emojify:emojisEnabled\"\n\t\t\t(ngModelChange)=\"window.newMessage=$event\"\n\t\t\t[placeholder]=\"localization.messagePlaceholder\"\n\t\t\t[ngClass]=\"{'chat-window-input': true, 'has-side-action': fileUploadAdapter}\"\n\t\t\t(keydown)=\"onChatInputTyped($event, window)\"\n\t\t\t(blur)=\"toggleWindowFocus(window)\"\n\t\t\t(focus)=\"toggleWindowFocus(window)\"/>\n\n\t\t<!-- File Upload -->\n\t\t<ng-container *ngIf=\"fileUploadAdapter\">\n\t\t\t<a *ngIf=\"!isUploadingFile(window)\" class=\"btn-add-file\" (click)=\"triggerNativeFileUpload(window)\">\n\t\t\t\t<i class=\"upload-icon\"></i>\n\t\t\t</a>\n\t\t\t<input\n\t\t\t\ttype=\"file\"\n\t\t\t\t#nativeFileInput\n\t\t\t\tstyle=\"display: none;\"\n\t\t\t\t[attr.id]=\"getUniqueFileUploadInstanceId(window)\"\n\t\t\t\t(change)=\"onFileChosen(window)\" />\n\t\t\t<div *ngIf=\"isUploadingFile(window)\" class=\"loader\"></div>\n\t\t</ng-container>\n\t</div>\n</ng-container>","/* eslint-disable */\nimport { Component, Input, OnInit, ViewChildren, QueryList, HostListener, Output, EventEmitter, ViewEncapsulation } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { ChatAdapter } from '../../core/chat-adapter';\nimport { IChatGroupAdapter } from '../../core/chat-group-adapter';\nimport { User } from \"../../core/user\";\nimport { ParticipantResponse } from \"../../core/participant-response\";\nimport { Message } from \"../../core/message\";\nimport { MessageType } from \"../../core/message-type.enum\";\nimport { Window } from \"../../core/window\";\nimport { ChatParticipantStatus } from \"../../core/chat-participant-status.enum\";\nimport { ScrollDirection } from \"../../core/scroll-direction.enum\";\nimport { Localization, StatusDescription } from '../../core/localization';\nimport { IChatController } from '../../core/chat-controller';\nimport { PagedHistoryChatAdapter } from '../../core/paged-history-chat-adapter';\nimport { IFileUploadAdapter } from '../../core/file-upload-adapter';\nimport { DefaultFileUploadAdapter } from '../../core/default-file-upload-adapter';\nimport { Theme } from '../../core/theme.enum';\nimport { IChatOption } from '../../core/chat-option';\nimport { Group } from \"../../core/group\";\nimport { ChatParticipantType } from \"../../core/chat-participant-type.enum\";\nimport { IChatParticipant } from \"../../core/chat-participant\";\nimport { map } from 'rxjs/operators';\nimport { NgChatWindowComponent } from '../ng-chat-window/ng-chat-window.component';\n\n\n@Component({\n selector: 'mnl-chat',\n templateUrl: 'ng-chat.component.html',\n styleUrls: [\n '../../../assets/icons.css',\n '../../../assets/loading-spinner.css',\n '../../../assets/ng-chat.component.default.css',\n '../../../assets/themes/ng-chat.theme.default.scss',\n '../../../assets/themes/ng-chat.theme.dark.scss'\n ],\n encapsulation: ViewEncapsulation.None\n})\n\nexport class NgChat implements OnInit, IChatController {\n constructor(private _httpClient: HttpClient) { }\n\n // Exposes enums for the ng-template\n public ChatParticipantType = ChatParticipantType;\n public ChatParticipantStatus = ChatParticipantStatus;\n public MessageType = MessageType;\n\n private _isDisabled: boolean = false;\n\n get isDisabled(): boolean {\n return this._isDisabled;\n }\n\n @Input()\n set isDisabled(value: boolean) {\n this._isDisabled = value;\n\n if (value)\n {\n window.clearInterval(this.pollingIntervalWindowInstance)\n }\n else\n {\n this.activateFriendListFetch();\n }\n }\n\n @Input()\n public adapter: ChatAdapter;\n\n @Input()\n public groupAdapter: IChatGroupAdapter;\n\n @Input()\n public userId: any;\n\n @Input()\n public isCollapsed: boolean = false;\n\n @Input()\n public maximizeWindowOnNewMessage: boolean = true;\n\n @Input()\n public pollFriendsList: boolean = false;\n\n @Input()\n public pollingInterval: number = 5000;\n\n @Input()\n public historyEnabled: boolean = true;\n\n @Input()\n public emojisEnabled: boolean = true;\n\n @Input()\n public linkfyEnabled: boolean = true;\n\n @Input()\n public audioEnabled: boolean = true;\n\n @Input()\n public searchEnabled: boolean = true;\n\n @Input() // TODO: This might need a better content strategy\n public audioSource: string = '../../../assets/notification.wav';\n\n @Input()\n public persistWindowsState: boolean = true;\n\n @Input()\n public title: string = \"Quick chat\";\n\n @Input()\n public messagePlaceholder: string = \"Type a message\";\n\n @Input()\n public searchPlaceholder: string = \"Search\";\n\n @Input()\n public browserNotificationsEnabled: boolean = true;\n\n @Input() // TODO: This might need a better content strategy\n public browserNotificationIconSource: string = '../../../assets/notification.png';\n\n @Input()\n public browserNotificationTitle: string = \"New message from\";\n\n @Input()\n public historyPageSize: number = 10;\n\n @Input()\n public localization: Localization;\n\n @Input()\n public hideFriendsList: boolean = false;\n\n @Input()\n public hideFriendsListOnUnsupportedViewport: boolean = true;\n\n @Input()\n public fileUploadUrl: string;\n\n @Input()\n public theme: Theme = Theme.Light;\n\n @Input()\n public customTheme: string;\n\n @Input()\n public messageDatePipeFormat: string = \"short\";\n\n @Input()\n public showMessageDate: boolean = true;\n\n @Input()\n public isViewportOnMobileEnabled: boolean = false;\n\n @Input()\n public fileUploadAdapter: IFileUploadAdapter;\n\n @Output()\n public onParticipantClicked: EventEmitter<IChatParticipant> = new EventEmitter<IChatParticipant>();\n\n @Output()\n public onParticipantChatOpened: EventEmitter<IChatParticipant> = new EventEmitter<IChatParticipant>();\n\n @Output()\n public onParticipantChatClosed: EventEmitter<IChatParticipant> = new EventEmitter<IChatParticipant>();\n\n @Output()\n public onMessagesSeen: EventEmitter<Message[]> = new EventEmitter<Message[]>();\n\n @Output()\n public onCloseWindowClicked:EventEmitter<boolean> = new EventEmitter<boolean>()\n\n @Output()\n public searchInputChanged = new EventEmitter<string>();\n\n private browserNotificationsBootstrapped: boolean = false;\n\n public hasPagedHistory: boolean = false;\n\n // Don't want to add this as a setting to simplify usage. Previous placeholder and title settings available to be used, or use full Localization object.\n private statusDescription: StatusDescription = {\n online: 'Online',\n busy: 'Busy',\n away: 'Away',\n offline: 'Offline'\n };\n\n private audioFile: HTMLAudioElement;\n\n public participants: IChatParticipant[];\n\n public participantsResponse: ParticipantResponse[];\n\n public participantsInteractedWith: IChatParticipant[] = [];\n\n public currentActiveOption: IChatOption | null;\n\n private pollingIntervalWindowInstance: number;\n\n private get localStorageKey(): string\n {\n return `ng-chat-users-${this.userId}`; // Appending the user id so the state is unique per user in a computer.\n };\n\n // Defines the size of each opened window to calculate how many windows can be opened on the viewport at the same time.\n public windowSizeFactor: number = 320;\n\n // Total width size of the friends list section\n public friendsListWidth: number = 262;\n\n // Available area to render the plugin\n private viewPortTotalArea: number;\n\n // Set to true if there is no space to display at least one chat window and 'hideFriendsListOnUnsupportedViewport' is true\n public unsupportedViewport: boolean = false;\n\n windows: Window[] = [];\n isBootstrapped: boolean = false;\n\n @ViewChildren('chatWindow') chatWindows: QueryList<NgChatWindowComponent>;\n\n ngOnInit() {\n this.bootstrapChat();\n }\n\n @HostListener('window:resize', ['$event'])\n onResize(event: any){\n this.viewPortTotalArea = event.target.innerWidth;\n\n this.NormalizeWindows();\n }\n\n // Checks if there are more opened windows than the view port can display\n private NormalizeWindows(): void\n {\n const maxSupportedOpenedWindows = Math.floor((this.viewPortTotalArea - (!this.hideFriendsList ? this.friendsListWidth : 0)) / this.windowSizeFactor);\n const difference = this.windows.length - maxSupportedOpenedWindows;\n\n if (difference >= 0)\n {\n this.windows.splice(this.windows.length - difference);\n }\n\n this.updateWindowsState(this.windows);\n\n // Viewport should have space for at least one chat window but should show in mobile if option is enabled.\n this.unsupportedViewport = this.isViewportOnMobileEnabled? false : this.hideFriendsListOnUnsupportedViewport && maxSupportedOpenedWindows < 1;\n }\n\n // Initializes the chat plugin and the messaging adapter\n private bootstrapChat(): void\n {\n let initializationException = null;\n\n if (this.adapter != null && this.userId != null)\n {\n try\n {\n this.viewPortTotalArea = window.innerWidth;\n\n this.initializeTheme();\n this.initializeDefaultText();\n this.initializeBrowserNotifications();\n\n // Binding event listeners\n this.adapter.messageReceivedHandler = (participant, msg) => this.onMessageReceived(participant, msg);\n this.adapter.friendsListChangedHandler = (participantsResponse) => this.onFriendsListChanged(participantsResponse);\n\n this.activateFriendListFetch();\n\n this.bufferAudioFile();\n\n this.hasPagedHistory = this.adapter instanceof PagedHistoryChatAdapter;\n\n if (this.fileUploadUrl && this.fileUploadUrl !== \"\")\n {\n this.fileUploadAdapter = new DefaultFileUploadAdapter(this.fileUploadUrl, this._httpClient);\n }\n\n this.NormalizeWindows();\n\n this.isBootstrapped = true;\n }\n catch(ex)\n {\n initializationException = ex;\n }\n }\n\n if (!this.isBootstrapped){\n console.error(\"ng-chat component couldn't be bootstrapped.\");\n\n if (this.userId == null){\n console.error(\"ng-chat can't be initialized without an user id. Please make sure you've provided an userId as a parameter of the ng-chat component.\");\n }\n if (this.adapter == null){\n console.error(\"ng-chat can't be bootstrapped without a ChatAdapter. Please make sure you've provided a ChatAdapter implementation as a parameter of the ng-chat component.\");\n }\n if (initializationException)\n {\n console.error(`An exception has occurred while initializing ng-chat. Details: ${initializationException.message}`);\n console.error(initializationException);\n }\n }\n }\n\n private activateFriendListFetch(): void {\n if (this.adapter)\n {\n // Loading current users list\n if (this.pollFriendsList){\n // Setting a long poll interval to update the friends list\n this.fetchFriendsList(true);\n this.pollingIntervalWindowInstance = window.setInterval(() => this.fetchFriendsList(false), this.pollingInterval);\n }\n else\n {\n // Since polling was disabled, a friends list update mechanism will have to be implemented in the ChatAdapter.\n this.fetchFriendsList(true);\n }\n }\n }\n\n // Initializes browser notifications\n private async initializeBrowserNotifications()\n {\n if (this.browserNotificationsEnabled && (\"Notification\" in window))\n {\n if (await Notification.requestPermission() === \"granted\")\n {\n this.browserNotificationsBootstrapped = true;\n }\n }\n }\n\n // Initializes default text\n private initializeDefaultText() : void\n {\n if (!this.localization)\n {\n this.localization = {\n messagePlaceholder: this.messagePlaceholder,\n searchPlaceholder: this.searchPlaceholder,\n title: this.title,\n statusDescription: this.statusDescription,\n browserNotificationTitle: this.browserNotificationTitle,\n loadMessageHistoryPlaceholder: \"Load older messages\"\n };\n }\n }\n\n private initializeTheme(): void\n {\n if (this.customTheme)\n {\n this.theme = Theme.Custom;\n }\n else if (this.theme != Theme.Light && this.theme != Theme.Dark)\n {\n // TODO: Use es2017 in future with Object.values(Theme).includes(this.theme) to do this check\n throw new Error(`Invalid theme configuration for ng-chat. \"${this.theme}\" is not a valid theme value.`);\n }\n }\n\n // Sends a request to load the friends list\n private fetchFriendsList(isBootstrapping: boolean): void\n {\n this.adapter.listFriends()\n .pipe(\n map((participantsResponse: ParticipantResponse[]) => {\n this.participantsResponse = participantsResponse;\n\n this.participants = participantsResponse.map((response: ParticipantResponse) => {\n return response.participant;\n });\n })\n ).subscribe(() => {\n if (isBootstrapping)\n {\n this.restoreWindowsState();\n }\n });\n }\n\n fetchMessageHistory(window: Window) {\n // Not ideal but will keep this until we decide if we are shipping pagination with the default adapter\n if (this.adapter instanceof PagedHistoryChatAdapter)\n {\n window.isLoadingHistory = true;\n\n this.adapter.getMessageHistoryByPage(window.participant.id, this.historyPageSize, ++window.historyPage)\n .pipe(\n map((result: Message[]) => {\n result.forEach((message) => this.assertMessageType(message));\n\n window.messages = result.concat(window.messages);\n window.isLoadingHistory = false;\n\n const direction: ScrollDirection = (window.historyPage == 1) ? ScrollDirection.Bottom : ScrollDirection.Top;\n window.hasMoreMessages = result.length == this.historyPageSize;\n\n setTimeout(() => this.onFetchMessageHistoryLoaded(result, window, direction, true));\n })\n ).subscribe();\n }\n else\n {\n this.adapter.getMessageHistory(window.participant.id)\n .pipe(\n map((result: Message[]) => {\n result.forEach((message) => this.assertMessageType(message));\n\n window.messages = result.concat(window.messages);\n window.isLoadingHistory = false;\n\n setTimeout(() => this.onFetchMessageHistoryLoaded(result, window, ScrollDirection.Bottom));\n })\n ).subscribe();\n }\n }\n\n private onFetchMessageHistoryLoaded(messages: Message[], window: Window, direction: ScrollDirection, forceMarkMessagesAsSeen: boolean = false): void\n {\n this.scrollChatWindow(window, direction)\n\n if (window.hasFocus || forceMarkMessagesAsSeen)\n {\n const unseenMessages = messages.filter(m => !m.dateSeen);\n\n this.markMessagesAsRead(unseenMessages);\n }\n }\n\n // Updates the friends list via the event handler\n private onFriendsListChanged(participantsResponse: ParticipantResponse[]): void\n {\n if (participantsResponse)\n {\n this.participantsResponse = participantsResponse;\n\n this.participants = participantsResponse.map((response: ParticipantResponse) => {\n return response.participant;\n });\n\n this.participantsInteractedWith = [];\n }\n }\n\n // Handles received messages by the adapter\n private onMessageReceived(participant: IChatParticipant, message: Message)\n {\n if (participant && message)\n {\n const chatWindow = this.openChatWindow(participant);\n\n this.assertMessageType(message);\n\n if (!chatWindow[1] || !this.historyEnabled){\n chatWindow[0].messages.push(message);\n\n this.scrollChatWindow(chatWindow[0], ScrollDirection.Bottom);\n\n if (chatWindow[0].hasFocus)\n {\n this.markMessagesAsRead([message]);\n }\n }\n\n this.emitMessageSound(chatWindow[0]);\n\n // Do not push browser notifications with message content for privacy purposes if the 'maximizeWindowOnNewMessage' setting is off and this is a new chat window.\n if (this.maximizeWindowOnNewMessage || (!chatWindow[1] && !chatWindow[0].isCollapsed))\n {\n // Some messages are not pushed because they are loaded by fetching the history hence why we supply the message here\n this.emitBrowserNotification(chatWindow[0], message);\n }\n }\n }\n\n onParticipantClickedFromFriendsList(participant: IChatParticipant): void {\n this.openChatWindow(participant, true, true);\n }\n\n private cancelOptionPrompt(): void {\n if (this.currentActiveOption)\n {\n this.currentActiveOption.isActive = false;\n this.currentActiveOption = null;\n }\n }\n\n onOptionPromptCanceled(): void {\n this.cancelOptionPrompt();\n }\n\n onOptionPromptConfirmed(event: any): void {\n // For now this is fine as there is only one option available. Introduce option types and type checking if a new option is added.\n this.confirmNewGroup(event);\n\n // Canceling current state\n this.cancelOptionPrompt();\n }\n\n private confirmNewGroup(users: User[]): void {\n const newGroup = new Group(users);\n\n this.openChatWindow(newGroup);\n\n if (this.groupAdapter)\n {\n this.groupAdapter.groupCreated(newGroup);\n }\n }\n\n // Opens a new chat whindow. Takes care of available viewport\n // Works for opening a chat window for an user or for a group\n // Returns => [Window: Window object reference, boolean: Indicates if this window is a new chat window]\n private openChatWindow(participant: IChatParticipant, focusOnNewWindow: boolean = false, invokedByUserClick: boolean = false): [Window, boolean]\n {\n // Is this window opened?\n const openedWindow = this.windows.find(x => x.participant.id == participant.id);\n\n if (!openedWindow)\n {\n if (invokedByUserClick)\n {\n this.onParticipantClicked.emit(participant);\n }\n\n // Refer to issue #58 on Github\n const collapseWindow = invokedByUserClick ? false : !this.maximizeWindowOnNewMessage;\n\n const newChatWindow: Window = new Window(participant, this.historyEnabled, collapseWindow);\n\n // Loads the chat history via an RxJs Observable\n if (this.historyEnabled)\n {\n this.fetchMessageHistory(newChatWindow);\n }\n\n this.windows.unshift(newChatWindow);\n\n // Is there enough space left in the view port ? but should be displayed in mobile if option is enabled\n if (!this.isViewportOnMobileEnabled) {\n if (this.windows.length * this.windowSizeFactor >= this.viewPortTotalArea - (!this.hideFriendsList ? this.friendsListWidth : 0)) {\n this.windows.pop();\n }\n }\n\n this.updateWindowsState(this.windows);\n\n if (focusOnNewWindow && !collapseWindow)\n {\n this.focusOnWindow(newChatWindow);\n }\n\n this.participantsInteractedWith.push(participant);\n this.onParticipantChatOpened.emit(participant);\n\n return [newChatWindow, true];\n }\n else\n {\n // Returns the existing chat window\n return [openedWindow, false];\n }\n }\n\n // Focus on the input element of the supplied window\n private focusOnWindow(window: Window, callback: Function = () => {}) : void\n {\n const windowIndex = this.windows.indexOf(window);\n if (windowIndex >= 0)\n {\n setTimeout(() => {\n if (this.chatWindows)\n {\n const chatWindowToFocus = this.chatWindows.toArray()[windowIndex];\n\n chatWindowToFocus.chatWindowInput.nativeElement.focus();\n }\n\n callback();\n });\n }\n }\n\n private assertMessageType(message: Message): void {\n // Always fallback to \"Text\" messages to avoid rendenring issues\n if (!message.type)\n {\n message.type = MessageType.Text;\n }\n }\n\n // Marks all messages provided as read with the current time.\n markMessagesAsRead(messages: Message[]): void\n {\n const currentDate = new Date();\n\n messages.forEach((msg)=>{\n msg.dateSeen = currentDate;\n });\n\n this.onMessagesSeen.emit(messages);\n }\n\n // Buffers audio file (For component's bootstrapping)\n private bufferAudioFile(): void {\n if (this.audioSource && this.audioSource.length > 0)\n {\n this.audioFile = new Audio();\n this.audioFile.src = this.audioSource;\n this.audioFile.load();\n }\n }\n\n // Emits a message notification audio if enabled after every message received\n private emitMessageSound(window: Window): void\n {\n if (this.audioEnabled && !window.hasFocus && this.audioFile) {\n this.audioFile.play();\n }\n }\n\n // Emits a browser notification\n private emitBrowserNotification(window: Window, message: Message): void\n {\n // if (this.browserNotificationsBootstrapped && !window.hasFocus && message) {\n if (this.browserNotificationsBootstrapped && message) {\n const notification = new Notification(`${this.localization.browserNotificationTitle} ${window.participant.displayName}`, {\n 'body': message.message,\n 'icon': this.browserNotificationIconSource\n });\n\n setTimeout(() => {\n notification.close();\n }, message.message.length <= 50 ? 5000 : 7000); // More time to read longer messages\n }\n }\n\n // Saves current windows state into local storage if persistence is enabled\n private updateWindowsState(windows: Window[]): void\n {\n if (this.persistWindowsState)\n {\n const participantIds = windows.map((w) => {\n return w.participant.id;\n });\n\n localStorage.setItem(this.localStorageKey, JSON.stringify(participantIds));\n }\n }\n\n private restoreWindowsState(): void\n {\n try\n {\n if (this.persistWindowsState)\n {\n const stringfiedParticipantIds = localStorage.getItem(this.localStorageKey);\n\n if (stringfiedParticipantIds && stringfiedParticipantIds.length > 0)\n {\n const participantIds = <number[]>JSON.parse(stringfiedParticipantIds);\n\n const participantsToRestore = this.participants.filter(u => participantIds.indexOf(u.id) >= 0);\n\n participantsToRestore.forEach((participant) => {\n this.openChatWindow(participant);\n });\n }\n }\n }\n catch (ex)\n {\n console.error(`An error occurred while restoring ng-chat windows state. Details: ${ex}`);\n }\n }\n\n // Gets closest open window if any. Most recent opened has priority (Right)\n private getClosestWindow(window: Window): Window | undefined\n {\n const index = this.windows.indexOf(window);\n\n if (index > 0)\n {\n return this.windows[index - 1];\n }\n else if (index == 0 && this.windows.length > 1)\n {\n return this.windows[index + 1];\n }\n }\n\n private closeWindow(window: Window): void\n {\n const index = this.windows.indexOf(window);\n\n this.windows.splice(index, 1);\n\n this.updateWindowsState(this.windows);\n\n this.onParticipantChatClosed.emit(window.participant);\n }\n\n private getChatWindowComponentInstance(targetWindow: Window): NgChatWindowComponent | null {\n const windowIndex = this.windows.indexOf(targetWindow);\n\n if (this.chatWindows){\n let targetWindow = this.chatWindows.toArray()[windowIndex];\n\n return targetWindow;\n }\n\n return null;\n }\n\n // Scrolls a chat window message flow to the bottom\n private scrollChatWindow(window: Window, direction: ScrollDirection): void\n {\n const chatWindow = this.getChatWindowComponentInstance(window);\n\n if (chatWindow){\n chatWindow.scrollChatWindow(window, direction);\n }\n }\n\n onWindowMessagesSeen(messagesSeen: Message[]): void {\n this.markMessagesAsRead(messagesSeen);\n }\n\n onWindowChatClosed(payload: { closedWindow: Window, closedViaEscapeKey: boolean }): void {\n const { closedWindow, closedViaEscapeKey } = payload;\n\n if (closedViaEscapeKey) {\n let closestWindow = this.getClosestWindow(closedWindow);\n\n if (closestWindow)\n {\n this.focusOnWindow(closestWindow, () => { this.closeWindow(closedWindow); });\n }\n else\n {\n this.closeWindow(closedWindow);\n }\n }\n else {\n this.closeWindow(closedWindow);\n }\n }\n\n onWindowTabTriggered(payload: { triggeringWindow: Window, shiftKeyPressed: boolean }): void {\n const { triggeringWindow, shiftKeyPressed } = payload;\n\n const currentWindowIndex = this.windows.indexOf(triggeringWindow);\n let windowToFocus = this.windows[currentWindowIndex + (shiftKeyPressed ? 1 : -1)]; // Goes back on shift + tab\n\n if (!windowToFocus)\n {\n // Edge windows, go to start or end\n windowToFocus = this.windows[currentWindowIndex > 0 ? 0 : this.chatWindows.length - 1];\n }\n\n this.focusOnWindow(windowToFocus);\n }\n\n onWindowMessageSent(messageSent: Message): void {\n this.adapter.sendMessage(messageSent);\n }\n\n onWindowOptionTriggered(option: IChatOption): void {\n this.currentActiveOption = option;\n }\n\n triggerOpenChatWindow(user: User): void {\n if (user)\n {\n this.openChatWindow(user);\n }\n }\n\n public triggerCloseChatWindow(userId: any): void {\n const openedWindow = this.windows.find(x => x.participant.id == userId);\n\n if (openedWindow)\n {\n this.closeWindow(openedWindow);\n }\n }\n\n triggerToggleChatWindowVisibility(userId: any): void {\n const openedWindow = this.windows.find(x => x.participant.id == userId);\n\n if (openedWindow)\n {\n const chatWindow = this.getChatWindowComponentInstance(openedWindow);\n\n if (chatWindow){\n chatWindow.onChatWindowClicked(openedWindow);\n }\n }\n }\n\n // closeFriendList(){\n // this.hideFriendsList = !this.hideFriendsList\n // this.hideFriendsListChange.emit(this.hideFriendsList)\n // }\n onCloseWindowClick(click:boolean){\n\n this.onCloseWindowClicked.emit(click)\n\n\n\n }\n \n onSearchInputChanged(value: string) {\n this.searchInputChanged.emit(value);\n }\n}\n/* eslint-enable */","<link *ngIf=\"customTheme\" rel=\"stylesheet\" [href]='customTheme | sanitize'>\n\n<div id=\"ng-chat\" *ngIf=\"!isDisabled && isBootstrapped && !unsupportedViewport\" [ngClass]=\"theme\">\n <ng-chat-friends-list\n [localization]=\"localization\"\n [shouldDisplay]=\"!hideFriendsList\"\n [userId]=\"userId\"\n [isCollapsed]=\"isCollapsed\"\n [searchEnabled]=\"searchEnabled\"\n [participants]=\"participants\"\n [participantsResponse]=\"participantsResponse\"\n [participantsInteractedWith]=\"participantsInteractedWith\"\n [windows]=\"windows\"\n [currentActiveOption]=\"currentActiveOption\"\n (onParticipantClicked)=\"onParticipantClickedFromFriendsList($event)\"\n (onOptionPromptCanceled)=\"onOptionPromptCanceled()\"\n (onOptionPromptConfirmed)=\"onOptionPromptConfirmed($event)\"\n (onCloseWindowClick)=\"onCloseWindowClick($event)\"\n (searchInputChanged)=\"onSearchInputChanged($event)\"\n >\n </ng-chat-friends-list>\n\n <div *ngFor=\"let window of windows; let i = index\" [ngClass]=\"{'ng-chat-window': true, 'primary-outline-color': true, 'ng-chat-window-collapsed': window.isCollapsed}\" [ngStyle]=\"{'right': (!hideFriendsList ? friendsListWidth : 0) + 20 + windowSizeFactor * i + 'px'}\">\n <ng-chat-window\n #chatWindow\n [fileUploadAdapter]=\"fileUploadAdapter\"\n [localization]=\"localization\"\n [userId]=\"userId\"\n [window]=\"window\"\n [showOptions]=\"groupAdapter\"\n [emojisEnabled]=\"emojisEnabled\"\n [linkfyEnabled]=\"linkfyEnabled\"\n [showMessageDate]=\"showMessageDate\"\n [messageDatePipeFormat]=\"messageDatePipeFormat\"\n [hasPagedHistory]=\"hasPagedHistory\"\n (onMessagesSeen)=\"onWindowMessagesSeen($event)\"\n (onMessageSent)=\"onWindowMessageSent($event)\"\n (onTabTriggered)=\"onWindowTabTriggered($event)\"\n (onChatWindowClosed)=\"onWindowChatClosed($event)\"\n (onOptionTriggered)=\"onWindowOptionTriggered($event)\"\n (onLoadHistoryTriggered)=\"fetchMessageHistory($event)\"\n >\n </ng-chat-window>\n </div>\n</div>\n","/* eslint-disable */\nimport { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { IChatOption } from '../../core/chat-option';\n\n@Component({\n selector: 'ng-chat-options',\n templateUrl: './ng-chat-options.component.html',\n styleUrls: ['./ng-chat-options.component.css']\n})\nexport class NgChatOptionsComponent {\n\n\tconstructor() { }\n\n\t@Input()\n\tpublic options: IChatOption[];\n\n\t@Input()\n\tpublic activeOptionTracker: IChatOption;\n\n\t@Output()\n\tpublic activeOptionTrackerChange: EventEmitter<IChatOption> = new EventEmitter<IChatOption>();\n\n\tonOptionClicked(option: IChatOption): void\n\t{\n\t\toption.isActive = true;\n\n\t\tif (option.action) {\n\t\t\toption.action(option.chattingTo);\n\t\t}\n\n\t\tthis.activeOptionTrackerChange.emit(option);\n\t}\n}\n/* eslint-enable */","<div *ngIf=\"options && options.length > 0\" class=\"ng-chat-options\">\n\t\t<button class=\"ng-chat-options-activator\">\n\t\t\t<span class=\"primary-text\">...</span>\n\t\t</button>\n\t<div class=\"ng-chat-options-content primary-background shadowed\">\n\t\t<a *ngFor=\"let option of options; let i = index\" [ngClass]=\"'primary-text'\" (click)=\"onOptionClicked(option)\">\n\t\t\t{{option.displayLabel}}\n\t\t</a>\n\t</div> \n</div>\n","import { HttpClientModule } from '@angular/common/http';\nimport { CommonModule } from '@angular/common';\nimport { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core';\nimport { AppConfigService } from '@muraai/mnl-commons';\nimport { ChatMaterialModule } from './material.module';\nimport { ChatService } from './services/chat.service';\nimport { NgChat } from './components/ng-chat/ng-chat.component';\nimport { EmojifyPipe } from './pipes/emojify.pipe';\nimport { LinkfyPipe } from './pipes/linkfy.pipe';\nimport { SanitizePipe } from './pipes/sanitize.pipe';\nimport { GroupMessageDisplayNamePipe } from './pipes/group-message-display-name.pipe';\nimport { NgChatOptionsComponent } from './components/ng-chat-options/ng-chat-options.component';\nimport { NgChatFriendsListComponent } from './components/ng-chat-friends-list/ng-chat-friends-list.component';\nimport { NgChatWindowComponent } from './components/ng-chat-window/ng-chat-window.component';\nimport { FirstLetterPipe } from './firstLetter.pipe';\nimport { FormsModule } from '@angular/forms';\n@NgModule({\n declarations: [\n NgChat,\n EmojifyPipe,\n LinkfyPipe,\n SanitizePipe,\n GroupMessageDisplayNamePipe,\n NgChatOptionsComponent,\n NgChatFriendsListComponent,\n NgChatWindowComponent,\n FirstLetterPipe\n ],\n imports: [\n ChatMaterialModule,\n CommonModule ,\n FormsModule,\n HttpClientModule\n ],\n exports: [\n NgChat\n ],\n \n})\nexport class ChatModule {\n static forRoot(): ModuleWithProviders<ChatModule> {\n return {\n ngModule: ChatModule,\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: loadConfig,\n deps: [\n AppConfigService,\n ChatService\n ],\n multi: true,\n },\n ],\n };\n }\n\n static forChild(): ModuleWithProviders<ChatModule> {\n return {\n ngModule: ChatModule,\n };\n }\n}\n\nexport function loadConfig(config: AppConfigService) {\n const conf = () => config.load();\n return conf;\n}\n\n","import { ChatParticipantStatus } from \"./chat-participant-status.enum\";\nimport { IChatParticipant } from \"./chat-participant\";\nimport { ChatParticipantType } from \"./chat-participant-type.enum\";\n\nexport class User implements IChatParticipant\n{\n public readonly participantType: ChatParticipantType = ChatParticipantType.User;\n public id: any;\n public displayName: string;\n public status: ChatParticipantStatus;\n public avatar: string;\n}\n","// import { User } from \"./user\";\nimport { ParticipantMetadata } from \"./participant-metadata\";\nimport { IChatParticipant } from \"./chat-participant\";\n\nexport class ParticipantResponse\n{\n public participant: IChatParticipant;\n public metadata: ParticipantMetadata;\n}\n","export class ParticipantMetadata\n{\n public totalUnreadMessages: number = 0;\n}\n","/*\n * Public API Surface of mnl-chat\n */\nexport * from './lib/chat.module';\nexport * from './lib/services/chat.service';\nexport * from './lib/components/ng-chat/ng-chat.component';\nexport * from './lib/core/chat-adapter';\nexport * from './lib/core/message';\nexport * from './lib/core/chat-participant-status.enum';\nexport * from './lib/core/user';\nexport * from './lib/core/participant-response';\nexport * from './lib/core/participant-metadata';\nexport * from './lib/core/window';\nexport * from './lib/core/localization';\nexport * from './lib/core/chat-controller';\nexport * from './lib/core/paged-history-chat-adapter';\nexport * from './lib/core/theme.enum';\nexport * from './lib/core/chat-option';\nexport * from './lib/core/group';\nexport * from './lib/core/chat-participant';\nexport * from './lib/core/chat-group-adapter';\nexport * from './lib/core/chat-participant-type.enum';\nexport * from './lib/core/message-type.enum';\nexport * from './lib/core/file-upload-adapter';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i4.SanitizePipe","i5.FirstLetterPipe","i4.EmojifyPipe","i5.LinkfyPipe","i6.GroupMessageDisplayNamePipe","i2","i3.NgChatFriendsListComponent","i4.NgChatWindowComponent","i5.SanitizePipe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;SAUgB,OAAO,GAAA;IACrB,OAAO;QACL,eAAe;QACf,kBAAkB;QAClB,aAAa;QACb,cAAc;QACd,W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AAA,WAAA,GAAA;AAEoB,QAAA,IAAA,CAAA,eAAe,GAAwB,mBAAmB,CAAC,IAAI,CAAC;KAKnF;AAAA;;MCPY,mBAAmB,CAAA;AAI/B;;MCRY,mBAAmB,CAAA;AAAhC,IAAA,WAAA,GAAA;QAEW,IAAmB,CAAA,mBAAA,GAAW,CAAC,CAAC;KAC1C;AAAA;;ACHD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -62,6 +62,7 @@ export declare class NgChat implements OnInit, IChatController {
62
62
  onParticipantChatClosed: EventEmitter<IChatParticipant>;
63
63
  onMessagesSeen: EventEmitter<Message[]>;
64
64
  onCloseWindowClicked: EventEmitter<boolean>;
65
+ searchInputChanged: EventEmitter<string>;
65
66
  private browserNotificationsBootstrapped;
66
67
  hasPagedHistory: boolean;
67
68
  private statusDescription;
@@ -125,6 +126,7 @@ export declare class NgChat implements OnInit, IChatController {
125
126
  triggerCloseChatWindow(userId: any): void;
126
127
  triggerToggleChatWindowVisibility(userId: any): void;
127
128
  onCloseWindowClick(click: boolean): void;
129
+ onSearchInputChanged(value: string): void;
128
130
  static ɵfac: i0.ɵɵFactoryDeclaration<NgChat, never>;
129
- static ɵcmp: i0.ɵɵComponentDeclaration<NgChat, "mnl-chat", never, { "isDisabled": "isDisabled"; "adapter": "adapter"; "groupAdapter": "groupAdapter"; "userId": "userId"; "isCollapsed": "isCollapsed"; "maximizeWindowOnNewMessage": "maximizeWindowOnNewMessage"; "pollFriendsList": "pollFriendsList"; "pollingInterval": "pollingInterval"; "historyEnabled": "historyEnabled"; "emojisEnabled": "emojisEnabled"; "linkfyEnabled": "linkfyEnabled"; "audioEnabled": "audioEnabled"; "searchEnabled": "searchEnabled"; "audioSource": "audioSource"; "persistWindowsState": "persistWindowsState"; "title": "title"; "messagePlaceholder": "messagePlaceholder"; "searchPlaceholder": "searchPlaceholder"; "browserNotificationsEnabled": "browserNotificationsEnabled"; "browserNotificationIconSource": "browserNotificationIconSource"; "browserNotificationTitle": "browserNotificationTitle"; "historyPageSize": "historyPageSize"; "localization": "localization"; "hideFriendsList": "hideFriendsList"; "hideFriendsListOnUnsupportedViewport": "hideFriendsListOnUnsupportedViewport"; "fileUploadUrl": "fileUploadUrl"; "theme": "theme"; "customTheme": "customTheme"; "messageDatePipeFormat": "messageDatePipeFormat"; "showMessageDate": "showMessageDate"; "isViewportOnMobileEnabled": "isViewportOnMobileEnabled"; "fileUploadAdapter": "fileUploadAdapter"; }, { "onParticipantClicked": "onParticipantClicked"; "onParticipantChatOpened": "onParticipantChatOpened"; "onParticipantChatClosed": "onParticipantChatClosed"; "onMessagesSeen": "onMessagesSeen"; "onCloseWindowClicked": "onCloseWindowClicked"; }, never, never, false>;
131
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgChat, "mnl-chat", never, { "isDisabled": { "alias": "isDisabled"; "required": false; }; "adapter": { "alias": "adapter"; "required": false; }; "groupAdapter": { "alias": "groupAdapter"; "required": false; }; "userId": { "alias": "userId"; "required": false; }; "isCollapsed": { "alias": "isCollapsed"; "required": false; }; "maximizeWindowOnNewMessage": { "alias": "maximizeWindowOnNewMessage"; "required": false; }; "pollFriendsList": { "alias": "pollFriendsList"; "required": false; }; "pollingInterval": { "alias": "pollingInterval"; "required": false; }; "historyEnabled": { "alias": "historyEnabled"; "required": false; }; "emojisEnabled": { "alias": "emojisEnabled"; "required": false; }; "linkfyEnabled": { "alias": "linkfyEnabled"; "required": false; }; "audioEnabled": { "alias": "audioEnabled"; "required": false; }; "searchEnabled": { "alias": "searchEnabled"; "required": false; }; "audioSource": { "alias": "audioSource"; "required": false; }; "persistWindowsState": { "alias": "persistWindowsState"; "required": false; }; "title": { "alias": "title"; "required": false; }; "messagePlaceholder": { "alias": "messagePlaceholder"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "browserNotificationsEnabled": { "alias": "browserNotificationsEnabled"; "required": false; }; "browserNotificationIconSource": { "alias": "browserNotificationIconSource"; "required": false; }; "browserNotificationTitle": { "alias": "browserNotificationTitle"; "required": false; }; "historyPageSize": { "alias": "historyPageSize"; "required": false; }; "localization": { "alias": "localization"; "required": false; }; "hideFriendsList": { "alias": "hideFriendsList"; "required": false; }; "hideFriendsListOnUnsupportedViewport": { "alias": "hideFriendsListOnUnsupportedViewport"; "required": false; }; "fileUploadUrl": { "alias": "fileUploadUrl"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "customTheme": { "alias": "customTheme"; "required": false; }; "messageDatePipeFormat": { "alias": "messageDatePipeFormat"; "required": false; }; "showMessageDate": { "alias": "showMessageDate"; "required": false; }; "isViewportOnMobileEnabled": { "alias": "isViewportOnMobileEnabled"; "required": false; }; "fileUploadAdapter": { "alias": "fileUploadAdapter"; "required": false; }; }, { "onParticipantClicked": "onParticipantClicked"; "onParticipantChatOpened": "onParticipantChatOpened"; "onParticipantChatClosed": "onParticipantChatClosed"; "onMessagesSeen": "onMessagesSeen"; "onCloseWindowClicked": "onCloseWindowClicked"; "searchInputChanged": "searchInputChanged"; }, never, never, false, never>;
130
132
  }
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { EventEmitter, OnChanges, SimpleChanges, OnInit, OnDestroy } from '@angular/core';
2
2
  import { Localization } from '../../core/localization';
3
3
  import { IChatOption } from '../../core/chat-option';
4
4
  import { ChatParticipantStatus } from "../../core/chat-participant-status.enum";
@@ -8,7 +8,7 @@ import { Window } from "../../core/window";
8
8
  import { ParticipantResponse } from "../../core/participant-response";
9
9
  import { chatParticipantStatusDescriptor } from '../../core/chat-participant-status-descriptor';
10
10
  import * as i0 from "@angular/core";
11
- export declare class NgChatFriendsListComponent implements OnChanges {
11
+ export declare class NgChatFriendsListComponent implements OnChanges, OnInit, OnDestroy {
12
12
  constructor();
13
13
  participants: IChatParticipant[];
14
14
  participantsResponse: ParticipantResponse[];
@@ -25,10 +25,14 @@ export declare class NgChatFriendsListComponent implements OnChanges {
25
25
  onOptionPromptConfirmed: EventEmitter<any>;
26
26
  hideFriendsList: boolean;
27
27
  onCloseWindowClick: EventEmitter<boolean>;
28
+ searchInputChanged: EventEmitter<any>;
29
+ private searchInputSubject;
28
30
  selectedUsersFromFriendsList: User[];
29
31
  searchInput: string;
32
+ private destroy$;
30
33
  ChatParticipantStatus: typeof ChatParticipantStatus;
31
34
  chatParticipantStatusDescriptor: typeof chatParticipantStatusDescriptor;
35
+ ngOnInit(): void;
32
36
  ngOnChanges(changes: SimpleChanges): void;
33
37
  get filteredParticipants(): IChatParticipant[];
34
38
  isUserSelectedFromFriendsList(user: User): boolean;
@@ -40,6 +44,10 @@ export declare class NgChatFriendsListComponent implements OnChanges {
40
44
  onFriendsListActionCancelClicked(): void;
41
45
  onFriendsListActionConfirmClicked(): void;
42
46
  onCloseWindow(): void;
47
+ onSearchInputChange(value: string): void;
48
+ initializeSearchInputListener(): void;
49
+ ngOnDestroy(): void;
50
+ getParticipantTooltip(participant: IChatParticipant): string;
43
51
  static ɵfac: i0.ɵɵFactoryDeclaration<NgChatFriendsListComponent, never>;
44
- static ɵcmp: i0.ɵɵComponentDeclaration<NgChatFriendsListComponent, "ng-chat-friends-list", never, { "participants": "participants"; "participantsResponse": "participantsResponse"; "participantsInteractedWith": "participantsInteractedWith"; "windows": "windows"; "userId": "userId"; "localization": "localization"; "shouldDisplay": "shouldDisplay"; "isCollapsed": "isCollapsed"; "searchEnabled": "searchEnabled"; "currentActiveOption": "currentActiveOption"; "hideFriendsList": "hideFriendsList"; }, { "onParticipantClicked": "onParticipantClicked"; "onOptionPromptCanceled": "onOptionPromptCanceled"; "onOptionPromptConfirmed": "onOptionPromptConfirmed"; "onCloseWindowClick": "onCloseWindowClick"; }, never, never, false>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgChatFriendsListComponent, "ng-chat-friends-list", never, { "participants": { "alias": "participants"; "required": false; }; "participantsResponse": { "alias": "participantsResponse"; "required": false; }; "participantsInteractedWith": { "alias": "participantsInteractedWith"; "required": false; }; "windows": { "alias": "windows"; "required": false; }; "userId": { "alias": "userId"; "required": false; }; "localization": { "alias": "localization"; "required": false; }; "shouldDisplay": { "alias": "shouldDisplay"; "required": false; }; "isCollapsed": { "alias": "isCollapsed"; "required": false; }; "searchEnabled": { "alias": "searchEnabled"; "required": false; }; "currentActiveOption": { "alias": "currentActiveOption"; "required": false; }; "hideFriendsList": { "alias": "hideFriendsList"; "required": false; }; }, { "onParticipantClicked": "onParticipantClicked"; "onOptionPromptCanceled": "onOptionPromptCanceled"; "onOptionPromptConfirmed": "onOptionPromptConfirmed"; "onCloseWindowClick": "onCloseWindowClick"; "searchInputChanged": "searchInputChanged"; }, never, never, false, never>;
45
53
  }
@@ -8,5 +8,5 @@ export declare class NgChatOptionsComponent {
8
8
  activeOptionTrackerChange: EventEmitter<IChatOption>;
9
9
  onOptionClicked(option: IChatOption): void;
10
10
  static ɵfac: i0.ɵɵFactoryDeclaration<NgChatOptionsComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<NgChatOptionsComponent, "ng-chat-options", never, { "options": "options"; "activeOptionTracker": "activeOptionTracker"; }, { "activeOptionTrackerChange": "activeOptionTrackerChange"; }, never, never, false>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgChatOptionsComponent, "ng-chat-options", never, { "options": { "alias": "options"; "required": false; }; "activeOptionTracker": { "alias": "activeOptionTracker"; "required": false; }; }, { "activeOptionTrackerChange": "activeOptionTrackerChange"; }, never, never, false, never>;
12
12
  }
@@ -60,6 +60,8 @@ export declare class NgChatWindowComponent {
60
60
  onChatWindowClicked(window: Window): void;
61
61
  private clearInUseFileUploader;
62
62
  onFileChosen(window: Window): void;
63
+ getParticipantTooltip(participant: IChatParticipant): string;
64
+ getMetadataDisplay(participant: IChatParticipant): string;
63
65
  static ɵfac: i0.ɵɵFactoryDeclaration<NgChatWindowComponent, never>;
64
- static ɵcmp: i0.ɵɵComponentDeclaration<NgChatWindowComponent, "ng-chat-window", never, { "fileUploadAdapter": "fileUploadAdapter"; "window": "window"; "userId": "userId"; "localization": "localization"; "showOptions": "showOptions"; "emojisEnabled": "emojisEnabled"; "linkfyEnabled": "linkfyEnabled"; "showMessageDate": "showMessageDate"; "messageDatePipeFormat": "messageDatePipeFormat"; "hasPagedHistory": "hasPagedHistory"; }, { "onChatWindowClosed": "onChatWindowClosed"; "onMessagesSeen": "onMessagesSeen"; "onMessageSent": "onMessageSent"; "onTabTriggered": "onTabTriggered"; "onOptionTriggered": "onOptionTriggered"; "onLoadHistoryTriggered": "onLoadHistoryTriggered"; }, never, never, false>;
66
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgChatWindowComponent, "ng-chat-window", never, { "fileUploadAdapter": { "alias": "fileUploadAdapter"; "required": false; }; "window": { "alias": "window"; "required": false; }; "userId": { "alias": "userId"; "required": false; }; "localization": { "alias": "localization"; "required": false; }; "showOptions": { "alias": "showOptions"; "required": false; }; "emojisEnabled": { "alias": "emojisEnabled"; "required": false; }; "linkfyEnabled": { "alias": "linkfyEnabled"; "required": false; }; "showMessageDate": { "alias": "showMessageDate"; "required": false; }; "messageDatePipeFormat": { "alias": "messageDatePipeFormat"; "required": false; }; "hasPagedHistory": { "alias": "hasPagedHistory"; "required": false; }; }, { "onChatWindowClosed": "onChatWindowClosed"; "onMessagesSeen": "onMessagesSeen"; "onMessageSent": "onMessageSent"; "onTabTriggered": "onTabTriggered"; "onOptionTriggered": "onOptionTriggered"; "onLoadHistoryTriggered": "onLoadHistoryTriggered"; }, never, never, false, never>;
65
67
  }
@@ -6,4 +6,16 @@ export interface IChatParticipant {
6
6
  readonly status: ChatParticipantStatus;
7
7
  readonly avatar: string | null;
8
8
  readonly displayName: string;
9
+ readonly metadata?: IMetadata;
10
+ readonly showMetadataInTitle?: IMetadataInTitle;
11
+ }
12
+ export interface IMetadata {
13
+ primary?: string;
14
+ secondary?: string;
15
+ tertiary?: string;
16
+ }
17
+ export interface IMetadataInTitle {
18
+ primary?: boolean;
19
+ secondary?: boolean;
20
+ tertiary?: boolean;
9
21
  }
@@ -1,4 +1,4 @@
1
- import { FormsModule } from '@angular/forms';
1
+ import { MatButtonModule } from '@angular/material/button';
2
2
  import * as i0 from "@angular/core";
3
3
  import * as i1 from "@angular/material/button";
4
4
  import * as i2 from "@angular/material/form-field";
@@ -6,9 +6,12 @@ import * as i3 from "@angular/material/icon";
6
6
  import * as i4 from "@angular/material/input";
7
7
  import * as i5 from "@angular/forms";
8
8
  import * as i6 from "@angular/material/menu";
9
- export declare function modules(): (typeof FormsModule)[];
9
+ import * as i7 from "@angular/material/list";
10
+ import * as i8 from "@angular/material/card";
11
+ import * as i9 from "@angular/material/tooltip";
12
+ export declare function modules(): (typeof MatButtonModule)[];
10
13
  export declare class ChatMaterialModule {
11
14
  static ɵfac: i0.ɵɵFactoryDeclaration<ChatMaterialModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<ChatMaterialModule, never, [typeof i1.MatButtonModule, typeof i2.MatFormFieldModule, typeof i3.MatIconModule, typeof i4.MatInputModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.MatMenuModule], [typeof i1.MatButtonModule, typeof i2.MatFormFieldModule, typeof i3.MatIconModule, typeof i4.MatInputModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.MatMenuModule]>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ChatMaterialModule, never, [typeof i1.MatButtonModule, typeof i2.MatFormFieldModule, typeof i3.MatIconModule, typeof i4.MatInputModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.MatMenuModule, typeof i7.MatListModule, typeof i8.MatCardModule, typeof i9.MatTooltipModule], [typeof i1.MatButtonModule, typeof i2.MatFormFieldModule, typeof i3.MatIconModule, typeof i4.MatInputModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.MatMenuModule, typeof i7.MatListModule, typeof i8.MatCardModule, typeof i9.MatTooltipModule]>;
13
16
  static ɵinj: i0.ɵɵInjectorDeclaration<ChatMaterialModule>;
14
17
  }
package/package.json CHANGED
@@ -1,18 +1,14 @@
1
1
  {
2
2
  "name": "@muraai/mnl-chat",
3
- "version": "0.0.1",
3
+ "version": "0.2.0-alpha-db495b1",
4
4
  "peerDependencies": {
5
- "@angular/common": "^14.2.0",
6
- "@angular/core": "^14.2.0"
5
+ "@angular/common": "^18.0.1",
6
+ "@angular/core": "^18.0.1"
7
7
  },
8
8
  "dependencies": {
9
9
  "tslib": "^2.3.0"
10
10
  },
11
- "module": "fesm2015/muraai-mnl-chat.mjs",
12
- "es2020": "fesm2020/muraai-mnl-chat.mjs",
13
- "esm2020": "esm2020/muraai-mnl-chat.mjs",
14
- "fesm2020": "fesm2020/muraai-mnl-chat.mjs",
15
- "fesm2015": "fesm2015/muraai-mnl-chat.mjs",
11
+ "module": "fesm2022/muraai-mnl-chat.mjs",
16
12
  "typings": "index.d.ts",
17
13
  "exports": {
18
14
  "./package.json": {
@@ -20,11 +16,9 @@
20
16
  },
21
17
  ".": {
22
18
  "types": "./index.d.ts",
23
- "esm2020": "./esm2020/muraai-mnl-chat.mjs",
24
- "es2020": "./fesm2020/muraai-mnl-chat.mjs",
25
- "es2015": "./fesm2015/muraai-mnl-chat.mjs",
26
- "node": "./fesm2015/muraai-mnl-chat.mjs",
27
- "default": "./fesm2020/muraai-mnl-chat.mjs"
19
+ "esm2022": "./esm2022/muraai-mnl-chat.mjs",
20
+ "esm": "./esm2022/muraai-mnl-chat.mjs",
21
+ "default": "./fesm2022/muraai-mnl-chat.mjs"
28
22
  }
29
23
  },
30
24
  "sideEffects": false
@@ -2,7 +2,7 @@ $primary-color: #565656;
2
2
  $secondary-color: #444;
3
3
  $text-color: #FFF;
4
4
 
5
- %text-definition {
5
+ %text-definition {
6
6
  color: $text-color;
7
7
  font-family: Arial, Helvetica, sans-serif;
8
8
  }