@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
|
@@ -320,10 +320,10 @@ var SwitchButton = ({
|
|
|
320
320
|
return null;
|
|
321
321
|
}
|
|
322
322
|
const handleKeyDown = (event, optionIndex) => {
|
|
323
|
-
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") {
|
|
323
|
+
if ((event == null ? void 0 : event.key) !== "ArrowLeft" && (event == null ? void 0 : event.key) !== "ArrowRight") {
|
|
324
324
|
return;
|
|
325
325
|
}
|
|
326
|
-
event.preventDefault();
|
|
326
|
+
event == null ? void 0 : event.preventDefault();
|
|
327
327
|
const nextOptionIndex = resolveNextEnabledIndex(
|
|
328
328
|
options,
|
|
329
329
|
optionIndex,
|
|
@@ -440,8 +440,18 @@ var normalizeSeries = (series) => {
|
|
|
440
440
|
var defaultValueFormatter = (value) => {
|
|
441
441
|
return `${Math.round(value)}%`;
|
|
442
442
|
};
|
|
443
|
-
var
|
|
444
|
-
return
|
|
443
|
+
var resolveTimeFormatter = (windowSeconds) => {
|
|
444
|
+
return (timestamp) => {
|
|
445
|
+
if (!Number.isFinite(timestamp))
|
|
446
|
+
return "";
|
|
447
|
+
if (windowSeconds <= 48 * 60 * 60) {
|
|
448
|
+
return import_dayjs.default.unix(timestamp).format("HH:mm");
|
|
449
|
+
}
|
|
450
|
+
if (windowSeconds <= 14 * 24 * 60 * 60) {
|
|
451
|
+
return import_dayjs.default.unix(timestamp).format("MMM D HH:mm");
|
|
452
|
+
}
|
|
453
|
+
return import_dayjs.default.unix(timestamp).format("MMM D");
|
|
454
|
+
};
|
|
445
455
|
};
|
|
446
456
|
var toLivelinePoints = (points) => {
|
|
447
457
|
return points.map((point) => ({
|
|
@@ -564,6 +574,9 @@ var LineChart = ({
|
|
|
564
574
|
const windowSeconds = (0, import_react2.useMemo)(() => {
|
|
565
575
|
return resolveWindowSeconds(normalizedSeries);
|
|
566
576
|
}, [normalizedSeries]);
|
|
577
|
+
const timeFormatter = (0, import_react2.useMemo)(() => {
|
|
578
|
+
return resolveTimeFormatter(windowSeconds);
|
|
579
|
+
}, [windowSeconds]);
|
|
567
580
|
const seriesControls = showSeriesControls && normalizedSeries.length > 0 ? (_a = renderSeriesControls == null ? void 0 : renderSeriesControls({
|
|
568
581
|
series: normalizedSeries,
|
|
569
582
|
activeSeriesId,
|
|
@@ -602,7 +615,7 @@ var LineChart = ({
|
|
|
602
615
|
pulse: false,
|
|
603
616
|
window: windowSeconds,
|
|
604
617
|
formatValue: defaultValueFormatter,
|
|
605
|
-
formatTime:
|
|
618
|
+
formatTime: timeFormatter,
|
|
606
619
|
padding: {
|
|
607
620
|
top: 12,
|
|
608
621
|
right: 80,
|
|
@@ -679,6 +692,7 @@ var EventListItemSkeletonView = ({
|
|
|
679
692
|
isStandalone = false
|
|
680
693
|
}) => {
|
|
681
694
|
const labels = (0, import_hooks7.useLabels)();
|
|
695
|
+
const outcomeTitleWidths = ["w-40", "w-[200px]"];
|
|
682
696
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
683
697
|
Card,
|
|
684
698
|
{
|
|
@@ -688,35 +702,23 @@ var EventListItemSkeletonView = ({
|
|
|
688
702
|
"aria-busy": isStandalone || void 0,
|
|
689
703
|
"aria-hidden": isStandalone ? void 0 : true,
|
|
690
704
|
children: [
|
|
691
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-full items-
|
|
692
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "
|
|
693
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
694
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm" }),
|
|
695
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[68%] rounded-agg-sm" })
|
|
696
|
-
] })
|
|
705
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
|
|
706
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
|
|
697
708
|
] }),
|
|
698
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-col gap-3", children:
|
|
699
|
-
"
|
|
700
|
-
{
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-[101px] rounded-agg-full" })
|
|
706
|
-
]
|
|
707
|
-
},
|
|
708
|
-
index
|
|
709
|
-
)) }),
|
|
710
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between gap-2 text-agg-muted-foreground", children: [
|
|
711
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
712
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" }),
|
|
709
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-col gap-3", children: outcomeTitleWidths.map((outcomeTitleWidth, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-full items-center justify-between gap-3", children: [
|
|
710
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: cn("h-5 rounded-agg-sm", outcomeTitleWidth) }),
|
|
711
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
|
|
712
|
+
] }, index)) }),
|
|
713
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between gap-5 text-agg-muted-foreground", children: [
|
|
714
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
715
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" }),
|
|
713
716
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
714
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-
|
|
715
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-
|
|
716
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" })
|
|
717
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" }),
|
|
718
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" })
|
|
717
719
|
] })
|
|
718
720
|
] }),
|
|
719
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-
|
|
721
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
|
|
720
722
|
] })
|
|
721
723
|
]
|
|
722
724
|
}
|
|
@@ -736,13 +738,9 @@ var EventListSkeletonView = ({ className, ariaLabel }) => {
|
|
|
736
738
|
"aria-label": ariaLabel != null ? ariaLabel : labels.eventList.loading("events"),
|
|
737
739
|
"aria-busy": true,
|
|
738
740
|
children: [
|
|
739
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-
|
|
740
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-7 w-
|
|
741
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.
|
|
742
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
|
|
743
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
|
|
744
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-10 w-24 rounded-agg-full" })
|
|
745
|
-
] })
|
|
741
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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: [
|
|
742
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-7 w-[120px] rounded-agg-md" }),
|
|
743
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-8 w-full rounded-agg-md md:w-[400px]" })
|
|
746
744
|
] }),
|
|
747
745
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-1 gap-5 md:grid-cols-3", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
748
746
|
EventListItemSkeletonView,
|
|
@@ -794,30 +792,26 @@ var EventListItemDetailsSkeletonView = ({
|
|
|
794
792
|
"aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.loading,
|
|
795
793
|
"aria-busy": true,
|
|
796
794
|
children: [
|
|
797
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full items-
|
|
798
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-10 rounded-agg-lg
|
|
799
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.
|
|
800
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm md:h-7 md:w-[55%]" }),
|
|
801
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
|
|
802
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
|
|
803
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
|
|
804
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" })
|
|
805
|
-
] })
|
|
806
|
-
] })
|
|
795
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
|
|
796
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
|
|
797
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
|
|
807
798
|
] }),
|
|
808
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
809
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
799
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-4 md:gap-6", children: [
|
|
800
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
|
|
801
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex max-w-full gap-2 overflow-hidden", children: [
|
|
802
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
|
|
803
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
|
|
804
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
|
|
805
|
+
] }),
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-full max-w-[221px] rounded-agg-full md:w-[221px]" })
|
|
807
|
+
] }),
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
809
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-[220px] w-full rounded-agg-xl md:h-[240px]" }),
|
|
810
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
811
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[59px] rounded-agg-sm" }),
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
|
|
813
|
+
] })
|
|
815
814
|
] })
|
|
816
|
-
] }),
|
|
817
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "h-[300px] w-full rounded-agg-xl", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-full w-full rounded-agg-xl" }) }),
|
|
818
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
819
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
|
|
820
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
|
|
821
815
|
] })
|
|
822
816
|
]
|
|
823
817
|
}
|
|
@@ -833,6 +827,77 @@ var marketDetailsBaseCardClassName = "w-full overflow-hidden rounded-agg-lg bord
|
|
|
833
827
|
|
|
834
828
|
// src/primitives/skeleton/views/market-details-skeleton-view.tsx
|
|
835
829
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
830
|
+
var orderBookAskBarWidths = [
|
|
831
|
+
"w-[52px] md:w-[240px]",
|
|
832
|
+
"w-[48px] md:w-[200px]",
|
|
833
|
+
"w-[40px] md:w-[120px]",
|
|
834
|
+
"w-[36px] md:w-[60px]"
|
|
835
|
+
];
|
|
836
|
+
var orderBookBidBarWidths = [
|
|
837
|
+
"w-[36px] md:w-[60px]",
|
|
838
|
+
"w-[40px] md:w-[120px]",
|
|
839
|
+
"w-[48px] md:w-[200px]",
|
|
840
|
+
"w-[52px] md:w-[240px]"
|
|
841
|
+
];
|
|
842
|
+
var MarketDetailsHeaderSkeleton = () => {
|
|
843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-3 px-4 py-3 md:px-5", children: [
|
|
844
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:min-w-52 md:gap-4", children: [
|
|
845
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-6 w-[132px] rounded-agg-sm" }),
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-[141px] rounded-agg-sm" })
|
|
849
|
+
] })
|
|
850
|
+
] }),
|
|
851
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-9 w-[60px] rounded-agg-md" }),
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex w-full gap-2 md:w-auto", children: [
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[135px]" }),
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[131px]" })
|
|
855
|
+
] })
|
|
856
|
+
] });
|
|
857
|
+
};
|
|
858
|
+
var MarketDetailsTabsSkeleton = () => {
|
|
859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex h-14 items-end px-4 md:px-5", children: [
|
|
860
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex h-full flex-col items-end justify-end rounded-t-agg-lg", children: [
|
|
861
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }) }),
|
|
862
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
|
|
863
|
+
] }),
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex h-full flex-col justify-center", children: [
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-6 w-12 rounded-agg-sm" }) }),
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-[3px] w-full" })
|
|
867
|
+
] })
|
|
868
|
+
] });
|
|
869
|
+
};
|
|
870
|
+
var MarketDetailsOrderBookRows = ({
|
|
871
|
+
side,
|
|
872
|
+
barWidths
|
|
873
|
+
}) => {
|
|
874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col gap-2", children: barWidths.map((barWidthClassName, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
875
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.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: [
|
|
876
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
|
|
879
|
+
] }),
|
|
880
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
|
|
881
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
|
|
882
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: cn("h-2 rounded-agg-full", barWidthClassName) }) })
|
|
883
|
+
] }),
|
|
884
|
+
index < barWidths.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
|
|
885
|
+
] }, `${side}-row-${index}`)) });
|
|
886
|
+
};
|
|
887
|
+
var MarketDetailsOderbookSkeleton = ({
|
|
888
|
+
className
|
|
889
|
+
}) => {
|
|
890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: cn("flex flex-col gap-5", className), children: [
|
|
891
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
892
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
|
|
893
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MarketDetailsOrderBookRows, { side: "ask", barWidths: orderBookAskBarWidths })
|
|
894
|
+
] }),
|
|
895
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
896
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
|
|
897
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MarketDetailsOrderBookRows, { side: "bid", barWidths: orderBookBidBarWidths })
|
|
898
|
+
] })
|
|
899
|
+
] });
|
|
900
|
+
};
|
|
836
901
|
var MarketDetailsSkeletonView = ({
|
|
837
902
|
className,
|
|
838
903
|
ariaLabel,
|
|
@@ -847,60 +912,12 @@ var MarketDetailsSkeletonView = ({
|
|
|
847
912
|
"aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.loading,
|
|
848
913
|
"aria-busy": true,
|
|
849
914
|
children: [
|
|
850
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.
|
|
851
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
852
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
|
|
853
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
|
|
854
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
855
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-6 w-40 rounded-agg-sm" }),
|
|
856
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
|
|
857
|
-
] })
|
|
858
|
-
] }),
|
|
859
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-8 w-16 rounded-agg-sm" })
|
|
860
|
-
] }),
|
|
861
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex gap-2", children: [
|
|
862
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" }),
|
|
863
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" })
|
|
864
|
-
] })
|
|
865
|
-
] }),
|
|
915
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MarketDetailsHeaderSkeleton, {}),
|
|
866
916
|
isDetailed ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
867
917
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
868
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
918
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MarketDetailsTabsSkeleton, {}),
|
|
869
919
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
870
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.
|
|
871
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
872
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
|
|
873
|
-
[0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
874
|
-
"div",
|
|
875
|
-
{
|
|
876
|
-
className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
|
|
877
|
-
children: [
|
|
878
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
879
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
880
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
881
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
|
|
882
|
-
]
|
|
883
|
-
},
|
|
884
|
-
`ask-${index}`
|
|
885
|
-
))
|
|
886
|
-
] }),
|
|
887
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
888
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
|
|
889
|
-
[0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
890
|
-
"div",
|
|
891
|
-
{
|
|
892
|
-
className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
|
|
893
|
-
children: [
|
|
894
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
895
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
896
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
897
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
|
|
898
|
-
]
|
|
899
|
-
},
|
|
900
|
-
`bid-${index}`
|
|
901
|
-
))
|
|
902
|
-
] })
|
|
903
|
-
] })
|
|
920
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MarketDetailsOderbookSkeleton, { className: "p-5" })
|
|
904
921
|
] }) : null
|
|
905
922
|
]
|
|
906
923
|
}
|
|
@@ -911,65 +928,46 @@ MarketDetailsSkeletonView.displayName = "MarketDetailsSkeletonView";
|
|
|
911
928
|
// src/primitives/skeleton/views/place-order-skeleton-view.tsx
|
|
912
929
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
913
930
|
var placeOrderCardClassName = "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
|
|
931
|
+
var TabsSkeletonBar = () => {
|
|
932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex w-full items-end border-b border-agg-border", children: [
|
|
933
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col rounded-t-agg-lg", children: [
|
|
934
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
|
|
935
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
|
|
936
|
+
] }),
|
|
937
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col", children: [
|
|
938
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
|
|
939
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-[3px] w-full" })
|
|
940
|
+
] })
|
|
941
|
+
] });
|
|
942
|
+
};
|
|
914
943
|
var ContentBody = () => {
|
|
915
944
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("flex flex-col gap-6 p-5"), children: [
|
|
916
945
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
917
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex
|
|
918
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.
|
|
919
|
-
|
|
920
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
] })
|
|
924
|
-
] }),
|
|
925
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-6 rounded-agg-sm" })
|
|
946
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
947
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "size-12 shrink-0 rounded-agg-lg" }),
|
|
948
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
|
|
949
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-[92%] max-w-[240px] rounded-agg-sm" }),
|
|
950
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-[64%] max-w-[160px] rounded-agg-sm" })
|
|
951
|
+
] })
|
|
926
952
|
] }),
|
|
927
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-
|
|
953
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-[92px] rounded-agg-sm" }),
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TabsSkeletonBar, {})
|
|
928
955
|
] }),
|
|
929
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex h-11 items-end border-b border-agg-separator", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-8", children: [
|
|
930
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
931
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" }),
|
|
932
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-[3px] w-12 rounded-t-agg-sm" })
|
|
933
|
-
] }),
|
|
934
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
|
|
935
|
-
] }) }),
|
|
936
956
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
937
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex gap-2", children: [
|
|
957
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex w-full gap-2", children: [
|
|
938
958
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" }),
|
|
939
959
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" })
|
|
940
960
|
] }),
|
|
941
961
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
942
962
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
943
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-
|
|
944
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-
|
|
963
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-[63px] rounded-agg-sm" }),
|
|
964
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-[118px] rounded-agg-sm" })
|
|
945
965
|
] }),
|
|
946
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
966
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: cn("text-agg-3xl font-agg-bold leading-agg-9 text-agg-separator"), children: "$0" })
|
|
947
967
|
] })
|
|
948
968
|
] }),
|
|
949
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.
|
|
950
|
-
|
|
951
|
-
[0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
952
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
953
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
954
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
|
|
955
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" })
|
|
956
|
-
] }),
|
|
957
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
|
|
958
|
-
] }),
|
|
959
|
-
index === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-px w-full bg-agg-trade-highlight-border" }) : null
|
|
960
|
-
] }, `place-order-route-${index}`)),
|
|
961
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "mx-auto h-5 w-40 rounded-agg-sm" })
|
|
962
|
-
] }) }),
|
|
963
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" })
|
|
964
|
-
] }),
|
|
965
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
966
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
967
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
|
|
968
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-24 rounded-agg-sm" })
|
|
969
|
-
] }),
|
|
970
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-9 w-36 rounded-agg-sm" })
|
|
971
|
-
] }),
|
|
972
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-[88%] self-center rounded-agg-sm" })
|
|
969
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }),
|
|
970
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[240px] self-center rounded-agg-sm" })
|
|
973
971
|
] });
|
|
974
972
|
};
|
|
975
973
|
var PlaceOrderSkeletonView = ({
|
|
@@ -983,19 +981,7 @@ var PlaceOrderSkeletonView = ({
|
|
|
983
981
|
role: "status",
|
|
984
982
|
"aria-label": ariaLabel != null ? ariaLabel : "Loading place order",
|
|
985
983
|
"aria-busy": true,
|
|
986
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.
|
|
987
|
-
Card,
|
|
988
|
-
{
|
|
989
|
-
className: cn(
|
|
990
|
-
placeOrderCardClassName,
|
|
991
|
-
"w-full max-w-[400px] rounded-t-agg-xl rounded-b-none border-b-0"
|
|
992
|
-
),
|
|
993
|
-
children: [
|
|
994
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ContentBody, {}),
|
|
995
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "border-t border-agg-separator bg-agg-secondary p-4", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }) })
|
|
996
|
-
]
|
|
997
|
-
}
|
|
998
|
-
) })
|
|
984
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Card, { className: cn(placeOrderCardClassName, "w-full"), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ContentBody, {}) }) })
|
|
999
985
|
}
|
|
1000
986
|
);
|
|
1001
987
|
};
|
|
@@ -1021,38 +1007,27 @@ var SettlementSkeletonView = ({
|
|
|
1021
1007
|
"aria-label": ariaLabel != null ? ariaLabel : labels.trading.settlementLoading,
|
|
1022
1008
|
"aria-busy": true,
|
|
1023
1009
|
children: [
|
|
1024
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex
|
|
1025
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-
|
|
1026
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-
|
|
1010
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
|
|
1011
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[81px] rounded-agg-sm" }),
|
|
1012
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-[240px] rounded-agg-sm" })
|
|
1027
1013
|
] }),
|
|
1028
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-
|
|
1029
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-
|
|
1014
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
1015
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-[200px] rounded-agg-sm" }),
|
|
1030
1016
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1031
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[
|
|
1032
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[
|
|
1033
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[80%] rounded-agg-sm" }),
|
|
1034
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[74%] rounded-agg-sm" })
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[320px] rounded-agg-sm" }),
|
|
1018
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[280px] rounded-agg-sm" })
|
|
1035
1019
|
] })
|
|
1036
1020
|
] }),
|
|
1037
1021
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
1038
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
1039
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex
|
|
1040
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.
|
|
1041
|
-
|
|
1042
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
|
|
1043
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
|
|
1044
|
-
] }),
|
|
1045
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2 pl-6", children: [
|
|
1046
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-full rounded-agg-sm" }),
|
|
1047
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[92%] rounded-agg-sm" }),
|
|
1048
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[34%] rounded-agg-sm" })
|
|
1049
|
-
] })
|
|
1022
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
1023
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1024
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
|
|
1025
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" })
|
|
1050
1026
|
] }),
|
|
1051
|
-
|
|
1052
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-
|
|
1053
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-
|
|
1054
|
-
|
|
1055
|
-
] }, `settlement-venue-${index}`))
|
|
1027
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1028
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
|
|
1029
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
|
|
1030
|
+
] })
|
|
1056
1031
|
] })
|
|
1057
1032
|
]
|
|
1058
1033
|
}
|
|
@@ -1402,27 +1377,14 @@ VenueLogo.displayName = "VenueLogo";
|
|
|
1402
1377
|
|
|
1403
1378
|
// src/events/item/event-list-item.utils.ts
|
|
1404
1379
|
var resolveEventListItemEvent = (fetchedEvent) => {
|
|
1405
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1406
1380
|
if (!fetchedEvent)
|
|
1407
1381
|
return void 0;
|
|
1408
|
-
const fallbackVenueEvent = fetchedEvent.venueEvents[0];
|
|
1409
|
-
if (!fallbackVenueEvent)
|
|
1410
|
-
return void 0;
|
|
1411
1382
|
const mergedVenueMarkets = fetchedEvent.markets.flatMap(
|
|
1412
|
-
(
|
|
1383
|
+
(market) => market.venueMarkets
|
|
1413
1384
|
);
|
|
1414
|
-
|
|
1415
|
-
if ((venueMarkets == null ? void 0 : venueMarkets.length) === 0)
|
|
1385
|
+
if (mergedVenueMarkets.length === 0)
|
|
1416
1386
|
return void 0;
|
|
1417
|
-
return
|
|
1418
|
-
id: fetchedEvent.id,
|
|
1419
|
-
title: fetchedEvent.title || fallbackVenueEvent.title,
|
|
1420
|
-
description: (_b = (_a = fetchedEvent.description) != null ? _a : fallbackVenueEvent.description) != null ? _b : null,
|
|
1421
|
-
volume: (_d = (_c = fetchedEvent.volume) != null ? _c : fallbackVenueEvent.volume) != null ? _d : null,
|
|
1422
|
-
startDate: (_f = (_e = fetchedEvent.startDate) != null ? _e : fallbackVenueEvent.startDate) != null ? _f : null,
|
|
1423
|
-
endDate: (_h = (_g = fetchedEvent.endDate) != null ? _g : fallbackVenueEvent.endDate) != null ? _h : null,
|
|
1424
|
-
creationDate: (_j = (_i = fetchedEvent.creationDate) != null ? _i : fallbackVenueEvent.creationDate) != null ? _j : null
|
|
1425
|
-
});
|
|
1387
|
+
return fetchedEvent;
|
|
1426
1388
|
};
|
|
1427
1389
|
var normalizeProbability = (value) => {
|
|
1428
1390
|
if (typeof value !== "number" || !Number.isFinite(value))
|
|
@@ -1481,15 +1443,14 @@ var resolveTileTitle = (event, primaryVenueMarket, titleOverride) => {
|
|
|
1481
1443
|
return event.title;
|
|
1482
1444
|
};
|
|
1483
1445
|
var resolveTileImage = (event, primaryVenueMarket, imageOverride) => {
|
|
1484
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1485
1446
|
if (typeof imageOverride === "string" && imageOverride.trim()) {
|
|
1486
1447
|
return imageOverride;
|
|
1487
1448
|
}
|
|
1488
1449
|
if (typeof (primaryVenueMarket == null ? void 0 : primaryVenueMarket.image) === "string" && primaryVenueMarket.image.trim()) {
|
|
1489
1450
|
return primaryVenueMarket.image;
|
|
1490
1451
|
}
|
|
1491
|
-
if (typeof
|
|
1492
|
-
return
|
|
1452
|
+
if (typeof event.image === "string" && event.image.trim()) {
|
|
1453
|
+
return event.image;
|
|
1493
1454
|
}
|
|
1494
1455
|
return void 0;
|
|
1495
1456
|
};
|
|
@@ -1599,18 +1560,22 @@ var resolveOutcomesByVenue = (venueMarkets, selectedOutcomeLabel) => {
|
|
|
1599
1560
|
};
|
|
1600
1561
|
}).filter((item) => item != null);
|
|
1601
1562
|
};
|
|
1602
|
-
var buildPriceHistoryGroups = (selectedOutcomes) => {
|
|
1603
|
-
const
|
|
1604
|
-
selectedOutcomes.forEach(({ venue,
|
|
1605
|
-
var _a;
|
|
1606
|
-
|
|
1607
|
-
|
|
1563
|
+
var buildPriceHistoryGroups = (selectedOutcomes, fallbackMarketId) => {
|
|
1564
|
+
const marketIdByVenue = /* @__PURE__ */ new Map();
|
|
1565
|
+
selectedOutcomes.forEach(({ venue, market }) => {
|
|
1566
|
+
var _a, _b;
|
|
1567
|
+
const marketWithCanonicalId = market;
|
|
1568
|
+
const canonicalMarketId = (_a = marketWithCanonicalId.marketId) != null ? _a : fallbackMarketId;
|
|
1569
|
+
if (!canonicalMarketId)
|
|
1570
|
+
return;
|
|
1571
|
+
if (!marketIdByVenue.has(venue)) {
|
|
1572
|
+
marketIdByVenue.set(venue, /* @__PURE__ */ new Set());
|
|
1608
1573
|
}
|
|
1609
|
-
(
|
|
1574
|
+
(_b = marketIdByVenue.get(venue)) == null ? void 0 : _b.add(canonicalMarketId);
|
|
1610
1575
|
});
|
|
1611
|
-
return [...
|
|
1576
|
+
return [...marketIdByVenue.entries()].map(([venue, marketIds]) => ({
|
|
1612
1577
|
venue,
|
|
1613
|
-
venueMarketOutcomeIds
|
|
1578
|
+
venueMarketOutcomeIds: [...marketIds]
|
|
1614
1579
|
})).filter((group) => group.venueMarketOutcomeIds.length > 0);
|
|
1615
1580
|
};
|
|
1616
1581
|
var resolveSeriesColor = (venue, index) => {
|
|
@@ -1670,13 +1635,18 @@ var resolveAverageProbability = (values) => {
|
|
|
1670
1635
|
return validValues.reduce((sum, value) => sum + value, 0) / validValues.length;
|
|
1671
1636
|
};
|
|
1672
1637
|
var resolveOutcomeCandidateIds = (market, outcome) => {
|
|
1673
|
-
var _a;
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1638
|
+
var _a, _b;
|
|
1639
|
+
const marketWithCanonicalId = market;
|
|
1640
|
+
return [
|
|
1641
|
+
outcome.id,
|
|
1642
|
+
(_a = outcome.externalIdentifier) != null ? _a : void 0,
|
|
1643
|
+
market.externalIdentifier,
|
|
1644
|
+
(_b = marketWithCanonicalId.marketId) != null ? _b : void 0
|
|
1645
|
+
].filter((value) => typeof value === "string" && value.trim().length > 0);
|
|
1677
1646
|
};
|
|
1678
1647
|
var EventListItemDetailsGraphSection = ({
|
|
1679
1648
|
venueMarkets,
|
|
1649
|
+
canonicalMarketId,
|
|
1680
1650
|
selectedOutcomeLabel,
|
|
1681
1651
|
onSelectedOutcomeLabelChange,
|
|
1682
1652
|
switchLabels,
|
|
@@ -1769,8 +1739,8 @@ var EventListItemDetailsGraphSection = ({
|
|
|
1769
1739
|
return [...outcomeByModeAndId.values()];
|
|
1770
1740
|
}, [selectedOutcomesByMode]);
|
|
1771
1741
|
const priceHistoryGroups = (0, import_react3.useMemo)(() => {
|
|
1772
|
-
return buildPriceHistoryGroups(allOutcomesForHistory);
|
|
1773
|
-
}, [allOutcomesForHistory]);
|
|
1742
|
+
return buildPriceHistoryGroups(allOutcomesForHistory, canonicalMarketId);
|
|
1743
|
+
}, [allOutcomesForHistory, canonicalMarketId]);
|
|
1774
1744
|
const timeWindow = (0, import_react3.useMemo)(() => {
|
|
1775
1745
|
return getTimeWindowByRange(selectedTimeRange);
|
|
1776
1746
|
}, [selectedTimeRange]);
|
|
@@ -1974,11 +1944,12 @@ var EventListItemDetailsContent = ({
|
|
|
1974
1944
|
ariaLabel,
|
|
1975
1945
|
defaultTimeRange
|
|
1976
1946
|
}) => {
|
|
1947
|
+
var _a, _b;
|
|
1977
1948
|
const config = (0, import_hooks13.useSdkUiConfig)();
|
|
1978
1949
|
const labels = (0, import_hooks13.useLabels)();
|
|
1979
1950
|
const venueMarkets = (0, import_react3.useMemo)(() => {
|
|
1980
|
-
var
|
|
1981
|
-
return (_c = (
|
|
1951
|
+
var _a2, _b2, _c;
|
|
1952
|
+
return (_c = (_b2 = (_a2 = event.markets) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.venueMarkets) != null ? _c : [];
|
|
1982
1953
|
}, [event.markets]);
|
|
1983
1954
|
const primaryVenueMarket = (0, import_react3.useMemo)(() => {
|
|
1984
1955
|
return selectPrimaryVenueMarket(venueMarkets);
|
|
@@ -2016,9 +1987,9 @@ var EventListItemDetailsContent = ({
|
|
|
2016
1987
|
if (outcomeLabels.length === 0)
|
|
2017
1988
|
return void 0;
|
|
2018
1989
|
return [...outcomeLabels].sort((left, right) => {
|
|
2019
|
-
var
|
|
2020
|
-
const leftProbability = (
|
|
2021
|
-
const rightProbability = (
|
|
1990
|
+
var _a2, _b2;
|
|
1991
|
+
const leftProbability = (_a2 = probabilityByLabel.get(left)) != null ? _a2 : -1;
|
|
1992
|
+
const rightProbability = (_b2 = probabilityByLabel.get(right)) != null ? _b2 : -1;
|
|
2022
1993
|
return rightProbability - leftProbability;
|
|
2023
1994
|
})[0];
|
|
2024
1995
|
}, [outcomeLabels, probabilityByLabel]);
|
|
@@ -2034,18 +2005,18 @@ var EventListItemDetailsContent = ({
|
|
|
2034
2005
|
setSelectedOutcomeLabel(fallbackOutcomeLabel);
|
|
2035
2006
|
}, [isDateOutcomeMarket, mainOutcomeLabel, outcomeLabels, selectedOutcomeLabel]);
|
|
2036
2007
|
const switchLabels = (0, import_react3.useMemo)(() => {
|
|
2037
|
-
var
|
|
2008
|
+
var _a2, _b2;
|
|
2038
2009
|
if (isDateOutcomeMarket) {
|
|
2039
2010
|
return [labels.eventItemDetails.yes, labels.eventItemDetails.no];
|
|
2040
2011
|
}
|
|
2041
2012
|
const sortedOutcomeLabels = [...outcomeLabels].sort((left, right) => {
|
|
2042
|
-
var
|
|
2043
|
-
const leftProbability = (
|
|
2044
|
-
const rightProbability = (
|
|
2013
|
+
var _a3, _b3;
|
|
2014
|
+
const leftProbability = (_a3 = probabilityByLabel.get(left)) != null ? _a3 : -1;
|
|
2015
|
+
const rightProbability = (_b3 = probabilityByLabel.get(right)) != null ? _b3 : -1;
|
|
2045
2016
|
return rightProbability - leftProbability;
|
|
2046
2017
|
});
|
|
2047
|
-
const firstLabel = (
|
|
2048
|
-
const secondLabel = (
|
|
2018
|
+
const firstLabel = (_a2 = sortedOutcomeLabels[0]) != null ? _a2 : labels.eventItemDetails.yes;
|
|
2019
|
+
const secondLabel = (_b2 = sortedOutcomeLabels.find((label) => label !== firstLabel)) != null ? _b2 : firstLabel;
|
|
2049
2020
|
return [firstLabel, secondLabel];
|
|
2050
2021
|
}, [
|
|
2051
2022
|
isDateOutcomeMarket,
|
|
@@ -2055,8 +2026,8 @@ var EventListItemDetailsContent = ({
|
|
|
2055
2026
|
probabilityByLabel
|
|
2056
2027
|
]);
|
|
2057
2028
|
const volumeLabel = (0, import_react3.useMemo)(() => {
|
|
2058
|
-
var
|
|
2059
|
-
const resolvedVolume = typeof event.volume === "number" ? event.volume : (
|
|
2029
|
+
var _a2;
|
|
2030
|
+
const resolvedVolume = typeof event.volume === "number" ? event.volume : (_a2 = primaryVenueMarket == null ? void 0 : primaryVenueMarket.volume) != null ? _a2 : void 0;
|
|
2060
2031
|
if (typeof resolvedVolume !== "number")
|
|
2061
2032
|
return "";
|
|
2062
2033
|
return `${config.formatCompactCurrency(resolvedVolume)} ${labels.eventItemDetails.volumeSuffix}`;
|
|
@@ -2154,6 +2125,7 @@ var EventListItemDetailsContent = ({
|
|
|
2154
2125
|
EventListItemDetailsGraphSection,
|
|
2155
2126
|
{
|
|
2156
2127
|
venueMarkets,
|
|
2128
|
+
canonicalMarketId: (_b = (_a = event.markets) == null ? void 0 : _a[0]) == null ? void 0 : _b.id,
|
|
2157
2129
|
selectedOutcomeLabel,
|
|
2158
2130
|
onSelectedOutcomeLabelChange: setSelectedOutcomeLabel,
|
|
2159
2131
|
switchLabels,
|