@acorex-platform/module-conversation-client 0.0.21
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.
- package/fesm2022/acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-DsjrXRZ6.mjs +12766 -0
- package/fesm2022/acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-DsjrXRZ6.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-after-message-sent.command-D-DZ9ylV.mjs +35 -0
- package/fesm2022/acorex-platform-module-conversation-client-after-message-sent.command-D-DZ9ylV.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-assist-delegated-agent-detail-popup.component-BfjJCQ-e.mjs +492 -0
- package/fesm2022/acorex-platform-module-conversation-client-assist-delegated-agent-detail-popup.component-BfjJCQ-e.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-assist-tool-detail-popup.component-GC58B_n0.mjs +120 -0
- package/fesm2022/acorex-platform-module-conversation-client-assist-tool-detail-popup.component-GC58B_n0.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-chat-call-session-page.component-DkX4JSbN.mjs +871 -0
- package/fesm2022/acorex-platform-module-conversation-client-chat-call-session-page.component-DkX4JSbN.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-chat-call-start-popup.component-D4go5xbr.mjs +89 -0
- package/fesm2022/acorex-platform-module-conversation-client-chat-call-start-popup.component-D4go5xbr.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-BVJdVPke.mjs +108 -0
- package/fesm2022/acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-BVJdVPke.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-comments-page.component-Bq4SdK0_.mjs +83 -0
- package/fesm2022/acorex-platform-module-conversation-client-comments-page.component-Bq4SdK0_.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-contracts.mjs +225 -0
- package/fesm2022/acorex-platform-module-conversation-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-emit-typing-indicator.command-BzsN1_ns.mjs +29 -0
- package/fesm2022/acorex-platform-module-conversation-client-emit-typing-indicator.command-BzsN1_ns.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-mark-conversation-unread.command-BlYDwGVe.mjs +30 -0
- package/fesm2022/acorex-platform-module-conversation-client-mark-conversation-unread.command-BlYDwGVe.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-open-chat.command-B03q60Qx.mjs +42 -0
- package/fesm2022/acorex-platform-module-conversation-client-open-chat.command-B03q60Qx.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-retry-assist-response.command-BQLK6F69.mjs +34 -0
- package/fesm2022/acorex-platform-module-conversation-client-retry-assist-response.command-BQLK6F69.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-start-direct-chat.command-CfSIVHDu.mjs +80 -0
- package/fesm2022/acorex-platform-module-conversation-client-start-direct-chat.command-CfSIVHDu.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client-sync-read-state.command-B1Z_gZ6O.mjs +142 -0
- package/fesm2022/acorex-platform-module-conversation-client-sync-read-state.command-B1Z_gZ6O.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-conversation-client.mjs +2 -0
- package/fesm2022/acorex-platform-module-conversation-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-conversation-client-contracts.d.ts +497 -0
- package/types/acorex-platform-module-conversation-client.d.ts +1614 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-conversation-client-chat-call-session-page.component-DkX4JSbN.mjs","sources":["../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-controls.component.ts","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-controls.component.html","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-ringer.service.ts","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-signal.client.ts","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-sidebar.component.ts","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-sidebar.component.html","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-video-attach.directive.ts","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-session-page.component.ts","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-session-page.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input, output, signal } from '@angular/core';\n\nimport type { AXMChatCallPhase } from './chat-call-session.types';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport type AXMChatCallDeviceKind = 'audioinput' | 'videoinput';\n\nexport interface AXMChatCallDeviceChoice {\n kind: AXMChatCallDeviceKind;\n deviceId: string;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-chat-call-controls',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXTranslationModule, AsyncPipe],\n templateUrl: './chat-call-controls.component.html',\n styles: [\n `\n :host {\n display: block;\n width: 100%;\n }\n\n .axm-chat-call-controls {\n position: relative;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n flex-wrap: wrap;\n gap: 1.25rem;\n padding: 0.75rem 1rem 1.25rem;\n }\n\n .axm-chat-call-controls__item {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .axm-chat-call-controls__action {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.5rem;\n min-width: 4.5rem;\n padding: 0;\n border: 0;\n background: transparent;\n color: #ffffff;\n cursor: pointer;\n }\n\n .axm-chat-call-controls__action:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.45);\n outline-offset: 4px;\n border-radius: 0.5rem;\n }\n\n .axm-chat-call-controls__circle {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 3.25rem;\n height: 3.25rem;\n border-radius: 9999px;\n background: #3a3d41;\n color: #ffffff;\n font-size: 1.125rem;\n }\n\n .axm-chat-call-controls__circle--danger {\n background: #e53935;\n }\n\n .axm-chat-call-controls__circle--success {\n background: #4caf50;\n }\n\n .axm-chat-call-controls__circle--light {\n background: #f2f2f2;\n color: #1a1c1e;\n }\n\n .axm-chat-call-controls__chevron {\n position: absolute;\n top: -0.15rem;\n inset-inline-end: 0.35rem;\n z-index: 2;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.15rem;\n height: 1.15rem;\n padding: 0;\n border-radius: 9999px;\n background: #2b2e32;\n border: 1px solid rgba(255, 255, 255, 0.2);\n font-size: 0.55rem;\n color: #ffffff;\n cursor: pointer;\n }\n\n .axm-chat-call-controls__label {\n font-size: 0.75rem;\n line-height: 1.2;\n color: #ffffff;\n white-space: nowrap;\n }\n\n .axm-chat-call-controls__hangup {\n transform: rotate(135deg);\n }\n\n .axm-chat-call-controls__menu-backdrop {\n position: fixed;\n inset: 0;\n z-index: 20;\n border: 0;\n background: transparent;\n cursor: default;\n }\n\n .axm-chat-call-controls__menu {\n position: absolute;\n bottom: calc(100% + 0.5rem);\n inset-inline-start: 50%;\n z-index: 21;\n min-width: 12rem;\n max-width: 18rem;\n margin: 0;\n padding: 0.35rem;\n list-style: none;\n border-radius: 0.75rem;\n background: #2b2e32;\n border: 1px solid rgba(255, 255, 255, 0.12);\n box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);\n transform: translateX(-50%);\n }\n\n .axm-chat-call-controls__menu-empty,\n .axm-chat-call-controls__menu-item {\n display: block;\n width: 100%;\n padding: 0.5rem 0.75rem;\n border: 0;\n border-radius: 0.5rem;\n background: transparent;\n color: #ffffff;\n font-size: 0.8125rem;\n text-align: start;\n }\n\n .axm-chat-call-controls__menu-item {\n cursor: pointer;\n }\n\n .axm-chat-call-controls__menu-item:hover,\n .axm-chat-call-controls__menu-item--active {\n background: rgba(255, 255, 255, 0.1);\n }\n `,\n ],\n})\nexport class AXMChatCallControlsComponent {\n //#region ----- Inputs / Outputs -----\n\n readonly phase = input<AXMChatCallPhase>('outgoing-waiting');\n readonly videoEnabled = input(false);\n readonly micMuted = input(false);\n readonly showAddPeople = input(false);\n readonly showScreencast = input(true);\n readonly audioDevices = input<MediaDeviceInfo[]>([]);\n readonly videoDevices = input<MediaDeviceInfo[]>([]);\n readonly selectedAudioDeviceId = input<string | null>(null);\n readonly selectedVideoDeviceId = input<string | null>(null);\n\n readonly screencast = output<void>();\n readonly toggleVideo = output<void>();\n readonly toggleMute = output<void>();\n readonly endCall = output<void>();\n readonly accept = output<void>();\n readonly decline = output<void>();\n readonly addPeople = output<void>();\n readonly pickDevice = output<AXMChatCallDeviceChoice>();\n readonly requestDevices = output<AXMChatCallDeviceKind>();\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly openMenu = signal<AXMChatCallDeviceKind | null>(null);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly isIncoming = computed(() => this.phase() === 'incoming');\n\n protected readonly hangupLabelKey = computed(() =>\n this.phase() === 'active'\n ? '@conversation:chat.call.end-call'\n : '@conversation:chat.call.cancel',\n );\n\n protected readonly videoLabelKey = computed(() =>\n this.videoEnabled()\n ? '@conversation:chat.call.stop-video'\n : '@conversation:chat.call.start-video',\n );\n\n protected readonly muteLabelKey = computed(() =>\n this.micMuted() ? '@conversation:chat.call.unmute' : '@conversation:chat.call.mute',\n );\n\n protected readonly menuDevices = computed(() => {\n const kind = this.openMenu();\n if (kind === 'audioinput') {\n return this.audioDevices();\n }\n if (kind === 'videoinput') {\n return this.videoDevices();\n }\n return [];\n });\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onOpenDeviceMenu(event: Event, kind: AXMChatCallDeviceKind): void {\n event.preventDefault();\n event.stopPropagation();\n this.openMenu.set(this.openMenu() === kind ? null : kind);\n this.requestDevices.emit(kind);\n }\n\n protected onCloseDeviceMenu(): void {\n this.openMenu.set(null);\n }\n\n protected onSelectDevice(kind: AXMChatCallDeviceKind, deviceId: string): void {\n this.pickDevice.emit({ kind, deviceId });\n this.openMenu.set(null);\n }\n\n protected selectedDeviceId(kind: AXMChatCallDeviceKind): string | null {\n return kind === 'audioinput' ? this.selectedAudioDeviceId() : this.selectedVideoDeviceId();\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-chat-call-controls\">\n <!-- ----- Incoming: camera before decline/accept ----- -->\n @if (isIncoming()) {\n <div class=\"axm-chat-call-controls__item\">\n <button type=\"button\" class=\"axm-chat-call-controls__action\" (click)=\"toggleVideo.emit()\">\n <span class=\"axm-chat-call-controls__circle\" [class.axm-chat-call-controls__circle--light]=\"videoEnabled()\">\n <i class=\"fa-solid\" [class.fa-video]=\"videoEnabled()\" [class.fa-video-slash]=\"!videoEnabled()\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-controls__label\">{{ videoLabelKey() | translate | async }}</span>\n </button>\n <button\n type=\"button\"\n class=\"axm-chat-call-controls__chevron\"\n (click)=\"onOpenDeviceMenu($event, 'videoinput')\"\n [attr.aria-label]=\"'@conversation:chat.call.devices.camera' | translate | async\"\n >\n <i class=\"fa-solid fa-chevron-up\" aria-hidden=\"true\"></i>\n </button>\n </div>\n\n <button type=\"button\" class=\"axm-chat-call-controls__action\" (click)=\"decline.emit()\">\n <span class=\"axm-chat-call-controls__circle axm-chat-call-controls__circle--danger\">\n <i class=\"fa-solid fa-phone axm-chat-call-controls__hangup\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-controls__label\">{{ '@conversation:chat.call.decline' | translate | async }}</span>\n </button>\n\n <button type=\"button\" class=\"axm-chat-call-controls__action\" (click)=\"accept.emit()\">\n <span class=\"axm-chat-call-controls__circle axm-chat-call-controls__circle--success\">\n <i class=\"fa-solid fa-phone\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-controls__label\">{{ '@conversation:chat.call.accept' | translate | async }}</span>\n </button>\n\n <div class=\"axm-chat-call-controls__item\">\n <button type=\"button\" class=\"axm-chat-call-controls__action\" (click)=\"toggleMute.emit()\">\n <span class=\"axm-chat-call-controls__circle\" [class.axm-chat-call-controls__circle--light]=\"!micMuted()\">\n <i class=\"fa-solid\" [class.fa-microphone]=\"!micMuted()\" [class.fa-microphone-slash]=\"micMuted()\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-controls__label\">{{ muteLabelKey() | translate | async }}</span>\n </button>\n <button\n type=\"button\"\n class=\"axm-chat-call-controls__chevron\"\n (click)=\"onOpenDeviceMenu($event, 'audioinput')\"\n [attr.aria-label]=\"'@conversation:chat.call.devices.microphone' | translate | async\"\n >\n <i class=\"fa-solid fa-chevron-up\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n <!-- ----- Outgoing / active controls ----- -->\n @else {\n <!-- ----- Screencast only during an active call ----- -->\n @if (showScreencast()) {\n <button type=\"button\" class=\"axm-chat-call-controls__action\" (click)=\"screencast.emit()\">\n <span class=\"axm-chat-call-controls__circle axm-chat-call-controls__circle--light\">\n <i class=\"fa-solid fa-desktop\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-controls__label\">{{ '@conversation:chat.call.screencast' | translate | async }}</span>\n </button>\n }\n\n <div class=\"axm-chat-call-controls__item\">\n <button type=\"button\" class=\"axm-chat-call-controls__action\" (click)=\"toggleVideo.emit()\">\n <span class=\"axm-chat-call-controls__circle\" [class.axm-chat-call-controls__circle--light]=\"videoEnabled()\">\n <i class=\"fa-solid\" [class.fa-video]=\"videoEnabled()\" [class.fa-video-slash]=\"!videoEnabled()\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-controls__label\">{{ videoLabelKey() | translate | async }}</span>\n </button>\n <button\n type=\"button\"\n class=\"axm-chat-call-controls__chevron\"\n (click)=\"onOpenDeviceMenu($event, 'videoinput')\"\n [attr.aria-label]=\"'@conversation:chat.call.devices.camera' | translate | async\"\n >\n <i class=\"fa-solid fa-chevron-up\" aria-hidden=\"true\"></i>\n </button>\n </div>\n\n <button type=\"button\" class=\"axm-chat-call-controls__action\" (click)=\"endCall.emit()\">\n <span class=\"axm-chat-call-controls__circle axm-chat-call-controls__circle--danger\">\n <i class=\"fa-solid fa-phone axm-chat-call-controls__hangup\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-controls__label\">{{ hangupLabelKey() | translate | async }}</span>\n </button>\n\n <div class=\"axm-chat-call-controls__item\">\n <button type=\"button\" class=\"axm-chat-call-controls__action\" (click)=\"toggleMute.emit()\">\n <span class=\"axm-chat-call-controls__circle\" [class.axm-chat-call-controls__circle--light]=\"!micMuted()\">\n <i class=\"fa-solid\" [class.fa-microphone]=\"!micMuted()\" [class.fa-microphone-slash]=\"micMuted()\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-controls__label\">{{ muteLabelKey() | translate | async }}</span>\n </button>\n <button\n type=\"button\"\n class=\"axm-chat-call-controls__chevron\"\n (click)=\"onOpenDeviceMenu($event, 'audioinput')\"\n [attr.aria-label]=\"'@conversation:chat.call.devices.microphone' | translate | async\"\n >\n <i class=\"fa-solid fa-chevron-up\" aria-hidden=\"true\"></i>\n </button>\n </div>\n\n <!-- ----- Add people on an active group call ----- -->\n @if (showAddPeople()) {\n <button type=\"button\" class=\"axm-chat-call-controls__action\" (click)=\"addPeople.emit()\">\n <span class=\"axm-chat-call-controls__circle axm-chat-call-controls__circle--light\">\n <i class=\"fa-solid fa-user-plus\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-controls__label\">{{ '@conversation:chat.call.add-people' | translate | async }}</span>\n </button>\n }\n }\n\n <!-- ----- Device switcher ----- -->\n @if (openMenu(); as kind) {\n <button type=\"button\" class=\"axm-chat-call-controls__menu-backdrop\" (click)=\"onCloseDeviceMenu()\"></button>\n <ul class=\"axm-chat-call-controls__menu\" role=\"listbox\">\n @if (menuDevices().length === 0) {\n <li class=\"axm-chat-call-controls__menu-empty\">\n {{ '@conversation:chat.call.devices.empty' | translate | async }}\n </li>\n }\n @for (device of menuDevices(); track device.deviceId) {\n <li>\n <button\n type=\"button\"\n class=\"axm-chat-call-controls__menu-item\"\n [class.axm-chat-call-controls__menu-item--active]=\"device.deviceId === selectedDeviceId(kind)\"\n (click)=\"onSelectDevice(kind, device.deviceId)\"\n >\n {{ device.label || device.deviceId }}\n </button>\n </li>\n }\n </ul>\n }\n</div>\n","//#region ----- Imports -----\n\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst CHAT_CALL_INCOMING_RING_SRC = 'assets/sounds/ring.mp3';\nconst CHAT_CALL_OUTGOING_RING_SRC = 'assets/sounds/phone-call.mp3';\nconst CHAT_CALL_OUTGOING_GAP_MS = 2500;\n\n//#endregion\n\n//#region ----- Service -----\n\n/**\n * Plays call audio: looping ringtone for the callee, spaced ringback for the caller.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMChatCallRingerService {\n //#region ----- Private State -----\n\n private audio: HTMLAudioElement | null = null;\n private gapTimer: ReturnType<typeof setTimeout> | null = null;\n private playing = false;\n\n //#endregion\n\n //#region ----- Playback -----\n\n playIncoming(): void {\n this.#playLooped(CHAT_CALL_INCOMING_RING_SRC);\n }\n\n playOutgoing(): void {\n this.#playWithGap(CHAT_CALL_OUTGOING_RING_SRC, CHAT_CALL_OUTGOING_GAP_MS);\n }\n\n stop(): void {\n this.playing = false;\n this.#clearGapTimer();\n const audio = this.audio;\n this.audio = null;\n if (!audio) {\n return;\n }\n audio.pause();\n audio.removeAttribute('src');\n audio.load();\n }\n\n #playLooped(src: string): void {\n this.stop();\n if (typeof Audio === 'undefined') {\n return;\n }\n this.playing = true;\n const audio = new Audio(src);\n audio.loop = true;\n void audio.play().catch(() => {\n // Autoplay may be blocked until a user gesture; the call UI still shows.\n });\n this.audio = audio;\n }\n\n #playWithGap(src: string, gapMs: number): void {\n this.stop();\n if (typeof Audio === 'undefined') {\n return;\n }\n this.playing = true;\n this.#playOutgoingClip(src, gapMs);\n }\n\n #playOutgoingClip(src: string, gapMs: number): void {\n if (!this.playing) {\n return;\n }\n const previous = this.audio;\n this.audio = null;\n if (previous) {\n previous.pause();\n previous.removeAttribute('src');\n previous.load();\n }\n\n const audio = new Audio(src);\n audio.loop = false;\n audio.addEventListener(\n 'ended',\n () => {\n if (!this.playing) {\n return;\n }\n this.#clearGapTimer();\n this.gapTimer = setTimeout(() => {\n this.gapTimer = null;\n this.#playOutgoingClip(src, gapMs);\n }, gapMs);\n },\n { once: true },\n );\n void audio.play().catch(() => {\n // Autoplay may be blocked until a user gesture; the call UI still shows.\n });\n this.audio = audio;\n }\n\n #clearGapTimer(): void {\n if (this.gapTimer == null) {\n return;\n }\n clearTimeout(this.gapTimer);\n this.gapTimer = null;\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXP_ROOT_CONFIG_TOKEN } from '@acorex-platform/framework-client/common';\nimport type {\n AXPRealtimeConversationCallAction,\n AXPRealtimeConversationCallMedia,\n} from '@acorex-platform/framework-client/realtime';\nimport { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXMChatCallSignalRequest {\n conversationId: string;\n action: AXPRealtimeConversationCallAction;\n media: AXPRealtimeConversationCallMedia;\n callId?: string;\n targetUserIds?: string[];\n}\n\nexport interface AXMChatCallSignalResult {\n ok: true;\n callId: string;\n}\n\nexport interface AXMChatCallLogRequest {\n conversationId: string;\n outcome: 'declined' | 'missed' | 'cancelled';\n media: AXPRealtimeConversationCallMedia;\n callId: string;\n}\n\nexport interface AXMChatCallLogResult {\n ok: true;\n messageId: string;\n callId: string;\n}\n\n//#endregion\n\n//#region ----- Client -----\n\n/**\n * Posts call signaling to the conversation API (built-in realtime fan-out on server).\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMChatCallSignalClient {\n private readonly http = inject(HttpClient);\n private readonly rootConfig = inject(AXP_ROOT_CONFIG_TOKEN);\n\n async signal(request: AXMChatCallSignalRequest): Promise<AXMChatCallSignalResult> {\n const conversationId = request.conversationId.trim();\n const url = `${this.rootConfig.baseUrl}/v1/global/conversation/conversations/${encodeURIComponent(conversationId)}/calls/signal`;\n return firstValueFrom(\n this.http.post<AXMChatCallSignalResult>(\n url,\n {\n action: request.action,\n media: request.media,\n callId: request.callId,\n targetUserIds: request.targetUserIds,\n },\n { withCredentials: true },\n ),\n );\n }\n\n async log(request: AXMChatCallLogRequest): Promise<AXMChatCallLogResult> {\n const conversationId = request.conversationId.trim();\n const url = `${this.rootConfig.baseUrl}/v1/global/conversation/conversations/${encodeURIComponent(conversationId)}/calls/log`;\n return firstValueFrom(\n this.http.post<AXMChatCallLogResult>(\n url,\n {\n outcome: request.outcome,\n media: request.media,\n callId: request.callId,\n },\n { withCredentials: true },\n ),\n );\n }\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPAvatarComponent } from '@acorex-platform/framework-client/layout/components';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\n\nimport type { AXMChatCallParticipantView } from './chat-call-session.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-chat-call-sidebar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXPAvatarComponent, AXTranslationModule, AsyncPipe],\n templateUrl: './chat-call-sidebar.component.html',\n styles: [\n `\n :host {\n display: flex;\n flex-direction: column;\n width: 16.5rem;\n min-width: 16.5rem;\n height: 100%;\n background: #141517;\n border-inline-start: 1px solid rgba(255, 255, 255, 0.06);\n color: #ffffff;\n }\n\n .axm-chat-call-sidebar__header {\n padding: 1rem 1rem 0.75rem;\n font-size: 0.75rem;\n color: rgba(255, 255, 255, 0.55);\n }\n\n .axm-chat-call-sidebar__list {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 0.5rem 1rem 1rem;\n }\n\n .axm-chat-call-sidebar__row {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n }\n\n .axm-chat-call-sidebar__meta {\n display: flex;\n flex-direction: column;\n gap: 0.2rem;\n min-width: 0;\n }\n\n .axm-chat-call-sidebar__name {\n font-size: 0.875rem;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .axm-chat-call-sidebar__status {\n display: inline-flex;\n align-items: center;\n gap: 0.35rem;\n font-size: 0.75rem;\n color: #7dd87d;\n }\n\n .axm-chat-call-sidebar__status i {\n font-size: 0.7rem;\n }\n\n .axm-chat-call-sidebar__actions {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n padding: 0.75rem 0.5rem 1rem;\n border-top: 1px solid rgba(255, 255, 255, 0.06);\n }\n\n .axm-chat-call-sidebar__action {\n display: flex;\n align-items: center;\n gap: 0.65rem;\n width: 100%;\n padding: 0.65rem 0.75rem;\n border: 0;\n border-radius: 0.5rem;\n background: transparent;\n color: #ffffff;\n font-size: 0.875rem;\n cursor: pointer;\n text-align: start;\n }\n\n .axm-chat-call-sidebar__action:hover {\n background: rgba(255, 255, 255, 0.06);\n }\n `,\n ],\n})\nexport class AXMChatCallSidebarComponent {\n //#region ----- Inputs / Outputs -----\n\n readonly participants = input<AXMChatCallParticipantView[]>([]);\n\n readonly addPeople = output<void>();\n readonly shareLink = output<void>();\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-chat-call-sidebar__header\">\n {{ '@conversation:chat.call.encrypted' | translate | async }}\n</div>\n\n<div class=\"axm-chat-call-sidebar__list\">\n @for (participant of participants(); track participant.id) {\n <div class=\"axm-chat-call-sidebar__row\">\n <axp-avatar [size]=\"36\" [fullName]=\"participant.name\" [src]=\"participant.avatar ?? ''\" />\n <div class=\"axm-chat-call-sidebar__meta\">\n <span class=\"axm-chat-call-sidebar__name\">{{ participant.name }}</span>\n @if (participant.speaking) {\n <span class=\"axm-chat-call-sidebar__status\">\n <i class=\"fa-solid fa-microphone\" aria-hidden=\"true\"></i>\n <i class=\"fa-solid fa-video\" aria-hidden=\"true\"></i>\n {{ '@conversation:chat.call.speaking' | translate | async }}\n </span>\n }\n </div>\n </div>\n }\n</div>\n\n<div class=\"axm-chat-call-sidebar__actions\">\n <button type=\"button\" class=\"axm-chat-call-sidebar__action\" (click)=\"addPeople.emit()\">\n <i class=\"fa-solid fa-user-plus\" aria-hidden=\"true\"></i>\n <span>{{ '@conversation:chat.call.add-people' | translate | async }}</span>\n </button>\n <button type=\"button\" class=\"axm-chat-call-sidebar__action\" (click)=\"shareLink.emit()\">\n <i class=\"fa-solid fa-link\" aria-hidden=\"true\"></i>\n <span>{{ '@conversation:chat.call.share-link' | translate | async }}</span>\n </button>\n</div>\n","//#region ----- Imports -----\n\nimport { Directive, ElementRef, effect, inject, input } from '@angular/core';\nimport type { LocalTrack, RemoteTrack } from 'livekit-client';\n\n//#endregion\n\n//#region ----- Directive -----\n\ntype AXMChatCallAttachableTrack = LocalTrack | RemoteTrack;\n\n/**\n * Attaches a LiveKit track to the host media element.\n */\n@Directive({\n selector: 'video[axmChatCallTrack]',\n})\nexport class AXMChatCallVideoAttachDirective {\n //#region ----- Inputs -----\n\n readonly axmChatCallTrack = input<AXMChatCallAttachableTrack | null>(null);\n\n //#endregion\n\n //#region ----- Services & Dependencies -----\n\n private readonly host = inject(ElementRef<HTMLVideoElement>);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n effect((onCleanup) => {\n const track = this.axmChatCallTrack();\n const element = this.host.nativeElement;\n if (!track) {\n element.srcObject = null;\n return;\n }\n\n track.attach(element);\n void element.play().catch(() => undefined);\n\n onCleanup(() => {\n track.detach(element);\n });\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPAvatarComponent } from '@acorex-platform/framework-client/layout/components';\nimport type { AXConversation } from '@acorex/components/conversation';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n OnDestroy,\n OnInit,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ConnectionState } from 'livekit-client';\nimport { Subscription } from 'rxjs';\n\nimport { AXMConversationRealtimeBus } from '../../services/conversation-realtime.bus';\nimport { AXMChatUserApi } from '../services/chat-conversation-apis.abstract';\nimport { axmResolveConversationListAvatar } from '../utils/chat-avatar.util';\nimport {\n AXMChatCallControlsComponent,\n type AXMChatCallDeviceChoice,\n type AXMChatCallDeviceKind,\n} from './chat-call-controls.component';\nimport { AXMChatCallEventsService } from './chat-call-events.service';\nimport { AXMChatCallRingerService } from './chat-call-ringer.service';\nimport { axmReadChatCallLog, type AXMChatCallLogOutcome } from './chat-call-log.util';\nimport { AXMChatCallRtcSignalInboxService } from './chat-call-rtc-signal-inbox.service';\nimport {\n AXM_CHAT_CALL_RTC_PROVIDERS,\n AXMChatCallRtcService,\n} from './chat-call-rtc.service';\nimport { AXMChatCallSignalClient } from './chat-call-signal.client';\nimport {\n AXMChatCallMediaType,\n AXMChatCallParticipantView,\n AXMChatCallPhase,\n} from './chat-call-session.types';\nimport { AXMChatCallSidebarComponent } from './chat-call-sidebar.component';\nimport { AXMChatCallVideoAttachDirective } from './chat-call-video-attach.directive';\n\n//#endregion\n\n//#region ----- Component -----\n\n/**\n * Call-session popup backed by RTC/LiveKit.\n */\n@Component({\n selector: 'axm-chat-call-session-page',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ax-dark',\n },\n providers: [...AXM_CHAT_CALL_RTC_PROVIDERS],\n imports: [\n AXPAvatarComponent,\n AXTranslationModule,\n AsyncPipe,\n AXMChatCallControlsComponent,\n AXMChatCallSidebarComponent,\n AXMChatCallVideoAttachDirective,\n ],\n templateUrl: './chat-call-session-page.component.html',\n styles: [\n `\n .axm-chat-call-session-overlay .ax-popup-header {\n display: none;\n }\n\n .axm-chat-call-session-overlay .ax-popup .ax-popup-body-container {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n axm-chat-call-session-page {\n display: flex;\n flex: 1;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 0;\n }\n\n .axm-chat-call-session {\n box-sizing: border-box;\n display: flex;\n flex: 1;\n width: 100%;\n min-height: 0;\n height: 100%;\n }\n\n .axm-chat-call-session__shell {\n display: flex;\n flex: 1;\n width: 100%;\n min-height: 0;\n height: 100%;\n }\n\n .axm-chat-call-session__main {\n display: flex;\n flex: 1;\n flex-direction: column;\n align-items: center;\n min-width: 0;\n min-height: 0;\n padding: 1.25rem 1.25rem 0.5rem;\n }\n\n .axm-chat-call-session__body {\n display: flex;\n flex: 1;\n flex-direction: column;\n align-items: center;\n width: 100%;\n min-height: 0;\n }\n\n .axm-chat-call-session__main--idle .axm-chat-call-session__body {\n justify-content: center;\n }\n\n .axm-chat-call-session__header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.5rem;\n margin-top: 1.5rem;\n text-align: center;\n }\n\n .axm-chat-call-session__main--idle .axm-chat-call-session__header {\n margin-top: 0;\n }\n\n .axm-chat-call-session__header--compact {\n margin-top: 0.25rem;\n margin-bottom: 0.5rem;\n }\n\n .axm-chat-call-session__name {\n margin: 0;\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 1.3;\n }\n\n .axm-chat-call-session__header--compact .axm-chat-call-session__name {\n font-size: 1rem;\n }\n\n .axm-chat-call-session__phase-text {\n margin: 0;\n font-size: 0.875rem;\n opacity: 0.65;\n }\n\n .axm-chat-call-session__stage {\n position: relative;\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n width: 100%;\n min-height: 0;\n margin: 0.75rem 0;\n overflow: hidden;\n }\n\n .axm-chat-call-session__stage--group {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));\n gap: 0.75rem;\n align-content: center;\n padding: 0.5rem;\n }\n\n .axm-chat-call-session__tile {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-radius: 0.75rem;\n background: #101113;\n border: 2px solid transparent;\n }\n\n .axm-chat-call-session__tile--primary {\n width: min(100%, 36rem);\n aspect-ratio: 3 / 4;\n max-height: min(70vh, 40rem);\n }\n\n .axm-chat-call-session__stage--group .axm-chat-call-session__tile {\n aspect-ratio: 3 / 4;\n min-height: 12rem;\n }\n\n .axm-chat-call-session__tile--speaking {\n border-color: #4caf50;\n }\n\n .axm-chat-call-session__tile-name {\n position: absolute;\n inset-inline-start: 0.65rem;\n bottom: 0.65rem;\n padding: 0.15rem 0.45rem;\n border-radius: 0.35rem;\n background: rgba(0, 0, 0, 0.45);\n font-size: 0.75rem;\n }\n\n .axm-chat-call-session__video {\n width: 100%;\n height: 100%;\n object-fit: cover;\n background: #000;\n }\n\n .axm-chat-call-session__pip {\n position: absolute;\n right: 1rem;\n bottom: 1rem;\n width: 8.5rem;\n aspect-ratio: 3 / 4;\n overflow: hidden;\n border-radius: 0.5rem;\n border: 1px solid rgba(255, 255, 255, 0.2);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);\n background: #000;\n }\n\n .axm-chat-call-session__status-block {\n display: flex;\n flex: 1;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 1rem;\n width: 100%;\n min-height: 0;\n padding: 2rem;\n text-align: center;\n }\n\n .axm-chat-call-session__status-block--error {\n color: #ff8a80;\n }\n\n .axm-chat-call-session__text-button {\n padding: 0.5rem 1rem;\n border: 1px solid currentColor;\n border-radius: 9999px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: 0.85;\n }\n\n axm-chat-call-controls {\n flex-shrink: 0;\n margin-top: auto;\n width: 100%;\n }\n `,\n ],\n})\nexport class AXMChatCallSessionPageComponent extends AXBasePageComponent implements OnInit, OnDestroy {\n //#region ----- Popup Inputs -----\n\n /** Assigned by {@link AXPopupService} via `data`. */\n sessionConversation?: AXConversation;\n sessionMedia: AXMChatCallMediaType = 'voice';\n sessionPhase: AXMChatCallPhase = 'outgoing-waiting';\n sessionCallId?: string;\n\n //#endregion\n\n //#region ----- Services & Dependencies -----\n\n private readonly userApi = inject(AXMChatUserApi);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n private readonly rtc = inject(AXMChatCallRtcService);\n private readonly callSignal = inject(AXMChatCallSignalClient);\n private readonly signalInbox = inject(AXMChatCallRtcSignalInboxService);\n private readonly callEvents = inject(AXMChatCallEventsService);\n private readonly realtimeBus = inject(AXMConversationRealtimeBus);\n private readonly ringer = inject(AXMChatCallRingerService);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly loading = signal(true);\n protected readonly error = signal(false);\n protected readonly errorMessage = signal<string | null>(null);\n protected readonly conversation = signal<AXConversation | null>(null);\n protected readonly phase = signal<AXMChatCallPhase>('outgoing-waiting');\n protected readonly mediaType = signal<AXMChatCallMediaType>('voice');\n protected readonly videoEnabled = signal(false);\n protected readonly micMuted = signal(false);\n protected readonly currentUserId = signal<string | null>(null);\n private readonly callId = signal<string | null>(null);\n private ringTimeoutId: ReturnType<typeof setTimeout> | null = null;\n private outcomeSub: Subscription | null = null;\n private callEventsSub: Subscription | null = null;\n private closing = false;\n private accepting = false;\n protected readonly audioDevices = signal<MediaDeviceInfo[]>([]);\n protected readonly videoDevices = signal<MediaDeviceInfo[]>([]);\n protected readonly selectedAudioDeviceId = signal<string | null>(null);\n protected readonly selectedVideoDeviceId = signal<string | null>(null);\n\n protected readonly localVideoTrack = this.rtc.localVideoTrack;\n protected readonly remoteVideos = this.rtc.remoteVideos;\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly peerDisplayName = computed(() => {\n const conversation = this.conversation();\n if (!conversation) {\n return '';\n }\n return axmResolveConversationListAvatar(conversation).title;\n });\n\n protected readonly peerAvatarSrc = computed(() => {\n const conversation = this.conversation();\n if (!conversation) {\n return '';\n }\n return axmResolveConversationListAvatar(conversation).avatar ?? '';\n });\n\n protected readonly isGroupLayout = computed(() => {\n const conversation = this.conversation();\n if (!conversation) {\n return false;\n }\n return conversation.type === 'group' || (conversation.participants?.length ?? 0) > 2;\n });\n\n protected readonly showStage = computed(() => {\n if (this.phase() === 'active' || this.mediaType() === 'video' || this.videoEnabled()) {\n return true;\n }\n return this.remoteVideos().length > 0;\n });\n\n /** Voice ring / waiting without a video stage — center the profile block. */\n protected readonly idleLayout = computed(() => {\n if (this.showStage()) {\n return false;\n }\n const phase = this.phase();\n return phase === 'incoming' || phase === 'outgoing-waiting' || phase === 'connecting';\n });\n\n protected readonly headerAvatarSize = computed(() => (this.showStage() ? 48 : 128));\n\n protected readonly phaseTextKey = computed(() => {\n switch (this.phase()) {\n case 'incoming':\n return '@conversation:chat.call.is-calling';\n case 'connecting':\n return '@conversation:chat.call.connecting';\n case 'active':\n return '@conversation:chat.call.connected';\n default:\n return '@conversation:chat.call.waiting';\n }\n });\n\n protected readonly primaryRemoteVideo = computed(() => this.remoteVideos()[0] ?? null);\n\n protected readonly selfParticipant = computed((): AXMChatCallParticipantView | null => {\n const conversation = this.conversation();\n const currentUserId = this.currentUserId();\n if (!conversation || !currentUserId) {\n return null;\n }\n const self = conversation.participants?.find((participant) => participant.id === currentUserId);\n return {\n id: currentUserId,\n name: self?.name ?? 'You',\n avatar: self?.avatar,\n isSelf: true,\n micMuted: this.micMuted(),\n videoEnabled: this.videoEnabled(),\n speaking: !this.micMuted(),\n };\n });\n\n protected readonly sidebarParticipants = computed((): AXMChatCallParticipantView[] => {\n const conversation = this.conversation();\n const currentUserId = this.currentUserId();\n if (!conversation) {\n return [];\n }\n\n const remotes = (conversation.participants ?? [])\n .filter((participant) => participant.id !== currentUserId)\n .map((participant) => ({\n id: participant.id,\n name: participant.name,\n avatar: participant.avatar,\n isSelf: false,\n micMuted: false,\n videoEnabled: this.remoteVideos().some((item) => item.participantId === participant.id),\n speaking: this.remoteVideos().some((item) => item.participantId === participant.id),\n }));\n\n const self = this.selfParticipant();\n return self ? [...remotes, self] : remotes;\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const remoteCount = this.rtc.remoteParticipantCount();\n const connectionState = this.rtc.connectionState();\n const phase = this.phase();\n if (\n connectionState === ConnectionState.Connected &&\n remoteCount > 0 &&\n (phase === 'outgoing-waiting' || phase === 'connecting')\n ) {\n this.#clearRingTimeout();\n this.ringer.stop();\n this.phase.set('active');\n void this.rtc.ensureAudioPlayback();\n }\n });\n }\n\n override ngOnInit(): void {\n this.outcomeSub = this.realtimeBus.messageStream$.subscribe((message) => {\n const log = axmReadChatCallLog(message);\n const currentCallId = this.callId();\n if (!log || !currentCallId || log.callId !== currentCallId) {\n return;\n }\n void this.#closeFromRemoteLog();\n });\n this.callEventsSub = this.callEvents.events$.subscribe((payload) => {\n const currentCallId = this.callId();\n if (!currentCallId || payload.callId !== currentCallId) {\n return;\n }\n if (payload.fromUserId === this.currentUserId()) {\n return;\n }\n if (payload.action === 'accept') {\n void this.#onPeerAccepted();\n return;\n }\n if (payload.action === 'end') {\n void this.#closeFromRemoteEnd();\n return;\n }\n if (payload.action === 'decline' || payload.action === 'cancel') {\n void this.#closeFromRemoteLog();\n }\n });\n void this.#bootstrap();\n }\n\n override ngOnDestroy(): void {\n this.ringer.stop();\n this.#clearRingTimeout();\n this.outcomeSub?.unsubscribe();\n this.callEventsSub?.unsubscribe();\n if (!this.closing) {\n const phase = this.phase();\n if (phase === 'incoming') {\n void this.#logOutcome('declined');\n } else if (phase === 'outgoing-waiting') {\n void this.#logOutcome('cancelled');\n }\n }\n this.signalInbox.releaseCall(this.callId());\n void this.rtc.disconnect();\n super.ngOnDestroy();\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onToggleVideo(): void {\n void this.#setVideoEnabled(!this.videoEnabled());\n }\n\n protected onToggleMute(): void {\n const nextMuted = !this.micMuted();\n this.micMuted.set(nextMuted);\n void this.rtc.setMicrophoneEnabled(!nextMuted);\n if (!nextMuted) {\n void this.rtc.ensureAudioPlayback();\n }\n }\n\n protected async onScreencast(): Promise<void> {\n try {\n await this.rtc.toggleScreenShare(!this.rtc.isScreenSharing());\n } catch {\n const message = await this.translationService.translateAsync('@conversation:chat.call.media-error');\n this.#toast(message, 'danger');\n }\n }\n\n protected onEndCall(): void {\n if (this.phase() === 'outgoing-waiting') {\n void this.#finishWithLog('cancelled');\n return;\n }\n void this.#endActiveCall();\n }\n\n protected onAccept(): void {\n void this.#acceptIncoming();\n }\n\n protected onDecline(): void {\n void this.#finishWithLog('declined');\n }\n\n protected async onAddPeople(): Promise<void> {\n const message = await this.translationService.translateAsync('@conversation:chat.call.add-people-soon');\n this.#toast(message, 'default');\n }\n\n protected onRequestDevices(kind: AXMChatCallDeviceKind): void {\n void this.#refreshDevices(kind);\n }\n\n protected onPickDevice(choice: AXMChatCallDeviceChoice): void {\n if (choice.kind === 'audioinput') {\n this.selectedAudioDeviceId.set(choice.deviceId);\n } else {\n this.selectedVideoDeviceId.set(choice.deviceId);\n }\n void this.rtc.switchInputDevice(choice.kind, choice.deviceId);\n }\n\n protected async onShareLink(): Promise<void> {\n try {\n await navigator.clipboard.writeText(window.location.href);\n const message = await this.translationService.translateAsync('@conversation:chat.call.link-copied');\n this.#toast(message, 'success');\n } catch {\n const message = await this.translationService.translateAsync('@conversation:chat.call.link-copy-failed');\n this.#toast(message, 'danger');\n }\n }\n\n //#endregion\n\n //#region ----- Bootstrap -----\n\n async #bootstrap(): Promise<void> {\n const conversation = this.sessionConversation;\n const conversationId = conversation?.id?.trim();\n const media = this.sessionMedia === 'video' ? 'video' : 'voice';\n const phase: AXMChatCallPhase =\n this.sessionPhase === 'incoming' ||\n this.sessionPhase === 'active' ||\n this.sessionPhase === 'connecting' ||\n this.sessionPhase === 'outgoing-waiting'\n ? this.sessionPhase\n : 'outgoing-waiting';\n\n this.mediaType.set(media);\n this.phase.set(phase);\n this.videoEnabled.set(media === 'video');\n this.callId.set(this.sessionCallId?.trim() || crypto.randomUUID());\n\n if (!conversation || !conversationId) {\n this.loading.set(false);\n this.error.set(true);\n return;\n }\n\n this.loading.set(true);\n this.error.set(false);\n this.errorMessage.set(null);\n this.conversation.set(conversation);\n\n try {\n const currentUser = await this.userApi.getCurrentUser();\n this.currentUserId.set(currentUser.id);\n this.videoEnabled.set(media === 'video');\n this.micMuted.set(false);\n\n if (phase === 'incoming') {\n this.ringer.playIncoming();\n void this.#refreshDevices();\n return;\n }\n\n this.phase.set('outgoing-waiting');\n this.ringer.playOutgoing();\n await this.#ringPeers(currentUser.id);\n this.#armRingTimeout();\n void this.#connectMedia(currentUser.id, currentUser.name, conversationId, media).catch(async (error: unknown) => {\n const fallback = await this.translationService.translateAsync('@conversation:chat.call.connect-error');\n this.#toast(error instanceof Error && error.message ? error.message : fallback, 'danger');\n });\n void this.#refreshDevices();\n } catch (error: unknown) {\n this.error.set(true);\n const fallback = await this.translationService.translateAsync('@conversation:chat.call.connect-error');\n this.errorMessage.set(error instanceof Error && error.message ? error.message : fallback);\n } finally {\n this.loading.set(false);\n }\n }\n\n //#endregion\n\n //#region ----- Call Signaling -----\n\n async #connectMedia(\n participantIdentity: string,\n participantName: string | undefined,\n conversationId: string,\n media: AXMChatCallMediaType,\n ): Promise<void> {\n await this.rtc.connect({\n conversationId,\n participantIdentity,\n participantName,\n media,\n });\n }\n\n async #ringPeers(fromUserId: string): Promise<void> {\n const conversation = this.conversation();\n const callId = this.callId();\n if (!conversation?.id || !callId) {\n return;\n }\n const targetUserIds = (conversation.participants ?? [])\n .map((participant) => participant.id?.trim())\n .filter((id): id is string => Boolean(id) && id !== fromUserId);\n try {\n await this.callSignal.signal({\n conversationId: conversation.id,\n action: 'invite',\n media: this.mediaType(),\n callId,\n targetUserIds,\n });\n } catch {\n // Built-in realtime is the primary ring path.\n }\n }\n\n async #acceptIncoming(): Promise<void> {\n if (this.accepting || this.closing) {\n return;\n }\n const conversationId = this.conversation()?.id?.trim();\n const currentUserId = this.currentUserId();\n if (!conversationId || !currentUserId) {\n return;\n }\n\n this.accepting = true;\n this.#clearRingTimeout();\n this.ringer.stop();\n this.phase.set('connecting');\n void this.#signalCallAction('accept');\n\n try {\n await this.#connectMedia(\n currentUserId,\n this.#selfDisplayName(currentUserId),\n conversationId,\n this.mediaType(),\n );\n this.phase.set('active');\n void this.rtc.ensureAudioPlayback();\n if (this.mediaType() === 'video') {\n void this.#setVideoEnabled(true);\n }\n } catch (error: unknown) {\n this.accepting = false;\n this.phase.set('incoming');\n this.ringer.playIncoming();\n const fallback = await this.translationService.translateAsync('@conversation:chat.call.connect-error');\n this.#toast(error instanceof Error && error.message ? error.message : fallback, 'danger');\n }\n }\n\n async #onPeerAccepted(): Promise<void> {\n if (this.closing) {\n return;\n }\n this.#clearRingTimeout();\n this.ringer.stop();\n this.phase.set(this.rtc.connectionState() === ConnectionState.Connected ? 'active' : 'connecting');\n void this.rtc.ensureAudioPlayback();\n }\n\n async #signalCallAction(action: 'accept' | 'decline' | 'cancel' | 'end'): Promise<void> {\n const conversation = this.conversation();\n const callId = this.callId();\n const fromUserId = this.currentUserId();\n if (!conversation?.id || !callId || !fromUserId) {\n return;\n }\n const targetUserIds = (conversation.participants ?? [])\n .map((participant) => participant.id?.trim())\n .filter((id): id is string => Boolean(id) && id !== fromUserId);\n try {\n await this.callSignal.signal({\n conversationId: conversation.id,\n action,\n media: this.mediaType(),\n callId,\n targetUserIds,\n });\n } catch {\n // Media join is the source of truth; signaling is best-effort.\n }\n }\n\n #selfDisplayName(currentUserId: string): string | undefined {\n return this.conversation()?.participants?.find((participant) => participant.id === currentUserId)?.name;\n }\n\n #armRingTimeout(): void {\n this.#clearRingTimeout();\n this.ringTimeoutId = setTimeout(() => {\n if (this.phase() === 'outgoing-waiting') {\n this.ringer.stop();\n void this.translationService\n .translateAsync('@conversation:chat.call.no-answer')\n .then((message) => this.#toast(message, 'default'));\n }\n }, 45_000);\n }\n\n #clearRingTimeout(): void {\n if (this.ringTimeoutId != null) {\n clearTimeout(this.ringTimeoutId);\n this.ringTimeoutId = null;\n }\n }\n\n async #finishWithLog(outcome: AXMChatCallLogOutcome): Promise<void> {\n if (this.closing) {\n return;\n }\n this.closing = true;\n this.ringer.stop();\n this.#clearRingTimeout();\n await this.#signalCallAction(outcome === 'declined' ? 'decline' : 'cancel');\n await this.#logOutcome(outcome);\n await this.#closeLocal();\n }\n\n async #endActiveCall(): Promise<void> {\n if (this.closing) {\n return;\n }\n this.closing = true;\n this.ringer.stop();\n this.#clearRingTimeout();\n await this.#signalCallAction('end');\n await this.#closeLocal();\n }\n\n async #logOutcome(outcome: AXMChatCallLogOutcome): Promise<void> {\n const conversationId = this.conversation()?.id?.trim();\n const callId = this.callId();\n if (!conversationId || !callId) {\n return;\n }\n try {\n await this.callSignal.log({\n conversationId,\n outcome,\n media: this.mediaType(),\n callId,\n });\n } catch {\n // Transcript write is best-effort; still close the session.\n }\n }\n\n async #closeFromRemoteLog(): Promise<void> {\n if (this.closing || this.phase() === 'active') {\n return;\n }\n this.closing = true;\n this.ringer.stop();\n this.#clearRingTimeout();\n await this.#closeLocal();\n }\n\n async #closeFromRemoteEnd(): Promise<void> {\n if (this.closing) {\n return;\n }\n this.closing = true;\n this.ringer.stop();\n this.#clearRingTimeout();\n await this.#closeLocal();\n }\n\n async #closeLocal(): Promise<void> {\n this.ringer.stop();\n this.signalInbox.releaseCall(this.callId());\n await this.rtc.disconnect();\n this.close();\n }\n\n //#endregion\n\n //#region ----- Media Helpers -----\n\n async #refreshDevices(kind?: AXMChatCallDeviceKind): Promise<void> {\n try {\n if (!kind || kind === 'audioinput') {\n this.audioDevices.set(await this.rtc.listInputDevices('audioinput'));\n }\n if (!kind || kind === 'videoinput') {\n this.videoDevices.set(await this.rtc.listInputDevices('videoinput'));\n }\n } catch {\n // Device lists stay empty until the browser grants media permission.\n }\n }\n\n async #setVideoEnabled(enabled: boolean): Promise<void> {\n this.videoEnabled.set(enabled);\n if (enabled) {\n this.mediaType.set('video');\n }\n try {\n await this.rtc.setCameraEnabled(enabled);\n } catch {\n this.videoEnabled.set(false);\n const message = await this.translationService.translateAsync('@conversation:chat.call.media-error');\n this.#toast(message, 'danger');\n }\n }\n\n #toast(content: string, color: 'success' | 'danger' | 'default'): void {\n this.toastService.show({\n color,\n content,\n location: 'bottom-center',\n timeOut: 3000,\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-chat-call-session\" [class.axm-chat-call-session--group]=\"isGroupLayout()\">\n <!-- ----- Loading conversation / connecting RTC ----- -->\n @if (loading()) {\n <div class=\"axm-chat-call-session__status-block\">\n {{ '@conversation:chat.call.loading' | translate | async }}\n </div>\n }\n <!-- ----- Load / connect error ----- -->\n @else if (error()) {\n <div class=\"axm-chat-call-session__status-block axm-chat-call-session__status-block--error\">\n <p>{{ errorMessage() || ('@conversation:chat.call.load-error' | translate | async) }}</p>\n <button type=\"button\" class=\"axm-chat-call-session__text-button\" (click)=\"onEndCall()\">\n {{ '@conversation:chat.call.cancel' | translate | async }}\n </button>\n </div>\n }\n <!-- ----- Call session ----- -->\n @else {\n <div class=\"axm-chat-call-session__shell\">\n <div\n class=\"axm-chat-call-session__main\"\n [class.axm-chat-call-session__main--idle]=\"idleLayout()\"\n >\n <div class=\"axm-chat-call-session__body\">\n <!-- ----- Profile header (hidden for active group grid) ----- -->\n @if (!(isGroupLayout() && phase() === 'active')) {\n <div\n class=\"axm-chat-call-session__header\"\n [class.axm-chat-call-session__header--compact]=\"showStage()\"\n >\n <axp-avatar\n [size]=\"headerAvatarSize()\"\n [fullName]=\"peerDisplayName()\"\n [src]=\"peerAvatarSrc()\"\n />\n <h1 class=\"axm-chat-call-session__name\">{{ peerDisplayName() }}</h1>\n <p class=\"axm-chat-call-session__phase-text\">{{ phaseTextKey() | translate | async }}</p>\n </div>\n }\n\n <!-- ----- Video / tile stage ----- -->\n @if (showStage()) {\n <div\n class=\"axm-chat-call-session__stage\"\n [class.axm-chat-call-session__stage--group]=\"isGroupLayout() && phase() === 'active'\"\n >\n @if (isGroupLayout() && phase() === 'active') {\n @for (remote of remoteVideos(); track remote.participantId + ':' + remote.track.sid) {\n <div class=\"axm-chat-call-session__tile axm-chat-call-session__tile--speaking\">\n <video\n class=\"axm-chat-call-session__video\"\n autoplay\n playsinline\n [axmChatCallTrack]=\"remote.track\"\n ></video>\n <span class=\"axm-chat-call-session__tile-name\">{{ remote.participantName }}</span>\n </div>\n }\n <div\n class=\"axm-chat-call-session__tile\"\n [class.axm-chat-call-session__tile--speaking]=\"!micMuted()\"\n >\n @if (videoEnabled() && localVideoTrack(); as localTrack) {\n <video\n class=\"axm-chat-call-session__video\"\n autoplay\n playsinline\n muted\n [axmChatCallTrack]=\"localTrack\"\n ></video>\n } @else if (selfParticipant(); as self) {\n <axp-avatar [size]=\"96\" [fullName]=\"self.name\" [src]=\"self.avatar ?? ''\" />\n }\n <span class=\"axm-chat-call-session__tile-name\">\n {{ selfParticipant()?.name || '' }}\n </span>\n </div>\n } @else {\n <div class=\"axm-chat-call-session__tile axm-chat-call-session__tile--primary\">\n @if (primaryRemoteVideo(); as remote) {\n <video\n class=\"axm-chat-call-session__video\"\n autoplay\n playsinline\n [axmChatCallTrack]=\"remote.track\"\n ></video>\n }\n <!-- ----- Local camera fills the stage until the peer joins ----- -->\n @else if (videoEnabled() && localVideoTrack(); as localTrack) {\n <video\n class=\"axm-chat-call-session__video\"\n autoplay\n playsinline\n muted\n [axmChatCallTrack]=\"localTrack\"\n ></video>\n }\n <!-- ----- Avatar placeholder when no camera track is published ----- -->\n @else {\n <axp-avatar [size]=\"160\" [fullName]=\"peerDisplayName()\" [src]=\"peerAvatarSrc()\" />\n }\n </div>\n\n @if (primaryRemoteVideo() && videoEnabled() && localVideoTrack(); as localTrack) {\n <div class=\"axm-chat-call-session__pip\">\n <video\n class=\"axm-chat-call-session__video\"\n autoplay\n playsinline\n muted\n [axmChatCallTrack]=\"localTrack\"\n ></video>\n </div>\n }\n }\n </div>\n }\n </div>\n\n <axm-chat-call-controls\n [phase]=\"phase()\"\n [videoEnabled]=\"videoEnabled()\"\n [micMuted]=\"micMuted()\"\n [showAddPeople]=\"phase() === 'active'\"\n [showScreencast]=\"phase() === 'active'\"\n [audioDevices]=\"audioDevices()\"\n [videoDevices]=\"videoDevices()\"\n [selectedAudioDeviceId]=\"selectedAudioDeviceId()\"\n [selectedVideoDeviceId]=\"selectedVideoDeviceId()\"\n (screencast)=\"onScreencast()\"\n (toggleVideo)=\"onToggleVideo()\"\n (toggleMute)=\"onToggleMute()\"\n (endCall)=\"onEndCall()\"\n (accept)=\"onAccept()\"\n (decline)=\"onDecline()\"\n (addPeople)=\"onAddPeople()\"\n (requestDevices)=\"onRequestDevices($event)\"\n (pickDevice)=\"onPickDevice($event)\"\n />\n </div>\n\n @if (isGroupLayout() && phase() === 'active') {\n <axm-chat-call-sidebar\n [participants]=\"sidebarParticipants()\"\n (addPeople)=\"onAddPeople()\"\n (shareLink)=\"onShareLink()\"\n />\n }\n </div>\n }\n</div>\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AAmBA;AAEA;MA6Ja,4BAA4B,CAAA;AA3JzC,IAAA,WAAA,GAAA;;QA8JW,IAAA,CAAA,KAAK,GAAG,KAAK,CAAmB,kBAAkB;kFAAC;QACnD,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,KAAK;yFAAC;QAC3B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK;qFAAC;QACvB,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,KAAK;0FAAC;QAC5B,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,IAAI;2FAAC;QAC5B,IAAA,CAAA,YAAY,GAAG,KAAK,CAAoB,EAAE;yFAAC;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,+BAA+B;AAChC,qBAAA,EAAA,QAAA,EAAA,quMAAA,EAAA,MAAA,EAAA,CAAA,2hGAAA,CAAA,EAAA;;;;;"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { AXPAvatarComponent } from '@acorex-platform/framework-client/layout/components';
|
|
2
|
+
import { AXPRtcApiAbstract } from '@acorex-platform/extension-rtc-core-gateway';
|
|
3
|
+
import { AXBasePageComponent } from '@acorex/components/page';
|
|
4
|
+
import { AXPopupService } from '@acorex/components/popup';
|
|
5
|
+
import { AXToastService } from '@acorex/components/toast';
|
|
6
|
+
import * as i1 from '@acorex/core/translation';
|
|
7
|
+
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
8
|
+
import { AsyncPipe } from '@angular/common';
|
|
9
|
+
import * as i0 from '@angular/core';
|
|
10
|
+
import { inject, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
11
|
+
import { f as axmResolveConversationListAvatar, g as axmEnsureChatCallRtcReady, h as axmOpenChatCallSessionDialog } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-DsjrXRZ6.mjs';
|
|
12
|
+
|
|
13
|
+
//#region ----- Imports -----
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region ----- Component -----
|
|
16
|
+
/**
|
|
17
|
+
* Call-start popup: choose voice or video for a conversation contact.
|
|
18
|
+
*/
|
|
19
|
+
class AXMChatCallStartPopupComponent extends AXBasePageComponent {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
//#region ----- Services & Dependencies -----
|
|
23
|
+
this.popupService = inject(AXPopupService);
|
|
24
|
+
this.rtcApi = inject(AXPRtcApiAbstract, { optional: true });
|
|
25
|
+
this.translationService = inject(AXTranslationService);
|
|
26
|
+
this.toastService = inject(AXToastService);
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region ----- Computed Properties -----
|
|
30
|
+
get hasConversation() {
|
|
31
|
+
return !!this.conversation?.id?.trim();
|
|
32
|
+
}
|
|
33
|
+
get displayName() {
|
|
34
|
+
if (!this.conversation) {
|
|
35
|
+
return '';
|
|
36
|
+
}
|
|
37
|
+
return axmResolveConversationListAvatar(this.conversation).title;
|
|
38
|
+
}
|
|
39
|
+
get avatarSrc() {
|
|
40
|
+
if (!this.conversation) {
|
|
41
|
+
return '';
|
|
42
|
+
}
|
|
43
|
+
return axmResolveConversationListAvatar(this.conversation).avatar ?? '';
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region ----- Event Handlers -----
|
|
47
|
+
onStartVideo() {
|
|
48
|
+
void this.#beginCall('video');
|
|
49
|
+
}
|
|
50
|
+
onStartVoice() {
|
|
51
|
+
void this.#beginCall('voice');
|
|
52
|
+
}
|
|
53
|
+
onCancel() {
|
|
54
|
+
this.close();
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ----- Call Actions -----
|
|
58
|
+
async #beginCall(mediaType) {
|
|
59
|
+
const conversation = this.conversation;
|
|
60
|
+
if (!conversation?.id?.trim()) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (!(await axmEnsureChatCallRtcReady({
|
|
64
|
+
rtc: this.rtcApi,
|
|
65
|
+
translation: this.translationService,
|
|
66
|
+
toast: this.toastService,
|
|
67
|
+
}))) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const popupService = this.popupService;
|
|
71
|
+
this.close();
|
|
72
|
+
await axmOpenChatCallSessionDialog({
|
|
73
|
+
conversation,
|
|
74
|
+
media: mediaType,
|
|
75
|
+
popupService,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChatCallStartPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMChatCallStartPopupComponent, isStandalone: true, selector: "axm-chat-call-start-popup", host: { classAttribute: "ax-dark" }, usesInheritance: true, ngImport: i0, template: "<div class=\"axm-chat-call-start\">\n <!-- ----- Missing conversation payload ----- -->\n @if (!hasConversation) {\n <div class=\"axm-chat-call-start__status axm-chat-call-start__status--error\">\n <p>{{ '@conversation:chat.call.load-error' | translate | async }}</p>\n <button type=\"button\" class=\"axm-chat-call-start__text-button\" (click)=\"onCancel()\">\n {{ '@conversation:chat.call.cancel' | translate | async }}\n </button>\n </div>\n }\n <!-- ----- Call start content ----- -->\n @else {\n <div class=\"axm-chat-call-start__content\">\n <!-- ----- Contact avatar and name ----- -->\n <div class=\"axm-chat-call-start__profile\">\n <axp-avatar\n class=\"axm-chat-call-start__avatar\"\n [size]=\"128\"\n [fullName]=\"displayName\"\n [src]=\"avatarSrc\"\n />\n <h1 class=\"axm-chat-call-start__name\">{{ displayName }}</h1>\n <p class=\"axm-chat-call-start__hint\">\n {{ '@conversation:chat.call.hint' | translate | async }}\n </p>\n </div>\n\n <!-- ----- Voice / cancel / video actions ----- -->\n <div class=\"axm-chat-call-start__actions\">\n <button\n type=\"button\"\n class=\"axm-chat-call-start__action\"\n (click)=\"onStartVideo()\"\n >\n <span class=\"axm-chat-call-start__action-circle axm-chat-call-start__action-circle--primary\">\n <i class=\"fa-solid fa-video\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-start__action-label\">\n {{ '@conversation:chat.call.start-video' | translate | async }}\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"axm-chat-call-start__action\"\n (click)=\"onCancel()\"\n >\n <span class=\"axm-chat-call-start__action-circle axm-chat-call-start__action-circle--cancel\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-start__action-label\">\n {{ '@conversation:chat.call.cancel' | translate | async }}\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"axm-chat-call-start__action\"\n (click)=\"onStartVoice()\"\n >\n <span class=\"axm-chat-call-start__action-circle axm-chat-call-start__action-circle--primary\">\n <i class=\"fa-solid fa-phone\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-start__action-label\">\n {{ '@conversation:chat.call.start-call' | translate | async }}\n </span>\n </button>\n </div>\n </div>\n }\n</div>\n", styles: [".axm-chat-call-start-overlay .ax-popup{width:min(28rem,92vw)!important;max-width:92vw}axm-chat-call-start-popup{display:block;width:100%}.axm-chat-call-start{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:100%;min-height:32rem;padding:3rem 2rem 2.5rem}.axm-chat-call-start__content{display:flex;flex-direction:column;align-items:center;justify-content:space-between;width:100%;max-width:24rem;min-height:28rem;gap:3.5rem}.axm-chat-call-start__profile{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.75rem;margin-top:1.5rem}.axm-chat-call-start__avatar{margin-bottom:.5rem}.axm-chat-call-start__name{margin:0;font-size:1.375rem;font-weight:700;line-height:1.3}.axm-chat-call-start__hint{margin:0;max-width:16rem;font-size:.875rem;line-height:1.45;opacity:.65}.axm-chat-call-start__actions{display:flex;align-items:flex-start;justify-content:space-between;width:100%;gap:.75rem;padding-bottom:.5rem}.axm-chat-call-start__action{display:flex;flex:1;flex-direction:column;align-items:center;gap:.625rem;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.axm-chat-call-start__action:focus-visible{outline:2px solid rgba(76,175,80,.8);outline-offset:4px;border-radius:.5rem}.axm-chat-call-start__action-circle{display:inline-flex;align-items:center;justify-content:center;width:3.5rem;height:3.5rem;border-radius:9999px;font-size:1.25rem}.axm-chat-call-start__action-circle--primary{background:#4caf50;color:#fff}.axm-chat-call-start__action-circle--cancel{background:#fff;color:#1a1c1e}.axm-chat-call-start__action-label{font-size:.75rem;line-height:1.2;white-space:nowrap}.axm-chat-call-start__status{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:2rem;text-align:center;font-size:.9375rem}.axm-chat-call-start__status--error{color:#ff8a80}.axm-chat-call-start__text-button{padding:.5rem 1rem;border:1px solid currentColor;border-radius:9999px;background:transparent;color:inherit;cursor:pointer;opacity:.85}\n"], dependencies: [{ kind: "component", type: AXPAvatarComponent, selector: "axp-avatar", inputs: ["size", "src", "fullName", "fallbackText", "placeholder"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChatCallStartPopupComponent, decorators: [{
|
|
82
|
+
type: Component,
|
|
83
|
+
args: [{ selector: 'axm-chat-call-start-popup', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
84
|
+
class: 'ax-dark',
|
|
85
|
+
}, imports: [AXPAvatarComponent, AXTranslationModule, AsyncPipe], template: "<div class=\"axm-chat-call-start\">\n <!-- ----- Missing conversation payload ----- -->\n @if (!hasConversation) {\n <div class=\"axm-chat-call-start__status axm-chat-call-start__status--error\">\n <p>{{ '@conversation:chat.call.load-error' | translate | async }}</p>\n <button type=\"button\" class=\"axm-chat-call-start__text-button\" (click)=\"onCancel()\">\n {{ '@conversation:chat.call.cancel' | translate | async }}\n </button>\n </div>\n }\n <!-- ----- Call start content ----- -->\n @else {\n <div class=\"axm-chat-call-start__content\">\n <!-- ----- Contact avatar and name ----- -->\n <div class=\"axm-chat-call-start__profile\">\n <axp-avatar\n class=\"axm-chat-call-start__avatar\"\n [size]=\"128\"\n [fullName]=\"displayName\"\n [src]=\"avatarSrc\"\n />\n <h1 class=\"axm-chat-call-start__name\">{{ displayName }}</h1>\n <p class=\"axm-chat-call-start__hint\">\n {{ '@conversation:chat.call.hint' | translate | async }}\n </p>\n </div>\n\n <!-- ----- Voice / cancel / video actions ----- -->\n <div class=\"axm-chat-call-start__actions\">\n <button\n type=\"button\"\n class=\"axm-chat-call-start__action\"\n (click)=\"onStartVideo()\"\n >\n <span class=\"axm-chat-call-start__action-circle axm-chat-call-start__action-circle--primary\">\n <i class=\"fa-solid fa-video\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-start__action-label\">\n {{ '@conversation:chat.call.start-video' | translate | async }}\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"axm-chat-call-start__action\"\n (click)=\"onCancel()\"\n >\n <span class=\"axm-chat-call-start__action-circle axm-chat-call-start__action-circle--cancel\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-start__action-label\">\n {{ '@conversation:chat.call.cancel' | translate | async }}\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"axm-chat-call-start__action\"\n (click)=\"onStartVoice()\"\n >\n <span class=\"axm-chat-call-start__action-circle axm-chat-call-start__action-circle--primary\">\n <i class=\"fa-solid fa-phone\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-start__action-label\">\n {{ '@conversation:chat.call.start-call' | translate | async }}\n </span>\n </button>\n </div>\n </div>\n }\n</div>\n", styles: [".axm-chat-call-start-overlay .ax-popup{width:min(28rem,92vw)!important;max-width:92vw}axm-chat-call-start-popup{display:block;width:100%}.axm-chat-call-start{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:100%;min-height:32rem;padding:3rem 2rem 2.5rem}.axm-chat-call-start__content{display:flex;flex-direction:column;align-items:center;justify-content:space-between;width:100%;max-width:24rem;min-height:28rem;gap:3.5rem}.axm-chat-call-start__profile{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.75rem;margin-top:1.5rem}.axm-chat-call-start__avatar{margin-bottom:.5rem}.axm-chat-call-start__name{margin:0;font-size:1.375rem;font-weight:700;line-height:1.3}.axm-chat-call-start__hint{margin:0;max-width:16rem;font-size:.875rem;line-height:1.45;opacity:.65}.axm-chat-call-start__actions{display:flex;align-items:flex-start;justify-content:space-between;width:100%;gap:.75rem;padding-bottom:.5rem}.axm-chat-call-start__action{display:flex;flex:1;flex-direction:column;align-items:center;gap:.625rem;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.axm-chat-call-start__action:focus-visible{outline:2px solid rgba(76,175,80,.8);outline-offset:4px;border-radius:.5rem}.axm-chat-call-start__action-circle{display:inline-flex;align-items:center;justify-content:center;width:3.5rem;height:3.5rem;border-radius:9999px;font-size:1.25rem}.axm-chat-call-start__action-circle--primary{background:#4caf50;color:#fff}.axm-chat-call-start__action-circle--cancel{background:#fff;color:#1a1c1e}.axm-chat-call-start__action-label{font-size:.75rem;line-height:1.2;white-space:nowrap}.axm-chat-call-start__status{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:2rem;text-align:center;font-size:.9375rem}.axm-chat-call-start__status--error{color:#ff8a80}.axm-chat-call-start__text-button{padding:.5rem 1rem;border:1px solid currentColor;border-radius:9999px;background:transparent;color:inherit;cursor:pointer;opacity:.85}\n"] }]
|
|
86
|
+
}] });
|
|
87
|
+
|
|
88
|
+
export { AXMChatCallStartPopupComponent };
|
|
89
|
+
//# sourceMappingURL=acorex-platform-module-conversation-client-chat-call-start-popup.component-D4go5xbr.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-conversation-client-chat-call-start-popup.component-D4go5xbr.mjs","sources":["../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-start-popup.component.ts","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/call/chat-call-start-popup.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPAvatarComponent } from '@acorex-platform/framework-client/layout/components';\nimport { AXPRtcApiAbstract } from '@acorex-platform/extension-rtc-core-gateway';\nimport type { AXConversation } from '@acorex/components/conversation';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXPopupService } from '@acorex/components/popup';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\n\nimport { axmResolveConversationListAvatar } from '../utils/chat-avatar.util';\nimport { axmEnsureChatCallRtcReady } from './chat-call-rtc-ready.util';\nimport type { AXMChatCallMediaType } from './chat-call-session.types';\nimport { axmOpenChatCallSessionDialog } from './open-chat-call-session.dialog';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport type { AXMChatCallMediaType } from './chat-call-session.types';\n\nexport interface AXMChatCallStartPopupData {\n conversation: AXConversation;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n/**\n * Call-start popup: choose voice or video for a conversation contact.\n */\n@Component({\n selector: 'axm-chat-call-start-popup',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ax-dark',\n },\n imports: [AXPAvatarComponent, AXTranslationModule, AsyncPipe],\n templateUrl: './chat-call-start-popup.component.html',\n styles: [\n `\n .axm-chat-call-start-overlay .ax-popup {\n width: min(28rem, 92vw) !important;\n max-width: 92vw;\n }\n\n axm-chat-call-start-popup {\n display: block;\n width: 100%;\n }\n\n .axm-chat-call-start {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 100%;\n min-height: 32rem;\n padding: 3rem 2rem 2.5rem;\n }\n\n .axm-chat-call-start__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n max-width: 24rem;\n min-height: 28rem;\n gap: 3.5rem;\n }\n\n .axm-chat-call-start__profile {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n gap: 0.75rem;\n margin-top: 1.5rem;\n }\n\n .axm-chat-call-start__avatar {\n margin-bottom: 0.5rem;\n }\n\n .axm-chat-call-start__name {\n margin: 0;\n font-size: 1.375rem;\n font-weight: 700;\n line-height: 1.3;\n }\n\n .axm-chat-call-start__hint {\n margin: 0;\n max-width: 16rem;\n font-size: 0.875rem;\n line-height: 1.45;\n opacity: 0.65;\n }\n\n .axm-chat-call-start__actions {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n width: 100%;\n gap: 0.75rem;\n padding-bottom: 0.5rem;\n }\n\n .axm-chat-call-start__action {\n display: flex;\n flex: 1;\n flex-direction: column;\n align-items: center;\n gap: 0.625rem;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n cursor: pointer;\n }\n\n .axm-chat-call-start__action:focus-visible {\n outline: 2px solid rgba(76, 175, 80, 0.8);\n outline-offset: 4px;\n border-radius: 0.5rem;\n }\n\n .axm-chat-call-start__action-circle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 3.5rem;\n height: 3.5rem;\n border-radius: 9999px;\n font-size: 1.25rem;\n }\n\n .axm-chat-call-start__action-circle--primary {\n background: #4caf50;\n color: #ffffff;\n }\n\n .axm-chat-call-start__action-circle--cancel {\n background: #ffffff;\n color: #1a1c1e;\n }\n\n .axm-chat-call-start__action-label {\n font-size: 0.75rem;\n line-height: 1.2;\n white-space: nowrap;\n }\n\n .axm-chat-call-start__status {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n padding: 2rem;\n text-align: center;\n font-size: 0.9375rem;\n }\n\n .axm-chat-call-start__status--error {\n color: #ff8a80;\n }\n\n .axm-chat-call-start__text-button {\n padding: 0.5rem 1rem;\n border: 1px solid currentColor;\n border-radius: 9999px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: 0.85;\n }\n `,\n ],\n})\nexport class AXMChatCallStartPopupComponent extends AXBasePageComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly popupService = inject(AXPopupService);\n private readonly rtcApi = inject(AXPRtcApiAbstract, { optional: true });\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n\n //#endregion\n\n //#region ----- Popup Inputs -----\n\n /** Assigned by {@link AXPopupService} via `data`. */\n conversation?: AXConversation;\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected get hasConversation(): boolean {\n return !!this.conversation?.id?.trim();\n }\n\n protected get displayName(): string {\n if (!this.conversation) {\n return '';\n }\n return axmResolveConversationListAvatar(this.conversation).title;\n }\n\n protected get avatarSrc(): string {\n if (!this.conversation) {\n return '';\n }\n return axmResolveConversationListAvatar(this.conversation).avatar ?? '';\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onStartVideo(): void {\n void this.#beginCall('video');\n }\n\n protected onStartVoice(): void {\n void this.#beginCall('voice');\n }\n\n protected onCancel(): void {\n this.close();\n }\n\n //#endregion\n\n //#region ----- Call Actions -----\n\n async #beginCall(mediaType: AXMChatCallMediaType): Promise<void> {\n const conversation = this.conversation;\n if (!conversation?.id?.trim()) {\n return;\n }\n\n if (\n !(await axmEnsureChatCallRtcReady({\n rtc: this.rtcApi,\n translation: this.translationService,\n toast: this.toastService,\n }))\n ) {\n return;\n }\n\n const popupService = this.popupService;\n this.close();\n await axmOpenChatCallSessionDialog({\n conversation,\n media: mediaType,\n popupService,\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-chat-call-start\">\n <!-- ----- Missing conversation payload ----- -->\n @if (!hasConversation) {\n <div class=\"axm-chat-call-start__status axm-chat-call-start__status--error\">\n <p>{{ '@conversation:chat.call.load-error' | translate | async }}</p>\n <button type=\"button\" class=\"axm-chat-call-start__text-button\" (click)=\"onCancel()\">\n {{ '@conversation:chat.call.cancel' | translate | async }}\n </button>\n </div>\n }\n <!-- ----- Call start content ----- -->\n @else {\n <div class=\"axm-chat-call-start__content\">\n <!-- ----- Contact avatar and name ----- -->\n <div class=\"axm-chat-call-start__profile\">\n <axp-avatar\n class=\"axm-chat-call-start__avatar\"\n [size]=\"128\"\n [fullName]=\"displayName\"\n [src]=\"avatarSrc\"\n />\n <h1 class=\"axm-chat-call-start__name\">{{ displayName }}</h1>\n <p class=\"axm-chat-call-start__hint\">\n {{ '@conversation:chat.call.hint' | translate | async }}\n </p>\n </div>\n\n <!-- ----- Voice / cancel / video actions ----- -->\n <div class=\"axm-chat-call-start__actions\">\n <button\n type=\"button\"\n class=\"axm-chat-call-start__action\"\n (click)=\"onStartVideo()\"\n >\n <span class=\"axm-chat-call-start__action-circle axm-chat-call-start__action-circle--primary\">\n <i class=\"fa-solid fa-video\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-start__action-label\">\n {{ '@conversation:chat.call.start-video' | translate | async }}\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"axm-chat-call-start__action\"\n (click)=\"onCancel()\"\n >\n <span class=\"axm-chat-call-start__action-circle axm-chat-call-start__action-circle--cancel\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-start__action-label\">\n {{ '@conversation:chat.call.cancel' | translate | async }}\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"axm-chat-call-start__action\"\n (click)=\"onStartVoice()\"\n >\n <span class=\"axm-chat-call-start__action-circle axm-chat-call-start__action-circle--primary\">\n <i class=\"fa-solid fa-phone\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"axm-chat-call-start__action-label\">\n {{ '@conversation:chat.call.start-call' | translate | async }}\n </span>\n </button>\n </div>\n </div>\n }\n</div>\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AA2BA;AAEA;AAEA;;AAEG;AAwJG,MAAO,8BAA+B,SAAQ,mBAAmB,CAAA;AAvJvE,IAAA,WAAA,GAAA;;;AA0JmB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;QACrC,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACtD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAA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AC;IACJ;8GAhFW,8BAA8B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,8BAA8B,iJCzL3C,qtFAuEA,EAAA,MAAA,EAAA,CAAA,w/DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED9BY,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,KAAA,EAAA,UAAA,EAAA,cAAA,EAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,mBAAmB,0FAAE,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAgJjD,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAvJ1C,SAAS;+BACE,2BAA2B,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,KAAK,EAAE,SAAS;AACjB,qBAAA,EAAA,OAAA,EACQ,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,qtFAAA,EAAA,MAAA,EAAA,CAAA,w/DAAA,CAAA,EAAA;;;;;"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { filterMessagesByMediaCategory, isGridMediaCategory, isAttachmentListCategory, buildMediaGalleryTiles, AXConversationService, getMessageVideoItems, getMessageAudioItems, AXConversationRegistryComponentOutletComponent, AXConversationInfiniteScrollDirective, AXConversationImageAttachmentComponent, AXConversationVideoAttachmentComponent, AXConversationAudioAttachmentComponent } from '@acorex/components/conversation';
|
|
2
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
3
|
+
import * as i1 from '@acorex/core/translation';
|
|
4
|
+
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
5
|
+
import { AsyncPipe } from '@angular/common';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { inject, Injector, input, output, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
8
|
+
|
|
9
|
+
//#region ----- Imports -----
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ----- Component -----
|
|
12
|
+
class AXMChatConversationInfoMediaViewComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
//#region ----- Services -----
|
|
15
|
+
this.translation = inject(AXTranslationService);
|
|
16
|
+
this.parentInjector = inject(Injector);
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ----- Inputs / Outputs -----
|
|
19
|
+
this.category = input.required(/* @ts-ignore */
|
|
20
|
+
...(ngDevMode ? [{ debugName: "category" }] : /* istanbul ignore next */ []));
|
|
21
|
+
this.messages = input.required(/* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.conversation = input.required(/* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "conversation" }] : /* istanbul ignore next */ []));
|
|
25
|
+
this.conversationServiceInput = input.required({ ...(ngDevMode ? { debugName: "conversationServiceInput" } : /* istanbul ignore next */ {}), alias: 'conversationService' });
|
|
26
|
+
this.hasMoreMedia = input(false, /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "hasMoreMedia" }] : /* istanbul ignore next */ []));
|
|
28
|
+
this.loadingMoreMedia = input(false, /* @ts-ignore */
|
|
29
|
+
...(ngDevMode ? [{ debugName: "loadingMoreMedia" }] : /* istanbul ignore next */ []));
|
|
30
|
+
this.onLoadMoreMedia = input(undefined, /* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [{ debugName: "onLoadMoreMedia" }] : /* istanbul ignore next */ []));
|
|
32
|
+
/** Callback for lazy outlet wiring (alternative to the `back` output). */
|
|
33
|
+
this.onBack = input(undefined, /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "onBack" }] : /* istanbul ignore next */ []));
|
|
35
|
+
this.back = output();
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region ----- Derived State -----
|
|
38
|
+
this.items = computed(() => filterMessagesByMediaCategory(this.messages(), this.category().id), /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
40
|
+
this.isGrid = computed(() => isGridMediaCategory(this.category().id), /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "isGrid" }] : /* istanbul ignore next */ []));
|
|
42
|
+
this.isAttachmentList = computed(() => isAttachmentListCategory(this.category().id), /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "isAttachmentList" }] : /* istanbul ignore next */ []));
|
|
44
|
+
this.galleryTiles = computed(() => buildMediaGalleryTiles(this.messages(), this.category().id), /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "galleryTiles" }] : /* istanbul ignore next */ []));
|
|
46
|
+
this.rendererInjector = computed(() => Injector.create({
|
|
47
|
+
providers: [{ provide: AXConversationService, useValue: this.conversationServiceInput() }],
|
|
48
|
+
parent: this.parentInjector,
|
|
49
|
+
}), /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "rendererInjector" }] : /* istanbul ignore next */ []));
|
|
51
|
+
this.titleLabel = computed(() => this.translation.translateSync(this.category().countLabelKey, {
|
|
52
|
+
params: { count: this.category().count },
|
|
53
|
+
}), /* @ts-ignore */
|
|
54
|
+
...(ngDevMode ? [{ debugName: "titleLabel" }] : /* istanbul ignore next */ []));
|
|
55
|
+
this.getMessageVideoItems = getMessageVideoItems;
|
|
56
|
+
this.getMessageAudioItems = getMessageAudioItems;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region ----- Renderer Helpers -----
|
|
60
|
+
getRendererComponentLoader(message) {
|
|
61
|
+
const renderer = this.conversationServiceInput().registry.messageRenderers.getRenderer(message);
|
|
62
|
+
if (renderer?.componentLoader) {
|
|
63
|
+
return renderer.componentLoader;
|
|
64
|
+
}
|
|
65
|
+
if (!renderer?.component) {
|
|
66
|
+
return () => import('@acorex/components/conversation').then((m) => m.AXConversationFallbackRendererComponent);
|
|
67
|
+
}
|
|
68
|
+
return () => Promise.resolve(renderer.component);
|
|
69
|
+
}
|
|
70
|
+
getRendererInputs(message) {
|
|
71
|
+
return { message };
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region ----- UI Handlers -----
|
|
75
|
+
formatTimestamp(message) {
|
|
76
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
77
|
+
dateStyle: 'medium',
|
|
78
|
+
timeStyle: 'short',
|
|
79
|
+
}).format(message.timestamp);
|
|
80
|
+
}
|
|
81
|
+
handleBack() {
|
|
82
|
+
this.onBack()?.();
|
|
83
|
+
this.back.emit();
|
|
84
|
+
}
|
|
85
|
+
onScrollThreshold(edge) {
|
|
86
|
+
if (edge === 'bottom' && this.hasMoreMedia() && !this.loadingMoreMedia()) {
|
|
87
|
+
void this.onLoadMoreMedia()?.();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChatConversationInfoMediaViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
91
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMChatConversationInfoMediaViewComponent, isStandalone: true, selector: "axm-chat-conversation-info-media-view", inputs: { category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: true, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: true, transformFunction: null }, conversation: { classPropertyName: "conversation", publicName: "conversation", isSignal: true, isRequired: true, transformFunction: null }, conversationServiceInput: { classPropertyName: "conversationServiceInput", publicName: "conversationService", isSignal: true, isRequired: true, transformFunction: null }, hasMoreMedia: { classPropertyName: "hasMoreMedia", publicName: "hasMoreMedia", isSignal: true, isRequired: false, transformFunction: null }, loadingMoreMedia: { classPropertyName: "loadingMoreMedia", publicName: "loadingMoreMedia", isSignal: true, isRequired: false, transformFunction: null }, onLoadMoreMedia: { classPropertyName: "onLoadMoreMedia", publicName: "onLoadMoreMedia", isSignal: true, isRequired: false, transformFunction: null }, onBack: { classPropertyName: "onBack", publicName: "onBack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { back: "back" }, ngImport: i0, template: "<div\n class=\"tg-media-view\"\n axInfiniteScroll\n edge=\"bottom\"\n [threshold]=\"200\"\n [scrollDisabled]=\"loadingMoreMedia() || !hasMoreMedia()\"\n (scrollThreshold)=\"onScrollThreshold($event)\"\n>\n <header class=\"tg-media-view__header\">\n <button type=\"button\" class=\"tg-media-view__back\" (click)=\"handleBack()\" [attr.aria-label]=\"'Back'\">\n <i class=\"fa-light fa-arrow-left\"></i>\n </button>\n <h3 class=\"tg-media-view__title\">{{ titleLabel() }}</h3>\n </header>\n\n @if (items().length === 0) {\n <div class=\"tg-media-view__empty\">\n {{ '@acorex:chat.info-panel.media.empty' | translate | async }}\n </div>\n } @else if (isGrid()) {\n <div class=\"tg-media-view__grid\">\n @for (tile of galleryTiles(); track tile.key) {\n <article\n class=\"tg-media-view__grid-cell\"\n [class.tg-media-view__grid-cell--sticker]=\"tile.kind === 'sticker'\"\n >\n @switch (tile.kind) {\n @case ('image') {\n @if (tile.image; as image) {\n <ax-conversation-image-attachment [item]=\"image\" [alt]=\"'Photo'\" />\n }\n }\n @case ('sticker') {\n @if (tile.stickerUrl) {\n <img\n class=\"tg-media-view__sticker\"\n [src]=\"tile.stickerUrl\"\n [alt]=\"tile.stickerAlt ?? 'Sticker'\"\n loading=\"lazy\"\n />\n }\n }\n }\n </article>\n }\n </div>\n } @else if (isAttachmentList()) {\n <div class=\"tg-media-view__list\">\n @for (message of items(); track message.id) {\n <article class=\"tg-media-view__list-item\">\n <div class=\"tg-media-view__list-body\">\n @if (category().id === 'video') {\n @for (video of getMessageVideoItems(message); track video.mediaId ?? video.url) {\n <ax-conversation-video-attachment [item]=\"video\" />\n }\n } @else {\n @for (audio of getMessageAudioItems(message); track audio.mediaId ?? audio.url) {\n <ax-conversation-audio-attachment [item]=\"audio\" />\n }\n }\n </div>\n <time class=\"tg-media-view__list-meta\">{{ formatTimestamp(message) }}</time>\n </article>\n }\n </div>\n } @else {\n <div class=\"tg-media-view__list\">\n @for (message of items(); track message.id) {\n <article class=\"tg-media-view__list-item\">\n <div class=\"tg-media-view__list-body\">\n <ax-conversation-registry-component-outlet\n [componentLoader]=\"getRendererComponentLoader(message)\"\n [inputs]=\"getRendererInputs(message)\"\n />\n </div>\n <time class=\"tg-media-view__list-meta\">{{ formatTimestamp(message) }}</time>\n </article>\n }\n </div>\n }\n @if (loadingMoreMedia()) {\n <div class=\"tg-media-view__loading-more\">\n {{ '@acorex:chat.info-panel.media.loading' | translate | async }}\n </div>\n }\n</div>\n", styles: ["@layer properties;@layer components{axm-chat-conversation-info-media-view{display:block;width:100%}axm-chat-conversation-info-media-view .tg-media-view{display:flex;min-height:calc(var(--spacing, .25rem) * 48);flex-direction:column;overflow-y:auto;overscroll-behavior:contain;max-height:min(85vh,40rem)}axm-chat-conversation-info-media-view .tg-media-view__header{display:flex;flex-shrink:0;align-items:center;gap:calc(var(--spacing, .25rem) * 2);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-light-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2.5)}axm-chat-conversation-info-media-view .tg-media-view__back{display:inline-flex;height:calc(var(--spacing, .25rem) * 8);width:calc(var(--spacing, .25rem) * 8);cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);--tw-border-style: none;border-style:none;background-color:transparent;color:rgba(var(--ax-sys-color-primary-500))}axm-chat-conversation-info-media-view .tg-media-view__back:hover{background-color:rgba(var(--ax-sys-color-lighter-surface))}axm-chat-conversation-info-media-view .tg-media-view__title{margin:0;font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:rgba(var(--ax-sys-color-on-surface))}axm-chat-conversation-info-media-view .tg-media-view__empty{padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 8);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface));opacity:.65}axm-chat-conversation-info-media-view .tg-media-view__grid{display:grid;gap:2px;background-color:rgba(var(--ax-sys-color-border-light-surface));padding:2px;grid-template-columns:repeat(3,minmax(0,1fr))}axm-chat-conversation-info-media-view .tg-media-view__grid-cell{position:relative;aspect-ratio:1 / 1;overflow:hidden;background-color:rgba(var(--ax-sys-color-lighter-surface))}axm-chat-conversation-info-media-view .tg-media-view__grid-cell--sticker{display:flex;align-items:center;justify-content:center;padding:calc(var(--spacing, .25rem) * 1.5)}axm-chat-conversation-info-media-view .tg-media-view__grid-cell ::ng-deep ax-conversation-image-attachment,axm-chat-conversation-info-media-view .tg-media-view__grid-cell ::ng-deep .ax-conversation-image-attachment{height:100%;min-height:0px;width:100%;border-radius:0}axm-chat-conversation-info-media-view .tg-media-view__grid-cell ::ng-deep img{height:100%;width:100%;object-fit:cover}axm-chat-conversation-info-media-view .tg-media-view__sticker{max-height:100%;max-width:100%;object-fit:contain}axm-chat-conversation-info-media-view .tg-media-view__list{display:flex;flex-direction:column}axm-chat-conversation-info-media-view .tg-media-view__list-item{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 1.5);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-light-surface));padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 3)}axm-chat-conversation-info-media-view .tg-media-view__list-item:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0px}axm-chat-conversation-info-media-view .tg-media-view__list-body{display:flex;min-width:0px;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}axm-chat-conversation-info-media-view .tg-media-view__list-body ::ng-deep .ax-conversation-msg{max-width:100%}axm-chat-conversation-info-media-view .tg-media-view__list-body ::ng-deep ax-conversation-message-renderer-state{display:none}axm-chat-conversation-info-media-view .tg-media-view__list-body ::ng-deep .ax-conversation-video__player{max-height:min(50vh,16rem)}axm-chat-conversation-info-media-view .tg-media-view__list-meta{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:rgba(var(--ax-sys-color-on-surface));opacity:.55}axm-chat-conversation-info-media-view .tg-media-view__loading-more{flex-shrink:0;padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface));opacity:.65}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXConversationRegistryComponentOutletComponent, selector: "ax-conversation-registry-component-outlet", inputs: ["component", "componentLoader", "inputs"] }, { kind: "directive", type: AXConversationInfiniteScrollDirective, selector: "[axInfiniteScroll]", inputs: ["threshold", "edge", "scrollDisabled", "cooldownMs"], outputs: ["scrollThreshold"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXConversationImageAttachmentComponent, selector: "ax-conversation-image-attachment", inputs: ["item", "alt"] }, { kind: "component", type: AXConversationVideoAttachmentComponent, selector: "ax-conversation-video-attachment", inputs: ["item"], outputs: ["playingChange", "timeUpdate", "durationChange", "playbackEnded", "playbackError"] }, { kind: "component", type: AXConversationAudioAttachmentComponent, selector: "ax-conversation-audio-attachment", inputs: ["item"], outputs: ["playingChange", "timeUpdate", "durationChange", "playbackEnded", "playbackError"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
92
|
+
}
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChatConversationInfoMediaViewComponent, decorators: [{
|
|
94
|
+
type: Component,
|
|
95
|
+
args: [{ selector: 'axm-chat-conversation-info-media-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
|
|
96
|
+
AsyncPipe,
|
|
97
|
+
AXConversationRegistryComponentOutletComponent,
|
|
98
|
+
AXConversationInfiniteScrollDirective,
|
|
99
|
+
AXDecoratorModule,
|
|
100
|
+
AXTranslationModule,
|
|
101
|
+
AXConversationImageAttachmentComponent,
|
|
102
|
+
AXConversationVideoAttachmentComponent,
|
|
103
|
+
AXConversationAudioAttachmentComponent,
|
|
104
|
+
], template: "<div\n class=\"tg-media-view\"\n axInfiniteScroll\n edge=\"bottom\"\n [threshold]=\"200\"\n [scrollDisabled]=\"loadingMoreMedia() || !hasMoreMedia()\"\n (scrollThreshold)=\"onScrollThreshold($event)\"\n>\n <header class=\"tg-media-view__header\">\n <button type=\"button\" class=\"tg-media-view__back\" (click)=\"handleBack()\" [attr.aria-label]=\"'Back'\">\n <i class=\"fa-light fa-arrow-left\"></i>\n </button>\n <h3 class=\"tg-media-view__title\">{{ titleLabel() }}</h3>\n </header>\n\n @if (items().length === 0) {\n <div class=\"tg-media-view__empty\">\n {{ '@acorex:chat.info-panel.media.empty' | translate | async }}\n </div>\n } @else if (isGrid()) {\n <div class=\"tg-media-view__grid\">\n @for (tile of galleryTiles(); track tile.key) {\n <article\n class=\"tg-media-view__grid-cell\"\n [class.tg-media-view__grid-cell--sticker]=\"tile.kind === 'sticker'\"\n >\n @switch (tile.kind) {\n @case ('image') {\n @if (tile.image; as image) {\n <ax-conversation-image-attachment [item]=\"image\" [alt]=\"'Photo'\" />\n }\n }\n @case ('sticker') {\n @if (tile.stickerUrl) {\n <img\n class=\"tg-media-view__sticker\"\n [src]=\"tile.stickerUrl\"\n [alt]=\"tile.stickerAlt ?? 'Sticker'\"\n loading=\"lazy\"\n />\n }\n }\n }\n </article>\n }\n </div>\n } @else if (isAttachmentList()) {\n <div class=\"tg-media-view__list\">\n @for (message of items(); track message.id) {\n <article class=\"tg-media-view__list-item\">\n <div class=\"tg-media-view__list-body\">\n @if (category().id === 'video') {\n @for (video of getMessageVideoItems(message); track video.mediaId ?? video.url) {\n <ax-conversation-video-attachment [item]=\"video\" />\n }\n } @else {\n @for (audio of getMessageAudioItems(message); track audio.mediaId ?? audio.url) {\n <ax-conversation-audio-attachment [item]=\"audio\" />\n }\n }\n </div>\n <time class=\"tg-media-view__list-meta\">{{ formatTimestamp(message) }}</time>\n </article>\n }\n </div>\n } @else {\n <div class=\"tg-media-view__list\">\n @for (message of items(); track message.id) {\n <article class=\"tg-media-view__list-item\">\n <div class=\"tg-media-view__list-body\">\n <ax-conversation-registry-component-outlet\n [componentLoader]=\"getRendererComponentLoader(message)\"\n [inputs]=\"getRendererInputs(message)\"\n />\n </div>\n <time class=\"tg-media-view__list-meta\">{{ formatTimestamp(message) }}</time>\n </article>\n }\n </div>\n }\n @if (loadingMoreMedia()) {\n <div class=\"tg-media-view__loading-more\">\n {{ '@acorex:chat.info-panel.media.loading' | translate | async }}\n </div>\n }\n</div>\n", styles: ["@layer properties;@layer components{axm-chat-conversation-info-media-view{display:block;width:100%}axm-chat-conversation-info-media-view .tg-media-view{display:flex;min-height:calc(var(--spacing, .25rem) * 48);flex-direction:column;overflow-y:auto;overscroll-behavior:contain;max-height:min(85vh,40rem)}axm-chat-conversation-info-media-view .tg-media-view__header{display:flex;flex-shrink:0;align-items:center;gap:calc(var(--spacing, .25rem) * 2);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-light-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2.5)}axm-chat-conversation-info-media-view .tg-media-view__back{display:inline-flex;height:calc(var(--spacing, .25rem) * 8);width:calc(var(--spacing, .25rem) * 8);cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);--tw-border-style: none;border-style:none;background-color:transparent;color:rgba(var(--ax-sys-color-primary-500))}axm-chat-conversation-info-media-view .tg-media-view__back:hover{background-color:rgba(var(--ax-sys-color-lighter-surface))}axm-chat-conversation-info-media-view .tg-media-view__title{margin:0;font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:rgba(var(--ax-sys-color-on-surface))}axm-chat-conversation-info-media-view .tg-media-view__empty{padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 8);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface));opacity:.65}axm-chat-conversation-info-media-view .tg-media-view__grid{display:grid;gap:2px;background-color:rgba(var(--ax-sys-color-border-light-surface));padding:2px;grid-template-columns:repeat(3,minmax(0,1fr))}axm-chat-conversation-info-media-view .tg-media-view__grid-cell{position:relative;aspect-ratio:1 / 1;overflow:hidden;background-color:rgba(var(--ax-sys-color-lighter-surface))}axm-chat-conversation-info-media-view .tg-media-view__grid-cell--sticker{display:flex;align-items:center;justify-content:center;padding:calc(var(--spacing, .25rem) * 1.5)}axm-chat-conversation-info-media-view .tg-media-view__grid-cell ::ng-deep ax-conversation-image-attachment,axm-chat-conversation-info-media-view .tg-media-view__grid-cell ::ng-deep .ax-conversation-image-attachment{height:100%;min-height:0px;width:100%;border-radius:0}axm-chat-conversation-info-media-view .tg-media-view__grid-cell ::ng-deep img{height:100%;width:100%;object-fit:cover}axm-chat-conversation-info-media-view .tg-media-view__sticker{max-height:100%;max-width:100%;object-fit:contain}axm-chat-conversation-info-media-view .tg-media-view__list{display:flex;flex-direction:column}axm-chat-conversation-info-media-view .tg-media-view__list-item{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 1.5);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-light-surface));padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 3)}axm-chat-conversation-info-media-view .tg-media-view__list-item:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0px}axm-chat-conversation-info-media-view .tg-media-view__list-body{display:flex;min-width:0px;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}axm-chat-conversation-info-media-view .tg-media-view__list-body ::ng-deep .ax-conversation-msg{max-width:100%}axm-chat-conversation-info-media-view .tg-media-view__list-body ::ng-deep ax-conversation-message-renderer-state{display:none}axm-chat-conversation-info-media-view .tg-media-view__list-body ::ng-deep .ax-conversation-video__player{max-height:min(50vh,16rem)}axm-chat-conversation-info-media-view .tg-media-view__list-meta{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:rgba(var(--ax-sys-color-on-surface));opacity:.55}axm-chat-conversation-info-media-view .tg-media-view__loading-more{flex-shrink:0;padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface));opacity:.65}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
105
|
+
}], propDecorators: { category: [{ type: i0.Input, args: [{ isSignal: true, alias: "category", required: true }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: true }] }], conversation: [{ type: i0.Input, args: [{ isSignal: true, alias: "conversation", required: true }] }], conversationServiceInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "conversationService", required: true }] }], hasMoreMedia: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasMoreMedia", required: false }] }], loadingMoreMedia: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingMoreMedia", required: false }] }], onLoadMoreMedia: [{ type: i0.Input, args: [{ isSignal: true, alias: "onLoadMoreMedia", required: false }] }], onBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "onBack", required: false }] }], back: [{ type: i0.Output, args: ["back"] }] } });
|
|
106
|
+
|
|
107
|
+
export { AXMChatConversationInfoMediaViewComponent };
|
|
108
|
+
//# sourceMappingURL=acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-BVJdVPke.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-BVJdVPke.mjs","sources":["../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/info-bar/chat-conversation-info-media-view.component.ts","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/info-bar/chat-conversation-info-media-view.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport {\n AXConversationAudioAttachmentComponent,\n AXConversationInfiniteScrollDirective,\n AXConversationImageAttachmentComponent,\n AXConversationRegistryComponentOutletComponent,\n AXConversationService,\n AXConversationVideoAttachmentComponent,\n buildMediaGalleryTiles,\n filterMessagesByMediaCategory,\n getMessageAudioItems,\n getMessageVideoItems,\n isAttachmentListCategory,\n isGridMediaCategory,\n} from '@acorex/components/conversation';\nimport type { AXConversation, AXConversationMessage, AXConversationMediaCategory } from '@acorex/components/conversation';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n Injector,\n input,\n output,\n Type,\n ViewEncapsulation,\n} from '@angular/core';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-chat-conversation-info-media-view',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n AsyncPipe,\n AXConversationRegistryComponentOutletComponent,\n AXConversationInfiniteScrollDirective,\n AXDecoratorModule,\n AXTranslationModule,\n AXConversationImageAttachmentComponent,\n AXConversationVideoAttachmentComponent,\n AXConversationAudioAttachmentComponent,\n ],\n templateUrl: './chat-conversation-info-media-view.component.html',\n styleUrl: './chat-conversation-info-media-view.component.css',\n})\nexport class AXMChatConversationInfoMediaViewComponent {\n //#region ----- Services -----\n\n private readonly translation = inject(AXTranslationService);\n private readonly parentInjector = inject(Injector);\n\n //#endregion\n\n //#region ----- Inputs / Outputs -----\n\n readonly category = input.required<AXConversationMediaCategory>();\n readonly messages = input.required<AXConversationMessage[]>();\n readonly conversation = input.required<AXConversation>();\n readonly conversationServiceInput = input.required<AXConversationService>({ alias: 'conversationService' });\n readonly hasMoreMedia = input(false);\n readonly loadingMoreMedia = input(false);\n readonly onLoadMoreMedia = input<(() => void | Promise<void>) | undefined>(undefined);\n /** Callback for lazy outlet wiring (alternative to the `back` output). */\n readonly onBack = input<(() => void) | undefined>(undefined);\n\n readonly back = output<void>();\n\n //#endregion\n\n //#region ----- Derived State -----\n\n readonly items = computed(() => filterMessagesByMediaCategory(this.messages(), this.category().id));\n readonly isGrid = computed(() => isGridMediaCategory(this.category().id));\n readonly isAttachmentList = computed(() => isAttachmentListCategory(this.category().id));\n readonly galleryTiles = computed(() => buildMediaGalleryTiles(this.messages(), this.category().id));\n\n readonly rendererInjector = computed(() =>\n Injector.create({\n providers: [{ provide: AXConversationService, useValue: this.conversationServiceInput() }],\n parent: this.parentInjector,\n }),\n );\n\n readonly titleLabel = computed(() =>\n this.translation.translateSync(this.category().countLabelKey, {\n params: { count: this.category().count },\n }),\n );\n\n readonly getMessageVideoItems = getMessageVideoItems;\n readonly getMessageAudioItems = getMessageAudioItems;\n\n //#endregion\n\n //#region ----- Renderer Helpers -----\n\n getRendererComponentLoader(message: AXConversationMessage): () => Promise<Type<unknown>> {\n const renderer = this.conversationServiceInput().registry.messageRenderers.getRenderer(message);\n\n if (renderer?.componentLoader) {\n return renderer.componentLoader as () => Promise<Type<unknown>>;\n }\n\n if (!renderer?.component) {\n return () =>\n import('@acorex/components/conversation').then((m) => m.AXConversationFallbackRendererComponent);\n }\n\n return () => Promise.resolve(renderer.component as Type<unknown>);\n }\n\n getRendererInputs(message: AXConversationMessage) {\n return { message };\n }\n\n //#endregion\n\n //#region ----- UI Handlers -----\n\n formatTimestamp(message: AXConversationMessage): string {\n return new Intl.DateTimeFormat(undefined, {\n dateStyle: 'medium',\n timeStyle: 'short',\n }).format(message.timestamp);\n }\n\n handleBack(): void {\n this.onBack()?.();\n this.back.emit();\n }\n\n onScrollThreshold(edge: 'top' | 'bottom'): void {\n if (edge === 'bottom' && this.hasMoreMedia() && !this.loadingMoreMedia()) {\n void this.onLoadMoreMedia()?.();\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","<div\n class=\"tg-media-view\"\n axInfiniteScroll\n edge=\"bottom\"\n [threshold]=\"200\"\n [scrollDisabled]=\"loadingMoreMedia() || !hasMoreMedia()\"\n (scrollThreshold)=\"onScrollThreshold($event)\"\n>\n <header class=\"tg-media-view__header\">\n <button type=\"button\" class=\"tg-media-view__back\" (click)=\"handleBack()\" [attr.aria-label]=\"'Back'\">\n <i class=\"fa-light fa-arrow-left\"></i>\n </button>\n <h3 class=\"tg-media-view__title\">{{ titleLabel() }}</h3>\n </header>\n\n @if (items().length === 0) {\n <div class=\"tg-media-view__empty\">\n {{ '@acorex:chat.info-panel.media.empty' | translate | async }}\n </div>\n } @else if (isGrid()) {\n <div class=\"tg-media-view__grid\">\n @for (tile of galleryTiles(); track tile.key) {\n <article\n class=\"tg-media-view__grid-cell\"\n [class.tg-media-view__grid-cell--sticker]=\"tile.kind === 'sticker'\"\n >\n @switch (tile.kind) {\n @case ('image') {\n @if (tile.image; as image) {\n <ax-conversation-image-attachment [item]=\"image\" [alt]=\"'Photo'\" />\n }\n }\n @case ('sticker') {\n @if (tile.stickerUrl) {\n <img\n class=\"tg-media-view__sticker\"\n [src]=\"tile.stickerUrl\"\n [alt]=\"tile.stickerAlt ?? 'Sticker'\"\n loading=\"lazy\"\n />\n }\n }\n }\n </article>\n }\n </div>\n } @else if (isAttachmentList()) {\n <div class=\"tg-media-view__list\">\n @for (message of items(); track message.id) {\n <article class=\"tg-media-view__list-item\">\n <div class=\"tg-media-view__list-body\">\n @if (category().id === 'video') {\n @for (video of getMessageVideoItems(message); track video.mediaId ?? video.url) {\n <ax-conversation-video-attachment [item]=\"video\" />\n }\n } @else {\n @for (audio of getMessageAudioItems(message); track audio.mediaId ?? audio.url) {\n <ax-conversation-audio-attachment [item]=\"audio\" />\n }\n }\n </div>\n <time class=\"tg-media-view__list-meta\">{{ formatTimestamp(message) }}</time>\n </article>\n }\n </div>\n } @else {\n <div class=\"tg-media-view__list\">\n @for (message of items(); track message.id) {\n <article class=\"tg-media-view__list-item\">\n <div class=\"tg-media-view__list-body\">\n <ax-conversation-registry-component-outlet\n [componentLoader]=\"getRendererComponentLoader(message)\"\n [inputs]=\"getRendererInputs(message)\"\n />\n </div>\n <time class=\"tg-media-view__list-meta\">{{ formatTimestamp(message) }}</time>\n </article>\n }\n </div>\n }\n @if (loadingMoreMedia()) {\n <div class=\"tg-media-view__loading-more\">\n {{ '@acorex:chat.info-panel.media.loading' | translate | async }}\n </div>\n }\n</div>\n"],"names":[],"mappings":";;;;;;;;AAAA;AAgCA;AAEA;MAmBa,yCAAyC,CAAA;AAjBtD,IAAA,WAAA,GAAA;;AAoBmB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAC1C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC;;;QAMzC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ;qFAA+B;QACxD,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ;qFAA2B;QACpD,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,QAAQ;yFAAkB;QAC/C,IAAA,CAAA,wBAAwB,GAAG,KAAK,CAAC,QAAQ,+FAA0B,KAAK,EAAE,qBAAqB,EAAA,CAAG;QAClG,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,KAAK;yFAAC;QAC3B,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,KAAK;6FAAC;QAC/B,IAAA,CAAA,eAAe,GAAG,KAAK,CAA2C,SAAS;4FAAC;;QAE5E,IAAA,CAAA,MAAM,GAAG,KAAK,CAA2B,SAAS;mFAAC;QAEnD,IAAA,CAAA,IAAI,GAAG,MAAM,EAAQ;;;AAMrB,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,6BAA6B,CAAC,IAAI,CAAC,QA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