@acorex-platform/module-conversation-client 0.0.37 → 0.0.38
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-C8FR7Snp.mjs → acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-XTzQQhii.mjs} +65 -47
- package/fesm2022/acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-XTzQQhii.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-conversation-client-after-message-sent.command-hVFQo07j.mjs → acorex-platform-module-conversation-client-after-message-sent.command-BMGagKtP.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-conversation-client-after-message-sent.command-hVFQo07j.mjs.map → acorex-platform-module-conversation-client-after-message-sent.command-BMGagKtP.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-conversation-client-assist-delegated-agent-detail-popup.component-D6XrMTQm.mjs → acorex-platform-module-conversation-client-assist-delegated-agent-detail-popup.component-D1SDsHvl.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-conversation-client-assist-delegated-agent-detail-popup.component-D6XrMTQm.mjs.map → acorex-platform-module-conversation-client-assist-delegated-agent-detail-popup.component-D1SDsHvl.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-conversation-client-chat-call-session-page.component-b84Na7R_.mjs → acorex-platform-module-conversation-client-chat-call-session-page.component-nE7xP4bF.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-conversation-client-chat-call-session-page.component-b84Na7R_.mjs.map → acorex-platform-module-conversation-client-chat-call-session-page.component-nE7xP4bF.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-conversation-client-chat-call-start-popup.component-BTOtRRPY.mjs → acorex-platform-module-conversation-client-chat-call-start-popup.component-DXkqkS50.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-conversation-client-chat-call-start-popup.component-BTOtRRPY.mjs.map → acorex-platform-module-conversation-client-chat-call-start-popup.component-DXkqkS50.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-CppNPfqe.mjs → acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-SYCtAqcV.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-CppNPfqe.mjs.map → acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-SYCtAqcV.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-conversation-client-chat-conversation-info-panel.component-C5xS98oE.mjs → acorex-platform-module-conversation-client-chat-conversation-info-panel.component-51PtojIM.mjs} +13 -3
- package/fesm2022/acorex-platform-module-conversation-client-chat-conversation-info-panel.component-51PtojIM.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-conversation-client-comments-page.component-BhSJiJY5.mjs → acorex-platform-module-conversation-client-comments-page.component-Dv_x3ztZ.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-conversation-client-comments-page.component-BhSJiJY5.mjs.map → acorex-platform-module-conversation-client-comments-page.component-Dv_x3ztZ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-conversation-client-mark-conversation-unread.command-D0rr0npJ.mjs → acorex-platform-module-conversation-client-mark-conversation-unread.command-8NoSuUwe.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-conversation-client-mark-conversation-unread.command-D0rr0npJ.mjs.map → acorex-platform-module-conversation-client-mark-conversation-unread.command-8NoSuUwe.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-conversation-client-open-chat.command-Bbgp4ZfT.mjs → acorex-platform-module-conversation-client-open-chat.command-BgJ0Z36e.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-conversation-client-open-chat.command-Bbgp4ZfT.mjs.map → acorex-platform-module-conversation-client-open-chat.command-BgJ0Z36e.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-conversation-client-retry-assist-response.command-BMZTab8j.mjs → acorex-platform-module-conversation-client-retry-assist-response.command-lcNz4Hpu.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-conversation-client-retry-assist-response.command-BMZTab8j.mjs.map → acorex-platform-module-conversation-client-retry-assist-response.command-lcNz4Hpu.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-conversation-client-sync-read-state.command-9G3Knrre.mjs → acorex-platform-module-conversation-client-sync-read-state.command-DxccFsD9.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-conversation-client-sync-read-state.command-9G3Knrre.mjs.map → acorex-platform-module-conversation-client-sync-read-state.command-DxccFsD9.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-conversation-client.mjs +1 -1
- package/package.json +2 -2
- package/types/acorex-platform-module-conversation-client.d.ts +4 -0
- package/fesm2022/acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-C8FR7Snp.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-conversation-client-chat-conversation-info-panel.component-C5xS98oE.mjs.map +0 -1
|
@@ -8,7 +8,7 @@ import { AXTranslationService, AXTranslationModule } from '@acorex/core/translat
|
|
|
8
8
|
import { AsyncPipe } from '@angular/common';
|
|
9
9
|
import * as i0 from '@angular/core';
|
|
10
10
|
import { inject, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
11
|
-
import { i as AXMChatCallActiveSessionService, j as axmResolveConversationListAvatar, k as axmEnsureChatCallRtcReady, l as axmOpenChatCallSessionDialog } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-
|
|
11
|
+
import { i as AXMChatCallActiveSessionService, j as axmResolveConversationListAvatar, k as axmEnsureChatCallRtcReady, l as axmOpenChatCallSessionDialog } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-XTzQQhii.mjs';
|
|
12
12
|
|
|
13
13
|
//#region ----- Imports -----
|
|
14
14
|
//#endregion
|
|
@@ -89,4 +89,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
89
89
|
}] });
|
|
90
90
|
|
|
91
91
|
export { AXMChatCallStartPopupComponent };
|
|
92
|
-
//# sourceMappingURL=acorex-platform-module-conversation-client-chat-call-start-popup.component-
|
|
92
|
+
//# sourceMappingURL=acorex-platform-module-conversation-client-chat-call-start-popup.component-DXkqkS50.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-conversation-client-chat-call-start-popup.component-BTOtRRPY.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';\nimport { AXMChatCallActiveSessionService } from './chat-call-active-session.service';\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(24rem, 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: 0;\n padding: 2rem 1.25rem 1.5rem;\n }\n\n .axm-chat-call-start__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n max-width: 22rem;\n min-height: 0;\n gap: 2rem;\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.625rem;\n margin-top: 0;\n }\n\n .axm-chat-call-start__avatar {\n margin-bottom: 0.25rem;\n }\n\n .axm-chat-call-start__name {\n margin: 0;\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 1.3;\n }\n\n .axm-chat-call-start__hint {\n margin: 0;\n max-width: 18rem;\n font-size: 0.8125rem;\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: center;\n width: 100%;\n gap: 0.5rem;\n padding-bottom: 0.25rem;\n }\n\n .axm-chat-call-start__action {\n display: flex;\n flex: 1 1 0;\n min-width: 0;\n max-width: 6.5rem;\n flex-direction: column;\n align-items: center;\n gap: 0.5rem;\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.6875rem;\n line-height: 1.25;\n text-align: center;\n white-space: normal;\n word-break: break-word;\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 activeCallSessions = inject(AXMChatCallActiveSessionService);\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 const activeCallSessions = this.activeCallSessions;\n this.close();\n await axmOpenChatCallSessionDialog({\n conversation,\n media: mediaType,\n popupService,\n activeCallSessions,\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]=\"96\"\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;AA4BA;AAEA;AAEA;;AAEG;AA4JG,MAAO,8BAA+B,SAAQ,mBAAmB,CAAA;AA3JvE,IAAA,WAAA,GAAA;;;AA8JmB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,+BAA+B,CAAC;QAC5D,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,CAAC;AA+EvD,IAAA;;;AAlEC,IAAA,IAAc,eAAe,GAAA;QAC3B,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE;IACxC;AAEA,IAAA,IAAc,WAAW,GAAA;AACvB,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;AACtB,YAAA,OAAO,EAAE;QACX;QACA,OAAO,gCAAgC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,KAAK;IAClE;AAEA,IAAA,IAAc,SAAS,GAAA;AACrB,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;AACtB,YAAA,OAAO,EAAE;QACX;QACA,OAAO,gCAA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WAAA,EAAA,IAAA,ED7BY,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,KAAA,EAAA,UAAA,EAAA,WAAA,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;;2FAoJjD,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBA3J1C,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,otFAAA,EAAA,MAAA,EAAA,CAAA,0iEAAA,CAAA,EAAA;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-conversation-client-chat-call-start-popup.component-DXkqkS50.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';\nimport { AXMChatCallActiveSessionService } from './chat-call-active-session.service';\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(24rem, 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: 0;\n padding: 2rem 1.25rem 1.5rem;\n }\n\n .axm-chat-call-start__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n max-width: 22rem;\n min-height: 0;\n gap: 2rem;\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.625rem;\n margin-top: 0;\n }\n\n .axm-chat-call-start__avatar {\n margin-bottom: 0.25rem;\n }\n\n .axm-chat-call-start__name {\n margin: 0;\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 1.3;\n }\n\n .axm-chat-call-start__hint {\n margin: 0;\n max-width: 18rem;\n font-size: 0.8125rem;\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: center;\n width: 100%;\n gap: 0.5rem;\n padding-bottom: 0.25rem;\n }\n\n .axm-chat-call-start__action {\n display: flex;\n flex: 1 1 0;\n min-width: 0;\n max-width: 6.5rem;\n flex-direction: column;\n align-items: center;\n gap: 0.5rem;\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.6875rem;\n line-height: 1.25;\n text-align: center;\n white-space: normal;\n word-break: break-word;\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 activeCallSessions = inject(AXMChatCallActiveSessionService);\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 const activeCallSessions = this.activeCallSessions;\n this.close();\n await axmOpenChatCallSessionDialog({\n conversation,\n media: mediaType,\n popupService,\n activeCallSessions,\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]=\"96\"\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;AA4BA;AAEA;AAEA;;AAEG;AA4JG,MAAO,8BAA+B,SAAQ,mBAAmB,CAAA;AA3JvE,IAAA,WAAA,GAAA;;;AA8JmB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,+BAA+B,CAAC;QAC5D,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,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EAAA,MAAA,EAAA,CAAA,0iEAAA,CAAA,EAAA;;;"}
|
|
@@ -88,7 +88,7 @@ class AXMChatConversationInfoMediaViewComponent {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
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", "skeleton"] }, { 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: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
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", "skeleton"] }, { 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", "look"], outputs: ["playingChange", "timeUpdate", "durationChange", "playbackEnded", "playbackError"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
92
92
|
}
|
|
93
93
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChatConversationInfoMediaViewComponent, decorators: [{
|
|
94
94
|
type: Component,
|
|
@@ -105,4 +105,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
105
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
106
|
|
|
107
107
|
export { AXMChatConversationInfoMediaViewComponent };
|
|
108
|
-
//# sourceMappingURL=acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-
|
|
108
|
+
//# sourceMappingURL=acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-SYCtAqcV.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-CppNPfqe.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":["i1"],"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,qBAAq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sC,wLAPtC,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAYA,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBAjBrD,SAAS;+BACE,uCAAuC,EAAA,eAAA,EAChC,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B;wBACP,SAAS;wBACT,8CAA8C;wBAC9C,qCAAqC;wBACrC,iBAAiB;wBACjB,mBAAmB;wBACnB,sCAAsC;wBACtC,sCAAsC;wBACtC,sCAAsC;AACvC,qBAAA,EAAA,QAAA,EAAA,klGAAA,EAAA,MAAA,EAAA,CAAA,04JAAA,CAAA,EAAA;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-SYCtAqcV.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":["i1"],"mappings":";;;;;;;;AAAA;AAgCA;AAEA;MAmBa,yCAAyC,CAAA;AAjBtD,IAAA,WAAA,GAAA;;AAoBmB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,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EAAA,QAAA,EAAA,kCAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,KAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACtC,sCAAsC,EAAA,QAAA,EAAA,kCAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACtC,sCAAsC,gMAPtC,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAYA,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBAjBrD,SAAS;+BACE,uCAAuC,EAAA,eAAA,EAChC,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B;wBACP,SAAS;wBACT,8CAA8C;wBAC9C,qCAAqC;wBACrC,iBAAiB;wBACjB,mBAAmB;wBACnB,sCAAsC;wBACtC,sCAAsC;wBACtC,sCAAsC;AACvC,qBAAA,EAAA,QAAA,EAAA,klGAAA,EAAA,MAAA,EAAA,CAAA,04JAAA,CAAA,EAAA;;;"}
|
|
@@ -13,7 +13,7 @@ import { AXTranslationService, AXTranslationModule } from '@acorex/core/translat
|
|
|
13
13
|
import { AXPlatform } from '@acorex/core/platform';
|
|
14
14
|
import { AsyncPipe } from '@angular/common';
|
|
15
15
|
import * as i0 from '@angular/core';
|
|
16
|
-
import { inject, output, signal, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
16
|
+
import { inject, ChangeDetectorRef, output, signal, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
17
17
|
import * as i1 from '@angular/forms';
|
|
18
18
|
import { FormsModule } from '@angular/forms';
|
|
19
19
|
|
|
@@ -27,6 +27,11 @@ class AXMChatConversationInfoPanelComponent extends AXClosableComponent {
|
|
|
27
27
|
this.toastService = inject(AXToastService);
|
|
28
28
|
this.translation = inject(AXTranslationService);
|
|
29
29
|
this.platform = inject(AXPlatform);
|
|
30
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
31
|
+
/**
|
|
32
|
+
* Optional fallback only. Popup content is created on the root view container;
|
|
33
|
+
* the chat instance is assigned via {@link AXPopupService} `data`.
|
|
34
|
+
*/
|
|
30
35
|
this.injectedConversationService = inject(AXConversationService, { optional: true });
|
|
31
36
|
//#endregion
|
|
32
37
|
//#region ----- Popup State -----
|
|
@@ -39,7 +44,7 @@ class AXMChatConversationInfoPanelComponent extends AXClosableComponent {
|
|
|
39
44
|
...(ngDevMode ? [{ debugName: "panelView" }] : /* istanbul ignore next */ []));
|
|
40
45
|
this.selectedMediaCategory = signal(null, /* @ts-ignore */
|
|
41
46
|
...(ngDevMode ? [{ debugName: "selectedMediaCategory" }] : /* istanbul ignore next */ []));
|
|
42
|
-
this.mediaViewLoader = () => import('./acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-
|
|
47
|
+
this.mediaViewLoader = () => import('./acorex-platform-module-conversation-client-chat-conversation-info-media-view.component-SYCtAqcV.mjs').then((m) => m.AXMChatConversationInfoMediaViewComponent);
|
|
43
48
|
this.conversationMessages = signal([], /* @ts-ignore */
|
|
44
49
|
...(ngDevMode ? [{ debugName: "conversationMessages" }] : /* istanbul ignore next */ []));
|
|
45
50
|
this.loadingMessages = signal(false, /* @ts-ignore */
|
|
@@ -139,6 +144,10 @@ class AXMChatConversationInfoPanelComponent extends AXClosableComponent {
|
|
|
139
144
|
//#endregion
|
|
140
145
|
//#region ----- Lifecycle -----
|
|
141
146
|
ngOnInit() {
|
|
147
|
+
// Popup assigns `data` after createComponent, so ngOnInit runs before those fields exist.
|
|
148
|
+
queueMicrotask(() => this.initializeFromPopupData());
|
|
149
|
+
}
|
|
150
|
+
initializeFromPopupData() {
|
|
142
151
|
const resolvedService = this.conversationService ?? this.injectedConversationService;
|
|
143
152
|
if (!resolvedService) {
|
|
144
153
|
console.warn('AXMChatConversationInfoPanelComponent opened without conversationService.');
|
|
@@ -163,6 +172,7 @@ class AXMChatConversationInfoPanelComponent extends AXClosableComponent {
|
|
|
163
172
|
this.initialArchived = this.archived;
|
|
164
173
|
this.editTitle = this.conversation.title || '';
|
|
165
174
|
this.editAvatar = this.conversation.avatar || '';
|
|
175
|
+
this.cdr.markForCheck();
|
|
166
176
|
void this.loadConversationMessages();
|
|
167
177
|
}
|
|
168
178
|
ngOnDestroy() {
|
|
@@ -469,4 +479,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
469
479
|
}], propDecorators: { onClosed: [{ type: i0.Output, args: ["onClosed"] }] } });
|
|
470
480
|
|
|
471
481
|
export { AXMChatConversationInfoPanelComponent };
|
|
472
|
-
//# sourceMappingURL=acorex-platform-module-conversation-client-chat-conversation-info-panel.component-
|
|
482
|
+
//# sourceMappingURL=acorex-platform-module-conversation-client-chat-conversation-info-panel.component-51PtojIM.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-conversation-client-chat-conversation-info-panel.component-51PtojIM.mjs","sources":["../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/info-bar/chat-conversation-info-panel.component.ts","../../../../libs/modules/conversation/client/src/lib/features/chat/plugins/info-bar/chat-conversation-info-panel.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXClosableComponent, AXComponentCloseEvent } from '@acorex/cdk/common';\nimport { AXButtonComponent } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLabelComponent } from '@acorex/components/label';\nimport { AXSearchBoxComponent } from '@acorex/components/search-box';\nimport { AXSwitchModule } from '@acorex/components/switch';\nimport { AXTextBoxComponent } from '@acorex/components/text-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport {\n AXConversationAvatarComponent,\n AXConversationAvatarPickerComponent,\n AXConversationRegistryComponentOutletComponent,\n AXConversationService,\n AXConversationMessageUtilsService,\n AX_CONVERSATION_DEFAULT_MESSAGE_LIST_BACKGROUND_PRESET_ID,\n AX_CONVERSATION_MESSAGE_LIST_BACKGROUND_PRESETS,\n fetchConversationMediaPage,\n filterSupplementalInfoPanelMessages,\n getConversationMediaCategories,\n getConversationProfileFields,\n isMessageListThemeBackground,\n isSameMessageListBackground,\n mergeInfoPanelMessages,\n normalizeMessageListBackgroundValue,\n resolveMessageListBackgroundRaw,\n} from '@acorex/components/conversation';\nimport type {\n AXConversation,\n AXConversationMessage,\n AXConversationMessageListBackground,\n AXConversationMessageListThemeBackground,\n AXConversationMediaCategory,\n AXConversationParticipant,\n} from '@acorex/components/conversation';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n inject,\n OnDestroy,\n OnInit,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface AXMInfoPanelQuickAction {\n id: string;\n labelKey: string;\n icon: string;\n danger?: boolean;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-chat-conversation-info-panel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n AsyncPipe,\n FormsModule,\n AXButtonComponent,\n AXDecoratorModule,\n AXLabelComponent,\n AXSearchBoxComponent,\n AXSwitchModule,\n AXTextBoxComponent,\n AXConversationAvatarPickerComponent,\n AXConversationAvatarComponent,\n AXConversationRegistryComponentOutletComponent,\n AXTranslationModule,\n ],\n providers: [{ provide: AXClosableComponent, useExisting: AXMChatConversationInfoPanelComponent }],\n templateUrl: './chat-conversation-info-panel.component.html',\n styleUrl: './chat-conversation-info-panel.component.css',\n})\nexport class AXMChatConversationInfoPanelComponent extends AXClosableComponent implements OnInit, OnDestroy {\n //#region ----- Services -----\n\n private readonly toastService = inject(AXToastService);\n readonly translation = inject(AXTranslationService);\n private readonly platform = inject(AXPlatform);\n private readonly cdr = inject(ChangeDetectorRef);\n /**\n * Optional fallback only. Popup content is created on the root view container;\n * the chat instance is assigned via {@link AXPopupService} `data`.\n */\n private readonly injectedConversationService = inject(AXConversationService, { optional: true });\n\n //#endregion\n\n //#region ----- Popup State -----\n\n readonly onClosed = output<AXComponentCloseEvent>();\n\n /** Assigned by {@link AXPopupService} via `data`. */\n conversation!: AXConversation;\n /** Assigned by {@link AXPopupService} via `data`. */\n conversationService!: AXConversationService;\n\n readonly activeTab = signal<'profile' | 'manage'>('profile');\n readonly showMemberSearch = signal(false);\n readonly panelView = signal<'main' | 'media'>('main');\n readonly selectedMediaCategory = signal<AXConversationMediaCategory | null>(null);\n readonly mediaViewLoader = () =>\n import('./chat-conversation-info-media-view.component').then((m) => m.AXMChatConversationInfoMediaViewComponent);\n readonly conversationMessages = signal<AXConversationMessage[]>([]);\n readonly loadingMessages = signal(false);\n readonly loadingMoreMedia = signal(false);\n readonly mediaHasMore = signal(false);\n private mediaNextPage = 1;\n private mediaNextCursor: string | undefined;\n readonly memberSearchQuery = signal('');\n\n archived = false;\n\n private initialNotifications = false;\n private initialArchived = false;\n private readonly notificationsEnabled = signal(true);\n\n editTitle = '';\n editAvatar = '';\n\n private groupTitleSaveTimer: ReturnType<typeof setTimeout> | undefined;\n private groupDetailsSaveInFlight = false;\n\n readonly backgroundPresets = AX_CONVERSATION_MESSAGE_LIST_BACKGROUND_PRESETS.map((preset) => ({\n ...preset,\n label: this.translateBackgroundPresetLabel(preset.id),\n }));\n\n //#endregion\n\n //#region ----- Derived State -----\n\n readonly heroSubtitle = computed(() => {\n const conversation = this.liveConversation();\n if (!conversation) return '';\n this.conversationService?.typingRevision();\n this.conversationService?.presenceTimeTick();\n return AXConversationMessageUtilsService.getConversationSubtitle(conversation, {\n typingUserIds: this.conversationService?.getActiveTypingUserIds(conversation.id) ?? [],\n peerPresence: this.conversationService?.getPeerPresence(conversation),\n currentUserId: this.conversationService?.currentUser()?.id,\n });\n });\n\n readonly liveConversation = computed(() => {\n const conversation = this.conversation;\n if (!conversation?.id) return conversation;\n const fromStore = this.conversationService?.conversations().find((c) => c.id === conversation.id);\n return fromStore ?? conversation;\n });\n\n readonly isConversationMuted = computed(() => this.notificationsEnabled() === false);\n\n readonly profileFields = computed(() => {\n const conversation = this.liveConversation();\n if (!conversation) return [];\n return getConversationProfileFields(conversation, this.conversationService?.currentUser()?.id);\n });\n\n readonly mediaCategories = computed(() => {\n if (!this.conversation) return [];\n return getConversationMediaCategories(this.conversationMessages());\n });\n\n readonly quickActions = computed((): AXMInfoPanelQuickAction[] => {\n if (!this.conversation) return [];\n const muted = this.isConversationMuted();\n const actions: AXMInfoPanelQuickAction[] = [\n {\n id: 'mute',\n labelKey: muted ? '@acorex:chat.actions.unmute' : '@acorex:chat.actions.mute',\n icon: muted ? 'fa-light fa-bell-slash' : 'fa-light fa-bell',\n },\n ];\n\n if (!this.isPrivateConversation()) {\n actions.push({\n id: 'leave',\n labelKey: '@acorex:chat.actions.leave-and-delete',\n icon: 'fa-light fa-door-open',\n danger: true,\n });\n }\n\n return actions;\n });\n\n readonly filteredMembers = computed(() => {\n if (!this.conversation) return [];\n const query = this.memberSearchQuery().toLowerCase().trim();\n const members = this.conversation?.participants ?? [];\n if (!query) return members;\n return members.filter(\n (p) =>\n p.name.toLowerCase().includes(query) ||\n (p.description ?? '').toLowerCase().includes(query) ||\n (p.role ?? '').toLowerCase().includes(query),\n );\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n ngOnInit(): void {\n // Popup assigns `data` after createComponent, so ngOnInit runs before those fields exist.\n queueMicrotask(() => this.initializeFromPopupData());\n }\n\n private initializeFromPopupData(): void {\n const resolvedService = this.conversationService ?? this.injectedConversationService;\n if (!resolvedService) {\n console.warn('AXMChatConversationInfoPanelComponent opened without conversationService.');\n this.close();\n return;\n }\n this.conversationService = resolvedService;\n\n if (!this.conversation) {\n const activeConversation = this.conversationService.activeConversation();\n if (activeConversation) {\n this.conversation = activeConversation;\n } else {\n console.warn('AXMChatConversationInfoPanelComponent opened without conversation context.');\n this.close();\n return;\n }\n }\n\n this.initialNotifications = this.conversationService.getRoomPreferences(this.conversation.id).notifications;\n this.notificationsEnabled.set(this.initialNotifications);\n this.archived = this.conversation.archived ?? false;\n this.initialArchived = this.archived;\n this.editTitle = this.conversation.title || '';\n this.editAvatar = this.conversation.avatar || '';\n\n this.cdr.markForCheck();\n void this.loadConversationMessages();\n }\n\n ngOnDestroy(): void {\n if (this.groupTitleSaveTimer) {\n clearTimeout(this.groupTitleSaveTimer);\n this.groupTitleSaveTimer = undefined;\n void this.persistGroupDetails();\n }\n\n const currentNotifications = this.notificationsEnabled();\n const hasChanges = currentNotifications !== this.initialNotifications || this.archived !== this.initialArchived;\n\n if (hasChanges) {\n this.toastService.success(this.translation.translateSync('@acorex:chat.info-panel.toasts.settings-saved'));\n }\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async loadConversationMessages(): Promise<void> {\n this.loadingMessages.set(true);\n this.mediaNextPage = 1;\n this.mediaNextCursor = undefined;\n this.mediaHasMore.set(false);\n\n try {\n const page = await fetchConversationMediaPage(\n this.conversationService.conversationApi,\n this.conversation.id,\n 0,\n );\n\n this.mediaHasMore.set(page.hasMore);\n this.mediaNextCursor = page.nextCursor;\n\n const supplemental =\n this.conversationService.activeConversationId() === this.conversation.id\n ? filterSupplementalInfoPanelMessages(this.conversationService.activeMessages())\n : [];\n\n this.conversationMessages.set(mergeInfoPanelMessages(page.items, supplemental));\n } catch (error) {\n console.error('Failed to load conversation media messages:', error);\n } finally {\n this.loadingMessages.set(false);\n }\n }\n\n async loadMoreMedia(): Promise<void> {\n if (!this.mediaHasMore() || this.loadingMoreMedia() || this.loadingMessages()) {\n return;\n }\n\n this.loadingMoreMedia.set(true);\n try {\n const page = await fetchConversationMediaPage(\n this.conversationService.conversationApi,\n this.conversation.id,\n this.mediaNextPage,\n undefined,\n this.mediaNextCursor,\n );\n\n this.mediaHasMore.set(page.hasMore);\n this.mediaNextCursor = page.nextCursor;\n this.mediaNextPage += 1;\n\n this.conversationMessages.set(mergeInfoPanelMessages(page.items, this.conversationMessages()));\n } catch (error) {\n console.error('Failed to load more conversation media:', error);\n } finally {\n this.loadingMoreMedia.set(false);\n }\n }\n\n //#endregion\n\n //#region ----- UI Helpers -----\n\n isPrivateConversation(): boolean {\n return this.conversation.type === 'private';\n }\n\n isGroupConversation(): boolean {\n return this.conversation.type === 'group' || this.conversation.type === 'channel';\n }\n\n membersSectionTitle(): string {\n return this.translation.translateSync('@acorex:chat.info-panel.tabs.members-count-upper', {\n params: { count: this.conversation.participants.length },\n });\n }\n\n getMemberRoleLabel(participant: AXConversationParticipant): string | null {\n switch (participant.role) {\n case 'admin':\n return '@acorex:chat.info-panel.member-role.admin';\n case 'owner':\n return '@acorex:chat.info-panel.member-role.admin';\n case 'moderator':\n return '@acorex:chat.info-panel.member-role.moderator';\n default:\n return null;\n }\n }\n\n onMemberSearchChange(value: string | null | undefined): void {\n this.memberSearchQuery.set(value ?? '');\n }\n\n setActiveTab(tab: 'profile' | 'manage'): void {\n this.activeTab.set(tab);\n }\n\n toggleMemberSearch(): void {\n this.showMemberSearch.update((value) => !value);\n if (!this.showMemberSearch()) {\n this.memberSearchQuery.set('');\n }\n }\n\n openMediaCategory(category: AXConversationMediaCategory): void {\n this.selectedMediaCategory.set(category);\n this.panelView.set('media');\n }\n\n closeMediaView(): void {\n this.panelView.set('main');\n this.selectedMediaCategory.set(null);\n }\n\n getMediaViewInputs(category: AXConversationMediaCategory): Record<string, unknown> {\n return {\n category,\n messages: this.conversationMessages(),\n conversation: this.conversation,\n conversationService: this.conversationService,\n hasMoreMedia: this.mediaHasMore(),\n loadingMoreMedia: this.loadingMoreMedia(),\n onLoadMoreMedia: () => this.loadMoreMedia(),\n onBack: () => this.closeMediaView(),\n };\n }\n\n getMediaRowLabel(category: AXConversationMediaCategory): string {\n return this.translation.translateSync(category.countLabelKey, {\n params: { count: category.count },\n });\n }\n\n getMemberSubtitle(participant: AXConversationParticipant): string {\n const presence = this.conversationService?.getUserPresence(participant.id);\n this.conversationService?.presenceTimeTick();\n if (presence?.status === 'online') {\n return this.translation.translateSync('@acorex:chat.status.online');\n }\n if (participant.description?.trim()) return participant.description.trim();\n if (participant.role && participant.role !== 'member') return participant.role;\n return '';\n }\n\n isMemberOnline(participant: AXConversationParticipant): boolean {\n this.conversationService?.presenceTimeTick();\n return this.conversationService?.getUserPresence(participant.id)?.status === 'online';\n }\n\n //#endregion\n\n //#region ----- Actions -----\n\n onQuickAction(actionId: string): void {\n switch (actionId) {\n case 'mute':\n void this.toggleConversationMute();\n break;\n case 'leave':\n void this.onLeave();\n break;\n }\n }\n\n async toggleConversationMute(): Promise<void> {\n await this.onNotificationsChange(!this.notificationsEnabled());\n }\n\n async onNotificationsChange(value: boolean): Promise<void> {\n try {\n await this.conversationService.updateConversationSettings(this.conversation.id, {\n notifications: value,\n });\n this.notificationsEnabled.set(value);\n } catch (error) {\n console.error('Failed to update notifications:', error);\n }\n }\n\n async onArchivedChange(value: boolean): Promise<void> {\n const previous = this.archived;\n this.archived = value;\n try {\n await this.conversationService.updateConversation(this.conversation.id, { archived: value });\n this.conversation.archived = value;\n this.initialArchived = value;\n } catch {\n this.archived = previous;\n }\n }\n\n close(data?: unknown): void {\n const event = new AXComponentCloseEvent();\n event.component = this;\n event.data = data;\n this.onClosed.emit(event);\n }\n\n closeAll(): void {\n this.close();\n }\n\n async onLeave(): Promise<void> {\n const isGroup = this.isGroupConversation();\n await this.conversationService.deleteConversation(this.conversation.id);\n\n if (this.conversationService.activeConversation()?.id === this.conversation.id) {\n this.conversationService.closeActiveConversation();\n }\n\n this.toastService.success(\n isGroup\n ? this.translation.translateSync('@acorex:chat.info-panel.toasts.left-conversation')\n : this.translation.translateSync('@acorex:chat.info-panel.toasts.deleted-conversation'),\n );\n this.close();\n }\n\n onGroupTitleChange(value: string): void {\n this.editTitle = value;\n clearTimeout(this.groupTitleSaveTimer);\n this.groupTitleSaveTimer = setTimeout(() => void this.persistGroupDetails(), 400);\n }\n\n onGroupAvatarChange(value: string): void {\n this.editAvatar = value;\n void this.persistGroupDetails();\n }\n\n private async persistGroupDetails(): Promise<void> {\n if (this.isPrivateConversation() || this.groupDetailsSaveInFlight) {\n return;\n }\n\n const title = this.editTitle.trim();\n if (!title) {\n return;\n }\n\n const nextAvatar = this.editAvatar.trim() || undefined;\n const currentTitle = this.conversation.title || '';\n const currentAvatar = this.conversation.avatar || undefined;\n\n if (title === currentTitle && nextAvatar === currentAvatar) {\n return;\n }\n\n this.groupDetailsSaveInFlight = true;\n try {\n await this.conversationService.updateConversation(this.conversation.id, {\n title,\n avatar: nextAvatar,\n });\n this.conversation.title = title;\n this.conversation.avatar = nextAvatar;\n } catch (error) {\n console.error('Failed to update group details:', error);\n this.toastService.danger(this.translation.translateSync('@acorex:chat.info-panel.toasts.failed-group-update'));\n } finally {\n this.groupDetailsSaveInFlight = false;\n }\n }\n\n isBackgroundSelected(preset: { id: string; value: AXConversationMessageListThemeBackground }): boolean {\n this.platform.themeMode();\n const bg = this.conversation?.metadata?.['messageListBackground'] as\n | AXConversationMessageListBackground\n | undefined;\n if (\n bg === undefined ||\n bg === '' ||\n (isMessageListThemeBackground(bg) && !bg.light.trim() && !bg.dark.trim())\n ) {\n return preset.id === AX_CONVERSATION_DEFAULT_MESSAGE_LIST_BACKGROUND_PRESET_ID;\n }\n return isSameMessageListBackground(bg, preset.value, this.platform.isDark());\n }\n\n presetBackgroundPreview(preset: AXConversationMessageListThemeBackground): string {\n this.platform.themeMode();\n const raw = resolveMessageListBackgroundRaw(preset, this.platform.isDark()) ?? '';\n return normalizeMessageListBackgroundValue(raw);\n }\n\n async applyMessageListBackground(value: AXConversationMessageListBackground): Promise<void> {\n const isReset =\n value === '' || (isMessageListThemeBackground(value) && !value.light.trim() && !value.dark.trim());\n try {\n const metadata = { ...(this.conversation.metadata ?? {}) };\n if (isReset) {\n delete metadata.messageListBackground;\n } else {\n metadata.messageListBackground = value;\n }\n await this.conversationService.updateConversationMetadata(this.conversation.id, metadata);\n this.conversation.metadata = metadata;\n this.toastService.success(\n isReset\n ? this.translation.translateSync('@acorex:chat.info-panel.toasts.background-reset')\n : this.translation.translateSync('@acorex:chat.info-panel.toasts.background-updated'),\n );\n } catch (error) {\n console.error('Failed to update message list background:', error);\n this.toastService.danger(\n this.translation.translateSync('@acorex:chat.info-panel.toasts.failed-background-update'),\n );\n }\n }\n\n getBackgroundAriaLabel(label: string): string {\n return this.translation.translateSync('@acorex:chat.info-panel.background.set-label', {\n params: { label },\n });\n }\n\n private translateBackgroundPresetLabel(id: string): string {\n const labelKeys: Record<string, string> = {\n 'solid-default': '@acorex:chat.info-panel.background.presets.default',\n 'solid-graphite': '@acorex:chat.info-panel.background.presets.graphite',\n 'solid-olive': '@acorex:chat.info-panel.background.presets.olive',\n 'solid-sky': '@acorex:chat.info-panel.background.presets.sky',\n 'grad-aurora': '@acorex:chat.info-panel.background.presets.aurora',\n 'grad-sunset': '@acorex:chat.info-panel.background.presets.sunset',\n };\n return this.translation.translateSync(labelKeys[id] ?? id);\n }\n\n //#endregion\n}\n\n//#endregion\n","@if (conversation) {\n <div class=\"tg-info-panel\">\n @if (panelView() === 'media' && selectedMediaCategory(); as category) {\n <ax-conversation-registry-component-outlet\n [componentLoader]=\"mediaViewLoader\"\n [inputs]=\"getMediaViewInputs(category)\"\n />\n } @else {\n <div class=\"tg-info-panel__scroll\">\n <section class=\"tg-hero\">\n <ax-conversation-avatar kind=\"auto\" [conversation]=\"conversation\" [size]=\"96\" />\n <h2 class=\"tg-hero__title\">{{ conversation.title }}</h2>\n <p class=\"tg-hero__subtitle\">{{ heroSubtitle() }}</p>\n </section>\n\n <section class=\"tg-quick-actions\">\n @for (action of quickActions(); track action.id) {\n <button\n type=\"button\"\n class=\"tg-quick-action\"\n [class.tg-quick-action--danger]=\"action.danger\"\n [class.tg-quick-action--active]=\"action.id === 'mute' && isConversationMuted()\"\n (click)=\"onQuickAction(action.id)\"\n >\n <span class=\"tg-quick-action__icon\"><i [class]=\"action.icon\"></i></span>\n <span class=\"tg-quick-action__label\">{{ action.labelKey | translate | async }}</span>\n </button>\n }\n </section>\n\n <nav class=\"tg-tabs\" role=\"tablist\">\n <button\n type=\"button\"\n class=\"tg-tab\"\n role=\"tab\"\n [class.tg-tab--active]=\"activeTab() === 'profile'\"\n [attr.aria-selected]=\"activeTab() === 'profile'\"\n (click)=\"setActiveTab('profile')\"\n >\n {{ '@acorex:chat.info-panel.tabs.profile' | translate | async }}\n </button>\n <button\n type=\"button\"\n class=\"tg-tab\"\n role=\"tab\"\n [class.tg-tab--active]=\"activeTab() === 'manage'\"\n [attr.aria-selected]=\"activeTab() === 'manage'\"\n (click)=\"setActiveTab('manage')\"\n >\n {{ '@acorex:chat.info-panel.tabs.manage' | translate | async }}\n </button>\n </nav>\n\n @if (activeTab() === 'profile') {\n @if (profileFields().length > 0) {\n <section class=\"tg-section tg-details\">\n @for (field of profileFields(); track field.id) {\n <div class=\"tg-detail-row\">\n <span class=\"tg-detail-row__icon\"><i [class]=\"field.icon\"></i></span>\n <div class=\"tg-detail-row__content\">\n <span class=\"tg-detail-row__value\">{{ field.value }}</span>\n <span class=\"tg-detail-row__label\">{{ field.labelKey | translate | async }}</span>\n </div>\n </div>\n }\n </section>\n }\n\n @if (loadingMessages()) {\n <div class=\"tg-loading\">{{ '@acorex:chat.info-panel.media.loading' | translate | async }}</div>\n } @else if (mediaCategories().length > 0) {\n <section class=\"tg-section tg-media\">\n @for (category of mediaCategories(); track category.id) {\n <button type=\"button\" class=\"tg-media-row\" (click)=\"openMediaCategory(category)\">\n <span class=\"tg-media-row__icon\"><i [class]=\"category.icon\"></i></span>\n <span class=\"tg-media-row__label\">{{ getMediaRowLabel(category) }}</span>\n <i class=\"fa-light fa-chevron-right tg-media-row__chevron\"></i>\n </button>\n }\n </section>\n }\n\n @if (isGroupConversation()) {\n <section class=\"tg-section tg-members\">\n <div class=\"tg-section-header tg-section-header--row\">\n <span class=\"tg-section-header__title\">{{ membersSectionTitle() }}</span>\n <div class=\"tg-section-header__actions\">\n <button\n type=\"button\"\n class=\"tg-icon-btn\"\n (click)=\"toggleMemberSearch()\"\n [attr.aria-label]=\"'@acorex:chat.info-panel.placeholders.search-members' | translate | async\"\n >\n <i class=\"fa-light fa-magnifying-glass\"></i>\n </button>\n </div>\n </div>\n @if (showMemberSearch()) {\n <div class=\"tg-members-search-wrap\">\n <ax-search-box\n class=\"tg-members-search\"\n [value]=\"memberSearchQuery()\"\n (valueChange)=\"onMemberSearchChange($event)\"\n [placeholder]=\"'@acorex:chat.info-panel.placeholders.search-members' | translate | async\"\n ></ax-search-box>\n </div>\n }\n @for (participant of filteredMembers(); track participant.id) {\n <div class=\"tg-member-row\">\n <ax-conversation-avatar\n kind=\"user\"\n [userId]=\"participant.id\"\n [conversation]=\"conversation\"\n [size]=\"42\"\n />\n <div class=\"tg-member-row__content\">\n <span class=\"tg-member-row__name\">{{ participant.name }}</span>\n <span\n class=\"tg-member-row__meta\"\n [class.tg-member-row__meta--online]=\"isMemberOnline(participant)\"\n >\n {{ getMemberSubtitle(participant) }}\n </span>\n </div>\n @if (getMemberRoleLabel(participant); as roleLabel) {\n <span class=\"tg-member-row__badge\">{{ roleLabel | translate | async }}</span>\n }\n </div>\n }\n </section>\n }\n }\n\n @if (activeTab() === 'manage') {\n <section class=\"tg-section tg-manage\">\n @if (!isPrivateConversation()) {\n <div class=\"tg-manage-block\">\n <ax-label class=\"tg-manage-label\">{{\n '@acorex:chat.info-panel.group-details.title' | translate | async\n }}</ax-label>\n <ax-text-box\n [value]=\"editTitle\"\n (valueChange)=\"onGroupTitleChange($event)\"\n [placeholder]=\"'@acorex:chat.info-panel.placeholders.enter-group-title' | translate | async\"\n ></ax-text-box>\n <div class=\"tg-manage-avatar\">\n <ax-conversation-avatar-picker\n [(avatarUrl)]=\"editAvatar\"\n (avatarUrlChange)=\"onGroupAvatarChange($event)\"\n ></ax-conversation-avatar-picker>\n </div>\n </div>\n }\n\n <div class=\"tg-setting-row\">\n <div class=\"tg-setting-row__info\">\n <span class=\"tg-setting-row__title\">{{\n '@acorex:chat.info-panel.settings.archived' | translate | async\n }}</span>\n <span class=\"tg-setting-row__desc\">{{\n '@acorex:chat.info-panel.settings.archived-description' | translate | async\n }}</span>\n </div>\n <ax-switch [(ngModel)]=\"archived\" (ngModelChange)=\"onArchivedChange($event)\"></ax-switch>\n </div>\n\n <div class=\"tg-manage-block tg-background-block\">\n <ax-label class=\"tg-manage-label\">{{\n '@acorex:chat.info-panel.background.title' | translate | async\n }}</ax-label>\n <p class=\"tg-background-desc\">\n {{ '@acorex:chat.info-panel.background.description' | translate | async }}\n </p>\n <div class=\"tg-background-grid\">\n @for (preset of backgroundPresets; track preset.id) {\n <button\n type=\"button\"\n class=\"tg-background-swatch\"\n [class.tg-background-swatch--active]=\"isBackgroundSelected(preset)\"\n [style.background]=\"presetBackgroundPreview(preset.value)\"\n (click)=\"applyMessageListBackground(preset.value)\"\n [attr.aria-label]=\"getBackgroundAriaLabel(preset.label)\"\n >\n <span class=\"tg-background-swatch__label\">{{ preset.label }}</span>\n </button>\n }\n </div>\n <ax-button\n [text]=\"'@acorex:chat.info-panel.actions.reset-to-default' | translate | async\"\n [look]=\"'ghost'\"\n (onClick)=\"applyMessageListBackground('')\"\n ></ax-button>\n </div>\n </section>\n }\n </div>\n }\n </div>\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAgEA;AA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EAAA,WAAA,EAAA,IAAA,EAC7B,8CAA8C,EAAA,QAAA,EAAA,2CAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAC9C,mBAAmB,0BAXnB,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAiBA,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBAtBjD,SAAS;+BACE,kCAAkC,EAAA,eAAA,EAC3B,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B;wBACP,SAAS;wBACT,WAAW;wBACX,iBAAiB;wBACjB,iBAAiB;wBACjB,gBAAgB;wBAChB,oBAAoB;wBACpB,cAAc;wBACd,kBAAkB;wBAClB,mCAAmC;wBACnC,6BAA6B;wBAC7B,8CAA8C;wBAC9C,mBAAmB;qBACpB,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,qCAAuC,EAAE,CAAC,EAAA,QAAA,EAAA,23RAAA,EAAA,MAAA,EAAA,CAAA,gsZAAA,CAAA,EAAA;;;"}
|
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, inject, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { ActivatedRoute } from '@angular/router';
|
|
4
4
|
import { AXPPageLayoutBaseComponent, AXPPageLayoutBase } from '@acorex-platform/framework-client/layout/views';
|
|
5
|
-
import { h as AXMCommentComponent } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-
|
|
5
|
+
import { h as AXMCommentComponent } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-XTzQQhii.mjs';
|
|
6
6
|
|
|
7
7
|
//#region ---- Comments Page Component ----
|
|
8
8
|
/**
|
|
@@ -80,4 +80,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
80
80
|
}], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: true }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }] } });
|
|
81
81
|
|
|
82
82
|
export { AXMCommentsPageComponent };
|
|
83
|
-
//# sourceMappingURL=acorex-platform-module-conversation-client-comments-page.component-
|
|
83
|
+
//# sourceMappingURL=acorex-platform-module-conversation-client-comments-page.component-Dv_x3ztZ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-conversation-client-comments-page.component-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-conversation-client-comments-page.component-Dv_x3ztZ.mjs","sources":["../../../../libs/modules/conversation/client/src/lib/features/comment/comments-page/comments-page.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\nimport { AXMCommentComponent } from '../comment.component';\n\n//#region ---- Comments Page Component ----\n\n/**\n * Page component that renders comments using AXMCommentComponent.\n * Used when comments plugin has display: 'page'.\n * Receives rootContext (entity data) and derives refrenceType/refrenceId from route params and context.\n */\n@Component({\n selector: 'axm-comments-page',\n imports: [AXMCommentComponent],\n template: `\n @if (refrenceType() && refrenceId()) {\n <axm-comment\n [refrenceType]=\"refrenceType()!\"\n [refrenceId]=\"refrenceId()!\"\n [subject]=\"subject()\"\n ></axm-comment>\n }\n `,\n styles: `\n\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMCommentsPageComponent,\n },\n ],\n})\nexport class AXMCommentsPageComponent extends AXPPageLayoutBaseComponent {\n\n //#region ---- Inputs ----\n\n /** Entity data context passed by the page host */\n rootContext = input.required<Record<string, any>>();\n\n /** Page-level configuration from the entity page definition */\n pageConfig = input<Record<string, unknown>>();\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n private route = inject(ActivatedRoute);\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n protected refrenceType = computed(() => {\n const moduleName = this.route.snapshot.parent?.paramMap.get('module');\n const entityName = this.route.snapshot.paramMap.get('entity');\n if (moduleName && entityName) {\n return `${moduleName}.${entityName}`;\n }\n return null;\n });\n\n protected refrenceId = computed(() => {\n const ctx = this.rootContext();\n return ctx?.['id'] ?? null;\n });\n\n protected subject = computed(() => {\n const ctx = this.rootContext();\n return ctx?.['title'] ?? '';\n });\n\n //#endregion\n\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AAKA;AAEA;;;;AAIG;AA6BG,MAAO,wBAAyB,SAAQ,0BAA0B,CAAA;AA5BxE,IAAA,WAAA,GAAA;;;;QAiCE,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,QAAQ;wFAAuB;;AAGnD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAA2B;;;AAMrC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;;;AAM5B,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AACrC,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;AACrE,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,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AiB;AAC1B,gBAAA,WAAW,EAAE,wBAAwB;AACtC,aAAA;SACF,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAvBS;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+CAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EATS,mBAAmB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,cAAA,EAAA,YAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FA0BlB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBA5BpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,OAAA,EACpB,CAAC,mBAAmB,CAAC,EAAA,QAAA,EACpB;;;;;;;;GAQT,EAAA,eAAA,EASgB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,wBAA0B;AACtC,yBAAA;AACF,qBAAA,EAAA,MAAA,EAAA,CAAA,+CAAA,CAAA,EAAA;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
|
-
import { A as AXMConversationEntityStoreService } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-
|
|
3
|
+
import { A as AXMConversationEntityStoreService } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-XTzQQhii.mjs';
|
|
4
4
|
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region ---- Command ----
|
|
@@ -27,4 +27,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
27
27
|
}] });
|
|
28
28
|
|
|
29
29
|
export { AXMConversationMarkConversationUnreadCommand };
|
|
30
|
-
//# sourceMappingURL=acorex-platform-module-conversation-client-mark-conversation-unread.command-
|
|
30
|
+
//# sourceMappingURL=acorex-platform-module-conversation-client-mark-conversation-unread.command-8NoSuUwe.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-conversation-client-mark-conversation-unread.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-conversation-client-mark-conversation-unread.command-8NoSuUwe.mjs","sources":["../../../../libs/modules/conversation/client/src/lib/features/commands/mark-conversation-unread.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\n\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXMConversationEntityStoreService } from '../chat/services/conversation-entity-store.service';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface AXMMarkConversationUnreadOptions {\n conversationId: string;\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationMarkConversationUnreadCommand implements AXPCommand<AXMMarkConversationUnreadOptions, void> {\n private readonly store = inject(AXMConversationEntityStoreService);\n\n async execute(input: AXMMarkConversationUnreadOptions | unknown): AXPCommandExecuteResultPromise<void> {\n const options = input as AXMMarkConversationUnreadOptions;\n const conversation = await this.store.getConversation(options.conversationId);\n if (!conversation) {\n return { success: false };\n }\n const unreadCount = Math.max(1, conversation.unreadCount ?? 0);\n await this.store.setUnreadCount(options.conversationId, unreadCount);\n return { success: true, kind: 'object', data: undefined };\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAiBA;AAEA;MAGa,4CAA4C,CAAA;AADzD,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iCAAiC,CAAC;AAYnE,IAAA;IAVC,MAAM,OAAO,CAAC,KAAiD,EAAA;QAC7D,MAAM,OAAO,GAAG,KAAyC;AACzD,QAAA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,cAAc,CAAC;QAC7E,IAAI,CAAC,YAAY,EAAE;AACjB,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;AACA,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,WAAW,IAAI,CAAC,CAAC;AAC9D,QAAA,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,cAAc,EAAE,WAAW,CAAC;AACpE,QAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3D;8GAZW,4CAA4C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA5C,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4CAA4C,cAD/B,MAAM,EAAA,CAAA,CAAA;;2FACnB,4CAA4C,EAAA,UAAA,EAAA,CAAA;kBADxD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -4,7 +4,7 @@ import { AXPInAppInboxConnectorService } from '@acorex-platform/module-communica
|
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { inject, Injectable } from '@angular/core';
|
|
6
6
|
import { Router } from '@angular/router';
|
|
7
|
-
import { g as buildConversationChatInAppCorrelationPrefix } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-
|
|
7
|
+
import { g as buildConversationChatInAppCorrelationPrefix } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-XTzQQhii.mjs';
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region ----- Command -----
|
|
@@ -54,4 +54,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
54
54
|
}] });
|
|
55
55
|
|
|
56
56
|
export { AXMConversationOpenChatCommand };
|
|
57
|
-
//# sourceMappingURL=acorex-platform-module-conversation-client-open-chat.command-
|
|
57
|
+
//# sourceMappingURL=acorex-platform-module-conversation-client-open-chat.command-BgJ0Z36e.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-conversation-client-open-chat.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-conversation-client-open-chat.command-BgJ0Z36e.mjs","sources":["../../../../libs/modules/conversation/client/src/lib/features/commands/open-chat.command.ts"],"sourcesContent":["import { AXConversationService } from '@acorex/components/conversation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPInAppInboxConnectorService } from '@acorex-platform/module-communication-management-client';\nimport { inject, Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { buildConversationChatInAppCorrelationPrefix } from '../chat/services/conversation-chat-notification.util';\n\n//#region ----- Types -----\n\nexport interface AXMOpenChatOptions {\n conversationId?: string;\n}\n\n//#endregion\n\n//#region ----- Command -----\n\n/** Opens an existing conversation in the chat app. */\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationOpenChatCommand implements AXPCommand<AXMOpenChatOptions, { conversationId: string }> {\n //#region ----- Services & Dependencies -----\n\n private readonly conversationService = inject(AXConversationService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly router = inject(Router);\n private readonly inboxConnector = inject(AXPInAppInboxConnectorService, { optional: true });\n\n //#endregion\n\n async execute(input: AXMOpenChatOptions | unknown): AXPCommandExecuteResultPromise<{ conversationId: string }> {\n const conversationId =\n typeof (input as AXMOpenChatOptions)?.conversationId === 'string'\n ? (input as AXMOpenChatOptions).conversationId!.trim()\n : '';\n\n if (!conversationId) {\n return { success: false, message: { text: '@conversation:chat.route.conversation-not-found' } };\n }\n\n await this.markConversationInAppNotificationRead(conversationId);\n\n await this.conversationService.selectConversation(conversationId);\n await this.router.navigate([this.applicationRouteSegment(), 'chat', conversationId]);\n return { success: true, kind: 'object', data: { conversationId } };\n }\n\n //#region ----- Private -----\n\n private async markConversationInAppNotificationRead(conversationId: string): Promise<void> {\n if (!this.inboxConnector) {\n return;\n }\n try {\n await this.inboxConnector.markReadByCorrelationIdPrefix(\n buildConversationChatInAppCorrelationPrefix(conversationId),\n );\n } catch {\n // Best-effort — navigation should still proceed.\n }\n }\n\n private applicationRouteSegment(): string {\n return this.sessionService.application?.name?.trim() || 'platform';\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AAcA;AAEA;AAEA;MAEa,8BAA8B,CAAA;AAD3C,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACnD,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QACvB,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,6BAA6B,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAyC5F,IAAA;;IArCC,MAAM,OAAO,CAAC,KAAmC,EAAA;AAC/C,QAAA,MAAM,cAAc,GAClB,OAAQ,KAA4B,EAAE,cAAc,KAAK;AACvD,cAAG,KAA4B,CAAC,cAAe,CAAC,IAAI;cAClD,EAAE;QAER,IAAI,CAAC,cAAc,EAAE;AACnB,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,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
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
|
-
import { a as AXM_CONVERSATION_ASSIST_RESPONSE_PORT } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-
|
|
3
|
+
import { a as AXM_CONVERSATION_ASSIST_RESPONSE_PORT } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-XTzQQhii.mjs';
|
|
4
4
|
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region ---- Command ----
|
|
@@ -31,4 +31,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
31
31
|
}] });
|
|
32
32
|
|
|
33
33
|
export { AXMConversationRetryAssistResponseCommand };
|
|
34
|
-
//# sourceMappingURL=acorex-platform-module-conversation-client-retry-assist-response.command-
|
|
34
|
+
//# sourceMappingURL=acorex-platform-module-conversation-client-retry-assist-response.command-lcNz4Hpu.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-conversation-client-retry-assist-response.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-conversation-client-retry-assist-response.command-lcNz4Hpu.mjs","sources":["../../../../libs/modules/conversation/client/src/lib/features/commands/retry-assist-response.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXConversationMessage } from '@acorex/components/conversation';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\n\nimport { Injectable, inject } from '@angular/core';\n\nimport { AXM_CONVERSATION_ASSIST_RESPONSE_PORT } from '../chat/services/conversation-assist-response.port';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface AXMRetryAssistResponseOptions {\n conversationId: string;\n messageId: string;\n}\n\nexport interface AXMRetryAssistResponseResult {\n message: AXConversationMessage;\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationRetryAssistResponseCommand\n implements AXPCommand<AXMRetryAssistResponseOptions, AXMRetryAssistResponseResult>\n{\n private readonly assistResponse = inject(AXM_CONVERSATION_ASSIST_RESPONSE_PORT, { optional: true });\n\n async execute(input: AXMRetryAssistResponseOptions | unknown): AXPCommandExecuteResultPromise<AXMRetryAssistResponseResult> {\n const options = input as AXMRetryAssistResponseOptions;\n if (!this.assistResponse) {\n return { success: false, message: { text: 'Assist response service is not available.' } };\n }\n\n try {\n const message = await this.assistResponse.retryAssistResponse(options.conversationId, options.messageId);\n return { success: true, kind: 'object', data: { message } };\n } catch (error: unknown) {\n console.error('[Conversation:RetryAssistResponse] Failed:', error);\n return { success: false };\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAuBA;AAEA;MAGa,yCAAyC,CAAA;AADtD,IAAA,WAAA,GAAA;QAImB,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,qCAAqC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAgBpG,IAAA;IAdC,MAAM,OAAO,CAAC,KAA8C,EAAA;QAC1D,MAAM,OAAO,GAAG,KAAsC;AACtD,QAAA,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;AACxB,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,2CAA2C,EAAE,EAAE;QAC3F;AAEA,QAAA,IAAI;AACF,YAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC;AACxG,YAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE;QAC7D;QAAE,OAAO,KAAc,EAAE;AACvB,YAAA,OAAO,CAAC,KAAK,CAAC,4CAA4C,EAAE,KAAK,CAAC;AAClE,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;IACF;8GAlBW,yCAAyC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yCAAyC,cAD5B,MAAM,EAAA,CAAA,CAAA;;2FACnB,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBADrD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
|
-
import { A as AXMConversationEntityStoreService, d as AXMConversationFocusService, e as AXMConversationInAppNotificationSyncService, f as axmMessageCountsTowardUnread } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-
|
|
3
|
+
import { A as AXMConversationEntityStoreService, d as AXMConversationFocusService, e as AXMConversationInAppNotificationSyncService, f as axmMessageCountsTowardUnread } from './acorex-platform-module-conversation-client-acorex-platform-module-conversation-client-XTzQQhii.mjs';
|
|
4
4
|
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region ---- Command ----
|
|
@@ -60,4 +60,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
60
60
|
}] });
|
|
61
61
|
|
|
62
62
|
export { AXMConversationSyncReadStateCommand };
|
|
63
|
-
//# sourceMappingURL=acorex-platform-module-conversation-client-sync-read-state.command-
|
|
63
|
+
//# sourceMappingURL=acorex-platform-module-conversation-client-sync-read-state.command-DxccFsD9.mjs.map
|