@xsmusices/ui 2.0.5 → 2.0.15
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-BNaB0GGa.mjs → xsmusices-ui-xs-table.xsstory-BxeiNlxo.mjs} +49 -87
- package/fesm2022/xsmusices-ui-xs-table.xsstory-BxeiNlxo.mjs.map +1 -0
- package/fesm2022/xsmusices-ui.mjs +114 -23
- package/fesm2022/xsmusices-ui.mjs.map +1 -1
- package/index.d.ts +54 -22
- package/package.json +1 -1
- package/fesm2022/xsmusices-ui-xs-table.xsstory-BNaB0GGa.mjs.map +0 -1
|
@@ -3610,6 +3610,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
3610
3610
|
}]
|
|
3611
3611
|
}] });
|
|
3612
3612
|
|
|
3613
|
+
/**
|
|
3614
|
+
* XS-985 — «reales (boost)» p. ej. `51 (4)`. Solo admin: la app
|
|
3615
|
+
* pública nunca lo usa (ningún endpoint/template público expone
|
|
3616
|
+
* boosted). Sin impulsadas devuelve el total con formato es-ES.
|
|
3617
|
+
*/
|
|
3618
|
+
class VisitsSplitPipe {
|
|
3619
|
+
transform(total, boosted) {
|
|
3620
|
+
const safeTotal = Math.max(0, total ?? 0);
|
|
3621
|
+
const safeBoosted = Math.max(0, boosted ?? 0);
|
|
3622
|
+
const formatted = safeTotal.toLocaleString('es-ES');
|
|
3623
|
+
if (safeBoosted <= 0)
|
|
3624
|
+
return formatted;
|
|
3625
|
+
const organic = Math.max(0, safeTotal - safeBoosted);
|
|
3626
|
+
return `${organic.toLocaleString('es-ES')} (${safeBoosted.toLocaleString('es-ES')})`;
|
|
3627
|
+
}
|
|
3628
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: VisitsSplitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3629
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.33", ngImport: i0, type: VisitsSplitPipe, isStandalone: true, name: "visitsSplit" });
|
|
3630
|
+
}
|
|
3631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: VisitsSplitPipe, decorators: [{
|
|
3632
|
+
type: Pipe,
|
|
3633
|
+
args: [{
|
|
3634
|
+
name: 'visitsSplit',
|
|
3635
|
+
standalone: true,
|
|
3636
|
+
}]
|
|
3637
|
+
}] });
|
|
3638
|
+
|
|
3613
3639
|
var PIPES$3 = {
|
|
3614
3640
|
TIMEAGO: {
|
|
3615
3641
|
NOW: "ahora mismo",
|
|
@@ -4161,6 +4187,7 @@ const STANDALONE_PIPES = [
|
|
|
4161
4187
|
SuggestionTypePipe,
|
|
4162
4188
|
TableLinkPipe,
|
|
4163
4189
|
XSThousandsSeparatorPipe,
|
|
4190
|
+
VisitsSplitPipe,
|
|
4164
4191
|
TimeAgoPipe,
|
|
4165
4192
|
TitleMediaPipe,
|
|
4166
4193
|
TruncateTextPipe,
|
|
@@ -12402,10 +12429,13 @@ class XSBadgeComponent {
|
|
|
12402
12429
|
'xs-badge',
|
|
12403
12430
|
`xs-badge-${this.size()}`,
|
|
12404
12431
|
`xs-badge-${this.variant()}`,
|
|
12405
|
-
|
|
12432
|
+
this.customClasses(),
|
|
12433
|
+
]
|
|
12434
|
+
.filter(Boolean)
|
|
12435
|
+
.join(' ');
|
|
12406
12436
|
}
|
|
12407
12437
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12408
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSBadgeComponent, isStandalone: true, selector: "xs-badge", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, customClasses: { classPropertyName: "customClasses", publicName: "customClasses", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "xs-badge-host": "" } }, ngImport: i0, template: " <span\n [ngClass]=\"badgeClasses\"\n [attr.aria-label]=\"ariaLabel()\"\n >\n @if (icon()) {\n <xs-icon\n [icon]=\"icon()!\"\n [class]=\"label() ? 'mr-1' : ''\"\n ></xs-icon>\n }\n @if (url()) {\n <div class=\"
|
|
12438
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSBadgeComponent, isStandalone: true, selector: "xs-badge", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, customClasses: { classPropertyName: "customClasses", publicName: "customClasses", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "xs-badge-host": "" } }, ngImport: i0, template: " <span\n [ngClass]=\"badgeClasses\"\n [attr.aria-label]=\"ariaLabel()\"\n >\n @if (icon()) {\n <xs-icon\n [icon]=\"icon()!\"\n [class]=\"label() ? 'mr-1' : ''\"\n ></xs-icon>\n }\n @if (url()) {\n <div class=\"h-4 w-4 shrink-0 {{ label() ? 'mr-1' : '' }}\">\n <xs-image\n [src]=\"url()\"\n [rounded]=\"'lg'\"\n [size]=\"'full'\"\n ></xs-image>\n </div>\n }\n @if (label()) {\n <span>{{ label() }}</span>\n }\n <ng-content></ng-content>\n </span>\n", styles: [".xs-badge{display:inline-flex;align-items:center;gap:.25rem;font-weight:500;border-radius:.375rem;box-shadow:0 1px 2px #0000000d;line-height:1;max-width:100%}.xs-badge-sm{padding:.125rem .5rem;font-size:10px}.xs-badge-md{padding:.375rem .625rem;font-size:10px}.xs-badge-lg{padding:.5rem .75rem;font-size:12px}.xs-badge-default{background:#00000080;color:#ffffffe6}.xs-badge-success{background:#22c55e33;color:#86efac}.xs-badge-warning{background:#eab30833;color:#fde047}.xs-badge-error{background:#ef444433;color:#fca5a5}.xs-badge-info{background:#3b82f633;color:#93c5fd}.xs-badge-secondary{background:#3f3f4666;color:#d4d4d8}.xs-badge-amber{background:#f59e0b33;color:#fcd34d}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: XSIconComponent, selector: "xs-icon", inputs: ["icon", "size", "class"] }, { kind: "component", type: XSImageComponent, selector: "xs-image", inputs: ["config", "viewTransitionName", "src", "alt", "width", "height", "size", "rounded", "objectFit", "clickable", "item", "typeItem", "imageType", "fallbackSrc", "loading", "priority", "customClass", "generateAvatar"], outputs: ["onClick", "onLoad", "onError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12409
12439
|
}
|
|
12410
12440
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSBadgeComponent, decorators: [{
|
|
12411
12441
|
type: Component,
|
|
@@ -12414,7 +12444,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
12414
12444
|
FontAwesomeModule,
|
|
12415
12445
|
XSIconComponent,
|
|
12416
12446
|
XSImageComponent,
|
|
12417
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: " <span\n [ngClass]=\"badgeClasses\"\n [attr.aria-label]=\"ariaLabel()\"\n >\n @if (icon()) {\n <xs-icon\n [icon]=\"icon()!\"\n [class]=\"label() ? 'mr-1' : ''\"\n ></xs-icon>\n }\n @if (url()) {\n <div class=\"
|
|
12447
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: " <span\n [ngClass]=\"badgeClasses\"\n [attr.aria-label]=\"ariaLabel()\"\n >\n @if (icon()) {\n <xs-icon\n [icon]=\"icon()!\"\n [class]=\"label() ? 'mr-1' : ''\"\n ></xs-icon>\n }\n @if (url()) {\n <div class=\"h-4 w-4 shrink-0 {{ label() ? 'mr-1' : '' }}\">\n <xs-image\n [src]=\"url()\"\n [rounded]=\"'lg'\"\n [size]=\"'full'\"\n ></xs-image>\n </div>\n }\n @if (label()) {\n <span>{{ label() }}</span>\n }\n <ng-content></ng-content>\n </span>\n", styles: [".xs-badge{display:inline-flex;align-items:center;gap:.25rem;font-weight:500;border-radius:.375rem;box-shadow:0 1px 2px #0000000d;line-height:1;max-width:100%}.xs-badge-sm{padding:.125rem .5rem;font-size:10px}.xs-badge-md{padding:.375rem .625rem;font-size:10px}.xs-badge-lg{padding:.5rem .75rem;font-size:12px}.xs-badge-default{background:#00000080;color:#ffffffe6}.xs-badge-success{background:#22c55e33;color:#86efac}.xs-badge-warning{background:#eab30833;color:#fde047}.xs-badge-error{background:#ef444433;color:#fca5a5}.xs-badge-info{background:#3b82f633;color:#93c5fd}.xs-badge-secondary{background:#3f3f4666;color:#d4d4d8}.xs-badge-amber{background:#f59e0b33;color:#fcd34d}\n"] }]
|
|
12418
12448
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], customClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClasses", required: false }] }] } });
|
|
12419
12449
|
|
|
12420
12450
|
class XSBreadcrumbsComponent {
|
|
@@ -17492,19 +17522,19 @@ class XSTableItemsEntityComponent {
|
|
|
17492
17522
|
return !Array.isArray(value);
|
|
17493
17523
|
}
|
|
17494
17524
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsEntityComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17495
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsEntityComponent, isStandalone: true, selector: "xs-table-items-entity", 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 ('artist') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"itemForImage?._id || i._id\"\n rounded=\"lg\"\n [objectFit]=\"'cover'\"\n size=\"full\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n }}\n </p>\n @if (i.country || itemForDisplay.country) {\n <div class=\"flex items-center gap-1\">\n <xs-image\n [src]=\"\n i.country?.code ||\n itemForDisplay.country?.code ||\n i.country ||\n itemForDisplay.country | countryFlag\n \"\n rounded=\"none\"\n [objectFit]=\"'cover'\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n <p\n class=\"text-xs font-medium text-zinc-500 dark:text-zinc-400 leading-tight\"\n >\n {{\n i.country?.name ||\n itemForDisplay.country?.name ||\n (i.country | countryName) ||\n (itemForDisplay.country | countryName)\n }}\n </p>\n </div>\n }\n @if (!(i.country || itemForDisplay.country)) {\n <p\n class=\"text-xs font-medium text-zinc-500 dark:text-zinc-400 leading-tight\"\n >\n {{ textsService.notClaimed }}\n </p>\n }\n </div>\n </div>\n }\n @case ('artistNameAdmin') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"itemForImage?._id || i._id\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-tight text-black dark:text-white\"\n >\n {{ itemForDisplay.name || i.name | truncateText: 40 }}\n </p>\n @let ownerId =\n i.user?._id || itemForDisplay.user?._id;\n @let ownerName =\n i.user?.name || itemForDisplay.user?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"w-fit rounded bg-zinc-500/20 px-1.5 py-px text-[10px] font-semibold uppercase tracking-[0.08em] text-zinc-400\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <p\n class=\"flex items-center gap-1 text-xs font-normal leading-normal text-zinc-500 dark:text-zinc-400\"\n >\n <span class=\"truncate\">{{\n ownerName | truncateText: 25\n }}</span>\n <svg\n [attr.aria-label]=\"\n textsService.t('TABLE_ITEMS.VERIFIED')\n \"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </p>\n }\n </div>\n </div>\n }\n @case ('event') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'event'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n | truncateText: 40\n }}\n </p>\n @let ownerId =\n i.user?._id || itemForDisplay.user?._id;\n @let ownerName =\n i.user?.name || itemForDisplay.user?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"w-fit rounded bg-zinc-500/20 px-1.5 py-px text-[10px] font-semibold uppercase tracking-[0.08em] text-zinc-400\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <p\n class=\"flex items-center gap-1 text-xs font-normal leading-normal text-zinc-500 dark:text-zinc-400\"\n >\n <span class=\"truncate\">{{\n ownerName | truncateText: 25\n }}</span>\n <svg\n [attr.aria-label]=\"\n textsService.t('TABLE_ITEMS.VERIFIED')\n \"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </p>\n }\n </div>\n </div>\n }\n @case ('media') {\n @if (\n itemForDisplay && itemForDisplay.name !== 'Desconocido'\n ) {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'media'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name ||\n itemForDisplay.title ||\n i.name | truncateText: 40\n }}\n </p>\n @if (itemForDisplay || item()) {\n <div class=\"flex gap-1 items-center\">\n <p class=\"text-xs font-light text-gray-400\">\n @if (\n getArtists(itemForDisplay || item()).length > 0\n ) {\n @for (\n artist of getArtists(\n itemForDisplay || item()\n ) | sliceArray: 0 : 3;\n track $index\n ) {\n @if ($index !== 0) {\n <span> & </span>\n }\n {{ artist.name }}\n }\n } @else {\n {{\n (itemForDisplay.artist || i.artist)?.name ||\n (itemForDisplay.user || i.user)?.name ||\n '---'\n }}\n }\n </p>\n </div>\n }\n </div>\n </div>\n }\n }\n @case ('site') {\n @if (itemForDisplay?._id === ImportantItems.ANONYMOUS_SITE) {\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n -\n </p>\n } @else {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'site'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name ||\n itemForDisplay.title ||\n i.name | truncateText: 20\n }}\n </p>\n <div class=\"flex items-center gap-1\">\n @if (itemForDisplay.address?.country?.code) {\n <xs-image\n [src]=\"\n itemForDisplay.address?.country?.code\n | countryFlag\n \"\n rounded=\"none\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n }\n <span class=\"text-xs font-light text-gray-400\">\n {{\n itemForDisplay.address?.region\n ? (itemForDisplay.address.region.name\n | fixRegion\n | truncateText: 20)\n : (itemForDisplay.address?.country?.code\n | countryName)\n }}\n </span>\n </div>\n @let ownerId =\n i.user?._id || itemForDisplay.user?._id;\n @let ownerName =\n i.user?.name || itemForDisplay.user?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"w-fit rounded bg-zinc-500/20 px-1.5 py-px text-[10px] font-semibold uppercase tracking-[0.08em] text-zinc-400\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <p\n class=\"flex items-center gap-1 text-xs font-normal leading-normal text-zinc-500 dark:text-zinc-400\"\n >\n <span class=\"truncate\">{{\n ownerName | truncateText: 25\n }}</span>\n <svg\n [attr.aria-label]=\"\n textsService.t('TABLE_ITEMS.VERIFIED')\n \"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </p>\n }\n </div>\n </div>\n }\n }\n @case ('siteItem') {\n @if (i.site) {\n @if (i.site._id === ImportantItems.ANONYMOUS_SITE) {\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n -\n </p>\n } @else {\n <div class=\"flex items-center w-64 gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"i.site\"\n [typeItem]=\"'site'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-10 h-10\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.site.name | truncateText: 20 }}\n </p>\n <div\n class=\"flex items-center gap-1 text-xs font-light text-gray-400\"\n >\n <xs-image\n [src]=\"\n i.site.address?.country?.code | countryFlag\n \"\n customClass=\"w-4 h-3\"\n ></xs-image>\n <span>\n {{\n i.site.address?.region\n ? (i.site.address?.region.name\n | fixRegion\n | truncateText: 20)\n : (i.site.address?.town | truncateText: 20)\n }}\n </span>\n </div>\n </div>\n </div>\n }\n }\n }\n @case ('organization') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'organization'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n | truncateText: 40\n }}\n </p>\n @let ownerId =\n i.user?._id || itemForDisplay.user?._id;\n @let ownerName =\n i.user?.name || itemForDisplay.user?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"w-fit rounded bg-zinc-500/20 px-1.5 py-px text-[10px] font-semibold uppercase tracking-[0.08em] text-zinc-400\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <p\n class=\"flex items-center gap-1 text-xs font-normal leading-normal text-zinc-500 dark:text-zinc-400\"\n >\n <span class=\"truncate\">{{\n ownerName | truncateText: 25\n }}</span>\n <svg\n [attr.aria-label]=\"\n textsService.t('TABLE_ITEMS.VERIFIED')\n \"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </p>\n }\n </div>\n </div>\n }\n @case ('organizationObject') {\n @if (i.organizations?.length > 0) {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"i.organizations[0]\"\n [typeItem]=\"'organization'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col justify-center gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.organizations[0]?.name | truncateText: 40 }}\n </p>\n @if (i.organizations[0].country) {\n <div class=\"flex items-center gap-1\">\n <xs-image\n [src]=\"\n i.organizations[0].country?.code ||\n i.organizations[0].country | countryFlag\n \"\n rounded=\"none\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n <span class=\"text-xs font-light text-gray-400\">\n {{\n i.organizations[0].country?.name ||\n (i.organizations[0].country | countryName)\n }}\n </span>\n </div>\n }\n </div>\n @if (i.organizations.length > 1) {\n <p class=\"text-sm text-gray-500\">\n +{{ i.organizations.length - 1 }}\n </p>\n }\n </div>\n }\n @if (!i.organizations || i.organizations.length === 0) {\n <p>{{ textsService.t('TABLE_ITEMS.NO_LABEL') }}</p>\n }\n }\n @case ('equipment') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"item()\"\n [typeItem]=\"'equipment'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.name | truncateText: 40 }}\n </p>\n <p class=\"text-xs font-extralight\">\n {{\n i.manufacturer ??\n (i.equipment && i.equipment.length\n ? i.equipment[0]\n : '')\n }}\n </p>\n </div>\n </div>\n }\n @case ('equipmentSetupArtist') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-8\">\n <xs-image\n [item]=\"i.artist\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.artist.name | truncateText: 40 }}\n </p>\n <p\n class=\"flex items-center gap-1 text-xs leading-none font-extralight\"\n >\n <xs-image\n [src]=\"i.artist.country?.code | countryFlag\"\n rounded=\"none\"\n objectFit=\"cover\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n {{ i.artist.country?.name | truncateText: 20 }}\n </p>\n </div>\n </div>\n }\n @case ('itemContactManagement') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-8\">\n <xs-image\n [item]=\"item()\"\n [typeItem]=\"i.type\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.name | truncateText: 40 }}\n </p>\n <div class=\"flex items-center gap-1\">\n <xs-image\n [item]=\"i.country\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"none\"\n customClass=\"w-4 h-4\"\n ></xs-image>\n <p class=\"text-xs font-extralight\">\n {{ i.country?.name }}\n </p>\n </div>\n </div>\n </div>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSImageComponent, selector: "xs-image", inputs: ["config", "viewTransitionName", "src", "alt", "width", "height", "size", "rounded", "objectFit", "clickable", "item", "typeItem", "imageType", "fallbackSrc", "loading", "priority", "customClass", "generateAvatar"], outputs: ["onClick", "onLoad", "onError"] }, { kind: "pipe", type: CountryFlagPipe, name: "countryFlag" }, { kind: "pipe", type: CountryNamePipe, name: "countryName" }, { kind: "pipe", type: TruncateTextPipe, name: "truncateText" }, { kind: "pipe", type: FixRegionPipe, name: "fixRegion" }, { kind: "pipe", type: SliceArrayPipe, name: "sliceArray" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17525
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsEntityComponent, isStandalone: true, selector: "xs-table-items-entity", 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 ('artist') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"itemForImage?._id || i._id\"\n rounded=\"lg\"\n [objectFit]=\"'cover'\"\n size=\"full\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n }}\n </p>\n @if (i.country || itemForDisplay.country) {\n <div class=\"flex items-center gap-1\">\n <xs-image\n [src]=\"\n i.country?.code ||\n itemForDisplay.country?.code ||\n i.country ||\n itemForDisplay.country | countryFlag\n \"\n rounded=\"none\"\n [objectFit]=\"'cover'\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n <p\n class=\"text-xs font-medium text-zinc-500 dark:text-zinc-400 leading-tight\"\n >\n {{\n i.country?.name ||\n itemForDisplay.country?.name ||\n (i.country | countryName) ||\n (itemForDisplay.country | countryName)\n }}\n </p>\n </div>\n }\n @if (!(i.country || itemForDisplay.country)) {\n <p\n class=\"text-xs font-medium text-zinc-500 dark:text-zinc-400 leading-tight\"\n >\n {{ textsService.notClaimed }}\n </p>\n }\n </div>\n </div>\n }\n @case ('artistNameAdmin') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"itemForImage?._id || i._id\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-tight text-black dark:text-white\"\n >\n {{ itemForDisplay.name || i.name | truncateText: 40 }}\n </p>\n @let ownerId = i.user?._id || itemForDisplay.user?._id;\n @let owner = i.user || itemForDisplay.user;\n @let ownerName = owner?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.notClaimed\"></xs-badge>\n } @else if (ownerName) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n @if (owner?.country?.code) {\n <xs-image\n [src]=\"owner.country.code | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ ownerName | truncateText: 25 }}</span>\n <svg\n [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </xs-badge>\n }\n </div>\n </div>\n }\n @case ('event') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'event'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n | truncateText: 40\n }}\n </p>\n @let ownerId = i.user?._id || itemForDisplay.user?._id;\n @let owner = i.user || itemForDisplay.user;\n @let ownerName = owner?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <span\n class=\"inline-flex w-fit max-w-full items-center gap-1 rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n @if (owner?.country?.code) {\n <xs-image\n [src]=\"owner.country.code | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ ownerName | truncateText: 25 }}</span>\n <svg\n [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </span>\n }\n </div>\n </div>\n }\n @case ('media') {\n @if (itemForDisplay && itemForDisplay.name !== 'Desconocido') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'media'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-tight text-black dark:text-white\"\n >\n {{\n itemForDisplay.name ||\n itemForDisplay.title ||\n i.name | truncateText: 40\n }}\n </p>\n @let ownerId = i.user?._id || itemForDisplay.user?._id;\n @let owner = i.user || itemForDisplay.user;\n @let ownerName = owner?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.notClaimed\"></xs-badge>\n } @else if (ownerName) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n @if (owner?.country?.code) {\n <xs-image\n [src]=\"owner.country.code | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ ownerName | truncateText: 25 }}</span>\n <svg\n [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </xs-badge>\n }\n </div>\n </div>\n }\n }\n @case ('site') {\n @if (itemForDisplay?._id === ImportantItems.ANONYMOUS_SITE) {\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n -\n </p>\n } @else {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'site'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-tight text-black dark:text-white\"\n >\n {{\n itemForDisplay.name ||\n itemForDisplay.title ||\n i.name | truncateText: 20\n }}\n </p>\n @let ownerId = i.user?._id || itemForDisplay.user?._id;\n @let owner = i.user || itemForDisplay.user;\n @let ownerName = owner?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <span\n class=\"inline-flex w-fit max-w-full items-center gap-1 rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n @if (owner?.country?.code) {\n <xs-image\n [src]=\"owner.country.code | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ ownerName | truncateText: 25 }}</span>\n <svg\n [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </span>\n }\n </div>\n </div>\n }\n }\n @case ('siteItem') {\n @if (i.site) {\n @if (i.site._id === ImportantItems.ANONYMOUS_SITE) {\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n -\n </p>\n } @else {\n <div class=\"flex items-center w-64 gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"i.site\"\n [typeItem]=\"'site'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-10 h-10\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.site.name | truncateText: 20 }}\n </p>\n @let siteItemLocationLabel =\n i.site.address?.region\n ? (i.site.address?.region.name | fixRegion | truncateText: 20)\n : (i.site.address?.town | truncateText: 20);\n @if (i.site.address?.country?.code || siteItemLocationLabel) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n @if (i.site.address?.country?.code) {\n <xs-image\n [src]=\"i.site.address.country.code | countryFlag\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ siteItemLocationLabel }}</span>\n </xs-badge>\n }\n </div>\n </div>\n }\n }\n }\n @case ('organization') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'organization'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n | truncateText: 40\n }}\n </p>\n @let ownerId = i.user?._id || itemForDisplay.user?._id;\n @let owner = i.user || itemForDisplay.user;\n @let ownerName = owner?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <span\n class=\"inline-flex w-fit max-w-full items-center gap-1 rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n @if (owner?.country?.code) {\n <xs-image\n [src]=\"owner.country.code | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ ownerName | truncateText: 25 }}</span>\n <svg\n [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </span>\n }\n </div>\n </div>\n }\n @case ('organizationObject') {\n @if (i.organizations?.length > 0) {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"i.organizations[0]\"\n [typeItem]=\"'organization'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col justify-center gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.organizations[0]?.name | truncateText: 40 }}\n </p>\n @if (i.organizations[0].country) {\n @let orgCountry = i.organizations[0].country;\n @let orgCountryCode = orgCountry?.code || orgCountry;\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <xs-image\n [src]=\"orgCountryCode | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n <span class=\"truncate\">\n {{ orgCountry?.name || (orgCountryCode | countryName) }}\n </span>\n </xs-badge>\n }\n </div>\n @if (i.organizations.length > 1) {\n <p class=\"text-sm text-gray-500\">\n +{{ i.organizations.length - 1 }}\n </p>\n }\n </div>\n }\n @if (!i.organizations || i.organizations.length === 0) {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NO_LABEL')\"></xs-badge>\n }\n }\n @case ('equipment') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"item()\"\n [typeItem]=\"'equipment'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.name | truncateText: 40 }}\n </p>\n <p class=\"text-xs font-extralight\">\n {{\n i.manufacturer ??\n (i.equipment && i.equipment.length\n ? i.equipment[0]\n : '')\n }}\n </p>\n </div>\n </div>\n }\n @case ('equipmentSetupArtist') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-8\">\n <xs-image\n [item]=\"i.artist\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.artist.name | truncateText: 40 }}\n </p>\n <p\n class=\"flex items-center gap-1 text-xs leading-none font-extralight\"\n >\n <xs-image\n [src]=\"i.artist.country?.code | countryFlag\"\n rounded=\"none\"\n objectFit=\"cover\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n {{ i.artist.country?.name | truncateText: 20 }}\n </p>\n </div>\n </div>\n }\n @case ('itemContactManagement') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-8\">\n <xs-image\n [item]=\"item()\"\n [typeItem]=\"i.type\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.name | truncateText: 40 }}\n </p>\n <div class=\"flex items-center gap-1\">\n <xs-image\n [item]=\"i.country\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"none\"\n customClass=\"w-4 h-4\"\n ></xs-image>\n <p class=\"text-xs font-extralight\">\n {{ i.country?.name }}\n </p>\n </div>\n </div>\n </div>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSImageComponent, selector: "xs-image", inputs: ["config", "viewTransitionName", "src", "alt", "width", "height", "size", "rounded", "objectFit", "clickable", "item", "typeItem", "imageType", "fallbackSrc", "loading", "priority", "customClass", "generateAvatar"], outputs: ["onClick", "onLoad", "onError"] }, { kind: "component", type: XSBadgeComponent, selector: "xs-badge", inputs: ["variant", "size", "ariaLabel", "icon", "url", "label", "customClasses"] }, { kind: "pipe", type: CountryFlagPipe, name: "countryFlag" }, { kind: "pipe", type: CountryNamePipe, name: "countryName" }, { kind: "pipe", type: TruncateTextPipe, name: "truncateText" }, { kind: "pipe", type: FixRegionPipe, name: "fixRegion" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17496
17526
|
}
|
|
17497
17527
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsEntityComponent, decorators: [{
|
|
17498
17528
|
type: Component,
|
|
17499
17529
|
args: [{ selector: 'xs-table-items-entity', standalone: true, imports: [
|
|
17500
17530
|
CommonModule,
|
|
17501
17531
|
XSImageComponent,
|
|
17532
|
+
XSBadgeComponent,
|
|
17502
17533
|
CountryFlagPipe,
|
|
17503
17534
|
CountryNamePipe,
|
|
17504
17535
|
TruncateTextPipe,
|
|
17505
17536
|
FixRegionPipe,
|
|
17506
|
-
SliceArrayPipe,
|
|
17507
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = $any(item());\n@switch (header().type) {\n @case ('artist') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"itemForImage?._id || i._id\"\n rounded=\"lg\"\n [objectFit]=\"'cover'\"\n size=\"full\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n }}\n </p>\n @if (i.country || itemForDisplay.country) {\n <div class=\"flex items-center gap-1\">\n <xs-image\n [src]=\"\n i.country?.code ||\n itemForDisplay.country?.code ||\n i.country ||\n itemForDisplay.country | countryFlag\n \"\n rounded=\"none\"\n [objectFit]=\"'cover'\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n <p\n class=\"text-xs font-medium text-zinc-500 dark:text-zinc-400 leading-tight\"\n >\n {{\n i.country?.name ||\n itemForDisplay.country?.name ||\n (i.country | countryName) ||\n (itemForDisplay.country | countryName)\n }}\n </p>\n </div>\n }\n @if (!(i.country || itemForDisplay.country)) {\n <p\n class=\"text-xs font-medium text-zinc-500 dark:text-zinc-400 leading-tight\"\n >\n {{ textsService.notClaimed }}\n </p>\n }\n </div>\n </div>\n }\n @case ('artistNameAdmin') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"itemForImage?._id || i._id\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-tight text-black dark:text-white\"\n >\n {{ itemForDisplay.name || i.name | truncateText: 40 }}\n </p>\n @let ownerId =\n i.user?._id || itemForDisplay.user?._id;\n @let ownerName =\n i.user?.name || itemForDisplay.user?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"w-fit rounded bg-zinc-500/20 px-1.5 py-px text-[10px] font-semibold uppercase tracking-[0.08em] text-zinc-400\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <p\n class=\"flex items-center gap-1 text-xs font-normal leading-normal text-zinc-500 dark:text-zinc-400\"\n >\n <span class=\"truncate\">{{\n ownerName | truncateText: 25\n }}</span>\n <svg\n [attr.aria-label]=\"\n textsService.t('TABLE_ITEMS.VERIFIED')\n \"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </p>\n }\n </div>\n </div>\n }\n @case ('event') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'event'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n | truncateText: 40\n }}\n </p>\n @let ownerId =\n i.user?._id || itemForDisplay.user?._id;\n @let ownerName =\n i.user?.name || itemForDisplay.user?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"w-fit rounded bg-zinc-500/20 px-1.5 py-px text-[10px] font-semibold uppercase tracking-[0.08em] text-zinc-400\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <p\n class=\"flex items-center gap-1 text-xs font-normal leading-normal text-zinc-500 dark:text-zinc-400\"\n >\n <span class=\"truncate\">{{\n ownerName | truncateText: 25\n }}</span>\n <svg\n [attr.aria-label]=\"\n textsService.t('TABLE_ITEMS.VERIFIED')\n \"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </p>\n }\n </div>\n </div>\n }\n @case ('media') {\n @if (\n itemForDisplay && itemForDisplay.name !== 'Desconocido'\n ) {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'media'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name ||\n itemForDisplay.title ||\n i.name | truncateText: 40\n }}\n </p>\n @if (itemForDisplay || item()) {\n <div class=\"flex gap-1 items-center\">\n <p class=\"text-xs font-light text-gray-400\">\n @if (\n getArtists(itemForDisplay || item()).length > 0\n ) {\n @for (\n artist of getArtists(\n itemForDisplay || item()\n ) | sliceArray: 0 : 3;\n track $index\n ) {\n @if ($index !== 0) {\n <span> & </span>\n }\n {{ artist.name }}\n }\n } @else {\n {{\n (itemForDisplay.artist || i.artist)?.name ||\n (itemForDisplay.user || i.user)?.name ||\n '---'\n }}\n }\n </p>\n </div>\n }\n </div>\n </div>\n }\n }\n @case ('site') {\n @if (itemForDisplay?._id === ImportantItems.ANONYMOUS_SITE) {\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n -\n </p>\n } @else {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'site'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name ||\n itemForDisplay.title ||\n i.name | truncateText: 20\n }}\n </p>\n <div class=\"flex items-center gap-1\">\n @if (itemForDisplay.address?.country?.code) {\n <xs-image\n [src]=\"\n itemForDisplay.address?.country?.code\n | countryFlag\n \"\n rounded=\"none\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n }\n <span class=\"text-xs font-light text-gray-400\">\n {{\n itemForDisplay.address?.region\n ? (itemForDisplay.address.region.name\n | fixRegion\n | truncateText: 20)\n : (itemForDisplay.address?.country?.code\n | countryName)\n }}\n </span>\n </div>\n @let ownerId =\n i.user?._id || itemForDisplay.user?._id;\n @let ownerName =\n i.user?.name || itemForDisplay.user?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"w-fit rounded bg-zinc-500/20 px-1.5 py-px text-[10px] font-semibold uppercase tracking-[0.08em] text-zinc-400\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <p\n class=\"flex items-center gap-1 text-xs font-normal leading-normal text-zinc-500 dark:text-zinc-400\"\n >\n <span class=\"truncate\">{{\n ownerName | truncateText: 25\n }}</span>\n <svg\n [attr.aria-label]=\"\n textsService.t('TABLE_ITEMS.VERIFIED')\n \"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </p>\n }\n </div>\n </div>\n }\n }\n @case ('siteItem') {\n @if (i.site) {\n @if (i.site._id === ImportantItems.ANONYMOUS_SITE) {\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n -\n </p>\n } @else {\n <div class=\"flex items-center w-64 gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"i.site\"\n [typeItem]=\"'site'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-10 h-10\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.site.name | truncateText: 20 }}\n </p>\n <div\n class=\"flex items-center gap-1 text-xs font-light text-gray-400\"\n >\n <xs-image\n [src]=\"\n i.site.address?.country?.code | countryFlag\n \"\n customClass=\"w-4 h-3\"\n ></xs-image>\n <span>\n {{\n i.site.address?.region\n ? (i.site.address?.region.name\n | fixRegion\n | truncateText: 20)\n : (i.site.address?.town | truncateText: 20)\n }}\n </span>\n </div>\n </div>\n </div>\n }\n }\n }\n @case ('organization') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'organization'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n | truncateText: 40\n }}\n </p>\n @let ownerId =\n i.user?._id || itemForDisplay.user?._id;\n @let ownerName =\n i.user?.name || itemForDisplay.user?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"w-fit rounded bg-zinc-500/20 px-1.5 py-px text-[10px] font-semibold uppercase tracking-[0.08em] text-zinc-400\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <p\n class=\"flex items-center gap-1 text-xs font-normal leading-normal text-zinc-500 dark:text-zinc-400\"\n >\n <span class=\"truncate\">{{\n ownerName | truncateText: 25\n }}</span>\n <svg\n [attr.aria-label]=\"\n textsService.t('TABLE_ITEMS.VERIFIED')\n \"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </p>\n }\n </div>\n </div>\n }\n @case ('organizationObject') {\n @if (i.organizations?.length > 0) {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"i.organizations[0]\"\n [typeItem]=\"'organization'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col justify-center gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.organizations[0]?.name | truncateText: 40 }}\n </p>\n @if (i.organizations[0].country) {\n <div class=\"flex items-center gap-1\">\n <xs-image\n [src]=\"\n i.organizations[0].country?.code ||\n i.organizations[0].country | countryFlag\n \"\n rounded=\"none\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n <span class=\"text-xs font-light text-gray-400\">\n {{\n i.organizations[0].country?.name ||\n (i.organizations[0].country | countryName)\n }}\n </span>\n </div>\n }\n </div>\n @if (i.organizations.length > 1) {\n <p class=\"text-sm text-gray-500\">\n +{{ i.organizations.length - 1 }}\n </p>\n }\n </div>\n }\n @if (!i.organizations || i.organizations.length === 0) {\n <p>{{ textsService.t('TABLE_ITEMS.NO_LABEL') }}</p>\n }\n }\n @case ('equipment') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"item()\"\n [typeItem]=\"'equipment'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.name | truncateText: 40 }}\n </p>\n <p class=\"text-xs font-extralight\">\n {{\n i.manufacturer ??\n (i.equipment && i.equipment.length\n ? i.equipment[0]\n : '')\n }}\n </p>\n </div>\n </div>\n }\n @case ('equipmentSetupArtist') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-8\">\n <xs-image\n [item]=\"i.artist\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.artist.name | truncateText: 40 }}\n </p>\n <p\n class=\"flex items-center gap-1 text-xs leading-none font-extralight\"\n >\n <xs-image\n [src]=\"i.artist.country?.code | countryFlag\"\n rounded=\"none\"\n objectFit=\"cover\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n {{ i.artist.country?.name | truncateText: 20 }}\n </p>\n </div>\n </div>\n }\n @case ('itemContactManagement') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-8\">\n <xs-image\n [item]=\"item()\"\n [typeItem]=\"i.type\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.name | truncateText: 40 }}\n </p>\n <div class=\"flex items-center gap-1\">\n <xs-image\n [item]=\"i.country\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"none\"\n customClass=\"w-4 h-4\"\n ></xs-image>\n <p class=\"text-xs font-extralight\">\n {{ i.country?.name }}\n </p>\n </div>\n </div>\n </div>\n }\n}\n" }]
|
|
17537
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = $any(item());\n@switch (header().type) {\n @case ('artist') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"itemForImage?._id || i._id\"\n rounded=\"lg\"\n [objectFit]=\"'cover'\"\n size=\"full\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n }}\n </p>\n @if (i.country || itemForDisplay.country) {\n <div class=\"flex items-center gap-1\">\n <xs-image\n [src]=\"\n i.country?.code ||\n itemForDisplay.country?.code ||\n i.country ||\n itemForDisplay.country | countryFlag\n \"\n rounded=\"none\"\n [objectFit]=\"'cover'\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n <p\n class=\"text-xs font-medium text-zinc-500 dark:text-zinc-400 leading-tight\"\n >\n {{\n i.country?.name ||\n itemForDisplay.country?.name ||\n (i.country | countryName) ||\n (itemForDisplay.country | countryName)\n }}\n </p>\n </div>\n }\n @if (!(i.country || itemForDisplay.country)) {\n <p\n class=\"text-xs font-medium text-zinc-500 dark:text-zinc-400 leading-tight\"\n >\n {{ textsService.notClaimed }}\n </p>\n }\n </div>\n </div>\n }\n @case ('artistNameAdmin') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n [viewTransitionName]=\"itemForImage?._id || i._id\"\n size=\"full\"\n rounded=\"lg\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-tight text-black dark:text-white\"\n >\n {{ itemForDisplay.name || i.name | truncateText: 40 }}\n </p>\n @let ownerId = i.user?._id || itemForDisplay.user?._id;\n @let owner = i.user || itemForDisplay.user;\n @let ownerName = owner?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.notClaimed\"></xs-badge>\n } @else if (ownerName) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n @if (owner?.country?.code) {\n <xs-image\n [src]=\"owner.country.code | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ ownerName | truncateText: 25 }}</span>\n <svg\n [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </xs-badge>\n }\n </div>\n </div>\n }\n @case ('event') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'event'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n | truncateText: 40\n }}\n </p>\n @let ownerId = i.user?._id || itemForDisplay.user?._id;\n @let owner = i.user || itemForDisplay.user;\n @let ownerName = owner?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <span\n class=\"inline-flex w-fit max-w-full items-center gap-1 rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n @if (owner?.country?.code) {\n <xs-image\n [src]=\"owner.country.code | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ ownerName | truncateText: 25 }}</span>\n <svg\n [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </span>\n }\n </div>\n </div>\n }\n @case ('media') {\n @if (itemForDisplay && itemForDisplay.name !== 'Desconocido') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'media'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-tight text-black dark:text-white\"\n >\n {{\n itemForDisplay.name ||\n itemForDisplay.title ||\n i.name | truncateText: 40\n }}\n </p>\n @let ownerId = i.user?._id || itemForDisplay.user?._id;\n @let owner = i.user || itemForDisplay.user;\n @let ownerName = owner?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.notClaimed\"></xs-badge>\n } @else if (ownerName) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n @if (owner?.country?.code) {\n <xs-image\n [src]=\"owner.country.code | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ ownerName | truncateText: 25 }}</span>\n <svg\n [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </xs-badge>\n }\n </div>\n </div>\n }\n }\n @case ('site') {\n @if (itemForDisplay?._id === ImportantItems.ANONYMOUS_SITE) {\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n -\n </p>\n } @else {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'site'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-tight text-black dark:text-white\"\n >\n {{\n itemForDisplay.name ||\n itemForDisplay.title ||\n i.name | truncateText: 20\n }}\n </p>\n @let ownerId = i.user?._id || itemForDisplay.user?._id;\n @let owner = i.user || itemForDisplay.user;\n @let ownerName = owner?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <span\n class=\"inline-flex w-fit max-w-full items-center gap-1 rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n @if (owner?.country?.code) {\n <xs-image\n [src]=\"owner.country.code | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ ownerName | truncateText: 25 }}</span>\n <svg\n [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </span>\n }\n </div>\n </div>\n }\n }\n @case ('siteItem') {\n @if (i.site) {\n @if (i.site._id === ImportantItems.ANONYMOUS_SITE) {\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n -\n </p>\n } @else {\n <div class=\"flex items-center w-64 gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"i.site\"\n [typeItem]=\"'site'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-10 h-10\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.site.name | truncateText: 20 }}\n </p>\n @let siteItemLocationLabel =\n i.site.address?.region\n ? (i.site.address?.region.name | fixRegion | truncateText: 20)\n : (i.site.address?.town | truncateText: 20);\n @if (i.site.address?.country?.code || siteItemLocationLabel) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n @if (i.site.address?.country?.code) {\n <xs-image\n [src]=\"i.site.address.country.code | countryFlag\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ siteItemLocationLabel }}</span>\n </xs-badge>\n }\n </div>\n </div>\n }\n }\n }\n @case ('organization') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"itemForImage\"\n [typeItem]=\"'organization'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex min-w-0 flex-col gap-1.5\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{\n itemForDisplay.name || itemForDisplay.title || i.name\n | truncateText: 40\n }}\n </p>\n @let ownerId = i.user?._id || itemForDisplay.user?._id;\n @let owner = i.user || itemForDisplay.user;\n @let ownerName = owner?.name;\n @if (!ownerId || ownerId === ImportantItems.ADMIN_USER) {\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n {{ textsService.notClaimed }}\n </span>\n } @else if (ownerName) {\n <span\n class=\"inline-flex w-fit max-w-full items-center gap-1 rounded-md bg-black/50 px-2.5 py-1.5 text-[10px] font-medium leading-none text-white/90\"\n >\n @if (owner?.country?.code) {\n <xs-image\n [src]=\"owner.country.code | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n }\n <span class=\"truncate\">{{ ownerName | truncateText: 25 }}</span>\n <svg\n [attr.aria-label]=\"textsService.t('TABLE_ITEMS.VERIFIED')\"\n fill=\"rgb(0, 149, 246)\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n width=\"10\"\n class=\"shrink-0\"\n >\n <path\n 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\"\n fill-rule=\"evenodd\"\n ></path>\n </svg>\n </span>\n }\n </div>\n </div>\n }\n @case ('organizationObject') {\n @if (i.organizations?.length > 0) {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"i.organizations[0]\"\n [typeItem]=\"'organization'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col justify-center gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.organizations[0]?.name | truncateText: 40 }}\n </p>\n @if (i.organizations[0].country) {\n @let orgCountry = i.organizations[0].country;\n @let orgCountryCode = orgCountry?.code || orgCountry;\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <xs-image\n [src]=\"orgCountryCode | countryFlag\"\n rounded=\"none\"\n customClass=\"h-3 w-4 shrink-0\"\n ></xs-image>\n <span class=\"truncate\">\n {{ orgCountry?.name || (orgCountryCode | countryName) }}\n </span>\n </xs-badge>\n }\n </div>\n @if (i.organizations.length > 1) {\n <p class=\"text-sm text-gray-500\">\n +{{ i.organizations.length - 1 }}\n </p>\n }\n </div>\n }\n @if (!i.organizations || i.organizations.length === 0) {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NO_LABEL')\"></xs-badge>\n }\n }\n @case ('equipment') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10\">\n <xs-image\n [item]=\"item()\"\n [typeItem]=\"'equipment'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n size=\"full\"\n objectFit=\"cover\"\n [generateAvatar]=\"true\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.name | truncateText: 40 }}\n </p>\n <p class=\"text-xs font-extralight\">\n {{\n i.manufacturer ??\n (i.equipment && i.equipment.length\n ? i.equipment[0]\n : '')\n }}\n </p>\n </div>\n </div>\n }\n @case ('equipmentSetupArtist') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-8\">\n <xs-image\n [item]=\"i.artist\"\n [typeItem]=\"'artist'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.artist.name | truncateText: 40 }}\n </p>\n <p\n class=\"flex items-center gap-1 text-xs leading-none font-extralight\"\n >\n <xs-image\n [src]=\"i.artist.country?.code | countryFlag\"\n rounded=\"none\"\n objectFit=\"cover\"\n customClass=\"w-4 h-3\"\n ></xs-image>\n {{ i.artist.country?.name | truncateText: 20 }}\n </p>\n </div>\n </div>\n }\n @case ('itemContactManagement') {\n <div class=\"flex items-center gap-3\">\n <div class=\"w-8\">\n <xs-image\n [item]=\"item()\"\n [typeItem]=\"i.type\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"object-cover object-center w-8 h-8\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col gap-1\">\n <p\n class=\"mr-2 text-base font-bold leading-none text-black dark:text-white\"\n >\n {{ i.name | truncateText: 40 }}\n </p>\n <div class=\"flex items-center gap-1\">\n <xs-image\n [item]=\"i.country\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"none\"\n customClass=\"w-4 h-4\"\n ></xs-image>\n <p class=\"text-xs font-extralight\">\n {{ i.country?.name }}\n </p>\n </div>\n </div>\n </div>\n }\n}\n" }]
|
|
17508
17538
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }] } });
|
|
17509
17539
|
|
|
17510
17540
|
class XSTableItemsStateComponent {
|
|
@@ -17553,43 +17583,94 @@ class XSTableItemsStateComponent {
|
|
|
17553
17583
|
: 'green';
|
|
17554
17584
|
}
|
|
17555
17585
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17556
|
-
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 <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\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': $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 ></div>\n <p class=\"pl-1 text-xs font-extralight\">{{ $any(item())[header().key] }}</p>\n </div>\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 <div\n class=\"flex items-center gap-1.5 rounded-full bg-zinc-900/50 p-1 px-2\"\n >\n <div\n class=\"h-2 w-2 rounded-full text-xs\"\n [ngClass]=\"{\n 'bg-green-500': $any(item())[header().key] === 'active' || $any(item())[header().key] === 'confirmed' || $any(item())[header().key] === 'completed',\n 'bg-yellow-500': $any(item())[header().key] === 'pending',\n 'bg-blue-500': $any(item())[header().key] === 'inProgress',\n 'bg-orange-500': $any(item())[header().key] === 'suspended',\n 'bg-red-500': $any(item())[header().key] === 'inactive' || $any(item())[header().key] === 'rejected' || $any(item())[header().key] === 'canceled' || $any(item())[header().key] === 'unpaid' || $any(item())[header().key] === 'failed',\n }\"\n ></div>\n <span class=\"pl-1 text-xs font-medium\">{{ $any(item())[header().key] | stateName }}</span>\n </div>\n }\n @case ('stateFull') {\n <div class=\"flex flex-col items-start gap-1 px-2 py-1 rounded-xl\">\n <div class=\"flex items-center gap-1\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1\"\n [ngClass]=\"{\n 'bg-green-500': $any(item())[header().key] === 'active' || $any(item())[header().key] === 'confirmed' || $any(item())[header().key] === 'completed',\n 'bg-yellow-500': $any(item())[header().key] === 'pending',\n 'bg-blue-500': $any(item())[header().key] === 'inProgress',\n 'bg-orange-500': $any(item())[header().key] === 'suspended',\n 'bg-red-500': $any(item())[header().key] === 'inactive' || $any(item())[header().key] === 'rejected' || $any(item())[header().key] === 'canceled' || $any(item())[header().key] === 'unpaid' || $any(item())[header().key] === 'failed',\n }\"\n ></div>\n <span class=\"pl-1 text-xs font-extralight\">{{ i.state | stateName }}</span>\n </div>\n <div class=\"flex items-center gap-1\">\n <div\n class=\"w-2.5 h-2.5\"\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 ></div>\n <span class=\"pl-1 text-xs font-extralight\">\n @if (i.user && i.user._id === adminUserId) {\n @if (!i.lastContacted) {\n N/D\n } @else {\n @if (i.leadStatus === 'new' || i.leadStatus === 'contacted') {\n {{ i.lastContacted | dateChat | firstLetterCase }}\n } @else if (i.leadStatus && i.leadStatus !== 'new' && i.leadStatus !== 'contacted') {\n {{ i.leadStatus | leadStatus }}\n } @else {\n {{ i.lastContacted | dateChat | firstLetterCase }}\n }\n }\n }\n @if (i.user && i.user._id !== adminUserId) {\n {{ textsService.t('TABLE_ITEMS.ALREADY_VALIDATED') }}\n }\n </span>\n </div>\n </div>\n }\n @case ('toggleStates') {\n <div class=\"flex items-center gap-1.5\">\n <span\n class=\"w-2 h-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=\"w-2 h-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=\"w-2 h-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 </div>\n }\n @case ('priority') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\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.priority === 'low',\n 'bg-yellow-500': i.priority === 'medium',\n 'bg-red-500': i.priority === 'high',\n 'bg-zinc-900': !i.priority,\n }\"\n ></div>\n <span class=\"pl-1 text-sm font-semibold\">\n {{ i.priority ? (i.priority | priorities) : 'N/D' }}\n </span>\n </div>\n }\n @case ('capacity') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1 flex items-center justify-center\"\n [ngClass]=\"{\n 'bg-red-500': i.capacity > 1 && i.capacity <= 100,\n 'bg-yellow-500': i.capacity > 100 && i.capacity <= 500,\n 'bg-green-500': i.capacity > 500,\n 'bg-zinc-900': !i.capacity || i.capacity === 0,\n }\"\n ></div>\n <span class=\"pl-1 text-sm font-semibold\">\n {{ i.capacity ? i.capacity : 'N/D' }}\n </span>\n </div>\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 <span class=\"text-xs\">N/D</span>\n }\n </div>\n }\n @case ('lastContactedOkKo') {\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.user._id !== adminUserId) {\n <span>{{ textsService.t('TABLE_ITEMS.SUCCESS') }}</span>\n }\n @if (i.user._id === adminUserId) {\n <span>{{ textsService.t('TABLE_ITEMS.PENDING') }}</span>\n }\n </div>\n }\n @case ('level') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1 flex items-center justify-center\"\n [ngStyle]=\"{ 'background-color': getLevelColor(item()) }\"\n ></div>\n <p class=\"pl-1 text-sm font-semibold\">\n {{ getLevelName(item()) }}\n @if (getLevelPrice(item()) !== null) {\n <span class=\"text-xs font-extralight\">({{ getLevelPrice(item()) }}\u20AC)</span>\n }\n </p>\n </div>\n }\n @case ('subStatePromotion') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1\"\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 ></div>\n <span class=\"pl-1 text-sm font-semibold\">{{ getSubStatePromotion(item()) | stateName }}</span>\n </div>\n }\n @case ('trueOrFalse') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1\"\n [ngClass]=\"{\n 'bg-green-500': $any(item())[header().key] === true,\n 'bg-red-500': $any(item())[header().key] !== false,\n }\"\n ></div>\n <span class=\"pl-1 text-sm font-semibold\">\n {{ $any(item())[header().key] ? textsService.yes : textsService.no }}\n </span>\n </div>\n }\n @case ('promotionCodeUsage') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\n @if (getRemainingPercentage(item()) > 50) {\n <div class=\"w-2.5 h-2.5 text-xs border-1 bg-green-500\"></div>\n } @else if (getRemainingPercentage(item()) > 20) {\n <div class=\"w-2.5 h-2.5 text-xs border-1 bg-yellow-500\"></div>\n } @else {\n <div class=\"w-2.5 h-2.5 text-xs border-1 bg-red-500\"></div>\n }\n <p class=\"text-sm\">{{ i.usedCount }} / {{ i.maxUses }}</p>\n </div>\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: "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 <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 });
|
|
17557
17587
|
}
|
|
17558
17588
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsStateComponent, decorators: [{
|
|
17559
17589
|
type: Component,
|
|
17560
17590
|
args: [{ selector: 'xs-table-items-state', standalone: true, imports: [
|
|
17561
17591
|
CommonModule,
|
|
17562
17592
|
XSIconComponent,
|
|
17593
|
+
XSBadgeComponent,
|
|
17563
17594
|
StateNamePipe,
|
|
17564
17595
|
DateChatPipe,
|
|
17565
17596
|
XSFirstLetterPipe,
|
|
17566
17597
|
PrioritiesPipe,
|
|
17567
17598
|
LeadStatusPipe,
|
|
17568
17599
|
TruncateTextPipe,
|
|
17569
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = $any(item());\n@switch (header().type) {\n @case ('githubStatus') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\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': $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 ></div>\n <p class=\"pl-1 text-xs font-extralight\">{{ $any(item())[header().key] }}</p>\n </div>\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 <div\n class=\"flex items-center gap-1.5 rounded-full bg-zinc-900/50 p-1 px-2\"\n >\n <div\n class=\"h-2 w-2 rounded-full text-xs\"\n [ngClass]=\"{\n 'bg-green-500': $any(item())[header().key] === 'active' || $any(item())[header().key] === 'confirmed' || $any(item())[header().key] === 'completed',\n 'bg-yellow-500': $any(item())[header().key] === 'pending',\n 'bg-blue-500': $any(item())[header().key] === 'inProgress',\n 'bg-orange-500': $any(item())[header().key] === 'suspended',\n 'bg-red-500': $any(item())[header().key] === 'inactive' || $any(item())[header().key] === 'rejected' || $any(item())[header().key] === 'canceled' || $any(item())[header().key] === 'unpaid' || $any(item())[header().key] === 'failed',\n }\"\n ></div>\n <span class=\"pl-1 text-xs font-medium\">{{ $any(item())[header().key] | stateName }}</span>\n </div>\n }\n @case ('stateFull') {\n <div class=\"flex flex-col items-start gap-1 px-2 py-1 rounded-xl\">\n <div class=\"flex items-center gap-1\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1\"\n [ngClass]=\"{\n 'bg-green-500': $any(item())[header().key] === 'active' || $any(item())[header().key] === 'confirmed' || $any(item())[header().key] === 'completed',\n 'bg-yellow-500': $any(item())[header().key] === 'pending',\n 'bg-blue-500': $any(item())[header().key] === 'inProgress',\n 'bg-orange-500': $any(item())[header().key] === 'suspended',\n 'bg-red-500': $any(item())[header().key] === 'inactive' || $any(item())[header().key] === 'rejected' || $any(item())[header().key] === 'canceled' || $any(item())[header().key] === 'unpaid' || $any(item())[header().key] === 'failed',\n }\"\n ></div>\n <span class=\"pl-1 text-xs font-extralight\">{{ i.state | stateName }}</span>\n </div>\n <div class=\"flex items-center gap-1\">\n <div\n class=\"w-2.5 h-2.5\"\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 ></div>\n <span class=\"pl-1 text-xs font-extralight\">\n @if (i.user && i.user._id === adminUserId) {\n @if (!i.lastContacted) {\n N/D\n } @else {\n @if (i.leadStatus === 'new' || i.leadStatus === 'contacted') {\n {{ i.lastContacted | dateChat | firstLetterCase }}\n } @else if (i.leadStatus && i.leadStatus !== 'new' && i.leadStatus !== 'contacted') {\n {{ i.leadStatus | leadStatus }}\n } @else {\n {{ i.lastContacted | dateChat | firstLetterCase }}\n }\n }\n }\n @if (i.user && i.user._id !== adminUserId) {\n {{ textsService.t('TABLE_ITEMS.ALREADY_VALIDATED') }}\n }\n </span>\n </div>\n </div>\n }\n @case ('toggleStates') {\n <div class=\"flex items-center gap-1.5\">\n <span\n class=\"w-2 h-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=\"w-2 h-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=\"w-2 h-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 </div>\n }\n @case ('priority') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\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.priority === 'low',\n 'bg-yellow-500': i.priority === 'medium',\n 'bg-red-500': i.priority === 'high',\n 'bg-zinc-900': !i.priority,\n }\"\n ></div>\n <span class=\"pl-1 text-sm font-semibold\">\n {{ i.priority ? (i.priority | priorities) : 'N/D' }}\n </span>\n </div>\n }\n @case ('capacity') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1 flex items-center justify-center\"\n [ngClass]=\"{\n 'bg-red-500': i.capacity > 1 && i.capacity <= 100,\n 'bg-yellow-500': i.capacity > 100 && i.capacity <= 500,\n 'bg-green-500': i.capacity > 500,\n 'bg-zinc-900': !i.capacity || i.capacity === 0,\n }\"\n ></div>\n <span class=\"pl-1 text-sm font-semibold\">\n {{ i.capacity ? i.capacity : 'N/D' }}\n </span>\n </div>\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 <span class=\"text-xs\">N/D</span>\n }\n </div>\n }\n @case ('lastContactedOkKo') {\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.user._id !== adminUserId) {\n <span>{{ textsService.t('TABLE_ITEMS.SUCCESS') }}</span>\n }\n @if (i.user._id === adminUserId) {\n <span>{{ textsService.t('TABLE_ITEMS.PENDING') }}</span>\n }\n </div>\n }\n @case ('level') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1 flex items-center justify-center\"\n [ngStyle]=\"{ 'background-color': getLevelColor(item()) }\"\n ></div>\n <p class=\"pl-1 text-sm font-semibold\">\n {{ getLevelName(item()) }}\n @if (getLevelPrice(item()) !== null) {\n <span class=\"text-xs font-extralight\">({{ getLevelPrice(item()) }}\u20AC)</span>\n }\n </p>\n </div>\n }\n @case ('subStatePromotion') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1\"\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 ></div>\n <span class=\"pl-1 text-sm font-semibold\">{{ getSubStatePromotion(item()) | stateName }}</span>\n </div>\n }\n @case ('trueOrFalse') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1\"\n [ngClass]=\"{\n 'bg-green-500': $any(item())[header().key] === true,\n 'bg-red-500': $any(item())[header().key] !== false,\n }\"\n ></div>\n <span class=\"pl-1 text-sm font-semibold\">\n {{ $any(item())[header().key] ? textsService.yes : textsService.no }}\n </span>\n </div>\n }\n @case ('promotionCodeUsage') {\n <div class=\"flex items-center gap-1 p-1 px-2 rounded-xl\">\n @if (getRemainingPercentage(item()) > 50) {\n <div class=\"w-2.5 h-2.5 text-xs border-1 bg-green-500\"></div>\n } @else if (getRemainingPercentage(item()) > 20) {\n <div class=\"w-2.5 h-2.5 text-xs border-1 bg-yellow-500\"></div>\n } @else {\n <div class=\"w-2.5 h-2.5 text-xs border-1 bg-red-500\"></div>\n }\n <p class=\"text-sm\">{{ i.usedCount }} / {{ i.maxUses }}</p>\n </div>\n }\n}\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 <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" }]
|
|
17570
17601
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }] } });
|
|
17571
17602
|
|
|
17572
17603
|
class XSTableItemsVisitsComponent {
|
|
17573
17604
|
header = input.required(...(ngDevMode ? [{ debugName: "header" }] : []));
|
|
17574
17605
|
item = input.required(...(ngDevMode ? [{ debugName: "item" }] : []));
|
|
17575
17606
|
filters = input(null, ...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
17607
|
+
/**
|
|
17608
|
+
* XS-985 — Solo el admin ve el desglose reales (boost).
|
|
17609
|
+
* La app pública nunca activa este flag (ver admin=false por
|
|
17610
|
+
* defecto): ningún endpoint/template público muestra boosted.
|
|
17611
|
+
*/
|
|
17612
|
+
admin = input(false, ...(ngDevMode ? [{ debugName: "admin" }] : []));
|
|
17576
17613
|
textsService = inject(XSTableItemsTextsService);
|
|
17577
17614
|
currentDate = new Date();
|
|
17578
17615
|
isNotArray(value) {
|
|
17579
17616
|
return !Array.isArray(value);
|
|
17580
17617
|
}
|
|
17618
|
+
/**
|
|
17619
|
+
* Reales = total - impulsadas (nunca negativo ante datos
|
|
17620
|
+
* históricos sin backfill). Formato «51 (4)». Acepta string
|
|
17621
|
+
* porque los pipes de mes pueden devolver texto.
|
|
17622
|
+
*/
|
|
17623
|
+
organic(total, boosted) {
|
|
17624
|
+
return Math.max(0, this.toNum(total) - this.toNum(boosted));
|
|
17625
|
+
}
|
|
17626
|
+
toNum(value) {
|
|
17627
|
+
if (typeof value === 'number')
|
|
17628
|
+
return value;
|
|
17629
|
+
if (typeof value === 'string' && value.trim() !== '') {
|
|
17630
|
+
const parsed = Number(value.replace(/[^0-9.-]/g, ''));
|
|
17631
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
17632
|
+
}
|
|
17633
|
+
return 0;
|
|
17634
|
+
}
|
|
17635
|
+
boostedTotal() {
|
|
17636
|
+
return this.boostedTotalFrom(this.item());
|
|
17637
|
+
}
|
|
17638
|
+
boostedMonthly() {
|
|
17639
|
+
return this.boostedMonthlyFrom(this.item());
|
|
17640
|
+
}
|
|
17641
|
+
boostedTotalFrom(source) {
|
|
17642
|
+
const value = source?.boostedTotalVisits;
|
|
17643
|
+
return Math.max(0, this.toNum(value));
|
|
17644
|
+
}
|
|
17645
|
+
boostedMonthlyFrom(source) {
|
|
17646
|
+
const value = source?.boostedMonthlyVisits;
|
|
17647
|
+
return Math.max(0, this.toNum(value));
|
|
17648
|
+
}
|
|
17649
|
+
showTotalBoost() {
|
|
17650
|
+
return this.showTotalBoostFrom(this.item());
|
|
17651
|
+
}
|
|
17652
|
+
showMonthlyBoost() {
|
|
17653
|
+
return this.showMonthlyBoostFrom(this.item());
|
|
17654
|
+
}
|
|
17655
|
+
showTotalBoostFrom(source) {
|
|
17656
|
+
return this.admin() && this.boostedTotalFrom(source) > 0;
|
|
17657
|
+
}
|
|
17658
|
+
showMonthlyBoostFrom(source) {
|
|
17659
|
+
return this.admin() && this.boostedMonthlyFrom(source) > 0;
|
|
17660
|
+
}
|
|
17581
17661
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsVisitsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17582
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsVisitsComponent, isStandalone: true, selector: "xs-table-items-visits", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let i = item();\n@if (i) {\n@let v = $any(i).visits;\n@let tv = $any(i).totalVisits;\n@let mv = $any(i).monthlyVisits;\n@switch (header().type) {\n @case ('visits') {\n
|
|
17662
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsVisitsComponent, isStandalone: true, selector: "xs-table-items-visits", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, admin: { classPropertyName: "admin", publicName: "admin", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let i = item();\n@if (i) {\n@let v = $any(i).visits;\n@let tv = $any(i).totalVisits;\n@let mv = $any(i).monthlyVisits;\n@switch (header().type) {\n @case ('visits') {\n @if (v != null && isNotArray(v)) {\n <xs-badge [size]=\"'md'\" [label]=\"(v | number) ?? '0'\"></xs-badge>\n } @else if (tv != null) {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n showTotalBoost()\n ? ((organic(tv, boostedTotal()) | number) ?? '0') + ' (' + ((boostedTotal() | number) ?? '0') + ')'\n : ((tv | number) ?? '0')\n \"\n ></xs-badge>\n }\n }\n @case ('followers') {\n <xs-badge [size]=\"'md'\" [label]=\"($any(i).totalFollowers ?? 0 | number) ?? '0'\"></xs-badge>\n }\n @case ('visitsMonth') {\n @let monthVal = v ? (v | visitsMonthTotal: 'month') : (mv ?? 0);\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n showMonthlyBoost() && !filters()?.sortVisitsByMonth\n ? ((organic(monthVal, boostedMonthly()) | number) ?? '0') + ' (' + ((boostedMonthly() | number) ?? '0') + ')'\n : ((monthVal | number) ?? '0')\n \"\n ></xs-badge>\n }\n @case ('visitsTotal') {\n @if (v || tv != null) {\n @let totalVal = v ? (v | visitsMonthTotal: 'total') : (tv ?? 0);\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n showTotalBoost()\n ? ((organic(totalVal, boostedTotal()) | number) ?? '0') + ' (' + ((boostedTotal() | number) ?? '0') + ')'\n : ((totalVal | number) ?? '0')\n \"\n ></xs-badge>\n }\n }\n @case ('visitsAll') {\n <div class=\"flex flex-col items-start gap-1\">\n @if (v?.length > 0) {\n @let monthSum = v | visitsMonthTotal: 'month' : filters()?.sortVisitsByYear : filters()?.sortVisitsByMonth;\n @let totalSum = v | visitsMonthTotal: 'total';\n @let monthValue =\n showMonthlyBoost() && !filters()?.sortVisitsByMonth\n ? ((organic(monthSum, boostedMonthly()) | number) ?? '0') + ' (' + ((boostedMonthly() | number) ?? '0') + ')'\n : ((monthSum | number) ?? '0');\n @let totalValue =\n showTotalBoost()\n ? ((organic(totalSum, boostedTotal()) | number) ?? '0') + ' (' + ((boostedTotal() | number) ?? '0') + ')'\n : ((totalSum | number) ?? '0');\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ monthValue }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"truncate text-zinc-400\">{{ filters()?.sortVisitsByMonth ? (filters()?.sortVisitsByMonth! | numberToMonth) : (currentDate | dateFormat: 'MMMM' | titlecase) }}</span>\n </xs-badge>\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ totalValue }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"text-zinc-400\">Total</span>\n </xs-badge>\n } @else {\n @if (showMonthlyBoost() && mv != null) {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"((organic(mv, boostedMonthly()) | number) ?? '0') + ' (' + ((boostedMonthly() | number) ?? '0') + ')'\"\n ></xs-badge>\n } @else if (showTotalBoost() && mv == null && tv != null) {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"((organic(tv, boostedTotal()) | number) ?? '0') + ' (' + ((boostedTotal() | number) ?? '0') + ')'\"\n ></xs-badge>\n } @else if (mv != null) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ (mv | number) ?? '0' }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"truncate text-zinc-400\">{{ filters()?.sortVisitsByMonth ? (filters()?.sortVisitsByMonth! | numberToMonth) : (currentDate | dateFormat: 'MMMM' | titlecase) }}</span>\n </xs-badge>\n } @else if (tv != null) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ (tv | number) ?? '0' }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"text-zinc-400\">Total</span>\n </xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NO_VISITS')\"></xs-badge>\n }\n }\n </div>\n }\n @case ('visitsAllLast') {\n @let iv = $any(i)[$any(i).type];\n @if (iv) {\n @if (iv.visits?.length > 0 || iv.monthlyVisits != null || iv.totalVisits != null) {\n @let monthVal = iv.visits?.length ? (iv.visits | visitsMonthTotal: 'month') : (iv.monthlyVisits ?? 0);\n @let totalVal = iv.visits?.length ? (iv.visits | visitsMonthTotal: 'total') : (iv.totalVisits ?? 0);\n @let monthValue =\n showMonthlyBoostFrom(iv)\n ? ((organic(monthVal, boostedMonthlyFrom(iv)) | number) ?? '0') + ' (' + ((boostedMonthlyFrom(iv) | number) ?? '0') + ')'\n : ((monthVal | number) ?? '0');\n @let totalValue =\n showTotalBoostFrom(iv)\n ? ((organic(totalVal, boostedTotalFrom(iv)) | number) ?? '0') + ' (' + ((boostedTotalFrom(iv) | number) ?? '0') + ')'\n : ((totalVal | number) ?? '0');\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ monthValue }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"truncate text-zinc-400\">{{ currentDate | dateFormat: 'MMMM' | titlecase }}</span>\n </xs-badge>\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ totalValue }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"text-zinc-400\">Total</span>\n </xs-badge>\n </div>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NO_VISITS')\"></xs-badge>\n }\n }\n }\n @case ('visitsMonthLastVisits') {\n @let iv = $any(i)[$any(i).type];\n @if (iv) {\n @let monthVal = iv.monthlyVisits ?? (iv.visits | visitsMonthTotal: 'month');\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n showMonthlyBoostFrom(iv)\n ? ((organic(monthVal, boostedMonthlyFrom(iv)) | number) ?? '0') + ' (' + ((boostedMonthlyFrom(iv) | number) ?? '0') + ')'\n : ((monthVal | number) ?? '0')\n \"\n ></xs-badge>\n }\n }\n @case ('visitsTotalLastVisits') {\n @let iv = $any(i)[$any(i).type];\n @if (iv) {\n @let totalVal = iv.totalVisits ?? (iv.visits | visitsMonthTotal: 'total');\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n showTotalBoostFrom(iv)\n ? ((organic(totalVal, boostedTotalFrom(iv)) | number) ?? '0') + ' (' + ((boostedTotalFrom(iv) | number) ?? '0') + ')'\n : ((totalVal | number) ?? '0')\n \"\n ></xs-badge>\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.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: VisitsMonthTotalPipe, name: "visitsMonthTotal" }, { kind: "pipe", type: NumberToMonthPipe, name: "numberToMonth" }, { kind: "pipe", type: XSDateFormatPipe, name: "dateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17583
17663
|
}
|
|
17584
17664
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsVisitsComponent, decorators: [{
|
|
17585
17665
|
type: Component,
|
|
17586
17666
|
args: [{ selector: 'xs-table-items-visits', standalone: true, imports: [
|
|
17587
17667
|
CommonModule,
|
|
17668
|
+
XSBadgeComponent,
|
|
17588
17669
|
VisitsMonthTotalPipe,
|
|
17589
17670
|
NumberToMonthPipe,
|
|
17590
17671
|
XSDateFormatPipe,
|
|
17591
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = item();\n@if (i) {\n@let v = $any(i).visits;\n@let tv = $any(i).totalVisits;\n@let mv = $any(i).monthlyVisits;\n@switch (header().type) {\n @case ('visits') {\n
|
|
17592
|
-
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }] } });
|
|
17672
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = item();\n@if (i) {\n@let v = $any(i).visits;\n@let tv = $any(i).totalVisits;\n@let mv = $any(i).monthlyVisits;\n@switch (header().type) {\n @case ('visits') {\n @if (v != null && isNotArray(v)) {\n <xs-badge [size]=\"'md'\" [label]=\"(v | number) ?? '0'\"></xs-badge>\n } @else if (tv != null) {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n showTotalBoost()\n ? ((organic(tv, boostedTotal()) | number) ?? '0') + ' (' + ((boostedTotal() | number) ?? '0') + ')'\n : ((tv | number) ?? '0')\n \"\n ></xs-badge>\n }\n }\n @case ('followers') {\n <xs-badge [size]=\"'md'\" [label]=\"($any(i).totalFollowers ?? 0 | number) ?? '0'\"></xs-badge>\n }\n @case ('visitsMonth') {\n @let monthVal = v ? (v | visitsMonthTotal: 'month') : (mv ?? 0);\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n showMonthlyBoost() && !filters()?.sortVisitsByMonth\n ? ((organic(monthVal, boostedMonthly()) | number) ?? '0') + ' (' + ((boostedMonthly() | number) ?? '0') + ')'\n : ((monthVal | number) ?? '0')\n \"\n ></xs-badge>\n }\n @case ('visitsTotal') {\n @if (v || tv != null) {\n @let totalVal = v ? (v | visitsMonthTotal: 'total') : (tv ?? 0);\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n showTotalBoost()\n ? ((organic(totalVal, boostedTotal()) | number) ?? '0') + ' (' + ((boostedTotal() | number) ?? '0') + ')'\n : ((totalVal | number) ?? '0')\n \"\n ></xs-badge>\n }\n }\n @case ('visitsAll') {\n <div class=\"flex flex-col items-start gap-1\">\n @if (v?.length > 0) {\n @let monthSum = v | visitsMonthTotal: 'month' : filters()?.sortVisitsByYear : filters()?.sortVisitsByMonth;\n @let totalSum = v | visitsMonthTotal: 'total';\n @let monthValue =\n showMonthlyBoost() && !filters()?.sortVisitsByMonth\n ? ((organic(monthSum, boostedMonthly()) | number) ?? '0') + ' (' + ((boostedMonthly() | number) ?? '0') + ')'\n : ((monthSum | number) ?? '0');\n @let totalValue =\n showTotalBoost()\n ? ((organic(totalSum, boostedTotal()) | number) ?? '0') + ' (' + ((boostedTotal() | number) ?? '0') + ')'\n : ((totalSum | number) ?? '0');\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ monthValue }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"truncate text-zinc-400\">{{ filters()?.sortVisitsByMonth ? (filters()?.sortVisitsByMonth! | numberToMonth) : (currentDate | dateFormat: 'MMMM' | titlecase) }}</span>\n </xs-badge>\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ totalValue }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"text-zinc-400\">Total</span>\n </xs-badge>\n } @else {\n @if (showMonthlyBoost() && mv != null) {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"((organic(mv, boostedMonthly()) | number) ?? '0') + ' (' + ((boostedMonthly() | number) ?? '0') + ')'\"\n ></xs-badge>\n } @else if (showTotalBoost() && mv == null && tv != null) {\n <xs-badge\n [size]=\"'md'\"\n [label]=\"((organic(tv, boostedTotal()) | number) ?? '0') + ' (' + ((boostedTotal() | number) ?? '0') + ')'\"\n ></xs-badge>\n } @else if (mv != null) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ (mv | number) ?? '0' }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"truncate text-zinc-400\">{{ filters()?.sortVisitsByMonth ? (filters()?.sortVisitsByMonth! | numberToMonth) : (currentDate | dateFormat: 'MMMM' | titlecase) }}</span>\n </xs-badge>\n } @else if (tv != null) {\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ (tv | number) ?? '0' }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"text-zinc-400\">Total</span>\n </xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NO_VISITS')\"></xs-badge>\n }\n }\n </div>\n }\n @case ('visitsAllLast') {\n @let iv = $any(i)[$any(i).type];\n @if (iv) {\n @if (iv.visits?.length > 0 || iv.monthlyVisits != null || iv.totalVisits != null) {\n @let monthVal = iv.visits?.length ? (iv.visits | visitsMonthTotal: 'month') : (iv.monthlyVisits ?? 0);\n @let totalVal = iv.visits?.length ? (iv.visits | visitsMonthTotal: 'total') : (iv.totalVisits ?? 0);\n @let monthValue =\n showMonthlyBoostFrom(iv)\n ? ((organic(monthVal, boostedMonthlyFrom(iv)) | number) ?? '0') + ' (' + ((boostedMonthlyFrom(iv) | number) ?? '0') + ')'\n : ((monthVal | number) ?? '0');\n @let totalValue =\n showTotalBoostFrom(iv)\n ? ((organic(totalVal, boostedTotalFrom(iv)) | number) ?? '0') + ' (' + ((boostedTotalFrom(iv) | number) ?? '0') + ')'\n : ((totalVal | number) ?? '0');\n <div class=\"flex flex-col items-start gap-1\">\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ monthValue }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"truncate text-zinc-400\">{{ currentDate | dateFormat: 'MMMM' | titlecase }}</span>\n </xs-badge>\n <xs-badge [size]=\"'md'\" [customClasses]=\"'max-w-full'\">\n <span class=\"font-semibold\">{{ totalValue }}</span>\n <span class=\"text-zinc-400\">\u00B7</span>\n <span class=\"text-zinc-400\">Total</span>\n </xs-badge>\n </div>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"textsService.t('TABLE_ITEMS.NO_VISITS')\"></xs-badge>\n }\n }\n }\n @case ('visitsMonthLastVisits') {\n @let iv = $any(i)[$any(i).type];\n @if (iv) {\n @let monthVal = iv.monthlyVisits ?? (iv.visits | visitsMonthTotal: 'month');\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n showMonthlyBoostFrom(iv)\n ? ((organic(monthVal, boostedMonthlyFrom(iv)) | number) ?? '0') + ' (' + ((boostedMonthlyFrom(iv) | number) ?? '0') + ')'\n : ((monthVal | number) ?? '0')\n \"\n ></xs-badge>\n }\n }\n @case ('visitsTotalLastVisits') {\n @let iv = $any(i)[$any(i).type];\n @if (iv) {\n @let totalVal = iv.totalVisits ?? (iv.visits | visitsMonthTotal: 'total');\n <xs-badge\n [size]=\"'md'\"\n [label]=\"\n showTotalBoostFrom(iv)\n ? ((organic(totalVal, boostedTotalFrom(iv)) | number) ?? '0') + ' (' + ((boostedTotalFrom(iv) | number) ?? '0') + ')'\n : ((totalVal | number) ?? '0')\n \"\n ></xs-badge>\n }\n }\n}\n}\n" }]
|
|
17673
|
+
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], admin: [{ type: i0.Input, args: [{ isSignal: true, alias: "admin", required: false }] }] } });
|
|
17593
17674
|
|
|
17594
17675
|
var TABLE_ITEMS_CHAT$1 = {
|
|
17595
17676
|
NO_MESSAGES: "No hay mensajes",
|
|
@@ -17654,11 +17735,16 @@ class XSTableItemsContactComponent {
|
|
|
17654
17735
|
return diffDays >= minDays && diffDays <= maxDays;
|
|
17655
17736
|
}
|
|
17656
17737
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsContactComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17657
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsContactComponent, isStandalone: true, selector: "xs-table-items-contact", 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 ('lastContacted') {\n @if (i.lastContacted) {\n <div class=\"flex flex-col\">\n <span class=\"text-sm\">{{ i.lastContacted | date: 'dd/MM/yyyy' }}</span>\n <span class=\"text-xs\">{{ i.lastContacted | dateChat | firstLetterCase }}</span>\n </div>\n }\n @if (!i.lastContacted) {\n <
|
|
17738
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsContactComponent, isStandalone: true, selector: "xs-table-items-contact", 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 ('lastContacted') {\n @if (i.lastContacted) {\n <div class=\"flex flex-col\">\n <span class=\"text-sm\">{{ i.lastContacted | date: 'dd/MM/yyyy' }}</span>\n <span class=\"text-xs\">{{ i.lastContacted | dateChat | firstLetterCase }}</span>\n </div>\n }\n @if (!i.lastContacted) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n }\n @case ('lastContactedCreated') {\n @if (i.lastContacted) {\n <div class=\"flex flex-col\">\n <span\n class=\"text-sm\"\n [ngClass]=\"{\n 'text-yellow-500': isDateInRangeF(i[h.key], 3, 6),\n 'text-red-500': isDateInRangeF(i[h.key], 6, 1000),\n }\"\n >\n {{ i[h.key] | date: 'dd/MM/yyyy' }}\n </span>\n <span class=\"text-xs\">{{ i[h.key] | dateChat | firstLetterCase }}</span>\n </div>\n }\n @if (!i.lastContacted) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n }\n @case ('lastContactedUpdated') {\n @if (i.lastContacted) {\n <div class=\"flex flex-col\">\n <span\n class=\"text-sm\"\n [ngClass]=\"{\n 'text-yellow-500': isDateInRangeF(i[h.key], 3, 6),\n 'text-red-500': isDateInRangeF(i[h.key], 6, 1000),\n }\"\n >\n {{ i[h.key] | date: 'dd/MM/yyyy' }}\n </span>\n <span class=\"text-xs\">{{ i[h.key] | dateChat | firstLetterCase }}</span>\n </div>\n }\n @if (!i.lastContacted) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n }\n}\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: XSBadgeComponent, selector: "xs-badge", inputs: ["variant", "size", "ariaLabel", "icon", "url", "label", "customClasses"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: DateChatPipe, name: "dateChat" }, { kind: "pipe", type: XSFirstLetterPipe, name: "firstLetterCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17658
17739
|
}
|
|
17659
17740
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsContactComponent, decorators: [{
|
|
17660
17741
|
type: Component,
|
|
17661
|
-
args: [{ selector: 'xs-table-items-contact', standalone: true, imports: [
|
|
17742
|
+
args: [{ selector: 'xs-table-items-contact', standalone: true, imports: [
|
|
17743
|
+
CommonModule,
|
|
17744
|
+
DateChatPipe,
|
|
17745
|
+
XSFirstLetterPipe,
|
|
17746
|
+
XSBadgeComponent,
|
|
17747
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (item()) {\n@let i = $any(item());\n@let h = $any(header());\n@switch (h.type) {\n @case ('lastContacted') {\n @if (i.lastContacted) {\n <div class=\"flex flex-col\">\n <span class=\"text-sm\">{{ i.lastContacted | date: 'dd/MM/yyyy' }}</span>\n <span class=\"text-xs\">{{ i.lastContacted | dateChat | firstLetterCase }}</span>\n </div>\n }\n @if (!i.lastContacted) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n }\n @case ('lastContactedCreated') {\n @if (i.lastContacted) {\n <div class=\"flex flex-col\">\n <span\n class=\"text-sm\"\n [ngClass]=\"{\n 'text-yellow-500': isDateInRangeF(i[h.key], 3, 6),\n 'text-red-500': isDateInRangeF(i[h.key], 6, 1000),\n }\"\n >\n {{ i[h.key] | date: 'dd/MM/yyyy' }}\n </span>\n <span class=\"text-xs\">{{ i[h.key] | dateChat | firstLetterCase }}</span>\n </div>\n }\n @if (!i.lastContacted) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n }\n @case ('lastContactedUpdated') {\n @if (i.lastContacted) {\n <div class=\"flex flex-col\">\n <span\n class=\"text-sm\"\n [ngClass]=\"{\n 'text-yellow-500': isDateInRangeF(i[h.key], 3, 6),\n 'text-red-500': isDateInRangeF(i[h.key], 6, 1000),\n }\"\n >\n {{ i[h.key] | date: 'dd/MM/yyyy' }}\n </span>\n <span class=\"text-xs\">{{ i[h.key] | dateChat | firstLetterCase }}</span>\n </div>\n }\n @if (!i.lastContacted) {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n }\n}\n}\n" }]
|
|
17662
17748
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }] } });
|
|
17663
17749
|
|
|
17664
17750
|
class XSTableItemsPromotionComponent {
|
|
@@ -17723,11 +17809,11 @@ class XSTableItemsPromotionComponent {
|
|
|
17723
17809
|
}
|
|
17724
17810
|
}
|
|
17725
17811
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsPromotionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17726
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsPromotionComponent, isStandalone: true, selector: "xs-table-items-promotion", 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 ('promotionVisits') {\n
|
|
17812
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsPromotionComponent, isStandalone: true, selector: "xs-table-items-promotion", 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 ('promotionVisits') {\n @if (\n $any(item())[i.type]?.visits?.length > 0 &&\n (getSubStatePromotion(item()) === 'finished' || getSubStatePromotion(item()) === 'inProgress')\n ) {\n <xs-badge [size]=\"'md'\" [label]=\"(sumVisitsf($any(item())[i.type].visits) - i.visitsInit || 0) + ''\"></xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n @if ($any(item())[i.type]?.visits && i.visitsInit) {\n <span\n class=\"text-xs font-extralight\"\n [ngClass]=\"{\n 'text-green-500': calculatePercentageIncreaseF(i.visitsInit, sumVisitsf($any(item())[i.type].visits)) > 0,\n 'text-red-500': calculatePercentageIncreaseF(i.visitsInit, sumVisitsf($any(item())[i.type].visits)) <= 0,\n }\"\n >\n @if (getSubStatePromotion(item()) === 'finished' || getSubStatePromotion(item()) === 'inProgress') {\n <ng-container>({{ calculatePercentageIncreaseF(i.visitsInit, sumVisitsf($any(item())[i.type].visits)) | number }}%)</ng-container>\n }\n </span>\n }\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 @case ('durationPromotion') {\n @if (i.dateInit && i.dateEnd) {\n <xs-badge [size]=\"'md'\" [label]=\"getDuration(i.dateInit, i.dateEnd) + ' d\u00EDas'\"></xs-badge>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: XSBadgeComponent, selector: "xs-badge", inputs: ["variant", "size", "ariaLabel", "icon", "url", "label", "customClasses"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17727
17813
|
}
|
|
17728
17814
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsPromotionComponent, decorators: [{
|
|
17729
17815
|
type: Component,
|
|
17730
|
-
args: [{ selector: 'xs-table-items-promotion', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = $any(item());\n@switch (header().type) {\n @case ('promotionVisits') {\n
|
|
17816
|
+
args: [{ selector: 'xs-table-items-promotion', standalone: true, imports: [CommonModule, XSBadgeComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let i = $any(item());\n@switch (header().type) {\n @case ('promotionVisits') {\n @if (\n $any(item())[i.type]?.visits?.length > 0 &&\n (getSubStatePromotion(item()) === 'finished' || getSubStatePromotion(item()) === 'inProgress')\n ) {\n <xs-badge [size]=\"'md'\" [label]=\"(sumVisitsf($any(item())[i.type].visits) - i.visitsInit || 0) + ''\"></xs-badge>\n } @else {\n <xs-badge [size]=\"'md'\" [label]=\"'N/D'\"></xs-badge>\n }\n @if ($any(item())[i.type]?.visits && i.visitsInit) {\n <span\n class=\"text-xs font-extralight\"\n [ngClass]=\"{\n 'text-green-500': calculatePercentageIncreaseF(i.visitsInit, sumVisitsf($any(item())[i.type].visits)) > 0,\n 'text-red-500': calculatePercentageIncreaseF(i.visitsInit, sumVisitsf($any(item())[i.type].visits)) <= 0,\n }\"\n >\n @if (getSubStatePromotion(item()) === 'finished' || getSubStatePromotion(item()) === 'inProgress') {\n <ng-container>({{ calculatePercentageIncreaseF(i.visitsInit, sumVisitsf($any(item())[i.type].visits)) | number }}%)</ng-container>\n }\n </span>\n }\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 @case ('durationPromotion') {\n @if (i.dateInit && i.dateEnd) {\n <xs-badge [size]=\"'md'\" [label]=\"getDuration(i.dateInit, i.dateEnd) + ' d\u00EDas'\"></xs-badge>\n }\n }\n}\n" }]
|
|
17731
17817
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }] } });
|
|
17732
17818
|
|
|
17733
17819
|
class XSTableItemsDateComponent {
|
|
@@ -17745,22 +17831,27 @@ class XSTableItemsDateComponent {
|
|
|
17745
17831
|
return diffDays >= minDays && diffDays <= maxDays;
|
|
17746
17832
|
}
|
|
17747
17833
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17748
|
-
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 <
|
|
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 });
|
|
17749
17835
|
}
|
|
17750
17836
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsDateComponent, decorators: [{
|
|
17751
17837
|
type: Component,
|
|
17752
|
-
args: [{ selector: 'xs-table-items-date', standalone: true, imports: [
|
|
17838
|
+
args: [{ selector: 'xs-table-items-date', standalone: true, imports: [
|
|
17839
|
+
CommonModule,
|
|
17840
|
+
DateChatPipe,
|
|
17841
|
+
XSFirstLetterPipe,
|
|
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" }]
|
|
17753
17844
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }] } });
|
|
17754
17845
|
|
|
17755
17846
|
class XSTableItemsCountryComponent {
|
|
17756
17847
|
header = input.required(...(ngDevMode ? [{ debugName: "header" }] : []));
|
|
17757
17848
|
item = input.required(...(ngDevMode ? [{ debugName: "item" }] : []));
|
|
17758
17849
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsCountryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17759
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsCountryComponent, isStandalone: true, selector: "xs-table-items-country", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@switch (header().type) {\n @case ('countryResidence') {\n @if (item().countryResidence) {\n <div>\n <div class=\"flex items-center gap-1\">\n @if (item().country && item().country.code) {\n <xs-image\n [src]=\"item().country.code | countryFlag\"\n [alt]=\"item().country.code\"\n [objectFit]=\"'cover'\"\n [width]=\"20\"\n [height]=\"20\"\n ></xs-image>\n }\n @if (item().countryResidence && item().countryResidence.code && item().countryResidence.code !== item().country.code) {\n <xs-image\n [src]=\"item().countryResidence.code | countryFlag\"\n [alt]=\"item().countryResidence.name\"\n [objectFit]=\"'cover'\"\n [width]=\"20\"\n [height]=\"20\"\n ></xs-image>\n }\n </div>\n </div>\n }\n }\n @case ('country') {\n
|
|
17850
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTableItemsCountryComponent, isStandalone: true, selector: "xs-table-items-country", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@switch (header().type) {\n @case ('countryResidence') {\n @if (item().countryResidence) {\n <div>\n <div class=\"flex items-center gap-1\">\n @if (item().country && item().country.code) {\n <xs-image\n [src]=\"item().country.code | countryFlag\"\n [alt]=\"item().country.code\"\n [objectFit]=\"'cover'\"\n [width]=\"20\"\n [height]=\"20\"\n ></xs-image>\n }\n @if (item().countryResidence && item().countryResidence.code && item().countryResidence.code !== item().country.code) {\n <xs-image\n [src]=\"item().countryResidence.code | countryFlag\"\n [alt]=\"item().countryResidence.name\"\n [objectFit]=\"'cover'\"\n [width]=\"20\"\n [height]=\"20\"\n ></xs-image>\n }\n </div>\n </div>\n }\n }\n @case ('country') {\n @let countryData = item().country || item().address?.country;\n @let countryCode = countryData?.code || countryData || item().deviceCountry;\n <xs-badge\n [url]=\"countryCode ? (countryCode | countryFlag) : ('nd' | countryFlag)\"\n [size]=\"'md'\"\n [label]=\"countryData?.name || (countryCode | countryName)\"\n ></xs-badge>\n }\n @case ('countryImg') {\n <xs-image\n [item]=\"item()\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"none\"\n customClass=\"w-6 h-6 mx-2 my-1 mr-3\"\n [generateAvatar]=\"true\"\n ></xs-image>\n }\n @case ('countryRegion') {\n <div class=\"w-12\">\n <div class=\"flex items-center\">\n @if (item().country) {\n <xs-image\n [item]=\"item().country\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"none\"\n customClass=\"w-6 h-6 mx-2 my-1\"\n ></xs-image>\n }\n </div>\n </div>\n }\n @case ('ip') {\n <div class=\"flex items-center gap-1\">\n <div class=\"mx-2 h-4 w-5\">\n <xs-image\n [src]=\"item().deviceCountry || 'nd' | countryFlag\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"none\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col py-1\">\n <span class=\"text-xs font-semibold\">\n {{ item().deviceIp ? item().deviceIp : item().ip ? item().ip : 'N/D' }}\n </span>\n <span class=\"text-xs font-extralight text-gray-400\">\n {{ item().deviceCity }}\n </span>\n </div>\n </div>\n }\n @case ('ipCountry') {\n <div class=\"flex flex-col\">\n <p class=\"text-sm\">{{ item().deviceIp }}</p>\n <div class=\"flex items-center gap-1\">\n <xs-image\n [item]=\"$any({ code: item().deviceCountry || 'nd' })\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"w-4 h-4\"\n ></xs-image>\n <p class=\"text-sm\">{{ (item().deviceCountry | countryName) ?? 'N/D' }}</p>\n </div>\n </div>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSImageComponent, selector: "xs-image", inputs: ["config", "viewTransitionName", "src", "alt", "width", "height", "size", "rounded", "objectFit", "clickable", "item", "typeItem", "imageType", "fallbackSrc", "loading", "priority", "customClass", "generateAvatar"], outputs: ["onClick", "onLoad", "onError"] }, { kind: "component", type: XSBadgeComponent, selector: "xs-badge", inputs: ["variant", "size", "ariaLabel", "icon", "url", "label", "customClasses"] }, { kind: "pipe", type: CountryFlagPipe, name: "countryFlag" }, { kind: "pipe", type: CountryNamePipe, name: "countryName" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17760
17851
|
}
|
|
17761
17852
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsCountryComponent, decorators: [{
|
|
17762
17853
|
type: Component,
|
|
17763
|
-
args: [{ selector: 'xs-table-items-country', standalone: true, imports: [CommonModule, CountryFlagPipe, CountryNamePipe, XSImageComponent, XSBadgeComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (header().type) {\n @case ('countryResidence') {\n @if (item().countryResidence) {\n <div>\n <div class=\"flex items-center gap-1\">\n @if (item().country && item().country.code) {\n <xs-image\n [src]=\"item().country.code | countryFlag\"\n [alt]=\"item().country.code\"\n [objectFit]=\"'cover'\"\n [width]=\"20\"\n [height]=\"20\"\n ></xs-image>\n }\n @if (item().countryResidence && item().countryResidence.code && item().countryResidence.code !== item().country.code) {\n <xs-image\n [src]=\"item().countryResidence.code | countryFlag\"\n [alt]=\"item().countryResidence.name\"\n [objectFit]=\"'cover'\"\n [width]=\"20\"\n [height]=\"20\"\n ></xs-image>\n }\n </div>\n </div>\n }\n }\n @case ('country') {\n
|
|
17854
|
+
args: [{ selector: 'xs-table-items-country', standalone: true, imports: [CommonModule, CountryFlagPipe, CountryNamePipe, XSImageComponent, XSBadgeComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (header().type) {\n @case ('countryResidence') {\n @if (item().countryResidence) {\n <div>\n <div class=\"flex items-center gap-1\">\n @if (item().country && item().country.code) {\n <xs-image\n [src]=\"item().country.code | countryFlag\"\n [alt]=\"item().country.code\"\n [objectFit]=\"'cover'\"\n [width]=\"20\"\n [height]=\"20\"\n ></xs-image>\n }\n @if (item().countryResidence && item().countryResidence.code && item().countryResidence.code !== item().country.code) {\n <xs-image\n [src]=\"item().countryResidence.code | countryFlag\"\n [alt]=\"item().countryResidence.name\"\n [objectFit]=\"'cover'\"\n [width]=\"20\"\n [height]=\"20\"\n ></xs-image>\n }\n </div>\n </div>\n }\n }\n @case ('country') {\n @let countryData = item().country || item().address?.country;\n @let countryCode = countryData?.code || countryData || item().deviceCountry;\n <xs-badge\n [url]=\"countryCode ? (countryCode | countryFlag) : ('nd' | countryFlag)\"\n [size]=\"'md'\"\n [label]=\"countryData?.name || (countryCode | countryName)\"\n ></xs-badge>\n }\n @case ('countryImg') {\n <xs-image\n [item]=\"item()\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"none\"\n customClass=\"w-6 h-6 mx-2 my-1 mr-3\"\n [generateAvatar]=\"true\"\n ></xs-image>\n }\n @case ('countryRegion') {\n <div class=\"w-12\">\n <div class=\"flex items-center\">\n @if (item().country) {\n <xs-image\n [item]=\"item().country\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"none\"\n customClass=\"w-6 h-6 mx-2 my-1\"\n ></xs-image>\n }\n </div>\n </div>\n }\n @case ('ip') {\n <div class=\"flex items-center gap-1\">\n <div class=\"mx-2 h-4 w-5\">\n <xs-image\n [src]=\"item().deviceCountry || 'nd' | countryFlag\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"none\"\n ></xs-image>\n </div>\n <div class=\"flex flex-col py-1\">\n <span class=\"text-xs font-semibold\">\n {{ item().deviceIp ? item().deviceIp : item().ip ? item().ip : 'N/D' }}\n </span>\n <span class=\"text-xs font-extralight text-gray-400\">\n {{ item().deviceCity }}\n </span>\n </div>\n </div>\n }\n @case ('ipCountry') {\n <div class=\"flex flex-col\">\n <p class=\"text-sm\">{{ item().deviceIp }}</p>\n <div class=\"flex items-center gap-1\">\n <xs-image\n [item]=\"$any({ code: item().deviceCountry || 'nd' })\"\n [typeItem]=\"'flag'\"\n [imageType]=\"'small'\"\n rounded=\"lg\"\n customClass=\"w-4 h-4\"\n ></xs-image>\n <p class=\"text-sm\">{{ (item().deviceCountry | countryName) ?? 'N/D' }}</p>\n </div>\n </div>\n }\n}\n" }]
|
|
17764
17855
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }] } });
|
|
17765
17856
|
|
|
17766
17857
|
class XSTableItemsRoleComponent {
|
|
@@ -18204,7 +18295,7 @@ class XSTableItemsComponent {
|
|
|
18204
18295
|
: button.icon;
|
|
18205
18296
|
}
|
|
18206
18297
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18207
|
-
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()\"></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 <div class=\"flex items-center gap-1 px-2 py-1 text-xs font-extralight text-zinc-500 dark:text-zinc-400\">\n {{ i.type === 'media' || i.type === 'site'\n ? (i.subtype | titlecase)\n : i.type === 'organization'\n ? (i.subtype | typeES)\n : (i.type | typeES) }}\n </div>\n }\n\n @case ('fieldReport') {\n <p class=\"font-extralight\">{{ i.message?.split(': ')[0] ?? '' | truncateText: 50 }}</p>\n }\n\n @case ('year') {\n <p class=\"font-extralight\">{{ i.year }}</p>\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 <span class=\"px-3 py-1 text-xs text-green-500 bg-green-500/10 rounded-xl\">\n {{ i.site?.type ?? '' | titlecase }}\n </span>\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 <span class=\"px-3 py-1 text-xs text-red-500 bg-red-500/10 rounded-xl\">\n {{ $any(item())[header().key] | typeES }}\n </span>\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 <div\n class=\"flex items-center justify-center w-7 h-7 rounded-full text-xs font-bold\"\n [ngClass]=\"{\n 'bg-green-500/20 text-green-400': isClaimed,\n 'bg-red-500/20 text-red-400': !isClaimed,\n }\"\n >\n <xs-icon [icon]=\"isClaimed ? 'check' : 'close'\" size=\"xs\"></xs-icon>\n </div>\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 items-center gap-1 px-2 py-1 rounded-xl\">\n <div class=\"flex flex-col items-start gap-1\">\n @for (style of getStyles($any(item())) | sliceArray: 0 : 2; track $index) {\n <div class=\"flex items-center gap-1\">\n <div\n class=\"w-2.5 h-2.5 text-xs border border-zinc-900\"\n [ngStyle]=\"{ 'background-color': getColorForStyle($any(style)) }\"\n ></div>\n <span class=\"text-xs font-extralight\">{{ style.name ?? '' | truncateText: 15 | titlecase }}</span>\n </div>\n }\n </div>\n @if (i.styles.length > 2) {\n <span class=\"text-xs font-extralight\">+{{ i.styles.length - 2 }}</span>\n }\n </div>\n @if (i.styles.length === 0) {\n <span class=\"text-xs font-extralight\">{{ textsService.t('TABLE_ITEMS.NO_STYLES') }}</span>\n }\n }\n }\n\n @case ('artists') {\n <p class=\"mr-2 text-sm font-black\">\n @let artists = getArtists($any(item()));\n @if (artists.length > 0) {\n @for (artist of artists | sliceArray: 0 : 3; track $index) {\n @if ($index !== 0) { <span> & </span> }\n {{ artist.name }}\n }\n @if (artists.length > 3) {\n <span>+{{ artists.length - 3 }}</span>\n }\n }\n @if (artists.length === 0) {\n 0\n }\n </p>\n }\n\n @case ('artistsEvent') {\n <p class=\"mr-2 font-black font-sm\">\n {{ i.artists && (i.artists.length ?? 0) }}\n </p>\n }\n\n @case ('displayZones') {\n <div class=\"flex gap-1\">\n @for (zone of i.displayZones; track $index) {\n <p class=\"px-2 py-1 text-xs font-semibold text-black bg-yellow-600 rounded-xl\">\n {{ zone | firstLetterCase }}\n </p>\n }\n </div>\n }\n\n @case ('types') {\n <div class=\"flex flex-col items-start gap-1 px-2 py-1 rounded-xl\">\n @for (type of $any(item())[header().key]; track $index) {\n <div class=\"flex items-center gap-1\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1\"\n [ngStyle]=\"{ 'background-color': getColorForType(type) }\"\n ></div>\n <span class=\"pl-1 text-xs font-extralight\">{{ type | typeES }}</span>\n </div>\n }\n </div>\n }\n\n @case ('equipmentSetups') {\n <span>{{ i.equipmentSetups || 0 }} {{ (i.equipmentSetups === 1 ? 'usuario' : 'usuarios') }}</span>\n }\n\n @case ('equipmentSetupComponents') {\n {{ i.components?.length || 0 }}\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 <span class=\"text-xs\">N/D</span>\n }\n }\n\n @case ('suggestionType') {\n <span class=\"px-3 py-1 text-xs text-red-500 bg-red-500/10 rounded-xl\">\n {{ i.suggestionType ?? i.type }}\n </span>\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 <div class=\"flex items-center gap-1\">\n <xs-image\n [src]=\"i.country?.code | countryFlag\"\n [alt]=\"i.country?.code\"\n [objectFit]=\"'cover'\"\n [width]=\"20\"\n [height]=\"20\"\n ></xs-image>\n <span class=\"text-xs\">{{ i.country?.name }}</span>\n </div>\n }\n\n @case ('durationPromotion') {\n <span>{{ i.duration }} d\u00EDas</span>\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: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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"] }, { 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 });
|
|
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 });
|
|
18208
18299
|
}
|
|
18209
18300
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTableItemsComponent, decorators: [{
|
|
18210
18301
|
type: Component,
|
|
@@ -18231,7 +18322,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
18231
18322
|
XSTableItemsDateComponent,
|
|
18232
18323
|
XSTableItemsCountryComponent,
|
|
18233
18324
|
XSTableItemsRoleComponent,
|
|
18234
|
-
], 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()\"></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 <div class=\"flex items-center gap-1 px-2 py-1 text-xs font-extralight text-zinc-500 dark:text-zinc-400\">\n {{ i.type === 'media' || i.type === 'site'\n ? (i.subtype | titlecase)\n : i.type === 'organization'\n ? (i.subtype | typeES)\n : (i.type | typeES) }}\n </div>\n }\n\n @case ('fieldReport') {\n <p class=\"font-extralight\">{{ i.message?.split(': ')[0] ?? '' | truncateText: 50 }}</p>\n }\n\n @case ('year') {\n <p class=\"font-extralight\">{{ i.year }}</p>\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 <span class=\"px-3 py-1 text-xs text-green-500 bg-green-500/10 rounded-xl\">\n {{ i.site?.type ?? '' | titlecase }}\n </span>\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 <span class=\"px-3 py-1 text-xs text-red-500 bg-red-500/10 rounded-xl\">\n {{ $any(item())[header().key] | typeES }}\n </span>\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 <div\n class=\"flex items-center justify-center w-7 h-7 rounded-full text-xs font-bold\"\n [ngClass]=\"{\n 'bg-green-500/20 text-green-400': isClaimed,\n 'bg-red-500/20 text-red-400': !isClaimed,\n }\"\n >\n <xs-icon [icon]=\"isClaimed ? 'check' : 'close'\" size=\"xs\"></xs-icon>\n </div>\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 items-center gap-1 px-2 py-1 rounded-xl\">\n <div class=\"flex flex-col items-start gap-1\">\n @for (style of getStyles($any(item())) | sliceArray: 0 : 2; track $index) {\n <div class=\"flex items-center gap-1\">\n <div\n class=\"w-2.5 h-2.5 text-xs border border-zinc-900\"\n [ngStyle]=\"{ 'background-color': getColorForStyle($any(style)) }\"\n ></div>\n <span class=\"text-xs font-extralight\">{{ style.name ?? '' | truncateText: 15 | titlecase }}</span>\n </div>\n }\n </div>\n @if (i.styles.length > 2) {\n <span class=\"text-xs font-extralight\">+{{ i.styles.length - 2 }}</span>\n }\n </div>\n @if (i.styles.length === 0) {\n <span class=\"text-xs font-extralight\">{{ textsService.t('TABLE_ITEMS.NO_STYLES') }}</span>\n }\n }\n }\n\n @case ('artists') {\n <p class=\"mr-2 text-sm font-black\">\n @let artists = getArtists($any(item()));\n @if (artists.length > 0) {\n @for (artist of artists | sliceArray: 0 : 3; track $index) {\n @if ($index !== 0) { <span> & </span> }\n {{ artist.name }}\n }\n @if (artists.length > 3) {\n <span>+{{ artists.length - 3 }}</span>\n }\n }\n @if (artists.length === 0) {\n 0\n }\n </p>\n }\n\n @case ('artistsEvent') {\n <p class=\"mr-2 font-black font-sm\">\n {{ i.artists && (i.artists.length ?? 0) }}\n </p>\n }\n\n @case ('displayZones') {\n <div class=\"flex gap-1\">\n @for (zone of i.displayZones; track $index) {\n <p class=\"px-2 py-1 text-xs font-semibold text-black bg-yellow-600 rounded-xl\">\n {{ zone | firstLetterCase }}\n </p>\n }\n </div>\n }\n\n @case ('types') {\n <div class=\"flex flex-col items-start gap-1 px-2 py-1 rounded-xl\">\n @for (type of $any(item())[header().key]; track $index) {\n <div class=\"flex items-center gap-1\">\n <div\n class=\"w-2.5 h-2.5 text-xs border-1\"\n [ngStyle]=\"{ 'background-color': getColorForType(type) }\"\n ></div>\n <span class=\"pl-1 text-xs font-extralight\">{{ type | typeES }}</span>\n </div>\n }\n </div>\n }\n\n @case ('equipmentSetups') {\n <span>{{ i.equipmentSetups || 0 }} {{ (i.equipmentSetups === 1 ? 'usuario' : 'usuarios') }}</span>\n }\n\n @case ('equipmentSetupComponents') {\n {{ i.components?.length || 0 }}\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 <span class=\"text-xs\">N/D</span>\n }\n }\n\n @case ('suggestionType') {\n <span class=\"px-3 py-1 text-xs text-red-500 bg-red-500/10 rounded-xl\">\n {{ i.suggestionType ?? i.type }}\n </span>\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 <div class=\"flex items-center gap-1\">\n <xs-image\n [src]=\"i.country?.code | countryFlag\"\n [alt]=\"i.country?.code\"\n [objectFit]=\"'cover'\"\n [width]=\"20\"\n [height]=\"20\"\n ></xs-image>\n <span class=\"text-xs\">{{ i.country?.name }}</span>\n </div>\n }\n\n @case ('durationPromotion') {\n <span>{{ i.duration }} d\u00EDas</span>\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" }]
|
|
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" }]
|
|
18235
18326
|
}], 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 }] }] } });
|
|
18236
18327
|
|
|
18237
18328
|
class XSTableCheckboxComponent {
|
|
@@ -21857,7 +21948,7 @@ const LIB_STORIES = [
|
|
|
21857
21948
|
() => import('./xsmusices-ui-xs-section-title.xsstory-CHlZ69FK.mjs').then((m) => m.story),
|
|
21858
21949
|
() => import('./xsmusices-ui-xs-profile-tops.xsstory-DSwdyEYc.mjs').then((m) => m.story),
|
|
21859
21950
|
() => import('./xsmusices-ui-xs-table-items.xsstory-qKGBMrjP.mjs').then((m) => m.story),
|
|
21860
|
-
() => import('./xsmusices-ui-xs-table.xsstory-
|
|
21951
|
+
() => import('./xsmusices-ui-xs-table.xsstory-BxeiNlxo.mjs').then((m) => m.story),
|
|
21861
21952
|
() => import('./xsmusices-ui-xs-title-collapse.xsstory-Bs_SOeq_.mjs').then((m) => m.story),
|
|
21862
21953
|
() => Promise.resolve().then(function () { return xsSpinner_xsstory; }).then((m) => m.story),
|
|
21863
21954
|
() => import('./xsmusices-ui-country-flag.xsstory-Z3oNFSU_.mjs').then((m) => m.story),
|
|
@@ -22052,5 +22143,5 @@ const uiComponentsExportWithDateMini = [
|
|
|
22052
22143
|
* Generated bundle index. Do not edit.
|
|
22053
22144
|
*/
|
|
22054
22145
|
|
|
22055
|
-
export { ApiService, BREADCRUMBS_PROVIDER, Comment, CountryFlagPipe, CountryNamePipe, DEFAULT_FLOW_LABELS, DateChatPipe, DateDisplayMode, DateFunctions, DateLocaleFormatPipe, DateLongPipe, DateToDayOrMonthPipe, Event, FilterArrayPipe, FixRegionPipe, ImageApiPipe, ImportantItems, IncludeEventPipe, LIB_STORIES, LeadStatusPipe, MediaType, NumberDaysPipe, NumberToMonthPipe, OnImageErrorDirective, OrganizationType, PipesModule, PrioritiesPipe, RandomImagePipe, RolePipe, STANDALONE_PIPES, STYLE_INTENSITIES, SiteType, SliceArrayPipe, SocialPipe, SoundcloudNamePipe, StateIconPipe, StateNamePipe, SuggestionTypePipe, TableLinkPipe, TimeAgoPipe, TitleMediaPipe, TruncateTextPipe, TypeESPipe, User, UserRole, UserType, VisitsMonthTotalPipe, XSActionSheetComponent, XSActionSheetService, XSAlertComponent, XSAlertGroupComponent, XSAlertTextsService, XSAuthComponent, XSAvatarService, XSBadgeComponent, XSBlockComponent, XSBrandMediaPipe, XSBreadcrumbsComponent, XSButtonComponent, XSButtonGroupService, XSButtonsGroupComponent, XSChartComponent, XSChatAlertComponent, XSChatConversationComponent, XSChatConversationInfoComponent, XSChatFloatingPanelComponent, XSChatListComponent, XSChatTextareaComponent, XSCustomizeProfileComponent, XSDateFormatPipe, XSDateMiniComponent, XSDatePipe, XSDocumentService, XSEmptyStateComponent, XSFeedbackComponent, XSFilterPanelComponent, XSFindLabelByValuePipe, XSFirstLetterPipe, XSFormlyAddressSearchComponent, XSFormlyArrayComponent, XSFormlyButtonComponent, XSFormlyCheckboxComponent, XSFormlyComponent, XSFormlyDateComponent, XSFormlyDateRangeComponent, XSFormlyDatetimeComponent, XSFormlyEntityPickerComponent, XSFormlyHiddenComponent, XSFormlyHtmlEditorComponent, XSFormlyInputComponent, XSFormlyInputWithActionsComponent, XSFormlyJsonComponent, XSFormlyJsonEditorComponent, XSFormlyLabelComponent, XSFormlyModule, XSFormlySelectButtonComponent, XSFormlySelectComponent, XSFormlySelectionListComponent, XSFormlySocialComponent, XSFormlyTextareaComponent, XSFormlyTextareaSimpleComponent, XSFormlyType, XSFormlyUploadImageComponent, XSFullImageComponent, XSFullImageService, XSIconComponent, XSImageComponent, XSImportMediaBottomBarComponent, XSImportMediaCardComponent, XSImportMediaFlowComponent, XSImportMediaHeaderComponent, XSInfoBlocksComponent, XSItemActionComponent, XSItemTypeArtistComponent, XSItemTypeBaseComponent, XSItemTypeComponent, XSItemTypeEquipmentComponent, XSItemTypeEventComponent, XSItemTypeLastLoginComponent, XSItemTypeLastVisitComponent, XSItemTypeMediaComponent, XSItemTypeOrganizationComponent, XSItemTypePlaylistComponent, XSItemTypeSiteComponent, XSItemTypeTipComponent, XSItemTypeTrackingComponent, XSItemTypeUserComponent, XSItemTypeUserStatsComponent, XSListComponent, XSMapComponent, XSMapInfoBlockComponent, XSMapLibreComponent, XSMapLibreMapperService, XSMapLibrePopupService, XSMapLibreService, XSMapService, XSMaxCountPipe, XSModalAuthComponent, XSModalClaimComponent, XSModalComponent, XSModalConfirmComponent, XSModalDateComponent, XSModalFormComponent, XSModalImageSearchComponent, XSModalInfoComponent, XSModalInputComponent, XSModalSavedFiltersComponent, XSModalService, XSNavbarComponent, XSNavbarSidebarComponent, XSPopoverInfoComponent, XSProfileCommentsComponent, XSProfileInfoComponent, XSProfileTopsComponent, XSSafeUrlPipe, XSScrollAreaComponent, XSSectionTitleComponent, XSSelectComponent, XSSetupNamePipe, XSSpinnerComponent, XSStatsCardComponent, XSStepperComponent, XSTableCheckboxComponent, XSTableComponent, XSTableItemsChatComponent, XSTableItemsComponent, XSTableItemsContactComponent, XSTableItemsCountryComponent, XSTableItemsDateComponent, XSTableItemsEntityComponent, XSTableItemsPromotionComponent, XSTableItemsRoleComponent, XSTableItemsStateComponent, XSTableItemsVisitsComponent, XSTabsComponent, XSThousandsSeparatorPipe, XSTitleCollapseComponent, XSToastChatComponent, XSToastComponent, XSToastGenericComponent, XSToastService, XSTranslateService, XSTypeUserPipe, XSWindowService, XS_ADMIN_URL, XS_API_URL, XS_CHART_DEFAULT_COLORS, XS_DEFAULT_ADMIN_USER_ID, XS_DEFAULT_IMAGE_PATH, XS_DEFAULT_LOGO_URL, XS_ENV_NAME, XsLongPressDirective, countries, countries_africa, countries_americas, countries_asia, countries_europe, countries_oceania, datetimeLocalToIso, deslugify, firstLetterCase, flags, getColorByType, getColors, getCountryItem, getCountryNameByCode, getNumberWithZero, getTitleMedia, getTypeForApi, getTypePlural, getTypeSingular, getUserTypes, iconNameForSocial, iconNameForType, isBrowser, isMobile, isMobileUI, registerXSUiIcons, stringifyId, titleCase, toDatetimeLocalInput, truncateText, typeToValidType, uiComponents, uiComponentsExport };
|
|
22146
|
+
export { ApiService, BREADCRUMBS_PROVIDER, Comment, CountryFlagPipe, CountryNamePipe, DEFAULT_FLOW_LABELS, DateChatPipe, DateDisplayMode, DateFunctions, DateLocaleFormatPipe, DateLongPipe, DateToDayOrMonthPipe, Event, FilterArrayPipe, FixRegionPipe, ImageApiPipe, ImportantItems, IncludeEventPipe, LIB_STORIES, LeadStatusPipe, MediaType, NumberDaysPipe, NumberToMonthPipe, OnImageErrorDirective, OrganizationType, PipesModule, PrioritiesPipe, RandomImagePipe, RolePipe, STANDALONE_PIPES, STYLE_INTENSITIES, SiteType, SliceArrayPipe, SocialPipe, SoundcloudNamePipe, StateIconPipe, StateNamePipe, SuggestionTypePipe, TableLinkPipe, TimeAgoPipe, TitleMediaPipe, TruncateTextPipe, TypeESPipe, User, UserRole, UserType, VisitsMonthTotalPipe, VisitsSplitPipe, XSActionSheetComponent, XSActionSheetService, XSAlertComponent, XSAlertGroupComponent, XSAlertTextsService, XSAuthComponent, XSAvatarService, XSBadgeComponent, XSBlockComponent, XSBrandMediaPipe, XSBreadcrumbsComponent, XSButtonComponent, XSButtonGroupService, XSButtonsGroupComponent, XSChartComponent, XSChatAlertComponent, XSChatConversationComponent, XSChatConversationInfoComponent, XSChatFloatingPanelComponent, XSChatListComponent, XSChatTextareaComponent, XSCustomizeProfileComponent, XSDateFormatPipe, XSDateMiniComponent, XSDatePipe, XSDocumentService, XSEmptyStateComponent, XSFeedbackComponent, XSFilterPanelComponent, XSFindLabelByValuePipe, XSFirstLetterPipe, XSFormlyAddressSearchComponent, XSFormlyArrayComponent, XSFormlyButtonComponent, XSFormlyCheckboxComponent, XSFormlyComponent, XSFormlyDateComponent, XSFormlyDateRangeComponent, XSFormlyDatetimeComponent, XSFormlyEntityPickerComponent, XSFormlyHiddenComponent, XSFormlyHtmlEditorComponent, XSFormlyInputComponent, XSFormlyInputWithActionsComponent, XSFormlyJsonComponent, XSFormlyJsonEditorComponent, XSFormlyLabelComponent, XSFormlyModule, XSFormlySelectButtonComponent, XSFormlySelectComponent, XSFormlySelectionListComponent, XSFormlySocialComponent, XSFormlyTextareaComponent, XSFormlyTextareaSimpleComponent, XSFormlyType, XSFormlyUploadImageComponent, XSFullImageComponent, XSFullImageService, XSIconComponent, XSImageComponent, XSImportMediaBottomBarComponent, XSImportMediaCardComponent, XSImportMediaFlowComponent, XSImportMediaHeaderComponent, XSInfoBlocksComponent, XSItemActionComponent, XSItemTypeArtistComponent, XSItemTypeBaseComponent, XSItemTypeComponent, XSItemTypeEquipmentComponent, XSItemTypeEventComponent, XSItemTypeLastLoginComponent, XSItemTypeLastVisitComponent, XSItemTypeMediaComponent, XSItemTypeOrganizationComponent, XSItemTypePlaylistComponent, XSItemTypeSiteComponent, XSItemTypeTipComponent, XSItemTypeTrackingComponent, XSItemTypeUserComponent, XSItemTypeUserStatsComponent, XSListComponent, XSMapComponent, XSMapInfoBlockComponent, XSMapLibreComponent, XSMapLibreMapperService, XSMapLibrePopupService, XSMapLibreService, XSMapService, XSMaxCountPipe, XSModalAuthComponent, XSModalClaimComponent, XSModalComponent, XSModalConfirmComponent, XSModalDateComponent, XSModalFormComponent, XSModalImageSearchComponent, XSModalInfoComponent, XSModalInputComponent, XSModalSavedFiltersComponent, XSModalService, XSNavbarComponent, XSNavbarSidebarComponent, XSPopoverInfoComponent, XSProfileCommentsComponent, XSProfileInfoComponent, XSProfileTopsComponent, XSSafeUrlPipe, XSScrollAreaComponent, XSSectionTitleComponent, XSSelectComponent, XSSetupNamePipe, XSSpinnerComponent, XSStatsCardComponent, XSStepperComponent, XSTableCheckboxComponent, XSTableComponent, XSTableItemsChatComponent, XSTableItemsComponent, XSTableItemsContactComponent, XSTableItemsCountryComponent, XSTableItemsDateComponent, XSTableItemsEntityComponent, XSTableItemsPromotionComponent, XSTableItemsRoleComponent, XSTableItemsStateComponent, XSTableItemsVisitsComponent, XSTabsComponent, XSThousandsSeparatorPipe, XSTitleCollapseComponent, XSToastChatComponent, XSToastComponent, XSToastGenericComponent, XSToastService, XSTranslateService, XSTypeUserPipe, XSWindowService, XS_ADMIN_URL, XS_API_URL, XS_CHART_DEFAULT_COLORS, XS_DEFAULT_ADMIN_USER_ID, XS_DEFAULT_IMAGE_PATH, XS_DEFAULT_LOGO_URL, XS_ENV_NAME, XsLongPressDirective, countries, countries_africa, countries_americas, countries_asia, countries_europe, countries_oceania, datetimeLocalToIso, deslugify, firstLetterCase, flags, getColorByType, getColors, getCountryItem, getCountryNameByCode, getNumberWithZero, getTitleMedia, getTypeForApi, getTypePlural, getTypeSingular, getUserTypes, iconNameForSocial, iconNameForType, isBrowser, isMobile, isMobileUI, registerXSUiIcons, stringifyId, titleCase, toDatetimeLocalInput, truncateText, typeToValidType, uiComponents, uiComponentsExport };
|
|
22056
22147
|
//# sourceMappingURL=xsmusices-ui.mjs.map
|