@agg-build/ui 4.2.0 → 4.4.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/README.md +21 -16
- package/dist/{chunk-DNPDXL2D.mjs → chunk-64BBTXFE.mjs} +333 -102
- package/dist/{chunk-WDCH4RRS.mjs → chunk-6STRIKUA.mjs} +1 -1
- package/dist/{chunk-FTL25XKE.mjs → chunk-734VTGCV.mjs} +1 -1
- package/dist/{chunk-QW7VFURU.mjs → chunk-N7UPPT5J.mjs} +53 -3
- package/dist/{chunk-6X6Y4INU.mjs → chunk-UCU2XCV5.mjs} +2 -2
- package/dist/{chunk-GNEFI4SO.mjs → chunk-V5CRUO6S.mjs} +637 -380
- package/dist/{chunk-UDBHAZJJ.mjs → chunk-WW5QKNIM.mjs} +270 -123
- package/dist/events.js +1061 -645
- package/dist/events.mjs +6 -4
- package/dist/index.js +2923 -2251
- package/dist/index.mjs +12 -8
- package/dist/modals.js +9 -2
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +2391 -1721
- package/dist/pages.mjs +8 -6
- package/dist/primitives.js +30 -3
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +330 -99
- package/dist/trading.mjs +4 -4
- package/dist/types/events/index.d.mts +1 -0
- package/dist/types/events/index.d.ts +1 -0
- package/dist/types/events/item-details/event-list-item-details-market-selector.d.mts +4 -1
- package/dist/types/events/item-details/event-list-item-details-market-selector.d.ts +4 -1
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +25 -1
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +25 -1
- package/dist/types/events/item-details/index.d.mts +1 -1
- package/dist/types/events/item-details/index.d.ts +1 -1
- package/dist/types/events/market-details/index.d.mts +1 -1
- package/dist/types/events/market-details/index.d.ts +1 -1
- package/dist/types/events/market-details/market-details.types.d.mts +4 -0
- package/dist/types/events/market-details/market-details.types.d.ts +4 -0
- package/dist/types/events/shared/format-event-title.d.mts +9 -1
- package/dist/types/events/shared/format-event-title.d.ts +9 -1
- package/dist/types/events/shared/format-sports-event-time.d.mts +2 -0
- package/dist/types/events/shared/format-sports-event-time.d.ts +2 -0
- package/dist/types/events/shared/sports-live-score.d.mts +10 -0
- package/dist/types/events/shared/sports-live-score.d.ts +10 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +4 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +4 -0
- package/dist/types/pages/event-market/index.d.mts +1 -0
- package/dist/types/pages/event-market/index.d.ts +1 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.mts +5 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.ts +5 -0
- package/dist/types/pages/user-profile/components/open-order-row.d.mts +1 -0
- package/dist/types/pages/user-profile/components/open-order-row.d.ts +1 -0
- package/dist/types/pages/user-profile/components/positions-activity.d.mts +1 -1
- package/dist/types/pages/user-profile/components/positions-activity.d.ts +1 -1
- package/dist/types/pages/user-profile/user-profile.types.d.mts +1 -1
- package/dist/types/pages/user-profile/user-profile.types.d.ts +1 -1
- package/dist/types/trading/place-order/index.d.mts +1 -1
- package/dist/types/trading/place-order/index.d.ts +1 -1
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.mts +13 -1
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +13 -1
- package/dist/types/trading/place-order/index.place-order.execution-view.d.mts +2 -1
- package/dist/types/trading/place-order/index.place-order.execution-view.d.ts +2 -1
- package/dist/types/trading/place-order/index.place-order.types.d.mts +9 -0
- package/dist/types/trading/place-order/index.place-order.types.d.ts +9 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +6 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +6 -0
- package/package.json +3 -3
- /package/dist/{chunk-KHHFHXXD.mjs → chunk-JH4B3ZHQ.mjs} +0 -0
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
resolveUnifiedOrderBookEntries,
|
|
25
25
|
sortOutcomeSelectorOutcomes,
|
|
26
26
|
useEventTradingContext
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-6STRIKUA.mjs";
|
|
28
28
|
import {
|
|
29
29
|
AutocompleteSelect,
|
|
30
30
|
Badge,
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
CloseIcon,
|
|
34
34
|
Icon,
|
|
35
35
|
LineChart,
|
|
36
|
+
LoadingIcon,
|
|
36
37
|
MOBILE_TABS_MEDIA_QUERY,
|
|
37
38
|
MarketDetailsOderbookSkeleton,
|
|
38
39
|
Modal,
|
|
@@ -76,11 +77,12 @@ import {
|
|
|
76
77
|
sortCategoriesForNavigation,
|
|
77
78
|
sortOutcomes,
|
|
78
79
|
splitEventsByLifecycle
|
|
79
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-N7UPPT5J.mjs";
|
|
80
81
|
|
|
81
82
|
// src/events/item/index.tsx
|
|
82
83
|
import {
|
|
83
84
|
optimizedImageUrl,
|
|
85
|
+
resolveRecurringCryptoIdentity,
|
|
84
86
|
sortVenues,
|
|
85
87
|
useLabels,
|
|
86
88
|
useMidpoints,
|
|
@@ -454,13 +456,16 @@ var EventListItemContent = ({
|
|
|
454
456
|
const config = useSdkUiConfig();
|
|
455
457
|
const labels = useLabels();
|
|
456
458
|
const allVenueMarkets = useMemo(() => event.venueMarkets, [event.venueMarkets]);
|
|
459
|
+
const recurringCryptoIdentity = resolveRecurringCryptoIdentity(event);
|
|
457
460
|
const eventHeading = resolveEventHeading({
|
|
458
461
|
title: event.title,
|
|
459
462
|
categories: event.categories,
|
|
460
463
|
structureType: event.structureType,
|
|
461
464
|
gameStartTime: event.gameStartTime,
|
|
462
465
|
endDate: event.endDate,
|
|
463
|
-
venueMarkets: event.venueMarkets
|
|
466
|
+
venueMarkets: event.venueMarkets,
|
|
467
|
+
recurringCryptoWindowStart: recurringCryptoIdentity == null ? void 0 : recurringCryptoIdentity.windowStart,
|
|
468
|
+
recurringCryptoDuration: recurringCryptoIdentity == null ? void 0 : recurringCryptoIdentity.duration
|
|
464
469
|
});
|
|
465
470
|
const resolvedTitle = eventHeading.title;
|
|
466
471
|
const resolvedTimestamp = eventHeading.timestampLabel;
|
|
@@ -517,8 +522,14 @@ var EventListItemContent = ({
|
|
|
517
522
|
enabled: !shouldUseSharedMidpoints && midpointVenueMarketIds.length > 0
|
|
518
523
|
});
|
|
519
524
|
const { prices: displayMidpointsByOutcomeId, isLoading: isOutcomeMidpointsLoading } = useMidpoints(shouldUseSharedMidpoints ? [] : resolvedOutcomeMarkets);
|
|
520
|
-
const resolvedMidpointRows =
|
|
521
|
-
|
|
525
|
+
const resolvedMidpointRows = useMemo(
|
|
526
|
+
() => shouldUseSharedMidpoints ? sharedMidpointRows != null ? sharedMidpointRows : [] : fetchedMidpointRows,
|
|
527
|
+
[fetchedMidpointRows, sharedMidpointRows, shouldUseSharedMidpoints]
|
|
528
|
+
);
|
|
529
|
+
const resolvedDisplayMidpointsByOutcomeId = useMemo(
|
|
530
|
+
() => shouldUseSharedMidpoints ? midpointPrices != null ? midpointPrices : /* @__PURE__ */ new Map() : displayMidpointsByOutcomeId,
|
|
531
|
+
[displayMidpointsByOutcomeId, midpointPrices, shouldUseSharedMidpoints]
|
|
532
|
+
);
|
|
522
533
|
const isAwaitingMidpoints = midpointsLoading != null ? midpointsLoading : isOutcomeMidpointsLoading || midpointVenueMarketIds.length > 0 && isVenueMarketMidpointsLoading;
|
|
523
534
|
const displayPriceByOutcomeId = useMemo(() => {
|
|
524
535
|
const priceByOutcomeId = new Map(resolvedDisplayMidpointsByOutcomeId);
|
|
@@ -1413,16 +1424,161 @@ var mergeVenueOutcomeOrderbooks = ({
|
|
|
1413
1424
|
};
|
|
1414
1425
|
};
|
|
1415
1426
|
|
|
1416
|
-
// src/events/
|
|
1427
|
+
// src/events/shared/sports-live-score.tsx
|
|
1417
1428
|
import { useLabels as useLabels2 } from "@agg-build/hooks";
|
|
1418
|
-
import { useMemo as useMemo2 } from "react";
|
|
1419
1429
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1430
|
+
var SportsLiveScore = ({
|
|
1431
|
+
state,
|
|
1432
|
+
variant = "detail",
|
|
1433
|
+
className
|
|
1434
|
+
}) => {
|
|
1435
|
+
const labels = useLabels2();
|
|
1436
|
+
if (!state || state.participants.length !== 2) return null;
|
|
1437
|
+
const [firstParticipant, secondParticipant] = state.participants;
|
|
1438
|
+
const firstScore = firstParticipant == null ? void 0 : firstParticipant.score;
|
|
1439
|
+
const secondScore = secondParticipant == null ? void 0 : secondParticipant.score;
|
|
1440
|
+
if (firstScore == null || secondScore == null) return null;
|
|
1441
|
+
const statusLabels = {
|
|
1442
|
+
scheduled: labels.sportsLive.scheduled,
|
|
1443
|
+
live: labels.sportsLive.live,
|
|
1444
|
+
paused: labels.sportsLive.paused,
|
|
1445
|
+
finished: labels.sportsLive.finished,
|
|
1446
|
+
cancelled: labels.sportsLive.cancelled,
|
|
1447
|
+
postponed: labels.sportsLive.postponed,
|
|
1448
|
+
unknown: labels.sportsLive.unknown
|
|
1449
|
+
};
|
|
1450
|
+
const statusText = [state.period, state.clock].filter(Boolean).join(" \xB7 ") || statusLabels[state.status];
|
|
1451
|
+
const isLiveIndicatorVisible = state.status === "live" || state.status === "paused";
|
|
1452
|
+
const isCard = variant === "card";
|
|
1453
|
+
const renderParticipant = (participant) => {
|
|
1454
|
+
var _a;
|
|
1455
|
+
return /* @__PURE__ */ jsxs2(
|
|
1456
|
+
"div",
|
|
1457
|
+
{
|
|
1458
|
+
className: cn("flex min-w-0 flex-col items-center", isCard ? "gap-1.5" : "gap-3"),
|
|
1459
|
+
title: participant.name,
|
|
1460
|
+
children: [
|
|
1461
|
+
/* @__PURE__ */ jsx2(
|
|
1462
|
+
RemoteImage,
|
|
1463
|
+
{
|
|
1464
|
+
src: participant.imageUrl,
|
|
1465
|
+
alt: "",
|
|
1466
|
+
width: isCard ? 28 : 44,
|
|
1467
|
+
height: isCard ? 28 : 44,
|
|
1468
|
+
classNames: {
|
|
1469
|
+
root: cn(
|
|
1470
|
+
"shrink-0 border border-agg-separator bg-agg-secondary-hover",
|
|
1471
|
+
isCard ? "size-7 rounded-agg-md" : "size-11 rounded-agg-lg"
|
|
1472
|
+
),
|
|
1473
|
+
image: "object-contain",
|
|
1474
|
+
placeholder: "text-agg-muted-foreground"
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
),
|
|
1478
|
+
/* @__PURE__ */ jsx2(
|
|
1479
|
+
Typography,
|
|
1480
|
+
{
|
|
1481
|
+
variant: "body",
|
|
1482
|
+
className: cn(
|
|
1483
|
+
"max-w-full truncate text-center text-agg-foreground",
|
|
1484
|
+
isCard ? "text-agg-xs leading-agg-4" : "text-agg-base leading-agg-6"
|
|
1485
|
+
),
|
|
1486
|
+
children: (_a = participant.shortName) != null ? _a : participant.name
|
|
1487
|
+
}
|
|
1488
|
+
)
|
|
1489
|
+
]
|
|
1490
|
+
}
|
|
1491
|
+
);
|
|
1492
|
+
};
|
|
1493
|
+
return /* @__PURE__ */ jsxs2(
|
|
1494
|
+
"div",
|
|
1495
|
+
{
|
|
1496
|
+
role: "status",
|
|
1497
|
+
"aria-label": labels.sportsLive.scoreAria(
|
|
1498
|
+
firstParticipant.name,
|
|
1499
|
+
firstScore,
|
|
1500
|
+
secondParticipant.name,
|
|
1501
|
+
secondScore,
|
|
1502
|
+
statusText
|
|
1503
|
+
),
|
|
1504
|
+
className: cn(
|
|
1505
|
+
"agg-sports-live-score grid w-full grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center",
|
|
1506
|
+
isCard ? "gap-3 py-1" : "gap-6 md:gap-10",
|
|
1507
|
+
className
|
|
1508
|
+
),
|
|
1509
|
+
children: [
|
|
1510
|
+
renderParticipant(firstParticipant),
|
|
1511
|
+
/* @__PURE__ */ jsxs2("div", { className: cn("flex flex-col items-center", isCard ? "gap-1" : "gap-3"), children: [
|
|
1512
|
+
/* @__PURE__ */ jsxs2("div", { className: cn("flex items-center", isCard ? "gap-2" : "gap-3"), children: [
|
|
1513
|
+
/* @__PURE__ */ jsx2(
|
|
1514
|
+
Typography,
|
|
1515
|
+
{
|
|
1516
|
+
variant: "body-strong",
|
|
1517
|
+
className: cn(
|
|
1518
|
+
"font-agg-bold tabular-nums text-agg-foreground",
|
|
1519
|
+
isCard ? "text-agg-xl leading-agg-7" : "text-agg-3xl leading-agg-9"
|
|
1520
|
+
),
|
|
1521
|
+
children: firstScore
|
|
1522
|
+
}
|
|
1523
|
+
),
|
|
1524
|
+
/* @__PURE__ */ jsx2(
|
|
1525
|
+
"span",
|
|
1526
|
+
{
|
|
1527
|
+
"aria-hidden": "true",
|
|
1528
|
+
className: cn("shrink-0 bg-agg-separator", isCard ? "h-0.5 w-2" : "h-0.5 w-3")
|
|
1529
|
+
}
|
|
1530
|
+
),
|
|
1531
|
+
/* @__PURE__ */ jsx2(
|
|
1532
|
+
Typography,
|
|
1533
|
+
{
|
|
1534
|
+
variant: "body-strong",
|
|
1535
|
+
className: cn(
|
|
1536
|
+
"font-agg-bold tabular-nums text-agg-foreground",
|
|
1537
|
+
isCard ? "text-agg-xl leading-agg-7" : "text-agg-3xl leading-agg-9"
|
|
1538
|
+
),
|
|
1539
|
+
children: secondScore
|
|
1540
|
+
}
|
|
1541
|
+
)
|
|
1542
|
+
] }),
|
|
1543
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-2 text-agg-primary", children: [
|
|
1544
|
+
isLiveIndicatorVisible ? /* @__PURE__ */ jsx2(
|
|
1545
|
+
"span",
|
|
1546
|
+
{
|
|
1547
|
+
"aria-hidden": "true",
|
|
1548
|
+
className: "flex size-3.5 shrink-0 items-center justify-center rounded-agg-full bg-agg-primary/10",
|
|
1549
|
+
children: /* @__PURE__ */ jsx2("span", { className: "size-1.5 rounded-agg-full bg-agg-primary" })
|
|
1550
|
+
}
|
|
1551
|
+
) : null,
|
|
1552
|
+
/* @__PURE__ */ jsx2(
|
|
1553
|
+
Typography,
|
|
1554
|
+
{
|
|
1555
|
+
variant: "label-strong",
|
|
1556
|
+
className: cn(
|
|
1557
|
+
"max-w-full truncate uppercase text-agg-primary",
|
|
1558
|
+
isCard ? "text-agg-2xs leading-agg-4" : "text-agg-sm leading-agg-5"
|
|
1559
|
+
),
|
|
1560
|
+
children: statusText
|
|
1561
|
+
}
|
|
1562
|
+
)
|
|
1563
|
+
] })
|
|
1564
|
+
] }),
|
|
1565
|
+
renderParticipant(secondParticipant)
|
|
1566
|
+
]
|
|
1567
|
+
}
|
|
1568
|
+
);
|
|
1569
|
+
};
|
|
1570
|
+
SportsLiveScore.displayName = "SportsLiveScore";
|
|
1571
|
+
|
|
1572
|
+
// src/events/item-details/settlement-summary.tsx
|
|
1573
|
+
import { useLabels as useLabels3 } from "@agg-build/hooks";
|
|
1574
|
+
import { useMemo as useMemo2 } from "react";
|
|
1575
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1420
1576
|
var SettlementSummary = ({
|
|
1421
1577
|
settlementDiff,
|
|
1422
1578
|
settlementSectionId = SETTLEMENT_SECTION_ID,
|
|
1423
1579
|
className
|
|
1424
1580
|
}) => {
|
|
1425
|
-
const labels =
|
|
1581
|
+
const labels = useLabels3();
|
|
1426
1582
|
const settlementDifferences = useMemo2(
|
|
1427
1583
|
() => prepareSettlementDifferences(settlementDiff == null ? void 0 : settlementDiff.differences),
|
|
1428
1584
|
[settlementDiff == null ? void 0 : settlementDiff.differences]
|
|
@@ -1436,7 +1592,7 @@ var SettlementSummary = ({
|
|
|
1436
1592
|
if (!target) return;
|
|
1437
1593
|
target.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
1438
1594
|
};
|
|
1439
|
-
const actionButton = /* @__PURE__ */
|
|
1595
|
+
const actionButton = /* @__PURE__ */ jsxs3(
|
|
1440
1596
|
"button",
|
|
1441
1597
|
{
|
|
1442
1598
|
type: "button",
|
|
@@ -1449,8 +1605,8 @@ var SettlementSummary = ({
|
|
|
1449
1605
|
"aria-controls": settlementSectionId,
|
|
1450
1606
|
onClick: handleReadFullDetails,
|
|
1451
1607
|
children: [
|
|
1452
|
-
/* @__PURE__ */
|
|
1453
|
-
/* @__PURE__ */
|
|
1608
|
+
/* @__PURE__ */ jsx3("span", { children: labels.settlementSummary.readFullDetails }),
|
|
1609
|
+
/* @__PURE__ */ jsx3(
|
|
1454
1610
|
"i",
|
|
1455
1611
|
{
|
|
1456
1612
|
className: "fi fi-rr-arrow-small-down size-3.5!",
|
|
@@ -1463,7 +1619,7 @@ var SettlementSummary = ({
|
|
|
1463
1619
|
);
|
|
1464
1620
|
const visibleDifferences = settlementDifferences.slice(0, 2);
|
|
1465
1621
|
const hiddenDifferenceCount = settlementDifferences.length - visibleDifferences.length;
|
|
1466
|
-
return /* @__PURE__ */
|
|
1622
|
+
return /* @__PURE__ */ jsxs3(
|
|
1467
1623
|
"div",
|
|
1468
1624
|
{
|
|
1469
1625
|
className: cn(
|
|
@@ -1471,18 +1627,18 @@ var SettlementSummary = ({
|
|
|
1471
1627
|
className
|
|
1472
1628
|
),
|
|
1473
1629
|
children: [
|
|
1474
|
-
/* @__PURE__ */
|
|
1475
|
-
/* @__PURE__ */
|
|
1476
|
-
/* @__PURE__ */
|
|
1477
|
-
/* @__PURE__ */
|
|
1630
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex min-w-[240px] flex-1 flex-wrap items-center gap-x-5 gap-y-3", children: [
|
|
1631
|
+
/* @__PURE__ */ jsxs3("div", { className: "agg-settlement-summary-heading flex shrink-0 items-center gap-2", children: [
|
|
1632
|
+
/* @__PURE__ */ jsx3("p", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground", children: labels.settlementSummary.title }),
|
|
1633
|
+
/* @__PURE__ */ jsx3("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-agg-full bg-agg-primary text-[10px] font-agg-bold leading-[14px] text-agg-on-primary", children: settlementDifferences.length })
|
|
1478
1634
|
] }),
|
|
1479
|
-
/* @__PURE__ */
|
|
1480
|
-
visibleDifferences.map((difference) => /* @__PURE__ */
|
|
1635
|
+
/* @__PURE__ */ jsxs3("div", { className: "agg-settlement-summary-pills flex min-w-[240px] flex-1 flex-wrap items-center gap-2", children: [
|
|
1636
|
+
visibleDifferences.map((difference) => /* @__PURE__ */ jsxs3(
|
|
1481
1637
|
"span",
|
|
1482
1638
|
{
|
|
1483
1639
|
className: "flex h-6 max-w-full shrink-0 items-center gap-2 rounded-agg-full bg-agg-secondary-hover px-3 py-1 text-agg-xs font-agg-normal leading-agg-4 text-agg-foreground sm:max-w-[220px]",
|
|
1484
1640
|
children: [
|
|
1485
|
-
/* @__PURE__ */
|
|
1641
|
+
/* @__PURE__ */ jsx3(
|
|
1486
1642
|
"i",
|
|
1487
1643
|
{
|
|
1488
1644
|
className: cn(
|
|
@@ -1493,12 +1649,12 @@ var SettlementSummary = ({
|
|
|
1493
1649
|
"aria-hidden": "true"
|
|
1494
1650
|
}
|
|
1495
1651
|
),
|
|
1496
|
-
/* @__PURE__ */
|
|
1652
|
+
/* @__PURE__ */ jsx3("span", { className: "min-w-0 truncate", children: difference.title })
|
|
1497
1653
|
]
|
|
1498
1654
|
},
|
|
1499
1655
|
difference.canonicalKey
|
|
1500
1656
|
)),
|
|
1501
|
-
hiddenDifferenceCount > 0 ? /* @__PURE__ */
|
|
1657
|
+
hiddenDifferenceCount > 0 ? /* @__PURE__ */ jsxs3("span", { className: "flex h-6 shrink-0 items-center rounded-agg-full bg-agg-secondary-hover px-3 py-1 text-agg-xs font-agg-normal leading-agg-4 text-agg-foreground", children: [
|
|
1502
1658
|
"+",
|
|
1503
1659
|
hiddenDifferenceCount
|
|
1504
1660
|
] }) : null
|
|
@@ -1519,18 +1675,18 @@ import {
|
|
|
1519
1675
|
resolveEventTradingState,
|
|
1520
1676
|
resolveMarketTradingState,
|
|
1521
1677
|
useEventOrderbookData,
|
|
1522
|
-
useLabels as
|
|
1678
|
+
useLabels as useLabels6,
|
|
1523
1679
|
useLiveBestPrices,
|
|
1524
1680
|
useLiveOutcomePrices,
|
|
1525
1681
|
useMarketChart,
|
|
1526
1682
|
useRollingChartWindow,
|
|
1527
|
-
useSdkUiConfig as
|
|
1683
|
+
useSdkUiConfig as useSdkUiConfig3,
|
|
1528
1684
|
useVenueEvent as useVenueEvent2
|
|
1529
1685
|
} from "@agg-build/hooks";
|
|
1530
1686
|
import { useEffect as useEffect3, useMemo as useMemo5, useRef as useRef3, useState as useState3 } from "react";
|
|
1531
1687
|
|
|
1532
1688
|
// src/primitives/chart/chart-type-switch.tsx
|
|
1533
|
-
import { useLabels as
|
|
1689
|
+
import { useLabels as useLabels4 } from "@agg-build/hooks";
|
|
1534
1690
|
import { useMemo as useMemo3 } from "react";
|
|
1535
1691
|
|
|
1536
1692
|
// src/primitives/chart/chart-type-switch.constants.ts
|
|
@@ -1556,13 +1712,13 @@ var resolveChartTypeOptionIconName = (chartType) => {
|
|
|
1556
1712
|
};
|
|
1557
1713
|
|
|
1558
1714
|
// src/primitives/chart/chart-type-switch.tsx
|
|
1559
|
-
import { jsx as
|
|
1715
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1560
1716
|
var ChartTypeSwitch = ({
|
|
1561
1717
|
value,
|
|
1562
1718
|
onValueChange,
|
|
1563
1719
|
className
|
|
1564
1720
|
}) => {
|
|
1565
|
-
const labels =
|
|
1721
|
+
const labels = useLabels4();
|
|
1566
1722
|
const options = useMemo3(
|
|
1567
1723
|
() => CHART_TYPE_SWITCH_OPTION_KEYS.map((chartType) => ({
|
|
1568
1724
|
value: chartType,
|
|
@@ -1592,7 +1748,7 @@ var ChartTypeSwitch = ({
|
|
|
1592
1748
|
}
|
|
1593
1749
|
onValueChange(nextOption.value);
|
|
1594
1750
|
};
|
|
1595
|
-
return /* @__PURE__ */
|
|
1751
|
+
return /* @__PURE__ */ jsx4(
|
|
1596
1752
|
"div",
|
|
1597
1753
|
{
|
|
1598
1754
|
className: cn("agg-chart-type-switch inline-flex items-center gap-2", className),
|
|
@@ -1600,7 +1756,7 @@ var ChartTypeSwitch = ({
|
|
|
1600
1756
|
"aria-label": labels.common.chartTypeSwitchAria,
|
|
1601
1757
|
children: options.map((option, index) => {
|
|
1602
1758
|
const isActive = option.value === value;
|
|
1603
|
-
return /* @__PURE__ */
|
|
1759
|
+
return /* @__PURE__ */ jsx4(
|
|
1604
1760
|
"button",
|
|
1605
1761
|
{
|
|
1606
1762
|
type: "button",
|
|
@@ -1627,7 +1783,7 @@ var ChartTypeSwitch = ({
|
|
|
1627
1783
|
onKeyDown: (event) => {
|
|
1628
1784
|
handleKeyDown(event, index);
|
|
1629
1785
|
},
|
|
1630
|
-
children: /* @__PURE__ */
|
|
1786
|
+
children: /* @__PURE__ */ jsx4(Icon, { name: option.iconName, color: "currentColor", className: "h-5 w-5" })
|
|
1631
1787
|
},
|
|
1632
1788
|
option.value
|
|
1633
1789
|
);
|
|
@@ -1702,15 +1858,14 @@ var filterChartVenueOutcomesByRenderableVenues = ({
|
|
|
1702
1858
|
};
|
|
1703
1859
|
|
|
1704
1860
|
// src/events/item-details/event-list-item-details-market-selector.tsx
|
|
1705
|
-
import { useLabels as
|
|
1861
|
+
import { useLabels as useLabels5, useSdkUiConfig as useSdkUiConfig2 } from "@agg-build/hooks";
|
|
1706
1862
|
import { useEffect as useEffect2, useLayoutEffect, useMemo as useMemo4, useRef as useRef2, useState as useState2 } from "react";
|
|
1707
|
-
import { jsx as
|
|
1863
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1708
1864
|
var MARKET_PILL_MAX_ROWS = 2;
|
|
1709
1865
|
var MARKET_PILL_FALLBACK_CONTAINER_WIDTH = 640;
|
|
1710
1866
|
var MARKET_PILL_FALLBACK_GAP = 8;
|
|
1711
1867
|
var MARKET_PILL_FALLBACK_WIDTH = 72;
|
|
1712
1868
|
var MARKET_PILL_FALLBACK_MORE_WIDTH = 88;
|
|
1713
|
-
var MARKET_PILL_MORE_LABEL = "More";
|
|
1714
1869
|
var MARKET_DROPDOWN_MAX_VISIBLE_OPTIONS = 6;
|
|
1715
1870
|
var MARKET_DROPDOWN_OPTION_HEIGHT = 48;
|
|
1716
1871
|
var MARKET_DROPDOWN_MAX_HEIGHT = MARKET_DROPDOWN_MAX_VISIBLE_OPTIONS * MARKET_DROPDOWN_OPTION_HEIGHT;
|
|
@@ -1795,11 +1950,17 @@ var resolveMarketPillLayout = ({
|
|
|
1795
1950
|
var EventListItemDetailsMarketSelector = ({
|
|
1796
1951
|
className,
|
|
1797
1952
|
options,
|
|
1953
|
+
browseOptions = options,
|
|
1798
1954
|
selectedValue,
|
|
1955
|
+
liveValue,
|
|
1956
|
+
alwaysShowMore = false,
|
|
1799
1957
|
onChange
|
|
1800
1958
|
}) => {
|
|
1801
1959
|
var _a;
|
|
1802
|
-
const labels =
|
|
1960
|
+
const labels = useLabels5();
|
|
1961
|
+
const {
|
|
1962
|
+
features: { enableAnimations }
|
|
1963
|
+
} = useSdkUiConfig2();
|
|
1803
1964
|
const containerRef = useRef2(null);
|
|
1804
1965
|
const measurementContainerRef = useRef2(null);
|
|
1805
1966
|
const moreButtonRef = useRef2(null);
|
|
@@ -1820,15 +1981,22 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
1820
1981
|
});
|
|
1821
1982
|
const selectedHiddenOption = useMemo4(() => {
|
|
1822
1983
|
var _a2;
|
|
1823
|
-
return (_a2 =
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1984
|
+
return (_a2 = browseOptions.find(
|
|
1985
|
+
(option) => option.value === selectedValue && !layout.visibleItems.some((visibleOption) => visibleOption.value === option.value)
|
|
1986
|
+
)) != null ? _a2 : null;
|
|
1987
|
+
}, [browseOptions, layout.visibleItems, selectedValue]);
|
|
1988
|
+
const hasSeparateBrowseOptions = browseOptions.length > options.length;
|
|
1989
|
+
const moreButtonLabel = hasSeparateBrowseOptions ? labels.eventItemDetails.moreMarkets : (_a = selectedHiddenOption == null ? void 0 : selectedHiddenOption.label) != null ? _a : labels.eventItemDetails.moreMarkets;
|
|
1990
|
+
const isMoreButtonSelected = !alwaysShowMore && selectedHiddenOption != null;
|
|
1991
|
+
const hasMoreButton = alwaysShowMore || layout.hiddenItems.length > 0 || hasSeparateBrowseOptions;
|
|
1992
|
+
const displayedOptions = alwaysShowMore ? options : layout.visibleItems;
|
|
1827
1993
|
const filteredOptions = useMemo4(() => {
|
|
1828
1994
|
const normalizedSearchValue = searchValue.trim().toLowerCase();
|
|
1829
|
-
if (!normalizedSearchValue) return
|
|
1830
|
-
return
|
|
1831
|
-
|
|
1995
|
+
if (!normalizedSearchValue) return browseOptions;
|
|
1996
|
+
return browseOptions.filter(
|
|
1997
|
+
(option) => option.label.toLowerCase().includes(normalizedSearchValue)
|
|
1998
|
+
);
|
|
1999
|
+
}, [browseOptions, searchValue]);
|
|
1832
2000
|
const lastMeasuredKeyRef = useRef2(null);
|
|
1833
2001
|
const measureFrameRef = useRef2(null);
|
|
1834
2002
|
useLayoutEffect(() => {
|
|
@@ -1944,7 +2112,7 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
1944
2112
|
};
|
|
1945
2113
|
}, [isDropdownOpen]);
|
|
1946
2114
|
useLayoutEffect(() => {
|
|
1947
|
-
if (!isDropdownOpen || isMobileViewport) return;
|
|
2115
|
+
if (!isDropdownOpen || isMobileViewport && !alwaysShowMore) return;
|
|
1948
2116
|
const updateDropdownPosition = () => {
|
|
1949
2117
|
const containerElement = containerRef.current;
|
|
1950
2118
|
const moreButtonElement = moreButtonRef.current;
|
|
@@ -1978,7 +2146,7 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
1978
2146
|
return () => {
|
|
1979
2147
|
resizeObserver.disconnect();
|
|
1980
2148
|
};
|
|
1981
|
-
}, [isDropdownOpen, isMobileViewport, moreButtonLabel]);
|
|
2149
|
+
}, [alwaysShowMore, isDropdownOpen, isMobileViewport, moreButtonLabel]);
|
|
1982
2150
|
useEffect2(() => {
|
|
1983
2151
|
if (!isDropdownOpen) return;
|
|
1984
2152
|
const handlePointerDown = (event) => {
|
|
@@ -2007,11 +2175,11 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2007
2175
|
onChange(marketId);
|
|
2008
2176
|
setIsDropdownOpen(false);
|
|
2009
2177
|
};
|
|
2010
|
-
if (isMobileViewport) {
|
|
2011
|
-
return /* @__PURE__ */
|
|
2178
|
+
if (isMobileViewport && !alwaysShowMore) {
|
|
2179
|
+
return /* @__PURE__ */ jsx5(
|
|
2012
2180
|
AutocompleteSelect,
|
|
2013
2181
|
{
|
|
2014
|
-
options,
|
|
2182
|
+
options: browseOptions,
|
|
2015
2183
|
value: selectedValue,
|
|
2016
2184
|
onChange,
|
|
2017
2185
|
placeholder: labels.eventItemDetails.marketSelectPlaceholder,
|
|
@@ -2022,15 +2190,17 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2022
2190
|
}
|
|
2023
2191
|
);
|
|
2024
2192
|
}
|
|
2025
|
-
return /* @__PURE__ */
|
|
2026
|
-
/* @__PURE__ */
|
|
2027
|
-
|
|
2193
|
+
return /* @__PURE__ */ jsxs4("div", { ref: containerRef, className: cn("agg-market-select relative w-full", className), children: [
|
|
2194
|
+
/* @__PURE__ */ jsxs4("div", { className: "agg-market-pill-list flex flex-wrap gap-2", children: [
|
|
2195
|
+
displayedOptions.map((option) => {
|
|
2028
2196
|
const isSelected = option.value === selectedValue;
|
|
2029
|
-
|
|
2197
|
+
const isLive = option.value === liveValue;
|
|
2198
|
+
return /* @__PURE__ */ jsxs4(
|
|
2030
2199
|
"button",
|
|
2031
2200
|
{
|
|
2032
2201
|
type: "button",
|
|
2033
2202
|
"aria-pressed": isSelected,
|
|
2203
|
+
"aria-label": isLive ? `${option.label}, ${labels.eventItemDetails.liveMarket}` : option.label,
|
|
2034
2204
|
className: cn(
|
|
2035
2205
|
"agg-market-pill inline-flex min-h-8 items-center justify-center rounded-agg-full border px-4 py-1.5 text-left text-agg-sm leading-agg-5 text-agg-foreground transition-colors",
|
|
2036
2206
|
"cursor-pointer hover:bg-agg-tertiary!",
|
|
@@ -2042,12 +2212,28 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2042
2212
|
eventToHandle.stopPropagation();
|
|
2043
2213
|
handleSelectMarket(option.value);
|
|
2044
2214
|
},
|
|
2045
|
-
children:
|
|
2215
|
+
children: [
|
|
2216
|
+
isLive ? /* @__PURE__ */ jsx5(
|
|
2217
|
+
"span",
|
|
2218
|
+
{
|
|
2219
|
+
"aria-hidden": "true",
|
|
2220
|
+
className: cn(
|
|
2221
|
+
"mr-2 size-1.5 shrink-0 rounded-full bg-agg-primary ring-4 ring-agg-primary/20",
|
|
2222
|
+
enableAnimations ? "animate-pulse motion-reduce:animate-none" : null
|
|
2223
|
+
)
|
|
2224
|
+
}
|
|
2225
|
+
) : null,
|
|
2226
|
+
/* @__PURE__ */ jsx5("span", { className: "truncate", children: option.label }),
|
|
2227
|
+
isLive ? /* @__PURE__ */ jsxs4("span", { className: "sr-only", children: [
|
|
2228
|
+
" ",
|
|
2229
|
+
labels.eventItemDetails.liveMarket
|
|
2230
|
+
] }) : null
|
|
2231
|
+
]
|
|
2046
2232
|
},
|
|
2047
2233
|
option.value
|
|
2048
2234
|
);
|
|
2049
2235
|
}),
|
|
2050
|
-
|
|
2236
|
+
hasMoreButton ? /* @__PURE__ */ jsxs4(
|
|
2051
2237
|
"button",
|
|
2052
2238
|
{
|
|
2053
2239
|
ref: moreButtonRef,
|
|
@@ -2068,8 +2254,8 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2068
2254
|
setIsDropdownOpen((previousValue) => !previousValue);
|
|
2069
2255
|
},
|
|
2070
2256
|
children: [
|
|
2071
|
-
/* @__PURE__ */
|
|
2072
|
-
/* @__PURE__ */
|
|
2257
|
+
/* @__PURE__ */ jsx5("span", { className: "truncate", children: moreButtonLabel }),
|
|
2258
|
+
/* @__PURE__ */ jsx5(
|
|
2073
2259
|
Icon,
|
|
2074
2260
|
{
|
|
2075
2261
|
name: isDropdownOpen ? "chevron-up" : "chevron-down",
|
|
@@ -2083,7 +2269,7 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2083
2269
|
}
|
|
2084
2270
|
) : null
|
|
2085
2271
|
] }),
|
|
2086
|
-
isDropdownOpen ? /* @__PURE__ */
|
|
2272
|
+
isDropdownOpen ? /* @__PURE__ */ jsxs4(
|
|
2087
2273
|
"div",
|
|
2088
2274
|
{
|
|
2089
2275
|
id: "agg-event-details-market-dropdown",
|
|
@@ -2100,9 +2286,9 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2100
2286
|
eventToHandle.stopPropagation();
|
|
2101
2287
|
},
|
|
2102
2288
|
children: [
|
|
2103
|
-
/* @__PURE__ */
|
|
2104
|
-
/* @__PURE__ */
|
|
2105
|
-
/* @__PURE__ */
|
|
2289
|
+
/* @__PURE__ */ jsxs4("div", { className: "border-b border-agg-separator", children: [
|
|
2290
|
+
/* @__PURE__ */ jsx5("label", { className: "sr-only", htmlFor: "agg-event-details-market-search", children: labels.eventItemDetails.marketSelectSearchPlaceholder }),
|
|
2291
|
+
/* @__PURE__ */ jsx5(
|
|
2106
2292
|
"input",
|
|
2107
2293
|
{
|
|
2108
2294
|
ref: dropdownInputRef,
|
|
@@ -2124,7 +2310,7 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2124
2310
|
}
|
|
2125
2311
|
)
|
|
2126
2312
|
] }),
|
|
2127
|
-
/* @__PURE__ */
|
|
2313
|
+
/* @__PURE__ */ jsx5(
|
|
2128
2314
|
"div",
|
|
2129
2315
|
{
|
|
2130
2316
|
role: "listbox",
|
|
@@ -2133,7 +2319,7 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2133
2319
|
style: { maxHeight: `${MARKET_DROPDOWN_MAX_HEIGHT}px` },
|
|
2134
2320
|
children: filteredOptions.length > 0 ? filteredOptions.map((option) => {
|
|
2135
2321
|
const isSelected = option.value === selectedValue;
|
|
2136
|
-
return /* @__PURE__ */
|
|
2322
|
+
return /* @__PURE__ */ jsxs4(
|
|
2137
2323
|
"button",
|
|
2138
2324
|
{
|
|
2139
2325
|
type: "button",
|
|
@@ -2152,25 +2338,25 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2152
2338
|
handleSelectMarket(option.value);
|
|
2153
2339
|
},
|
|
2154
2340
|
children: [
|
|
2155
|
-
isSelected ? /* @__PURE__ */
|
|
2341
|
+
isSelected ? /* @__PURE__ */ jsx5(
|
|
2156
2342
|
"span",
|
|
2157
2343
|
{
|
|
2158
2344
|
"aria-hidden": "true",
|
|
2159
2345
|
className: "absolute bottom-2 left-0 top-2 w-1 bg-agg-primary"
|
|
2160
2346
|
}
|
|
2161
2347
|
) : null,
|
|
2162
|
-
/* @__PURE__ */
|
|
2348
|
+
/* @__PURE__ */ jsx5("span", { className: "truncate", children: option.label })
|
|
2163
2349
|
]
|
|
2164
2350
|
},
|
|
2165
2351
|
option.value
|
|
2166
2352
|
);
|
|
2167
|
-
}) : /* @__PURE__ */
|
|
2353
|
+
}) : /* @__PURE__ */ jsx5("div", { className: "px-5 py-4 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: labels.eventItemDetails.marketSelectEmpty })
|
|
2168
2354
|
}
|
|
2169
2355
|
)
|
|
2170
2356
|
]
|
|
2171
2357
|
}
|
|
2172
2358
|
) : null,
|
|
2173
|
-
/* @__PURE__ */
|
|
2359
|
+
/* @__PURE__ */ jsxs4(
|
|
2174
2360
|
"div",
|
|
2175
2361
|
{
|
|
2176
2362
|
ref: measurementContainerRef,
|
|
@@ -2179,7 +2365,7 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2179
2365
|
children: [
|
|
2180
2366
|
options.map((option) => {
|
|
2181
2367
|
const isSelected = option.value === selectedValue;
|
|
2182
|
-
return /* @__PURE__ */
|
|
2368
|
+
return /* @__PURE__ */ jsx5(
|
|
2183
2369
|
"button",
|
|
2184
2370
|
{
|
|
2185
2371
|
ref: (element) => {
|
|
@@ -2191,12 +2377,12 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2191
2377
|
"inline-flex min-h-8 items-center justify-center rounded-agg-full border px-4 py-1.5 text-agg-sm leading-agg-5",
|
|
2192
2378
|
isSelected ? "border-agg-primary bg-agg-secondary font-agg-bold" : "border-transparent bg-agg-secondary-hover font-agg-normal"
|
|
2193
2379
|
),
|
|
2194
|
-
children: /* @__PURE__ */
|
|
2380
|
+
children: /* @__PURE__ */ jsx5("span", { className: "truncate", children: option.label })
|
|
2195
2381
|
},
|
|
2196
2382
|
option.value
|
|
2197
2383
|
);
|
|
2198
2384
|
}),
|
|
2199
|
-
/* @__PURE__ */
|
|
2385
|
+
/* @__PURE__ */ jsxs4(
|
|
2200
2386
|
"button",
|
|
2201
2387
|
{
|
|
2202
2388
|
ref: moreButtonMeasureRef,
|
|
@@ -2204,8 +2390,8 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2204
2390
|
tabIndex: -1,
|
|
2205
2391
|
className: "inline-flex min-h-8 items-center justify-center gap-1.5 rounded-agg-full border border-agg-primary bg-agg-secondary px-4 py-1.5 text-agg-sm leading-agg-5 text-agg-foreground",
|
|
2206
2392
|
children: [
|
|
2207
|
-
/* @__PURE__ */
|
|
2208
|
-
/* @__PURE__ */
|
|
2393
|
+
/* @__PURE__ */ jsx5("span", { children: moreButtonLabel }),
|
|
2394
|
+
/* @__PURE__ */ jsx5(
|
|
2209
2395
|
Icon,
|
|
2210
2396
|
{
|
|
2211
2397
|
name: "chevron-down",
|
|
@@ -2225,7 +2411,7 @@ var EventListItemDetailsMarketSelector = ({
|
|
|
2225
2411
|
};
|
|
2226
2412
|
|
|
2227
2413
|
// src/events/item-details/index.tsx
|
|
2228
|
-
import { jsx as
|
|
2414
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2229
2415
|
var resolveEventDetailsSyncKey = (event) => {
|
|
2230
2416
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2231
2417
|
const parts = [
|
|
@@ -2270,8 +2456,8 @@ var EventListItemDetailsLoadingState = ({
|
|
|
2270
2456
|
classNames,
|
|
2271
2457
|
ariaLabel
|
|
2272
2458
|
}) => {
|
|
2273
|
-
const labels =
|
|
2274
|
-
return /* @__PURE__ */
|
|
2459
|
+
const labels = useLabels6();
|
|
2460
|
+
return /* @__PURE__ */ jsx6(
|
|
2275
2461
|
Skeleton,
|
|
2276
2462
|
{
|
|
2277
2463
|
view: "event-list-item-details",
|
|
@@ -2284,16 +2470,16 @@ var EventListItemDetailsUnavailableState = ({
|
|
|
2284
2470
|
classNames,
|
|
2285
2471
|
ariaLabel
|
|
2286
2472
|
}) => {
|
|
2287
|
-
const labels =
|
|
2288
|
-
return /* @__PURE__ */
|
|
2473
|
+
const labels = useLabels6();
|
|
2474
|
+
return /* @__PURE__ */ jsx6(
|
|
2289
2475
|
Card,
|
|
2290
2476
|
{
|
|
2291
2477
|
className: cn(detailsBaseCardClassName, classNames == null ? void 0 : classNames.root),
|
|
2292
2478
|
role: "status",
|
|
2293
2479
|
"aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.unavailableAria,
|
|
2294
|
-
children: /* @__PURE__ */
|
|
2295
|
-
/* @__PURE__ */
|
|
2296
|
-
/* @__PURE__ */
|
|
2480
|
+
children: /* @__PURE__ */ jsxs5("div", { className: cn("flex flex-col gap-1", classNames == null ? void 0 : classNames.header), children: [
|
|
2481
|
+
/* @__PURE__ */ jsx6(Typography, { variant: "body-large-strong", className: cn("truncate", classNames == null ? void 0 : classNames.title), children: labels.eventItemDetails.unavailableTitle }),
|
|
2482
|
+
/* @__PURE__ */ jsx6(Typography, { variant: "body", className: "text-agg-muted-foreground", children: labels.eventItemDetails.unavailableDescription })
|
|
2297
2483
|
] })
|
|
2298
2484
|
}
|
|
2299
2485
|
);
|
|
@@ -2302,13 +2488,13 @@ var EventListItemDetailsNotFoundState = ({
|
|
|
2302
2488
|
classNames: _classNames,
|
|
2303
2489
|
ariaLabel: _ariaLabel
|
|
2304
2490
|
}) => {
|
|
2305
|
-
const labels =
|
|
2306
|
-
return /* @__PURE__ */
|
|
2491
|
+
const labels = useLabels6();
|
|
2492
|
+
return /* @__PURE__ */ jsx6(
|
|
2307
2493
|
StateMessage,
|
|
2308
2494
|
{
|
|
2309
2495
|
title: labels.eventItemDetails.notFoundTitle,
|
|
2310
2496
|
description: labels.eventItemDetails.notFoundDescription,
|
|
2311
|
-
icon: /* @__PURE__ */
|
|
2497
|
+
icon: /* @__PURE__ */ jsx6(SearchEmptyIcon, {}),
|
|
2312
2498
|
classNames: { root: "min-h-[280px] md:min-h-[320px]" }
|
|
2313
2499
|
}
|
|
2314
2500
|
);
|
|
@@ -2333,7 +2519,7 @@ var EventListItemDetailsGraphSection = ({
|
|
|
2333
2519
|
onRangeOverrideChange
|
|
2334
2520
|
}) => {
|
|
2335
2521
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
2336
|
-
const labels =
|
|
2522
|
+
const labels = useLabels6();
|
|
2337
2523
|
const tradingContext = useEventTradingContext();
|
|
2338
2524
|
const [selectedGraphVenue, setSelectedGraphVenue] = useState3(null);
|
|
2339
2525
|
const [chartOutcomeLabel, setChartOutcomeLabel] = useState3(
|
|
@@ -2351,7 +2537,7 @@ var EventListItemDetailsGraphSection = ({
|
|
|
2351
2537
|
chart: { selectedChartTimeRange },
|
|
2352
2538
|
formatting: { formatPercent, formatPrice },
|
|
2353
2539
|
general: { theme }
|
|
2354
|
-
} =
|
|
2540
|
+
} = useSdkUiConfig3();
|
|
2355
2541
|
const isDarkTheme = theme === "dark";
|
|
2356
2542
|
const effectiveChartTimeRange = rangeOverride != null ? rangeOverride : selectedChartTimeRange;
|
|
2357
2543
|
const rollingWindow = useRollingChartWindow({ range: effectiveChartTimeRange });
|
|
@@ -2502,18 +2688,18 @@ var EventListItemDetailsGraphSection = ({
|
|
|
2502
2688
|
void refetchScopedMarketChart();
|
|
2503
2689
|
};
|
|
2504
2690
|
if (scopedMarketChartError) {
|
|
2505
|
-
return /* @__PURE__ */
|
|
2691
|
+
return /* @__PURE__ */ jsx6("div", { className: cn("agg-chart-region w-full", classNames == null ? void 0 : classNames.chart), children: /* @__PURE__ */ jsx6(
|
|
2506
2692
|
StateMessage,
|
|
2507
2693
|
{
|
|
2508
2694
|
title: labels.eventItemDetails.chartUnavailableTitle,
|
|
2509
2695
|
description: labels.eventItemDetails.chartUnavailableDescription,
|
|
2510
|
-
icon: /* @__PURE__ */
|
|
2696
|
+
icon: /* @__PURE__ */ jsx6(WarningIcon, {}),
|
|
2511
2697
|
onAction: handleRetryMarketChart,
|
|
2512
2698
|
classNames: { root: "min-h-[300px] px-5 py-10 md:px-10" }
|
|
2513
2699
|
}
|
|
2514
2700
|
) });
|
|
2515
2701
|
}
|
|
2516
|
-
return /* @__PURE__ */
|
|
2702
|
+
return /* @__PURE__ */ jsx6(
|
|
2517
2703
|
LineChart,
|
|
2518
2704
|
{
|
|
2519
2705
|
classNames: { root: cn("agg-chart-region", classNames == null ? void 0 : classNames.chart) },
|
|
@@ -2526,7 +2712,7 @@ var EventListItemDetailsGraphSection = ({
|
|
|
2526
2712
|
showSeriesControls: selectedMarketOutcomes.length > 0,
|
|
2527
2713
|
renderSeriesControls: ({ handleSeriesChange }) => {
|
|
2528
2714
|
var _a2, _b2, _c2, _d2;
|
|
2529
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ jsxs5(
|
|
2530
2716
|
"div",
|
|
2531
2717
|
{
|
|
2532
2718
|
className: cn(
|
|
@@ -2537,7 +2723,7 @@ var EventListItemDetailsGraphSection = ({
|
|
|
2537
2723
|
classNames == null ? void 0 : classNames.summary
|
|
2538
2724
|
),
|
|
2539
2725
|
children: [
|
|
2540
|
-
/* @__PURE__ */
|
|
2726
|
+
/* @__PURE__ */ jsx6(
|
|
2541
2727
|
"div",
|
|
2542
2728
|
{
|
|
2543
2729
|
className: cn(
|
|
@@ -2551,7 +2737,7 @@ var EventListItemDetailsGraphSection = ({
|
|
|
2551
2737
|
const text = formatMarketProbabilityPercent(percentage, formatPercent);
|
|
2552
2738
|
const seriesId = `${item.venue}-chart`;
|
|
2553
2739
|
const isActiveVenue = activeGraphVenue === item.venue;
|
|
2554
|
-
return /* @__PURE__ */
|
|
2740
|
+
return /* @__PURE__ */ jsx6(
|
|
2555
2741
|
"button",
|
|
2556
2742
|
{
|
|
2557
2743
|
type: "button",
|
|
@@ -2570,12 +2756,12 @@ var EventListItemDetailsGraphSection = ({
|
|
|
2570
2756
|
setSelectedGraphVenue(nextSelectedGraphVenue);
|
|
2571
2757
|
handleSeriesChange(seriesId);
|
|
2572
2758
|
},
|
|
2573
|
-
children: /* @__PURE__ */
|
|
2759
|
+
children: /* @__PURE__ */ jsx6(
|
|
2574
2760
|
Badge,
|
|
2575
2761
|
{
|
|
2576
2762
|
text,
|
|
2577
2763
|
size: "large",
|
|
2578
|
-
prefix: /* @__PURE__ */
|
|
2764
|
+
prefix: /* @__PURE__ */ jsx6(
|
|
2579
2765
|
VenueLogo,
|
|
2580
2766
|
{
|
|
2581
2767
|
venue: item.market.venue,
|
|
@@ -2597,7 +2783,7 @@ var EventListItemDetailsGraphSection = ({
|
|
|
2597
2783
|
})
|
|
2598
2784
|
}
|
|
2599
2785
|
),
|
|
2600
|
-
/* @__PURE__ */
|
|
2786
|
+
/* @__PURE__ */ jsx6(
|
|
2601
2787
|
SwitchButton,
|
|
2602
2788
|
{
|
|
2603
2789
|
ariaLabel: labels.eventItemDetails.outcomeSelectorAria,
|
|
@@ -2648,15 +2834,17 @@ var EventListItemDetailsContent = ({
|
|
|
2648
2834
|
ariaLabel,
|
|
2649
2835
|
defaultTimeRange,
|
|
2650
2836
|
onClick,
|
|
2651
|
-
midpointsResult
|
|
2837
|
+
midpointsResult,
|
|
2838
|
+
recurringMarkets,
|
|
2839
|
+
sportsLiveState
|
|
2652
2840
|
}) => {
|
|
2653
|
-
var _a, _b, _c, _d;
|
|
2841
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2654
2842
|
const [selectedChartType, setSelectedChartType] = useState3("line");
|
|
2655
2843
|
const lastAppliedEventSyncKeyRef = useRef3(null);
|
|
2656
2844
|
const lastAppliedDefaultRef = useRef3(null);
|
|
2657
2845
|
const [chartRangeOverride, setChartRangeOverride] = useState3(null);
|
|
2658
|
-
const config =
|
|
2659
|
-
const labels =
|
|
2846
|
+
const config = useSdkUiConfig3();
|
|
2847
|
+
const labels = useLabels6();
|
|
2660
2848
|
const tradingContext = useEventTradingContext();
|
|
2661
2849
|
const eventSyncKey = useMemo5(() => resolveEventDetailsSyncKey(event), [event]);
|
|
2662
2850
|
const resolvedEventTradingState = useMemo5(() => {
|
|
@@ -2771,7 +2959,9 @@ var EventListItemDetailsContent = ({
|
|
|
2771
2959
|
structureType: event.structureType,
|
|
2772
2960
|
gameStartTime: event.gameStartTime,
|
|
2773
2961
|
endDate: event.endDate,
|
|
2774
|
-
venueMarkets: event.venueMarkets
|
|
2962
|
+
venueMarkets: event.venueMarkets,
|
|
2963
|
+
recurringCryptoWindowStart: recurringMarkets ? null : void 0,
|
|
2964
|
+
recurringCryptoDuration: recurringMarkets == null ? void 0 : recurringMarkets.duration
|
|
2775
2965
|
});
|
|
2776
2966
|
}, [
|
|
2777
2967
|
event.categories,
|
|
@@ -2779,18 +2969,19 @@ var EventListItemDetailsContent = ({
|
|
|
2779
2969
|
event.gameStartTime,
|
|
2780
2970
|
event.structureType,
|
|
2781
2971
|
event.title,
|
|
2782
|
-
event.venueMarkets
|
|
2972
|
+
event.venueMarkets,
|
|
2973
|
+
recurringMarkets
|
|
2783
2974
|
]);
|
|
2784
|
-
return /* @__PURE__ */
|
|
2975
|
+
return /* @__PURE__ */ jsxs5(
|
|
2785
2976
|
Card,
|
|
2786
2977
|
{
|
|
2787
2978
|
className: cn("group/agg-event-details", detailsBaseCardClassName, classNames == null ? void 0 : classNames.root),
|
|
2788
|
-
"aria-label": ariaLabel != null ? ariaLabel : [resolvedTitle.title, resolvedTitle.timestampLabel].filter(Boolean).join(" "),
|
|
2979
|
+
"aria-label": ariaLabel != null ? ariaLabel : [resolvedTitle.title, (_c = recurringMarkets == null ? void 0 : recurringMarkets.windowLabel) != null ? _c : resolvedTitle.timestampLabel].filter(Boolean).join(" "),
|
|
2789
2980
|
onClick: () => {
|
|
2790
2981
|
onClick == null ? void 0 : onClick(event);
|
|
2791
2982
|
},
|
|
2792
2983
|
children: [
|
|
2793
|
-
/* @__PURE__ */
|
|
2984
|
+
/* @__PURE__ */ jsxs5(
|
|
2794
2985
|
"div",
|
|
2795
2986
|
{
|
|
2796
2987
|
className: cn(
|
|
@@ -2801,7 +2992,7 @@ var EventListItemDetailsContent = ({
|
|
|
2801
2992
|
classNames == null ? void 0 : classNames.header
|
|
2802
2993
|
),
|
|
2803
2994
|
children: [
|
|
2804
|
-
/* @__PURE__ */
|
|
2995
|
+
/* @__PURE__ */ jsx6(
|
|
2805
2996
|
RemoteImage,
|
|
2806
2997
|
{
|
|
2807
2998
|
src: optimizedImageUrl2(event.image, 60),
|
|
@@ -2809,36 +3000,101 @@ var EventListItemDetailsContent = ({
|
|
|
2809
3000
|
className: "agg-event-image size-10 rounded-agg-lg object-cover md:size-[60px]"
|
|
2810
3001
|
}
|
|
2811
3002
|
),
|
|
2812
|
-
/* @__PURE__ */
|
|
2813
|
-
/* @__PURE__ */
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
3003
|
+
/* @__PURE__ */ jsxs5("div", { className: cn("flex min-w-0 flex-1 flex-col", recurringMarkets ? "gap-3" : "gap-2"), children: [
|
|
3004
|
+
/* @__PURE__ */ jsxs5(
|
|
3005
|
+
"div",
|
|
3006
|
+
{
|
|
3007
|
+
className: cn(
|
|
3008
|
+
"min-w-0",
|
|
3009
|
+
recurringMarkets ? "flex flex-col gap-1 md:flex-row md:items-baseline md:justify-between" : null
|
|
3010
|
+
),
|
|
3011
|
+
children: [
|
|
3012
|
+
/* @__PURE__ */ jsx6(
|
|
3013
|
+
Typography,
|
|
3014
|
+
{
|
|
3015
|
+
variant: "body-strong",
|
|
3016
|
+
className: cn(
|
|
3017
|
+
"agg-event-title",
|
|
3018
|
+
"min-w-0 text-agg-base font-agg-bold! leading-agg-6 md:text-agg-2xl md:leading-agg-8",
|
|
3019
|
+
resolvedTitle.timestampLabel && !recurringMarkets ? "truncate whitespace-nowrap" : "truncate text-wrap wrap-break-word line-clamp-2",
|
|
3020
|
+
classNames == null ? void 0 : classNames.title
|
|
3021
|
+
),
|
|
3022
|
+
children: resolvedTitle.title
|
|
3023
|
+
}
|
|
2823
3024
|
),
|
|
2824
|
-
|
|
3025
|
+
(recurringMarkets == null ? void 0 : recurringMarkets.windowLabel) ? /* @__PURE__ */ jsx6(
|
|
3026
|
+
Typography,
|
|
3027
|
+
{
|
|
3028
|
+
variant: "body",
|
|
3029
|
+
className: "agg-event-timestamp min-w-0 shrink-0 truncate text-agg-sm leading-agg-5 text-agg-muted-foreground md:text-agg-base md:leading-agg-6",
|
|
3030
|
+
children: recurringMarkets.windowLabel
|
|
3031
|
+
}
|
|
3032
|
+
) : resolvedTitle.timestampLabel ? /* @__PURE__ */ jsx6(
|
|
3033
|
+
Typography,
|
|
3034
|
+
{
|
|
3035
|
+
variant: "body",
|
|
3036
|
+
className: "agg-event-timestamp mt-0.5 min-w-0 truncate text-agg-sm leading-agg-5 text-agg-muted-foreground",
|
|
3037
|
+
children: resolvedTitle.timestampLabel
|
|
3038
|
+
}
|
|
3039
|
+
) : null
|
|
3040
|
+
]
|
|
3041
|
+
}
|
|
3042
|
+
),
|
|
3043
|
+
recurringMarkets ? /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
|
|
3044
|
+
/* @__PURE__ */ jsx6(
|
|
3045
|
+
EventListItemDetailsMarketSelector,
|
|
3046
|
+
{
|
|
3047
|
+
className: cn("min-w-0 flex-1", classNames == null ? void 0 : classNames.headerPills),
|
|
3048
|
+
options: recurringMarkets.visibleOptions,
|
|
3049
|
+
browseOptions: recurringMarkets.browseOptions,
|
|
3050
|
+
selectedValue: recurringMarkets.selectedValue,
|
|
3051
|
+
liveValue: recurringMarkets.liveValue,
|
|
3052
|
+
alwaysShowMore: true,
|
|
3053
|
+
onChange: recurringMarkets.onSelect
|
|
2825
3054
|
}
|
|
2826
3055
|
),
|
|
2827
|
-
|
|
2828
|
-
|
|
3056
|
+
recurringMarkets.isResolving ? /* @__PURE__ */ jsx6(
|
|
3057
|
+
Button,
|
|
3058
|
+
{
|
|
3059
|
+
variant: "secondary",
|
|
3060
|
+
size: "small",
|
|
3061
|
+
disabled: !recurringMarkets.canGoToLive,
|
|
3062
|
+
"aria-label": recurringMarkets.canGoToLive ? labels.eventMarketPage.goToLive : labels.eventMarketPage.liveMarketUnavailable,
|
|
3063
|
+
className: "h-8 shrink-0",
|
|
3064
|
+
onClick: (eventToHandle) => {
|
|
3065
|
+
eventToHandle.preventDefault();
|
|
3066
|
+
eventToHandle.stopPropagation();
|
|
3067
|
+
recurringMarkets.onGoToLive();
|
|
3068
|
+
},
|
|
3069
|
+
children: labels.eventMarketPage.goToLive
|
|
3070
|
+
}
|
|
3071
|
+
) : recurringMarkets.countdownLabel ? /* @__PURE__ */ jsxs5(
|
|
3072
|
+
"div",
|
|
2829
3073
|
{
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
3074
|
+
role: "timer",
|
|
3075
|
+
"aria-live": "off",
|
|
3076
|
+
"aria-label": (_d = recurringMarkets.countdownAriaLabel) != null ? _d : void 0,
|
|
3077
|
+
className: "flex shrink-0 items-center gap-1.5 text-agg-foreground",
|
|
3078
|
+
children: [
|
|
3079
|
+
/* @__PURE__ */ jsx6(
|
|
3080
|
+
Icon,
|
|
3081
|
+
{
|
|
3082
|
+
name: "hourglass-start",
|
|
3083
|
+
size: "small",
|
|
3084
|
+
className: "size-3.5",
|
|
3085
|
+
"aria-hidden": "true"
|
|
3086
|
+
}
|
|
3087
|
+
),
|
|
3088
|
+
/* @__PURE__ */ jsx6(Typography, { variant: "body-strong", className: "text-agg-base leading-agg-6", children: recurringMarkets.countdownLabel })
|
|
3089
|
+
]
|
|
2833
3090
|
}
|
|
2834
3091
|
) : null
|
|
2835
|
-
] })
|
|
2836
|
-
venueMarkets.length > 1 ? /* @__PURE__ */ jsx5(
|
|
3092
|
+
] }) : venueMarkets.length > 1 ? /* @__PURE__ */ jsx6(
|
|
2837
3093
|
EventListItemDetailsMarketSelector,
|
|
2838
3094
|
{
|
|
2839
3095
|
className: classNames == null ? void 0 : classNames.headerPills,
|
|
2840
3096
|
options: marketOptions,
|
|
2841
|
-
selectedValue: (
|
|
3097
|
+
selectedValue: (_e = scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id) != null ? _e : "",
|
|
2842
3098
|
onChange: (marketId) => {
|
|
2843
3099
|
tradingContext == null ? void 0 : tradingContext.selectMarket(marketId);
|
|
2844
3100
|
}
|
|
@@ -2848,7 +3104,8 @@ var EventListItemDetailsContent = ({
|
|
|
2848
3104
|
]
|
|
2849
3105
|
}
|
|
2850
3106
|
),
|
|
2851
|
-
|
|
3107
|
+
/* @__PURE__ */ jsx6(SportsLiveScore, { state: sportsLiveState, className: classNames == null ? void 0 : classNames.sportsLive }),
|
|
3108
|
+
detailsStats && detailsStats.length > 0 ? /* @__PURE__ */ jsx6(
|
|
2852
3109
|
"div",
|
|
2853
3110
|
{
|
|
2854
3111
|
className: cn(
|
|
@@ -2857,14 +3114,14 @@ var EventListItemDetailsContent = ({
|
|
|
2857
3114
|
),
|
|
2858
3115
|
children: detailsStats.map((statItem) => {
|
|
2859
3116
|
const deltaClassName = statItem.deltaTone === "positive" ? "text-agg-success!" : statItem.deltaTone === "negative" ? "text-agg-error!" : "text-agg-muted-foreground";
|
|
2860
|
-
return /* @__PURE__ */
|
|
3117
|
+
return /* @__PURE__ */ jsxs5(
|
|
2861
3118
|
"div",
|
|
2862
3119
|
{
|
|
2863
3120
|
className: "agg-event-stat flex flex-col gap-1",
|
|
2864
3121
|
children: [
|
|
2865
|
-
/* @__PURE__ */
|
|
2866
|
-
/* @__PURE__ */
|
|
2867
|
-
/* @__PURE__ */
|
|
3122
|
+
/* @__PURE__ */ jsx6(Typography, { variant: "caption-caps", className: "text-agg-muted-foreground", children: statItem.label }),
|
|
3123
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-baseline gap-1", children: [
|
|
3124
|
+
/* @__PURE__ */ jsx6(
|
|
2868
3125
|
Typography,
|
|
2869
3126
|
{
|
|
2870
3127
|
variant: "body",
|
|
@@ -2872,7 +3129,7 @@ var EventListItemDetailsContent = ({
|
|
|
2872
3129
|
children: statItem.value
|
|
2873
3130
|
}
|
|
2874
3131
|
),
|
|
2875
|
-
statItem.delta ? /* @__PURE__ */
|
|
3132
|
+
statItem.delta ? /* @__PURE__ */ jsx6(Typography, { variant: "label", className: cn(deltaClassName), children: statItem.delta }) : null
|
|
2876
3133
|
] })
|
|
2877
3134
|
]
|
|
2878
3135
|
},
|
|
@@ -2881,15 +3138,15 @@ var EventListItemDetailsContent = ({
|
|
|
2881
3138
|
})
|
|
2882
3139
|
}
|
|
2883
3140
|
) : null,
|
|
2884
|
-
/* @__PURE__ */
|
|
2885
|
-
/* @__PURE__ */
|
|
3141
|
+
/* @__PURE__ */ jsxs5("div", { className: cn("agg-event-details-chart", "flex flex-col gap-2"), children: [
|
|
3142
|
+
/* @__PURE__ */ jsx6(
|
|
2886
3143
|
EventListItemDetailsGraphSection,
|
|
2887
3144
|
{
|
|
2888
3145
|
classNames,
|
|
2889
3146
|
selectedChartType,
|
|
2890
3147
|
venueInfo,
|
|
2891
3148
|
venueMarkets,
|
|
2892
|
-
selectedMarketId: (
|
|
3149
|
+
selectedMarketId: (_f = scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id) != null ? _f : null,
|
|
2893
3150
|
livePrices,
|
|
2894
3151
|
restMidpoints,
|
|
2895
3152
|
bestMidpoint,
|
|
@@ -2899,7 +3156,7 @@ var EventListItemDetailsContent = ({
|
|
|
2899
3156
|
onRangeOverrideChange: setChartRangeOverride
|
|
2900
3157
|
}
|
|
2901
3158
|
),
|
|
2902
|
-
/* @__PURE__ */
|
|
3159
|
+
/* @__PURE__ */ jsxs5(
|
|
2903
3160
|
"div",
|
|
2904
3161
|
{
|
|
2905
3162
|
className: cn(
|
|
@@ -2907,8 +3164,8 @@ var EventListItemDetailsContent = ({
|
|
|
2907
3164
|
classNames == null ? void 0 : classNames.footer
|
|
2908
3165
|
),
|
|
2909
3166
|
children: [
|
|
2910
|
-
/* @__PURE__ */
|
|
2911
|
-
/* @__PURE__ */
|
|
3167
|
+
/* @__PURE__ */ jsx6(Typography, { variant: "label", className: "agg-chart-volume text-agg-muted-foreground", children: volumeLabel || "-" }),
|
|
3168
|
+
/* @__PURE__ */ jsxs5(
|
|
2912
3169
|
"div",
|
|
2913
3170
|
{
|
|
2914
3171
|
className: cn(
|
|
@@ -2916,7 +3173,7 @@ var EventListItemDetailsContent = ({
|
|
|
2916
3173
|
classNames == null ? void 0 : classNames.timeRange
|
|
2917
3174
|
),
|
|
2918
3175
|
children: [
|
|
2919
|
-
/* @__PURE__ */
|
|
3176
|
+
/* @__PURE__ */ jsx6(
|
|
2920
3177
|
ChartTypeSwitch,
|
|
2921
3178
|
{
|
|
2922
3179
|
className: "agg-chart-type-switch",
|
|
@@ -2924,11 +3181,11 @@ var EventListItemDetailsContent = ({
|
|
|
2924
3181
|
onValueChange: setSelectedChartType
|
|
2925
3182
|
}
|
|
2926
3183
|
),
|
|
2927
|
-
/* @__PURE__ */
|
|
3184
|
+
/* @__PURE__ */ jsx6("span", { "aria-hidden": "true", className: "hidden h-4 w-px bg-agg-separator md:block" }),
|
|
2928
3185
|
CHART_TIME_RANGES.map((timeRange) => {
|
|
2929
3186
|
const effectiveRange = chartRangeOverride != null ? chartRangeOverride : config.chart.selectedChartTimeRange;
|
|
2930
3187
|
const isActive = timeRange === effectiveRange;
|
|
2931
|
-
return /* @__PURE__ */
|
|
3188
|
+
return /* @__PURE__ */ jsx6(
|
|
2932
3189
|
Button,
|
|
2933
3190
|
{
|
|
2934
3191
|
size: "small",
|
|
@@ -2959,7 +3216,7 @@ var EventListItemDetailsContent = ({
|
|
|
2959
3216
|
}
|
|
2960
3217
|
)
|
|
2961
3218
|
] }),
|
|
2962
|
-
event.description || event.settlementDiff ? /* @__PURE__ */
|
|
3219
|
+
event.description || event.settlementDiff ? /* @__PURE__ */ jsx6(SettlementSummary, { content: event.description, settlementDiff: event.settlementDiff }) : null
|
|
2963
3220
|
]
|
|
2964
3221
|
}
|
|
2965
3222
|
);
|
|
@@ -2981,7 +3238,7 @@ var EventListItemDetailsByEventId = (_a) => {
|
|
|
2981
3238
|
enabled: !!resolvedEventId
|
|
2982
3239
|
});
|
|
2983
3240
|
if (!resolvedEventId) {
|
|
2984
|
-
return /* @__PURE__ */
|
|
3241
|
+
return /* @__PURE__ */ jsx6(
|
|
2985
3242
|
EventListItemDetailsUnavailableState,
|
|
2986
3243
|
{
|
|
2987
3244
|
classNames: rest.classNames,
|
|
@@ -2990,16 +3247,16 @@ var EventListItemDetailsByEventId = (_a) => {
|
|
|
2990
3247
|
);
|
|
2991
3248
|
}
|
|
2992
3249
|
if (isLoading) {
|
|
2993
|
-
return /* @__PURE__ */
|
|
3250
|
+
return /* @__PURE__ */ jsx6(EventListItemDetailsLoadingState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
|
|
2994
3251
|
}
|
|
2995
3252
|
if (isErrorWithStatus(error, 404)) {
|
|
2996
|
-
return /* @__PURE__ */
|
|
3253
|
+
return /* @__PURE__ */ jsx6(EventListItemDetailsNotFoundState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
|
|
2997
3254
|
}
|
|
2998
3255
|
if (!fetchedEvent && !isError) {
|
|
2999
|
-
return /* @__PURE__ */
|
|
3256
|
+
return /* @__PURE__ */ jsx6(EventListItemDetailsLoadingState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
|
|
3000
3257
|
}
|
|
3001
3258
|
if (!fetchedEvent) {
|
|
3002
|
-
return /* @__PURE__ */
|
|
3259
|
+
return /* @__PURE__ */ jsx6(
|
|
3003
3260
|
EventListItemDetailsUnavailableState,
|
|
3004
3261
|
{
|
|
3005
3262
|
classNames: rest.classNames,
|
|
@@ -3007,15 +3264,15 @@ var EventListItemDetailsByEventId = (_a) => {
|
|
|
3007
3264
|
}
|
|
3008
3265
|
);
|
|
3009
3266
|
}
|
|
3010
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ jsx6(EventListItemDetailsContent, __spreadValues({ event: fetchedEvent }, rest));
|
|
3011
3268
|
};
|
|
3012
3269
|
var EventListItemDetails = (props) => {
|
|
3013
3270
|
if (props.isLoading) {
|
|
3014
|
-
return /* @__PURE__ */
|
|
3271
|
+
return /* @__PURE__ */ jsx6(EventListItemDetailsLoadingState, { classNames: props.classNames, ariaLabel: props.ariaLabel });
|
|
3015
3272
|
}
|
|
3016
3273
|
if ("event" in props && props.event) {
|
|
3017
3274
|
const _a = props, { event } = _a, rest = __objRest(_a, ["event"]);
|
|
3018
|
-
return /* @__PURE__ */
|
|
3275
|
+
return /* @__PURE__ */ jsx6(EventListItemDetailsContent, __spreadValues({ event }, rest));
|
|
3019
3276
|
}
|
|
3020
3277
|
if ("eventId" in props && typeof props.eventId === "string") {
|
|
3021
3278
|
const {
|
|
@@ -3038,9 +3295,9 @@ var EventListItemDetails = (props) => {
|
|
|
3038
3295
|
ariaLabel: ariaLabelOverride,
|
|
3039
3296
|
onClick
|
|
3040
3297
|
};
|
|
3041
|
-
return /* @__PURE__ */
|
|
3298
|
+
return /* @__PURE__ */ jsx6(EventListItemDetailsByEventId, __spreadValues({}, byEventIdProps));
|
|
3042
3299
|
}
|
|
3043
|
-
return /* @__PURE__ */
|
|
3300
|
+
return /* @__PURE__ */ jsx6(
|
|
3044
3301
|
EventListItemDetailsUnavailableState,
|
|
3045
3302
|
{
|
|
3046
3303
|
classNames: props.classNames,
|
|
@@ -3213,13 +3470,13 @@ var useCenterOrderbookSpread = ({
|
|
|
3213
3470
|
// src/events/orderbook/index.tsx
|
|
3214
3471
|
import { sortVenues as sortVenues3, useAggUiConfig } from "@agg-build/hooks";
|
|
3215
3472
|
import { useEffect as useEffect4, useRef as useRef5 } from "react";
|
|
3216
|
-
import { jsx as
|
|
3473
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3217
3474
|
var OrderbookVenueLogos = ({ venues }) => {
|
|
3218
3475
|
const visible = sortVenues3(venues).slice(0, orderbookMaxVisibleVenues);
|
|
3219
3476
|
const overflow = venues.length - visible.length;
|
|
3220
|
-
return /* @__PURE__ */
|
|
3221
|
-
visible.map((venue) => /* @__PURE__ */
|
|
3222
|
-
overflow > 0 ? /* @__PURE__ */
|
|
3477
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-row items-center justify-start gap-0.5 md:gap-1", children: [
|
|
3478
|
+
visible.map((venue) => /* @__PURE__ */ jsx7(VenueLogo, { venue, size: "small" }, venue)),
|
|
3479
|
+
overflow > 0 ? /* @__PURE__ */ jsxs6("span", { className: "text-agg-xs font-agg-bold leading-agg-4 text-agg-muted-foreground", children: [
|
|
3223
3480
|
"+",
|
|
3224
3481
|
overflow
|
|
3225
3482
|
] }) : null
|
|
@@ -3246,8 +3503,8 @@ var OrderbookRow = ({
|
|
|
3246
3503
|
}).map(([venue]) => venue);
|
|
3247
3504
|
const venues = entry.row.venues && entry.row.venues.length > 0 ? entry.row.venues : venuesFromBreakdown.length > 0 ? venuesFromBreakdown : [entry.row.venue];
|
|
3248
3505
|
const barPercent = Math.max(2, Number((entry.unifiedBarScale * 100).toFixed(2)));
|
|
3249
|
-
return /* @__PURE__ */
|
|
3250
|
-
/* @__PURE__ */
|
|
3506
|
+
return /* @__PURE__ */ jsxs6("div", { className: "agg-orderbook-row relative flex h-9 items-center gap-2.5 overflow-clip pl-5 pr-2.5 md:gap-10 md:pl-0 md:pr-5", children: [
|
|
3507
|
+
/* @__PURE__ */ jsx7(
|
|
3251
3508
|
"div",
|
|
3252
3509
|
{
|
|
3253
3510
|
"aria-hidden": "true",
|
|
@@ -3259,8 +3516,8 @@ var OrderbookRow = ({
|
|
|
3259
3516
|
style: { width: `${barPercent}%` }
|
|
3260
3517
|
}
|
|
3261
3518
|
),
|
|
3262
|
-
/* @__PURE__ */
|
|
3263
|
-
/* @__PURE__ */
|
|
3519
|
+
/* @__PURE__ */ jsxs6("div", { className: "hidden md:block md:relative min-w-0 flex-1 self-stretch", children: [
|
|
3520
|
+
/* @__PURE__ */ jsx7(
|
|
3264
3521
|
"div",
|
|
3265
3522
|
{
|
|
3266
3523
|
"aria-hidden": "true",
|
|
@@ -3272,14 +3529,14 @@ var OrderbookRow = ({
|
|
|
3272
3529
|
style: { width: `${barPercent}%` }
|
|
3273
3530
|
}
|
|
3274
3531
|
),
|
|
3275
|
-
showBadge && badgeLabel ? /* @__PURE__ */
|
|
3532
|
+
showBadge && badgeLabel ? /* @__PURE__ */ jsx7(
|
|
3276
3533
|
"div",
|
|
3277
3534
|
{
|
|
3278
3535
|
className: cn(
|
|
3279
3536
|
"absolute flex left-5 top-1/2 -translate-y-1/2 rounded-[4px] border px-2 py-0.5",
|
|
3280
3537
|
badgeBorderClassName
|
|
3281
3538
|
),
|
|
3282
|
-
children: /* @__PURE__ */
|
|
3539
|
+
children: /* @__PURE__ */ jsx7(
|
|
3283
3540
|
"span",
|
|
3284
3541
|
{
|
|
3285
3542
|
className: cn("text-[10px] font-bold uppercase leading-[14px]", badgeTextClassName),
|
|
@@ -3289,8 +3546,8 @@ var OrderbookRow = ({
|
|
|
3289
3546
|
}
|
|
3290
3547
|
) : null
|
|
3291
3548
|
] }),
|
|
3292
|
-
/* @__PURE__ */
|
|
3293
|
-
/* @__PURE__ */
|
|
3549
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex w-20 shrink-0 items-center justify-start gap-2 md:w-[120px]", children: [
|
|
3550
|
+
/* @__PURE__ */ jsx7(
|
|
3294
3551
|
"span",
|
|
3295
3552
|
{
|
|
3296
3553
|
className: cn(
|
|
@@ -3301,10 +3558,10 @@ var OrderbookRow = ({
|
|
|
3301
3558
|
children: formatProbabilityCents(entry.row.price, formatPrice)
|
|
3302
3559
|
}
|
|
3303
3560
|
),
|
|
3304
|
-
/* @__PURE__ */
|
|
3561
|
+
/* @__PURE__ */ jsx7(OrderbookVenueLogos, { venues })
|
|
3305
3562
|
] }),
|
|
3306
|
-
/* @__PURE__ */
|
|
3307
|
-
/* @__PURE__ */
|
|
3563
|
+
/* @__PURE__ */ jsx7("span", { className: "agg-orderbook-size w-20 shrink-0 truncate text-center text-agg-sm leading-agg-5 text-agg-foreground md:w-[120px]", children: formatNumber(entry.row.size) }),
|
|
3564
|
+
/* @__PURE__ */ jsx7("span", { className: "agg-orderbook-total w-20 shrink-0 truncate text-center text-agg-sm leading-agg-5 text-agg-foreground md:w-[120px]", children: formatCurrency(entry.row.total) })
|
|
3308
3565
|
] });
|
|
3309
3566
|
};
|
|
3310
3567
|
var Orderbook = ({
|
|
@@ -3364,15 +3621,15 @@ var Orderbook = ({
|
|
|
3364
3621
|
snapshotKey,
|
|
3365
3622
|
spreadEntry
|
|
3366
3623
|
]);
|
|
3367
|
-
return /* @__PURE__ */
|
|
3368
|
-
/* @__PURE__ */
|
|
3369
|
-
/* @__PURE__ */
|
|
3370
|
-
/* @__PURE__ */
|
|
3371
|
-
/* @__PURE__ */
|
|
3372
|
-
/* @__PURE__ */
|
|
3624
|
+
return /* @__PURE__ */ jsxs6("div", { className: cn("agg-orderbook-unified flex flex-col", className), children: [
|
|
3625
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex h-9 items-center gap-2.5 overflow-clip border-b border-agg-separator pl-5 pr-5 md:pl-0 md:gap-10", children: [
|
|
3626
|
+
/* @__PURE__ */ jsx7("span", { className: "hidden md:flex min-w-0 flex-1 items-center gap-2 pl-5", children: /* @__PURE__ */ jsx7("span", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.tradeOutcome }) }),
|
|
3627
|
+
/* @__PURE__ */ jsx7("span", { className: "w-20 shrink-0 text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground md:w-[120px]", children: labels.price }),
|
|
3628
|
+
/* @__PURE__ */ jsx7("span", { className: "w-20 shrink-0 text-center text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground md:w-[120px]", children: labels.shares }),
|
|
3629
|
+
/* @__PURE__ */ jsx7("span", { className: "w-20 shrink-0 text-center text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground md:w-[120px]", children: labels.total })
|
|
3373
3630
|
] }),
|
|
3374
|
-
/* @__PURE__ */
|
|
3375
|
-
/* @__PURE__ */
|
|
3631
|
+
/* @__PURE__ */ jsxs6("div", { className: "relative", children: [
|
|
3632
|
+
/* @__PURE__ */ jsxs6(
|
|
3376
3633
|
"div",
|
|
3377
3634
|
{
|
|
3378
3635
|
ref: scrollContainerRef,
|
|
@@ -3382,7 +3639,7 @@ var Orderbook = ({
|
|
|
3382
3639
|
"aria-label": "Order book",
|
|
3383
3640
|
tabIndex: 0,
|
|
3384
3641
|
children: [
|
|
3385
|
-
askEntries.length > 0 ? /* @__PURE__ */
|
|
3642
|
+
askEntries.length > 0 ? /* @__PURE__ */ jsx7("div", { className: "agg-orderbook-asks flex flex-col", children: askEntries.map((entry, index) => /* @__PURE__ */ jsx7(
|
|
3386
3643
|
OrderbookRow,
|
|
3387
3644
|
{
|
|
3388
3645
|
entry,
|
|
@@ -3395,7 +3652,7 @@ var Orderbook = ({
|
|
|
3395
3652
|
},
|
|
3396
3653
|
entry.row.id
|
|
3397
3654
|
)) }) : null,
|
|
3398
|
-
/* @__PURE__ */
|
|
3655
|
+
/* @__PURE__ */ jsxs6(
|
|
3399
3656
|
"div",
|
|
3400
3657
|
{
|
|
3401
3658
|
ref: spreadRowRef,
|
|
@@ -3403,7 +3660,7 @@ var Orderbook = ({
|
|
|
3403
3660
|
role: "separator",
|
|
3404
3661
|
"aria-label": `${labels.midPrice}: ${formatProbabilityCents((_b = spreadEntry == null ? void 0 : spreadEntry.midPrice) != null ? _b : null, formatPrice)}, ${labels.spread}: ${formatProbabilityCents((_c = spreadEntry == null ? void 0 : spreadEntry.spread) != null ? _c : null)}`,
|
|
3405
3662
|
children: [
|
|
3406
|
-
/* @__PURE__ */
|
|
3663
|
+
/* @__PURE__ */ jsxs6(
|
|
3407
3664
|
Typography,
|
|
3408
3665
|
{
|
|
3409
3666
|
variant: "label",
|
|
@@ -3415,7 +3672,7 @@ var Orderbook = ({
|
|
|
3415
3672
|
]
|
|
3416
3673
|
}
|
|
3417
3674
|
),
|
|
3418
|
-
/* @__PURE__ */
|
|
3675
|
+
/* @__PURE__ */ jsxs6(
|
|
3419
3676
|
Typography,
|
|
3420
3677
|
{
|
|
3421
3678
|
variant: "label",
|
|
@@ -3427,12 +3684,12 @@ var Orderbook = ({
|
|
|
3427
3684
|
]
|
|
3428
3685
|
}
|
|
3429
3686
|
),
|
|
3430
|
-
/* @__PURE__ */
|
|
3431
|
-
/* @__PURE__ */
|
|
3687
|
+
/* @__PURE__ */ jsx7("div", { className: "hidden md:inline-flex w-20 shrink-0 md:w-[120px]" }),
|
|
3688
|
+
/* @__PURE__ */ jsx7("div", { className: "hidden md:inline-flex w-20 shrink-0 md:w-[120px]" })
|
|
3432
3689
|
]
|
|
3433
3690
|
}
|
|
3434
3691
|
),
|
|
3435
|
-
bidEntries.length > 0 ? /* @__PURE__ */
|
|
3692
|
+
bidEntries.length > 0 ? /* @__PURE__ */ jsx7("div", { className: "agg-orderbook-bids flex flex-col", children: bidEntries.map((entry, index) => /* @__PURE__ */ jsx7(
|
|
3436
3693
|
OrderbookRow,
|
|
3437
3694
|
{
|
|
3438
3695
|
entry,
|
|
@@ -3448,14 +3705,14 @@ var Orderbook = ({
|
|
|
3448
3705
|
]
|
|
3449
3706
|
}
|
|
3450
3707
|
),
|
|
3451
|
-
/* @__PURE__ */
|
|
3708
|
+
/* @__PURE__ */ jsx7(
|
|
3452
3709
|
"button",
|
|
3453
3710
|
{
|
|
3454
3711
|
type: "button",
|
|
3455
3712
|
onClick: recenter,
|
|
3456
3713
|
className: "absolute bottom-3 left-5 z-10 flex size-8 cursor-pointer items-center justify-center rounded-lg border border-agg-separator bg-agg-secondary text-agg-muted-foreground transition-colors hover:text-agg-foreground",
|
|
3457
3714
|
"aria-label": "Re-center orderbook",
|
|
3458
|
-
children: /* @__PURE__ */
|
|
3715
|
+
children: /* @__PURE__ */ jsx7(Icon, { name: "recenter", size: "small", className: "!size-4 text-current" })
|
|
3459
3716
|
}
|
|
3460
3717
|
)
|
|
3461
3718
|
] })
|
|
@@ -3464,7 +3721,7 @@ var Orderbook = ({
|
|
|
3464
3721
|
Orderbook.displayName = "Orderbook";
|
|
3465
3722
|
|
|
3466
3723
|
// src/events/orderbook/orderbook-with-states.tsx
|
|
3467
|
-
import { jsx as
|
|
3724
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
3468
3725
|
var stateMessageMinHeight = "min-h-[248px] px-5 py-10 md:min-h-[272px]";
|
|
3469
3726
|
var OrderbookWithStates = (_a) => {
|
|
3470
3727
|
var _b = _a, {
|
|
@@ -3476,54 +3733,54 @@ var OrderbookWithStates = (_a) => {
|
|
|
3476
3733
|
]);
|
|
3477
3734
|
var _a2;
|
|
3478
3735
|
if (state.kind === "loading") {
|
|
3479
|
-
return /* @__PURE__ */
|
|
3736
|
+
return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(MarketDetailsOderbookSkeleton, {}) });
|
|
3480
3737
|
}
|
|
3481
3738
|
if (state.kind === "disabled") {
|
|
3482
|
-
return /* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(
|
|
3483
3740
|
StateMessage,
|
|
3484
3741
|
{
|
|
3485
3742
|
title: state.title,
|
|
3486
3743
|
description: state.description,
|
|
3487
|
-
icon: (_a2 = state.icon) != null ? _a2 : /* @__PURE__ */
|
|
3744
|
+
icon: (_a2 = state.icon) != null ? _a2 : /* @__PURE__ */ jsx8(WarningIcon, {}),
|
|
3488
3745
|
classNames: { root: stateMessageMinHeight }
|
|
3489
3746
|
}
|
|
3490
3747
|
) });
|
|
3491
3748
|
}
|
|
3492
3749
|
if (state.kind === "error") {
|
|
3493
|
-
return /* @__PURE__ */
|
|
3750
|
+
return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(
|
|
3494
3751
|
StateMessage,
|
|
3495
3752
|
{
|
|
3496
3753
|
title: state.title,
|
|
3497
3754
|
description: state.description,
|
|
3498
|
-
icon: /* @__PURE__ */
|
|
3755
|
+
icon: /* @__PURE__ */ jsx8(WarningIcon, {}),
|
|
3499
3756
|
onAction: state.onRetry,
|
|
3500
3757
|
classNames: { root: stateMessageMinHeight }
|
|
3501
3758
|
}
|
|
3502
3759
|
) });
|
|
3503
3760
|
}
|
|
3504
3761
|
if (state.kind === "resolved") {
|
|
3505
|
-
return /* @__PURE__ */
|
|
3762
|
+
return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(
|
|
3506
3763
|
StateMessage,
|
|
3507
3764
|
{
|
|
3508
3765
|
title: state.title,
|
|
3509
3766
|
description: state.description,
|
|
3510
|
-
icon: /* @__PURE__ */
|
|
3767
|
+
icon: /* @__PURE__ */ jsx8(WarningIcon, {}),
|
|
3511
3768
|
classNames: { root: stateMessageMinHeight }
|
|
3512
3769
|
}
|
|
3513
3770
|
) });
|
|
3514
3771
|
}
|
|
3515
3772
|
if (state.kind === "empty") {
|
|
3516
|
-
return /* @__PURE__ */
|
|
3773
|
+
return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(
|
|
3517
3774
|
StateMessage,
|
|
3518
3775
|
{
|
|
3519
3776
|
title: state.title,
|
|
3520
3777
|
description: state.description,
|
|
3521
|
-
icon: /* @__PURE__ */
|
|
3778
|
+
icon: /* @__PURE__ */ jsx8(SearchEmptyIcon, {}),
|
|
3522
3779
|
classNames: { root: stateMessageMinHeight }
|
|
3523
3780
|
}
|
|
3524
3781
|
) });
|
|
3525
3782
|
}
|
|
3526
|
-
return /* @__PURE__ */
|
|
3783
|
+
return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(Orderbook, __spreadValues({}, orderbookProps)) });
|
|
3527
3784
|
};
|
|
3528
3785
|
OrderbookWithStates.displayName = "OrderbookWithStates";
|
|
3529
3786
|
|
|
@@ -3536,13 +3793,13 @@ import {
|
|
|
3536
3793
|
resolveMarketTradingState as resolveMarketTradingState2,
|
|
3537
3794
|
useEventTradingContext as useEventTradingContext2,
|
|
3538
3795
|
useEventOrderbookData as useEventOrderbookData2,
|
|
3539
|
-
useLabels as
|
|
3796
|
+
useLabels as useLabels8,
|
|
3540
3797
|
useLiveBestPrices as useLiveBestPrices2,
|
|
3541
3798
|
useLiveBestPriceCandidates,
|
|
3542
3799
|
useLiveOutcomePrices as useLiveOutcomePrices2,
|
|
3543
3800
|
useMarketOrderbook,
|
|
3544
3801
|
useMidpoints as useMidpoints2,
|
|
3545
|
-
useSdkUiConfig as
|
|
3802
|
+
useSdkUiConfig as useSdkUiConfig5,
|
|
3546
3803
|
useVenueMarkets as useVenueMarkets2,
|
|
3547
3804
|
useViewportMidpoints
|
|
3548
3805
|
} from "@agg-build/hooks";
|
|
@@ -3610,7 +3867,7 @@ var buildVenueMarketIdByVenue = (venueMarkets) => {
|
|
|
3610
3867
|
|
|
3611
3868
|
// src/events/market-details/market-details-outcome-button.tsx
|
|
3612
3869
|
import { useAggUiConfig as useAggUiConfig2 } from "@agg-build/hooks";
|
|
3613
|
-
import { jsx as
|
|
3870
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3614
3871
|
var marketDetailsOutcomeButtonToneClasses = {
|
|
3615
3872
|
positive: {
|
|
3616
3873
|
activeSurface: "bg-agg-success/15",
|
|
@@ -3662,7 +3919,7 @@ var OutcomePriceContent = ({
|
|
|
3662
3919
|
}) => {
|
|
3663
3920
|
const { formatPrice } = useAggUiConfig2().formatting;
|
|
3664
3921
|
if (isLoading) {
|
|
3665
|
-
return /* @__PURE__ */
|
|
3922
|
+
return /* @__PURE__ */ jsx9(
|
|
3666
3923
|
"span",
|
|
3667
3924
|
{
|
|
3668
3925
|
"aria-hidden": "true",
|
|
@@ -3673,7 +3930,7 @@ var OutcomePriceContent = ({
|
|
|
3673
3930
|
}
|
|
3674
3931
|
);
|
|
3675
3932
|
}
|
|
3676
|
-
return /* @__PURE__ */
|
|
3933
|
+
return /* @__PURE__ */ jsx9(
|
|
3677
3934
|
Typography,
|
|
3678
3935
|
{
|
|
3679
3936
|
as: "span",
|
|
@@ -3701,7 +3958,7 @@ var MarketDetailsOutcomeButton = ({
|
|
|
3701
3958
|
});
|
|
3702
3959
|
const itemLabel = (_a = item.title) != null ? _a : item.label;
|
|
3703
3960
|
const isLineVariant = item.variant === "line";
|
|
3704
|
-
return /* @__PURE__ */
|
|
3961
|
+
return /* @__PURE__ */ jsx9(
|
|
3705
3962
|
"button",
|
|
3706
3963
|
{
|
|
3707
3964
|
type: "button",
|
|
@@ -3717,9 +3974,9 @@ var MarketDetailsOutcomeButton = ({
|
|
|
3717
3974
|
enforceFixedWidth ? "flex-none" : "flex-1 md:flex-auto"
|
|
3718
3975
|
),
|
|
3719
3976
|
onClick: () => onSelect(item.label),
|
|
3720
|
-
children: isLineVariant ? /* @__PURE__ */
|
|
3721
|
-
/* @__PURE__ */
|
|
3722
|
-
/* @__PURE__ */
|
|
3977
|
+
children: isLineVariant ? /* @__PURE__ */ jsxs7("div", { className: "flex min-w-0 max-w-full items-center justify-center gap-1.5 overflow-hidden", children: [
|
|
3978
|
+
/* @__PURE__ */ jsx9(VenueLogo, { venue: item.venue, size: "small" }),
|
|
3979
|
+
/* @__PURE__ */ jsx9(
|
|
3723
3980
|
Typography,
|
|
3724
3981
|
{
|
|
3725
3982
|
as: "span",
|
|
@@ -3728,7 +3985,7 @@ var MarketDetailsOutcomeButton = ({
|
|
|
3728
3985
|
children: itemLabel
|
|
3729
3986
|
}
|
|
3730
3987
|
),
|
|
3731
|
-
item.lineLabel ? /* @__PURE__ */
|
|
3988
|
+
item.lineLabel ? /* @__PURE__ */ jsx9(
|
|
3732
3989
|
Typography,
|
|
3733
3990
|
{
|
|
3734
3991
|
as: "span",
|
|
@@ -3737,7 +3994,7 @@ var MarketDetailsOutcomeButton = ({
|
|
|
3737
3994
|
children: item.lineLabel
|
|
3738
3995
|
}
|
|
3739
3996
|
) : null,
|
|
3740
|
-
/* @__PURE__ */
|
|
3997
|
+
/* @__PURE__ */ jsx9(
|
|
3741
3998
|
OutcomePriceContent,
|
|
3742
3999
|
{
|
|
3743
4000
|
isLoading: item.isPriceLoading,
|
|
@@ -3746,9 +4003,9 @@ var MarketDetailsOutcomeButton = ({
|
|
|
3746
4003
|
textClassName: classNames.text
|
|
3747
4004
|
}
|
|
3748
4005
|
)
|
|
3749
|
-
] }) : /* @__PURE__ */
|
|
3750
|
-
/* @__PURE__ */
|
|
3751
|
-
/* @__PURE__ */
|
|
4006
|
+
] }) : /* @__PURE__ */ jsxs7("div", { className: "inline-flex max-w-full items-center justify-center gap-1.5", children: [
|
|
4007
|
+
/* @__PURE__ */ jsx9(VenueLogo, { venue: item.venue, size: "small" }),
|
|
4008
|
+
/* @__PURE__ */ jsx9(
|
|
3752
4009
|
Typography,
|
|
3753
4010
|
{
|
|
3754
4011
|
as: "span",
|
|
@@ -3757,7 +4014,7 @@ var MarketDetailsOutcomeButton = ({
|
|
|
3757
4014
|
children: itemLabel
|
|
3758
4015
|
}
|
|
3759
4016
|
),
|
|
3760
|
-
/* @__PURE__ */
|
|
4017
|
+
/* @__PURE__ */ jsx9(
|
|
3761
4018
|
OutcomePriceContent,
|
|
3762
4019
|
{
|
|
3763
4020
|
isLoading: item.isPriceLoading,
|
|
@@ -3775,13 +4032,13 @@ MarketDetailsOutcomeButton.displayName = "MarketDetailsOutcomeButton";
|
|
|
3775
4032
|
// src/events/market-details/market-details-graph-panel.tsx
|
|
3776
4033
|
import {
|
|
3777
4034
|
CHART_TIME_RANGES as CHART_TIME_RANGES2,
|
|
3778
|
-
useLabels as
|
|
4035
|
+
useLabels as useLabels7,
|
|
3779
4036
|
useMarketChart as useMarketChart2,
|
|
3780
4037
|
useRollingChartWindow as useRollingChartWindow2,
|
|
3781
|
-
useSdkUiConfig as
|
|
4038
|
+
useSdkUiConfig as useSdkUiConfig4
|
|
3782
4039
|
} from "@agg-build/hooks";
|
|
3783
4040
|
import { useEffect as useEffect5, useMemo as useMemo6, useRef as useRef6, useState as useState4 } from "react";
|
|
3784
|
-
import { jsx as
|
|
4041
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3785
4042
|
var MarketDetailsGraphPanel = ({
|
|
3786
4043
|
venueMarkets,
|
|
3787
4044
|
selectedOutcomeLabel,
|
|
@@ -3796,13 +4053,13 @@ var MarketDetailsGraphPanel = ({
|
|
|
3796
4053
|
classNames
|
|
3797
4054
|
}) => {
|
|
3798
4055
|
var _a, _b, _c;
|
|
3799
|
-
const config =
|
|
4056
|
+
const config = useSdkUiConfig4();
|
|
3800
4057
|
const {
|
|
3801
4058
|
formatting: { formatPercent, formatCompactCurrency, formatPrice },
|
|
3802
4059
|
general: { theme }
|
|
3803
4060
|
} = config;
|
|
3804
4061
|
const isDarkTheme = theme === "dark";
|
|
3805
|
-
const labels =
|
|
4062
|
+
const labels = useLabels7();
|
|
3806
4063
|
const selectedTimeRange = config.chart.selectedChartTimeRange;
|
|
3807
4064
|
const setSelectedTimeRange = config.chart.setSelectedChartTimeRange;
|
|
3808
4065
|
const [chartRangeOverride, setChartRangeOverride] = useState4(null);
|
|
@@ -3936,17 +4193,17 @@ var MarketDetailsGraphPanel = ({
|
|
|
3936
4193
|
const handleRetryMarketChart = () => {
|
|
3937
4194
|
void refetchMarketChart();
|
|
3938
4195
|
};
|
|
3939
|
-
return /* @__PURE__ */
|
|
3940
|
-
hasChartError ? /* @__PURE__ */
|
|
4196
|
+
return /* @__PURE__ */ jsxs8("div", { className: cn("agg-price-chart flex flex-col gap-5 p-5", classNames == null ? void 0 : classNames.graph), children: [
|
|
4197
|
+
hasChartError ? /* @__PURE__ */ jsx10(
|
|
3941
4198
|
StateMessage,
|
|
3942
4199
|
{
|
|
3943
4200
|
title: labels.marketDetails.chartUnavailableTitle,
|
|
3944
4201
|
description: labels.marketDetails.chartUnavailableDescription,
|
|
3945
|
-
icon: /* @__PURE__ */
|
|
4202
|
+
icon: /* @__PURE__ */ jsx10(WarningIcon, {}),
|
|
3946
4203
|
onAction: handleRetryMarketChart,
|
|
3947
4204
|
classNames: { root: "min-h-[248px] px-5 py-10 md:min-h-[272px]" }
|
|
3948
4205
|
}
|
|
3949
|
-
) : /* @__PURE__ */
|
|
4206
|
+
) : /* @__PURE__ */ jsx10(
|
|
3950
4207
|
LineChart,
|
|
3951
4208
|
{
|
|
3952
4209
|
series: graphSeries,
|
|
@@ -3959,14 +4216,14 @@ var MarketDetailsGraphPanel = ({
|
|
|
3959
4216
|
showSeriesControls: chartAvailableOutcomesByVenue.length > 0 || headerOutcomeItems.length > 0,
|
|
3960
4217
|
renderSeriesControls: () => {
|
|
3961
4218
|
var _a2, _b2, _c2, _d;
|
|
3962
|
-
return /* @__PURE__ */
|
|
3963
|
-
/* @__PURE__ */
|
|
4219
|
+
return /* @__PURE__ */ jsxs8("div", { className: "agg-chart-toolbar w-full flex flex-col gap-4 md:flex-row md:items-center md:justify-between", children: [
|
|
4220
|
+
/* @__PURE__ */ jsx10("div", { className: "agg-market-venues flex flex-wrap gap-2", children: chartAvailableOutcomesByVenue.map((item) => {
|
|
3964
4221
|
const probability = formatProbabilityPercent(
|
|
3965
4222
|
wsLivePrices.get(item.outcome.id),
|
|
3966
4223
|
formatPercent
|
|
3967
4224
|
);
|
|
3968
4225
|
const isActiveVenue = selectedGraphVenue === item.venue;
|
|
3969
|
-
return /* @__PURE__ */
|
|
4226
|
+
return /* @__PURE__ */ jsxs8(
|
|
3970
4227
|
"button",
|
|
3971
4228
|
{
|
|
3972
4229
|
type: "button",
|
|
@@ -3985,14 +4242,14 @@ var MarketDetailsGraphPanel = ({
|
|
|
3985
4242
|
handleGraphVenueToggle(item.venue);
|
|
3986
4243
|
},
|
|
3987
4244
|
children: [
|
|
3988
|
-
/* @__PURE__ */
|
|
3989
|
-
/* @__PURE__ */
|
|
4245
|
+
/* @__PURE__ */ jsx10(VenueLogo, { venue: item.venue, size: "small" }),
|
|
4246
|
+
/* @__PURE__ */ jsx10("span", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: probability })
|
|
3990
4247
|
]
|
|
3991
4248
|
},
|
|
3992
4249
|
`${item.market.id}-${item.outcome.id}`
|
|
3993
4250
|
);
|
|
3994
4251
|
}) }),
|
|
3995
|
-
!isOutcomeSelectionLocked ? /* @__PURE__ */
|
|
4252
|
+
!isOutcomeSelectionLocked ? /* @__PURE__ */ jsx10(
|
|
3996
4253
|
SwitchButton,
|
|
3997
4254
|
{
|
|
3998
4255
|
ariaLabel: labels.marketDetails.outcomeSelectorAria,
|
|
@@ -4022,7 +4279,7 @@ var MarketDetailsGraphPanel = ({
|
|
|
4022
4279
|
}
|
|
4023
4280
|
}
|
|
4024
4281
|
),
|
|
4025
|
-
/* @__PURE__ */
|
|
4282
|
+
/* @__PURE__ */ jsxs8(
|
|
4026
4283
|
"div",
|
|
4027
4284
|
{
|
|
4028
4285
|
className: cn(
|
|
@@ -4031,9 +4288,9 @@ var MarketDetailsGraphPanel = ({
|
|
|
4031
4288
|
classNames == null ? void 0 : classNames.footer
|
|
4032
4289
|
),
|
|
4033
4290
|
children: [
|
|
4034
|
-
/* @__PURE__ */
|
|
4035
|
-
/* @__PURE__ */
|
|
4036
|
-
/* @__PURE__ */
|
|
4291
|
+
/* @__PURE__ */ jsx10("span", { children: typeof volume !== "number" ? labels.marketDetails.volumeUnavailable : volume > 0 ? `${formatCompactCurrency(volume)} ${labels.marketDetails.meta.volumeSuffix}` : "" }),
|
|
4292
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-center gap-3 md:gap-4", children: [
|
|
4293
|
+
/* @__PURE__ */ jsx10(
|
|
4037
4294
|
ChartTypeSwitch,
|
|
4038
4295
|
{
|
|
4039
4296
|
className: "agg-chart-type-switch shrink-0",
|
|
@@ -4041,11 +4298,11 @@ var MarketDetailsGraphPanel = ({
|
|
|
4041
4298
|
onValueChange: setSelectedChartType
|
|
4042
4299
|
}
|
|
4043
4300
|
),
|
|
4044
|
-
/* @__PURE__ */
|
|
4301
|
+
/* @__PURE__ */ jsx10("span", { "aria-hidden": "true", className: "hidden h-4 w-px bg-agg-separator md:block" }),
|
|
4045
4302
|
CHART_TIME_RANGES2.map((timeRange) => {
|
|
4046
4303
|
const isActive = effectiveChartTimeRange === timeRange;
|
|
4047
4304
|
const isDisabled = isResolvedMarket && timeRange !== "ALL";
|
|
4048
|
-
return /* @__PURE__ */
|
|
4305
|
+
return /* @__PURE__ */ jsx10(
|
|
4049
4306
|
"button",
|
|
4050
4307
|
{
|
|
4051
4308
|
type: "button",
|
|
@@ -4079,14 +4336,14 @@ var MarketDetailsGraphPanel = ({
|
|
|
4079
4336
|
MarketDetailsGraphPanel.displayName = "MarketDetailsGraphPanel";
|
|
4080
4337
|
|
|
4081
4338
|
// src/events/market-details/index.tsx
|
|
4082
|
-
import { Fragment as Fragment2, jsx as
|
|
4339
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
4083
4340
|
var MarketDetailsUnavailableState = ({
|
|
4084
4341
|
marketId,
|
|
4085
4342
|
ariaLabel,
|
|
4086
4343
|
classNames
|
|
4087
4344
|
}) => {
|
|
4088
|
-
const labels =
|
|
4089
|
-
return /* @__PURE__ */
|
|
4345
|
+
const labels = useLabels8();
|
|
4346
|
+
return /* @__PURE__ */ jsx11(
|
|
4090
4347
|
Card,
|
|
4091
4348
|
{
|
|
4092
4349
|
"data-market-id": marketId || void 0,
|
|
@@ -4097,9 +4354,9 @@ var MarketDetailsUnavailableState = ({
|
|
|
4097
4354
|
),
|
|
4098
4355
|
role: "status",
|
|
4099
4356
|
"aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.unavailableAria,
|
|
4100
|
-
children: /* @__PURE__ */
|
|
4101
|
-
/* @__PURE__ */
|
|
4102
|
-
/* @__PURE__ */
|
|
4357
|
+
children: /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-1 p-5", children: [
|
|
4358
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "body-large-strong", children: labels.marketDetails.unavailableTitle }),
|
|
4359
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.unavailableDescription })
|
|
4103
4360
|
] })
|
|
4104
4361
|
}
|
|
4105
4362
|
);
|
|
@@ -4109,14 +4366,14 @@ var MarketDetailsNotFoundState = ({
|
|
|
4109
4366
|
ariaLabel: _ariaLabel,
|
|
4110
4367
|
classNames: _classNames
|
|
4111
4368
|
}) => {
|
|
4112
|
-
const labels =
|
|
4113
|
-
return /* @__PURE__ */
|
|
4369
|
+
const labels = useLabels8();
|
|
4370
|
+
return /* @__PURE__ */ jsx11(
|
|
4114
4371
|
StateMessage,
|
|
4115
4372
|
{
|
|
4116
4373
|
"data-market-id": marketId || void 0,
|
|
4117
4374
|
title: labels.marketDetails.notFoundTitle,
|
|
4118
4375
|
description: labels.marketDetails.notFoundDescription,
|
|
4119
|
-
icon: /* @__PURE__ */
|
|
4376
|
+
icon: /* @__PURE__ */ jsx11(SearchEmptyIcon, {}),
|
|
4120
4377
|
classNames: { root: "min-h-[280px] md:min-h-[320px]" }
|
|
4121
4378
|
}
|
|
4122
4379
|
);
|
|
@@ -4141,18 +4398,19 @@ var MarketDetailsContent = ({
|
|
|
4141
4398
|
headerOutcomeItemsOverride,
|
|
4142
4399
|
onOutcomeSelect,
|
|
4143
4400
|
live,
|
|
4401
|
+
showResolvingState = false,
|
|
4144
4402
|
midpointsFallback,
|
|
4145
4403
|
midpointsFallbackVenues,
|
|
4146
4404
|
suppressOutcomeFallbackSelection,
|
|
4147
4405
|
midpointsResult
|
|
4148
4406
|
}) => {
|
|
4149
4407
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
4150
|
-
const config =
|
|
4408
|
+
const config = useSdkUiConfig5();
|
|
4151
4409
|
const {
|
|
4152
4410
|
features: { enableAnimations },
|
|
4153
4411
|
formatting: { formatPercent }
|
|
4154
4412
|
} = config;
|
|
4155
|
-
const labels =
|
|
4413
|
+
const labels = useLabels8();
|
|
4156
4414
|
const tradingContext = useEventTradingContext2();
|
|
4157
4415
|
const detailsContentId = useId();
|
|
4158
4416
|
const tradeSide = (_a = tradingContext == null ? void 0 : tradingContext.tradeSide) != null ? _a : "buy";
|
|
@@ -4186,26 +4444,6 @@ var MarketDetailsContent = ({
|
|
|
4186
4444
|
[clusterBestPricesRest, wsBestPrices]
|
|
4187
4445
|
);
|
|
4188
4446
|
const clusterBestPriceVenuesByOutcomeId = clusterMidpointResult.bestPriceVenuesByOutcomeId;
|
|
4189
|
-
const clusterMidpointMarkets = useMemo7(() => {
|
|
4190
|
-
var _a2;
|
|
4191
|
-
if (!resolvedMarket) return [];
|
|
4192
|
-
return (_a2 = resolvedMarket.venueMarkets) != null ? _a2 : [];
|
|
4193
|
-
}, [resolvedMarket]);
|
|
4194
|
-
const tradableVenues = useMemo7(() => {
|
|
4195
|
-
var _a2;
|
|
4196
|
-
if (clusterMidpointMarkets.length === 0) return null;
|
|
4197
|
-
const set = /* @__PURE__ */ new Set();
|
|
4198
|
-
for (const market of clusterMidpointMarkets) {
|
|
4199
|
-
for (const outcome of (_a2 = market.venueMarketOutcomes) != null ? _a2 : []) {
|
|
4200
|
-
if (clusterMidpoints.has(outcome.id)) {
|
|
4201
|
-
set.add(market.venue);
|
|
4202
|
-
break;
|
|
4203
|
-
}
|
|
4204
|
-
}
|
|
4205
|
-
}
|
|
4206
|
-
if (set.size === 0) return null;
|
|
4207
|
-
return set;
|
|
4208
|
-
}, [clusterMidpointMarkets, clusterMidpoints]);
|
|
4209
4447
|
const model = useMemo7(() => {
|
|
4210
4448
|
return buildMarketDetailsModel({
|
|
4211
4449
|
venueMarkets,
|
|
@@ -4239,7 +4477,7 @@ var MarketDetailsContent = ({
|
|
|
4239
4477
|
const marketTradingState = useMemo7(() => {
|
|
4240
4478
|
return resolveMarketTradingState2(scopedMarketForCard);
|
|
4241
4479
|
}, [scopedMarketForCard]);
|
|
4242
|
-
const isOutcomeSelectionLocked = marketTradingState.isTradingDisabled;
|
|
4480
|
+
const isOutcomeSelectionLocked = showResolvingState || marketTradingState.isTradingDisabled;
|
|
4243
4481
|
const isUpcomingMarket = marketTradingState.kind === "unopened";
|
|
4244
4482
|
const marketStatePresentation = resolveTradingStatePresentation(labels, marketTradingState);
|
|
4245
4483
|
const resolvedWinningOutcomeLabel = resolveResolvedOutcomeLabel({
|
|
@@ -4363,6 +4601,7 @@ var MarketDetailsContent = ({
|
|
|
4363
4601
|
clusterBestMidpointsByOutcomeId,
|
|
4364
4602
|
clusterBestPricesRest,
|
|
4365
4603
|
clusterBestPriceVenuesByOutcomeId,
|
|
4604
|
+
clusterMidpointResult.isLoading,
|
|
4366
4605
|
headerOutcomeItemsOverride,
|
|
4367
4606
|
model,
|
|
4368
4607
|
scopedMarketForCard,
|
|
@@ -4526,11 +4765,16 @@ var MarketDetailsContent = ({
|
|
|
4526
4765
|
const handleRetryOrderBook = () => {
|
|
4527
4766
|
void refetchOrderBook();
|
|
4528
4767
|
};
|
|
4529
|
-
const orderbookState =
|
|
4768
|
+
const orderbookState = showResolvingState ? {
|
|
4769
|
+
kind: "disabled",
|
|
4770
|
+
title: labels.marketDetails.resolvingTitle,
|
|
4771
|
+
description: labels.marketDetails.resolvingDescription,
|
|
4772
|
+
icon: /* @__PURE__ */ jsx11(LoadingIcon, { size: "small" })
|
|
4773
|
+
} : marketTradingState.isTradingDisabled ? {
|
|
4530
4774
|
kind: "disabled",
|
|
4531
4775
|
title: marketStatePresentation.title,
|
|
4532
4776
|
description: marketStatePresentation.description,
|
|
4533
|
-
icon: /* @__PURE__ */
|
|
4777
|
+
icon: /* @__PURE__ */ jsx11(Icon, { name: marketStatePresentation.iconName, className: "h-5 w-5", "aria-hidden": "true" })
|
|
4534
4778
|
} : isOrderBookLoading ? { kind: "loading" } : hasOrderBookError ? {
|
|
4535
4779
|
kind: "error",
|
|
4536
4780
|
title: labels.marketDetails.orderBookUnavailableTitle,
|
|
@@ -4546,7 +4790,7 @@ var MarketDetailsContent = ({
|
|
|
4546
4790
|
description: labels.marketDetails.orderBookEmptyDescription
|
|
4547
4791
|
} : { kind: "data" };
|
|
4548
4792
|
if (marketId && !resolvedMarket) {
|
|
4549
|
-
return /* @__PURE__ */
|
|
4793
|
+
return /* @__PURE__ */ jsx11(
|
|
4550
4794
|
MarketDetailsNotFoundState,
|
|
4551
4795
|
{
|
|
4552
4796
|
marketId,
|
|
@@ -4556,7 +4800,7 @@ var MarketDetailsContent = ({
|
|
|
4556
4800
|
);
|
|
4557
4801
|
}
|
|
4558
4802
|
if (!model) {
|
|
4559
|
-
return /* @__PURE__ */
|
|
4803
|
+
return /* @__PURE__ */ jsx11(
|
|
4560
4804
|
MarketDetailsUnavailableState,
|
|
4561
4805
|
{
|
|
4562
4806
|
marketId,
|
|
@@ -4565,18 +4809,18 @@ var MarketDetailsContent = ({
|
|
|
4565
4809
|
}
|
|
4566
4810
|
);
|
|
4567
4811
|
}
|
|
4568
|
-
return /* @__PURE__ */
|
|
4812
|
+
return /* @__PURE__ */ jsxs9(
|
|
4569
4813
|
Card,
|
|
4570
4814
|
{
|
|
4571
4815
|
className: cn(
|
|
4572
4816
|
"group/agg-market-card",
|
|
4573
4817
|
"w-full rounded-agg-2xl text-left outline-none",
|
|
4574
|
-
marketTradingState.isTradingDisabled && "agg-market-card-readonly",
|
|
4818
|
+
(showResolvingState || marketTradingState.isTradingDisabled) && "agg-market-card-readonly",
|
|
4575
4819
|
marketDetailsBaseCardClassName,
|
|
4576
4820
|
classNames == null ? void 0 : classNames.root
|
|
4577
4821
|
),
|
|
4578
4822
|
children: [
|
|
4579
|
-
/* @__PURE__ */
|
|
4823
|
+
/* @__PURE__ */ jsxs9(
|
|
4580
4824
|
"div",
|
|
4581
4825
|
{
|
|
4582
4826
|
"data-market-id": marketId || void 0,
|
|
@@ -4587,7 +4831,7 @@ var MarketDetailsContent = ({
|
|
|
4587
4831
|
classNames == null ? void 0 : classNames.header
|
|
4588
4832
|
),
|
|
4589
4833
|
children: [
|
|
4590
|
-
/* @__PURE__ */
|
|
4834
|
+
/* @__PURE__ */ jsxs9(
|
|
4591
4835
|
"button",
|
|
4592
4836
|
{
|
|
4593
4837
|
className: cn(
|
|
@@ -4601,8 +4845,8 @@ var MarketDetailsContent = ({
|
|
|
4601
4845
|
"aria-controls": detailsContentId,
|
|
4602
4846
|
"aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
|
|
4603
4847
|
children: [
|
|
4604
|
-
/* @__PURE__ */
|
|
4605
|
-
!compactHeader ? /* @__PURE__ */
|
|
4848
|
+
/* @__PURE__ */ jsxs9("div", { className: "agg-market-summary flex min-w-24 flex-1 items-center gap-3 md:gap-4", children: [
|
|
4849
|
+
!compactHeader ? /* @__PURE__ */ jsx11(
|
|
4606
4850
|
RemoteImage,
|
|
4607
4851
|
{
|
|
4608
4852
|
src: optimizedImageUrl3(model.image, 60),
|
|
@@ -4610,8 +4854,8 @@ var MarketDetailsContent = ({
|
|
|
4610
4854
|
className: "agg-market-image size-12 rounded-agg-lg object-cover md:size-[60px]"
|
|
4611
4855
|
}
|
|
4612
4856
|
) : null,
|
|
4613
|
-
/* @__PURE__ */
|
|
4614
|
-
/* @__PURE__ */
|
|
4857
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex min-w-24 flex-col", children: [
|
|
4858
|
+
/* @__PURE__ */ jsx11(Tooltip, { content: model.title, side: "top", children: /* @__PURE__ */ jsx11("div", { className: "min-w-0", children: /* @__PURE__ */ jsx11(
|
|
4615
4859
|
Typography,
|
|
4616
4860
|
{
|
|
4617
4861
|
as: "h3",
|
|
@@ -4620,7 +4864,7 @@ var MarketDetailsContent = ({
|
|
|
4620
4864
|
children: model.title
|
|
4621
4865
|
}
|
|
4622
4866
|
) }) }),
|
|
4623
|
-
/* @__PURE__ */
|
|
4867
|
+
/* @__PURE__ */ jsx11("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsx11(
|
|
4624
4868
|
Typography,
|
|
4625
4869
|
{
|
|
4626
4870
|
variant: "label",
|
|
@@ -4628,8 +4872,8 @@ var MarketDetailsContent = ({
|
|
|
4628
4872
|
children: subtitleOverride != null ? subtitleOverride : model.subtitle
|
|
4629
4873
|
}
|
|
4630
4874
|
) }),
|
|
4631
|
-
marketTradingState.isTradingDisabled && marketTradingState.kind !== "resolved" && !isUpcomingMarket ? /* @__PURE__ */
|
|
4632
|
-
/* @__PURE__ */
|
|
4875
|
+
!showResolvingState && marketTradingState.isTradingDisabled && marketTradingState.kind !== "resolved" && !isUpcomingMarket ? /* @__PURE__ */ jsxs9("div", { className: "mt-2 flex flex-wrap items-center gap-2 justify-center md:justify-start", children: [
|
|
4876
|
+
/* @__PURE__ */ jsxs9(
|
|
4633
4877
|
"span",
|
|
4634
4878
|
{
|
|
4635
4879
|
className: cn(
|
|
@@ -4637,7 +4881,7 @@ var MarketDetailsContent = ({
|
|
|
4637
4881
|
resolveTradingStateBadgeClassName(marketTradingState.kind)
|
|
4638
4882
|
),
|
|
4639
4883
|
children: [
|
|
4640
|
-
/* @__PURE__ */
|
|
4884
|
+
/* @__PURE__ */ jsx11(
|
|
4641
4885
|
Icon,
|
|
4642
4886
|
{
|
|
4643
4887
|
name: marketStatePresentation.iconName,
|
|
@@ -4645,20 +4889,23 @@ var MarketDetailsContent = ({
|
|
|
4645
4889
|
className: "h-3.5 w-3.5"
|
|
4646
4890
|
}
|
|
4647
4891
|
),
|
|
4648
|
-
/* @__PURE__ */
|
|
4892
|
+
/* @__PURE__ */ jsx11("span", { children: marketStatePresentation.badgeLabel })
|
|
4649
4893
|
]
|
|
4650
4894
|
}
|
|
4651
4895
|
),
|
|
4652
|
-
marketStatePresentation.timestampLabel ? /* @__PURE__ */
|
|
4653
|
-
marketStatePresentation.winningOutcomeLabel ? /* @__PURE__ */
|
|
4896
|
+
marketStatePresentation.timestampLabel ? /* @__PURE__ */ jsx11(Typography, { variant: "label", className: "text-agg-muted-foreground", children: marketStatePresentation.timestampLabel }) : null,
|
|
4897
|
+
marketStatePresentation.winningOutcomeLabel ? /* @__PURE__ */ jsx11(Typography, { variant: "label", className: "text-agg-muted-foreground", children: marketStatePresentation.winningOutcomeLabel }) : null
|
|
4654
4898
|
] }) : null
|
|
4655
4899
|
] })
|
|
4656
4900
|
] }),
|
|
4657
|
-
!compactHeader ? /* @__PURE__ */
|
|
4901
|
+
!compactHeader ? /* @__PURE__ */ jsx11(Typography, { as: "div", variant: "heading", className: "agg-market-headline shrink-0", children: formatProbabilityPercent(headlineProbability, formatPercent) }) : null
|
|
4658
4902
|
]
|
|
4659
4903
|
}
|
|
4660
4904
|
),
|
|
4661
|
-
|
|
4905
|
+
showResolvingState ? /* @__PURE__ */ jsx11("div", { className: "agg-outcomes flex w-full items-center justify-end md:w-auto md:shrink-0", children: /* @__PURE__ */ jsxs9("span", { className: "inline-flex h-9 min-w-35 items-center justify-center gap-2 rounded-agg-full bg-agg-secondary-hover px-5 py-1.5 text-agg-sm", children: [
|
|
4906
|
+
/* @__PURE__ */ jsx11(LoadingIcon, { size: "small" }),
|
|
4907
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "body", children: labels.marketDetails.resolvingBadge })
|
|
4908
|
+
] }) }) : marketTradingState.kind === "resolved" && marketTradingState.winningOutcome ? /* @__PURE__ */ jsx11("div", { className: "agg-outcomes flex w-full items-center justify-end md:w-auto md:shrink-0", children: /* @__PURE__ */ jsxs9(
|
|
4662
4909
|
"span",
|
|
4663
4910
|
{
|
|
4664
4911
|
className: cn(
|
|
@@ -4671,7 +4918,7 @@ var MarketDetailsContent = ({
|
|
|
4671
4918
|
"border-transparent bg-agg-secondary-hover"
|
|
4672
4919
|
),
|
|
4673
4920
|
children: [
|
|
4674
|
-
/* @__PURE__ */
|
|
4921
|
+
/* @__PURE__ */ jsx11(
|
|
4675
4922
|
Icon,
|
|
4676
4923
|
{
|
|
4677
4924
|
name: marketTradingState.winningOutcome.label.trim().toLowerCase() === "yes" ? "check-circle" : "cross-circle",
|
|
@@ -4682,12 +4929,12 @@ var MarketDetailsContent = ({
|
|
|
4682
4929
|
)
|
|
4683
4930
|
}
|
|
4684
4931
|
),
|
|
4685
|
-
/* @__PURE__ */
|
|
4932
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "body", children: labels.eventMarketPage.resolvedOutcome(
|
|
4686
4933
|
resolvedWinningOutcomeLabel != null ? resolvedWinningOutcomeLabel : marketTradingState.winningOutcome.label
|
|
4687
4934
|
) })
|
|
4688
4935
|
]
|
|
4689
4936
|
}
|
|
4690
|
-
) }) : isUpcomingMarket ? /* @__PURE__ */
|
|
4937
|
+
) }) : isUpcomingMarket ? /* @__PURE__ */ jsx11("div", { className: "agg-outcomes flex w-full items-center justify-end md:w-auto md:shrink-0", children: /* @__PURE__ */ jsxs9(
|
|
4691
4938
|
"span",
|
|
4692
4939
|
{
|
|
4693
4940
|
className: cn(
|
|
@@ -4696,7 +4943,7 @@ var MarketDetailsContent = ({
|
|
|
4696
4943
|
resolveTradingStateBadgeClassName(marketTradingState.kind)
|
|
4697
4944
|
),
|
|
4698
4945
|
children: [
|
|
4699
|
-
/* @__PURE__ */
|
|
4946
|
+
/* @__PURE__ */ jsx11(
|
|
4700
4947
|
Icon,
|
|
4701
4948
|
{
|
|
4702
4949
|
name: marketStatePresentation.iconName,
|
|
@@ -4705,10 +4952,10 @@ var MarketDetailsContent = ({
|
|
|
4705
4952
|
"aria-hidden": "true"
|
|
4706
4953
|
}
|
|
4707
4954
|
),
|
|
4708
|
-
/* @__PURE__ */
|
|
4955
|
+
/* @__PURE__ */ jsx11("span", { children: marketStatePresentation.badgeLabel })
|
|
4709
4956
|
]
|
|
4710
4957
|
}
|
|
4711
|
-
) }) : /* @__PURE__ */
|
|
4958
|
+
) }) : /* @__PURE__ */ jsx11(
|
|
4712
4959
|
"div",
|
|
4713
4960
|
{
|
|
4714
4961
|
className: "agg-outcomes flex w-full flex-wrap gap-2 md:w-auto md:shrink-0 md:flex-nowrap",
|
|
@@ -4717,7 +4964,7 @@ var MarketDetailsContent = ({
|
|
|
4717
4964
|
onKeyDown: (eventToHandle) => handleOutcomeKeyDown(eventToHandle),
|
|
4718
4965
|
children: headerOutcomeItems.map((item) => {
|
|
4719
4966
|
const isActiveOutcome = item.id === selectedOutcomeId;
|
|
4720
|
-
return /* @__PURE__ */
|
|
4967
|
+
return /* @__PURE__ */ jsx11(
|
|
4721
4968
|
MarketDetailsOutcomeButton,
|
|
4722
4969
|
{
|
|
4723
4970
|
enforceFixedWidth: headerOutcomeVariant != null,
|
|
@@ -4744,8 +4991,8 @@ var MarketDetailsContent = ({
|
|
|
4744
4991
|
]
|
|
4745
4992
|
}
|
|
4746
4993
|
),
|
|
4747
|
-
headerAccessory ? /* @__PURE__ */
|
|
4748
|
-
/* @__PURE__ */
|
|
4994
|
+
headerAccessory ? /* @__PURE__ */ jsx11("div", { className: "agg-market-card-accessory border-t border-agg-separator", children: headerAccessory }) : null,
|
|
4995
|
+
/* @__PURE__ */ jsx11(
|
|
4749
4996
|
"div",
|
|
4750
4997
|
{
|
|
4751
4998
|
id: detailsContentId,
|
|
@@ -4759,9 +5006,9 @@ var MarketDetailsContent = ({
|
|
|
4759
5006
|
isOpened ? "grid-rows-[1fr] opacity-100" : "pointer-events-none grid-rows-[0fr] opacity-0"
|
|
4760
5007
|
),
|
|
4761
5008
|
"aria-hidden": !isOpened,
|
|
4762
|
-
children: /* @__PURE__ */
|
|
4763
|
-
/* @__PURE__ */
|
|
4764
|
-
/* @__PURE__ */
|
|
5009
|
+
children: /* @__PURE__ */ jsxs9("div", { className: "min-h-0", children: [
|
|
5010
|
+
/* @__PURE__ */ jsx11("div", { className: "h-px w-full bg-agg-separator" }),
|
|
5011
|
+
/* @__PURE__ */ jsxs9(
|
|
4765
5012
|
"div",
|
|
4766
5013
|
{
|
|
4767
5014
|
className: cn(
|
|
@@ -4775,8 +5022,8 @@ var MarketDetailsContent = ({
|
|
|
4775
5022
|
) : "translate-y-5 opacity-0"
|
|
4776
5023
|
),
|
|
4777
5024
|
children: [
|
|
4778
|
-
!isResolvedMarket ? /* @__PURE__ */
|
|
4779
|
-
/* @__PURE__ */
|
|
5025
|
+
!isResolvedMarket ? /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
5026
|
+
/* @__PURE__ */ jsx11("div", { className: cn("block", classNames == null ? void 0 : classNames.tabs), children: /* @__PURE__ */ jsx11(
|
|
4780
5027
|
Tabs,
|
|
4781
5028
|
{
|
|
4782
5029
|
ariaLabel: labels.marketDetails.tabsAria,
|
|
@@ -4787,10 +5034,10 @@ var MarketDetailsContent = ({
|
|
|
4787
5034
|
className: "agg-market-tabs flex! w-full px-5"
|
|
4788
5035
|
}
|
|
4789
5036
|
) }),
|
|
4790
|
-
/* @__PURE__ */
|
|
5037
|
+
/* @__PURE__ */ jsx11("div", { className: "h-px w-full bg-agg-separator" })
|
|
4791
5038
|
] }) : null,
|
|
4792
|
-
/* @__PURE__ */
|
|
4793
|
-
effectiveSelectedTab === "order-book" ? /* @__PURE__ */
|
|
5039
|
+
/* @__PURE__ */ jsxs9("div", { className: cn("agg-market-card-body p-0", classNames == null ? void 0 : classNames.content), children: [
|
|
5040
|
+
effectiveSelectedTab === "order-book" ? /* @__PURE__ */ jsx11(
|
|
4794
5041
|
OrderbookWithStates,
|
|
4795
5042
|
{
|
|
4796
5043
|
state: orderbookState,
|
|
@@ -4816,7 +5063,7 @@ var MarketDetailsContent = ({
|
|
|
4816
5063
|
wrapperClassName: classNames == null ? void 0 : classNames.orderBook
|
|
4817
5064
|
}
|
|
4818
5065
|
) : null,
|
|
4819
|
-
isOpened && effectiveSelectedTab === "graph" ? /* @__PURE__ */
|
|
5066
|
+
isOpened && effectiveSelectedTab === "graph" ? /* @__PURE__ */ jsx11(
|
|
4820
5067
|
MarketDetailsGraphPanel,
|
|
4821
5068
|
{
|
|
4822
5069
|
venueMarkets: model.market.venueMarkets,
|
|
@@ -4832,13 +5079,13 @@ var MarketDetailsContent = ({
|
|
|
4832
5079
|
classNames: { graph: classNames == null ? void 0 : classNames.graph, footer: classNames == null ? void 0 : classNames.footer }
|
|
4833
5080
|
}
|
|
4834
5081
|
) : null,
|
|
4835
|
-
effectiveSelectedTab === "other" ? /* @__PURE__ */
|
|
5082
|
+
effectiveSelectedTab === "other" ? /* @__PURE__ */ jsx11("div", { className: "agg-market-meta flex flex-col gap-4", children: otherContent != null ? otherContent : /* @__PURE__ */ jsx11("div", { className: "agg-market-meta-list grid grid-cols-1 gap-3", children: otherRows.map((row) => /* @__PURE__ */ jsxs9(
|
|
4836
5083
|
"div",
|
|
4837
5084
|
{
|
|
4838
5085
|
className: "agg-market-meta-row flex items-center justify-between rounded-agg-xl bg-agg-secondary-hover px-4 py-3",
|
|
4839
5086
|
children: [
|
|
4840
|
-
/* @__PURE__ */
|
|
4841
|
-
/* @__PURE__ */
|
|
5087
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "label", className: "text-agg-muted-foreground", children: row.label }),
|
|
5088
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "body", className: "text-right", children: row.value })
|
|
4842
5089
|
]
|
|
4843
5090
|
},
|
|
4844
5091
|
row.label
|
|
@@ -4856,9 +5103,9 @@ var MarketDetailsContent = ({
|
|
|
4856
5103
|
};
|
|
4857
5104
|
var MarketDetails = (_a) => {
|
|
4858
5105
|
var _b = _a, { isOpened } = _b, props = __objRest(_b, ["isOpened"]);
|
|
4859
|
-
const labels =
|
|
5106
|
+
const labels = useLabels8();
|
|
4860
5107
|
if (props.isLoading) {
|
|
4861
|
-
return /* @__PURE__ */
|
|
5108
|
+
return /* @__PURE__ */ jsx11(
|
|
4862
5109
|
Skeleton,
|
|
4863
5110
|
{
|
|
4864
5111
|
view: "market-details-minified",
|
|
@@ -4868,7 +5115,7 @@ var MarketDetails = (_a) => {
|
|
|
4868
5115
|
);
|
|
4869
5116
|
}
|
|
4870
5117
|
if ("venueMarkets" in props && props.venueMarkets) {
|
|
4871
|
-
return /* @__PURE__ */
|
|
5118
|
+
return /* @__PURE__ */ jsx11(
|
|
4872
5119
|
MarketDetailsContent,
|
|
4873
5120
|
__spreadProps(__spreadValues({}, props), {
|
|
4874
5121
|
isOpened,
|
|
@@ -4880,7 +5127,7 @@ var MarketDetails = (_a) => {
|
|
|
4880
5127
|
);
|
|
4881
5128
|
}
|
|
4882
5129
|
const { classNames: fallbackClassNames } = props;
|
|
4883
|
-
return /* @__PURE__ */
|
|
5130
|
+
return /* @__PURE__ */ jsx11(MarketDetailsUnavailableState, { classNames: fallbackClassNames });
|
|
4884
5131
|
};
|
|
4885
5132
|
MarketDetails.displayName = "MarketDetails";
|
|
4886
5133
|
var AFFIRMATIVE_WINNER_LABELS = /* @__PURE__ */ new Set(["yes", "up", "buy", "long", "true"]);
|
|
@@ -4934,10 +5181,11 @@ var MarketDetailsList = ({
|
|
|
4934
5181
|
defaultTab,
|
|
4935
5182
|
classNames,
|
|
4936
5183
|
live,
|
|
5184
|
+
showResolvingState = false,
|
|
4937
5185
|
midpointsResult
|
|
4938
5186
|
}) => {
|
|
4939
5187
|
var _a, _b;
|
|
4940
|
-
const labels =
|
|
5188
|
+
const labels = useLabels8();
|
|
4941
5189
|
const tradingContext = useEventTradingContext2();
|
|
4942
5190
|
const selectedMarketId = (_a = tradingContext == null ? void 0 : tradingContext.selectedMarketId) != null ? _a : null;
|
|
4943
5191
|
const [expandedMarketId, setExpandedMarketId] = useState5(null);
|
|
@@ -4985,6 +5233,7 @@ var MarketDetailsList = ({
|
|
|
4985
5233
|
const winnerMarketId = resolveResolvedWinnerMarketId(sourceMarkets, eventTradingState);
|
|
4986
5234
|
return {
|
|
4987
5235
|
primary: moveMarketToFront(sourceMarkets, winnerMarketId),
|
|
5236
|
+
closed: [],
|
|
4988
5237
|
upcoming: [],
|
|
4989
5238
|
resolved: []
|
|
4990
5239
|
};
|
|
@@ -5017,8 +5266,12 @@ var MarketDetailsList = ({
|
|
|
5017
5266
|
return [];
|
|
5018
5267
|
}, [areResolvedMarketsVisible, groupedMarkets.resolved, isResolvedEvent]);
|
|
5019
5268
|
const displayedMarkets = useMemo7(() => {
|
|
5020
|
-
return [
|
|
5021
|
-
|
|
5269
|
+
return [
|
|
5270
|
+
...groupedMarkets.primary,
|
|
5271
|
+
...showResolvingState ? groupedMarkets.closed : [],
|
|
5272
|
+
...visibleResolvedMarkets
|
|
5273
|
+
];
|
|
5274
|
+
}, [groupedMarkets.closed, groupedMarkets.primary, showResolvingState, visibleResolvedMarkets]);
|
|
5022
5275
|
const hasPrefetchedMarkets = !!providedMarkets || !!((_b = eventTradingState == null ? void 0 : eventTradingState.marketStates) == null ? void 0 : _b.length);
|
|
5023
5276
|
const midpointEligibleMarkets = useMemo7(() => {
|
|
5024
5277
|
return displayedMarkets.filter(
|
|
@@ -5070,7 +5323,7 @@ var MarketDetailsList = ({
|
|
|
5070
5323
|
tradingContext == null ? void 0 : tradingContext.selectMarket(market.id, market);
|
|
5071
5324
|
};
|
|
5072
5325
|
if (!hasPrefetchedMarkets && isLoading) {
|
|
5073
|
-
return /* @__PURE__ */
|
|
5326
|
+
return /* @__PURE__ */ jsx11(
|
|
5074
5327
|
Skeleton,
|
|
5075
5328
|
{
|
|
5076
5329
|
view: "market-details-minified",
|
|
@@ -5080,29 +5333,29 @@ var MarketDetailsList = ({
|
|
|
5080
5333
|
);
|
|
5081
5334
|
}
|
|
5082
5335
|
if (!hasPrefetchedMarkets && error) {
|
|
5083
|
-
return /* @__PURE__ */
|
|
5336
|
+
return /* @__PURE__ */ jsx11(
|
|
5084
5337
|
StateMessage,
|
|
5085
5338
|
{
|
|
5086
5339
|
title: labels.marketDetails.unavailableTitle,
|
|
5087
5340
|
description: labels.marketDetails.unavailableDescription,
|
|
5088
|
-
icon: /* @__PURE__ */
|
|
5341
|
+
icon: /* @__PURE__ */ jsx11(SearchEmptyIcon, {}),
|
|
5089
5342
|
classNames: { root: "min-h-[280px] md:min-h-[320px]" }
|
|
5090
5343
|
}
|
|
5091
5344
|
);
|
|
5092
5345
|
}
|
|
5093
5346
|
if (displayedMarkets.length === 0 && !shouldShowResolvedToggle) {
|
|
5094
5347
|
const hasSourceMarkets = sourceMarkets.length > 0;
|
|
5095
|
-
return /* @__PURE__ */
|
|
5348
|
+
return /* @__PURE__ */ jsx11(
|
|
5096
5349
|
StateMessage,
|
|
5097
5350
|
{
|
|
5098
5351
|
title: hasSourceMarkets ? isResolvedEvent ? labels.markets.emptyResolved : labels.markets.emptyNoOpen : labels.marketDetails.notFoundTitle,
|
|
5099
5352
|
description: hasSourceMarkets ? void 0 : labels.marketDetails.notFoundDescription,
|
|
5100
|
-
icon: /* @__PURE__ */
|
|
5353
|
+
icon: /* @__PURE__ */ jsx11(SearchEmptyIcon, {}),
|
|
5101
5354
|
classNames: { root: "min-h-[280px] md:min-h-[320px]" }
|
|
5102
5355
|
}
|
|
5103
5356
|
);
|
|
5104
5357
|
}
|
|
5105
|
-
const renderMarketCard = (market) => /* @__PURE__ */
|
|
5358
|
+
const renderMarketCard = (market) => /* @__PURE__ */ jsx11("div", { children: /* @__PURE__ */ jsx11(
|
|
5106
5359
|
MarketDetails,
|
|
5107
5360
|
{
|
|
5108
5361
|
marketId: market.id,
|
|
@@ -5124,14 +5377,16 @@ var MarketDetailsList = ({
|
|
|
5124
5377
|
ariaLabel: market.question,
|
|
5125
5378
|
classNames: { root: cn("agg-market-list-item", classNames == null ? void 0 : classNames.item) },
|
|
5126
5379
|
live,
|
|
5380
|
+
showResolvingState,
|
|
5127
5381
|
midpointsFallback,
|
|
5128
5382
|
midpointsFallbackVenues,
|
|
5129
5383
|
midpointsResult
|
|
5130
5384
|
}
|
|
5131
5385
|
) }, market.id);
|
|
5132
|
-
return /* @__PURE__ */
|
|
5386
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn("agg-market-list flex flex-col gap-3", classNames == null ? void 0 : classNames.root), children: [
|
|
5133
5387
|
groupedMarkets.primary.map((market) => renderMarketCard(market)),
|
|
5134
|
-
|
|
5388
|
+
showResolvingState ? groupedMarkets.closed.map((market) => renderMarketCard(market)) : null,
|
|
5389
|
+
shouldShowResolvedToggle ? /* @__PURE__ */ jsx11(
|
|
5135
5390
|
Button,
|
|
5136
5391
|
{
|
|
5137
5392
|
variant: "tertiary",
|
|
@@ -5141,7 +5396,7 @@ var MarketDetailsList = ({
|
|
|
5141
5396
|
setAreResolvedMarketsVisible((isVisible) => !isVisible);
|
|
5142
5397
|
},
|
|
5143
5398
|
"aria-expanded": areResolvedMarketsVisible,
|
|
5144
|
-
suffix: /* @__PURE__ */
|
|
5399
|
+
suffix: /* @__PURE__ */ jsx11(
|
|
5145
5400
|
Icon,
|
|
5146
5401
|
{
|
|
5147
5402
|
name: areResolvedMarketsVisible ? "chevron-up" : "chevron-down",
|
|
@@ -5165,8 +5420,8 @@ import {
|
|
|
5165
5420
|
useAppConfig as useAppConfig2,
|
|
5166
5421
|
useCategories,
|
|
5167
5422
|
useCategoryChildren,
|
|
5168
|
-
useLabels as
|
|
5169
|
-
useSdkUiConfig as
|
|
5423
|
+
useLabels as useLabels10,
|
|
5424
|
+
useSdkUiConfig as useSdkUiConfig6,
|
|
5170
5425
|
useVenueEvents,
|
|
5171
5426
|
useVenueMarketMidpoints as useVenueMarketMidpoints2
|
|
5172
5427
|
} from "@agg-build/hooks";
|
|
@@ -5176,7 +5431,7 @@ import { useEffect as useEffect8, useMemo as useMemo10, useRef as useRef8, useSt
|
|
|
5176
5431
|
|
|
5177
5432
|
// src/events/list/category-sidebar.tsx
|
|
5178
5433
|
import { useMemo as useMemo8 } from "react";
|
|
5179
|
-
import { jsx as
|
|
5434
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5180
5435
|
var rowBase = cn(
|
|
5181
5436
|
"flex min-h-11 w-full items-center gap-3 rounded-[6px] px-3 py-3",
|
|
5182
5437
|
"text-left text-agg-sm font-agg-normal leading-agg-5",
|
|
@@ -5218,7 +5473,7 @@ var CategorySidebar = ({
|
|
|
5218
5473
|
}) => {
|
|
5219
5474
|
var _a, _b;
|
|
5220
5475
|
const hasKnownChildren = ((_b = (_a = childrenByParentId.get(entry.id)) == null ? void 0 : _a.length) != null ? _b : 0) > 0;
|
|
5221
|
-
return /* @__PURE__ */
|
|
5476
|
+
return /* @__PURE__ */ jsxs10(
|
|
5222
5477
|
"button",
|
|
5223
5478
|
{
|
|
5224
5479
|
type: "button",
|
|
@@ -5226,8 +5481,8 @@ var CategorySidebar = ({
|
|
|
5226
5481
|
className: isSelected ? selectedRowClassName : idleRowClassName,
|
|
5227
5482
|
onClick,
|
|
5228
5483
|
children: [
|
|
5229
|
-
/* @__PURE__ */
|
|
5230
|
-
hasKnownChildren ? /* @__PURE__ */
|
|
5484
|
+
/* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate first-letter:uppercase", children: entry.label }),
|
|
5485
|
+
hasKnownChildren ? /* @__PURE__ */ jsx12(
|
|
5231
5486
|
Icon,
|
|
5232
5487
|
{
|
|
5233
5488
|
name: isExpanded ? "chevron-up" : "chevron-down",
|
|
@@ -5235,7 +5490,7 @@ var CategorySidebar = ({
|
|
|
5235
5490
|
color: "currentColor",
|
|
5236
5491
|
className: "shrink-0 text-agg-muted-foreground"
|
|
5237
5492
|
}
|
|
5238
|
-
) : /* @__PURE__ */
|
|
5493
|
+
) : /* @__PURE__ */ jsx12("span", { className: "shrink-0 text-agg-muted-foreground", children: entry.eventCount })
|
|
5239
5494
|
]
|
|
5240
5495
|
},
|
|
5241
5496
|
entry.id
|
|
@@ -5253,27 +5508,27 @@ var CategorySidebar = ({
|
|
|
5253
5508
|
const hasKnownChildren = childCategories.length > 0;
|
|
5254
5509
|
const isExpanded = ((_d = categoryPath[depth]) == null ? void 0 : _d.id) === category.id && !collapsedCategoryIds.has(category.id);
|
|
5255
5510
|
const isSelected = ((_e = categoryPath[depth]) == null ? void 0 : _e.id) === category.id && categoryPath.length === depth + 1;
|
|
5256
|
-
return /* @__PURE__ */
|
|
5511
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex w-full flex-col", children: [
|
|
5257
5512
|
renderRow({
|
|
5258
5513
|
entry,
|
|
5259
5514
|
isExpanded,
|
|
5260
5515
|
isSelected,
|
|
5261
5516
|
onClick: () => onToggleCategory({ entry, depth, hasKnownChildren, isExpanded, isSelected })
|
|
5262
5517
|
}),
|
|
5263
|
-
/* @__PURE__ */
|
|
5518
|
+
/* @__PURE__ */ jsx12(
|
|
5264
5519
|
"div",
|
|
5265
5520
|
{
|
|
5266
5521
|
className: cn(
|
|
5267
5522
|
"grid transition-[grid-template-rows] duration-150 ease-in-out motion-reduce:transition-none",
|
|
5268
5523
|
isExpanded ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
5269
5524
|
),
|
|
5270
|
-
children: /* @__PURE__ */
|
|
5525
|
+
children: /* @__PURE__ */ jsx12("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx12("div", { className: "flex w-full flex-col gap-1 pl-4 pt-1", children: childCategories.map((child) => renderBranch(child, depth + 1)) }) })
|
|
5271
5526
|
}
|
|
5272
5527
|
)
|
|
5273
5528
|
] }, category.id);
|
|
5274
5529
|
};
|
|
5275
|
-
return /* @__PURE__ */
|
|
5276
|
-
/* @__PURE__ */
|
|
5530
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex w-full flex-col gap-1", children: [
|
|
5531
|
+
/* @__PURE__ */ jsxs10(
|
|
5277
5532
|
"button",
|
|
5278
5533
|
{
|
|
5279
5534
|
type: "button",
|
|
@@ -5281,8 +5536,8 @@ var CategorySidebar = ({
|
|
|
5281
5536
|
className: !isDrilledIn ? selectedRowClassName : idleRowClassName,
|
|
5282
5537
|
onClick: onSelectAll,
|
|
5283
5538
|
children: [
|
|
5284
|
-
/* @__PURE__ */
|
|
5285
|
-
/* @__PURE__ */
|
|
5539
|
+
/* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate", children: labels.subcategoriesAll }),
|
|
5540
|
+
/* @__PURE__ */ jsx12("span", { className: "shrink-0 text-agg-muted-foreground", children: totalEventCount })
|
|
5286
5541
|
]
|
|
5287
5542
|
}
|
|
5288
5543
|
),
|
|
@@ -5292,7 +5547,7 @@ var CategorySidebar = ({
|
|
|
5292
5547
|
CategorySidebar.displayName = "CategorySidebar";
|
|
5293
5548
|
|
|
5294
5549
|
// src/events/list/event-list-tabs.tsx
|
|
5295
|
-
import { getVenueAvailabilityState, useAppConfig, useGeoBlock, useLabels as
|
|
5550
|
+
import { getVenueAvailabilityState, useAppConfig, useGeoBlock, useLabels as useLabels9 } from "@agg-build/hooks";
|
|
5296
5551
|
import { isVenueInactive } from "@agg-build/sdk";
|
|
5297
5552
|
import { useCallback as useCallback3, useEffect as useEffect7, useMemo as useMemo9, useRef as useRef7, useState as useState6 } from "react";
|
|
5298
5553
|
|
|
@@ -5367,16 +5622,16 @@ var getDefaultEventListTabs = (labels) => {
|
|
|
5367
5622
|
};
|
|
5368
5623
|
|
|
5369
5624
|
// src/events/list/event-list-tabs.tsx
|
|
5370
|
-
import { jsx as
|
|
5625
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
5371
5626
|
var renderTabIcon = (tab, isActive) => {
|
|
5372
5627
|
if (tab.iconName === "warning-filled") {
|
|
5373
|
-
return /* @__PURE__ */
|
|
5628
|
+
return /* @__PURE__ */ jsx13(Icon, { name: "warning-filled", size: "small", color: "currentColor" });
|
|
5374
5629
|
}
|
|
5375
5630
|
if (tab.venueLogo) {
|
|
5376
|
-
return /* @__PURE__ */
|
|
5631
|
+
return /* @__PURE__ */ jsx13(VenueLogo, { venue: tab.venueLogo, size: "small" });
|
|
5377
5632
|
}
|
|
5378
5633
|
if (!tab.iconName) return null;
|
|
5379
|
-
return /* @__PURE__ */
|
|
5634
|
+
return /* @__PURE__ */ jsx13(
|
|
5380
5635
|
Icon,
|
|
5381
5636
|
{
|
|
5382
5637
|
name: tab.iconName,
|
|
@@ -5386,7 +5641,7 @@ var renderTabIcon = (tab, isActive) => {
|
|
|
5386
5641
|
);
|
|
5387
5642
|
};
|
|
5388
5643
|
var useEventListTabs = (tabs) => {
|
|
5389
|
-
const labels =
|
|
5644
|
+
const labels = useLabels9();
|
|
5390
5645
|
const { disabledVenues, isLoading: isAppConfigLoading } = useAppConfig();
|
|
5391
5646
|
const { isLocationBlocked } = useGeoBlock();
|
|
5392
5647
|
return useMemo9(() => {
|
|
@@ -5396,13 +5651,14 @@ var useEventListTabs = (tabs) => {
|
|
|
5396
5651
|
const availabilityState = getVenueAvailabilityState({
|
|
5397
5652
|
venueId: tab.venueLogo,
|
|
5398
5653
|
disabledVenues,
|
|
5399
|
-
//
|
|
5400
|
-
//
|
|
5401
|
-
// disabled-ness is only known once `/app/config` resolves
|
|
5402
|
-
//
|
|
5403
|
-
// the flag is unset.
|
|
5404
|
-
//
|
|
5405
|
-
//
|
|
5654
|
+
// A compile-time-inactive venue (novig today) is hidden by default and
|
|
5655
|
+
// un-hidden per-environment by NOVIG_DATA_VISIBLE, so its
|
|
5656
|
+
// disabled-ness is only known once `/app/config` resolves — treating
|
|
5657
|
+
// it as hidden while that request is in flight stops its tab flashing
|
|
5658
|
+
// in and out where the flag is unset. Active venues must NOT be
|
|
5659
|
+
// withheld, or they pop in late. Keyed off the shared inactive-venue
|
|
5660
|
+
// helper rather than a venue name, so launching or retiring one needs
|
|
5661
|
+
// no change here.
|
|
5406
5662
|
isConfigLoading: isAppConfigLoading && isVenueInactive(tab.venueLogo),
|
|
5407
5663
|
isLocationBlocked
|
|
5408
5664
|
});
|
|
@@ -5444,7 +5700,7 @@ var EventListTabs = ({
|
|
|
5444
5700
|
};
|
|
5445
5701
|
});
|
|
5446
5702
|
}, [activeTab, resolvedTabs]);
|
|
5447
|
-
return /* @__PURE__ */
|
|
5703
|
+
return /* @__PURE__ */ jsx13(
|
|
5448
5704
|
Tabs,
|
|
5449
5705
|
{
|
|
5450
5706
|
ariaLabel,
|
|
@@ -5530,7 +5786,7 @@ var useEventListTabsHeaderOverflow = (recomputeOn, options) => {
|
|
|
5530
5786
|
};
|
|
5531
5787
|
|
|
5532
5788
|
// src/events/list/index.tsx
|
|
5533
|
-
import { jsx as
|
|
5789
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5534
5790
|
var SORT_ICON_BY_VALUE = {
|
|
5535
5791
|
volume24hr: "sort-volume-24hr",
|
|
5536
5792
|
topArbitrage: "sort-top-arbitrage",
|
|
@@ -5585,11 +5841,11 @@ var EventList = ({
|
|
|
5585
5841
|
stateRef
|
|
5586
5842
|
}) => {
|
|
5587
5843
|
var _a, _b, _c, _d, _e;
|
|
5588
|
-
const labels =
|
|
5844
|
+
const labels = useLabels10();
|
|
5589
5845
|
const { disabledVenues } = useAppConfig2();
|
|
5590
5846
|
const {
|
|
5591
5847
|
features: { enableVenueEventDiscoveryFilters, showSportsMarkets }
|
|
5592
|
-
} =
|
|
5848
|
+
} = useSdkUiConfig6();
|
|
5593
5849
|
const isDiscoveryFiltersEnabled = enableVenueEventDiscoveryFilters && !search;
|
|
5594
5850
|
const resolvedTabs = useEventListTabs();
|
|
5595
5851
|
const visibleVenues = useMemo10(
|
|
@@ -5608,22 +5864,22 @@ var EventList = ({
|
|
|
5608
5864
|
{
|
|
5609
5865
|
value: "volume24hr",
|
|
5610
5866
|
label: labels.eventList.sortBy24hVolume,
|
|
5611
|
-
icon: /* @__PURE__ */
|
|
5867
|
+
icon: /* @__PURE__ */ jsx14(Icon, { name: SORT_ICON_BY_VALUE.volume24hr, size: "small", color: "currentColor" })
|
|
5612
5868
|
},
|
|
5613
5869
|
{
|
|
5614
5870
|
value: "topArbitrage",
|
|
5615
5871
|
label: labels.eventList.sortByTopArbitrage,
|
|
5616
|
-
icon: /* @__PURE__ */
|
|
5872
|
+
icon: /* @__PURE__ */ jsx14(Icon, { name: SORT_ICON_BY_VALUE.topArbitrage, size: "small", color: "currentColor" })
|
|
5617
5873
|
},
|
|
5618
5874
|
{
|
|
5619
5875
|
value: "volume",
|
|
5620
5876
|
label: labels.eventList.sortByTotalVolume,
|
|
5621
|
-
icon: /* @__PURE__ */
|
|
5877
|
+
icon: /* @__PURE__ */ jsx14(Icon, { name: SORT_ICON_BY_VALUE.volume, size: "small", color: "currentColor" })
|
|
5622
5878
|
},
|
|
5623
5879
|
{
|
|
5624
5880
|
value: "endDate",
|
|
5625
5881
|
label: labels.eventList.sortByEndingSoon,
|
|
5626
|
-
icon: /* @__PURE__ */
|
|
5882
|
+
icon: /* @__PURE__ */ jsx14(Icon, { name: SORT_ICON_BY_VALUE.endDate, size: "small", color: "currentColor" })
|
|
5627
5883
|
}
|
|
5628
5884
|
];
|
|
5629
5885
|
}, [
|
|
@@ -5848,7 +6104,7 @@ var EventList = ({
|
|
|
5848
6104
|
onCategoryRootChange == null ? void 0 : onCategoryRootChange(baseCategoryId != null ? baseCategoryId : void 0);
|
|
5849
6105
|
};
|
|
5850
6106
|
if (shouldRenderLoadingState) {
|
|
5851
|
-
return /* @__PURE__ */
|
|
6107
|
+
return /* @__PURE__ */ jsx14(
|
|
5852
6108
|
Skeleton,
|
|
5853
6109
|
{
|
|
5854
6110
|
view: "event-list",
|
|
@@ -5857,8 +6113,8 @@ var EventList = ({
|
|
|
5857
6113
|
}
|
|
5858
6114
|
);
|
|
5859
6115
|
}
|
|
5860
|
-
return /* @__PURE__ */
|
|
5861
|
-
/* @__PURE__ */
|
|
6116
|
+
return /* @__PURE__ */ jsxs11("section", { className: "agg-event-list flex w-full flex-col gap-2 md:gap-5 t", children: [
|
|
6117
|
+
/* @__PURE__ */ jsxs11(
|
|
5862
6118
|
"header",
|
|
5863
6119
|
{
|
|
5864
6120
|
className: cn(
|
|
@@ -5867,9 +6123,9 @@ var EventList = ({
|
|
|
5867
6123
|
"gap-2 sm:flex-row sm:items-center sm:gap-4"
|
|
5868
6124
|
),
|
|
5869
6125
|
children: [
|
|
5870
|
-
/* @__PURE__ */
|
|
5871
|
-
/* @__PURE__ */
|
|
5872
|
-
/* @__PURE__ */
|
|
6126
|
+
/* @__PURE__ */ jsx14("div", { className: "agg-event-list-title min-w-32", children: /* @__PURE__ */ jsx14(Typography, { as: "h2", variant: "title", className: "truncate first-letter:uppercase", children: title }) }),
|
|
6127
|
+
/* @__PURE__ */ jsxs11("div", { className: "hidden min-w-0 max-w-full items-center gap-3 md:flex", children: [
|
|
6128
|
+
/* @__PURE__ */ jsx14(
|
|
5873
6129
|
EventListTabs,
|
|
5874
6130
|
{
|
|
5875
6131
|
ariaLabel: labels.eventList.tabsAria(title),
|
|
@@ -5879,7 +6135,7 @@ var EventList = ({
|
|
|
5879
6135
|
overflowBehavior: "scroll"
|
|
5880
6136
|
}
|
|
5881
6137
|
),
|
|
5882
|
-
/* @__PURE__ */
|
|
6138
|
+
/* @__PURE__ */ jsx14(
|
|
5883
6139
|
Select,
|
|
5884
6140
|
{
|
|
5885
6141
|
ariaLabel: labels.eventList.sortByLabel,
|
|
@@ -5895,8 +6151,8 @@ var EventList = ({
|
|
|
5895
6151
|
]
|
|
5896
6152
|
}
|
|
5897
6153
|
),
|
|
5898
|
-
/* @__PURE__ */
|
|
5899
|
-
/* @__PURE__ */
|
|
6154
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex w-full gap-2 md:hidden mb-3", children: [
|
|
6155
|
+
/* @__PURE__ */ jsx14(
|
|
5900
6156
|
EventListTabs,
|
|
5901
6157
|
{
|
|
5902
6158
|
ariaLabel: labels.eventList.tabsAria(title),
|
|
@@ -5906,7 +6162,7 @@ var EventList = ({
|
|
|
5906
6162
|
overflowBehavior: "select"
|
|
5907
6163
|
}
|
|
5908
6164
|
),
|
|
5909
|
-
/* @__PURE__ */
|
|
6165
|
+
/* @__PURE__ */ jsx14(
|
|
5910
6166
|
Select,
|
|
5911
6167
|
{
|
|
5912
6168
|
ariaLabel: labels.eventList.sortByLabel,
|
|
@@ -5917,23 +6173,23 @@ var EventList = ({
|
|
|
5917
6173
|
contentClassName: "rounded-[12px] py-2 shadow-[0_8px_16px_rgba(0,0,0,0.1)]"
|
|
5918
6174
|
}
|
|
5919
6175
|
),
|
|
5920
|
-
shouldRenderSubcategoryFilters ? /* @__PURE__ */
|
|
6176
|
+
shouldRenderSubcategoryFilters ? /* @__PURE__ */ jsx14(
|
|
5921
6177
|
"button",
|
|
5922
6178
|
{
|
|
5923
6179
|
type: "button",
|
|
5924
6180
|
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-[8px] border-2 border-agg-primary bg-agg-secondary text-agg-foreground cursor-pointer",
|
|
5925
6181
|
"aria-label": labels.eventList.subcategoriesOpenAria,
|
|
5926
6182
|
onClick: () => setIsSubcategoriesModalOpen(true),
|
|
5927
|
-
children: /* @__PURE__ */
|
|
6183
|
+
children: /* @__PURE__ */ jsx14(Icon, { name: "apps", size: "small", color: "currentColor" })
|
|
5928
6184
|
}
|
|
5929
6185
|
) : null
|
|
5930
6186
|
] }),
|
|
5931
|
-
/* @__PURE__ */
|
|
6187
|
+
/* @__PURE__ */ jsxs11(
|
|
5932
6188
|
"div",
|
|
5933
6189
|
{
|
|
5934
6190
|
className: cn("flex w-full gap-6", shouldRenderSubcategoryFilters ? "md:items-start" : ""),
|
|
5935
6191
|
children: [
|
|
5936
|
-
shouldRenderSubcategoryFilters ? /* @__PURE__ */
|
|
6192
|
+
shouldRenderSubcategoryFilters ? /* @__PURE__ */ jsx14("aside", { className: "hidden w-[200px] shrink-0 md:block self-start sticky top-4", children: /* @__PURE__ */ jsx14("div", { className: "agg-sidebar max-h-[calc(100vh-19rem)] overflow-y-auto rounded-[8px] border border-agg-separator bg-agg-secondary p-2", children: /* @__PURE__ */ jsx14(
|
|
5937
6193
|
CategorySidebar,
|
|
5938
6194
|
{
|
|
5939
6195
|
baseCategoryId,
|
|
@@ -5946,7 +6202,7 @@ var EventList = ({
|
|
|
5946
6202
|
onToggleCategory: handleToggleSubcategory
|
|
5947
6203
|
}
|
|
5948
6204
|
) }) }) : null,
|
|
5949
|
-
/* @__PURE__ */
|
|
6205
|
+
/* @__PURE__ */ jsxs11(
|
|
5950
6206
|
"div",
|
|
5951
6207
|
{
|
|
5952
6208
|
className: cn(
|
|
@@ -5957,7 +6213,7 @@ var EventList = ({
|
|
|
5957
6213
|
gridClassName
|
|
5958
6214
|
),
|
|
5959
6215
|
children: [
|
|
5960
|
-
tileEvents.map((event) => /* @__PURE__ */
|
|
6216
|
+
tileEvents.map((event) => /* @__PURE__ */ jsx14(
|
|
5961
6217
|
EventListItem,
|
|
5962
6218
|
{
|
|
5963
6219
|
event,
|
|
@@ -5974,7 +6230,7 @@ var EventList = ({
|
|
|
5974
6230
|
},
|
|
5975
6231
|
event.id
|
|
5976
6232
|
)),
|
|
5977
|
-
shouldRenderPaginationLoadingItems ? Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */
|
|
6233
|
+
shouldRenderPaginationLoadingItems ? Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */ jsx14(
|
|
5978
6234
|
EventListItem,
|
|
5979
6235
|
{
|
|
5980
6236
|
isLoading: true,
|
|
@@ -5984,20 +6240,20 @@ var EventList = ({
|
|
|
5984
6240
|
},
|
|
5985
6241
|
`loading-${index}`
|
|
5986
6242
|
)) : null,
|
|
5987
|
-
shouldRenderEmptyState ? /* @__PURE__ */
|
|
6243
|
+
shouldRenderEmptyState ? /* @__PURE__ */ jsx14("div", { className: "col-span-full w-full", children: /* @__PURE__ */ jsx14(
|
|
5988
6244
|
StateMessage,
|
|
5989
6245
|
{
|
|
5990
6246
|
title: labels.eventList.emptyTitle,
|
|
5991
6247
|
description: labels.eventList.emptyDescription,
|
|
5992
|
-
icon: /* @__PURE__ */
|
|
6248
|
+
icon: /* @__PURE__ */ jsx14(Icon, { name: "search-empty" })
|
|
5993
6249
|
}
|
|
5994
6250
|
) }) : null,
|
|
5995
|
-
isError ? /* @__PURE__ */
|
|
6251
|
+
isError ? /* @__PURE__ */ jsx14("div", { className: "col-span-full w-full", children: /* @__PURE__ */ jsx14(
|
|
5996
6252
|
StateMessage,
|
|
5997
6253
|
{
|
|
5998
6254
|
title: labels.eventList.errorTitle,
|
|
5999
6255
|
description: labels.eventList.errorDescription,
|
|
6000
|
-
icon: /* @__PURE__ */
|
|
6256
|
+
icon: /* @__PURE__ */ jsx14(Icon, { name: "warning" })
|
|
6001
6257
|
}
|
|
6002
6258
|
) }) : null
|
|
6003
6259
|
]
|
|
@@ -6006,7 +6262,7 @@ var EventList = ({
|
|
|
6006
6262
|
]
|
|
6007
6263
|
}
|
|
6008
6264
|
),
|
|
6009
|
-
shouldRenderSubcategoryFilters ? /* @__PURE__ */
|
|
6265
|
+
shouldRenderSubcategoryFilters ? /* @__PURE__ */ jsx14(Modal, { open: isSubcategoriesModalOpen, onOpenChange: setIsSubcategoriesModalOpen, children: /* @__PURE__ */ jsx14(
|
|
6010
6266
|
Modal.Container,
|
|
6011
6267
|
{
|
|
6012
6268
|
classNames: {
|
|
@@ -6015,20 +6271,20 @@ var EventList = ({
|
|
|
6015
6271
|
content: "items-end p-0 pointer-events-none",
|
|
6016
6272
|
container: "w-full max-w-none border-0 bg-transparent shadow-none"
|
|
6017
6273
|
},
|
|
6018
|
-
children: /* @__PURE__ */
|
|
6019
|
-
/* @__PURE__ */
|
|
6020
|
-
/* @__PURE__ */
|
|
6021
|
-
/* @__PURE__ */
|
|
6022
|
-
/* @__PURE__ */
|
|
6274
|
+
children: /* @__PURE__ */ jsxs11("div", { className: "pointer-events-auto w-full rounded-t-[12px] border border-agg-separator bg-agg-secondary", children: [
|
|
6275
|
+
/* @__PURE__ */ jsx14("div", { className: "flex justify-center pb-1 pt-3", "aria-hidden": "true", children: /* @__PURE__ */ jsx14("div", { className: "h-1 w-10 rounded-full bg-agg-muted-foreground/30" }) }),
|
|
6276
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-4 pb-2 pt-1", children: [
|
|
6277
|
+
/* @__PURE__ */ jsx14(Dialog.Title, { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.eventList.subcategoriesLabel }),
|
|
6278
|
+
/* @__PURE__ */ jsx14(
|
|
6023
6279
|
Dialog.Close,
|
|
6024
6280
|
{
|
|
6025
6281
|
className: "flex cursor-pointer items-center justify-center rounded-full p-1 text-agg-muted-foreground hover:bg-agg-secondary-hover",
|
|
6026
6282
|
"aria-label": labels.common.close,
|
|
6027
|
-
children: /* @__PURE__ */
|
|
6283
|
+
children: /* @__PURE__ */ jsx14(CloseIcon, { className: "h-5 w-5" })
|
|
6028
6284
|
}
|
|
6029
6285
|
)
|
|
6030
6286
|
] }),
|
|
6031
|
-
/* @__PURE__ */
|
|
6287
|
+
/* @__PURE__ */ jsx14("div", { className: "flex flex-col gap-1 px-4 pb-4", children: /* @__PURE__ */ jsx14(
|
|
6032
6288
|
CategorySidebar,
|
|
6033
6289
|
{
|
|
6034
6290
|
baseCategoryId,
|
|
@@ -6044,7 +6300,7 @@ var EventList = ({
|
|
|
6044
6300
|
] })
|
|
6045
6301
|
}
|
|
6046
6302
|
) }) : null,
|
|
6047
|
-
shouldPaginate && hasNextPage ? /* @__PURE__ */
|
|
6303
|
+
shouldPaginate && hasNextPage ? /* @__PURE__ */ jsx14("div", { ref: loadMoreRef, className: "agg-event-list-sentinel h-px w-full", "aria-hidden": true }) : null
|
|
6048
6304
|
] });
|
|
6049
6305
|
};
|
|
6050
6306
|
EventList.displayName = "EventList";
|
|
@@ -6056,6 +6312,7 @@ export {
|
|
|
6056
6312
|
collectEligibleVenueOutcomes,
|
|
6057
6313
|
collectEligibleVenueOutcomeIds,
|
|
6058
6314
|
mergeVenueOutcomeOrderbooks,
|
|
6315
|
+
SportsLiveScore,
|
|
6059
6316
|
SettlementSummary,
|
|
6060
6317
|
resolveEventDetailsSyncKey,
|
|
6061
6318
|
EventListItemDetails,
|