@xsmusices/ui 2.0.23 → 2.0.25
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/xsmusices-ui.mjs +48 -14
- package/fesm2022/xsmusices-ui.mjs.map +1 -1
- package/index.d.ts +11 -5
- package/package.json +1 -1
|
@@ -14348,17 +14348,39 @@ class XSChatListComponent {
|
|
|
14348
14348
|
searchQueryChange = output();
|
|
14349
14349
|
displayChatItem(chat) {
|
|
14350
14350
|
const uid = this.userId();
|
|
14351
|
-
|
|
14351
|
+
// Conversaciones sobre un elemento no-usuario (artista, site, org):
|
|
14352
|
+
// mostrar la foto del elemento, igual que la cabecera de la conversación.
|
|
14353
|
+
const isNonUserItem = !!chat.item?._id &&
|
|
14354
|
+
chat.type !== 'user' &&
|
|
14355
|
+
chat.type !== '';
|
|
14356
|
+
if (uid && chat.sender._id === uid) {
|
|
14357
|
+
if (isNonUserItem)
|
|
14358
|
+
return chat.item;
|
|
14352
14359
|
return chat.receiver;
|
|
14353
|
-
|
|
14360
|
+
}
|
|
14361
|
+
if (uid && chat.receiver._id === uid) {
|
|
14362
|
+
// El otro participante es un usuario; mostrar su foto.
|
|
14354
14363
|
return chat.sender;
|
|
14355
|
-
|
|
14364
|
+
}
|
|
14365
|
+
if (isNonUserItem)
|
|
14366
|
+
return chat.item;
|
|
14367
|
+
return chat.sender;
|
|
14356
14368
|
}
|
|
14357
14369
|
displayChatType(chat) {
|
|
14358
14370
|
const uid = this.userId();
|
|
14359
|
-
|
|
14360
|
-
|
|
14371
|
+
const isNonUserItem = !!chat.item?._id &&
|
|
14372
|
+
chat.type !== 'user' &&
|
|
14373
|
+
chat.type !== '';
|
|
14374
|
+
if (uid && chat.sender._id === uid) {
|
|
14375
|
+
if (isNonUserItem)
|
|
14376
|
+
return chat.type;
|
|
14377
|
+
return 'user';
|
|
14378
|
+
}
|
|
14379
|
+
if (uid && chat.receiver._id === uid) {
|
|
14361
14380
|
return 'user';
|
|
14381
|
+
}
|
|
14382
|
+
if (isNonUserItem)
|
|
14383
|
+
return chat.type;
|
|
14362
14384
|
return chat.type || 'user';
|
|
14363
14385
|
}
|
|
14364
14386
|
userId = input('', ...(ngDevMode ? [{ debugName: "userId" }] : []));
|
|
@@ -14643,6 +14665,9 @@ class XSChatTextareaComponent {
|
|
|
14643
14665
|
attachEnabled = input(false, ...(ngDevMode ? [{ debugName: "attachEnabled" }] : []));
|
|
14644
14666
|
uploading = input(false, ...(ngDevMode ? [{ debugName: "uploading" }] : []));
|
|
14645
14667
|
uploadProgress = input(0, ...(ngDevMode ? [{ debugName: "uploadProgress" }] : []));
|
|
14668
|
+
// Modo compacto: colapsa los botones de la izquierda (adjuntar + emoji)
|
|
14669
|
+
// en un único botón con menú desplegable (usado en el chat flotante).
|
|
14670
|
+
compact = input(false, ...(ngDevMode ? [{ debugName: "compact" }] : []));
|
|
14646
14671
|
sendMessage = output();
|
|
14647
14672
|
sendWithAttachments = output();
|
|
14648
14673
|
sendError = output();
|
|
@@ -14651,6 +14676,7 @@ class XSChatTextareaComponent {
|
|
|
14651
14676
|
fileInputEl = viewChild('fileInputEl', ...(ngDevMode ? [{ debugName: "fileInputEl" }] : []));
|
|
14652
14677
|
messageText = signal('', ...(ngDevMode ? [{ debugName: "messageText" }] : []));
|
|
14653
14678
|
showEmojiPicker = signal(false, ...(ngDevMode ? [{ debugName: "showEmojiPicker" }] : []));
|
|
14679
|
+
showLeftMenu = signal(false, ...(ngDevMode ? [{ debugName: "showLeftMenu" }] : []));
|
|
14654
14680
|
emojis = EMOJIS;
|
|
14655
14681
|
maxLength = MAX_MESSAGE_LENGTH;
|
|
14656
14682
|
attachmentAccept = CHAT_ATTACHMENT_ACCEPT;
|
|
@@ -14697,6 +14723,12 @@ class XSChatTextareaComponent {
|
|
|
14697
14723
|
toggleEmojiPicker() {
|
|
14698
14724
|
this.showEmojiPicker.update((v) => !v);
|
|
14699
14725
|
}
|
|
14726
|
+
toggleLeftMenu() {
|
|
14727
|
+
this.showLeftMenu.update((v) => !v);
|
|
14728
|
+
}
|
|
14729
|
+
closeLeftMenu() {
|
|
14730
|
+
this.showLeftMenu.set(false);
|
|
14731
|
+
}
|
|
14700
14732
|
insertEmoji(emoji) {
|
|
14701
14733
|
this.messageText.update((v) => v + emoji);
|
|
14702
14734
|
this.showEmojiPicker.set(false);
|
|
@@ -14864,12 +14896,12 @@ class XSChatTextareaComponent {
|
|
|
14864
14896
|
return BLOCKED_WORDS.some((word) => text.toLowerCase().includes(word));
|
|
14865
14897
|
}
|
|
14866
14898
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14867
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatTextareaComponent, isStandalone: true, selector: "xs-chat-textarea", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, attachEnabled: { classPropertyName: "attachEnabled", publicName: "attachEnabled", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, uploadProgress: { classPropertyName: "uploadProgress", publicName: "uploadProgress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sendMessage: "sendMessage", sendWithAttachments: "sendWithAttachments", sendError: "sendError", typing: "typing" }, host: { attributes: { "xs-chat-textarea-host": "" } }, viewQueries: [{ propertyName: "textareaEl", first: true, predicate: ["textareaEl"], descendants: true, isSignal: true }, { propertyName: "fileInputEl", first: true, predicate: ["fileInputEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col\">\n @if (showEmojiPicker()) {\n <div\n class=\"flex flex-wrap gap-1 p-2 border-t border-zinc-800 max-h-32 overflow-y-auto\"\n >\n @for (emoji of emojis; track emoji) {\n <button\n (click)=\"insertEmoji(emoji)\"\n class=\"w-8 h-8 flex items-center justify-center hover:bg-zinc-800 rounded-lg text-lg transition-colors\"\n >\n {{ emoji }}\n </button>\n }\n </div>\n }\n @if (attachEnabled() && drafts().length > 0) {\n <div class=\"flex flex-wrap gap-2 px-4 pt-2\">\n @for (draft of drafts(); track draft.name; let i = $index) {\n <div\n class=\"relative flex items-center gap-2 max-w-40 rounded-xl bg-zinc-900/70 border border-zinc-800 p-1.5\"\n >\n @if (isImageDraft(draft) && draft.previewUrl) {\n <img\n [src]=\"draft.previewUrl\"\n [alt]=\"draft.name\"\n class=\"w-10 h-10 rounded-lg object-cover shrink-0\"\n />\n }\n <div class=\"flex flex-col min-w-0\">\n <span class=\"text-xs font-medium text-white truncate\">\n {{ draft.name }}\n </span>\n <span class=\"text-[10px] text-zinc-500\">\n {{ (draft.size / 1024).toFixed(0) }} KB\n </span>\n </div>\n <button\n (click)=\"removeDraft(i)\"\n class=\"absolute -top-2 -right-2 w-5 h-5 flex items-center justify-center rounded-full bg-zinc-700 text-white text-[10px] leading-none hover:bg-zinc-600\"\n >\n \u2715\n </button>\n </div>\n }\n </div>\n }\n @if (uploading()) {\n <div class=\"px-4 pt-2\">\n <div class=\"h-1 rounded-full bg-zinc-800 overflow-hidden\">\n <div\n class=\"h-full rounded-full bg-white transition-all\"\n [style.width.%]=\"uploadProgress()\"\n ></div>\n </div>\n </div>\n }\n <div\n class=\"flex items-end gap-1 px-3 py-2 border-t border-zinc-800\"\n >\n @if (
|
|
14899
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatTextareaComponent, isStandalone: true, selector: "xs-chat-textarea", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, attachEnabled: { classPropertyName: "attachEnabled", publicName: "attachEnabled", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, uploadProgress: { classPropertyName: "uploadProgress", publicName: "uploadProgress", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sendMessage: "sendMessage", sendWithAttachments: "sendWithAttachments", sendError: "sendError", typing: "typing" }, host: { attributes: { "xs-chat-textarea-host": "" } }, viewQueries: [{ propertyName: "textareaEl", first: true, predicate: ["textareaEl"], descendants: true, isSignal: true }, { propertyName: "fileInputEl", first: true, predicate: ["fileInputEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col\">\n @if (showEmojiPicker()) {\n <div\n class=\"flex flex-wrap gap-1 p-2 border-t border-zinc-800 max-h-32 overflow-y-auto\"\n >\n @for (emoji of emojis; track emoji) {\n <button\n (click)=\"insertEmoji(emoji)\"\n class=\"w-8 h-8 flex items-center justify-center hover:bg-zinc-800 rounded-lg text-lg transition-colors\"\n >\n {{ emoji }}\n </button>\n }\n </div>\n }\n @if (attachEnabled() && drafts().length > 0) {\n <div class=\"flex flex-wrap gap-2 px-4 pt-2\">\n @for (draft of drafts(); track draft.name; let i = $index) {\n <div\n class=\"relative flex items-center gap-2 max-w-40 rounded-xl bg-zinc-900/70 border border-zinc-800 p-1.5\"\n >\n @if (isImageDraft(draft) && draft.previewUrl) {\n <img\n [src]=\"draft.previewUrl\"\n [alt]=\"draft.name\"\n class=\"w-10 h-10 rounded-lg object-cover shrink-0\"\n />\n }\n <div class=\"flex flex-col min-w-0\">\n <span class=\"text-xs font-medium text-white truncate\">\n {{ draft.name }}\n </span>\n <span class=\"text-[10px] text-zinc-500\">\n {{ (draft.size / 1024).toFixed(0) }} KB\n </span>\n </div>\n <button\n (click)=\"removeDraft(i)\"\n class=\"absolute -top-2 -right-2 w-5 h-5 flex items-center justify-center rounded-full bg-zinc-700 text-white text-[10px] leading-none hover:bg-zinc-600\"\n >\n \u2715\n </button>\n </div>\n }\n </div>\n }\n @if (uploading()) {\n <div class=\"px-4 pt-2\">\n <div class=\"h-1 rounded-full bg-zinc-800 overflow-hidden\">\n <div\n class=\"h-full rounded-full bg-white transition-all\"\n [style.width.%]=\"uploadProgress()\"\n ></div>\n </div>\n </div>\n }\n <div\n class=\"flex items-end gap-1 px-3 py-2 border-t border-zinc-800\"\n >\n @if (compact()) {\n <div class=\"relative\">\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"plus\"\n (click)=\"toggleLeftMenu()\"\n ></xs-button>\n @if (showLeftMenu()) {\n <div\n class=\"absolute bottom-full left-0 mb-1 flex flex-col gap-1 p-1.5 bg-zinc-900 border border-zinc-800 rounded-xl shadow-xl z-50\"\n >\n @if (attachEnabled()) {\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paperclip\"\n [disabled]=\"disabled() || uploading()\"\n (click)=\"openFilePicker(); closeLeftMenu()\"\n ></xs-button>\n <input\n #fileInputEl\n type=\"file\"\n class=\"hidden\"\n [accept]=\"attachmentAccept\"\n multiple\n (change)=\"onFilesSelected($event)\"\n />\n }\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"face-smile\"\n (click)=\"toggleEmojiPicker(); closeLeftMenu()\"\n ></xs-button>\n </div>\n }\n </div>\n } @else {\n @if (attachEnabled()) {\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paperclip\"\n [disabled]=\"disabled() || uploading()\"\n (click)=\"openFilePicker()\"\n ></xs-button>\n <input\n #fileInputEl\n type=\"file\"\n class=\"hidden\"\n [accept]=\"attachmentAccept\"\n multiple\n (change)=\"onFilesSelected($event)\"\n />\n }\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"face-smile\"\n (click)=\"toggleEmojiPicker()\"\n ></xs-button>\n }\n <div class=\"flex-1 relative min-w-0\">\n <textarea\n #textareaEl\n [(ngModel)]=\"messageText\"\n (ngModelChange)=\"onTextChange()\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"autoResize()\"\n [placeholder]=\"placeholderText\"\n [maxLength]=\"maxLength\"\n class=\"block w-full px-3 py-2.5 pr-12 text-sm font-medium text-white bg-zinc-900/50 border-0 focus:ring-0 focus:outline-none placeholder:text-zinc-500 resize-none overflow-hidden rounded-xl\"\n rows=\"1\"\n [disabled]=\"disabled()\"\n ></textarea>\n\n </div>\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paper-plane\"\n [disabled]=\"!canSend() || disabled()\"\n (click)=\"send()\"\n ></xs-button>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: XSButtonComponent, selector: "xs-button", inputs: ["id", "label", "type", "icon", "action", "customClass", "variant", "layout", "badgeCount", "isFull", "disabled", "loading", "title", "ariaLabel", "borderRadius", "isGrouped", "groupPosition"], outputs: ["isGroupedChange", "groupPositionChange", "click", "onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14868
14900
|
}
|
|
14869
14901
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatTextareaComponent, decorators: [{
|
|
14870
14902
|
type: Component,
|
|
14871
|
-
args: [{ selector: 'xs-chat-textarea', standalone: true, imports: [CommonModule, FormsModule, XSButtonComponent], host: { 'xs-chat-textarea-host': '' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col\">\n @if (showEmojiPicker()) {\n <div\n class=\"flex flex-wrap gap-1 p-2 border-t border-zinc-800 max-h-32 overflow-y-auto\"\n >\n @for (emoji of emojis; track emoji) {\n <button\n (click)=\"insertEmoji(emoji)\"\n class=\"w-8 h-8 flex items-center justify-center hover:bg-zinc-800 rounded-lg text-lg transition-colors\"\n >\n {{ emoji }}\n </button>\n }\n </div>\n }\n @if (attachEnabled() && drafts().length > 0) {\n <div class=\"flex flex-wrap gap-2 px-4 pt-2\">\n @for (draft of drafts(); track draft.name; let i = $index) {\n <div\n class=\"relative flex items-center gap-2 max-w-40 rounded-xl bg-zinc-900/70 border border-zinc-800 p-1.5\"\n >\n @if (isImageDraft(draft) && draft.previewUrl) {\n <img\n [src]=\"draft.previewUrl\"\n [alt]=\"draft.name\"\n class=\"w-10 h-10 rounded-lg object-cover shrink-0\"\n />\n }\n <div class=\"flex flex-col min-w-0\">\n <span class=\"text-xs font-medium text-white truncate\">\n {{ draft.name }}\n </span>\n <span class=\"text-[10px] text-zinc-500\">\n {{ (draft.size / 1024).toFixed(0) }} KB\n </span>\n </div>\n <button\n (click)=\"removeDraft(i)\"\n class=\"absolute -top-2 -right-2 w-5 h-5 flex items-center justify-center rounded-full bg-zinc-700 text-white text-[10px] leading-none hover:bg-zinc-600\"\n >\n \u2715\n </button>\n </div>\n }\n </div>\n }\n @if (uploading()) {\n <div class=\"px-4 pt-2\">\n <div class=\"h-1 rounded-full bg-zinc-800 overflow-hidden\">\n <div\n class=\"h-full rounded-full bg-white transition-all\"\n [style.width.%]=\"uploadProgress()\"\n ></div>\n </div>\n </div>\n }\n <div\n class=\"flex items-end gap-1 px-3 py-2 border-t border-zinc-800\"\n >\n @if (
|
|
14872
|
-
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], attachEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachEnabled", required: false }] }], uploading: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploading", required: false }] }], uploadProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadProgress", required: false }] }], sendMessage: [{ type: i0.Output, args: ["sendMessage"] }], sendWithAttachments: [{ type: i0.Output, args: ["sendWithAttachments"] }], sendError: [{ type: i0.Output, args: ["sendError"] }], typing: [{ type: i0.Output, args: ["typing"] }], textareaEl: [{ type: i0.ViewChild, args: ['textareaEl', { isSignal: true }] }], fileInputEl: [{ type: i0.ViewChild, args: ['fileInputEl', { isSignal: true }] }] } });
|
|
14903
|
+
args: [{ selector: 'xs-chat-textarea', standalone: true, imports: [CommonModule, FormsModule, XSButtonComponent], host: { 'xs-chat-textarea-host': '' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col\">\n @if (showEmojiPicker()) {\n <div\n class=\"flex flex-wrap gap-1 p-2 border-t border-zinc-800 max-h-32 overflow-y-auto\"\n >\n @for (emoji of emojis; track emoji) {\n <button\n (click)=\"insertEmoji(emoji)\"\n class=\"w-8 h-8 flex items-center justify-center hover:bg-zinc-800 rounded-lg text-lg transition-colors\"\n >\n {{ emoji }}\n </button>\n }\n </div>\n }\n @if (attachEnabled() && drafts().length > 0) {\n <div class=\"flex flex-wrap gap-2 px-4 pt-2\">\n @for (draft of drafts(); track draft.name; let i = $index) {\n <div\n class=\"relative flex items-center gap-2 max-w-40 rounded-xl bg-zinc-900/70 border border-zinc-800 p-1.5\"\n >\n @if (isImageDraft(draft) && draft.previewUrl) {\n <img\n [src]=\"draft.previewUrl\"\n [alt]=\"draft.name\"\n class=\"w-10 h-10 rounded-lg object-cover shrink-0\"\n />\n }\n <div class=\"flex flex-col min-w-0\">\n <span class=\"text-xs font-medium text-white truncate\">\n {{ draft.name }}\n </span>\n <span class=\"text-[10px] text-zinc-500\">\n {{ (draft.size / 1024).toFixed(0) }} KB\n </span>\n </div>\n <button\n (click)=\"removeDraft(i)\"\n class=\"absolute -top-2 -right-2 w-5 h-5 flex items-center justify-center rounded-full bg-zinc-700 text-white text-[10px] leading-none hover:bg-zinc-600\"\n >\n \u2715\n </button>\n </div>\n }\n </div>\n }\n @if (uploading()) {\n <div class=\"px-4 pt-2\">\n <div class=\"h-1 rounded-full bg-zinc-800 overflow-hidden\">\n <div\n class=\"h-full rounded-full bg-white transition-all\"\n [style.width.%]=\"uploadProgress()\"\n ></div>\n </div>\n </div>\n }\n <div\n class=\"flex items-end gap-1 px-3 py-2 border-t border-zinc-800\"\n >\n @if (compact()) {\n <div class=\"relative\">\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"plus\"\n (click)=\"toggleLeftMenu()\"\n ></xs-button>\n @if (showLeftMenu()) {\n <div\n class=\"absolute bottom-full left-0 mb-1 flex flex-col gap-1 p-1.5 bg-zinc-900 border border-zinc-800 rounded-xl shadow-xl z-50\"\n >\n @if (attachEnabled()) {\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paperclip\"\n [disabled]=\"disabled() || uploading()\"\n (click)=\"openFilePicker(); closeLeftMenu()\"\n ></xs-button>\n <input\n #fileInputEl\n type=\"file\"\n class=\"hidden\"\n [accept]=\"attachmentAccept\"\n multiple\n (change)=\"onFilesSelected($event)\"\n />\n }\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"face-smile\"\n (click)=\"toggleEmojiPicker(); closeLeftMenu()\"\n ></xs-button>\n </div>\n }\n </div>\n } @else {\n @if (attachEnabled()) {\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paperclip\"\n [disabled]=\"disabled() || uploading()\"\n (click)=\"openFilePicker()\"\n ></xs-button>\n <input\n #fileInputEl\n type=\"file\"\n class=\"hidden\"\n [accept]=\"attachmentAccept\"\n multiple\n (change)=\"onFilesSelected($event)\"\n />\n }\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"face-smile\"\n (click)=\"toggleEmojiPicker()\"\n ></xs-button>\n }\n <div class=\"flex-1 relative min-w-0\">\n <textarea\n #textareaEl\n [(ngModel)]=\"messageText\"\n (ngModelChange)=\"onTextChange()\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"autoResize()\"\n [placeholder]=\"placeholderText\"\n [maxLength]=\"maxLength\"\n class=\"block w-full px-3 py-2.5 pr-12 text-sm font-medium text-white bg-zinc-900/50 border-0 focus:ring-0 focus:outline-none placeholder:text-zinc-500 resize-none overflow-hidden rounded-xl\"\n rows=\"1\"\n [disabled]=\"disabled()\"\n ></textarea>\n\n </div>\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paper-plane\"\n [disabled]=\"!canSend() || disabled()\"\n (click)=\"send()\"\n ></xs-button>\n </div>\n</div>\n" }]
|
|
14904
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], attachEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachEnabled", required: false }] }], uploading: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploading", required: false }] }], uploadProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadProgress", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], sendMessage: [{ type: i0.Output, args: ["sendMessage"] }], sendWithAttachments: [{ type: i0.Output, args: ["sendWithAttachments"] }], sendError: [{ type: i0.Output, args: ["sendError"] }], typing: [{ type: i0.Output, args: ["typing"] }], textareaEl: [{ type: i0.ViewChild, args: ['textareaEl', { isSignal: true }] }], fileInputEl: [{ type: i0.ViewChild, args: ['fileInputEl', { isSignal: true }] }] } });
|
|
14873
14905
|
|
|
14874
14906
|
class XSChatConversationInfoComponent {
|
|
14875
14907
|
xsTranslate = inject(XSTranslateService);
|
|
@@ -15013,6 +15045,7 @@ class XSChatConversationComponent {
|
|
|
15013
15045
|
yesterdayLabel = input('', ...(ngDevMode ? [{ debugName: "yesterdayLabel" }] : []));
|
|
15014
15046
|
// XS-483: adjuntos (desactivado por defecto para no afectar a otros consumidores).
|
|
15015
15047
|
attachEnabled = input(false, ...(ngDevMode ? [{ debugName: "attachEnabled" }] : []));
|
|
15048
|
+
compact = input(false, ...(ngDevMode ? [{ debugName: "compact" }] : []));
|
|
15016
15049
|
uploading = input(false, ...(ngDevMode ? [{ debugName: "uploading" }] : []));
|
|
15017
15050
|
uploadProgress = input(0, ...(ngDevMode ? [{ debugName: "uploadProgress" }] : []));
|
|
15018
15051
|
_typingLabel = computed(() => this.typingLabel() || this.t('TYPING'), ...(ngDevMode ? [{ debugName: "_typingLabel" }] : []));
|
|
@@ -15205,7 +15238,7 @@ class XSChatConversationComponent {
|
|
|
15205
15238
|
}
|
|
15206
15239
|
}
|
|
15207
15240
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatConversationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15208
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatConversationComponent, isStandalone: true, selector: "xs-chat-conversation", inputs: { messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, currentChatInfo: { classPropertyName: "currentChatInfo", publicName: "currentChatInfo", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, typingUserId: { classPropertyName: "typingUserId", publicName: "typingUserId", isSignal: true, isRequired: false, transformFunction: null }, typingLabel: { classPropertyName: "typingLabel", publicName: "typingLabel", isSignal: true, isRequired: false, transformFunction: null }, onlineLabel: { classPropertyName: "onlineLabel", publicName: "onlineLabel", isSignal: true, isRequired: false, transformFunction: null }, offlineLabel: { classPropertyName: "offlineLabel", publicName: "offlineLabel", isSignal: true, isRequired: false, transformFunction: null }, roleLabel: { classPropertyName: "roleLabel", publicName: "roleLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyMessagesLabel: { classPropertyName: "emptyMessagesLabel", publicName: "emptyMessagesLabel", isSignal: true, isRequired: false, transformFunction: null }, textareaPlaceholder: { classPropertyName: "textareaPlaceholder", publicName: "textareaPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, yesterdayLabel: { classPropertyName: "yesterdayLabel", publicName: "yesterdayLabel", isSignal: true, isRequired: false, transformFunction: null }, attachEnabled: { classPropertyName: "attachEnabled", publicName: "attachEnabled", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, uploadProgress: { classPropertyName: "uploadProgress", publicName: "uploadProgress", isSignal: true, isRequired: false, transformFunction: null }, infoButtons: { classPropertyName: "infoButtons", publicName: "infoButtons", isSignal: true, isRequired: false, transformFunction: null }, alertType: { classPropertyName: "alertType", publicName: "alertType", isSignal: true, isRequired: false, transformFunction: null }, alertMessage: { classPropertyName: "alertMessage", publicName: "alertMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sendError: "sendError", typing: "typing", sendMessage: "sendMessage", goToList: "goToList", loadMoreMessages: "loadMoreMessages", clickInfoButton: "clickInfoButton", retryMessage: "retryMessage", replyToMessage: "replyToMessage" }, host: { attributes: { "xs-chat-conversation-host": "" }, classAttribute: "flex flex-col min-h-0 flex-1" }, viewQueries: [{ propertyName: "messagesContainer", first: true, predicate: ["messagesContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #messagesContainer\n class=\"flex flex-col flex-1 min-h-[300px] overflow-y-auto\"\n (scroll)=\"onScroll()\"\n >\n <xs-chat-conversation-info\n class=\"sticky top-0 z-10 bg-zinc-900\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingLabel()\"\n [onlineLabel]=\"onlineLabel()\"\n [offlineLabel]=\"offlineLabel()\"\n [roleLabel]=\"roleLabel()\"\n [buttons]=\"infoButtons()\"\n (goToList)=\"goToList.emit()\"\n (clickButton)=\"clickInfoButton.emit($event)\"\n />\n\n @if (alertType(); as type) {\n <xs-chat-alert\n [type]=\"type\"\n [message]=\"alertMessage()\"\n />\n }\n\n <div class=\"flex-1 flex flex-col px-4 py-3\">\n @for (msg of messages(); track msg._id; let i = $index) {\n @if (showDateSeparator(i)) {\n <div class=\"flex justify-center py-2\">\n <span\n class=\"text-[10px] text-zinc-600 bg-zinc-900 px-3 py-1 rounded-full\"\n >\n {{ formatDateSeparator(msg.created) }}\n </span>\n </div>\n }\n <div\n class=\"flex group px-4 items-end gap-2\"\n [class.justify-end]=\"isMine(msg)\"\n [class.justify-start]=\"!isMine(msg)\"\n [class.mt-2]=\"i > 0 && isSameSender(i)\"\n [class.mt-3]=\"i > 0 && !isSameSender(i)\"\n >\n @if (!isMine(msg) && !isSameSender(i)) {\n <xs-image\n [item]=\"otherUser(msg)!\"\n [typeItem]=\"otherUserType(msg)\"\n imageType=\"small\"\n [alt]=\"otherUser(msg)?.name ?? ''\"\n customClass=\"w-7 h-7 rounded-full overflow-hidden shrink-0 mt-1\"\n [objectFit]=\"'cover'\"\n />\n } @else {\n <div class=\"w-7 shrink-0\"></div>\n }\n <div\n class=\"max-w-[80%] text-sm relative\"\n [class.rounded-2xl]=\"!isSameSender(i)\"\n [class.rounded-md]=\"i > 0 && isSameSender(i)\"\n [class.bg-zinc-500]=\"!isMine(msg)\"\n [class.bg-zinc-900]=\"isMine(msg)\"\n [class.px-3]=\"true\"\n [class.py-2]=\"!isSameSender(i)\"\n [class.py-1]=\"i > 0 && isSameSender(i)\"\n [class.rounded-br-md]=\"\n isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-bl-md]=\"\n !isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-tr-md]=\"\n isMine(msg) && isSameSender(i)\n \"\n [class.rounded-tl-md]=\"\n !isMine(msg) && isSameSender(i)\n \"\n >\n @if (msg.replyTo) {\n <div\n class=\"mb-1.5 pl-2 border-l-2 border-zinc-500 text-[11px] text-zinc-400 leading-tight\"\n >\n <span class=\"font-semibold text-zinc-300\">{{\n msg.replyTo.sender === userId()\n ? t('YOU')\n : msg.replyTo.sender\n }}</span>\n <p class=\"truncate\">{{ msg.replyTo.text }}</p>\n </div>\n }\n @if (hasLink(msg.text); as link) {\n <a\n [href]=\"link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"block mb-1.5 p-2 rounded-lg bg-black/20 border border-zinc-700/50 hover:border-zinc-500 transition-colors\"\n >\n <span\n class=\"text-[11px] text-zinc-400 truncate block\"\n >{{ link }}</span\n >\n <span class=\"text-[10px] text-zinc-500\"\n >{{ t('OPEN_LINK') }}</span\n >\n </a>\n }\n <p\n class=\"text-white break-words whitespace-pre-wrap\"\n >\n {{ msg.text }}\n </p>\n @if (\n msg.attachments && msg.attachments.length > 0\n ) {\n <div class=\"flex flex-wrap gap-1.5 mt-1.5\">\n @for (att of msg.attachments; track att.url) {\n @if (att.type.startsWith('image/')) {\n <xs-image\n [item]=\"{ _id: att.url, image: true }\"\n [typeItem]=\"'media'\"\n imageType=\"normal\"\n [objectFit]=\"'cover'\"\n customClass=\"rounded-lg w-full max-h-48 object-cover\"\n />\n }\n }\n </div>\n }\n <div\n class=\"flex items-center justify-end gap-1 mt-1\"\n >\n <span class=\"text-[10px]\" [class.text-zinc-400]=\"!isMine(msg)\" [class.text-zinc-500]=\"isMine(msg)\">{{\n formatTime(msg.created)\n }}</span>\n @if (isMine(msg)) {\n @if (msg.isFailed) {\n <button\n (click)=\"onRetry(msg)\"\n class=\"text-red-400 hover:text-red-300 text-[10px] flex items-center gap-0.5\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"\n />\n </svg>\n {{ t('RETRY') }}\n </button>\n } @else if (msg.isTemp) {\n <span\n class=\"text-[10px] text-zinc-500 animate-pulse\"\n >{{ t('SENDING') }}</span\n >\n } @else {\n <span\n class=\"text-[10px]\"\n [class.text-zinc-400]=\"msg.isRead\"\n [class.text-zinc-500]=\"!msg.isRead\"\n >\n {{ msg.isRead ? '\u2713\u2713' : '\u2713' }}\n </span>\n }\n }\n <button\n (click)=\"onReply(msg)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n [title]=\"t('REPLY')\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z\"\n />\n </svg>\n </button>\n <button\n (click)=\"copyMessage(msg.text)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"\n />\n </svg>\n </button>\n </div>\n </div>\n </div>\n } @empty {\n <div\n class=\"flex-1 flex items-center justify-center text-zinc-500 text-sm\"\n >\n {{ _emptyMessagesLabel() }}\n </div>\n }\n\n @if (typingUserId() && typingUserId() !== userId()) {\n <div class=\"flex justify-start px-4 pt-2\">\n <div\n class=\"flex items-center gap-2 px-4 py-3 rounded-2xl rounded-bl-md bg-zinc-800\"\n >\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.15s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.3s]\"\n ></span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"shrink-0\">\n @if (replyToMsg(); as replyMsg) {\n <div\n class=\"bg-zinc-900 border-t border-zinc-800\"\n >\n <div class=\"flex items-center gap-2 px-4 py-2\">\n <div class=\"flex-1 min-w-0\">\n <span\n class=\"text-[11px] font-semibold text-zinc-400\"\n >{{ t('REPLYING_TO') }}\n {{\n replyMsg.sender === userId() ? t('YOURSELF') : ''\n }}</span\n >\n <p class=\"text-xs text-zinc-400 truncate\">\n {{ replyMsg.text }}\n </p>\n </div>\n <button\n (click)=\"cancelReply()\"\n class=\"text-zinc-500 hover:text-white shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n </div>\n }\n\n <xs-chat-textarea\n [placeholder]=\"\n replyToMsg()\n ? t('REPLY_PLACEHOLDER')\n : _textareaPlaceholder()\n \"\n [disabled]=\"disabled()\"\n [attachEnabled]=\"attachEnabled()\"\n [uploading]=\"uploading()\"\n [uploadProgress]=\"uploadProgress()\"\n (sendMessage)=\"onSendMessage($event)\"\n (sendWithAttachments)=\"onSendWithAttachments($event)\"\n (typing)=\"typing.emit()\"\n (sendError)=\"sendError.emit($event)\"\n />\n </div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSChatTextareaComponent, selector: "xs-chat-textarea", inputs: ["placeholder", "disabled", "attachEnabled", "uploading", "uploadProgress"], outputs: ["sendMessage", "sendWithAttachments", "sendError", "typing"] }, { kind: "component", type: XSChatConversationInfoComponent, selector: "xs-chat-conversation-info", inputs: ["currentChatInfo", "userId", "typingUserId", "typingLabel", "onlineLabel", "offlineLabel", "roleLabel", "buttons"], outputs: ["goToList", "clickButton"] }, { kind: "component", type: XSChatAlertComponent, selector: "xs-chat-alert", inputs: ["type", "message"] }, { kind: "component", type: XSImageComponent, selector: "xs-image", inputs: ["config", "viewTransitionName", "src", "alt", "width", "height", "size", "rounded", "objectFit", "clickable", "item", "typeItem", "imageType", "fallbackSrc", "loading", "priority", "customClass", "generateAvatar"], outputs: ["onClick", "onLoad", "onError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15241
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatConversationComponent, isStandalone: true, selector: "xs-chat-conversation", inputs: { messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, currentChatInfo: { classPropertyName: "currentChatInfo", publicName: "currentChatInfo", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, typingUserId: { classPropertyName: "typingUserId", publicName: "typingUserId", isSignal: true, isRequired: false, transformFunction: null }, typingLabel: { classPropertyName: "typingLabel", publicName: "typingLabel", isSignal: true, isRequired: false, transformFunction: null }, onlineLabel: { classPropertyName: "onlineLabel", publicName: "onlineLabel", isSignal: true, isRequired: false, transformFunction: null }, offlineLabel: { classPropertyName: "offlineLabel", publicName: "offlineLabel", isSignal: true, isRequired: false, transformFunction: null }, roleLabel: { classPropertyName: "roleLabel", publicName: "roleLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyMessagesLabel: { classPropertyName: "emptyMessagesLabel", publicName: "emptyMessagesLabel", isSignal: true, isRequired: false, transformFunction: null }, textareaPlaceholder: { classPropertyName: "textareaPlaceholder", publicName: "textareaPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, yesterdayLabel: { classPropertyName: "yesterdayLabel", publicName: "yesterdayLabel", isSignal: true, isRequired: false, transformFunction: null }, attachEnabled: { classPropertyName: "attachEnabled", publicName: "attachEnabled", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, uploadProgress: { classPropertyName: "uploadProgress", publicName: "uploadProgress", isSignal: true, isRequired: false, transformFunction: null }, infoButtons: { classPropertyName: "infoButtons", publicName: "infoButtons", isSignal: true, isRequired: false, transformFunction: null }, alertType: { classPropertyName: "alertType", publicName: "alertType", isSignal: true, isRequired: false, transformFunction: null }, alertMessage: { classPropertyName: "alertMessage", publicName: "alertMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sendError: "sendError", typing: "typing", sendMessage: "sendMessage", goToList: "goToList", loadMoreMessages: "loadMoreMessages", clickInfoButton: "clickInfoButton", retryMessage: "retryMessage", replyToMessage: "replyToMessage" }, host: { attributes: { "xs-chat-conversation-host": "" }, classAttribute: "flex flex-col min-h-0 flex-1" }, viewQueries: [{ propertyName: "messagesContainer", first: true, predicate: ["messagesContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #messagesContainer\n class=\"flex flex-col flex-1 min-h-[300px] overflow-y-auto\"\n (scroll)=\"onScroll()\"\n >\n <xs-chat-conversation-info\n class=\"sticky top-0 z-10 bg-zinc-900\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingLabel()\"\n [onlineLabel]=\"onlineLabel()\"\n [offlineLabel]=\"offlineLabel()\"\n [roleLabel]=\"roleLabel()\"\n [buttons]=\"infoButtons()\"\n (goToList)=\"goToList.emit()\"\n (clickButton)=\"clickInfoButton.emit($event)\"\n />\n\n @if (alertType(); as type) {\n <xs-chat-alert\n [type]=\"type\"\n [message]=\"alertMessage()\"\n />\n }\n\n <div class=\"flex-1 flex flex-col px-4 py-3\">\n @for (msg of messages(); track msg._id; let i = $index) {\n @if (showDateSeparator(i)) {\n <div class=\"flex justify-center py-2\">\n <span\n class=\"text-[10px] text-zinc-600 bg-zinc-900 px-3 py-1 rounded-full\"\n >\n {{ formatDateSeparator(msg.created) }}\n </span>\n </div>\n }\n <div\n class=\"flex group px-4 items-end gap-2\"\n [class.justify-end]=\"isMine(msg)\"\n [class.justify-start]=\"!isMine(msg)\"\n [class.mt-2]=\"i > 0 && isSameSender(i)\"\n [class.mt-3]=\"i > 0 && !isSameSender(i)\"\n >\n @if (!isMine(msg) && !isSameSender(i)) {\n <xs-image\n [item]=\"otherUser(msg)!\"\n [typeItem]=\"otherUserType(msg)\"\n imageType=\"small\"\n [alt]=\"otherUser(msg)?.name ?? ''\"\n customClass=\"w-7 h-7 rounded-full overflow-hidden shrink-0 mt-1\"\n [objectFit]=\"'cover'\"\n />\n } @else {\n <div class=\"w-7 shrink-0\"></div>\n }\n <div\n class=\"max-w-[80%] text-sm relative\"\n [class.rounded-2xl]=\"!isSameSender(i)\"\n [class.rounded-md]=\"i > 0 && isSameSender(i)\"\n [class.bg-zinc-500]=\"!isMine(msg)\"\n [class.bg-zinc-900]=\"isMine(msg)\"\n [class.px-3]=\"true\"\n [class.py-2]=\"!isSameSender(i)\"\n [class.py-1]=\"i > 0 && isSameSender(i)\"\n [class.rounded-br-md]=\"\n isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-bl-md]=\"\n !isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-tr-md]=\"\n isMine(msg) && isSameSender(i)\n \"\n [class.rounded-tl-md]=\"\n !isMine(msg) && isSameSender(i)\n \"\n >\n @if (msg.replyTo) {\n <div\n class=\"mb-1.5 pl-2 border-l-2 border-zinc-500 text-[11px] text-zinc-400 leading-tight\"\n >\n <span class=\"font-semibold text-zinc-300\">{{\n msg.replyTo.sender === userId()\n ? t('YOU')\n : msg.replyTo.sender\n }}</span>\n <p class=\"truncate\">{{ msg.replyTo.text }}</p>\n </div>\n }\n @if (hasLink(msg.text); as link) {\n <a\n [href]=\"link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"block mb-1.5 p-2 rounded-lg bg-black/20 border border-zinc-700/50 hover:border-zinc-500 transition-colors\"\n >\n <span\n class=\"text-[11px] text-zinc-400 truncate block\"\n >{{ link }}</span\n >\n <span class=\"text-[10px] text-zinc-500\"\n >{{ t('OPEN_LINK') }}</span\n >\n </a>\n }\n <p\n class=\"text-white break-words whitespace-pre-wrap\"\n >\n {{ msg.text }}\n </p>\n @if (\n msg.attachments && msg.attachments.length > 0\n ) {\n <div class=\"flex flex-wrap gap-1.5 mt-1.5\">\n @for (att of msg.attachments; track att.url) {\n @if (att.type.startsWith('image/')) {\n <xs-image\n [item]=\"{ _id: att.url, image: true }\"\n [typeItem]=\"'media'\"\n imageType=\"normal\"\n [objectFit]=\"'cover'\"\n customClass=\"rounded-lg w-full max-h-48 object-cover\"\n />\n }\n }\n </div>\n }\n <div\n class=\"flex items-center justify-end gap-1 mt-1\"\n >\n <span class=\"text-[10px]\" [class.text-zinc-400]=\"!isMine(msg)\" [class.text-zinc-500]=\"isMine(msg)\">{{\n formatTime(msg.created)\n }}</span>\n @if (isMine(msg)) {\n @if (msg.isFailed) {\n <button\n (click)=\"onRetry(msg)\"\n class=\"text-red-400 hover:text-red-300 text-[10px] flex items-center gap-0.5\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"\n />\n </svg>\n {{ t('RETRY') }}\n </button>\n } @else if (msg.isTemp) {\n <span\n class=\"text-[10px] text-zinc-500 animate-pulse\"\n >{{ t('SENDING') }}</span\n >\n } @else {\n <span\n class=\"text-[10px]\"\n [class.text-zinc-400]=\"msg.isRead\"\n [class.text-zinc-500]=\"!msg.isRead\"\n >\n {{ msg.isRead ? '\u2713\u2713' : '\u2713' }}\n </span>\n }\n }\n <button\n (click)=\"onReply(msg)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n [title]=\"t('REPLY')\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z\"\n />\n </svg>\n </button>\n <button\n (click)=\"copyMessage(msg.text)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"\n />\n </svg>\n </button>\n </div>\n </div>\n </div>\n } @empty {\n <div\n class=\"flex-1 flex items-center justify-center text-zinc-500 text-sm\"\n >\n {{ _emptyMessagesLabel() }}\n </div>\n }\n\n @if (typingUserId() && typingUserId() !== userId()) {\n <div class=\"flex justify-start px-4 pt-2\">\n <div\n class=\"flex items-center gap-2 px-4 py-3 rounded-2xl rounded-bl-md bg-zinc-800\"\n >\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.15s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.3s]\"\n ></span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"shrink-0\">\n @if (replyToMsg(); as replyMsg) {\n <div\n class=\"bg-zinc-900 border-t border-zinc-800\"\n >\n <div class=\"flex items-center gap-2 px-4 py-2\">\n <div class=\"flex-1 min-w-0\">\n <span\n class=\"text-[11px] font-semibold text-zinc-400\"\n >{{ t('REPLYING_TO') }}\n {{\n replyMsg.sender === userId() ? t('YOURSELF') : ''\n }}</span\n >\n <p class=\"text-xs text-zinc-400 truncate\">\n {{ replyMsg.text }}\n </p>\n </div>\n <button\n (click)=\"cancelReply()\"\n class=\"text-zinc-500 hover:text-white shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n </div>\n }\n\n <xs-chat-textarea\n [placeholder]=\"\n replyToMsg()\n ? t('REPLY_PLACEHOLDER')\n : _textareaPlaceholder()\n \"\n [disabled]=\"disabled()\"\n [attachEnabled]=\"attachEnabled()\"\n [compact]=\"compact()\"\n [uploading]=\"uploading()\"\n [uploadProgress]=\"uploadProgress()\"\n (sendMessage)=\"onSendMessage($event)\"\n (sendWithAttachments)=\"onSendWithAttachments($event)\"\n (typing)=\"typing.emit()\"\n (sendError)=\"sendError.emit($event)\"\n />\n </div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSChatTextareaComponent, selector: "xs-chat-textarea", inputs: ["placeholder", "disabled", "attachEnabled", "uploading", "uploadProgress", "compact"], outputs: ["sendMessage", "sendWithAttachments", "sendError", "typing"] }, { kind: "component", type: XSChatConversationInfoComponent, selector: "xs-chat-conversation-info", inputs: ["currentChatInfo", "userId", "typingUserId", "typingLabel", "onlineLabel", "offlineLabel", "roleLabel", "buttons"], outputs: ["goToList", "clickButton"] }, { kind: "component", type: XSChatAlertComponent, selector: "xs-chat-alert", inputs: ["type", "message"] }, { kind: "component", type: XSImageComponent, selector: "xs-image", inputs: ["config", "viewTransitionName", "src", "alt", "width", "height", "size", "rounded", "objectFit", "clickable", "item", "typeItem", "imageType", "fallbackSrc", "loading", "priority", "customClass", "generateAvatar"], outputs: ["onClick", "onLoad", "onError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15209
15242
|
}
|
|
15210
15243
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatConversationComponent, decorators: [{
|
|
15211
15244
|
type: Component,
|
|
@@ -15218,8 +15251,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
15218
15251
|
], host: {
|
|
15219
15252
|
'xs-chat-conversation-host': '',
|
|
15220
15253
|
class: 'flex flex-col min-h-0 flex-1',
|
|
15221
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n #messagesContainer\n class=\"flex flex-col flex-1 min-h-[300px] overflow-y-auto\"\n (scroll)=\"onScroll()\"\n >\n <xs-chat-conversation-info\n class=\"sticky top-0 z-10 bg-zinc-900\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingLabel()\"\n [onlineLabel]=\"onlineLabel()\"\n [offlineLabel]=\"offlineLabel()\"\n [roleLabel]=\"roleLabel()\"\n [buttons]=\"infoButtons()\"\n (goToList)=\"goToList.emit()\"\n (clickButton)=\"clickInfoButton.emit($event)\"\n />\n\n @if (alertType(); as type) {\n <xs-chat-alert\n [type]=\"type\"\n [message]=\"alertMessage()\"\n />\n }\n\n <div class=\"flex-1 flex flex-col px-4 py-3\">\n @for (msg of messages(); track msg._id; let i = $index) {\n @if (showDateSeparator(i)) {\n <div class=\"flex justify-center py-2\">\n <span\n class=\"text-[10px] text-zinc-600 bg-zinc-900 px-3 py-1 rounded-full\"\n >\n {{ formatDateSeparator(msg.created) }}\n </span>\n </div>\n }\n <div\n class=\"flex group px-4 items-end gap-2\"\n [class.justify-end]=\"isMine(msg)\"\n [class.justify-start]=\"!isMine(msg)\"\n [class.mt-2]=\"i > 0 && isSameSender(i)\"\n [class.mt-3]=\"i > 0 && !isSameSender(i)\"\n >\n @if (!isMine(msg) && !isSameSender(i)) {\n <xs-image\n [item]=\"otherUser(msg)!\"\n [typeItem]=\"otherUserType(msg)\"\n imageType=\"small\"\n [alt]=\"otherUser(msg)?.name ?? ''\"\n customClass=\"w-7 h-7 rounded-full overflow-hidden shrink-0 mt-1\"\n [objectFit]=\"'cover'\"\n />\n } @else {\n <div class=\"w-7 shrink-0\"></div>\n }\n <div\n class=\"max-w-[80%] text-sm relative\"\n [class.rounded-2xl]=\"!isSameSender(i)\"\n [class.rounded-md]=\"i > 0 && isSameSender(i)\"\n [class.bg-zinc-500]=\"!isMine(msg)\"\n [class.bg-zinc-900]=\"isMine(msg)\"\n [class.px-3]=\"true\"\n [class.py-2]=\"!isSameSender(i)\"\n [class.py-1]=\"i > 0 && isSameSender(i)\"\n [class.rounded-br-md]=\"\n isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-bl-md]=\"\n !isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-tr-md]=\"\n isMine(msg) && isSameSender(i)\n \"\n [class.rounded-tl-md]=\"\n !isMine(msg) && isSameSender(i)\n \"\n >\n @if (msg.replyTo) {\n <div\n class=\"mb-1.5 pl-2 border-l-2 border-zinc-500 text-[11px] text-zinc-400 leading-tight\"\n >\n <span class=\"font-semibold text-zinc-300\">{{\n msg.replyTo.sender === userId()\n ? t('YOU')\n : msg.replyTo.sender\n }}</span>\n <p class=\"truncate\">{{ msg.replyTo.text }}</p>\n </div>\n }\n @if (hasLink(msg.text); as link) {\n <a\n [href]=\"link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"block mb-1.5 p-2 rounded-lg bg-black/20 border border-zinc-700/50 hover:border-zinc-500 transition-colors\"\n >\n <span\n class=\"text-[11px] text-zinc-400 truncate block\"\n >{{ link }}</span\n >\n <span class=\"text-[10px] text-zinc-500\"\n >{{ t('OPEN_LINK') }}</span\n >\n </a>\n }\n <p\n class=\"text-white break-words whitespace-pre-wrap\"\n >\n {{ msg.text }}\n </p>\n @if (\n msg.attachments && msg.attachments.length > 0\n ) {\n <div class=\"flex flex-wrap gap-1.5 mt-1.5\">\n @for (att of msg.attachments; track att.url) {\n @if (att.type.startsWith('image/')) {\n <xs-image\n [item]=\"{ _id: att.url, image: true }\"\n [typeItem]=\"'media'\"\n imageType=\"normal\"\n [objectFit]=\"'cover'\"\n customClass=\"rounded-lg w-full max-h-48 object-cover\"\n />\n }\n }\n </div>\n }\n <div\n class=\"flex items-center justify-end gap-1 mt-1\"\n >\n <span class=\"text-[10px]\" [class.text-zinc-400]=\"!isMine(msg)\" [class.text-zinc-500]=\"isMine(msg)\">{{\n formatTime(msg.created)\n }}</span>\n @if (isMine(msg)) {\n @if (msg.isFailed) {\n <button\n (click)=\"onRetry(msg)\"\n class=\"text-red-400 hover:text-red-300 text-[10px] flex items-center gap-0.5\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"\n />\n </svg>\n {{ t('RETRY') }}\n </button>\n } @else if (msg.isTemp) {\n <span\n class=\"text-[10px] text-zinc-500 animate-pulse\"\n >{{ t('SENDING') }}</span\n >\n } @else {\n <span\n class=\"text-[10px]\"\n [class.text-zinc-400]=\"msg.isRead\"\n [class.text-zinc-500]=\"!msg.isRead\"\n >\n {{ msg.isRead ? '\u2713\u2713' : '\u2713' }}\n </span>\n }\n }\n <button\n (click)=\"onReply(msg)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n [title]=\"t('REPLY')\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z\"\n />\n </svg>\n </button>\n <button\n (click)=\"copyMessage(msg.text)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"\n />\n </svg>\n </button>\n </div>\n </div>\n </div>\n } @empty {\n <div\n class=\"flex-1 flex items-center justify-center text-zinc-500 text-sm\"\n >\n {{ _emptyMessagesLabel() }}\n </div>\n }\n\n @if (typingUserId() && typingUserId() !== userId()) {\n <div class=\"flex justify-start px-4 pt-2\">\n <div\n class=\"flex items-center gap-2 px-4 py-3 rounded-2xl rounded-bl-md bg-zinc-800\"\n >\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.15s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.3s]\"\n ></span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"shrink-0\">\n @if (replyToMsg(); as replyMsg) {\n <div\n class=\"bg-zinc-900 border-t border-zinc-800\"\n >\n <div class=\"flex items-center gap-2 px-4 py-2\">\n <div class=\"flex-1 min-w-0\">\n <span\n class=\"text-[11px] font-semibold text-zinc-400\"\n >{{ t('REPLYING_TO') }}\n {{\n replyMsg.sender === userId() ? t('YOURSELF') : ''\n }}</span\n >\n <p class=\"text-xs text-zinc-400 truncate\">\n {{ replyMsg.text }}\n </p>\n </div>\n <button\n (click)=\"cancelReply()\"\n class=\"text-zinc-500 hover:text-white shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n </div>\n }\n\n <xs-chat-textarea\n [placeholder]=\"\n replyToMsg()\n ? t('REPLY_PLACEHOLDER')\n : _textareaPlaceholder()\n \"\n [disabled]=\"disabled()\"\n [attachEnabled]=\"attachEnabled()\"\n [uploading]=\"uploading()\"\n [uploadProgress]=\"uploadProgress()\"\n (sendMessage)=\"onSendMessage($event)\"\n (sendWithAttachments)=\"onSendWithAttachments($event)\"\n (typing)=\"typing.emit()\"\n (sendError)=\"sendError.emit($event)\"\n />\n </div>\n" }]
|
|
15222
|
-
}], ctorParameters: () => [], propDecorators: { messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], currentChatInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentChatInfo", required: false }] }], userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], typingUserId: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingUserId", required: false }] }], typingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingLabel", required: false }] }], onlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlineLabel", required: false }] }], offlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offlineLabel", required: false }] }], roleLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "roleLabel", required: false }] }], emptyMessagesLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessagesLabel", required: false }] }], textareaPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "textareaPlaceholder", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], yesterdayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yesterdayLabel", required: false }] }], attachEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachEnabled", required: false }] }], uploading: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploading", required: false }] }], uploadProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadProgress", required: false }] }], infoButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "infoButtons", required: false }] }], alertType: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertType", required: false }] }], alertMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertMessage", required: false }] }], sendError: [{ type: i0.Output, args: ["sendError"] }], typing: [{ type: i0.Output, args: ["typing"] }], sendMessage: [{ type: i0.Output, args: ["sendMessage"] }], goToList: [{ type: i0.Output, args: ["goToList"] }], loadMoreMessages: [{ type: i0.Output, args: ["loadMoreMessages"] }], clickInfoButton: [{ type: i0.Output, args: ["clickInfoButton"] }], retryMessage: [{ type: i0.Output, args: ["retryMessage"] }], replyToMessage: [{ type: i0.Output, args: ["replyToMessage"] }], messagesContainer: [{ type: i0.ViewChild, args: ['messagesContainer', { isSignal: true }] }] } });
|
|
15254
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n #messagesContainer\n class=\"flex flex-col flex-1 min-h-[300px] overflow-y-auto\"\n (scroll)=\"onScroll()\"\n >\n <xs-chat-conversation-info\n class=\"sticky top-0 z-10 bg-zinc-900\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingLabel()\"\n [onlineLabel]=\"onlineLabel()\"\n [offlineLabel]=\"offlineLabel()\"\n [roleLabel]=\"roleLabel()\"\n [buttons]=\"infoButtons()\"\n (goToList)=\"goToList.emit()\"\n (clickButton)=\"clickInfoButton.emit($event)\"\n />\n\n @if (alertType(); as type) {\n <xs-chat-alert\n [type]=\"type\"\n [message]=\"alertMessage()\"\n />\n }\n\n <div class=\"flex-1 flex flex-col px-4 py-3\">\n @for (msg of messages(); track msg._id; let i = $index) {\n @if (showDateSeparator(i)) {\n <div class=\"flex justify-center py-2\">\n <span\n class=\"text-[10px] text-zinc-600 bg-zinc-900 px-3 py-1 rounded-full\"\n >\n {{ formatDateSeparator(msg.created) }}\n </span>\n </div>\n }\n <div\n class=\"flex group px-4 items-end gap-2\"\n [class.justify-end]=\"isMine(msg)\"\n [class.justify-start]=\"!isMine(msg)\"\n [class.mt-2]=\"i > 0 && isSameSender(i)\"\n [class.mt-3]=\"i > 0 && !isSameSender(i)\"\n >\n @if (!isMine(msg) && !isSameSender(i)) {\n <xs-image\n [item]=\"otherUser(msg)!\"\n [typeItem]=\"otherUserType(msg)\"\n imageType=\"small\"\n [alt]=\"otherUser(msg)?.name ?? ''\"\n customClass=\"w-7 h-7 rounded-full overflow-hidden shrink-0 mt-1\"\n [objectFit]=\"'cover'\"\n />\n } @else {\n <div class=\"w-7 shrink-0\"></div>\n }\n <div\n class=\"max-w-[80%] text-sm relative\"\n [class.rounded-2xl]=\"!isSameSender(i)\"\n [class.rounded-md]=\"i > 0 && isSameSender(i)\"\n [class.bg-zinc-500]=\"!isMine(msg)\"\n [class.bg-zinc-900]=\"isMine(msg)\"\n [class.px-3]=\"true\"\n [class.py-2]=\"!isSameSender(i)\"\n [class.py-1]=\"i > 0 && isSameSender(i)\"\n [class.rounded-br-md]=\"\n isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-bl-md]=\"\n !isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-tr-md]=\"\n isMine(msg) && isSameSender(i)\n \"\n [class.rounded-tl-md]=\"\n !isMine(msg) && isSameSender(i)\n \"\n >\n @if (msg.replyTo) {\n <div\n class=\"mb-1.5 pl-2 border-l-2 border-zinc-500 text-[11px] text-zinc-400 leading-tight\"\n >\n <span class=\"font-semibold text-zinc-300\">{{\n msg.replyTo.sender === userId()\n ? t('YOU')\n : msg.replyTo.sender\n }}</span>\n <p class=\"truncate\">{{ msg.replyTo.text }}</p>\n </div>\n }\n @if (hasLink(msg.text); as link) {\n <a\n [href]=\"link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"block mb-1.5 p-2 rounded-lg bg-black/20 border border-zinc-700/50 hover:border-zinc-500 transition-colors\"\n >\n <span\n class=\"text-[11px] text-zinc-400 truncate block\"\n >{{ link }}</span\n >\n <span class=\"text-[10px] text-zinc-500\"\n >{{ t('OPEN_LINK') }}</span\n >\n </a>\n }\n <p\n class=\"text-white break-words whitespace-pre-wrap\"\n >\n {{ msg.text }}\n </p>\n @if (\n msg.attachments && msg.attachments.length > 0\n ) {\n <div class=\"flex flex-wrap gap-1.5 mt-1.5\">\n @for (att of msg.attachments; track att.url) {\n @if (att.type.startsWith('image/')) {\n <xs-image\n [item]=\"{ _id: att.url, image: true }\"\n [typeItem]=\"'media'\"\n imageType=\"normal\"\n [objectFit]=\"'cover'\"\n customClass=\"rounded-lg w-full max-h-48 object-cover\"\n />\n }\n }\n </div>\n }\n <div\n class=\"flex items-center justify-end gap-1 mt-1\"\n >\n <span class=\"text-[10px]\" [class.text-zinc-400]=\"!isMine(msg)\" [class.text-zinc-500]=\"isMine(msg)\">{{\n formatTime(msg.created)\n }}</span>\n @if (isMine(msg)) {\n @if (msg.isFailed) {\n <button\n (click)=\"onRetry(msg)\"\n class=\"text-red-400 hover:text-red-300 text-[10px] flex items-center gap-0.5\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"\n />\n </svg>\n {{ t('RETRY') }}\n </button>\n } @else if (msg.isTemp) {\n <span\n class=\"text-[10px] text-zinc-500 animate-pulse\"\n >{{ t('SENDING') }}</span\n >\n } @else {\n <span\n class=\"text-[10px]\"\n [class.text-zinc-400]=\"msg.isRead\"\n [class.text-zinc-500]=\"!msg.isRead\"\n >\n {{ msg.isRead ? '\u2713\u2713' : '\u2713' }}\n </span>\n }\n }\n <button\n (click)=\"onReply(msg)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n [title]=\"t('REPLY')\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z\"\n />\n </svg>\n </button>\n <button\n (click)=\"copyMessage(msg.text)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"\n />\n </svg>\n </button>\n </div>\n </div>\n </div>\n } @empty {\n <div\n class=\"flex-1 flex items-center justify-center text-zinc-500 text-sm\"\n >\n {{ _emptyMessagesLabel() }}\n </div>\n }\n\n @if (typingUserId() && typingUserId() !== userId()) {\n <div class=\"flex justify-start px-4 pt-2\">\n <div\n class=\"flex items-center gap-2 px-4 py-3 rounded-2xl rounded-bl-md bg-zinc-800\"\n >\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.15s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.3s]\"\n ></span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"shrink-0\">\n @if (replyToMsg(); as replyMsg) {\n <div\n class=\"bg-zinc-900 border-t border-zinc-800\"\n >\n <div class=\"flex items-center gap-2 px-4 py-2\">\n <div class=\"flex-1 min-w-0\">\n <span\n class=\"text-[11px] font-semibold text-zinc-400\"\n >{{ t('REPLYING_TO') }}\n {{\n replyMsg.sender === userId() ? t('YOURSELF') : ''\n }}</span\n >\n <p class=\"text-xs text-zinc-400 truncate\">\n {{ replyMsg.text }}\n </p>\n </div>\n <button\n (click)=\"cancelReply()\"\n class=\"text-zinc-500 hover:text-white shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n </div>\n }\n\n <xs-chat-textarea\n [placeholder]=\"\n replyToMsg()\n ? t('REPLY_PLACEHOLDER')\n : _textareaPlaceholder()\n \"\n [disabled]=\"disabled()\"\n [attachEnabled]=\"attachEnabled()\"\n [compact]=\"compact()\"\n [uploading]=\"uploading()\"\n [uploadProgress]=\"uploadProgress()\"\n (sendMessage)=\"onSendMessage($event)\"\n (sendWithAttachments)=\"onSendWithAttachments($event)\"\n (typing)=\"typing.emit()\"\n (sendError)=\"sendError.emit($event)\"\n />\n </div>\n" }]
|
|
15255
|
+
}], ctorParameters: () => [], propDecorators: { messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], currentChatInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentChatInfo", required: false }] }], userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], typingUserId: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingUserId", required: false }] }], typingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingLabel", required: false }] }], onlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlineLabel", required: false }] }], offlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offlineLabel", required: false }] }], roleLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "roleLabel", required: false }] }], emptyMessagesLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessagesLabel", required: false }] }], textareaPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "textareaPlaceholder", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], yesterdayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yesterdayLabel", required: false }] }], attachEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachEnabled", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], uploading: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploading", required: false }] }], uploadProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadProgress", required: false }] }], infoButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "infoButtons", required: false }] }], alertType: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertType", required: false }] }], alertMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertMessage", required: false }] }], sendError: [{ type: i0.Output, args: ["sendError"] }], typing: [{ type: i0.Output, args: ["typing"] }], sendMessage: [{ type: i0.Output, args: ["sendMessage"] }], goToList: [{ type: i0.Output, args: ["goToList"] }], loadMoreMessages: [{ type: i0.Output, args: ["loadMoreMessages"] }], clickInfoButton: [{ type: i0.Output, args: ["clickInfoButton"] }], retryMessage: [{ type: i0.Output, args: ["retryMessage"] }], replyToMessage: [{ type: i0.Output, args: ["replyToMessage"] }], messagesContainer: [{ type: i0.ViewChild, args: ['messagesContainer', { isSignal: true }] }] } });
|
|
15223
15256
|
|
|
15224
15257
|
class XSChatFloatingPanelComponent {
|
|
15225
15258
|
isOpen = input(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
@@ -15351,6 +15384,7 @@ class XSChatFloatingPanelComponent {
|
|
|
15351
15384
|
uploading = input(false, ...(ngDevMode ? [{ debugName: "uploading" }] : []));
|
|
15352
15385
|
uploadProgress = input(0, ...(ngDevMode ? [{ debugName: "uploadProgress" }] : []));
|
|
15353
15386
|
selectChat = output();
|
|
15387
|
+
rightClick = output();
|
|
15354
15388
|
sendMessage = output();
|
|
15355
15389
|
sendError = output();
|
|
15356
15390
|
typing = output();
|
|
@@ -15388,7 +15422,7 @@ class XSChatFloatingPanelComponent {
|
|
|
15388
15422
|
this.clickDropdownItem.emit(event);
|
|
15389
15423
|
}
|
|
15390
15424
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatFloatingPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15391
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatFloatingPanelComponent, isStandalone: true, selector: "xs-chat-floating-panel", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, chats: { classPropertyName: "chats", publicName: "chats", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, currentChatInfo: { classPropertyName: "currentChatInfo", publicName: "currentChatInfo", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, selectedChatId: { classPropertyName: "selectedChatId", publicName: "selectedChatId", isSignal: true, isRequired: false, transformFunction: null }, typingUserId: { classPropertyName: "typingUserId", publicName: "typingUserId", isSignal: true, isRequired: false, transformFunction: null }, dropdownItems: { classPropertyName: "dropdownItems", publicName: "dropdownItems", isSignal: true, isRequired: false, transformFunction: null }, typingLabel: { classPropertyName: "typingLabel", publicName: "typingLabel", isSignal: true, isRequired: false, transformFunction: null }, onlineLabel: { classPropertyName: "onlineLabel", publicName: "onlineLabel", isSignal: true, isRequired: false, transformFunction: null }, offlineLabel: { classPropertyName: "offlineLabel", publicName: "offlineLabel", isSignal: true, isRequired: false, transformFunction: null }, roleLabel: { classPropertyName: "roleLabel", publicName: "roleLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyMessagesLabel: { classPropertyName: "emptyMessagesLabel", publicName: "emptyMessagesLabel", isSignal: true, isRequired: false, transformFunction: null }, textareaPlaceholder: { classPropertyName: "textareaPlaceholder", publicName: "textareaPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, yesterdayLabel: { classPropertyName: "yesterdayLabel", publicName: "yesterdayLabel", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noResultsLabel: { classPropertyName: "noResultsLabel", publicName: "noResultsLabel", isSignal: true, isRequired: false, transformFunction: null }, noChatsLabel: { classPropertyName: "noChatsLabel", publicName: "noChatsLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeBlockLabel: { classPropertyName: "swipeBlockLabel", publicName: "swipeBlockLabel", isSignal: true, isRequired: false, transformFunction: null }, swipePinLabel: { classPropertyName: "swipePinLabel", publicName: "swipePinLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeDeleteLabel: { classPropertyName: "swipeDeleteLabel", publicName: "swipeDeleteLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeCancelLabel: { classPropertyName: "swipeCancelLabel", publicName: "swipeCancelLabel", isSignal: true, isRequired: false, transformFunction: null }, infoButtons: { classPropertyName: "infoButtons", publicName: "infoButtons", isSignal: true, isRequired: false, transformFunction: null }, alertType: { classPropertyName: "alertType", publicName: "alertType", isSignal: true, isRequired: false, transformFunction: null }, alertMessage: { classPropertyName: "alertMessage", publicName: "alertMessage", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, attachEnabled: { classPropertyName: "attachEnabled", publicName: "attachEnabled", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, uploadProgress: { classPropertyName: "uploadProgress", publicName: "uploadProgress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectChat: "selectChat", sendMessage: "sendMessage", sendError: "sendError", typing: "typing", retryMessage: "retryMessage", replyToMessage: "replyToMessage", closePanel: "closePanel", goToList: "goToList", clickDropdownItem: "clickDropdownItem", clickInfoButton: "clickInfoButton" }, host: { attributes: { "xs-chat-floating-panel-host": "" } }, ngImport: i0, template: "\n @if (isOpen()) {\n <div\n class=\"fixed inset-0 z-[300] hidden lg:block\"\n (click)=\"closePanel.emit()\"\n ></div>\n\n <div\n class=\"fixed bottom-20 right-4 z-[301] hidden lg:flex flex-col bg-zinc-900/95 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl w-[380px] h-[560px]\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-4 py-3 border-b border-white/10 shrink-0\"\n >\n <div class=\"flex items-center gap-2 min-w-0\">\n @if (selectedChatId()) {\n <button\n (click)=\"goToList.emit()\"\n class=\"text-zinc-400 hover:text-white shrink-0 transition-colors\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n />\n </svg>\n </button>\n }\n <span\n class=\"text-sm font-semibold text-white truncate\"\n >{{ title() }}</span\n >\n </div>\n <button\n (click)=\"closePanel.emit()\"\n class=\"flex items-center justify-center w-7 h-7 text-zinc-400 hover:text-white hover:bg-zinc-800 rounded-full transition-colors shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n\n <div class=\"flex-1 min-h-0 flex flex-col\">\n @if (!selectedChatId()) {\n <xs-chat-list\n [chats]=\"filteredChats()\"\n [loading]=\"loading()\"\n [dropdownItems]=\"dropdownItems()\"\n [userId]=\"userId()\"\n [searchPlaceholder]=\"searchPlaceholderText\"\n [noResultsLabel]=\"noResultsText\"\n [noChatsLabel]=\"noChatsText\"\n [swipeBlockLabel]=\"swipeBlockText\"\n [swipePinLabel]=\"swipePinText\"\n [swipeDeleteLabel]=\"swipeDeleteText\"\n [swipeCancelLabel]=\"swipeCancelText\"\n (selectChat)=\"onSelectChat($event)\"\n (searchQueryChange)=\"onSearchQueryChange($event)\"\n (clickDropdownItem)=\"onDropdownItemClick($event)\"\n />\n } @else {\n <div class=\"flex-1 min-h-0 flex flex-col\">\n <xs-chat-conversation\n [messages]=\"messages()\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingText\"\n [onlineLabel]=\"onlineText\"\n [offlineLabel]=\"offlineText\"\n [roleLabel]=\"roleLabel()\"\n [emptyMessagesLabel]=\"emptyMessagesText\"\n [textareaPlaceholder]=\"textareaPlaceholderText\"\n [todayLabel]=\"todayText\"\n [yesterdayLabel]=\"yesterdayText\"\n [infoButtons]=\"infoButtons()\"\n [alertType]=\"alertType()\"\n [alertMessage]=\"alertMessage()\"\n [attachEnabled]=\"attachEnabled()\"\n [uploading]=\"uploading()\"\n [uploadProgress]=\"uploadProgress()\"\n (sendMessage)=\"onSendMessage($event)\"\n (sendError)=\"sendError.emit($event)\"\n (typing)=\"onTyping()\"\n (retryMessage)=\"onRetryMessage($event)\"\n (replyToMessage)=\"onReplyToMessage($event)\"\n (goToList)=\"onGoToList()\"\n (clickInfoButton)=\"onClickInfoButton($event)\"\n />\n </div>\n }\n </div>\n\n @if (selectedChatId() && showFooter()) {\n <div\n class=\"flex items-center justify-between px-3 py-1 border-t border-white/10 shrink-0\"\n >\n <ng-content select=\"[footerLeft]\" />\n <ng-content select=\"[footerRight]\" />\n </div>\n }\n </div>\n }\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSChatListComponent, selector: "xs-chat-list", inputs: ["chats", "loading", "showSearch", "dropdownItems", "userId", "searchPlaceholder", "noResultsLabel", "noChatsLabel", "swipeBlockLabel", "swipePinLabel", "swipeDeleteLabel", "swipeCancelLabel"], outputs: ["searchQueryChange", "selectChat", "rightClick", "clickDropdownItem"] }, { kind: "component", type: XSChatConversationComponent, selector: "xs-chat-conversation", inputs: ["messages", "currentChatInfo", "userId", "disabled", "typingUserId", "typingLabel", "onlineLabel", "offlineLabel", "roleLabel", "emptyMessagesLabel", "textareaPlaceholder", "todayLabel", "yesterdayLabel", "attachEnabled", "uploading", "uploadProgress", "infoButtons", "alertType", "alertMessage"], outputs: ["sendError", "typing", "sendMessage", "goToList", "loadMoreMessages", "clickInfoButton", "retryMessage", "replyToMessage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15425
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatFloatingPanelComponent, isStandalone: true, selector: "xs-chat-floating-panel", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, chats: { classPropertyName: "chats", publicName: "chats", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, currentChatInfo: { classPropertyName: "currentChatInfo", publicName: "currentChatInfo", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, selectedChatId: { classPropertyName: "selectedChatId", publicName: "selectedChatId", isSignal: true, isRequired: false, transformFunction: null }, typingUserId: { classPropertyName: "typingUserId", publicName: "typingUserId", isSignal: true, isRequired: false, transformFunction: null }, dropdownItems: { classPropertyName: "dropdownItems", publicName: "dropdownItems", isSignal: true, isRequired: false, transformFunction: null }, typingLabel: { classPropertyName: "typingLabel", publicName: "typingLabel", isSignal: true, isRequired: false, transformFunction: null }, onlineLabel: { classPropertyName: "onlineLabel", publicName: "onlineLabel", isSignal: true, isRequired: false, transformFunction: null }, offlineLabel: { classPropertyName: "offlineLabel", publicName: "offlineLabel", isSignal: true, isRequired: false, transformFunction: null }, roleLabel: { classPropertyName: "roleLabel", publicName: "roleLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyMessagesLabel: { classPropertyName: "emptyMessagesLabel", publicName: "emptyMessagesLabel", isSignal: true, isRequired: false, transformFunction: null }, textareaPlaceholder: { classPropertyName: "textareaPlaceholder", publicName: "textareaPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, yesterdayLabel: { classPropertyName: "yesterdayLabel", publicName: "yesterdayLabel", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noResultsLabel: { classPropertyName: "noResultsLabel", publicName: "noResultsLabel", isSignal: true, isRequired: false, transformFunction: null }, noChatsLabel: { classPropertyName: "noChatsLabel", publicName: "noChatsLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeBlockLabel: { classPropertyName: "swipeBlockLabel", publicName: "swipeBlockLabel", isSignal: true, isRequired: false, transformFunction: null }, swipePinLabel: { classPropertyName: "swipePinLabel", publicName: "swipePinLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeDeleteLabel: { classPropertyName: "swipeDeleteLabel", publicName: "swipeDeleteLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeCancelLabel: { classPropertyName: "swipeCancelLabel", publicName: "swipeCancelLabel", isSignal: true, isRequired: false, transformFunction: null }, infoButtons: { classPropertyName: "infoButtons", publicName: "infoButtons", isSignal: true, isRequired: false, transformFunction: null }, alertType: { classPropertyName: "alertType", publicName: "alertType", isSignal: true, isRequired: false, transformFunction: null }, alertMessage: { classPropertyName: "alertMessage", publicName: "alertMessage", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, attachEnabled: { classPropertyName: "attachEnabled", publicName: "attachEnabled", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, uploadProgress: { classPropertyName: "uploadProgress", publicName: "uploadProgress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectChat: "selectChat", rightClick: "rightClick", sendMessage: "sendMessage", sendError: "sendError", typing: "typing", retryMessage: "retryMessage", replyToMessage: "replyToMessage", closePanel: "closePanel", goToList: "goToList", clickDropdownItem: "clickDropdownItem", clickInfoButton: "clickInfoButton" }, host: { attributes: { "xs-chat-floating-panel-host": "" } }, ngImport: i0, template: "\n @if (isOpen()) {\n <div\n class=\"fixed inset-0 z-[300] hidden lg:block\"\n (click)=\"closePanel.emit()\"\n ></div>\n\n <div\n class=\"fixed bottom-20 right-4 z-[301] hidden lg:flex flex-col bg-zinc-900/95 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl w-[380px] h-[560px]\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-4 py-3 border-b border-white/10 shrink-0\"\n >\n <div class=\"flex items-center gap-2 min-w-0\">\n @if (selectedChatId()) {\n <button\n (click)=\"goToList.emit()\"\n class=\"text-zinc-400 hover:text-white shrink-0 transition-colors\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n />\n </svg>\n </button>\n }\n <span\n class=\"text-sm font-semibold text-white truncate\"\n >{{ title() }}</span\n >\n </div>\n <button\n (click)=\"closePanel.emit()\"\n class=\"flex items-center justify-center w-7 h-7 text-zinc-400 hover:text-white hover:bg-zinc-800 rounded-full transition-colors shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n\n <div class=\"flex-1 min-h-0 flex flex-col\">\n @if (!selectedChatId()) {\n <xs-chat-list\n [chats]=\"filteredChats()\"\n [loading]=\"loading()\"\n [dropdownItems]=\"dropdownItems()\"\n [userId]=\"userId()\"\n [searchPlaceholder]=\"searchPlaceholderText\"\n [noResultsLabel]=\"noResultsText\"\n [noChatsLabel]=\"noChatsText\"\n [swipeBlockLabel]=\"swipeBlockText\"\n [swipePinLabel]=\"swipePinText\"\n [swipeDeleteLabel]=\"swipeDeleteText\"\n [swipeCancelLabel]=\"swipeCancelText\"\n (selectChat)=\"onSelectChat($event)\"\n (rightClick)=\"rightClick.emit($event)\"\n (searchQueryChange)=\"onSearchQueryChange($event)\"\n (clickDropdownItem)=\"onDropdownItemClick($event)\"\n />\n } @else {\n <div class=\"flex-1 min-h-0 flex flex-col\">\n <xs-chat-conversation\n [messages]=\"messages()\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingText\"\n [onlineLabel]=\"onlineText\"\n [offlineLabel]=\"offlineText\"\n [roleLabel]=\"roleLabel()\"\n [emptyMessagesLabel]=\"emptyMessagesText\"\n [textareaPlaceholder]=\"textareaPlaceholderText\"\n [todayLabel]=\"todayText\"\n [yesterdayLabel]=\"yesterdayText\"\n [infoButtons]=\"infoButtons()\"\n [alertType]=\"alertType()\"\n [alertMessage]=\"alertMessage()\"\n [attachEnabled]=\"attachEnabled()\"\n [compact]=\"true\"\n [uploading]=\"uploading()\"\n [uploadProgress]=\"uploadProgress()\"\n (sendMessage)=\"onSendMessage($event)\"\n (sendError)=\"sendError.emit($event)\"\n (typing)=\"onTyping()\"\n (retryMessage)=\"onRetryMessage($event)\"\n (replyToMessage)=\"onReplyToMessage($event)\"\n (goToList)=\"onGoToList()\"\n (clickInfoButton)=\"onClickInfoButton($event)\"\n />\n </div>\n }\n </div>\n\n @if (selectedChatId() && showFooter()) {\n <div\n class=\"flex items-center justify-between px-3 py-1 border-t border-white/10 shrink-0\"\n >\n <ng-content select=\"[footerLeft]\" />\n <ng-content select=\"[footerRight]\" />\n </div>\n }\n </div>\n }\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSChatListComponent, selector: "xs-chat-list", inputs: ["chats", "loading", "showSearch", "dropdownItems", "userId", "searchPlaceholder", "noResultsLabel", "noChatsLabel", "swipeBlockLabel", "swipePinLabel", "swipeDeleteLabel", "swipeCancelLabel"], outputs: ["searchQueryChange", "selectChat", "rightClick", "clickDropdownItem"] }, { kind: "component", type: XSChatConversationComponent, selector: "xs-chat-conversation", inputs: ["messages", "currentChatInfo", "userId", "disabled", "typingUserId", "typingLabel", "onlineLabel", "offlineLabel", "roleLabel", "emptyMessagesLabel", "textareaPlaceholder", "todayLabel", "yesterdayLabel", "attachEnabled", "compact", "uploading", "uploadProgress", "infoButtons", "alertType", "alertMessage"], outputs: ["sendError", "typing", "sendMessage", "goToList", "loadMoreMessages", "clickInfoButton", "retryMessage", "replyToMessage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15392
15426
|
}
|
|
15393
15427
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatFloatingPanelComponent, decorators: [{
|
|
15394
15428
|
type: Component,
|
|
@@ -15396,8 +15430,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
15396
15430
|
CommonModule,
|
|
15397
15431
|
XSChatListComponent,
|
|
15398
15432
|
XSChatConversationComponent,
|
|
15399
|
-
], host: { 'xs-chat-floating-panel-host': '' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "\n @if (isOpen()) {\n <div\n class=\"fixed inset-0 z-[300] hidden lg:block\"\n (click)=\"closePanel.emit()\"\n ></div>\n\n <div\n class=\"fixed bottom-20 right-4 z-[301] hidden lg:flex flex-col bg-zinc-900/95 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl w-[380px] h-[560px]\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-4 py-3 border-b border-white/10 shrink-0\"\n >\n <div class=\"flex items-center gap-2 min-w-0\">\n @if (selectedChatId()) {\n <button\n (click)=\"goToList.emit()\"\n class=\"text-zinc-400 hover:text-white shrink-0 transition-colors\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n />\n </svg>\n </button>\n }\n <span\n class=\"text-sm font-semibold text-white truncate\"\n >{{ title() }}</span\n >\n </div>\n <button\n (click)=\"closePanel.emit()\"\n class=\"flex items-center justify-center w-7 h-7 text-zinc-400 hover:text-white hover:bg-zinc-800 rounded-full transition-colors shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n\n <div class=\"flex-1 min-h-0 flex flex-col\">\n @if (!selectedChatId()) {\n <xs-chat-list\n [chats]=\"filteredChats()\"\n [loading]=\"loading()\"\n [dropdownItems]=\"dropdownItems()\"\n [userId]=\"userId()\"\n [searchPlaceholder]=\"searchPlaceholderText\"\n [noResultsLabel]=\"noResultsText\"\n [noChatsLabel]=\"noChatsText\"\n [swipeBlockLabel]=\"swipeBlockText\"\n [swipePinLabel]=\"swipePinText\"\n [swipeDeleteLabel]=\"swipeDeleteText\"\n [swipeCancelLabel]=\"swipeCancelText\"\n (selectChat)=\"onSelectChat($event)\"\n (searchQueryChange)=\"onSearchQueryChange($event)\"\n (clickDropdownItem)=\"onDropdownItemClick($event)\"\n />\n } @else {\n <div class=\"flex-1 min-h-0 flex flex-col\">\n <xs-chat-conversation\n [messages]=\"messages()\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingText\"\n [onlineLabel]=\"onlineText\"\n [offlineLabel]=\"offlineText\"\n [roleLabel]=\"roleLabel()\"\n [emptyMessagesLabel]=\"emptyMessagesText\"\n [textareaPlaceholder]=\"textareaPlaceholderText\"\n [todayLabel]=\"todayText\"\n [yesterdayLabel]=\"yesterdayText\"\n [infoButtons]=\"infoButtons()\"\n [alertType]=\"alertType()\"\n [alertMessage]=\"alertMessage()\"\n [attachEnabled]=\"attachEnabled()\"\n [uploading]=\"uploading()\"\n [uploadProgress]=\"uploadProgress()\"\n (sendMessage)=\"onSendMessage($event)\"\n (sendError)=\"sendError.emit($event)\"\n (typing)=\"onTyping()\"\n (retryMessage)=\"onRetryMessage($event)\"\n (replyToMessage)=\"onReplyToMessage($event)\"\n (goToList)=\"onGoToList()\"\n (clickInfoButton)=\"onClickInfoButton($event)\"\n />\n </div>\n }\n </div>\n\n @if (selectedChatId() && showFooter()) {\n <div\n class=\"flex items-center justify-between px-3 py-1 border-t border-white/10 shrink-0\"\n >\n <ng-content select=\"[footerLeft]\" />\n <ng-content select=\"[footerRight]\" />\n </div>\n }\n </div>\n }\n" }]
|
|
15400
|
-
}], ctorParameters: () => [], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], chats: [{ type: i0.Input, args: [{ isSignal: true, alias: "chats", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], currentChatInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentChatInfo", required: false }] }], userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }], selectedChatId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedChatId", required: false }] }], typingUserId: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingUserId", required: false }] }], dropdownItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownItems", required: false }] }], typingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingLabel", required: false }] }], onlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlineLabel", required: false }] }], offlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offlineLabel", required: false }] }], roleLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "roleLabel", required: false }] }], emptyMessagesLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessagesLabel", required: false }] }], textareaPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "textareaPlaceholder", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], yesterdayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yesterdayLabel", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], noResultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsLabel", required: false }] }], noChatsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noChatsLabel", required: false }] }], swipeBlockLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeBlockLabel", required: false }] }], swipePinLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipePinLabel", required: false }] }], swipeDeleteLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeDeleteLabel", required: false }] }], swipeCancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeCancelLabel", required: false }] }], infoButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "infoButtons", required: false }] }], alertType: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertType", required: false }] }], alertMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertMessage", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], attachEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachEnabled", required: false }] }], uploading: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploading", required: false }] }], uploadProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadProgress", required: false }] }], selectChat: [{ type: i0.Output, args: ["selectChat"] }], sendMessage: [{ type: i0.Output, args: ["sendMessage"] }], sendError: [{ type: i0.Output, args: ["sendError"] }], typing: [{ type: i0.Output, args: ["typing"] }], retryMessage: [{ type: i0.Output, args: ["retryMessage"] }], replyToMessage: [{ type: i0.Output, args: ["replyToMessage"] }], closePanel: [{ type: i0.Output, args: ["closePanel"] }], goToList: [{ type: i0.Output, args: ["goToList"] }], clickDropdownItem: [{ type: i0.Output, args: ["clickDropdownItem"] }], clickInfoButton: [{ type: i0.Output, args: ["clickInfoButton"] }] } });
|
|
15433
|
+
], host: { 'xs-chat-floating-panel-host': '' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "\n @if (isOpen()) {\n <div\n class=\"fixed inset-0 z-[300] hidden lg:block\"\n (click)=\"closePanel.emit()\"\n ></div>\n\n <div\n class=\"fixed bottom-20 right-4 z-[301] hidden lg:flex flex-col bg-zinc-900/95 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl w-[380px] h-[560px]\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-4 py-3 border-b border-white/10 shrink-0\"\n >\n <div class=\"flex items-center gap-2 min-w-0\">\n @if (selectedChatId()) {\n <button\n (click)=\"goToList.emit()\"\n class=\"text-zinc-400 hover:text-white shrink-0 transition-colors\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n />\n </svg>\n </button>\n }\n <span\n class=\"text-sm font-semibold text-white truncate\"\n >{{ title() }}</span\n >\n </div>\n <button\n (click)=\"closePanel.emit()\"\n class=\"flex items-center justify-center w-7 h-7 text-zinc-400 hover:text-white hover:bg-zinc-800 rounded-full transition-colors shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n\n <div class=\"flex-1 min-h-0 flex flex-col\">\n @if (!selectedChatId()) {\n <xs-chat-list\n [chats]=\"filteredChats()\"\n [loading]=\"loading()\"\n [dropdownItems]=\"dropdownItems()\"\n [userId]=\"userId()\"\n [searchPlaceholder]=\"searchPlaceholderText\"\n [noResultsLabel]=\"noResultsText\"\n [noChatsLabel]=\"noChatsText\"\n [swipeBlockLabel]=\"swipeBlockText\"\n [swipePinLabel]=\"swipePinText\"\n [swipeDeleteLabel]=\"swipeDeleteText\"\n [swipeCancelLabel]=\"swipeCancelText\"\n (selectChat)=\"onSelectChat($event)\"\n (rightClick)=\"rightClick.emit($event)\"\n (searchQueryChange)=\"onSearchQueryChange($event)\"\n (clickDropdownItem)=\"onDropdownItemClick($event)\"\n />\n } @else {\n <div class=\"flex-1 min-h-0 flex flex-col\">\n <xs-chat-conversation\n [messages]=\"messages()\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingText\"\n [onlineLabel]=\"onlineText\"\n [offlineLabel]=\"offlineText\"\n [roleLabel]=\"roleLabel()\"\n [emptyMessagesLabel]=\"emptyMessagesText\"\n [textareaPlaceholder]=\"textareaPlaceholderText\"\n [todayLabel]=\"todayText\"\n [yesterdayLabel]=\"yesterdayText\"\n [infoButtons]=\"infoButtons()\"\n [alertType]=\"alertType()\"\n [alertMessage]=\"alertMessage()\"\n [attachEnabled]=\"attachEnabled()\"\n [compact]=\"true\"\n [uploading]=\"uploading()\"\n [uploadProgress]=\"uploadProgress()\"\n (sendMessage)=\"onSendMessage($event)\"\n (sendError)=\"sendError.emit($event)\"\n (typing)=\"onTyping()\"\n (retryMessage)=\"onRetryMessage($event)\"\n (replyToMessage)=\"onReplyToMessage($event)\"\n (goToList)=\"onGoToList()\"\n (clickInfoButton)=\"onClickInfoButton($event)\"\n />\n </div>\n }\n </div>\n\n @if (selectedChatId() && showFooter()) {\n <div\n class=\"flex items-center justify-between px-3 py-1 border-t border-white/10 shrink-0\"\n >\n <ng-content select=\"[footerLeft]\" />\n <ng-content select=\"[footerRight]\" />\n </div>\n }\n </div>\n }\n" }]
|
|
15434
|
+
}], ctorParameters: () => [], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], chats: [{ type: i0.Input, args: [{ isSignal: true, alias: "chats", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], currentChatInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentChatInfo", required: false }] }], userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }], selectedChatId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedChatId", required: false }] }], typingUserId: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingUserId", required: false }] }], dropdownItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownItems", required: false }] }], typingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingLabel", required: false }] }], onlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlineLabel", required: false }] }], offlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offlineLabel", required: false }] }], roleLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "roleLabel", required: false }] }], emptyMessagesLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessagesLabel", required: false }] }], textareaPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "textareaPlaceholder", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], yesterdayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yesterdayLabel", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], noResultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsLabel", required: false }] }], noChatsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noChatsLabel", required: false }] }], swipeBlockLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeBlockLabel", required: false }] }], swipePinLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipePinLabel", required: false }] }], swipeDeleteLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeDeleteLabel", required: false }] }], swipeCancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeCancelLabel", required: false }] }], infoButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "infoButtons", required: false }] }], alertType: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertType", required: false }] }], alertMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertMessage", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], attachEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachEnabled", required: false }] }], uploading: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploading", required: false }] }], uploadProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadProgress", required: false }] }], selectChat: [{ type: i0.Output, args: ["selectChat"] }], rightClick: [{ type: i0.Output, args: ["rightClick"] }], sendMessage: [{ type: i0.Output, args: ["sendMessage"] }], sendError: [{ type: i0.Output, args: ["sendError"] }], typing: [{ type: i0.Output, args: ["typing"] }], retryMessage: [{ type: i0.Output, args: ["retryMessage"] }], replyToMessage: [{ type: i0.Output, args: ["replyToMessage"] }], closePanel: [{ type: i0.Output, args: ["closePanel"] }], goToList: [{ type: i0.Output, args: ["goToList"] }], clickDropdownItem: [{ type: i0.Output, args: ["clickDropdownItem"] }], clickInfoButton: [{ type: i0.Output, args: ["clickInfoButton"] }] } });
|
|
15401
15435
|
|
|
15402
15436
|
class XSCustomizeProfileComponent {
|
|
15403
15437
|
$components = input.required(...(ngDevMode ? [{ debugName: "$components", alias: 'components' }] : [{
|