@xsmusices/ui 2.0.15 → 2.0.17
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 +8 -7
- 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
|
@@ -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),
|