@nukleus-sports/ui-patterns 0.6.4 → 0.7.0
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/dist/team.cjs +349 -324
- package/dist/team.cjs.map +1 -1
- package/dist/team.d.cts +13 -1
- package/dist/team.d.ts +13 -1
- package/dist/team.js +310 -286
- package/dist/team.js.map +1 -1
- package/package.json +2 -2
package/dist/team.cjs
CHANGED
|
@@ -30,6 +30,7 @@ __export(team_exports, {
|
|
|
30
30
|
StatRankingLeaderboardDialog: () => StatRankingLeaderboardDialog,
|
|
31
31
|
TeamFactsContent: () => TeamFactsContent,
|
|
32
32
|
TeamFactsWidget: () => TeamFactsWidget,
|
|
33
|
+
TeamHeaderCard: () => TeamHeaderCard,
|
|
33
34
|
TeamInfoCard: () => TeamInfoCard,
|
|
34
35
|
TeamScheduleTable: () => TeamScheduleTable,
|
|
35
36
|
TeamSeasonScheduleSummaryPanel: () => TeamSeasonScheduleSummaryPanel,
|
|
@@ -392,11 +393,34 @@ function TeamInfoCard({ team, resolveImageUrl, className }) {
|
|
|
392
393
|
);
|
|
393
394
|
}
|
|
394
395
|
|
|
395
|
-
// src/team/team-
|
|
396
|
-
var import_react = require("react");
|
|
396
|
+
// src/team/team-header-card.tsx
|
|
397
397
|
var import_ui_web3 = require("@nukleus-sports/ui-web");
|
|
398
398
|
var import_core2 = require("@nukleus-sports/core");
|
|
399
399
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
400
|
+
function TeamHeaderCard({ team, logoUrl, className }) {
|
|
401
|
+
const displayName = (0, import_core2.formatTeamName)(team.team, team.nickname) || "Team not found";
|
|
402
|
+
const initials = (0, import_core2.getTeamInitials)(team.team);
|
|
403
|
+
const conferenceInfo = (0, import_core2.getTeamConferenceInfo)(
|
|
404
|
+
team.specificData?.conference,
|
|
405
|
+
team.specificData?.division
|
|
406
|
+
);
|
|
407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui_web3.Card, { className: (0, import_ui_web3.cn)("border-0", className), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui_web3.CardContent, { className: "flex h-full items-center gap-6 p-4 sm:p-6", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex min-w-0 items-center gap-3 sm:gap-0", children: [
|
|
408
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_ui_web3.Avatar, { className: "h-20 w-20 shrink-0 rounded-none min-[400px]:h-28 min-[400px]:w-28 sm:h-40 sm:w-40", children: [
|
|
409
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui_web3.AvatarImage, { src: logoUrl ?? void 0, alt: `${displayName} logo` }),
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui_web3.AvatarFallback, { className: "text-2xl font-bold", children: initials })
|
|
411
|
+
] }),
|
|
412
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex min-w-0 flex-col justify-center gap-1 sm:gap-2 sm:px-4", children: [
|
|
413
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "break-words text-[20px] font-black leading-tight text-text-primary min-[400px]:text-[24px] sm:player-card-name", children: displayName }),
|
|
414
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm text-text-primary", children: conferenceInfo })
|
|
415
|
+
] })
|
|
416
|
+
] }) }) });
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// src/team/team-staff-table.tsx
|
|
420
|
+
var import_react = require("react");
|
|
421
|
+
var import_ui_web4 = require("@nukleus-sports/ui-web");
|
|
422
|
+
var import_core3 = require("@nukleus-sports/core");
|
|
423
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
400
424
|
var CATEGORY_ORDER = [
|
|
401
425
|
"Head Coaches",
|
|
402
426
|
"Assistant Coaches",
|
|
@@ -434,7 +458,7 @@ function TeamStaffTable({
|
|
|
434
458
|
grouped.get(key).push(member);
|
|
435
459
|
}
|
|
436
460
|
grouped.forEach((list, key) => {
|
|
437
|
-
grouped.set(key, (0,
|
|
461
|
+
grouped.set(key, (0, import_core3.sortTeamStaff)(list, activeSorting));
|
|
438
462
|
});
|
|
439
463
|
const orderedKeys = [
|
|
440
464
|
...CATEGORY_ORDER.filter((k) => grouped.has(k)),
|
|
@@ -457,7 +481,7 @@ function TeamStaffTable({
|
|
|
457
481
|
}
|
|
458
482
|
return result;
|
|
459
483
|
}, [staff, activeSorting]);
|
|
460
|
-
const { visibleItems, sentinelRef, hasMore } = (0,
|
|
484
|
+
const { visibleItems, sentinelRef, hasMore } = (0, import_ui_web4.useInfiniteList)(rows, {
|
|
461
485
|
resetKey: `${staff.length}|${JSON.stringify(activeSorting)}`
|
|
462
486
|
});
|
|
463
487
|
const displayedRows = effectiveVirtualized ? visibleItems : rows;
|
|
@@ -475,8 +499,8 @@ function TeamStaffTable({
|
|
|
475
499
|
role: "button",
|
|
476
500
|
"aria-label": ariaLabel
|
|
477
501
|
} : {};
|
|
478
|
-
const nameHeader = sortable ? (0,
|
|
479
|
-
const positionHeader = sortable ? (0,
|
|
502
|
+
const nameHeader = sortable ? (0, import_ui_web4.createClickableSortableHeader)("Name") : "Name";
|
|
503
|
+
const positionHeader = sortable ? (0, import_ui_web4.createClickableSortableHeader)("Position") : "Position";
|
|
480
504
|
return [
|
|
481
505
|
{
|
|
482
506
|
id: "name",
|
|
@@ -486,13 +510,13 @@ function TeamStaffTable({
|
|
|
486
510
|
const member = row.original;
|
|
487
511
|
const fullName = `${member.first_name} ${member.last_name}`.trim();
|
|
488
512
|
const labelText = `View ${fullName}'s profile`;
|
|
489
|
-
return /* @__PURE__ */ (0,
|
|
490
|
-
/* @__PURE__ */ (0,
|
|
513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex gap-2 items-center w-full line-clamp-2", children: [
|
|
514
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
491
515
|
"div",
|
|
492
516
|
{
|
|
493
|
-
className: (0,
|
|
517
|
+
className: (0, import_ui_web4.cn)("flex items-center justify-center", interactive && "cursor-pointer"),
|
|
494
518
|
...interactionProps(member.id, labelText),
|
|
495
|
-
children: /* @__PURE__ */ (0,
|
|
519
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
496
520
|
EntityAvatar,
|
|
497
521
|
{
|
|
498
522
|
entityType: "coach",
|
|
@@ -507,10 +531,10 @@ function TeamStaffTable({
|
|
|
507
531
|
)
|
|
508
532
|
}
|
|
509
533
|
),
|
|
510
|
-
/* @__PURE__ */ (0,
|
|
534
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
511
535
|
"div",
|
|
512
536
|
{
|
|
513
|
-
className: (0,
|
|
537
|
+
className: (0, import_ui_web4.cn)("line-clamp-2", interactive && "cursor-pointer"),
|
|
514
538
|
...interactionProps(member.id, labelText),
|
|
515
539
|
children: fullName
|
|
516
540
|
}
|
|
@@ -523,10 +547,10 @@ function TeamStaffTable({
|
|
|
523
547
|
id: "position",
|
|
524
548
|
header: positionHeader,
|
|
525
549
|
accessorFn: (row) => row.position || "-",
|
|
526
|
-
cell: ({ row }) => /* @__PURE__ */ (0,
|
|
550
|
+
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex items-center h-full min-h-[46px]", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
527
551
|
"span",
|
|
528
552
|
{
|
|
529
|
-
className: (0,
|
|
553
|
+
className: (0, import_ui_web4.cn)("line-clamp-2 break-words", interactive && "cursor-pointer"),
|
|
530
554
|
...interactionProps(
|
|
531
555
|
row.original.id,
|
|
532
556
|
`View ${row.original.first_name} ${row.original.last_name}'s position`
|
|
@@ -538,8 +562,8 @@ function TeamStaffTable({
|
|
|
538
562
|
}
|
|
539
563
|
];
|
|
540
564
|
}, [interactive, onStaffClick, sortable, isCompact, resolveImageUrl]);
|
|
541
|
-
return /* @__PURE__ */ (0,
|
|
542
|
-
|
|
565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-full xl:flex xl:h-full xl:flex-1 xl:min-h-0 xl:flex-col xl:overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
566
|
+
import_ui_web4.BaseTable,
|
|
543
567
|
{
|
|
544
568
|
columns,
|
|
545
569
|
data: displayedRows,
|
|
@@ -557,13 +581,13 @@ function TeamStaffTable({
|
|
|
557
581
|
splitLayout: isSplitLayout,
|
|
558
582
|
numberOfColumns: 1,
|
|
559
583
|
splitLayoutGridCols: isCompact ? "!grid-cols-[minmax(120px,120px)_1fr]" : isSplitLayout ? "sm:!grid-cols-[minmax(220px,220px)_1fr]" : "",
|
|
560
|
-
containerClassName: (0,
|
|
561
|
-
className: (0,
|
|
584
|
+
containerClassName: (0, import_ui_web4.cn)("border-0 rounded-none xl:h-full", effectiveVirtualized && "h-full"),
|
|
585
|
+
className: (0, import_ui_web4.cn)(
|
|
562
586
|
"border-none xl:flex-1 xl:min-h-0 xl:overflow-hidden",
|
|
563
587
|
effectiveVirtualized && "h-full min-h-0 w-full",
|
|
564
588
|
className
|
|
565
589
|
),
|
|
566
|
-
bottomContent: effectiveVirtualized && hasMore ? /* @__PURE__ */ (0,
|
|
590
|
+
bottomContent: effectiveVirtualized && hasMore ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { ref: sentinelRef, className: "h-px w-full" }) : null,
|
|
567
591
|
getRowBanner: (row) => row.__isCategoryRow ? row.__categoryLabel : null,
|
|
568
592
|
bannerRowClassName: "bg-greys-background-hover hover:bg-greys-background-hover",
|
|
569
593
|
getRowClassName: (row) => row.__isCategoryRow ? "hidden" : ""
|
|
@@ -572,11 +596,11 @@ function TeamStaffTable({
|
|
|
572
596
|
}
|
|
573
597
|
|
|
574
598
|
// src/team/stat-column.tsx
|
|
575
|
-
var
|
|
599
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
576
600
|
function StatColumn({ label, value, suffix, rankBadge }) {
|
|
577
|
-
return /* @__PURE__ */ (0,
|
|
578
|
-
/* @__PURE__ */ (0,
|
|
579
|
-
/* @__PURE__ */ (0,
|
|
601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col items-center h-full justify-center flex-1 gap-1 sm:gap-3 w-full", children: [
|
|
602
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "label-xs-medium text-text-secondary leading-normal opacity-[0.8] ss05", children: label }),
|
|
603
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "text-[19px] font-semibold sm:text-[32px] sm:font-bold text-text-primary leading-normal title-text opacity-[0.8]", children: [
|
|
580
604
|
value,
|
|
581
605
|
suffix || ""
|
|
582
606
|
] }),
|
|
@@ -585,9 +609,9 @@ function StatColumn({ label, value, suffix, rankBadge }) {
|
|
|
585
609
|
}
|
|
586
610
|
|
|
587
611
|
// src/team/team-season-stats-summary-panel.tsx
|
|
588
|
-
var
|
|
589
|
-
var
|
|
590
|
-
var
|
|
612
|
+
var import_ui_web5 = require("@nukleus-sports/ui-web");
|
|
613
|
+
var import_core4 = require("@nukleus-sports/core");
|
|
614
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
591
615
|
function getStatusMessage({
|
|
592
616
|
isSupportedSport,
|
|
593
617
|
selectedYear,
|
|
@@ -610,17 +634,17 @@ function TeamSeasonStatsSummaryPanel({
|
|
|
610
634
|
isError,
|
|
611
635
|
className
|
|
612
636
|
}) {
|
|
613
|
-
const columns = (0,
|
|
637
|
+
const columns = (0, import_core4.getTeamStatColumns)(sportId);
|
|
614
638
|
const statusMessage = loading ? null : getStatusMessage({
|
|
615
|
-
isSupportedSport: (0,
|
|
639
|
+
isSupportedSport: (0, import_core4.isSupportedTeamStatsSport)(sportId),
|
|
616
640
|
selectedYear,
|
|
617
641
|
selectedType,
|
|
618
642
|
isError,
|
|
619
643
|
stats
|
|
620
644
|
});
|
|
621
|
-
return /* @__PURE__ */ (0,
|
|
622
|
-
/* @__PURE__ */ (0,
|
|
623
|
-
/* @__PURE__ */ (0,
|
|
645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_ui_web5.Card, { className: (0, import_ui_web5.cn)("border-0 p-4 flex flex-col gap-4", className), children: [
|
|
646
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui_web5.CardHeader, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui_web5.CardTitle, { className: "text-base text-text-primary font-medium leading-normal", children: "Season Stats" }) }),
|
|
647
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui_web5.CardContent, { className: "p-0 flex-1 flex justify-center items-center", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui_web5.Skeleton, { className: "h-4 w-3/4" }) }) : statusMessage ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex items-center justify-center w-full text-14.5 text-text-secondary", children: statusMessage }) : stats && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-full flex flex-col sm:flex-row gap-6 sm:gap-3 justify-between items-center", children: columns.map((col, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
624
648
|
StatColumn,
|
|
625
649
|
{
|
|
626
650
|
label: col.label,
|
|
@@ -633,8 +657,8 @@ function TeamSeasonStatsSummaryPanel({
|
|
|
633
657
|
}
|
|
634
658
|
|
|
635
659
|
// src/team/team-season-schedule-summary-panel.tsx
|
|
636
|
-
var
|
|
637
|
-
var
|
|
660
|
+
var import_ui_web6 = require("@nukleus-sports/ui-web");
|
|
661
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
638
662
|
function TeamSeasonScheduleSummaryPanel({
|
|
639
663
|
selectedYear,
|
|
640
664
|
selectedType,
|
|
@@ -643,11 +667,11 @@ function TeamSeasonScheduleSummaryPanel({
|
|
|
643
667
|
isError,
|
|
644
668
|
className
|
|
645
669
|
}) {
|
|
646
|
-
return /* @__PURE__ */ (0,
|
|
647
|
-
/* @__PURE__ */ (0,
|
|
648
|
-
/* @__PURE__ */ (0,
|
|
649
|
-
/* @__PURE__ */ (0,
|
|
650
|
-
/* @__PURE__ */ (0,
|
|
670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ui_web6.Card, { className: (0, import_ui_web6.cn)("border-0 p-4 flex flex-col gap-4", className), children: [
|
|
671
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_web6.CardHeader, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_web6.CardTitle, { className: "text-base text-text-primary font-medium leading-normal", children: "Season Summary" }) }),
|
|
672
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_web6.CardContent, { className: "p-0 flex-1 flex justify-center items-center", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_web6.Skeleton, { className: "h-4 w-3/4" }) }) : !selectedYear || selectedType === null ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center justify-center w-full text-14.5 text-text-secondary", children: "Select a season to view summary." }) : isError && !summary ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center justify-center w-full text-14.5 text-text-secondary", children: "Couldn't load the schedule summary. Please try again." }) : !summary ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center justify-center w-full text-14.5 text-text-secondary", children: "No schedule data for the current season." }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w-full flex flex-col sm:flex-row gap-6 sm:gap-3 justify-between items-center", children: [
|
|
673
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StatColumn, { label: "Record", value: summary.record }),
|
|
674
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
651
675
|
StatColumn,
|
|
652
676
|
{
|
|
653
677
|
label: "Games Played",
|
|
@@ -659,8 +683,8 @@ function TeamSeasonScheduleSummaryPanel({
|
|
|
659
683
|
}
|
|
660
684
|
|
|
661
685
|
// src/team/season-selector.tsx
|
|
662
|
-
var
|
|
663
|
-
var
|
|
686
|
+
var import_ui_web7 = require("@nukleus-sports/ui-web");
|
|
687
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
664
688
|
function SeasonSelector({
|
|
665
689
|
years,
|
|
666
690
|
types,
|
|
@@ -671,39 +695,39 @@ function SeasonSelector({
|
|
|
671
695
|
hideTypeOnMobile = false,
|
|
672
696
|
className
|
|
673
697
|
}) {
|
|
674
|
-
return /* @__PURE__ */ (0,
|
|
675
|
-
/* @__PURE__ */ (0,
|
|
676
|
-
|
|
698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_ui_web7.cn)("flex gap-3", className), children: [
|
|
699
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
700
|
+
import_ui_web7.Select,
|
|
677
701
|
{
|
|
678
702
|
value: selectedYear?.toString() ?? "",
|
|
679
703
|
onValueChange: (value) => onYearChange(Number(value)),
|
|
680
704
|
children: [
|
|
681
|
-
/* @__PURE__ */ (0,
|
|
682
|
-
/* @__PURE__ */ (0,
|
|
683
|
-
|
|
705
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui_web7.SelectTrigger, { variant: "widget", size: "widget", "aria-label": "Season year", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui_web7.SelectValue, { placeholder: "Select year" }) }),
|
|
706
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
707
|
+
import_ui_web7.SelectContent,
|
|
684
708
|
{
|
|
685
709
|
className: "bg-card border-border z-50 [&_.checkbox]:!flex",
|
|
686
710
|
classNameViewPort: "gap-2",
|
|
687
|
-
children: years.map((year) => /* @__PURE__ */ (0,
|
|
711
|
+
children: years.map((year) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui_web7.SelectItem, { value: year.value.toString(), className: "min-h-8", children: year.label }, year.value))
|
|
688
712
|
}
|
|
689
713
|
)
|
|
690
714
|
]
|
|
691
715
|
}
|
|
692
716
|
),
|
|
693
|
-
/* @__PURE__ */ (0,
|
|
694
|
-
|
|
717
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: (0, import_ui_web7.cn)(hideTypeOnMobile && "hidden sm:block"), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
718
|
+
import_ui_web7.Select,
|
|
695
719
|
{
|
|
696
720
|
value: selectedType?.toString() ?? "",
|
|
697
721
|
onValueChange: (value) => onTypeChange(Number(value)),
|
|
698
722
|
disabled: selectedYear === null,
|
|
699
723
|
children: [
|
|
700
|
-
/* @__PURE__ */ (0,
|
|
701
|
-
/* @__PURE__ */ (0,
|
|
702
|
-
|
|
724
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui_web7.SelectTrigger, { variant: "widget", size: "widget", "aria-label": "Season type", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui_web7.SelectValue, { placeholder: "Select type" }) }),
|
|
725
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
726
|
+
import_ui_web7.SelectContent,
|
|
703
727
|
{
|
|
704
728
|
className: "bg-card border-border z-50 [&_.checkbox]:!flex",
|
|
705
729
|
classNameViewPort: "gap-2",
|
|
706
|
-
children: types.map((type) => /* @__PURE__ */ (0,
|
|
730
|
+
children: types.map((type) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui_web7.SelectItem, { value: type.value.toString(), className: "min-h-8", children: type.label }, type.value))
|
|
707
731
|
}
|
|
708
732
|
)
|
|
709
733
|
]
|
|
@@ -714,8 +738,8 @@ function SeasonSelector({
|
|
|
714
738
|
|
|
715
739
|
// src/team/fact-pills.tsx
|
|
716
740
|
var import_react2 = require("react");
|
|
717
|
-
var
|
|
718
|
-
var
|
|
741
|
+
var import_ui_web8 = require("@nukleus-sports/ui-web");
|
|
742
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
719
743
|
var MAX_ROWS = 2;
|
|
720
744
|
var KEY_SEPARATOR = "";
|
|
721
745
|
var PILL_CLASS = "flex min-w-0 max-w-full shrink-0 items-center justify-center rounded-[6px] bg-greys-background-hover px-2 py-0.5 label-xs-table font-ss02-ss05 text-text-primary";
|
|
@@ -786,19 +810,19 @@ function FactPills({ items, capped = false }) {
|
|
|
786
810
|
setExpanded(false);
|
|
787
811
|
setVisibleCount(null);
|
|
788
812
|
};
|
|
789
|
-
return /* @__PURE__ */ (0,
|
|
813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
790
814
|
"ul",
|
|
791
815
|
{
|
|
792
816
|
id: listId,
|
|
793
817
|
ref: listRef,
|
|
794
|
-
className: (0,
|
|
818
|
+
className: (0, import_ui_web8.cn)(
|
|
795
819
|
"flex w-full flex-wrap content-start items-start gap-1",
|
|
796
820
|
collapsible && "overflow-hidden"
|
|
797
821
|
),
|
|
798
822
|
style: collapsible && clipHeight !== null ? { maxHeight: clipHeight } : void 0,
|
|
799
823
|
children: [
|
|
800
|
-
items.slice(0, shownCount).map((item, index) => /* @__PURE__ */ (0,
|
|
801
|
-
truncated && /* @__PURE__ */ (0,
|
|
824
|
+
items.slice(0, shownCount).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { className: PILL_CLASS, title: String(item), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "truncate", children: item }) }, keys[index])),
|
|
825
|
+
truncated && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { className: "flex shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
802
826
|
"button",
|
|
803
827
|
{
|
|
804
828
|
type: "button",
|
|
@@ -809,7 +833,7 @@ function FactPills({ items, capped = false }) {
|
|
|
809
833
|
children: "Show More"
|
|
810
834
|
}
|
|
811
835
|
) }),
|
|
812
|
-
capped && expanded && /* @__PURE__ */ (0,
|
|
836
|
+
capped && expanded && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { className: "flex shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
813
837
|
"button",
|
|
814
838
|
{
|
|
815
839
|
type: "button",
|
|
@@ -826,9 +850,9 @@ function FactPills({ items, capped = false }) {
|
|
|
826
850
|
}
|
|
827
851
|
|
|
828
852
|
// src/team/fact-field.tsx
|
|
829
|
-
var
|
|
830
|
-
var
|
|
831
|
-
var
|
|
853
|
+
var import_ui_web9 = require("@nukleus-sports/ui-web");
|
|
854
|
+
var import_core5 = require("@nukleus-sports/core");
|
|
855
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
832
856
|
function numberFact(facts, key) {
|
|
833
857
|
const value = facts[key];
|
|
834
858
|
return typeof value === "number" ? value : null;
|
|
@@ -841,23 +865,23 @@ function textFact(facts, key) {
|
|
|
841
865
|
const value = facts[key];
|
|
842
866
|
return typeof value === "string" ? value : null;
|
|
843
867
|
}
|
|
844
|
-
function EmptyValue({ children =
|
|
845
|
-
return /* @__PURE__ */ (0,
|
|
868
|
+
function EmptyValue({ children = import_core5.EMPTY_FACT_VALUE }) {
|
|
869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "body-text font-ss02-ss05 text-text-secondary", children });
|
|
846
870
|
}
|
|
847
871
|
function FieldLabel({ children }) {
|
|
848
|
-
return /* @__PURE__ */ (0,
|
|
872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "w-full label-xs-text font-ss02-ss05 text-text-secondary", children });
|
|
849
873
|
}
|
|
850
874
|
function CountFact({
|
|
851
875
|
factKey,
|
|
852
876
|
data
|
|
853
877
|
}) {
|
|
854
878
|
const { facts, config } = data;
|
|
855
|
-
const pairedYears =
|
|
856
|
-
const years = pairedYears ? (0,
|
|
857
|
-
return /* @__PURE__ */ (0,
|
|
858
|
-
/* @__PURE__ */ (0,
|
|
859
|
-
/* @__PURE__ */ (0,
|
|
860
|
-
years.length > 0 && /* @__PURE__ */ (0,
|
|
879
|
+
const pairedYears = import_core5.TEAM_FACT_YEAR_PAIRS[factKey];
|
|
880
|
+
const years = pairedYears ? (0, import_core5.formatYearPills)(listFact(facts, pairedYears), config.formatChampionshipYear) : [];
|
|
881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex min-w-0 flex-col items-start gap-1", children: [
|
|
882
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FieldLabel, { children: config.labels[factKey] }),
|
|
883
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "stat-count-number title-text text-text-primary", children: (0, import_core5.formatTeamFactNumber)("count", numberFact(facts, factKey)) }),
|
|
884
|
+
years.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FactPills, { items: years, capped: true })
|
|
861
885
|
] });
|
|
862
886
|
}
|
|
863
887
|
function RivalValue({
|
|
@@ -867,14 +891,14 @@ function RivalValue({
|
|
|
867
891
|
}) {
|
|
868
892
|
switch (rival.status) {
|
|
869
893
|
case "none":
|
|
870
|
-
return /* @__PURE__ */ (0,
|
|
894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(EmptyValue, {});
|
|
871
895
|
case "loading":
|
|
872
|
-
return /* @__PURE__ */ (0,
|
|
896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ui_web9.Skeleton, { className: "h-8 w-40", "aria-label": "Loading rival" });
|
|
873
897
|
case "error":
|
|
874
|
-
return /* @__PURE__ */ (0,
|
|
898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(EmptyValue, { children: "Couldn't load the rival team" });
|
|
875
899
|
case "ready": {
|
|
876
|
-
const content = /* @__PURE__ */ (0,
|
|
877
|
-
/* @__PURE__ */ (0,
|
|
900
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
901
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
878
902
|
EntityAvatar,
|
|
879
903
|
{
|
|
880
904
|
entityType: "initials",
|
|
@@ -885,37 +909,37 @@ function RivalValue({
|
|
|
885
909
|
className: "shrink-0"
|
|
886
910
|
}
|
|
887
911
|
),
|
|
888
|
-
/* @__PURE__ */ (0,
|
|
912
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "min-w-0", children: rival.rival.name })
|
|
889
913
|
] });
|
|
890
914
|
const className = "inline-flex max-w-full items-center gap-1.5 body-text-semibold font-ss02-ss05 text-primary-color-nuk-text";
|
|
891
|
-
return getRivalHref ? /* @__PURE__ */ (0,
|
|
915
|
+
return getRivalHref ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("a", { href: getRivalHref(rival.rival.id), className: (0, import_ui_web9.cn)(className, "hover:underline"), children: content }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className, children: content });
|
|
892
916
|
}
|
|
893
917
|
}
|
|
894
918
|
}
|
|
895
919
|
function factValue(factKey, layout, data, resolveImageUrl, getRivalHref) {
|
|
896
920
|
const { facts, config } = data;
|
|
897
|
-
const kind =
|
|
921
|
+
const kind = import_core5.TEAM_FACT_KINDS[factKey];
|
|
898
922
|
if (kind === "number" || kind === "year" || kind === "text") {
|
|
899
|
-
const display = kind === "text" ? textFact(facts, factKey) : (0,
|
|
900
|
-
const isEmpty = !display || display ===
|
|
901
|
-
return /* @__PURE__ */ (0,
|
|
923
|
+
const display = kind === "text" ? textFact(facts, factKey) : (0, import_core5.formatTeamFactNumber)(kind, numberFact(facts, factKey));
|
|
924
|
+
const isEmpty = !display || display === import_core5.EMPTY_FACT_VALUE;
|
|
925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
902
926
|
"span",
|
|
903
927
|
{
|
|
904
|
-
className: (0,
|
|
928
|
+
className: (0, import_ui_web9.cn)(
|
|
905
929
|
"w-full header-xl-medium-card font-ss02-ss05 [overflow-wrap:anywhere]",
|
|
906
930
|
isEmpty ? "text-text-secondary" : "text-text-primary"
|
|
907
931
|
),
|
|
908
|
-
children: display ??
|
|
932
|
+
children: display ?? import_core5.EMPTY_FACT_VALUE
|
|
909
933
|
}
|
|
910
934
|
);
|
|
911
935
|
}
|
|
912
936
|
if (kind === "years" || kind === "labeled_years" || kind === "list") {
|
|
913
937
|
const raw = listFact(facts, factKey);
|
|
914
|
-
const items = kind === "years" ? (0,
|
|
915
|
-
return items.length > 0 ? /* @__PURE__ */ (0,
|
|
938
|
+
const items = kind === "years" ? (0, import_core5.formatYearPills)(raw, config.formatChampionshipYear) : raw;
|
|
939
|
+
return items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FactPills, { items, capped: layout === "grid" }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(EmptyValue, {});
|
|
916
940
|
}
|
|
917
941
|
if (kind === "rival") {
|
|
918
|
-
return /* @__PURE__ */ (0,
|
|
942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
919
943
|
RivalValue,
|
|
920
944
|
{
|
|
921
945
|
rival: data.rival,
|
|
@@ -925,14 +949,14 @@ function factValue(factKey, layout, data, resolveImageUrl, getRivalHref) {
|
|
|
925
949
|
);
|
|
926
950
|
}
|
|
927
951
|
const text = textFact(facts, factKey);
|
|
928
|
-
return /* @__PURE__ */ (0,
|
|
952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
929
953
|
"p",
|
|
930
954
|
{
|
|
931
|
-
className: (0,
|
|
955
|
+
className: (0, import_ui_web9.cn)(
|
|
932
956
|
"w-full body-text font-ss02-ss05 whitespace-pre-line",
|
|
933
957
|
text ? "text-text-primary" : "text-text-secondary"
|
|
934
958
|
),
|
|
935
|
-
children: text ??
|
|
959
|
+
children: text ?? import_core5.EMPTY_FACT_VALUE
|
|
936
960
|
}
|
|
937
961
|
);
|
|
938
962
|
}
|
|
@@ -943,18 +967,18 @@ function FactField({
|
|
|
943
967
|
resolveImageUrl,
|
|
944
968
|
getRivalHref
|
|
945
969
|
}) {
|
|
946
|
-
const kind =
|
|
947
|
-
if (kind === "count") return /* @__PURE__ */ (0,
|
|
948
|
-
return /* @__PURE__ */ (0,
|
|
970
|
+
const kind = import_core5.TEAM_FACT_KINDS[factKey];
|
|
971
|
+
if (kind === "count") return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CountFact, { factKey, data });
|
|
972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
949
973
|
"div",
|
|
950
974
|
{
|
|
951
|
-
className: (0,
|
|
975
|
+
className: (0, import_ui_web9.cn)(
|
|
952
976
|
"flex min-w-0 flex-col items-start gap-1.5",
|
|
953
977
|
layout === "row" && "flex-1",
|
|
954
978
|
layout === "grid" && kind !== "list" && "gap-1"
|
|
955
979
|
),
|
|
956
980
|
children: [
|
|
957
|
-
/* @__PURE__ */ (0,
|
|
981
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FieldLabel, { children: data.config.labels[factKey] }),
|
|
958
982
|
factValue(factKey, layout, data, resolveImageUrl, getRivalHref)
|
|
959
983
|
]
|
|
960
984
|
}
|
|
@@ -963,15 +987,15 @@ function FactField({
|
|
|
963
987
|
|
|
964
988
|
// src/team/venue-photo.tsx
|
|
965
989
|
var import_react3 = require("react");
|
|
966
|
-
var
|
|
990
|
+
var import_ui_web10 = require("@nukleus-sports/ui-web");
|
|
967
991
|
var import_icons = require("@nukleus-sports/icons");
|
|
968
|
-
var
|
|
969
|
-
var
|
|
992
|
+
var import_core6 = require("@nukleus-sports/core");
|
|
993
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
970
994
|
var PHOTO_WIDTHS = [640, 960, 1280];
|
|
971
995
|
var PHOTO_SIZES = "(min-width: 1280px) 420px, 100vw";
|
|
972
996
|
var LINK_CLASS = "inline-flex shrink-0 items-center gap-1 hover:text-text-primary";
|
|
973
997
|
function NewTabNote() {
|
|
974
|
-
return /* @__PURE__ */ (0,
|
|
998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: " (opens in a new tab)" });
|
|
975
999
|
}
|
|
976
1000
|
function resolvePhotoSources(path, resolveImageUrl) {
|
|
977
1001
|
const candidates = PHOTO_WIDTHS.flatMap((width) => {
|
|
@@ -986,18 +1010,18 @@ function resolvePhotoSources(path, resolveImageUrl) {
|
|
|
986
1010
|
}
|
|
987
1011
|
function VenueNameOnly({ name, label }) {
|
|
988
1012
|
if (!name) return null;
|
|
989
|
-
return /* @__PURE__ */ (0,
|
|
990
|
-
/* @__PURE__ */ (0,
|
|
991
|
-
/* @__PURE__ */ (0,
|
|
1013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex min-w-0 flex-col items-start gap-1.5", children: [
|
|
1014
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FieldLabel, { children: label }),
|
|
1015
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w-full header-xl-medium-card font-ss02-ss05 text-text-primary", children: name })
|
|
992
1016
|
] });
|
|
993
1017
|
}
|
|
994
1018
|
function PhotoCaption({ name, image }) {
|
|
995
|
-
const credit = (0,
|
|
996
|
-
return /* @__PURE__ */ (0,
|
|
997
|
-
name && /* @__PURE__ */ (0,
|
|
998
|
-
/* @__PURE__ */ (0,
|
|
999
|
-
/* @__PURE__ */ (0,
|
|
1000
|
-
image.sourceUrl && /* @__PURE__ */ (0,
|
|
1019
|
+
const credit = (0, import_core6.facilityImageCredit)(image);
|
|
1020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("figcaption", { className: "flex w-full flex-col gap-1 xxs-body-text font-ss02-ss05", children: [
|
|
1021
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w-full text-text-primary", children: name }),
|
|
1022
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex w-full items-start gap-2 text-greys-text-secondary", children: [
|
|
1023
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "min-w-0 flex-1", children: credit ? `Photo: ${credit}` : "Photo from Wikimedia Commons" }),
|
|
1024
|
+
image.sourceUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1001
1025
|
"a",
|
|
1002
1026
|
{
|
|
1003
1027
|
href: image.sourceUrl,
|
|
@@ -1006,8 +1030,8 @@ function PhotoCaption({ name, image }) {
|
|
|
1006
1030
|
className: LINK_CLASS,
|
|
1007
1031
|
children: [
|
|
1008
1032
|
"Source",
|
|
1009
|
-
/* @__PURE__ */ (0,
|
|
1010
|
-
/* @__PURE__ */ (0,
|
|
1033
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NewTabNote, {}),
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "aria-hidden": "true", className: "flex shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1011
1035
|
import_icons.XsViewInvoiceIcon,
|
|
1012
1036
|
{
|
|
1013
1037
|
width: 16,
|
|
@@ -1018,7 +1042,7 @@ function PhotoCaption({ name, image }) {
|
|
|
1018
1042
|
]
|
|
1019
1043
|
}
|
|
1020
1044
|
),
|
|
1021
|
-
image.licenseUrl && /* @__PURE__ */ (0,
|
|
1045
|
+
image.licenseUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1022
1046
|
"a",
|
|
1023
1047
|
{
|
|
1024
1048
|
href: image.licenseUrl,
|
|
@@ -1027,7 +1051,7 @@ function PhotoCaption({ name, image }) {
|
|
|
1027
1051
|
className: LINK_CLASS,
|
|
1028
1052
|
children: [
|
|
1029
1053
|
"License",
|
|
1030
|
-
/* @__PURE__ */ (0,
|
|
1054
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NewTabNote, {})
|
|
1031
1055
|
]
|
|
1032
1056
|
}
|
|
1033
1057
|
)
|
|
@@ -1041,9 +1065,9 @@ function VenuePhoto({ venue, label, resolveImageUrl }) {
|
|
|
1041
1065
|
const sources = image && resolveImageUrl ? resolvePhotoSources(image.path, resolveImageUrl) : null;
|
|
1042
1066
|
const useResized = failed === "none" && Boolean(sources?.srcSet);
|
|
1043
1067
|
const src = failed === "all" ? void 0 : useResized ? sources?.resized : sources?.original;
|
|
1044
|
-
if (!image || !src) return /* @__PURE__ */ (0,
|
|
1045
|
-
return /* @__PURE__ */ (0,
|
|
1046
|
-
/* @__PURE__ */ (0,
|
|
1068
|
+
if (!image || !src) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(VenueNameOnly, { name, label });
|
|
1069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("figure", { className: "flex w-full flex-col gap-3", children: [
|
|
1070
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1047
1071
|
"img",
|
|
1048
1072
|
{
|
|
1049
1073
|
src,
|
|
@@ -1052,20 +1076,20 @@ function VenuePhoto({ venue, label, resolveImageUrl }) {
|
|
|
1052
1076
|
onLoad: () => setIsLoaded(true),
|
|
1053
1077
|
onError: () => setFailed(useResized ? "resized" : "all"),
|
|
1054
1078
|
alt: name ?? label,
|
|
1055
|
-
className: (0,
|
|
1079
|
+
className: (0, import_ui_web10.cn)(
|
|
1056
1080
|
"h-[150px] w-full rounded-[8px] bg-greys-background-hover object-cover",
|
|
1057
1081
|
!isLoaded && "animate-pulse"
|
|
1058
1082
|
),
|
|
1059
1083
|
loading: "lazy"
|
|
1060
1084
|
}
|
|
1061
1085
|
),
|
|
1062
|
-
/* @__PURE__ */ (0,
|
|
1086
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PhotoCaption, { name, image })
|
|
1063
1087
|
] });
|
|
1064
1088
|
}
|
|
1065
1089
|
|
|
1066
1090
|
// src/team/team-facts-content.tsx
|
|
1067
|
-
var
|
|
1068
|
-
var
|
|
1091
|
+
var import_core7 = require("@nukleus-sports/core");
|
|
1092
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1069
1093
|
var SECTION_FIELDS_CLASS = {
|
|
1070
1094
|
grid: "grid grid-cols-2 items-start gap-3",
|
|
1071
1095
|
row: "flex items-start gap-3",
|
|
@@ -1082,7 +1106,7 @@ function TeamFactsContent({
|
|
|
1082
1106
|
getRivalHref
|
|
1083
1107
|
}) {
|
|
1084
1108
|
const { config, venue, hasFacts } = data;
|
|
1085
|
-
const photo = /* @__PURE__ */ (0,
|
|
1109
|
+
const photo = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1086
1110
|
VenuePhoto,
|
|
1087
1111
|
{
|
|
1088
1112
|
venue,
|
|
@@ -1092,14 +1116,14 @@ function TeamFactsContent({
|
|
|
1092
1116
|
venue.image?.path ?? "none"
|
|
1093
1117
|
);
|
|
1094
1118
|
if (!hasFacts) {
|
|
1095
|
-
return /* @__PURE__ */ (0,
|
|
1096
|
-
/* @__PURE__ */ (0,
|
|
1097
|
-
(venue.image || venue.name) && /* @__PURE__ */ (0,
|
|
1119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
1120
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex h-[120px] items-center justify-center rounded-[10px] border border-dashed border-greys-grey-strokes-tables text-14.5 text-text-secondary", children: "No team facts yet." }),
|
|
1121
|
+
(venue.image || venue.name) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("section", { className: SECTION_CLASS, children: photo })
|
|
1098
1122
|
] });
|
|
1099
1123
|
}
|
|
1100
|
-
return /* @__PURE__ */ (0,
|
|
1101
|
-
/* @__PURE__ */ (0,
|
|
1102
|
-
/* @__PURE__ */ (0,
|
|
1124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col gap-3", children: config.sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { "aria-label": section.title, className: SECTION_CLASS, children: [
|
|
1125
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: "label-xs-semibold-text font-ss02-ss05 uppercase text-greys-text-secondary", children: section.title }),
|
|
1126
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: SECTION_FIELDS_CLASS[section.layout], children: (0, import_core7.teamFactsDisplayFields)(section).map((key) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1103
1127
|
FactField,
|
|
1104
1128
|
{
|
|
1105
1129
|
factKey: key,
|
|
@@ -1115,8 +1139,8 @@ function TeamFactsContent({
|
|
|
1115
1139
|
}
|
|
1116
1140
|
|
|
1117
1141
|
// src/team/team-facts-widget.tsx
|
|
1118
|
-
var
|
|
1119
|
-
var
|
|
1142
|
+
var import_ui_web11 = require("@nukleus-sports/ui-web");
|
|
1143
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1120
1144
|
var SKELETON_KEYS = ["trophy-case", "tradition", "profile"];
|
|
1121
1145
|
function TeamFactsWidget({
|
|
1122
1146
|
state,
|
|
@@ -1125,32 +1149,32 @@ function TeamFactsWidget({
|
|
|
1125
1149
|
getRivalHref,
|
|
1126
1150
|
className
|
|
1127
1151
|
}) {
|
|
1128
|
-
return /* @__PURE__ */ (0,
|
|
1129
|
-
|
|
1152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1153
|
+
import_ui_web11.Card,
|
|
1130
1154
|
{
|
|
1131
|
-
className: (0,
|
|
1155
|
+
className: (0, import_ui_web11.cn)(
|
|
1132
1156
|
"flex w-full min-w-0 flex-col gap-3 rounded-[10px] border-0 px-4 pb-[22px] pt-4",
|
|
1133
1157
|
// Matches the Team Info card's desktop height (TeamInfoCard `md:min-h-[612px]`).
|
|
1134
1158
|
"xl:min-h-[612px] xl:self-stretch xl:[contain:size]",
|
|
1135
1159
|
className
|
|
1136
1160
|
),
|
|
1137
1161
|
children: [
|
|
1138
|
-
/* @__PURE__ */ (0,
|
|
1139
|
-
/* @__PURE__ */ (0,
|
|
1140
|
-
state.status === "loading" && /* @__PURE__ */ (0,
|
|
1141
|
-
state.status === "error" && /* @__PURE__ */ (0,
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui_web11.CardHeader, { className: "flex h-8 shrink-0 flex-row items-center p-0", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui_web11.CardTitle, { className: "header-xl-medium-card font-ss02-ss05 text-text-primary", children: "Team Facts" }) }),
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_ui_web11.CardContent, { className: "p-0 xl:min-h-0 xl:flex-1 xl:overflow-y-auto xl:[scrollbar-width:none] xl:[&::-webkit-scrollbar]:hidden", children: [
|
|
1164
|
+
state.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex flex-col gap-3", role: "status", "aria-label": "Loading team facts", children: SKELETON_KEYS.map((key) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui_web11.Skeleton, { className: "h-[200px] w-full rounded-[10px]" }, key)) }),
|
|
1165
|
+
state.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1142
1166
|
"div",
|
|
1143
1167
|
{
|
|
1144
1168
|
role: "alert",
|
|
1145
1169
|
className: "flex h-[120px] flex-col items-center justify-center gap-2 text-14.5 text-text-secondary",
|
|
1146
1170
|
children: [
|
|
1147
|
-
/* @__PURE__ */ (0,
|
|
1148
|
-
state.devMessage && /* @__PURE__ */ (0,
|
|
1149
|
-
state.retry && /* @__PURE__ */ (0,
|
|
1171
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Couldn't load team facts." }),
|
|
1172
|
+
state.devMessage && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "xxs-body-text", children: state.devMessage }),
|
|
1173
|
+
state.retry && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui_web11.Button, { type: "button", variant: "outline", size: "sm", onClick: state.retry, children: "Try again" })
|
|
1150
1174
|
]
|
|
1151
1175
|
}
|
|
1152
1176
|
),
|
|
1153
|
-
state.status === "ready" && /* @__PURE__ */ (0,
|
|
1177
|
+
state.status === "ready" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1154
1178
|
TeamFactsContent,
|
|
1155
1179
|
{
|
|
1156
1180
|
data: state.data,
|
|
@@ -1168,30 +1192,30 @@ function TeamFactsWidget({
|
|
|
1168
1192
|
|
|
1169
1193
|
// src/team/stat-ranking-leaderboard-dialog.tsx
|
|
1170
1194
|
var import_react4 = require("react");
|
|
1171
|
-
var
|
|
1195
|
+
var import_ui_web12 = require("@nukleus-sports/ui-web");
|
|
1172
1196
|
var import_icons2 = require("@nukleus-sports/icons");
|
|
1173
|
-
var
|
|
1174
|
-
var
|
|
1197
|
+
var import_core8 = require("@nukleus-sports/core");
|
|
1198
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1175
1199
|
var PAGE_BUTTON_BASE = "background";
|
|
1176
1200
|
var PAGE_BUTTON_DESKTOP = "!h-[32px] !w-[32px] p-[6px]";
|
|
1177
1201
|
var PAGE_BUTTON_MOBILE = "!h-11 !w-11 p-3 !outline-0 !border-0 !bg-inherit";
|
|
1178
1202
|
var HIGHLIGHT_CLASS = "text-semantic-color-status-priority-completed-copy bg-primary-color-total-row-table-2";
|
|
1179
1203
|
function formatRank(rank, tied) {
|
|
1180
|
-
return tied ? `T-${(0,
|
|
1204
|
+
return tied ? `T-${(0, import_core8.toOrdinal)(rank)}` : (0, import_core8.toOrdinal)(rank);
|
|
1181
1205
|
}
|
|
1182
1206
|
function Footnotes({ notes }) {
|
|
1183
|
-
return /* @__PURE__ */ (0,
|
|
1207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { children: notes.map((note) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "alert-text-italic text-text-secondary", children: [
|
|
1184
1208
|
"* ",
|
|
1185
1209
|
note
|
|
1186
1210
|
] }, note)) });
|
|
1187
1211
|
}
|
|
1188
1212
|
function Pagination({ page, totalPages, isCountKnown, isSm, onPageChange }) {
|
|
1189
|
-
const buttonClass = (0,
|
|
1190
|
-
return /* @__PURE__ */ (0,
|
|
1191
|
-
/* @__PURE__ */ (0,
|
|
1192
|
-
/* @__PURE__ */ (0,
|
|
1193
|
-
/* @__PURE__ */ (0,
|
|
1194
|
-
|
|
1213
|
+
const buttonClass = (0, import_ui_web12.cn)(PAGE_BUTTON_BASE, isSm ? PAGE_BUTTON_DESKTOP : PAGE_BUTTON_MOBILE);
|
|
1214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
1215
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "label-xs-text text-text-secondary", children: isCountKnown ? `Page ${page} of ${totalPages}` : `Page ${page}` }),
|
|
1216
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1218
|
+
import_ui_web12.Button,
|
|
1195
1219
|
{
|
|
1196
1220
|
variant: "secondary-greys",
|
|
1197
1221
|
size: "sm",
|
|
@@ -1199,11 +1223,11 @@ function Pagination({ page, totalPages, isCountKnown, isSm, onPageChange }) {
|
|
|
1199
1223
|
onClick: () => onPageChange(Math.max(1, page - 1)),
|
|
1200
1224
|
disabled: page === 1,
|
|
1201
1225
|
"aria-label": "Go to previous page",
|
|
1202
|
-
children: /* @__PURE__ */ (0,
|
|
1226
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons2.ChevronLeftIcon, { className: "h-4 w-4" })
|
|
1203
1227
|
}
|
|
1204
1228
|
),
|
|
1205
|
-
/* @__PURE__ */ (0,
|
|
1206
|
-
|
|
1229
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1230
|
+
import_ui_web12.Button,
|
|
1207
1231
|
{
|
|
1208
1232
|
variant: "secondary-greys",
|
|
1209
1233
|
size: "sm",
|
|
@@ -1211,7 +1235,7 @@ function Pagination({ page, totalPages, isCountKnown, isSm, onPageChange }) {
|
|
|
1211
1235
|
onClick: () => onPageChange(Math.min(totalPages, page + 1)),
|
|
1212
1236
|
disabled: !isCountKnown || page >= totalPages,
|
|
1213
1237
|
"aria-label": "Go to next page",
|
|
1214
|
-
children: /* @__PURE__ */ (0,
|
|
1238
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons2.ChevronRightIcon, { className: "h-4 w-4" })
|
|
1215
1239
|
}
|
|
1216
1240
|
)
|
|
1217
1241
|
] })
|
|
@@ -1237,7 +1261,7 @@ function useLeaderboardColumns(entityLabel, statLabel, formatValue, isSm) {
|
|
|
1237
1261
|
},
|
|
1238
1262
|
{
|
|
1239
1263
|
accessorKey: "value",
|
|
1240
|
-
header: () => /* @__PURE__ */ (0,
|
|
1264
|
+
header: () => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "text-right text-wrap line-clamp-2", title: statLabel, children: statLabel }),
|
|
1241
1265
|
meta: {
|
|
1242
1266
|
cellSize: isSm ? "m" : "xs",
|
|
1243
1267
|
rowCellClassName: "text-right tabular-nums break-all"
|
|
@@ -1257,12 +1281,12 @@ function LeaderboardTable(props) {
|
|
|
1257
1281
|
props.isSm
|
|
1258
1282
|
);
|
|
1259
1283
|
if (isConfigError) {
|
|
1260
|
-
return /* @__PURE__ */ (0,
|
|
1284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex items-center justify-center h-full text-14.5 text-text-secondary", children: "Couldn't load ranking details. Please try again." });
|
|
1261
1285
|
}
|
|
1262
|
-
return /* @__PURE__ */ (0,
|
|
1263
|
-
isError && rows.length > 0 && /* @__PURE__ */ (0,
|
|
1264
|
-
/* @__PURE__ */ (0,
|
|
1265
|
-
|
|
1286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
1287
|
+
isError && rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-12 text-destructive px-1 pb-2", children: "Couldn't refresh rankings. Showing the last loaded data." }),
|
|
1288
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1289
|
+
import_ui_web12.BaseTable,
|
|
1266
1290
|
{
|
|
1267
1291
|
columns,
|
|
1268
1292
|
data: rows,
|
|
@@ -1285,17 +1309,17 @@ function LeaderboardContent(props) {
|
|
|
1285
1309
|
const isCountKnown = totalCount !== void 0;
|
|
1286
1310
|
const totalPages = Math.max(1, Math.ceil((totalCount ?? 0) / pageSize));
|
|
1287
1311
|
const showPagination = page > 1 || isCountKnown && totalPages > 1;
|
|
1288
|
-
return /* @__PURE__ */ (0,
|
|
1289
|
-
/* @__PURE__ */ (0,
|
|
1290
|
-
subtitle && /* @__PURE__ */ (0,
|
|
1312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col h-full overflow-hidden", children: [
|
|
1313
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-6 sm:gap-4 overflow-hidden px-5", children: [
|
|
1314
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_ui_web12.DialogDescription, { className: "flex flex-col gap-1 header-xl-medium-card text-text-secondary sm:px-4 font-ss02 ss05 leading-normal", children: [
|
|
1291
1315
|
subtitle,
|
|
1292
|
-
!isSm && footnotes.length > 0 && /* @__PURE__ */ (0,
|
|
1316
|
+
!isSm && footnotes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Footnotes, { notes: footnotes })
|
|
1293
1317
|
] }),
|
|
1294
|
-
/* @__PURE__ */ (0,
|
|
1318
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LeaderboardTable, { ...props }) })
|
|
1295
1319
|
] }),
|
|
1296
|
-
(footnotes.length > 0 || showPagination) && /* @__PURE__ */ (0,
|
|
1297
|
-
footnotes.length > 0 && /* @__PURE__ */ (0,
|
|
1298
|
-
showPagination && /* @__PURE__ */ (0,
|
|
1320
|
+
(footnotes.length > 0 || showPagination) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col pt-3 pb-6 px-9 border-t border-border gap-3 relative z-10 shadow-[0_0_4px_0_rgba(0,0,0,0.25)]", children: [
|
|
1321
|
+
footnotes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Footnotes, { notes: footnotes }),
|
|
1322
|
+
showPagination && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1299
1323
|
Pagination,
|
|
1300
1324
|
{
|
|
1301
1325
|
page,
|
|
@@ -1311,13 +1335,13 @@ function LeaderboardContent(props) {
|
|
|
1311
1335
|
function StatRankingLeaderboardDialog(props) {
|
|
1312
1336
|
const { open, onOpenChange, title, isSm } = props;
|
|
1313
1337
|
if (isSm) {
|
|
1314
|
-
return /* @__PURE__ */ (0,
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui_web12.Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_ui_web12.DialogContent, { className: "p-0 min-w-[536px] sm:max-w-[500px] pt-4 gap-6 bg-card border-0 flex flex-col max-h-[85vh]", children: [
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui_web12.DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui_web12.DialogTitle, { className: "header-xl-medium-card", children: title }) }),
|
|
1340
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LeaderboardContent, { ...props })
|
|
1317
1341
|
] }) });
|
|
1318
1342
|
}
|
|
1319
|
-
return /* @__PURE__ */ (0,
|
|
1320
|
-
|
|
1343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1344
|
+
import_ui_web12.MobileModalLayout,
|
|
1321
1345
|
{
|
|
1322
1346
|
onCancel: () => onOpenChange(false),
|
|
1323
1347
|
isOpen: open,
|
|
@@ -1325,15 +1349,15 @@ function StatRankingLeaderboardDialog(props) {
|
|
|
1325
1349
|
title,
|
|
1326
1350
|
cancelButtonName: "Close",
|
|
1327
1351
|
childClassName: "h-auto min-h-full h-[calc(100vh-100px)]",
|
|
1328
|
-
children: /* @__PURE__ */ (0,
|
|
1352
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col h-full pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LeaderboardContent, { ...props }) })
|
|
1329
1353
|
}
|
|
1330
1354
|
);
|
|
1331
1355
|
}
|
|
1332
1356
|
|
|
1333
1357
|
// src/team/team-season-stats-widget.tsx
|
|
1334
|
-
var
|
|
1335
|
-
var
|
|
1336
|
-
var
|
|
1358
|
+
var import_ui_web13 = require("@nukleus-sports/ui-web");
|
|
1359
|
+
var import_core9 = require("@nukleus-sports/core");
|
|
1360
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1337
1361
|
var PRESEASON_TYPE = 1;
|
|
1338
1362
|
var RANK_TEXT_CLASS = "label-xs-medium text-text-secondary";
|
|
1339
1363
|
var RANK_LINK_CLASS = `${RANK_TEXT_CLASS} hover:text-text-primary hover:underline cursor-pointer transition-colors`;
|
|
@@ -1345,15 +1369,15 @@ function RankBadge({
|
|
|
1345
1369
|
onRankClick
|
|
1346
1370
|
}) {
|
|
1347
1371
|
if (isRankingsError) {
|
|
1348
|
-
return /* @__PURE__ */ (0,
|
|
1349
|
-
/* @__PURE__ */ (0,
|
|
1350
|
-
/* @__PURE__ */ (0,
|
|
1372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "label-xs-medium text-destructive", title: "Couldn't load ranking", children: [
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": "true", children: "--" }),
|
|
1374
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sr-only", children: "Couldn't load ranking" })
|
|
1351
1375
|
] });
|
|
1352
1376
|
}
|
|
1353
1377
|
if (!rankText) return null;
|
|
1354
|
-
if (!onRankClick) return /* @__PURE__ */ (0,
|
|
1355
|
-
return /* @__PURE__ */ (0,
|
|
1356
|
-
|
|
1378
|
+
if (!onRankClick) return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: RANK_TEXT_CLASS, children: rankText });
|
|
1379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1380
|
+
import_ui_web13.Button,
|
|
1357
1381
|
{
|
|
1358
1382
|
type: "button",
|
|
1359
1383
|
variant: "unstyled",
|
|
@@ -1369,7 +1393,7 @@ function RankBadge({
|
|
|
1369
1393
|
);
|
|
1370
1394
|
}
|
|
1371
1395
|
function CenteredMessage({ children }) {
|
|
1372
|
-
return /* @__PURE__ */ (0,
|
|
1396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-center h-full text-14.5 text-text-secondary", children });
|
|
1373
1397
|
}
|
|
1374
1398
|
function StatsBody({
|
|
1375
1399
|
stats,
|
|
@@ -1381,21 +1405,21 @@ function StatsBody({
|
|
|
1381
1405
|
isRankingsError,
|
|
1382
1406
|
onRankClick
|
|
1383
1407
|
}) {
|
|
1384
|
-
const columns = (0,
|
|
1385
|
-
return /* @__PURE__ */ (0,
|
|
1386
|
-
isSummaryError && /* @__PURE__ */ (0,
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1408
|
+
const columns = (0, import_core9.getTeamStatColumns)(sportId);
|
|
1409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-1.5 h-full w-full justify-center", children: [
|
|
1410
|
+
isSummaryError && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-12 text-destructive", children: "Couldn't refresh stats. Showing the last loaded data." }),
|
|
1411
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "grid grid-cols-2 gap-x-1.5 gap-y-1.5 sm:flex sm:flex-row sm:gap-3 sm:justify-between items-center w-full", children: columns.map((column, index) => {
|
|
1388
1412
|
const configId = configIds?.[index];
|
|
1389
|
-
return /* @__PURE__ */ (0,
|
|
1413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1390
1414
|
StatColumn,
|
|
1391
1415
|
{
|
|
1392
1416
|
label: column.label,
|
|
1393
1417
|
value: stats.values[index],
|
|
1394
1418
|
suffix: column.suffix,
|
|
1395
|
-
rankBadge: showRanks && configId !== void 0 ? /* @__PURE__ */ (0,
|
|
1419
|
+
rankBadge: showRanks && configId !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1396
1420
|
RankBadge,
|
|
1397
1421
|
{
|
|
1398
|
-
rankText: (0,
|
|
1422
|
+
rankText: (0, import_core9.formatStatRankByConfig)(rankings, configId),
|
|
1399
1423
|
statLabel: column.label,
|
|
1400
1424
|
configId,
|
|
1401
1425
|
isRankingsError,
|
|
@@ -1426,22 +1450,22 @@ function TeamSeasonStatsWidget({
|
|
|
1426
1450
|
onRankClick,
|
|
1427
1451
|
className
|
|
1428
1452
|
}) {
|
|
1429
|
-
const isSupportedSport = sportId != null && (0,
|
|
1453
|
+
const isSupportedSport = sportId != null && (0, import_core9.isSupportedTeamStatsSport)(sportId);
|
|
1430
1454
|
const hasSeason = Boolean(seasons?.selectedYear) && seasons?.selectedType != null;
|
|
1431
|
-
const stats = isSupportedSport && hasSeason ? (0,
|
|
1432
|
-
const configIds = (0,
|
|
1455
|
+
const stats = isSupportedSport && hasSeason ? (0, import_core9.computeTeamSeasonStatsFromSummary)(summary, sportId) : null;
|
|
1456
|
+
const configIds = (0, import_core9.getTeamRankingConfigIds)(sportId, leagueId);
|
|
1433
1457
|
const showRanks = seasons?.selectedType !== PRESEASON_TYPE;
|
|
1434
1458
|
if (seasonsLoading) {
|
|
1435
|
-
return /* @__PURE__ */ (0,
|
|
1436
|
-
/* @__PURE__ */ (0,
|
|
1437
|
-
/* @__PURE__ */ (0,
|
|
1459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_ui_web13.Card, { className: (0, import_ui_web13.cn)("border-0 p-4 h-[300px]", className), children: [
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui_web13.CardHeader, { className: "p-0 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui_web13.CardTitle, { className: "text-base font-medium", children: "Season Stats" }) }),
|
|
1461
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui_web13.CardContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "space-y-3 flex justify-center items-center w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui_web13.IconLoader, {}) }) })
|
|
1438
1462
|
] });
|
|
1439
1463
|
}
|
|
1440
1464
|
let body;
|
|
1441
1465
|
if (statsLoading) {
|
|
1442
|
-
body = /* @__PURE__ */ (0,
|
|
1466
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui_web13.Skeleton, { className: "h-4 w-3/4" }) });
|
|
1443
1467
|
} else if (isSupportedSport && stats) {
|
|
1444
|
-
body = /* @__PURE__ */ (0,
|
|
1468
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1445
1469
|
StatsBody,
|
|
1446
1470
|
{
|
|
1447
1471
|
stats,
|
|
@@ -1455,21 +1479,21 @@ function TeamSeasonStatsWidget({
|
|
|
1455
1479
|
}
|
|
1456
1480
|
);
|
|
1457
1481
|
} else {
|
|
1458
|
-
body = /* @__PURE__ */ (0,
|
|
1482
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CenteredMessage, { children: getEmptyMessage(isSupportedSport, hasSeason, isSummaryError) });
|
|
1459
1483
|
}
|
|
1460
|
-
return /* @__PURE__ */ (0,
|
|
1461
|
-
|
|
1484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1485
|
+
import_ui_web13.Card,
|
|
1462
1486
|
{
|
|
1463
|
-
className: (0,
|
|
1487
|
+
className: (0, import_ui_web13.cn)(
|
|
1464
1488
|
"border-0 px-4 py-3 sm:p-4 flex flex-col gap-[25px] sm:gap-4 sm:h-[300px]",
|
|
1465
1489
|
className
|
|
1466
1490
|
),
|
|
1467
1491
|
children: [
|
|
1468
|
-
/* @__PURE__ */ (0,
|
|
1469
|
-
/* @__PURE__ */ (0,
|
|
1470
|
-
isSupportedSport && seasons && seasons.years.length > 0 && /* @__PURE__ */ (0,
|
|
1492
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui_web13.CardHeader, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-row items-center justify-between w-full h-8", children: [
|
|
1493
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui_web13.CardTitle, { className: "header-xl-medium-card text-base text-text-primary", children: "Team Stats" }),
|
|
1494
|
+
isSupportedSport && seasons && seasons.years.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SeasonSelector, { ...seasons, hideTypeOnMobile: true })
|
|
1471
1495
|
] }) }),
|
|
1472
|
-
/* @__PURE__ */ (0,
|
|
1496
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui_web13.CardContent, { className: "p-0 h-auto sm:h-[220px] flex justify-center", children: body })
|
|
1473
1497
|
]
|
|
1474
1498
|
}
|
|
1475
1499
|
);
|
|
@@ -1477,9 +1501,9 @@ function TeamSeasonStatsWidget({
|
|
|
1477
1501
|
|
|
1478
1502
|
// src/team/recent-games-widget.tsx
|
|
1479
1503
|
var import_react5 = require("react");
|
|
1480
|
-
var
|
|
1504
|
+
var import_ui_web14 = require("@nukleus-sports/ui-web");
|
|
1481
1505
|
var import_icons3 = require("@nukleus-sports/icons");
|
|
1482
|
-
var
|
|
1506
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1483
1507
|
var DATE_FORMAT = new Intl.DateTimeFormat("en-US", {
|
|
1484
1508
|
weekday: "long",
|
|
1485
1509
|
month: "long",
|
|
@@ -1492,23 +1516,23 @@ var MESSAGES = {
|
|
|
1492
1516
|
"games-error": "Couldn't load games. Please try again."
|
|
1493
1517
|
};
|
|
1494
1518
|
function ResultText({ result }) {
|
|
1495
|
-
if (result.outcome === "none") return /* @__PURE__ */ (0,
|
|
1519
|
+
if (result.outcome === "none") return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-text-secondary text-14", children: "--" });
|
|
1496
1520
|
if (result.outcome === "tie") {
|
|
1497
|
-
return /* @__PURE__ */ (0,
|
|
1521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "text-14 font-medium text-text-primary", children: [
|
|
1498
1522
|
"T ",
|
|
1499
1523
|
result.detail
|
|
1500
1524
|
] });
|
|
1501
1525
|
}
|
|
1502
1526
|
const isWin = result.outcome === "win";
|
|
1503
|
-
return /* @__PURE__ */ (0,
|
|
1504
|
-
/* @__PURE__ */ (0,
|
|
1527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "text-14 font-medium", children: [
|
|
1528
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1505
1529
|
"span",
|
|
1506
1530
|
{
|
|
1507
1531
|
className: isWin ? "text-primary-color-nuk-text" : "text-semantic-color-status-priority-blocked-hot-copy",
|
|
1508
1532
|
children: isWin ? "W" : "L"
|
|
1509
1533
|
}
|
|
1510
1534
|
),
|
|
1511
|
-
/* @__PURE__ */ (0,
|
|
1535
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "text-text-primary", children: [
|
|
1512
1536
|
" ",
|
|
1513
1537
|
result.detail
|
|
1514
1538
|
] })
|
|
@@ -1518,7 +1542,7 @@ function OpponentLogo({ opponent, resolveImageUrl, defaultLogoUrl }) {
|
|
|
1518
1542
|
const [failedUrl, setFailedUrl] = (0, import_react5.useState)(null);
|
|
1519
1543
|
const { logo } = opponent;
|
|
1520
1544
|
const resolved = logo ? logo.stored ? resolveImageUrl?.(logo.url) : logo.url : void 0;
|
|
1521
|
-
return /* @__PURE__ */ (0,
|
|
1545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1522
1546
|
"img",
|
|
1523
1547
|
{
|
|
1524
1548
|
src: resolved && resolved !== failedUrl ? resolved : defaultLogoUrl,
|
|
@@ -1532,13 +1556,13 @@ function OpponentLogo({ opponent, resolveImageUrl, defaultLogoUrl }) {
|
|
|
1532
1556
|
);
|
|
1533
1557
|
}
|
|
1534
1558
|
function GameItem({ row, resolveImageUrl, defaultLogoUrl }) {
|
|
1535
|
-
return /* @__PURE__ */ (0,
|
|
1536
|
-
row.isFirstUpcoming && /* @__PURE__ */ (0,
|
|
1537
|
-
/* @__PURE__ */ (0,
|
|
1538
|
-
/* @__PURE__ */ (0,
|
|
1539
|
-
/* @__PURE__ */ (0,
|
|
1540
|
-
/* @__PURE__ */ (0,
|
|
1541
|
-
/* @__PURE__ */ (0,
|
|
1559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "border-b border-border last:border-0", children: [
|
|
1560
|
+
row.isFirstUpcoming && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "px-2 pt-2 text-12 font-medium uppercase tracking-wide text-text-secondary", children: "Upcoming" }),
|
|
1561
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col p-2 gap-[5px]", children: [
|
|
1562
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-14 font-normal text-text-secondary", children: DATE_FORMAT.format(new Date(row.gameDate)) }),
|
|
1563
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1564
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-14 font-normal text-text-secondary shrink-0", children: row.isHome ? "vs " : "@ " }),
|
|
1565
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1542
1566
|
OpponentLogo,
|
|
1543
1567
|
{
|
|
1544
1568
|
opponent: row.opponent,
|
|
@@ -1546,18 +1570,18 @@ function GameItem({ row, resolveImageUrl, defaultLogoUrl }) {
|
|
|
1546
1570
|
defaultLogoUrl
|
|
1547
1571
|
}
|
|
1548
1572
|
),
|
|
1549
|
-
/* @__PURE__ */ (0,
|
|
1550
|
-
row.result && /* @__PURE__ */ (0,
|
|
1551
|
-
/* @__PURE__ */ (0,
|
|
1552
|
-
/* @__PURE__ */ (0,
|
|
1573
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-14.5 font-normal text-text-primary truncate", children: row.opponent.name }),
|
|
1574
|
+
row.result && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
1575
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-14 text-text-secondary", children: "-" }),
|
|
1576
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ResultText, { result: row.result })
|
|
1553
1577
|
] })
|
|
1554
1578
|
] }),
|
|
1555
|
-
row.time && /* @__PURE__ */ (0,
|
|
1579
|
+
row.time && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-14 font-normal text-text-secondary", children: row.time })
|
|
1556
1580
|
] })
|
|
1557
1581
|
] });
|
|
1558
1582
|
}
|
|
1559
1583
|
function Message({ children }) {
|
|
1560
|
-
return /* @__PURE__ */ (0,
|
|
1584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "text-text-primary text-14.5 px-1", children });
|
|
1561
1585
|
}
|
|
1562
1586
|
function Body({
|
|
1563
1587
|
status,
|
|
@@ -1566,11 +1590,11 @@ function Body({
|
|
|
1566
1590
|
defaultLogoUrl
|
|
1567
1591
|
}) {
|
|
1568
1592
|
if (status === "loading") {
|
|
1569
|
-
return /* @__PURE__ */ (0,
|
|
1593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "space-y-4 flex justify-center items-center w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui_web14.IconLoader, {}) });
|
|
1570
1594
|
}
|
|
1571
|
-
if (status !== "ready") return /* @__PURE__ */ (0,
|
|
1572
|
-
if (rows.length === 0) return /* @__PURE__ */ (0,
|
|
1573
|
-
return /* @__PURE__ */ (0,
|
|
1595
|
+
if (status !== "ready") return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Message, { children: MESSAGES[status] });
|
|
1596
|
+
if (rows.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Message, { children: "There are no games scheduled at this time." });
|
|
1597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex flex-col overflow-y-auto overflow-x-hidden gap-1", children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1574
1598
|
GameItem,
|
|
1575
1599
|
{
|
|
1576
1600
|
row,
|
|
@@ -1588,18 +1612,18 @@ function RecentGamesWidget({
|
|
|
1588
1612
|
onExpand,
|
|
1589
1613
|
className
|
|
1590
1614
|
}) {
|
|
1591
|
-
return /* @__PURE__ */ (0,
|
|
1592
|
-
|
|
1615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1616
|
+
import_ui_web14.Card,
|
|
1593
1617
|
{
|
|
1594
|
-
className: (0,
|
|
1618
|
+
className: (0, import_ui_web14.cn)(
|
|
1595
1619
|
"p-4 w-full xl:w-[420px] flex flex-col overflow-hidden border-none gap-3 h-full md:min-h-[612px]",
|
|
1596
1620
|
className
|
|
1597
1621
|
),
|
|
1598
1622
|
children: [
|
|
1599
|
-
/* @__PURE__ */ (0,
|
|
1600
|
-
/* @__PURE__ */ (0,
|
|
1601
|
-
onExpand && /* @__PURE__ */ (0,
|
|
1602
|
-
|
|
1623
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_ui_web14.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 p-0", children: [
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui_web14.CardTitle, { children: "Recent Games" }),
|
|
1625
|
+
onExpand && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1626
|
+
import_ui_web14.Button,
|
|
1603
1627
|
{
|
|
1604
1628
|
type: "button",
|
|
1605
1629
|
variant: "ghost",
|
|
@@ -1607,11 +1631,11 @@ function RecentGamesWidget({
|
|
|
1607
1631
|
"aria-label": "View full schedule",
|
|
1608
1632
|
onClick: onExpand,
|
|
1609
1633
|
className: "outline-1 background outline-offset-[-1px] outline-[hsl(var(--color-ui-elem-strokes))] outline h-[32px] w-[32px]",
|
|
1610
|
-
children: /* @__PURE__ */ (0,
|
|
1634
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons3.ArrowUpRightIcon, { className: "text-greys-icons h-5 w-5" })
|
|
1611
1635
|
}
|
|
1612
1636
|
)
|
|
1613
1637
|
] }),
|
|
1614
|
-
/* @__PURE__ */ (0,
|
|
1638
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui_web14.CardContent, { className: "flex-1 flex flex-col overflow-hidden p-0", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1615
1639
|
Body,
|
|
1616
1640
|
{
|
|
1617
1641
|
status,
|
|
@@ -1627,9 +1651,9 @@ function RecentGamesWidget({
|
|
|
1627
1651
|
|
|
1628
1652
|
// src/team/team-stats-table.tsx
|
|
1629
1653
|
var import_react6 = require("react");
|
|
1630
|
-
var
|
|
1631
|
-
var
|
|
1632
|
-
var
|
|
1654
|
+
var import_ui_web15 = require("@nukleus-sports/ui-web");
|
|
1655
|
+
var import_core10 = require("@nukleus-sports/core");
|
|
1656
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1633
1657
|
function stripLeadingSlash(path) {
|
|
1634
1658
|
return path.startsWith("/") ? path.slice(1) : path;
|
|
1635
1659
|
}
|
|
@@ -1665,10 +1689,10 @@ function formatTeamStatDate(stat) {
|
|
|
1665
1689
|
const dateStr = stat.stat_details?.game_details?.date;
|
|
1666
1690
|
const date = dateStr ? new Date(dateStr) : null;
|
|
1667
1691
|
if (!date || Number.isNaN(date.getTime())) {
|
|
1668
|
-
return /* @__PURE__ */ (0,
|
|
1692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-text-primary body-text", children: "--" });
|
|
1669
1693
|
}
|
|
1670
1694
|
const formatted = date.toLocaleDateString("en-US", { month: "short", day: "numeric" });
|
|
1671
|
-
return /* @__PURE__ */ (0,
|
|
1695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "text-13.5 font-normal text-text-primary", children: formatted });
|
|
1672
1696
|
}
|
|
1673
1697
|
function getTeamStatResult(stat) {
|
|
1674
1698
|
const gameDetails = stat.stat_details?.game_details;
|
|
@@ -1687,9 +1711,9 @@ function getTeamStatResult(stat) {
|
|
|
1687
1711
|
const opponentScore = isHome ? awayScore : homeScore;
|
|
1688
1712
|
const score = `${teamScore}-${opponentScore}${gameDetails.status_alt_details ? ` ${gameDetails.status_alt_details}` : ""}`;
|
|
1689
1713
|
const colorClass = winLoss === "W" ? "text-primary-color-nuk-text" : winLoss === "L" ? "text-semantic-color-status-priority-blocked-hot-copy" : "text-text-primary";
|
|
1690
|
-
return /* @__PURE__ */ (0,
|
|
1691
|
-
/* @__PURE__ */ (0,
|
|
1692
|
-
/* @__PURE__ */ (0,
|
|
1714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-baseline gap-1 leading-tight", children: [
|
|
1715
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: (0, import_ui_web15.cn)(colorClass, "body-text"), children: winLoss }),
|
|
1716
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-text-primary body-text", children: score })
|
|
1693
1717
|
] });
|
|
1694
1718
|
}
|
|
1695
1719
|
function StatOpponentCell({
|
|
@@ -1703,13 +1727,13 @@ function StatOpponentCell({
|
|
|
1703
1727
|
const isHome = stat.team_id === gameDetails?.home_team_id;
|
|
1704
1728
|
const opponentName = isHome ? gameDetails?.away_team_name : gameDetails?.home_team_name;
|
|
1705
1729
|
const opponentLogoPath = isHome ? gameDetails?.away_team_logo : gameDetails?.home_team_logo;
|
|
1706
|
-
if (!opponentName) return /* @__PURE__ */ (0,
|
|
1730
|
+
if (!opponentName) return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: "--" });
|
|
1707
1731
|
const prefix = isHome ? "vs" : "@";
|
|
1708
1732
|
const resolved = opponentLogoPath ? resolveOpponentLogoUrl(stripLeadingSlash(opponentLogoPath)) : null;
|
|
1709
1733
|
const logoSrc = resolved && resolved !== failedUrl ? resolved : defaultLogoUrl;
|
|
1710
|
-
return /* @__PURE__ */ (0,
|
|
1711
|
-
/* @__PURE__ */ (0,
|
|
1712
|
-
/* @__PURE__ */ (0,
|
|
1734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex items-center h-full", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex max-sm:gap-1 gap-2 items-center font-normal leading-tight text-12", children: [
|
|
1735
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-text-primary body-text", children: prefix }),
|
|
1736
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1713
1737
|
"img",
|
|
1714
1738
|
{
|
|
1715
1739
|
src: logoSrc,
|
|
@@ -1720,7 +1744,7 @@ function StatOpponentCell({
|
|
|
1720
1744
|
}
|
|
1721
1745
|
}
|
|
1722
1746
|
),
|
|
1723
|
-
showName && /* @__PURE__ */ (0,
|
|
1747
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-primary-color-nuk-text body-text line-clamp-2", children: opponentName })
|
|
1724
1748
|
] }) }) });
|
|
1725
1749
|
}
|
|
1726
1750
|
function buildStatsColumns({
|
|
@@ -1734,14 +1758,14 @@ function buildStatsColumns({
|
|
|
1734
1758
|
return [
|
|
1735
1759
|
{
|
|
1736
1760
|
id: "game_date",
|
|
1737
|
-
header: () => /* @__PURE__ */ (0,
|
|
1761
|
+
header: () => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w-[50px] shrink-0", children: "Date" }),
|
|
1738
1762
|
cell: ({ row }) => formatTeamStatDate(row.original),
|
|
1739
1763
|
meta: { cellSize: isSm ? "xs" : "xxs", headerClassName: "h-auto" }
|
|
1740
1764
|
},
|
|
1741
1765
|
{
|
|
1742
1766
|
id: "opponent",
|
|
1743
|
-
header: () => /* @__PURE__ */ (0,
|
|
1744
|
-
cell: ({ row }) => /* @__PURE__ */ (0,
|
|
1767
|
+
header: () => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: isSm ? "Opponent" : "Opp" }),
|
|
1768
|
+
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1745
1769
|
StatOpponentCell,
|
|
1746
1770
|
{
|
|
1747
1771
|
stat: row.original,
|
|
@@ -1793,33 +1817,33 @@ function StatsBody2({
|
|
|
1793
1817
|
isSmallLaptop,
|
|
1794
1818
|
emptyMessage
|
|
1795
1819
|
}) {
|
|
1796
|
-
return /* @__PURE__ */ (0,
|
|
1797
|
-
/* @__PURE__ */ (0,
|
|
1798
|
-
/* @__PURE__ */ (0,
|
|
1799
|
-
showsCategoryPicker && /* @__PURE__ */ (0,
|
|
1800
|
-
|
|
1820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
1821
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2 min-[360px]:gap-3 xl:shrink-0", children: [
|
|
1822
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SeasonSelector, { ...seasons, className: "gap-2 min-[360px]:gap-3" }),
|
|
1823
|
+
showsCategoryPicker && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1824
|
+
import_ui_web15.Select,
|
|
1801
1825
|
{
|
|
1802
1826
|
value: selectedStatCategory,
|
|
1803
1827
|
onValueChange: onStatCategoryChange,
|
|
1804
1828
|
disabled: !seasons.selectedYear || seasons.selectedType === null,
|
|
1805
1829
|
children: [
|
|
1806
|
-
/* @__PURE__ */ (0,
|
|
1807
|
-
/* @__PURE__ */ (0,
|
|
1808
|
-
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.SelectTrigger, { variant: "widget", size: "widget", "aria-label": "Stat category", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.SelectValue, { placeholder: "Select stat category" }) }),
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1832
|
+
import_ui_web15.SelectContent,
|
|
1809
1833
|
{
|
|
1810
1834
|
className: "bg-popover border-border z-50 [&_.checkbox]:!flex",
|
|
1811
1835
|
classNameViewPort: "gap-2",
|
|
1812
|
-
children: availableStatCategories.map((category) => /* @__PURE__ */ (0,
|
|
1836
|
+
children: availableStatCategories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.SelectItem, { value: category, className: "capitalize min-h-8", children: category.charAt(0).toUpperCase() + category.slice(1) }, category))
|
|
1813
1837
|
}
|
|
1814
1838
|
)
|
|
1815
1839
|
]
|
|
1816
1840
|
}
|
|
1817
1841
|
)
|
|
1818
1842
|
] }),
|
|
1819
|
-
/* @__PURE__ */ (0,
|
|
1820
|
-
isStatTypesError && !hasVisibleStatTypes && /* @__PURE__ */ (0,
|
|
1821
|
-
/* @__PURE__ */ (0,
|
|
1822
|
-
|
|
1843
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col space-y-4 xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: [
|
|
1844
|
+
isStatTypesError && !hasVisibleStatTypes && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-secondary text-13.5", children: "Couldn't load stat categories -- showing limited columns." }),
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1846
|
+
import_ui_web15.BaseTable,
|
|
1823
1847
|
{
|
|
1824
1848
|
columns,
|
|
1825
1849
|
data: stats,
|
|
@@ -1862,28 +1886,28 @@ function TeamStatsTable({
|
|
|
1862
1886
|
availableStatCategories
|
|
1863
1887
|
);
|
|
1864
1888
|
if (isTeamError) {
|
|
1865
|
-
return /* @__PURE__ */ (0,
|
|
1889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.Card, { className: (0, import_ui_web15.cn)("border-0", className), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.CardContent, { className: "p-4 flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-secondary", children: "Couldn't load team information. Please try again." }) }) });
|
|
1866
1890
|
}
|
|
1867
1891
|
if (seasonsLoading || sportId === null) {
|
|
1868
|
-
return /* @__PURE__ */ (0,
|
|
1869
|
-
/* @__PURE__ */ (0,
|
|
1870
|
-
/* @__PURE__ */ (0,
|
|
1871
|
-
/* @__PURE__ */ (0,
|
|
1872
|
-
/* @__PURE__ */ (0,
|
|
1892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.Card, { className: (0, import_ui_web15.cn)("border-0", className), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_ui_web15.CardContent, { className: "space-y-4 pt-6", children: [
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-3 sm:flex-row justify-start", children: [
|
|
1894
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.Skeleton, { className: "h-7 w-[68px] bg-form rounded-[5px]" }),
|
|
1895
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.Skeleton, { className: "h-7 w-[142px] bg-form rounded-[5px]" }),
|
|
1896
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.Skeleton, { className: "h-7 w-[102px] bg-form rounded-[5px]" })
|
|
1873
1897
|
] }),
|
|
1874
|
-
/* @__PURE__ */ (0,
|
|
1898
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.Skeleton, { className: "h-40 w-full bg-form !mt-3" })
|
|
1875
1899
|
] }) });
|
|
1876
1900
|
}
|
|
1877
1901
|
if (!seasons || seasons.years.length === 0) {
|
|
1878
|
-
return /* @__PURE__ */ (0,
|
|
1902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.Card, { className: (0, import_ui_web15.cn)("border-none", className), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.CardContent, { className: "pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "text-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-primary text-14.5 font-normal leading-normal", children: isSeasonsError ? "Couldn't load stats. Please try again." : "There are no stats for this team at this time." }) }) }) });
|
|
1879
1903
|
}
|
|
1880
|
-
const visibleStatTypes = (0,
|
|
1881
|
-
const filteredStatTypes = (0,
|
|
1904
|
+
const visibleStatTypes = (0, import_core10.getVisibleTeamStatTypes)(statTypes, sportId);
|
|
1905
|
+
const filteredStatTypes = (0, import_core10.getOrderedTeamStatTypesForCategory)(
|
|
1882
1906
|
visibleStatTypes,
|
|
1883
1907
|
sportId,
|
|
1884
1908
|
selectedStatCategory
|
|
1885
1909
|
);
|
|
1886
|
-
const showsCategoryPicker = availableStatCategories.length > 0 && (0,
|
|
1910
|
+
const showsCategoryPicker = availableStatCategories.length > 0 && (0, import_core10.showsTeamStatCategoryPicker)(sportId);
|
|
1887
1911
|
const columns = buildStatsColumns({
|
|
1888
1912
|
filteredStatTypes,
|
|
1889
1913
|
selectedStatCategory,
|
|
@@ -1893,16 +1917,16 @@ function TeamStatsTable({
|
|
|
1893
1917
|
isSmallLaptop
|
|
1894
1918
|
});
|
|
1895
1919
|
const emptyMessage = getStatsEmptyMessage(seasons, stats.length);
|
|
1896
|
-
return /* @__PURE__ */ (0,
|
|
1897
|
-
|
|
1920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1921
|
+
import_ui_web15.Card,
|
|
1898
1922
|
{
|
|
1899
|
-
className: (0,
|
|
1923
|
+
className: (0, import_ui_web15.cn)(
|
|
1900
1924
|
"border-none p-4 flex flex-col gap-3 xl:h-full xl:min-h-0 xl:flex-1 xl:overflow-hidden",
|
|
1901
1925
|
className
|
|
1902
1926
|
),
|
|
1903
1927
|
children: [
|
|
1904
|
-
/* @__PURE__ */ (0,
|
|
1905
|
-
/* @__PURE__ */ (0,
|
|
1928
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.CardHeader, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.CardTitle, { children: "Stats" }) }),
|
|
1929
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.CardContent, { className: "space-y-0 p-0 flex flex-col gap-3 xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1906
1930
|
StatsBody2,
|
|
1907
1931
|
{
|
|
1908
1932
|
seasons,
|
|
@@ -1927,8 +1951,8 @@ function TeamStatsTable({
|
|
|
1927
1951
|
}
|
|
1928
1952
|
|
|
1929
1953
|
// src/team/team-schedule-table.tsx
|
|
1930
|
-
var
|
|
1931
|
-
var
|
|
1954
|
+
var import_ui_web16 = require("@nukleus-sports/ui-web");
|
|
1955
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1932
1956
|
var SPECIAL_LOGO_LEAGUES = ["NFL", "NBA", "NHL", "MLB", "WNBA"];
|
|
1933
1957
|
var COLLEGE_LEAGUE_IDS = [2, 6, 13];
|
|
1934
1958
|
var COMPLETED_STATUS_ID = "3";
|
|
@@ -1977,12 +2001,12 @@ function showsMlbLeaders(leagueId) {
|
|
|
1977
2001
|
}
|
|
1978
2002
|
function leaderCell(leader, small = false) {
|
|
1979
2003
|
if (!leader) return "--";
|
|
1980
|
-
return /* @__PURE__ */ (0,
|
|
1981
|
-
/* @__PURE__ */ (0,
|
|
1982
|
-
/* @__PURE__ */ (0,
|
|
2004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col leading-tight", children: [
|
|
2005
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-primary font-normal truncate", children: leader.displayName }),
|
|
2006
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1983
2007
|
"span",
|
|
1984
2008
|
{
|
|
1985
|
-
className: (0,
|
|
2009
|
+
className: (0, import_ui_web16.cn)(
|
|
1986
2010
|
small ? "text-text-secondary text-11" : "text-text-primary body-text",
|
|
1987
2011
|
"truncate"
|
|
1988
2012
|
),
|
|
@@ -1999,7 +2023,7 @@ function formatScheduleDate(game) {
|
|
|
1999
2023
|
const [year, month, day] = rawDate.split("T")[0].split("-").map(Number);
|
|
2000
2024
|
return new Date(year, month - 1, day);
|
|
2001
2025
|
})();
|
|
2002
|
-
return /* @__PURE__ */ (0,
|
|
2026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-primary body-text", children: DATE_FORMAT2.format(date) });
|
|
2003
2027
|
} catch {
|
|
2004
2028
|
return "--";
|
|
2005
2029
|
}
|
|
@@ -2017,9 +2041,9 @@ function getScheduleResult(game, teamEspnId) {
|
|
|
2017
2041
|
const winLoss = tied ? "T" : own.winner === true ? "W" : "L";
|
|
2018
2042
|
const score = `${formatScore(own.score)}-${formatScore(other.score)}`;
|
|
2019
2043
|
const colorClass = winLoss === "W" ? "text-primary-color-nuk-text" : winLoss === "L" ? "text-semantic-color-status-priority-blocked-hot-copy" : "text-text-primary";
|
|
2020
|
-
return /* @__PURE__ */ (0,
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-baseline gap-1 leading-tight", children: [
|
|
2045
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: (0, import_ui_web16.cn)(colorClass, "body-text"), children: winLoss }),
|
|
2046
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-primary body-text", children: score })
|
|
2023
2047
|
] });
|
|
2024
2048
|
}
|
|
2025
2049
|
function getScheduleRecord(game, teamEspnId) {
|
|
@@ -2030,7 +2054,7 @@ function getScheduleRecord(game, teamEspnId) {
|
|
|
2030
2054
|
function getWinningGoalie(game) {
|
|
2031
2055
|
const athlete = firstCompetition(game)?.featuredAthletes?.[0]?.athlete;
|
|
2032
2056
|
if (!athlete?.lastName) return "--";
|
|
2033
|
-
return /* @__PURE__ */ (0,
|
|
2057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-col leading-tight", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-primary font-normal truncate", children: athlete.lastName }) });
|
|
2034
2058
|
}
|
|
2035
2059
|
function getHockeyTopPlayer(game) {
|
|
2036
2060
|
const competitors = firstCompetition(game)?.competitors;
|
|
@@ -2047,9 +2071,9 @@ function getMlbPitcher(game, pitcherType) {
|
|
|
2047
2071
|
const athlete = pitcher?.athlete;
|
|
2048
2072
|
if (!athlete?.lastName) return "--";
|
|
2049
2073
|
const stat = pitcherType === "savingPitcher" ? athlete.saves : athlete.record;
|
|
2050
|
-
return /* @__PURE__ */ (0,
|
|
2051
|
-
/* @__PURE__ */ (0,
|
|
2052
|
-
/* @__PURE__ */ (0,
|
|
2074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col leading-tight", children: [
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-primary font-normal truncate", children: athlete.lastName }),
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-secondary text-11 truncate", children: stat || "--" })
|
|
2053
2077
|
] });
|
|
2054
2078
|
}
|
|
2055
2079
|
function OpponentCell({
|
|
@@ -2062,15 +2086,15 @@ function OpponentCell({
|
|
|
2062
2086
|
showName
|
|
2063
2087
|
}) {
|
|
2064
2088
|
const match = findCompetitor(firstCompetition(game)?.competitors, teamEspnId);
|
|
2065
|
-
if (!match || leagueId === null || !leagueAbbreviation) return /* @__PURE__ */ (0,
|
|
2089
|
+
if (!match || leagueId === null || !leagueAbbreviation) return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: "--" });
|
|
2066
2090
|
const prefix = match.own.homeAway === "home" ? "vs" : "@";
|
|
2067
2091
|
const opponentTeam = match.other.team;
|
|
2068
2092
|
const isSpecialLeague = SPECIAL_LOGO_LEAGUES.includes(leagueAbbreviation);
|
|
2069
2093
|
const identifier = isSpecialLeague ? opponentTeam.abbreviation : opponentTeam.id;
|
|
2070
2094
|
const folder = COLLEGE_LEAGUE_IDS.includes(leagueId) ? "NCAA" : leagueAbbreviation;
|
|
2071
|
-
return /* @__PURE__ */ (0,
|
|
2072
|
-
/* @__PURE__ */ (0,
|
|
2073
|
-
/* @__PURE__ */ (0,
|
|
2095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-1 sm:gap-2 h-full overflow-hidden", children: [
|
|
2096
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-primary body-text shrink-0 sm:w-4", children: prefix }),
|
|
2097
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2074
2098
|
"img",
|
|
2075
2099
|
{
|
|
2076
2100
|
src: resolveLogoUrl(folder, identifier),
|
|
@@ -2082,7 +2106,7 @@ function OpponentCell({
|
|
|
2082
2106
|
}
|
|
2083
2107
|
}
|
|
2084
2108
|
),
|
|
2085
|
-
showName && /* @__PURE__ */ (0,
|
|
2109
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-primary-color-nuk-text body-text line-clamp-2", children: opponentTeam.displayName })
|
|
2086
2110
|
] });
|
|
2087
2111
|
}
|
|
2088
2112
|
function buildScheduleColumns({
|
|
@@ -2098,15 +2122,15 @@ function buildScheduleColumns({
|
|
|
2098
2122
|
return [
|
|
2099
2123
|
{
|
|
2100
2124
|
id: "game_date",
|
|
2101
|
-
header: () => /* @__PURE__ */ (0,
|
|
2125
|
+
header: () => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-[50px] shrink-0", children: "Date" }),
|
|
2102
2126
|
accessorFn: (row) => row.game_date,
|
|
2103
2127
|
cell: ({ row }) => formatScheduleDate(row.original),
|
|
2104
2128
|
meta: { cellSize: isSm ? "xs" : "xxs" }
|
|
2105
2129
|
},
|
|
2106
2130
|
{
|
|
2107
2131
|
id: "opponent",
|
|
2108
|
-
header: () => /* @__PURE__ */ (0,
|
|
2109
|
-
cell: ({ row }) => /* @__PURE__ */ (0,
|
|
2132
|
+
header: () => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: isSm ? "Opponent" : "Opp" }),
|
|
2133
|
+
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2110
2134
|
OpponentCell,
|
|
2111
2135
|
{
|
|
2112
2136
|
game: row.original,
|
|
@@ -2222,15 +2246,15 @@ function ScheduleBody({
|
|
|
2222
2246
|
isSmallLaptop
|
|
2223
2247
|
}) {
|
|
2224
2248
|
if (seasonsLoading) {
|
|
2225
|
-
return /* @__PURE__ */ (0,
|
|
2249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-sm text-text-primary", children: "Loading seasons..." }) });
|
|
2226
2250
|
}
|
|
2227
2251
|
if (!seasons || seasons.years.length === 0) {
|
|
2228
|
-
return /* @__PURE__ */ (0,
|
|
2252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-primary", children: isSeasonsError ? "Couldn't load seasons. Please try again." : "No seasons found" }) });
|
|
2229
2253
|
}
|
|
2230
|
-
return /* @__PURE__ */ (0,
|
|
2231
|
-
/* @__PURE__ */ (0,
|
|
2232
|
-
/* @__PURE__ */ (0,
|
|
2233
|
-
|
|
2254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-3 xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: [
|
|
2255
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SeasonSelector, { ...seasons, className: "gap-2 min-[360px]:gap-3 xl:shrink-0" }),
|
|
2256
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2257
|
+
import_ui_web16.BaseTable,
|
|
2234
2258
|
{
|
|
2235
2259
|
columns,
|
|
2236
2260
|
data: games,
|
|
@@ -2273,24 +2297,24 @@ function TeamScheduleTable({
|
|
|
2273
2297
|
isSmallLaptop
|
|
2274
2298
|
});
|
|
2275
2299
|
if (isTeamError) {
|
|
2276
|
-
return /* @__PURE__ */ (0,
|
|
2300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui_web16.Card, { className: (0, import_ui_web16.cn)("border-0", className), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui_web16.CardContent, { className: "p-4 flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-secondary", children: "Couldn't load team information. Please try again." }) }) });
|
|
2277
2301
|
}
|
|
2278
2302
|
if (leagueId === null) {
|
|
2279
|
-
return /* @__PURE__ */ (0,
|
|
2280
|
-
/* @__PURE__ */ (0,
|
|
2281
|
-
/* @__PURE__ */ (0,
|
|
2303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui_web16.Card, { className: (0, import_ui_web16.cn)("border-0", className), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_ui_web16.CardContent, { className: "p-4 flex justify-center items-center gap-2", children: [
|
|
2304
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui_web16.IconLoader, {}),
|
|
2305
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-secondary", children: "Loading team information..." })
|
|
2282
2306
|
] }) });
|
|
2283
2307
|
}
|
|
2284
|
-
return /* @__PURE__ */ (0,
|
|
2285
|
-
|
|
2308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2309
|
+
import_ui_web16.Card,
|
|
2286
2310
|
{
|
|
2287
|
-
className: (0,
|
|
2311
|
+
className: (0, import_ui_web16.cn)(
|
|
2288
2312
|
"border-none p-4 flex flex-col gap-3 xl:h-full xl:min-h-0 xl:flex-1 xl:overflow-hidden",
|
|
2289
2313
|
className
|
|
2290
2314
|
),
|
|
2291
2315
|
children: [
|
|
2292
|
-
/* @__PURE__ */ (0,
|
|
2293
|
-
/* @__PURE__ */ (0,
|
|
2316
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui_web16.CardHeader, { className: "p-0 flex flex-row items-center justify-between space-y-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui_web16.CardTitle, { children: "Schedule" }) }),
|
|
2317
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui_web16.CardContent, { className: "space-y-0 p-0 flex flex-col gap-3 xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2294
2318
|
ScheduleBody,
|
|
2295
2319
|
{
|
|
2296
2320
|
seasonsLoading,
|
|
@@ -2320,6 +2344,7 @@ function TeamScheduleTable({
|
|
|
2320
2344
|
StatRankingLeaderboardDialog,
|
|
2321
2345
|
TeamFactsContent,
|
|
2322
2346
|
TeamFactsWidget,
|
|
2347
|
+
TeamHeaderCard,
|
|
2323
2348
|
TeamInfoCard,
|
|
2324
2349
|
TeamScheduleTable,
|
|
2325
2350
|
TeamSeasonScheduleSummaryPanel,
|