@xsmusices/ui 2.0.15 → 2.0.19
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-xs-table.xsstory-BxeiNlxo.mjs → xsmusices-ui-xs-table.xsstory-ClD95mg-.mjs} +41 -111
- package/fesm2022/xsmusices-ui-xs-table.xsstory-ClD95mg-.mjs.map +1 -0
- package/fesm2022/xsmusices-ui.mjs +10 -9
- package/fesm2022/xsmusices-ui.mjs.map +1 -1
- package/index.d.ts +18 -18
- package/package.json +1 -1
- package/fesm2022/xsmusices-ui-xs-table.xsstory-BxeiNlxo.mjs.map +0 -1
|
@@ -15183,7 +15183,7 @@ class XSChatConversationComponent {
|
|
|
15183
15183
|
}
|
|
15184
15184
|
}
|
|
15185
15185
|
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 class=\"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 });
|
|
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 });
|
|
15187
15187
|
}
|
|
15188
15188
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatConversationComponent, decorators: [{
|
|
15189
15189
|
type: Component,
|
|
@@ -15196,7 +15196,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
15196
15196
|
], host: {
|
|
15197
15197
|
'xs-chat-conversation-host': '',
|
|
15198
15198
|
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 class=\"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 " }]
|
|
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 " }]
|
|
15200
15200
|
}], 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
15201
|
|
|
15202
15202
|
class XSChatFloatingPanelComponent {
|
|
@@ -17583,7 +17583,7 @@ class XSTableItemsStateComponent {
|
|
|
17583
17583
|
: 'green';
|
|
17584
17584
|
}
|
|
17585
17585
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17586
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsStateComponent, isStandalone: true, selector: "xs-table-items-state", 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: "@let i = $any(item());\n@switch (header().type) {\n @case ('githubStatus') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': $any(item())[header().key] === '\u00C9xito',\n 'bg-red-500': $any(item())[header().key] === 'Fallido',\n 'bg-gray-500': $any(item())[header().key] === 'Cancelado' || $any(item())[header().key] === 'Omitido' || $any(item())[header().key] === 'Desconocido',\n 'bg-yellow-500': $any(item())[header().key] === 'En Progreso',\n }\"\n ></span>\n <span class=\"truncate\">{{ $any(item())[header().key] }}</span>\n </xs-badge>\n }\n @case ('githubRun') {\n <div class=\"flex items-center gap-2\">\n <div\n class=\"w-4 h-4 rounded-full flex items-center justify-center text-white\"\n [ngClass]=\"{\n 'bg-green-500': i.status_text === '\u00C9xito',\n 'bg-red-500': i.status_text === 'Fallido',\n 'bg-gray-500': i.status_text === 'Cancelado' || i.status_text === 'Omitido' || i.status_text === 'Desconocido' || i.status_text === 'En Cola',\n 'bg-yellow-500': i.status_text === 'En Progreso',\n }\"\n >\n @if (i.status_text === '\u00C9xito') {\n <xs-icon size=\"xs\" [icon]=\"'check'\"></xs-icon>\n }\n @if (i.status_text === 'Fallido') {\n <xs-icon size=\"xs\" [icon]=\"'times'\"></xs-icon>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <a\n target=\"_blank\"\n class=\"text-sm font-semibold truncate block\"\n title=\"{{ i.head_commit?.message }}\"\n >\n {{ i.head_commit?.message | truncateText: 50 }}\n </a>\n <p class=\"text-xs text-gray-400 truncate\">\n <span class=\"font-bold\">{{ i.name }}</span>\n #{{ i.run_number }}\n <span class=\"text-gray-500\">\n Commit {{ i.head_commit?.id?.slice(0, 7) }} pushed by {{ i.triggering_actor?.login }}\n </span>\n </p>\n </div>\n </div>\n }\n @case ('state') {\n @let stateValue = $any(item())[header().key];\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n stateValue === 'active' || stateValue === 'confirmed' || stateValue === 'completed'\n ? 'success'\n : stateValue === 'pending' || stateValue === 'inProgress'\n ? 'warning'\n : stateValue === 'suspended' || stateValue === 'inactive' || stateValue === 'rejected' || stateValue === 'canceled' || stateValue === 'unpaid' || stateValue === 'failed'\n ? 'error'\n : 'default'\n \"\n [label]=\"stateValue | stateName\"\n ></xs-badge>\n }\n @case ('stateFull') {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n i.state === 'active' || i.state === 'confirmed' || i.state === 'completed'\n ? 'success'\n : i.state === 'pending' || i.state === 'inProgress'\n ? 'warning'\n : i.state === 'suspended' || i.state === 'inactive' || i.state === 'rejected' || i.state === 'canceled' || i.state === 'unpaid' || i.state === 'failed'\n ? 'error'\n : 'default'\n \"\n [label]=\"i.state | stateName\"\n ></xs-badge>\n @let leadLabel =\n i.user && i.user._id === adminUserId\n ? (!i.lastContacted\n ? 'N/D'\n : (i.leadStatus === 'new' || i.leadStatus === 'contacted'\n ? (i.lastContacted | dateChat | firstLetterCase)\n : (i.leadStatus ? (i.leadStatus | leadStatus) : (i.lastContacted | dateChat | firstLetterCase))))\n : textsService.t('TABLE_ITEMS.ALREADY_VALIDATED');\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': i.leadStatus === 'new',\n 'bg-blue-500': i.leadStatus === 'contacted',\n 'bg-purple-500': i.leadStatus === 'interested',\n 'bg-indigo-600': i.leadStatus === 'highlyInterested',\n 'bg-emerald-500': i.leadStatus === 'activeCollaboration',\n 'bg-orange-500': i.leadStatus === 'ignored',\n 'bg-yellow-500': i.leadStatus === 'notRelevant',\n 'bg-red-500': i.leadStatus === 'discarded',\n 'bg-gray-400': !i.leadStatus,\n }\"\n ></span>\n <span class=\"truncate\">{{ leadLabel }}</span>\n </xs-badge>\n </div>\n }\n @case ('toggleStates') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 rounded-sm\"\n [title]=\"textsService.t('TABLE_ITEMS.PLATFORM.WEB') + ': ' + (i.stateWeb === 'on' ? textsService.t('TABLE_ITEMS.ON') : textsService.t('TABLE_ITEMS.OFF'))\"\n [ngClass]=\"i.stateWeb === 'on' ? 'bg-green-400' : 'bg-red-400'\"\n ></span>\n <span\n class=\"h-2 w-2 rounded-sm\"\n [title]=\"textsService.t('TABLE_ITEMS.PLATFORM.ANDROID') + ': ' + (i.stateAndroid === 'on' ? textsService.t('TABLE_ITEMS.ON') : textsService.t('TABLE_ITEMS.OFF'))\"\n [ngClass]=\"i.stateAndroid === 'on' ? 'bg-green-400' : 'bg-red-400'\"\n ></span>\n <span\n class=\"h-2 w-2 rounded-sm\"\n [title]=\"textsService.t('TABLE_ITEMS.PLATFORM.IOS') + ': ' + (i.stateIos === 'on' ? textsService.t('TABLE_ITEMS.ON') : textsService.t('TABLE_ITEMS.OFF'))\"\n [ngClass]=\"i.stateIos === 'on' ? 'bg-green-400' : 'bg-red-400'\"\n ></span>\n </xs-badge>\n }\n @case ('priority') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0\"\n [ngClass]=\"{\n 'bg-green-500': i.priority === 'low',\n 'bg-yellow-500': i.priority === 'medium',\n 'bg-red-500': i.priority === 'high',\n 'bg-zinc-500': !i.priority,\n }\"\n ></span>\n <span class=\"truncate\">{{ i.priority ? (i.priority | priorities) : 'N/D' }}</span>\n </xs-badge>\n }\n @case ('capacity') {\n @let capacityValue = i.capacity ?? 0;\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n capacityValue > 500\n ? 'success'\n : capacityValue > 100\n ? 'warning'\n : capacityValue > 0\n ? 'error'\n : 'default'\n \"\n [label]=\"i.capacity ? ((i.capacity | number) ?? '0') : 'N/D'\"\n ></xs-badge>\n }\n @case ('lastContactedItems') {\n <div class=\"flex gap-1.5 items-center\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1 flex items-center justify-center\"\n [ngClass]=\"{\n 'bg-green-500': i.user._id !== adminUserId,\n 'bg-yellow-500': i.user._id === adminUserId,\n }\"\n ></div>\n @if (i.lastContacted && i.user._id === adminUserId) {\n <span class=\"text-xs\">{{ i.lastContacted | dateChat | firstLetterCase }}</span>\n }\n @if ((i.lastContacted && i.user._id !== adminUserId) || i.user._id !== adminUserId) {\n <span class=\"text-xs\">{{ textsService.t('TABLE_ITEMS.VERIFIED') }}</span>\n }\n @if (!i.lastContacted && i.user._id === adminUserId) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n </div>\n }\n @case ('lastContactedOkKo') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': i.user._id !== adminUserId,\n 'bg-yellow-500': i.user._id === adminUserId,\n }\"\n ></span>\n <span class=\"truncate\">\n {{ i.user._id !== adminUserId ? textsService.t('TABLE_ITEMS.SUCCESS') : textsService.t('TABLE_ITEMS.PENDING') }}\n </span>\n </xs-badge>\n }\n @case ('level') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngStyle]=\"{ 'background-color': getLevelColor(item()) }\"\n ></span>\n <span class=\"truncate font-semibold\">{{ getLevelName(item()) }}</span>\n @if (getLevelPrice(item()) !== null) {\n <span class=\"text-zinc-400\">({{ getLevelPrice(item()) }}\u20AC)</span>\n }\n </xs-badge>\n }\n @case ('subStatePromotion') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': getSubStatePromotion(item()) === 'finished',\n 'bg-yellow-500': getSubStatePromotion(item()) === 'schedule',\n 'bg-blue-500': getSubStatePromotion(item()) === 'inProgress',\n }\"\n ></span>\n <span class=\"truncate\">{{ getSubStatePromotion(item()) | stateName }}</span>\n </xs-badge>\n }\n @case ('trueOrFalse') {\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"$any(item())[header().key] === true ? 'success' : 'error'\"\n [label]=\"$any(item())[header().key] ? textsService.yes : textsService.no\"\n ></xs-badge>\n }\n @case ('promotionCodeUsage') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"\n getRemainingPercentage(item()) > 50\n ? 'bg-green-500'\n : getRemainingPercentage(item()) > 20\n ? 'bg-yellow-500'\n : 'bg-red-500'\n \"\n ></span>\n <span class=\"truncate\">{{ i.usedCount }} / {{ i.maxUses }}</span>\n </xs-badge>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: XSIconComponent, selector: "xs-icon", inputs: ["icon", "size", "class"] }, { kind: "component", type: XSBadgeComponent, selector: "xs-badge", inputs: ["variant", "size", "ariaLabel", "icon", "url", "label", "customClasses"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: StateNamePipe, name: "stateName" }, { kind: "pipe", type: DateChatPipe, name: "dateChat" }, { kind: "pipe", type: XSFirstLetterPipe, name: "firstLetterCase" }, { kind: "pipe", type: PrioritiesPipe, name: "priorities" }, { kind: "pipe", type: LeadStatusPipe, name: "leadStatus" }, { kind: "pipe", type: TruncateTextPipe, name: "truncateText" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17586
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsStateComponent, isStandalone: true, selector: "xs-table-items-state", 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: "@let i = $any(item());\n@switch (header().type) {\n @case ('githubStatus') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': $any(item())[header().key] === '\u00C9xito',\n 'bg-red-500': $any(item())[header().key] === 'Fallido',\n 'bg-gray-500': $any(item())[header().key] === 'Cancelado' || $any(item())[header().key] === 'Omitido' || $any(item())[header().key] === 'Desconocido',\n 'bg-yellow-500': $any(item())[header().key] === 'En Progreso',\n }\"\n ></span>\n <span class=\"truncate\">{{ $any(item())[header().key] }}</span>\n </xs-badge>\n }\n @case ('githubRun') {\n <div class=\"flex items-center gap-2\">\n <div\n class=\"w-4 h-4 rounded-full flex items-center justify-center text-white\"\n [ngClass]=\"{\n 'bg-green-500': i.status_text === '\u00C9xito',\n 'bg-red-500': i.status_text === 'Fallido',\n 'bg-gray-500': i.status_text === 'Cancelado' || i.status_text === 'Omitido' || i.status_text === 'Desconocido' || i.status_text === 'En Cola',\n 'bg-yellow-500': i.status_text === 'En Progreso',\n }\"\n >\n @if (i.status_text === '\u00C9xito') {\n <xs-icon size=\"xs\" [icon]=\"'check'\"></xs-icon>\n }\n @if (i.status_text === 'Fallido') {\n <xs-icon size=\"xs\" [icon]=\"'times'\"></xs-icon>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <a\n target=\"_blank\"\n class=\"text-sm font-semibold truncate block\"\n title=\"{{ i.head_commit?.message }}\"\n >\n {{ i.head_commit?.message | truncateText: 50 }}\n </a>\n <p class=\"text-xs text-gray-400 truncate\">\n <span class=\"font-bold\">{{ i.name }}</span>\n #{{ i.run_number }}\n <span class=\"text-gray-500\">\n Commit {{ i.head_commit?.id?.slice(0, 7) }} pushed by {{ i.triggering_actor?.login }}\n </span>\n </p>\n </div>\n </div>\n }\n @case ('state') {\n @let stateValue = $any(item())[header().key];\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n stateValue === 'active' || stateValue === 'confirmed' || stateValue === 'completed'\n ? 'success'\n : stateValue === 'pending' || stateValue === 'inProgress'\n ? 'warning'\n : stateValue === 'suspended' || stateValue === 'inactive' || stateValue === 'rejected' || stateValue === 'canceled' || stateValue === 'unpaid' || stateValue === 'failed'\n ? 'error'\n : 'default'\n \"\n [label]=\"stateValue | stateName\"\n ></xs-badge>\n }\n @case ('stateFull') {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n i.state === 'active' || i.state === 'confirmed' || i.state === 'completed'\n ? 'success'\n : i.state === 'pending' || i.state === 'inProgress'\n ? 'warning'\n : i.state === 'suspended' || i.state === 'inactive' || i.state === 'rejected' || i.state === 'canceled' || i.state === 'unpaid' || i.state === 'failed'\n ? 'error'\n : 'default'\n \"\n [label]=\"i.state | stateName\"\n ></xs-badge>\n @let leadLabel =\n i.user && i.user._id === adminUserId\n ? (!i.lastContacted\n ? 'N/D'\n : (i.leadStatus === 'new' || i.leadStatus === 'contacted'\n ? (i.lastContacted | dateChat | firstLetterCase)\n : (i.leadStatus ? (i.leadStatus | leadStatus) : (i.lastContacted | dateChat | firstLetterCase))))\n : textsService.t('TABLE_ITEMS.ALREADY_VALIDATED');\n @if (leadLabel !== 'N/D') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': i.leadStatus === 'new',\n 'bg-blue-500': i.leadStatus === 'contacted',\n 'bg-purple-500': i.leadStatus === 'interested',\n 'bg-indigo-600': i.leadStatus === 'highlyInterested',\n 'bg-emerald-500': i.leadStatus === 'activeCollaboration',\n 'bg-orange-500': i.leadStatus === 'ignored',\n 'bg-yellow-500': i.leadStatus === 'notRelevant',\n 'bg-red-500': i.leadStatus === 'discarded',\n 'bg-gray-400': !i.leadStatus,\n }\"\n ></span>\n <span class=\"truncate\">{{ leadLabel }}</span>\n </xs-badge>\n }\n </div>\n }\n @case ('toggleStates') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 rounded-sm\"\n [title]=\"textsService.t('TABLE_ITEMS.PLATFORM.WEB') + ': ' + (i.stateWeb === 'on' ? textsService.t('TABLE_ITEMS.ON') : textsService.t('TABLE_ITEMS.OFF'))\"\n [ngClass]=\"i.stateWeb === 'on' ? 'bg-green-400' : 'bg-red-400'\"\n ></span>\n <span\n class=\"h-2 w-2 rounded-sm\"\n [title]=\"textsService.t('TABLE_ITEMS.PLATFORM.ANDROID') + ': ' + (i.stateAndroid === 'on' ? textsService.t('TABLE_ITEMS.ON') : textsService.t('TABLE_ITEMS.OFF'))\"\n [ngClass]=\"i.stateAndroid === 'on' ? 'bg-green-400' : 'bg-red-400'\"\n ></span>\n <span\n class=\"h-2 w-2 rounded-sm\"\n [title]=\"textsService.t('TABLE_ITEMS.PLATFORM.IOS') + ': ' + (i.stateIos === 'on' ? textsService.t('TABLE_ITEMS.ON') : textsService.t('TABLE_ITEMS.OFF'))\"\n [ngClass]=\"i.stateIos === 'on' ? 'bg-green-400' : 'bg-red-400'\"\n ></span>\n </xs-badge>\n }\n @case ('priority') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0\"\n [ngClass]=\"{\n 'bg-green-500': i.priority === 'low',\n 'bg-yellow-500': i.priority === 'medium',\n 'bg-red-500': i.priority === 'high',\n 'bg-zinc-500': !i.priority,\n }\"\n ></span>\n <span class=\"truncate\">{{ i.priority ? (i.priority | priorities) : 'N/D' }}</span>\n </xs-badge>\n }\n @case ('capacity') {\n @let capacityValue = i.capacity ?? 0;\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n capacityValue > 500\n ? 'success'\n : capacityValue > 100\n ? 'warning'\n : capacityValue > 0\n ? 'error'\n : 'default'\n \"\n [label]=\"i.capacity ? ((i.capacity | number) ?? '0') : 'N/D'\"\n ></xs-badge>\n }\n @case ('lastContactedItems') {\n <div class=\"flex gap-1.5 items-center\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1 flex items-center justify-center\"\n [ngClass]=\"{\n 'bg-green-500': i.user._id !== adminUserId,\n 'bg-yellow-500': i.user._id === adminUserId,\n }\"\n ></div>\n @if (i.lastContacted && i.user._id === adminUserId) {\n <span class=\"text-xs\">{{ i.lastContacted | dateChat | firstLetterCase }}</span>\n }\n @if ((i.lastContacted && i.user._id !== adminUserId) || i.user._id !== adminUserId) {\n <span class=\"text-xs\">{{ textsService.t('TABLE_ITEMS.VERIFIED') }}</span>\n }\n @if (!i.lastContacted && i.user._id === adminUserId) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n </div>\n }\n @case ('lastContactedOkKo') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': i.user._id !== adminUserId,\n 'bg-yellow-500': i.user._id === adminUserId,\n }\"\n ></span>\n <span class=\"truncate\">\n {{ i.user._id !== adminUserId ? textsService.t('TABLE_ITEMS.SUCCESS') : textsService.t('TABLE_ITEMS.PENDING') }}\n </span>\n </xs-badge>\n }\n @case ('level') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngStyle]=\"{ 'background-color': getLevelColor(item()) }\"\n ></span>\n <span class=\"truncate font-semibold\">{{ getLevelName(item()) }}</span>\n @if (getLevelPrice(item()) !== null) {\n <span class=\"text-zinc-400\">({{ getLevelPrice(item()) }}\u20AC)</span>\n }\n </xs-badge>\n }\n @case ('subStatePromotion') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': getSubStatePromotion(item()) === 'finished',\n 'bg-yellow-500': getSubStatePromotion(item()) === 'schedule',\n 'bg-blue-500': getSubStatePromotion(item()) === 'inProgress',\n }\"\n ></span>\n <span class=\"truncate\">{{ getSubStatePromotion(item()) | stateName }}</span>\n </xs-badge>\n }\n @case ('trueOrFalse') {\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"$any(item())[header().key] === true ? 'success' : 'error'\"\n [label]=\"$any(item())[header().key] ? textsService.yes : textsService.no\"\n ></xs-badge>\n }\n @case ('promotionCodeUsage') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"\n getRemainingPercentage(item()) > 50\n ? 'bg-green-500'\n : getRemainingPercentage(item()) > 20\n ? 'bg-yellow-500'\n : 'bg-red-500'\n \"\n ></span>\n <span class=\"truncate\">{{ i.usedCount }} / {{ i.maxUses }}</span>\n </xs-badge>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: XSIconComponent, selector: "xs-icon", inputs: ["icon", "size", "class"] }, { kind: "component", type: XSBadgeComponent, selector: "xs-badge", inputs: ["variant", "size", "ariaLabel", "icon", "url", "label", "customClasses"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: StateNamePipe, name: "stateName" }, { kind: "pipe", type: DateChatPipe, name: "dateChat" }, { kind: "pipe", type: XSFirstLetterPipe, name: "firstLetterCase" }, { kind: "pipe", type: PrioritiesPipe, name: "priorities" }, { kind: "pipe", type: LeadStatusPipe, name: "leadStatus" }, { kind: "pipe", type: TruncateTextPipe, name: "truncateText" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17587
17587
|
}
|
|
17588
17588
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsStateComponent, decorators: [{
|
|
17589
17589
|
type: Component,
|
|
@@ -17597,7 +17597,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
17597
17597
|
PrioritiesPipe,
|
|
17598
17598
|
LeadStatusPipe,
|
|
17599
17599
|
TruncateTextPipe,
|
|
17600
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = $any(item());\n@switch (header().type) {\n @case ('githubStatus') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': $any(item())[header().key] === '\u00C9xito',\n 'bg-red-500': $any(item())[header().key] === 'Fallido',\n 'bg-gray-500': $any(item())[header().key] === 'Cancelado' || $any(item())[header().key] === 'Omitido' || $any(item())[header().key] === 'Desconocido',\n 'bg-yellow-500': $any(item())[header().key] === 'En Progreso',\n }\"\n ></span>\n <span class=\"truncate\">{{ $any(item())[header().key] }}</span>\n </xs-badge>\n }\n @case ('githubRun') {\n <div class=\"flex items-center gap-2\">\n <div\n class=\"w-4 h-4 rounded-full flex items-center justify-center text-white\"\n [ngClass]=\"{\n 'bg-green-500': i.status_text === '\u00C9xito',\n 'bg-red-500': i.status_text === 'Fallido',\n 'bg-gray-500': i.status_text === 'Cancelado' || i.status_text === 'Omitido' || i.status_text === 'Desconocido' || i.status_text === 'En Cola',\n 'bg-yellow-500': i.status_text === 'En Progreso',\n }\"\n >\n @if (i.status_text === '\u00C9xito') {\n <xs-icon size=\"xs\" [icon]=\"'check'\"></xs-icon>\n }\n @if (i.status_text === 'Fallido') {\n <xs-icon size=\"xs\" [icon]=\"'times'\"></xs-icon>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <a\n target=\"_blank\"\n class=\"text-sm font-semibold truncate block\"\n title=\"{{ i.head_commit?.message }}\"\n >\n {{ i.head_commit?.message | truncateText: 50 }}\n </a>\n <p class=\"text-xs text-gray-400 truncate\">\n <span class=\"font-bold\">{{ i.name }}</span>\n #{{ i.run_number }}\n <span class=\"text-gray-500\">\n Commit {{ i.head_commit?.id?.slice(0, 7) }} pushed by {{ i.triggering_actor?.login }}\n </span>\n </p>\n </div>\n </div>\n }\n @case ('state') {\n @let stateValue = $any(item())[header().key];\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n stateValue === 'active' || stateValue === 'confirmed' || stateValue === 'completed'\n ? 'success'\n : stateValue === 'pending' || stateValue === 'inProgress'\n ? 'warning'\n : stateValue === 'suspended' || stateValue === 'inactive' || stateValue === 'rejected' || stateValue === 'canceled' || stateValue === 'unpaid' || stateValue === 'failed'\n ? 'error'\n : 'default'\n \"\n [label]=\"stateValue | stateName\"\n ></xs-badge>\n }\n @case ('stateFull') {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n i.state === 'active' || i.state === 'confirmed' || i.state === 'completed'\n ? 'success'\n : i.state === 'pending' || i.state === 'inProgress'\n ? 'warning'\n : i.state === 'suspended' || i.state === 'inactive' || i.state === 'rejected' || i.state === 'canceled' || i.state === 'unpaid' || i.state === 'failed'\n ? 'error'\n : 'default'\n \"\n [label]=\"i.state | stateName\"\n ></xs-badge>\n @let leadLabel =\n i.user && i.user._id === adminUserId\n ? (!i.lastContacted\n ? 'N/D'\n : (i.leadStatus === 'new' || i.leadStatus === 'contacted'\n ? (i.lastContacted | dateChat | firstLetterCase)\n : (i.leadStatus ? (i.leadStatus | leadStatus) : (i.lastContacted | dateChat | firstLetterCase))))\n : textsService.t('TABLE_ITEMS.ALREADY_VALIDATED');\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n
|
|
17600
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = $any(item());\n@switch (header().type) {\n @case ('githubStatus') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': $any(item())[header().key] === '\u00C9xito',\n 'bg-red-500': $any(item())[header().key] === 'Fallido',\n 'bg-gray-500': $any(item())[header().key] === 'Cancelado' || $any(item())[header().key] === 'Omitido' || $any(item())[header().key] === 'Desconocido',\n 'bg-yellow-500': $any(item())[header().key] === 'En Progreso',\n }\"\n ></span>\n <span class=\"truncate\">{{ $any(item())[header().key] }}</span>\n </xs-badge>\n }\n @case ('githubRun') {\n <div class=\"flex items-center gap-2\">\n <div\n class=\"w-4 h-4 rounded-full flex items-center justify-center text-white\"\n [ngClass]=\"{\n 'bg-green-500': i.status_text === '\u00C9xito',\n 'bg-red-500': i.status_text === 'Fallido',\n 'bg-gray-500': i.status_text === 'Cancelado' || i.status_text === 'Omitido' || i.status_text === 'Desconocido' || i.status_text === 'En Cola',\n 'bg-yellow-500': i.status_text === 'En Progreso',\n }\"\n >\n @if (i.status_text === '\u00C9xito') {\n <xs-icon size=\"xs\" [icon]=\"'check'\"></xs-icon>\n }\n @if (i.status_text === 'Fallido') {\n <xs-icon size=\"xs\" [icon]=\"'times'\"></xs-icon>\n }\n </div>\n <div class=\"flex flex-col min-w-0\">\n <a\n target=\"_blank\"\n class=\"text-sm font-semibold truncate block\"\n title=\"{{ i.head_commit?.message }}\"\n >\n {{ i.head_commit?.message | truncateText: 50 }}\n </a>\n <p class=\"text-xs text-gray-400 truncate\">\n <span class=\"font-bold\">{{ i.name }}</span>\n #{{ i.run_number }}\n <span class=\"text-gray-500\">\n Commit {{ i.head_commit?.id?.slice(0, 7) }} pushed by {{ i.triggering_actor?.login }}\n </span>\n </p>\n </div>\n </div>\n }\n @case ('state') {\n @let stateValue = $any(item())[header().key];\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n stateValue === 'active' || stateValue === 'confirmed' || stateValue === 'completed'\n ? 'success'\n : stateValue === 'pending' || stateValue === 'inProgress'\n ? 'warning'\n : stateValue === 'suspended' || stateValue === 'inactive' || stateValue === 'rejected' || stateValue === 'canceled' || stateValue === 'unpaid' || stateValue === 'failed'\n ? 'error'\n : 'default'\n \"\n [label]=\"stateValue | stateName\"\n ></xs-badge>\n }\n @case ('stateFull') {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n i.state === 'active' || i.state === 'confirmed' || i.state === 'completed'\n ? 'success'\n : i.state === 'pending' || i.state === 'inProgress'\n ? 'warning'\n : i.state === 'suspended' || i.state === 'inactive' || i.state === 'rejected' || i.state === 'canceled' || i.state === 'unpaid' || i.state === 'failed'\n ? 'error'\n : 'default'\n \"\n [label]=\"i.state | stateName\"\n ></xs-badge>\n @let leadLabel =\n i.user && i.user._id === adminUserId\n ? (!i.lastContacted\n ? 'N/D'\n : (i.leadStatus === 'new' || i.leadStatus === 'contacted'\n ? (i.lastContacted | dateChat | firstLetterCase)\n : (i.leadStatus ? (i.leadStatus | leadStatus) : (i.lastContacted | dateChat | firstLetterCase))))\n : textsService.t('TABLE_ITEMS.ALREADY_VALIDATED');\n @if (leadLabel !== 'N/D') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': i.leadStatus === 'new',\n 'bg-blue-500': i.leadStatus === 'contacted',\n 'bg-purple-500': i.leadStatus === 'interested',\n 'bg-indigo-600': i.leadStatus === 'highlyInterested',\n 'bg-emerald-500': i.leadStatus === 'activeCollaboration',\n 'bg-orange-500': i.leadStatus === 'ignored',\n 'bg-yellow-500': i.leadStatus === 'notRelevant',\n 'bg-red-500': i.leadStatus === 'discarded',\n 'bg-gray-400': !i.leadStatus,\n }\"\n ></span>\n <span class=\"truncate\">{{ leadLabel }}</span>\n </xs-badge>\n }\n </div>\n }\n @case ('toggleStates') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2 w-2 rounded-sm\"\n [title]=\"textsService.t('TABLE_ITEMS.PLATFORM.WEB') + ': ' + (i.stateWeb === 'on' ? textsService.t('TABLE_ITEMS.ON') : textsService.t('TABLE_ITEMS.OFF'))\"\n [ngClass]=\"i.stateWeb === 'on' ? 'bg-green-400' : 'bg-red-400'\"\n ></span>\n <span\n class=\"h-2 w-2 rounded-sm\"\n [title]=\"textsService.t('TABLE_ITEMS.PLATFORM.ANDROID') + ': ' + (i.stateAndroid === 'on' ? textsService.t('TABLE_ITEMS.ON') : textsService.t('TABLE_ITEMS.OFF'))\"\n [ngClass]=\"i.stateAndroid === 'on' ? 'bg-green-400' : 'bg-red-400'\"\n ></span>\n <span\n class=\"h-2 w-2 rounded-sm\"\n [title]=\"textsService.t('TABLE_ITEMS.PLATFORM.IOS') + ': ' + (i.stateIos === 'on' ? textsService.t('TABLE_ITEMS.ON') : textsService.t('TABLE_ITEMS.OFF'))\"\n [ngClass]=\"i.stateIos === 'on' ? 'bg-green-400' : 'bg-red-400'\"\n ></span>\n </xs-badge>\n }\n @case ('priority') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0\"\n [ngClass]=\"{\n 'bg-green-500': i.priority === 'low',\n 'bg-yellow-500': i.priority === 'medium',\n 'bg-red-500': i.priority === 'high',\n 'bg-zinc-500': !i.priority,\n }\"\n ></span>\n <span class=\"truncate\">{{ i.priority ? (i.priority | priorities) : 'N/D' }}</span>\n </xs-badge>\n }\n @case ('capacity') {\n @let capacityValue = i.capacity ?? 0;\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"\n capacityValue > 500\n ? 'success'\n : capacityValue > 100\n ? 'warning'\n : capacityValue > 0\n ? 'error'\n : 'default'\n \"\n [label]=\"i.capacity ? ((i.capacity | number) ?? '0') : 'N/D'\"\n ></xs-badge>\n }\n @case ('lastContactedItems') {\n <div class=\"flex gap-1.5 items-center\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1 flex items-center justify-center\"\n [ngClass]=\"{\n 'bg-green-500': i.user._id !== adminUserId,\n 'bg-yellow-500': i.user._id === adminUserId,\n }\"\n ></div>\n @if (i.lastContacted && i.user._id === adminUserId) {\n <span class=\"text-xs\">{{ i.lastContacted | dateChat | firstLetterCase }}</span>\n }\n @if ((i.lastContacted && i.user._id !== adminUserId) || i.user._id !== adminUserId) {\n <span class=\"text-xs\">{{ textsService.t('TABLE_ITEMS.VERIFIED') }}</span>\n }\n @if (!i.lastContacted && i.user._id === adminUserId) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n </div>\n }\n @case ('lastContactedOkKo') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': i.user._id !== adminUserId,\n 'bg-yellow-500': i.user._id === adminUserId,\n }\"\n ></span>\n <span class=\"truncate\">\n {{ i.user._id !== adminUserId ? textsService.t('TABLE_ITEMS.SUCCESS') : textsService.t('TABLE_ITEMS.PENDING') }}\n </span>\n </xs-badge>\n }\n @case ('level') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngStyle]=\"{ 'background-color': getLevelColor(item()) }\"\n ></span>\n <span class=\"truncate font-semibold\">{{ getLevelName(item()) }}</span>\n @if (getLevelPrice(item()) !== null) {\n <span class=\"text-zinc-400\">({{ getLevelPrice(item()) }}\u20AC)</span>\n }\n </xs-badge>\n }\n @case ('subStatePromotion') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"{\n 'bg-green-500': getSubStatePromotion(item()) === 'finished',\n 'bg-yellow-500': getSubStatePromotion(item()) === 'schedule',\n 'bg-blue-500': getSubStatePromotion(item()) === 'inProgress',\n }\"\n ></span>\n <span class=\"truncate\">{{ getSubStatePromotion(item()) | stateName }}</span>\n </xs-badge>\n }\n @case ('trueOrFalse') {\n <xs-badge\n [size]=\"'md'\"\n [variant]=\"$any(item())[header().key] === true ? 'success' : 'error'\"\n [label]=\"$any(item())[header().key] ? textsService.yes : textsService.no\"\n ></xs-badge>\n }\n @case ('promotionCodeUsage') {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-[2px]\"\n [ngClass]=\"\n getRemainingPercentage(item()) > 50\n ? 'bg-green-500'\n : getRemainingPercentage(item()) > 20\n ? 'bg-yellow-500'\n : 'bg-red-500'\n \"\n ></span>\n <span class=\"truncate\">{{ i.usedCount }} / {{ i.maxUses }}</span>\n </xs-badge>\n }\n}\n" }]
|
|
17601
17601
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }] } });
|
|
17602
17602
|
|
|
17603
17603
|
class XSTableItemsVisitsComponent {
|
|
@@ -17831,7 +17831,7 @@ class XSTableItemsDateComponent {
|
|
|
17831
17831
|
return diffDays >= minDays && diffDays <= maxDays;
|
|
17832
17832
|
}
|
|
17833
17833
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17834
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsDateComponent, isStandalone: true, selector: "xs-table-items-date", 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: "@if (item()) {\n@let i = $any(item());\n@let h = $any(header());\n@switch (h.type) {\n @case ('lastLoginUser') {\n @if (i.user?.lastLogin && i.user?._id !== adminUserId) {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n i.user.lastLogin && i.user.lastLogin !== 'None'\n ? ((i.user.lastLogin | dateChat | firstLetterCase) ?? '')\n : textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\n \"\n ></xs-badge>\n }\n }\n @case ('date') {\n @if (i[h.key]) {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | date: 'dd-MM-yyyy') ?? ''\"></xs-badge>\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | date: 'HH:mm') ?? ''\"></xs-badge>\n </div>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n }\n @case ('dateTime') {\n @if (i[h.key]) {\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | dateChat | firstLetterCase) ?? ''\"></xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n }\n @case ('lastLogin') {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"i[h.key] ? ((i[h.key] | dateChat | firstLetterCase) ?? '') : textsService.t('TABLE_ITEMS.NEVER')\"\n ></xs-badge>\n }\n @case ('dateMini') {\n @let date = i[h.key];\n @if (date) {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge [size]=\"'md'\" [label]=\"$any(date).length >= 10 ? ((date | date: 'dd') ?? '') : ''\"></xs-badge>\n @if ($any(date).length >= 10) {\n <xs-badge [size]=\"'md'\" [variant]=\"'secondary'\" [label]=\"((date | date: 'MMM') ?? '') | uppercase\"></xs-badge>\n }\n </div>\n }\n }\n}\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSBadgeComponent, selector: "xs-badge", inputs: ["variant", "size", "ariaLabel", "icon", "url", "label", "customClasses"] }, { kind: "pipe", type: i1$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: DateChatPipe, name: "dateChat" }, { kind: "pipe", type: XSFirstLetterPipe, name: "firstLetterCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17834
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsDateComponent, isStandalone: true, selector: "xs-table-items-date", 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: "@if (item()) {\n@let i = $any(item());\n@let h = $any(header());\n@switch (h.type) {\n @case ('lastLoginUser') {\n @if (i.user?.lastLogin && i.user?._id !== adminUserId) {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n i.user.lastLogin && i.user.lastLogin !== 'None'\n ? ((i.user.lastLogin | dateChat | firstLetterCase) ?? '')\n : textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\n \"\n ></xs-badge>\n }\n }\n @case ('date') {\n @if (i[h.key]) {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | date: 'dd-MM-yyyy') ?? ''\"></xs-badge>\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | date: 'HH:mm') ?? ''\"></xs-badge>\n </div>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n }\n @case ('dateTime') {\n @if (i[h.key]) {\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | dateChat | firstLetterCase) ?? ''\"></xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n }\n @case ('lastLogin') {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"i[h.key] ? ((i[h.key] | dateChat | firstLetterCase) ?? '') : textsService.t('TABLE_ITEMS.NEVER')\"\n ></xs-badge>\n }\n @case ('dateMini') {\n @let date = i[h.key];\n @if (date) {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge [size]=\"'md'\" [label]=\"$any(date).length >= 10 ? ((date | date: 'dd') ?? '') : ''\"></xs-badge>\n @if ($any(date).length >= 10) {\n <xs-badge [size]=\"'md'\" [variant]=\"'secondary'\" [label]=\"((date | date: 'MMM') ?? '') | uppercase\"></xs-badge>\n }\n </div>\n }\n }\n @case ('createdUpdated') {\n @let createdVal = i.created ?? i.createdAt;\n @let updatedVal = i.updated ?? i.updatedAt;\n <div class=\"flex flex-col items-start gap-1\">\n <div class=\"flex items-center gap-1\">\n <span class=\"text-[10px] font-black text-zinc-500 uppercase\">C</span>\n @if (createdVal) {\n <xs-badge [size]=\"'md'\" [label]=\"(createdVal | date: 'dd-MM-yyyy HH:mm') ?? ''\"></xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"text-[10px] font-black text-zinc-500 uppercase\">U</span>\n @if (updatedVal) {\n <xs-badge [size]=\"'md'\" [label]=\"(updatedVal | date: 'dd-MM-yyyy HH:mm') ?? ''\"></xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n </div>\n </div>\n }\n}\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSBadgeComponent, selector: "xs-badge", inputs: ["variant", "size", "ariaLabel", "icon", "url", "label", "customClasses"] }, { kind: "pipe", type: i1$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: DateChatPipe, name: "dateChat" }, { kind: "pipe", type: XSFirstLetterPipe, name: "firstLetterCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17835
17835
|
}
|
|
17836
17836
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsDateComponent, decorators: [{
|
|
17837
17837
|
type: Component,
|
|
@@ -17840,7 +17840,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
17840
17840
|
DateChatPipe,
|
|
17841
17841
|
XSFirstLetterPipe,
|
|
17842
17842
|
XSBadgeComponent,
|
|
17843
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (item()) {\n@let i = $any(item());\n@let h = $any(header());\n@switch (h.type) {\n @case ('lastLoginUser') {\n @if (i.user?.lastLogin && i.user?._id !== adminUserId) {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n i.user.lastLogin && i.user.lastLogin !== 'None'\n ? ((i.user.lastLogin | dateChat | firstLetterCase) ?? '')\n : textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\n \"\n ></xs-badge>\n }\n }\n @case ('date') {\n @if (i[h.key]) {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | date: 'dd-MM-yyyy') ?? ''\"></xs-badge>\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | date: 'HH:mm') ?? ''\"></xs-badge>\n </div>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n }\n @case ('dateTime') {\n @if (i[h.key]) {\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | dateChat | firstLetterCase) ?? ''\"></xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n }\n @case ('lastLogin') {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"i[h.key] ? ((i[h.key] | dateChat | firstLetterCase) ?? '') : textsService.t('TABLE_ITEMS.NEVER')\"\n ></xs-badge>\n }\n @case ('dateMini') {\n @let date = i[h.key];\n @if (date) {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge [size]=\"'md'\" [label]=\"$any(date).length >= 10 ? ((date | date: 'dd') ?? '') : ''\"></xs-badge>\n @if ($any(date).length >= 10) {\n <xs-badge [size]=\"'md'\" [variant]=\"'secondary'\" [label]=\"((date | date: 'MMM') ?? '') | uppercase\"></xs-badge>\n }\n </div>\n }\n }\n}\n}\n" }]
|
|
17843
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (item()) {\n@let i = $any(item());\n@let h = $any(header());\n@switch (h.type) {\n @case ('lastLoginUser') {\n @if (i.user?.lastLogin && i.user?._id !== adminUserId) {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n i.user.lastLogin && i.user.lastLogin !== 'None'\n ? ((i.user.lastLogin | dateChat | firstLetterCase) ?? '')\n : textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\n \"\n ></xs-badge>\n }\n }\n @case ('date') {\n @if (i[h.key]) {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | date: 'dd-MM-yyyy') ?? ''\"></xs-badge>\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | date: 'HH:mm') ?? ''\"></xs-badge>\n </div>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n }\n @case ('dateTime') {\n @if (i[h.key]) {\n <xs-badge [size]=\"'md'\" [label]=\"(i[h.key] | dateChat | firstLetterCase) ?? ''\"></xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n }\n @case ('lastLogin') {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"i[h.key] ? ((i[h.key] | dateChat | firstLetterCase) ?? '') : textsService.t('TABLE_ITEMS.NEVER')\"\n ></xs-badge>\n }\n @case ('dateMini') {\n @let date = i[h.key];\n @if (date) {\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge [size]=\"'md'\" [label]=\"$any(date).length >= 10 ? ((date | date: 'dd') ?? '') : ''\"></xs-badge>\n @if ($any(date).length >= 10) {\n <xs-badge [size]=\"'md'\" [variant]=\"'secondary'\" [label]=\"((date | date: 'MMM') ?? '') | uppercase\"></xs-badge>\n }\n </div>\n }\n }\n @case ('createdUpdated') {\n @let createdVal = i.created ?? i.createdAt;\n @let updatedVal = i.updated ?? i.updatedAt;\n <div class=\"flex flex-col items-start gap-1\">\n <div class=\"flex items-center gap-1\">\n <span class=\"text-[10px] font-black text-zinc-500 uppercase\">C</span>\n @if (createdVal) {\n <xs-badge [size]=\"'md'\" [label]=\"(createdVal | date: 'dd-MM-yyyy HH:mm') ?? ''\"></xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"text-[10px] font-black text-zinc-500 uppercase\">U</span>\n @if (updatedVal) {\n <xs-badge [size]=\"'md'\" [label]=\"(updatedVal | date: 'dd-MM-yyyy HH:mm') ?? ''\"></xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NOT_AVAILABLE')\"></xs-badge>\n }\n </div>\n </div>\n }\n}\n}\n" }]
|
|
17844
17844
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }] } });
|
|
17845
17845
|
|
|
17846
17846
|
class XSTableItemsCountryComponent {
|
|
@@ -18002,6 +18002,7 @@ class XSTableItemsComponent {
|
|
|
18002
18002
|
'lastLoginUser',
|
|
18003
18003
|
'lastLogin',
|
|
18004
18004
|
'dateMini',
|
|
18005
|
+
'createdUpdated',
|
|
18005
18006
|
],
|
|
18006
18007
|
country: [
|
|
18007
18008
|
'country',
|
|
@@ -18295,7 +18296,7 @@ class XSTableItemsComponent {
|
|
|
18295
18296
|
: button.icon;
|
|
18296
18297
|
}
|
|
18297
18298
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18298
|
-
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-wrap items-center gap-1\">\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'\" [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-wrap items-center gap-1\">\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'\" [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 });
|
|
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 });
|
|
18299
18300
|
}
|
|
18300
18301
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsComponent, decorators: [{
|
|
18301
18302
|
type: Component,
|
|
@@ -18322,7 +18323,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
18322
18323
|
XSTableItemsDateComponent,
|
|
18323
18324
|
XSTableItemsCountryComponent,
|
|
18324
18325
|
XSTableItemsRoleComponent,
|
|
18325
|
-
], 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-wrap items-center gap-1\">\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'\" [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-wrap items-center gap-1\">\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'\" [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" }]
|
|
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" }]
|
|
18326
18327
|
}], 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 }] }] } });
|
|
18327
18328
|
|
|
18328
18329
|
class XSTableCheckboxComponent {
|
|
@@ -21948,7 +21949,7 @@ const LIB_STORIES = [
|
|
|
21948
21949
|
() => import('./xsmusices-ui-xs-section-title.xsstory-CHlZ69FK.mjs').then((m) => m.story),
|
|
21949
21950
|
() => import('./xsmusices-ui-xs-profile-tops.xsstory-DSwdyEYc.mjs').then((m) => m.story),
|
|
21950
21951
|
() => import('./xsmusices-ui-xs-table-items.xsstory-qKGBMrjP.mjs').then((m) => m.story),
|
|
21951
|
-
() => import('./xsmusices-ui-xs-table.xsstory-
|
|
21952
|
+
() => import('./xsmusices-ui-xs-table.xsstory-ClD95mg-.mjs').then((m) => m.story),
|
|
21952
21953
|
() => import('./xsmusices-ui-xs-title-collapse.xsstory-Bs_SOeq_.mjs').then((m) => m.story),
|
|
21953
21954
|
() => Promise.resolve().then(function () { return xsSpinner_xsstory; }).then((m) => m.story),
|
|
21954
21955
|
() => import('./xsmusices-ui-country-flag.xsstory-Z3oNFSU_.mjs').then((m) => m.story),
|