@simple-parlay/components 1.30.6-pre.4 → 1.30.6-pre.6
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +288 -290
- package/dist/react/components/PlaceEntryProvider.d.ts +3 -1
- package/dist/react/components/PropositionFilters.d.ts +3 -1
- package/dist/react/components/ScrollShelf.d.ts +5 -1
- package/dist/react/components/SportRail.d.ts +13 -7
- package/dist/react/components/SportSelector.d.ts +1 -1
- package/dist/react/components/_primitives/index.d.ts +4 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +1 -1
- package/dist/react/index.mjs +288 -290
- package/dist/react/utils/index.d.ts +1 -1
- package/dist/react-native/components/LoadingIndicators.d.ts +1 -1
- package/dist/react-native/components/PlaceEntryProvider.d.ts +3 -1
- package/dist/react-native/components/PropositionFilters.d.ts +3 -1
- package/dist/react-native/components/ScrollShelf.d.ts +8 -1
- package/dist/react-native/components/SportRail.d.ts +13 -7
- package/dist/react-native/components/SportSelector.d.ts +1 -1
- package/dist/react-native/components/_primitives/index.d.ts +5 -1
- package/dist/react-native/index.d.ts +2 -0
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.mjs +378 -381
- package/dist/react-native/utils/index.d.ts +1 -1
- package/dist/shared/date-filters.d.ts +5 -4
- package/dist/shared/hooks.d.ts +1 -1
- package/dist/shared/picker-brand.d.ts +22 -0
- package/dist/shared/selection-actions.d.ts +3 -2
- package/dist/shared/selection-caps.d.ts +4 -0
- package/dist/shared/types.d.ts +6 -0
- package/dist/shared/utils.d.ts +11 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { resolvePrice, toNumber, toBool, formatYesNo, formatCurrency, formatDate, groupPropositionsBySport, getPropositionSportKey, collectPropositionSportKeys, compositePropositionMatchesSport, compositePropositionMatchesGameSports, groupPropositionsByCategory, groupPropositionsByEntryCategory, getPropositionEntryCategory, isRacingProposition, getAvailableEntryCategories, getSportPickerTitle, getCategoryDisplayName, getCategoryTagline, getSportShortCode, getSportPickerTagline, getSportSummaryTagline, splitSportLabel, getSportComingSoonCaption, getHowToPlayPanel, describeDemoVerdict, groupByMatchup, groupByRace, groupPropositionsForDisplay, isRacingCategory, buildRangeLegOptions, getPayoutForCount, generateQuickPick, isValidSelectionCount, getEffectivePropositionLimits, findPermittedRule, getJackpotInfo, getSportDisplayName, resolveSportDisplayName, resolveCategoryDisplayName, filterPropositionsForGame, filterPropositionPool, filterGamesByPropositionPool, filterGamesByEntryCategory, gameHasPropositionsInPool, getGameEntryCategory, gameMatchesEntryCategory, gamePermitsSport, normalizeGamesSport, sportKeysCompatible, propositionSportMatches, isGameAvailableToday, getAvailableDaysLabel, contrastTextColour, readableColor, getCompositeOperatorLabel, getCompositeHelperText, parseCompositeDescription, inferCompositeOperatorFromDescription, resolveCompositeOperator, resolveCompositeDisplay, resolveCompositeLegs, parseCompositeComponentIds, collectCompositeComponentIds, formatPropositionEventLabel, getPropositionDescription, getPropositionMarketType, resolveGameIconId, resolveGameIconUrl, isGameIconUrl, resolveGameIconMarkup, } from '../../shared/utils';
|
|
1
|
+
export { resolvePrice, toNumber, toBool, formatYesNo, DEFAULT_YES_NO_LABELS, formatCurrency, formatDate, groupPropositionsBySport, getPropositionSportKey, collectPropositionSportKeys, compositePropositionMatchesSport, compositePropositionMatchesGameSports, groupPropositionsByCategory, groupPropositionsByEntryCategory, getPropositionEntryCategory, isRacingProposition, getAvailableEntryCategories, getSportPickerTitle, getCategoryDisplayName, getCategoryTagline, getSportShortCode, getSportPickerTagline, getSportSummaryTagline, splitSportLabel, getSportComingSoonCaption, getHowToPlayPanel, describeDemoVerdict, groupByMatchup, groupByRace, groupPropositionsForDisplay, isRacingCategory, buildRangeLegOptions, getPayoutForCount, generateQuickPick, isValidSelectionCount, getEffectivePropositionLimits, findPermittedRule, getJackpotInfo, getSportDisplayName, resolveSportDisplayName, resolveSportLabel, resolveCategoryDisplayName, filterPropositionsForGame, filterPropositionPool, filterGamesByPropositionPool, filterGamesByEntryCategory, gameHasPropositionsInPool, getGameEntryCategory, gameMatchesEntryCategory, gamePermitsSport, normalizeGamesSport, sportKeysCompatible, propositionSportMatches, isGameAvailableToday, getAvailableDaysLabel, contrastTextColour, readableColor, getCompositeOperatorLabel, getCompositeHelperText, parseCompositeDescription, inferCompositeOperatorFromDescription, resolveCompositeOperator, resolveCompositeDisplay, resolveCompositeLegs, parseCompositeComponentIds, collectCompositeComponentIds, formatPropositionEventLabel, getPropositionDescription, getPropositionMarketType, resolveGameIconId, resolveGameIconUrl, isGameIconUrl, resolveGameIconMarkup, } from '../../shared/utils';
|
|
2
2
|
export type { SportDisplayNameOverrides, CategoryDisplayNameOverrides, GameIconId, ComingSoonSport, HowToPlayPanelContent, HowToPlaySummarySegment, HowToPlayStep, HowToPlayDemoLeg, HowToPlayDemoVerdict } from '../../shared/utils';
|
|
@@ -12,10 +12,11 @@ export declare function matchesDateWindow(commenceTime: string | null | undefine
|
|
|
12
12
|
/**
|
|
13
13
|
* Which date-window chips are worth showing for a set of propositions.
|
|
14
14
|
*
|
|
15
|
-
* A window
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* A window appears when at least one prop falls inside it — so the chips read
|
|
16
|
+
* the same way every time you open the panel. The whole group drops out only
|
|
17
|
+
* when no window can change the list at all (every dated prop inside every
|
|
18
|
+
* window it matches), which is what a game the operator already caps to a
|
|
19
|
+
* single day or week looks like.
|
|
19
20
|
*/
|
|
20
21
|
export declare function availableDateWindows(propositions: ReadonlyArray<Pick<Proposition, 'commence_time'>>, now: Date): DateWindowOption[];
|
|
21
22
|
/**
|
package/dist/shared/hooks.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export declare function useCreateGameEntry(apiClient: BladeApiClient): {
|
|
|
67
67
|
clearSubmitError: () => void;
|
|
68
68
|
};
|
|
69
69
|
export declare function usePlaceEntryFlow(initialGameId?: number): {
|
|
70
|
-
step: "
|
|
70
|
+
step: "sport" | "success" | "game" | "confirm";
|
|
71
71
|
selectedGame: Game | null;
|
|
72
72
|
selections: Record<number, "yes" | "no">;
|
|
73
73
|
placedEntry: GameEntry | null;
|
|
@@ -2,8 +2,30 @@ export declare const PICKER_BRAND: {
|
|
|
2
2
|
readonly stone: "#DDD9D2";
|
|
3
3
|
readonly teal: "#0F4C5C";
|
|
4
4
|
readonly citron: "#DFFF1A";
|
|
5
|
+
readonly tealMid: "#4B7985";
|
|
6
|
+
readonly tealSoft: "#7B9DA5";
|
|
5
7
|
};
|
|
6
8
|
export declare const SPORT_SHORT_CODES: Record<string, string>;
|
|
9
|
+
/**
|
|
10
|
+
* What a league's acronym stands for. The sport track rides on short codes and
|
|
11
|
+
* swaps in the full names once it is wide enough to hold them, so the leagues
|
|
12
|
+
* whose display name *is* the acronym need a longer one to open into.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SPORT_LONG_NAMES: Record<string, string>;
|
|
15
|
+
export declare function getSportLongName(sport: string, fallback: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* The pair of labels one sport track segment rides on: the code it shows at
|
|
18
|
+
* rest and the name it opens out to. `shown` is whatever the flow calls the
|
|
19
|
+
* sport — a host override, the API's label, or the derived name.
|
|
20
|
+
*
|
|
21
|
+
* A `shown` that is already an acronym *is* the code (deriving one from the raw
|
|
22
|
+
* key gave AFLW the code "RUG"), and a sport whose name is only its acronym
|
|
23
|
+
* opens out to the long form, if there is one to open into.
|
|
24
|
+
*/
|
|
25
|
+
export declare function sportTrackLabels(sport: string, shown: string, sportBaseKey?: string | null): {
|
|
26
|
+
code: string;
|
|
27
|
+
name: string;
|
|
28
|
+
};
|
|
7
29
|
export declare function getCategoryTagline(category: string): string;
|
|
8
30
|
export declare function getSportShortCode(sport: string, sportBaseKey?: string | null, override?: string): string;
|
|
9
31
|
export declare function getSportPickerTagline(count: number, selectedCategory?: string | null): string;
|
|
@@ -6,10 +6,11 @@ export declare const SLIP_DIVIDEND_LABEL = "Potential dividend";
|
|
|
6
6
|
export declare const SLIP_LEG_HINT = "Tap a leg to read it.";
|
|
7
7
|
export declare const SLIP_LEG_REMOVE = "Remove";
|
|
8
8
|
export declare const SLIP_CLEAR = "Clear bet";
|
|
9
|
+
export declare const SPORT_LOCKED_HINT = "One sport per bet.";
|
|
9
10
|
export declare const VIEW_LIST_GLYPH = "\u2630";
|
|
10
11
|
export declare const VIEW_SWIPE_GLYPH = "\u21C6";
|
|
11
|
-
export declare const VIEW_LIST_LABEL = "List
|
|
12
|
-
export declare const VIEW_SWIPE_LABEL = "Swipe
|
|
12
|
+
export declare const VIEW_LIST_LABEL = "List";
|
|
13
|
+
export declare const VIEW_SWIPE_LABEL = "Swipe";
|
|
13
14
|
export interface LiveSlipLeg {
|
|
14
15
|
id: number;
|
|
15
16
|
/** 1-based position in the multi — the number printed on the tile. */
|
|
@@ -4,6 +4,10 @@ export declare const MARKET_FAMILIES: MarketFamily[];
|
|
|
4
4
|
export declare const MARKET_CAPS: Record<MarketFamily, number>;
|
|
5
5
|
/** Slot names, as they read on a fixture header. */
|
|
6
6
|
export declare const MARKET_FAMILY_LABEL: Record<MarketFamily, string>;
|
|
7
|
+
/** How the market filter names each family — plural, since it picks many. */
|
|
8
|
+
export declare const MARKET_FAMILY_FILTER_LABEL: Record<MarketFamily, string>;
|
|
9
|
+
/** A raw feed market type as a filter chip reads it: `player_first_try` → "Player First Try". */
|
|
10
|
+
export declare function formatMarketTypeLabel(marketType: string): string;
|
|
7
11
|
export declare function slotTooltip(family: MarketFamily, filled: boolean): string;
|
|
8
12
|
/** Why a greyed row won't answer. */
|
|
9
13
|
export declare function capReason(family: MarketFamily): string;
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -332,6 +332,12 @@ export interface SportSelectorProps {
|
|
|
332
332
|
onPropositionCountChange?: (count: number) => void;
|
|
333
333
|
allowAnswerToggle?: boolean;
|
|
334
334
|
headerExtra?: ReactNode;
|
|
335
|
+
/**
|
|
336
|
+
* Sport rail for the header row. A node draws to the left of the filter and
|
|
337
|
+
* view controls; a function is handed those controls to place itself, which
|
|
338
|
+
* is how the rail keeps the full width for its track.
|
|
339
|
+
*/
|
|
340
|
+
railSlot?: ReactNode | ((actions: ReactNode) => ReactNode);
|
|
335
341
|
/**
|
|
336
342
|
* Which proposition layout to draw. Omitted (the default) is the packaged
|
|
337
343
|
* matchup list; the variants are YESNO's fixture-first designs. Falls back to
|
package/dist/shared/utils.d.ts
CHANGED
|
@@ -7,7 +7,12 @@ export declare function resolvePrice(price: number | string | {
|
|
|
7
7
|
} | null | undefined): number;
|
|
8
8
|
export declare function toNumber(value: unknown): number;
|
|
9
9
|
export declare function toBool(value: unknown): boolean;
|
|
10
|
-
export
|
|
10
|
+
export interface YesNoLabels {
|
|
11
|
+
yes: string;
|
|
12
|
+
no: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const DEFAULT_YES_NO_LABELS: YesNoLabels;
|
|
15
|
+
export declare function formatYesNo(value: string, labels?: YesNoLabels): string;
|
|
11
16
|
export declare function formatCurrency(value: number): string;
|
|
12
17
|
export declare function formatDate(date: Date | string): string;
|
|
13
18
|
export declare function groupPropositionsBySport(propositions: Proposition[]): Record<string, Proposition[]>;
|
|
@@ -65,6 +70,11 @@ export type SportDisplayNameOverrides = Record<string, string>;
|
|
|
65
70
|
/** Host-supplied UI labels keyed by entry category (e.g. `sports`, `casino`, `racing`). */
|
|
66
71
|
export type CategoryDisplayNameOverrides = Record<string, string>;
|
|
67
72
|
export declare function resolveSportDisplayName(sport: string, overrides?: SportDisplayNameOverrides | null, sportBaseKey?: string | null): string;
|
|
73
|
+
export declare function resolveSportLabel(sport: string, sources: {
|
|
74
|
+
overrides?: SportDisplayNameOverrides | null;
|
|
75
|
+
summaryLabel?: string | null;
|
|
76
|
+
sportBaseKey?: string | null;
|
|
77
|
+
}): string;
|
|
68
78
|
export declare function resolveCategoryDisplayName(category: string, overrides?: CategoryDisplayNameOverrides | null): string;
|
|
69
79
|
/**
|
|
70
80
|
* Filter propositions to only those allowed by a game's constraints.
|