@xsmusices/ui 2.0.19 → 2.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/xsmusices-ui.mjs +45 -12
- package/fesm2022/xsmusices-ui.mjs.map +1 -1
- package/index.d.ts +6 -1
- package/package.json +1 -1
|
@@ -4332,8 +4332,17 @@ class XSImageComponent {
|
|
|
4332
4332
|
return this.getImageApiUrl(config.item, config.typeItem, config.imageType || 'normal');
|
|
4333
4333
|
}
|
|
4334
4334
|
const name = this.getItemName(config.item, config.typeItem);
|
|
4335
|
-
|
|
4336
|
-
|
|
4335
|
+
const fallbackName = name ||
|
|
4336
|
+
(typeof config.item === 'object' && config.item !== null
|
|
4337
|
+
? config.item.name ||
|
|
4338
|
+
config.item.title
|
|
4339
|
+
: null) ||
|
|
4340
|
+
(config.typeItem === 'user'
|
|
4341
|
+
? 'Usuario'
|
|
4342
|
+
: config.typeItem) ||
|
|
4343
|
+
'XSMusic';
|
|
4344
|
+
if (fallbackName && fallbackName !== 'XSMusic') {
|
|
4345
|
+
return this.avatarService.generateAvatar(fallbackName);
|
|
4337
4346
|
}
|
|
4338
4347
|
}
|
|
4339
4348
|
return config.fallbackSrc || this.defaultImagePath;
|
|
@@ -14854,11 +14863,11 @@ class XSChatTextareaComponent {
|
|
|
14854
14863
|
return BLOCKED_WORDS.some((word) => text.toLowerCase().includes(word));
|
|
14855
14864
|
}
|
|
14856
14865
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14857
|
-
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-
|
|
14866
|
+
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 (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 <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 <span\n class=\"absolute bottom-2 right-2 text-[10px] text-zinc-500 pointer-events-none select-none leading-none\"\n >\n {{ messageText().length }}/{{ maxLength }}\n </span>\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 });
|
|
14858
14867
|
}
|
|
14859
14868
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatTextareaComponent, decorators: [{
|
|
14860
14869
|
type: Component,
|
|
14861
|
-
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-
|
|
14870
|
+
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 (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 <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 <span\n class=\"absolute bottom-2 right-2 text-[10px] text-zinc-500 pointer-events-none select-none leading-none\"\n >\n {{ messageText().length }}/{{ maxLength }}\n </span>\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" }]
|
|
14862
14871
|
}], 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 }] }] } });
|
|
14863
14872
|
|
|
14864
14873
|
class XSChatConversationInfoComponent {
|
|
@@ -15048,12 +15057,24 @@ class XSChatConversationComponent {
|
|
|
15048
15057
|
const info = this.currentChatInfo();
|
|
15049
15058
|
if (!info)
|
|
15050
15059
|
return null;
|
|
15060
|
+
if (info.itemType === 'artist' &&
|
|
15061
|
+
info.actorUserIds?.includes(msg.sender)) {
|
|
15062
|
+
return info.item;
|
|
15063
|
+
}
|
|
15051
15064
|
if (msg.sender === info.sender._id)
|
|
15052
15065
|
return info.sender;
|
|
15053
15066
|
if (msg.sender === info.receiver._id)
|
|
15054
15067
|
return info.receiver;
|
|
15055
15068
|
return null;
|
|
15056
15069
|
}
|
|
15070
|
+
otherUserType(msg) {
|
|
15071
|
+
const info = this.currentChatInfo();
|
|
15072
|
+
if (info?.itemType === 'artist' &&
|
|
15073
|
+
info.actorUserIds?.includes(msg.sender)) {
|
|
15074
|
+
return 'artist';
|
|
15075
|
+
}
|
|
15076
|
+
return 'user';
|
|
15077
|
+
}
|
|
15057
15078
|
isSameDay(a, b) {
|
|
15058
15079
|
if (!a || !b)
|
|
15059
15080
|
return true;
|
|
@@ -15183,7 +15204,7 @@ class XSChatConversationComponent {
|
|
|
15183
15204
|
}
|
|
15184
15205
|
}
|
|
15185
15206
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatConversationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15186
|
-
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=\"user\"\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 });
|
|
15207
|
+
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 });
|
|
15187
15208
|
}
|
|
15188
15209
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatConversationComponent, decorators: [{
|
|
15189
15210
|
type: Component,
|
|
@@ -15196,13 +15217,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
15196
15217
|
], host: {
|
|
15197
15218
|
'xs-chat-conversation-host': '',
|
|
15198
15219
|
class: 'flex flex-col min-h-0 flex-1',
|
|
15199
|
-
}, 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=\"user\"\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 " }]
|
|
15220
|
+
}, 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" }]
|
|
15200
15221
|
}], 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 }] }] } });
|
|
15201
15222
|
|
|
15202
15223
|
class XSChatFloatingPanelComponent {
|
|
15203
15224
|
isOpen = input(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
15204
15225
|
title = input('Chat', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
15205
15226
|
chats = input([], ...(ngDevMode ? [{ debugName: "chats" }] : []));
|
|
15227
|
+
searchQuery = signal('', ...(ngDevMode ? [{ debugName: "searchQuery" }] : []));
|
|
15228
|
+
filteredChats = computed(() => {
|
|
15229
|
+
const query = this.searchQuery().toLocaleLowerCase().trim();
|
|
15230
|
+
if (!query)
|
|
15231
|
+
return this.chats();
|
|
15232
|
+
return this.chats().filter((chat) => [chat.sender.name, chat.receiver.name, chat.item?.name]
|
|
15233
|
+
.filter((name) => !!name)
|
|
15234
|
+
.some((name) => name.toLocaleLowerCase().includes(query)));
|
|
15235
|
+
}, ...(ngDevMode ? [{ debugName: "filteredChats" }] : []));
|
|
15206
15236
|
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
15207
15237
|
messages = input([], ...(ngDevMode ? [{ debugName: "messages" }] : []));
|
|
15208
15238
|
currentChatInfo = input(null, ...(ngDevMode ? [{ debugName: "currentChatInfo" }] : []));
|
|
@@ -15332,6 +15362,9 @@ class XSChatFloatingPanelComponent {
|
|
|
15332
15362
|
onSelectChat(chat) {
|
|
15333
15363
|
this.selectChat.emit(chat);
|
|
15334
15364
|
}
|
|
15365
|
+
onSearchQueryChange(query) {
|
|
15366
|
+
this.searchQuery.set(query);
|
|
15367
|
+
}
|
|
15335
15368
|
onSendMessage(event) {
|
|
15336
15369
|
this.sendMessage.emit(event);
|
|
15337
15370
|
}
|
|
@@ -15354,7 +15387,7 @@ class XSChatFloatingPanelComponent {
|
|
|
15354
15387
|
this.clickDropdownItem.emit(event);
|
|
15355
15388
|
}
|
|
15356
15389
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatFloatingPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15357
|
-
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]=\"chats()\"\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 (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", "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 });
|
|
15390
|
+
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", "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 });
|
|
15358
15391
|
}
|
|
15359
15392
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatFloatingPanelComponent, decorators: [{
|
|
15360
15393
|
type: Component,
|
|
@@ -15362,7 +15395,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
15362
15395
|
CommonModule,
|
|
15363
15396
|
XSChatListComponent,
|
|
15364
15397
|
XSChatConversationComponent,
|
|
15365
|
-
], 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]=\"
|
|
15398
|
+
], 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" }]
|
|
15366
15399
|
}], 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"] }] } });
|
|
15367
15400
|
|
|
15368
15401
|
class XSCustomizeProfileComponent {
|
|
@@ -17710,7 +17743,7 @@ class XSTableItemsChatComponent {
|
|
|
17710
17743
|
}
|
|
17711
17744
|
}
|
|
17712
17745
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17713
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsChatComponent, isStandalone: true, selector: "xs-table-items-chat", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@switch (header().type) {\n @case ('chatUser') {\n <div class=\"flex items-center gap-3\">\n
|
|
17746
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsChatComponent, isStandalone: true, selector: "xs-table-items-chat", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@switch (header().type) {\n @case ('chatUser') {\n @if (item()[header().key]; as user) {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-8\">\n <xs-image\n [item]=\"user\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\">\n {{ (user.name || nobodyText) | truncateText: 40 }}\n </p>\n <p class=\"text-xs font-extralight\">{{ userText }}</p>\n </div>\n </div>\n } @else {\n <p class=\"text-xs font-extralight\">{{ nobodyText }}</p>\n }\n }\n @case ('chatItem') {\n <div class=\"flex items-center gap-3\">\n @if (item()[header().key]) {\n <div class=\"w-8\">\n <xs-image\n [item]=\"item()[header().key]\"\n [typeItem]=\"item().type\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n }\n <div class=\"flex flex-col gap-1\">\n @if (item()[header().key]) {\n <p class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\">\n {{ item()[header().key].name | truncateText: 40 }}\n </p>\n }\n <p class=\"text-xs font-extralight\">{{ item().type | typeES }}</p>\n </div>\n </div>\n }\n @case ('chatBy') {\n @if (!item()[header().key] || item()[header().key].length === 0) {\n <p class=\"text-xs font-extralight\">{{ nobodyText }}</p>\n }\n @if (item()[header().key] && item()[header().key].length > 0) {\n @if (item().sender && item().receiver) {\n <div class=\"flex items-center gap-2\">\n <div class=\"w-8 h-8 rounded-xl\">\n <xs-image\n [item]=\"item().sender._id === item()[header().key][0] ? item().sender : item().receiver\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\">\n {{ (item().sender._id === item()[header().key][0] ? item().sender.name : item().receiver.name) || nobodyText }}\n </p>\n <p class=\"text-xs font-extralight\">{{ userText }}</p>\n </div>\n </div>\n } @else {\n <p class=\"text-xs font-extralight\">{{ nobodyText }}</p>\n }\n }\n }\n @case ('chatLastMessage') {\n @if (item().lastMessage) {\n @let lastMessageUser = item().lastMessage.user === item().sender?._id ? item().sender : item().receiver;\n <div class=\"flex items-center gap-2\">\n @if (lastMessageUser) {\n <div class=\"w-8 h-8 rounded-xl\">\n <xs-image\n [item]=\"lastMessageUser\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n }\n <div class=\"flex flex-col gap-1\">\n <p class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\">\n {{ lastMessageUser?.name || nobodyText }}\n </p>\n <p class=\"mr-2 text-xs leading-none font-extralight\">\n {{ item().lastMessage.text | truncateText: 40 }}\n </p>\n </div>\n </div>\n }\n @if (!item().lastMessage) {\n <p class=\"text-xs font-extralight\">{{ noMessagesText }}</p>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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"] }, { kind: "pipe", type: TruncateTextPipe, name: "truncateText" }, { kind: "pipe", type: TypeESPipe, name: "typeES" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17714
17747
|
}
|
|
17715
17748
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsChatComponent, decorators: [{
|
|
17716
17749
|
type: Component,
|
|
@@ -17719,7 +17752,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
17719
17752
|
XSImageComponent,
|
|
17720
17753
|
TruncateTextPipe,
|
|
17721
17754
|
TypeESPipe,
|
|
17722
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (header().type) {\n @case ('chatUser') {\n <div class=\"flex items-center gap-3\">\n
|
|
17755
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (header().type) {\n @case ('chatUser') {\n @if (item()[header().key]; as user) {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-8\">\n <xs-image\n [item]=\"user\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\">\n {{ (user.name || nobodyText) | truncateText: 40 }}\n </p>\n <p class=\"text-xs font-extralight\">{{ userText }}</p>\n </div>\n </div>\n } @else {\n <p class=\"text-xs font-extralight\">{{ nobodyText }}</p>\n }\n }\n @case ('chatItem') {\n <div class=\"flex items-center gap-3\">\n @if (item()[header().key]) {\n <div class=\"w-8\">\n <xs-image\n [item]=\"item()[header().key]\"\n [typeItem]=\"item().type\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n }\n <div class=\"flex flex-col gap-1\">\n @if (item()[header().key]) {\n <p class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\">\n {{ item()[header().key].name | truncateText: 40 }}\n </p>\n }\n <p class=\"text-xs font-extralight\">{{ item().type | typeES }}</p>\n </div>\n </div>\n }\n @case ('chatBy') {\n @if (!item()[header().key] || item()[header().key].length === 0) {\n <p class=\"text-xs font-extralight\">{{ nobodyText }}</p>\n }\n @if (item()[header().key] && item()[header().key].length > 0) {\n @if (item().sender && item().receiver) {\n <div class=\"flex items-center gap-2\">\n <div class=\"w-8 h-8 rounded-xl\">\n <xs-image\n [item]=\"item().sender._id === item()[header().key][0] ? item().sender : item().receiver\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\">\n {{ (item().sender._id === item()[header().key][0] ? item().sender.name : item().receiver.name) || nobodyText }}\n </p>\n <p class=\"text-xs font-extralight\">{{ userText }}</p>\n </div>\n </div>\n } @else {\n <p class=\"text-xs font-extralight\">{{ nobodyText }}</p>\n }\n }\n }\n @case ('chatLastMessage') {\n @if (item().lastMessage) {\n @let lastMessageUser = item().lastMessage.user === item().sender?._id ? item().sender : item().receiver;\n <div class=\"flex items-center gap-2\">\n @if (lastMessageUser) {\n <div class=\"w-8 h-8 rounded-xl\">\n <xs-image\n [item]=\"lastMessageUser\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n }\n <div class=\"flex flex-col gap-1\">\n <p class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\">\n {{ lastMessageUser?.name || nobodyText }}\n </p>\n <p class=\"mr-2 text-xs leading-none font-extralight\">\n {{ item().lastMessage.text | truncateText: 40 }}\n </p>\n </div>\n </div>\n }\n @if (!item().lastMessage) {\n <p class=\"text-xs font-extralight\">{{ noMessagesText }}</p>\n }\n }\n}\n" }]
|
|
17723
17756
|
}], ctorParameters: () => [], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }] } });
|
|
17724
17757
|
|
|
17725
17758
|
class XSTableItemsContactComponent {
|
|
@@ -18296,7 +18329,7 @@ class XSTableItemsComponent {
|
|
|
18296
18329
|
: button.icon;
|
|
18297
18330
|
}
|
|
18298
18331
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18299
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsComponent, isStandalone: true, selector: "xs-table-items", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, subType: { classPropertyName: "subType", publicName: "subType", isSignal: true, isRequired: true, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, admin: { classPropertyName: "admin", publicName: "admin", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "xs-table-items-host": "" } }, ngImport: i0, template: "@let i = $any(item());\n@if (header().key === 'status') {\n <div class=\"flex items-center gap-3\">\n <div\n class=\"w-3 h-3 rounded-full shadow-lg\"\n [ngClass]=\"{\n 'bg-green-500 shadow-green-500/50': i.status === 'active',\n 'bg-yellow-500 shadow-yellow-500/50': i.status === 'pending',\n 'bg-gray-500 shadow-gray-500/50': !i.status || i.status === 'inactive',\n }\"\n ></div>\n <span class=\"text-sm font-medium text-zinc-700 dark:text-zinc-300 capitalize\">\n {{ i.status || textsService.t('TABLE_ITEMS.NO_STATUS') }}\n </span>\n </div>\n} @else if (header().key === 'multilanguage') {\n <span>{{ $any(item())[header().key] ? textsService.t('TABLE_ITEMS.ACTIVE') : textsService.t('TABLE_ITEMS.INACTIVE') }}</span>\n} @else {\n @switch (componentType) {\n @case ('entity') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n @case ('state') {\n <xs-table-items-state [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-state>\n }\n @case ('visits') {\n <xs-table-items-visits [header]=\"header()\" [item]=\"$any(item())\" [filters]=\"filters()\" [admin]=\"admin()\"></xs-table-items-visits>\n }\n @case ('chat') {\n <xs-table-items-chat [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-chat>\n }\n @case ('contact') {\n <xs-table-items-contact [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-contact>\n }\n @case ('promotion') {\n <xs-table-items-promotion [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-promotion>\n }\n @case ('date') {\n <xs-table-items-date [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-date>\n }\n @case ('country') {\n <xs-table-items-country [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-country>\n }\n @case ('role') {\n <xs-table-items-role [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-role>\n }\n\n @case ('imageVisit') {\n <div class=\"w-12\">\n <xs-image\n [item]=\"$any(item())[i.type]\"\n [typeItem]=\"i.type\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"i._id\"\n rounded=\"2xl\"\n [objectFit]=\"'cover'\"\n customClass=\"lg:h-12 lg:w-12\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n }\n\n @case ('imageName') {\n <div class=\"flex items-center\">\n <div class=\"h-10 w-10 mr-2\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"typeForImage\"\n [viewTransitionName]=\"$any(itemForImage)?._id\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"cover\"\n customClass=\"mr-2\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold truncate text-zinc-900 dark:text-zinc-100 leading-tight\"\n [ngClass]=\"{\n 'cursor-pointer hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200': header().action,\n }\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </p>\n @if ($any(itemForDisplay)?.user?.name) {\n <p class=\"text-xs font-extralight\">\n {{ $any(itemForDisplay).user.name | truncateText: 25 }}\n </p>\n }\n </div>\n </div>\n }\n\n @case ('imageNameExternal') {\n <div class=\"flex items-center\">\n <div class=\"h-10 w-10 mr-2 shrink-0\">\n @if ($any(item())[header().key]) {\n <xs-image\n [src]=\"$any(item())[header().key]\"\n alt=\"\"\n customClass=\"w-10 h-10 object-cover rounded-lg\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <p\n class=\"text-base font-bold truncate text-zinc-900 dark:text-zinc-100 leading-tight\"\n [ngClass]=\"{\n 'cursor-pointer hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200': header().action,\n }\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </p>\n </div>\n </div>\n }\n\n @case ('name') {\n <a\n class=\"text-sm font-black truncate\"\n [ngClass]=\"{ 'cursor-pointer': header().action }\"\n >\n @if ($any(item())[header().key]) {\n {{ $any(item())[header().key] }}\n }\n </a>\n }\n\n @case ('nameLike') {\n <div class=\"flex gap-3 items-center\">\n <div class=\"h-9 w-9\">\n @if (($any(item())[i.type] && $any(item())[i.type].image) || i.playlist?.cover || i.name) {\n <xs-image\n [item]=\"!i.playlist?.cover ? $any(item())[i.type] : i.name ? { _id: '1', image: true } : { _id: i.playlist?.cover, image: true }\"\n [typeItem]=\"!i.playlist?.cover ? i.type : i.name ? 'artist' : 'media'\"\n [size]=\"'full'\"\n rounded=\"lg\"\n [objectFit]=\"'contain'\"\n [generateAvatar]=\"true\"\n ></xs-image>\n }\n @if ($any(item())[i.type] && !$any(item())[i.type].image && !i.playlist?.cover) {\n <xs-image\n [src]=\"'/assets/images/xsmusic-logo.png'\"\n [alt]=\"'XSMusic'\"\n [objectFit]=\"'cover'\"\n rounded=\"lg\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col\">\n @if ($any(item())[i.type] && $any(item())[i.type].name) {\n <a class=\"mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n <p class=\"flex items-center gap-1\">\n {{ $any(item())[i.type].name }}\n @if ($any(item())[i.type].user && $any(item())[i.type].user._id && $any(item())[i.type].user._id !== adminUser) {\n <svg [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\" fill=\"rgb(0, 149, 246)\" height=\"10\" viewBox=\"0 0 40 40\" width=\"10\">\n <path d=\"M19.998 3.094 14.638 0l-2.972 5.15H5.432v6.354L0 14.64 3.094 20 0 25.359l5.432 3.137v5.905h5.975L14.638 40l5.36-3.094L25.358 40l3.232-5.6h6.162v-6.01L40 25.359 36.905 20 40 14.641l-5.248-3.03v-6.46h-6.419L25.358 0l-5.36 3.094Zm7.415 11.225 2.254 2.287-11.43 11.5-6.835-6.93 2.244-2.258 4.587 4.581 9.18-9.18Z\" fill-rule=\"evenodd\"></path>\n </svg>\n }\n </p>\n </a>\n }\n @if (i.name) {\n <a class=\"my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n <p>{{ i.name }}</p>\n </a>\n }\n <p class=\"mt-1 text-sm leading-none text-gray-500 dark:text-gray-400 font-extralight\">\n @if (i.type !== 'media' && i.type !== 'site' && i.type !== 'organization' && i.type !== 'visit' && !i.name) {\n <span>{{ i.type | typeES }}</span>\n }\n @if (i.type === 'visit') {\n <span>{{ i.visit?.type ?? '' | lowercase | typeES | firstLetterCase }}</span>\n }\n @if (i.type === 'media' || i.type === 'site') {\n <span>{{ $any(item())[i.type]?.type | typeES }}</span>\n }\n @if (i.type === 'organization') {\n <span>{{ $any(item())[i.type]?.types && $any(item())[i.type]?.types.length > 0 ? ($any(item())[i.type]?.types[0] | typeES) : '' }}</span>\n }\n @if (i.name) {\n <span class=\"text-sm font-extralight dark:text-zinc-400\">{{ i.type }}</span>\n }\n </p>\n </div>\n </div>\n }\n\n @case ('visitPage') {\n <div class=\"flex gap-3 items-center\">\n <div class=\"w-8 h-8 shrink-0\">\n @if (i.entityImage && i.entityType) {\n <xs-image\n [item]=\"{ _id: i.entityId, image: true }\"\n [typeItem]=\"i.entityType\"\n [size]=\"'xs'\"\n [rounded]=\"'full'\"\n [objectFit]=\"'cover'\"\n [generateAvatar]=\"true\"\n ></xs-image>\n } @else {\n <div class=\"flex items-center justify-center w-8 h-8 rounded-full bg-zinc-800/50 shrink-0\">\n <xs-icon [icon]=\"i.icon || 'file-text'\" class=\"text-zinc-500 text-xs\"></xs-icon>\n </div>\n }\n </div>\n <div class=\"flex flex-col min-w-0 flex-1\">\n <p class=\"text-sm truncate text-zinc-300 leading-tight\">\n {{ i.pageLabel || i.entityName || i.name || '-' }}\n </p>\n @if (i.entityTypeLabel) {\n <p class=\"text-[10px] text-zinc-500 leading-tight mt-0.5\">\n {{ i.entityTypeLabel }}\n </p>\n }\n </div>\n </div>\n }\n\n @case ('isLiked') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-12\">\n <xs-image\n [item]=\"i?.user\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n [objectFit]=\"'cover'\"\n rounded=\"2xl\"\n customClass=\"lg:h-12 lg:w-12\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <a class=\"block my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n {{ i.user?.name ?? textsService.t('TABLE_ITEMS.USER_DELETED') }}\n </a>\n <p class=\"mt-1 text-sm leading-none text-gray-500 dark:text-gray-400 font-extralight\">\n {{ (i.user?.type | XSTypeUser) ?? textsService.unknown }}\n </p>\n </div>\n </div>\n }\n\n @case ('nameStatsPage') {\n <a\n [href]=\"getUrlStatsPage($any(item()))\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"flex flex-col my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\"\n >\n <span>{{ i.name | truncateText: 60 }}</span>\n <span class=\"text-sm font-extralight dark:text-zinc-400\">{{ i.path }}</span>\n </a>\n }\n\n @case ('nameStatsEvent') {\n <a\n [href]=\"getUrlStatsPage($any(item()))\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"flex flex-col my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\"\n >\n <span>\n {{ getNameOrCategoryEvent(i.name, 'name')! }}\n <span>{{ getNameOrCategoryEvent(i.name, 'value') }}</span>\n </span>\n <span class=\"text-sm font-extralight dark:text-zinc-400\">\n {{ getNameOrCategoryEvent(i.name, 'category') | titlecase }}\n </span>\n </a>\n }\n\n @case ('type') {\n <xs-badge\n [size]=\"'md'\"\n [icon]=\"'folder'\"\n [label]=\"$any(item())[header().key]\"\n ></xs-badge>\n }\n\n @case ('typeUser') {\n <xs-badge\n [size]=\"'md'\"\n [icon]=\"'folder'\"\n [label]=\"$any(item())[header().key] | XSTypeUser\"\n ></xs-badge>\n }\n\n @case ('typeOrSubtype') {\n @let typeLabel = i.type === 'media' || i.type === 'site'\n ? (i.subtype | titlecase)\n : i.type === 'organization'\n ? (i.subtype | typeES)\n : (i.type | typeES);\n @let normalizedType = (typeLabel + '').toLowerCase();\n @if (typeLabel) {\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n normalizedType.includes('club') || normalizedType.includes('sala') || normalizedType.includes('bar')\n ? 'info'\n : normalizedType.includes('festival') || normalizedType.includes('concierto') || normalizedType.includes('evento')\n ? 'success'\n : normalizedType.includes('promot') || normalizedType.includes('agencia') || normalizedType.includes('management')\n ? 'warning'\n : normalizedType.includes('discoteca') || normalizedType.includes('teatro')\n ? 'secondary'\n : 'default'\n \"\n [label]=\"typeLabel\"\n ></xs-badge>\n }\n }\n\n @case ('fieldReport') {\n <p class=\"font-extralight\">{{ i.message?.split(': ')[0] ?? '' | truncateText: 50 }}</p>\n }\n\n @case ('year') {\n @if (i.year) {\n <xs-badge [size]=\"'md'\" [label]=\"i.year + ''\"></xs-badge>\n }\n }\n\n @case ('normal') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('normalTypeLink') {\n @if ($any(item())[i.type] && $any(item())[i.type].name) {\n <a>{{ $any(item())[i.type].name }}</a>\n }\n }\n\n @case ('siteType') {\n @if (i.site?.type) {\n @let siteTypeLabel = i.site.type | titlecase;\n @let normalizedSiteType = (siteTypeLabel + '').toLowerCase();\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n normalizedSiteType.includes('club') || normalizedSiteType.includes('sala') || normalizedSiteType.includes('bar')\n ? 'info'\n : normalizedSiteType.includes('festival') || normalizedSiteType.includes('concierto') || normalizedSiteType.includes('evento')\n ? 'success'\n : normalizedSiteType.includes('promot') || normalizedSiteType.includes('agencia')\n ? 'warning'\n : 'default'\n \"\n [label]=\"siteTypeLabel\"\n ></xs-badge>\n }\n }\n\n @case ('value') {\n <span class=\"font-extralight\">\n {{ $any(item())[header().key] != null ? '\u20AC' + ($any(item())[header().key] | number: '1.2-2') : '' }}\n </span>\n }\n\n @case ('source') {\n @if (i.source === 'youtube' || i.source === 'soundcloud') {\n <xs-icon\n [icon]=\"i.source === 'youtube' ? ['fab', 'youtube'] : ['fab', 'soundcloud']\"\n [ngClass]=\"{\n 'text-red-600': i.source === 'youtube',\n 'text-orange-600': i.source === 'soundcloud',\n }\"\n ></xs-icon>\n }\n @if (i.source && i.source !== 'youtube' && i.source !== 'soundcloud') {\n <span>{{ i.source }}</span>\n }\n }\n\n @case ('xsSemi') {\n <p class=\"text-xs font-semibold\">{{ $any(item())[header().key] ?? '' }}</p>\n }\n\n @case ('xsSemiNumber') {\n <p class=\"text-xs font-semibold\">{{ $any(item())[header().key] ?? 0 }}</p>\n }\n\n @case ('boolean') {\n <p>{{ $any(item())[header().key] ? textsService.yes : textsService.no }}</p>\n }\n\n @case ('booleanImage') {\n <xs-icon\n [icon]=\"$any(item())[header().key] ? 'check' : 'close'\"\n [ngClass]=\"{\n 'text-green-500': $any(item())[header().key],\n 'text-red-500': !$any(item())[header().key],\n }\"\n ></xs-icon>\n }\n\n @case ('booleanImageReverse') {\n <xs-icon\n [icon]=\"!$any(item())[header().key] ? 'check' : 'close'\"\n [ngClass]=\"{\n 'text-green-500': !$any(item())[header().key],\n 'text-red-500': $any(item())[header().key],\n }\"\n ></xs-icon>\n }\n\n @case ('slugTrueFalse') {\n <span class=\"px-2 py-1 rounded-xl bg-zinc-900/50\">\n <xs-icon\n [icon]=\"i.slug && i.slug !== 'None' ? 'check' : 'close'\"\n ></xs-icon>\n </span>\n }\n\n @case ('coordinates') {\n @if ($any(item())[header().key] && ($any(item())[header().key].lat || $any(item())[header().key].lng)) {\n <span>{{ ($any(item())[header().key].lat | number: '1.4-4') || ($any(item())[header().key].lng | number: '1.4-4') }}</span>\n }\n @if ($any(item())[header().key] && ($any(item())[header().key].lon || $any(item())[header().key].lng)) {\n <span>{{ $any(item())[header().key].lon || $any(item())[header().key].lng | number: '1.4-4' }}</span>\n }\n @if (!$any(item())[header().key]) {\n <span>{{ $any(item())[header().key] }}</span>\n }\n }\n\n @case ('typeVisit') {\n <xs-badge [size]=\"'md'\" [variant]=\"'error'\" [label]=\"$any(item())[header().key] | typeES\"></xs-badge>\n }\n\n @case ('language') {\n <xs-badge\n [size]=\"'md'\"\n [url]=\"(i.language === 'es' ? i.language : 'us') | countryFlag\"\n [label]=\"i.language === 'es' ? textsService.t('TABLE_ITEMS.LANGUAGE.ES') : i.language === 'en' ? textsService.t('TABLE_ITEMS.LANGUAGE.EN') : (i.language | titlecase)\"\n ></xs-badge>\n }\n\n @case ('claimed') {\n @let isClaimed = i.user && (!i.user.name || i.user.name !== 'XSMusic');\n <xs-badge [size]=\"'md'\" [variant]=\"isClaimed ? 'success' : 'error'\">\n <xs-icon [icon]=\"isClaimed ? 'check' : 'close'\" size=\"xs\"></xs-icon>\n </xs-badge>\n }\n\n @case ('commentTruncate') {\n <a>{{ $any(item())[header().key] | truncateText: 20 }}</a>\n }\n\n @case ('user') {\n @if (i.user) {\n <div class=\"flex gap-3 mr-16 items-center\">\n <div class=\"h-9 w-9\">\n <xs-image\n [item]=\"i.user\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"contain\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col items-center\">\n <a class=\"block mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n {{ i.user?.name }}\n </a>\n <div class=\"flex gap-2 items-start w-full\">\n @if (i.user.country && i.user.country.code) {\n <xs-image\n [src]=\"i.user.country.code | countryFlag\"\n [alt]=\"i.user.country.code\"\n size=\"xs\"\n ></xs-image>\n }\n <p class=\"mt-1 text-sm leading-none text-gray-400 font-extralight\">\n {{ i.user && i.user.type ? (i.user.type | XSTypeUser) : textsService.t('TABLE_ITEMS.ROLE.USER') }}\n </p>\n </div>\n </div>\n </div>\n }\n }\n\n @case ('styles') {\n @if (i.styles) {\n <div class=\"flex min-w-[11rem] flex-nowrap items-center gap-1 overflow-hidden\">\n @for (style of getStyles($any(item())) | sliceArray: 0 : 2; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 shrink-0 rounded-full\"\n [style.background-color]=\"$any(style).color || '#71717a'\"\n ></span>\n <span class=\"truncate\">{{ style.name ?? '' | truncateText: 15 | titlecase }}</span>\n </xs-badge>\n }\n @if (i.styles.length > 2) {\n <xs-badge [size]=\"'sm'\" [variant]=\"'secondary'\" [customClasses]=\"'shrink-0'\" [label]=\"'+' + (i.styles.length - 2)\"></xs-badge>\n }\n </div>\n @if (i.styles.length === 0) {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NO_STYLES')\"></xs-badge>\n }\n }\n }\n\n @case ('artists') {\n @let artists = getArtists($any(item()));\n @if (artists.length > 0) {\n <div class=\"flex min-w-[11rem] flex-nowrap items-center gap-1 overflow-hidden\">\n @for (artist of artists | sliceArray: 0 : 2; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <div class=\"h-4 w-4 shrink-0 overflow-hidden rounded-full\">\n <xs-image\n [item]=\"artist\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n size=\"full\"\n rounded=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <span class=\"truncate\">{{ artist.name }}</span>\n </xs-badge>\n }\n @if (artists.length > 2) {\n <xs-badge [size]=\"'sm'\" [variant]=\"'secondary'\" [customClasses]=\"'shrink-0'\" [label]=\"'+' + (artists.length - 2)\"></xs-badge>\n }\n </div>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"'0'\"></xs-badge>\n }\n }\n\n @case ('artistsEvent') {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"(i.artists && (i.artists.length ?? 0)) + ''\"\n ></xs-badge>\n }\n\n @case ('displayZones') {\n <div class=\"flex flex-wrap gap-1\">\n @for (zone of i.displayZones; track $index) {\n <xs-badge [size]=\"'md'\" [variant]=\"'amber'\" [label]=\"zone | firstLetterCase\"></xs-badge>\n }\n </div>\n }\n\n @case ('types') {\n <div class=\"flex min-w-[11rem] flex-wrap items-center gap-1\">\n @for (type of $any(item())[header().key]; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 shrink-0 rounded-full\"\n [style.background-color]=\"$any(type)?.color || $any(type)?.style?.color || '#a1a1aa'\"\n ></span>\n <span class=\"truncate\">{{ type | typeES }}</span>\n </xs-badge>\n }\n </div>\n }\n\n @case ('equipmentSetups') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.equipmentSetups || 0) + ' ' + (i.equipmentSetups === 1 ? 'usuario' : 'usuarios')\"></xs-badge>\n }\n\n @case ('equipmentSetupComponents') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.components?.length || 0) + ''\"></xs-badge>\n }\n\n @case ('typeEquipment') {\n <div class=\"flex flex-col items-start gap-1\">\n <div class=\"flex items-center gap-1\">\n <div class=\"w-2.5 h-2.5 text-xs border border-zinc-900 bg-zinc-900/50\"></div>\n <div class=\"flex flex-col\">\n <span class=\"text-xs font-extralight\">{{ i.type?.name }}</span>\n </div>\n </div>\n </div>\n }\n\n @case ('slides') {\n {{ i.slides?.length || 0 }} slides\n }\n\n @case ('socialLogin') {\n @if (socialLoginButtons.length === 1) {\n <xs-button\n [icon]=\"getButtonIcon(socialLoginButtons[0])\"\n [variant]=\"socialLoginButtons[0].variant || 'primary'\"\n [layout]=\"socialLoginButtons[0].layout || 'base'\"\n class=\"max-w-fit\"\n ></xs-button>\n }\n @if (socialLoginButtons.length > 1) {\n <xs-buttons-group\n [buttonsInput]=\"socialLoginButtons\"\n class=\"max-w-fit\"\n ></xs-buttons-group>\n }\n }\n\n @case ('jira') {\n @if (i.jira) {\n <span class=\"text-xs\">{{ i.jira }}</span>\n }\n @if (!i.jira) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n }\n\n @case ('suggestionType') {\n <xs-badge [size]=\"'md'\" [variant]=\"'error'\" [label]=\"(i.suggestionType ?? i.type) + ''\"></xs-badge>\n }\n\n @case ('typeModel') {\n <xs-badge\n size=\"md\"\n [label]=\"i.appType === 'web' ? 'PWA' : i.appType === 'mobile' ? 'APP' : 'N/D'\"\n [icon]=\"getIconDeviceBrand($any(item()))\"\n ></xs-badge>\n }\n\n @case ('appVersion') {\n <p class=\"text-sm\">{{ i.appVersion }}</p>\n }\n\n @case ('faqCategory') {\n <p>{{ i.category?.name }}</p>\n }\n\n @case ('faqPosition') {\n {{ i.category?.position ?? '' }} / {{ i.position }}\n }\n\n @case ('countryArtist') {\n <xs-badge\n [size]=\"'md'\"\n [url]=\"i.country?.code ? (i.country.code | countryFlag) : ''\"\n [label]=\"i.country?.name || i.country?.code || ''\"\n ></xs-badge>\n }\n\n @case ('durationPromotion') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.duration ?? 0) + ' d\u00EDas'\"></xs-badge>\n }\n\n @case ('githubDateDuration') {\n <div class=\"flex flex-col text-xs font-extralight\">\n <div class=\"flex items-center gap-1\">\n <xs-icon size=\"xs\" [icon]=\"['far', 'calendar']\"></xs-icon>\n {{ i.created_at | date: 'dd/MM/yyyy' }}\n </div>\n <div class=\"flex items-center gap-1\">\n <xs-icon size=\"xs\" [icon]=\"'clock'\"></xs-icon>\n {{ i.duration }}\n </div>\n </div>\n }\n\n @case ('organizationItem') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('playlist') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('position') {\n <span class=\"font-black\">#{{ $any(item())[header().key] }}</span>\n }\n\n @case ('recordLabelItem') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('scrapingEvents') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('startEnd') {\n <div class=\"flex flex-col text-xs\">\n <span>{{ i.date | date: 'dd/MM/yyyy' }}</span>\n <span>{{ i.endDate | date: 'dd/MM/yyyy' }}</span>\n </div>\n }\n\n @case ('town') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('scrapingEventHeader') {\n <div class=\"flex items-center gap-2\">\n <div class=\"h-10 w-10 shrink-0 overflow-hidden rounded-lg bg-zinc-800\">\n @if ($any(item())['image']) {\n <xs-image\n [src]=\"$any(item())['image']\"\n alt=\"\"\n customClass=\"object-cover w-full h-full\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <a\n class=\"font-medium text-sm truncate text-zinc-900 dark:text-zinc-100 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200\"\n [href]=\"'https://ra.co/events/' + $any(item())['ra']\"\n target=\"_blank\"\n rel=\"nofollow noopener\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </a>\n </div>\n </div>\n }\n\n @case ('scrapingEventSite') {\n @if ($any(item())['site']?._id === adminUser.ANONYMOUS_SITE) {\n <span class=\"text-sm text-zinc-300\">-</span>\n } @else {\n <div class=\"flex items-center gap-1.5\">\n @if ($any(item())['site']?.address?.country?.code) {\n <img\n [src]=\"$any(item())['site'].address.country.code | countryFlag\"\n [alt]=\"$any(item())['site'].address.country.name\"\n class=\"w-4 h-4 shrink-0\"\n />\n }\n <span class=\"text-sm truncate text-zinc-300\">{{ $any(item())['site']?.name }}</span>\n </div>\n }\n }\n\n @case ('normalBadge') {\n <xs-badge size=\"md\" [label]=\"$any(item())[header().key]\"></xs-badge>\n }\n\n @default {\n <span>{{ $any(item())[header().key] }}</span>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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"] }, { kind: "component", type: XSIconComponent, selector: "xs-icon", inputs: ["icon", "size", "class"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: XSBadgeComponent, selector: "xs-badge", inputs: ["variant", "size", "ariaLabel", "icon", "url", "label", "customClasses"] }, { kind: "component", type: XSButtonsGroupComponent, selector: "xs-buttons-group", inputs: ["buttonsInput", "buttonClick"], outputs: ["buttonClickOutput"] }, { 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"] }, { kind: "component", type: XSTableItemsEntityComponent, selector: "xs-table-items-entity", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsStateComponent, selector: "xs-table-items-state", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsVisitsComponent, selector: "xs-table-items-visits", inputs: ["header", "item", "filters", "admin"] }, { kind: "component", type: XSTableItemsChatComponent, selector: "xs-table-items-chat", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsContactComponent, selector: "xs-table-items-contact", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsPromotionComponent, selector: "xs-table-items-promotion", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsDateComponent, selector: "xs-table-items-date", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsCountryComponent, selector: "xs-table-items-country", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsRoleComponent, selector: "xs-table-items-role", inputs: ["header", "item"] }, { kind: "pipe", type: i1$1.LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: TypeESPipe, name: "typeES" }, { kind: "pipe", type: XSTypeUserPipe, name: "XSTypeUser" }, { kind: "pipe", type: TruncateTextPipe, name: "truncateText" }, { kind: "pipe", type: SliceArrayPipe, name: "sliceArray" }, { kind: "pipe", type: XSFirstLetterPipe, name: "firstLetterCase" }, { kind: "pipe", type: CountryFlagPipe, name: "countryFlag" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
18332
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsComponent, isStandalone: true, selector: "xs-table-items", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, subType: { classPropertyName: "subType", publicName: "subType", isSignal: true, isRequired: true, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, admin: { classPropertyName: "admin", publicName: "admin", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "xs-table-items-host": "" } }, ngImport: i0, template: "@let i = $any(item());\n@if (header().key === 'status') {\n <div class=\"flex items-center gap-3\">\n <div\n class=\"w-3 h-3 rounded-full shadow-lg\"\n [ngClass]=\"{\n 'bg-green-500 shadow-green-500/50': i.status === 'active',\n 'bg-yellow-500 shadow-yellow-500/50': i.status === 'pending',\n 'bg-gray-500 shadow-gray-500/50': !i.status || i.status === 'inactive',\n }\"\n ></div>\n <span class=\"text-sm font-medium text-zinc-700 dark:text-zinc-300 capitalize\">\n {{ i.status || textsService.t('TABLE_ITEMS.NO_STATUS') }}\n </span>\n </div>\n} @else if (header().key === 'multilanguage') {\n <span>{{ $any(item())[header().key] ? textsService.t('TABLE_ITEMS.ACTIVE') : textsService.t('TABLE_ITEMS.INACTIVE') }}</span>\n} @else {\n @switch (componentType) {\n @case ('entity') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n @case ('state') {\n <xs-table-items-state [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-state>\n }\n @case ('visits') {\n <xs-table-items-visits [header]=\"header()\" [item]=\"$any(item())\" [filters]=\"filters()\" [admin]=\"admin()\"></xs-table-items-visits>\n }\n @case ('chat') {\n <xs-table-items-chat [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-chat>\n }\n @case ('contact') {\n <xs-table-items-contact [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-contact>\n }\n @case ('promotion') {\n <xs-table-items-promotion [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-promotion>\n }\n @case ('date') {\n <xs-table-items-date [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-date>\n }\n @case ('country') {\n <xs-table-items-country [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-country>\n }\n @case ('role') {\n <xs-table-items-role [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-role>\n }\n\n @case ('imageVisit') {\n <div class=\"w-12\">\n <xs-image\n [item]=\"$any(item())[i.type]\"\n [typeItem]=\"i.type\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"i._id\"\n rounded=\"2xl\"\n [objectFit]=\"'cover'\"\n customClass=\"lg:h-12 lg:w-12\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n }\n\n @case ('imageName') {\n <div class=\"flex items-center\">\n <div class=\"h-10 w-10 mr-2\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"typeForImage\"\n [viewTransitionName]=\"$any(itemForImage)?._id\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"cover\"\n customClass=\"mr-2\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold truncate text-zinc-900 dark:text-zinc-100 leading-tight\"\n [ngClass]=\"{\n 'cursor-pointer hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200': header().action,\n }\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </p>\n @if ($any(itemForDisplay)?.user?.name) {\n <p class=\"text-xs font-extralight\">\n {{ $any(itemForDisplay).user.name | truncateText: 25 }}\n </p>\n }\n </div>\n </div>\n }\n\n @case ('imageNameExternal') {\n <div class=\"flex items-center\">\n <div class=\"h-10 w-10 mr-2 shrink-0\">\n @if ($any(item())[header().key]) {\n <xs-image\n [src]=\"$any(item())[header().key]\"\n alt=\"\"\n customClass=\"w-10 h-10 object-cover rounded-lg\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <p\n class=\"text-base font-bold truncate text-zinc-900 dark:text-zinc-100 leading-tight\"\n [ngClass]=\"{\n 'cursor-pointer hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200': header().action,\n }\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </p>\n </div>\n </div>\n }\n\n @case ('name') {\n <a\n class=\"text-sm font-black truncate\"\n [ngClass]=\"{ 'cursor-pointer': header().action }\"\n >\n @if ($any(item())[header().key]) {\n {{ $any(item())[header().key] }}\n }\n </a>\n }\n\n @case ('nameLike') {\n <div class=\"flex gap-3 items-center\">\n <div class=\"h-9 w-9\">\n @if (($any(item())[i.type] && $any(item())[i.type].image) || i.playlist?.cover || i.name) {\n <xs-image\n [item]=\"!i.playlist?.cover ? $any(item())[i.type] : i.name ? { _id: '1', image: true } : { _id: i.playlist?.cover, image: true }\"\n [typeItem]=\"!i.playlist?.cover ? i.type : i.name ? 'artist' : 'media'\"\n [size]=\"'full'\"\n rounded=\"lg\"\n [objectFit]=\"'contain'\"\n [generateAvatar]=\"true\"\n ></xs-image>\n }\n @if ($any(item())[i.type] && !$any(item())[i.type].image && !i.playlist?.cover) {\n <xs-image\n [src]=\"'/assets/images/xsmusic-logo.png'\"\n [alt]=\"'XSMusic'\"\n [objectFit]=\"'cover'\"\n rounded=\"lg\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col\">\n @if ($any(item())[i.type] && $any(item())[i.type].name) {\n <a class=\"mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n <p class=\"flex items-center gap-1\">\n {{ $any(item())[i.type].name }}\n @if ($any(item())[i.type].user && $any(item())[i.type].user._id && $any(item())[i.type].user._id !== adminUser) {\n <svg [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\" fill=\"rgb(0, 149, 246)\" height=\"10\" viewBox=\"0 0 40 40\" width=\"10\">\n <path d=\"M19.998 3.094 14.638 0l-2.972 5.15H5.432v6.354L0 14.64 3.094 20 0 25.359l5.432 3.137v5.905h5.975L14.638 40l5.36-3.094L25.358 40l3.232-5.6h6.162v-6.01L40 25.359 36.905 20 40 14.641l-5.248-3.03v-6.46h-6.419L25.358 0l-5.36 3.094Zm7.415 11.225 2.254 2.287-11.43 11.5-6.835-6.93 2.244-2.258 4.587 4.581 9.18-9.18Z\" fill-rule=\"evenodd\"></path>\n </svg>\n }\n </p>\n </a>\n }\n @if (i.name) {\n <a class=\"my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n <p>{{ i.name }}</p>\n </a>\n }\n <p class=\"mt-1 text-sm leading-none text-gray-500 dark:text-gray-400 font-extralight\">\n @if (i.type !== 'media' && i.type !== 'site' && i.type !== 'organization' && i.type !== 'visit' && !i.name) {\n <span>{{ i.type | typeES }}</span>\n }\n @if (i.type === 'visit') {\n <span>{{ i.visit?.type ?? '' | lowercase | typeES | firstLetterCase }}</span>\n }\n @if (i.type === 'media' || i.type === 'site') {\n <span>{{ $any(item())[i.type]?.type | typeES }}</span>\n }\n @if (i.type === 'organization') {\n <span>{{ $any(item())[i.type]?.types && $any(item())[i.type]?.types.length > 0 ? ($any(item())[i.type]?.types[0] | typeES) : '' }}</span>\n }\n @if (i.name) {\n <span class=\"text-sm font-extralight dark:text-zinc-400\">{{ i.type }}</span>\n }\n </p>\n </div>\n </div>\n }\n\n @case ('visitPage') {\n <div class=\"flex gap-3 items-center\">\n <div class=\"w-8 h-8 shrink-0\">\n @if (i.entityImage && i.entityType) {\n <xs-image\n [item]=\"{ _id: i.entityId, image: true }\"\n [typeItem]=\"i.entityType\"\n [size]=\"'xs'\"\n [rounded]=\"'full'\"\n [objectFit]=\"'cover'\"\n [generateAvatar]=\"true\"\n ></xs-image>\n } @else {\n <div class=\"flex items-center justify-center w-8 h-8 rounded-full bg-zinc-800/50 shrink-0\">\n <xs-icon [icon]=\"i.icon || 'file-text'\" class=\"text-zinc-500 text-xs\"></xs-icon>\n </div>\n }\n </div>\n <div class=\"flex flex-col min-w-0 flex-1\">\n <p class=\"text-sm truncate text-zinc-300 leading-tight\">\n {{ i.pageLabel || i.entityName || i.name || '-' }}\n </p>\n @if (i.entityTypeLabel) {\n <p class=\"text-[10px] text-zinc-500 leading-tight mt-0.5\">\n {{ i.entityTypeLabel }}\n </p>\n }\n </div>\n </div>\n }\n\n @case ('isLiked') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-12\">\n <xs-image\n [item]=\"i?.user\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n [objectFit]=\"'cover'\"\n rounded=\"2xl\"\n customClass=\"lg:h-12 lg:w-12\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <a class=\"block my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n {{ i.user?.name ?? textsService.t('TABLE_ITEMS.USER_DELETED') }}\n </a>\n <p class=\"mt-1 text-sm leading-none text-gray-500 dark:text-gray-400 font-extralight\">\n {{ (i.user?.type | XSTypeUser) ?? textsService.unknown }}\n </p>\n </div>\n </div>\n }\n\n @case ('nameStatsPage') {\n <a\n [href]=\"getUrlStatsPage($any(item()))\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"flex flex-col my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\"\n >\n <span>{{ i.name | truncateText: 60 }}</span>\n <span class=\"text-sm font-extralight dark:text-zinc-400\">{{ i.path }}</span>\n </a>\n }\n\n @case ('nameStatsEvent') {\n <a\n [href]=\"getUrlStatsPage($any(item()))\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"flex flex-col my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\"\n >\n <span>\n {{ getNameOrCategoryEvent(i.name, 'name')! }}\n <span>{{ getNameOrCategoryEvent(i.name, 'value') }}</span>\n </span>\n <span class=\"text-sm font-extralight dark:text-zinc-400\">\n {{ getNameOrCategoryEvent(i.name, 'category') | titlecase }}\n </span>\n </a>\n }\n\n @case ('type') {\n <xs-badge\n [size]=\"'md'\"\n [icon]=\"'folder'\"\n [label]=\"$any(item())[header().key]\"\n ></xs-badge>\n }\n\n @case ('typeUser') {\n <xs-badge\n [size]=\"'md'\"\n [icon]=\"'folder'\"\n [label]=\"$any(item())[header().key] | XSTypeUser\"\n ></xs-badge>\n }\n\n @case ('typeOrSubtype') {\n @let typeLabel = i.type === 'media' || i.type === 'site'\n ? (i.subtype | titlecase)\n : i.type === 'organization'\n ? (i.subtype | typeES)\n : (i.type | typeES);\n @let normalizedType = (typeLabel + '').toLowerCase();\n @if (typeLabel) {\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n normalizedType.includes('club') || normalizedType.includes('sala') || normalizedType.includes('bar')\n ? 'info'\n : normalizedType.includes('festival') || normalizedType.includes('concierto') || normalizedType.includes('evento')\n ? 'success'\n : normalizedType.includes('promot') || normalizedType.includes('agencia') || normalizedType.includes('management')\n ? 'warning'\n : normalizedType.includes('discoteca') || normalizedType.includes('teatro')\n ? 'secondary'\n : 'default'\n \"\n [label]=\"typeLabel\"\n ></xs-badge>\n }\n }\n\n @case ('fieldReport') {\n <p class=\"font-extralight\">{{ i.message?.split(': ')[0] ?? '' | truncateText: 50 }}</p>\n }\n\n @case ('year') {\n @if (i.year) {\n <xs-badge [size]=\"'md'\" [label]=\"i.year + ''\"></xs-badge>\n }\n }\n\n @case ('normal') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('normalTypeLink') {\n @if ($any(item())[i.type] && $any(item())[i.type].name) {\n <a>{{ $any(item())[i.type].name }}</a>\n }\n }\n\n @case ('siteType') {\n @if (i.site?.type) {\n @let siteTypeLabel = i.site.type | titlecase;\n @let normalizedSiteType = (siteTypeLabel + '').toLowerCase();\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n normalizedSiteType.includes('club') || normalizedSiteType.includes('sala') || normalizedSiteType.includes('bar')\n ? 'info'\n : normalizedSiteType.includes('festival') || normalizedSiteType.includes('concierto') || normalizedSiteType.includes('evento')\n ? 'success'\n : normalizedSiteType.includes('promot') || normalizedSiteType.includes('agencia')\n ? 'warning'\n : 'default'\n \"\n [label]=\"siteTypeLabel\"\n ></xs-badge>\n }\n }\n\n @case ('value') {\n <span class=\"font-extralight\">\n {{ $any(item())[header().key] != null ? '\u20AC' + ($any(item())[header().key] | number: '1.2-2') : '' }}\n </span>\n }\n\n @case ('source') {\n @if (i.source === 'youtube' || i.source === 'soundcloud') {\n <xs-icon\n [icon]=\"i.source === 'youtube' ? ['fab', 'youtube'] : ['fab', 'soundcloud']\"\n [ngClass]=\"{\n 'text-red-600': i.source === 'youtube',\n 'text-orange-600': i.source === 'soundcloud',\n }\"\n ></xs-icon>\n }\n @if (i.source && i.source !== 'youtube' && i.source !== 'soundcloud') {\n <span>{{ i.source }}</span>\n }\n }\n\n @case ('xsSemi') {\n <p class=\"text-xs font-semibold\">{{ $any(item())[header().key]?.length ? $any(item())[header().key] : '\u2014' }}</p>\n }\n\n @case ('xsSemiNumber') {\n <p class=\"text-xs font-semibold\">{{ $any(item())[header().key] ?? 0 }}</p>\n }\n\n @case ('boolean') {\n <p>{{ $any(item())[header().key] ? textsService.yes : textsService.no }}</p>\n }\n\n @case ('booleanImage') {\n <xs-icon\n [icon]=\"$any(item())[header().key] ? 'check' : 'close'\"\n [ngClass]=\"{\n 'text-green-500': $any(item())[header().key],\n 'text-red-500': !$any(item())[header().key],\n }\"\n ></xs-icon>\n }\n\n @case ('booleanImageReverse') {\n <xs-icon\n [icon]=\"!$any(item())[header().key] ? 'check' : 'close'\"\n [ngClass]=\"{\n 'text-green-500': !$any(item())[header().key],\n 'text-red-500': $any(item())[header().key],\n }\"\n ></xs-icon>\n }\n\n @case ('slugTrueFalse') {\n <span class=\"px-2 py-1 rounded-xl bg-zinc-900/50\">\n <xs-icon\n [icon]=\"i.slug && i.slug !== 'None' ? 'check' : 'close'\"\n ></xs-icon>\n </span>\n }\n\n @case ('coordinates') {\n @if ($any(item())[header().key] && ($any(item())[header().key].lat || $any(item())[header().key].lng)) {\n <span>{{ ($any(item())[header().key].lat | number: '1.4-4') || ($any(item())[header().key].lng | number: '1.4-4') }}</span>\n }\n @if ($any(item())[header().key] && ($any(item())[header().key].lon || $any(item())[header().key].lng)) {\n <span>{{ $any(item())[header().key].lon || $any(item())[header().key].lng | number: '1.4-4' }}</span>\n }\n @if (!$any(item())[header().key]) {\n <span>{{ $any(item())[header().key] }}</span>\n }\n }\n\n @case ('typeVisit') {\n <xs-badge [size]=\"'md'\" [variant]=\"'error'\" [label]=\"$any(item())[header().key] | typeES\"></xs-badge>\n }\n\n @case ('language') {\n <xs-badge\n [size]=\"'md'\"\n [url]=\"(i.language === 'es' ? i.language : 'us') | countryFlag\"\n [label]=\"i.language === 'es' ? textsService.t('TABLE_ITEMS.LANGUAGE.ES') : i.language === 'en' ? textsService.t('TABLE_ITEMS.LANGUAGE.EN') : (i.language | titlecase)\"\n ></xs-badge>\n }\n\n @case ('claimed') {\n @let isClaimed = i.user && (!i.user.name || i.user.name !== 'XSMusic');\n <xs-badge [size]=\"'md'\" [variant]=\"isClaimed ? 'success' : 'error'\">\n <xs-icon [icon]=\"isClaimed ? 'check' : 'close'\" size=\"xs\"></xs-icon>\n </xs-badge>\n }\n\n @case ('commentTruncate') {\n <a>{{ $any(item())[header().key] | truncateText: 20 }}</a>\n }\n\n @case ('user') {\n @if (i.user) {\n <div class=\"flex gap-3 mr-16 items-center\">\n <div class=\"h-9 w-9\">\n <xs-image\n [item]=\"i.user\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"contain\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col items-center\">\n <a class=\"block mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n {{ i.user?.name }}\n </a>\n <div class=\"flex gap-2 items-start w-full\">\n @if (i.user.country && i.user.country.code) {\n <xs-image\n [src]=\"i.user.country.code | countryFlag\"\n [alt]=\"i.user.country.code\"\n size=\"xs\"\n ></xs-image>\n }\n <p class=\"mt-1 text-sm leading-none text-gray-400 font-extralight\">\n {{ i.user && i.user.type ? (i.user.type | XSTypeUser) : textsService.t('TABLE_ITEMS.ROLE.USER') }}\n </p>\n </div>\n </div>\n </div>\n }\n }\n\n @case ('styles') {\n @if (i.styles) {\n <div class=\"flex min-w-[11rem] flex-nowrap items-center gap-1 overflow-hidden\">\n @for (style of getStyles($any(item())) | sliceArray: 0 : 2; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 shrink-0 rounded-full\"\n [style.background-color]=\"$any(style).color || '#71717a'\"\n ></span>\n <span class=\"truncate\">{{ style.name ?? '' | truncateText: 15 | titlecase }}</span>\n </xs-badge>\n }\n @if (i.styles.length > 2) {\n <xs-badge [size]=\"'sm'\" [variant]=\"'secondary'\" [customClasses]=\"'shrink-0'\" [label]=\"'+' + (i.styles.length - 2)\"></xs-badge>\n }\n </div>\n @if (i.styles.length === 0) {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NO_STYLES')\"></xs-badge>\n }\n }\n }\n\n @case ('artists') {\n @let artists = getArtists($any(item()));\n @if (artists.length > 0) {\n <div class=\"flex min-w-[11rem] flex-nowrap items-center gap-1 overflow-hidden\">\n @for (artist of artists | sliceArray: 0 : 2; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <div class=\"h-4 w-4 shrink-0 overflow-hidden rounded-full\">\n <xs-image\n [item]=\"artist\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n size=\"full\"\n rounded=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <span class=\"truncate\">{{ artist.name }}</span>\n </xs-badge>\n }\n @if (artists.length > 2) {\n <xs-badge [size]=\"'sm'\" [variant]=\"'secondary'\" [customClasses]=\"'shrink-0'\" [label]=\"'+' + (artists.length - 2)\"></xs-badge>\n }\n </div>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"'0'\"></xs-badge>\n }\n }\n\n @case ('artistsEvent') {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"(i.artists && (i.artists.length ?? 0)) + ''\"\n ></xs-badge>\n }\n\n @case ('displayZones') {\n <div class=\"flex flex-wrap gap-1\">\n @for (zone of i.displayZones; track $index) {\n <xs-badge [size]=\"'md'\" [variant]=\"'amber'\" [label]=\"zone | firstLetterCase\"></xs-badge>\n }\n </div>\n }\n\n @case ('types') {\n <div class=\"flex min-w-[11rem] flex-wrap items-center gap-1\">\n @for (type of $any(item())[header().key]; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 shrink-0 rounded-full\"\n [style.background-color]=\"$any(type)?.color || $any(type)?.style?.color || '#a1a1aa'\"\n ></span>\n <span class=\"truncate\">{{ type | typeES }}</span>\n </xs-badge>\n }\n </div>\n }\n\n @case ('equipmentSetups') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.equipmentSetups || 0) + ' ' + (i.equipmentSetups === 1 ? 'usuario' : 'usuarios')\"></xs-badge>\n }\n\n @case ('equipmentSetupComponents') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.components?.length || 0) + ''\"></xs-badge>\n }\n\n @case ('typeEquipment') {\n <div class=\"flex flex-col items-start gap-1\">\n <div class=\"flex items-center gap-1\">\n <div class=\"w-2.5 h-2.5 text-xs border border-zinc-900 bg-zinc-900/50\"></div>\n <div class=\"flex flex-col\">\n <span class=\"text-xs font-extralight\">{{ i.type?.name }}</span>\n </div>\n </div>\n </div>\n }\n\n @case ('slides') {\n {{ i.slides?.length || 0 }} slides\n }\n\n @case ('socialLogin') {\n @if (socialLoginButtons.length === 1) {\n <xs-button\n [icon]=\"getButtonIcon(socialLoginButtons[0])\"\n [variant]=\"socialLoginButtons[0].variant || 'primary'\"\n [layout]=\"socialLoginButtons[0].layout || 'base'\"\n class=\"max-w-fit\"\n ></xs-button>\n }\n @if (socialLoginButtons.length > 1) {\n <xs-buttons-group\n [buttonsInput]=\"socialLoginButtons\"\n class=\"max-w-fit\"\n ></xs-buttons-group>\n }\n }\n\n @case ('jira') {\n @if (i.jira) {\n <span class=\"text-xs\">{{ i.jira }}</span>\n }\n @if (!i.jira) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n }\n\n @case ('suggestionType') {\n <xs-badge [size]=\"'md'\" [variant]=\"'error'\" [label]=\"(i.suggestionType ?? i.type) + ''\"></xs-badge>\n }\n\n @case ('typeModel') {\n <xs-badge\n size=\"md\"\n [label]=\"i.appType === 'web' ? 'PWA' : i.appType === 'mobile' ? 'APP' : 'N/D'\"\n [icon]=\"getIconDeviceBrand($any(item()))\"\n ></xs-badge>\n }\n\n @case ('appVersion') {\n <p class=\"text-sm\">{{ i.appVersion }}</p>\n }\n\n @case ('faqCategory') {\n <p>{{ i.category?.name }}</p>\n }\n\n @case ('faqPosition') {\n {{ i.category?.position ?? '' }} / {{ i.position }}\n }\n\n @case ('countryArtist') {\n <xs-badge\n [size]=\"'md'\"\n [url]=\"i.country?.code ? (i.country.code | countryFlag) : ''\"\n [label]=\"i.country?.name || i.country?.code || ''\"\n ></xs-badge>\n }\n\n @case ('durationPromotion') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.duration ?? 0) + ' d\u00EDas'\"></xs-badge>\n }\n\n @case ('githubDateDuration') {\n <div class=\"flex flex-col text-xs font-extralight\">\n <div class=\"flex items-center gap-1\">\n <xs-icon size=\"xs\" [icon]=\"['far', 'calendar']\"></xs-icon>\n {{ i.created_at | date: 'dd/MM/yyyy' }}\n </div>\n <div class=\"flex items-center gap-1\">\n <xs-icon size=\"xs\" [icon]=\"'clock'\"></xs-icon>\n {{ i.duration }}\n </div>\n </div>\n }\n\n @case ('organizationItem') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('playlist') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('position') {\n <span class=\"font-black\">#{{ $any(item())[header().key] }}</span>\n }\n\n @case ('recordLabelItem') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('scrapingEvents') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('startEnd') {\n <div class=\"flex flex-col text-xs\">\n <span>{{ i.date | date: 'dd/MM/yyyy' }}</span>\n <span>{{ i.endDate | date: 'dd/MM/yyyy' }}</span>\n </div>\n }\n\n @case ('town') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('scrapingEventHeader') {\n <div class=\"flex items-center gap-2\">\n <div class=\"h-10 w-10 shrink-0 overflow-hidden rounded-lg bg-zinc-800\">\n @if ($any(item())['image']) {\n <xs-image\n [src]=\"$any(item())['image']\"\n alt=\"\"\n customClass=\"object-cover w-full h-full\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <a\n class=\"font-medium text-sm truncate text-zinc-900 dark:text-zinc-100 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200\"\n [href]=\"'https://ra.co/events/' + $any(item())['ra']\"\n target=\"_blank\"\n rel=\"nofollow noopener\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </a>\n </div>\n </div>\n }\n\n @case ('scrapingEventSite') {\n @if ($any(item())['site']?._id === adminUser.ANONYMOUS_SITE) {\n <span class=\"text-sm text-zinc-300\">-</span>\n } @else {\n <div class=\"flex items-center gap-1.5\">\n @if ($any(item())['site']?.address?.country?.code) {\n <img\n [src]=\"$any(item())['site'].address.country.code | countryFlag\"\n [alt]=\"$any(item())['site'].address.country.name\"\n class=\"w-4 h-4 shrink-0\"\n />\n }\n <span class=\"text-sm truncate text-zinc-300\">{{ $any(item())['site']?.name }}</span>\n </div>\n }\n }\n\n @case ('normalBadge') {\n <xs-badge size=\"md\" [label]=\"$any(item())[header().key]\"></xs-badge>\n }\n\n @default {\n <span>{{ $any(item())[header().key] }}</span>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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"] }, { kind: "component", type: XSIconComponent, selector: "xs-icon", inputs: ["icon", "size", "class"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: XSBadgeComponent, selector: "xs-badge", inputs: ["variant", "size", "ariaLabel", "icon", "url", "label", "customClasses"] }, { kind: "component", type: XSButtonsGroupComponent, selector: "xs-buttons-group", inputs: ["buttonsInput", "buttonClick"], outputs: ["buttonClickOutput"] }, { 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"] }, { kind: "component", type: XSTableItemsEntityComponent, selector: "xs-table-items-entity", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsStateComponent, selector: "xs-table-items-state", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsVisitsComponent, selector: "xs-table-items-visits", inputs: ["header", "item", "filters", "admin"] }, { kind: "component", type: XSTableItemsChatComponent, selector: "xs-table-items-chat", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsContactComponent, selector: "xs-table-items-contact", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsPromotionComponent, selector: "xs-table-items-promotion", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsDateComponent, selector: "xs-table-items-date", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsCountryComponent, selector: "xs-table-items-country", inputs: ["header", "item"] }, { kind: "component", type: XSTableItemsRoleComponent, selector: "xs-table-items-role", inputs: ["header", "item"] }, { kind: "pipe", type: i1$1.LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: TypeESPipe, name: "typeES" }, { kind: "pipe", type: XSTypeUserPipe, name: "XSTypeUser" }, { kind: "pipe", type: TruncateTextPipe, name: "truncateText" }, { kind: "pipe", type: SliceArrayPipe, name: "sliceArray" }, { kind: "pipe", type: XSFirstLetterPipe, name: "firstLetterCase" }, { kind: "pipe", type: CountryFlagPipe, name: "countryFlag" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
18300
18333
|
}
|
|
18301
18334
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsComponent, decorators: [{
|
|
18302
18335
|
type: Component,
|
|
@@ -18323,7 +18356,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
18323
18356
|
XSTableItemsDateComponent,
|
|
18324
18357
|
XSTableItemsCountryComponent,
|
|
18325
18358
|
XSTableItemsRoleComponent,
|
|
18326
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = $any(item());\n@if (header().key === 'status') {\n <div class=\"flex items-center gap-3\">\n <div\n class=\"w-3 h-3 rounded-full shadow-lg\"\n [ngClass]=\"{\n 'bg-green-500 shadow-green-500/50': i.status === 'active',\n 'bg-yellow-500 shadow-yellow-500/50': i.status === 'pending',\n 'bg-gray-500 shadow-gray-500/50': !i.status || i.status === 'inactive',\n }\"\n ></div>\n <span class=\"text-sm font-medium text-zinc-700 dark:text-zinc-300 capitalize\">\n {{ i.status || textsService.t('TABLE_ITEMS.NO_STATUS') }}\n </span>\n </div>\n} @else if (header().key === 'multilanguage') {\n <span>{{ $any(item())[header().key] ? textsService.t('TABLE_ITEMS.ACTIVE') : textsService.t('TABLE_ITEMS.INACTIVE') }}</span>\n} @else {\n @switch (componentType) {\n @case ('entity') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n @case ('state') {\n <xs-table-items-state [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-state>\n }\n @case ('visits') {\n <xs-table-items-visits [header]=\"header()\" [item]=\"$any(item())\" [filters]=\"filters()\" [admin]=\"admin()\"></xs-table-items-visits>\n }\n @case ('chat') {\n <xs-table-items-chat [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-chat>\n }\n @case ('contact') {\n <xs-table-items-contact [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-contact>\n }\n @case ('promotion') {\n <xs-table-items-promotion [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-promotion>\n }\n @case ('date') {\n <xs-table-items-date [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-date>\n }\n @case ('country') {\n <xs-table-items-country [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-country>\n }\n @case ('role') {\n <xs-table-items-role [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-role>\n }\n\n @case ('imageVisit') {\n <div class=\"w-12\">\n <xs-image\n [item]=\"$any(item())[i.type]\"\n [typeItem]=\"i.type\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"i._id\"\n rounded=\"2xl\"\n [objectFit]=\"'cover'\"\n customClass=\"lg:h-12 lg:w-12\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n }\n\n @case ('imageName') {\n <div class=\"flex items-center\">\n <div class=\"h-10 w-10 mr-2\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"typeForImage\"\n [viewTransitionName]=\"$any(itemForImage)?._id\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"cover\"\n customClass=\"mr-2\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold truncate text-zinc-900 dark:text-zinc-100 leading-tight\"\n [ngClass]=\"{\n 'cursor-pointer hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200': header().action,\n }\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </p>\n @if ($any(itemForDisplay)?.user?.name) {\n <p class=\"text-xs font-extralight\">\n {{ $any(itemForDisplay).user.name | truncateText: 25 }}\n </p>\n }\n </div>\n </div>\n }\n\n @case ('imageNameExternal') {\n <div class=\"flex items-center\">\n <div class=\"h-10 w-10 mr-2 shrink-0\">\n @if ($any(item())[header().key]) {\n <xs-image\n [src]=\"$any(item())[header().key]\"\n alt=\"\"\n customClass=\"w-10 h-10 object-cover rounded-lg\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <p\n class=\"text-base font-bold truncate text-zinc-900 dark:text-zinc-100 leading-tight\"\n [ngClass]=\"{\n 'cursor-pointer hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200': header().action,\n }\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </p>\n </div>\n </div>\n }\n\n @case ('name') {\n <a\n class=\"text-sm font-black truncate\"\n [ngClass]=\"{ 'cursor-pointer': header().action }\"\n >\n @if ($any(item())[header().key]) {\n {{ $any(item())[header().key] }}\n }\n </a>\n }\n\n @case ('nameLike') {\n <div class=\"flex gap-3 items-center\">\n <div class=\"h-9 w-9\">\n @if (($any(item())[i.type] && $any(item())[i.type].image) || i.playlist?.cover || i.name) {\n <xs-image\n [item]=\"!i.playlist?.cover ? $any(item())[i.type] : i.name ? { _id: '1', image: true } : { _id: i.playlist?.cover, image: true }\"\n [typeItem]=\"!i.playlist?.cover ? i.type : i.name ? 'artist' : 'media'\"\n [size]=\"'full'\"\n rounded=\"lg\"\n [objectFit]=\"'contain'\"\n [generateAvatar]=\"true\"\n ></xs-image>\n }\n @if ($any(item())[i.type] && !$any(item())[i.type].image && !i.playlist?.cover) {\n <xs-image\n [src]=\"'/assets/images/xsmusic-logo.png'\"\n [alt]=\"'XSMusic'\"\n [objectFit]=\"'cover'\"\n rounded=\"lg\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col\">\n @if ($any(item())[i.type] && $any(item())[i.type].name) {\n <a class=\"mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n <p class=\"flex items-center gap-1\">\n {{ $any(item())[i.type].name }}\n @if ($any(item())[i.type].user && $any(item())[i.type].user._id && $any(item())[i.type].user._id !== adminUser) {\n <svg [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\" fill=\"rgb(0, 149, 246)\" height=\"10\" viewBox=\"0 0 40 40\" width=\"10\">\n <path d=\"M19.998 3.094 14.638 0l-2.972 5.15H5.432v6.354L0 14.64 3.094 20 0 25.359l5.432 3.137v5.905h5.975L14.638 40l5.36-3.094L25.358 40l3.232-5.6h6.162v-6.01L40 25.359 36.905 20 40 14.641l-5.248-3.03v-6.46h-6.419L25.358 0l-5.36 3.094Zm7.415 11.225 2.254 2.287-11.43 11.5-6.835-6.93 2.244-2.258 4.587 4.581 9.18-9.18Z\" fill-rule=\"evenodd\"></path>\n </svg>\n }\n </p>\n </a>\n }\n @if (i.name) {\n <a class=\"my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n <p>{{ i.name }}</p>\n </a>\n }\n <p class=\"mt-1 text-sm leading-none text-gray-500 dark:text-gray-400 font-extralight\">\n @if (i.type !== 'media' && i.type !== 'site' && i.type !== 'organization' && i.type !== 'visit' && !i.name) {\n <span>{{ i.type | typeES }}</span>\n }\n @if (i.type === 'visit') {\n <span>{{ i.visit?.type ?? '' | lowercase | typeES | firstLetterCase }}</span>\n }\n @if (i.type === 'media' || i.type === 'site') {\n <span>{{ $any(item())[i.type]?.type | typeES }}</span>\n }\n @if (i.type === 'organization') {\n <span>{{ $any(item())[i.type]?.types && $any(item())[i.type]?.types.length > 0 ? ($any(item())[i.type]?.types[0] | typeES) : '' }}</span>\n }\n @if (i.name) {\n <span class=\"text-sm font-extralight dark:text-zinc-400\">{{ i.type }}</span>\n }\n </p>\n </div>\n </div>\n }\n\n @case ('visitPage') {\n <div class=\"flex gap-3 items-center\">\n <div class=\"w-8 h-8 shrink-0\">\n @if (i.entityImage && i.entityType) {\n <xs-image\n [item]=\"{ _id: i.entityId, image: true }\"\n [typeItem]=\"i.entityType\"\n [size]=\"'xs'\"\n [rounded]=\"'full'\"\n [objectFit]=\"'cover'\"\n [generateAvatar]=\"true\"\n ></xs-image>\n } @else {\n <div class=\"flex items-center justify-center w-8 h-8 rounded-full bg-zinc-800/50 shrink-0\">\n <xs-icon [icon]=\"i.icon || 'file-text'\" class=\"text-zinc-500 text-xs\"></xs-icon>\n </div>\n }\n </div>\n <div class=\"flex flex-col min-w-0 flex-1\">\n <p class=\"text-sm truncate text-zinc-300 leading-tight\">\n {{ i.pageLabel || i.entityName || i.name || '-' }}\n </p>\n @if (i.entityTypeLabel) {\n <p class=\"text-[10px] text-zinc-500 leading-tight mt-0.5\">\n {{ i.entityTypeLabel }}\n </p>\n }\n </div>\n </div>\n }\n\n @case ('isLiked') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-12\">\n <xs-image\n [item]=\"i?.user\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n [objectFit]=\"'cover'\"\n rounded=\"2xl\"\n customClass=\"lg:h-12 lg:w-12\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <a class=\"block my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n {{ i.user?.name ?? textsService.t('TABLE_ITEMS.USER_DELETED') }}\n </a>\n <p class=\"mt-1 text-sm leading-none text-gray-500 dark:text-gray-400 font-extralight\">\n {{ (i.user?.type | XSTypeUser) ?? textsService.unknown }}\n </p>\n </div>\n </div>\n }\n\n @case ('nameStatsPage') {\n <a\n [href]=\"getUrlStatsPage($any(item()))\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"flex flex-col my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\"\n >\n <span>{{ i.name | truncateText: 60 }}</span>\n <span class=\"text-sm font-extralight dark:text-zinc-400\">{{ i.path }}</span>\n </a>\n }\n\n @case ('nameStatsEvent') {\n <a\n [href]=\"getUrlStatsPage($any(item()))\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"flex flex-col my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\"\n >\n <span>\n {{ getNameOrCategoryEvent(i.name, 'name')! }}\n <span>{{ getNameOrCategoryEvent(i.name, 'value') }}</span>\n </span>\n <span class=\"text-sm font-extralight dark:text-zinc-400\">\n {{ getNameOrCategoryEvent(i.name, 'category') | titlecase }}\n </span>\n </a>\n }\n\n @case ('type') {\n <xs-badge\n [size]=\"'md'\"\n [icon]=\"'folder'\"\n [label]=\"$any(item())[header().key]\"\n ></xs-badge>\n }\n\n @case ('typeUser') {\n <xs-badge\n [size]=\"'md'\"\n [icon]=\"'folder'\"\n [label]=\"$any(item())[header().key] | XSTypeUser\"\n ></xs-badge>\n }\n\n @case ('typeOrSubtype') {\n @let typeLabel = i.type === 'media' || i.type === 'site'\n ? (i.subtype | titlecase)\n : i.type === 'organization'\n ? (i.subtype | typeES)\n : (i.type | typeES);\n @let normalizedType = (typeLabel + '').toLowerCase();\n @if (typeLabel) {\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n normalizedType.includes('club') || normalizedType.includes('sala') || normalizedType.includes('bar')\n ? 'info'\n : normalizedType.includes('festival') || normalizedType.includes('concierto') || normalizedType.includes('evento')\n ? 'success'\n : normalizedType.includes('promot') || normalizedType.includes('agencia') || normalizedType.includes('management')\n ? 'warning'\n : normalizedType.includes('discoteca') || normalizedType.includes('teatro')\n ? 'secondary'\n : 'default'\n \"\n [label]=\"typeLabel\"\n ></xs-badge>\n }\n }\n\n @case ('fieldReport') {\n <p class=\"font-extralight\">{{ i.message?.split(': ')[0] ?? '' | truncateText: 50 }}</p>\n }\n\n @case ('year') {\n @if (i.year) {\n <xs-badge [size]=\"'md'\" [label]=\"i.year + ''\"></xs-badge>\n }\n }\n\n @case ('normal') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('normalTypeLink') {\n @if ($any(item())[i.type] && $any(item())[i.type].name) {\n <a>{{ $any(item())[i.type].name }}</a>\n }\n }\n\n @case ('siteType') {\n @if (i.site?.type) {\n @let siteTypeLabel = i.site.type | titlecase;\n @let normalizedSiteType = (siteTypeLabel + '').toLowerCase();\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n normalizedSiteType.includes('club') || normalizedSiteType.includes('sala') || normalizedSiteType.includes('bar')\n ? 'info'\n : normalizedSiteType.includes('festival') || normalizedSiteType.includes('concierto') || normalizedSiteType.includes('evento')\n ? 'success'\n : normalizedSiteType.includes('promot') || normalizedSiteType.includes('agencia')\n ? 'warning'\n : 'default'\n \"\n [label]=\"siteTypeLabel\"\n ></xs-badge>\n }\n }\n\n @case ('value') {\n <span class=\"font-extralight\">\n {{ $any(item())[header().key] != null ? '\u20AC' + ($any(item())[header().key] | number: '1.2-2') : '' }}\n </span>\n }\n\n @case ('source') {\n @if (i.source === 'youtube' || i.source === 'soundcloud') {\n <xs-icon\n [icon]=\"i.source === 'youtube' ? ['fab', 'youtube'] : ['fab', 'soundcloud']\"\n [ngClass]=\"{\n 'text-red-600': i.source === 'youtube',\n 'text-orange-600': i.source === 'soundcloud',\n }\"\n ></xs-icon>\n }\n @if (i.source && i.source !== 'youtube' && i.source !== 'soundcloud') {\n <span>{{ i.source }}</span>\n }\n }\n\n @case ('xsSemi') {\n <p class=\"text-xs font-semibold\">{{ $any(item())[header().key] ?? '' }}</p>\n }\n\n @case ('xsSemiNumber') {\n <p class=\"text-xs font-semibold\">{{ $any(item())[header().key] ?? 0 }}</p>\n }\n\n @case ('boolean') {\n <p>{{ $any(item())[header().key] ? textsService.yes : textsService.no }}</p>\n }\n\n @case ('booleanImage') {\n <xs-icon\n [icon]=\"$any(item())[header().key] ? 'check' : 'close'\"\n [ngClass]=\"{\n 'text-green-500': $any(item())[header().key],\n 'text-red-500': !$any(item())[header().key],\n }\"\n ></xs-icon>\n }\n\n @case ('booleanImageReverse') {\n <xs-icon\n [icon]=\"!$any(item())[header().key] ? 'check' : 'close'\"\n [ngClass]=\"{\n 'text-green-500': !$any(item())[header().key],\n 'text-red-500': $any(item())[header().key],\n }\"\n ></xs-icon>\n }\n\n @case ('slugTrueFalse') {\n <span class=\"px-2 py-1 rounded-xl bg-zinc-900/50\">\n <xs-icon\n [icon]=\"i.slug && i.slug !== 'None' ? 'check' : 'close'\"\n ></xs-icon>\n </span>\n }\n\n @case ('coordinates') {\n @if ($any(item())[header().key] && ($any(item())[header().key].lat || $any(item())[header().key].lng)) {\n <span>{{ ($any(item())[header().key].lat | number: '1.4-4') || ($any(item())[header().key].lng | number: '1.4-4') }}</span>\n }\n @if ($any(item())[header().key] && ($any(item())[header().key].lon || $any(item())[header().key].lng)) {\n <span>{{ $any(item())[header().key].lon || $any(item())[header().key].lng | number: '1.4-4' }}</span>\n }\n @if (!$any(item())[header().key]) {\n <span>{{ $any(item())[header().key] }}</span>\n }\n }\n\n @case ('typeVisit') {\n <xs-badge [size]=\"'md'\" [variant]=\"'error'\" [label]=\"$any(item())[header().key] | typeES\"></xs-badge>\n }\n\n @case ('language') {\n <xs-badge\n [size]=\"'md'\"\n [url]=\"(i.language === 'es' ? i.language : 'us') | countryFlag\"\n [label]=\"i.language === 'es' ? textsService.t('TABLE_ITEMS.LANGUAGE.ES') : i.language === 'en' ? textsService.t('TABLE_ITEMS.LANGUAGE.EN') : (i.language | titlecase)\"\n ></xs-badge>\n }\n\n @case ('claimed') {\n @let isClaimed = i.user && (!i.user.name || i.user.name !== 'XSMusic');\n <xs-badge [size]=\"'md'\" [variant]=\"isClaimed ? 'success' : 'error'\">\n <xs-icon [icon]=\"isClaimed ? 'check' : 'close'\" size=\"xs\"></xs-icon>\n </xs-badge>\n }\n\n @case ('commentTruncate') {\n <a>{{ $any(item())[header().key] | truncateText: 20 }}</a>\n }\n\n @case ('user') {\n @if (i.user) {\n <div class=\"flex gap-3 mr-16 items-center\">\n <div class=\"h-9 w-9\">\n <xs-image\n [item]=\"i.user\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"contain\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col items-center\">\n <a class=\"block mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n {{ i.user?.name }}\n </a>\n <div class=\"flex gap-2 items-start w-full\">\n @if (i.user.country && i.user.country.code) {\n <xs-image\n [src]=\"i.user.country.code | countryFlag\"\n [alt]=\"i.user.country.code\"\n size=\"xs\"\n ></xs-image>\n }\n <p class=\"mt-1 text-sm leading-none text-gray-400 font-extralight\">\n {{ i.user && i.user.type ? (i.user.type | XSTypeUser) : textsService.t('TABLE_ITEMS.ROLE.USER') }}\n </p>\n </div>\n </div>\n </div>\n }\n }\n\n @case ('styles') {\n @if (i.styles) {\n <div class=\"flex min-w-[11rem] flex-nowrap items-center gap-1 overflow-hidden\">\n @for (style of getStyles($any(item())) | sliceArray: 0 : 2; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 shrink-0 rounded-full\"\n [style.background-color]=\"$any(style).color || '#71717a'\"\n ></span>\n <span class=\"truncate\">{{ style.name ?? '' | truncateText: 15 | titlecase }}</span>\n </xs-badge>\n }\n @if (i.styles.length > 2) {\n <xs-badge [size]=\"'sm'\" [variant]=\"'secondary'\" [customClasses]=\"'shrink-0'\" [label]=\"'+' + (i.styles.length - 2)\"></xs-badge>\n }\n </div>\n @if (i.styles.length === 0) {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NO_STYLES')\"></xs-badge>\n }\n }\n }\n\n @case ('artists') {\n @let artists = getArtists($any(item()));\n @if (artists.length > 0) {\n <div class=\"flex min-w-[11rem] flex-nowrap items-center gap-1 overflow-hidden\">\n @for (artist of artists | sliceArray: 0 : 2; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <div class=\"h-4 w-4 shrink-0 overflow-hidden rounded-full\">\n <xs-image\n [item]=\"artist\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n size=\"full\"\n rounded=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <span class=\"truncate\">{{ artist.name }}</span>\n </xs-badge>\n }\n @if (artists.length > 2) {\n <xs-badge [size]=\"'sm'\" [variant]=\"'secondary'\" [customClasses]=\"'shrink-0'\" [label]=\"'+' + (artists.length - 2)\"></xs-badge>\n }\n </div>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"'0'\"></xs-badge>\n }\n }\n\n @case ('artistsEvent') {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"(i.artists && (i.artists.length ?? 0)) + ''\"\n ></xs-badge>\n }\n\n @case ('displayZones') {\n <div class=\"flex flex-wrap gap-1\">\n @for (zone of i.displayZones; track $index) {\n <xs-badge [size]=\"'md'\" [variant]=\"'amber'\" [label]=\"zone | firstLetterCase\"></xs-badge>\n }\n </div>\n }\n\n @case ('types') {\n <div class=\"flex min-w-[11rem] flex-wrap items-center gap-1\">\n @for (type of $any(item())[header().key]; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 shrink-0 rounded-full\"\n [style.background-color]=\"$any(type)?.color || $any(type)?.style?.color || '#a1a1aa'\"\n ></span>\n <span class=\"truncate\">{{ type | typeES }}</span>\n </xs-badge>\n }\n </div>\n }\n\n @case ('equipmentSetups') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.equipmentSetups || 0) + ' ' + (i.equipmentSetups === 1 ? 'usuario' : 'usuarios')\"></xs-badge>\n }\n\n @case ('equipmentSetupComponents') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.components?.length || 0) + ''\"></xs-badge>\n }\n\n @case ('typeEquipment') {\n <div class=\"flex flex-col items-start gap-1\">\n <div class=\"flex items-center gap-1\">\n <div class=\"w-2.5 h-2.5 text-xs border border-zinc-900 bg-zinc-900/50\"></div>\n <div class=\"flex flex-col\">\n <span class=\"text-xs font-extralight\">{{ i.type?.name }}</span>\n </div>\n </div>\n </div>\n }\n\n @case ('slides') {\n {{ i.slides?.length || 0 }} slides\n }\n\n @case ('socialLogin') {\n @if (socialLoginButtons.length === 1) {\n <xs-button\n [icon]=\"getButtonIcon(socialLoginButtons[0])\"\n [variant]=\"socialLoginButtons[0].variant || 'primary'\"\n [layout]=\"socialLoginButtons[0].layout || 'base'\"\n class=\"max-w-fit\"\n ></xs-button>\n }\n @if (socialLoginButtons.length > 1) {\n <xs-buttons-group\n [buttonsInput]=\"socialLoginButtons\"\n class=\"max-w-fit\"\n ></xs-buttons-group>\n }\n }\n\n @case ('jira') {\n @if (i.jira) {\n <span class=\"text-xs\">{{ i.jira }}</span>\n }\n @if (!i.jira) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n }\n\n @case ('suggestionType') {\n <xs-badge [size]=\"'md'\" [variant]=\"'error'\" [label]=\"(i.suggestionType ?? i.type) + ''\"></xs-badge>\n }\n\n @case ('typeModel') {\n <xs-badge\n size=\"md\"\n [label]=\"i.appType === 'web' ? 'PWA' : i.appType === 'mobile' ? 'APP' : 'N/D'\"\n [icon]=\"getIconDeviceBrand($any(item()))\"\n ></xs-badge>\n }\n\n @case ('appVersion') {\n <p class=\"text-sm\">{{ i.appVersion }}</p>\n }\n\n @case ('faqCategory') {\n <p>{{ i.category?.name }}</p>\n }\n\n @case ('faqPosition') {\n {{ i.category?.position ?? '' }} / {{ i.position }}\n }\n\n @case ('countryArtist') {\n <xs-badge\n [size]=\"'md'\"\n [url]=\"i.country?.code ? (i.country.code | countryFlag) : ''\"\n [label]=\"i.country?.name || i.country?.code || ''\"\n ></xs-badge>\n }\n\n @case ('durationPromotion') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.duration ?? 0) + ' d\u00EDas'\"></xs-badge>\n }\n\n @case ('githubDateDuration') {\n <div class=\"flex flex-col text-xs font-extralight\">\n <div class=\"flex items-center gap-1\">\n <xs-icon size=\"xs\" [icon]=\"['far', 'calendar']\"></xs-icon>\n {{ i.created_at | date: 'dd/MM/yyyy' }}\n </div>\n <div class=\"flex items-center gap-1\">\n <xs-icon size=\"xs\" [icon]=\"'clock'\"></xs-icon>\n {{ i.duration }}\n </div>\n </div>\n }\n\n @case ('organizationItem') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('playlist') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('position') {\n <span class=\"font-black\">#{{ $any(item())[header().key] }}</span>\n }\n\n @case ('recordLabelItem') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('scrapingEvents') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('startEnd') {\n <div class=\"flex flex-col text-xs\">\n <span>{{ i.date | date: 'dd/MM/yyyy' }}</span>\n <span>{{ i.endDate | date: 'dd/MM/yyyy' }}</span>\n </div>\n }\n\n @case ('town') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('scrapingEventHeader') {\n <div class=\"flex items-center gap-2\">\n <div class=\"h-10 w-10 shrink-0 overflow-hidden rounded-lg bg-zinc-800\">\n @if ($any(item())['image']) {\n <xs-image\n [src]=\"$any(item())['image']\"\n alt=\"\"\n customClass=\"object-cover w-full h-full\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <a\n class=\"font-medium text-sm truncate text-zinc-900 dark:text-zinc-100 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200\"\n [href]=\"'https://ra.co/events/' + $any(item())['ra']\"\n target=\"_blank\"\n rel=\"nofollow noopener\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </a>\n </div>\n </div>\n }\n\n @case ('scrapingEventSite') {\n @if ($any(item())['site']?._id === adminUser.ANONYMOUS_SITE) {\n <span class=\"text-sm text-zinc-300\">-</span>\n } @else {\n <div class=\"flex items-center gap-1.5\">\n @if ($any(item())['site']?.address?.country?.code) {\n <img\n [src]=\"$any(item())['site'].address.country.code | countryFlag\"\n [alt]=\"$any(item())['site'].address.country.name\"\n class=\"w-4 h-4 shrink-0\"\n />\n }\n <span class=\"text-sm truncate text-zinc-300\">{{ $any(item())['site']?.name }}</span>\n </div>\n }\n }\n\n @case ('normalBadge') {\n <xs-badge size=\"md\" [label]=\"$any(item())[header().key]\"></xs-badge>\n }\n\n @default {\n <span>{{ $any(item())[header().key] }}</span>\n }\n }\n}\n" }]
|
|
18359
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = $any(item());\n@if (header().key === 'status') {\n <div class=\"flex items-center gap-3\">\n <div\n class=\"w-3 h-3 rounded-full shadow-lg\"\n [ngClass]=\"{\n 'bg-green-500 shadow-green-500/50': i.status === 'active',\n 'bg-yellow-500 shadow-yellow-500/50': i.status === 'pending',\n 'bg-gray-500 shadow-gray-500/50': !i.status || i.status === 'inactive',\n }\"\n ></div>\n <span class=\"text-sm font-medium text-zinc-700 dark:text-zinc-300 capitalize\">\n {{ i.status || textsService.t('TABLE_ITEMS.NO_STATUS') }}\n </span>\n </div>\n} @else if (header().key === 'multilanguage') {\n <span>{{ $any(item())[header().key] ? textsService.t('TABLE_ITEMS.ACTIVE') : textsService.t('TABLE_ITEMS.INACTIVE') }}</span>\n} @else {\n @switch (componentType) {\n @case ('entity') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n @case ('state') {\n <xs-table-items-state [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-state>\n }\n @case ('visits') {\n <xs-table-items-visits [header]=\"header()\" [item]=\"$any(item())\" [filters]=\"filters()\" [admin]=\"admin()\"></xs-table-items-visits>\n }\n @case ('chat') {\n <xs-table-items-chat [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-chat>\n }\n @case ('contact') {\n <xs-table-items-contact [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-contact>\n }\n @case ('promotion') {\n <xs-table-items-promotion [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-promotion>\n }\n @case ('date') {\n <xs-table-items-date [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-date>\n }\n @case ('country') {\n <xs-table-items-country [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-country>\n }\n @case ('role') {\n <xs-table-items-role [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-role>\n }\n\n @case ('imageVisit') {\n <div class=\"w-12\">\n <xs-image\n [item]=\"$any(item())[i.type]\"\n [typeItem]=\"i.type\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"i._id\"\n rounded=\"2xl\"\n [objectFit]=\"'cover'\"\n customClass=\"lg:h-12 lg:w-12\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n }\n\n @case ('imageName') {\n <div class=\"flex items-center\">\n <div class=\"h-10 w-10 mr-2\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"typeForImage\"\n [viewTransitionName]=\"$any(itemForImage)?._id\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"cover\"\n customClass=\"mr-2\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold truncate text-zinc-900 dark:text-zinc-100 leading-tight\"\n [ngClass]=\"{\n 'cursor-pointer hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200': header().action,\n }\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </p>\n @if ($any(itemForDisplay)?.user?.name) {\n <p class=\"text-xs font-extralight\">\n {{ $any(itemForDisplay).user.name | truncateText: 25 }}\n </p>\n }\n </div>\n </div>\n }\n\n @case ('imageNameExternal') {\n <div class=\"flex items-center\">\n <div class=\"h-10 w-10 mr-2 shrink-0\">\n @if ($any(item())[header().key]) {\n <xs-image\n [src]=\"$any(item())[header().key]\"\n alt=\"\"\n customClass=\"w-10 h-10 object-cover rounded-lg\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <p\n class=\"text-base font-bold truncate text-zinc-900 dark:text-zinc-100 leading-tight\"\n [ngClass]=\"{\n 'cursor-pointer hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200': header().action,\n }\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </p>\n </div>\n </div>\n }\n\n @case ('name') {\n <a\n class=\"text-sm font-black truncate\"\n [ngClass]=\"{ 'cursor-pointer': header().action }\"\n >\n @if ($any(item())[header().key]) {\n {{ $any(item())[header().key] }}\n }\n </a>\n }\n\n @case ('nameLike') {\n <div class=\"flex gap-3 items-center\">\n <div class=\"h-9 w-9\">\n @if (($any(item())[i.type] && $any(item())[i.type].image) || i.playlist?.cover || i.name) {\n <xs-image\n [item]=\"!i.playlist?.cover ? $any(item())[i.type] : i.name ? { _id: '1', image: true } : { _id: i.playlist?.cover, image: true }\"\n [typeItem]=\"!i.playlist?.cover ? i.type : i.name ? 'artist' : 'media'\"\n [size]=\"'full'\"\n rounded=\"lg\"\n [objectFit]=\"'contain'\"\n [generateAvatar]=\"true\"\n ></xs-image>\n }\n @if ($any(item())[i.type] && !$any(item())[i.type].image && !i.playlist?.cover) {\n <xs-image\n [src]=\"'/assets/images/xsmusic-logo.png'\"\n [alt]=\"'XSMusic'\"\n [objectFit]=\"'cover'\"\n rounded=\"lg\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col\">\n @if ($any(item())[i.type] && $any(item())[i.type].name) {\n <a class=\"mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n <p class=\"flex items-center gap-1\">\n {{ $any(item())[i.type].name }}\n @if ($any(item())[i.type].user && $any(item())[i.type].user._id && $any(item())[i.type].user._id !== adminUser) {\n <svg [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\" fill=\"rgb(0, 149, 246)\" height=\"10\" viewBox=\"0 0 40 40\" width=\"10\">\n <path d=\"M19.998 3.094 14.638 0l-2.972 5.15H5.432v6.354L0 14.64 3.094 20 0 25.359l5.432 3.137v5.905h5.975L14.638 40l5.36-3.094L25.358 40l3.232-5.6h6.162v-6.01L40 25.359 36.905 20 40 14.641l-5.248-3.03v-6.46h-6.419L25.358 0l-5.36 3.094Zm7.415 11.225 2.254 2.287-11.43 11.5-6.835-6.93 2.244-2.258 4.587 4.581 9.18-9.18Z\" fill-rule=\"evenodd\"></path>\n </svg>\n }\n </p>\n </a>\n }\n @if (i.name) {\n <a class=\"my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n <p>{{ i.name }}</p>\n </a>\n }\n <p class=\"mt-1 text-sm leading-none text-gray-500 dark:text-gray-400 font-extralight\">\n @if (i.type !== 'media' && i.type !== 'site' && i.type !== 'organization' && i.type !== 'visit' && !i.name) {\n <span>{{ i.type | typeES }}</span>\n }\n @if (i.type === 'visit') {\n <span>{{ i.visit?.type ?? '' | lowercase | typeES | firstLetterCase }}</span>\n }\n @if (i.type === 'media' || i.type === 'site') {\n <span>{{ $any(item())[i.type]?.type | typeES }}</span>\n }\n @if (i.type === 'organization') {\n <span>{{ $any(item())[i.type]?.types && $any(item())[i.type]?.types.length > 0 ? ($any(item())[i.type]?.types[0] | typeES) : '' }}</span>\n }\n @if (i.name) {\n <span class=\"text-sm font-extralight dark:text-zinc-400\">{{ i.type }}</span>\n }\n </p>\n </div>\n </div>\n }\n\n @case ('visitPage') {\n <div class=\"flex gap-3 items-center\">\n <div class=\"w-8 h-8 shrink-0\">\n @if (i.entityImage && i.entityType) {\n <xs-image\n [item]=\"{ _id: i.entityId, image: true }\"\n [typeItem]=\"i.entityType\"\n [size]=\"'xs'\"\n [rounded]=\"'full'\"\n [objectFit]=\"'cover'\"\n [generateAvatar]=\"true\"\n ></xs-image>\n } @else {\n <div class=\"flex items-center justify-center w-8 h-8 rounded-full bg-zinc-800/50 shrink-0\">\n <xs-icon [icon]=\"i.icon || 'file-text'\" class=\"text-zinc-500 text-xs\"></xs-icon>\n </div>\n }\n </div>\n <div class=\"flex flex-col min-w-0 flex-1\">\n <p class=\"text-sm truncate text-zinc-300 leading-tight\">\n {{ i.pageLabel || i.entityName || i.name || '-' }}\n </p>\n @if (i.entityTypeLabel) {\n <p class=\"text-[10px] text-zinc-500 leading-tight mt-0.5\">\n {{ i.entityTypeLabel }}\n </p>\n }\n </div>\n </div>\n }\n\n @case ('isLiked') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-12\">\n <xs-image\n [item]=\"i?.user\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n [objectFit]=\"'cover'\"\n rounded=\"2xl\"\n customClass=\"lg:h-12 lg:w-12\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <a class=\"block my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n {{ i.user?.name ?? textsService.t('TABLE_ITEMS.USER_DELETED') }}\n </a>\n <p class=\"mt-1 text-sm leading-none text-gray-500 dark:text-gray-400 font-extralight\">\n {{ (i.user?.type | XSTypeUser) ?? textsService.unknown }}\n </p>\n </div>\n </div>\n }\n\n @case ('nameStatsPage') {\n <a\n [href]=\"getUrlStatsPage($any(item()))\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"flex flex-col my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\"\n >\n <span>{{ i.name | truncateText: 60 }}</span>\n <span class=\"text-sm font-extralight dark:text-zinc-400\">{{ i.path }}</span>\n </a>\n }\n\n @case ('nameStatsEvent') {\n <a\n [href]=\"getUrlStatsPage($any(item()))\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"flex flex-col my-1 mr-2 text-lg font-extrabold leading-none text-black dark:text-white\"\n >\n <span>\n {{ getNameOrCategoryEvent(i.name, 'name')! }}\n <span>{{ getNameOrCategoryEvent(i.name, 'value') }}</span>\n </span>\n <span class=\"text-sm font-extralight dark:text-zinc-400\">\n {{ getNameOrCategoryEvent(i.name, 'category') | titlecase }}\n </span>\n </a>\n }\n\n @case ('type') {\n <xs-badge\n [size]=\"'md'\"\n [icon]=\"'folder'\"\n [label]=\"$any(item())[header().key]\"\n ></xs-badge>\n }\n\n @case ('typeUser') {\n <xs-badge\n [size]=\"'md'\"\n [icon]=\"'folder'\"\n [label]=\"$any(item())[header().key] | XSTypeUser\"\n ></xs-badge>\n }\n\n @case ('typeOrSubtype') {\n @let typeLabel = i.type === 'media' || i.type === 'site'\n ? (i.subtype | titlecase)\n : i.type === 'organization'\n ? (i.subtype | typeES)\n : (i.type | typeES);\n @let normalizedType = (typeLabel + '').toLowerCase();\n @if (typeLabel) {\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n normalizedType.includes('club') || normalizedType.includes('sala') || normalizedType.includes('bar')\n ? 'info'\n : normalizedType.includes('festival') || normalizedType.includes('concierto') || normalizedType.includes('evento')\n ? 'success'\n : normalizedType.includes('promot') || normalizedType.includes('agencia') || normalizedType.includes('management')\n ? 'warning'\n : normalizedType.includes('discoteca') || normalizedType.includes('teatro')\n ? 'secondary'\n : 'default'\n \"\n [label]=\"typeLabel\"\n ></xs-badge>\n }\n }\n\n @case ('fieldReport') {\n <p class=\"font-extralight\">{{ i.message?.split(': ')[0] ?? '' | truncateText: 50 }}</p>\n }\n\n @case ('year') {\n @if (i.year) {\n <xs-badge [size]=\"'md'\" [label]=\"i.year + ''\"></xs-badge>\n }\n }\n\n @case ('normal') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('normalTypeLink') {\n @if ($any(item())[i.type] && $any(item())[i.type].name) {\n <a>{{ $any(item())[i.type].name }}</a>\n }\n }\n\n @case ('siteType') {\n @if (i.site?.type) {\n @let siteTypeLabel = i.site.type | titlecase;\n @let normalizedSiteType = (siteTypeLabel + '').toLowerCase();\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n normalizedSiteType.includes('club') || normalizedSiteType.includes('sala') || normalizedSiteType.includes('bar')\n ? 'info'\n : normalizedSiteType.includes('festival') || normalizedSiteType.includes('concierto') || normalizedSiteType.includes('evento')\n ? 'success'\n : normalizedSiteType.includes('promot') || normalizedSiteType.includes('agencia')\n ? 'warning'\n : 'default'\n \"\n [label]=\"siteTypeLabel\"\n ></xs-badge>\n }\n }\n\n @case ('value') {\n <span class=\"font-extralight\">\n {{ $any(item())[header().key] != null ? '\u20AC' + ($any(item())[header().key] | number: '1.2-2') : '' }}\n </span>\n }\n\n @case ('source') {\n @if (i.source === 'youtube' || i.source === 'soundcloud') {\n <xs-icon\n [icon]=\"i.source === 'youtube' ? ['fab', 'youtube'] : ['fab', 'soundcloud']\"\n [ngClass]=\"{\n 'text-red-600': i.source === 'youtube',\n 'text-orange-600': i.source === 'soundcloud',\n }\"\n ></xs-icon>\n }\n @if (i.source && i.source !== 'youtube' && i.source !== 'soundcloud') {\n <span>{{ i.source }}</span>\n }\n }\n\n @case ('xsSemi') {\n <p class=\"text-xs font-semibold\">{{ $any(item())[header().key]?.length ? $any(item())[header().key] : '\u2014' }}</p>\n }\n\n @case ('xsSemiNumber') {\n <p class=\"text-xs font-semibold\">{{ $any(item())[header().key] ?? 0 }}</p>\n }\n\n @case ('boolean') {\n <p>{{ $any(item())[header().key] ? textsService.yes : textsService.no }}</p>\n }\n\n @case ('booleanImage') {\n <xs-icon\n [icon]=\"$any(item())[header().key] ? 'check' : 'close'\"\n [ngClass]=\"{\n 'text-green-500': $any(item())[header().key],\n 'text-red-500': !$any(item())[header().key],\n }\"\n ></xs-icon>\n }\n\n @case ('booleanImageReverse') {\n <xs-icon\n [icon]=\"!$any(item())[header().key] ? 'check' : 'close'\"\n [ngClass]=\"{\n 'text-green-500': !$any(item())[header().key],\n 'text-red-500': $any(item())[header().key],\n }\"\n ></xs-icon>\n }\n\n @case ('slugTrueFalse') {\n <span class=\"px-2 py-1 rounded-xl bg-zinc-900/50\">\n <xs-icon\n [icon]=\"i.slug && i.slug !== 'None' ? 'check' : 'close'\"\n ></xs-icon>\n </span>\n }\n\n @case ('coordinates') {\n @if ($any(item())[header().key] && ($any(item())[header().key].lat || $any(item())[header().key].lng)) {\n <span>{{ ($any(item())[header().key].lat | number: '1.4-4') || ($any(item())[header().key].lng | number: '1.4-4') }}</span>\n }\n @if ($any(item())[header().key] && ($any(item())[header().key].lon || $any(item())[header().key].lng)) {\n <span>{{ $any(item())[header().key].lon || $any(item())[header().key].lng | number: '1.4-4' }}</span>\n }\n @if (!$any(item())[header().key]) {\n <span>{{ $any(item())[header().key] }}</span>\n }\n }\n\n @case ('typeVisit') {\n <xs-badge [size]=\"'md'\" [variant]=\"'error'\" [label]=\"$any(item())[header().key] | typeES\"></xs-badge>\n }\n\n @case ('language') {\n <xs-badge\n [size]=\"'md'\"\n [url]=\"(i.language === 'es' ? i.language : 'us') | countryFlag\"\n [label]=\"i.language === 'es' ? textsService.t('TABLE_ITEMS.LANGUAGE.ES') : i.language === 'en' ? textsService.t('TABLE_ITEMS.LANGUAGE.EN') : (i.language | titlecase)\"\n ></xs-badge>\n }\n\n @case ('claimed') {\n @let isClaimed = i.user && (!i.user.name || i.user.name !== 'XSMusic');\n <xs-badge [size]=\"'md'\" [variant]=\"isClaimed ? 'success' : 'error'\">\n <xs-icon [icon]=\"isClaimed ? 'check' : 'close'\" size=\"xs\"></xs-icon>\n </xs-badge>\n }\n\n @case ('commentTruncate') {\n <a>{{ $any(item())[header().key] | truncateText: 20 }}</a>\n }\n\n @case ('user') {\n @if (i.user) {\n <div class=\"flex gap-3 mr-16 items-center\">\n <div class=\"h-9 w-9\">\n <xs-image\n [item]=\"i.user\"\n [typeItem]=\"'user'\"\n [imageType]=\"'small'\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"contain\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col items-center\">\n <a class=\"block mr-2 text-lg font-extrabold leading-none text-black dark:text-white\">\n {{ i.user?.name }}\n </a>\n <div class=\"flex gap-2 items-start w-full\">\n @if (i.user.country && i.user.country.code) {\n <xs-image\n [src]=\"i.user.country.code | countryFlag\"\n [alt]=\"i.user.country.code\"\n size=\"xs\"\n ></xs-image>\n }\n <p class=\"mt-1 text-sm leading-none text-gray-400 font-extralight\">\n {{ i.user && i.user.type ? (i.user.type | XSTypeUser) : textsService.t('TABLE_ITEMS.ROLE.USER') }}\n </p>\n </div>\n </div>\n </div>\n }\n }\n\n @case ('styles') {\n @if (i.styles) {\n <div class=\"flex min-w-[11rem] flex-nowrap items-center gap-1 overflow-hidden\">\n @for (style of getStyles($any(item())) | sliceArray: 0 : 2; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 shrink-0 rounded-full\"\n [style.background-color]=\"$any(style).color || '#71717a'\"\n ></span>\n <span class=\"truncate\">{{ style.name ?? '' | truncateText: 15 | titlecase }}</span>\n </xs-badge>\n }\n @if (i.styles.length > 2) {\n <xs-badge [size]=\"'sm'\" [variant]=\"'secondary'\" [customClasses]=\"'shrink-0'\" [label]=\"'+' + (i.styles.length - 2)\"></xs-badge>\n }\n </div>\n @if (i.styles.length === 0) {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NO_STYLES')\"></xs-badge>\n }\n }\n }\n\n @case ('artists') {\n @let artists = getArtists($any(item()));\n @if (artists.length > 0) {\n <div class=\"flex min-w-[11rem] flex-nowrap items-center gap-1 overflow-hidden\">\n @for (artist of artists | sliceArray: 0 : 2; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <div class=\"h-4 w-4 shrink-0 overflow-hidden rounded-full\">\n <xs-image\n [item]=\"artist\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n size=\"full\"\n rounded=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <span class=\"truncate\">{{ artist.name }}</span>\n </xs-badge>\n }\n @if (artists.length > 2) {\n <xs-badge [size]=\"'sm'\" [variant]=\"'secondary'\" [customClasses]=\"'shrink-0'\" [label]=\"'+' + (artists.length - 2)\"></xs-badge>\n }\n </div>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"'0'\"></xs-badge>\n }\n }\n\n @case ('artistsEvent') {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"(i.artists && (i.artists.length ?? 0)) + ''\"\n ></xs-badge>\n }\n\n @case ('displayZones') {\n <div class=\"flex flex-wrap gap-1\">\n @for (zone of i.displayZones; track $index) {\n <xs-badge [size]=\"'md'\" [variant]=\"'amber'\" [label]=\"zone | firstLetterCase\"></xs-badge>\n }\n </div>\n }\n\n @case ('types') {\n <div class=\"flex min-w-[11rem] flex-wrap items-center gap-1\">\n @for (type of $any(item())[header().key]; track $index) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 shrink-0 rounded-full\"\n [style.background-color]=\"$any(type)?.color || $any(type)?.style?.color || '#a1a1aa'\"\n ></span>\n <span class=\"truncate\">{{ type | typeES }}</span>\n </xs-badge>\n }\n </div>\n }\n\n @case ('equipmentSetups') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.equipmentSetups || 0) + ' ' + (i.equipmentSetups === 1 ? 'usuario' : 'usuarios')\"></xs-badge>\n }\n\n @case ('equipmentSetupComponents') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.components?.length || 0) + ''\"></xs-badge>\n }\n\n @case ('typeEquipment') {\n <div class=\"flex flex-col items-start gap-1\">\n <div class=\"flex items-center gap-1\">\n <div class=\"w-2.5 h-2.5 text-xs border border-zinc-900 bg-zinc-900/50\"></div>\n <div class=\"flex flex-col\">\n <span class=\"text-xs font-extralight\">{{ i.type?.name }}</span>\n </div>\n </div>\n </div>\n }\n\n @case ('slides') {\n {{ i.slides?.length || 0 }} slides\n }\n\n @case ('socialLogin') {\n @if (socialLoginButtons.length === 1) {\n <xs-button\n [icon]=\"getButtonIcon(socialLoginButtons[0])\"\n [variant]=\"socialLoginButtons[0].variant || 'primary'\"\n [layout]=\"socialLoginButtons[0].layout || 'base'\"\n class=\"max-w-fit\"\n ></xs-button>\n }\n @if (socialLoginButtons.length > 1) {\n <xs-buttons-group\n [buttonsInput]=\"socialLoginButtons\"\n class=\"max-w-fit\"\n ></xs-buttons-group>\n }\n }\n\n @case ('jira') {\n @if (i.jira) {\n <span class=\"text-xs\">{{ i.jira }}</span>\n }\n @if (!i.jira) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n }\n\n @case ('suggestionType') {\n <xs-badge [size]=\"'md'\" [variant]=\"'error'\" [label]=\"(i.suggestionType ?? i.type) + ''\"></xs-badge>\n }\n\n @case ('typeModel') {\n <xs-badge\n size=\"md\"\n [label]=\"i.appType === 'web' ? 'PWA' : i.appType === 'mobile' ? 'APP' : 'N/D'\"\n [icon]=\"getIconDeviceBrand($any(item()))\"\n ></xs-badge>\n }\n\n @case ('appVersion') {\n <p class=\"text-sm\">{{ i.appVersion }}</p>\n }\n\n @case ('faqCategory') {\n <p>{{ i.category?.name }}</p>\n }\n\n @case ('faqPosition') {\n {{ i.category?.position ?? '' }} / {{ i.position }}\n }\n\n @case ('countryArtist') {\n <xs-badge\n [size]=\"'md'\"\n [url]=\"i.country?.code ? (i.country.code | countryFlag) : ''\"\n [label]=\"i.country?.name || i.country?.code || ''\"\n ></xs-badge>\n }\n\n @case ('durationPromotion') {\n <xs-badge [size]=\"'md'\" [label]=\"(i.duration ?? 0) + ' d\u00EDas'\"></xs-badge>\n }\n\n @case ('githubDateDuration') {\n <div class=\"flex flex-col text-xs font-extralight\">\n <div class=\"flex items-center gap-1\">\n <xs-icon size=\"xs\" [icon]=\"['far', 'calendar']\"></xs-icon>\n {{ i.created_at | date: 'dd/MM/yyyy' }}\n </div>\n <div class=\"flex items-center gap-1\">\n <xs-icon size=\"xs\" [icon]=\"'clock'\"></xs-icon>\n {{ i.duration }}\n </div>\n </div>\n }\n\n @case ('organizationItem') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('playlist') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('position') {\n <span class=\"font-black\">#{{ $any(item())[header().key] }}</span>\n }\n\n @case ('recordLabelItem') {\n <xs-table-items-entity [header]=\"header()\" [item]=\"$any(item())\"></xs-table-items-entity>\n }\n\n @case ('scrapingEvents') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('startEnd') {\n <div class=\"flex flex-col text-xs\">\n <span>{{ i.date | date: 'dd/MM/yyyy' }}</span>\n <span>{{ i.endDate | date: 'dd/MM/yyyy' }}</span>\n </div>\n }\n\n @case ('town') {\n <span>{{ $any(item())[header().key] }}</span>\n }\n\n @case ('scrapingEventHeader') {\n <div class=\"flex items-center gap-2\">\n <div class=\"h-10 w-10 shrink-0 overflow-hidden rounded-lg bg-zinc-800\">\n @if ($any(item())['image']) {\n <xs-image\n [src]=\"$any(item())['image']\"\n alt=\"\"\n customClass=\"object-cover w-full h-full\"\n ></xs-image>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <a\n class=\"font-medium text-sm truncate text-zinc-900 dark:text-zinc-100 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-200\"\n [href]=\"'https://ra.co/events/' + $any(item())['ra']\"\n target=\"_blank\"\n rel=\"nofollow noopener\"\n >\n {{ $any(itemForDisplay)?.name ?? '' }}\n </a>\n </div>\n </div>\n }\n\n @case ('scrapingEventSite') {\n @if ($any(item())['site']?._id === adminUser.ANONYMOUS_SITE) {\n <span class=\"text-sm text-zinc-300\">-</span>\n } @else {\n <div class=\"flex items-center gap-1.5\">\n @if ($any(item())['site']?.address?.country?.code) {\n <img\n [src]=\"$any(item())['site'].address.country.code | countryFlag\"\n [alt]=\"$any(item())['site'].address.country.name\"\n class=\"w-4 h-4 shrink-0\"\n />\n }\n <span class=\"text-sm truncate text-zinc-300\">{{ $any(item())['site']?.name }}</span>\n </div>\n }\n }\n\n @case ('normalBadge') {\n <xs-badge size=\"md\" [label]=\"$any(item())[header().key]\"></xs-badge>\n }\n\n @default {\n <span>{{ $any(item())[header().key] }}</span>\n }\n }\n}\n" }]
|
|
18327
18360
|
}], ctorParameters: () => [], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], subType: [{ type: i0.Input, args: [{ isSignal: true, alias: "subType", required: true }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], admin: [{ type: i0.Input, args: [{ isSignal: true, alias: "admin", required: false }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }] } });
|
|
18328
18361
|
|
|
18329
18362
|
class XSTableCheckboxComponent {
|