@agg-build/ui 2.1.1 → 2.1.3
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/{chunk-XHDGSRG7.mjs → chunk-BW7S2YR3.mjs} +1139 -308
- package/dist/{chunk-TERG43WW.mjs → chunk-R2YNZJZ3.mjs} +69 -27
- package/dist/{chunk-RPXRTXCY.mjs → chunk-T4YZGAYS.mjs} +22 -1
- package/dist/{chunk-IQT4I5B4.mjs → chunk-TAGPAADA.mjs} +2108 -767
- package/dist/{chunk-NK57KMYN.mjs → chunk-TBZWRUFB.mjs} +752 -589
- package/dist/{chunk-YJO6LMRT.mjs → chunk-VP76G6PN.mjs} +87 -25
- package/dist/{chunk-WU2C3C6K.mjs → chunk-XHE2VO3S.mjs} +4 -21
- package/dist/events.js +1014 -760
- package/dist/events.mjs +5 -3
- package/dist/index.js +9937 -7880
- package/dist/index.mjs +117 -456
- package/dist/modals.js +1 -1
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +8513 -6380
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +85 -25
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +979 -402
- package/dist/trading.mjs +10 -6
- package/dist/types/events/item/event-list-item.utils.d.mts +1 -25
- package/dist/types/events/item/event-list-item.utils.d.ts +1 -25
- package/dist/types/events/item-details/index.d.mts +2 -1
- package/dist/types/events/item-details/index.d.ts +2 -1
- package/dist/types/events/market-details/market-details-graph-panel.d.mts +39 -0
- package/dist/types/events/market-details/market-details-graph-panel.d.ts +39 -0
- package/dist/types/events/market-details/market-details-outcome-button.d.mts +2 -1
- package/dist/types/events/market-details/market-details-outcome-button.d.ts +2 -1
- package/dist/types/events/market-details/market-details.types.d.mts +31 -0
- package/dist/types/events/market-details/market-details.types.d.ts +31 -0
- package/dist/types/events/market-details/market-details.utils.d.mts +3 -16
- package/dist/types/events/market-details/market-details.utils.d.ts +3 -16
- package/dist/types/events/shared/format-event-title.d.mts +24 -0
- package/dist/types/events/shared/format-event-title.d.ts +24 -0
- package/dist/types/events/shared/format-sports-event-time.d.mts +2 -0
- package/dist/types/events/shared/format-sports-event-time.d.ts +2 -0
- package/dist/types/events/shared/select-best-outcome.d.mts +88 -0
- package/dist/types/events/shared/select-best-outcome.d.ts +88 -0
- package/dist/types/notifications/agg-notification-events-provider.d.mts +10 -1
- package/dist/types/notifications/agg-notification-events-provider.d.ts +10 -1
- package/dist/types/pages/event-market/event-market.shared.d.mts +30 -0
- package/dist/types/pages/event-market/event-market.shared.d.ts +30 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +7 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +7 -0
- package/dist/types/pages/event-market/sports-event-market-page.d.mts +8 -0
- package/dist/types/pages/event-market/sports-event-market-page.d.ts +8 -0
- package/dist/types/pages/event-market/sports-event-market.fixtures.d.mts +13 -0
- package/dist/types/pages/event-market/sports-event-market.fixtures.d.ts +13 -0
- package/dist/types/pages/event-market/sports-event-market.utils.d.mts +156 -0
- package/dist/types/pages/event-market/sports-event-market.utils.d.ts +156 -0
- package/dist/types/pages/event-market/sports-line-rail.d.mts +17 -0
- package/dist/types/pages/event-market/sports-line-rail.d.ts +17 -0
- package/dist/types/pages/event-market/sports-market-card.d.mts +22 -0
- package/dist/types/pages/event-market/sports-market-card.d.ts +22 -0
- package/dist/types/pages/event-market/sports-markets.d.mts +13 -0
- package/dist/types/pages/event-market/sports-markets.d.ts +13 -0
- package/dist/types/primitives/state-message/index.d.mts +1 -1
- package/dist/types/primitives/state-message/index.d.ts +1 -1
- package/dist/types/primitives/state-message/state-message.types.d.mts +1 -1
- package/dist/types/primitives/state-message/state-message.types.d.ts +1 -1
- package/dist/types/trading/index.d.mts +2 -0
- package/dist/types/trading/index.d.ts +2 -0
- package/dist/types/trading/place-order/index.d.mts +1 -1
- package/dist/types/trading/place-order/index.d.ts +1 -1
- package/dist/types/trading/place-order/index.place-order.types.d.mts +30 -1
- package/dist/types/trading/place-order/index.place-order.types.d.ts +30 -1
- package/dist/types/trading/settlement/settlement-text.utils.d.mts +5 -2
- package/dist/types/trading/settlement/settlement-text.utils.d.ts +5 -2
- package/dist/types/trading/use-claim-winnings.d.mts +84 -0
- package/dist/types/trading/use-claim-winnings.d.ts +84 -0
- package/dist/types/trading/use-resolved-market-claim.d.mts +26 -0
- package/dist/types/trading/use-resolved-market-claim.d.ts +26 -0
- package/package.json +3 -3
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { useAggLabels } from "@agg-build/hooks";
|
|
2
|
+
import type { WsOrderEvent } from "@agg-build/sdk";
|
|
1
3
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type ToastContextValue } from "../primitives/toast";
|
|
4
|
+
import { type ToastContextValue, type ToastTone } from "../primitives/toast";
|
|
3
5
|
interface AggNotificationEventsProviderProps {
|
|
4
6
|
children?: ReactNode;
|
|
5
7
|
/**
|
|
@@ -32,4 +34,11 @@ interface AggNotificationEventsProviderProps {
|
|
|
32
34
|
* so signing out / in cannot leak toasts from a prior session.
|
|
33
35
|
*/
|
|
34
36
|
export declare function AggNotificationEventsProvider({ children, enabled, depositActivityLimit, }: AggNotificationEventsProviderProps): JSX.Element;
|
|
37
|
+
export declare function resetOrderNotificationDedupe(): void;
|
|
38
|
+
interface HandleOrderArgs {
|
|
39
|
+
event: WsOrderEvent;
|
|
40
|
+
labels: ReturnType<typeof useAggLabels>;
|
|
41
|
+
fireOnce: (key: string, tone: ToastTone, title: string, message: string, detail?: string) => void;
|
|
42
|
+
}
|
|
43
|
+
export declare function handleOrderEvent({ event, labels, fireOnce }: HandleOrderArgs): void;
|
|
35
44
|
export type { ToastContextValue };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { useAggLabels } from "@agg-build/hooks";
|
|
2
|
+
import type { WsOrderEvent } from "@agg-build/sdk";
|
|
1
3
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type ToastContextValue } from "../primitives/toast";
|
|
4
|
+
import { type ToastContextValue, type ToastTone } from "../primitives/toast";
|
|
3
5
|
interface AggNotificationEventsProviderProps {
|
|
4
6
|
children?: ReactNode;
|
|
5
7
|
/**
|
|
@@ -32,4 +34,11 @@ interface AggNotificationEventsProviderProps {
|
|
|
32
34
|
* so signing out / in cannot leak toasts from a prior session.
|
|
33
35
|
*/
|
|
34
36
|
export declare function AggNotificationEventsProvider({ children, enabled, depositActivityLimit, }: AggNotificationEventsProviderProps): JSX.Element;
|
|
37
|
+
export declare function resetOrderNotificationDedupe(): void;
|
|
38
|
+
interface HandleOrderArgs {
|
|
39
|
+
event: WsOrderEvent;
|
|
40
|
+
labels: ReturnType<typeof useAggLabels>;
|
|
41
|
+
fireOnce: (key: string, tone: ToastTone, title: string, message: string, detail?: string) => void;
|
|
42
|
+
}
|
|
43
|
+
export declare function handleOrderEvent({ event, labels, fireOnce }: HandleOrderArgs): void;
|
|
35
44
|
export type { ToastContextValue };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { resolveEventTradingState, type UseMidpointsResult } from "@agg-build/hooks";
|
|
2
|
+
import type { EventMarketPageProps } from "./event-market.types";
|
|
3
|
+
export declare const MOBILE_EVENT_MARKET_MEDIA_QUERY = "(max-width: 1023px)";
|
|
4
|
+
export declare const SPORTS_EVENT_MARKET_MEDIA_QUERY = "(max-width: 1279px)";
|
|
5
|
+
export type EventMarketPlaceOrderClassNames = {
|
|
6
|
+
root?: string;
|
|
7
|
+
body?: string;
|
|
8
|
+
content?: string;
|
|
9
|
+
footer?: string;
|
|
10
|
+
header?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const getIsMobileEventMarketViewport: (mediaQuery?: string) => boolean;
|
|
13
|
+
export declare const useIsMobileEventMarketViewport: (mediaQuery?: string) => boolean;
|
|
14
|
+
export declare const resolveDesktopTradePlaceOrderClassNames: (classNames?: EventMarketPageProps["classNames"]) => EventMarketPlaceOrderClassNames | undefined;
|
|
15
|
+
export declare const resolveMobileTradePlaceOrderClassNames: (classNames?: EventMarketPageProps["classNames"]) => EventMarketPlaceOrderClassNames;
|
|
16
|
+
type EventMarketPageMobileTradeProps = {
|
|
17
|
+
classNames?: EventMarketPageProps["classNames"];
|
|
18
|
+
eventTradingState: ReturnType<typeof resolveEventTradingState>;
|
|
19
|
+
executionMode?: EventMarketPageProps["executionMode"];
|
|
20
|
+
showPlaceOrder?: boolean;
|
|
21
|
+
isOpen: boolean;
|
|
22
|
+
onOpenChange: (nextOpen: boolean) => void;
|
|
23
|
+
midpointsResult?: UseMidpointsResult;
|
|
24
|
+
onBeforePrimaryAction?: EventMarketPageProps["onBeforePrimaryAction"];
|
|
25
|
+
};
|
|
26
|
+
export declare const EventMarketPageMobileTrade: ({ classNames, eventTradingState, executionMode, showPlaceOrder, isOpen, onOpenChange, midpointsResult, onBeforePrimaryAction, }: EventMarketPageMobileTradeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export declare const EventMarketPageUnavailableState: ({ ariaLabel: _ariaLabel, }: Pick<EventMarketPageProps, "ariaLabel">) => JSX.Element;
|
|
28
|
+
export declare const EventMarketPageNotFoundState: ({ ariaLabel: _ariaLabel, }: Pick<EventMarketPageProps, "ariaLabel">) => JSX.Element;
|
|
29
|
+
export declare const EventMarketPageLoadingState: ({ classNames, stickyOrderPanel, }: Pick<EventMarketPageProps, "classNames" | "stickyOrderPanel">) => JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { resolveEventTradingState, type UseMidpointsResult } from "@agg-build/hooks";
|
|
2
|
+
import type { EventMarketPageProps } from "./event-market.types";
|
|
3
|
+
export declare const MOBILE_EVENT_MARKET_MEDIA_QUERY = "(max-width: 1023px)";
|
|
4
|
+
export declare const SPORTS_EVENT_MARKET_MEDIA_QUERY = "(max-width: 1279px)";
|
|
5
|
+
export type EventMarketPlaceOrderClassNames = {
|
|
6
|
+
root?: string;
|
|
7
|
+
body?: string;
|
|
8
|
+
content?: string;
|
|
9
|
+
footer?: string;
|
|
10
|
+
header?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const getIsMobileEventMarketViewport: (mediaQuery?: string) => boolean;
|
|
13
|
+
export declare const useIsMobileEventMarketViewport: (mediaQuery?: string) => boolean;
|
|
14
|
+
export declare const resolveDesktopTradePlaceOrderClassNames: (classNames?: EventMarketPageProps["classNames"]) => EventMarketPlaceOrderClassNames | undefined;
|
|
15
|
+
export declare const resolveMobileTradePlaceOrderClassNames: (classNames?: EventMarketPageProps["classNames"]) => EventMarketPlaceOrderClassNames;
|
|
16
|
+
type EventMarketPageMobileTradeProps = {
|
|
17
|
+
classNames?: EventMarketPageProps["classNames"];
|
|
18
|
+
eventTradingState: ReturnType<typeof resolveEventTradingState>;
|
|
19
|
+
executionMode?: EventMarketPageProps["executionMode"];
|
|
20
|
+
showPlaceOrder?: boolean;
|
|
21
|
+
isOpen: boolean;
|
|
22
|
+
onOpenChange: (nextOpen: boolean) => void;
|
|
23
|
+
midpointsResult?: UseMidpointsResult;
|
|
24
|
+
onBeforePrimaryAction?: EventMarketPageProps["onBeforePrimaryAction"];
|
|
25
|
+
};
|
|
26
|
+
export declare const EventMarketPageMobileTrade: ({ classNames, eventTradingState, executionMode, showPlaceOrder, isOpen, onOpenChange, midpointsResult, onBeforePrimaryAction, }: EventMarketPageMobileTradeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export declare const EventMarketPageUnavailableState: ({ ariaLabel: _ariaLabel, }: Pick<EventMarketPageProps, "ariaLabel">) => JSX.Element;
|
|
28
|
+
export declare const EventMarketPageNotFoundState: ({ ariaLabel: _ariaLabel, }: Pick<EventMarketPageProps, "ariaLabel">) => JSX.Element;
|
|
29
|
+
export declare const EventMarketPageLoadingState: ({ classNames, stickyOrderPanel, }: Pick<EventMarketPageProps, "classNames" | "stickyOrderPanel">) => JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VenueEventWithMarkets } from "../../events/item/event-list-item.types";
|
|
2
2
|
import type { PlaceOrderResolvedClaimSummary } from "../../trading";
|
|
3
|
+
import type { PlaceOrderProps } from "../../trading/place-order/index.place-order.types";
|
|
3
4
|
export type EventMarketPageClassNames = Partial<{
|
|
4
5
|
root: string;
|
|
5
6
|
content: string;
|
|
@@ -44,6 +45,12 @@ export type EventMarketPageBaseProps = {
|
|
|
44
45
|
defaultOutcomeId?: string;
|
|
45
46
|
/** Whether to render the place-order panel. */
|
|
46
47
|
showPlaceOrder?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Pre-flight gate run before the internal quote execution, forwarded to the
|
|
50
|
+
* place-order panel. When it resolves the order fills as usual; return
|
|
51
|
+
* `false` to cancel or throw to abort. See `PlaceOrderProps.onBeforePrimaryAction`.
|
|
52
|
+
*/
|
|
53
|
+
onBeforePrimaryAction?: PlaceOrderProps["onBeforePrimaryAction"];
|
|
47
54
|
executionMode?: "live" | "paper";
|
|
48
55
|
/** Optional resolved-event claim summary shown inside the read-only order panel. */
|
|
49
56
|
resolvedClaim?: PlaceOrderResolvedClaimSummary;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VenueEventWithMarkets } from "../../events/item/event-list-item.types";
|
|
2
2
|
import type { PlaceOrderResolvedClaimSummary } from "../../trading";
|
|
3
|
+
import type { PlaceOrderProps } from "../../trading/place-order/index.place-order.types";
|
|
3
4
|
export type EventMarketPageClassNames = Partial<{
|
|
4
5
|
root: string;
|
|
5
6
|
content: string;
|
|
@@ -44,6 +45,12 @@ export type EventMarketPageBaseProps = {
|
|
|
44
45
|
defaultOutcomeId?: string;
|
|
45
46
|
/** Whether to render the place-order panel. */
|
|
46
47
|
showPlaceOrder?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Pre-flight gate run before the internal quote execution, forwarded to the
|
|
50
|
+
* place-order panel. When it resolves the order fills as usual; return
|
|
51
|
+
* `false` to cancel or throw to abort. See `PlaceOrderProps.onBeforePrimaryAction`.
|
|
52
|
+
*/
|
|
53
|
+
onBeforePrimaryAction?: PlaceOrderProps["onBeforePrimaryAction"];
|
|
47
54
|
executionMode?: "live" | "paper";
|
|
48
55
|
/** Optional resolved-event claim summary shown inside the read-only order panel. */
|
|
49
56
|
resolvedClaim?: PlaceOrderResolvedClaimSummary;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VenueEventWithMarkets } from "../../events/item/event-list-item.types";
|
|
2
|
+
import type { EventMarketPageProps } from "./event-market.types";
|
|
3
|
+
export declare const SportsEventMarketPage: {
|
|
4
|
+
({ event, defaultMarketId, defaultOutcomeId, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, }: Extract<EventMarketPageProps, {
|
|
5
|
+
event: VenueEventWithMarkets;
|
|
6
|
+
}>): JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VenueEventWithMarkets } from "../../events/item/event-list-item.types";
|
|
2
|
+
import type { EventMarketPageProps } from "./event-market.types";
|
|
3
|
+
export declare const SportsEventMarketPage: {
|
|
4
|
+
({ event, defaultMarketId, defaultOutcomeId, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, }: Extract<EventMarketPageProps, {
|
|
5
|
+
event: VenueEventWithMarkets;
|
|
6
|
+
}>): JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type VenueEventWithMarkets, type VenueMarket } from "@agg-build/hooks";
|
|
2
|
+
export declare const sportsSectionMarketsByTab: {
|
|
3
|
+
game_lines: VenueMarket[];
|
|
4
|
+
halves: readonly [VenueMarket, VenueMarket, VenueMarket];
|
|
5
|
+
exact_score: readonly [VenueMarket];
|
|
6
|
+
corners: readonly [VenueMarket, VenueMarket];
|
|
7
|
+
goals: VenueMarket[];
|
|
8
|
+
assists: readonly [VenueMarket];
|
|
9
|
+
shots: readonly [VenueMarket];
|
|
10
|
+
other: readonly [VenueMarket];
|
|
11
|
+
};
|
|
12
|
+
export declare const sportsEventPageFixture: VenueEventWithMarkets;
|
|
13
|
+
export declare const sportsLikeEsportsEventFixture: VenueEventWithMarkets;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type VenueEventWithMarkets, type VenueMarket } from "@agg-build/hooks";
|
|
2
|
+
export declare const sportsSectionMarketsByTab: {
|
|
3
|
+
game_lines: VenueMarket[];
|
|
4
|
+
halves: readonly [VenueMarket, VenueMarket, VenueMarket];
|
|
5
|
+
exact_score: readonly [VenueMarket];
|
|
6
|
+
corners: readonly [VenueMarket, VenueMarket];
|
|
7
|
+
goals: VenueMarket[];
|
|
8
|
+
assists: readonly [VenueMarket];
|
|
9
|
+
shots: readonly [VenueMarket];
|
|
10
|
+
other: readonly [VenueMarket];
|
|
11
|
+
};
|
|
12
|
+
export declare const sportsEventPageFixture: VenueEventWithMarkets;
|
|
13
|
+
export declare const sportsLikeEsportsEventFixture: VenueEventWithMarkets;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { VenueEventWithMarkets, VenueMarket } from "@agg-build/hooks";
|
|
2
|
+
export declare const SPORTS_SECTION_TAB_KEYS: readonly ["game_lines", "halves", "exact_score", "corners", "goals", "assists", "shots", "other"];
|
|
3
|
+
export type SportsSectionTabKey = (typeof SPORTS_SECTION_TAB_KEYS)[number];
|
|
4
|
+
export declare const SPORTS_MARKET_TYPE_KEYS: readonly ["moneyline", "spread", "total", "prop", "completion", "other"];
|
|
5
|
+
export type SportsMarketTypeKey = (typeof SPORTS_MARKET_TYPE_KEYS)[number];
|
|
6
|
+
export declare const SPORTS_PERIOD_KEYS: readonly ["full", "1h", "2h", "q1", "q2", "q3", "q4", "ot", "first_inning", "second_inning", "third_inning", "first_5_innings", "other"];
|
|
7
|
+
export type SportsPeriodKey = (typeof SPORTS_PERIOD_KEYS)[number];
|
|
8
|
+
export declare const SPORTS_MARKET_CATEGORY_KEYS: readonly ["game_lines", "exact_score", "corners", "goals", "assists", "shots", "other"];
|
|
9
|
+
export type SportsMarketCategoryKey = (typeof SPORTS_MARKET_CATEGORY_KEYS)[number];
|
|
10
|
+
export declare const SPORTS_MARKET_GROUP_KEYS: readonly ["game_lines", "spreads", "totals", "period_lines", "exact_score", "team_props", "player_props", "specials", "completion", "other"];
|
|
11
|
+
export type SportsMarketGroupKey = (typeof SPORTS_MARKET_GROUP_KEYS)[number];
|
|
12
|
+
export type SportsSectionTabDefinition = {
|
|
13
|
+
key: SportsSectionTabKey;
|
|
14
|
+
/** Preferred section filter — supersedes `marketCategory`. */
|
|
15
|
+
marketGroup?: readonly SportsMarketGroupKey[];
|
|
16
|
+
/** Legacy compatibility filter (soccer prop tabs without a marketGroup). */
|
|
17
|
+
marketCategory?: SportsMarketCategoryKey;
|
|
18
|
+
sportsMarketType?: readonly SportsMarketTypeKey[];
|
|
19
|
+
period?: readonly SportsPeriodKey[];
|
|
20
|
+
};
|
|
21
|
+
export declare const SPORTS_SECTION_TAB_DEFINITIONS: readonly [{
|
|
22
|
+
readonly key: "game_lines";
|
|
23
|
+
readonly marketGroup: readonly ["game_lines", "spreads", "totals"];
|
|
24
|
+
}, {
|
|
25
|
+
readonly key: "exact_score";
|
|
26
|
+
readonly marketGroup: readonly ["exact_score"];
|
|
27
|
+
}, {
|
|
28
|
+
readonly key: "halves";
|
|
29
|
+
readonly marketGroup: readonly ["period_lines"];
|
|
30
|
+
readonly period: readonly ["1h", "2h"];
|
|
31
|
+
}, {
|
|
32
|
+
readonly key: "corners";
|
|
33
|
+
readonly marketCategory: "corners";
|
|
34
|
+
}, {
|
|
35
|
+
readonly key: "goals";
|
|
36
|
+
readonly marketCategory: "goals";
|
|
37
|
+
}, {
|
|
38
|
+
readonly key: "assists";
|
|
39
|
+
readonly marketCategory: "assists";
|
|
40
|
+
}, {
|
|
41
|
+
readonly key: "shots";
|
|
42
|
+
readonly marketCategory: "shots";
|
|
43
|
+
}, {
|
|
44
|
+
readonly key: "other";
|
|
45
|
+
readonly marketGroup: readonly ["other", "team_props", "player_props", "specials", "completion"];
|
|
46
|
+
}];
|
|
47
|
+
export type SportsMarketCardVariant = "outcome" | "line" | "yes_no";
|
|
48
|
+
export type SportsMarketDisplayGroup = {
|
|
49
|
+
id: string;
|
|
50
|
+
title: string;
|
|
51
|
+
questionKey: string;
|
|
52
|
+
sportsMarketType: SportsMarketTypeKey | null;
|
|
53
|
+
marketCategory: SportsMarketCategoryKey | null;
|
|
54
|
+
period: SportsPeriodKey;
|
|
55
|
+
sectionRank: number;
|
|
56
|
+
markets: VenueMarket[];
|
|
57
|
+
hasLineVariants: boolean;
|
|
58
|
+
};
|
|
59
|
+
export type SportsPeriodGroup = {
|
|
60
|
+
key: SportsPeriodKey;
|
|
61
|
+
markets: VenueMarket[];
|
|
62
|
+
groups: SportsMarketDisplayGroup[];
|
|
63
|
+
};
|
|
64
|
+
export declare const resolveSportsSectionDefinition: (key: SportsSectionTabKey) => SportsSectionTabDefinition;
|
|
65
|
+
export declare const normalizeSportsPeriod: (value: string | null | undefined) => SportsPeriodKey;
|
|
66
|
+
export declare const normalizeSportsMarketType: (value: string | null | undefined) => SportsMarketTypeKey | null;
|
|
67
|
+
export declare const normalizeSportsMarketCategory: (value: string | null | undefined) => SportsMarketCategoryKey | null;
|
|
68
|
+
export declare const normalizeSportsMarketGroup: (value: string | null | undefined) => SportsMarketGroupKey | null;
|
|
69
|
+
/**
|
|
70
|
+
* Map a market to the sports section tab it belongs to — marketGroup-first, with
|
|
71
|
+
* marketCategory as the documented compatibility fallback (see the
|
|
72
|
+
* sports-market-detail recipe). Returns null when a market carries no
|
|
73
|
+
* recognizable grouping metadata, so the page can fall back to the default,
|
|
74
|
+
* ungrouped market list instead of inventing an empty tab.
|
|
75
|
+
*/
|
|
76
|
+
export declare const resolveMarketSectionTabKey: (market: Pick<VenueMarket, "marketGroup" | "marketCategory">) => SportsSectionTabKey | null;
|
|
77
|
+
export declare const resolveSportsSectionFilters: (key: SportsSectionTabKey) => {
|
|
78
|
+
marketGroup?: SportsMarketGroupKey[];
|
|
79
|
+
marketCategory?: SportsMarketCategoryKey[];
|
|
80
|
+
sportsMarketType?: SportsMarketTypeKey[];
|
|
81
|
+
period?: SportsPeriodKey[];
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Resolve the markets a sports section tab should display and group.
|
|
85
|
+
*
|
|
86
|
+
* Section markets are fetched by `aggKey`, which intentionally spans every
|
|
87
|
+
* sibling venue-event for the same real-world game (so cross-venue line ladders
|
|
88
|
+
* and prop categories aggregate together). For the Game Lines MONEYLINE
|
|
89
|
+
* (match-result) group, that aggregation is wrong: it can surface duplicate
|
|
90
|
+
* draws sourced from sibling events, props mis-classified as `moneyline`, and —
|
|
91
|
+
* because a sibling's market often wins the cross-venue collapse — it can omit
|
|
92
|
+
* THIS event's own outcome markets entirely (e.g. show two "Draw"s and drop the
|
|
93
|
+
* "Australia" win).
|
|
94
|
+
*
|
|
95
|
+
* The event's own curated `venueMarkets` are the authoritative N-way result for
|
|
96
|
+
* this event (the same source the non-sports event page renders correctly). So
|
|
97
|
+
* on the Game Lines tab we take the moneyline markets from the event and keep
|
|
98
|
+
* only the line markets (spread/total) from the aggKey fetch. Every other tab —
|
|
99
|
+
* and the spread/total ladders within Game Lines — use the fetched markets
|
|
100
|
+
* unchanged.
|
|
101
|
+
*/
|
|
102
|
+
export declare const resolveSportsSectionMarkets: ({ tabKey, eventMarkets, sectionMarkets, }: {
|
|
103
|
+
tabKey: SportsSectionTabKey;
|
|
104
|
+
eventMarkets: VenueMarket[];
|
|
105
|
+
sectionMarkets: VenueMarket[];
|
|
106
|
+
}) => VenueMarket[];
|
|
107
|
+
export declare const resolveSportsMarketCardVariant: (market: VenueMarket) => SportsMarketCardVariant;
|
|
108
|
+
export declare const isBinarySportsMoneylineMarket: (market: VenueMarket) => boolean;
|
|
109
|
+
export declare const buildSportsMarketDisplayGroups: (markets: VenueMarket[]) => SportsMarketDisplayGroup[];
|
|
110
|
+
export declare const groupSportsMarketsByPeriod: (markets: VenueMarket[]) => SportsPeriodGroup[];
|
|
111
|
+
export type SportsGameLineSlideKind = "moneyline" | "spread" | "total" | "other";
|
|
112
|
+
export type SportsGameLineSlideStop = {
|
|
113
|
+
/** Display value for the ladder chip, e.g. "1.5", "216.5". */
|
|
114
|
+
value: string;
|
|
115
|
+
/** Venue ids offering this line (cast to VenueLogoName at the render site). */
|
|
116
|
+
venues: string[];
|
|
117
|
+
market: VenueMarket;
|
|
118
|
+
};
|
|
119
|
+
export type SportsGameLineSlide = {
|
|
120
|
+
id: string;
|
|
121
|
+
kind: SportsGameLineSlideKind;
|
|
122
|
+
group: SportsMarketDisplayGroup;
|
|
123
|
+
/** False for moneyline / single-market groups → no line ladder. */
|
|
124
|
+
hasLadder: boolean;
|
|
125
|
+
stops: SportsGameLineSlideStop[];
|
|
126
|
+
/** Marquee line on first render — the highest-volume line in the group. */
|
|
127
|
+
defaultStopIndex: number;
|
|
128
|
+
};
|
|
129
|
+
export declare const resolveSelectedSportsLineValue: (lineValue: number | null | undefined) => string;
|
|
130
|
+
export declare const collectVenueNames: (market: VenueMarket) => string[];
|
|
131
|
+
export declare const resolveTotalGroupVolume: (markets: VenueMarket[]) => number;
|
|
132
|
+
export declare const resolveSportsExpandedMarkets: (markets: VenueMarket[]) => VenueMarket[];
|
|
133
|
+
export declare const resolveSportsExpandedMarketsVolume: (markets: VenueMarket[]) => number;
|
|
134
|
+
export declare const buildSportsSlideFromGroup: (group: SportsMarketDisplayGroup) => SportsGameLineSlide;
|
|
135
|
+
/**
|
|
136
|
+
* Derive the Moneyline / Spreads / Total game-line slides (in that order) from a
|
|
137
|
+
* flat list of venue markets. Reuses {@link buildSportsMarketDisplayGroups} so
|
|
138
|
+
* line variants collapse into one slide with the per-line ladder.
|
|
139
|
+
*/
|
|
140
|
+
export declare const buildSportsGameLineSlides: (markets: VenueMarket[], period?: SportsPeriodKey) => SportsGameLineSlide[];
|
|
141
|
+
export type SportsTeam = {
|
|
142
|
+
name: string;
|
|
143
|
+
abbr: string;
|
|
144
|
+
};
|
|
145
|
+
export type SportsTeams = {
|
|
146
|
+
away: SportsTeam;
|
|
147
|
+
home: SportsTeam;
|
|
148
|
+
};
|
|
149
|
+
export declare const resolveSportsTeams: (event: Pick<VenueEventWithMarkets, "title">, moneylineMarket?: VenueMarket | null) => SportsTeams | null;
|
|
150
|
+
export declare const resolveSportsLeagueLabel: (event: Pick<VenueEventWithMarkets, "categories" | "aggKey">) => string | null;
|
|
151
|
+
export declare const isNonStandardSportsLikeEvent: (event: Pick<VenueEventWithMarkets, "categories" | "title" | "venueMarkets">) => boolean;
|
|
152
|
+
export declare const resolveVisibleSportsSectionTabDefinitions: (event: Pick<VenueEventWithMarkets, "categories" | "title" | "venueMarkets">) => SportsSectionTabDefinition[];
|
|
153
|
+
export declare const mergeSportsSectionMarketsIntoEvent: ({ event, sectionMarketsByKey, }: {
|
|
154
|
+
event: import("@agg-build/hooks").VenueEventWithMarkets;
|
|
155
|
+
sectionMarketsByKey: Partial<Record<SportsSectionTabKey, VenueMarket[]>>;
|
|
156
|
+
}) => import("@agg-build/hooks").VenueEventWithMarkets;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { VenueEventWithMarkets, VenueMarket } from "@agg-build/hooks";
|
|
2
|
+
export declare const SPORTS_SECTION_TAB_KEYS: readonly ["game_lines", "halves", "exact_score", "corners", "goals", "assists", "shots", "other"];
|
|
3
|
+
export type SportsSectionTabKey = (typeof SPORTS_SECTION_TAB_KEYS)[number];
|
|
4
|
+
export declare const SPORTS_MARKET_TYPE_KEYS: readonly ["moneyline", "spread", "total", "prop", "completion", "other"];
|
|
5
|
+
export type SportsMarketTypeKey = (typeof SPORTS_MARKET_TYPE_KEYS)[number];
|
|
6
|
+
export declare const SPORTS_PERIOD_KEYS: readonly ["full", "1h", "2h", "q1", "q2", "q3", "q4", "ot", "first_inning", "second_inning", "third_inning", "first_5_innings", "other"];
|
|
7
|
+
export type SportsPeriodKey = (typeof SPORTS_PERIOD_KEYS)[number];
|
|
8
|
+
export declare const SPORTS_MARKET_CATEGORY_KEYS: readonly ["game_lines", "exact_score", "corners", "goals", "assists", "shots", "other"];
|
|
9
|
+
export type SportsMarketCategoryKey = (typeof SPORTS_MARKET_CATEGORY_KEYS)[number];
|
|
10
|
+
export declare const SPORTS_MARKET_GROUP_KEYS: readonly ["game_lines", "spreads", "totals", "period_lines", "exact_score", "team_props", "player_props", "specials", "completion", "other"];
|
|
11
|
+
export type SportsMarketGroupKey = (typeof SPORTS_MARKET_GROUP_KEYS)[number];
|
|
12
|
+
export type SportsSectionTabDefinition = {
|
|
13
|
+
key: SportsSectionTabKey;
|
|
14
|
+
/** Preferred section filter — supersedes `marketCategory`. */
|
|
15
|
+
marketGroup?: readonly SportsMarketGroupKey[];
|
|
16
|
+
/** Legacy compatibility filter (soccer prop tabs without a marketGroup). */
|
|
17
|
+
marketCategory?: SportsMarketCategoryKey;
|
|
18
|
+
sportsMarketType?: readonly SportsMarketTypeKey[];
|
|
19
|
+
period?: readonly SportsPeriodKey[];
|
|
20
|
+
};
|
|
21
|
+
export declare const SPORTS_SECTION_TAB_DEFINITIONS: readonly [{
|
|
22
|
+
readonly key: "game_lines";
|
|
23
|
+
readonly marketGroup: readonly ["game_lines", "spreads", "totals"];
|
|
24
|
+
}, {
|
|
25
|
+
readonly key: "exact_score";
|
|
26
|
+
readonly marketGroup: readonly ["exact_score"];
|
|
27
|
+
}, {
|
|
28
|
+
readonly key: "halves";
|
|
29
|
+
readonly marketGroup: readonly ["period_lines"];
|
|
30
|
+
readonly period: readonly ["1h", "2h"];
|
|
31
|
+
}, {
|
|
32
|
+
readonly key: "corners";
|
|
33
|
+
readonly marketCategory: "corners";
|
|
34
|
+
}, {
|
|
35
|
+
readonly key: "goals";
|
|
36
|
+
readonly marketCategory: "goals";
|
|
37
|
+
}, {
|
|
38
|
+
readonly key: "assists";
|
|
39
|
+
readonly marketCategory: "assists";
|
|
40
|
+
}, {
|
|
41
|
+
readonly key: "shots";
|
|
42
|
+
readonly marketCategory: "shots";
|
|
43
|
+
}, {
|
|
44
|
+
readonly key: "other";
|
|
45
|
+
readonly marketGroup: readonly ["other", "team_props", "player_props", "specials", "completion"];
|
|
46
|
+
}];
|
|
47
|
+
export type SportsMarketCardVariant = "outcome" | "line" | "yes_no";
|
|
48
|
+
export type SportsMarketDisplayGroup = {
|
|
49
|
+
id: string;
|
|
50
|
+
title: string;
|
|
51
|
+
questionKey: string;
|
|
52
|
+
sportsMarketType: SportsMarketTypeKey | null;
|
|
53
|
+
marketCategory: SportsMarketCategoryKey | null;
|
|
54
|
+
period: SportsPeriodKey;
|
|
55
|
+
sectionRank: number;
|
|
56
|
+
markets: VenueMarket[];
|
|
57
|
+
hasLineVariants: boolean;
|
|
58
|
+
};
|
|
59
|
+
export type SportsPeriodGroup = {
|
|
60
|
+
key: SportsPeriodKey;
|
|
61
|
+
markets: VenueMarket[];
|
|
62
|
+
groups: SportsMarketDisplayGroup[];
|
|
63
|
+
};
|
|
64
|
+
export declare const resolveSportsSectionDefinition: (key: SportsSectionTabKey) => SportsSectionTabDefinition;
|
|
65
|
+
export declare const normalizeSportsPeriod: (value: string | null | undefined) => SportsPeriodKey;
|
|
66
|
+
export declare const normalizeSportsMarketType: (value: string | null | undefined) => SportsMarketTypeKey | null;
|
|
67
|
+
export declare const normalizeSportsMarketCategory: (value: string | null | undefined) => SportsMarketCategoryKey | null;
|
|
68
|
+
export declare const normalizeSportsMarketGroup: (value: string | null | undefined) => SportsMarketGroupKey | null;
|
|
69
|
+
/**
|
|
70
|
+
* Map a market to the sports section tab it belongs to — marketGroup-first, with
|
|
71
|
+
* marketCategory as the documented compatibility fallback (see the
|
|
72
|
+
* sports-market-detail recipe). Returns null when a market carries no
|
|
73
|
+
* recognizable grouping metadata, so the page can fall back to the default,
|
|
74
|
+
* ungrouped market list instead of inventing an empty tab.
|
|
75
|
+
*/
|
|
76
|
+
export declare const resolveMarketSectionTabKey: (market: Pick<VenueMarket, "marketGroup" | "marketCategory">) => SportsSectionTabKey | null;
|
|
77
|
+
export declare const resolveSportsSectionFilters: (key: SportsSectionTabKey) => {
|
|
78
|
+
marketGroup?: SportsMarketGroupKey[];
|
|
79
|
+
marketCategory?: SportsMarketCategoryKey[];
|
|
80
|
+
sportsMarketType?: SportsMarketTypeKey[];
|
|
81
|
+
period?: SportsPeriodKey[];
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Resolve the markets a sports section tab should display and group.
|
|
85
|
+
*
|
|
86
|
+
* Section markets are fetched by `aggKey`, which intentionally spans every
|
|
87
|
+
* sibling venue-event for the same real-world game (so cross-venue line ladders
|
|
88
|
+
* and prop categories aggregate together). For the Game Lines MONEYLINE
|
|
89
|
+
* (match-result) group, that aggregation is wrong: it can surface duplicate
|
|
90
|
+
* draws sourced from sibling events, props mis-classified as `moneyline`, and —
|
|
91
|
+
* because a sibling's market often wins the cross-venue collapse — it can omit
|
|
92
|
+
* THIS event's own outcome markets entirely (e.g. show two "Draw"s and drop the
|
|
93
|
+
* "Australia" win).
|
|
94
|
+
*
|
|
95
|
+
* The event's own curated `venueMarkets` are the authoritative N-way result for
|
|
96
|
+
* this event (the same source the non-sports event page renders correctly). So
|
|
97
|
+
* on the Game Lines tab we take the moneyline markets from the event and keep
|
|
98
|
+
* only the line markets (spread/total) from the aggKey fetch. Every other tab —
|
|
99
|
+
* and the spread/total ladders within Game Lines — use the fetched markets
|
|
100
|
+
* unchanged.
|
|
101
|
+
*/
|
|
102
|
+
export declare const resolveSportsSectionMarkets: ({ tabKey, eventMarkets, sectionMarkets, }: {
|
|
103
|
+
tabKey: SportsSectionTabKey;
|
|
104
|
+
eventMarkets: VenueMarket[];
|
|
105
|
+
sectionMarkets: VenueMarket[];
|
|
106
|
+
}) => VenueMarket[];
|
|
107
|
+
export declare const resolveSportsMarketCardVariant: (market: VenueMarket) => SportsMarketCardVariant;
|
|
108
|
+
export declare const isBinarySportsMoneylineMarket: (market: VenueMarket) => boolean;
|
|
109
|
+
export declare const buildSportsMarketDisplayGroups: (markets: VenueMarket[]) => SportsMarketDisplayGroup[];
|
|
110
|
+
export declare const groupSportsMarketsByPeriod: (markets: VenueMarket[]) => SportsPeriodGroup[];
|
|
111
|
+
export type SportsGameLineSlideKind = "moneyline" | "spread" | "total" | "other";
|
|
112
|
+
export type SportsGameLineSlideStop = {
|
|
113
|
+
/** Display value for the ladder chip, e.g. "1.5", "216.5". */
|
|
114
|
+
value: string;
|
|
115
|
+
/** Venue ids offering this line (cast to VenueLogoName at the render site). */
|
|
116
|
+
venues: string[];
|
|
117
|
+
market: VenueMarket;
|
|
118
|
+
};
|
|
119
|
+
export type SportsGameLineSlide = {
|
|
120
|
+
id: string;
|
|
121
|
+
kind: SportsGameLineSlideKind;
|
|
122
|
+
group: SportsMarketDisplayGroup;
|
|
123
|
+
/** False for moneyline / single-market groups → no line ladder. */
|
|
124
|
+
hasLadder: boolean;
|
|
125
|
+
stops: SportsGameLineSlideStop[];
|
|
126
|
+
/** Marquee line on first render — the highest-volume line in the group. */
|
|
127
|
+
defaultStopIndex: number;
|
|
128
|
+
};
|
|
129
|
+
export declare const resolveSelectedSportsLineValue: (lineValue: number | null | undefined) => string;
|
|
130
|
+
export declare const collectVenueNames: (market: VenueMarket) => string[];
|
|
131
|
+
export declare const resolveTotalGroupVolume: (markets: VenueMarket[]) => number;
|
|
132
|
+
export declare const resolveSportsExpandedMarkets: (markets: VenueMarket[]) => VenueMarket[];
|
|
133
|
+
export declare const resolveSportsExpandedMarketsVolume: (markets: VenueMarket[]) => number;
|
|
134
|
+
export declare const buildSportsSlideFromGroup: (group: SportsMarketDisplayGroup) => SportsGameLineSlide;
|
|
135
|
+
/**
|
|
136
|
+
* Derive the Moneyline / Spreads / Total game-line slides (in that order) from a
|
|
137
|
+
* flat list of venue markets. Reuses {@link buildSportsMarketDisplayGroups} so
|
|
138
|
+
* line variants collapse into one slide with the per-line ladder.
|
|
139
|
+
*/
|
|
140
|
+
export declare const buildSportsGameLineSlides: (markets: VenueMarket[], period?: SportsPeriodKey) => SportsGameLineSlide[];
|
|
141
|
+
export type SportsTeam = {
|
|
142
|
+
name: string;
|
|
143
|
+
abbr: string;
|
|
144
|
+
};
|
|
145
|
+
export type SportsTeams = {
|
|
146
|
+
away: SportsTeam;
|
|
147
|
+
home: SportsTeam;
|
|
148
|
+
};
|
|
149
|
+
export declare const resolveSportsTeams: (event: Pick<VenueEventWithMarkets, "title">, moneylineMarket?: VenueMarket | null) => SportsTeams | null;
|
|
150
|
+
export declare const resolveSportsLeagueLabel: (event: Pick<VenueEventWithMarkets, "categories" | "aggKey">) => string | null;
|
|
151
|
+
export declare const isNonStandardSportsLikeEvent: (event: Pick<VenueEventWithMarkets, "categories" | "title" | "venueMarkets">) => boolean;
|
|
152
|
+
export declare const resolveVisibleSportsSectionTabDefinitions: (event: Pick<VenueEventWithMarkets, "categories" | "title" | "venueMarkets">) => SportsSectionTabDefinition[];
|
|
153
|
+
export declare const mergeSportsSectionMarketsIntoEvent: ({ event, sectionMarketsByKey, }: {
|
|
154
|
+
event: import("@agg-build/hooks").VenueEventWithMarkets;
|
|
155
|
+
sectionMarketsByKey: Partial<Record<SportsSectionTabKey, VenueMarket[]>>;
|
|
156
|
+
}) => import("@agg-build/hooks").VenueEventWithMarkets;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type SportsLineRailStop = {
|
|
2
|
+
/** Display value for the line, e.g. "1.5", "216.5". */
|
|
3
|
+
value: string;
|
|
4
|
+
/** Venue ids offering this line (small logos under the value). */
|
|
5
|
+
venues?: string[];
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type SportsLineRailProps = {
|
|
9
|
+
stops: SportsLineRailStop[];
|
|
10
|
+
selectedIndex: number;
|
|
11
|
+
onSelect: (index: number) => void;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
previousAriaLabel?: string;
|
|
14
|
+
nextAriaLabel?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function SportsLineRail({ stops, selectedIndex, onSelect, ariaLabel, previousAriaLabel, nextAriaLabel, className, }: SportsLineRailProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type SportsLineRailStop = {
|
|
2
|
+
/** Display value for the line, e.g. "1.5", "216.5". */
|
|
3
|
+
value: string;
|
|
4
|
+
/** Venue ids offering this line (small logos under the value). */
|
|
5
|
+
venues?: string[];
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type SportsLineRailProps = {
|
|
9
|
+
stops: SportsLineRailStop[];
|
|
10
|
+
selectedIndex: number;
|
|
11
|
+
onSelect: (index: number) => void;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
previousAriaLabel?: string;
|
|
14
|
+
nextAriaLabel?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function SportsLineRail({ stops, selectedIndex, onSelect, ariaLabel, previousAriaLabel, nextAriaLabel, className, }: SportsLineRailProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type UseMidpointsResult, type VenueMarket } from "@agg-build/hooks";
|
|
2
|
+
import { type SportsMarketDisplayGroup } from "./sports-event-market.utils";
|
|
3
|
+
export type SportsMarketCardProps = {
|
|
4
|
+
group: SportsMarketDisplayGroup;
|
|
5
|
+
/** Full market set for the active section — MarketDetails resolves the active
|
|
6
|
+
* market's cross-venue cluster from this (matched relations, not question). */
|
|
7
|
+
venueMarkets: VenueMarket[];
|
|
8
|
+
isExpanded: boolean;
|
|
9
|
+
onToggle: (groupId: string, market: VenueMarket) => void;
|
|
10
|
+
onOutcomeSelect?: (groupId: string, selection: {
|
|
11
|
+
marketId: string;
|
|
12
|
+
outcomeId: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
live?: boolean;
|
|
15
|
+
midpointsFallback?: Map<string, number>;
|
|
16
|
+
midpointsFallbackVenues?: Map<string, string>;
|
|
17
|
+
midpointsResult?: UseMidpointsResult;
|
|
18
|
+
};
|
|
19
|
+
export declare const SportsMarketCard: {
|
|
20
|
+
({ group, venueMarkets, isExpanded, onToggle, onOutcomeSelect, live, midpointsFallback, midpointsFallbackVenues, midpointsResult, }: SportsMarketCardProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type UseMidpointsResult, type VenueMarket } from "@agg-build/hooks";
|
|
2
|
+
import { type SportsMarketDisplayGroup } from "./sports-event-market.utils";
|
|
3
|
+
export type SportsMarketCardProps = {
|
|
4
|
+
group: SportsMarketDisplayGroup;
|
|
5
|
+
/** Full market set for the active section — MarketDetails resolves the active
|
|
6
|
+
* market's cross-venue cluster from this (matched relations, not question). */
|
|
7
|
+
venueMarkets: VenueMarket[];
|
|
8
|
+
isExpanded: boolean;
|
|
9
|
+
onToggle: (groupId: string, market: VenueMarket) => void;
|
|
10
|
+
onOutcomeSelect?: (groupId: string, selection: {
|
|
11
|
+
marketId: string;
|
|
12
|
+
outcomeId: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
live?: boolean;
|
|
15
|
+
midpointsFallback?: Map<string, number>;
|
|
16
|
+
midpointsFallbackVenues?: Map<string, string>;
|
|
17
|
+
midpointsResult?: UseMidpointsResult;
|
|
18
|
+
};
|
|
19
|
+
export declare const SportsMarketCard: {
|
|
20
|
+
({ group, venueMarkets, isExpanded, onToggle, onOutcomeSelect, live, midpointsFallback, midpointsFallbackVenues, midpointsResult, }: SportsMarketCardProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type UseMidpointsResult, type VenueEventWithMarkets, type VenueMarket } from "@agg-build/hooks";
|
|
2
|
+
import { type SportsSectionTabKey } from "./sports-event-market.utils";
|
|
3
|
+
export type SportsMarketsProps = {
|
|
4
|
+
event: VenueEventWithMarkets;
|
|
5
|
+
onSectionMarketsChange: (tabKey: SportsSectionTabKey, markets: VenueMarket[]) => void;
|
|
6
|
+
onOutcomeSelect?: () => void;
|
|
7
|
+
live?: boolean;
|
|
8
|
+
midpointsResult?: UseMidpointsResult;
|
|
9
|
+
};
|
|
10
|
+
export declare const SportsMarkets: {
|
|
11
|
+
({ event, onSectionMarketsChange, onOutcomeSelect, live, midpointsResult, }: SportsMarketsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type UseMidpointsResult, type VenueEventWithMarkets, type VenueMarket } from "@agg-build/hooks";
|
|
2
|
+
import { type SportsSectionTabKey } from "./sports-event-market.utils";
|
|
3
|
+
export type SportsMarketsProps = {
|
|
4
|
+
event: VenueEventWithMarkets;
|
|
5
|
+
onSectionMarketsChange: (tabKey: SportsSectionTabKey, markets: VenueMarket[]) => void;
|
|
6
|
+
onOutcomeSelect?: () => void;
|
|
7
|
+
live?: boolean;
|
|
8
|
+
midpointsResult?: UseMidpointsResult;
|
|
9
|
+
};
|
|
10
|
+
export declare const SportsMarkets: {
|
|
11
|
+
({ event, onSectionMarketsChange, onOutcomeSelect, live, midpointsResult, }: SportsMarketsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
@@ -2,6 +2,6 @@ import type { StateMessageProps } from "./state-message.types";
|
|
|
2
2
|
export type { StateMessageClassNames, StateMessageProps } from "./state-message.types";
|
|
3
3
|
/** Renders a centered state message surface with a caller-provided icon and optional retry action. */
|
|
4
4
|
export declare const StateMessage: {
|
|
5
|
-
({ icon, title, description, onAction, classNames, }: StateMessageProps): JSX.Element;
|
|
5
|
+
({ icon, title, description, onAction, classNames, ...rest }: StateMessageProps): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -2,6 +2,6 @@ import type { StateMessageProps } from "./state-message.types";
|
|
|
2
2
|
export type { StateMessageClassNames, StateMessageProps } from "./state-message.types";
|
|
3
3
|
/** Renders a centered state message surface with a caller-provided icon and optional retry action. */
|
|
4
4
|
export declare const StateMessage: {
|
|
5
|
-
({ icon, title, description, onAction, classNames, }: StateMessageProps): JSX.Element;
|
|
5
|
+
({ icon, title, description, onAction, classNames, ...rest }: StateMessageProps): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|