@simple-parlay/components 1.30.6-pre.3 → 1.30.6-pre.5
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 +289 -294
- package/dist/react/components/MultiLegTable.d.ts +3 -1
- package/dist/react/components/PlaceEntryProvider.d.ts +4 -1
- package/dist/react/components/PropositionFilters.d.ts +3 -1
- package/dist/react/components/SportRail.d.ts +0 -4
- 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 +289 -294
- package/dist/react/utils/index.d.ts +1 -1
- package/dist/react-native/components/LoadingIndicators.d.ts +1 -1
- package/dist/react-native/components/MultiLegTable.d.ts +3 -1
- package/dist/react-native/components/PlaceEntryProvider.d.ts +4 -1
- package/dist/react-native/components/PropositionFilters.d.ts +3 -1
- package/dist/react-native/components/SportRail.d.ts +6 -4
- package/dist/react-native/components/SportSelector.d.ts +2 -2
- 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 +376 -379
- package/dist/react-native/utils/index.d.ts +1 -1
- package/dist/shared/date-filters.d.ts +5 -4
- package/dist/shared/game-flow.d.ts +12 -1
- package/dist/shared/game-set-bet.d.ts +0 -1
- package/dist/shared/hooks.d.ts +1 -1
- package/dist/shared/menu-placement.d.ts +26 -0
- package/dist/shared/mirror.d.ts +5 -3
- package/dist/shared/picker-brand.d.ts +2 -0
- package/dist/shared/selection-actions.d.ts +9 -4
- package/dist/shared/selection-caps.d.ts +0 -1
- package/dist/shared/types.d.ts +7 -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';
|
|
@@ -23,7 +23,7 @@ export declare function CategoryGridSkeleton({ colors, count, }: {
|
|
|
23
23
|
colors: PickerSurfaceColors;
|
|
24
24
|
count?: number;
|
|
25
25
|
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
/** RN mirror of web `SportGridSkeleton` — stacked tile
|
|
26
|
+
/** RN mirror of web `SportGridSkeleton` — a stacked tile at every width. */
|
|
27
27
|
export declare function SportGridSkeleton({ colors, count, }: {
|
|
28
28
|
colors: PickerSurfaceColors;
|
|
29
29
|
count?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Game } from '../../shared/types';
|
|
1
2
|
export interface MultiLegTableColors {
|
|
2
3
|
textMuted: string;
|
|
3
4
|
success: string;
|
|
@@ -18,6 +19,7 @@ export interface MultiLegTableTier {
|
|
|
18
19
|
}
|
|
19
20
|
export interface MultiLegTableProps {
|
|
20
21
|
tiers: MultiLegTableTier[];
|
|
22
|
+
game?: Game | null;
|
|
21
23
|
selectedCount?: number;
|
|
22
24
|
onSelect: (count: number) => void;
|
|
23
25
|
colors: MultiLegTableColors;
|
|
@@ -34,4 +36,4 @@ export interface MultiLegTableProps {
|
|
|
34
36
|
onExpandedChange?: (expanded: boolean) => void;
|
|
35
37
|
summaryTiers?: MultiLegTableTier[];
|
|
36
38
|
}
|
|
37
|
-
export declare function MultiLegTable({ tiers, selectedCount, onSelect, colors: c, bodyFont, extraBetAmount, buttonLabel, columnLabel, buildYourOwn, quickPickOnly, onQuickPick, collapsible, expanded: expandedProp, onExpandedChange, summaryTiers }: MultiLegTableProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function MultiLegTable({ tiers, game, selectedCount, onSelect, colors: c, bodyFont, extraBetAmount, buttonLabel, columnLabel, buildYourOwn, quickPickOnly, onQuickPick, collapsible, expanded: expandedProp, onExpandedChange, summaryTiers }: MultiLegTableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { YesNoLabels } from '../../shared/utils';
|
|
2
3
|
import { Game, Proposition, SportSummary, GameEntry, TopPayoutsResponse, ShareData, ScreenSize } from '../types';
|
|
3
4
|
import { BladeTheme, BladeThemeSet, ColorScheme } from '../utils/themes';
|
|
4
5
|
import { SportDisplayNameOverrides, CategoryDisplayNameOverrides } from '../utils';
|
|
@@ -61,6 +62,7 @@ export interface PlaceEntryContextValue {
|
|
|
61
62
|
clearSelectedGame: () => void;
|
|
62
63
|
toggleSelection: (id: number, answer: 'yes' | 'no') => void;
|
|
63
64
|
quickPickGame: (game: Game, count: number, stake?: number) => void;
|
|
65
|
+
quickPickSelections: (count: number) => number;
|
|
64
66
|
selectedCategory: string | null;
|
|
65
67
|
setSelectedCategory: (category: string | null) => void;
|
|
66
68
|
selectedSport: string | null;
|
|
@@ -136,6 +138,7 @@ export interface PlaceEntryProviderProps {
|
|
|
136
138
|
selectionVariant?: SelectionVariant;
|
|
137
139
|
disableEventSwipe?: boolean;
|
|
138
140
|
/** Let players star a sport in the rail to pin it up front (per device). Off by default. */
|
|
141
|
+
yesNoLabels?: YesNoLabels;
|
|
139
142
|
enableSportFavourites?: boolean;
|
|
140
143
|
onEntryPlaced?: (entry: GameEntry) => void;
|
|
141
144
|
onBeforeSubmit?: (betAmount: number) => void | Promise<void>;
|
|
@@ -148,4 +151,4 @@ export interface PlaceEntryProviderProps {
|
|
|
148
151
|
sportDisplayNames?: SportDisplayNameOverrides;
|
|
149
152
|
categoryDisplayNames?: CategoryDisplayNameOverrides;
|
|
150
153
|
}
|
|
151
|
-
export declare function PlaceEntryProvider({ apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, getUserBalance, children, theme: themeProp, colorScheme, demoGames, demoPropositions, demoEntries, demoMaxPayouts, gameCategory, jurisdiction, initialGameId, filterSport, initialSport, initialEventId, initialEventLabel, sportBaseKey, disableQuickPick, renderTeamLogo, renderPropositionSilk, selectionVariant, disableEventSwipe, enableSportFavourites, onEntryPlaced, onBeforeSubmit, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
154
|
+
export declare function PlaceEntryProvider({ apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, getUserBalance, children, theme: themeProp, colorScheme, demoGames, demoPropositions, demoEntries, demoMaxPayouts, gameCategory, jurisdiction, initialGameId, filterSport, initialSport, initialEventId, initialEventLabel, sportBaseKey, disableQuickPick, renderTeamLogo, renderPropositionSilk, selectionVariant, disableEventSwipe, enableSportFavourites, yesNoLabels, onEntryPlaced, onBeforeSubmit, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,15 +6,17 @@ export interface FilterChipOption {
|
|
|
6
6
|
export interface FilterChipGroup {
|
|
7
7
|
label?: string;
|
|
8
8
|
options: FilterChipOption[];
|
|
9
|
-
value: string | null;
|
|
9
|
+
value: string | null | string[];
|
|
10
10
|
onChange: (value: string | null) => void;
|
|
11
11
|
}
|
|
12
|
+
export declare function isChipActive(groupValue: FilterChipGroup['value'], optValue: string | null): boolean;
|
|
12
13
|
export interface FilterChipCarouselProps {
|
|
13
14
|
groups: FilterChipGroup[];
|
|
14
15
|
theme: BladeTheme;
|
|
15
16
|
bodyFont?: string;
|
|
16
17
|
}
|
|
17
18
|
export declare function FilterChipCarousel({ groups, theme, bodyFont, }: FilterChipCarouselProps): import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
export declare function FilterChipPanel({ groups, theme, bodyFont }: FilterChipCarouselProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
20
|
export interface FilterChipRowProps extends FilterChipGroup {
|
|
19
21
|
theme: BladeTheme;
|
|
20
22
|
bodyFont?: string;
|
|
@@ -10,10 +10,12 @@ export interface SportRailProps {
|
|
|
10
10
|
style?: StyleProp<ViewStyle>;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* The sport step
|
|
14
|
-
* setup page
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* The sport step. It sits on a game's setup page, and — for the games that have
|
|
14
|
+
* no setup page — above the proposition list, so there is always one place to
|
|
15
|
+
* change it. Never on the game grid.
|
|
16
|
+
*
|
|
17
|
+
* A bet is one sport: once the slip has picks the rail locks, and the only way
|
|
18
|
+
* across is to clear the bet — silently wiping the card on a mis-tap was worse.
|
|
17
19
|
*
|
|
18
20
|
* Renders nothing at all when the sport is not a choice, which is every
|
|
19
21
|
* single-sport game.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Proposition, SportSelectorProps } from '../../shared/types';
|
|
2
|
+
import { Proposition, RenderTeamLogo, SportSelectorProps } from '../../shared/types';
|
|
3
3
|
/** A header key names two teams when it splits on " vs " — `MatchupTeams`' own test. */
|
|
4
4
|
export declare function isMatchupKey(key?: string | null): boolean;
|
|
5
5
|
/** The runner's silk, for single-event rows; under an "A vs B" header the logos are already up top. */
|
|
@@ -39,4 +39,4 @@ export declare function CompositePropositionText({ prop, colors: c, size, compon
|
|
|
39
39
|
*/
|
|
40
40
|
renderTeamLogo?: RenderTeamLogo;
|
|
41
41
|
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
export declare function SportSelector({ game, propositions, selections, onToggleSelection, onNext, onBack, loading, error, theme: themeProp, colorScheme, hideActions, initialSport, renderTeamLogo, disableQuickPick, selectedPropositionCount, onPropositionCountChange, gameCategory, headerExtra, variant, disableEventSwipe, }: SportSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function SportSelector({ game, propositions, selections, onToggleSelection, onNext, onBack, loading, error, theme: themeProp, colorScheme, hideActions, initialSport, renderTeamLogo, disableQuickPick, selectedPropositionCount, onPropositionCountChange, gameCategory, headerExtra, railSlot, variant, disableEventSwipe, }: SportSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { ViewStyle, TextStyle, StyleProp, Animated } from 'react-native';
|
|
3
3
|
import { BladeTheme } from '../../../shared/themes';
|
|
4
|
+
import { YesNoLabels } from '../../../shared/utils';
|
|
4
5
|
/** Twin of the web `TOUCH_TARGET`: minimum hit area in px. Shrink the paint, never the target. */
|
|
5
6
|
export declare const TOUCH_TARGET = 44;
|
|
6
7
|
/**
|
|
@@ -78,6 +79,9 @@ export declare function Divider({ theme, orientation, style, }: {
|
|
|
78
79
|
export type YesNoValue = 'yes' | 'no';
|
|
79
80
|
export type YesNoAnswer = YesNoValue | null | undefined;
|
|
80
81
|
export type YesNoSize = 'xs' | 'sm' | 'md';
|
|
82
|
+
export type { YesNoLabels };
|
|
83
|
+
export declare const YesNoLabelsProvider: React.Provider<YesNoLabels>;
|
|
84
|
+
export declare function useYesNoLabels(): YesNoLabels;
|
|
81
85
|
export interface YesNoButtonsProps {
|
|
82
86
|
theme: BladeTheme;
|
|
83
87
|
/** Currently selected side, if any. */
|
|
@@ -12,6 +12,8 @@ export { GameEntries } from './components/GameEntries';
|
|
|
12
12
|
export { QuickPickButton } from './components/QuickPickButton';
|
|
13
13
|
export type { QuickPickButtonProps } from './components/QuickPickButton';
|
|
14
14
|
export { PlaceEntryProvider, usePlaceEntry } from './components/PlaceEntryProvider';
|
|
15
|
+
export { useYesNoLabels } from './components/_primitives';
|
|
16
|
+
export type { YesNoLabels } from '../shared/utils';
|
|
15
17
|
export type { PlaceEntryProviderProps, PlaceEntryContextValue } from './components/PlaceEntryProvider';
|
|
16
18
|
export { GamePage, GamePageTitle, GamePageActions } from './components/GamePage';
|
|
17
19
|
export type { GamePageProps } from './components/GamePage';
|