@agg-market/ui 3.0.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart.js +18 -5
- package/dist/chart.mjs +2 -2
- package/dist/{chunk-KUWTY4EM.mjs → chunk-3W7NBJLU.mjs} +1 -1
- package/dist/{chunk-MVJNQN7P.mjs → chunk-GNSPZ53C.mjs} +86 -85
- package/dist/{chunk-422MCIXV.mjs → chunk-HOXTJ742.mjs} +15 -11
- package/dist/{chunk-FF3QYU26.mjs → chunk-JNH64AKR.mjs} +31 -24
- package/dist/{chunk-RKCVOKE3.mjs → chunk-LA3FBBSJ.mjs} +2 -2
- package/dist/{chunk-CTVMT3VL.mjs → chunk-LCZKSITC.mjs} +2 -2
- package/dist/chunk-M4RJHRFT.mjs +445 -0
- package/dist/{chunk-RGHA4PZH.mjs → chunk-MBHTXNHX.mjs} +4 -4
- package/dist/{chunk-KSCSYCEF.mjs → chunk-MJHKBCXQ.mjs} +1 -1
- package/dist/{chunk-KRQFVMJE.mjs → chunk-OH56VUYK.mjs} +5 -19
- package/dist/{chunk-BN5VVHNV.mjs → chunk-OJVTGNIF.mjs} +17 -4
- package/dist/{chunk-ZJJA4I3I.mjs → chunk-P2PJBO5C.mjs} +1 -1
- package/dist/{chunk-GHB3GOCW.mjs → chunk-QM7CGMFG.mjs} +5 -21
- package/dist/event-list-item-details.js +213 -241
- package/dist/event-list-item-details.mjs +6 -6
- package/dist/event-list-item.js +156 -208
- package/dist/event-list-item.mjs +3 -3
- package/dist/event-list.js +159 -223
- package/dist/event-list.mjs +4 -4
- package/dist/event-market-page.js +476 -574
- package/dist/event-market-page.mjs +10 -11
- package/dist/home-page.js +159 -223
- package/dist/home-page.mjs +5 -5
- package/dist/index.js +296 -333
- package/dist/index.mjs +13 -13
- package/dist/market-details.js +323 -415
- package/dist/market-details.mjs +6 -7
- package/dist/place-order.js +151 -189
- package/dist/place-order.mjs +2 -2
- package/dist/settlement.js +151 -189
- package/dist/settlement.mjs +2 -2
- package/dist/skeleton.js +151 -189
- package/dist/skeleton.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/switch-button.js +2 -2
- package/dist/switch-button.mjs +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +2 -2
- package/dist/chunk-V52WSZHQ.mjs +0 -482
package/dist/index.js
CHANGED
|
@@ -441,6 +441,7 @@ var EventListItemSkeletonView = ({
|
|
|
441
441
|
isStandalone = false
|
|
442
442
|
}) => {
|
|
443
443
|
const labels = (0, import_hooks4.useLabels)();
|
|
444
|
+
const outcomeTitleWidths = ["w-40", "w-[200px]"];
|
|
444
445
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
445
446
|
Card,
|
|
446
447
|
{
|
|
@@ -450,35 +451,23 @@ var EventListItemSkeletonView = ({
|
|
|
450
451
|
"aria-busy": isStandalone || void 0,
|
|
451
452
|
"aria-hidden": isStandalone ? void 0 : true,
|
|
452
453
|
children: [
|
|
453
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex w-full items-
|
|
454
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "
|
|
455
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.
|
|
456
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm" }),
|
|
457
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-5 w-[68%] rounded-agg-sm" })
|
|
458
|
-
] })
|
|
454
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
|
|
455
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
|
|
456
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
|
|
459
457
|
] }),
|
|
460
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex flex-col gap-3", children:
|
|
461
|
-
"
|
|
462
|
-
{
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-9 w-[101px] rounded-agg-full" })
|
|
468
|
-
]
|
|
469
|
-
},
|
|
470
|
-
index
|
|
471
|
-
)) }),
|
|
472
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center justify-between gap-2 text-agg-muted-foreground", children: [
|
|
473
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
474
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" }),
|
|
458
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex flex-col gap-3", children: outcomeTitleWidths.map((outcomeTitleWidth, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex w-full items-center justify-between gap-3", children: [
|
|
459
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: cn("h-5 rounded-agg-sm", outcomeTitleWidth) }),
|
|
460
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
|
|
461
|
+
] }, index)) }),
|
|
462
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center justify-between gap-5 text-agg-muted-foreground", children: [
|
|
463
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" }),
|
|
475
465
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
476
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-
|
|
477
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-
|
|
478
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" })
|
|
466
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" }),
|
|
467
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" })
|
|
479
468
|
] })
|
|
480
469
|
] }),
|
|
481
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-
|
|
470
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
|
|
482
471
|
] })
|
|
483
472
|
]
|
|
484
473
|
}
|
|
@@ -498,13 +487,9 @@ var EventListSkeletonView = ({ className, ariaLabel }) => {
|
|
|
498
487
|
"aria-label": ariaLabel != null ? ariaLabel : labels.eventList.loading("events"),
|
|
499
488
|
"aria-busy": true,
|
|
500
489
|
children: [
|
|
501
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-
|
|
502
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-7 w-
|
|
503
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.
|
|
504
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
|
|
505
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
|
|
506
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-10 w-24 rounded-agg-full" })
|
|
507
|
-
] })
|
|
490
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-3 md:flex-row md:flex-nowrap md:items-center md:gap-5", children: [
|
|
491
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-7 w-[120px] rounded-agg-md" }),
|
|
492
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-8 w-full rounded-agg-md md:w-[400px]" })
|
|
508
493
|
] }),
|
|
509
494
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "grid grid-cols-1 gap-5 md:grid-cols-3", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
510
495
|
EventListItemSkeletonView,
|
|
@@ -556,30 +541,26 @@ var EventListItemDetailsSkeletonView = ({
|
|
|
556
541
|
"aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.loading,
|
|
557
542
|
"aria-busy": true,
|
|
558
543
|
children: [
|
|
559
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex w-full items-
|
|
560
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "size-10 rounded-agg-lg
|
|
561
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
562
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm md:h-7 md:w-[55%]" }),
|
|
563
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
|
|
564
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
|
|
565
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
|
|
566
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" })
|
|
567
|
-
] })
|
|
568
|
-
] })
|
|
544
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
|
|
545
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
|
|
546
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
|
|
569
547
|
] }),
|
|
570
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
571
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
548
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex w-full flex-col gap-4 md:gap-6", children: [
|
|
549
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
|
|
550
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex max-w-full gap-2 overflow-hidden", children: [
|
|
551
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
|
|
552
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
|
|
553
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
|
|
554
|
+
] }),
|
|
555
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-full max-w-[221px] rounded-agg-full md:w-[221px]" })
|
|
556
|
+
] }),
|
|
557
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
558
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-[220px] w-full rounded-agg-xl md:h-[240px]" }),
|
|
559
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
560
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-5 w-[59px] rounded-agg-sm" }),
|
|
561
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
|
|
562
|
+
] })
|
|
577
563
|
] })
|
|
578
|
-
] }),
|
|
579
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "h-[300px] w-full rounded-agg-xl", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-full w-full rounded-agg-xl" }) }),
|
|
580
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
581
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
|
|
582
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
|
|
583
564
|
] })
|
|
584
565
|
]
|
|
585
566
|
}
|
|
@@ -603,6 +584,77 @@ var orderBookRowLimitDefault = 4;
|
|
|
603
584
|
|
|
604
585
|
// src/primitives/skeleton/views/market-details-skeleton-view.tsx
|
|
605
586
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
587
|
+
var orderBookAskBarWidths = [
|
|
588
|
+
"w-[52px] md:w-[240px]",
|
|
589
|
+
"w-[48px] md:w-[200px]",
|
|
590
|
+
"w-[40px] md:w-[120px]",
|
|
591
|
+
"w-[36px] md:w-[60px]"
|
|
592
|
+
];
|
|
593
|
+
var orderBookBidBarWidths = [
|
|
594
|
+
"w-[36px] md:w-[60px]",
|
|
595
|
+
"w-[40px] md:w-[120px]",
|
|
596
|
+
"w-[48px] md:w-[200px]",
|
|
597
|
+
"w-[52px] md:w-[240px]"
|
|
598
|
+
];
|
|
599
|
+
var MarketDetailsHeaderSkeleton = () => {
|
|
600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-3 px-4 py-3 md:px-5", children: [
|
|
601
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:min-w-52 md:gap-4", children: [
|
|
602
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
|
|
603
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
604
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-[132px] rounded-agg-sm" }),
|
|
605
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-[141px] rounded-agg-sm" })
|
|
606
|
+
] })
|
|
607
|
+
] }),
|
|
608
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-[60px] rounded-agg-md" }),
|
|
609
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-full gap-2 md:w-auto", children: [
|
|
610
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[135px]" }),
|
|
611
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[131px]" })
|
|
612
|
+
] })
|
|
613
|
+
] });
|
|
614
|
+
};
|
|
615
|
+
var MarketDetailsTabsSkeleton = () => {
|
|
616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-14 items-end px-4 md:px-5", children: [
|
|
617
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-full flex-col items-end justify-end rounded-t-agg-lg", children: [
|
|
618
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }) }),
|
|
619
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
|
|
620
|
+
] }),
|
|
621
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-full flex-col justify-center", children: [
|
|
622
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-12 rounded-agg-sm" }) }),
|
|
623
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-[3px] w-full" })
|
|
624
|
+
] })
|
|
625
|
+
] });
|
|
626
|
+
};
|
|
627
|
+
var MarketDetailsOrderBookRows = ({
|
|
628
|
+
side,
|
|
629
|
+
barWidths
|
|
630
|
+
}) => {
|
|
631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-col gap-2", children: barWidths.map((barWidthClassName, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
632
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
|
|
633
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
|
|
636
|
+
] }),
|
|
637
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
|
|
638
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
|
|
639
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: cn("h-2 rounded-agg-full", barWidthClassName) }) })
|
|
640
|
+
] }),
|
|
641
|
+
index < barWidths.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
|
|
642
|
+
] }, `${side}-row-${index}`)) });
|
|
643
|
+
};
|
|
644
|
+
var MarketDetailsOderbookSkeleton = ({
|
|
645
|
+
className
|
|
646
|
+
}) => {
|
|
647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn("flex flex-col gap-5", className), children: [
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
649
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
|
|
650
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MarketDetailsOrderBookRows, { side: "ask", barWidths: orderBookAskBarWidths })
|
|
651
|
+
] }),
|
|
652
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
653
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
|
|
654
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MarketDetailsOrderBookRows, { side: "bid", barWidths: orderBookBidBarWidths })
|
|
655
|
+
] })
|
|
656
|
+
] });
|
|
657
|
+
};
|
|
606
658
|
var MarketDetailsSkeletonView = ({
|
|
607
659
|
className,
|
|
608
660
|
ariaLabel,
|
|
@@ -617,60 +669,12 @@ var MarketDetailsSkeletonView = ({
|
|
|
617
669
|
"aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.loading,
|
|
618
670
|
"aria-busy": true,
|
|
619
671
|
children: [
|
|
620
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
621
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
622
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
|
|
623
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
|
|
624
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
625
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-40 rounded-agg-sm" }),
|
|
626
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
|
|
627
|
-
] })
|
|
628
|
-
] }),
|
|
629
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-8 w-16 rounded-agg-sm" })
|
|
630
|
-
] }),
|
|
631
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex gap-2", children: [
|
|
632
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" }),
|
|
633
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" })
|
|
634
|
-
] })
|
|
635
|
-
] }),
|
|
672
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MarketDetailsHeaderSkeleton, {}),
|
|
636
673
|
isDetailed ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
637
674
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
638
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
675
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MarketDetailsTabsSkeleton, {}),
|
|
639
676
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
640
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
641
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
642
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
|
|
643
|
-
[0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
644
|
-
"div",
|
|
645
|
-
{
|
|
646
|
-
className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
|
|
647
|
-
children: [
|
|
648
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
649
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
650
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
651
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
|
|
652
|
-
]
|
|
653
|
-
},
|
|
654
|
-
`ask-${index}`
|
|
655
|
-
))
|
|
656
|
-
] }),
|
|
657
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
658
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
|
|
659
|
-
[0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
660
|
-
"div",
|
|
661
|
-
{
|
|
662
|
-
className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
|
|
663
|
-
children: [
|
|
664
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
665
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
666
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
667
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
|
|
668
|
-
]
|
|
669
|
-
},
|
|
670
|
-
`bid-${index}`
|
|
671
|
-
))
|
|
672
|
-
] })
|
|
673
|
-
] })
|
|
677
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MarketDetailsOderbookSkeleton, { className: "p-5" })
|
|
674
678
|
] }) : null
|
|
675
679
|
]
|
|
676
680
|
}
|
|
@@ -681,65 +685,46 @@ MarketDetailsSkeletonView.displayName = "MarketDetailsSkeletonView";
|
|
|
681
685
|
// src/primitives/skeleton/views/place-order-skeleton-view.tsx
|
|
682
686
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
683
687
|
var placeOrderCardClassName = "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
|
|
688
|
+
var TabsSkeletonBar = () => {
|
|
689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex w-full items-end border-b border-agg-border", children: [
|
|
690
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col rounded-t-agg-lg", children: [
|
|
691
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
|
|
692
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
|
|
693
|
+
] }),
|
|
694
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col", children: [
|
|
695
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
|
|
696
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-[3px] w-full" })
|
|
697
|
+
] })
|
|
698
|
+
] });
|
|
699
|
+
};
|
|
684
700
|
var ContentBody = () => {
|
|
685
701
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("flex flex-col gap-6 p-5"), children: [
|
|
686
702
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
687
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex
|
|
688
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.
|
|
689
|
-
|
|
690
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
] })
|
|
694
|
-
] }),
|
|
695
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-6 rounded-agg-sm" })
|
|
703
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
704
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "size-12 shrink-0 rounded-agg-lg" }),
|
|
705
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
|
|
706
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-[92%] max-w-[240px] rounded-agg-sm" }),
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-[64%] max-w-[160px] rounded-agg-sm" })
|
|
708
|
+
] })
|
|
696
709
|
] }),
|
|
697
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-
|
|
710
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-[92px] rounded-agg-sm" }),
|
|
711
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TabsSkeletonBar, {})
|
|
698
712
|
] }),
|
|
699
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-11 items-end border-b border-agg-separator", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-8", children: [
|
|
700
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
701
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" }),
|
|
702
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-[3px] w-12 rounded-t-agg-sm" })
|
|
703
|
-
] }),
|
|
704
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
|
|
705
|
-
] }) }),
|
|
706
713
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
707
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex gap-2", children: [
|
|
714
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex w-full gap-2", children: [
|
|
708
715
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" }),
|
|
709
716
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" })
|
|
710
717
|
] }),
|
|
711
718
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
712
719
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
713
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-
|
|
714
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-
|
|
720
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-[63px] rounded-agg-sm" }),
|
|
721
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-[118px] rounded-agg-sm" })
|
|
715
722
|
] }),
|
|
716
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
723
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: cn("text-agg-3xl font-agg-bold leading-agg-9 text-agg-separator"), children: "$0" })
|
|
717
724
|
] })
|
|
718
725
|
] }),
|
|
719
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.
|
|
720
|
-
|
|
721
|
-
[0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
722
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
723
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
724
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
|
|
725
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" })
|
|
726
|
-
] }),
|
|
727
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
|
|
728
|
-
] }),
|
|
729
|
-
index === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-px w-full bg-agg-trade-highlight-border" }) : null
|
|
730
|
-
] }, `place-order-route-${index}`)),
|
|
731
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "mx-auto h-5 w-40 rounded-agg-sm" })
|
|
732
|
-
] }) }),
|
|
733
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" })
|
|
734
|
-
] }),
|
|
735
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
736
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
737
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
|
|
738
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-24 rounded-agg-sm" })
|
|
739
|
-
] }),
|
|
740
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-9 w-36 rounded-agg-sm" })
|
|
741
|
-
] }),
|
|
742
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-[88%] self-center rounded-agg-sm" })
|
|
726
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }),
|
|
727
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[240px] self-center rounded-agg-sm" })
|
|
743
728
|
] });
|
|
744
729
|
};
|
|
745
730
|
var PlaceOrderSkeletonView = ({
|
|
@@ -753,19 +738,7 @@ var PlaceOrderSkeletonView = ({
|
|
|
753
738
|
role: "status",
|
|
754
739
|
"aria-label": ariaLabel != null ? ariaLabel : "Loading place order",
|
|
755
740
|
"aria-busy": true,
|
|
756
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.
|
|
757
|
-
Card,
|
|
758
|
-
{
|
|
759
|
-
className: cn(
|
|
760
|
-
placeOrderCardClassName,
|
|
761
|
-
"w-full max-w-[400px] rounded-t-agg-xl rounded-b-none border-b-0"
|
|
762
|
-
),
|
|
763
|
-
children: [
|
|
764
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ContentBody, {}),
|
|
765
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "border-t border-agg-separator bg-agg-secondary p-4", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }) })
|
|
766
|
-
]
|
|
767
|
-
}
|
|
768
|
-
) })
|
|
741
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Card, { className: cn(placeOrderCardClassName, "w-full"), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ContentBody, {}) }) })
|
|
769
742
|
}
|
|
770
743
|
);
|
|
771
744
|
};
|
|
@@ -791,38 +764,27 @@ var SettlementSkeletonView = ({
|
|
|
791
764
|
"aria-label": ariaLabel != null ? ariaLabel : labels.trading.settlementLoading,
|
|
792
765
|
"aria-busy": true,
|
|
793
766
|
children: [
|
|
794
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex
|
|
795
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-
|
|
796
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-
|
|
767
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
|
|
768
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[81px] rounded-agg-sm" }),
|
|
769
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-[240px] rounded-agg-sm" })
|
|
797
770
|
] }),
|
|
798
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-
|
|
799
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-
|
|
771
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
772
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[200px] rounded-agg-sm" }),
|
|
800
773
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
801
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[
|
|
802
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[
|
|
803
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[80%] rounded-agg-sm" }),
|
|
804
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[74%] rounded-agg-sm" })
|
|
774
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[320px] rounded-agg-sm" }),
|
|
775
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[280px] rounded-agg-sm" })
|
|
805
776
|
] })
|
|
806
777
|
] }),
|
|
807
778
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
808
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
809
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex
|
|
810
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.
|
|
811
|
-
|
|
812
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
|
|
813
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
|
|
814
|
-
] }),
|
|
815
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2 pl-6", children: [
|
|
816
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-full rounded-agg-sm" }),
|
|
817
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[92%] rounded-agg-sm" }),
|
|
818
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[34%] rounded-agg-sm" })
|
|
819
|
-
] })
|
|
779
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
780
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
781
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
|
|
782
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" })
|
|
820
783
|
] }),
|
|
821
|
-
|
|
822
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-
|
|
823
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-
|
|
824
|
-
|
|
825
|
-
] }, `settlement-venue-${index}`))
|
|
784
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
785
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
|
|
786
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
|
|
787
|
+
] })
|
|
826
788
|
] })
|
|
827
789
|
]
|
|
828
790
|
}
|
|
@@ -923,10 +885,10 @@ var SwitchButton = ({
|
|
|
923
885
|
return null;
|
|
924
886
|
}
|
|
925
887
|
const handleKeyDown = (event, optionIndex) => {
|
|
926
|
-
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") {
|
|
888
|
+
if ((event == null ? void 0 : event.key) !== "ArrowLeft" && (event == null ? void 0 : event.key) !== "ArrowRight") {
|
|
927
889
|
return;
|
|
928
890
|
}
|
|
929
|
-
event.preventDefault();
|
|
891
|
+
event == null ? void 0 : event.preventDefault();
|
|
930
892
|
const nextOptionIndex = resolveNextEnabledIndex(
|
|
931
893
|
options,
|
|
932
894
|
optionIndex,
|
|
@@ -3209,8 +3171,18 @@ var normalizeSeries = (series) => {
|
|
|
3209
3171
|
var defaultValueFormatter = (value) => {
|
|
3210
3172
|
return `${Math.round(value)}%`;
|
|
3211
3173
|
};
|
|
3212
|
-
var
|
|
3213
|
-
return
|
|
3174
|
+
var resolveTimeFormatter = (windowSeconds) => {
|
|
3175
|
+
return (timestamp) => {
|
|
3176
|
+
if (!Number.isFinite(timestamp))
|
|
3177
|
+
return "";
|
|
3178
|
+
if (windowSeconds <= 48 * 60 * 60) {
|
|
3179
|
+
return import_dayjs.default.unix(timestamp).format("HH:mm");
|
|
3180
|
+
}
|
|
3181
|
+
if (windowSeconds <= 14 * 24 * 60 * 60) {
|
|
3182
|
+
return import_dayjs.default.unix(timestamp).format("MMM D HH:mm");
|
|
3183
|
+
}
|
|
3184
|
+
return import_dayjs.default.unix(timestamp).format("MMM D");
|
|
3185
|
+
};
|
|
3214
3186
|
};
|
|
3215
3187
|
var toLivelinePoints = (points) => {
|
|
3216
3188
|
return points.map((point) => ({
|
|
@@ -3333,6 +3305,9 @@ var LineChart = ({
|
|
|
3333
3305
|
const windowSeconds = (0, import_react3.useMemo)(() => {
|
|
3334
3306
|
return resolveWindowSeconds(normalizedSeries);
|
|
3335
3307
|
}, [normalizedSeries]);
|
|
3308
|
+
const timeFormatter = (0, import_react3.useMemo)(() => {
|
|
3309
|
+
return resolveTimeFormatter(windowSeconds);
|
|
3310
|
+
}, [windowSeconds]);
|
|
3336
3311
|
const seriesControls = showSeriesControls && normalizedSeries.length > 0 ? (_a = renderSeriesControls == null ? void 0 : renderSeriesControls({
|
|
3337
3312
|
series: normalizedSeries,
|
|
3338
3313
|
activeSeriesId,
|
|
@@ -3371,7 +3346,7 @@ var LineChart = ({
|
|
|
3371
3346
|
pulse: false,
|
|
3372
3347
|
window: windowSeconds,
|
|
3373
3348
|
formatValue: defaultValueFormatter,
|
|
3374
|
-
formatTime:
|
|
3349
|
+
formatTime: timeFormatter,
|
|
3375
3350
|
padding: {
|
|
3376
3351
|
top: 12,
|
|
3377
3352
|
right: 80,
|
|
@@ -4672,27 +4647,14 @@ var import_hooks21 = require("@agg-market/hooks");
|
|
|
4672
4647
|
|
|
4673
4648
|
// src/events/item/event-list-item.utils.ts
|
|
4674
4649
|
var resolveEventListItemEvent = (fetchedEvent) => {
|
|
4675
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
4676
4650
|
if (!fetchedEvent)
|
|
4677
4651
|
return void 0;
|
|
4678
|
-
const fallbackVenueEvent = fetchedEvent.venueEvents[0];
|
|
4679
|
-
if (!fallbackVenueEvent)
|
|
4680
|
-
return void 0;
|
|
4681
4652
|
const mergedVenueMarkets = fetchedEvent.markets.flatMap(
|
|
4682
|
-
(
|
|
4653
|
+
(market) => market.venueMarkets
|
|
4683
4654
|
);
|
|
4684
|
-
|
|
4685
|
-
if ((venueMarkets == null ? void 0 : venueMarkets.length) === 0)
|
|
4655
|
+
if (mergedVenueMarkets.length === 0)
|
|
4686
4656
|
return void 0;
|
|
4687
|
-
return
|
|
4688
|
-
id: fetchedEvent.id,
|
|
4689
|
-
title: fetchedEvent.title || fallbackVenueEvent.title,
|
|
4690
|
-
description: (_b = (_a = fetchedEvent.description) != null ? _a : fallbackVenueEvent.description) != null ? _b : null,
|
|
4691
|
-
volume: (_d = (_c = fetchedEvent.volume) != null ? _c : fallbackVenueEvent.volume) != null ? _d : null,
|
|
4692
|
-
startDate: (_f = (_e = fetchedEvent.startDate) != null ? _e : fallbackVenueEvent.startDate) != null ? _f : null,
|
|
4693
|
-
endDate: (_h = (_g = fetchedEvent.endDate) != null ? _g : fallbackVenueEvent.endDate) != null ? _h : null,
|
|
4694
|
-
creationDate: (_j = (_i = fetchedEvent.creationDate) != null ? _i : fallbackVenueEvent.creationDate) != null ? _j : null
|
|
4695
|
-
});
|
|
4657
|
+
return fetchedEvent;
|
|
4696
4658
|
};
|
|
4697
4659
|
var normalizeProbability = (value) => {
|
|
4698
4660
|
if (typeof value !== "number" || !Number.isFinite(value))
|
|
@@ -4793,15 +4755,14 @@ var resolveTileTitle = (event, primaryVenueMarket, titleOverride) => {
|
|
|
4793
4755
|
return event.title;
|
|
4794
4756
|
};
|
|
4795
4757
|
var resolveTileImage = (event, primaryVenueMarket, imageOverride) => {
|
|
4796
|
-
var _a, _b, _c, _d, _e, _f;
|
|
4797
4758
|
if (typeof imageOverride === "string" && imageOverride.trim()) {
|
|
4798
4759
|
return imageOverride;
|
|
4799
4760
|
}
|
|
4800
4761
|
if (typeof (primaryVenueMarket == null ? void 0 : primaryVenueMarket.image) === "string" && primaryVenueMarket.image.trim()) {
|
|
4801
4762
|
return primaryVenueMarket.image;
|
|
4802
4763
|
}
|
|
4803
|
-
if (typeof
|
|
4804
|
-
return
|
|
4764
|
+
if (typeof event.image === "string" && event.image.trim()) {
|
|
4765
|
+
return event.image;
|
|
4805
4766
|
}
|
|
4806
4767
|
return void 0;
|
|
4807
4768
|
};
|
|
@@ -5190,18 +5151,22 @@ var resolveOutcomesByVenue = (venueMarkets, selectedOutcomeLabel) => {
|
|
|
5190
5151
|
};
|
|
5191
5152
|
}).filter((item) => item != null);
|
|
5192
5153
|
};
|
|
5193
|
-
var buildPriceHistoryGroups = (selectedOutcomes) => {
|
|
5194
|
-
const
|
|
5195
|
-
selectedOutcomes.forEach(({ venue,
|
|
5196
|
-
var _a;
|
|
5197
|
-
|
|
5198
|
-
|
|
5154
|
+
var buildPriceHistoryGroups = (selectedOutcomes, fallbackMarketId) => {
|
|
5155
|
+
const marketIdByVenue = /* @__PURE__ */ new Map();
|
|
5156
|
+
selectedOutcomes.forEach(({ venue, market }) => {
|
|
5157
|
+
var _a, _b;
|
|
5158
|
+
const marketWithCanonicalId = market;
|
|
5159
|
+
const canonicalMarketId = (_a = marketWithCanonicalId.marketId) != null ? _a : fallbackMarketId;
|
|
5160
|
+
if (!canonicalMarketId)
|
|
5161
|
+
return;
|
|
5162
|
+
if (!marketIdByVenue.has(venue)) {
|
|
5163
|
+
marketIdByVenue.set(venue, /* @__PURE__ */ new Set());
|
|
5199
5164
|
}
|
|
5200
|
-
(
|
|
5165
|
+
(_b = marketIdByVenue.get(venue)) == null ? void 0 : _b.add(canonicalMarketId);
|
|
5201
5166
|
});
|
|
5202
|
-
return [...
|
|
5167
|
+
return [...marketIdByVenue.entries()].map(([venue, marketIds]) => ({
|
|
5203
5168
|
venue,
|
|
5204
|
-
venueMarketOutcomeIds
|
|
5169
|
+
venueMarketOutcomeIds: [...marketIds]
|
|
5205
5170
|
})).filter((group) => group.venueMarketOutcomeIds.length > 0);
|
|
5206
5171
|
};
|
|
5207
5172
|
var resolveSeriesColor = (venue, index) => {
|
|
@@ -5261,13 +5226,18 @@ var resolveAverageProbability = (values) => {
|
|
|
5261
5226
|
return validValues.reduce((sum, value) => sum + value, 0) / validValues.length;
|
|
5262
5227
|
};
|
|
5263
5228
|
var resolveOutcomeCandidateIds = (market, outcome) => {
|
|
5264
|
-
var _a;
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5229
|
+
var _a, _b;
|
|
5230
|
+
const marketWithCanonicalId = market;
|
|
5231
|
+
return [
|
|
5232
|
+
outcome.id,
|
|
5233
|
+
(_a = outcome.externalIdentifier) != null ? _a : void 0,
|
|
5234
|
+
market.externalIdentifier,
|
|
5235
|
+
(_b = marketWithCanonicalId.marketId) != null ? _b : void 0
|
|
5236
|
+
].filter((value) => typeof value === "string" && value.trim().length > 0);
|
|
5268
5237
|
};
|
|
5269
5238
|
var EventListItemDetailsGraphSection = ({
|
|
5270
5239
|
venueMarkets,
|
|
5240
|
+
canonicalMarketId,
|
|
5271
5241
|
selectedOutcomeLabel,
|
|
5272
5242
|
onSelectedOutcomeLabelChange,
|
|
5273
5243
|
switchLabels,
|
|
@@ -5360,8 +5330,8 @@ var EventListItemDetailsGraphSection = ({
|
|
|
5360
5330
|
return [...outcomeByModeAndId.values()];
|
|
5361
5331
|
}, [selectedOutcomesByMode]);
|
|
5362
5332
|
const priceHistoryGroups = (0, import_react9.useMemo)(() => {
|
|
5363
|
-
return buildPriceHistoryGroups(allOutcomesForHistory);
|
|
5364
|
-
}, [allOutcomesForHistory]);
|
|
5333
|
+
return buildPriceHistoryGroups(allOutcomesForHistory, canonicalMarketId);
|
|
5334
|
+
}, [allOutcomesForHistory, canonicalMarketId]);
|
|
5365
5335
|
const timeWindow = (0, import_react9.useMemo)(() => {
|
|
5366
5336
|
return getTimeWindowByRange(selectedTimeRange);
|
|
5367
5337
|
}, [selectedTimeRange]);
|
|
@@ -5565,11 +5535,12 @@ var EventListItemDetailsContent = ({
|
|
|
5565
5535
|
ariaLabel,
|
|
5566
5536
|
defaultTimeRange
|
|
5567
5537
|
}) => {
|
|
5538
|
+
var _a, _b;
|
|
5568
5539
|
const config = (0, import_hooks22.useSdkUiConfig)();
|
|
5569
5540
|
const labels = (0, import_hooks22.useLabels)();
|
|
5570
5541
|
const venueMarkets = (0, import_react9.useMemo)(() => {
|
|
5571
|
-
var
|
|
5572
|
-
return (_c = (
|
|
5542
|
+
var _a2, _b2, _c;
|
|
5543
|
+
return (_c = (_b2 = (_a2 = event.markets) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.venueMarkets) != null ? _c : [];
|
|
5573
5544
|
}, [event.markets]);
|
|
5574
5545
|
const primaryVenueMarket = (0, import_react9.useMemo)(() => {
|
|
5575
5546
|
return selectPrimaryVenueMarket(venueMarkets);
|
|
@@ -5607,9 +5578,9 @@ var EventListItemDetailsContent = ({
|
|
|
5607
5578
|
if (outcomeLabels.length === 0)
|
|
5608
5579
|
return void 0;
|
|
5609
5580
|
return [...outcomeLabels].sort((left, right) => {
|
|
5610
|
-
var
|
|
5611
|
-
const leftProbability = (
|
|
5612
|
-
const rightProbability = (
|
|
5581
|
+
var _a2, _b2;
|
|
5582
|
+
const leftProbability = (_a2 = probabilityByLabel.get(left)) != null ? _a2 : -1;
|
|
5583
|
+
const rightProbability = (_b2 = probabilityByLabel.get(right)) != null ? _b2 : -1;
|
|
5613
5584
|
return rightProbability - leftProbability;
|
|
5614
5585
|
})[0];
|
|
5615
5586
|
}, [outcomeLabels, probabilityByLabel]);
|
|
@@ -5625,18 +5596,18 @@ var EventListItemDetailsContent = ({
|
|
|
5625
5596
|
setSelectedOutcomeLabel(fallbackOutcomeLabel);
|
|
5626
5597
|
}, [isDateOutcomeMarket, mainOutcomeLabel, outcomeLabels, selectedOutcomeLabel]);
|
|
5627
5598
|
const switchLabels = (0, import_react9.useMemo)(() => {
|
|
5628
|
-
var
|
|
5599
|
+
var _a2, _b2;
|
|
5629
5600
|
if (isDateOutcomeMarket) {
|
|
5630
5601
|
return [labels.eventItemDetails.yes, labels.eventItemDetails.no];
|
|
5631
5602
|
}
|
|
5632
5603
|
const sortedOutcomeLabels = [...outcomeLabels].sort((left, right) => {
|
|
5633
|
-
var
|
|
5634
|
-
const leftProbability = (
|
|
5635
|
-
const rightProbability = (
|
|
5604
|
+
var _a3, _b3;
|
|
5605
|
+
const leftProbability = (_a3 = probabilityByLabel.get(left)) != null ? _a3 : -1;
|
|
5606
|
+
const rightProbability = (_b3 = probabilityByLabel.get(right)) != null ? _b3 : -1;
|
|
5636
5607
|
return rightProbability - leftProbability;
|
|
5637
5608
|
});
|
|
5638
|
-
const firstLabel = (
|
|
5639
|
-
const secondLabel = (
|
|
5609
|
+
const firstLabel = (_a2 = sortedOutcomeLabels[0]) != null ? _a2 : labels.eventItemDetails.yes;
|
|
5610
|
+
const secondLabel = (_b2 = sortedOutcomeLabels.find((label) => label !== firstLabel)) != null ? _b2 : firstLabel;
|
|
5640
5611
|
return [firstLabel, secondLabel];
|
|
5641
5612
|
}, [
|
|
5642
5613
|
isDateOutcomeMarket,
|
|
@@ -5646,8 +5617,8 @@ var EventListItemDetailsContent = ({
|
|
|
5646
5617
|
probabilityByLabel
|
|
5647
5618
|
]);
|
|
5648
5619
|
const volumeLabel = (0, import_react9.useMemo)(() => {
|
|
5649
|
-
var
|
|
5650
|
-
const resolvedVolume = typeof event.volume === "number" ? event.volume : (
|
|
5620
|
+
var _a2;
|
|
5621
|
+
const resolvedVolume = typeof event.volume === "number" ? event.volume : (_a2 = primaryVenueMarket == null ? void 0 : primaryVenueMarket.volume) != null ? _a2 : void 0;
|
|
5651
5622
|
if (typeof resolvedVolume !== "number")
|
|
5652
5623
|
return "";
|
|
5653
5624
|
return `${config.formatCompactCurrency(resolvedVolume)} ${labels.eventItemDetails.volumeSuffix}`;
|
|
@@ -5745,6 +5716,7 @@ var EventListItemDetailsContent = ({
|
|
|
5745
5716
|
EventListItemDetailsGraphSection,
|
|
5746
5717
|
{
|
|
5747
5718
|
venueMarkets,
|
|
5719
|
+
canonicalMarketId: (_b = (_a = event.markets) == null ? void 0 : _a[0]) == null ? void 0 : _b.id,
|
|
5748
5720
|
selectedOutcomeLabel,
|
|
5749
5721
|
onSelectedOutcomeLabelChange: setSelectedOutcomeLabel,
|
|
5750
5722
|
switchLabels,
|
|
@@ -5996,8 +5968,7 @@ var resolveSubtitle = ({
|
|
|
5996
5968
|
};
|
|
5997
5969
|
var resolveOrderBookRows = ({
|
|
5998
5970
|
data,
|
|
5999
|
-
side
|
|
6000
|
-
depth
|
|
5971
|
+
side
|
|
6001
5972
|
}) => {
|
|
6002
5973
|
if (!(data == null ? void 0 : data.length))
|
|
6003
5974
|
return [];
|
|
@@ -6028,9 +5999,8 @@ var resolveOrderBookRows = ({
|
|
|
6028
5999
|
return left.price - right.price;
|
|
6029
6000
|
return right.price - left.price;
|
|
6030
6001
|
});
|
|
6031
|
-
const
|
|
6032
|
-
|
|
6033
|
-
return limitedRows.map((row) => __spreadProps(__spreadValues({}, row), {
|
|
6002
|
+
const maxTotal = sortedRows.reduce((currentMax, row) => Math.max(currentMax, row.total), 0) || 1;
|
|
6003
|
+
return sortedRows.map((row) => __spreadProps(__spreadValues({}, row), {
|
|
6034
6004
|
barScale: row.total / maxTotal
|
|
6035
6005
|
}));
|
|
6036
6006
|
};
|
|
@@ -6143,44 +6113,59 @@ var OrderBookRows = ({
|
|
|
6143
6113
|
rows,
|
|
6144
6114
|
title,
|
|
6145
6115
|
formatNumber,
|
|
6146
|
-
formatCurrency
|
|
6116
|
+
formatCurrency,
|
|
6117
|
+
visibleRows
|
|
6147
6118
|
}) => {
|
|
6148
6119
|
const labels = (0, import_hooks23.useLabels)();
|
|
6149
6120
|
const isAsks = title === labels.marketDetails.asks;
|
|
6150
6121
|
const priceClassName = isAsks ? "text-agg-orderbook-ask" : "text-agg-orderbook-bid";
|
|
6151
6122
|
const barClassName = isAsks ? "bg-agg-orderbook-ask/10" : "bg-agg-orderbook-bid/10";
|
|
6123
|
+
const maxVisibleRows = Math.max(1, visibleRows);
|
|
6124
|
+
const orderBookRowHeightPx = 28;
|
|
6125
|
+
const orderBookDividerHeightPx = 1;
|
|
6126
|
+
const orderBookRowGapPx = 8;
|
|
6127
|
+
const orderBookVisibleHeightPx = maxVisibleRows * orderBookRowHeightPx + Math.max(0, maxVisibleRows - 1) * (orderBookDividerHeightPx + orderBookRowGapPx);
|
|
6152
6128
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
6153
6129
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "caption-caps", children: title }),
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
),
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6130
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6131
|
+
"div",
|
|
6132
|
+
{
|
|
6133
|
+
className: "overflow-y-auto pr-1 flex flex-col gap-2",
|
|
6134
|
+
style: { maxHeight: `${orderBookVisibleHeightPx}px` },
|
|
6135
|
+
role: "region",
|
|
6136
|
+
"aria-label": `${title} order book levels`,
|
|
6137
|
+
children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
6138
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
|
|
6139
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
|
|
6140
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(VenueLogo, { venue: row.venue, size: "small" }),
|
|
6141
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6142
|
+
"span",
|
|
6143
|
+
{
|
|
6144
|
+
className: cn(
|
|
6145
|
+
"text-agg-xs font-agg-bold leading-agg-4 md:text-agg-sm md:leading-agg-5",
|
|
6146
|
+
priceClassName
|
|
6147
|
+
),
|
|
6148
|
+
children: formatProbabilityCents(row.price)
|
|
6149
|
+
}
|
|
6150
|
+
)
|
|
6151
|
+
] }),
|
|
6152
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatNumber(row.size) }),
|
|
6153
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatCurrency(row.total) }),
|
|
6154
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6155
|
+
"div",
|
|
6156
|
+
{
|
|
6157
|
+
"aria-hidden": "true",
|
|
6158
|
+
className: cn("h-2 rounded-agg-full", barClassName),
|
|
6159
|
+
style: {
|
|
6160
|
+
width: `${Math.max(20, Math.round(row.barScale * 100))}%`
|
|
6161
|
+
}
|
|
6162
|
+
}
|
|
6163
|
+
) })
|
|
6164
|
+
] }),
|
|
6165
|
+
index < rows.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
|
|
6166
|
+
] }, row.id))
|
|
6167
|
+
}
|
|
6168
|
+
)
|
|
6184
6169
|
] });
|
|
6185
6170
|
};
|
|
6186
6171
|
var getOutcomeButtonClassName = ({
|
|
@@ -6298,9 +6283,10 @@ var MarketDetailsContent = ({
|
|
|
6298
6283
|
});
|
|
6299
6284
|
return [...uniqueOutcomesByVenueAndId.values()];
|
|
6300
6285
|
}, [outcomesByLabel]);
|
|
6286
|
+
const canonicalMarketIdForHistory = model == null ? void 0 : model.market.id;
|
|
6301
6287
|
const priceHistoryGroups = (0, import_react10.useMemo)(() => {
|
|
6302
|
-
return buildPriceHistoryGroups(graphOutcomes);
|
|
6303
|
-
}, [graphOutcomes]);
|
|
6288
|
+
return buildPriceHistoryGroups(graphOutcomes, canonicalMarketIdForHistory);
|
|
6289
|
+
}, [canonicalMarketIdForHistory, graphOutcomes]);
|
|
6304
6290
|
const { data: priceHistoryData, isLoading: isPriceHistoryLoading } = (0, import_hooks23.usePriceHistory)(__spreadProps(__spreadValues({
|
|
6305
6291
|
groups: priceHistoryGroups
|
|
6306
6292
|
}, timeWindow), {
|
|
@@ -6320,17 +6306,15 @@ var MarketDetailsContent = ({
|
|
|
6320
6306
|
const askRows = (0, import_react10.useMemo)(() => {
|
|
6321
6307
|
return resolveOrderBookRows({
|
|
6322
6308
|
data: orderBookData,
|
|
6323
|
-
side: "asks"
|
|
6324
|
-
depth: orderBookDepth
|
|
6309
|
+
side: "asks"
|
|
6325
6310
|
});
|
|
6326
|
-
}, [orderBookData
|
|
6311
|
+
}, [orderBookData]);
|
|
6327
6312
|
const bidRows = (0, import_react10.useMemo)(() => {
|
|
6328
6313
|
return resolveOrderBookRows({
|
|
6329
6314
|
data: orderBookData,
|
|
6330
|
-
side: "bids"
|
|
6331
|
-
depth: orderBookDepth
|
|
6315
|
+
side: "bids"
|
|
6332
6316
|
});
|
|
6333
|
-
}, [orderBookData
|
|
6317
|
+
}, [orderBookData]);
|
|
6334
6318
|
const priceHistoryByVenue = (0, import_react10.useMemo)(() => {
|
|
6335
6319
|
const historyByVenue = /* @__PURE__ */ new Map();
|
|
6336
6320
|
if (!(priceHistoryData == null ? void 0 : priceHistoryData.length)) {
|
|
@@ -6350,11 +6334,14 @@ var MarketDetailsContent = ({
|
|
|
6350
6334
|
const graphSeriesByOutcomeLabel = (0, import_react10.useMemo)(() => {
|
|
6351
6335
|
const seriesByOutcomeLabel = /* @__PURE__ */ new Map();
|
|
6352
6336
|
const resolveOutcomeCandidateIds2 = (outcomeByVenue) => {
|
|
6353
|
-
var _a;
|
|
6337
|
+
var _a, _b;
|
|
6338
|
+
const marketWithCanonicalId = outcomeByVenue.market;
|
|
6354
6339
|
return [
|
|
6355
6340
|
outcomeByVenue.outcome.id,
|
|
6356
6341
|
(_a = outcomeByVenue.outcome.externalIdentifier) != null ? _a : void 0,
|
|
6357
|
-
outcomeByVenue.market.externalIdentifier
|
|
6342
|
+
outcomeByVenue.market.externalIdentifier,
|
|
6343
|
+
(_b = marketWithCanonicalId.marketId) != null ? _b : void 0,
|
|
6344
|
+
canonicalMarketIdForHistory
|
|
6358
6345
|
].filter((value) => typeof value === "string" && value.trim().length > 0);
|
|
6359
6346
|
};
|
|
6360
6347
|
headerOutcomeItems.forEach((headerOutcomeItem) => {
|
|
@@ -6386,7 +6373,7 @@ var MarketDetailsContent = ({
|
|
|
6386
6373
|
seriesByOutcomeLabel.set(headerOutcomeItem.label, graphSeries2);
|
|
6387
6374
|
});
|
|
6388
6375
|
return seriesByOutcomeLabel;
|
|
6389
|
-
}, [headerOutcomeItems, outcomesByLabel, priceHistoryByVenue]);
|
|
6376
|
+
}, [canonicalMarketIdForHistory, headerOutcomeItems, outcomesByLabel, priceHistoryByVenue]);
|
|
6390
6377
|
const graphSeries = (0, import_react10.useMemo)(() => {
|
|
6391
6378
|
var _a;
|
|
6392
6379
|
if (!selectedOutcomeLabel)
|
|
@@ -6450,28 +6437,29 @@ var MarketDetailsContent = ({
|
|
|
6450
6437
|
Card,
|
|
6451
6438
|
{
|
|
6452
6439
|
className: cn(
|
|
6453
|
-
"w-full
|
|
6440
|
+
"w-full rounded-agg-2xl text-left outline-none",
|
|
6454
6441
|
marketDetailsBaseCardClassName,
|
|
6455
6442
|
classNames == null ? void 0 : classNames.root
|
|
6456
6443
|
),
|
|
6457
|
-
"aria-expanded": isOpened,
|
|
6458
|
-
"aria-controls": detailsContentId,
|
|
6459
|
-
role: "button",
|
|
6460
|
-
tabIndex: 0,
|
|
6461
|
-
"aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
|
|
6462
|
-
onClick: handleToggleExpanded,
|
|
6463
|
-
onKeyDown: handleToggleExpanded,
|
|
6464
6444
|
children: [
|
|
6465
6445
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
6466
6446
|
"div",
|
|
6467
6447
|
{
|
|
6468
6448
|
className: cn(
|
|
6469
|
-
"
|
|
6449
|
+
"cursor-pointer disabled:cursor-default",
|
|
6450
|
+
"flex flex-wrap flex-row items-center justify-between gap-3 px-5 py-4",
|
|
6470
6451
|
isOpened && "pb-3",
|
|
6471
6452
|
classNames == null ? void 0 : classNames.header
|
|
6472
6453
|
),
|
|
6454
|
+
"aria-expanded": isOpened,
|
|
6455
|
+
"aria-controls": detailsContentId,
|
|
6456
|
+
role: "button",
|
|
6457
|
+
tabIndex: 0,
|
|
6458
|
+
"aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
|
|
6459
|
+
onClick: handleToggleExpanded,
|
|
6460
|
+
onKeyDown: handleToggleExpanded,
|
|
6473
6461
|
children: [
|
|
6474
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-
|
|
6462
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-52 items-center gap-3 md:gap-4", children: [
|
|
6475
6463
|
model.image ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6476
6464
|
"img",
|
|
6477
6465
|
{
|
|
@@ -6550,10 +6538,7 @@ var MarketDetailsContent = ({
|
|
|
6550
6538
|
id: detailsContentId,
|
|
6551
6539
|
className: cn(
|
|
6552
6540
|
"grid overflow-hidden",
|
|
6553
|
-
getMotionClassName(
|
|
6554
|
-
config.enableAnimations,
|
|
6555
|
-
"transition-all duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]"
|
|
6556
|
-
),
|
|
6541
|
+
getMotionClassName(config.enableAnimations, "transition-all duration-500 ease-in-out"),
|
|
6557
6542
|
isOpened ? "grid-rows-[1fr] opacity-100" : "pointer-events-none grid-rows-[0fr] opacity-0"
|
|
6558
6543
|
),
|
|
6559
6544
|
"aria-hidden": !isOpened,
|
|
@@ -6565,7 +6550,7 @@ var MarketDetailsContent = ({
|
|
|
6565
6550
|
className: cn(
|
|
6566
6551
|
getMotionClassName(
|
|
6567
6552
|
config.enableAnimations,
|
|
6568
|
-
"transition-all duration-500 ease-
|
|
6553
|
+
"transition-all duration-500 ease-in-out"
|
|
6569
6554
|
),
|
|
6570
6555
|
isOpened ? cn(
|
|
6571
6556
|
"translate-y-0 opacity-100",
|
|
@@ -6586,26 +6571,15 @@ var MarketDetailsContent = ({
|
|
|
6586
6571
|
) }),
|
|
6587
6572
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
6588
6573
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: cn("p-5", classNames == null ? void 0 : classNames.content), children: [
|
|
6589
|
-
selectedTab === "order-book" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.orderBook), children: isOrderBookLoading ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
6590
|
-
"div",
|
|
6591
|
-
{
|
|
6592
|
-
className: "flex flex-col gap-2 min-h-40 items-center justify-center",
|
|
6593
|
-
role: "status",
|
|
6594
|
-
"aria-label": labels.marketDetails.loadingOrderbookAria,
|
|
6595
|
-
"aria-busy": true,
|
|
6596
|
-
children: [
|
|
6597
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(LoadingIcon, {}),
|
|
6598
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.loadingOrderbookLabel })
|
|
6599
|
-
]
|
|
6600
|
-
}
|
|
6601
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
6574
|
+
selectedTab === "order-book" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.orderBook), children: isOrderBookLoading ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(MarketDetailsOderbookSkeleton, {}) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
6602
6575
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6603
6576
|
OrderBookRows,
|
|
6604
6577
|
{
|
|
6605
6578
|
rows: askRows,
|
|
6606
6579
|
title: labels.marketDetails.asks,
|
|
6607
6580
|
formatNumber: config.formatNumber,
|
|
6608
|
-
formatCurrency: config.formatCurrency
|
|
6581
|
+
formatCurrency: config.formatCurrency,
|
|
6582
|
+
visibleRows: orderBookDepth
|
|
6609
6583
|
}
|
|
6610
6584
|
),
|
|
6611
6585
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
@@ -6614,7 +6588,8 @@ var MarketDetailsContent = ({
|
|
|
6614
6588
|
rows: bidRows,
|
|
6615
6589
|
title: labels.marketDetails.bids,
|
|
6616
6590
|
formatNumber: config.formatNumber,
|
|
6617
|
-
formatCurrency: config.formatCurrency
|
|
6591
|
+
formatCurrency: config.formatCurrency,
|
|
6592
|
+
visibleRows: orderBookDepth
|
|
6618
6593
|
}
|
|
6619
6594
|
)
|
|
6620
6595
|
] }) }) : null,
|
|
@@ -6832,22 +6807,10 @@ var getDefaultEventListTabs = (labels) => {
|
|
|
6832
6807
|
|
|
6833
6808
|
// src/events/list/event-list.utils.ts
|
|
6834
6809
|
var mapEventToEventListItemEvent = (event) => {
|
|
6835
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
6836
|
-
const fallbackVenueEvent = event.venueEvents[0];
|
|
6837
|
-
if (!fallbackVenueEvent)
|
|
6838
|
-
return null;
|
|
6839
6810
|
const mergedVenueMarkets = event.markets.flatMap((m) => m.venueMarkets);
|
|
6840
|
-
if (
|
|
6811
|
+
if (mergedVenueMarkets.length === 0)
|
|
6841
6812
|
return null;
|
|
6842
|
-
return
|
|
6843
|
-
id: event.id,
|
|
6844
|
-
title: event.title || fallbackVenueEvent.title,
|
|
6845
|
-
description: (_b = (_a = event.description) != null ? _a : fallbackVenueEvent.description) != null ? _b : null,
|
|
6846
|
-
volume: (_d = (_c = event.volume) != null ? _c : fallbackVenueEvent.volume) != null ? _d : null,
|
|
6847
|
-
startDate: (_f = (_e = event.startDate) != null ? _e : fallbackVenueEvent.startDate) != null ? _f : null,
|
|
6848
|
-
endDate: (_h = (_g = event.endDate) != null ? _g : fallbackVenueEvent.endDate) != null ? _h : null,
|
|
6849
|
-
creationDate: (_j = (_i = event.creationDate) != null ? _i : fallbackVenueEvent.creationDate) != null ? _j : null
|
|
6850
|
-
});
|
|
6813
|
+
return event;
|
|
6851
6814
|
};
|
|
6852
6815
|
var filterEventsByTabValue = (events, _tabValue) => {
|
|
6853
6816
|
return events;
|
|
@@ -6923,7 +6886,7 @@ var EventList = ({
|
|
|
6923
6886
|
const [activeTabValue, setActiveTabValue] = (0, import_react11.useState)(
|
|
6924
6887
|
(_b = (_a = defaultEventListTabs[0]) == null ? void 0 : _a.value) != null ? _b : "matched"
|
|
6925
6888
|
);
|
|
6926
|
-
const [
|
|
6889
|
+
const [_shouldUseSelectOverflow, setShouldUseSelectOverflow] = (0, import_react11.useState)(false);
|
|
6927
6890
|
const activeTab = (0, import_react11.useMemo)(() => {
|
|
6928
6891
|
return defaultEventListTabs.find((tab) => tab.value === activeTabValue);
|
|
6929
6892
|
}, [activeTabValue]);
|